diff --git a/.changeset/trust-disclosure.md b/.changeset/trust-disclosure.md new file mode 100644 index 000000000..bfc27ac04 --- /dev/null +++ b/.changeset/trust-disclosure.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +The workspace trust prompt now lists the MCP servers, extra directories, and project instruction sources that trusting would activate. diff --git a/.changeset/trust-workspace-env.md b/.changeset/trust-workspace-env.md new file mode 100644 index 000000000..53604f458 --- /dev/null +++ b/.changeset/trust-workspace-env.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +Add PYTHINKER_CODE_TRUST_WORKSPACE=1 to trust the current workspace for headless runs without answering the trust prompt. diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 6c295135a..34cb89255 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -20,7 +20,7 @@ "@types/node": "^26.1.2", "@types/semver": "^7.7.0", "builder-util-runtime": "9.7.0", - "electron": "43.4.0", + "electron": "43.5.0", "electron-builder": "26.15.3", "electron-updater": "6.8.9", "semver": "^7.7.4", diff --git a/apps/pythinker-code/dist-web/.web-bundle-manifest.json b/apps/pythinker-code/dist-web/.web-bundle-manifest.json index 352873fe9..6bab51528 100644 --- a/apps/pythinker-code/dist-web/.web-bundle-manifest.json +++ b/apps/pythinker-code/dist-web/.web-bundle-manifest.json @@ -1,4 +1,4 @@ { - "sourceHash": "04602432b100c73fa465235500caccbe13e6af08198ab1c90198cdc5bd19fd1c", + "sourceHash": "0b9e0a931397c88206a0e22886da74780ce0c4a27202e3f6f9f81cd32777b557", "sourceFileCount": 496 } diff --git a/apps/pythinker-code/dist-web/assets/CodeBlockNode-uERC4D15.js b/apps/pythinker-code/dist-web/assets/CodeBlockNode-BscDteEG.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/CodeBlockNode-uERC4D15.js rename to apps/pythinker-code/dist-web/assets/CodeBlockNode-BscDteEG.js index 79eaaa558..d1c12b5c3 100644 --- a/apps/pythinker-code/dist-web/assets/CodeBlockNode-uERC4D15.js +++ b/apps/pythinker-code/dist-web/assets/CodeBlockNode-BscDteEG.js @@ -1,3 +1,3 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-BlrGujvY.js","assets/preload-helper-zJ_50EbN.js"])))=>i.map(i=>d[i]); -import{A as e,G as t,I as n,J as r,N as i,O as a,P as o,S as s,T as c,U as l,_ as u,b as d,c as f,d as p,f as m,g as h,h as g,j as _,lt as ee,m as v,n as te,nt as y,ot as b,q as ne,rt as re,st as ie,u as ae,ut as x,v as S,w as C,y as oe,z as se}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{t as ce}from"./preload-helper-zJ_50EbN.js";import{$ as le,A as ue,D as de,J as fe,M as pe,O as me,Q as he,T as ge,X as _e,Y as ve,Z as ye,_ as be,a as xe,d as Se,et as Ce,g as we,h as Te,j as w,n as Ee,nt as De,o as Oe,p as ke,s as Ae,tt as je,v as Me,x as Ne}from"./index-CJN6blp7.js";var Pe=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Fe=!1,Ie=null,Le=null,T=null;function Re(){return Pe(this,null,function*(){if(T)return T;T=Pe(null,null,function*(){if(!Le)try{if(Le=function(e){let t=e;if(typeof t?.useMonaco==`function`)return t;let n=e?.default;return typeof n?.useMonaco==`function`?n:null}(yield ce(()=>import(`./dist-BlrGujvY.js`),__vite__mapDeps([0,1]))),!Le)return null}catch{return null}try{return yield function(e){return Pe(this,null,function*(){if(!Fe)return Ie||(Ie=Pe(null,null,function*(){let t=globalThis==null?void 0:globalThis.MonacoEnvironment;t&&(typeof t.getWorker==`function`||typeof t.getWorkerUrl==`function`)||typeof e?.preloadMonacoWorkers!=`function`||(yield e.preloadMonacoWorkers()),Fe=!0}).finally(()=>{Ie=null}),Ie)})}(Le),je(),Le}catch{return null}});try{return yield T}finally{T=null}})}var E=Object.defineProperty,ze=Object.defineProperties,D=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,k=(e,t,n)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A=(e,t)=>{for(var n in t||={})O.call(t,n)&&k(e,n,t[n]);if(Be)for(var n of Be(t))Ve.call(t,n)&&k(e,n,t[n]);return e},j=(e,t)=>ze(e,D(t)),M=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),N={key:0,class:`code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]`},P={class:`flex items-center gap-0.5`},F=[`aria-label`],I={class:`code-diff-stat removed`},He={class:`code-diff-stat added`},L=[`aria-label`],Ue={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},We={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Ge=[`aria-pressed`],Ke={key:3,class:`relative`},qe=[`aria-expanded`],Je=[`disabled`],Ye=[`disabled`],R=[`disabled`],Xe={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Ze={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Qe={class:`code-loading-placeholder`},$e={class:`sr-only`,"aria-live":`polite`,role:`status`},et=C({__name:`CodeBlockShell`,props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:[`toggleCollapse`,`decreaseFont`,`resetFont`,`increaseFont`,`copy`,`toggleExpand`,`preview`],setup(e,{emit:t}){let i=e,a=t,o=y(!1),c=y(null),l=y(null);function m(){Ee(!0),o.value=!o.value,o.value&&document.addEventListener(`click`,_,{once:!0,capture:!0})}function h(){Ee(!0),o.value=!1}function _(e){let t=e.target;c.value?.contains(t)||l.value?.contains(t)?document.addEventListener(`click`,_,{once:!0,capture:!0}):h()}let re=v(()=>i.showFontSizeButtons&&i.enableFontSizeControl||i.showExpandButton||i.isPreviewable&&i.showPreviewButton),{t:C}=xe(),oe=v(()=>!1!==i.showTooltips);function ce(e,t){oe.value&&Te(e.currentTarget,t,`top`,!1,void 0,i.isDark)}function le(){oe.value&&Ee()}function ue(e){ce(e,i.copyText?C(`common.copied`)||`Copied`:C(`common.copy`)||`Copy`)}let de=v(()=>!!Number.isFinite(i.codeFontSize)&&(i.codeFontSize??0)<=(i.codeFontMin??0)),fe=v(()=>!i.fontBaselineReady||i.codeFontSize===i.defaultCodeFontSize),pe=v(()=>!!Number.isFinite(i.codeFontSize)&&(i.codeFontSize??0)>=(i.codeFontMax??100));return(t,_)=>(n(),S(p,null,[i.showHeader?(n(),S(`div`,N,[se(t.$slots,`header-left`),se(t.$slots,`header-right`,{},()=>[g(`div`,P,[e.diffStats?(n(),S(`div`,{key:0,class:`code-diff-stats`,"aria-label":e.diffStatsAriaLabel},[g(`span`,I,`-`+x(e.diffStats.removed),1),g(`span`,He,`+`+x(e.diffStats.added),1)],8,F)):u(``,!0),i.showCopyButton?(n(),S(`button`,{key:1,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,"aria-label":e.copyText?b(C)(`common.copied`)||`Copied`:b(C)(`common.copy`)||`Copy`,onClick:_[0]||=e=>a(`copy`),onMouseenter:_[1]||=e=>ue(e),onFocus:_[2]||=e=>ue(e),onMouseleave:le,onBlur:le},[e.copyText?(n(),S(`svg`,We,[..._[14]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(n(),S(`svg`,Ue,[..._[13]||=[g(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[g(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),g(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],40,L)):u(``,!0),i.showCollapseButton?(n(),S(`button`,{key:2,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,"aria-pressed":e.isCollapsed,onClick:_[3]||=e=>a(`toggleCollapse`),onMouseenter:_[4]||=t=>ce(t,e.isCollapsed?b(C)(`common.expand`)||`Expand`:b(C)(`common.collapse`)||`Collapse`),onFocus:_[5]||=t=>ce(t,e.isCollapsed?b(C)(`common.expand`)||`Expand`:b(C)(`common.collapse`)||`Collapse`),onMouseleave:le,onBlur:le},[(n(),S(`svg`,{style:ee({rotate:e.isCollapsed?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[..._[15]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,Ge)):u(``,!0),re.value?(n(),S(`div`,Ke,[g(`button`,{ref_key:`moreBtnRef`,ref:l,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors`,"aria-expanded":o.value,"aria-haspopup":`true`,onClick:ae(m,[`stop`]),onMouseenter:_[6]||=e=>ce(e,b(C)(`common.more`)||`More`),onFocus:_[7]||=e=>ce(e,b(C)(`common.more`)||`More`),onMouseleave:le,onBlur:le},[..._[16]||=[d(``,1)]],40,qe),s(te,{name:`code-menu`},{default:ne(()=>[o.value?(n(),S(`div`,{key:0,ref_key:`moreMenuRef`,ref:c,class:`code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]`,role:`menu`},[i.showFontSizeButtons&&i.enableFontSizeControl?(n(),S(p,{key:0},[g(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:de.value,onClick:_[8]||=e=>{b(Ee)(!0),a(`decreaseFont`)}},[_[17]||=g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14`})],-1),g(`span`,null,x(b(C)(`common.fontSmaller`)||`Font size −`),1)],8,Je),g(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:fe.value,onClick:_[9]||=e=>{b(Ee)(!0),a(`resetFont`)}},[_[18]||=g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[g(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[g(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),g(`path`,{d:`M3 3v5h5`})])],-1),g(`span`,null,x(b(C)(`common.fontReset`)||`Font size reset`),1)],8,Ye),g(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:pe.value,onClick:_[10]||=e=>{b(Ee)(!0),a(`increaseFont`)}},[_[19]||=g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14m-7-7v14`})],-1),g(`span`,null,x(b(C)(`common.fontLarger`)||`Font size +`),1)],8,R)],64)):u(``,!0),i.showExpandButton?(n(),S(`button`,{key:1,type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors`,onClick:_[11]||=e=>{h(),a(`toggleExpand`)}},[e.isExpanded?(n(),S(`svg`,Xe,[..._[20]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):(n(),S(`svg`,Ze,[..._[21]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]])),g(`span`,null,x(e.isExpanded?b(C)(`common.collapse`)||`Collapse`:b(C)(`common.expand`)||`Expand`),1)])):u(``,!0),e.isPreviewable&&i.showPreviewButton?(n(),S(`button`,{key:2,type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors`,onClick:_[12]||=e=>{h(),a(`preview`)}},[_[22]||=g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[g(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[g(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),g(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),g(`span`,null,x(b(C)(`common.preview`)||`Preview`),1)])):u(``,!0)],512)):u(``,!0)]),_:1})])):u(``,!0)])])])):u(``,!0),r(g(`div`,{class:ie([`code-block-shell-content`,{"code-block-shell-content--collapsed":e.isCollapsed}])},[se(t.$slots,`default`)],2),[[f,!!e.stream||!e.loading]]),r(g(`div`,Qe,[se(t.$slots,`loading`,{},()=>[_[23]||=g(`div`,{class:`loading-skeleton`},[g(`div`,{class:`skeleton-line`}),g(`div`,{class:`skeleton-line`}),g(`div`,{class:`skeleton-line short`})],-1)])],512),[[f,!e.stream&&e.loading]]),g(`span`,$e,x(e.copyText?b(C)(`common.copied`)||`Copied`:``),1)],64))}}),tt={class:`html-preview-frame__header`},nt={class:`html-preview-frame__title`},rt={class:`html-preview-frame__label`},z=[`sandbox`,`srcdoc`],it=be(C({__name:`HtmlPreviewFrame`,props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(e){let t=e,{t:r}=xe(),a=v(()=>{let e=t.code||``,n=e.trim().toLowerCase();return n.startsWith(`\n\n \n \n \n \n \n \n ${e}\n \n`}),s=v(()=>{return e=t.htmlPreviewSandbox,n=t.htmlPreviewAllowScripts,typeof e==`string`?e:e===void 0&&!0===n?`allow-scripts`:``;var e,n});function c(e){var n;e.key!==`Escape`&&e.key!==`Esc`||(n=t.onClose)==null||n.call(t)}return i(()=>{typeof window<`u`&&window.addEventListener(`keydown`,c)}),o(()=>{typeof window<`u`&&window.removeEventListener(`keydown`,c)}),(e,i)=>(n(),h(m,{to:`body`},[g(`div`,{class:ie([`markstream-vue`,{dark:t.isDark}])},[g(`div`,{class:`html-preview-frame__backdrop`,onClick:i[2]||=e=>t.onClose?.call(t)},[g(`div`,{class:`html-preview-frame`,onClick:i[1]||=ae(()=>{},[`stop`])},[g(`div`,tt,[g(`div`,nt,[i[3]||=g(`span`,{class:`html-preview-frame__dot`},null,-1),g(`span`,rt,x(t.title||b(r)(`common.preview`)||`Preview`),1)]),g(`button`,{type:`button`,class:`html-preview-frame__close`,onClick:i[0]||=e=>t.onClose?.call(t)},` × `)]),g(`iframe`,{class:`html-preview-frame__iframe`,sandbox:s.value,referrerpolicy:`no-referrer`,srcdoc:a.value},null,8,z)])])],2)]))}}),[[`__scopeId`,`data-v-24e66176`]]),at=[`data-markstream-enhanced`,`data-markstream-enhancement-state`,`data-markstream-code-block-state`,`data-markstream-pending`,`data-markstream-viewport-pending`],ot={class:`code-header-main`},st=[`innerHTML`],ct={class:`code-header-copy`},lt={class:`code-header-title`},ut={key:0,class:`code-header-caption`},dt=[`data-markstream-host-hidden`],ft=`__markstreamMonacoPassiveTouchState__`,pt=be(C({__name:`CodeBlockNode`,props:{node:{},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},theme:{},darkTheme:{default:`vitesse-dark`},lightTheme:{default:`vitesse-light`},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},customId:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{},estimatedDiffInline:{type:Boolean}},emits:[`previewCode`,`copy`],setup(d,{emit:p}){let m=d,te=p,ae=l(),C=a(Ce,null),ce=a(`markstreamHostScrollManaged`,null),be=a(ge,void 0),Te=v(()=>Se(m,ae)),je=new Set;function Pe(e){return M(this,null,function*(){if(typeof window>`u`)return yield e();let t=window.Element?.prototype,n=t?.addEventListener;if(!t||!n)return yield e();let r=function(){let e=window,t=e[ft];if(t)return t;let n={depth:0,original:null};return e[ft]=n,n}(),i=null;try{r.depth===0&&(r.original=n,t.addEventListener=function(e,t,i){let a=r.original??n;return e===`touchstart`&&function(e,t){if(!e)return!1;let n=e;return!(typeof n.closest!=`function`||!n.closest(`.monaco-editor, .monaco-diff-editor`)||t&&typeof t==`object`&&`passive`in t)}(this,i)?a.call(this,e,t,function(e){return e==null?{passive:!0}:typeof e==`boolean`?{capture:e,passive:!0}:typeof e==`object`?`passive`in e?e:j(A({},e),{passive:!0}):{passive:!0}}(i)):a.call(this,e,t,i)}),r.depth++;let e=!1;i=()=>{e||(e=!0,je.delete(i),r.depth=Math.max(0,r.depth-1),r.depth===0&&r.original&&t.addEventListener!==r.original&&(t.addEventListener=r.original,r.original=null))},je.add(i)}catch{return yield e()}try{return yield e()}finally{i?.()}})}let Fe=c(),Ie=v(()=>{let e=Fe?.vnode.props;return!(!e||!e.onPreviewCode&&!e[`onPreview-code`])}),{t:Le}=xe(),T=y(null),E=y(null),ze=y(!1),D=y(Xr(m.node.language,m.node.code,Jr())),Be=v(()=>ye(D.value)),O=v(()=>Be.value===`plaintext`?`text`:Be.value),Ve=v(()=>Be.value===`plaintext`),k=y(!1),N=y(!1),P=y(!1),F=y(!1),I=y(!1),He=y(!1),L=!1,Ue=null,We=null,Ge=null,Ke=0,qe=!1,Je=``,Ye=y(null),R=y(null),Xe=null,Ze=0,Qe=!1,$e=ke(),tt=Ne(),nt=Me(),rt=re(null),z=y(typeof window>`u`||!nt.value),pt=c()?.vnode.el?.textContent??``,mt=y(!(typeof window<`u`&&String(m.node.code??``).length>0&&pt.includes(String(m.node.code))));i(()=>{mt.value=!0}),typeof window<`u`&&t([()=>E.value,nt],([e,t],n,r)=>{var i;if((i=rt.value)==null||i.destroy(),rt.value=null,!t||z.value)return void(z.value=!0);if(!e)return void(z.value=!1);let a=!0,o=$e(e,{rootMargin:tt?.value.heavyBlockMargin??tt?.value.rootMargin??`0px`,allowIdle:!1});rt.value=o,z.value=z.value||o.isVisible.value,o.whenVisible.then(()=>{a&&rt.value===o&&(z.value=!0)}).catch(()=>{}),r(()=>{a=!1,o.destroy(),rt.value===o&&(rt.value=null)})},{immediate:!0}),_(()=>{var e;L=!0;for(let e of Array.from(je))e();(function(){let e=Je;C&&e&&(Je=``,C.markSettled(e))})(),(e=rt.value)==null||e.destroy(),rt.value=null});let B=null,ht=null,gt=()=>{},_t=()=>{},vt=()=>null,V=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),H=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),yt=()=>{},bt=()=>{},xt=()=>{},St=null,Ct=null,wt=null,Tt=null,Et=()=>String(m.node.language??`plaintext`),Dt=()=>M(null,null,function*(){}),Ot=!1,kt=null,At=[],jt=[],Mt=null,U=v(()=>me(m.node)),Nt=y({removed:0,added:0}),Pt=v(()=>`-${Nt.value.removed} +${Nt.value.added}`),Ft=Object.freeze(j(A({},ue),{enabled:!1,revealLineCount:0}));function It(e){var t;return Ae(e,((t=E.value)?.getBoundingClientRect)?.call(t).width||E.value?.clientWidth||(typeof window>`u`?0:window.innerWidth))}function Lt(e,t){return{original:Rt(e),updated:Rt(t)}}function Rt(e){return String(e??``).replace(/\r\n$|\n$|\r$/,``)}function zt(e){return String(e?.message??e).includes(`no diff result available`)}function Bt(){if(!Vr())try{let e=xt();e&&typeof e.catch==`function`&&e.catch(e=>{zt(e)})}catch(e){zt(e)}}let W=v(()=>{var e,t;let n=m.monacoOptions?A({},m.monacoOptions):{};if(!U.value)return A({lineDecorationsWidth:0,lineNumbersMinChars:2,glyphMargin:!1},n);let r=n.diffHideUnchangedRegions===void 0?A({},ue):we(n.diffHideUnchangedRegions),i=n.hideUnchangedRegions===void 0?void 0:we(n.hideUnchangedRegions),a=!1!==m.stream&&!1!==m.loading,o=a?A({},Ft):r,s=a?A({},Ft):i,c=function(e){return e.diffWordWrap===void 0?`off`:e.diffWordWrap}(n),l=A({},n.experimental??{}),u=n.diffUnchangedRegionStyle??`line-info`,d=function(e){return A(j(A({},e.scrollbar&&typeof e.scrollbar==`object`?e.scrollbar:{}),{verticalScrollbarSize:0,horizontalScrollbarSize:0}),It(e)?{horizontal:`hidden`}:{})}(n);return j(A(j(A(A({},{maxComputationTime:0,diffAlgorithm:`legacy`,ignoreTrimWhitespace:!1,renderIndicators:!0,diffUpdateThrottleMs:120,renderLineHighlight:`none`,renderLineHighlightOnlyWhenFocus:!0,selectionHighlight:!1,occurrencesHighlight:`off`,matchBrackets:`never`,lineDecorationsWidth:4,lineNumbersMinChars:2,glyphMargin:!1,padding:{top:0,bottom:0},minimap:{enabled:!1},renderOverviewRuler:!1,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,diffWordWrap:c,renderSideBySide:(e=n.renderSideBySide)==null||e,diffHideUnchangedRegions:o,useInlineViewWhenSpaceIsLimited:(t=n.useInlineViewWhenSpaceIsLimited)!=null&&t,diffLineStyle:`background`,diffAppearance:`auto`,diffUnchangedRegionStyle:u,diffHunkActionsOnHover:!1,experimental:l}),n),{experimental:l}),s===void 0?{}:{hideUnchangedRegions:s}),{diffHideUnchangedRegions:o,diffWordWrap:c,scrollbar:d})}),Vt=v(()=>(m.theme===void 0?Ci(m.darkTheme,m.lightTheme):!xi(m.theme))?function(e){if(e&&typeof e==`object`&&e.colors?.[`editor.background`]){let t=yr(e.colors[`editor.background`]);if(t!=null)return t<128}let t=(Si(e)??``).toLowerCase();return t?[`dark`,`night`,`moon`,`black`,`dracula`,`mocha`,`frappe`,`macchiato`,`palenight`,`ocean`,`poimandres`,`monokai`,`laserwave`,`tokyo`,`slack-dark`,`rose-pine`,`github-dark`,`material-theme`,`one-dark`,`catppuccin-mocha`,`catppuccin-frappe`,`catppuccin-macchiato`].some(e=>t.includes(e))&&![`light`,`latte`,`dawn`,`lotus`].some(e=>t.includes(e)):!!m.isDark}(wi()):!!m.isDark),Ht=v(()=>{if(!U.value)return Vt.value?`dark`:`light`;let e=W.value?.diffAppearance;return e===`light`||e===`dark`?e:Vt.value?`dark`:`light`}),Ut=v(()=>U.value?Ht.value===`dark`:Vt.value),Wt=v(()=>U.value?`diff`:`single`),Gt=y(Wt.value),G=y(!1),K=y(!1),Kt=y(!1),q=y(!1),qt=y(null),Jt=y(0),Yt=y(0),Xt=y(!1),Zt=null,Qt=!1,$t=null,en=!1,tn=v(()=>{if(U.value){let e=W.value?.diffWordWrap;if(e===`inherit`){let e=m.monacoOptions?.wordWrap;return e==null||String(e)!==`off`}return e===`on`}let e=m.monacoOptions?.wordWrap;return e==null||String(e)!==`off`}),nn=v(()=>!!U.value&&It(W.value??{})),rn=v(()=>{let e=m.monacoOptions?.diffHideUnchangedRegions;return e===void 0?A({},ue):we(e)});function an(e){return!0===ce?.value||!!e&&(!!e.closest(`[data-markstream-virtual-timeline="1"], .markstream-virtual-timeline`)||!!e.closest(`.vue-recycle-scroller, [data-virtualizer], [data-virtual-scroll-root]`))}let on=v(()=>an(E.value)),sn=v(()=>!(G.value||!q.value&&K.value)),cn=v(()=>sn.value),ln=v(()=>sn.value&&!Kt.value),un=v(()=>!G.value&&!q.value&&sn.value),dn=v(()=>K.value&&!G.value?`ready`:q.value?`fallback`:`pending`),fn=y(!1),pn=v(()=>Rt(m.node.code)),mn=v(()=>U.value?!0===m.node.diff?m.node:j(A({},m.node),{diff:!0}):pn.value===m.node.code?m.node:j(A({},m.node),{code:pn.value})),J=y(typeof m.monacoOptions?.fontSize==`number`?m.monacoOptions.fontSize:NaN),Y=y(J.value),hn=y(null),gn=y(null),_n=y(null),vn=v(()=>{let e=J.value,t=Y.value;return typeof e==`number`&&Number.isFinite(e)&&e>0&&typeof t==`number`&&Number.isFinite(t)&&t>0}),yn=v(()=>{let e=hn.value;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;let t=m.monacoOptions?.fontSize;if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;let n=Y.value;return typeof n==`number`&&Number.isFinite(n)&&n>0?n:12}),bn=v(()=>{let e=gn.value;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;let t=m.monacoOptions?.lineHeight;return typeof t==`number`&&Number.isFinite(t)&&t>0?t:yn.value===12?18:Math.max(12,Math.round(1.5*yn.value))}),xn=v(()=>bn.value),Sn=v(()=>{let e=m.monacoOptions?.tabSize;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:4}),Cn=v(()=>{let e=m.monacoOptions?.padding,t=U.value?0:8;return{top:typeof e?.top==`number`&&Number.isFinite(e.top)&&e.top>=0?e.top:t,bottom:typeof e?.bottom==`number`&&Number.isFinite(e.bottom)&&e.bottom>=0?e.bottom:t}}),wn=v(()=>{let e=m.estimatedContentHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:null});function Tn(e){if(e==null)return null;let t=Math.ceil(e);return!Number.isFinite(t)||t<=0?null:Math.min(t,Math.ceil(Kr()))}function En(){return!U.value&&!1!==m.stream&&!1!==m.loading}let Dn=v(()=>U.value?null:wn.value==null||En()?Math.ceil((e=>{let t=String(e??``);return t?Math.max(1,t.split(/\r\n|\n|\r/).length):1})(pn.value)*xn.value+1):null),On=v(()=>{if(U.value)return null;let e=wn.value;return e==null||En()?Tn(Dn.value):Tn(e)}),kn=v(()=>{let e=m.estimatedHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:null}),An=y(null);function jn(){let e=An.value;return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.round(e):null}let Mn=v(()=>jn()??(!U.value&&Xt.value?null:sn.value||!K.value?On.value:null));function Nn(e){let t=e?`hsl(152 42% 60%)`:`var(--diff-added-fg)`,n=e?`hsl(0 58% 58%)`:`var(--diff-removed-fg)`,r=e?`hsl(152 42% 60% / 0.18)`:`var(--diff-added-bg)`,i=e?`hsl(0 58% 58% / 0.18)`:`var(--diff-removed-bg)`,a=e?`hsl(152 42% 60% / 0.28)`:`var(--diff-added-inline-bg)`,o=e?`hsl(0 58% 58% / 0.28)`:`var(--diff-removed-inline-bg)`,s=`linear-gradient(90deg, ${t} 0 4px, transparent 4px 100%)`,c=`linear-gradient(90deg, ${n} 0 4px, transparent 4px 100%)`,l=e?`hsl(0 0% 7% / 0.98)`:`hsl(var(--ms-muted) / 0.45)`,u=`var(--markstream-code-layout-character-width, 1ch)`,d=`calc(${u} + ${u})`,f=`calc(${u} + ${u} + ${u} + ${u} + ${u} + 2px)`,p=`calc(${f} + ${u})`;return{"--markstream-diff-line-number-bg":l,"--markstream-diff-added-fg":t,"--markstream-diff-removed-fg":n,"--markstream-diff-added-line":r,"--markstream-diff-removed-line":i,"--markstream-diff-added-line-fill":r,"--markstream-diff-removed-line-fill":i,"--markstream-diff-added-gutter":s,"--markstream-diff-removed-gutter":c,"--markstream-diff-added-inline":a,"--markstream-diff-removed-inline":o,"--stream-monaco-added-fg":t,"--stream-monaco-removed-fg":n,"--stream-monaco-added-line":r,"--stream-monaco-removed-line":i,"--stream-monaco-added-line-fill":r,"--stream-monaco-removed-line-fill":i,"--stream-monaco-added-gutter":s,"--stream-monaco-removed-gutter":c,"--stream-monaco-added-inline":a,"--stream-monaco-removed-inline":o,"--stream-monaco-gutter-marker-width":`4px`,"--stream-monaco-gutter-gap":`1ch`,"--stream-monaco-line-number-left":`0px`,"--stream-monaco-line-number-width":d,"--stream-monaco-line-number-padding-left":d,"--stream-monaco-line-number-padding-right":u,"--stream-monaco-line-number-separator-width":`2px`,"--stream-monaco-layout-character-width":u,"--stream-monaco-line-number-box-width":f,"--stream-monaco-line-number-gap-to-code":u,"--stream-monaco-line-number-bg":l,"--stream-monaco-diff-code-gap":u,"--stream-monaco-diff-code-padding":`0px`,"--stream-monaco-original-margin-width":p,"--stream-monaco-original-scrollable-left":p,"--stream-monaco-original-scrollable-width":`calc(100% - ${p})`,"--stream-monaco-modified-margin-width":p,"--stream-monaco-modified-scrollable-left":p,"--stream-monaco-modified-scrollable-width":`calc(100% - ${p})`}}let Pn=v(()=>{let e=m.monacoOptions?.fontFamily,t=Tn(wn.value),n=Tn(Dn.value),r=En(),i=A(A({fontSize:`${yn.value}px`,lineHeight:`${xn.value}px`,tabSize:Sn.value,boxSizing:`border-box`,maxHeight:`${Kr()}px`,overflow:`auto`,paddingTop:`${Cn.value.top}px`,paddingBottom:`${Cn.value.bottom}px`},U.value||t==null||r?U.value||n==null?{}:{minHeight:`${n}px`}:{height:`${t}px`,minHeight:`${t}px`}),typeof e==`string`&&e.trim()?{"--markstream-code-font-family":e.trim()}:{});return i[`--markstream-pre-line-number-top`]=`${Cn.value.top}px`,i[`--markstream-code-padding-left`]=`calc(2ch + 2ch + 1ch + 2px + 1ch)`,i[`--markstream-pre-line-number-left`]=`0px`,i[`--markstream-pre-line-number-width`]=`2ch`,i[`--markstream-pre-line-number-padding-left`]=`2ch`,i[`--markstream-pre-line-number-padding-right`]=`1ch`,i[`--markstream-pre-line-number-separator-width`]=`2px`,U.value&&(i[`--markstream-pre-diff-line-height`]=`${xn.value}px`,i[`--markstream-pre-diff-pane-bottom-padding`]=(nn.value,`0px`),Object.assign(i,Nn(Ut.value))),i}),Fn=v(()=>Mn.value!=null&&(!K.value||jn()!=null)),In=v(()=>{let e=Mn.value;if(e==null)return null;if(U.value)return Math.ceil(e);let t=kn.value,n=wn.value;if(t==null||n==null)return Math.ceil(e);let r=Math.max(0,Math.ceil(t)-Math.ceil(n));return Math.ceil(e+r)}),Ln=v(()=>{if(U.value&&sn.value)return{};let e=Mn.value;return Fn.value&&e!=null?{minHeight:`${e}px`}:{}});function Rn(){var e,t,n,r;let i=E.value?.querySelector(`pre.code-pre-fallback`),a=H(),o=i?.scrollTop??0;(t=(e=(a?.getOriginalEditor)?.call(a))?.setScrollTop)==null||t.call(e,o),(r=(n=(a?.getModifiedEditor)?.call(a))?.setScrollTop)==null||r.call(n,o)}function zn(){return M(this,null,function*(){return U.value?(Sr()??Bn(),Z(!0),Rn(),Q(),Kt.value=!0,yield e(),Z(!0),yield Un(),Z(!0),!(St&&!(yield St())||(br(),Bn(),Z(!0),K.value=!0,yield e(),Bn(),Z(!0),br(),Q(),$(),0))):!(St&&!(yield St())||(K.value=!0,yield e(),X(!1),Z(),0))})}function Bn(){let e=T.value;return e&&Lr(e)?(Q(),X({preferModelDiffHeight:!0}),Mr(),Number.parseFloat(e.style.height||``)||null):Sr()}function Vn(){if(!U.value||!I.value||!K.value||sn.value)return!1;let e=T.value;return!!e&&vr(e)}function Hn(e,t=!1,n={}){let r=Math.ceil(e),i=jn();if(i==null)return r;let a=!0===n.allowBelowEstimatedFloor||Vn();return r>=i||a?((t||a)&&I.value&&(An.value=null),r):i}function Un(){return new Promise(e=>{let t=!1,n=null,r=null,i=()=>{t||(t=!0,r!=null&&globalThis.clearTimeout(r),n!=null&&pe(n),e())};r=globalThis.setTimeout(i,50),n=w(i)})}function Wn(){try{let e=T.value;if(!e)return null;let t=e.querySelector(`.view-lines .view-line`);if(t){let e=Math.ceil(t.getBoundingClientRect().height);if(e>0)return e}}catch{}return null}function Gn(){var e;try{let t=U.value?((e=H())?.getModifiedEditor)?.call(e)??H():V(),n=vt()?.EditorOption?.fontInfo;if(t&&n!=null){let e=t.getOption?.call(t,n)?.fontSize;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e}}catch{}try{let e=T.value;if(e){let t=e.querySelector(`.view-lines .view-line`);if(t)try{if(typeof window<`u`&&typeof window.getComputedStyle==`function`){let e=window.getComputedStyle(t).fontSize,n=e&&e.match(/^(\d+(?:\.\d+)?)/);if(n)return Number.parseFloat(n[1])}}catch{}}}catch{}return null}function Kn(e){try{let t=vt()?.EditorOption?.lineHeight;if(t!=null){let n=(e?.getOption)?.call(e,t);if(typeof n==`number`&&n>0)return n}}catch{}let t=Wn();if(t&&t>0)return t;let n=Number.isFinite(Y.value)&&Y.value>0?Y.value:14;return Math.max(12,Math.round(1.35*n))}function qn(e){try{let t=vt()?.EditorOption?.padding;if(t!=null){let n=(e?.getOption)?.call(e,t);if(typeof n?.top==`number`||typeof n?.bottom==`number`)return(typeof n?.top==`number`&&Number.isFinite(n.top)?Math.max(0,n.top):0)+(typeof n?.bottom==`number`&&Number.isFinite(n.bottom)?Math.max(0,n.bottom):0)}}catch{}let t=W.value?.padding;return typeof t?.top==`number`||typeof t?.bottom==`number`?(typeof t?.top==`number`&&Number.isFinite(t.top)?Math.max(0,t.top):0)+(typeof t?.bottom==`number`&&Number.isFinite(t.bottom)?Math.max(0,t.bottom):0):U.value?24:0}function Jn(e,t){return typeof e!=`number`||typeof t!=`number`||e<1||t=i&&o>=i&&n[a]===r[o];)a--,o--;let s=Math.max(0,a-i+1),c=Math.max(0,o-i+1);if(s===0||c===0)return{removed:s,added:c};if((s+1)*(c+1)<=15e5){let e=c+1,t=new Uint32Array(e),a=new Uint32Array(e);for(let e=s-1;e>=0;e--){a[c]=0;for(let o=c-1;o>=0;o--)a[o]=n[i+e]===r[i+o]?t[o+1]+1:Math.max(t[o],a[o+1]);let o=t;t=a,a=o}let o=t[0];return{removed:s-o,added:c-o}}return{removed:s,added:c}}function Zn(e){if(!function(){return!(!U.value||!nn.value)&&(m.node.originalCode!=null||m.node.updatedCode!=null?Xn(String(m.node.originalCode??``),String(m.node.updatedCode??``)).removed>0:String(m.node.code??``).split(/\r\n|\n|\r/).some(e=>function(e){return e.startsWith(`-`)&&!e.startsWith(`---`)}(e)))}())return!0;let t=e?.querySelector(`.stream-monaco-fallback-inline-delete-line`);if((t?.textContent)?.trim()&&(t.hasAttribute(`data-stream-monaco-colorize-signature`)||t.querySelector(`[class*="mtk"]`)))return!0;let n=e?.querySelector([`.editor.modified .view-zones .view-lines.line-delete`,`.editor.modified .view-lines .view-line.line-delete`,`.editor.original .view-zones .view-lines.line-delete`,`.editor.original .view-lines .view-line.line-delete`].join(`,`));if(!n||!n.matches(`.view-line`)&&!n.querySelector(`.view-line`))return!1;let r=n.getBoundingClientRect(),i=e?.getBoundingClientRect();return i?.width===0&&i.height===0||r.width>0&&r.height>0}function Qn(e,t){if(!e)return!1;let n=t.added<=0||!!e.querySelector([`.line-insert`,`.gutter-insert`,`.stream-monaco-fallback-line-insert`,`.stream-monaco-fallback-gutter-insert`,`.stream-monaco-fallback-line-number-insert`].join(`,`)),r=t.removed<=0||!!e.querySelector([`.line-delete`,`.gutter-delete`,`.inline-deleted-margin-view-zone`,`.stream-monaco-fallback-line-delete`,`.stream-monaco-fallback-gutter-delete`,`.stream-monaco-fallback-line-number-delete`,`.stream-monaco-fallback-inline-delete-line`,`.stream-monaco-fallback-inline-delete-margin`].join(`,`));return n&&r}function $n(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?typeof window>`u`||typeof window.getComputedStyle!=`function`?n:window.getComputedStyle(n).display===`none`?null:n:null}function er(e,t){return $n(e,t)!==null}function tr(e,t){if(!e)return!1;let n=t.added<=0||[`.gutter-insert`,`.stream-monaco-fallback-gutter-insert`].some(t=>er(e,t)),r=t.removed<=0||[`.gutter-delete`,`.inline-deleted-margin-view-zone`,`.stream-monaco-fallback-gutter-delete`,`.stream-monaco-fallback-inline-delete-margin`].some(t=>er(e,t));return n&&r}function nr(e){let t=Array.from(e?.querySelectorAll(`.monaco-diff-editor .margin-view-overlays .line-numbers`)??[]);return!!t.length&&t.some(e=>{if(!e.textContent?.trim())return!1;if(typeof window>`u`||typeof window.getComputedStyle!=`function`)return!0;let t=window.getComputedStyle(e);if(t.display===`none`)return!1;let n=e.getBoundingClientRect();if(n.width<=0&&n.height<=0)return!0;let r=Number.parseFloat(t.width||``),i=Number.parseFloat(t.paddingLeft||``),a=Number.parseFloat(t.paddingRight||``);return Math.max(n.width,Number.isFinite(r)?r:0)>=8&&Number.isFinite(i)&&i>=1&&Number.isFinite(a)&&a>=1})}function rr(e){let t=$n(e,`.monaco-diff-editor .view-lines .view-line`);if(!t)return!1;if(!cr())return!0;let n=$n(e,`.monaco-diff-editor .margin-view-overlays .line-numbers`);if(!n)return!1;if(typeof window>`u`||typeof window.getComputedStyle!=`function`)return!0;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(r.width<=0&&r.height<=0||i.width<=0&&i.height<=0)return!0;let a=r.left-i.right;return a>=0&&a<=32}function ir(e,t){return!nn.value||!(t||e?.querySelector([`.line-insert`,`.line-delete`,`.gutter-insert`,`.gutter-delete`,`.stream-monaco-line-number-insert`,`.stream-monaco-line-number-delete`,`.stream-monaco-line-insert-fill`,`.stream-monaco-line-delete-fill`,`.stream-monaco-fallback-line-insert`,`.stream-monaco-fallback-line-delete`,`.stream-monaco-fallback-inline-delete-line`].join(`,`)))||!!(e?.classList.contains(`stream-monaco-diff-inline-native-ready`)&&!e.classList.contains(`stream-monaco-diff-native-stale`))}function ar(e,t,n,r){let i=e?.querySelector(`.monaco-diff-editor .editor.${t}`);if(!i)return!1;let a=Array.from(i.querySelectorAll(`.margin-view-overlays .line-numbers.${n}`));if(!a.length)return!0;let o=Array.from(i.querySelectorAll(`.lines-content > .view-lines:not(.line-delete) > .view-line`));return!!o.length&&a.every(e=>{let t=e.getBoundingClientRect(),n=null;for(let e of o){let r=e.getBoundingClientRect(),i=Math.abs(r.top-t.top);(!n||i1.25||n.node.classList.contains(r)})}function or(e,t){if(!e)return!1;let n=t.added<=0||ar(e,`modified`,`stream-monaco-line-number-insert`,`stream-monaco-line-insert-fill`),r=t.removed<=0||(nn.value?!!e.classList.contains(`stream-monaco-diff-inline-native-ready`):ar(e,`original`,`stream-monaco-line-number-delete`,`stream-monaco-line-delete-fill`));return n&&r}function sr(e){if(Ve.value)return!0;if(!e)return!1;let t=Array.from(e.querySelectorAll(`.monaco-diff-editor .view-lines .view-line, .monaco-editor .view-lines .view-line`)).filter(e=>{if(!e.textContent?.trim())return!1;let t=e.getBoundingClientRect();return t.width>0||t.height>0});if(!t.length)return!1;let n=t.filter(e=>{var t;return t=e.textContent??``,/['"`{}()[\]:;=<>.,]|\/\/|\/\*|\b(?:async|await|class|const|enum|export|for|function|if|import|interface|let|return|switch|type|var|while)\b/.test(t.replace(/\u00A0/g,` `).trim())});return!n.length||n.filter(e=>Array.from(e.querySelectorAll(`span`)).filter(e=>e.textContent?.trim()).some(e=>String(e.className||``).split(/\s+/).some(e=>/^mtk\d+$/.test(e)&&e!==`mtk1`))).length>0}function cr(){return W.value?.lineNumbers!==`off`}function lr(){U.value?Nt.value=Xn(String(m.node.originalCode??``),String(m.node.updatedCode??``)):Nt.value={removed:0,added:0}}function ur(){if(U.value)try{let e=H(),t=(e?.getLineChanges)?.call(e);if(!Array.isArray(t))return void lr();let n=0,r=0;for(let e of t)n+=Jn(e.originalStartLineNumber,e.originalEndLineNumber),r+=Jn(e.modifiedStartLineNumber,e.modifiedEndLineNumber);Nt.value={removed:n,added:r}}catch{lr()}else Nt.value={removed:0,added:0}}function dr(){if(Number.isFinite(Y.value)&&Y.value>0&&Number.isFinite(J.value))return Y.value;let e=Gn();return typeof m.monacoOptions?.fontSize==`number`?(J.value=m.monacoOptions.fontSize,Y.value=m.monacoOptions.fontSize,Y.value):e&&e>0?(J.value=e,Y.value=e,e):(J.value=12,Y.value=12,12)}function fr(){let e=dr();Y.value=Math.min(36,e+1)}function pr(){let e=dr();Y.value=Math.max(10,e-1)}function mr(){dr(),Number.isFinite(J.value)&&(Y.value=J.value)}function hr(){var e,t,n,r,i;try{let a=U.value?H():null,o=U.value?a:V();if(!o)return null;if(a?.getOriginalEditor&&a?.getModifiedEditor){let i=a.getOriginalEditor?.call(a),o=a.getModifiedEditor?.call(a);(e=i?.layout)==null||e.call(i),(t=o?.layout)==null||t.call(o);let s=(i?.getContentHeight)?.call(i)||0,c=(o?.getContentHeight)?.call(o)||0,l=Math.max(s,c);if(l>0)return Math.ceil(l);let u=((n=(i?.getModel)?.call(i))?.getLineCount)?.call(n)||1,d=((r=(o?.getModel)?.call(o))?.getLineCount)?.call(r)||1,f=Math.max(u,d),p=Math.max(Kn(i),Kn(o)),m=Math.max(qn(i),qn(o));return Math.ceil(f*p+m+0)}if(o?.getContentHeight){(i=o?.layout)==null||i.call(o);let e=o.getContentHeight();if(e>0)return U.value||(Xt.value=!0),Math.ceil(e)}let s=(o?.getModel)?.call(o),c=1;s&&typeof s.getLineCount==`function`&&(c=s.getLineCount());let l=Kn(o);return Math.ceil(c*(l+1.5)+0)}catch{return null}}function gr(){var e;if(U.value)return!1;try{let t=((e=V())?.getContentHeight)?.call(e),n=typeof t==`number`&&Number.isFinite(t)&&t>0;return n&&(Xt.value=!0),n}catch{return!1}}function _r(e){if(typeof window>`u`)return null;try{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`)return null;let r=e.querySelector(`diffs-container`);if(r instanceof HTMLElement){let e=r.getBoundingClientRect();if(e.height>0&&e.bottom>t.top)return Math.ceil(e.bottom-t.top)}let i=[`.editor.original .view-lines .view-line`,`.editor.modified .view-lines .view-line`,`.editor.original .view-zones > div`,`.editor.modified .view-zones > div`,`.editor.original .margin-view-zones > div`,`.editor.modified .margin-view-zones > div`,`.editor.original .diff-hidden-lines`,`.editor.modified .diff-hidden-lines`,`.stream-monaco-diff-unchanged-bridge`],a=0;for(let n of Array.from(e.querySelectorAll(i.join(`,`)))){if(!(n instanceof HTMLElement)||(n.parentElement?.classList.contains(`view-zones`)||n.parentElement?.classList.contains(`margin-view-zones`))&&!(n.textContent?.trim()||n.matches(`.line-delete, .line-insert, .cdr`)||n.querySelector(`.diff-hidden-lines, .stream-monaco-diff-unchanged-bridge, .line-delete, .line-insert, .cdr`)))continue;let e=window.getComputedStyle(n);if(e.display===`none`||e.visibility===`hidden`||Number.parseFloat(e.opacity||`1`)<=.01)continue;let r=n.getBoundingClientRect();r.height<=0||r.bottom<=t.top||(a=Math.max(a,r.bottom-t.top))}return a>0?Math.ceil(a):null}catch{return null}}function vr(e){if(typeof window>`u`)return!1;let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;let n=e.querySelectorAll(`.editor.modified .diff-hidden-lines, .editor.original .diff-hidden-lines, .stream-monaco-diff-unchanged-bridge`);for(let e of Array.from(n)){if(!(e instanceof HTMLElement))continue;let n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`||Number.parseFloat(n.opacity||`1`)<=.01)continue;let r=e.getBoundingClientRect();if(!(r.width<=0||r.height<=0||r.bottom<=t.top||r.top>=t.bottom))return!0}return!1}function yr(e){let t=String(e??``).trim(),n=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i)?.[1];if(n){let e=n.length===3?n.split(``).map(e=>`${e}${e}`).join(``):n;return .2126*Number.parseInt(e.slice(0,2),16)+.7152*Number.parseInt(e.slice(2,4),16)+.0722*Number.parseInt(e.slice(4,6),16)}let r=t.match(/\d+(?:\.\d+)?/g);if(!r||r.length<3)return null;let[i,a,o]=r.slice(0,3).map(Number);return .2126*i+.7152*a+.0722*o}function br(){var e;if(xr())return;let t=Gn();t&&t>0&&(hn.value=t,Y.value=t,J.value=t);try{let t=Kn(U.value?((e=H())?.getModifiedEditor)?.call(e)??H():V());t&&t>0&&(gn.value=t)}catch{}try{let e=Wn();e&&e>0&&(gn.value=e)}catch{}}function xr(){return U.value&&cn.value}function Sr(){if(!U.value||!sn.value)return null;let e=T.value,t=E.value?.querySelector(`pre.code-pre-fallback`);if(!e||!t)return null;let n=Math.ceil(t.getBoundingClientRect().height);return!Number.isFinite(n)||n<=0?null:(e.style.height=`${n}px`,e.style.minHeight=`${n}px`,e.style.maxHeight=`${Math.ceil(Kr())}px`,e.style.overflow=`hidden`,n)}function Cr(){let e=T.value,t=E.value;if(!e||!t)return;let n=e,r=e.querySelector(`.monaco-editor`)||e,i=r.querySelector(`.monaco-editor-background`)||r,a=r.querySelector(`.view-lines`)||r,o=null,s=null,c=null;try{typeof window<`u`&&typeof window.getComputedStyle==`function`&&(o=window.getComputedStyle(r),s=i===r?o:window.getComputedStyle(i),c=a===r?o:window.getComputedStyle(a))}catch{o=null,s=null,c=null}let l=String(o?.getPropertyValue(`--vscode-editor-foreground`)??``).trim(),u=String(o?.getPropertyValue(`--vscode-editor-background`)??``).trim(),d=String(o?.getPropertyValue(`--vscode-editor-selectionBackground`)??o?.getPropertyValue(`--vscode-editor-hoverHighlightBackground`)??``).trim(),f=l||String(c?.color??o?.color??``).trim(),p=u||String(s?.backgroundColor??o?.backgroundColor??``).trim(),m=function(){var e;try{let t=U.value?((e=H())?.getModifiedEditor)?.call(e)??H():V(),n=vt()?.EditorOption?.fontInfo;if(t&&n!=null){let e=t.getOption?.call(t,n)?.typicalHalfwidthCharacterWidth;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e}}catch{}return null}();if(m!=null&&(_n.value=m),U.value){let e=(e,r)=>{r?(t.style.setProperty(e,r),n.style.setProperty(e,r)):(t.style.removeProperty(e),n.style.removeProperty(e))};for(let[n,r]of Object.entries(Nn(t.classList.contains(`is-dark`))))e(n,r);f?(t.style.setProperty(`--markstream-diff-editor-fg`,f),n.style.setProperty(`--vscode-editor-foreground`,f),n.style.setProperty(`--stream-monaco-editor-fg`,f)):(t.style.removeProperty(`--markstream-diff-editor-fg`),n.style.removeProperty(`--vscode-editor-foreground`),n.style.removeProperty(`--stream-monaco-editor-fg`)),p?(t.style.setProperty(`--markstream-diff-editor-bg`,p),t.style.setProperty(`--markstream-diff-panel-bg`,p),t.style.setProperty(`--markstream-diff-panel-bg-soft`,p),t.style.setProperty(`--markstream-diff-panel-bg-strong`,p),n.style.setProperty(`--vscode-editor-background`,p),n.style.setProperty(`--stream-monaco-editor-bg`,p),n.style.setProperty(`--stream-monaco-fixed-editor-bg`,p),n.style.setProperty(`--stream-monaco-panel-bg`,p),n.style.setProperty(`--stream-monaco-panel-bg-soft`,p),n.style.setProperty(`--stream-monaco-panel-bg-strong`,p),n.style.backgroundColor=p):(t.style.removeProperty(`--markstream-diff-editor-bg`),t.style.removeProperty(`--markstream-diff-panel-bg`),t.style.removeProperty(`--markstream-diff-panel-bg-soft`),t.style.removeProperty(`--markstream-diff-panel-bg-strong`),n.style.removeProperty(`--vscode-editor-background`),n.style.removeProperty(`--stream-monaco-editor-bg`),n.style.removeProperty(`--stream-monaco-fixed-editor-bg`),n.style.removeProperty(`--stream-monaco-panel-bg`),n.style.removeProperty(`--stream-monaco-panel-bg-soft`),n.style.removeProperty(`--stream-monaco-panel-bg-strong`),n.style.backgroundColor=``),d?n.style.setProperty(`--vscode-editor-selectionBackground`,d):n.style.removeProperty(`--vscode-editor-selectionBackground`);return}if(function(e,t,n){if(!Ve.value)return!1;let r=yr(e),i=yr(t);return n?r!=null&&r>170||i!=null&&i<110:r!=null&&r<85||i!=null&&i>190}(p,f,t.classList.contains(`is-dark`)))return n.style.removeProperty(`--vscode-editor-foreground`),n.style.removeProperty(`--vscode-editor-background`),void n.style.removeProperty(`--vscode-editor-selectionBackground`);f&&n.style.setProperty(`--vscode-editor-foreground`,f),p&&n.style.setProperty(`--vscode-editor-background`,p),d&&n.style.setProperty(`--vscode-editor-selectionBackground`,d)}let wr=0,Tr=0,Er=/auto|scroll|overlay/i;function Dr(e,t,n){if(typeof window>`u`||U.value||function(e){return on.value||an(e)}(e))return;let r=Math.ceil(n)-Math.ceil(t);if(Math.abs(r)<=1)return;let i=function(e){if(typeof window>`u`)return null;let t=e?.ownerDocument??document,n=t.scrollingElement||t.documentElement||t.body,r=e?.parentElement??null;for(;r&&r!==t.body&&r!==n;){let e=window.getComputedStyle(r),t=(e.overflowY||``).toLowerCase(),n=(e.overflow||``).toLowerCase();if(Er.test(t)||Er.test(n))return r;r=r.parentElement}return n}(e);if(!i)return;let a=e.ownerDocument??document,o=i===a.body||i===a.documentElement||i===a.scrollingElement,s=o?0:i.getBoundingClientRect().top;e.getBoundingClientRect().top-s>=0||(o&&typeof window.scrollBy==`function`?window.scrollBy(0,r):i.scrollTop+=r)}function Or(){try{let e=T.value;if(!e)return;let t=e.getBoundingClientRect().height,n=hr();if(n!=null&&n>0){let r=Hn(n,!0,{allowBelowEstimatedFloor:!U.value&&I.value&&gr()}),i=jn();e.style.minHeight=i==null?`0px`:`${i}px`,e.style.height=`${r}px`,e.style.maxHeight=`none`,e.style.overflow=`visible`,Dr(e,t,r);return}let r=jn();r!=null&&(e.style.minHeight=`${r}px`,e.style.height=`${r}px`,e.style.maxHeight=`none`,e.style.overflow=`visible`,Dr(e,t,r))}catch{}}function kr(){for(var e,t;At.length>0;)try{(t=(e=At.pop())?.dispose)==null||t.call(e)}catch{}Ue!=null&&(pe(Ue),Ue=null),We!=null&&(pe(We),We=null),Ge!=null&&(pe(Ge),Ge=null),Ke=0,qe=!1}function Ar(){for(var e;jt.length>0;)try{(e=jt.pop())==null||e()}catch{}}function X(e=!1){N.value||(k.value?Or():function(e={}){try{let t=T.value;if(!t)return;let n=t.getBoundingClientRect().height,r=Kr(),i=Math.ceil(t.getBoundingClientRect?.call(t).height||0),a=Number.parseFloat(t.style.height||``),o=i>0?i:Number.isFinite(a)&&a>0?Math.ceil(a):0,s=U.value?function(){var e,t;if(Vr())return null;try{let n=H(),r=(n?.getOriginalEditor)?.call(n),i=(n?.getModifiedEditor)?.call(n);if(!r||!i)return null;let a=((e=r.getModel?.call(r))?.getLineCount)?.call(e)||1,o=((t=i.getModel?.call(i))?.getLineCount)?.call(t)||1,s=Math.max(a,o),c=Math.max(Kn(r),Kn(i)),l=Math.max(qn(r),qn(i)),u=Math.max(r.getContentHeight?.call(r)??0,i.getContentHeight?.call(i)??0);return Math.ceil(Math.max(u,s*c+l+0))}catch{return null}}():null,c=U.value&&vr(t),l=U.value&&Lr(t),u=U.value&&t.classList.contains(`stream-monaco-diff-native-stale`),d=c&&I.value&&K.value&&!sn.value;if(c||(R.value=null),Ze>0&&(Ze--,Ye.value!=null))return void Dr(t,n,Nr(t,Ye.value,r,{allowBelowEstimatedFloor:d,preserveScrollableOverflow:Fr(t)}));if(U.value&&!l&&!c&&sn.value){let e=Sr();if(e!=null){let i=Nr(t,e,r,{allowBelowEstimatedFloor:!0});Z(!0),Dr(t,n,i);return}}let f=U.value&&!0===e.preferModelDiffHeight,p=U.value?_r(t):null,h=p,g=!U.value&&I.value&&gr(),_=U.value&&!1!==m.loading&&(h!=null||s!=null&&i>0&&s0&&s0&&s0?o:null:s;else v=hr();if(U.value&&!1===m.loading&&u&&!d&&v!=null&&s!=null&&(v=Math.min(v,s)),U.value&&v!=null&&o>0&&(!1!==m.loading||!1===m.loading&&u&&!d||!0===e.holdCurrentDiffHeight&&!d)&&(v=Math.max(v,o)),v!=null&&v>0){let e=c&&R.value!=null,a=c&&i>0&&i=r-1,o=Nr(t,e?Math.max(R.value,v):a?i:v,r,{clearEstimatedFloor:!0,allowBelowEstimatedFloor:d||g||_,preserveScrollableOverflow:Fr(t)});c&&o0?s:0);if(te>0){let e=c&&R.value!=null,a=c&&i>0&&i=r-1,o=Nr(t,e?Math.max(R.value,te):a?i:te,r,{allowBelowEstimatedFloor:d});c&&o0?Dr(t,n,Nr(t,b,r,{allowBelowEstimatedFloor:d})):U.value||Dr(t,n,Nr(t,r,r))}catch{}}(typeof e==`object`?e:{}))}function jr(){wr=0,Tr=0}function Z(e=!1){if(N.value)return;let t=T.value;if(!t)return;let n=U.value?H():V();if(n&&typeof n.layout==`function`)try{let r=t.getBoundingClientRect?.call(t),i=Math.ceil((r?.width??0)||t.clientWidth||0),a=Math.ceil((r?.height??0)||t.clientHeight||Number.parseFloat(t.style.height||``)||0);if(i>0&&a>0){if(!e&&i===wr&&a===Tr)return;wr=i,Tr=a,n.layout({width:i,height:a})}else jr(),n.layout()}catch{}}function Q(){if(!U.value)return void Ar();let e=T.value;if(!e)return void Ar();let t=e.querySelector(`.monaco-diff-editor`);if(!t||t.classList.contains(`side-by-side`))return void Ar();let n=Array.from(t.querySelectorAll(`.editor.original .diff-hidden-lines`)),r=Array.from(t.querySelectorAll(`.editor.modified .diff-hidden-lines`)),i=Math.min(n.length,r.length);for(let e=0;e div:first-child`),a=t.querySelector(`.center`);if(!n||!i||!a||a.querySelector(`.markstream-inline-fold-proxy`))continue;let o=document.createElement(`button`);o.type=`button`,o.className=`markstream-inline-fold-proxy`,o.dataset.markstreamInlineFoldProxy=`true`;let s=n.getAttribute(`title`)||`Show Unchanged Region`;o.title=s,o.setAttribute(`aria-label`,s);let c=e=>{e.preventDefault(),e.stopPropagation()},l=e=>{e.preventDefault(),e.stopPropagation(),n.click(),w(()=>$())},u=e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),e.stopPropagation(),n.click(),w(()=>$()))};o.addEventListener(`mousedown`,c),o.addEventListener(`click`,l),o.addEventListener(`keydown`,u),a.appendChild(o),jt.push(()=>{o.removeEventListener(`mousedown`,c),o.removeEventListener(`click`,l),o.removeEventListener(`keydown`,u),o.parentElement===a&&a.removeChild(o)})}}function $(e=!1){if(L||Ue!=null)return;let t=()=>{L||(Q(),X(e),Z())};Ue=w(()=>{Ue=null,t(),We=w(()=>{We=null,t()})}),Mr()}function Mr(e=!1){if(!U.value||L||!e&&!1===m.loading||(qe||=e,Ke=Math.max(Ke,e?18:6),Ge!=null))return;let t=()=>{if(Ge=null,!U.value||L||Ke<=0||!qe&&!1===m.loading)return Ke=0,void(qe=!1);Ke--,Q(),X({preferModelDiffHeight:!0,holdCurrentDiffHeight:qe}),Z(),Ke>0?Ge=w(t):qe=!1};Ge=w(t)}function Nr(e,t,n,r={}){let i=U.value&&!1!==m.loading?_r(e):null,a=i!=null&&i>t+1?i:t,o=Math.min(a,n),s=!0===r.allowBelowEstimatedFloor||Vn(),c=Hn(o,!0===r.clearEstimatedFloor,{allowBelowEstimatedFloor:s}),l=jn();if(e.style.minHeight=l==null||s?`0px`:`${Math.min(l,Math.ceil(n))}px`,e.style.height=`${c}px`,e.style.maxHeight=`${Math.ceil(n)}px`,U.value)e.style.overflow=`hidden`;else{let i=!0===r.preserveScrollableOverflow||t>n+1;e.style.overflow=i?`auto`:`hidden`}return c}function Pr(e,t=0){let n=Math.ceil(e.getBoundingClientRect?.call(e).height||0),r=Math.max(t,e.clientHeight||0,n);return r>0&&e.scrollHeight>r+1}function Fr(e){return!U.value&&(Qe||Pr(e,Ye.value??0))}function Ir(e){var t,n,r,i;if(!U.value)return;let a=k.value||!vr(e)||e.getBoundingClientRect().height>=Kr()-1;if(Xe===a)return;Xe=a;let o=j(A({},m.monacoOptions?.scrollbar??{}),{handleMouseWheel:a}),s=H();try{(n=(t=(s?.getOriginalEditor)?.call(s))?.updateOptions)==null||n.call(t,{scrollbar:o}),(i=(r=(s?.getModifiedEditor)?.call(s))?.updateOptions)==null||i.call(r,{scrollbar:o})}catch{}}function Lr(e=T.value){return!!Vr(e)||!!e?.querySelector(`.monaco-diff-editor .view-lines .view-line`)}function Rr(e=T.value){return!!Vr(e)||!!e?.querySelector(`.monaco-editor .view-lines .view-line`)}function zr(){var e;if(Vr())return!0;let t=((e=V())?.getModel)?.call(e);return typeof t?.getValue==`function`&&t.getValue()===pn.value}function Br(e=T.value){return!!Vr(e)||!!e?.classList.contains(`stream-monaco-diff-root`)&&!(nn.value&&!e.classList.contains(`stream-monaco-diff-inline`))}function Vr(e=T.value){return!!e?.querySelector(`diffs-container`)}function Hr(e){return!1!==m.loading||K.value||e.classList.contains(`stream-monaco-diff-native-stale`)||vr(e)}function Ur(){let e=H();return typeof e?.getOriginalEditor==`function`||typeof e?.getModifiedEditor==`function`||typeof e?.getLineChanges==`function`}function Wr(){return M(this,arguments,function*(t={}){if(!U.value)return!0;if(Vr())return yield e(),yield Un(),Vr();let n=!1!==t.requireHighlight,r=0,i=Lt(String(m.node.originalCode??``),String(m.node.updatedCode??``)),a=Xn(i.original,i.updated),o=a.added>0||a.removed>0,s=()=>{let e=Lt(String(m.node.originalCode??``),String(m.node.updatedCode??``));e.original===i.original&&e.updated===i.updated||(i=e,a=Xn(i.original,i.updated),o=a.added>0||a.removed>0)};for(let t=0;t<30;t++){if(L)return!1;s();let t=T.value,i=H(),c=cr(),l=!1;try{let e=(i?.getLineChanges)?.call(i);l=Array.isArray(e)&&(!o||e.length>0)}catch{l=!1}let u=!!t?.querySelector(`.monaco-diff-editor`),d=Lr(t),f=!o||Qn(t,a),p=!o||tr(t,a),m=!c||nr(t);if(u&&d&&l&&f&&p&&m&&Zn(t)){try{Bt(),Q(),ur(),$()}catch{}if(yield e(),yield Un(),L)return!1;let t=T.value,i=!cr()||nr(t),s=!o||Qn(t,a),c=!o||tr(t,a),l=ir(t,o),u=or(t,a),d=!n||sr(t),f=Br(t)&&i&&rr(t)&&s&&c&&l&&u&&d,p=Br(t)&&i&&rr(t)&&s&&c&&Zn(t)&&d;if(f||p){if(r++,r>=2)return!0}else r=0}yield e(),yield Un()}return L||(Bt(),Q(),ur(),$(),s()),!1})}function Gr(t,n,r){return M(this,null,function*(){try{yield _t(t,n,r);return}catch(e){if(!zt(e))throw e}if(yield e(),yield Un(),!L&&U.value)try{yield _t(t,n,r)}catch(e){if(!zt(e))throw e}})}function Kr(){let e=m.monacoOptions?.MAX_HEIGHT??500;if(typeof e==`number`)return e;let t=String(e).match(/^(\d+(?:\.\d+)?)/);return t?Number.parseFloat(t[1]):500}let qr=v(()=>m.isShowPreview&&(D.value===`html`||D.value===`svg`));function Jr(){return typeof m.node.loading==`boolean`?m.node.loading:!0===m.loading}function Yr(){if(!Jr())return!0;let e=String(m.node.raw??``),t=e.split(/\r\n|\n|\r/,1)[0]?.trimStart()??``;return!/^(?:`{3,}|~{3,})/.test(t)||/\r\n|\n|\r/.test(e)}function Xr(e,t,n){return!n||Yr()&&String(t??``)?ve(String(e??``)):`plain`}function Zr(){return Jr()}let Qr=null,$r=!1,ei=0;function ti(){Qr=null,ei++}function ni(){return M(this,arguments,function*(t=ei){if(!$r){$r=!0;try{for(;Qr&&!L&&!U.value&&t===ei;){let t=Qr;Qr=null;try{yield Promise.resolve(gt(t.code,t.language)),yield e(),L||U.value||(X(!1),Z())}catch{}}}finally{$r=!1,!Qr||L||U.value||ni()}}})}function ri(e,t){Qr={code:e,language:t},ni(ei)}t(()=>[m.node.language,m.node.code,m.node.raw,m.node.loading,m.loading],([e,t,n,r,i])=>{D.value=Xr(e,t,typeof r==`boolean`?r:!0===i)}),t(()=>[m.node.originalCode,m.node.updatedCode,U.value],()=>{R.value=null,lr(),w(()=>ur())},{immediate:!0});let ii=0;t(()=>[m.node.originalCode,m.node.updatedCode,O.value,U.value,m.stream],t=>M(null,[t],function*([,,,t,n]){let r=++ii;if(!t||Jr()||!1===n&&!P.value)return;if(!1!==n&&B&&!P.value&&T.value)try{yield vi(T.value)}catch{}let i=wt;if(i&&!F.value){try{yield i}catch{}if(L||!U.value||r!==ii)return}if(r!==ii)return;let a=Lt(String(m.node.originalCode??``),String(m.node.updatedCode??``)),o=!1===m.loading;o&&ki();try{if(yield Gr(a.original,a.updated,O.value),L||!U.value||r!==ii)return;yield e(),Z(!0),Q(),X(!1===m.loading||{preferModelDiffHeight:!0}),Z(!0),$(!0)}catch{return}if(o){if(L||!U.value)return;Bt(),Q(),ur(),$(),Mr(!0)}k.value&&w(()=>Or())})),t(()=>m.node.code,e=>M(null,null,function*(){if(Jr()||!1===m.stream||(D.value||=ve(Et(e)),U.value))return;let t=wt;if(t&&!F.value){try{yield t}catch{}if(L||U.value)return}if(B&&!P.value&&T.value)try{yield vi(T.value)}catch{}ri(Rt(m.node.code),O.value),k.value&&w(()=>Or())}));let ai=v(()=>{let e=D.value;return e?_e[e]||e.charAt(0).toUpperCase()+e.slice(1):_e[``]||`Plain Text`}),oi=v(()=>de(String(m.node.raw??``),ai.value,U.value)),si=v(()=>oi.value.title),ci=v(()=>oi.value.caption),li=v(()=>(fe.value,function(e,t){if(t===void 0)return De(e);if(t){let n=t(e);if(n!=null&&n!==``)return n}return he(ve(e))||le()}(D.value||``,be))),ui=v(()=>{let e={};e[`--markstream-code-layout-character-width`]=_n.value==null?`1ch`:`${_n.value}px`;let t=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},n=t(m.minWidth),r=t(m.maxWidth);if(n&&(e.minWidth=n),r&&(e.maxWidth=r),Fn.value&&!U.value&&!N.value){let t=In.value;t!=null&&(e.minHeight=`${t}px`)}return U.value||(e.color=`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))`,e.backgroundColor=`var(--vscode-editor-background, var(--markstream-code-fallback-bg))`,e.borderColor=`var(--markstream-code-border-color)`),e}),di=v(()=>!1!==m.showTooltips);function fi(){return M(this,null,function*(){try{typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(m.node.code)),ze.value=!0,te(`copy`,m.node.code),setTimeout(()=>{ze.value=!1},1e3)}catch(e){console.error(`复制失败:`,e)}})}function pi(){k.value=!k.value;let e=U.value?H():V(),t=T.value;e&&t&&(k.value?(gi(!0),t.style.maxHeight=`none`,t.style.overflow=`visible`,X(!0)):(gi(!1),t.style.overflow=U.value?`hidden`:`auto`,X(!0)),Ir(t))}function mi(){var t;if(N.value=!N.value,N.value){if(Qe=!1,T.value){let e=Math.ceil((t=T.value).getBoundingClientRect?.call(t).height||0);Qe=!U.value&&(Pr(T.value,e)||T.value.style.overflow===`auto`||T.value.style.overflowY===`auto`),e>0&&(Ye.value=e)}gi(!1)}else k.value&&gi(!0),T.value&&Ye.value!=null&&(T.value.style.height=`${Ye.value}px`),Ze=2,e(()=>{N.value||L||(X(!0),Z(!0))})}function hi(){if(!qr.value)return;let e=D.value;if(Ie.value){let t=e===`html`?`text/html`:`image/svg+xml`,n=e===`html`?Le(`artifacts.htmlPreviewTitle`)||`HTML Preview`:Le(`artifacts.svgPreviewTitle`)||`SVG Preview`;te(`previewCode`,{node:m.node,artifactType:t,artifactTitle:n,id:`temp-${e}-${Date.now()}`});return}e===`html`&&(fn.value=!fn.value)}function gi(e){var t,n;try{if(U.value){let n=H();(t=n?.updateOptions)==null||t.call(n,{automaticLayout:e})}else{let t=V();(n=t?.updateOptions)==null||n.call(t,{automaticLayout:e})}}catch{}}function _i(t){return M(this,null,function*(){if(!B||L)return;let n=Wt.value;if(en=!1,q.value=!1,qt.value=null,F.value=!1,K.value=!1,Kt.value=!1,Xe=null,hn.value=null,gn.value=null,_n.value=null,function(){let e=function(){let e=T.value?.parentElement;return e instanceof HTMLElement?e:null}();e&&(e.style.removeProperty(`--stream-monaco-line-number-left`),e.style.removeProperty(`--stream-monaco-line-number-width`),e.style.removeProperty(`--stream-monaco-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-original-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-modified-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-original-scrollable-left`),e.style.removeProperty(`--stream-monaco-modified-scrollable-left`))}(),jr(),function(){Xt.value=!1;let e=On.value;An.value=I.value||e==null?null:e}(),kr(),Ar(),function(e){e.replaceChildren()}(t),ki(),L)return;let r=M(null,null,function*(){if(n===`diff`){(function(){if(Ot||typeof window>`u`)return;Ot=!0;let e=e=>{zt(`reason`in e?e.reason:e.error??e.message)&&(e.preventDefault(),e.stopImmediatePropagation())};window.addEventListener(`error`,e,!0),window.addEventListener(`unhandledrejection`,e,!0),kt=()=>{window.removeEventListener(`error`,e,!0),window.removeEventListener(`unhandledrejection`,e,!0),Ot=!1,kt=null}})(),bt();let e=Lt(String(m.node.originalCode??``),String(m.node.updatedCode??``));ht?yield Pe(()=>ht(t,e.original,e.updated,O.value)):yield Pe(()=>B(t,m.node.code,O.value))}else yield Pe(()=>B(t,pn.value,O.value));F.value=!0}).finally(()=>{wt===r&&(wt=null)});if(wt=r,yield function(t){return M(this,null,function*(){if(!U.value)return void(yield t);let n,r=!1;for(t.then(()=>{r=!0},e=>{r=!0,n=e});;){if(L)return;if(r){if(n)throw n;return}if(Lr()&&Ur())return;yield e(),yield Un()}})}(r),L||Wt.value!==n)return;F.value=!0;let i=n===`diff`?H():V();if(typeof m.monacoOptions?.fontSize==`number`)i?.updateOptions({fontSize:m.monacoOptions.fontSize,automaticLayout:!1}),J.value=m.monacoOptions.fontSize,Y.value=m.monacoOptions.fontSize;else if(!xr()){let e=Gn();e&&e>0?(J.value=e,Y.value=e):(J.value=12,Y.value=12)}br(),yield Ti(),k.value||N.value||X(!1),I.value=!0,Gt.value=n,function(){if(kr(),U.value){let e=H(),t=(e?.getOriginalEditor)?.call(e),n=(e?.getModifiedEditor)?.call(e),r=(e,t)=>{try{let n=e?.[t];if(typeof n!=`function`)return;let r=n.call(e,()=>$());r&&At.push(r)}catch{}};try{let t=(e?.onDidUpdateDiff)?.call(e,()=>{$(),w(()=>ur())});t&&At.push(t)}catch{}r(t,`onDidContentSizeChange`),r(n,`onDidContentSizeChange`);let i=T.value;if(i&&typeof MutationObserver<`u`){let e=[`.view-line`,`.view-lines`,`.view-zones`,`.margin-view-zones`,`.diff-hidden-lines`,`.stream-monaco-diff-unchanged-bridge`,`.stream-monaco-fallback-inline-delete-zone`,`.stream-monaco-fallback-inline-delete-margin`].join(`,`),t=t=>{let n=t instanceof HTMLElement?t:t.parentElement;return!!(n?.closest)?.call(n,e)},n=t=>{let n=t instanceof HTMLElement?t:t.parentElement;return!!((n?.closest)?.call(n,e)||(n?.querySelector)?.call(n,e))},r=new MutationObserver(e=>{U.value&&Hr(i)&&e.some(e=>t(e.target)||Array.from(e.addedNodes).some(n)||Array.from(e.removedNodes).some(t))&&(Q(),X({preferModelDiffHeight:!0}),Z(),Mr())});r.observe(i,{attributeFilter:[`class`],attributes:!0,childList:!0,characterData:!0,subtree:!0}),At.push({dispose:()=>r.disconnect()})}if(i){let e=e=>{if(!(e.target instanceof Element?e.target:null)?.closest([`.stream-monaco-unchanged-summary`,`.stream-monaco-unchanged-reveal`,`.stream-monaco-unchanged-expand`,`.markstream-inline-fold-proxy`,`.diff-hidden-lines .center`].join(`,`)))return;let t=Math.ceil(i.getBoundingClientRect().height||0);t>0&&(R.value=t)};i.addEventListener(`click`,e,!0),At.push({dispose:()=>i.removeEventListener(`click`,e,!0)})}if(i&&typeof ResizeObserver<`u`){let e=new ResizeObserver(()=>{if(!U.value||(Z(),!Hr(i)))return;let e=_r(i);if(e==null)return;let t=Math.ceil(i.getBoundingClientRect().height||0),n=R.value;if(vr(i)&&n!=null){if(t>n+1)R.value=t;else if(te.disconnect()})}return}let e=V();try{let t=(e?.onDidContentSizeChange)?.call(e,()=>$());t&&At.push(t)}catch{}try{let t=(e?.onDidLayoutChange)?.call(e,()=>$());t&&At.push(t)}catch{}}(),Cr(),br(),Q(),ur(),$(),yield e();let a=null;St&&(a=yield St(),a&&(yield e(),yield Un()));let o=a??(n===`diff`?yield Wr({requireHighlight:!0}):yield function(){return M(this,null,function*(){if(Vr())return yield e(),yield Un(),Vr();for(let t=0;t<30;t++){if(L||U.value)return!1;let t=T.value,n=zr(),r=Rr(t),i=!pn.value.trim()||sr(t);if(n&&r&&i&&(yield e(),yield Un(),!L&&!U.value&&zr()&&Rr(T.value)&&(!pn.value.trim()||sr(T.value))))return!0;yield e(),yield Un()}return!1})}());L||(o?(br(),Bn(),(yield zn())||Ii()):Ii())})}function vi(t,n={}){if(!B||L||!1===m.stream&&!1!==m.loading||(Pi(),Fi())||G.value||T.value!==t||Zr())return null;if(Ct)return Ct;if(P.value&&I.value)return Promise.resolve();let r=Mi(),i=Jt.value,a=!1;P.value=!0,function(){let e=Te.value;C&&e&&Je!==e&&(Je&&C.markSettled(Je),Je=e,C.markPending(e))}();let o=M(null,null,function*(){try{yield _i(t),Zt=null}catch(e){let t=Mi(),o=i!==Jt.value,s=!1!==n.allowStaleContentRetry&&o&&Zt!==t;if(r!==t||s)return s&&(Zt=t),a=!0,P.value=!1,I.value=!1,F.value=!1,void(K.value=!1);throw Ii(r),e}}).finally(()=>{Ct===o&&(Ct=null),function(){let t=Je;C&&t&&(Je=``,e(()=>{if(!L){let e=E.value?.offsetHeight??0;e>0&&C.reportHeight(t,e)}C.markSettled(t)}))}(),a&&!L&&queueMicrotask(()=>{var e;let t=T.value;t&&!L&&((e=vi(t))==null||e.catch(e=>{I.value=!1,K.value=!1,Ii()}))})});return Ct=o,o}t(di,e=>{e||Ee()}),t(()=>Y.value,(e,t)=>{let n=U.value?H():V();n&&typeof e==`number`&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),N.value||X(!0))},{flush:`post`,immediate:!1});let yi=0,bi=t(()=>[T.value,U.value,m.stream,m.loading,He.value,z.value,m.node.language,m.node.raw,m.node.code,m.node.loading],e=>M(null,[e],function*([e,t,n,r,i,a]){let o=++yi;if(!e||!a||Jr()||Qt||!1===n&&!1!==r||!B&&(yield function(){return M(this,null,function*(){if(typeof window>`u`||L||He.value||G.value)return;if(Tt)return Tt;let e=M(null,null,function*(){try{let e=yield Re();if(L)return;if(!e)return void(G.value=!0);let t=e.useMonaco,n=e.detectLanguage;if(typeof n==`function`&&(Et=n),typeof t!=`function`)return;Mt=Oi();let r=t(Mt);B=r.createEditor||B,ht=r.createDiffEditor||ht,gt=r.updateCode||gt,_t=r.updateDiff||_t,vt=r.getEditor||vt,V=r.getEditorView||V,H=r.getDiffEditorView||H,yt=r.cleanupEditor||yt,bt=r.safeClean||r.cleanupEditor||bt,xt=r.refreshDiffPresentation||xt,Dt=r.setTheme||Dt,St=r.whenVisualReady||null,He.value=!0}catch{if(L)return;G.value=!0}}).finally(()=>{Tt===e&&(Tt=null)});return Tt=e,e})}(),o!==yi||!1===m.stream&&!1!==m.loading||Zr()||!z.value||!B||G.value||P.value||Fi()||L||T.value!==e)||Zr())return;let s=vi(e);if(s){try{yield s}catch{I.value=!1,K.value=!1,Ii()}I.value&&K.value&&bi()}}));function xi(e){return!!e&&typeof e==`object`&&`light`in e&&`dark`in e}function Si(e){return typeof e==`string`?e:e&&typeof e==`object`&&`name`in e?String(e.name):null}function Ci(e,t){if(e===t)return!0;let n=Si(e),r=Si(t);return!!n&&n===r}function wi(){let e=function(){if(m.theme!==void 0){let e=m.theme;return xi(e)?m.isDark?e.dark:e.light:e}return m.isDark?m.darkTheme:m.lightTheme}(),t=W.value?.theme,n=e??t;if(typeof n==`object`&&n)return n;let r=Array.isArray(m.themes)?m.themes:[];if(!r.length||n==null)return n;let i=Si(n),a=r.map(e=>Si(e)).filter(e=>!!e);if(!i||a.includes(i))return n;let o=Si(t);return t!=null&&o&&a.includes(o)?t:r[0]}function Ti(){return M(this,arguments,function*(e={}){ki();let t=()=>{U.value&&Bt(),w(()=>{Cr(),$()})};if(e.appearanceOnly)return void t();let n=wi();if(n)try{yield Dt(n),t()}catch{}else t()})}function Ei(e,t){if(typeof t!=`string`)return;let n=ve(t),r=ye(n),i=[`plain`,`objectivec`,`objectivecpp`].includes(n)?r:n;for(let t of[i,r])t&&!e.includes(t)&&e.push(t)}t(Wt,(t,n)=>M(null,null,function*(){if(t===n||q.value||Qt||(ti(),!B||!T.value)||!P.value||!1===m.stream&&!1!==m.loading||!z.value)return;let r=Ct;if(r){try{yield r}catch{}if(L||!T.value)return}if(Gt.value!==t||!P.value||!I.value)try{I.value=!1,K.value=!1,P.value=!1,F.value=!1,kr(),Ar(),bt(),yield e(),yield vi(T.value)}catch{I.value=!1,K.value=!1,Ii()}}));let Di=v(()=>{let e=[],t=W.value?.languages;if(Array.isArray(t))for(let n of t)Ei(e,n);return Yr()&&Ei(e,m.node.language),Ei(e,D.value),Ei(e,O.value),Ei(e,`plaintext`),e});function Oi(){let e=j(A(j(A({wordWrap:`on`,wrappingIndent:`same`,themes:m.themes},W.value||{}),{languages:Di.value,stream:!1,fontSize:yn.value,lineHeight:xn.value,theme:wi(),disableFileHeader:!0}),U.value?{diffAppearance:Ht.value}:{}),{onThemeChange(){Cr()}}),t=function(){let e=W.value?.fontFamily;return typeof e==`string`&&e.trim()?e.trim():U.value?function(){if(typeof window>`u`)return;let e=E.value?.querySelector(`pre.code-pre-fallback`);if(e)return window.getComputedStyle(e).fontFamily.trim()||void 0}():void 0}();if(t&&(e.fontFamily??=t),U.value){e.wordWrap=tn.value?`on`:`off`;let t=typeof e.unsafeCSS==`string`?`${e.unsafeCSS}\n`:``,n=function(){let e=rn.value;if(!1===e||typeof e==`object`&&!1===e.enabled)return null;let t=typeof e==`object`?e:ue,n=Math.max(0,Math.floor(t.contextLineCount??2));return{contextLineCount:n,collapsedContextThreshold:n+Math.max(1,Math.floor(t.minimumLineCount??4))-1}}();e.unsafeCSS=`${t}\npre { column-gap: 0; }\npre > code { column-gap: 0; padding-block: 0; }\n[data-separator="line-info"] { margin-top: 0; }\n`,n?(e.parseDiffOptions=j(A({},e.parseDiffOptions),{context:n.contextLineCount}),e.collapsedContextThreshold=n.collapsedContextThreshold,e.expandUnchanged=!1,e.hunkSeparators=`line-info`,e.unsafeCSS+=`[data-separator="line-info"][data-separator-last] { height: 28px; } +import{A as e,G as t,I as n,J as r,N as i,O as a,P as o,S as s,T as c,U as l,_ as u,b as d,c as f,d as p,f as m,g as h,h as g,j as _,lt as ee,m as v,n as te,nt as y,ot as b,q as ne,rt as re,st as ie,u as ae,ut as x,v as S,w as C,y as oe,z as se}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{t as ce}from"./preload-helper-zJ_50EbN.js";import{$ as le,A as ue,D as de,J as fe,M as pe,O as me,Q as he,T as ge,X as _e,Y as ve,Z as ye,_ as be,a as xe,d as Se,et as Ce,g as we,h as Te,j as w,n as Ee,nt as De,o as Oe,p as ke,s as Ae,tt as je,v as Me,x as Ne}from"./index-CIrZXSM-.js";var Pe=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Fe=!1,Ie=null,Le=null,T=null;function Re(){return Pe(this,null,function*(){if(T)return T;T=Pe(null,null,function*(){if(!Le)try{if(Le=function(e){let t=e;if(typeof t?.useMonaco==`function`)return t;let n=e?.default;return typeof n?.useMonaco==`function`?n:null}(yield ce(()=>import(`./dist-BlrGujvY.js`),__vite__mapDeps([0,1]))),!Le)return null}catch{return null}try{return yield function(e){return Pe(this,null,function*(){if(!Fe)return Ie||(Ie=Pe(null,null,function*(){let t=globalThis==null?void 0:globalThis.MonacoEnvironment;t&&(typeof t.getWorker==`function`||typeof t.getWorkerUrl==`function`)||typeof e?.preloadMonacoWorkers!=`function`||(yield e.preloadMonacoWorkers()),Fe=!0}).finally(()=>{Ie=null}),Ie)})}(Le),je(),Le}catch{return null}});try{return yield T}finally{T=null}})}var E=Object.defineProperty,ze=Object.defineProperties,D=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,k=(e,t,n)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A=(e,t)=>{for(var n in t||={})O.call(t,n)&&k(e,n,t[n]);if(Be)for(var n of Be(t))Ve.call(t,n)&&k(e,n,t[n]);return e},j=(e,t)=>ze(e,D(t)),M=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),N={key:0,class:`code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]`},P={class:`flex items-center gap-0.5`},F=[`aria-label`],I={class:`code-diff-stat removed`},He={class:`code-diff-stat added`},L=[`aria-label`],Ue={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},We={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Ge=[`aria-pressed`],Ke={key:3,class:`relative`},qe=[`aria-expanded`],Je=[`disabled`],Ye=[`disabled`],R=[`disabled`],Xe={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Ze={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Qe={class:`code-loading-placeholder`},$e={class:`sr-only`,"aria-live":`polite`,role:`status`},et=C({__name:`CodeBlockShell`,props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:[`toggleCollapse`,`decreaseFont`,`resetFont`,`increaseFont`,`copy`,`toggleExpand`,`preview`],setup(e,{emit:t}){let i=e,a=t,o=y(!1),c=y(null),l=y(null);function m(){Ee(!0),o.value=!o.value,o.value&&document.addEventListener(`click`,_,{once:!0,capture:!0})}function h(){Ee(!0),o.value=!1}function _(e){let t=e.target;c.value?.contains(t)||l.value?.contains(t)?document.addEventListener(`click`,_,{once:!0,capture:!0}):h()}let re=v(()=>i.showFontSizeButtons&&i.enableFontSizeControl||i.showExpandButton||i.isPreviewable&&i.showPreviewButton),{t:C}=xe(),oe=v(()=>!1!==i.showTooltips);function ce(e,t){oe.value&&Te(e.currentTarget,t,`top`,!1,void 0,i.isDark)}function le(){oe.value&&Ee()}function ue(e){ce(e,i.copyText?C(`common.copied`)||`Copied`:C(`common.copy`)||`Copy`)}let de=v(()=>!!Number.isFinite(i.codeFontSize)&&(i.codeFontSize??0)<=(i.codeFontMin??0)),fe=v(()=>!i.fontBaselineReady||i.codeFontSize===i.defaultCodeFontSize),pe=v(()=>!!Number.isFinite(i.codeFontSize)&&(i.codeFontSize??0)>=(i.codeFontMax??100));return(t,_)=>(n(),S(p,null,[i.showHeader?(n(),S(`div`,N,[se(t.$slots,`header-left`),se(t.$slots,`header-right`,{},()=>[g(`div`,P,[e.diffStats?(n(),S(`div`,{key:0,class:`code-diff-stats`,"aria-label":e.diffStatsAriaLabel},[g(`span`,I,`-`+x(e.diffStats.removed),1),g(`span`,He,`+`+x(e.diffStats.added),1)],8,F)):u(``,!0),i.showCopyButton?(n(),S(`button`,{key:1,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,"aria-label":e.copyText?b(C)(`common.copied`)||`Copied`:b(C)(`common.copy`)||`Copy`,onClick:_[0]||=e=>a(`copy`),onMouseenter:_[1]||=e=>ue(e),onFocus:_[2]||=e=>ue(e),onMouseleave:le,onBlur:le},[e.copyText?(n(),S(`svg`,We,[..._[14]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(n(),S(`svg`,Ue,[..._[13]||=[g(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[g(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),g(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],40,L)):u(``,!0),i.showCollapseButton?(n(),S(`button`,{key:2,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,"aria-pressed":e.isCollapsed,onClick:_[3]||=e=>a(`toggleCollapse`),onMouseenter:_[4]||=t=>ce(t,e.isCollapsed?b(C)(`common.expand`)||`Expand`:b(C)(`common.collapse`)||`Collapse`),onFocus:_[5]||=t=>ce(t,e.isCollapsed?b(C)(`common.expand`)||`Expand`:b(C)(`common.collapse`)||`Collapse`),onMouseleave:le,onBlur:le},[(n(),S(`svg`,{style:ee({rotate:e.isCollapsed?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[..._[15]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,Ge)):u(``,!0),re.value?(n(),S(`div`,Ke,[g(`button`,{ref_key:`moreBtnRef`,ref:l,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors`,"aria-expanded":o.value,"aria-haspopup":`true`,onClick:ae(m,[`stop`]),onMouseenter:_[6]||=e=>ce(e,b(C)(`common.more`)||`More`),onFocus:_[7]||=e=>ce(e,b(C)(`common.more`)||`More`),onMouseleave:le,onBlur:le},[..._[16]||=[d(``,1)]],40,qe),s(te,{name:`code-menu`},{default:ne(()=>[o.value?(n(),S(`div`,{key:0,ref_key:`moreMenuRef`,ref:c,class:`code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]`,role:`menu`},[i.showFontSizeButtons&&i.enableFontSizeControl?(n(),S(p,{key:0},[g(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:de.value,onClick:_[8]||=e=>{b(Ee)(!0),a(`decreaseFont`)}},[_[17]||=g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14`})],-1),g(`span`,null,x(b(C)(`common.fontSmaller`)||`Font size −`),1)],8,Je),g(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:fe.value,onClick:_[9]||=e=>{b(Ee)(!0),a(`resetFont`)}},[_[18]||=g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[g(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[g(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),g(`path`,{d:`M3 3v5h5`})])],-1),g(`span`,null,x(b(C)(`common.fontReset`)||`Font size reset`),1)],8,Ye),g(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:pe.value,onClick:_[10]||=e=>{b(Ee)(!0),a(`increaseFont`)}},[_[19]||=g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14m-7-7v14`})],-1),g(`span`,null,x(b(C)(`common.fontLarger`)||`Font size +`),1)],8,R)],64)):u(``,!0),i.showExpandButton?(n(),S(`button`,{key:1,type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors`,onClick:_[11]||=e=>{h(),a(`toggleExpand`)}},[e.isExpanded?(n(),S(`svg`,Xe,[..._[20]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):(n(),S(`svg`,Ze,[..._[21]||=[g(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]])),g(`span`,null,x(e.isExpanded?b(C)(`common.collapse`)||`Collapse`:b(C)(`common.expand`)||`Expand`),1)])):u(``,!0),e.isPreviewable&&i.showPreviewButton?(n(),S(`button`,{key:2,type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors`,onClick:_[12]||=e=>{h(),a(`preview`)}},[_[22]||=g(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[g(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[g(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),g(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),g(`span`,null,x(b(C)(`common.preview`)||`Preview`),1)])):u(``,!0)],512)):u(``,!0)]),_:1})])):u(``,!0)])])])):u(``,!0),r(g(`div`,{class:ie([`code-block-shell-content`,{"code-block-shell-content--collapsed":e.isCollapsed}])},[se(t.$slots,`default`)],2),[[f,!!e.stream||!e.loading]]),r(g(`div`,Qe,[se(t.$slots,`loading`,{},()=>[_[23]||=g(`div`,{class:`loading-skeleton`},[g(`div`,{class:`skeleton-line`}),g(`div`,{class:`skeleton-line`}),g(`div`,{class:`skeleton-line short`})],-1)])],512),[[f,!e.stream&&e.loading]]),g(`span`,$e,x(e.copyText?b(C)(`common.copied`)||`Copied`:``),1)],64))}}),tt={class:`html-preview-frame__header`},nt={class:`html-preview-frame__title`},rt={class:`html-preview-frame__label`},z=[`sandbox`,`srcdoc`],it=be(C({__name:`HtmlPreviewFrame`,props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(e){let t=e,{t:r}=xe(),a=v(()=>{let e=t.code||``,n=e.trim().toLowerCase();return n.startsWith(`\n\n \n \n \n \n \n \n ${e}\n \n`}),s=v(()=>{return e=t.htmlPreviewSandbox,n=t.htmlPreviewAllowScripts,typeof e==`string`?e:e===void 0&&!0===n?`allow-scripts`:``;var e,n});function c(e){var n;e.key!==`Escape`&&e.key!==`Esc`||(n=t.onClose)==null||n.call(t)}return i(()=>{typeof window<`u`&&window.addEventListener(`keydown`,c)}),o(()=>{typeof window<`u`&&window.removeEventListener(`keydown`,c)}),(e,i)=>(n(),h(m,{to:`body`},[g(`div`,{class:ie([`markstream-vue`,{dark:t.isDark}])},[g(`div`,{class:`html-preview-frame__backdrop`,onClick:i[2]||=e=>t.onClose?.call(t)},[g(`div`,{class:`html-preview-frame`,onClick:i[1]||=ae(()=>{},[`stop`])},[g(`div`,tt,[g(`div`,nt,[i[3]||=g(`span`,{class:`html-preview-frame__dot`},null,-1),g(`span`,rt,x(t.title||b(r)(`common.preview`)||`Preview`),1)]),g(`button`,{type:`button`,class:`html-preview-frame__close`,onClick:i[0]||=e=>t.onClose?.call(t)},` × `)]),g(`iframe`,{class:`html-preview-frame__iframe`,sandbox:s.value,referrerpolicy:`no-referrer`,srcdoc:a.value},null,8,z)])])],2)]))}}),[[`__scopeId`,`data-v-24e66176`]]),at=[`data-markstream-enhanced`,`data-markstream-enhancement-state`,`data-markstream-code-block-state`,`data-markstream-pending`,`data-markstream-viewport-pending`],ot={class:`code-header-main`},st=[`innerHTML`],ct={class:`code-header-copy`},lt={class:`code-header-title`},ut={key:0,class:`code-header-caption`},dt=[`data-markstream-host-hidden`],ft=`__markstreamMonacoPassiveTouchState__`,pt=be(C({__name:`CodeBlockNode`,props:{node:{},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},theme:{},darkTheme:{default:`vitesse-dark`},lightTheme:{default:`vitesse-light`},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},customId:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{},estimatedDiffInline:{type:Boolean}},emits:[`previewCode`,`copy`],setup(d,{emit:p}){let m=d,te=p,ae=l(),C=a(Ce,null),ce=a(`markstreamHostScrollManaged`,null),be=a(ge,void 0),Te=v(()=>Se(m,ae)),je=new Set;function Pe(e){return M(this,null,function*(){if(typeof window>`u`)return yield e();let t=window.Element?.prototype,n=t?.addEventListener;if(!t||!n)return yield e();let r=function(){let e=window,t=e[ft];if(t)return t;let n={depth:0,original:null};return e[ft]=n,n}(),i=null;try{r.depth===0&&(r.original=n,t.addEventListener=function(e,t,i){let a=r.original??n;return e===`touchstart`&&function(e,t){if(!e)return!1;let n=e;return!(typeof n.closest!=`function`||!n.closest(`.monaco-editor, .monaco-diff-editor`)||t&&typeof t==`object`&&`passive`in t)}(this,i)?a.call(this,e,t,function(e){return e==null?{passive:!0}:typeof e==`boolean`?{capture:e,passive:!0}:typeof e==`object`?`passive`in e?e:j(A({},e),{passive:!0}):{passive:!0}}(i)):a.call(this,e,t,i)}),r.depth++;let e=!1;i=()=>{e||(e=!0,je.delete(i),r.depth=Math.max(0,r.depth-1),r.depth===0&&r.original&&t.addEventListener!==r.original&&(t.addEventListener=r.original,r.original=null))},je.add(i)}catch{return yield e()}try{return yield e()}finally{i?.()}})}let Fe=c(),Ie=v(()=>{let e=Fe?.vnode.props;return!(!e||!e.onPreviewCode&&!e[`onPreview-code`])}),{t:Le}=xe(),T=y(null),E=y(null),ze=y(!1),D=y(Xr(m.node.language,m.node.code,Jr())),Be=v(()=>ye(D.value)),O=v(()=>Be.value===`plaintext`?`text`:Be.value),Ve=v(()=>Be.value===`plaintext`),k=y(!1),N=y(!1),P=y(!1),F=y(!1),I=y(!1),He=y(!1),L=!1,Ue=null,We=null,Ge=null,Ke=0,qe=!1,Je=``,Ye=y(null),R=y(null),Xe=null,Ze=0,Qe=!1,$e=ke(),tt=Ne(),nt=Me(),rt=re(null),z=y(typeof window>`u`||!nt.value),pt=c()?.vnode.el?.textContent??``,mt=y(!(typeof window<`u`&&String(m.node.code??``).length>0&&pt.includes(String(m.node.code))));i(()=>{mt.value=!0}),typeof window<`u`&&t([()=>E.value,nt],([e,t],n,r)=>{var i;if((i=rt.value)==null||i.destroy(),rt.value=null,!t||z.value)return void(z.value=!0);if(!e)return void(z.value=!1);let a=!0,o=$e(e,{rootMargin:tt?.value.heavyBlockMargin??tt?.value.rootMargin??`0px`,allowIdle:!1});rt.value=o,z.value=z.value||o.isVisible.value,o.whenVisible.then(()=>{a&&rt.value===o&&(z.value=!0)}).catch(()=>{}),r(()=>{a=!1,o.destroy(),rt.value===o&&(rt.value=null)})},{immediate:!0}),_(()=>{var e;L=!0;for(let e of Array.from(je))e();(function(){let e=Je;C&&e&&(Je=``,C.markSettled(e))})(),(e=rt.value)==null||e.destroy(),rt.value=null});let B=null,ht=null,gt=()=>{},_t=()=>{},vt=()=>null,V=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),H=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),yt=()=>{},bt=()=>{},xt=()=>{},St=null,Ct=null,wt=null,Tt=null,Et=()=>String(m.node.language??`plaintext`),Dt=()=>M(null,null,function*(){}),Ot=!1,kt=null,At=[],jt=[],Mt=null,U=v(()=>me(m.node)),Nt=y({removed:0,added:0}),Pt=v(()=>`-${Nt.value.removed} +${Nt.value.added}`),Ft=Object.freeze(j(A({},ue),{enabled:!1,revealLineCount:0}));function It(e){var t;return Ae(e,((t=E.value)?.getBoundingClientRect)?.call(t).width||E.value?.clientWidth||(typeof window>`u`?0:window.innerWidth))}function Lt(e,t){return{original:Rt(e),updated:Rt(t)}}function Rt(e){return String(e??``).replace(/\r\n$|\n$|\r$/,``)}function zt(e){return String(e?.message??e).includes(`no diff result available`)}function Bt(){if(!Vr())try{let e=xt();e&&typeof e.catch==`function`&&e.catch(e=>{zt(e)})}catch(e){zt(e)}}let W=v(()=>{var e,t;let n=m.monacoOptions?A({},m.monacoOptions):{};if(!U.value)return A({lineDecorationsWidth:0,lineNumbersMinChars:2,glyphMargin:!1},n);let r=n.diffHideUnchangedRegions===void 0?A({},ue):we(n.diffHideUnchangedRegions),i=n.hideUnchangedRegions===void 0?void 0:we(n.hideUnchangedRegions),a=!1!==m.stream&&!1!==m.loading,o=a?A({},Ft):r,s=a?A({},Ft):i,c=function(e){return e.diffWordWrap===void 0?`off`:e.diffWordWrap}(n),l=A({},n.experimental??{}),u=n.diffUnchangedRegionStyle??`line-info`,d=function(e){return A(j(A({},e.scrollbar&&typeof e.scrollbar==`object`?e.scrollbar:{}),{verticalScrollbarSize:0,horizontalScrollbarSize:0}),It(e)?{horizontal:`hidden`}:{})}(n);return j(A(j(A(A({},{maxComputationTime:0,diffAlgorithm:`legacy`,ignoreTrimWhitespace:!1,renderIndicators:!0,diffUpdateThrottleMs:120,renderLineHighlight:`none`,renderLineHighlightOnlyWhenFocus:!0,selectionHighlight:!1,occurrencesHighlight:`off`,matchBrackets:`never`,lineDecorationsWidth:4,lineNumbersMinChars:2,glyphMargin:!1,padding:{top:0,bottom:0},minimap:{enabled:!1},renderOverviewRuler:!1,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,diffWordWrap:c,renderSideBySide:(e=n.renderSideBySide)==null||e,diffHideUnchangedRegions:o,useInlineViewWhenSpaceIsLimited:(t=n.useInlineViewWhenSpaceIsLimited)!=null&&t,diffLineStyle:`background`,diffAppearance:`auto`,diffUnchangedRegionStyle:u,diffHunkActionsOnHover:!1,experimental:l}),n),{experimental:l}),s===void 0?{}:{hideUnchangedRegions:s}),{diffHideUnchangedRegions:o,diffWordWrap:c,scrollbar:d})}),Vt=v(()=>(m.theme===void 0?Ci(m.darkTheme,m.lightTheme):!xi(m.theme))?function(e){if(e&&typeof e==`object`&&e.colors?.[`editor.background`]){let t=yr(e.colors[`editor.background`]);if(t!=null)return t<128}let t=(Si(e)??``).toLowerCase();return t?[`dark`,`night`,`moon`,`black`,`dracula`,`mocha`,`frappe`,`macchiato`,`palenight`,`ocean`,`poimandres`,`monokai`,`laserwave`,`tokyo`,`slack-dark`,`rose-pine`,`github-dark`,`material-theme`,`one-dark`,`catppuccin-mocha`,`catppuccin-frappe`,`catppuccin-macchiato`].some(e=>t.includes(e))&&![`light`,`latte`,`dawn`,`lotus`].some(e=>t.includes(e)):!!m.isDark}(wi()):!!m.isDark),Ht=v(()=>{if(!U.value)return Vt.value?`dark`:`light`;let e=W.value?.diffAppearance;return e===`light`||e===`dark`?e:Vt.value?`dark`:`light`}),Ut=v(()=>U.value?Ht.value===`dark`:Vt.value),Wt=v(()=>U.value?`diff`:`single`),Gt=y(Wt.value),G=y(!1),K=y(!1),Kt=y(!1),q=y(!1),qt=y(null),Jt=y(0),Yt=y(0),Xt=y(!1),Zt=null,Qt=!1,$t=null,en=!1,tn=v(()=>{if(U.value){let e=W.value?.diffWordWrap;if(e===`inherit`){let e=m.monacoOptions?.wordWrap;return e==null||String(e)!==`off`}return e===`on`}let e=m.monacoOptions?.wordWrap;return e==null||String(e)!==`off`}),nn=v(()=>!!U.value&&It(W.value??{})),rn=v(()=>{let e=m.monacoOptions?.diffHideUnchangedRegions;return e===void 0?A({},ue):we(e)});function an(e){return!0===ce?.value||!!e&&(!!e.closest(`[data-markstream-virtual-timeline="1"], .markstream-virtual-timeline`)||!!e.closest(`.vue-recycle-scroller, [data-virtualizer], [data-virtual-scroll-root]`))}let on=v(()=>an(E.value)),sn=v(()=>!(G.value||!q.value&&K.value)),cn=v(()=>sn.value),ln=v(()=>sn.value&&!Kt.value),un=v(()=>!G.value&&!q.value&&sn.value),dn=v(()=>K.value&&!G.value?`ready`:q.value?`fallback`:`pending`),fn=y(!1),pn=v(()=>Rt(m.node.code)),mn=v(()=>U.value?!0===m.node.diff?m.node:j(A({},m.node),{diff:!0}):pn.value===m.node.code?m.node:j(A({},m.node),{code:pn.value})),J=y(typeof m.monacoOptions?.fontSize==`number`?m.monacoOptions.fontSize:NaN),Y=y(J.value),hn=y(null),gn=y(null),_n=y(null),vn=v(()=>{let e=J.value,t=Y.value;return typeof e==`number`&&Number.isFinite(e)&&e>0&&typeof t==`number`&&Number.isFinite(t)&&t>0}),yn=v(()=>{let e=hn.value;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;let t=m.monacoOptions?.fontSize;if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;let n=Y.value;return typeof n==`number`&&Number.isFinite(n)&&n>0?n:12}),bn=v(()=>{let e=gn.value;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;let t=m.monacoOptions?.lineHeight;return typeof t==`number`&&Number.isFinite(t)&&t>0?t:yn.value===12?18:Math.max(12,Math.round(1.5*yn.value))}),xn=v(()=>bn.value),Sn=v(()=>{let e=m.monacoOptions?.tabSize;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:4}),Cn=v(()=>{let e=m.monacoOptions?.padding,t=U.value?0:8;return{top:typeof e?.top==`number`&&Number.isFinite(e.top)&&e.top>=0?e.top:t,bottom:typeof e?.bottom==`number`&&Number.isFinite(e.bottom)&&e.bottom>=0?e.bottom:t}}),wn=v(()=>{let e=m.estimatedContentHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:null});function Tn(e){if(e==null)return null;let t=Math.ceil(e);return!Number.isFinite(t)||t<=0?null:Math.min(t,Math.ceil(Kr()))}function En(){return!U.value&&!1!==m.stream&&!1!==m.loading}let Dn=v(()=>U.value?null:wn.value==null||En()?Math.ceil((e=>{let t=String(e??``);return t?Math.max(1,t.split(/\r\n|\n|\r/).length):1})(pn.value)*xn.value+1):null),On=v(()=>{if(U.value)return null;let e=wn.value;return e==null||En()?Tn(Dn.value):Tn(e)}),kn=v(()=>{let e=m.estimatedHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:null}),An=y(null);function jn(){let e=An.value;return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.round(e):null}let Mn=v(()=>jn()??(!U.value&&Xt.value?null:sn.value||!K.value?On.value:null));function Nn(e){let t=e?`hsl(152 42% 60%)`:`var(--diff-added-fg)`,n=e?`hsl(0 58% 58%)`:`var(--diff-removed-fg)`,r=e?`hsl(152 42% 60% / 0.18)`:`var(--diff-added-bg)`,i=e?`hsl(0 58% 58% / 0.18)`:`var(--diff-removed-bg)`,a=e?`hsl(152 42% 60% / 0.28)`:`var(--diff-added-inline-bg)`,o=e?`hsl(0 58% 58% / 0.28)`:`var(--diff-removed-inline-bg)`,s=`linear-gradient(90deg, ${t} 0 4px, transparent 4px 100%)`,c=`linear-gradient(90deg, ${n} 0 4px, transparent 4px 100%)`,l=e?`hsl(0 0% 7% / 0.98)`:`hsl(var(--ms-muted) / 0.45)`,u=`var(--markstream-code-layout-character-width, 1ch)`,d=`calc(${u} + ${u})`,f=`calc(${u} + ${u} + ${u} + ${u} + ${u} + 2px)`,p=`calc(${f} + ${u})`;return{"--markstream-diff-line-number-bg":l,"--markstream-diff-added-fg":t,"--markstream-diff-removed-fg":n,"--markstream-diff-added-line":r,"--markstream-diff-removed-line":i,"--markstream-diff-added-line-fill":r,"--markstream-diff-removed-line-fill":i,"--markstream-diff-added-gutter":s,"--markstream-diff-removed-gutter":c,"--markstream-diff-added-inline":a,"--markstream-diff-removed-inline":o,"--stream-monaco-added-fg":t,"--stream-monaco-removed-fg":n,"--stream-monaco-added-line":r,"--stream-monaco-removed-line":i,"--stream-monaco-added-line-fill":r,"--stream-monaco-removed-line-fill":i,"--stream-monaco-added-gutter":s,"--stream-monaco-removed-gutter":c,"--stream-monaco-added-inline":a,"--stream-monaco-removed-inline":o,"--stream-monaco-gutter-marker-width":`4px`,"--stream-monaco-gutter-gap":`1ch`,"--stream-monaco-line-number-left":`0px`,"--stream-monaco-line-number-width":d,"--stream-monaco-line-number-padding-left":d,"--stream-monaco-line-number-padding-right":u,"--stream-monaco-line-number-separator-width":`2px`,"--stream-monaco-layout-character-width":u,"--stream-monaco-line-number-box-width":f,"--stream-monaco-line-number-gap-to-code":u,"--stream-monaco-line-number-bg":l,"--stream-monaco-diff-code-gap":u,"--stream-monaco-diff-code-padding":`0px`,"--stream-monaco-original-margin-width":p,"--stream-monaco-original-scrollable-left":p,"--stream-monaco-original-scrollable-width":`calc(100% - ${p})`,"--stream-monaco-modified-margin-width":p,"--stream-monaco-modified-scrollable-left":p,"--stream-monaco-modified-scrollable-width":`calc(100% - ${p})`}}let Pn=v(()=>{let e=m.monacoOptions?.fontFamily,t=Tn(wn.value),n=Tn(Dn.value),r=En(),i=A(A({fontSize:`${yn.value}px`,lineHeight:`${xn.value}px`,tabSize:Sn.value,boxSizing:`border-box`,maxHeight:`${Kr()}px`,overflow:`auto`,paddingTop:`${Cn.value.top}px`,paddingBottom:`${Cn.value.bottom}px`},U.value||t==null||r?U.value||n==null?{}:{minHeight:`${n}px`}:{height:`${t}px`,minHeight:`${t}px`}),typeof e==`string`&&e.trim()?{"--markstream-code-font-family":e.trim()}:{});return i[`--markstream-pre-line-number-top`]=`${Cn.value.top}px`,i[`--markstream-code-padding-left`]=`calc(2ch + 2ch + 1ch + 2px + 1ch)`,i[`--markstream-pre-line-number-left`]=`0px`,i[`--markstream-pre-line-number-width`]=`2ch`,i[`--markstream-pre-line-number-padding-left`]=`2ch`,i[`--markstream-pre-line-number-padding-right`]=`1ch`,i[`--markstream-pre-line-number-separator-width`]=`2px`,U.value&&(i[`--markstream-pre-diff-line-height`]=`${xn.value}px`,i[`--markstream-pre-diff-pane-bottom-padding`]=(nn.value,`0px`),Object.assign(i,Nn(Ut.value))),i}),Fn=v(()=>Mn.value!=null&&(!K.value||jn()!=null)),In=v(()=>{let e=Mn.value;if(e==null)return null;if(U.value)return Math.ceil(e);let t=kn.value,n=wn.value;if(t==null||n==null)return Math.ceil(e);let r=Math.max(0,Math.ceil(t)-Math.ceil(n));return Math.ceil(e+r)}),Ln=v(()=>{if(U.value&&sn.value)return{};let e=Mn.value;return Fn.value&&e!=null?{minHeight:`${e}px`}:{}});function Rn(){var e,t,n,r;let i=E.value?.querySelector(`pre.code-pre-fallback`),a=H(),o=i?.scrollTop??0;(t=(e=(a?.getOriginalEditor)?.call(a))?.setScrollTop)==null||t.call(e,o),(r=(n=(a?.getModifiedEditor)?.call(a))?.setScrollTop)==null||r.call(n,o)}function zn(){return M(this,null,function*(){return U.value?(Sr()??Bn(),Z(!0),Rn(),Q(),Kt.value=!0,yield e(),Z(!0),yield Un(),Z(!0),!(St&&!(yield St())||(br(),Bn(),Z(!0),K.value=!0,yield e(),Bn(),Z(!0),br(),Q(),$(),0))):!(St&&!(yield St())||(K.value=!0,yield e(),X(!1),Z(),0))})}function Bn(){let e=T.value;return e&&Lr(e)?(Q(),X({preferModelDiffHeight:!0}),Mr(),Number.parseFloat(e.style.height||``)||null):Sr()}function Vn(){if(!U.value||!I.value||!K.value||sn.value)return!1;let e=T.value;return!!e&&vr(e)}function Hn(e,t=!1,n={}){let r=Math.ceil(e),i=jn();if(i==null)return r;let a=!0===n.allowBelowEstimatedFloor||Vn();return r>=i||a?((t||a)&&I.value&&(An.value=null),r):i}function Un(){return new Promise(e=>{let t=!1,n=null,r=null,i=()=>{t||(t=!0,r!=null&&globalThis.clearTimeout(r),n!=null&&pe(n),e())};r=globalThis.setTimeout(i,50),n=w(i)})}function Wn(){try{let e=T.value;if(!e)return null;let t=e.querySelector(`.view-lines .view-line`);if(t){let e=Math.ceil(t.getBoundingClientRect().height);if(e>0)return e}}catch{}return null}function Gn(){var e;try{let t=U.value?((e=H())?.getModifiedEditor)?.call(e)??H():V(),n=vt()?.EditorOption?.fontInfo;if(t&&n!=null){let e=t.getOption?.call(t,n)?.fontSize;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e}}catch{}try{let e=T.value;if(e){let t=e.querySelector(`.view-lines .view-line`);if(t)try{if(typeof window<`u`&&typeof window.getComputedStyle==`function`){let e=window.getComputedStyle(t).fontSize,n=e&&e.match(/^(\d+(?:\.\d+)?)/);if(n)return Number.parseFloat(n[1])}}catch{}}}catch{}return null}function Kn(e){try{let t=vt()?.EditorOption?.lineHeight;if(t!=null){let n=(e?.getOption)?.call(e,t);if(typeof n==`number`&&n>0)return n}}catch{}let t=Wn();if(t&&t>0)return t;let n=Number.isFinite(Y.value)&&Y.value>0?Y.value:14;return Math.max(12,Math.round(1.35*n))}function qn(e){try{let t=vt()?.EditorOption?.padding;if(t!=null){let n=(e?.getOption)?.call(e,t);if(typeof n?.top==`number`||typeof n?.bottom==`number`)return(typeof n?.top==`number`&&Number.isFinite(n.top)?Math.max(0,n.top):0)+(typeof n?.bottom==`number`&&Number.isFinite(n.bottom)?Math.max(0,n.bottom):0)}}catch{}let t=W.value?.padding;return typeof t?.top==`number`||typeof t?.bottom==`number`?(typeof t?.top==`number`&&Number.isFinite(t.top)?Math.max(0,t.top):0)+(typeof t?.bottom==`number`&&Number.isFinite(t.bottom)?Math.max(0,t.bottom):0):U.value?24:0}function Jn(e,t){return typeof e!=`number`||typeof t!=`number`||e<1||t=i&&o>=i&&n[a]===r[o];)a--,o--;let s=Math.max(0,a-i+1),c=Math.max(0,o-i+1);if(s===0||c===0)return{removed:s,added:c};if((s+1)*(c+1)<=15e5){let e=c+1,t=new Uint32Array(e),a=new Uint32Array(e);for(let e=s-1;e>=0;e--){a[c]=0;for(let o=c-1;o>=0;o--)a[o]=n[i+e]===r[i+o]?t[o+1]+1:Math.max(t[o],a[o+1]);let o=t;t=a,a=o}let o=t[0];return{removed:s-o,added:c-o}}return{removed:s,added:c}}function Zn(e){if(!function(){return!(!U.value||!nn.value)&&(m.node.originalCode!=null||m.node.updatedCode!=null?Xn(String(m.node.originalCode??``),String(m.node.updatedCode??``)).removed>0:String(m.node.code??``).split(/\r\n|\n|\r/).some(e=>function(e){return e.startsWith(`-`)&&!e.startsWith(`---`)}(e)))}())return!0;let t=e?.querySelector(`.stream-monaco-fallback-inline-delete-line`);if((t?.textContent)?.trim()&&(t.hasAttribute(`data-stream-monaco-colorize-signature`)||t.querySelector(`[class*="mtk"]`)))return!0;let n=e?.querySelector([`.editor.modified .view-zones .view-lines.line-delete`,`.editor.modified .view-lines .view-line.line-delete`,`.editor.original .view-zones .view-lines.line-delete`,`.editor.original .view-lines .view-line.line-delete`].join(`,`));if(!n||!n.matches(`.view-line`)&&!n.querySelector(`.view-line`))return!1;let r=n.getBoundingClientRect(),i=e?.getBoundingClientRect();return i?.width===0&&i.height===0||r.width>0&&r.height>0}function Qn(e,t){if(!e)return!1;let n=t.added<=0||!!e.querySelector([`.line-insert`,`.gutter-insert`,`.stream-monaco-fallback-line-insert`,`.stream-monaco-fallback-gutter-insert`,`.stream-monaco-fallback-line-number-insert`].join(`,`)),r=t.removed<=0||!!e.querySelector([`.line-delete`,`.gutter-delete`,`.inline-deleted-margin-view-zone`,`.stream-monaco-fallback-line-delete`,`.stream-monaco-fallback-gutter-delete`,`.stream-monaco-fallback-line-number-delete`,`.stream-monaco-fallback-inline-delete-line`,`.stream-monaco-fallback-inline-delete-margin`].join(`,`));return n&&r}function $n(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?typeof window>`u`||typeof window.getComputedStyle!=`function`?n:window.getComputedStyle(n).display===`none`?null:n:null}function er(e,t){return $n(e,t)!==null}function tr(e,t){if(!e)return!1;let n=t.added<=0||[`.gutter-insert`,`.stream-monaco-fallback-gutter-insert`].some(t=>er(e,t)),r=t.removed<=0||[`.gutter-delete`,`.inline-deleted-margin-view-zone`,`.stream-monaco-fallback-gutter-delete`,`.stream-monaco-fallback-inline-delete-margin`].some(t=>er(e,t));return n&&r}function nr(e){let t=Array.from(e?.querySelectorAll(`.monaco-diff-editor .margin-view-overlays .line-numbers`)??[]);return!!t.length&&t.some(e=>{if(!e.textContent?.trim())return!1;if(typeof window>`u`||typeof window.getComputedStyle!=`function`)return!0;let t=window.getComputedStyle(e);if(t.display===`none`)return!1;let n=e.getBoundingClientRect();if(n.width<=0&&n.height<=0)return!0;let r=Number.parseFloat(t.width||``),i=Number.parseFloat(t.paddingLeft||``),a=Number.parseFloat(t.paddingRight||``);return Math.max(n.width,Number.isFinite(r)?r:0)>=8&&Number.isFinite(i)&&i>=1&&Number.isFinite(a)&&a>=1})}function rr(e){let t=$n(e,`.monaco-diff-editor .view-lines .view-line`);if(!t)return!1;if(!cr())return!0;let n=$n(e,`.monaco-diff-editor .margin-view-overlays .line-numbers`);if(!n)return!1;if(typeof window>`u`||typeof window.getComputedStyle!=`function`)return!0;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(r.width<=0&&r.height<=0||i.width<=0&&i.height<=0)return!0;let a=r.left-i.right;return a>=0&&a<=32}function ir(e,t){return!nn.value||!(t||e?.querySelector([`.line-insert`,`.line-delete`,`.gutter-insert`,`.gutter-delete`,`.stream-monaco-line-number-insert`,`.stream-monaco-line-number-delete`,`.stream-monaco-line-insert-fill`,`.stream-monaco-line-delete-fill`,`.stream-monaco-fallback-line-insert`,`.stream-monaco-fallback-line-delete`,`.stream-monaco-fallback-inline-delete-line`].join(`,`)))||!!(e?.classList.contains(`stream-monaco-diff-inline-native-ready`)&&!e.classList.contains(`stream-monaco-diff-native-stale`))}function ar(e,t,n,r){let i=e?.querySelector(`.monaco-diff-editor .editor.${t}`);if(!i)return!1;let a=Array.from(i.querySelectorAll(`.margin-view-overlays .line-numbers.${n}`));if(!a.length)return!0;let o=Array.from(i.querySelectorAll(`.lines-content > .view-lines:not(.line-delete) > .view-line`));return!!o.length&&a.every(e=>{let t=e.getBoundingClientRect(),n=null;for(let e of o){let r=e.getBoundingClientRect(),i=Math.abs(r.top-t.top);(!n||i1.25||n.node.classList.contains(r)})}function or(e,t){if(!e)return!1;let n=t.added<=0||ar(e,`modified`,`stream-monaco-line-number-insert`,`stream-monaco-line-insert-fill`),r=t.removed<=0||(nn.value?!!e.classList.contains(`stream-monaco-diff-inline-native-ready`):ar(e,`original`,`stream-monaco-line-number-delete`,`stream-monaco-line-delete-fill`));return n&&r}function sr(e){if(Ve.value)return!0;if(!e)return!1;let t=Array.from(e.querySelectorAll(`.monaco-diff-editor .view-lines .view-line, .monaco-editor .view-lines .view-line`)).filter(e=>{if(!e.textContent?.trim())return!1;let t=e.getBoundingClientRect();return t.width>0||t.height>0});if(!t.length)return!1;let n=t.filter(e=>{var t;return t=e.textContent??``,/['"`{}()[\]:;=<>.,]|\/\/|\/\*|\b(?:async|await|class|const|enum|export|for|function|if|import|interface|let|return|switch|type|var|while)\b/.test(t.replace(/\u00A0/g,` `).trim())});return!n.length||n.filter(e=>Array.from(e.querySelectorAll(`span`)).filter(e=>e.textContent?.trim()).some(e=>String(e.className||``).split(/\s+/).some(e=>/^mtk\d+$/.test(e)&&e!==`mtk1`))).length>0}function cr(){return W.value?.lineNumbers!==`off`}function lr(){U.value?Nt.value=Xn(String(m.node.originalCode??``),String(m.node.updatedCode??``)):Nt.value={removed:0,added:0}}function ur(){if(U.value)try{let e=H(),t=(e?.getLineChanges)?.call(e);if(!Array.isArray(t))return void lr();let n=0,r=0;for(let e of t)n+=Jn(e.originalStartLineNumber,e.originalEndLineNumber),r+=Jn(e.modifiedStartLineNumber,e.modifiedEndLineNumber);Nt.value={removed:n,added:r}}catch{lr()}else Nt.value={removed:0,added:0}}function dr(){if(Number.isFinite(Y.value)&&Y.value>0&&Number.isFinite(J.value))return Y.value;let e=Gn();return typeof m.monacoOptions?.fontSize==`number`?(J.value=m.monacoOptions.fontSize,Y.value=m.monacoOptions.fontSize,Y.value):e&&e>0?(J.value=e,Y.value=e,e):(J.value=12,Y.value=12,12)}function fr(){let e=dr();Y.value=Math.min(36,e+1)}function pr(){let e=dr();Y.value=Math.max(10,e-1)}function mr(){dr(),Number.isFinite(J.value)&&(Y.value=J.value)}function hr(){var e,t,n,r,i;try{let a=U.value?H():null,o=U.value?a:V();if(!o)return null;if(a?.getOriginalEditor&&a?.getModifiedEditor){let i=a.getOriginalEditor?.call(a),o=a.getModifiedEditor?.call(a);(e=i?.layout)==null||e.call(i),(t=o?.layout)==null||t.call(o);let s=(i?.getContentHeight)?.call(i)||0,c=(o?.getContentHeight)?.call(o)||0,l=Math.max(s,c);if(l>0)return Math.ceil(l);let u=((n=(i?.getModel)?.call(i))?.getLineCount)?.call(n)||1,d=((r=(o?.getModel)?.call(o))?.getLineCount)?.call(r)||1,f=Math.max(u,d),p=Math.max(Kn(i),Kn(o)),m=Math.max(qn(i),qn(o));return Math.ceil(f*p+m+0)}if(o?.getContentHeight){(i=o?.layout)==null||i.call(o);let e=o.getContentHeight();if(e>0)return U.value||(Xt.value=!0),Math.ceil(e)}let s=(o?.getModel)?.call(o),c=1;s&&typeof s.getLineCount==`function`&&(c=s.getLineCount());let l=Kn(o);return Math.ceil(c*(l+1.5)+0)}catch{return null}}function gr(){var e;if(U.value)return!1;try{let t=((e=V())?.getContentHeight)?.call(e),n=typeof t==`number`&&Number.isFinite(t)&&t>0;return n&&(Xt.value=!0),n}catch{return!1}}function _r(e){if(typeof window>`u`)return null;try{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`)return null;let r=e.querySelector(`diffs-container`);if(r instanceof HTMLElement){let e=r.getBoundingClientRect();if(e.height>0&&e.bottom>t.top)return Math.ceil(e.bottom-t.top)}let i=[`.editor.original .view-lines .view-line`,`.editor.modified .view-lines .view-line`,`.editor.original .view-zones > div`,`.editor.modified .view-zones > div`,`.editor.original .margin-view-zones > div`,`.editor.modified .margin-view-zones > div`,`.editor.original .diff-hidden-lines`,`.editor.modified .diff-hidden-lines`,`.stream-monaco-diff-unchanged-bridge`],a=0;for(let n of Array.from(e.querySelectorAll(i.join(`,`)))){if(!(n instanceof HTMLElement)||(n.parentElement?.classList.contains(`view-zones`)||n.parentElement?.classList.contains(`margin-view-zones`))&&!(n.textContent?.trim()||n.matches(`.line-delete, .line-insert, .cdr`)||n.querySelector(`.diff-hidden-lines, .stream-monaco-diff-unchanged-bridge, .line-delete, .line-insert, .cdr`)))continue;let e=window.getComputedStyle(n);if(e.display===`none`||e.visibility===`hidden`||Number.parseFloat(e.opacity||`1`)<=.01)continue;let r=n.getBoundingClientRect();r.height<=0||r.bottom<=t.top||(a=Math.max(a,r.bottom-t.top))}return a>0?Math.ceil(a):null}catch{return null}}function vr(e){if(typeof window>`u`)return!1;let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;let n=e.querySelectorAll(`.editor.modified .diff-hidden-lines, .editor.original .diff-hidden-lines, .stream-monaco-diff-unchanged-bridge`);for(let e of Array.from(n)){if(!(e instanceof HTMLElement))continue;let n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`||Number.parseFloat(n.opacity||`1`)<=.01)continue;let r=e.getBoundingClientRect();if(!(r.width<=0||r.height<=0||r.bottom<=t.top||r.top>=t.bottom))return!0}return!1}function yr(e){let t=String(e??``).trim(),n=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i)?.[1];if(n){let e=n.length===3?n.split(``).map(e=>`${e}${e}`).join(``):n;return .2126*Number.parseInt(e.slice(0,2),16)+.7152*Number.parseInt(e.slice(2,4),16)+.0722*Number.parseInt(e.slice(4,6),16)}let r=t.match(/\d+(?:\.\d+)?/g);if(!r||r.length<3)return null;let[i,a,o]=r.slice(0,3).map(Number);return .2126*i+.7152*a+.0722*o}function br(){var e;if(xr())return;let t=Gn();t&&t>0&&(hn.value=t,Y.value=t,J.value=t);try{let t=Kn(U.value?((e=H())?.getModifiedEditor)?.call(e)??H():V());t&&t>0&&(gn.value=t)}catch{}try{let e=Wn();e&&e>0&&(gn.value=e)}catch{}}function xr(){return U.value&&cn.value}function Sr(){if(!U.value||!sn.value)return null;let e=T.value,t=E.value?.querySelector(`pre.code-pre-fallback`);if(!e||!t)return null;let n=Math.ceil(t.getBoundingClientRect().height);return!Number.isFinite(n)||n<=0?null:(e.style.height=`${n}px`,e.style.minHeight=`${n}px`,e.style.maxHeight=`${Math.ceil(Kr())}px`,e.style.overflow=`hidden`,n)}function Cr(){let e=T.value,t=E.value;if(!e||!t)return;let n=e,r=e.querySelector(`.monaco-editor`)||e,i=r.querySelector(`.monaco-editor-background`)||r,a=r.querySelector(`.view-lines`)||r,o=null,s=null,c=null;try{typeof window<`u`&&typeof window.getComputedStyle==`function`&&(o=window.getComputedStyle(r),s=i===r?o:window.getComputedStyle(i),c=a===r?o:window.getComputedStyle(a))}catch{o=null,s=null,c=null}let l=String(o?.getPropertyValue(`--vscode-editor-foreground`)??``).trim(),u=String(o?.getPropertyValue(`--vscode-editor-background`)??``).trim(),d=String(o?.getPropertyValue(`--vscode-editor-selectionBackground`)??o?.getPropertyValue(`--vscode-editor-hoverHighlightBackground`)??``).trim(),f=l||String(c?.color??o?.color??``).trim(),p=u||String(s?.backgroundColor??o?.backgroundColor??``).trim(),m=function(){var e;try{let t=U.value?((e=H())?.getModifiedEditor)?.call(e)??H():V(),n=vt()?.EditorOption?.fontInfo;if(t&&n!=null){let e=t.getOption?.call(t,n)?.typicalHalfwidthCharacterWidth;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e}}catch{}return null}();if(m!=null&&(_n.value=m),U.value){let e=(e,r)=>{r?(t.style.setProperty(e,r),n.style.setProperty(e,r)):(t.style.removeProperty(e),n.style.removeProperty(e))};for(let[n,r]of Object.entries(Nn(t.classList.contains(`is-dark`))))e(n,r);f?(t.style.setProperty(`--markstream-diff-editor-fg`,f),n.style.setProperty(`--vscode-editor-foreground`,f),n.style.setProperty(`--stream-monaco-editor-fg`,f)):(t.style.removeProperty(`--markstream-diff-editor-fg`),n.style.removeProperty(`--vscode-editor-foreground`),n.style.removeProperty(`--stream-monaco-editor-fg`)),p?(t.style.setProperty(`--markstream-diff-editor-bg`,p),t.style.setProperty(`--markstream-diff-panel-bg`,p),t.style.setProperty(`--markstream-diff-panel-bg-soft`,p),t.style.setProperty(`--markstream-diff-panel-bg-strong`,p),n.style.setProperty(`--vscode-editor-background`,p),n.style.setProperty(`--stream-monaco-editor-bg`,p),n.style.setProperty(`--stream-monaco-fixed-editor-bg`,p),n.style.setProperty(`--stream-monaco-panel-bg`,p),n.style.setProperty(`--stream-monaco-panel-bg-soft`,p),n.style.setProperty(`--stream-monaco-panel-bg-strong`,p),n.style.backgroundColor=p):(t.style.removeProperty(`--markstream-diff-editor-bg`),t.style.removeProperty(`--markstream-diff-panel-bg`),t.style.removeProperty(`--markstream-diff-panel-bg-soft`),t.style.removeProperty(`--markstream-diff-panel-bg-strong`),n.style.removeProperty(`--vscode-editor-background`),n.style.removeProperty(`--stream-monaco-editor-bg`),n.style.removeProperty(`--stream-monaco-fixed-editor-bg`),n.style.removeProperty(`--stream-monaco-panel-bg`),n.style.removeProperty(`--stream-monaco-panel-bg-soft`),n.style.removeProperty(`--stream-monaco-panel-bg-strong`),n.style.backgroundColor=``),d?n.style.setProperty(`--vscode-editor-selectionBackground`,d):n.style.removeProperty(`--vscode-editor-selectionBackground`);return}if(function(e,t,n){if(!Ve.value)return!1;let r=yr(e),i=yr(t);return n?r!=null&&r>170||i!=null&&i<110:r!=null&&r<85||i!=null&&i>190}(p,f,t.classList.contains(`is-dark`)))return n.style.removeProperty(`--vscode-editor-foreground`),n.style.removeProperty(`--vscode-editor-background`),void n.style.removeProperty(`--vscode-editor-selectionBackground`);f&&n.style.setProperty(`--vscode-editor-foreground`,f),p&&n.style.setProperty(`--vscode-editor-background`,p),d&&n.style.setProperty(`--vscode-editor-selectionBackground`,d)}let wr=0,Tr=0,Er=/auto|scroll|overlay/i;function Dr(e,t,n){if(typeof window>`u`||U.value||function(e){return on.value||an(e)}(e))return;let r=Math.ceil(n)-Math.ceil(t);if(Math.abs(r)<=1)return;let i=function(e){if(typeof window>`u`)return null;let t=e?.ownerDocument??document,n=t.scrollingElement||t.documentElement||t.body,r=e?.parentElement??null;for(;r&&r!==t.body&&r!==n;){let e=window.getComputedStyle(r),t=(e.overflowY||``).toLowerCase(),n=(e.overflow||``).toLowerCase();if(Er.test(t)||Er.test(n))return r;r=r.parentElement}return n}(e);if(!i)return;let a=e.ownerDocument??document,o=i===a.body||i===a.documentElement||i===a.scrollingElement,s=o?0:i.getBoundingClientRect().top;e.getBoundingClientRect().top-s>=0||(o&&typeof window.scrollBy==`function`?window.scrollBy(0,r):i.scrollTop+=r)}function Or(){try{let e=T.value;if(!e)return;let t=e.getBoundingClientRect().height,n=hr();if(n!=null&&n>0){let r=Hn(n,!0,{allowBelowEstimatedFloor:!U.value&&I.value&&gr()}),i=jn();e.style.minHeight=i==null?`0px`:`${i}px`,e.style.height=`${r}px`,e.style.maxHeight=`none`,e.style.overflow=`visible`,Dr(e,t,r);return}let r=jn();r!=null&&(e.style.minHeight=`${r}px`,e.style.height=`${r}px`,e.style.maxHeight=`none`,e.style.overflow=`visible`,Dr(e,t,r))}catch{}}function kr(){for(var e,t;At.length>0;)try{(t=(e=At.pop())?.dispose)==null||t.call(e)}catch{}Ue!=null&&(pe(Ue),Ue=null),We!=null&&(pe(We),We=null),Ge!=null&&(pe(Ge),Ge=null),Ke=0,qe=!1}function Ar(){for(var e;jt.length>0;)try{(e=jt.pop())==null||e()}catch{}}function X(e=!1){N.value||(k.value?Or():function(e={}){try{let t=T.value;if(!t)return;let n=t.getBoundingClientRect().height,r=Kr(),i=Math.ceil(t.getBoundingClientRect?.call(t).height||0),a=Number.parseFloat(t.style.height||``),o=i>0?i:Number.isFinite(a)&&a>0?Math.ceil(a):0,s=U.value?function(){var e,t;if(Vr())return null;try{let n=H(),r=(n?.getOriginalEditor)?.call(n),i=(n?.getModifiedEditor)?.call(n);if(!r||!i)return null;let a=((e=r.getModel?.call(r))?.getLineCount)?.call(e)||1,o=((t=i.getModel?.call(i))?.getLineCount)?.call(t)||1,s=Math.max(a,o),c=Math.max(Kn(r),Kn(i)),l=Math.max(qn(r),qn(i)),u=Math.max(r.getContentHeight?.call(r)??0,i.getContentHeight?.call(i)??0);return Math.ceil(Math.max(u,s*c+l+0))}catch{return null}}():null,c=U.value&&vr(t),l=U.value&&Lr(t),u=U.value&&t.classList.contains(`stream-monaco-diff-native-stale`),d=c&&I.value&&K.value&&!sn.value;if(c||(R.value=null),Ze>0&&(Ze--,Ye.value!=null))return void Dr(t,n,Nr(t,Ye.value,r,{allowBelowEstimatedFloor:d,preserveScrollableOverflow:Fr(t)}));if(U.value&&!l&&!c&&sn.value){let e=Sr();if(e!=null){let i=Nr(t,e,r,{allowBelowEstimatedFloor:!0});Z(!0),Dr(t,n,i);return}}let f=U.value&&!0===e.preferModelDiffHeight,p=U.value?_r(t):null,h=p,g=!U.value&&I.value&&gr(),_=U.value&&!1!==m.loading&&(h!=null||s!=null&&i>0&&s0&&s0&&s0?o:null:s;else v=hr();if(U.value&&!1===m.loading&&u&&!d&&v!=null&&s!=null&&(v=Math.min(v,s)),U.value&&v!=null&&o>0&&(!1!==m.loading||!1===m.loading&&u&&!d||!0===e.holdCurrentDiffHeight&&!d)&&(v=Math.max(v,o)),v!=null&&v>0){let e=c&&R.value!=null,a=c&&i>0&&i=r-1,o=Nr(t,e?Math.max(R.value,v):a?i:v,r,{clearEstimatedFloor:!0,allowBelowEstimatedFloor:d||g||_,preserveScrollableOverflow:Fr(t)});c&&o0?s:0);if(te>0){let e=c&&R.value!=null,a=c&&i>0&&i=r-1,o=Nr(t,e?Math.max(R.value,te):a?i:te,r,{allowBelowEstimatedFloor:d});c&&o0?Dr(t,n,Nr(t,b,r,{allowBelowEstimatedFloor:d})):U.value||Dr(t,n,Nr(t,r,r))}catch{}}(typeof e==`object`?e:{}))}function jr(){wr=0,Tr=0}function Z(e=!1){if(N.value)return;let t=T.value;if(!t)return;let n=U.value?H():V();if(n&&typeof n.layout==`function`)try{let r=t.getBoundingClientRect?.call(t),i=Math.ceil((r?.width??0)||t.clientWidth||0),a=Math.ceil((r?.height??0)||t.clientHeight||Number.parseFloat(t.style.height||``)||0);if(i>0&&a>0){if(!e&&i===wr&&a===Tr)return;wr=i,Tr=a,n.layout({width:i,height:a})}else jr(),n.layout()}catch{}}function Q(){if(!U.value)return void Ar();let e=T.value;if(!e)return void Ar();let t=e.querySelector(`.monaco-diff-editor`);if(!t||t.classList.contains(`side-by-side`))return void Ar();let n=Array.from(t.querySelectorAll(`.editor.original .diff-hidden-lines`)),r=Array.from(t.querySelectorAll(`.editor.modified .diff-hidden-lines`)),i=Math.min(n.length,r.length);for(let e=0;e div:first-child`),a=t.querySelector(`.center`);if(!n||!i||!a||a.querySelector(`.markstream-inline-fold-proxy`))continue;let o=document.createElement(`button`);o.type=`button`,o.className=`markstream-inline-fold-proxy`,o.dataset.markstreamInlineFoldProxy=`true`;let s=n.getAttribute(`title`)||`Show Unchanged Region`;o.title=s,o.setAttribute(`aria-label`,s);let c=e=>{e.preventDefault(),e.stopPropagation()},l=e=>{e.preventDefault(),e.stopPropagation(),n.click(),w(()=>$())},u=e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),e.stopPropagation(),n.click(),w(()=>$()))};o.addEventListener(`mousedown`,c),o.addEventListener(`click`,l),o.addEventListener(`keydown`,u),a.appendChild(o),jt.push(()=>{o.removeEventListener(`mousedown`,c),o.removeEventListener(`click`,l),o.removeEventListener(`keydown`,u),o.parentElement===a&&a.removeChild(o)})}}function $(e=!1){if(L||Ue!=null)return;let t=()=>{L||(Q(),X(e),Z())};Ue=w(()=>{Ue=null,t(),We=w(()=>{We=null,t()})}),Mr()}function Mr(e=!1){if(!U.value||L||!e&&!1===m.loading||(qe||=e,Ke=Math.max(Ke,e?18:6),Ge!=null))return;let t=()=>{if(Ge=null,!U.value||L||Ke<=0||!qe&&!1===m.loading)return Ke=0,void(qe=!1);Ke--,Q(),X({preferModelDiffHeight:!0,holdCurrentDiffHeight:qe}),Z(),Ke>0?Ge=w(t):qe=!1};Ge=w(t)}function Nr(e,t,n,r={}){let i=U.value&&!1!==m.loading?_r(e):null,a=i!=null&&i>t+1?i:t,o=Math.min(a,n),s=!0===r.allowBelowEstimatedFloor||Vn(),c=Hn(o,!0===r.clearEstimatedFloor,{allowBelowEstimatedFloor:s}),l=jn();if(e.style.minHeight=l==null||s?`0px`:`${Math.min(l,Math.ceil(n))}px`,e.style.height=`${c}px`,e.style.maxHeight=`${Math.ceil(n)}px`,U.value)e.style.overflow=`hidden`;else{let i=!0===r.preserveScrollableOverflow||t>n+1;e.style.overflow=i?`auto`:`hidden`}return c}function Pr(e,t=0){let n=Math.ceil(e.getBoundingClientRect?.call(e).height||0),r=Math.max(t,e.clientHeight||0,n);return r>0&&e.scrollHeight>r+1}function Fr(e){return!U.value&&(Qe||Pr(e,Ye.value??0))}function Ir(e){var t,n,r,i;if(!U.value)return;let a=k.value||!vr(e)||e.getBoundingClientRect().height>=Kr()-1;if(Xe===a)return;Xe=a;let o=j(A({},m.monacoOptions?.scrollbar??{}),{handleMouseWheel:a}),s=H();try{(n=(t=(s?.getOriginalEditor)?.call(s))?.updateOptions)==null||n.call(t,{scrollbar:o}),(i=(r=(s?.getModifiedEditor)?.call(s))?.updateOptions)==null||i.call(r,{scrollbar:o})}catch{}}function Lr(e=T.value){return!!Vr(e)||!!e?.querySelector(`.monaco-diff-editor .view-lines .view-line`)}function Rr(e=T.value){return!!Vr(e)||!!e?.querySelector(`.monaco-editor .view-lines .view-line`)}function zr(){var e;if(Vr())return!0;let t=((e=V())?.getModel)?.call(e);return typeof t?.getValue==`function`&&t.getValue()===pn.value}function Br(e=T.value){return!!Vr(e)||!!e?.classList.contains(`stream-monaco-diff-root`)&&!(nn.value&&!e.classList.contains(`stream-monaco-diff-inline`))}function Vr(e=T.value){return!!e?.querySelector(`diffs-container`)}function Hr(e){return!1!==m.loading||K.value||e.classList.contains(`stream-monaco-diff-native-stale`)||vr(e)}function Ur(){let e=H();return typeof e?.getOriginalEditor==`function`||typeof e?.getModifiedEditor==`function`||typeof e?.getLineChanges==`function`}function Wr(){return M(this,arguments,function*(t={}){if(!U.value)return!0;if(Vr())return yield e(),yield Un(),Vr();let n=!1!==t.requireHighlight,r=0,i=Lt(String(m.node.originalCode??``),String(m.node.updatedCode??``)),a=Xn(i.original,i.updated),o=a.added>0||a.removed>0,s=()=>{let e=Lt(String(m.node.originalCode??``),String(m.node.updatedCode??``));e.original===i.original&&e.updated===i.updated||(i=e,a=Xn(i.original,i.updated),o=a.added>0||a.removed>0)};for(let t=0;t<30;t++){if(L)return!1;s();let t=T.value,i=H(),c=cr(),l=!1;try{let e=(i?.getLineChanges)?.call(i);l=Array.isArray(e)&&(!o||e.length>0)}catch{l=!1}let u=!!t?.querySelector(`.monaco-diff-editor`),d=Lr(t),f=!o||Qn(t,a),p=!o||tr(t,a),m=!c||nr(t);if(u&&d&&l&&f&&p&&m&&Zn(t)){try{Bt(),Q(),ur(),$()}catch{}if(yield e(),yield Un(),L)return!1;let t=T.value,i=!cr()||nr(t),s=!o||Qn(t,a),c=!o||tr(t,a),l=ir(t,o),u=or(t,a),d=!n||sr(t),f=Br(t)&&i&&rr(t)&&s&&c&&l&&u&&d,p=Br(t)&&i&&rr(t)&&s&&c&&Zn(t)&&d;if(f||p){if(r++,r>=2)return!0}else r=0}yield e(),yield Un()}return L||(Bt(),Q(),ur(),$(),s()),!1})}function Gr(t,n,r){return M(this,null,function*(){try{yield _t(t,n,r);return}catch(e){if(!zt(e))throw e}if(yield e(),yield Un(),!L&&U.value)try{yield _t(t,n,r)}catch(e){if(!zt(e))throw e}})}function Kr(){let e=m.monacoOptions?.MAX_HEIGHT??500;if(typeof e==`number`)return e;let t=String(e).match(/^(\d+(?:\.\d+)?)/);return t?Number.parseFloat(t[1]):500}let qr=v(()=>m.isShowPreview&&(D.value===`html`||D.value===`svg`));function Jr(){return typeof m.node.loading==`boolean`?m.node.loading:!0===m.loading}function Yr(){if(!Jr())return!0;let e=String(m.node.raw??``),t=e.split(/\r\n|\n|\r/,1)[0]?.trimStart()??``;return!/^(?:`{3,}|~{3,})/.test(t)||/\r\n|\n|\r/.test(e)}function Xr(e,t,n){return!n||Yr()&&String(t??``)?ve(String(e??``)):`plain`}function Zr(){return Jr()}let Qr=null,$r=!1,ei=0;function ti(){Qr=null,ei++}function ni(){return M(this,arguments,function*(t=ei){if(!$r){$r=!0;try{for(;Qr&&!L&&!U.value&&t===ei;){let t=Qr;Qr=null;try{yield Promise.resolve(gt(t.code,t.language)),yield e(),L||U.value||(X(!1),Z())}catch{}}}finally{$r=!1,!Qr||L||U.value||ni()}}})}function ri(e,t){Qr={code:e,language:t},ni(ei)}t(()=>[m.node.language,m.node.code,m.node.raw,m.node.loading,m.loading],([e,t,n,r,i])=>{D.value=Xr(e,t,typeof r==`boolean`?r:!0===i)}),t(()=>[m.node.originalCode,m.node.updatedCode,U.value],()=>{R.value=null,lr(),w(()=>ur())},{immediate:!0});let ii=0;t(()=>[m.node.originalCode,m.node.updatedCode,O.value,U.value,m.stream],t=>M(null,[t],function*([,,,t,n]){let r=++ii;if(!t||Jr()||!1===n&&!P.value)return;if(!1!==n&&B&&!P.value&&T.value)try{yield vi(T.value)}catch{}let i=wt;if(i&&!F.value){try{yield i}catch{}if(L||!U.value||r!==ii)return}if(r!==ii)return;let a=Lt(String(m.node.originalCode??``),String(m.node.updatedCode??``)),o=!1===m.loading;o&&ki();try{if(yield Gr(a.original,a.updated,O.value),L||!U.value||r!==ii)return;yield e(),Z(!0),Q(),X(!1===m.loading||{preferModelDiffHeight:!0}),Z(!0),$(!0)}catch{return}if(o){if(L||!U.value)return;Bt(),Q(),ur(),$(),Mr(!0)}k.value&&w(()=>Or())})),t(()=>m.node.code,e=>M(null,null,function*(){if(Jr()||!1===m.stream||(D.value||=ve(Et(e)),U.value))return;let t=wt;if(t&&!F.value){try{yield t}catch{}if(L||U.value)return}if(B&&!P.value&&T.value)try{yield vi(T.value)}catch{}ri(Rt(m.node.code),O.value),k.value&&w(()=>Or())}));let ai=v(()=>{let e=D.value;return e?_e[e]||e.charAt(0).toUpperCase()+e.slice(1):_e[``]||`Plain Text`}),oi=v(()=>de(String(m.node.raw??``),ai.value,U.value)),si=v(()=>oi.value.title),ci=v(()=>oi.value.caption),li=v(()=>(fe.value,function(e,t){if(t===void 0)return De(e);if(t){let n=t(e);if(n!=null&&n!==``)return n}return he(ve(e))||le()}(D.value||``,be))),ui=v(()=>{let e={};e[`--markstream-code-layout-character-width`]=_n.value==null?`1ch`:`${_n.value}px`;let t=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},n=t(m.minWidth),r=t(m.maxWidth);if(n&&(e.minWidth=n),r&&(e.maxWidth=r),Fn.value&&!U.value&&!N.value){let t=In.value;t!=null&&(e.minHeight=`${t}px`)}return U.value||(e.color=`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))`,e.backgroundColor=`var(--vscode-editor-background, var(--markstream-code-fallback-bg))`,e.borderColor=`var(--markstream-code-border-color)`),e}),di=v(()=>!1!==m.showTooltips);function fi(){return M(this,null,function*(){try{typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(m.node.code)),ze.value=!0,te(`copy`,m.node.code),setTimeout(()=>{ze.value=!1},1e3)}catch(e){console.error(`复制失败:`,e)}})}function pi(){k.value=!k.value;let e=U.value?H():V(),t=T.value;e&&t&&(k.value?(gi(!0),t.style.maxHeight=`none`,t.style.overflow=`visible`,X(!0)):(gi(!1),t.style.overflow=U.value?`hidden`:`auto`,X(!0)),Ir(t))}function mi(){var t;if(N.value=!N.value,N.value){if(Qe=!1,T.value){let e=Math.ceil((t=T.value).getBoundingClientRect?.call(t).height||0);Qe=!U.value&&(Pr(T.value,e)||T.value.style.overflow===`auto`||T.value.style.overflowY===`auto`),e>0&&(Ye.value=e)}gi(!1)}else k.value&&gi(!0),T.value&&Ye.value!=null&&(T.value.style.height=`${Ye.value}px`),Ze=2,e(()=>{N.value||L||(X(!0),Z(!0))})}function hi(){if(!qr.value)return;let e=D.value;if(Ie.value){let t=e===`html`?`text/html`:`image/svg+xml`,n=e===`html`?Le(`artifacts.htmlPreviewTitle`)||`HTML Preview`:Le(`artifacts.svgPreviewTitle`)||`SVG Preview`;te(`previewCode`,{node:m.node,artifactType:t,artifactTitle:n,id:`temp-${e}-${Date.now()}`});return}e===`html`&&(fn.value=!fn.value)}function gi(e){var t,n;try{if(U.value){let n=H();(t=n?.updateOptions)==null||t.call(n,{automaticLayout:e})}else{let t=V();(n=t?.updateOptions)==null||n.call(t,{automaticLayout:e})}}catch{}}function _i(t){return M(this,null,function*(){if(!B||L)return;let n=Wt.value;if(en=!1,q.value=!1,qt.value=null,F.value=!1,K.value=!1,Kt.value=!1,Xe=null,hn.value=null,gn.value=null,_n.value=null,function(){let e=function(){let e=T.value?.parentElement;return e instanceof HTMLElement?e:null}();e&&(e.style.removeProperty(`--stream-monaco-line-number-left`),e.style.removeProperty(`--stream-monaco-line-number-width`),e.style.removeProperty(`--stream-monaco-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-original-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-modified-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-original-scrollable-left`),e.style.removeProperty(`--stream-monaco-modified-scrollable-left`))}(),jr(),function(){Xt.value=!1;let e=On.value;An.value=I.value||e==null?null:e}(),kr(),Ar(),function(e){e.replaceChildren()}(t),ki(),L)return;let r=M(null,null,function*(){if(n===`diff`){(function(){if(Ot||typeof window>`u`)return;Ot=!0;let e=e=>{zt(`reason`in e?e.reason:e.error??e.message)&&(e.preventDefault(),e.stopImmediatePropagation())};window.addEventListener(`error`,e,!0),window.addEventListener(`unhandledrejection`,e,!0),kt=()=>{window.removeEventListener(`error`,e,!0),window.removeEventListener(`unhandledrejection`,e,!0),Ot=!1,kt=null}})(),bt();let e=Lt(String(m.node.originalCode??``),String(m.node.updatedCode??``));ht?yield Pe(()=>ht(t,e.original,e.updated,O.value)):yield Pe(()=>B(t,m.node.code,O.value))}else yield Pe(()=>B(t,pn.value,O.value));F.value=!0}).finally(()=>{wt===r&&(wt=null)});if(wt=r,yield function(t){return M(this,null,function*(){if(!U.value)return void(yield t);let n,r=!1;for(t.then(()=>{r=!0},e=>{r=!0,n=e});;){if(L)return;if(r){if(n)throw n;return}if(Lr()&&Ur())return;yield e(),yield Un()}})}(r),L||Wt.value!==n)return;F.value=!0;let i=n===`diff`?H():V();if(typeof m.monacoOptions?.fontSize==`number`)i?.updateOptions({fontSize:m.monacoOptions.fontSize,automaticLayout:!1}),J.value=m.monacoOptions.fontSize,Y.value=m.monacoOptions.fontSize;else if(!xr()){let e=Gn();e&&e>0?(J.value=e,Y.value=e):(J.value=12,Y.value=12)}br(),yield Ti(),k.value||N.value||X(!1),I.value=!0,Gt.value=n,function(){if(kr(),U.value){let e=H(),t=(e?.getOriginalEditor)?.call(e),n=(e?.getModifiedEditor)?.call(e),r=(e,t)=>{try{let n=e?.[t];if(typeof n!=`function`)return;let r=n.call(e,()=>$());r&&At.push(r)}catch{}};try{let t=(e?.onDidUpdateDiff)?.call(e,()=>{$(),w(()=>ur())});t&&At.push(t)}catch{}r(t,`onDidContentSizeChange`),r(n,`onDidContentSizeChange`);let i=T.value;if(i&&typeof MutationObserver<`u`){let e=[`.view-line`,`.view-lines`,`.view-zones`,`.margin-view-zones`,`.diff-hidden-lines`,`.stream-monaco-diff-unchanged-bridge`,`.stream-monaco-fallback-inline-delete-zone`,`.stream-monaco-fallback-inline-delete-margin`].join(`,`),t=t=>{let n=t instanceof HTMLElement?t:t.parentElement;return!!(n?.closest)?.call(n,e)},n=t=>{let n=t instanceof HTMLElement?t:t.parentElement;return!!((n?.closest)?.call(n,e)||(n?.querySelector)?.call(n,e))},r=new MutationObserver(e=>{U.value&&Hr(i)&&e.some(e=>t(e.target)||Array.from(e.addedNodes).some(n)||Array.from(e.removedNodes).some(t))&&(Q(),X({preferModelDiffHeight:!0}),Z(),Mr())});r.observe(i,{attributeFilter:[`class`],attributes:!0,childList:!0,characterData:!0,subtree:!0}),At.push({dispose:()=>r.disconnect()})}if(i){let e=e=>{if(!(e.target instanceof Element?e.target:null)?.closest([`.stream-monaco-unchanged-summary`,`.stream-monaco-unchanged-reveal`,`.stream-monaco-unchanged-expand`,`.markstream-inline-fold-proxy`,`.diff-hidden-lines .center`].join(`,`)))return;let t=Math.ceil(i.getBoundingClientRect().height||0);t>0&&(R.value=t)};i.addEventListener(`click`,e,!0),At.push({dispose:()=>i.removeEventListener(`click`,e,!0)})}if(i&&typeof ResizeObserver<`u`){let e=new ResizeObserver(()=>{if(!U.value||(Z(),!Hr(i)))return;let e=_r(i);if(e==null)return;let t=Math.ceil(i.getBoundingClientRect().height||0),n=R.value;if(vr(i)&&n!=null){if(t>n+1)R.value=t;else if(te.disconnect()})}return}let e=V();try{let t=(e?.onDidContentSizeChange)?.call(e,()=>$());t&&At.push(t)}catch{}try{let t=(e?.onDidLayoutChange)?.call(e,()=>$());t&&At.push(t)}catch{}}(),Cr(),br(),Q(),ur(),$(),yield e();let a=null;St&&(a=yield St(),a&&(yield e(),yield Un()));let o=a??(n===`diff`?yield Wr({requireHighlight:!0}):yield function(){return M(this,null,function*(){if(Vr())return yield e(),yield Un(),Vr();for(let t=0;t<30;t++){if(L||U.value)return!1;let t=T.value,n=zr(),r=Rr(t),i=!pn.value.trim()||sr(t);if(n&&r&&i&&(yield e(),yield Un(),!L&&!U.value&&zr()&&Rr(T.value)&&(!pn.value.trim()||sr(T.value))))return!0;yield e(),yield Un()}return!1})}());L||(o?(br(),Bn(),(yield zn())||Ii()):Ii())})}function vi(t,n={}){if(!B||L||!1===m.stream&&!1!==m.loading||(Pi(),Fi())||G.value||T.value!==t||Zr())return null;if(Ct)return Ct;if(P.value&&I.value)return Promise.resolve();let r=Mi(),i=Jt.value,a=!1;P.value=!0,function(){let e=Te.value;C&&e&&Je!==e&&(Je&&C.markSettled(Je),Je=e,C.markPending(e))}();let o=M(null,null,function*(){try{yield _i(t),Zt=null}catch(e){let t=Mi(),o=i!==Jt.value,s=!1!==n.allowStaleContentRetry&&o&&Zt!==t;if(r!==t||s)return s&&(Zt=t),a=!0,P.value=!1,I.value=!1,F.value=!1,void(K.value=!1);throw Ii(r),e}}).finally(()=>{Ct===o&&(Ct=null),function(){let t=Je;C&&t&&(Je=``,e(()=>{if(!L){let e=E.value?.offsetHeight??0;e>0&&C.reportHeight(t,e)}C.markSettled(t)}))}(),a&&!L&&queueMicrotask(()=>{var e;let t=T.value;t&&!L&&((e=vi(t))==null||e.catch(e=>{I.value=!1,K.value=!1,Ii()}))})});return Ct=o,o}t(di,e=>{e||Ee()}),t(()=>Y.value,(e,t)=>{let n=U.value?H():V();n&&typeof e==`number`&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),N.value||X(!0))},{flush:`post`,immediate:!1});let yi=0,bi=t(()=>[T.value,U.value,m.stream,m.loading,He.value,z.value,m.node.language,m.node.raw,m.node.code,m.node.loading],e=>M(null,[e],function*([e,t,n,r,i,a]){let o=++yi;if(!e||!a||Jr()||Qt||!1===n&&!1!==r||!B&&(yield function(){return M(this,null,function*(){if(typeof window>`u`||L||He.value||G.value)return;if(Tt)return Tt;let e=M(null,null,function*(){try{let e=yield Re();if(L)return;if(!e)return void(G.value=!0);let t=e.useMonaco,n=e.detectLanguage;if(typeof n==`function`&&(Et=n),typeof t!=`function`)return;Mt=Oi();let r=t(Mt);B=r.createEditor||B,ht=r.createDiffEditor||ht,gt=r.updateCode||gt,_t=r.updateDiff||_t,vt=r.getEditor||vt,V=r.getEditorView||V,H=r.getDiffEditorView||H,yt=r.cleanupEditor||yt,bt=r.safeClean||r.cleanupEditor||bt,xt=r.refreshDiffPresentation||xt,Dt=r.setTheme||Dt,St=r.whenVisualReady||null,He.value=!0}catch{if(L)return;G.value=!0}}).finally(()=>{Tt===e&&(Tt=null)});return Tt=e,e})}(),o!==yi||!1===m.stream&&!1!==m.loading||Zr()||!z.value||!B||G.value||P.value||Fi()||L||T.value!==e)||Zr())return;let s=vi(e);if(s){try{yield s}catch{I.value=!1,K.value=!1,Ii()}I.value&&K.value&&bi()}}));function xi(e){return!!e&&typeof e==`object`&&`light`in e&&`dark`in e}function Si(e){return typeof e==`string`?e:e&&typeof e==`object`&&`name`in e?String(e.name):null}function Ci(e,t){if(e===t)return!0;let n=Si(e),r=Si(t);return!!n&&n===r}function wi(){let e=function(){if(m.theme!==void 0){let e=m.theme;return xi(e)?m.isDark?e.dark:e.light:e}return m.isDark?m.darkTheme:m.lightTheme}(),t=W.value?.theme,n=e??t;if(typeof n==`object`&&n)return n;let r=Array.isArray(m.themes)?m.themes:[];if(!r.length||n==null)return n;let i=Si(n),a=r.map(e=>Si(e)).filter(e=>!!e);if(!i||a.includes(i))return n;let o=Si(t);return t!=null&&o&&a.includes(o)?t:r[0]}function Ti(){return M(this,arguments,function*(e={}){ki();let t=()=>{U.value&&Bt(),w(()=>{Cr(),$()})};if(e.appearanceOnly)return void t();let n=wi();if(n)try{yield Dt(n),t()}catch{}else t()})}function Ei(e,t){if(typeof t!=`string`)return;let n=ve(t),r=ye(n),i=[`plain`,`objectivec`,`objectivecpp`].includes(n)?r:n;for(let t of[i,r])t&&!e.includes(t)&&e.push(t)}t(Wt,(t,n)=>M(null,null,function*(){if(t===n||q.value||Qt||(ti(),!B||!T.value)||!P.value||!1===m.stream&&!1!==m.loading||!z.value)return;let r=Ct;if(r){try{yield r}catch{}if(L||!T.value)return}if(Gt.value!==t||!P.value||!I.value)try{I.value=!1,K.value=!1,P.value=!1,F.value=!1,kr(),Ar(),bt(),yield e(),yield vi(T.value)}catch{I.value=!1,K.value=!1,Ii()}}));let Di=v(()=>{let e=[],t=W.value?.languages;if(Array.isArray(t))for(let n of t)Ei(e,n);return Yr()&&Ei(e,m.node.language),Ei(e,D.value),Ei(e,O.value),Ei(e,`plaintext`),e});function Oi(){let e=j(A(j(A({wordWrap:`on`,wrappingIndent:`same`,themes:m.themes},W.value||{}),{languages:Di.value,stream:!1,fontSize:yn.value,lineHeight:xn.value,theme:wi(),disableFileHeader:!0}),U.value?{diffAppearance:Ht.value}:{}),{onThemeChange(){Cr()}}),t=function(){let e=W.value?.fontFamily;return typeof e==`string`&&e.trim()?e.trim():U.value?function(){if(typeof window>`u`)return;let e=E.value?.querySelector(`pre.code-pre-fallback`);if(e)return window.getComputedStyle(e).fontFamily.trim()||void 0}():void 0}();if(t&&(e.fontFamily??=t),U.value){e.wordWrap=tn.value?`on`:`off`;let t=typeof e.unsafeCSS==`string`?`${e.unsafeCSS}\n`:``,n=function(){let e=rn.value;if(!1===e||typeof e==`object`&&!1===e.enabled)return null;let t=typeof e==`object`?e:ue,n=Math.max(0,Math.floor(t.contextLineCount??2));return{contextLineCount:n,collapsedContextThreshold:n+Math.max(1,Math.floor(t.minimumLineCount??4))-1}}();e.unsafeCSS=`${t}\npre { column-gap: 0; }\npre > code { column-gap: 0; padding-block: 0; }\n[data-separator="line-info"] { margin-top: 0; }\n`,n?(e.parseDiffOptions=j(A({},e.parseDiffOptions),{context:n.contextLineCount}),e.collapsedContextThreshold=n.collapsedContextThreshold,e.expandUnchanged=!1,e.hunkSeparators=`line-info`,e.unsafeCSS+=`[data-separator="line-info"][data-separator-last] { height: 28px; } `):(e.expandUnchanged=!0,e.hunkSeparators=`simple`)}return e}function ki(){let e=Oi();if(!Mt)return Mt=e,Mt;for(let t of Object.keys(Mt))t in e||delete Mt[t];return Object.assign(Mt,e),Mt}let Ai=v(()=>{var e,t,n,r,i;return JSON.stringify({diffLineStyle:W.value?.diffLineStyle??`background`,diffUnchangedRegionStyle:W.value?.diffUnchangedRegionStyle??`line-info`,diffHideUnchangedRegions:m.monacoOptions?.diffHideUnchangedRegions===void 0?A({},ue):we(m.monacoOptions.diffHideUnchangedRegions),renderSideBySide:(e=W.value?.renderSideBySide)==null||e,useInlineViewWhenSpaceIsLimited:(t=W.value?.useInlineViewWhenSpaceIsLimited)!=null&&t,enableSplitViewResizing:(n=W.value?.enableSplitViewResizing)==null||n,ignoreTrimWhitespace:(r=W.value?.ignoreTrimWhitespace)==null||r,originalEditable:(i=W.value?.originalEditable)!=null&&i})}),ji=y(0);function Mi(){let e=wi();return JSON.stringify({kind:Wt.value,language:O.value,structural:Ai.value,optionsRevision:ji.value,settledContentGeneration:Yt.value,theme:Si(e)??(e==null?null:`custom`),isDark:m.isDark})}t(()=>[m.monacoOptions,m.theme,m.themes,m.lightTheme,m.darkTheme],()=>{ji.value+=1},{deep:!0}),t(()=>[pn.value,m.node.originalCode,m.node.updatedCode],()=>{Jt.value+=1,Jr()||(Yt.value+=1)});let Ni=v(()=>Mi());function Pi(){q.value&&qt.value!==Ni.value&&(q.value=!1,qt.value=null,Zt=null,$t=null,P.value=!1,I.value=!1,F.value=!1,K.value=!1,Kt.value=!1)}function Fi(){return Pi(),q.value&&qt.value===Ni.value}function Ii(e=Ni.value){qt.value=e,q.value=!0,Kt.value=!1}return t(Ni,()=>M(null,null,function*(){if(Qt||!q.value||qt.value===Ni.value||!B||!T.value||G.value||L||!z.value||!1===m.stream&&!1!==m.loading||Zr())return;let t=Ni.value;Qt=!0;try{if(Pi(),q.value)return;yield vi(T.value)}catch{I.value=!1,K.value=!1,Ii()}finally{$t=t,yield e(),Qt=!1}})),t(()=>[m.monacoOptions,z.value],()=>{var e;if(ki(),!B||!z.value)return;let t=U.value?H():V(),n=typeof m.monacoOptions?.fontSize==`number`?m.monacoOptions.fontSize:Number.isFinite(Y.value)?Y.value:void 0;typeof n==`number`&&Number.isFinite(n)&&n>0&&((e=t?.updateOptions)==null||e.call(t,{fontSize:n})),X(!1)},{deep:!0}),t(()=>[wi(),Ht.value,He.value,P.value,z.value],([e],t)=>{He.value&&I.value&&z.value&&Ti({appearanceOnly:t!=null&&Ci(e,t[0])})},{flush:`post`}),t(()=>[Ai.value,He.value,z.value],(t,n)=>M(null,[t,n],function*([t,n,r],[i]){if(ki(),!n||!r||!B||!T.value||!P.value||t===i||!1===m.stream&&!1!==m.loading)return;let a=Ct;if(a){try{yield a}catch{}if(L||!T.value)return}try{I.value=!1,K.value=!1,P.value=!1,F.value=!1,kr(),Ar(),bt(),yield e(),yield vi(T.value,{allowStaleContentRetry:!1})}catch{I.value=!1,K.value=!1,Ii()}}),{flush:`post`}),t(()=>[m.loading,z.value],(t,n)=>M(null,[t,n],function*([t,n],r){if(!n)return;let i=r?.[0];if(!1===i&&!1!==t&&U.value&&P.value&&(yield e(),w(()=>{M(null,null,function*(){let e=Ct;if(e)try{yield e}catch{}!L&&U.value&&!1!==m.loading&&(ki(),Bt(),$())})})),t)return;let a=i!==void 0&&!1!==i;yield e(),w(()=>{M(null,null,function*(){try{if(a&&(yield function(){return M(this,null,function*(){if(!q.value||!B||!T.value||G.value||L||!z.value)return!1;if($t===Ni.value)return!0;Qt=!0;try{q.value=!1,qt.value=null,Zt=null,P.value=!1,I.value=!1,F.value=!1,K.value=!1,kr(),Ar(),bt(),yield e();try{yield vi(T.value)}catch{I.value=!1,K.value=!1,Ii()}}finally{yield e(),Qt=!1}return!0})}()))return void X(!1);if(a&&U.value&&P.value&&en&&T.value)return en=!1,I.value=!1,K.value=!1,P.value=!1,F.value=!1,kr(),Ar(),bt(),yield e(),yield vi(T.value,{allowStaleContentRetry:!1}),void Mr(!0);if(a&&P.value)if(U.value&&T.value){let e=Ct;if(e)try{yield e}catch{}ki();let t=Lt(String(m.node.originalCode??``),String(m.node.updatedCode??``));if(yield Gr(t.original,t.updated,O.value),L||!U.value)return;Bt(),Z(!0),Rn(),Q(),ur();let n=yield Wr({requireHighlight:!0});L||!n||K.value||(yield zn()),$(),Mr(!0)}else ti(),ri(pn.value,O.value);a&&U.value?(X({preferModelDiffHeight:!0,holdCurrentDiffHeight:!0}),Mr(!0)):X(!1)}catch{}})})}),{immediate:!0,flush:`post`}),o(()=>{kr(),Ar(),yt(),kt?.()}),(e,t)=>G.value?(n(),h(b(Oe),{key:0,class:ie([`code-pre-fallback`,{"is-wrap":tn.value}]),style:ee(Pn.value),node:mn.value,loading:m.loading,"show-line-numbers":!0,"diff-inline":nn.value,"diff-hide-unchanged-regions":rn.value},null,8,[`class`,`style`,`node`,`loading`,`diff-inline`,`diff-hide-unchanged-regions`])):(n(),S(`div`,{key:1,ref_key:`container`,ref:E,style:ee(ui.value),class:ie([`code-block-container rounded-lg border`,[{dark:m.isDark,"is-rendering":m.loading,"is-dark":Ut.value,"is-diff":U.value,"is-plain-text":Ve.value}]]),"data-markstream-code-block":`1`,"data-markstream-enhanced":K.value&&!G.value?`true`:`false`,"data-markstream-enhancement-state":dn.value,"data-markstream-code-block-state":Jr()?`streaming`:`settled`,"data-markstream-pending":un.value?`true`:void 0,"data-markstream-viewport-pending":mt.value&&b(nt)&&!z.value?`true`:void 0},[s(et,{"show-header":m.showHeader,"show-collapse-button":m.showCollapseButton,"show-font-size-buttons":m.showFontSizeButtons,"enable-font-size-control":m.enableFontSizeControl,"show-copy-button":m.showCopyButton,"show-expand-button":m.showExpandButton,"show-preview-button":m.showPreviewButton,"show-tooltips":m.showTooltips,"is-dark":m.isDark,loading:m.loading,stream:d.stream,"is-collapsed":N.value,"is-expanded":k.value,"copy-text":ze.value,"is-previewable":qr.value,"code-font-size":Y.value,"code-font-min":10,"code-font-max":36,"default-code-font-size":J.value,"font-baseline-ready":vn.value,"diff-stats":U.value?Nt.value:null,"diff-stats-aria-label":Pt.value,onToggleCollapse:mi,onDecreaseFont:pr,onResetFont:mr,onIncreaseFont:fr,onCopy:fi,onToggleExpand:pi,onPreview:hi},oe({"header-left":ne(()=>[se(e.$slots,`header-left`,{},()=>[g(`div`,ot,[g(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`,innerHTML:li.value},null,8,st),g(`div`,ct,[g(`div`,lt,x(si.value),1),ci.value?(n(),S(`div`,ut,x(ci.value),1)):u(``,!0)])])],!0)]),loading:ne(()=>[se(e.$slots,`loading`,{loading:d.loading,stream:d.stream},()=>[t[0]||=g(`div`,{class:`loading-skeleton`},[g(`div`,{class:`skeleton-line`}),g(`div`,{class:`skeleton-line`}),g(`div`,{class:`skeleton-line short`})],-1)],!0)]),default:ne(()=>[r(g(`div`,{class:ie([`code-editor-layer`,{"code-editor-layer--collapsed":N.value}])},[g(`div`,{ref_key:`codeEditor`,ref:T,class:ie([`code-editor-container`,d.stream?``:`code-height-placeholder`]),"data-markstream-host-hidden":ln.value?`true`:void 0,style:ee(Ln.value)},null,14,dt),cn.value?(n(),h(b(Oe),{key:0,class:ie([`code-pre-fallback`,{"is-wrap":tn.value}]),style:ee(Pn.value),node:mn.value,"show-line-numbers":!0,"diff-inline":nn.value,"diff-hide-unchanged-regions":rn.value},null,8,[`class`,`style`,`node`,`diff-inline`,`diff-hide-unchanged-regions`])):u(``,!0)],2),[[f,!!d.stream||!d.loading]]),fn.value&&!Ie.value&&qr.value&&D.value===`html`?(n(),h(it,{key:0,code:m.node.code,"html-preview-allow-scripts":m.htmlPreviewAllowScripts,"html-preview-sandbox":m.htmlPreviewSandbox,"is-dark":m.isDark,"on-close":()=>fn.value=!1},null,8,[`code`,`html-preview-allow-scripts`,`html-preview-sandbox`,`is-dark`,`on-close`])):u(``,!0)]),_:2},[e.$slots[`header-right`]?{name:`header-right`,fn:ne(()=>[se(e.$slots,`header-right`,{},void 0,!0)]),key:`0`}:void 0]),1032,[`show-header`,`show-collapse-button`,`show-font-size-buttons`,`enable-font-size-control`,`show-copy-button`,`show-expand-button`,`show-preview-button`,`show-tooltips`,`is-dark`,`loading`,`stream`,`is-collapsed`,`is-expanded`,`copy-text`,`is-previewable`,`code-font-size`,`default-code-font-size`,`font-baseline-ready`,`diff-stats`,`diff-stats-aria-label`])],14,at))}}),[[`__scopeId`,`data-v-72200115`]]);export{pt as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/DesignSystemView-CC7yy3PX.js b/apps/pythinker-code/dist-web/assets/DesignSystemView-CaJPKGCg.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/DesignSystemView-CC7yy3PX.js rename to apps/pythinker-code/dist-web/assets/DesignSystemView-CaJPKGCg.js index 100aaafe0..2232c1d39 100644 --- a/apps/pythinker-code/dist-web/assets/DesignSystemView-CC7yy3PX.js +++ b/apps/pythinker-code/dist-web/assets/DesignSystemView-CaJPKGCg.js @@ -1,4 +1,4 @@ -import{I as e,N as t,P as n,R as r,S as i,b as a,d as o,h as s,ot as ee,ut as c,v as l,w as te,x as u}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{at as ne,it as d,ot as re,st as f,t as p}from"./index-CJN6blp7.js";var ie={class:`ds-page`},m={class:`layout`},h={class:`content`},g={class:`content-inner`},_={id:`tokens`},v={class:`icon-sizes`},y={class:`sz`},b={class:`p-ic`,style:{width:`14px`,height:`14px`},viewBox:`0 0 24 24`,fill:`currentColor`},x={class:`sz`},S={class:`p-ic`,style:{width:`16px`,height:`16px`},viewBox:`0 0 24 24`,fill:`currentColor`},C={class:`sz`},w={class:`p-ic`,style:{width:`20px`,height:`20px`},viewBox:`0 0 24 24`,fill:`currentColor`},T={class:`icon-grid`},E={class:`icon-group-label`},D={class:`ic-name`},O={id:`primitives`},k={class:`stage-wrap`},A={class:`stage p col`},j={class:`demo-row`},M={class:`p-btn primary disabled`},N={class:`p-spinner sm`,viewBox:`0 0 24 24`,style:{"--p-accent":`#fff`,"--p-line":`rgba(255,255,255,.35)`}},P={class:`stage-wrap`},F={class:`stage p col`},I={class:`demo-row`,style:{"font-size":`22px`,"line-height":`1`}},L={class:`demo-row`},ae={class:`p-thinking`},R={class:`p-thinking`},z={class:`stage-wrap`},B={class:`stage p col`},V={class:`demo-row`,style:{gap:`24px`,"flex-wrap":`wrap`}},H={class:`demo-row`,style:{gap:`24px`,"align-items":`center`}},U={class:`stage-wrap`},W={class:`stage p col`,style:{gap:`0`,background:`var(--p-surface)`,padding:`0`,"max-width":`300px`,"align-items":`stretch`}},G={style:{display:`flex`,"align-items":`center`,gap:`8px`,padding:`7px 10px`,margin:`1px 6px`,"border-radius":`8px`,color:`var(--p-text)`,"font-size":`13px`}},K={style:{color:`var(--d-fg-faint)`,flex:`none`},width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`},q={style:{display:`flex`,"align-items":`center`,gap:`8px`,padding:`7px 10px`,margin:`1px 6px`,"border-radius":`8px`,color:`var(--p-text)`,"font-size":`13px`}},J={style:{color:`var(--d-fg-faint)`,flex:`none`},width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`},oe={id:`chat`},se={class:`stage-wrap`},ce={class:`stage p col`,style:{"align-items":`center`,background:`#fff`}},le={class:`demo-chat`},ue={class:`p-thinking`},Y={class:`p-action`},de={class:`p-action-head`},fe={class:`p-ic`,style:{color:`var(--p-accent)`},viewBox:`0 0 24 24`,fill:`currentColor`},pe={class:`p-action warn`},me={class:`p-action-head`},he={class:`p-ic`,style:{color:`var(--p-warning)`},viewBox:`0 0 24 24`,fill:`currentColor`},X=f(te({__name:`DesignSystemView`,emits:[`close`],setup(te,{emit:f}){let X=f;function Z(){X(`close`)}let Q=null;function $(e){e.key===`Escape`&&Z()}return t(()=>{document.addEventListener(`keydown`,$);let e=Array.prototype.slice.call(document.querySelectorAll(`#nav a[href^="#"]`)),t=new Map;e.forEach(e=>{let n=e.getAttribute(`href`);if(!n)return;let r=document.getElementById(n.slice(1));r&&t.set(r,e)});let n=null;Q=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(n&&n.classList.remove(`active`),n=t.get(e.target)??null,n&&n.classList.add(`active`))})},{rootMargin:`-20% 0px -70% 0px`,threshold:0}),t.forEach((e,t)=>Q.observe(t)),e.length&&e[0].classList.add(`active`)}),n(()=>{document.removeEventListener(`keydown`,$),Q&&=(Q.disconnect(),null)}),(t,n)=>(e(),l(`div`,ie,[s(`div`,{class:`ds-topbar`},[s(`button`,{class:`ds-back`,type:`button`,onClick:Z},`← Back`),n[0]||=s(`span`,{class:`ds-topbar-title`},`Design system`,-1)]),s(`div`,m,[n[51]||=a(``,1),s(`main`,h,[s(`div`,g,[n[49]||=a(`
● Design System · v1.0

Pythinker Web Design System

This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

  • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
  • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
  • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
  • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
  • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
  • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
  • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
✓
Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
`,2),s(`section`,_,[n[7]||=a(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
bg
#ffffff / #121212
surface
#fafbfc / #1f1f1f
surface-sunken
#f3f5f8 / #121212
selected
#eceff3 / #2d333b
fg
#14171c / #e8eaed
fg-muted
#6b7280 / #9aa0a8
line
#e7eaee / #2d333b
accent (KMBlue)
#1783ff / #58a6ff
accent-soft
#e8f3ff / rgba(88,166,255,.14)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#fafbfc#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-text#14171c#e8eaedBody text / headings
--color-text-muted#6b7280#9aa0a8Secondary text / placeholder
--color-line#e7eaee#2d333bDivider / card border
--color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
--color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#e9eaf2#2c343aSidebar solid composite (row masks / overlays). The visible sidebar surface is the frost pair --color-sidebar-glass + --sidebar-wash blurred by --p-sidebar-backdrop
--color-accent#1783ff#58a6ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Surface usage

The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

TokenLightDarkUsage
--p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
--p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
--p-bg#ffffff#121212Page background

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Inter first)

Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

--font-ui
--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
+import{I as e,N as t,P as n,R as r,S as i,b as a,d as o,h as s,ot as ee,ut as c,v as l,w as te,x as u}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{at as ne,it as d,ot as re,st as f,t as p}from"./index-CIrZXSM-.js";var ie={class:`ds-page`},m={class:`layout`},h={class:`content`},g={class:`content-inner`},_={id:`tokens`},v={class:`icon-sizes`},y={class:`sz`},b={class:`p-ic`,style:{width:`14px`,height:`14px`},viewBox:`0 0 24 24`,fill:`currentColor`},x={class:`sz`},S={class:`p-ic`,style:{width:`16px`,height:`16px`},viewBox:`0 0 24 24`,fill:`currentColor`},C={class:`sz`},w={class:`p-ic`,style:{width:`20px`,height:`20px`},viewBox:`0 0 24 24`,fill:`currentColor`},T={class:`icon-grid`},E={class:`icon-group-label`},D={class:`ic-name`},O={id:`primitives`},k={class:`stage-wrap`},A={class:`stage p col`},j={class:`demo-row`},M={class:`p-btn primary disabled`},N={class:`p-spinner sm`,viewBox:`0 0 24 24`,style:{"--p-accent":`#fff`,"--p-line":`rgba(255,255,255,.35)`}},P={class:`stage-wrap`},F={class:`stage p col`},I={class:`demo-row`,style:{"font-size":`22px`,"line-height":`1`}},L={class:`demo-row`},ae={class:`p-thinking`},R={class:`p-thinking`},z={class:`stage-wrap`},B={class:`stage p col`},V={class:`demo-row`,style:{gap:`24px`,"flex-wrap":`wrap`}},H={class:`demo-row`,style:{gap:`24px`,"align-items":`center`}},U={class:`stage-wrap`},W={class:`stage p col`,style:{gap:`0`,background:`var(--p-surface)`,padding:`0`,"max-width":`300px`,"align-items":`stretch`}},G={style:{display:`flex`,"align-items":`center`,gap:`8px`,padding:`7px 10px`,margin:`1px 6px`,"border-radius":`8px`,color:`var(--p-text)`,"font-size":`13px`}},K={style:{color:`var(--d-fg-faint)`,flex:`none`},width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`},q={style:{display:`flex`,"align-items":`center`,gap:`8px`,padding:`7px 10px`,margin:`1px 6px`,"border-radius":`8px`,color:`var(--p-text)`,"font-size":`13px`}},J={style:{color:`var(--d-fg-faint)`,flex:`none`},width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`},oe={id:`chat`},se={class:`stage-wrap`},ce={class:`stage p col`,style:{"align-items":`center`,background:`#fff`}},le={class:`demo-chat`},ue={class:`p-thinking`},Y={class:`p-action`},de={class:`p-action-head`},fe={class:`p-ic`,style:{color:`var(--p-accent)`},viewBox:`0 0 24 24`,fill:`currentColor`},pe={class:`p-action warn`},me={class:`p-action-head`},he={class:`p-ic`,style:{color:`var(--p-warning)`},viewBox:`0 0 24 24`,fill:`currentColor`},X=f(te({__name:`DesignSystemView`,emits:[`close`],setup(te,{emit:f}){let X=f;function Z(){X(`close`)}let Q=null;function $(e){e.key===`Escape`&&Z()}return t(()=>{document.addEventListener(`keydown`,$);let e=Array.prototype.slice.call(document.querySelectorAll(`#nav a[href^="#"]`)),t=new Map;e.forEach(e=>{let n=e.getAttribute(`href`);if(!n)return;let r=document.getElementById(n.slice(1));r&&t.set(r,e)});let n=null;Q=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(n&&n.classList.remove(`active`),n=t.get(e.target)??null,n&&n.classList.add(`active`))})},{rootMargin:`-20% 0px -70% 0px`,threshold:0}),t.forEach((e,t)=>Q.observe(t)),e.length&&e[0].classList.add(`active`)}),n(()=>{document.removeEventListener(`keydown`,$),Q&&=(Q.disconnect(),null)}),(t,n)=>(e(),l(`div`,ie,[s(`div`,{class:`ds-topbar`},[s(`button`,{class:`ds-back`,type:`button`,onClick:Z},`← Back`),n[0]||=s(`span`,{class:`ds-topbar-title`},`Design system`,-1)]),s(`div`,m,[n[51]||=a(``,1),s(`main`,h,[s(`div`,g,[n[49]||=a(`
● Design System · v1.0

Pythinker Web Design System

This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

  • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
  • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
  • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
  • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
  • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
  • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
  • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
✓
Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
`,2),s(`section`,_,[n[7]||=a(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
bg
#ffffff / #121212
surface
#fafbfc / #1f1f1f
surface-sunken
#f3f5f8 / #121212
selected
#eceff3 / #2d333b
fg
#14171c / #e8eaed
fg-muted
#6b7280 / #9aa0a8
line
#e7eaee / #2d333b
accent (KMBlue)
#1783ff / #58a6ff
accent-soft
#e8f3ff / rgba(88,166,255,.14)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#fafbfc#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-text#14171c#e8eaedBody text / headings
--color-text-muted#6b7280#9aa0a8Secondary text / placeholder
--color-line#e7eaee#2d333bDivider / card border
--color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
--color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#e9eaf2#2c343aSidebar solid composite (row masks / overlays). The visible sidebar surface is the frost pair --color-sidebar-glass + --sidebar-wash blurred by --p-sidebar-backdrop
--color-accent#1783ff#58a6ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Surface usage

The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

TokenLightDarkUsage
--p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
--p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
--p-bg#ffffff#121212Page background

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Inter first)

Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

--font-ui
--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
       "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
       -apple-system, BlinkMacSystemFont, "Segoe UI",
       Roboto, Ubuntu, sans-serif,
diff --git a/apps/pythinker-code/dist-web/assets/Tooltip-CYPLmGXR.js b/apps/pythinker-code/dist-web/assets/Tooltip-DbjeYWS5.js
similarity index 98%
rename from apps/pythinker-code/dist-web/assets/Tooltip-CYPLmGXR.js
rename to apps/pythinker-code/dist-web/assets/Tooltip-DbjeYWS5.js
index ff1810256..9c714ae32 100644
--- a/apps/pythinker-code/dist-web/assets/Tooltip-CYPLmGXR.js
+++ b/apps/pythinker-code/dist-web/assets/Tooltip-DbjeYWS5.js
@@ -1 +1 @@
-import{A as e,G as t,I as n,J as r,S as i,c as a,f as o,g as s,h as c,j as l,lt as u,n as d,nt as f,q as p,st as m,ut as h,w as g,x as _}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{t as v}from"./preload-helper-zJ_50EbN.js";import{_ as y}from"./index-CJN6blp7.js";var b=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),x=[`id`],S=[`data-placement`],C=y(g({__name:`Tooltip`,props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(g){let y=g,C=f(null),w=f(null),T=f({transform:`translate3d(0px, 0px, 0px)`,left:`0px`,top:`0px`}),E=f({}),D=f(y.placement??`top`),O=f(!1),k=null,A=null,j=null,M=null,N=null,P=0;function F(){return M?Promise.resolve(M):(N||=v(()=>import(`./floating-ui.dom-DpWEmocp.js`).then(e=>(M=e,e)),[]).catch(e=>{throw N=null,e}),N)}function I(){k&&=(k(),null),A=null,j=null}function L(e){return b(this,null,function*(){let t=y.anchorEl,n=C.value;if(!y.visible||!t||!n||A===t&&j===n)return;let{autoUpdate:r}=yield F();e()&&y.visible&&y.anchorEl===t&&C.value===n&&(I(),A=t,j=n,k=r(t,n,()=>{R().catch(()=>{z()})}))})}function R(){return b(this,null,function*(){let e=y.anchorEl,t=C.value;if(!y.visible||!e||!t)return!1;let{arrow:n,computePosition:r,flip:i,offset:a,shift:o}=yield F();if(!y.visible||y.anchorEl!==e||C.value!==t)return!1;let s=[a(y.offset??6),i(),o({padding:6}),...w.value?[n({element:w.value,padding:4})]:[]],{x:c,y:l,placement:u,middlewareData:d}=yield r(e,t,{placement:y.placement??`top`,middleware:s,strategy:`fixed`});if(!y.visible||y.anchorEl!==e||C.value!==t)return!1;if(T.value.transform=`translate3d(${Math.round(c)}px, ${Math.round(l)}px, 0)`,T.value.left=`0px`,T.value.top=`0px`,D.value=u,d.arrow&&w.value){let{x:e,y:t}=d.arrow,n={top:`bottom`,bottom:`top`,left:`right`,right:`left`}[u.split(`-`)[0]];E.value={left:e==null?``:`${e}px`,top:t==null?``:`${t}px`,[n]:`-3px`}}return!0})}function z(){let e=y.anchorEl,t=C.value;if(!e||!t)return!1;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=y.offset??6,a=y.placement??`top`,o=n.left,s=n.top;return a===`bottom`?s=n.bottom+i:a===`left`?o=n.left-r.width-i:a===`right`?o=n.right+i:s=n.top-r.height-i,T.value.transform=`translate3d(${Math.round(Math.max(0,o))}px, ${Math.round(Math.max(0,s))}px, 0)`,T.value.left=`0px`,T.value.top=`0px`,D.value=a,E.value={},!0}t(()=>y.visible,t=>b(null,null,function*(){let n=++P;if(t){if(O.value=!1,yield e(),n!==P||!y.visible)return;if(y.anchorEl&&C.value)try{let t=y.anchorEl,r=C.value,i=t.getBoundingClientRect();if(!(yield R())||n!==P||!y.visible||y.anchorEl!==t||C.value!==r)return;let a=T.value.transform;if(y.originX!=null&&y.originY!=null){let t=Math.abs(Number(y.originX)-i.left),r=Math.abs(Number(y.originY)-i.top);if(Math.hypot(t,r)>120){if(T.value.transform=`translate3d(${Math.round(y.originX)}px, ${Math.round(y.originY)}px, 0)`,yield e(),n!==P||!y.visible||(O.value=!0,yield e(),n!==P||!y.visible))return;T.value.transform=a}else O.value=!0}else O.value=!0;yield L(()=>n===P)}catch{if(n!==P||!y.visible)return;if(O.value=z(),y.anchorEl&&C.value)try{yield L(()=>n===P)}catch{}}else O.value=!0}else O.value=!1,I()}));let B=0;return t([()=>y.anchorEl,()=>y.placement,()=>y.content],()=>b(null,null,function*(){let t=++B;if(y.visible&&y.anchorEl&&C.value){if(yield e(),t!==B||!y.visible||!y.anchorEl||!C.value)return;try{let e=yield R();if(t!==B||!y.visible||!y.anchorEl||!C.value)return;e||z()}catch{z()}yield L(()=>t===B)}})),l(()=>{P+=1,I()}),(e,t)=>(n(),s(o,{to:`body`},[c(`div`,{class:m([`markstream-vue`,{dark:g.isDark}])},[i(d,{name:`tooltip`,appear:``},{default:p(()=>[r(c(`div`,{id:y.id,ref_key:`tooltip`,ref:C,style:u({position:`fixed`,left:T.value.left,top:T.value.top,transform:T.value.transform,visibility:O.value?`visible`:`hidden`,pointerEvents:O.value?void 0:`none`}),class:`tooltip-element`,role:`tooltip`},[_(h(g.content)+` `,1),c(`div`,{ref_key:`arrowEl`,ref:w,class:`tooltip-arrow`,"data-placement":D.value,style:u(E.value)},null,12,S)],12,x),[[a,g.visible]])]),_:1})],2)]))}}),[[`__scopeId`,`data-v-c606ee4c`]]);export{C as default};
\ No newline at end of file
+import{A as e,G as t,I as n,J as r,S as i,c as a,f as o,g as s,h as c,j as l,lt as u,n as d,nt as f,q as p,st as m,ut as h,w as g,x as _}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{t as v}from"./preload-helper-zJ_50EbN.js";import{_ as y}from"./index-CIrZXSM-.js";var b=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),x=[`id`],S=[`data-placement`],C=y(g({__name:`Tooltip`,props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(g){let y=g,C=f(null),w=f(null),T=f({transform:`translate3d(0px, 0px, 0px)`,left:`0px`,top:`0px`}),E=f({}),D=f(y.placement??`top`),O=f(!1),k=null,A=null,j=null,M=null,N=null,P=0;function F(){return M?Promise.resolve(M):(N||=v(()=>import(`./floating-ui.dom-DpWEmocp.js`).then(e=>(M=e,e)),[]).catch(e=>{throw N=null,e}),N)}function I(){k&&=(k(),null),A=null,j=null}function L(e){return b(this,null,function*(){let t=y.anchorEl,n=C.value;if(!y.visible||!t||!n||A===t&&j===n)return;let{autoUpdate:r}=yield F();e()&&y.visible&&y.anchorEl===t&&C.value===n&&(I(),A=t,j=n,k=r(t,n,()=>{R().catch(()=>{z()})}))})}function R(){return b(this,null,function*(){let e=y.anchorEl,t=C.value;if(!y.visible||!e||!t)return!1;let{arrow:n,computePosition:r,flip:i,offset:a,shift:o}=yield F();if(!y.visible||y.anchorEl!==e||C.value!==t)return!1;let s=[a(y.offset??6),i(),o({padding:6}),...w.value?[n({element:w.value,padding:4})]:[]],{x:c,y:l,placement:u,middlewareData:d}=yield r(e,t,{placement:y.placement??`top`,middleware:s,strategy:`fixed`});if(!y.visible||y.anchorEl!==e||C.value!==t)return!1;if(T.value.transform=`translate3d(${Math.round(c)}px, ${Math.round(l)}px, 0)`,T.value.left=`0px`,T.value.top=`0px`,D.value=u,d.arrow&&w.value){let{x:e,y:t}=d.arrow,n={top:`bottom`,bottom:`top`,left:`right`,right:`left`}[u.split(`-`)[0]];E.value={left:e==null?``:`${e}px`,top:t==null?``:`${t}px`,[n]:`-3px`}}return!0})}function z(){let e=y.anchorEl,t=C.value;if(!e||!t)return!1;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=y.offset??6,a=y.placement??`top`,o=n.left,s=n.top;return a===`bottom`?s=n.bottom+i:a===`left`?o=n.left-r.width-i:a===`right`?o=n.right+i:s=n.top-r.height-i,T.value.transform=`translate3d(${Math.round(Math.max(0,o))}px, ${Math.round(Math.max(0,s))}px, 0)`,T.value.left=`0px`,T.value.top=`0px`,D.value=a,E.value={},!0}t(()=>y.visible,t=>b(null,null,function*(){let n=++P;if(t){if(O.value=!1,yield e(),n!==P||!y.visible)return;if(y.anchorEl&&C.value)try{let t=y.anchorEl,r=C.value,i=t.getBoundingClientRect();if(!(yield R())||n!==P||!y.visible||y.anchorEl!==t||C.value!==r)return;let a=T.value.transform;if(y.originX!=null&&y.originY!=null){let t=Math.abs(Number(y.originX)-i.left),r=Math.abs(Number(y.originY)-i.top);if(Math.hypot(t,r)>120){if(T.value.transform=`translate3d(${Math.round(y.originX)}px, ${Math.round(y.originY)}px, 0)`,yield e(),n!==P||!y.visible||(O.value=!0,yield e(),n!==P||!y.visible))return;T.value.transform=a}else O.value=!0}else O.value=!0;yield L(()=>n===P)}catch{if(n!==P||!y.visible)return;if(O.value=z(),y.anchorEl&&C.value)try{yield L(()=>n===P)}catch{}}else O.value=!0}else O.value=!1,I()}));let B=0;return t([()=>y.anchorEl,()=>y.placement,()=>y.content],()=>b(null,null,function*(){let t=++B;if(y.visible&&y.anchorEl&&C.value){if(yield e(),t!==B||!y.visible||!y.anchorEl||!C.value)return;try{let e=yield R();if(t!==B||!y.visible||!y.anchorEl||!C.value)return;e||z()}catch{z()}yield L(()=>t===B)}})),l(()=>{P+=1,I()}),(e,t)=>(n(),s(o,{to:`body`},[c(`div`,{class:m([`markstream-vue`,{dark:g.isDark}])},[i(d,{name:`tooltip`,appear:``},{default:p(()=>[r(c(`div`,{id:y.id,ref_key:`tooltip`,ref:C,style:u({position:`fixed`,left:T.value.left,top:T.value.top,transform:T.value.transform,visibility:O.value?`visible`:`hidden`,pointerEvents:O.value?void 0:`none`}),class:`tooltip-element`,role:`tooltip`},[_(h(g.content)+` `,1),c(`div`,{ref_key:`arrowEl`,ref:w,class:`tooltip-arrow`,"data-placement":D.value,style:u(E.value)},null,12,S)],12,x),[[a,g.visible]])]),_:1})],2)]))}}),[[`__scopeId`,`data-v-c606ee4c`]]);export{C as default};
\ No newline at end of file
diff --git a/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DHlAbv59.js b/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-C5a22uRi.js
similarity index 89%
rename from apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DHlAbv59.js
rename to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-C5a22uRi.js
index 7c94fccee..37f170086 100644
--- a/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-DHlAbv59.js
+++ b/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-C5a22uRi.js
@@ -1 +1 @@
-import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CcF2nKWM.js";import"./mermaidParser.worker-_pLIm6No.js";import{m as n,t as r}from"./mermaid-parser.core-87cmcdBo.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-uaDelfR2.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=n().RailroadAbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=t(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=t(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=t(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=t(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:t(t=>{o.clear(),e.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new r(n);let i=n.value;e.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),e.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
\ No newline at end of file
+import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CbPIJzjs.js";import"./mermaidParser.worker-CBWarbNh.js";import{m as n,t as r}from"./mermaid-parser.core-87cmcdBo.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-Cw2zjcPU.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=n().RailroadAbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=t(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=t(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=t(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=t(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:t(t=>{o.clear(),e.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new r(n);let i=n.value;e.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),e.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
\ No newline at end of file
diff --git a/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-Dr0SnIEa.js b/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-H7tndj7h.js
similarity index 89%
rename from apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-Dr0SnIEa.js
rename to apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-H7tndj7h.js
index b4e26672b..4b6c04fa6 100644
--- a/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-Dr0SnIEa.js
+++ b/apps/pythinker-code/dist-web/assets/abnfDiagram-VCTEODGH-H7tndj7h.js
@@ -1 +1 @@
-import{m as e,t}from"./mermaid-parser.core-BCOGZFb-.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-CLGD4ZFX-D_luxf7b.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-BnQxQiBZ.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
\ No newline at end of file
+import{m as e,t}from"./mermaid-parser.core-BCOGZFb-.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-CWy3EboY.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
\ No newline at end of file
diff --git a/apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-B4Rwpl9c.js b/apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-C4vRCjzD.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-B4Rwpl9c.js
rename to apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-C4vRCjzD.js
index 177e18e5e..938818157 100644
--- a/apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-B4Rwpl9c.js
+++ b/apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-C4vRCjzD.js
@@ -1,4 +1,4 @@
-import{_ as e,m as t,p as n,v as r}from"./src-CDd1avoI.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as a,J as o,K as s,U as c,a as l,b as u,f as d,v as f,w as p,x as m,y as h,z as g}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{c as _,i as v}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{i as y,r as b,t as x}from"./chunk-PWAF6VOD-DCTitH5S.js";import{n as S}from"./chunk-GMAD6QVW-jIHtZ3sR.js";import{St as C}from"./mermaidParser.worker-_pLIm6No.js";import{n as w}from"./mermaid-parser.core-87cmcdBo.js";import{t as T}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as E}from"./cytoscape.esm-DtsSOjvk.js";var D=e(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=28)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(5);function l(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,n!=null&&t!=null?this.rect=new a(t.x,t.y,n.width,n.height):this.rect=new a}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(!(r.source==n||r.target==n))throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal==`right`&&this.setWidth(t+this.labelWidth)),this.labelHeight&&(this.labelPosVertical==`top`?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):this.labelPosVertical==`center`&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):this.labelPosVertical==`bottom`&&this.setHeight(n+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(7),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}else{var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(!(t.owner==n.owner&&t.owner==this))throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null}},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(!(t.owner!=null&&t.owner==this))throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;cn&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;mo&&(t=o),nc&&(r=c),ao&&(t=o),nc&&(r=c),a=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}else{i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(!(a!=null&&a.getGraphManager()==this))throw`Source not in this graph mgr!`;if(!(o!=null&&o.getGraphManager()==this))throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),!(n.source!=null&&n.target!=null))throw`Edge source and/or target is null!`;if(!(n.source.edges.indexOf(n)==-1&&n.target.edges.indexOf(n)==-1))throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n}},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(ia)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(ra?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j;break}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N;break}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r=0){var u=(-c+Math.sqrt(c*c-4*s*l))/(2*s),d=(-c-Math.sqrt(c*c-4*s*l))/(2*s);return u>=0&&u<=1?[u]:d>=0&&d<=1?[d]:null}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(5);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ta.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;nc||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=c.length||u>=c[0].length)){for(var d=0;de}}]),e}()}),(function(e,t,n){function r(){}r.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t=Math.min(this.m,this.n);this.s=function(e){for(var t=[];e-- >0;)t.push(0);return t}(Math.min(this.m+1,this.n)),this.U=function(e){return function e(t){if(t.length==0)return 0;for(var n=[],r=0;r0;)t.push(0);return t}(this.n),i=function(e){for(var t=[];e-- >0;)t.push(0);return t}(this.m),a=!0,o=!0,s=Math.min(this.m-1,this.n),c=Math.max(0,Math.min(this.n-2,this.m)),l=0;l=0;k--)if(this.s[k]!==0){for(var A=k+1;A=0;L--){if(function(e,t){return e&&t}(L0;){var U=void 0,W=void 0;for(U=E-2;U>=-1&&U!==-1;U--)if(Math.abs(n[U])<=re+ne*(Math.abs(this.s[U])+Math.abs(this.s[U+1]))){n[U]=0;break}if(U===E-2)W=4;else{var G=void 0;for(G=E-1;G>=U&&G!==U;G--){var ie=(G===E?0:Math.abs(n[G]))+(G===U+1?0:Math.abs(n[G-1]));if(Math.abs(this.s[G])<=re+ne*ie){this.s[G]=0;break}}G===U?W=3:G===E-1?W=1:(W=2,U=G)}switch(U++,W){case 1:var K=n[E-2];n[E-2]=0;for(var q=E-2;q>=U;q--){var ae=r.hypot(this.s[q],K),J=this.s[q]/ae,Y=K/ae;if(this.s[q]=ae,q!==U&&(K=-Y*n[q-1],n[q-1]=J*n[q-1]),o)for(var X=0;X=this.s[U+1]);){var De=this.s[U];if(this.s[U]=this.s[U+1],this.s[U+1]=De,o&&UMath.abs(t)?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):t==0?n=0:(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)),n},e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(D()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(D()):n.coseBase=r(n.layoutBase)})(e,function(e){return(()=>{var t={45:((e,t,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),e.exports=r}),806:((e,t,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,e.exports=i}),767:((e,t,n)=>{var r=n(551).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),880:((e,t,n)=>{var r=n(551).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),578:((e,t,n)=>{var r=n(551).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),765:((e,t,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),o=n(991),s=n(767),c=n(806),l=n(902),u=n(551).FDLayoutConstants,d=n(551).LayoutConstants,f=n(551).Point,p=n(551).PointD,m=n(551).DimensionD,h=n(551).Layout,g=n(551).Integer,_=n(551).IGeometry,v=n(551).LGraph,y=n(551).Transform,b=n(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var S in x.prototype=Object.create(r.prototype),r)x[S]=r[S];x.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},x.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},x.prototype.newNode=function(e){return new o(this.graphManager,e)},x.prototype.newEdge=function(e){return new s(null,null,e)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n0&&this.updateDisplacements();for(var n=0;n0&&(r.fixedNodeWeight=a)}}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var l=this.constraints.alignmentConstraint.vertical,n=0;n=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var n=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=s.has(t.top)?s.get(t.top):t.top,a=s.has(t.bottom)?s.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}});else{var d=new Map,f=new Map;this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var t=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;d.has(t)?d.get(t).push(n):d.set(t,[n]),d.has(n)?d.get(n).push(t):d.set(n,[t])}else{var r=s.has(e.top)?s.get(e.top):e.top,i=s.has(e.bottom)?s.get(e.bottom):e.bottom;f.has(r)?f.get(r).push(i):f.set(r,[i]),f.has(i)?f.get(i).push(r):f.set(i,[r])}});var p=function(e,t){var n=[],r=[],i=new b,a=new Set,o=0;return e.forEach(function(s,c){if(!a.has(c)){n[o]=[],r[o]=!1;var l=c;for(i.push(l),a.add(l),n[o].push(l);i.length!=0;)l=i.shift(),t.has(l)&&(r[o]=!0),e.get(l).forEach(function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))});o++}}),{components:n,isFixed:r}},m=p(d,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=m.components,this.fixedComponentsOnHorizontal=m.isFixed;var h=p(f,e.fixedNodesOnVertical);this.componentsOnVertical=h.components,this.fixedComponentsOnVertical=h.isFixed}}},x.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n1){var s;for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},x.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var g=h[0];h.splice(0,1);var v=u.indexOf(g);v>=0&&u.splice(v,1),p--,d--}m=t==null?0:(u.indexOf(h[0])+1)%p;for(var y=Math.abs(r-n)/d,b=m;f!=d;b=++b%p){var S=u[b].getOtherEnd(e);if(S!=t){var C=(n+f*y)%360,w=(C+y)%360;x.branchRadialLayout(S,e,C,w,i+a,a),f++}}},x.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;li?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):r.labelPosHorizontal==`right`&&r.setWidth(i+r.labelWidth)),r.labelHeight&&(r.labelPosVertical==`top`?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):r.labelPosVertical==`center`&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):r.labelPosVertical==`bottom`&&r.setHeight(a+r.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop,a=t.labelMarginLeft,o=t.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i,a,o)}},x.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop,o=r.labelMarginLeft,s=r.labelMarginTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a,o,s)})},x.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;ru&&(u=f.rect.height)}n+=u+e.verticalPadding}},x.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];if(n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&(i.labelPosHorizontal==`left`?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):i.labelPosHorizontal==`center`&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):i.labelPosHorizontal==`right`&&i.setWidth(a+i.labelWidth)),i.labelHeight&&(i.labelPosVertical==`top`?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):i.labelPosVertical==`center`&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):i.labelPosVertical==`bottom`&&i.setHeight(o+i.labelHeight))}})},x.prototype.tileNodes=function(e,t){var n=this.tileNodesByFavoringDim(e,t,!0),r=this.tileNodesByFavoringDim(e,t,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=e.getWidth())});var l=a/i,u=o/i,d=(n-r)**2+4*(l+r)*(u+n)*i,f=(r-n+Math.sqrt(d))/(2*(l+r)),p;t?(p=Math.ceil(f),p==f&&p++):p=Math.floor(f);var m=p*(l+r)-r;return s>m&&(m=s),m+=r*2,m},x.prototype.tileNodesByFavoringDim=function(e,t,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,a=c.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(o.idealRowWidth=this.calcIdealRowWidth(e,n));var s=function(e){return e.rect.width*e.rect.height},l=function(e,t){return s(t)-s(e)};e.sort(function(e,t){var n=l;return o.idealRowWidth?(n=a,n(e.id,t.id)):n(e,t)});for(var u=0,d=0,f=0;f0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},x.prototype.canAddHorizontal=function(e,t,n){if(e.idealRowWidth){var r=e.rows.length-1;return e.rowWidth[r]+t+e.horizontalPadding<=e.idealRowWidth}var i=this.getShortestRowIndex(e);if(i<0)return!0;var a=e.rowWidth[i];if(a+e.horizontalPadding+t<=e.width)return!0;var o=0;e.rowHeight[i]0&&(o=n+e.verticalPadding-e.rowHeight[i]);var s=e.width-a>=t+e.horizontalPadding?(e.height+o)/(a+t+e.horizontalPadding):(e.height+o)/e.width;o=n+e.verticalPadding;var c=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=g.MAX_VALUE,p,m,h=0;h{var r=n(551).FDLayoutNode,i=n(551).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i{function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){var a=0;r.forEach(function(e){t==`horizontal`?(f.set(e,c.has(e)?l[c.get(e)]:i.get(e)),a+=f.get(e)):(f.set(e,c.has(e)?u[c.get(e)]:i.get(e)),a+=f.get(e))}),a/=r.length,e.forEach(function(e){n.has(e)||f.set(e,a)})}else{var o=0;e.forEach(function(e){t==`horizontal`?o+=c.has(e)?l[c.get(e)]:i.get(e):o+=c.has(e)?u[c.get(e)]:i.get(e)}),o/=e.length,e.forEach(function(e){f.set(e,o)})}});for(var h=function(){var r=m.shift();e.get(r).forEach(function(e){if(f.get(e.id)o&&(o=v),ys&&(s=y)}}catch(e){p=!0,m=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw m}}var b=(r+o)/2-(a+s)/2,x=!0,S=!1,C=void 0;try{for(var w=e[Symbol.iterator](),T;!(x=(T=w.next()).done);x=!0){var E=T.value;f.set(E,f.get(E)+b)}}catch(e){S=!0,C=e}finally{try{!x&&w.return&&w.return()}finally{if(S)throw C}}})}return f},v=function(e){var t=0,n=0,r=0,i=0;if(e.forEach(function(e){e.left?l[c.get(e.left)]-l[c.get(e.right)]>=0?t++:n++:u[c.get(e.top)]-u[c.get(e.bottom)]>=0?r++:i++}),t>n&&r>i)for(var a=0;an)for(var o=0;oi)for(var s=0;s1)t.fixedNodeConstraint.forEach(function(e,t){S[t]=[e.position.x,e.position.y],C[t]=[l[c.get(e.nodeId)],u[c.get(e.nodeId)]]}),w=!0;else if(t.alignmentConstraint)(function(){var e=0;if(t.alignmentConstraint.vertical){for(var n=t.alignmentConstraint.vertical,i=function(t){var i=new Set;n[t].forEach(function(e){i.add(e)});var a=new Set([].concat(r(i)).filter(function(e){return E.has(e)})),o=void 0;o=a.size>0?l[c.get(a.values().next().value)]:g(i).x,n[t].forEach(function(t){S[e]=[o,u[c.get(t)]],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},a=0;a0?l[c.get(i.values().next().value)]:g(n).y,o[t].forEach(function(t){S[e]=[l[c.get(t)],a],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},d=0;dA&&(A=k[M].length,j=M);if(A0){var W={x:0,y:0};t.fixedNodeConstraint.forEach(function(e,t){var n={x:l[c.get(e.nodeId)],y:u[c.get(e.nodeId)]},r=e.position,i=h(r,n);W.x+=i.x,W.y+=i.y}),W.x/=t.fixedNodeConstraint.length,W.y/=t.fixedNodeConstraint.length,l.forEach(function(e,t){l[t]+=W.x}),u.forEach(function(e,t){u[t]+=W.y}),t.fixedNodeConstraint.forEach(function(e){l[c.get(e.nodeId)]=e.position.x,u[c.get(e.nodeId)]=e.position.y})}if(t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var G=t.alignmentConstraint.vertical,ie=function(e){var t=new Set;G[e].forEach(function(e){t.add(e)});var n=new Set([].concat(r(t)).filter(function(e){return E.has(e)})),i=void 0;i=n.size>0?l[c.get(n.values().next().value)]:g(t).x,t.forEach(function(e){E.has(e)||(l[c.get(e)]=i)})},K=0;K0?u[c.get(n.values().next().value)]:g(t).y,t.forEach(function(e){E.has(e)||(u[c.get(e)]=i)})},J=0;J{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(45)})()})})),k=r(e(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(O()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeFcose=r(O()):n.cytoscapeFcose=r(n.coseBase)})(e,function(e){return(()=>{var t={658:(e=>{e.exports=Object.assign==null?function(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}:Object.assign.bind(Object)}),548:((e,t,n)=>{var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=n(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(e){for(var t={},n=0;n0&&l.merge(e)});for(var u=0;u1){l=s[0],u=l.connectedEdges().length,s.forEach(function(e){e.connectedEdges().length0&&r.set(`dummy`+(r.size+1),p),m},a.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var i=1/0,a=-1/0,o=1/0,s=-1/0;if(n.quality==`draft`){var c=!0,l=!1,u=void 0;try{for(var d=t.nodeIndexes[Symbol.iterator](),f;!(c=(f=d.next()).done);c=!0){var p=f.value,m=r(p,2),h=m[0],g=m[1],_=n.cy.getElementById(h);if(_){var v=_.boundingBox(),y=t.xCoords[g]-v.w/2,b=t.xCoords[g]+v.w/2,x=t.yCoords[g]-v.h/2,S=t.yCoords[g]+v.h/2;ya&&(a=b),xs&&(s=S)}}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}var C=e.x-(a+i)/2,w=e.y-(s+o)/2;t.xCoords=t.xCoords.map(function(e){return e+C}),t.yCoords=t.yCoords.map(function(e){return e+w})}else{Object.keys(t).forEach(function(e){var n=t[e],r=n.getRect().x,c=n.getRect().x+n.getRect().width,l=n.getRect().y,u=n.getRect().y+n.getRect().height;ra&&(a=c),ls&&(s=u)});var T=e.x-(a+i)/2,E=e.y-(s+o)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+T,n.getCenterY()+E)})}}},a.calcBoundingBox=function(e,t,n,r){for(var i=2**53-1,a=-(2**53-1),o=2**53-1,s=-(2**53-1),c=void 0,l=void 0,u=void 0,d=void 0,f=e.descendants().not(`:parent`),p=f.length,m=0;mc&&(i=c),au&&(o=u),s{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,o=n(140).layoutBase.PointD,s=n(140).layoutBase.DimensionD,c=n(140).layoutBase.LayoutConstants,l=n(140).layoutBase.FDLayoutConstants,u=n(140).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.cy,d=e.eles,f=d.nodes(),p=d.edges(),m=void 0,h=void 0,g=void 0,_={};e.randomize&&(m=t.nodeIndexes,h=t.xCoords,g=t.yCoords);var v=function(e){return typeof e==`function`},y=function(e,t){return v(e)?e(t):e},b=r.calcParentsWithoutChildren(n,d),x=function e(t,n,i,c){for(var l=n.length,u=0;u0){var S=void 0;S=i.getGraphManager().add(i.newGraph(),p),e(S,f,i,c)}}},S=function(t,n,r){for(var i=0,a=0,o=0;o0?u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=i/a:v(e.idealEdgeLength)?u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=e.idealEdgeLength,u.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)},C=function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)};e.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(u.MAX_ITERATIONS=l.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(u.TILING_COMPARE_BY=e.tilingCompareBy),e.quality==`proof`?c.QUALITY=2:c.QUALITY=0,u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!e.randomize,u.ANIMATE=l.ANIMATE=c.ANIMATE=e.animate,u.TILE=e.tile,u.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,u.PURE_INCREMENTAL=!e.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step==`transformed`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!1),e.step==`enforced`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!1),e.step==`cose`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!0),e.step==`all`&&(e.randomize?u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0),e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint?u.TREE_REDUCTION_ON_INCREMENTAL=!1:u.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,T=w.newGraphManager();return x(T.addRoot(),r.getTopMostNodes(f),w,e),S(w,T,p),C(w,e),w.runLayout(),_}}}),212:((e,t,n)=>{var r=function(){function e(e,t){for(var n=0;n0)if(f){var p=o.getTopMostNodes(t.eles.nodes());if(l=o.connectComponents(n,t.eles,p),l.forEach(function(e){var t=e.boundingBox();u.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,i.push(s(t))}),t.quality=="default"||t.quality==`proof`){var m=n.collection();if(t.tile){var h=new Map,g=[],_=[],v=0,y={nodeIndexes:h,xCoords:g,yCoords:_},b=[];if(l.forEach(function(e,t){e.edges().length==0&&(e.nodes().forEach(function(t,n){m.merge(e.nodes()[n]),t.isParent()||(y.nodeIndexes.set(e.nodes()[n].id(),v++),y.xCoords.push(e.nodes()[0].position().x),y.yCoords.push(e.nodes()[0].position().y))}),b.push(t))}),m.length>1){var x=m.boundingBox();u.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),l.push(m),i.push(y);for(var S=b.length-1;S>=0;S--)l.splice(b[S],1),i.splice(b[S],1),u.splice(b[S],1)}}l.forEach(function(e,n){t.eles=e,a.push(c(t,i[n])),o.relocateComponent(u[n],a[n],t)})}else l.forEach(function(e,n){o.relocateComponent(u[n],i[n],t)});var C=new Set;if(l.length>1){var w=[],T=r.filter(function(e){return e.css(`display`)==`none`});l.forEach(function(e,n){var r=void 0;if(t.quality==`draft`&&(r=i[n].nodeIndexes),e.nodes().not(T).length>0){var s={};s.edges=[],s.nodes=[];var c=void 0;e.nodes().not(T).forEach(function(e){if(t.quality==`draft`)if(!e.isParent())c=r.get(e.id()),s.nodes.push({x:i[n].xCoords[c]-e.boundingbox().w/2,y:i[n].yCoords[c]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else{var l=o.calcBoundingBox(e,i[n].xCoords,i[n].yCoords,r);s.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else a[n][e.id()]&&s.nodes.push({x:a[n][e.id()].getLeft(),y:a[n][e.id()].getTop(),width:a[n][e.id()].getWidth(),height:a[n][e.id()].getHeight()})}),e.edges().forEach(function(e){var c=e.source(),l=e.target();if(c.css(`display`)!=`none`&&l.css(`display`)!=`none`)if(t.quality==`draft`){var u=r.get(c.id()),d=r.get(l.id()),f=[],p=[];if(c.isParent()){var m=o.calcBoundingBox(c,i[n].xCoords,i[n].yCoords,r);f.push(m.topLeftX+m.width/2),f.push(m.topLeftY+m.height/2)}else f.push(i[n].xCoords[u]),f.push(i[n].yCoords[u]);if(l.isParent()){var h=o.calcBoundingBox(l,i[n].xCoords,i[n].yCoords,r);p.push(h.topLeftX+h.width/2),p.push(h.topLeftY+h.height/2)}else p.push(i[n].xCoords[d]),p.push(i[n].yCoords[d]);s.edges.push({startX:f[0],startY:f[1],endX:p[0],endY:p[1]})}else a[n][c.id()]&&a[n][l.id()]&&s.edges.push({startX:a[n][c.id()].getCenterX(),startY:a[n][c.id()].getCenterY(),endX:a[n][l.id()].getCenterX(),endY:a[n][l.id()].getCenterY()})}),s.nodes.length>0&&(w.push(s),C.add(n))}});var E=d.packComponents(w,t.randomize).shifts;if(t.quality==`draft`)i.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+E[t].dx}),r=e.yCoords.map(function(e){return e+E[t].dy});e.xCoords=n,e.yCoords=r});else{var D=0;C.forEach(function(e){Object.keys(a[e]).forEach(function(t){var n=a[e][t];n.setCenter(n.getCenterX()+E[D].dx,n.getCenterY()+E[D].dy)}),D++})}}}else{var O=t.eles.boundingBox();if(u.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),t.randomize){var k=s(t);i.push(k)}t.quality=="default"||t.quality==`proof`?(a.push(c(t,i[0])),o.relocateComponent(u[0],a[0],t)):o.relocateComponent(u[0],i[0],t)}var A=function(e,n){if(t.quality=="default"||t.quality==`proof`){typeof e==`number`&&(e=n);var r=void 0,o=void 0,s=e.data(`id`);return a.forEach(function(e){s in e&&(r={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},o=e[s])}),t.nodeDimensionsIncludeLabels&&(o.labelWidth&&(o.labelPosHorizontal==`left`?r.x+=o.labelWidth/2:o.labelPosHorizontal==`right`&&(r.x-=o.labelWidth/2)),o.labelHeight&&(o.labelPosVertical==`top`?r.y+=o.labelHeight/2:o.labelPosVertical==`bottom`&&(r.y-=o.labelHeight/2))),r??={x:e.position(`x`),y:e.position(`y`)},{x:r.x,y:r.y}}else{var c=void 0;return i.forEach(function(t){var n=t.nodeIndexes.get(e.id());n!=null&&(c={x:t.xCoords[n],y:t.yCoords[n]})}),c??={x:e.position(`x`),y:e.position(`y`)},{x:c.x,y:c.y}}};if(t.quality=="default"||t.quality==`proof`||t.randomize){var j=o.calcParentsWithoutChildren(n,r),M=r.filter(function(e){return e.css(`display`)==`none`});t.eles=r.not(M),r.nodes().not(`:parent`).not(M).layoutPositions(e,t,A),j.length>0&&j.forEach(function(e){e.position(A(e))})}else console.log(`If randomize option is set to false, then quality option must be 'default' or 'proof'.`)}}]),e}()}),657:((e,t,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var t=e.cy,n=e.eles,o=n.nodes(),s=n.nodes(`:parent`),c=new Map,l=new Map,u=new Map,d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=void 0,b=1e8,x=1e-9,S=e.piTol,C=e.samplingType,w=e.nodeSeparation,T=void 0,E=function(){for(var e=0,t=0,n=!1;t=i;){o=r[i++];for(var m=d[o],_=0;_u&&(u=h[x],f=x)}return f},O=function(e){var t=void 0;if(e){t=Math.floor(Math.random()*y);for(var n=0;n=1)break;u=l}for(var h=0;h=1)break;u=l}for(var b=0;b0&&(r.isParent()?d[t].push(u.get(r.id())):d[t].push(r.id()))})});var B=function(e){var n=l.get(e),r=void 0;c.get(e).forEach(function(i){r=t.getElementById(i).isParent()?u.get(i):i,d[n].push(r),d[l.get(r)].push(e)})},V=!0,ee=!1,te=void 0;try{for(var H=c.keys()[Symbol.iterator](),ne;!(V=(ne=H.next()).done);V=!0){var re=ne.value;B(re)}}catch(e){ee=!0,te=e}finally{try{!V&&H.return&&H.return()}finally{if(ee)throw te}}y=l.size;var U=void 0;if(y>2){T=y{var r=n(212),i=function(e){e&&e(`layout`,`fcose`,r)};typeof cytoscape<`u`&&i(cytoscape),e.exports=i}),140:(t=>{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(579)})()})}))(),1),A={L:`left`,R:`right`,T:`top`,B:`bottom`},j={L:i(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:i(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:i(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:i(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},M={L:i((e,t)=>e-t+2,`L`),R:i((e,t)=>e-2,`R`),T:i((e,t)=>e-t+2,`T`),B:i((e,t)=>e-2,`B`)},N=i(function(e){return F(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),P=i(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),F=i(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),I=i(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),L=i(function(e,t){let n=F(e)&&I(t),r=I(e)&&F(t);return n||r},`isArchitectureDirectionXY`),R=i(function(e){let t=e[0],n=e[1],r=F(t)&&I(n),i=I(t)&&F(n);return r||i},`isArchitecturePairXY`),z=i(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),B=i(function(e,t){let n=`${e}${t}`;return z(n)?n:void 0},`getArchitectureDirectionPair`),V=i(function([e,t],n){let r=n[0],i=n[1];return F(r)?I(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:F(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ee=i(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),te=i(function(e,t){return L(e,t)?`bend`:F(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),H=i(function(e){return e.type===`service`},`isArchitectureService`),ne=i(function(e){return e.type===`junction`},`isArchitectureJunction`),re=i((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),U=i(e=>e.data(),`edgeData`),W=i(e=>e.data(),`nodeData`),G=d.architecture,ie=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=c,this.getAccTitle=h,this.setDiagramTitle=s,this.getDiagramTitle=p,this.getAccDescription=f,this.setAccDescription=a,this.clear()}static{i(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,l()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(H)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(ne)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!P(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!P(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,t=new Map;for(let[n,r]of this.nodes.entries()){let i=new Map;for(let t of r.edges){let r=this.getNode(t.lhsId)?.in,a=this.getNode(t.rhsId)?.in;if(r&&a&&r!==a){let n=te(t.lhsDir,t.rhsDir);n!==`bend`&&e.set(re(r,a),n)}if(t.lhsId===n){let e=B(t.lhsDir,t.rhsDir);e&&i.set(e,t.rhsId)}else{let e=B(t.rhsDir,t.lhsDir);e&&i.set(e,t.lhsId)}}t.set(n,i)}let n=new Set,r=new Set(t.keys()),a=i(e=>{let i=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){n.add(e),r.delete(e);let o=t.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=i.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,t)=>{n.has(e)||(i.set(e,V([c,l],t)),a.push(e))})}}return i},`BFS`),o=[];for(;r.size>0;){let e=r.values().next().value;o.push(a(e))}this.dataStructures={adjList:t,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return v({...G,...u().architecture})}getConfigField(e){return this.getConfig()[e]}},K=i((e,t)=>{T(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),q={parser:{yy:void 0},parse:i(async e=>{let n=await w(`architecture`,e);t.debug(n);let r=q.parser?.yy;if(!(r instanceof ie))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);K(n,r)},`parse`)},ae=i(e=>`
+import{_ as e,m as t,p as n,v as r}from"./src-CDd1avoI.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as a,J as o,K as s,U as c,a as l,b as u,f as d,v as f,w as p,x as m,y as h,z as g}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{c as _,i as v}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{i as y,r as b,t as x}from"./chunk-PWAF6VOD-Dsc8rvy3.js";import{n as S}from"./chunk-GMAD6QVW-DO6QncBh.js";import{St as C}from"./mermaidParser.worker-CBWarbNh.js";import{n as w}from"./mermaid-parser.core-87cmcdBo.js";import{t as T}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as E}from"./cytoscape.esm-DtsSOjvk.js";var D=e(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=28)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(5);function l(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,n!=null&&t!=null?this.rect=new a(t.x,t.y,n.width,n.height):this.rect=new a}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(!(r.source==n||r.target==n))throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal==`right`&&this.setWidth(t+this.labelWidth)),this.labelHeight&&(this.labelPosVertical==`top`?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):this.labelPosVertical==`center`&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):this.labelPosVertical==`bottom`&&this.setHeight(n+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(7),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}else{var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(!(t.owner==n.owner&&t.owner==this))throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null}},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(!(t.owner!=null&&t.owner==this))throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;cn&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;mo&&(t=o),nc&&(r=c),ao&&(t=o),nc&&(r=c),a=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}else{i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(!(a!=null&&a.getGraphManager()==this))throw`Source not in this graph mgr!`;if(!(o!=null&&o.getGraphManager()==this))throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),!(n.source!=null&&n.target!=null))throw`Edge source and/or target is null!`;if(!(n.source.edges.indexOf(n)==-1&&n.target.edges.indexOf(n)==-1))throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n}},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(ia)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(ra?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j;break}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N;break}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r=0){var u=(-c+Math.sqrt(c*c-4*s*l))/(2*s),d=(-c-Math.sqrt(c*c-4*s*l))/(2*s);return u>=0&&u<=1?[u]:d>=0&&d<=1?[d]:null}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(5);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ta.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;nc||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=c.length||u>=c[0].length)){for(var d=0;de}}]),e}()}),(function(e,t,n){function r(){}r.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t=Math.min(this.m,this.n);this.s=function(e){for(var t=[];e-- >0;)t.push(0);return t}(Math.min(this.m+1,this.n)),this.U=function(e){return function e(t){if(t.length==0)return 0;for(var n=[],r=0;r0;)t.push(0);return t}(this.n),i=function(e){for(var t=[];e-- >0;)t.push(0);return t}(this.m),a=!0,o=!0,s=Math.min(this.m-1,this.n),c=Math.max(0,Math.min(this.n-2,this.m)),l=0;l=0;k--)if(this.s[k]!==0){for(var A=k+1;A=0;L--){if(function(e,t){return e&&t}(L0;){var U=void 0,W=void 0;for(U=E-2;U>=-1&&U!==-1;U--)if(Math.abs(n[U])<=re+ne*(Math.abs(this.s[U])+Math.abs(this.s[U+1]))){n[U]=0;break}if(U===E-2)W=4;else{var G=void 0;for(G=E-1;G>=U&&G!==U;G--){var ie=(G===E?0:Math.abs(n[G]))+(G===U+1?0:Math.abs(n[G-1]));if(Math.abs(this.s[G])<=re+ne*ie){this.s[G]=0;break}}G===U?W=3:G===E-1?W=1:(W=2,U=G)}switch(U++,W){case 1:var K=n[E-2];n[E-2]=0;for(var q=E-2;q>=U;q--){var ae=r.hypot(this.s[q],K),J=this.s[q]/ae,Y=K/ae;if(this.s[q]=ae,q!==U&&(K=-Y*n[q-1],n[q-1]=J*n[q-1]),o)for(var X=0;X=this.s[U+1]);){var De=this.s[U];if(this.s[U]=this.s[U+1],this.s[U+1]=De,o&&UMath.abs(t)?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):t==0?n=0:(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)),n},e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(D()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(D()):n.coseBase=r(n.layoutBase)})(e,function(e){return(()=>{var t={45:((e,t,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),e.exports=r}),806:((e,t,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,e.exports=i}),767:((e,t,n)=>{var r=n(551).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),880:((e,t,n)=>{var r=n(551).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),578:((e,t,n)=>{var r=n(551).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),765:((e,t,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),o=n(991),s=n(767),c=n(806),l=n(902),u=n(551).FDLayoutConstants,d=n(551).LayoutConstants,f=n(551).Point,p=n(551).PointD,m=n(551).DimensionD,h=n(551).Layout,g=n(551).Integer,_=n(551).IGeometry,v=n(551).LGraph,y=n(551).Transform,b=n(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var S in x.prototype=Object.create(r.prototype),r)x[S]=r[S];x.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},x.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},x.prototype.newNode=function(e){return new o(this.graphManager,e)},x.prototype.newEdge=function(e){return new s(null,null,e)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n0&&this.updateDisplacements();for(var n=0;n0&&(r.fixedNodeWeight=a)}}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var l=this.constraints.alignmentConstraint.vertical,n=0;n=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var n=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=s.has(t.top)?s.get(t.top):t.top,a=s.has(t.bottom)?s.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}});else{var d=new Map,f=new Map;this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var t=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;d.has(t)?d.get(t).push(n):d.set(t,[n]),d.has(n)?d.get(n).push(t):d.set(n,[t])}else{var r=s.has(e.top)?s.get(e.top):e.top,i=s.has(e.bottom)?s.get(e.bottom):e.bottom;f.has(r)?f.get(r).push(i):f.set(r,[i]),f.has(i)?f.get(i).push(r):f.set(i,[r])}});var p=function(e,t){var n=[],r=[],i=new b,a=new Set,o=0;return e.forEach(function(s,c){if(!a.has(c)){n[o]=[],r[o]=!1;var l=c;for(i.push(l),a.add(l),n[o].push(l);i.length!=0;)l=i.shift(),t.has(l)&&(r[o]=!0),e.get(l).forEach(function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))});o++}}),{components:n,isFixed:r}},m=p(d,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=m.components,this.fixedComponentsOnHorizontal=m.isFixed;var h=p(f,e.fixedNodesOnVertical);this.componentsOnVertical=h.components,this.fixedComponentsOnVertical=h.isFixed}}},x.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n1){var s;for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},x.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var g=h[0];h.splice(0,1);var v=u.indexOf(g);v>=0&&u.splice(v,1),p--,d--}m=t==null?0:(u.indexOf(h[0])+1)%p;for(var y=Math.abs(r-n)/d,b=m;f!=d;b=++b%p){var S=u[b].getOtherEnd(e);if(S!=t){var C=(n+f*y)%360,w=(C+y)%360;x.branchRadialLayout(S,e,C,w,i+a,a),f++}}},x.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;li?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):r.labelPosHorizontal==`right`&&r.setWidth(i+r.labelWidth)),r.labelHeight&&(r.labelPosVertical==`top`?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):r.labelPosVertical==`center`&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):r.labelPosVertical==`bottom`&&r.setHeight(a+r.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop,a=t.labelMarginLeft,o=t.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i,a,o)}},x.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop,o=r.labelMarginLeft,s=r.labelMarginTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a,o,s)})},x.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;ru&&(u=f.rect.height)}n+=u+e.verticalPadding}},x.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];if(n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&(i.labelPosHorizontal==`left`?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):i.labelPosHorizontal==`center`&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):i.labelPosHorizontal==`right`&&i.setWidth(a+i.labelWidth)),i.labelHeight&&(i.labelPosVertical==`top`?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):i.labelPosVertical==`center`&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):i.labelPosVertical==`bottom`&&i.setHeight(o+i.labelHeight))}})},x.prototype.tileNodes=function(e,t){var n=this.tileNodesByFavoringDim(e,t,!0),r=this.tileNodesByFavoringDim(e,t,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=e.getWidth())});var l=a/i,u=o/i,d=(n-r)**2+4*(l+r)*(u+n)*i,f=(r-n+Math.sqrt(d))/(2*(l+r)),p;t?(p=Math.ceil(f),p==f&&p++):p=Math.floor(f);var m=p*(l+r)-r;return s>m&&(m=s),m+=r*2,m},x.prototype.tileNodesByFavoringDim=function(e,t,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,a=c.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(o.idealRowWidth=this.calcIdealRowWidth(e,n));var s=function(e){return e.rect.width*e.rect.height},l=function(e,t){return s(t)-s(e)};e.sort(function(e,t){var n=l;return o.idealRowWidth?(n=a,n(e.id,t.id)):n(e,t)});for(var u=0,d=0,f=0;f0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},x.prototype.canAddHorizontal=function(e,t,n){if(e.idealRowWidth){var r=e.rows.length-1;return e.rowWidth[r]+t+e.horizontalPadding<=e.idealRowWidth}var i=this.getShortestRowIndex(e);if(i<0)return!0;var a=e.rowWidth[i];if(a+e.horizontalPadding+t<=e.width)return!0;var o=0;e.rowHeight[i]0&&(o=n+e.verticalPadding-e.rowHeight[i]);var s=e.width-a>=t+e.horizontalPadding?(e.height+o)/(a+t+e.horizontalPadding):(e.height+o)/e.width;o=n+e.verticalPadding;var c=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=g.MAX_VALUE,p,m,h=0;h{var r=n(551).FDLayoutNode,i=n(551).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i{function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){var a=0;r.forEach(function(e){t==`horizontal`?(f.set(e,c.has(e)?l[c.get(e)]:i.get(e)),a+=f.get(e)):(f.set(e,c.has(e)?u[c.get(e)]:i.get(e)),a+=f.get(e))}),a/=r.length,e.forEach(function(e){n.has(e)||f.set(e,a)})}else{var o=0;e.forEach(function(e){t==`horizontal`?o+=c.has(e)?l[c.get(e)]:i.get(e):o+=c.has(e)?u[c.get(e)]:i.get(e)}),o/=e.length,e.forEach(function(e){f.set(e,o)})}});for(var h=function(){var r=m.shift();e.get(r).forEach(function(e){if(f.get(e.id)o&&(o=v),ys&&(s=y)}}catch(e){p=!0,m=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw m}}var b=(r+o)/2-(a+s)/2,x=!0,S=!1,C=void 0;try{for(var w=e[Symbol.iterator](),T;!(x=(T=w.next()).done);x=!0){var E=T.value;f.set(E,f.get(E)+b)}}catch(e){S=!0,C=e}finally{try{!x&&w.return&&w.return()}finally{if(S)throw C}}})}return f},v=function(e){var t=0,n=0,r=0,i=0;if(e.forEach(function(e){e.left?l[c.get(e.left)]-l[c.get(e.right)]>=0?t++:n++:u[c.get(e.top)]-u[c.get(e.bottom)]>=0?r++:i++}),t>n&&r>i)for(var a=0;an)for(var o=0;oi)for(var s=0;s1)t.fixedNodeConstraint.forEach(function(e,t){S[t]=[e.position.x,e.position.y],C[t]=[l[c.get(e.nodeId)],u[c.get(e.nodeId)]]}),w=!0;else if(t.alignmentConstraint)(function(){var e=0;if(t.alignmentConstraint.vertical){for(var n=t.alignmentConstraint.vertical,i=function(t){var i=new Set;n[t].forEach(function(e){i.add(e)});var a=new Set([].concat(r(i)).filter(function(e){return E.has(e)})),o=void 0;o=a.size>0?l[c.get(a.values().next().value)]:g(i).x,n[t].forEach(function(t){S[e]=[o,u[c.get(t)]],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},a=0;a0?l[c.get(i.values().next().value)]:g(n).y,o[t].forEach(function(t){S[e]=[l[c.get(t)],a],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},d=0;dA&&(A=k[M].length,j=M);if(A0){var W={x:0,y:0};t.fixedNodeConstraint.forEach(function(e,t){var n={x:l[c.get(e.nodeId)],y:u[c.get(e.nodeId)]},r=e.position,i=h(r,n);W.x+=i.x,W.y+=i.y}),W.x/=t.fixedNodeConstraint.length,W.y/=t.fixedNodeConstraint.length,l.forEach(function(e,t){l[t]+=W.x}),u.forEach(function(e,t){u[t]+=W.y}),t.fixedNodeConstraint.forEach(function(e){l[c.get(e.nodeId)]=e.position.x,u[c.get(e.nodeId)]=e.position.y})}if(t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var G=t.alignmentConstraint.vertical,ie=function(e){var t=new Set;G[e].forEach(function(e){t.add(e)});var n=new Set([].concat(r(t)).filter(function(e){return E.has(e)})),i=void 0;i=n.size>0?l[c.get(n.values().next().value)]:g(t).x,t.forEach(function(e){E.has(e)||(l[c.get(e)]=i)})},K=0;K0?u[c.get(n.values().next().value)]:g(t).y,t.forEach(function(e){E.has(e)||(u[c.get(e)]=i)})},J=0;J{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(45)})()})})),k=r(e(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(O()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeFcose=r(O()):n.cytoscapeFcose=r(n.coseBase)})(e,function(e){return(()=>{var t={658:(e=>{e.exports=Object.assign==null?function(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}:Object.assign.bind(Object)}),548:((e,t,n)=>{var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=n(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(e){for(var t={},n=0;n0&&l.merge(e)});for(var u=0;u1){l=s[0],u=l.connectedEdges().length,s.forEach(function(e){e.connectedEdges().length0&&r.set(`dummy`+(r.size+1),p),m},a.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var i=1/0,a=-1/0,o=1/0,s=-1/0;if(n.quality==`draft`){var c=!0,l=!1,u=void 0;try{for(var d=t.nodeIndexes[Symbol.iterator](),f;!(c=(f=d.next()).done);c=!0){var p=f.value,m=r(p,2),h=m[0],g=m[1],_=n.cy.getElementById(h);if(_){var v=_.boundingBox(),y=t.xCoords[g]-v.w/2,b=t.xCoords[g]+v.w/2,x=t.yCoords[g]-v.h/2,S=t.yCoords[g]+v.h/2;ya&&(a=b),xs&&(s=S)}}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}var C=e.x-(a+i)/2,w=e.y-(s+o)/2;t.xCoords=t.xCoords.map(function(e){return e+C}),t.yCoords=t.yCoords.map(function(e){return e+w})}else{Object.keys(t).forEach(function(e){var n=t[e],r=n.getRect().x,c=n.getRect().x+n.getRect().width,l=n.getRect().y,u=n.getRect().y+n.getRect().height;ra&&(a=c),ls&&(s=u)});var T=e.x-(a+i)/2,E=e.y-(s+o)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+T,n.getCenterY()+E)})}}},a.calcBoundingBox=function(e,t,n,r){for(var i=2**53-1,a=-(2**53-1),o=2**53-1,s=-(2**53-1),c=void 0,l=void 0,u=void 0,d=void 0,f=e.descendants().not(`:parent`),p=f.length,m=0;mc&&(i=c),au&&(o=u),s{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,o=n(140).layoutBase.PointD,s=n(140).layoutBase.DimensionD,c=n(140).layoutBase.LayoutConstants,l=n(140).layoutBase.FDLayoutConstants,u=n(140).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.cy,d=e.eles,f=d.nodes(),p=d.edges(),m=void 0,h=void 0,g=void 0,_={};e.randomize&&(m=t.nodeIndexes,h=t.xCoords,g=t.yCoords);var v=function(e){return typeof e==`function`},y=function(e,t){return v(e)?e(t):e},b=r.calcParentsWithoutChildren(n,d),x=function e(t,n,i,c){for(var l=n.length,u=0;u0){var S=void 0;S=i.getGraphManager().add(i.newGraph(),p),e(S,f,i,c)}}},S=function(t,n,r){for(var i=0,a=0,o=0;o0?u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=i/a:v(e.idealEdgeLength)?u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=e.idealEdgeLength,u.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)},C=function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)};e.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(u.MAX_ITERATIONS=l.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(u.TILING_COMPARE_BY=e.tilingCompareBy),e.quality==`proof`?c.QUALITY=2:c.QUALITY=0,u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!e.randomize,u.ANIMATE=l.ANIMATE=c.ANIMATE=e.animate,u.TILE=e.tile,u.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,u.PURE_INCREMENTAL=!e.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step==`transformed`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!1),e.step==`enforced`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!1),e.step==`cose`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!0),e.step==`all`&&(e.randomize?u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0),e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint?u.TREE_REDUCTION_ON_INCREMENTAL=!1:u.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,T=w.newGraphManager();return x(T.addRoot(),r.getTopMostNodes(f),w,e),S(w,T,p),C(w,e),w.runLayout(),_}}}),212:((e,t,n)=>{var r=function(){function e(e,t){for(var n=0;n0)if(f){var p=o.getTopMostNodes(t.eles.nodes());if(l=o.connectComponents(n,t.eles,p),l.forEach(function(e){var t=e.boundingBox();u.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,i.push(s(t))}),t.quality=="default"||t.quality==`proof`){var m=n.collection();if(t.tile){var h=new Map,g=[],_=[],v=0,y={nodeIndexes:h,xCoords:g,yCoords:_},b=[];if(l.forEach(function(e,t){e.edges().length==0&&(e.nodes().forEach(function(t,n){m.merge(e.nodes()[n]),t.isParent()||(y.nodeIndexes.set(e.nodes()[n].id(),v++),y.xCoords.push(e.nodes()[0].position().x),y.yCoords.push(e.nodes()[0].position().y))}),b.push(t))}),m.length>1){var x=m.boundingBox();u.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),l.push(m),i.push(y);for(var S=b.length-1;S>=0;S--)l.splice(b[S],1),i.splice(b[S],1),u.splice(b[S],1)}}l.forEach(function(e,n){t.eles=e,a.push(c(t,i[n])),o.relocateComponent(u[n],a[n],t)})}else l.forEach(function(e,n){o.relocateComponent(u[n],i[n],t)});var C=new Set;if(l.length>1){var w=[],T=r.filter(function(e){return e.css(`display`)==`none`});l.forEach(function(e,n){var r=void 0;if(t.quality==`draft`&&(r=i[n].nodeIndexes),e.nodes().not(T).length>0){var s={};s.edges=[],s.nodes=[];var c=void 0;e.nodes().not(T).forEach(function(e){if(t.quality==`draft`)if(!e.isParent())c=r.get(e.id()),s.nodes.push({x:i[n].xCoords[c]-e.boundingbox().w/2,y:i[n].yCoords[c]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else{var l=o.calcBoundingBox(e,i[n].xCoords,i[n].yCoords,r);s.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else a[n][e.id()]&&s.nodes.push({x:a[n][e.id()].getLeft(),y:a[n][e.id()].getTop(),width:a[n][e.id()].getWidth(),height:a[n][e.id()].getHeight()})}),e.edges().forEach(function(e){var c=e.source(),l=e.target();if(c.css(`display`)!=`none`&&l.css(`display`)!=`none`)if(t.quality==`draft`){var u=r.get(c.id()),d=r.get(l.id()),f=[],p=[];if(c.isParent()){var m=o.calcBoundingBox(c,i[n].xCoords,i[n].yCoords,r);f.push(m.topLeftX+m.width/2),f.push(m.topLeftY+m.height/2)}else f.push(i[n].xCoords[u]),f.push(i[n].yCoords[u]);if(l.isParent()){var h=o.calcBoundingBox(l,i[n].xCoords,i[n].yCoords,r);p.push(h.topLeftX+h.width/2),p.push(h.topLeftY+h.height/2)}else p.push(i[n].xCoords[d]),p.push(i[n].yCoords[d]);s.edges.push({startX:f[0],startY:f[1],endX:p[0],endY:p[1]})}else a[n][c.id()]&&a[n][l.id()]&&s.edges.push({startX:a[n][c.id()].getCenterX(),startY:a[n][c.id()].getCenterY(),endX:a[n][l.id()].getCenterX(),endY:a[n][l.id()].getCenterY()})}),s.nodes.length>0&&(w.push(s),C.add(n))}});var E=d.packComponents(w,t.randomize).shifts;if(t.quality==`draft`)i.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+E[t].dx}),r=e.yCoords.map(function(e){return e+E[t].dy});e.xCoords=n,e.yCoords=r});else{var D=0;C.forEach(function(e){Object.keys(a[e]).forEach(function(t){var n=a[e][t];n.setCenter(n.getCenterX()+E[D].dx,n.getCenterY()+E[D].dy)}),D++})}}}else{var O=t.eles.boundingBox();if(u.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),t.randomize){var k=s(t);i.push(k)}t.quality=="default"||t.quality==`proof`?(a.push(c(t,i[0])),o.relocateComponent(u[0],a[0],t)):o.relocateComponent(u[0],i[0],t)}var A=function(e,n){if(t.quality=="default"||t.quality==`proof`){typeof e==`number`&&(e=n);var r=void 0,o=void 0,s=e.data(`id`);return a.forEach(function(e){s in e&&(r={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},o=e[s])}),t.nodeDimensionsIncludeLabels&&(o.labelWidth&&(o.labelPosHorizontal==`left`?r.x+=o.labelWidth/2:o.labelPosHorizontal==`right`&&(r.x-=o.labelWidth/2)),o.labelHeight&&(o.labelPosVertical==`top`?r.y+=o.labelHeight/2:o.labelPosVertical==`bottom`&&(r.y-=o.labelHeight/2))),r??={x:e.position(`x`),y:e.position(`y`)},{x:r.x,y:r.y}}else{var c=void 0;return i.forEach(function(t){var n=t.nodeIndexes.get(e.id());n!=null&&(c={x:t.xCoords[n],y:t.yCoords[n]})}),c??={x:e.position(`x`),y:e.position(`y`)},{x:c.x,y:c.y}}};if(t.quality=="default"||t.quality==`proof`||t.randomize){var j=o.calcParentsWithoutChildren(n,r),M=r.filter(function(e){return e.css(`display`)==`none`});t.eles=r.not(M),r.nodes().not(`:parent`).not(M).layoutPositions(e,t,A),j.length>0&&j.forEach(function(e){e.position(A(e))})}else console.log(`If randomize option is set to false, then quality option must be 'default' or 'proof'.`)}}]),e}()}),657:((e,t,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var t=e.cy,n=e.eles,o=n.nodes(),s=n.nodes(`:parent`),c=new Map,l=new Map,u=new Map,d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=void 0,b=1e8,x=1e-9,S=e.piTol,C=e.samplingType,w=e.nodeSeparation,T=void 0,E=function(){for(var e=0,t=0,n=!1;t=i;){o=r[i++];for(var m=d[o],_=0;_u&&(u=h[x],f=x)}return f},O=function(e){var t=void 0;if(e){t=Math.floor(Math.random()*y);for(var n=0;n=1)break;u=l}for(var h=0;h=1)break;u=l}for(var b=0;b0&&(r.isParent()?d[t].push(u.get(r.id())):d[t].push(r.id()))})});var B=function(e){var n=l.get(e),r=void 0;c.get(e).forEach(function(i){r=t.getElementById(i).isParent()?u.get(i):i,d[n].push(r),d[l.get(r)].push(e)})},V=!0,ee=!1,te=void 0;try{for(var H=c.keys()[Symbol.iterator](),ne;!(V=(ne=H.next()).done);V=!0){var re=ne.value;B(re)}}catch(e){ee=!0,te=e}finally{try{!V&&H.return&&H.return()}finally{if(ee)throw te}}y=l.size;var U=void 0;if(y>2){T=y{var r=n(212),i=function(e){e&&e(`layout`,`fcose`,r)};typeof cytoscape<`u`&&i(cytoscape),e.exports=i}),140:(t=>{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(579)})()})}))(),1),A={L:`left`,R:`right`,T:`top`,B:`bottom`},j={L:i(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:i(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:i(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:i(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},M={L:i((e,t)=>e-t+2,`L`),R:i((e,t)=>e-2,`R`),T:i((e,t)=>e-t+2,`T`),B:i((e,t)=>e-2,`B`)},N=i(function(e){return F(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),P=i(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),F=i(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),I=i(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),L=i(function(e,t){let n=F(e)&&I(t),r=I(e)&&F(t);return n||r},`isArchitectureDirectionXY`),R=i(function(e){let t=e[0],n=e[1],r=F(t)&&I(n),i=I(t)&&F(n);return r||i},`isArchitecturePairXY`),z=i(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),B=i(function(e,t){let n=`${e}${t}`;return z(n)?n:void 0},`getArchitectureDirectionPair`),V=i(function([e,t],n){let r=n[0],i=n[1];return F(r)?I(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:F(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ee=i(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),te=i(function(e,t){return L(e,t)?`bend`:F(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),H=i(function(e){return e.type===`service`},`isArchitectureService`),ne=i(function(e){return e.type===`junction`},`isArchitectureJunction`),re=i((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),U=i(e=>e.data(),`edgeData`),W=i(e=>e.data(),`nodeData`),G=d.architecture,ie=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=c,this.getAccTitle=h,this.setDiagramTitle=s,this.getDiagramTitle=p,this.getAccDescription=f,this.setAccDescription=a,this.clear()}static{i(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,l()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(H)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(ne)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!P(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!P(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,t=new Map;for(let[n,r]of this.nodes.entries()){let i=new Map;for(let t of r.edges){let r=this.getNode(t.lhsId)?.in,a=this.getNode(t.rhsId)?.in;if(r&&a&&r!==a){let n=te(t.lhsDir,t.rhsDir);n!==`bend`&&e.set(re(r,a),n)}if(t.lhsId===n){let e=B(t.lhsDir,t.rhsDir);e&&i.set(e,t.rhsId)}else{let e=B(t.rhsDir,t.lhsDir);e&&i.set(e,t.lhsId)}}t.set(n,i)}let n=new Set,r=new Set(t.keys()),a=i(e=>{let i=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){n.add(e),r.delete(e);let o=t.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=i.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,t)=>{n.has(e)||(i.set(e,V([c,l],t)),a.push(e))})}}return i},`BFS`),o=[];for(;r.size>0;){let e=r.values().next().value;o.push(a(e))}this.dataStructures={adjList:t,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return v({...G,...u().architecture})}getConfigField(e){return this.getConfig()[e]}},K=i((e,t)=>{T(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),q={parser:{yy:void 0},parse:i(async e=>{let n=await w(`architecture`,e);t.debug(n);let r=q.parser?.yy;if(!(r instanceof ie))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);K(n,r)},`parse`)},ae=i(e=>`
   .edge {
     stroke-width: ${e.archEdgeWidth};
     stroke: ${e.archEdgeColor};
diff --git a/apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-VuwMdVnu.js b/apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-DvETkgeM.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-VuwMdVnu.js
rename to apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-DvETkgeM.js
index 2638c4804..c8f0351de 100644
--- a/apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-VuwMdVnu.js
+++ b/apps/pythinker-code/dist-web/assets/architectureDiagram-5GKGNRK7-DvETkgeM.js
@@ -1,4 +1,4 @@
-import{r as e,t}from"./chunk-QTnfLwEv.js";import{n}from"./mermaid-parser.core-BCOGZFb-.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as i,p as a}from"./src-Cn6kALDM.js";import{H as o,J as s,K as c,U as l,a as u,b as d,f,v as p,w as m,x as h,y as g,z as _}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{c as v,i as y}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as b}from"./chunk-CLGD4ZFX-D_luxf7b.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";import{i as S,r as C,t as w}from"./chunk-PWAF6VOD-vmg_e0ho.js";import{n as T}from"./chunk-GMAD6QVW-xizYnG4f.js";import{t as E}from"./cytoscape.esm-dytuJj4e.js";var D=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=28)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(5);function l(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,n!=null&&t!=null?this.rect=new a(t.x,t.y,n.width,n.height):this.rect=new a}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(!(r.source==n||r.target==n))throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal==`right`&&this.setWidth(t+this.labelWidth)),this.labelHeight&&(this.labelPosVertical==`top`?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):this.labelPosVertical==`center`&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):this.labelPosVertical==`bottom`&&this.setHeight(n+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(7),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}else{var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(!(t.owner==n.owner&&t.owner==this))throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null}},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(!(t.owner!=null&&t.owner==this))throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;cn&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;mo&&(t=o),nc&&(r=c),ao&&(t=o),nc&&(r=c),a=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}else{i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(!(a!=null&&a.getGraphManager()==this))throw`Source not in this graph mgr!`;if(!(o!=null&&o.getGraphManager()==this))throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),!(n.source!=null&&n.target!=null))throw`Edge source and/or target is null!`;if(!(n.source.edges.indexOf(n)==-1&&n.target.edges.indexOf(n)==-1))throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n}},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(ia)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(ra?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j;break}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N;break}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r=0){var u=(-c+Math.sqrt(c*c-4*s*l))/(2*s),d=(-c-Math.sqrt(c*c-4*s*l))/(2*s);return u>=0&&u<=1?[u]:d>=0&&d<=1?[d]:null}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(5);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ta.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;nc||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=c.length||u>=c[0].length)){for(var d=0;de}}]),e}()}),(function(e,t,n){function r(){}r.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t=Math.min(this.m,this.n);this.s=function(e){for(var t=[];e-- >0;)t.push(0);return t}(Math.min(this.m+1,this.n)),this.U=function(e){return function e(t){if(t.length==0)return 0;for(var n=[],r=0;r0;)t.push(0);return t}(this.n),i=function(e){for(var t=[];e-- >0;)t.push(0);return t}(this.m),a=!0,o=!0,s=Math.min(this.m-1,this.n),c=Math.max(0,Math.min(this.n-2,this.m)),l=0;l=0;k--)if(this.s[k]!==0){for(var A=k+1;A=0;L--){if(function(e,t){return e&&t}(L0;){var U=void 0,W=void 0;for(U=E-2;U>=-1&&U!==-1;U--)if(Math.abs(n[U])<=re+ne*(Math.abs(this.s[U])+Math.abs(this.s[U+1]))){n[U]=0;break}if(U===E-2)W=4;else{var G=void 0;for(G=E-1;G>=U&&G!==U;G--){var ie=(G===E?0:Math.abs(n[G]))+(G===U+1?0:Math.abs(n[G-1]));if(Math.abs(this.s[G])<=re+ne*ie){this.s[G]=0;break}}G===U?W=3:G===E-1?W=1:(W=2,U=G)}switch(U++,W){case 1:var K=n[E-2];n[E-2]=0;for(var q=E-2;q>=U;q--){var ae=r.hypot(this.s[q],K),J=this.s[q]/ae,Y=K/ae;if(this.s[q]=ae,q!==U&&(K=-Y*n[q-1],n[q-1]=J*n[q-1]),o)for(var X=0;X=this.s[U+1]);){var De=this.s[U];if(this.s[U]=this.s[U+1],this.s[U+1]=De,o&&UMath.abs(t)?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):t==0?n=0:(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)),n},e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(D()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(D()):n.coseBase=r(n.layoutBase)})(e,function(e){return(()=>{var t={45:((e,t,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),e.exports=r}),806:((e,t,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,e.exports=i}),767:((e,t,n)=>{var r=n(551).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),880:((e,t,n)=>{var r=n(551).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),578:((e,t,n)=>{var r=n(551).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),765:((e,t,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),o=n(991),s=n(767),c=n(806),l=n(902),u=n(551).FDLayoutConstants,d=n(551).LayoutConstants,f=n(551).Point,p=n(551).PointD,m=n(551).DimensionD,h=n(551).Layout,g=n(551).Integer,_=n(551).IGeometry,v=n(551).LGraph,y=n(551).Transform,b=n(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var S in x.prototype=Object.create(r.prototype),r)x[S]=r[S];x.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},x.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},x.prototype.newNode=function(e){return new o(this.graphManager,e)},x.prototype.newEdge=function(e){return new s(null,null,e)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n0&&this.updateDisplacements();for(var n=0;n0&&(r.fixedNodeWeight=a)}}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var l=this.constraints.alignmentConstraint.vertical,n=0;n=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var n=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=s.has(t.top)?s.get(t.top):t.top,a=s.has(t.bottom)?s.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}});else{var d=new Map,f=new Map;this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var t=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;d.has(t)?d.get(t).push(n):d.set(t,[n]),d.has(n)?d.get(n).push(t):d.set(n,[t])}else{var r=s.has(e.top)?s.get(e.top):e.top,i=s.has(e.bottom)?s.get(e.bottom):e.bottom;f.has(r)?f.get(r).push(i):f.set(r,[i]),f.has(i)?f.get(i).push(r):f.set(i,[r])}});var p=function(e,t){var n=[],r=[],i=new b,a=new Set,o=0;return e.forEach(function(s,c){if(!a.has(c)){n[o]=[],r[o]=!1;var l=c;for(i.push(l),a.add(l),n[o].push(l);i.length!=0;)l=i.shift(),t.has(l)&&(r[o]=!0),e.get(l).forEach(function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))});o++}}),{components:n,isFixed:r}},m=p(d,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=m.components,this.fixedComponentsOnHorizontal=m.isFixed;var h=p(f,e.fixedNodesOnVertical);this.componentsOnVertical=h.components,this.fixedComponentsOnVertical=h.isFixed}}},x.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n1){var s;for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},x.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var g=h[0];h.splice(0,1);var v=u.indexOf(g);v>=0&&u.splice(v,1),p--,d--}m=t==null?0:(u.indexOf(h[0])+1)%p;for(var y=Math.abs(r-n)/d,b=m;f!=d;b=++b%p){var S=u[b].getOtherEnd(e);if(S!=t){var C=(n+f*y)%360,w=(C+y)%360;x.branchRadialLayout(S,e,C,w,i+a,a),f++}}},x.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;li?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):r.labelPosHorizontal==`right`&&r.setWidth(i+r.labelWidth)),r.labelHeight&&(r.labelPosVertical==`top`?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):r.labelPosVertical==`center`&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):r.labelPosVertical==`bottom`&&r.setHeight(a+r.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop,a=t.labelMarginLeft,o=t.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i,a,o)}},x.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop,o=r.labelMarginLeft,s=r.labelMarginTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a,o,s)})},x.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;ru&&(u=f.rect.height)}n+=u+e.verticalPadding}},x.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];if(n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&(i.labelPosHorizontal==`left`?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):i.labelPosHorizontal==`center`&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):i.labelPosHorizontal==`right`&&i.setWidth(a+i.labelWidth)),i.labelHeight&&(i.labelPosVertical==`top`?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):i.labelPosVertical==`center`&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):i.labelPosVertical==`bottom`&&i.setHeight(o+i.labelHeight))}})},x.prototype.tileNodes=function(e,t){var n=this.tileNodesByFavoringDim(e,t,!0),r=this.tileNodesByFavoringDim(e,t,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=e.getWidth())});var l=a/i,u=o/i,d=(n-r)**2+4*(l+r)*(u+n)*i,f=(r-n+Math.sqrt(d))/(2*(l+r)),p;t?(p=Math.ceil(f),p==f&&p++):p=Math.floor(f);var m=p*(l+r)-r;return s>m&&(m=s),m+=r*2,m},x.prototype.tileNodesByFavoringDim=function(e,t,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,a=c.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(o.idealRowWidth=this.calcIdealRowWidth(e,n));var s=function(e){return e.rect.width*e.rect.height},l=function(e,t){return s(t)-s(e)};e.sort(function(e,t){var n=l;return o.idealRowWidth?(n=a,n(e.id,t.id)):n(e,t)});for(var u=0,d=0,f=0;f0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},x.prototype.canAddHorizontal=function(e,t,n){if(e.idealRowWidth){var r=e.rows.length-1;return e.rowWidth[r]+t+e.horizontalPadding<=e.idealRowWidth}var i=this.getShortestRowIndex(e);if(i<0)return!0;var a=e.rowWidth[i];if(a+e.horizontalPadding+t<=e.width)return!0;var o=0;e.rowHeight[i]0&&(o=n+e.verticalPadding-e.rowHeight[i]);var s=e.width-a>=t+e.horizontalPadding?(e.height+o)/(a+t+e.horizontalPadding):(e.height+o)/e.width;o=n+e.verticalPadding;var c=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=g.MAX_VALUE,p,m,h=0;h{var r=n(551).FDLayoutNode,i=n(551).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i{function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){var a=0;r.forEach(function(e){t==`horizontal`?(f.set(e,c.has(e)?l[c.get(e)]:i.get(e)),a+=f.get(e)):(f.set(e,c.has(e)?u[c.get(e)]:i.get(e)),a+=f.get(e))}),a/=r.length,e.forEach(function(e){n.has(e)||f.set(e,a)})}else{var o=0;e.forEach(function(e){t==`horizontal`?o+=c.has(e)?l[c.get(e)]:i.get(e):o+=c.has(e)?u[c.get(e)]:i.get(e)}),o/=e.length,e.forEach(function(e){f.set(e,o)})}});for(var h=function(){var r=m.shift();e.get(r).forEach(function(e){if(f.get(e.id)o&&(o=v),ys&&(s=y)}}catch(e){p=!0,m=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw m}}var b=(r+o)/2-(a+s)/2,x=!0,S=!1,C=void 0;try{for(var w=e[Symbol.iterator](),T;!(x=(T=w.next()).done);x=!0){var E=T.value;f.set(E,f.get(E)+b)}}catch(e){S=!0,C=e}finally{try{!x&&w.return&&w.return()}finally{if(S)throw C}}})}return f},v=function(e){var t=0,n=0,r=0,i=0;if(e.forEach(function(e){e.left?l[c.get(e.left)]-l[c.get(e.right)]>=0?t++:n++:u[c.get(e.top)]-u[c.get(e.bottom)]>=0?r++:i++}),t>n&&r>i)for(var a=0;an)for(var o=0;oi)for(var s=0;s1)t.fixedNodeConstraint.forEach(function(e,t){S[t]=[e.position.x,e.position.y],C[t]=[l[c.get(e.nodeId)],u[c.get(e.nodeId)]]}),w=!0;else if(t.alignmentConstraint)(function(){var e=0;if(t.alignmentConstraint.vertical){for(var n=t.alignmentConstraint.vertical,i=function(t){var i=new Set;n[t].forEach(function(e){i.add(e)});var a=new Set([].concat(r(i)).filter(function(e){return E.has(e)})),o=void 0;o=a.size>0?l[c.get(a.values().next().value)]:g(i).x,n[t].forEach(function(t){S[e]=[o,u[c.get(t)]],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},a=0;a0?l[c.get(i.values().next().value)]:g(n).y,o[t].forEach(function(t){S[e]=[l[c.get(t)],a],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},d=0;dA&&(A=k[M].length,j=M);if(A0){var W={x:0,y:0};t.fixedNodeConstraint.forEach(function(e,t){var n={x:l[c.get(e.nodeId)],y:u[c.get(e.nodeId)]},r=e.position,i=h(r,n);W.x+=i.x,W.y+=i.y}),W.x/=t.fixedNodeConstraint.length,W.y/=t.fixedNodeConstraint.length,l.forEach(function(e,t){l[t]+=W.x}),u.forEach(function(e,t){u[t]+=W.y}),t.fixedNodeConstraint.forEach(function(e){l[c.get(e.nodeId)]=e.position.x,u[c.get(e.nodeId)]=e.position.y})}if(t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var G=t.alignmentConstraint.vertical,ie=function(e){var t=new Set;G[e].forEach(function(e){t.add(e)});var n=new Set([].concat(r(t)).filter(function(e){return E.has(e)})),i=void 0;i=n.size>0?l[c.get(n.values().next().value)]:g(t).x,t.forEach(function(e){E.has(e)||(l[c.get(e)]=i)})},K=0;K0?u[c.get(n.values().next().value)]:g(t).y,t.forEach(function(e){E.has(e)||(u[c.get(e)]=i)})},J=0;J{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(45)})()})})),k=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(O()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeFcose=r(O()):n.cytoscapeFcose=r(n.coseBase)})(e,function(e){return(()=>{var t={658:(e=>{e.exports=Object.assign==null?function(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}:Object.assign.bind(Object)}),548:((e,t,n)=>{var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=n(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(e){for(var t={},n=0;n0&&l.merge(e)});for(var u=0;u1){l=s[0],u=l.connectedEdges().length,s.forEach(function(e){e.connectedEdges().length0&&r.set(`dummy`+(r.size+1),p),m},a.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var i=1/0,a=-1/0,o=1/0,s=-1/0;if(n.quality==`draft`){var c=!0,l=!1,u=void 0;try{for(var d=t.nodeIndexes[Symbol.iterator](),f;!(c=(f=d.next()).done);c=!0){var p=f.value,m=r(p,2),h=m[0],g=m[1],_=n.cy.getElementById(h);if(_){var v=_.boundingBox(),y=t.xCoords[g]-v.w/2,b=t.xCoords[g]+v.w/2,x=t.yCoords[g]-v.h/2,S=t.yCoords[g]+v.h/2;ya&&(a=b),xs&&(s=S)}}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}var C=e.x-(a+i)/2,w=e.y-(s+o)/2;t.xCoords=t.xCoords.map(function(e){return e+C}),t.yCoords=t.yCoords.map(function(e){return e+w})}else{Object.keys(t).forEach(function(e){var n=t[e],r=n.getRect().x,c=n.getRect().x+n.getRect().width,l=n.getRect().y,u=n.getRect().y+n.getRect().height;ra&&(a=c),ls&&(s=u)});var T=e.x-(a+i)/2,E=e.y-(s+o)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+T,n.getCenterY()+E)})}}},a.calcBoundingBox=function(e,t,n,r){for(var i=2**53-1,a=-(2**53-1),o=2**53-1,s=-(2**53-1),c=void 0,l=void 0,u=void 0,d=void 0,f=e.descendants().not(`:parent`),p=f.length,m=0;mc&&(i=c),au&&(o=u),s{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,o=n(140).layoutBase.PointD,s=n(140).layoutBase.DimensionD,c=n(140).layoutBase.LayoutConstants,l=n(140).layoutBase.FDLayoutConstants,u=n(140).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.cy,d=e.eles,f=d.nodes(),p=d.edges(),m=void 0,h=void 0,g=void 0,_={};e.randomize&&(m=t.nodeIndexes,h=t.xCoords,g=t.yCoords);var v=function(e){return typeof e==`function`},y=function(e,t){return v(e)?e(t):e},b=r.calcParentsWithoutChildren(n,d),x=function e(t,n,i,c){for(var l=n.length,u=0;u0){var S=void 0;S=i.getGraphManager().add(i.newGraph(),p),e(S,f,i,c)}}},S=function(t,n,r){for(var i=0,a=0,o=0;o0?u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=i/a:v(e.idealEdgeLength)?u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=e.idealEdgeLength,u.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)},C=function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)};e.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(u.MAX_ITERATIONS=l.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(u.TILING_COMPARE_BY=e.tilingCompareBy),e.quality==`proof`?c.QUALITY=2:c.QUALITY=0,u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!e.randomize,u.ANIMATE=l.ANIMATE=c.ANIMATE=e.animate,u.TILE=e.tile,u.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,u.PURE_INCREMENTAL=!e.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step==`transformed`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!1),e.step==`enforced`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!1),e.step==`cose`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!0),e.step==`all`&&(e.randomize?u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0),e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint?u.TREE_REDUCTION_ON_INCREMENTAL=!1:u.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,T=w.newGraphManager();return x(T.addRoot(),r.getTopMostNodes(f),w,e),S(w,T,p),C(w,e),w.runLayout(),_}}}),212:((e,t,n)=>{var r=function(){function e(e,t){for(var n=0;n0)if(f){var p=o.getTopMostNodes(t.eles.nodes());if(l=o.connectComponents(n,t.eles,p),l.forEach(function(e){var t=e.boundingBox();u.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,i.push(s(t))}),t.quality=="default"||t.quality==`proof`){var m=n.collection();if(t.tile){var h=new Map,g=[],_=[],v=0,y={nodeIndexes:h,xCoords:g,yCoords:_},b=[];if(l.forEach(function(e,t){e.edges().length==0&&(e.nodes().forEach(function(t,n){m.merge(e.nodes()[n]),t.isParent()||(y.nodeIndexes.set(e.nodes()[n].id(),v++),y.xCoords.push(e.nodes()[0].position().x),y.yCoords.push(e.nodes()[0].position().y))}),b.push(t))}),m.length>1){var x=m.boundingBox();u.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),l.push(m),i.push(y);for(var S=b.length-1;S>=0;S--)l.splice(b[S],1),i.splice(b[S],1),u.splice(b[S],1)}}l.forEach(function(e,n){t.eles=e,a.push(c(t,i[n])),o.relocateComponent(u[n],a[n],t)})}else l.forEach(function(e,n){o.relocateComponent(u[n],i[n],t)});var C=new Set;if(l.length>1){var w=[],T=r.filter(function(e){return e.css(`display`)==`none`});l.forEach(function(e,n){var r=void 0;if(t.quality==`draft`&&(r=i[n].nodeIndexes),e.nodes().not(T).length>0){var s={};s.edges=[],s.nodes=[];var c=void 0;e.nodes().not(T).forEach(function(e){if(t.quality==`draft`)if(!e.isParent())c=r.get(e.id()),s.nodes.push({x:i[n].xCoords[c]-e.boundingbox().w/2,y:i[n].yCoords[c]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else{var l=o.calcBoundingBox(e,i[n].xCoords,i[n].yCoords,r);s.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else a[n][e.id()]&&s.nodes.push({x:a[n][e.id()].getLeft(),y:a[n][e.id()].getTop(),width:a[n][e.id()].getWidth(),height:a[n][e.id()].getHeight()})}),e.edges().forEach(function(e){var c=e.source(),l=e.target();if(c.css(`display`)!=`none`&&l.css(`display`)!=`none`)if(t.quality==`draft`){var u=r.get(c.id()),d=r.get(l.id()),f=[],p=[];if(c.isParent()){var m=o.calcBoundingBox(c,i[n].xCoords,i[n].yCoords,r);f.push(m.topLeftX+m.width/2),f.push(m.topLeftY+m.height/2)}else f.push(i[n].xCoords[u]),f.push(i[n].yCoords[u]);if(l.isParent()){var h=o.calcBoundingBox(l,i[n].xCoords,i[n].yCoords,r);p.push(h.topLeftX+h.width/2),p.push(h.topLeftY+h.height/2)}else p.push(i[n].xCoords[d]),p.push(i[n].yCoords[d]);s.edges.push({startX:f[0],startY:f[1],endX:p[0],endY:p[1]})}else a[n][c.id()]&&a[n][l.id()]&&s.edges.push({startX:a[n][c.id()].getCenterX(),startY:a[n][c.id()].getCenterY(),endX:a[n][l.id()].getCenterX(),endY:a[n][l.id()].getCenterY()})}),s.nodes.length>0&&(w.push(s),C.add(n))}});var E=d.packComponents(w,t.randomize).shifts;if(t.quality==`draft`)i.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+E[t].dx}),r=e.yCoords.map(function(e){return e+E[t].dy});e.xCoords=n,e.yCoords=r});else{var D=0;C.forEach(function(e){Object.keys(a[e]).forEach(function(t){var n=a[e][t];n.setCenter(n.getCenterX()+E[D].dx,n.getCenterY()+E[D].dy)}),D++})}}}else{var O=t.eles.boundingBox();if(u.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),t.randomize){var k=s(t);i.push(k)}t.quality=="default"||t.quality==`proof`?(a.push(c(t,i[0])),o.relocateComponent(u[0],a[0],t)):o.relocateComponent(u[0],i[0],t)}var A=function(e,n){if(t.quality=="default"||t.quality==`proof`){typeof e==`number`&&(e=n);var r=void 0,o=void 0,s=e.data(`id`);return a.forEach(function(e){s in e&&(r={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},o=e[s])}),t.nodeDimensionsIncludeLabels&&(o.labelWidth&&(o.labelPosHorizontal==`left`?r.x+=o.labelWidth/2:o.labelPosHorizontal==`right`&&(r.x-=o.labelWidth/2)),o.labelHeight&&(o.labelPosVertical==`top`?r.y+=o.labelHeight/2:o.labelPosVertical==`bottom`&&(r.y-=o.labelHeight/2))),r??={x:e.position(`x`),y:e.position(`y`)},{x:r.x,y:r.y}}else{var c=void 0;return i.forEach(function(t){var n=t.nodeIndexes.get(e.id());n!=null&&(c={x:t.xCoords[n],y:t.yCoords[n]})}),c??={x:e.position(`x`),y:e.position(`y`)},{x:c.x,y:c.y}}};if(t.quality=="default"||t.quality==`proof`||t.randomize){var j=o.calcParentsWithoutChildren(n,r),M=r.filter(function(e){return e.css(`display`)==`none`});t.eles=r.not(M),r.nodes().not(`:parent`).not(M).layoutPositions(e,t,A),j.length>0&&j.forEach(function(e){e.position(A(e))})}else console.log(`If randomize option is set to false, then quality option must be 'default' or 'proof'.`)}}]),e}()}),657:((e,t,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var t=e.cy,n=e.eles,o=n.nodes(),s=n.nodes(`:parent`),c=new Map,l=new Map,u=new Map,d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=void 0,b=1e8,x=1e-9,S=e.piTol,C=e.samplingType,w=e.nodeSeparation,T=void 0,E=function(){for(var e=0,t=0,n=!1;t=i;){o=r[i++];for(var m=d[o],_=0;_u&&(u=h[x],f=x)}return f},O=function(e){var t=void 0;if(e){t=Math.floor(Math.random()*y);for(var n=0;n=1)break;u=l}for(var h=0;h=1)break;u=l}for(var b=0;b0&&(r.isParent()?d[t].push(u.get(r.id())):d[t].push(r.id()))})});var B=function(e){var n=l.get(e),r=void 0;c.get(e).forEach(function(i){r=t.getElementById(i).isParent()?u.get(i):i,d[n].push(r),d[l.get(r)].push(e)})},V=!0,ee=!1,te=void 0;try{for(var H=c.keys()[Symbol.iterator](),ne;!(V=(ne=H.next()).done);V=!0){var re=ne.value;B(re)}}catch(e){ee=!0,te=e}finally{try{!V&&H.return&&H.return()}finally{if(ee)throw te}}y=l.size;var U=void 0;if(y>2){T=y{var r=n(212),i=function(e){e&&e(`layout`,`fcose`,r)};typeof cytoscape<`u`&&i(cytoscape),e.exports=i}),140:(t=>{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(579)})()})}))(),1),A={L:`left`,R:`right`,T:`top`,B:`bottom`},j={L:r(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:r(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:r(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:r(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},M={L:r((e,t)=>e-t+2,`L`),R:r((e,t)=>e-2,`R`),T:r((e,t)=>e-t+2,`T`),B:r((e,t)=>e-2,`B`)},N=r(function(e){return F(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),P=r(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),F=r(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),I=r(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),L=r(function(e,t){let n=F(e)&&I(t),r=I(e)&&F(t);return n||r},`isArchitectureDirectionXY`),R=r(function(e){let t=e[0],n=e[1],r=F(t)&&I(n),i=I(t)&&F(n);return r||i},`isArchitecturePairXY`),z=r(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),B=r(function(e,t){let n=`${e}${t}`;return z(n)?n:void 0},`getArchitectureDirectionPair`),V=r(function([e,t],n){let r=n[0],i=n[1];return F(r)?I(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:F(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ee=r(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),te=r(function(e,t){return L(e,t)?`bend`:F(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),H=r(function(e){return e.type===`service`},`isArchitectureService`),ne=r(function(e){return e.type===`junction`},`isArchitectureJunction`),re=r((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),U=r(e=>e.data(),`edgeData`),W=r(e=>e.data(),`nodeData`),G=f.architecture,ie=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=l,this.getAccTitle=g,this.setDiagramTitle=c,this.getDiagramTitle=m,this.getAccDescription=p,this.setAccDescription=o,this.clear()}static{r(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,u()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(H)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(ne)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!P(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!P(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,t=new Map;for(let[n,r]of this.nodes.entries()){let i=new Map;for(let t of r.edges){let r=this.getNode(t.lhsId)?.in,a=this.getNode(t.rhsId)?.in;if(r&&a&&r!==a){let n=te(t.lhsDir,t.rhsDir);n!==`bend`&&e.set(re(r,a),n)}if(t.lhsId===n){let e=B(t.lhsDir,t.rhsDir);e&&i.set(e,t.rhsId)}else{let e=B(t.rhsDir,t.lhsDir);e&&i.set(e,t.lhsId)}}t.set(n,i)}let n=new Set,i=new Set(t.keys()),a=r(e=>{let r=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){n.add(e),i.delete(e);let o=t.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=r.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,t)=>{n.has(e)||(r.set(e,V([c,l],t)),a.push(e))})}}return r},`BFS`),o=[];for(;i.size>0;){let e=i.values().next().value;o.push(a(e))}this.dataStructures={adjList:t,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return y({...G,...d().architecture})}getConfigField(e){return this.getConfig()[e]}},K=r((e,t)=>{x(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),q={parser:{yy:void 0},parse:r(async e=>{let t=await n(`architecture`,e);i.debug(t);let r=q.parser?.yy;if(!(r instanceof ie))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);K(t,r)},`parse`)},ae=r(e=>`
+import{r as e,t}from"./chunk-QTnfLwEv.js";import{n}from"./mermaid-parser.core-BCOGZFb-.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as i,p as a}from"./src-Cn6kALDM.js";import{H as o,J as s,K as c,U as l,a as u,b as d,f,v as p,w as m,x as h,y as g,z as _}from"./chunk-DU6HZSFF-B78kfBb6.js";import{c as v,i as y}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as b}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";import{i as S,r as C,t as w}from"./chunk-PWAF6VOD-D9eOryqj.js";import{n as T}from"./chunk-GMAD6QVW-dCDLGP3F.js";import{t as E}from"./cytoscape.esm-dytuJj4e.js";var D=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=28)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(5);function l(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,n!=null&&t!=null?this.rect=new a(t.x,t.y,n.width,n.height):this.rect=new a}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(!(r.source==n||r.target==n))throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal==`right`&&this.setWidth(t+this.labelWidth)),this.labelHeight&&(this.labelPosVertical==`top`?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):this.labelPosVertical==`center`&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):this.labelPosVertical==`bottom`&&this.setHeight(n+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(7),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}else{var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(!(t.owner==n.owner&&t.owner==this))throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null}},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(!(t.owner!=null&&t.owner==this))throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;cn&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;mo&&(t=o),nc&&(r=c),ao&&(t=o),nc&&(r=c),a=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}else{i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(!(a!=null&&a.getGraphManager()==this))throw`Source not in this graph mgr!`;if(!(o!=null&&o.getGraphManager()==this))throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),!(n.source!=null&&n.target!=null))throw`Edge source and/or target is null!`;if(!(n.source.edges.indexOf(n)==-1&&n.target.edges.indexOf(n)==-1))throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n}},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(ia)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(ra?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j;break}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N;break}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r=0){var u=(-c+Math.sqrt(c*c-4*s*l))/(2*s),d=(-c-Math.sqrt(c*c-4*s*l))/(2*s);return u>=0&&u<=1?[u]:d>=0&&d<=1?[d]:null}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(5);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ta.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;nc||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=c.length||u>=c[0].length)){for(var d=0;de}}]),e}()}),(function(e,t,n){function r(){}r.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t=Math.min(this.m,this.n);this.s=function(e){for(var t=[];e-- >0;)t.push(0);return t}(Math.min(this.m+1,this.n)),this.U=function(e){return function e(t){if(t.length==0)return 0;for(var n=[],r=0;r0;)t.push(0);return t}(this.n),i=function(e){for(var t=[];e-- >0;)t.push(0);return t}(this.m),a=!0,o=!0,s=Math.min(this.m-1,this.n),c=Math.max(0,Math.min(this.n-2,this.m)),l=0;l=0;k--)if(this.s[k]!==0){for(var A=k+1;A=0;L--){if(function(e,t){return e&&t}(L0;){var U=void 0,W=void 0;for(U=E-2;U>=-1&&U!==-1;U--)if(Math.abs(n[U])<=re+ne*(Math.abs(this.s[U])+Math.abs(this.s[U+1]))){n[U]=0;break}if(U===E-2)W=4;else{var G=void 0;for(G=E-1;G>=U&&G!==U;G--){var ie=(G===E?0:Math.abs(n[G]))+(G===U+1?0:Math.abs(n[G-1]));if(Math.abs(this.s[G])<=re+ne*ie){this.s[G]=0;break}}G===U?W=3:G===E-1?W=1:(W=2,U=G)}switch(U++,W){case 1:var K=n[E-2];n[E-2]=0;for(var q=E-2;q>=U;q--){var ae=r.hypot(this.s[q],K),J=this.s[q]/ae,Y=K/ae;if(this.s[q]=ae,q!==U&&(K=-Y*n[q-1],n[q-1]=J*n[q-1]),o)for(var X=0;X=this.s[U+1]);){var De=this.s[U];if(this.s[U]=this.s[U+1],this.s[U+1]=De,o&&UMath.abs(t)?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):t==0?n=0:(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)),n},e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(D()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(D()):n.coseBase=r(n.layoutBase)})(e,function(e){return(()=>{var t={45:((e,t,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),e.exports=r}),806:((e,t,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,e.exports=i}),767:((e,t,n)=>{var r=n(551).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),880:((e,t,n)=>{var r=n(551).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),578:((e,t,n)=>{var r=n(551).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),765:((e,t,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),o=n(991),s=n(767),c=n(806),l=n(902),u=n(551).FDLayoutConstants,d=n(551).LayoutConstants,f=n(551).Point,p=n(551).PointD,m=n(551).DimensionD,h=n(551).Layout,g=n(551).Integer,_=n(551).IGeometry,v=n(551).LGraph,y=n(551).Transform,b=n(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var S in x.prototype=Object.create(r.prototype),r)x[S]=r[S];x.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},x.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},x.prototype.newNode=function(e){return new o(this.graphManager,e)},x.prototype.newEdge=function(e){return new s(null,null,e)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n0&&this.updateDisplacements();for(var n=0;n0&&(r.fixedNodeWeight=a)}}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var l=this.constraints.alignmentConstraint.vertical,n=0;n=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var n=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=s.has(t.top)?s.get(t.top):t.top,a=s.has(t.bottom)?s.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}});else{var d=new Map,f=new Map;this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var t=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;d.has(t)?d.get(t).push(n):d.set(t,[n]),d.has(n)?d.get(n).push(t):d.set(n,[t])}else{var r=s.has(e.top)?s.get(e.top):e.top,i=s.has(e.bottom)?s.get(e.bottom):e.bottom;f.has(r)?f.get(r).push(i):f.set(r,[i]),f.has(i)?f.get(i).push(r):f.set(i,[r])}});var p=function(e,t){var n=[],r=[],i=new b,a=new Set,o=0;return e.forEach(function(s,c){if(!a.has(c)){n[o]=[],r[o]=!1;var l=c;for(i.push(l),a.add(l),n[o].push(l);i.length!=0;)l=i.shift(),t.has(l)&&(r[o]=!0),e.get(l).forEach(function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))});o++}}),{components:n,isFixed:r}},m=p(d,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=m.components,this.fixedComponentsOnHorizontal=m.isFixed;var h=p(f,e.fixedNodesOnVertical);this.componentsOnVertical=h.components,this.fixedComponentsOnVertical=h.isFixed}}},x.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n1){var s;for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},x.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var g=h[0];h.splice(0,1);var v=u.indexOf(g);v>=0&&u.splice(v,1),p--,d--}m=t==null?0:(u.indexOf(h[0])+1)%p;for(var y=Math.abs(r-n)/d,b=m;f!=d;b=++b%p){var S=u[b].getOtherEnd(e);if(S!=t){var C=(n+f*y)%360,w=(C+y)%360;x.branchRadialLayout(S,e,C,w,i+a,a),f++}}},x.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;li?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):r.labelPosHorizontal==`right`&&r.setWidth(i+r.labelWidth)),r.labelHeight&&(r.labelPosVertical==`top`?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):r.labelPosVertical==`center`&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):r.labelPosVertical==`bottom`&&r.setHeight(a+r.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop,a=t.labelMarginLeft,o=t.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i,a,o)}},x.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop,o=r.labelMarginLeft,s=r.labelMarginTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a,o,s)})},x.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;ru&&(u=f.rect.height)}n+=u+e.verticalPadding}},x.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];if(n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&(i.labelPosHorizontal==`left`?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):i.labelPosHorizontal==`center`&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):i.labelPosHorizontal==`right`&&i.setWidth(a+i.labelWidth)),i.labelHeight&&(i.labelPosVertical==`top`?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):i.labelPosVertical==`center`&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):i.labelPosVertical==`bottom`&&i.setHeight(o+i.labelHeight))}})},x.prototype.tileNodes=function(e,t){var n=this.tileNodesByFavoringDim(e,t,!0),r=this.tileNodesByFavoringDim(e,t,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=e.getWidth())});var l=a/i,u=o/i,d=(n-r)**2+4*(l+r)*(u+n)*i,f=(r-n+Math.sqrt(d))/(2*(l+r)),p;t?(p=Math.ceil(f),p==f&&p++):p=Math.floor(f);var m=p*(l+r)-r;return s>m&&(m=s),m+=r*2,m},x.prototype.tileNodesByFavoringDim=function(e,t,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,a=c.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(o.idealRowWidth=this.calcIdealRowWidth(e,n));var s=function(e){return e.rect.width*e.rect.height},l=function(e,t){return s(t)-s(e)};e.sort(function(e,t){var n=l;return o.idealRowWidth?(n=a,n(e.id,t.id)):n(e,t)});for(var u=0,d=0,f=0;f0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},x.prototype.canAddHorizontal=function(e,t,n){if(e.idealRowWidth){var r=e.rows.length-1;return e.rowWidth[r]+t+e.horizontalPadding<=e.idealRowWidth}var i=this.getShortestRowIndex(e);if(i<0)return!0;var a=e.rowWidth[i];if(a+e.horizontalPadding+t<=e.width)return!0;var o=0;e.rowHeight[i]0&&(o=n+e.verticalPadding-e.rowHeight[i]);var s=e.width-a>=t+e.horizontalPadding?(e.height+o)/(a+t+e.horizontalPadding):(e.height+o)/e.width;o=n+e.verticalPadding;var c=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=g.MAX_VALUE,p,m,h=0;h{var r=n(551).FDLayoutNode,i=n(551).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i{function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){var a=0;r.forEach(function(e){t==`horizontal`?(f.set(e,c.has(e)?l[c.get(e)]:i.get(e)),a+=f.get(e)):(f.set(e,c.has(e)?u[c.get(e)]:i.get(e)),a+=f.get(e))}),a/=r.length,e.forEach(function(e){n.has(e)||f.set(e,a)})}else{var o=0;e.forEach(function(e){t==`horizontal`?o+=c.has(e)?l[c.get(e)]:i.get(e):o+=c.has(e)?u[c.get(e)]:i.get(e)}),o/=e.length,e.forEach(function(e){f.set(e,o)})}});for(var h=function(){var r=m.shift();e.get(r).forEach(function(e){if(f.get(e.id)o&&(o=v),ys&&(s=y)}}catch(e){p=!0,m=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw m}}var b=(r+o)/2-(a+s)/2,x=!0,S=!1,C=void 0;try{for(var w=e[Symbol.iterator](),T;!(x=(T=w.next()).done);x=!0){var E=T.value;f.set(E,f.get(E)+b)}}catch(e){S=!0,C=e}finally{try{!x&&w.return&&w.return()}finally{if(S)throw C}}})}return f},v=function(e){var t=0,n=0,r=0,i=0;if(e.forEach(function(e){e.left?l[c.get(e.left)]-l[c.get(e.right)]>=0?t++:n++:u[c.get(e.top)]-u[c.get(e.bottom)]>=0?r++:i++}),t>n&&r>i)for(var a=0;an)for(var o=0;oi)for(var s=0;s1)t.fixedNodeConstraint.forEach(function(e,t){S[t]=[e.position.x,e.position.y],C[t]=[l[c.get(e.nodeId)],u[c.get(e.nodeId)]]}),w=!0;else if(t.alignmentConstraint)(function(){var e=0;if(t.alignmentConstraint.vertical){for(var n=t.alignmentConstraint.vertical,i=function(t){var i=new Set;n[t].forEach(function(e){i.add(e)});var a=new Set([].concat(r(i)).filter(function(e){return E.has(e)})),o=void 0;o=a.size>0?l[c.get(a.values().next().value)]:g(i).x,n[t].forEach(function(t){S[e]=[o,u[c.get(t)]],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},a=0;a0?l[c.get(i.values().next().value)]:g(n).y,o[t].forEach(function(t){S[e]=[l[c.get(t)],a],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},d=0;dA&&(A=k[M].length,j=M);if(A0){var W={x:0,y:0};t.fixedNodeConstraint.forEach(function(e,t){var n={x:l[c.get(e.nodeId)],y:u[c.get(e.nodeId)]},r=e.position,i=h(r,n);W.x+=i.x,W.y+=i.y}),W.x/=t.fixedNodeConstraint.length,W.y/=t.fixedNodeConstraint.length,l.forEach(function(e,t){l[t]+=W.x}),u.forEach(function(e,t){u[t]+=W.y}),t.fixedNodeConstraint.forEach(function(e){l[c.get(e.nodeId)]=e.position.x,u[c.get(e.nodeId)]=e.position.y})}if(t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var G=t.alignmentConstraint.vertical,ie=function(e){var t=new Set;G[e].forEach(function(e){t.add(e)});var n=new Set([].concat(r(t)).filter(function(e){return E.has(e)})),i=void 0;i=n.size>0?l[c.get(n.values().next().value)]:g(t).x,t.forEach(function(e){E.has(e)||(l[c.get(e)]=i)})},K=0;K0?u[c.get(n.values().next().value)]:g(t).y,t.forEach(function(e){E.has(e)||(u[c.get(e)]=i)})},J=0;J{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(45)})()})})),k=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(O()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeFcose=r(O()):n.cytoscapeFcose=r(n.coseBase)})(e,function(e){return(()=>{var t={658:(e=>{e.exports=Object.assign==null?function(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}:Object.assign.bind(Object)}),548:((e,t,n)=>{var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=n(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(e){for(var t={},n=0;n0&&l.merge(e)});for(var u=0;u1){l=s[0],u=l.connectedEdges().length,s.forEach(function(e){e.connectedEdges().length0&&r.set(`dummy`+(r.size+1),p),m},a.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var i=1/0,a=-1/0,o=1/0,s=-1/0;if(n.quality==`draft`){var c=!0,l=!1,u=void 0;try{for(var d=t.nodeIndexes[Symbol.iterator](),f;!(c=(f=d.next()).done);c=!0){var p=f.value,m=r(p,2),h=m[0],g=m[1],_=n.cy.getElementById(h);if(_){var v=_.boundingBox(),y=t.xCoords[g]-v.w/2,b=t.xCoords[g]+v.w/2,x=t.yCoords[g]-v.h/2,S=t.yCoords[g]+v.h/2;ya&&(a=b),xs&&(s=S)}}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}var C=e.x-(a+i)/2,w=e.y-(s+o)/2;t.xCoords=t.xCoords.map(function(e){return e+C}),t.yCoords=t.yCoords.map(function(e){return e+w})}else{Object.keys(t).forEach(function(e){var n=t[e],r=n.getRect().x,c=n.getRect().x+n.getRect().width,l=n.getRect().y,u=n.getRect().y+n.getRect().height;ra&&(a=c),ls&&(s=u)});var T=e.x-(a+i)/2,E=e.y-(s+o)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+T,n.getCenterY()+E)})}}},a.calcBoundingBox=function(e,t,n,r){for(var i=2**53-1,a=-(2**53-1),o=2**53-1,s=-(2**53-1),c=void 0,l=void 0,u=void 0,d=void 0,f=e.descendants().not(`:parent`),p=f.length,m=0;mc&&(i=c),au&&(o=u),s{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,o=n(140).layoutBase.PointD,s=n(140).layoutBase.DimensionD,c=n(140).layoutBase.LayoutConstants,l=n(140).layoutBase.FDLayoutConstants,u=n(140).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.cy,d=e.eles,f=d.nodes(),p=d.edges(),m=void 0,h=void 0,g=void 0,_={};e.randomize&&(m=t.nodeIndexes,h=t.xCoords,g=t.yCoords);var v=function(e){return typeof e==`function`},y=function(e,t){return v(e)?e(t):e},b=r.calcParentsWithoutChildren(n,d),x=function e(t,n,i,c){for(var l=n.length,u=0;u0){var S=void 0;S=i.getGraphManager().add(i.newGraph(),p),e(S,f,i,c)}}},S=function(t,n,r){for(var i=0,a=0,o=0;o0?u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=i/a:v(e.idealEdgeLength)?u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=e.idealEdgeLength,u.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)},C=function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)};e.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(u.MAX_ITERATIONS=l.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(u.TILING_COMPARE_BY=e.tilingCompareBy),e.quality==`proof`?c.QUALITY=2:c.QUALITY=0,u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!e.randomize,u.ANIMATE=l.ANIMATE=c.ANIMATE=e.animate,u.TILE=e.tile,u.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,u.PURE_INCREMENTAL=!e.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step==`transformed`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!1),e.step==`enforced`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!1),e.step==`cose`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!0),e.step==`all`&&(e.randomize?u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0),e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint?u.TREE_REDUCTION_ON_INCREMENTAL=!1:u.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,T=w.newGraphManager();return x(T.addRoot(),r.getTopMostNodes(f),w,e),S(w,T,p),C(w,e),w.runLayout(),_}}}),212:((e,t,n)=>{var r=function(){function e(e,t){for(var n=0;n0)if(f){var p=o.getTopMostNodes(t.eles.nodes());if(l=o.connectComponents(n,t.eles,p),l.forEach(function(e){var t=e.boundingBox();u.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,i.push(s(t))}),t.quality=="default"||t.quality==`proof`){var m=n.collection();if(t.tile){var h=new Map,g=[],_=[],v=0,y={nodeIndexes:h,xCoords:g,yCoords:_},b=[];if(l.forEach(function(e,t){e.edges().length==0&&(e.nodes().forEach(function(t,n){m.merge(e.nodes()[n]),t.isParent()||(y.nodeIndexes.set(e.nodes()[n].id(),v++),y.xCoords.push(e.nodes()[0].position().x),y.yCoords.push(e.nodes()[0].position().y))}),b.push(t))}),m.length>1){var x=m.boundingBox();u.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),l.push(m),i.push(y);for(var S=b.length-1;S>=0;S--)l.splice(b[S],1),i.splice(b[S],1),u.splice(b[S],1)}}l.forEach(function(e,n){t.eles=e,a.push(c(t,i[n])),o.relocateComponent(u[n],a[n],t)})}else l.forEach(function(e,n){o.relocateComponent(u[n],i[n],t)});var C=new Set;if(l.length>1){var w=[],T=r.filter(function(e){return e.css(`display`)==`none`});l.forEach(function(e,n){var r=void 0;if(t.quality==`draft`&&(r=i[n].nodeIndexes),e.nodes().not(T).length>0){var s={};s.edges=[],s.nodes=[];var c=void 0;e.nodes().not(T).forEach(function(e){if(t.quality==`draft`)if(!e.isParent())c=r.get(e.id()),s.nodes.push({x:i[n].xCoords[c]-e.boundingbox().w/2,y:i[n].yCoords[c]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else{var l=o.calcBoundingBox(e,i[n].xCoords,i[n].yCoords,r);s.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else a[n][e.id()]&&s.nodes.push({x:a[n][e.id()].getLeft(),y:a[n][e.id()].getTop(),width:a[n][e.id()].getWidth(),height:a[n][e.id()].getHeight()})}),e.edges().forEach(function(e){var c=e.source(),l=e.target();if(c.css(`display`)!=`none`&&l.css(`display`)!=`none`)if(t.quality==`draft`){var u=r.get(c.id()),d=r.get(l.id()),f=[],p=[];if(c.isParent()){var m=o.calcBoundingBox(c,i[n].xCoords,i[n].yCoords,r);f.push(m.topLeftX+m.width/2),f.push(m.topLeftY+m.height/2)}else f.push(i[n].xCoords[u]),f.push(i[n].yCoords[u]);if(l.isParent()){var h=o.calcBoundingBox(l,i[n].xCoords,i[n].yCoords,r);p.push(h.topLeftX+h.width/2),p.push(h.topLeftY+h.height/2)}else p.push(i[n].xCoords[d]),p.push(i[n].yCoords[d]);s.edges.push({startX:f[0],startY:f[1],endX:p[0],endY:p[1]})}else a[n][c.id()]&&a[n][l.id()]&&s.edges.push({startX:a[n][c.id()].getCenterX(),startY:a[n][c.id()].getCenterY(),endX:a[n][l.id()].getCenterX(),endY:a[n][l.id()].getCenterY()})}),s.nodes.length>0&&(w.push(s),C.add(n))}});var E=d.packComponents(w,t.randomize).shifts;if(t.quality==`draft`)i.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+E[t].dx}),r=e.yCoords.map(function(e){return e+E[t].dy});e.xCoords=n,e.yCoords=r});else{var D=0;C.forEach(function(e){Object.keys(a[e]).forEach(function(t){var n=a[e][t];n.setCenter(n.getCenterX()+E[D].dx,n.getCenterY()+E[D].dy)}),D++})}}}else{var O=t.eles.boundingBox();if(u.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),t.randomize){var k=s(t);i.push(k)}t.quality=="default"||t.quality==`proof`?(a.push(c(t,i[0])),o.relocateComponent(u[0],a[0],t)):o.relocateComponent(u[0],i[0],t)}var A=function(e,n){if(t.quality=="default"||t.quality==`proof`){typeof e==`number`&&(e=n);var r=void 0,o=void 0,s=e.data(`id`);return a.forEach(function(e){s in e&&(r={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},o=e[s])}),t.nodeDimensionsIncludeLabels&&(o.labelWidth&&(o.labelPosHorizontal==`left`?r.x+=o.labelWidth/2:o.labelPosHorizontal==`right`&&(r.x-=o.labelWidth/2)),o.labelHeight&&(o.labelPosVertical==`top`?r.y+=o.labelHeight/2:o.labelPosVertical==`bottom`&&(r.y-=o.labelHeight/2))),r??={x:e.position(`x`),y:e.position(`y`)},{x:r.x,y:r.y}}else{var c=void 0;return i.forEach(function(t){var n=t.nodeIndexes.get(e.id());n!=null&&(c={x:t.xCoords[n],y:t.yCoords[n]})}),c??={x:e.position(`x`),y:e.position(`y`)},{x:c.x,y:c.y}}};if(t.quality=="default"||t.quality==`proof`||t.randomize){var j=o.calcParentsWithoutChildren(n,r),M=r.filter(function(e){return e.css(`display`)==`none`});t.eles=r.not(M),r.nodes().not(`:parent`).not(M).layoutPositions(e,t,A),j.length>0&&j.forEach(function(e){e.position(A(e))})}else console.log(`If randomize option is set to false, then quality option must be 'default' or 'proof'.`)}}]),e}()}),657:((e,t,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var t=e.cy,n=e.eles,o=n.nodes(),s=n.nodes(`:parent`),c=new Map,l=new Map,u=new Map,d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=void 0,b=1e8,x=1e-9,S=e.piTol,C=e.samplingType,w=e.nodeSeparation,T=void 0,E=function(){for(var e=0,t=0,n=!1;t=i;){o=r[i++];for(var m=d[o],_=0;_u&&(u=h[x],f=x)}return f},O=function(e){var t=void 0;if(e){t=Math.floor(Math.random()*y);for(var n=0;n=1)break;u=l}for(var h=0;h=1)break;u=l}for(var b=0;b0&&(r.isParent()?d[t].push(u.get(r.id())):d[t].push(r.id()))})});var B=function(e){var n=l.get(e),r=void 0;c.get(e).forEach(function(i){r=t.getElementById(i).isParent()?u.get(i):i,d[n].push(r),d[l.get(r)].push(e)})},V=!0,ee=!1,te=void 0;try{for(var H=c.keys()[Symbol.iterator](),ne;!(V=(ne=H.next()).done);V=!0){var re=ne.value;B(re)}}catch(e){ee=!0,te=e}finally{try{!V&&H.return&&H.return()}finally{if(ee)throw te}}y=l.size;var U=void 0;if(y>2){T=y{var r=n(212),i=function(e){e&&e(`layout`,`fcose`,r)};typeof cytoscape<`u`&&i(cytoscape),e.exports=i}),140:(t=>{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(579)})()})}))(),1),A={L:`left`,R:`right`,T:`top`,B:`bottom`},j={L:r(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:r(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:r(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:r(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},M={L:r((e,t)=>e-t+2,`L`),R:r((e,t)=>e-2,`R`),T:r((e,t)=>e-t+2,`T`),B:r((e,t)=>e-2,`B`)},N=r(function(e){return F(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),P=r(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),F=r(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),I=r(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),L=r(function(e,t){let n=F(e)&&I(t),r=I(e)&&F(t);return n||r},`isArchitectureDirectionXY`),R=r(function(e){let t=e[0],n=e[1],r=F(t)&&I(n),i=I(t)&&F(n);return r||i},`isArchitecturePairXY`),z=r(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),B=r(function(e,t){let n=`${e}${t}`;return z(n)?n:void 0},`getArchitectureDirectionPair`),V=r(function([e,t],n){let r=n[0],i=n[1];return F(r)?I(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:F(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ee=r(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),te=r(function(e,t){return L(e,t)?`bend`:F(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),H=r(function(e){return e.type===`service`},`isArchitectureService`),ne=r(function(e){return e.type===`junction`},`isArchitectureJunction`),re=r((e,t)=>{let[n,r]=[e,t].sort();return`${JSON.stringify(n)}-${JSON.stringify(r)}`},`architectureGroupAlignmentKey`),U=r(e=>e.data(),`edgeData`),W=r(e=>e.data(),`nodeData`),G=f.architecture,ie=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId=``,this.setAccTitle=l,this.getAccTitle=g,this.setDiagramTitle=c,this.getDiagramTitle=m,this.getAccDescription=p,this.setAccDescription=o,this.clear()}static{r(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId=``,u()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds.has(e))throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(n)===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n})}getServices(){return[...this.nodes.values()].filter(H)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,`node`),this.nodes.set(e,{id:e,type:`junction`,edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(ne)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds.has(e))throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(n)===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,`group`),this.groups.set(e,{id:e,icon:t,title:r,in:n})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!P(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!P(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes.get(e).in,u=this.nodes.get(t).in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d);let f=this.nodes.get(e),p=this.nodes.get(t);f&&p&&(f.edges.push(this.edges[this.edges.length-1]),p.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds.get(n)!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e=new Map,t=new Map;for(let[n,r]of this.nodes.entries()){let i=new Map;for(let t of r.edges){let r=this.getNode(t.lhsId)?.in,a=this.getNode(t.rhsId)?.in;if(r&&a&&r!==a){let n=te(t.lhsDir,t.rhsDir);n!==`bend`&&e.set(re(r,a),n)}if(t.lhsId===n){let e=B(t.lhsDir,t.rhsDir);e&&i.set(e,t.rhsId)}else{let e=B(t.rhsDir,t.lhsDir);e&&i.set(e,t.lhsId)}}t.set(n,i)}let n=new Set,i=new Set(t.keys()),a=r(e=>{let r=new Map([[e,[0,0]]]),a=[e];for(;a.length>0;){let e=a.shift();if(e){n.add(e),i.delete(e);let o=t.get(e);if(!o)throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);let s=r.get(e);if(!s)throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);let[c,l]=s;o.forEach((e,t)=>{n.has(e)||(r.set(e,V([c,l],t)),a.push(e))})}}return r},`BFS`),o=[];for(;i.size>0;){let e=i.values().next().value;o.push(a(e))}this.dataStructures={adjList:t,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return y({...G,...d().architecture})}getConfigField(e){return this.getConfig()[e]}},K=r((e,t)=>{x(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),q={parser:{yy:void 0},parse:r(async e=>{let t=await n(`architecture`,e);i.debug(t);let r=q.parser?.yy;if(!(r instanceof ie))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);K(t,r)},`parse`)},ae=r(e=>`
   .edge {
     stroke-width: ${e.archEdgeWidth};
     stroke: ${e.archEdgeColor};
diff --git a/apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-BFPMEfxe.js b/apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-D8nN6IGa.js
similarity index 98%
rename from apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-BFPMEfxe.js
rename to apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-D8nN6IGa.js
index e335ae357..9bc53d735 100644
--- a/apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-BFPMEfxe.js
+++ b/apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-D8nN6IGa.js
@@ -1,4 +1,4 @@
-import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{a as r,b as i,c as a,it as o,s,x as c}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as l}from"./channel-DGuPsbDk.js";import{A as u,B as d,C as f,D as p,E as m,F as h,G as g,H as _,I as v,L as y,M as b,N as x,O as S,P as C,R as w,T,U as E,V as D,W as O,b as k,j as A,k as j,l as M,v as ee,w as te,z as ne}from"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import{i as re,r as N}from"./chunk-GVQU2GXP-aw9OR1ii.js";import{_t as ie,bt as ae,f as oe,gt as se,yt as ce}from"./mermaidParser.worker-_pLIm6No.js";import{t as le}from"./chunk-5VM5RSS4-ZNzvKenW.js";function ue(e){return Array.isArray(e)}function de(e){if(k(e))return e;let t=g(e);if(!fe(e))return{};if(ue(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(ee(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?me(r,e):P(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return P(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return he(n,e),P(n,e),pe(n,e),n}function fe(e){switch(g(e)){case f:case T:case te:case p:case m:case S:case j:case u:case x:case A:case b:case C:case h:case v:case y:case w:case ne:case d:case E:case O:case D:case _:return!0;default:return!1}}function P(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function pe(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r=n)&&(e[r]=t[r])}function he(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var F=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),typeof a[s].length==`number`?this.$=a[s]:this.$=[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()};break}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:o},{10:t,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(h,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},e(d,[2,27]),e(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},e(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
+import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{a as r,b as i,c as a,it as o,s,x as c}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as l}from"./channel-CdQthrj0.js";import{A as u,B as d,C as f,D as p,E as m,F as h,G as g,H as _,I as v,L as y,M as b,N as x,O as S,P as C,R as w,T,U as E,V as D,W as O,b as k,j as A,k as j,l as M,v as ee,w as te,z as ne}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import{i as re,r as N}from"./chunk-GVQU2GXP-CCw5T6ST.js";import{_t as ie,bt as ae,f as oe,gt as se,yt as ce}from"./mermaidParser.worker-CBWarbNh.js";import{t as le}from"./chunk-5VM5RSS4-ZNzvKenW.js";function ue(e){return Array.isArray(e)}function de(e){if(k(e))return e;let t=g(e);if(!fe(e))return{};if(ue(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(ee(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?me(r,e):P(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return P(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return he(n,e),P(n,e),pe(n,e),n}function fe(e){switch(g(e)){case f:case T:case te:case p:case m:case S:case j:case u:case x:case A:case b:case C:case h:case v:case y:case w:case ne:case d:case E:case O:case D:case _:return!0;default:return!1}}function P(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function pe(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r=n)&&(e[r]=t[r])}function he(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var F=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),typeof a[s].length==`number`?this.$=a[s]:this.$=[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()};break}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:o},{10:t,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(h,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},e(d,[2,27]),e(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},e(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
 `+h.showPosition()+`
 Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
 `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-Dn5fFHT9.js b/apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-DE8hF0ap.js
similarity index 98%
rename from apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-Dn5fFHT9.js
rename to apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-DE8hF0ap.js
index ee987214a..1f2c8b450 100644
--- a/apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-Dn5fFHT9.js
+++ b/apps/pythinker-code/dist-web/assets/blockDiagram-I7D4REHJ-DE8hF0ap.js
@@ -1,4 +1,4 @@
-import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{a as r,b as i,c as a,rt as o,s,x as c}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as l}from"./channel-BAi54gt4.js";import{A as u,B as d,C as f,D as p,E as m,F as h,G as g,H as _,I as v,L as y,M as b,N as x,O as S,P as C,R as w,T,U as E,V as D,W as O,b as k,j as A,k as j,l as M,v as ee,w as te,z as ne}from"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import{t as re}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import{i as ie,r as N}from"./chunk-GVQU2GXP-BrOdU7Oy.js";import{a as ae,c as oe,i as se,s as ce}from"./chunk-OSK3NFVY-BT2Y-lqQ.js";import{t as le}from"./graphlib-B8gBHxth.js";function ue(e){return Array.isArray(e)}function de(e){if(k(e))return e;let t=g(e);if(!fe(e))return{};if(ue(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(ee(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?me(r,e):P(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return P(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return he(n,e),P(n,e),pe(n,e),n}function fe(e){switch(g(e)){case f:case T:case te:case p:case m:case S:case j:case u:case x:case A:case b:case C:case h:case v:case y:case w:case ne:case d:case E:case O:case D:case _:return!0;default:return!1}}function P(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function pe(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r=n)&&(e[r]=t[r])}function he(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var F=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),typeof a[s].length==`number`?this.$=a[s]:this.$=[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()};break}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
+import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{a as r,b as i,c as a,rt as o,s,x as c}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as l}from"./channel-CZ7H-7IH.js";import{A as u,B as d,C as f,D as p,E as m,F as h,G as g,H as _,I as v,L as y,M as b,N as x,O as S,P as C,R as w,T,U as E,V as D,W as O,b as k,j as A,k as j,l as M,v as ee,w as te,z as ne}from"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import{t as re}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import{i as ie,r as N}from"./chunk-GVQU2GXP-Ddvf-Y11.js";import{a as ae,c as oe,i as se,s as ce}from"./chunk-OSK3NFVY-ZXiPE9OQ.js";import{t as le}from"./graphlib-B8gBHxth.js";function ue(e){return Array.isArray(e)}function de(e){if(k(e))return e;let t=g(e);if(!fe(e))return{};if(ue(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(ee(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?me(r,e):P(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return P(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return he(n,e),P(n,e),pe(n,e),n}function fe(e){switch(g(e)){case f:case T:case te:case p:case m:case S:case j:case u:case x:case A:case b:case C:case h:case v:case y:case w:case ne:case d:case E:case O:case D:case _:return!0;default:return!1}}function P(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function pe(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r=n)&&(e[r]=t[r])}function he(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var F=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),typeof a[s].length==`number`?this.$=a[s]:this.$=[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()};break}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
 `+h.showPosition()+`
 Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
 `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-DJuqA3c6.js b/apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-C1tFI83m.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-DJuqA3c6.js
rename to apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-C1tFI83m.js
index acffc9364..70366653c 100644
--- a/apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-DJuqA3c6.js
+++ b/apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-C1tFI83m.js
@@ -1,4 +1,4 @@
-import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{H as r,U as i,c as a,r as o,s,v as l,x as u,y as d,z as f}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{_ as p,n as m,r as h}from"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import{o as g}from"./chunk-4HAMMTFA-B5soPjjq.js";import{a as _}from"./chunk-F27PBJKO-DeO1S11A.js";var v=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],ae=[12,33],oe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],se={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``;break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},t(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ee,[2,14]),t(te,[2,16],{12:[1,76]}),t(ee,[2,36],{12:[1,77]}),t(ne,[2,19]),t(ne,[2,20]),{25:[1,78]},{27:[1,79]},t(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},t(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ee,[2,15]),t(te,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),t(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ne,[2,21]),t(ne,[2,22]),t(X,[2,39]),t(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),t(ie,[2,73]),{78:[1,133]},t(ie,[2,75]),t(ie,[2,76]),t(X,[2,40]),t(X,[2,41]),t(X,[2,42]),t(X,[2,43]),t(X,[2,44]),t(X,[2,45]),t(X,[2,46]),t(X,[2,47]),t(X,[2,48]),t(X,[2,49]),t(X,[2,50]),t(X,[2,51]),t(X,[2,52]),t(X,[2,53]),t(X,[2,54]),t(X,[2,55]),t(X,[2,56]),t(X,[2,57]),t(X,[2,58]),t(X,[2,60]),t(X,[2,61]),t(X,[2,62]),t(X,[2,63]),t(X,[2,64]),t(X,[2,65]),t(X,[2,66]),t(X,[2,67]),t(X,[2,68]),t(X,[2,69]),t(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ae,[2,28]),t(ae,[2,29]),t(ae,[2,30]),t(ae,[2,31]),t(ae,[2,32]),t(ae,[2,33]),t(ae,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(te,[2,18]),t(ee,[2,38]),t(re,[2,72]),t(ie,[2,74]),t(X,[2,24]),t(X,[2,35]),t(oe,[2,25]),t(oe,[2,26],{12:[1,138]}),t(oe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(t,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;typeof _.yy.parseError==`function`?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}e(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
+import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{H as r,U as i,c as a,r as o,s,v as l,x as u,y as d,z as f}from"./chunk-DU6HZSFF-B78kfBb6.js";import{_ as p,n as m,r as h}from"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import{o as g}from"./chunk-4HAMMTFA-Dlc4jvjp.js";import{a as _}from"./chunk-F27PBJKO-Duq9tlNm.js";var v=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],ae=[12,33],oe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],se={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``;break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},t(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ee,[2,14]),t(te,[2,16],{12:[1,76]}),t(ee,[2,36],{12:[1,77]}),t(ne,[2,19]),t(ne,[2,20]),{25:[1,78]},{27:[1,79]},t(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},t(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ee,[2,15]),t(te,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),t(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ne,[2,21]),t(ne,[2,22]),t(X,[2,39]),t(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),t(ie,[2,73]),{78:[1,133]},t(ie,[2,75]),t(ie,[2,76]),t(X,[2,40]),t(X,[2,41]),t(X,[2,42]),t(X,[2,43]),t(X,[2,44]),t(X,[2,45]),t(X,[2,46]),t(X,[2,47]),t(X,[2,48]),t(X,[2,49]),t(X,[2,50]),t(X,[2,51]),t(X,[2,52]),t(X,[2,53]),t(X,[2,54]),t(X,[2,55]),t(X,[2,56]),t(X,[2,57]),t(X,[2,58]),t(X,[2,60]),t(X,[2,61]),t(X,[2,62]),t(X,[2,63]),t(X,[2,64]),t(X,[2,65]),t(X,[2,66]),t(X,[2,67]),t(X,[2,68]),t(X,[2,69]),t(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ae,[2,28]),t(ae,[2,29]),t(ae,[2,30]),t(ae,[2,31]),t(ae,[2,32]),t(ae,[2,33]),t(ae,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(te,[2,18]),t(ee,[2,38]),t(re,[2,72]),t(ie,[2,74]),t(X,[2,24]),t(X,[2,35]),t(oe,[2,25]),t(oe,[2,26],{12:[1,138]}),t(oe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(t,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;typeof _.yy.parseError==`function`?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}e(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
 `+g.showPosition()+`
 Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(u+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:r.push(C),a.push(g.yytext),o.push(g.yylloc),r.push(E[1]),C=null,w?(C=w,w=null):(d=g.yyleng,l=g.yytext,u=g.yylineno,y=g.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[E[1]][1],O.$=a[a.length-A],O._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},b&&(O._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),D=this.performAction.apply(O,[l,d,u,_.yy,E[1],a,o].concat(h)),D!==void 0)return D;A&&(r=r.slice(0,-1*A*2),a=a.slice(0,-1*A),o=o.slice(0,-1*A)),r.push(this.productions_[E[1]][0]),a.push(O.$),o.push(O._$),j=s[r[r.length-2]][r[r.length-1]],r.push(j);break;case 3:return!0}}return!0},`parse`)};se.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
 `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-CocaHB6t.js b/apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-WuhtVnQN.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-CocaHB6t.js
rename to apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-WuhtVnQN.js
index c304115c4..fb36cdbd5 100644
--- a/apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-CocaHB6t.js
+++ b/apps/pythinker-code/dist-web/assets/c4Diagram-7LVT6UL2-WuhtVnQN.js
@@ -1,4 +1,4 @@
-import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as r,U as i,c as a,r as o,s,v as l,x as u,y as d,z as f}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{_ as p,n as m,r as h}from"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import{o as g}from"./chunk-4HAMMTFA-B0yXCELs.js";import{a as _}from"./chunk-F27PBJKO-BiUOMdWi.js";var v=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],ae=[12,33],oe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],se={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``;break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:t,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:t,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:t,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:t,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},e(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),e(ee,[2,14]),e(te,[2,16],{12:[1,76]}),e(ee,[2,36],{12:[1,77]}),e(ne,[2,19]),e(ne,[2,20]),{25:[1,78]},{27:[1,79]},e(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},e(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(ee,[2,15]),e(te,[2,17],{21:22,19:130,22:t,23:r,24:i,26:a,28:o}),e(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),e(ne,[2,21]),e(ne,[2,22]),e(X,[2,39]),e(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),e(ie,[2,73]),{78:[1,133]},e(ie,[2,75]),e(ie,[2,76]),e(X,[2,40]),e(X,[2,41]),e(X,[2,42]),e(X,[2,43]),e(X,[2,44]),e(X,[2,45]),e(X,[2,46]),e(X,[2,47]),e(X,[2,48]),e(X,[2,49]),e(X,[2,50]),e(X,[2,51]),e(X,[2,52]),e(X,[2,53]),e(X,[2,54]),e(X,[2,55]),e(X,[2,56]),e(X,[2,57]),e(X,[2,58]),e(X,[2,60]),e(X,[2,61]),e(X,[2,62]),e(X,[2,63]),e(X,[2,64]),e(X,[2,65]),e(X,[2,66]),e(X,[2,67]),e(X,[2,68]),e(X,[2,69]),e(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(ae,[2,28]),e(ae,[2,29]),e(ae,[2,30]),e(ae,[2,31]),e(ae,[2,32]),e(ae,[2,33]),e(ae,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(te,[2,18]),e(ee,[2,38]),e(re,[2,72]),e(ie,[2,74]),e(X,[2,24]),e(X,[2,35]),e(oe,[2,25]),e(oe,[2,26],{12:[1,138]}),e(oe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;typeof _.yy.parseError==`function`?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}n(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
+import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as r,U as i,c as a,r as o,s,v as l,x as u,y as d,z as f}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{_ as p,n as m,r as h}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import{o as g}from"./chunk-4HAMMTFA-X3JAMEe8.js";import{a as _}from"./chunk-F27PBJKO-DTzbeXt1.js";var v=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],ae=[12,33],oe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],se={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``;break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:t,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:t,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:t,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:t,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},e(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),e(ee,[2,14]),e(te,[2,16],{12:[1,76]}),e(ee,[2,36],{12:[1,77]}),e(ne,[2,19]),e(ne,[2,20]),{25:[1,78]},{27:[1,79]},e(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},e(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(ee,[2,15]),e(te,[2,17],{21:22,19:130,22:t,23:r,24:i,26:a,28:o}),e(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),e(ne,[2,21]),e(ne,[2,22]),e(X,[2,39]),e(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),e(ie,[2,73]),{78:[1,133]},e(ie,[2,75]),e(ie,[2,76]),e(X,[2,40]),e(X,[2,41]),e(X,[2,42]),e(X,[2,43]),e(X,[2,44]),e(X,[2,45]),e(X,[2,46]),e(X,[2,47]),e(X,[2,48]),e(X,[2,49]),e(X,[2,50]),e(X,[2,51]),e(X,[2,52]),e(X,[2,53]),e(X,[2,54]),e(X,[2,55]),e(X,[2,56]),e(X,[2,57]),e(X,[2,58]),e(X,[2,60]),e(X,[2,61]),e(X,[2,62]),e(X,[2,63]),e(X,[2,64]),e(X,[2,65]),e(X,[2,66]),e(X,[2,67]),e(X,[2,68]),e(X,[2,69]),e(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(ae,[2,28]),e(ae,[2,29]),e(ae,[2,30]),e(ae,[2,31]),e(ae,[2,32]),e(ae,[2,33]),e(ae,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(te,[2,18]),e(ee,[2,38]),e(re,[2,72]),e(ie,[2,74]),e(X,[2,24]),e(X,[2,35]),e(oe,[2,25]),e(oe,[2,26],{12:[1,138]}),e(oe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;typeof _.yy.parseError==`function`?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}n(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
 `+g.showPosition()+`
 Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(u+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:r.push(C),a.push(g.yytext),o.push(g.yylloc),r.push(E[1]),C=null,w?(C=w,w=null):(d=g.yyleng,l=g.yytext,u=g.yylineno,y=g.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[E[1]][1],O.$=a[a.length-A],O._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},b&&(O._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),D=this.performAction.apply(O,[l,d,u,_.yy,E[1],a,o].concat(h)),D!==void 0)return D;A&&(r=r.slice(0,-1*A*2),a=a.slice(0,-1*A),o=o.slice(0,-1*A)),r.push(this.productions_[E[1]][0]),a.push(O.$),o.push(O._$),j=s[r[r.length-2]][r[r.length-1]],r.push(j);break;case 3:return!0}}return!0},`parse`)};se.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
 `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
diff --git a/apps/pythinker-code/dist-web/assets/channel-BAi54gt4.js b/apps/pythinker-code/dist-web/assets/channel-BAi54gt4.js
deleted file mode 100644
index 82c6d150f..000000000
--- a/apps/pythinker-code/dist-web/assets/channel-BAi54gt4.js
+++ /dev/null
@@ -1 +0,0 @@
-import{at as e,it as t}from"./chunk-DU6HZSFF-DfRjAqU1.js";var n=(n,r)=>e.lang.round(t.parse(n)[r]);export{n as t};
\ No newline at end of file
diff --git a/apps/pythinker-code/dist-web/assets/channel-CZ7H-7IH.js b/apps/pythinker-code/dist-web/assets/channel-CZ7H-7IH.js
new file mode 100644
index 000000000..42cb01d1b
--- /dev/null
+++ b/apps/pythinker-code/dist-web/assets/channel-CZ7H-7IH.js
@@ -0,0 +1 @@
+import{at as e,it as t}from"./chunk-DU6HZSFF-B78kfBb6.js";var n=(n,r)=>e.lang.round(t.parse(n)[r]);export{n as t};
\ No newline at end of file
diff --git a/apps/pythinker-code/dist-web/assets/channel-CdQthrj0.js b/apps/pythinker-code/dist-web/assets/channel-CdQthrj0.js
new file mode 100644
index 000000000..e0c0eef95
--- /dev/null
+++ b/apps/pythinker-code/dist-web/assets/channel-CdQthrj0.js
@@ -0,0 +1 @@
+import{at as e,ot as t}from"./chunk-DU6HZSFF-CbPIJzjs.js";const n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
\ No newline at end of file
diff --git a/apps/pythinker-code/dist-web/assets/channel-DGuPsbDk.js b/apps/pythinker-code/dist-web/assets/channel-DGuPsbDk.js
deleted file mode 100644
index 14133b408..000000000
--- a/apps/pythinker-code/dist-web/assets/channel-DGuPsbDk.js
+++ /dev/null
@@ -1 +0,0 @@
-import{at as e,ot as t}from"./chunk-DU6HZSFF-CcF2nKWM.js";const n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
\ No newline at end of file
diff --git a/apps/pythinker-code/dist-web/assets/chunk-2E4U76K2-CUuPs4AQ.js b/apps/pythinker-code/dist-web/assets/chunk-2E4U76K2-DSYv76d-.js
similarity index 96%
rename from apps/pythinker-code/dist-web/assets/chunk-2E4U76K2-CUuPs4AQ.js
rename to apps/pythinker-code/dist-web/assets/chunk-2E4U76K2-DSYv76d-.js
index 082c1e18c..f31bb574e 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-2E4U76K2-CUuPs4AQ.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-2E4U76K2-DSYv76d-.js
@@ -1,2 +1,2 @@
 const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-INFHLROL-B0uUizjq.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js"])))=>i.map(i=>d[i]);
-import{t as e}from"./preload-helper-zJ_50EbN.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{b as r,x as i}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{g as a}from"./chunk-75Z2AOVW-D2HolPjd.js";import{a as o}from"./chunk-4HAMMTFA-B5soPjjq.js";import{i as s,n as c,r as l,t as u}from"./chunk-GVQU2GXP-BrOdU7Oy.js";import{a as d,i as f,l as p,n as m,r as h,s as g,t as _}from"./chunk-OSK3NFVY-BT2Y-lqQ.js";import{t as v}from"./graphlib-B8gBHxth.js";import{n as y,t as b}from"./chunk-L3NEJ4N5-XwNqFvev.js";function x(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}t(x,`createLayoutElementGroups`);async function S(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await o(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}t(S,`measureGroupLabel`);async function C(e,t,n){let r=await l(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(C,`insertMeasuredNode`);async function w(t,n){let r=new v({multigraph:!0,compound:!0}),a=[...n.edges],o=i(),s=x(t),{edgeLabels:c,nodes:l}=s,u=new Map,f=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup)f&&await S(l,e),r.setNode(e.id,{...e});else{if(f){let t=await C(l,e,{config:o,dir:e.dir});u.set(e.id,t)}r.setNode(e.id,{...e})}}));for(let e of a)f&&h(e)&&await d(c,e),r.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-INFHLROL-B0uUizjq.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(t,n)}return{graph:r,groups:s,nodeElements:u}}t(w,`createGraphWithElements`);var T=new Map,E=new Map,D=new Map,O=t(()=>{E.clear(),D.clear(),T.clear()},`clear`),k=t((e,t)=>{let r=E.get(t)||[];return n.trace(`In isDescendant`,t,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),A=t((e,t)=>{let r=E.get(t)||[];return n.info(`Descendants of `,t,` is `,r),n.info(`Edge is `,e),e.v===t||e.w===t?!1:r?r.includes(e.v)||k(e.v,t)||k(e.w,t)||r.includes(e.w):(n.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),j=t((e,t,r,i)=>{n.debug(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),n.debug(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)j(a,t,r,i);else{let o=t.node(a);n.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==t.parent(a)&&(n.debug(`Setting parent`,a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(n.debug(`Setting parent`,a,e),r.setParent(a,e)):(n.info(`In copy `,e,`root`,i,`data`,t.node(e),i),n.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);n.debug(`Copying Edges`,s),s.forEach(a=>{n.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);n.info(`Edge data`,o,i);try{A(a,i)?(n.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),n.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):n.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){n.error(e)}})}n.debug(`Removing node`,a),t.removeNode(a)})},`copy`),M=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)D.set(i,e),r=[...r,...M(i,t)];return r},`extractDescendants`),N=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),P=t((e,t,r)=>{let i=t.children(e);if(n.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let n=P(e,t,r),i=N(t,r,n);if(n)if(i.length>0)a=n;else return n}return a},`findNonClusterChild`),F=t(e=>!T.has(e)||!T.get(e).externalConnections?e:T.has(e)?T.get(e).id:e,`getAnchorId`),I=t((e,t)=>{if(!e||t>10){n.debug(`Opting out, no graph `);return}else n.debug(`Opting in, graph `);e.nodes().forEach(function(t){e.children(t).length>0&&(n.debug(`Cluster identified`,t,` Replacement id in edges: `,P(t,e,t)),E.set(t,M(t,e)),T.set(t,{id:P(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let r=e.children(t),i=e.edges();r.length>0?(n.debug(`Cluster identified`,t,E),i.forEach(e=>{k(e.v,t)^k(e.w,t)&&(n.debug(`Edge: `,e,` leaves cluster `,t),n.debug(`Descendants of XXX `,t,`: `,E.get(t)),T.get(t).externalConnections=!0)})):n.debug(`Not a cluster `,t,E)});for(let t of T.keys()){let n=T.get(t).id,r=e.parent(n);r!==t&&T.has(r)&&!T.get(r).externalConnections&&(T.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&T.get(t)?.externalConnections&&i&&B(e,n,t)){let r=V(e,t,e.parent(n));r&&(T.get(t).id=r)}}e.edges().forEach(function(t){let r=e.edge(t);n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(n.debug(`Fix XXX`,T,`ids:`,t.v,t.w,`Translating: `,T.get(t.v),` --- `,T.get(t.w)),T.get(t.v)||T.get(t.w)){if(n.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=F(t.v),a=F(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let n=e.parent(i);T.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){let n=e.parent(a);T.get(n).externalConnections=!0,r.toCluster=t.w}n.debug(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,r,t.name)}}),L(e,0),n.trace(T)},`adjustClustersAndEdges`),L=t((e,t)=>{if(t>10){n.error(`Bailing out`);return}let r=e.nodes(),i=!1;for(let t of r){let n=e.children(t);i||=n.length>0}if(!i){n.debug(`Done, no node has children`,e.nodes());return}n.debug(`Nodes = `,r,t);for(let i of r)if(n.debug(`Extracting node`,i,T,T.has(i)&&!T.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!T.has(i))n.debug(`Not a cluster`,i,t);else if(!T.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){n.debug(`Cluster without external connections, without a parent and with children`,i,t);let r=e.graph().rankdir===`TB`?`LR`:`TB`;T.get(i)?.clusterData?.dir&&(r=T.get(i).clusterData.dir,n.debug(`Fixing dir`,T.get(i).clusterData.dir,r));let a=new v({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});j(i,e,a,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:T.get(i).clusterData,label:T.get(i).label,graph:a})}else n.debug(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!T.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),n.debug(T);r=e.nodes(),n.debug(`New list of nodes`,r);for(let i of r){let r=e.node(i);n.debug(` Now next level`,i,r),r?.clusterNode&&L(r.graph,t+1)}},`extractor`),R=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=R(e,e.children(t));n=[...n,...r]}),n},`sorter`),z=t(e=>R(e,e.children()),`sortNodesByHierarchy`),B=t((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=T.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),V=t((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||k(i,n))continue;let r=P(i,e,t);if(r&&!B(e,r,t))return r}return null},`findSafeAnchorNode`);function H({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??W;return t(async function(t,n,c,l){let u=n.select(`g`);(c?.insertMarkers??g)(u,t.markers,t.type,t.diagramId),U();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let f=await s(t,d),p=await r(t,d),m={...d,measure:f};i?await i(t,m,p):await G(t,m,o),await a?.(t,m,p)},`render`)}t(H,`createCommonLayoutRenderer`);function U(){u(),_(),b(),O()}t(U,`clearLayoutRenderState`);async function W(e,{element:t}){return await w(t,e)}t(W,`defaultMeasureLayout`);async function G(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await K(i,r,t,n);let a=J(e.nodes);for(let r of e.edges)Y(r,n)||await X(i,r,a,e,n,t)}t(G,`paintLayoutData`);async function K(e,t,n,r){t.clusterNode?s(t):q(t,n,r)?await y(e.clusters,t):s(t)}t(K,`paintLayoutNode`);function q(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t(q,`shouldPaintAsCluster`);function J(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(J,`buildNodeLookup`);function Y(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(Y,`shouldSkipPaintEdge`);async function X(e,t,n,r,i,a){let o=f(e.edgePaths,{...t},i.clusterDb??new Map,r.type,Z(t.start,t,n,a,i),Z(t.end,t,n,a,i),r.diagramId,Q(t,i));h(t)&&(m.has(t.id)||await d(e.edgeLabels,t),$(t,o))}t(X,`paintLayoutEdge`);function Z(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(Z,`getRenderedNode`);function Q(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(Q,`shouldSkipIntersect`);function $(e,t){let i=t?.updatedPath??t?.originalPath,{subGraphTitleTotalMargin:o}=c({flowchart:r().flowchart??{}});if(e.label){let r=m.get(e.id),s=e.x,c=e.y;if(i){let r=a.calcLabelPosition(i);n.debug(`Moving label `+e.label+` from (`,s,`,`,c,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(s=r.x,c=r.y)}r.attr(`transform`,`translate(${s}, ${c+o/2})`)}if(e?.startLabelLeft){let t=p.get(e.id).startLeft,n=e?.x,r=e?.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.startLabelRight){let t=p.get(e.id).startRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelLeft){let t=p.get(e.id).endLeft,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelRight){let t=p.get(e.id).endRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}}t($,`positionRenderedEdgeLabel`);export{x as a,C as c,H as i,G as l,U as n,W as o,T as r,P as s,I as t,z as u};
\ No newline at end of file
+import{t as e}from"./preload-helper-zJ_50EbN.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{b as r,x as i}from"./chunk-DU6HZSFF-B78kfBb6.js";import{g as a}from"./chunk-75Z2AOVW-CAoob5DH.js";import{a as o}from"./chunk-4HAMMTFA-Dlc4jvjp.js";import{i as s,n as c,r as l,t as u}from"./chunk-GVQU2GXP-Ddvf-Y11.js";import{a as d,i as f,l as p,n as m,r as h,s as g,t as _}from"./chunk-OSK3NFVY-ZXiPE9OQ.js";import{t as v}from"./graphlib-B8gBHxth.js";import{n as y,t as b}from"./chunk-L3NEJ4N5-BKsN7TKH.js";function x(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}t(x,`createLayoutElementGroups`);async function S(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await o(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}t(S,`measureGroupLabel`);async function C(e,t,n){let r=await l(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(C,`insertMeasuredNode`);async function w(t,n){let r=new v({multigraph:!0,compound:!0}),a=[...n.edges],o=i(),s=x(t),{edgeLabels:c,nodes:l}=s,u=new Map,f=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup)f&&await S(l,e),r.setNode(e.id,{...e});else{if(f){let t=await C(l,e,{config:o,dir:e.dir});u.set(e.id,t)}r.setNode(e.id,{...e})}}));for(let e of a)f&&h(e)&&await d(c,e),r.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-INFHLROL-B0uUizjq.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(t,n)}return{graph:r,groups:s,nodeElements:u}}t(w,`createGraphWithElements`);var T=new Map,E=new Map,D=new Map,O=t(()=>{E.clear(),D.clear(),T.clear()},`clear`),k=t((e,t)=>{let r=E.get(t)||[];return n.trace(`In isDescendant`,t,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),A=t((e,t)=>{let r=E.get(t)||[];return n.info(`Descendants of `,t,` is `,r),n.info(`Edge is `,e),e.v===t||e.w===t?!1:r?r.includes(e.v)||k(e.v,t)||k(e.w,t)||r.includes(e.w):(n.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),j=t((e,t,r,i)=>{n.debug(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),n.debug(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)j(a,t,r,i);else{let o=t.node(a);n.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==t.parent(a)&&(n.debug(`Setting parent`,a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(n.debug(`Setting parent`,a,e),r.setParent(a,e)):(n.info(`In copy `,e,`root`,i,`data`,t.node(e),i),n.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);n.debug(`Copying Edges`,s),s.forEach(a=>{n.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);n.info(`Edge data`,o,i);try{A(a,i)?(n.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),n.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):n.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){n.error(e)}})}n.debug(`Removing node`,a),t.removeNode(a)})},`copy`),M=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)D.set(i,e),r=[...r,...M(i,t)];return r},`extractDescendants`),N=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),P=t((e,t,r)=>{let i=t.children(e);if(n.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let n=P(e,t,r),i=N(t,r,n);if(n)if(i.length>0)a=n;else return n}return a},`findNonClusterChild`),F=t(e=>!T.has(e)||!T.get(e).externalConnections?e:T.has(e)?T.get(e).id:e,`getAnchorId`),I=t((e,t)=>{if(!e||t>10){n.debug(`Opting out, no graph `);return}else n.debug(`Opting in, graph `);e.nodes().forEach(function(t){e.children(t).length>0&&(n.debug(`Cluster identified`,t,` Replacement id in edges: `,P(t,e,t)),E.set(t,M(t,e)),T.set(t,{id:P(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let r=e.children(t),i=e.edges();r.length>0?(n.debug(`Cluster identified`,t,E),i.forEach(e=>{k(e.v,t)^k(e.w,t)&&(n.debug(`Edge: `,e,` leaves cluster `,t),n.debug(`Descendants of XXX `,t,`: `,E.get(t)),T.get(t).externalConnections=!0)})):n.debug(`Not a cluster `,t,E)});for(let t of T.keys()){let n=T.get(t).id,r=e.parent(n);r!==t&&T.has(r)&&!T.get(r).externalConnections&&(T.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&T.get(t)?.externalConnections&&i&&B(e,n,t)){let r=V(e,t,e.parent(n));r&&(T.get(t).id=r)}}e.edges().forEach(function(t){let r=e.edge(t);n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(n.debug(`Fix XXX`,T,`ids:`,t.v,t.w,`Translating: `,T.get(t.v),` --- `,T.get(t.w)),T.get(t.v)||T.get(t.w)){if(n.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=F(t.v),a=F(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let n=e.parent(i);T.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){let n=e.parent(a);T.get(n).externalConnections=!0,r.toCluster=t.w}n.debug(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,r,t.name)}}),L(e,0),n.trace(T)},`adjustClustersAndEdges`),L=t((e,t)=>{if(t>10){n.error(`Bailing out`);return}let r=e.nodes(),i=!1;for(let t of r){let n=e.children(t);i||=n.length>0}if(!i){n.debug(`Done, no node has children`,e.nodes());return}n.debug(`Nodes = `,r,t);for(let i of r)if(n.debug(`Extracting node`,i,T,T.has(i)&&!T.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!T.has(i))n.debug(`Not a cluster`,i,t);else if(!T.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){n.debug(`Cluster without external connections, without a parent and with children`,i,t);let r=e.graph().rankdir===`TB`?`LR`:`TB`;T.get(i)?.clusterData?.dir&&(r=T.get(i).clusterData.dir,n.debug(`Fixing dir`,T.get(i).clusterData.dir,r));let a=new v({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});j(i,e,a,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:T.get(i).clusterData,label:T.get(i).label,graph:a})}else n.debug(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!T.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),n.debug(T);r=e.nodes(),n.debug(`New list of nodes`,r);for(let i of r){let r=e.node(i);n.debug(` Now next level`,i,r),r?.clusterNode&&L(r.graph,t+1)}},`extractor`),R=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=R(e,e.children(t));n=[...n,...r]}),n},`sorter`),z=t(e=>R(e,e.children()),`sortNodesByHierarchy`),B=t((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=T.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),V=t((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||k(i,n))continue;let r=P(i,e,t);if(r&&!B(e,r,t))return r}return null},`findSafeAnchorNode`);function H({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??W;return t(async function(t,n,c,l){let u=n.select(`g`);(c?.insertMarkers??g)(u,t.markers,t.type,t.diagramId),U();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let f=await s(t,d),p=await r(t,d),m={...d,measure:f};i?await i(t,m,p):await G(t,m,o),await a?.(t,m,p)},`render`)}t(H,`createCommonLayoutRenderer`);function U(){u(),_(),b(),O()}t(U,`clearLayoutRenderState`);async function W(e,{element:t}){return await w(t,e)}t(W,`defaultMeasureLayout`);async function G(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await K(i,r,t,n);let a=J(e.nodes);for(let r of e.edges)Y(r,n)||await X(i,r,a,e,n,t)}t(G,`paintLayoutData`);async function K(e,t,n,r){t.clusterNode?s(t):q(t,n,r)?await y(e.clusters,t):s(t)}t(K,`paintLayoutNode`);function q(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t(q,`shouldPaintAsCluster`);function J(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(J,`buildNodeLookup`);function Y(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(Y,`shouldSkipPaintEdge`);async function X(e,t,n,r,i,a){let o=f(e.edgePaths,{...t},i.clusterDb??new Map,r.type,Z(t.start,t,n,a,i),Z(t.end,t,n,a,i),r.diagramId,Q(t,i));h(t)&&(m.has(t.id)||await d(e.edgeLabels,t),$(t,o))}t(X,`paintLayoutEdge`);function Z(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(Z,`getRenderedNode`);function Q(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(Q,`shouldSkipIntersect`);function $(e,t){let i=t?.updatedPath??t?.originalPath,{subGraphTitleTotalMargin:o}=c({flowchart:r().flowchart??{}});if(e.label){let r=m.get(e.id),s=e.x,c=e.y;if(i){let r=a.calcLabelPosition(i);n.debug(`Moving label `+e.label+` from (`,s,`,`,c,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(s=r.x,c=r.y)}r.attr(`transform`,`translate(${s}, ${c+o/2})`)}if(e?.startLabelLeft){let t=p.get(e.id).startLeft,n=e?.x,r=e?.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.startLabelRight){let t=p.get(e.id).startRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelLeft){let t=p.get(e.id).endLeft,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelRight){let t=p.get(e.id).endRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}}t($,`positionRenderedEdgeLabel`);export{x as a,C as c,H as i,G as l,U as n,W as o,T as r,P as s,I as t,z as u};
\ No newline at end of file
diff --git a/apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-B5soPjjq.js b/apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-Dlc4jvjp.js
similarity index 99%
rename from apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-B5soPjjq.js
rename to apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-Dlc4jvjp.js
index 1e6bdba35..a5d32a2a1 100644
--- a/apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-B5soPjjq.js
+++ b/apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-Dlc4jvjp.js
@@ -1,4 +1,4 @@
-import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{A as r,B as i,M as a,T as o,b as s,f as c,g as l,x as u,z as d}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{a as f,p,r as m,u as h}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as g}from"./chunk-PWAF6VOD-vmg_e0ho.js";import{n as _,r as v}from"./chunk-GMAD6QVW-xizYnG4f.js";import{a as y,i as b,r as x,t as S}from"./chunk-P2QGCYS3-CQc2NCc1.js";import{t as C}from"./rough.esm-CSKSodPl.js";var w=1,T=3;async function E(t){let n=t.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!D(t);await Promise.all([...n].map(t=>new Promise(n=>{function i(){if(t.style.display=`flex`,t.style.flexDirection=`column`,r){let[e=c.fontSize]=p(u().fontSize?u().fontSize:window.getComputedStyle(document.body).fontSize),n=e*5+`px`;t.style.minWidth=n,t.style.maxWidth=n}else t.style.width=`100%`;n(t)}e(i,`setupImage`),setTimeout(()=>{t.complete&&i()}),t.addEventListener(`error`,i),t.addEventListener(`load`,i)})))}e(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}e(D,`hasTextBesidesImages`);var O=3,k=32,A=e(async(e,t,r)=>{let i=u(),a=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),s=[{text:typeof t.label==`string`?t.label:t.label?.[0]??``,cssClass:`c4-name`},{text:t.stereotype,cssClass:`c4-type`},...(t.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),c=t.width?Math.max(t.width-2*(t.padding??0),k):u().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?c:1/0,p=await Promise.all(s.map(async e=>{let r=o.append(`g`).attr(`class`,e.cssClass),a=await _(r,d(f(e.text??``),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return n(a).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),n(a).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),m=Math.max(...p.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of p)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let v=p.length>0?g-O:0;return o.insert(`rect`,`:first-child`),o.attr(`transform`,`translate(${-m/2}, ${-v/2})`),{shapeSvg:a,bbox:o.node().getBBox(),halfPadding:(t.padding??0)/2,label:o}},`c4LabelHelper`),j=e(async(e,t,r)=>{if(t.stereotype!==void 0)return A(e,t,r);let i,a=t.useHtmlLabels||l(u()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),c;c=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let p=!!t.icon||!!t.img,m=t.labelType===`markdown`,g=await _(s,d(f(c),u()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||u().flowchart?.wrappingWidth,classes:m?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:p,markdown:m},u()),y=(t?.padding??0)/2,b;if(a){let e=g.children[0],t=n(g);await E(e),b=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,b.width),t.attr(`height`,b.height)}else b=await v.measure(()=>g.getBBox());return a?s.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`):s.attr(`transform`,`translate(0, `+-b.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:b,halfPadding:y,label:s}},`labelHelper`),M=e(async(e,t,r)=>{let i=r.useHtmlLabels??o(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await _(a,d(f(t),u()),{useHtmlLabels:i,width:r.width||u()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(o(u())){let e=s.children[0],t=n(s);l=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await v.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:c,label:a}},`insertLabel`),N=e((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),P=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(F,`createPathFromPoints`);function I(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(I,`generateFullSineWavePoints`);function L(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;ie.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(ee,`mergePaths`);var R=e((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),z=e((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),te=e(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=u(),c=o(s);return await _(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function B(e,t){return e.intersect(t)}e(B,`intersectNode`);var ne=B;function V(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x0}e(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return au,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,h(s)),N(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),K.circle(n,1,e)},o}e(oe,`anchor`);function se(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(ce,`calculateArcSagitta`);async function le(t,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(t,n,P(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ce(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...se(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...se(g/2,_/2,g/2,-_/2,p,m,!0)],S=C.svg(u),w=y(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,i),D.attr(`transform`,`translate(${p/2}, 0)`),N(n,D),n.intersect=function(e){return K.polygon(n,x,e)},u}e(le,`bowTieRect`);async function ue(t,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=b(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await j(t,n,P(n)),l=r?.nodeBorder??r?.lineColor??`currentColor`,u=n.padding??12,d=Math.max(s.width+u*2,n.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,n.height??0),m=-p/2+f,h=p/2,g=d*.72,_=[`M${-d/2},${m}`,`L${-g/2},${h}`,`A${g/2},${f} 0 0 0 ${g/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:v}=n,x=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(n.look===`handDrawn`){let e=C.svg(o).path(_,y(n,{}));x.node()?.appendChild(e),v&&x.attr(`style`,v)}else x.append(`path`).attr(`d`,_).attr(`style`,a);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(n,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=e((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),T=[...w(d/2,m,-1),...w(g/2,h,1).reverse()];return n.intersect=function(e){return K.polygon(n,T,e)},o}e(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=u(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=b(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),m=-f/2,g=-p/2,_=-(fe+de)/2,v=s.select(`.label`);v&&(t.useHtmlLabels??o(u())?v.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+_})`):v.attr(`transform`,`translate(0, ${-c.height/2+_})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(z(m,g,f,p,me),n);x=s.insert(()=>a,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,h(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,me).attr(`ry`,me).attr(`x`,m).attr(`y`,g).attr(`width`,f).attr(`height`,p).attr(`fill`,r).attr(`stroke`,i);let S=g+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,m+8).attr(`y1`,S).attr(`x2`,m+f-8).attr(`y2`,S).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let w=S+de/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,i);return N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}e(he,`collapsedGroup`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=e(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n);break}return t},`expandAndDeduplicateDirections`),ye=e(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"right|left|up|down":e(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":e(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":e(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":e(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":e(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":e(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":e(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[_e]:()=>[{x:0,y:0}]},xe=e((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}e(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),y(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+18/2).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}e(Te,`card`);function Ee(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=C.svg(r),c=y(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}e(Ee,`choice`);async function De(e,n,r){let{labelStyles:i,nodeStyles:a}=b(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await j(e,n,P(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=C.svg(o),t=y(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return N(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),K.circle(n,u,e)},o}e(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}e(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),y(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(ke,`consoleWindow`);function Ae(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
+import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{A as r,B as i,M as a,T as o,b as s,f as c,g as l,x as u,z as d}from"./chunk-DU6HZSFF-B78kfBb6.js";import{a as f,p,r as m,u as h}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as g}from"./chunk-PWAF6VOD-D9eOryqj.js";import{n as _,r as v}from"./chunk-GMAD6QVW-dCDLGP3F.js";import{a as y,i as b,r as x,t as S}from"./chunk-P2QGCYS3-BTLpY7ks.js";import{t as C}from"./rough.esm-CSKSodPl.js";var w=1,T=3;async function E(t){let n=t.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!D(t);await Promise.all([...n].map(t=>new Promise(n=>{function i(){if(t.style.display=`flex`,t.style.flexDirection=`column`,r){let[e=c.fontSize]=p(u().fontSize?u().fontSize:window.getComputedStyle(document.body).fontSize),n=e*5+`px`;t.style.minWidth=n,t.style.maxWidth=n}else t.style.width=`100%`;n(t)}e(i,`setupImage`),setTimeout(()=>{t.complete&&i()}),t.addEventListener(`error`,i),t.addEventListener(`load`,i)})))}e(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}e(D,`hasTextBesidesImages`);var O=3,k=32,A=e(async(e,t,r)=>{let i=u(),a=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),s=[{text:typeof t.label==`string`?t.label:t.label?.[0]??``,cssClass:`c4-name`},{text:t.stereotype,cssClass:`c4-type`},...(t.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),c=t.width?Math.max(t.width-2*(t.padding??0),k):u().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?c:1/0,p=await Promise.all(s.map(async e=>{let r=o.append(`g`).attr(`class`,e.cssClass),a=await _(r,d(f(e.text??``),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return n(a).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),n(a).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),m=Math.max(...p.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of p)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let v=p.length>0?g-O:0;return o.insert(`rect`,`:first-child`),o.attr(`transform`,`translate(${-m/2}, ${-v/2})`),{shapeSvg:a,bbox:o.node().getBBox(),halfPadding:(t.padding??0)/2,label:o}},`c4LabelHelper`),j=e(async(e,t,r)=>{if(t.stereotype!==void 0)return A(e,t,r);let i,a=t.useHtmlLabels||l(u()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),c;c=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let p=!!t.icon||!!t.img,m=t.labelType===`markdown`,g=await _(s,d(f(c),u()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||u().flowchart?.wrappingWidth,classes:m?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:p,markdown:m},u()),y=(t?.padding??0)/2,b;if(a){let e=g.children[0],t=n(g);await E(e),b=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,b.width),t.attr(`height`,b.height)}else b=await v.measure(()=>g.getBBox());return a?s.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`):s.attr(`transform`,`translate(0, `+-b.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:b,halfPadding:y,label:s}},`labelHelper`),M=e(async(e,t,r)=>{let i=r.useHtmlLabels??o(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await _(a,d(f(t),u()),{useHtmlLabels:i,width:r.width||u()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(o(u())){let e=s.children[0],t=n(s);l=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await v.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:c,label:a}},`insertLabel`),N=e((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),P=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(F,`createPathFromPoints`);function I(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(I,`generateFullSineWavePoints`);function L(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;ie.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(ee,`mergePaths`);var R=e((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),z=e((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),te=e(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=u(),c=o(s);return await _(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function B(e,t){return e.intersect(t)}e(B,`intersectNode`);var ne=B;function V(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x0}e(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return au,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,h(s)),N(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),K.circle(n,1,e)},o}e(oe,`anchor`);function se(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(ce,`calculateArcSagitta`);async function le(t,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(t,n,P(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ce(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...se(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...se(g/2,_/2,g/2,-_/2,p,m,!0)],S=C.svg(u),w=y(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,i),D.attr(`transform`,`translate(${p/2}, 0)`),N(n,D),n.intersect=function(e){return K.polygon(n,x,e)},u}e(le,`bowTieRect`);async function ue(t,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=b(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await j(t,n,P(n)),l=r?.nodeBorder??r?.lineColor??`currentColor`,u=n.padding??12,d=Math.max(s.width+u*2,n.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,n.height??0),m=-p/2+f,h=p/2,g=d*.72,_=[`M${-d/2},${m}`,`L${-g/2},${h}`,`A${g/2},${f} 0 0 0 ${g/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:v}=n,x=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(n.look===`handDrawn`){let e=C.svg(o).path(_,y(n,{}));x.node()?.appendChild(e),v&&x.attr(`style`,v)}else x.append(`path`).attr(`d`,_).attr(`style`,a);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(n,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=e((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),T=[...w(d/2,m,-1),...w(g/2,h,1).reverse()];return n.intersect=function(e){return K.polygon(n,T,e)},o}e(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=u(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=b(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),m=-f/2,g=-p/2,_=-(fe+de)/2,v=s.select(`.label`);v&&(t.useHtmlLabels??o(u())?v.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+_})`):v.attr(`transform`,`translate(0, ${-c.height/2+_})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(z(m,g,f,p,me),n);x=s.insert(()=>a,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,h(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,me).attr(`ry`,me).attr(`x`,m).attr(`y`,g).attr(`width`,f).attr(`height`,p).attr(`fill`,r).attr(`stroke`,i);let S=g+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,m+8).attr(`y1`,S).attr(`x2`,m+f-8).attr(`y2`,S).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let w=S+de/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,i);return N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}e(he,`collapsedGroup`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=e(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n);break}return t},`expandAndDeduplicateDirections`),ye=e(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"right|left|up|down":e(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":e(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":e(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":e(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":e(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":e(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":e(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[_e]:()=>[{x:0,y:0}]},xe=e((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}e(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),y(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+18/2).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}e(Te,`card`);function Ee(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=C.svg(r),c=y(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}e(Ee,`choice`);async function De(e,n,r){let{labelStyles:i,nodeStyles:a}=b(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await j(e,n,P(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=C.svg(o),t=y(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return N(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),K.circle(n,u,e)},o}e(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}e(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),y(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(ke,`consoleWindow`);function Ae(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
                    M ${i.x},${i.y} L ${o.x},${o.y}`}e(Ae,`createLine`);function je(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r,n.label=``;let a=e.insert(`g`).attr(`class`,P(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=C.svg(a),l=y(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=Ae(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),N(n,p),n.intersect=function(e){return t.info(`crossedCircle intersect`,n,{radius:o,point:e}),K.circle(n,o,e)},a}e(je,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iS,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>v,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}e(Me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iS,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>v,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}e(Ne,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iE,`:first-child`).attr(`stroke-opacity`,0),D.insert(()=>x,`:first-child`),D.insert(()=>w,`:first-child`),D.attr(`class`,`text`),f&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,h,e)},i}e(Pe,`curlyBraces`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=C.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,x=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...L(-_,-g/2,d,50,270,90)],S=F(x),w=p.path(S,m),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-l/2}, ${-u/2})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}e(Fe,`curvedTrapezoid`);async function Ie(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,g=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:_}=t;if(t.look===`handDrawn`){let e=C.svg(i),n=y(t,{}),r=e.path(z(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);g.insert(()=>a,`:first-child`),g.insert(()=>r,`:first-child`),_&&g.attr(`style`,_)}else g.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),g.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);N(t,g);let v=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let x=m+l,S=Math.asin(Math.min(1,(h-x)/l))*180/Math.PI,w=[...L(0,-x,l,24,180+S,-S),...L(-(-c/2+f),-(h+f),f,12,90,0),...L(-(-c/2+f),-(p/2-f),f,12,360,270),...L(-(c/2-f),-(p/2-f),f,12,270,180),...L(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return K.polygon(t,w,e)},i}e(Ie,`person`);var Le=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),Re=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),ze=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Be=8,Ve=8;async function He(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i,s=t.width??0;if(t.width&&(t.width-=o,t.widtho,`:first-child`),g=c.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=Le(0,0,d,m,f,p);g=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(_)).attr(`style`,r)}return g.attr(`label-offset-y`,p),g.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),N(t,g),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},c}e(He,`cylinder`);async function Ue(e,t,n){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await j(e,t,P(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:p}=t,{cssStyles:m}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=C.svg(a),n=y(t,{}),r=f||p?e.path(z(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,h(f)).attr(`ry`,h(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return N(t,d,t.look===`handDrawn`?void 0:{width:s,height:c}),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},a}e(Ue,`drawRect`);async function We(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ue(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=C.svg(c),n=y(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}e(We,`datastore`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=C.svg(o),g=y(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),x=o.insert(()=>v,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),N(t,x),t.intersect=function(e){return K.rect(t,e)},o}e(Ge,`dividedRectangle`);async function Ke(e,n){let{labelStyles:r,nodeStyles:i}=b(n),a=n.look===`neo`?12:5;n.labelStyle=r;let o=n.padding??0,s=n.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await j(e,n,P(n)),u=(n?.width?n?.width/2:l.width/2)+(s??0),d=u-a,f,{cssStyles:p}=n;if(n.look===`handDrawn`){let e=C.svg(c),t=y(n,{roughness:.2,strokeWidth:2.5}),r=y(n,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,t),a=e.circle(0,0,d*2,r);f=c.insert(`g`,`:first-child`),f.attr(`class`,h(n.cssClasses)).attr(`style`,h(p)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=c.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return N(n,f),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,u,e),K.circle(n,u,e)},c}e(Ke,`doublecircle`);function qe(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=b(n);n.label=``,n.labelStyle=i;let o=e.insert(`g`).attr(`class`,P(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=C.svg(o),{nodeBorder:l}=r,u=y(n,{fillStyle:`solid`});n.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),N(n,f),n.intersect=function(e){return t.info(`filledCircle intersect`,n,{radius:7,point:e}),K.circle(n,7,e)},o}e(qe,`filledCircle`);var Je=10,Ye=10;async function Xe(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.height=n?.height??0,n.heightv,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),i&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),n.width=u,n.height=d,N(n,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(n.padding??0)/2+(c.y-(c.top??0))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,p,e),K.polygon(n,p,e)},s}e(Xe,`flippedTriangle`);async function Ze(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],g=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:_}=t,v;if(t.look===`handDrawn`){let e=C.svg(i).path(g,y(t,{}));v=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),_&&v.attr(`style`,_)}else v=i.insert(`path`,`:first-child`).attr(`d`,g).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?N(t,v):N(t,v,{width:c,height:d});let x=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return K.polygon(t,h,e)},i}e(Ze,`folder`);function Qe(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=b(t);t.label=``;let o=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=C.svg(o),p=y(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),N(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return K.rect(t,e)},o}e(Qe,`forkJoin`);async function $e(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.look===`neo`?16:n.padding??0,o=n.look===`neo`?12:n.padding??0;(n.width||n.height)&&(n.height=(n?.height??0)-o*2,n.height<10&&(n.height=10),n.width=(n?.width??0)-a*2,n.width<15&&(n.width=15));let{shapeSvg:s,bbox:c}=await j(e,n,P(n)),l=(n?.width?n?.width:Math.max(15,c.width))+a*2,u=(n?.height?n?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=n,p=C.svg(s),m=y(n,{});n.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...L(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=F(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&n.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),i&&n.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,i),N(n,v),n.intersect=function(e){return t.info(`Pill intersect`,n,{radius:d,point:e}),K.polygon(n,h,e)},s}e($e,`halfRoundedRectangle`);var et=e((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=b(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await j(e,t,P(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(c),n=y(t,{}),r=et(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}e(tt,`hexagon`);async function nt(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await j(e,n,P(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=C.svg(a),u=y(n,{});n.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=F(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),N(n,m),n.intersect=function(e){return t.info(`Pill intersect`,n,{points:d}),K.polygon(n,d,e)},a}e(nt,`hourglass`);async function rt(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(e,n,`icon-shape default`),p=n.pos===`t`,m=c,h=c,{nodeBorder:_}=r,{stylesMap:v}=S(n),x=-h/2,w=-m/2,T=n.label?8:0,E=C.svg(u),D=y(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(x,w,h,m,D),k=Math.max(h,d.width),A=m+d.height+T,M=E.rectangle(-k/2,-A/2,k,A,{...D,fill:`transparent`,stroke:`none`}),P=u.insert(()=>O,`:first-child`),F=u.insert(()=>M);if(n.icon){let e=u.append(`g`);e.html(`${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+T/2-i/2-o:-d.height/2-T/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??_};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+T/2:-d.height/2-T/2})`),N(n,F),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+T},{x:r+h/2,y:i-a/2+d.height+T},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+d.height+T},{x:r-d.width/2,y:i-a/2+d.height+T}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/2,y:i-a/2+m},{x:r+d.width/2,y:i-a/2+m},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+m},{x:r-h/2,y:i-a/2+m}],K.polygon(n,o,e)},u}e(rt,`icon`);async function it(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(e,n,`icon-shape default`),p=n.label?8:0,m=n.pos===`t`,{nodeBorder:h,mainBkg:_}=r,{stylesMap:v}=S(n),x=C.svg(u),w=y(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=v.get(`fill`)??_;let T=u.append(`g`);n.icon&&T.html(`${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let E=T.node().getBBox(),D=E.width,O=E.height,k=E.x,A=E.y,M=Math.max(D,O)*Math.SQRT2+40,P=x.circle(0,0,M,w),F=Math.max(M,d.width),I=M+d.height+p,L=x.rectangle(-F/2,-I/2,F,I,{...w,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return T.attr(`transform`,`translate(${-D/2-k},${m?d.height/2+p/2-O/2-A:-d.height/2-p/2-O/2-A})`),T.attr(`style`,`color: ${v.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),N(n,R),n.intersect=function(e){return t.info(`iconSquare intersect`,n,e),K.rect(n,e)},u}e(it,`iconCircle`);async function at(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:w}=S(n),T=-_/2,E=-h/2,D=n.label?8:0,O=C.svg(u),k=y(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??x;let A=O.path(z(T,E,_,h,5),k),M=Math.max(_,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`).attr(`class`,`icon-shape2`),L=u.insert(()=>F);if(n.icon){let e=u.append(`g`);e.html(`${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(n,L),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+_/2,y:i-a/2+d.height+D},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-_/2,y:i-a/2+h}],K.polygon(n,o,e)},u}e(at,`iconRounded`);async function ot(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:w}=S(n),T=-_/2,E=-h/2,D=n.label?8:0,O=C.svg(u),k=y(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??x;let A=O.path(z(T,E,_,h,.1),k),M=Math.max(_,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`),L=u.insert(()=>F);if(n.icon){let e=u.append(`g`);e.html(`${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(n,L),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+_/2,y:i-a/2+d.height+D},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-_/2,y:i-a/2+h}],K.polygon(n,o,e)},u}e(ot,`iconSquare`);async function st(e,n,{config:{flowchart:r}}){let i=new Image;i.src=n?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));n.imageAspectRatio=a/o;let{labelStyles:s}=b(n);n.labelStyle=s;let c=r?.wrappingWidth;n.defaultWidth=r?.wrappingWidth;let l=Math.max(n.label?c??0:0,n?.assetWidth??a),u=n.constraint===`on`&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:l,d=n.constraint===`on`?u/n.imageAspectRatio:n?.assetHeight??o;n.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await j(e,n,`image-shape default`),h=n.pos===`t`,g=-u/2,_=-d/2,v=n.label?8:0,x=C.svg(f),S=y(n,{});n.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let w=x.rectangle(g,_,u,d,S),T=Math.max(u,p.width),E=d+p.height+v,D=x.rectangle(-T/2,-E/2,T,E,{...S,fill:`none`,stroke:`none`}),O=f.insert(()=>w,`:first-child`),k=f.insert(()=>D);if(n.img){let e=f.append(`image`);e.attr(`href`,n.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?E/2-d:-E/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-v/2:d/2-p.height/2+v/2})`),O.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),N(n,k),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+v},{x:r+u/2,y:i-a/2+p.height+v},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+v},{x:r-p.width/2,y:i-a/2+p.height+v}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],K.polygon(n,o,e)},f}e(st,`imageSquare`);async function ct(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(ct,`inv_trapezoid`);async function lt(e,t){let{shapeSvg:n,bbox:r,label:i}=await j(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),N(t,a),t.intersect=function(e){return K.rect(t,e)},n}e(lt,`labelRect`);async function ut(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(ut,`lean_left`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(dt,`lean_right`);function ft(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.label=``,n.labelStyle=r;let a=e.insert(`g`).attr(`class`,P(n)).attr(`id`,n.domId??n.id),{cssStyles:o}=n,s=Math.max(35,n?.width??0),c=Math.max(35,n?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=C.svg(a),d=y(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=F(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),N(n,m),n.intersect=function(e){return t.info(`lightningBolt intersect`,n,e),K.polygon(n,l,e)},a}e(ft,`lightningBolt`);var pt=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),mt=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),ht=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),gt=10,_t=10;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<_t&&(t.width=_t);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.heighto,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=pt(0,0,u,p,d,f,m);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(_)).attr(`style`,r)}return g.attr(`label-offset-y`,f),g.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),N(t,g),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(vt,`linedCylinder`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=C.svg(s),g=y(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...I(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),x=s.insert(()=>v,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),N(t,x),t.intersect=function(e){return K.polygon(t,_,e)},s}e(yt,`linedWaveEdgedRect`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await j(e,t,P(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=C.svg(c),x=y(t,{}),S=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],w=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let T=F(S),E=v.path(T,x),D=F(w),O=v.path(D,x);t.look!==`handDrawn`&&(E=ee(E),O=ee(O));let k=c.insert(`g`,`:first-child`);return k.insert(()=>E),k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),N(t,k),t.intersect=function(e){return K.polygon(t,S,e)},c}e(bt,`multiRect`);async function xt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=I(h-10,g+m+10,h+d-10,g+m+10,p,.8),x=v?.[v.length-1],S=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],w=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:g},{x:h,y:g}],T=C.svg(i),E=y(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`);let D=F(S),O=T.path(D,E),k=F(w),A=T.path(k,E),M=i.insert(()=>O,`:first-child`);return M.insert(()=>A),M.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),N(t,M),t.intersect=function(e){return K.polygon(t,S,e)},i}e(xt,`multiWaveEdgedRectangle`);async function St(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r,t.useHtmlLabels||o(s())||(t.centerLabel=!0);let{shapeSvg:a,bbox:c,label:l}=await j(e,t,P(t)),u=Math.max(c.width+(t.padding??0)*2,t?.width??0),d=Math.max(c.height+(t.padding??0)*2,t?.height??0),f=-u/2,p=-d/2,{cssStyles:m}=t,h=C.svg(a),g=y(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,u,d,g),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,v),t.intersect=function(e){return K.rect(t,e)},a}e(St,`note`);var Ct=e((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function wt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=C.svg(i),n=y(t,{}),r=Ct(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),N(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=K.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(wt,`question`);async function Tt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,g=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:_}=t,v=C.svg(s),x=y(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=F(g),w=v.path(S,x),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,T),t.intersect=function(e){return K.polygon(t,g,e)},s}e(Tt,`rect_left_inv_arrow`);async function Et(e,r){let{labelStyles:i,nodeStyles:a}=b(r);r.labelStyle=i;let s;s=r.cssClasses?`node `+r.cssClasses:`node default`;let c=e.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),l=c.insert(`g`),d=c.insert(`g`).attr(`class`,`label`).attr(`style`,a),f=r.description,p=r.label,m=await te(d,p,r.labelStyle,!0,!0),h={width:0,height:0};if(o(u())){let e=m.children[0],t=n(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}t.info(`Text 2`,f);let g=f||[],_=m.getBBox(),v=await te(d,Array.isArray(g)?g.join(`
`):g,r.labelStyle,!0,!0),x=v.children[0],S=n(v);h=x.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let w=(r.padding||0)/2;n(v).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+w+5)+`)`),n(m).attr(`transform`,`translate( `+(h.width<_.width?0:-(_.width-h.width)/2)+`, 0)`),h=d.node().getBBox(),d.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-w+3)+`)`);let T=h.width+(r.padding||0),E=h.height+(r.padding||0),D=-h.width/2-w,O=-h.height/2-w,k,A;if(r.look===`handDrawn`){let e=C.svg(c),n=y(r,{}),i=e.path(z(D,O,T,E,r.rx||0),n),a=e.line(-h.width/2-w,-h.height/2-w+_.height+w,h.width/2+w,-h.height/2-w+_.height+w,n);A=c.insert(()=>(t.debug(`Rough node insert CXC`,i),a),`:first-child`),k=c.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`)}else k=l.insert(`rect`,`:first-child`),A=l.insert(`line`),k.attr(`class`,`outer title-state`).attr(`style`,a).attr(`x`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(r.padding||0)).attr(`height`,h.height+(r.padding||0)),A.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+_.height+w).attr(`y2`,-h.height/2-w+_.height+w);return N(r,k),r.intersect=function(e){return K.rect(r,e)},c}e(Et,`rectWithTitle`);async function Dt(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ue(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(Dt,`roundedRect`);var Z=8;async function Ot(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Z:Z*2),u=(t?.height??s.height)+a*2,d=l-Z,f=u,p=Z-l/2,m=-u/2,{cssStyles:g}=t,_=C.svg(o),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-Z,y:m+f},{x:p-Z,y:m},{x:p,y:m},{x:p,y:m+f}],S=_.polygon(x.map(e=>[e.x,e.y]),v),w=o.insert(()=>S,`:first-child`);return w.attr(`class`,`basic label-container outer-path`).attr(`style`,h(g)),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Z/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),N(t,w),t.intersect=function(e){return K.rect(t,e)},o}e(Ot,`shadedProcess`);async function kt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=C.svg(s),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],S=F(x),w=_.path(S,v),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}e(kt,`slopedRect`);async function At(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return Ue(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}e(At,`squareRect`);async function jt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=C.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...L(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...L(u/2-d,0,d,50,270,450)],g=F(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),N(t,v),t.intersect=function(e){return K.polygon(t,h,e)},s}e(jt,`stadium`);async function Mt(e,t){return Ue(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(Mt,`state`);function Nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=C.svg(u),f=y(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return N(t,_),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}e(Nt,`stateEnd`);function Pt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=C.svg(a).circle(0,0,t.width,x(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return N(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}e(Pt,`stateStart`);var Ft=8;async function It(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.width+2*Ft+a,t.width??0),u=Math.max(c.height+o,t.height??0),d=l-2*Ft,f=u,p=-l/2,m=-u/2,g=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+Ft,m,p+Ft,m+f,n),a=e.line(p+Ft+d,m,p+Ft+d,m+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,h(c)),N(t,o)}else{let e=q(s,d,f,g);r&&e.attr(`style`,r),N(t,e)}return t.intersect=function(e){return K.polygon(t,g,e)},s}e(It,`subroutine`);var Lt=.2;async function Rt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-Lt*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.height?t?.height:c.height)+o*2,u=Lt*l,d=Lt*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=C.svg(s),v=y(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],S=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let w=F(x),T=_.path(w,v),E=F(S),D=_.path(E,{...v,fillStyle:`solid`}),O=s.insert(()=>D,`:first-child`);return O.insert(()=>T,`:first-child`),O.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),N(t,O),t.intersect=function(e){return K.polygon(t,x,e)},s}e(Rt,`taggedRect`);async function zt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=C.svg(i),h=y(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...I(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,x=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...I(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],S=F(g),w=m.path(S,h),T=F(x),E=m.path(T,{...h,fillStyle:`solid`}),D=i.insert(()=>E,`:first-child`);return D.insert(()=>w,`:first-child`),D.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,g,e)},i}e(zt,`taggedWaveEdgedRectangle`);async function Bt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),N(t,u),t.intersect=function(e){return K.rect(t,e)},i}e(Bt,`text`);var Vt=e((e,t,n,r,i,a)=>`M${e},${t} a${i},${a} 0,0,1 0,${-r} l${n},0 diff --git a/apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-B0yXCELs.js b/apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-X3JAMEe8.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-B0yXCELs.js rename to apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-X3JAMEe8.js index 64a089ac9..10578605c 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-B0yXCELs.js +++ b/apps/pythinker-code/dist-web/assets/chunk-4HAMMTFA-X3JAMEe8.js @@ -1,4 +1,4 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{A as r,B as i,M as a,T as o,b as s,f as c,g as l,x as u,z as d}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{a as f,p,r as m,u as h}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{a as g,i as _,r as v,t as y}from"./chunk-P2QGCYS3-DOQphBqd.js";import{t as b}from"./chunk-PWAF6VOD-DCTitH5S.js";import{n as x,r as S}from"./chunk-GMAD6QVW-jIHtZ3sR.js";import{t as C}from"./rough.esm-BojvWvqL.js";var w=1,T=3;async function E(e){let t=e.getElementsByTagName(`img`);if(!t||t.length===0)return;let r=!D(e);await Promise.all([...t].map(e=>new Promise(t=>{function i(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let[t=c.fontSize]=p(u().fontSize?u().fontSize:window.getComputedStyle(document.body).fontSize),n=t*5+`px`;e.style.minWidth=n,e.style.maxWidth=n}else e.style.width=`100%`;t(e)}n(i,`setupImage`),setTimeout(()=>{e.complete&&i()}),e.addEventListener(`error`,i),e.addEventListener(`load`,i)})))}n(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}n(D,`hasTextBesidesImages`);var O=3,k=32,A=n(async(e,n,r)=>{let i=u(),a=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,n.domId||n.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,h(n.labelStyle)),s=[{text:typeof n.label==`string`?n.label:n.label?.[0]??``,cssClass:`c4-name`},{text:n.stereotype,cssClass:`c4-type`},...(n.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),c=n.width?Math.max(n.width-2*(n.padding??0),k):u().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?c:1/0,p=await Promise.all(s.map(async e=>{let r=o.append(`g`).attr(`class`,e.cssClass),a=await x(r,d(f(e.text??``),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:n.labelStyle},i);return t(a).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),t(a).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),m=Math.max(...p.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of p)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let _=p.length>0?g-O:0;return o.insert(`rect`,`:first-child`),o.attr(`transform`,`translate(${-m/2}, ${-_/2})`),{shapeSvg:a,bbox:o.node().getBBox(),halfPadding:(n.padding??0)/2,label:o}},`c4LabelHelper`),j=n(async(e,n,r)=>{if(n.stereotype!==void 0)return A(e,n,r);let i,a=n.useHtmlLabels||l(u()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,n.domId||n.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,h(n.labelStyle)),c;c=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let p=!!n.icon||!!n.img,m=n.labelType===`markdown`,g=await x(s,d(f(c),u()),{useHtmlLabels:a,width:n.width||n.wrappingWidth||u().flowchart?.wrappingWidth,classes:m?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:p,markdown:m},u()),_=(n?.padding??0)/2,v;if(a){let e=g.children[0],n=t(g);await E(e),v=await S.measure(()=>e.getBoundingClientRect()),n.attr(`width`,v.width),n.attr(`height`,v.height)}else v=await S.measure(()=>g.getBBox());return a?s.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`):s.attr(`transform`,`translate(0, `+-v.height/2+`)`),n.centerLabel&&s.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:v,halfPadding:_,label:s}},`labelHelper`),M=n(async(e,n,r)=>{let i=r.useHtmlLabels??o(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await x(a,d(f(n),u()),{useHtmlLabels:i,width:r.width||u()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(o(u())){let e=s.children[0],n=t(s);l=await S.measure(()=>e.getBoundingClientRect()),n.attr(`width`,l.width),n.attr(`height`,l.height)}else l=await S.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:c,label:a}},`insertLabel`),N=n((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),P=n((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}n(F,`createPathFromPoints`);function I(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}n(I,`generateFullSineWavePoints`);function L(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;ie.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=t.find(e=>e.getAttribute(`fill`)!==`none`),o=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=n((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}n(ee,`mergePaths`);var R=n((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),z=n((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),te=n(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=u(),c=o(s);return await x(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function B(e,t){return e.intersect(t)}n(B,`intersectNode`);var ne=B;function V(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x0}n(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return au,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,h(s)),N(n,d),n.intersect=function(t){return e.info(`Circle intersect`,n,1,t),K.circle(n,1,t)},o}n(oe,`anchor`);function se(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}n(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}n(ce,`calculateArcSagitta`);async function le(e,t){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let a=t.padding??0,o=t.look===`neo`?16:a,s=t.look===`neo`?12:a,c=n(e=>e+s,`calcTotalHeight`),l=n(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(e,t,P(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=ce(f,p,m),v=(t?.width?t?.width:d.width)+o*2+h-h,y=f,{cssStyles:b}=t,x=[{x:v/2,y:-y/2},{x:-v/2,y:-y/2},...se(-v/2,-y/2,-v/2,y/2,p,m,!1),{x:v/2,y:y/2},...se(v/2,y/2,v/2,-y/2,p,m,!0)],S=C.svg(u),w=g(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),b&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,b),i&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,i),D.attr(`transform`,`translate(${p/2}, 0)`),N(t,D),t.intersect=function(e){return K.polygon(t,x,e)},u}n(le,`bowTieRect`);async function ue(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=_(t);t.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=r?.nodeBorder??r?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(s.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,v=d*.72,y=[`M${-d/2},${m}`,`L${-v/2},${h}`,`A${v/2},${f} 0 0 0 ${v/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:b}=t,x=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(o).path(y,g(t,{}));x.node()?.appendChild(e),b&&x.attr(`style`,b)}else x.append(`path`).attr(`d`,y).attr(`style`,a);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(t,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=n((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),T=[...w(d/2,m,-1),...w(v/2,h,1).reverse()];return t.intersect=function(e){return K.polygon(t,T,e)},o}n(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=u(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=_(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),m=-f/2,v=-p/2,y=-(fe+de)/2,b=s.select(`.label`);b&&(t.useHtmlLabels??o(u())?b.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+y})`):b.attr(`transform`,`translate(0, ${-c.height/2+y})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(z(m,v,f,p,me),n);x=s.insert(()=>a,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,h(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,me).attr(`ry`,me).attr(`x`,m).attr(`y`,v).attr(`width`,f).attr(`height`,p).attr(`fill`,r).attr(`stroke`,i);let S=v+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,m+8).attr(`y1`,S).attr(`x2`,m+f-8).attr(`y2`,S).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let w=S+de/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,i);return N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}n(he,`collapsedGroup`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}n(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=n(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n);break}return t},`expandAndDeduplicateDirections`),ye=n(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"right|left|up|down":n(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":n(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":n(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":n(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":n(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":n(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":n(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":n(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":n(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":n(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":n(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:n(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:n(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:n(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:n(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[_e]:()=>[{x:0,y:0}]},xe=n((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}n(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+18/2).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}n(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}n(Te,`card`);function Ee(e,t){let{nodeStyles:n}=_(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=C.svg(r),c=g(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}n(Ee,`choice`);async function De(t,n,r){let{labelStyles:i,nodeStyles:a}=_(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await j(t,n,P(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=C.svg(o),t=g(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return N(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(t){return e.info(`Circle intersect`,n,u,t),K.circle(n,u,t)},o}n(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}n(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}n(ke,`consoleWindow`);function Ae(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y} +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{A as r,B as i,M as a,T as o,b as s,f as c,g as l,x as u,z as d}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{a as f,p,r as m,u as h}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{a as g,i as _,r as v,t as y}from"./chunk-P2QGCYS3-DJwAvunU.js";import{t as b}from"./chunk-PWAF6VOD-Dsc8rvy3.js";import{n as x,r as S}from"./chunk-GMAD6QVW-DO6QncBh.js";import{t as C}from"./rough.esm-BojvWvqL.js";var w=1,T=3;async function E(e){let t=e.getElementsByTagName(`img`);if(!t||t.length===0)return;let r=!D(e);await Promise.all([...t].map(e=>new Promise(t=>{function i(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let[t=c.fontSize]=p(u().fontSize?u().fontSize:window.getComputedStyle(document.body).fontSize),n=t*5+`px`;e.style.minWidth=n,e.style.maxWidth=n}else e.style.width=`100%`;t(e)}n(i,`setupImage`),setTimeout(()=>{e.complete&&i()}),e.addEventListener(`error`,i),e.addEventListener(`load`,i)})))}n(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}n(D,`hasTextBesidesImages`);var O=3,k=32,A=n(async(e,n,r)=>{let i=u(),a=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,n.domId||n.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,h(n.labelStyle)),s=[{text:typeof n.label==`string`?n.label:n.label?.[0]??``,cssClass:`c4-name`},{text:n.stereotype,cssClass:`c4-type`},...(n.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),c=n.width?Math.max(n.width-2*(n.padding??0),k):u().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?c:1/0,p=await Promise.all(s.map(async e=>{let r=o.append(`g`).attr(`class`,e.cssClass),a=await x(r,d(f(e.text??``),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:n.labelStyle},i);return t(a).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),t(a).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),m=Math.max(...p.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of p)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let _=p.length>0?g-O:0;return o.insert(`rect`,`:first-child`),o.attr(`transform`,`translate(${-m/2}, ${-_/2})`),{shapeSvg:a,bbox:o.node().getBBox(),halfPadding:(n.padding??0)/2,label:o}},`c4LabelHelper`),j=n(async(e,n,r)=>{if(n.stereotype!==void 0)return A(e,n,r);let i,a=n.useHtmlLabels||l(u()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,n.domId||n.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,h(n.labelStyle)),c;c=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let p=!!n.icon||!!n.img,m=n.labelType===`markdown`,g=await x(s,d(f(c),u()),{useHtmlLabels:a,width:n.width||n.wrappingWidth||u().flowchart?.wrappingWidth,classes:m?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:p,markdown:m},u()),_=(n?.padding??0)/2,v;if(a){let e=g.children[0],n=t(g);await E(e),v=await S.measure(()=>e.getBoundingClientRect()),n.attr(`width`,v.width),n.attr(`height`,v.height)}else v=await S.measure(()=>g.getBBox());return a?s.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`):s.attr(`transform`,`translate(0, `+-v.height/2+`)`),n.centerLabel&&s.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:v,halfPadding:_,label:s}},`labelHelper`),M=n(async(e,n,r)=>{let i=r.useHtmlLabels??o(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await x(a,d(f(n),u()),{useHtmlLabels:i,width:r.width||u()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(o(u())){let e=s.children[0],n=t(s);l=await S.measure(()=>e.getBoundingClientRect()),n.attr(`width`,l.width),n.attr(`height`,l.height)}else l=await S.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:c,label:a}},`insertLabel`),N=n((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),P=n((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}n(F,`createPathFromPoints`);function I(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}n(I,`generateFullSineWavePoints`);function L(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;ie.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=t.find(e=>e.getAttribute(`fill`)!==`none`),o=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=n((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}n(ee,`mergePaths`);var R=n((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),z=n((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),te=n(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=u(),c=o(s);return await x(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function B(e,t){return e.intersect(t)}n(B,`intersectNode`);var ne=B;function V(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x0}n(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return au,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,h(s)),N(n,d),n.intersect=function(t){return e.info(`Circle intersect`,n,1,t),K.circle(n,1,t)},o}n(oe,`anchor`);function se(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}n(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}n(ce,`calculateArcSagitta`);async function le(e,t){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let a=t.padding??0,o=t.look===`neo`?16:a,s=t.look===`neo`?12:a,c=n(e=>e+s,`calcTotalHeight`),l=n(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(e,t,P(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=ce(f,p,m),v=(t?.width?t?.width:d.width)+o*2+h-h,y=f,{cssStyles:b}=t,x=[{x:v/2,y:-y/2},{x:-v/2,y:-y/2},...se(-v/2,-y/2,-v/2,y/2,p,m,!1),{x:v/2,y:y/2},...se(v/2,y/2,v/2,-y/2,p,m,!0)],S=C.svg(u),w=g(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),b&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,b),i&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,i),D.attr(`transform`,`translate(${p/2}, 0)`),N(t,D),t.intersect=function(e){return K.polygon(t,x,e)},u}n(le,`bowTieRect`);async function ue(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=_(t);t.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=r?.nodeBorder??r?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(s.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,v=d*.72,y=[`M${-d/2},${m}`,`L${-v/2},${h}`,`A${v/2},${f} 0 0 0 ${v/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:b}=t,x=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(o).path(y,g(t,{}));x.node()?.appendChild(e),b&&x.attr(`style`,b)}else x.append(`path`).attr(`d`,y).attr(`style`,a);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(t,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=n((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),T=[...w(d/2,m,-1),...w(v/2,h,1).reverse()];return t.intersect=function(e){return K.polygon(t,T,e)},o}n(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=u(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=_(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),m=-f/2,v=-p/2,y=-(fe+de)/2,b=s.select(`.label`);b&&(t.useHtmlLabels??o(u())?b.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+y})`):b.attr(`transform`,`translate(0, ${-c.height/2+y})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(z(m,v,f,p,me),n);x=s.insert(()=>a,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,h(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,me).attr(`ry`,me).attr(`x`,m).attr(`y`,v).attr(`width`,f).attr(`height`,p).attr(`fill`,r).attr(`stroke`,i);let S=v+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,m+8).attr(`y1`,S).attr(`x2`,m+f-8).attr(`y2`,S).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let w=S+de/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,i);return N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}n(he,`collapsedGroup`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}n(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=n(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n);break}return t},`expandAndDeduplicateDirections`),ye=n(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"right|left|up|down":n(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":n(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":n(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":n(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":n(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":n(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":n(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":n(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":n(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":n(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":n(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:n(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:n(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:n(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:n(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[_e]:()=>[{x:0,y:0}]},xe=n((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}n(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+18/2).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}n(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}n(Te,`card`);function Ee(e,t){let{nodeStyles:n}=_(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=C.svg(r),c=g(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}n(Ee,`choice`);async function De(t,n,r){let{labelStyles:i,nodeStyles:a}=_(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await j(t,n,P(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=C.svg(o),t=g(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return N(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(t){return e.info(`Circle intersect`,n,u,t),K.circle(n,u,t)},o}n(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}n(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}n(ke,`consoleWindow`);function Ae(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y} M ${i.x},${i.y} L ${o.x},${o.y}`}n(Ae,`createLine`);function je(t,n){let{labelStyles:r,nodeStyles:i}=_(n);n.labelStyle=r,n.label=``;let a=t.insert(`g`).attr(`class`,P(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=C.svg(a),l=g(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=Ae(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),N(n,p),n.intersect=function(t){return e.info(`crossedCircle intersect`,n,{radius:o,point:t}),K.circle(n,o,t)},a}n(je,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iS,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>b,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}n(Me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iS,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>b,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}n(Ne,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iE,`:first-child`).attr(`stroke-opacity`,0),D.insert(()=>x,`:first-child`),D.insert(()=>w,`:first-child`),D.attr(`class`,`text`),f&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,h,e)},i}n(Pe,`curlyBraces`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=C.svg(s),m=g(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,v=u,y=h-d,b=v/4,x=[{x:y,y:0},{x:b,y:0},{x:0,y:v/2},{x:b,y:v},{x:y,y:v},...L(-y,-v/2,d,50,270,90)],S=F(x),w=p.path(S,m),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-l/2}, ${-u/2})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}n(Fe,`curvedTrapezoid`);async function Ie(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,v=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:y}=t;if(t.look===`handDrawn`){let e=C.svg(i),n=g(t,{}),r=e.path(z(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);v.insert(()=>a,`:first-child`),v.insert(()=>r,`:first-child`),y&&v.attr(`style`,y)}else v.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),v.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);N(t,v);let b=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);let x=m+l,S=Math.asin(Math.min(1,(h-x)/l))*180/Math.PI,w=[...L(0,-x,l,24,180+S,-S),...L(-(-c/2+f),-(h+f),f,12,90,0),...L(-(-c/2+f),-(p/2-f),f,12,360,270),...L(-(c/2-f),-(p/2-f),f,12,270,180),...L(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return K.polygon(t,w,e)},i}n(Ie,`person`);var Le=n((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),Re=n((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),ze=n((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Be=8,Ve=8;async function He(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i,s=t.width??0;if(t.width&&(t.width-=o,t.widtho,`:first-child`),v=c.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=Le(0,0,d,m,f,p);v=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(y)).attr(`style`,r)}return v.attr(`label-offset-y`,p),v.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),N(t,v),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},c}n(He,`cylinder`);async function Ue(e,t,n){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await j(e,t,P(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:p}=t,{cssStyles:m}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=C.svg(a),n=g(t,{}),r=f||p?e.path(z(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,h(f)).attr(`ry`,h(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return N(t,d,t.look===`handDrawn`?void 0:{width:s,height:c}),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},a}n(Ue,`drawRect`);async function We(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ue(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=C.svg(c),n=g(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}n(We,`datastore`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=C.svg(o),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],b=h.polygon(y.map(e=>[e.x,e.y]),v),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),N(t,x),t.intersect=function(e){return K.rect(t,e)},o}n(Ge,`dividedRectangle`);async function Ke(t,n){let{labelStyles:r,nodeStyles:i}=_(n),a=n.look===`neo`?12:5;n.labelStyle=r;let o=n.padding??0,s=n.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await j(t,n,P(n)),u=(n?.width?n?.width/2:l.width/2)+(s??0),d=u-a,f,{cssStyles:p}=n;if(n.look===`handDrawn`){let e=C.svg(c),t=g(n,{roughness:.2,strokeWidth:2.5}),r=g(n,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,t),a=e.circle(0,0,d*2,r);f=c.insert(`g`,`:first-child`),f.attr(`class`,h(n.cssClasses)).attr(`style`,h(p)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=c.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return N(n,f),n.intersect=function(t){return e.info(`DoubleCircle intersect`,n,u,t),K.circle(n,u,t)},c}n(Ke,`doublecircle`);function qe(t,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=_(n);n.label=``,n.labelStyle=i;let o=t.insert(`g`).attr(`class`,P(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=C.svg(o),{nodeBorder:l}=r,u=g(n,{fillStyle:`solid`});n.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),N(n,f),n.intersect=function(t){return e.info(`filledCircle intersect`,n,{radius:7,point:t}),K.circle(n,7,t)},o}n(qe,`filledCircle`);var Je=10,Ye=10;async function Xe(t,n){let{labelStyles:r,nodeStyles:i}=_(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.height=n?.height??0,n.heightb,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),i&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),n.width=u,n.height=d,N(n,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(n.padding??0)/2+(c.y-(c.top??0))})`),n.intersect=function(t){return e.info(`Triangle intersect`,n,p,t),K.polygon(n,p,t)},s}n(Xe,`flippedTriangle`);async function Ze(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],v=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:y}=t,b;if(t.look===`handDrawn`){let e=C.svg(i).path(v,g(t,{}));b=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),y&&b.attr(`style`,y)}else b=i.insert(`path`,`:first-child`).attr(`d`,v).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?N(t,b):N(t,b,{width:c,height:d});let x=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return K.polygon(t,h,e)},i}n(Ze,`folder`);function Qe(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=_(t);t.label=``;let o=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=C.svg(o),p=g(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),N(t,h);let v=r?.padding??0;return t.width&&t.height&&(t.width+=v/2||0,t.height+=v/2||0),t.intersect=function(e){return K.rect(t,e)},o}n(Qe,`forkJoin`);async function $e(t,n){let{labelStyles:r,nodeStyles:i}=_(n);n.labelStyle=r;let a=n.look===`neo`?16:n.padding??0,o=n.look===`neo`?12:n.padding??0;(n.width||n.height)&&(n.height=(n?.height??0)-o*2,n.height<10&&(n.height=10),n.width=(n?.width??0)-a*2,n.width<15&&(n.width=15));let{shapeSvg:s,bbox:c}=await j(t,n,P(n)),l=(n?.width?n?.width:Math.max(15,c.width))+a*2,u=(n?.height?n?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=n,p=C.svg(s),m=g(n,{});n.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...L(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],v=F(h),y=p.path(v,m),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&n.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),i&&n.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,i),N(n,b),n.intersect=function(t){return e.info(`Pill intersect`,n,{radius:d,point:t}),K.polygon(n,h,t)},s}n($e,`halfRoundedRectangle`);var et=n((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=_(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await j(e,t,P(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(c),n=g(t,{}),r=et(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}n(tt,`hexagon`);async function nt(t,n){let{labelStyles:r,nodeStyles:i}=_(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await j(t,n,P(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=C.svg(a),u=g(n,{});n.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=F(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),N(n,m),n.intersect=function(t){return e.info(`Pill intersect`,n,{points:d}),K.polygon(n,d,t)},a}n(nt,`hourglass`);async function rt(t,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=_(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(t,n,`icon-shape default`),p=n.pos===`t`,m=c,h=c,{nodeBorder:v}=r,{stylesMap:x}=y(n),S=-h/2,w=-m/2,T=n.label?8:0,E=C.svg(u),D=g(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(S,w,h,m,D),k=Math.max(h,d.width),A=m+d.height+T,M=E.rectangle(-k/2,-A/2,k,A,{...D,fill:`transparent`,stroke:`none`}),P=u.insert(()=>O,`:first-child`),F=u.insert(()=>M);if(n.icon){let e=u.append(`g`);e.html(`${await b(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+T/2-i/2-o:-d.height/2-T/2-i/2-o})`),e.attr(`style`,`color: ${x.get(`stroke`)??v};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+T/2:-d.height/2-T/2})`),N(n,F),n.intersect=function(t){if(e.info(`iconSquare intersect`,n,t),!n.label)return K.rect(n,t);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+T},{x:r+h/2,y:i-a/2+d.height+T},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+d.height+T},{x:r-d.width/2,y:i-a/2+d.height+T}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/2,y:i-a/2+m},{x:r+d.width/2,y:i-a/2+m},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+m},{x:r-h/2,y:i-a/2+m}],K.polygon(n,o,t)},u}n(rt,`icon`);async function it(t,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=_(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(t,n,`icon-shape default`),p=n.label?8:0,m=n.pos===`t`,{nodeBorder:h,mainBkg:v}=r,{stylesMap:x}=y(n),S=C.svg(u),w=g(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=x.get(`fill`)??v;let T=u.append(`g`);n.icon&&T.html(`${await b(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let E=T.node().getBBox(),D=E.width,O=E.height,k=E.x,A=E.y,M=Math.max(D,O)*Math.SQRT2+40,P=S.circle(0,0,M,w),F=Math.max(M,d.width),I=M+d.height+p,L=S.rectangle(-F/2,-I/2,F,I,{...w,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return T.attr(`transform`,`translate(${-D/2-k},${m?d.height/2+p/2-O/2-A:-d.height/2-p/2-O/2-A})`),T.attr(`style`,`color: ${x.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),N(n,R),n.intersect=function(t){return e.info(`iconSquare intersect`,n,t),K.rect(n,t)},u}n(it,`iconCircle`);async function at(t,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=_(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(t,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,v=c+f*2,{nodeBorder:x,mainBkg:S}=r,{stylesMap:w}=y(n),T=-v/2,E=-h/2,D=n.label?8:0,O=C.svg(u),k=g(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??S;let A=O.path(z(T,E,v,h,5),k),M=Math.max(v,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`).attr(`class`,`icon-shape2`),L=u.insert(()=>F);if(n.icon){let e=u.append(`g`);e.html(`${await b(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??x};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(n,L),n.intersect=function(t){if(e.info(`iconSquare intersect`,n,t),!n.label)return K.rect(n,t);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+v/2,y:i-a/2+d.height+D},{x:r+v/2,y:i+a/2},{x:r-v/2,y:i+a/2},{x:r-v/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-v/2,y:i-a/2},{x:r+v/2,y:i-a/2},{x:r+v/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-v/2,y:i-a/2+h}],K.polygon(n,o,t)},u}n(at,`iconRounded`);async function ot(t,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=_(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(t,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,v=c+f*2,{nodeBorder:x,mainBkg:S}=r,{stylesMap:w}=y(n),T=-v/2,E=-h/2,D=n.label?8:0,O=C.svg(u),k=g(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??S;let A=O.path(z(T,E,v,h,.1),k),M=Math.max(v,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`),L=u.insert(()=>F);if(n.icon){let e=u.append(`g`);e.html(`${await b(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??x};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(n,L),n.intersect=function(t){if(e.info(`iconSquare intersect`,n,t),!n.label)return K.rect(n,t);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+v/2,y:i-a/2+d.height+D},{x:r+v/2,y:i+a/2},{x:r-v/2,y:i+a/2},{x:r-v/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-v/2,y:i-a/2},{x:r+v/2,y:i-a/2},{x:r+v/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-v/2,y:i-a/2+h}],K.polygon(n,o,t)},u}n(ot,`iconSquare`);async function st(t,n,{config:{flowchart:r}}){let i=new Image;i.src=n?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));n.imageAspectRatio=a/o;let{labelStyles:s}=_(n);n.labelStyle=s;let c=r?.wrappingWidth;n.defaultWidth=r?.wrappingWidth;let l=Math.max(n.label?c??0:0,n?.assetWidth??a),u=n.constraint===`on`&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:l,d=n.constraint===`on`?u/n.imageAspectRatio:n?.assetHeight??o;n.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await j(t,n,`image-shape default`),h=n.pos===`t`,v=-u/2,y=-d/2,b=n.label?8:0,x=C.svg(f),S=g(n,{});n.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let w=x.rectangle(v,y,u,d,S),T=Math.max(u,p.width),E=d+p.height+b,D=x.rectangle(-T/2,-E/2,T,E,{...S,fill:`none`,stroke:`none`}),O=f.insert(()=>w,`:first-child`),k=f.insert(()=>D);if(n.img){let e=f.append(`image`);e.attr(`href`,n.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?E/2-d:-E/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-b/2:d/2-p.height/2+b/2})`),O.attr(`transform`,`translate(0,${h?p.height/2+b/2:-p.height/2-b/2})`),N(n,k),n.intersect=function(t){if(e.info(`iconSquare intersect`,n,t),!n.label)return K.rect(n,t);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+b},{x:r+u/2,y:i-a/2+p.height+b},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+b},{x:r-p.width/2,y:i-a/2+p.height+b}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],K.polygon(n,o,t)},f}n(st,`imageSquare`);async function ct(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}n(ct,`inv_trapezoid`);async function lt(e,t){let{shapeSvg:n,bbox:r,label:i}=await j(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),N(t,a),t.intersect=function(e){return K.rect(t,e)},n}n(lt,`labelRect`);async function ut(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}n(ut,`lean_left`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}n(dt,`lean_right`);function ft(t,n){let{labelStyles:r,nodeStyles:i}=_(n);n.label=``,n.labelStyle=r;let a=t.insert(`g`).attr(`class`,P(n)).attr(`id`,n.domId??n.id),{cssStyles:o}=n,s=Math.max(35,n?.width??0),c=Math.max(35,n?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=C.svg(a),d=g(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=F(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),N(n,m),n.intersect=function(t){return e.info(`lightningBolt intersect`,n,t),K.polygon(n,l,t)},a}n(ft,`lightningBolt`);var pt=n((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),mt=n((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),ht=n((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),gt=10,_t=10;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<_t&&(t.width=_t);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.heighto,`:first-child`).attr(`class`,`line`),v=s.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=pt(0,0,u,p,d,f,m);v=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(y)).attr(`style`,r)}return v.attr(`label-offset-y`,f),v.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),N(t,v),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}n(vt,`linedCylinder`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=C.svg(s),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...I(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],b=h.polygon(y.map(e=>[e.x,e.y]),v),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),N(t,x),t.intersect=function(e){return K.polygon(t,y,e)},s}n(yt,`linedWaveEdgedRect`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await j(e,t,P(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,v=-m/2,{cssStyles:y}=t,b=C.svg(c),x=g(t,{}),S=[{x:h-s,y:v+s},{x:h-s,y:v+m+s},{x:h+p-s,y:v+m+s},{x:h+p-s,y:v+m},{x:h+p,y:v+m},{x:h+p,y:v+m-s},{x:h+p+s,y:v+m-s},{x:h+p+s,y:v-s},{x:h+s,y:v-s},{x:h+s,y:v},{x:h,y:v},{x:h,y:v+s}],w=[{x:h,y:v+s},{x:h+p-s,y:v+s},{x:h+p-s,y:v+m},{x:h+p,y:v+m},{x:h+p,y:v},{x:h,y:v}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let T=F(S),E=b.path(T,x),D=F(w),O=b.path(D,x);t.look!==`handDrawn`&&(E=ee(E),O=ee(O));let k=c.insert(`g`,`:first-child`);return k.insert(()=>E),k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),N(t,k),t.intersect=function(e){return K.polygon(t,S,e)},c}n(bt,`multiRect`);async function xt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,v=-m/2,{cssStyles:y}=t,b=I(h-10,v+m+10,h+d-10,v+m+10,p,.8),x=b?.[b.length-1],S=[{x:h-10,y:v+10},{x:h-10,y:v+m+10},...b,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:v-10},{x:h+10,y:v-10},{x:h+10,y:v},{x:h,y:v},{x:h,y:v+10}],w=[{x:h,y:v+10},{x:h+d-10,y:v+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:v},{x:h,y:v}],T=C.svg(i),E=g(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`);let D=F(S),O=T.path(D,E),k=F(w),A=T.path(k,E),M=i.insert(()=>O,`:first-child`);return M.insert(()=>A),M.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),N(t,M),t.intersect=function(e){return K.polygon(t,S,e)},i}n(xt,`multiWaveEdgedRectangle`);async function St(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r,t.useHtmlLabels||o(s())||(t.centerLabel=!0);let{shapeSvg:a,bbox:c,label:l}=await j(e,t,P(t)),u=Math.max(c.width+(t.padding??0)*2,t?.width??0),d=Math.max(c.height+(t.padding??0)*2,t?.height??0),f=-u/2,p=-d/2,{cssStyles:m}=t,h=C.svg(a),v=g(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=h.rectangle(f,p,u,d,v),b=a.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,b),t.intersect=function(e){return K.rect(t,e)},a}n(St,`note`);var Ct=n((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function wt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=C.svg(i),n=g(t,{}),r=Ct(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),N(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=K.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}n(wt,`question`);async function Tt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,v=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:y}=t,b=C.svg(s),x=g(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=F(v),w=b.path(S,x),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,T),t.intersect=function(e){return K.polygon(t,v,e)},s}n(Tt,`rect_left_inv_arrow`);async function Et(n,r){let{labelStyles:i,nodeStyles:a}=_(r);r.labelStyle=i;let s;s=r.cssClasses?`node `+r.cssClasses:`node default`;let c=n.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),l=c.insert(`g`),d=c.insert(`g`).attr(`class`,`label`).attr(`style`,a),f=r.description,p=r.label,m=await te(d,p,r.labelStyle,!0,!0),h={width:0,height:0};if(o(u())){let e=m.children[0],n=t(m);h=e.getBoundingClientRect(),n.attr(`width`,h.width),n.attr(`height`,h.height)}e.info(`Text 2`,f);let v=f||[],y=m.getBBox(),b=await te(d,Array.isArray(v)?v.join(`
`):v,r.labelStyle,!0,!0),x=b.children[0],S=t(b);h=x.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let w=(r.padding||0)/2;t(b).attr(`transform`,`translate( `+(h.width>y.width?0:(y.width-h.width)/2)+`, `+(y.height+w+5)+`)`),t(m).attr(`transform`,`translate( `+(h.width(e.debug(`Rough node insert CXC`,i),a),`:first-child`),k=c.insert(()=>(e.debug(`Rough node insert CXC`,i),i),`:first-child`)}else k=l.insert(`rect`,`:first-child`),A=l.insert(`line`),k.attr(`class`,`outer title-state`).attr(`style`,a).attr(`x`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(r.padding||0)).attr(`height`,h.height+(r.padding||0)),A.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+y.height+w).attr(`y2`,-h.height/2-w+y.height+w);return N(r,k),r.intersect=function(e){return K.rect(r,e)},c}n(Et,`rectWithTitle`);async function Dt(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ue(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}n(Dt,`roundedRect`);var Z=8;async function Ot(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Z:Z*2),u=(t?.height??s.height)+a*2,d=l-Z,f=u,p=Z-l/2,m=-u/2,{cssStyles:v}=t,y=C.svg(o),b=g(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-Z,y:m+f},{x:p-Z,y:m},{x:p,y:m},{x:p,y:m+f}],S=y.polygon(x.map(e=>[e.x,e.y]),b),w=o.insert(()=>S,`:first-child`);return w.attr(`class`,`basic label-container outer-path`).attr(`style`,h(v)),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),v&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Z/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),N(t,w),t.intersect=function(e){return K.rect(t,e)},o}n(Ot,`shadedProcess`);async function kt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:v}=t,y=C.svg(s),b=g(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],S=F(x),w=y.path(S,b),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}n(kt,`slopedRect`);async function At(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return Ue(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}n(At,`squareRect`);async function jt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=C.svg(s),m=g(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...L(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...L(u/2-d,0,d,50,270,450)],v=F(h),y=p.path(v,m),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),N(t,b),t.intersect=function(e){return K.polygon(t,h,e)},s}n(jt,`stadium`);async function Mt(e,t){return Ue(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}n(Mt,`state`);function Nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=C.svg(u),f=g(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,v=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),y=u.insert(()=>p,`:first-child`);if(y.insert(()=>v),t.look!==`handDrawn`&&y.attr(`class`,`outer-path`),a&&y.selectAll(`path`).attr(`style`,a),i&&y.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;y.attr(`style`,`filter:url(#${n})`)}return N(t,y),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}n(Nt,`stateEnd`);function Pt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=C.svg(a).circle(0,0,t.width,v(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return N(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}n(Pt,`stateStart`);var Ft=8;async function It(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.width+2*Ft+a,t.width??0),u=Math.max(c.height+o,t.height??0),d=l-2*Ft,f=u,p=-l/2,m=-u/2,v=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+Ft,m,p+Ft,m+f,n),a=e.line(p+Ft+d,m,p+Ft+d,m+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,h(c)),N(t,o)}else{let e=q(s,d,f,v);r&&e.attr(`style`,r),N(t,e)}return t.intersect=function(e){return K.polygon(t,v,e)},s}n(It,`subroutine`);var Lt=.2;async function Rt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-Lt*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.height?t?.height:c.height)+o*2,u=Lt*l,d=Lt*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:v}=t,y=C.svg(s),b=g(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],S=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let w=F(x),T=y.path(w,b),E=F(S),D=y.path(E,{...b,fillStyle:`solid`}),O=s.insert(()=>D,`:first-child`);return O.insert(()=>T,`:first-child`),O.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),N(t,O),t.intersect=function(e){return K.polygon(t,x,e)},s}n(Rt,`taggedRect`);async function zt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=C.svg(i),h=g(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let v=[{x:-s/2-s/2*.1,y:f/2},...I(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],y=-s/2+s/2*.1,b=-f/2-d*.4,x=[{x:y+s-u,y:(b+c)*1.3},{x:y+s,y:b+c-d},{x:y+s,y:(b+c)*.9},...I(y+s,(b+c)*1.25,y+s-u,(b+c)*1.3,-c*.02,.5)],S=F(v),w=m.path(S,h),T=F(x),E=m.path(T,{...h,fillStyle:`solid`}),D=i.insert(()=>E,`:first-child`);return D.insert(()=>w,`:first-child`),D.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,v,e)},i}n(zt,`taggedWaveEdgedRectangle`);async function Bt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),N(t,u),t.intersect=function(e){return K.rect(t,e)},i}n(Bt,`text`);var Vt=n((e,t,n,r,i,a)=>`M${e},${t} a${i},${a} 0,0,1 0,${-r} l${n},0 diff --git a/apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-Djshm1Dl.js b/apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-3pIWy7Vc.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-Djshm1Dl.js rename to apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-3pIWy7Vc.js index c05251e3f..8b6ef1a2c 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-Djshm1Dl.js +++ b/apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-3pIWy7Vc.js @@ -1,2 +1,2 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{R as r,h as i,p as a,r as o,s}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as c}from"./dist-B9JEmVDW.js";function l(e){this._context=e}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function u(e){return new l(e)}var d=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function f(e){return new d(e,!0)}function ee(e){return new d(e,!1)}function p(){}function m(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function h(e){this._context=e}h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:m(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function te(e){return new h(e)}function ne(e){this._context=e}ne.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function re(e){return new ne(e)}function ie(e){this._context=e}ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ae(e){return new ie(e)}function oe(e,t){this._basis=new h(e),this._beta=t}oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var se=(function e(t){function n(e){return t===1?new h(e):new oe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function g(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function _(e,t){this._context=e,this._k=(1-t)/6}_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:g(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ce=(function e(t){function n(e){return new _(e,t)}return n.tension=function(t){return e(+t)},n})(0);function v(e,t){this._context=e,this._k=(1-t)/6}v.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var le=(function e(t){function n(e){return new v(e,t)}return n.tension=function(t){return e(+t)},n})(0);function y(e,t){this._context=e,this._k=(1-t)/6}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ue=(function e(t){function n(e){return new y(e,t)}return n.tension=function(t){return e(+t)},n})(0);function b(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function de(e,t){this._context=e,this._alpha=t}de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fe=(function e(t){function n(e){return t?new de(e,t):new _(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function pe(e,t){this._context=e,this._alpha=t}pe.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var me=(function e(t){function n(e){return t?new pe(e,t):new v(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function he(e,t){this._context=e,this._alpha=t}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=(function e(t){function n(e){return t?new he(e,t):new y(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function _e(e){this._context=e}_e.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ve(e){return new _e(e)}function ye(e){return e<0?-1:1}function be(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ye(a)+ye(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function x(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function S(e){this._context=e}S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:x(this,this._t0,xe(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,x(this,xe(this,n=be(this,e,t)),n);break;default:x(this,this._t0,n=be(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Se(e){this._context=new Ce(e)}(Se.prototype=Object.create(S.prototype)).point=function(e,t){S.prototype.point.call(this,t,e)};function Ce(e){this._context=e}Ce.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function we(e){return new S(e)}function Te(e){return new Se(e)}function Ee(e){this._context=e}Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=De(e),i=De(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function w(e){return new C(e,.5)}function T(e){return new C(e,0)}function ke(e){return new C(e,1)}function E(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(){}function je(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function D(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}const Me=`[object RegExp]`,O=`[object String]`,k=`[object Number]`,A=`[object Boolean]`,j=`[object Arguments]`,Ne=`[object Symbol]`,Pe=`[object Date]`,Fe=`[object Map]`,Ie=`[object Set]`,Le=`[object Array]`,Re=`[object ArrayBuffer]`,ze=`[object Object]`,M=`[object DataView]`,Be=`[object Uint8Array]`,Ve=`[object Uint8ClampedArray]`,He=`[object Uint16Array]`,Ue=`[object Uint32Array]`,We=`[object Int8Array]`,Ge=`[object Int16Array]`,Ke=`[object Int32Array]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)();function N(e){return Ye.Buffer!==void 0&&Ye.Buffer.isBuffer(e)}function Xe(e){return Number.isSafeInteger(e)&&e>=0}function Ze(e){return e!=null&&typeof e!=`function`&&Xe(e.length)}function Qe(e){return e===`__proto__`}function P(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $e(e,t){return I(e,void 0,e,new Map,t)}function I(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(P(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(D(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),L(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case k:case O:case A:{let t=new e.constructor(e?.valueOf());return L(t,e),t}case j:{let t={};return L(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function R(e){return typeof e==`object`&&!!e&&D(e)===`[object Arguments]`}function z(e){return typeof e==`object`&&!!e}function rt(e){return z(e)&&Ze(e)}function B(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(B.Cache||Map),n}B.Cache=Map;function V(e){return F(e)}function it(e){if(P(e))return e;if(Array.isArray(e)||F(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function at(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;ee.args);r(e),i=o(i,[...e])}else i=n.args;if(!i)return;let s=a(e,t),c=`config`;return i[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),i[s]=i[c],delete i[c]),i},`detectInit`),dt=n(function(t,n=null){try{let r=RegExp(`[%]{2}(?![{]${lt.source})(?=[}][%]{2}).* +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{R as r,h as i,p as a,r as o,s}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as c}from"./dist-B9JEmVDW.js";function l(e){this._context=e}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function u(e){return new l(e)}var d=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function f(e){return new d(e,!0)}function ee(e){return new d(e,!1)}function p(){}function m(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function h(e){this._context=e}h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:m(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function te(e){return new h(e)}function ne(e){this._context=e}ne.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function re(e){return new ne(e)}function ie(e){this._context=e}ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ae(e){return new ie(e)}function oe(e,t){this._basis=new h(e),this._beta=t}oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var se=(function e(t){function n(e){return t===1?new h(e):new oe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function g(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function _(e,t){this._context=e,this._k=(1-t)/6}_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:g(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ce=(function e(t){function n(e){return new _(e,t)}return n.tension=function(t){return e(+t)},n})(0);function v(e,t){this._context=e,this._k=(1-t)/6}v.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var le=(function e(t){function n(e){return new v(e,t)}return n.tension=function(t){return e(+t)},n})(0);function y(e,t){this._context=e,this._k=(1-t)/6}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ue=(function e(t){function n(e){return new y(e,t)}return n.tension=function(t){return e(+t)},n})(0);function b(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function de(e,t){this._context=e,this._alpha=t}de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fe=(function e(t){function n(e){return t?new de(e,t):new _(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function pe(e,t){this._context=e,this._alpha=t}pe.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var me=(function e(t){function n(e){return t?new pe(e,t):new v(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function he(e,t){this._context=e,this._alpha=t}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=(function e(t){function n(e){return t?new he(e,t):new y(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function _e(e){this._context=e}_e.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ve(e){return new _e(e)}function ye(e){return e<0?-1:1}function be(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ye(a)+ye(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function x(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function S(e){this._context=e}S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:x(this,this._t0,xe(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,x(this,xe(this,n=be(this,e,t)),n);break;default:x(this,this._t0,n=be(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Se(e){this._context=new Ce(e)}(Se.prototype=Object.create(S.prototype)).point=function(e,t){S.prototype.point.call(this,t,e)};function Ce(e){this._context=e}Ce.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function we(e){return new S(e)}function Te(e){return new Se(e)}function Ee(e){this._context=e}Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=De(e),i=De(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function w(e){return new C(e,.5)}function T(e){return new C(e,0)}function ke(e){return new C(e,1)}function E(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(){}function je(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function D(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}const Me=`[object RegExp]`,O=`[object String]`,k=`[object Number]`,A=`[object Boolean]`,j=`[object Arguments]`,Ne=`[object Symbol]`,Pe=`[object Date]`,Fe=`[object Map]`,Ie=`[object Set]`,Le=`[object Array]`,Re=`[object ArrayBuffer]`,ze=`[object Object]`,M=`[object DataView]`,Be=`[object Uint8Array]`,Ve=`[object Uint8ClampedArray]`,He=`[object Uint16Array]`,Ue=`[object Uint32Array]`,We=`[object Int8Array]`,Ge=`[object Int16Array]`,Ke=`[object Int32Array]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)();function N(e){return Ye.Buffer!==void 0&&Ye.Buffer.isBuffer(e)}function Xe(e){return Number.isSafeInteger(e)&&e>=0}function Ze(e){return e!=null&&typeof e!=`function`&&Xe(e.length)}function Qe(e){return e===`__proto__`}function P(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $e(e,t){return I(e,void 0,e,new Map,t)}function I(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(P(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(D(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),L(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case k:case O:case A:{let t=new e.constructor(e?.valueOf());return L(t,e),t}case j:{let t={};return L(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function R(e){return typeof e==`object`&&!!e&&D(e)===`[object Arguments]`}function z(e){return typeof e==`object`&&!!e}function rt(e){return z(e)&&Ze(e)}function B(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(B.Cache||Map),n}B.Cache=Map;function V(e){return F(e)}function it(e){if(P(e))return e;if(Array.isArray(e)||F(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function at(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;ee.args);r(e),i=o(i,[...e])}else i=n.args;if(!i)return;let s=a(e,t),c=`config`;return i[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),i[s]=i[c],delete i[c]),i},`detectInit`),dt=n(function(t,n=null){try{let r=RegExp(`[%]{2}(?![{]${lt.source})(?=[}][%]{2}).* `,`ig`);t=t.trim().replace(r,``).replace(/'/gm,`"`),e.debug(`Detecting diagram directive${n===null?``:` type:`+n} based on the text:${t}`);let a,o=[];for(;(a=i.exec(t))!==null;)if(a.index===i.lastIndex&&i.lastIndex++,a&&!n||n&&a[1]?.match(n)||n&&a[2]?.match(n)){let e=a[1]?a[1]:a[2],t=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:e,args:t})}return o.length===0?{type:t,args:null}:o.length===1?o[0]:o}catch(r){return e.error(`ERROR: ${r.message} - Unable to parse directive type: '${n}' based on the text: '${t}'`),{type:void 0,args:null}}},`detectDirective`),ft=n(function(e){return e.replace(i,``)},`removeDirectives`),pt=n(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function U(e,t){return e?ct[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}n(U,`interpolateToCurve`);function mt(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,st.sanitizeUrl)(n)}n(mt,`formatUrl`);var ht=n((t,...n)=>{let r=t.split(`.`),i=r.length-1,a=r[i],o=window;for(let n=0;n{n+=W(e,t),t=e}),G(e,n/2)}n(gt,`traverseEdge`);function _t(e){return e.length===1?e[0]:gt(e)}n(_t,`calcLabelPosition`);var vt=n((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),G=n((e,t)=>{let n,r=t;for(let t of e){if(n){let e=W(t,n);if(e===0)return n;if(e=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:vt((1-i)*n.x+i*t.x,5),y:vt((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),yt=n((t,n,r)=>{e.info(`our points ${JSON.stringify(n)}`),n[0]!==r&&(n=n.reverse());let i=G(n,25),a=t?10:5,o=Math.atan2(n[0].y-i.y,n[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(n[0].x+i.x)/2,s.y=-Math.cos(o)*a+(n[0].y+i.y)/2,s},`calcCardinalityPosition`);function bt(t,n,r){let i=structuredClone(r);e.info(`our points`,i),n!==`start_left`&&n!==`start_right`&&i.reverse();let a=G(i,25+t),o=10+t*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return n===`start_left`?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):n===`end_right`?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):n===`end_left`?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}n(bt,`calcTerminalLabelPosition`);function K(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}n(K,`getStylesFromArray`);var xt=0,St=n(()=>(xt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+xt),`generateId`);function Ct(e){let t=``;for(let n=0;nCt(e.length),`random`),Tt=n(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),Et=n(function(e,t){let n=t.text.replace(s.lineBreakRegex,` `),[,r]=Z(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),Dt=B((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`
`},n),s.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=J(`${e} `,n),c=J(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Ot(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Ot=B((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(J(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function q(e,t){return Y(e,t).height}n(q,`calculateTextHeight`);function J(e,t){return Y(e,t).width}n(J,`calculateTextWidth`);var Y=B((e,n)=>{let{fontSize:r=12,fontFamily:i=`Arial`,fontWeight:a=400}=n;if(!e)return{width:0,height:0};let[,o]=Z(r),c=[`sans-serif`,i],l=e.split(s.lineBreakRegex),u=[],d=t(`body`);if(!d.remove)return{width:0,height:0,lineHeight:0};let f=d.append(`svg`);for(let e of c){let t=0,n={width:0,height:0,lineHeight:0};for(let r of l){let i=Tt();i.text=r||`​`;let s=Et(f,i).style(`font-size`,o).style(`font-weight`,a).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}u.push(n)}return f.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),kt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{n(this,`InitIDGenerator`)}},X,At=n(function(e){return X||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),X.innerHTML=e,unescape(X.textContent)},`entityDecode`);function jt(e){return`str`in e}n(jt,`isDetailedError`);var Mt=n((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Z=n(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function Q(e,t){return ot({},e,t)}n(Q,`cleanAndMerge`);var Nt={assignWithDepth:o,wrapLabel:Dt,calculateTextHeight:q,calculateTextWidth:J,calculateTextDimensions:Y,cleanAndMerge:Q,detectInit:ut,detectDirective:dt,isSubstringInArray:pt,interpolateToCurve:U,calcLabelPosition:_t,calcCardinalityPosition:yt,calcTerminalLabelPosition:bt,formatUrl:mt,getStylesFromArray:K,generateId:St,random:wt,runFunc:ht,entityDecode:At,insertTitle:Mt,isLabelCoordinateInPath:$,parseFontSize:Z,InitIDGenerator:kt},Pt=n(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Ft=n(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),It=n((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function Lt(e){return e??null}n(Lt,`handleUndefinedAttr`);function $(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}n($,`isLabelCoordinateInPath`);export{ce as $,Je as A,Ne as B,j as C,M as D,A as E,k as F,D as G,Ue as H,ze as I,w as J,ke as K,Me as L,Ke as M,We as N,Pe as O,Fe as P,fe as Q,Ie as R,N as S,Le as T,Be as U,He as V,Ve as W,we as X,Oe as Y,Te as Z,Dt as _,Ft as a,P as b,It as c,U as d,te as et,jt as f,Nt as g,ft as h,Q as i,Ge as j,qe as k,K as l,wt as m,q as n,ee as nt,Pt as o,Z as p,T as q,J as r,u as rt,St as s,Y as t,f as tt,Lt as u,V as v,Re as w,Ze as x,R as y,O as z}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-D2HolPjd.js b/apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-CAoob5DH.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-D2HolPjd.js rename to apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-CAoob5DH.js index 47c6fcd1a..02c0c4492 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-D2HolPjd.js +++ b/apps/pythinker-code/dist-web/assets/chunk-75Z2AOVW-CAoob5DH.js @@ -1,2 +1,2 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{R as r,h as i,p as a,r as o,s}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as c}from"./dist-lRkD-JPF.js";function l(e){this._context=e}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function u(e){return new l(e)}var d=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function f(e){return new d(e,!0)}function ee(e){return new d(e,!1)}function p(){}function m(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function h(e){this._context=e}h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:m(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function te(e){return new h(e)}function ne(e){this._context=e}ne.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function re(e){return new ne(e)}function ie(e){this._context=e}ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ae(e){return new ie(e)}function oe(e,t){this._basis=new h(e),this._beta=t}oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var se=(function e(t){function n(e){return t===1?new h(e):new oe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function g(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function _(e,t){this._context=e,this._k=(1-t)/6}_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:g(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ce=(function e(t){function n(e){return new _(e,t)}return n.tension=function(t){return e(+t)},n})(0);function v(e,t){this._context=e,this._k=(1-t)/6}v.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var le=(function e(t){function n(e){return new v(e,t)}return n.tension=function(t){return e(+t)},n})(0);function y(e,t){this._context=e,this._k=(1-t)/6}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ue=(function e(t){function n(e){return new y(e,t)}return n.tension=function(t){return e(+t)},n})(0);function b(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function de(e,t){this._context=e,this._alpha=t}de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fe=(function e(t){function n(e){return t?new de(e,t):new _(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function pe(e,t){this._context=e,this._alpha=t}pe.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var me=(function e(t){function n(e){return t?new pe(e,t):new v(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function he(e,t){this._context=e,this._alpha=t}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=(function e(t){function n(e){return t?new he(e,t):new y(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function _e(e){this._context=e}_e.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ve(e){return new _e(e)}function ye(e){return e<0?-1:1}function be(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ye(a)+ye(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function x(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function S(e){this._context=e}S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:x(this,this._t0,xe(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,x(this,xe(this,n=be(this,e,t)),n);break;default:x(this,this._t0,n=be(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Se(e){this._context=new Ce(e)}(Se.prototype=Object.create(S.prototype)).point=function(e,t){S.prototype.point.call(this,t,e)};function Ce(e){this._context=e}Ce.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function we(e){return new S(e)}function Te(e){return new Se(e)}function Ee(e){this._context=e}Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=De(e),i=De(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function w(e){return new C(e,.5)}function T(e){return new C(e,0)}function ke(e){return new C(e,1)}function E(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(){}function je(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function D(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Me=`[object RegExp]`,O=`[object String]`,k=`[object Number]`,A=`[object Boolean]`,j=`[object Arguments]`,Ne=`[object Symbol]`,Pe=`[object Date]`,Fe=`[object Map]`,Ie=`[object Set]`,Le=`[object Array]`,Re=`[object ArrayBuffer]`,ze=`[object Object]`,M=`[object DataView]`,Be=`[object Uint8Array]`,Ve=`[object Uint8ClampedArray]`,He=`[object Uint16Array]`,Ue=`[object Uint32Array]`,We=`[object Int8Array]`,Ge=`[object Int16Array]`,Ke=`[object Int32Array]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)();function N(e){return Ye.Buffer!==void 0&&Ye.Buffer.isBuffer(e)}function Xe(e){return Number.isSafeInteger(e)&&e>=0}function Ze(e){return e!=null&&typeof e!=`function`&&Xe(e.length)}function Qe(e){return e===`__proto__`}function P(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $e(e,t){return I(e,void 0,e,new Map,t)}function I(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(P(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(D(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),L(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case k:case O:case A:{let t=new e.constructor(e?.valueOf());return L(t,e),t}case j:{let t={};return L(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function R(e){return typeof e==`object`&&!!e&&D(e)===`[object Arguments]`}function z(e){return typeof e==`object`&&!!e}function rt(e){return z(e)&&Ze(e)}function B(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(B.Cache||Map),n}B.Cache=Map;function V(e){return F(e)}function it(e){if(P(e))return e;if(Array.isArray(e)||F(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function at(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;ee.args);r(e),i=o(i,[...e])}else i=n.args;if(!i)return;let s=a(e,t),c=`config`;return i[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),i[s]=i[c],delete i[c]),i},`detectInit`),dt=e(function(e,n=null){try{let r=RegExp(`[%]{2}(?![{]${lt.source})(?=[}][%]{2}).* +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{R as r,h as i,p as a,r as o,s}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as c}from"./dist-lRkD-JPF.js";function l(e){this._context=e}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function u(e){return new l(e)}var d=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function f(e){return new d(e,!0)}function ee(e){return new d(e,!1)}function p(){}function m(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function h(e){this._context=e}h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:m(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function te(e){return new h(e)}function ne(e){this._context=e}ne.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function re(e){return new ne(e)}function ie(e){this._context=e}ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ae(e){return new ie(e)}function oe(e,t){this._basis=new h(e),this._beta=t}oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var se=(function e(t){function n(e){return t===1?new h(e):new oe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function g(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function _(e,t){this._context=e,this._k=(1-t)/6}_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:g(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ce=(function e(t){function n(e){return new _(e,t)}return n.tension=function(t){return e(+t)},n})(0);function v(e,t){this._context=e,this._k=(1-t)/6}v.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var le=(function e(t){function n(e){return new v(e,t)}return n.tension=function(t){return e(+t)},n})(0);function y(e,t){this._context=e,this._k=(1-t)/6}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ue=(function e(t){function n(e){return new y(e,t)}return n.tension=function(t){return e(+t)},n})(0);function b(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function de(e,t){this._context=e,this._alpha=t}de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fe=(function e(t){function n(e){return t?new de(e,t):new _(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function pe(e,t){this._context=e,this._alpha=t}pe.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var me=(function e(t){function n(e){return t?new pe(e,t):new v(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function he(e,t){this._context=e,this._alpha=t}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=(function e(t){function n(e){return t?new he(e,t):new y(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function _e(e){this._context=e}_e.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ve(e){return new _e(e)}function ye(e){return e<0?-1:1}function be(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ye(a)+ye(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function x(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function S(e){this._context=e}S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:x(this,this._t0,xe(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,x(this,xe(this,n=be(this,e,t)),n);break;default:x(this,this._t0,n=be(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Se(e){this._context=new Ce(e)}(Se.prototype=Object.create(S.prototype)).point=function(e,t){S.prototype.point.call(this,t,e)};function Ce(e){this._context=e}Ce.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function we(e){return new S(e)}function Te(e){return new Se(e)}function Ee(e){this._context=e}Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=De(e),i=De(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function w(e){return new C(e,.5)}function T(e){return new C(e,0)}function ke(e){return new C(e,1)}function E(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(){}function je(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function D(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Me=`[object RegExp]`,O=`[object String]`,k=`[object Number]`,A=`[object Boolean]`,j=`[object Arguments]`,Ne=`[object Symbol]`,Pe=`[object Date]`,Fe=`[object Map]`,Ie=`[object Set]`,Le=`[object Array]`,Re=`[object ArrayBuffer]`,ze=`[object Object]`,M=`[object DataView]`,Be=`[object Uint8Array]`,Ve=`[object Uint8ClampedArray]`,He=`[object Uint16Array]`,Ue=`[object Uint32Array]`,We=`[object Int8Array]`,Ge=`[object Int16Array]`,Ke=`[object Int32Array]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)();function N(e){return Ye.Buffer!==void 0&&Ye.Buffer.isBuffer(e)}function Xe(e){return Number.isSafeInteger(e)&&e>=0}function Ze(e){return e!=null&&typeof e!=`function`&&Xe(e.length)}function Qe(e){return e===`__proto__`}function P(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $e(e,t){return I(e,void 0,e,new Map,t)}function I(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(P(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(D(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),L(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case k:case O:case A:{let t=new e.constructor(e?.valueOf());return L(t,e),t}case j:{let t={};return L(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function R(e){return typeof e==`object`&&!!e&&D(e)===`[object Arguments]`}function z(e){return typeof e==`object`&&!!e}function rt(e){return z(e)&&Ze(e)}function B(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(B.Cache||Map),n}B.Cache=Map;function V(e){return F(e)}function it(e){if(P(e))return e;if(Array.isArray(e)||F(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function at(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;ee.args);r(e),i=o(i,[...e])}else i=n.args;if(!i)return;let s=a(e,t),c=`config`;return i[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),i[s]=i[c],delete i[c]),i},`detectInit`),dt=e(function(e,n=null){try{let r=RegExp(`[%]{2}(?![{]${lt.source})(?=[}][%]{2}).* `,`ig`);e=e.trim().replace(r,``).replace(/'/gm,`"`),t.debug(`Detecting diagram directive${n===null?``:` type:`+n} based on the text:${e}`);let a,o=[];for(;(a=i.exec(e))!==null;)if(a.index===i.lastIndex&&i.lastIndex++,a&&!n||n&&a[1]?.match(n)||n&&a[2]?.match(n)){let e=a[1]?a[1]:a[2],t=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:e,args:t})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return t.error(`ERROR: ${r.message} - Unable to parse directive type: '${n}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),ft=e(function(e){return e.replace(i,``)},`removeDirectives`),pt=e(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function U(e,t){return e?ct[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}e(U,`interpolateToCurve`);function mt(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,st.sanitizeUrl)(n)}e(mt,`formatUrl`);var ht=e((e,...n)=>{let r=e.split(`.`),i=r.length-1,a=r[i],o=window;for(let n=0;n{n+=W(e,t),t=e}),G(e,n/2)}e(gt,`traverseEdge`);function _t(e){return e.length===1?e[0]:gt(e)}e(_t,`calcLabelPosition`);var vt=e((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),G=e((e,t)=>{let n,r=t;for(let t of e){if(n){let e=W(t,n);if(e===0)return n;if(e=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:vt((1-i)*n.x+i*t.x,5),y:vt((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),yt=e((e,n,r)=>{t.info(`our points ${JSON.stringify(n)}`),n[0]!==r&&(n=n.reverse());let i=G(n,25),a=e?10:5,o=Math.atan2(n[0].y-i.y,n[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(n[0].x+i.x)/2,s.y=-Math.cos(o)*a+(n[0].y+i.y)/2,s},`calcCardinalityPosition`);function bt(e,n,r){let i=structuredClone(r);t.info(`our points`,i),n!==`start_left`&&n!==`start_right`&&i.reverse();let a=G(i,25+e),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return n===`start_left`?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):n===`end_right`?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):n===`end_left`?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}e(bt,`calcTerminalLabelPosition`);function K(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}e(K,`getStylesFromArray`);var xt=0,St=e(()=>(xt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+xt),`generateId`);function Ct(e){let t=``;for(let n=0;nCt(e.length),`random`),Tt=e(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),Et=e(function(e,t){let n=t.text.replace(s.lineBreakRegex,` `),[,r]=Z(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),Dt=B((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`
`},n),s.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=J(`${e} `,n),c=J(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Ot(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Ot=B((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(J(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function q(e,t){return Y(e,t).height}e(q,`calculateTextHeight`);function J(e,t){return Y(e,t).width}e(J,`calculateTextWidth`);var Y=B((e,t)=>{let{fontSize:r=12,fontFamily:i=`Arial`,fontWeight:a=400}=t;if(!e)return{width:0,height:0};let[,o]=Z(r),c=[`sans-serif`,i],l=e.split(s.lineBreakRegex),u=[],d=n(`body`);if(!d.remove)return{width:0,height:0,lineHeight:0};let f=d.append(`svg`);for(let e of c){let t=0,n={width:0,height:0,lineHeight:0};for(let r of l){let i=Tt();i.text=r||`​`;let s=Et(f,i).style(`font-size`,o).style(`font-weight`,a).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}u.push(n)}return f.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),kt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{e(this,`InitIDGenerator`)}},X,At=e(function(e){return X||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),X.innerHTML=e,unescape(X.textContent)},`entityDecode`);function jt(e){return`str`in e}e(jt,`isDetailedError`);var Mt=e((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Z=e(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function Q(e,t){return ot({},e,t)}e(Q,`cleanAndMerge`);var Nt={assignWithDepth:o,wrapLabel:Dt,calculateTextHeight:q,calculateTextWidth:J,calculateTextDimensions:Y,cleanAndMerge:Q,detectInit:ut,detectDirective:dt,isSubstringInArray:pt,interpolateToCurve:U,calcLabelPosition:_t,calcCardinalityPosition:yt,calcTerminalLabelPosition:bt,formatUrl:mt,getStylesFromArray:K,generateId:St,random:wt,runFunc:ht,entityDecode:At,insertTitle:Mt,isLabelCoordinateInPath:$,parseFontSize:Z,InitIDGenerator:kt},Pt=e(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Ft=e(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),It=e((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function Lt(e){return e??null}e(Lt,`handleUndefinedAttr`);function $(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}e($,`isLabelCoordinateInPath`);export{ce as $,Je as A,Ne as B,j as C,M as D,A as E,k as F,D as G,Ue as H,ze as I,w as J,ke as K,Me as L,Ke as M,We as N,Pe as O,Fe as P,fe as Q,Ie as R,N as S,Le as T,Be as U,He as V,Ve as W,we as X,Oe as Y,Te as Z,Dt as _,Ft as a,P as b,It as c,U as d,te as et,jt as f,Nt as g,ft as h,Q as i,Ge as j,qe as k,K as l,wt as m,q as n,ee as nt,Pt as o,Z as p,T as q,J as r,u as rt,St as s,Y as t,f as tt,Lt as u,V as v,Re as w,Ze as x,R as y,O as z}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-CLGD4ZFX-D_luxf7b.js b/apps/pythinker-code/dist-web/assets/chunk-CLGD4ZFX-BVZ8CvLY.js similarity index 60% rename from apps/pythinker-code/dist-web/assets/chunk-CLGD4ZFX-D_luxf7b.js rename to apps/pythinker-code/dist-web/assets/chunk-CLGD4ZFX-BVZ8CvLY.js index 5baf25b0b..850eae374 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-CLGD4ZFX-D_luxf7b.js +++ b/apps/pythinker-code/dist-web/assets/chunk-CLGD4ZFX-BVZ8CvLY.js @@ -1 +1 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Cn6kALDM.js";import{x as n}from"./chunk-DU6HZSFF-DfRjAqU1.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);return r===`sandbox`&&(i=t((t(`#i${e}`).node()?.contentDocument??document).body)),i.select(`#${e}`)},`selectSvgElement`);export{r as t}; \ No newline at end of file +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Cn6kALDM.js";import{x as n}from"./chunk-DU6HZSFF-B78kfBb6.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);return r===`sandbox`&&(i=t((t(`#i${e}`).node()?.contentDocument??document).body)),i.select(`#${e}`)},`selectSvgElement`);export{r as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-DfRjAqU1.js b/apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-B78kfBb6.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-DfRjAqU1.js rename to apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-B78kfBb6.js index 4758fb706..096d3e3bc 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-DfRjAqU1.js +++ b/apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-B78kfBb6.js @@ -1,4 +1,4 @@ -import{t as e}from"./preload-helper-zJ_50EbN.js";import{n as t,t as n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{h as r,m as i}from"./src-Cn6kALDM.js";import{t as a}from"./purify.es-CvIXgbbv.js";var o={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return o.hue2rgb(a,i,e+1/3)*255;case`g`:return o.hue2rgb(a,i,e)*255;case`b`:return o.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(tt>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},unit:{dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},c={};for(let e=0;e<=255;e++)c[e]=s.unit.dec2hex(e);var l={ALL:0,RGB:1,HSL:2},u=class{constructor(){this.type=l.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=l.ALL}is(e){return this.type===e}},d=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new u}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=l.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=s.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=s.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=s.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=s.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=s.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=s.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(l.HSL)&&t!==void 0?t:(this._ensureHSL(),s.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(l.HSL)&&t!==void 0?t:(this._ensureHSL(),s.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(l.HSL)&&t!==void 0?t:(this._ensureHSL(),s.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(l.RGB)&&t!==void 0?t:(this._ensureRGB(),s.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(l.RGB)&&t!==void 0?t:(this._ensureRGB(),s.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(l.RGB)&&t!==void 0?t:(this._ensureRGB(),s.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(l.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(l.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(l.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(l.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(l.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(l.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),f={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(f.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return d.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${c[Math.round(t)]}${c[Math.round(n)]}${c[Math.round(r)]}${c[Math.round(i*255)]}`:`#${c[Math.round(t)]}${c[Math.round(n)]}${c[Math.round(r)]}`}},p={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(p.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return s.channel.clamp.h(parseFloat(e)*.9);case`rad`:return s.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return s.channel.clamp.h(parseFloat(e)*360)}}return s.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(p.re);if(!n)return;let[,r,i,a,o,c]=n;return d.set({h:p._hue2deg(r),s:s.channel.clamp.s(parseFloat(i)),l:s.channel.clamp.l(parseFloat(a)),a:o?s.channel.clamp.a(c?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${s.lang.round(t)}, ${s.lang.round(n)}%, ${s.lang.round(r)}%, ${i})`:`hsl(${s.lang.round(t)}, ${s.lang.round(n)}%, ${s.lang.round(r)}%)`}},m={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=m.colors[e];if(t)return f.parse(t)},stringify:e=>{let t=f.stringify(e);for(let e in m.colors)if(m.colors[e]===t)return e}},h={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(h.re);if(!n)return;let[,r,i,a,o,c,l,u,f]=n;return d.set({r:s.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:s.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:s.channel.clamp.b(l?parseFloat(c)*2.55:parseFloat(c)),a:u?s.channel.clamp.a(f?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${s.lang.round(t)}, ${s.lang.round(n)}, ${s.lang.round(r)}, ${s.lang.round(i)})`:`rgb(${s.lang.round(t)}, ${s.lang.round(n)}, ${s.lang.round(r)})`}},g={format:{keyword:m,hex:f,rgb:h,rgba:h,hsl:p,hsla:p},parse:e=>{if(typeof e!=`string`)return e;let t=f.parse(e)||h.parse(e)||p.parse(e)||m.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(l.HSL)||e.data.r===void 0?p.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?h.stringify(e):f.stringify(e)},ee=(e,t)=>{let n=g.parse(e);for(let e in t)n[e]=s.channel.clamp[e](t[e]);return g.stringify(n)},_=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return ee(e,{a:t});let i=d.set({r:s.channel.clamp.r(e),g:s.channel.clamp.g(t),b:s.channel.clamp.b(n),a:s.channel.clamp.a(r)});return g.stringify(i)},te=e=>{let{r:t,g:n,b:r}=g.parse(e),i=.2126*s.channel.toLinear(t)+.7152*s.channel.toLinear(n)+.0722*s.channel.toLinear(r);return s.lang.round(i)},ne=e=>te(e)>=.5,v=e=>!ne(e),y=(e,t,n)=>{let r=g.parse(e),i=r[t],a=s.channel.clamp[t](i+n);return i!==a&&(r[t]=a),g.stringify(r)},b=(e,t)=>y(e,`l`,t),x=(e,t)=>y(e,`l`,-t),S=(e,t)=>{let n=g.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return ee(e,r)},re=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=g.parse(e),{r:s,g:c,b:l,a:u}=g.parse(t),d=n/100,f=d*2-1,p=o-u,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,h=1-m;return _(r*m+s*h,i*m+c*h,a*m+l*h,o*d+u*(1-d))},C=(e,t=100)=>{let n=g.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,re(n,e,t)},w=t((e,t,{depth:n=2}={})=>{let r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(t=>w(e,t,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.includes(t)||e.push(t)}),e;if(e==null||n<=0)return typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t;if(t!=null&&typeof e==`object`&&typeof t==`object`){let r=e;Object.entries(t).forEach(([t,i])=>{if(typeof i==`object`){if(i===null)return;Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),r[t]===void 0&&(r[t]=Array.isArray(i)?[]:{}),typeof r[t]==`object`&&(r[t]=w(r[t],i,{depth:n-1}))}else typeof r[t]!=`object`&&(Object.hasOwn(e,t)?r[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))})}return e},`assignWithDepth`),T=w,E=`#ffffff`,D=`#f2f2f2`,O=t((e,t)=>t?S(e,{s:-40,l:10}):S(e,{s:-40,l:-10}),`mkBorder`),ie=class{static{t(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||`navy`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||x(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||x(this.mainBkg,10)):(this.rowOdd=this.rowOdd||b(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||b(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},ae=t(e=>{let t=new ie;return t.calculate(e),t},`getThemeVariables`),oe=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=`calculated`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#F9FFFE`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`calculated`,this.activationBkgColor=`calculated`,this.sequenceNumberColor=`black`,this.clusterBkg=`#302F3D`,this.sectionBkgColor=x(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=x(this.sectionBkgColor,10),this.taskBorderColor=_(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=_(255,255,255,50),this.activeTaskBkgColor=`#81B1DB`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#E83737`,this.critBkgColor=`#E83737`,this.taskTextDarkColor=`calculated`,this.todayLineColor=`#DB5757`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||b(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||x(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){this.secondBkg=b(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=b(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=b(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=C(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#555`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#f4f4f4`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||`#0b0000`,this.cScale2=this.cScale2||`#4d1037`,this.cScale3=this.cScale3||`#3f5258`,this.cScale4=this.cScale4||`#4f2f1b`,this.cScale5=this.cScale5||`#6e0a0a`,this.cScale6=this.cScale6||`#3b0048`,this.cScale7=this.cScale7||`#995a01`,this.cScale8=this.cScale8||`#154706`,this.cScale9=this.cScale9||`#161722`,this.cScale10=this.cScale10||`#00296f`,this.cScale11=this.cScale11||`#01629c`,this.cScale12=this.cScale12||`#010029`,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330});for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},se=t(e=>{let t=new oe;return t.calculate(e),t},`getThemeVariables`),ce=class{static{t(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=S(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=`calculated`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBorderColor=`calculated`,this.critBkgColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.sectionBkgColor=_(102,102,255,.49),this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#fff400`,this.taskBorderColor=`#534fbc`,this.taskBkgColor=`#8a90dd`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`#534fbc`,this.activeTaskBkgColor=`#bfc7ff`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||x(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||x(this.tertiaryColor,40);for(let e=0;e{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},le=t(e=>{let t=new ce;return t.calculate(e),t},`getThemeVariables`),ue=class{static{t(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=b(`#cde498`,10),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.primaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){this.actorBorder=x(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||x(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||x(this.tertiaryColor,40);for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},de=t(e=>{let t=new ue;return t.calculate(e),t},`getThemeVariables`),fe=class{static{t(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=b(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.mainBkg=`#eee`,this.secondBkg=`calculated`,this.lineColor=`#666`,this.border1=`#999`,this.border2=`calculated`,this.note=`#ffa`,this.text=`#333`,this.critical=`#d42`,this.done=`#bbb`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||b(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){this.secondBkg=b(this.contrast,55),this.border2=this.contrast,this.actorBorder=b(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=`#999`,this.noteBkgColor=`#666`,this.noteTextColor=`#fff`,this.cScale0=this.cScale0||`#555`,this.cScale1=this.cScale1||`#F4F4F4`,this.cScale2=this.cScale2||`#555`,this.cScale3=this.cScale3||`#BBB`,this.cScale4=this.cScale4||`#777`,this.cScale5=this.cScale5||`#999`,this.cScale6=this.cScale6||`#DDD`,this.cScale7=this.cScale7||`#FFF`,this.cScale8=this.cScale8||`#DDD`,this.cScale9=this.cScale9||`#BBB`,this.cScale10=this.cScale10||`#999`,this.cScale11=this.cScale11||`#777`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},pe=t(e=>{let t=new fe;return t.calculate(e),t},`getThemeVariables`),me=class{static{t(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=S(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||b(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||S(e,{h:30}),this.cScale4=this.cScale4||S(e,{h:60}),this.cScale5=this.cScale5||S(e,{h:90}),this.cScale6=this.cScale6||S(e,{h:120}),this.cScale7=this.cScale7||S(e,{h:150}),this.cScale8=this.cScale8||S(e,{h:210,l:150}),this.cScale9=this.cScale9||S(e,{h:270}),this.cScale10=this.cScale10||S(e,{h:300}),this.cScale11=this.cScale11||S(e,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},he=t(e=>{let t=new me;return t.calculate(e),t},`getThemeVariables`),ge=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},_e=t(e=>{let t=new ge;return t.calculate(e),t},`getThemeVariables`),ve=class{static{t(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=O(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=S(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||b(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},ye=t(e=>{let t=new ve;return t.calculate(e),t},`getThemeVariables`),be=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},xe=t(e=>{let t=new be;return t.calculate(e),t},`getThemeVariables`),Se=class{static{t(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=S(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||b(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Ce=t(e=>{let t=new Se;return t.calculate(e),t},`getThemeVariables`),we=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor=`#FFFFFF`,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},k={base:{getThemeVariables:ae},dark:{getThemeVariables:se},default:{getThemeVariables:le},forest:{getThemeVariables:de},neutral:{getThemeVariables:pe},neo:{getThemeVariables:he},"neo-dark":{getThemeVariables:_e},redux:{getThemeVariables:ye},"redux-dark":{getThemeVariables:xe},"redux-color":{getThemeVariables:Ce},"redux-dark-color":{getThemeVariables:t(e=>{let t=new we;return t.calculate(e),t},`getThemeVariables`)}},A={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:`arc`,ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:`"Open Sans", sans-serif`,actorFontWeight:400,noteFontSize:14,noteFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,noteFontWeight:400,noteAlign:`center`,messageFontSize:16,messageFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:`%Y-%m-%d`,topAxis:!1,displayMode:``,weekday:`sunday`},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:`20`,compositTitleSize:35,radius:5,defaultRenderer:`dagre-wrapper`},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:`TB`,minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:`right`,highlightSlice:``},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:``,filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Te={...A,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,nodePlacementAlignment:`NONE`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`,keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:k.default.getThemeVariables(),sequence:{...A.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{defaultRenderer:`dagre-wrapper`,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...A.gantt,tickInterval:void 0,useWidth:void 0},c4:{...A.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...A.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...A.pie,useWidth:984},xyChart:{...A.xyChart,useWidth:void 0},requirement:{...A.requirement,useWidth:void 0},packet:{...A.packet},eventmodeling:{...A.eventmodeling},treeView:{...A.treeView,useWidth:void 0},radar:{...A.radar},railroad:{...A.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...A.ishikawa},sankey:{...A.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...A.venn},cynefin:{...A.cynefin}},Ee=t((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...Ee(e[r],``)]:[...n,t+r],[]),`keyify`),De=new Set(Ee(Te,``)),Oe=Te,ke={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Ae=t((e,t)=>{for(let n of Object.keys(e)){let r=e[n];(n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||typeof r!=`string`||!t.test(r))&&(i.debug(`sanitize deleting dictionary entry:`,n,r),delete e[n])}},`sanitizeDictionaryConfig`),j=t(e=>{if(i.debug(`sanitizeDirective called with`,e),!(typeof e!=`object`||!e)){if(Array.isArray(e)){e.forEach(e=>j(e));return}for(let t of Object.keys(e)){if(i.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!De.has(t)||e[t]==null){i.debug(`sanitize deleting key: `,t),delete e[t];continue}if(typeof e[t]==`object`){let n=ke[t];n?Ae(e[t],n):(i.debug(`sanitizing object`,t),j(e[t]));continue}for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(i.debug(`sanitizing css option`,t),e[t]=je(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}i.debug(`After sanitization`,e)}},`sanitizeDirective`),je=t(e=>{let t=0,n=0;for(let r of e){if(t!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),P=T({},M),F,I=[],L=T({},M),R=t((e,t)=>{let n=T({},e),r={};for(let e of t)Le(e),r=T(r,e);if(n=T(n,r),r.theme&&r.theme in k){let e=T(T({},F).themeVariables||{},r.themeVariables);n.theme&&n.theme in k&&(n.themeVariables=k[n.theme].getThemeVariables(e))}return L=n,Ue(L),L},`updateCurrentConfig`),Me=t(e=>(P=T({},M),P=T(P,e),e.theme&&k[e.theme]&&(P.themeVariables=k[e.theme].getThemeVariables(e.themeVariables)),R(P,I),P),`setSiteConfig`),Ne=t(e=>{F=T({},e)},`saveConfigFromInitialize`),Pe=t(e=>(P=T(P,e),R(P,I),P),`updateSiteConfig`),Fe=t(()=>T({},P),`getSiteConfig`),Ie=t(e=>(R(L,[e]),z()),`setConfig`),z=t(()=>T({},L),`getConfig`),Le=t(e=>{e&&([`secure`,...P.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(i.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&Le(e[t])}))},`sanitize`),Re=t(e=>{j(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),I.push(e),R(P,I)},`addDirective`),ze=t((e=P)=>{I=[],R(e,I)},`reset`),Be={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},Ve={},He=t(e=>{Ve[e]||(i.warn(Be[e]),Ve[e]=!0)},`issueWarning`),Ue=t(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&He(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),We=t(()=>{let e={};F&&(e=T(e,F));for(let t of I)e=T(e,t);return e},`getUserDefinedConfig`),Ge=t(e=>(e.flowchart?.htmlLabels!=null&&He(`FLOWCHART_HTML_LABELS_DEPRECATED`),N(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),Ke=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,qe=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Je=/\s*%%.*\n/gm,Ye=class extends Error{static{t(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},B={},Xe=t(function(e,t){e=e.replace(Ke,``).replace(qe,``).replace(Je,` +import{t as e}from"./preload-helper-zJ_50EbN.js";import{n as t,t as n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{h as r,m as i}from"./src-Cn6kALDM.js";import{t as a}from"./purify.es-F_7NWVtX.js";var o={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return o.hue2rgb(a,i,e+1/3)*255;case`g`:return o.hue2rgb(a,i,e)*255;case`b`:return o.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(tt>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},unit:{dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},c={};for(let e=0;e<=255;e++)c[e]=s.unit.dec2hex(e);var l={ALL:0,RGB:1,HSL:2},u=class{constructor(){this.type=l.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=l.ALL}is(e){return this.type===e}},d=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new u}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=l.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=s.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=s.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=s.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=s.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=s.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=s.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(l.HSL)&&t!==void 0?t:(this._ensureHSL(),s.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(l.HSL)&&t!==void 0?t:(this._ensureHSL(),s.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(l.HSL)&&t!==void 0?t:(this._ensureHSL(),s.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(l.RGB)&&t!==void 0?t:(this._ensureRGB(),s.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(l.RGB)&&t!==void 0?t:(this._ensureRGB(),s.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(l.RGB)&&t!==void 0?t:(this._ensureRGB(),s.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(l.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(l.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(l.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(l.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(l.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(l.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),f={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(f.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return d.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${c[Math.round(t)]}${c[Math.round(n)]}${c[Math.round(r)]}${c[Math.round(i*255)]}`:`#${c[Math.round(t)]}${c[Math.round(n)]}${c[Math.round(r)]}`}},p={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(p.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return s.channel.clamp.h(parseFloat(e)*.9);case`rad`:return s.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return s.channel.clamp.h(parseFloat(e)*360)}}return s.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(p.re);if(!n)return;let[,r,i,a,o,c]=n;return d.set({h:p._hue2deg(r),s:s.channel.clamp.s(parseFloat(i)),l:s.channel.clamp.l(parseFloat(a)),a:o?s.channel.clamp.a(c?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${s.lang.round(t)}, ${s.lang.round(n)}%, ${s.lang.round(r)}%, ${i})`:`hsl(${s.lang.round(t)}, ${s.lang.round(n)}%, ${s.lang.round(r)}%)`}},m={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=m.colors[e];if(t)return f.parse(t)},stringify:e=>{let t=f.stringify(e);for(let e in m.colors)if(m.colors[e]===t)return e}},h={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(h.re);if(!n)return;let[,r,i,a,o,c,l,u,f]=n;return d.set({r:s.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:s.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:s.channel.clamp.b(l?parseFloat(c)*2.55:parseFloat(c)),a:u?s.channel.clamp.a(f?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${s.lang.round(t)}, ${s.lang.round(n)}, ${s.lang.round(r)}, ${s.lang.round(i)})`:`rgb(${s.lang.round(t)}, ${s.lang.round(n)}, ${s.lang.round(r)})`}},g={format:{keyword:m,hex:f,rgb:h,rgba:h,hsl:p,hsla:p},parse:e=>{if(typeof e!=`string`)return e;let t=f.parse(e)||h.parse(e)||p.parse(e)||m.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(l.HSL)||e.data.r===void 0?p.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?h.stringify(e):f.stringify(e)},ee=(e,t)=>{let n=g.parse(e);for(let e in t)n[e]=s.channel.clamp[e](t[e]);return g.stringify(n)},_=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return ee(e,{a:t});let i=d.set({r:s.channel.clamp.r(e),g:s.channel.clamp.g(t),b:s.channel.clamp.b(n),a:s.channel.clamp.a(r)});return g.stringify(i)},te=e=>{let{r:t,g:n,b:r}=g.parse(e),i=.2126*s.channel.toLinear(t)+.7152*s.channel.toLinear(n)+.0722*s.channel.toLinear(r);return s.lang.round(i)},ne=e=>te(e)>=.5,v=e=>!ne(e),y=(e,t,n)=>{let r=g.parse(e),i=r[t],a=s.channel.clamp[t](i+n);return i!==a&&(r[t]=a),g.stringify(r)},b=(e,t)=>y(e,`l`,t),x=(e,t)=>y(e,`l`,-t),S=(e,t)=>{let n=g.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return ee(e,r)},re=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=g.parse(e),{r:s,g:c,b:l,a:u}=g.parse(t),d=n/100,f=d*2-1,p=o-u,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,h=1-m;return _(r*m+s*h,i*m+c*h,a*m+l*h,o*d+u*(1-d))},C=(e,t=100)=>{let n=g.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,re(n,e,t)},w=t((e,t,{depth:n=2}={})=>{let r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(t=>w(e,t,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.includes(t)||e.push(t)}),e;if(e==null||n<=0)return typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t;if(t!=null&&typeof e==`object`&&typeof t==`object`){let r=e;Object.entries(t).forEach(([t,i])=>{if(typeof i==`object`){if(i===null)return;Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),r[t]===void 0&&(r[t]=Array.isArray(i)?[]:{}),typeof r[t]==`object`&&(r[t]=w(r[t],i,{depth:n-1}))}else typeof r[t]!=`object`&&(Object.hasOwn(e,t)?r[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))})}return e},`assignWithDepth`),T=w,E=`#ffffff`,D=`#f2f2f2`,O=t((e,t)=>t?S(e,{s:-40,l:10}):S(e,{s:-40,l:-10}),`mkBorder`),ie=class{static{t(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||`navy`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||x(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||x(this.mainBkg,10)):(this.rowOdd=this.rowOdd||b(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||b(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},ae=t(e=>{let t=new ie;return t.calculate(e),t},`getThemeVariables`),oe=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=`calculated`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#F9FFFE`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`calculated`,this.activationBkgColor=`calculated`,this.sequenceNumberColor=`black`,this.clusterBkg=`#302F3D`,this.sectionBkgColor=x(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=x(this.sectionBkgColor,10),this.taskBorderColor=_(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=_(255,255,255,50),this.activeTaskBkgColor=`#81B1DB`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#E83737`,this.critBkgColor=`#E83737`,this.taskTextDarkColor=`calculated`,this.todayLineColor=`#DB5757`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||b(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||x(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){this.secondBkg=b(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=b(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=b(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=C(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#555`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#f4f4f4`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||`#0b0000`,this.cScale2=this.cScale2||`#4d1037`,this.cScale3=this.cScale3||`#3f5258`,this.cScale4=this.cScale4||`#4f2f1b`,this.cScale5=this.cScale5||`#6e0a0a`,this.cScale6=this.cScale6||`#3b0048`,this.cScale7=this.cScale7||`#995a01`,this.cScale8=this.cScale8||`#154706`,this.cScale9=this.cScale9||`#161722`,this.cScale10=this.cScale10||`#00296f`,this.cScale11=this.cScale11||`#01629c`,this.cScale12=this.cScale12||`#010029`,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330});for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},se=t(e=>{let t=new oe;return t.calculate(e),t},`getThemeVariables`),ce=class{static{t(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=S(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=`calculated`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBorderColor=`calculated`,this.critBkgColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.sectionBkgColor=_(102,102,255,.49),this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#fff400`,this.taskBorderColor=`#534fbc`,this.taskBkgColor=`#8a90dd`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`#534fbc`,this.activeTaskBkgColor=`#bfc7ff`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||x(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||x(this.tertiaryColor,40);for(let e=0;e{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},le=t(e=>{let t=new ce;return t.calculate(e),t},`getThemeVariables`),ue=class{static{t(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=b(`#cde498`,10),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.primaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){this.actorBorder=x(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||x(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||x(this.tertiaryColor,40);for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},de=t(e=>{let t=new ue;return t.calculate(e),t},`getThemeVariables`),fe=class{static{t(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=b(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.mainBkg=`#eee`,this.secondBkg=`calculated`,this.lineColor=`#666`,this.border1=`#999`,this.border2=`calculated`,this.note=`#ffa`,this.text=`#333`,this.critical=`#d42`,this.done=`#bbb`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||b(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){this.secondBkg=b(this.contrast,55),this.border2=this.contrast,this.actorBorder=b(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=`#999`,this.noteBkgColor=`#666`,this.noteTextColor=`#fff`,this.cScale0=this.cScale0||`#555`,this.cScale1=this.cScale1||`#F4F4F4`,this.cScale2=this.cScale2||`#555`,this.cScale3=this.cScale3||`#BBB`,this.cScale4=this.cScale4||`#777`,this.cScale5=this.cScale5||`#999`,this.cScale6=this.cScale6||`#DDD`,this.cScale7=this.cScale7||`#FFF`,this.cScale8=this.cScale8||`#DDD`,this.cScale9=this.cScale9||`#BBB`,this.cScale10=this.cScale10||`#999`,this.cScale11=this.cScale11||`#777`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},pe=t(e=>{let t=new fe;return t.calculate(e),t},`getThemeVariables`),me=class{static{t(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=S(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||b(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||S(e,{h:30}),this.cScale4=this.cScale4||S(e,{h:60}),this.cScale5=this.cScale5||S(e,{h:90}),this.cScale6=this.cScale6||S(e,{h:120}),this.cScale7=this.cScale7||S(e,{h:150}),this.cScale8=this.cScale8||S(e,{h:210,l:150}),this.cScale9=this.cScale9||S(e,{h:270}),this.cScale10=this.cScale10||S(e,{h:300}),this.cScale11=this.cScale11||S(e,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},he=t(e=>{let t=new me;return t.calculate(e),t},`getThemeVariables`),ge=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},_e=t(e=>{let t=new ge;return t.calculate(e),t},`getThemeVariables`),ve=class{static{t(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=O(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=S(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||b(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},ye=t(e=>{let t=new ve;return t.calculate(e),t},`getThemeVariables`),be=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},xe=t(e=>{let t=new be;return t.calculate(e),t},`getThemeVariables`),Se=class{static{t(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=S(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||b(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Ce=t(e=>{let t=new Se;return t.calculate(e),t},`getThemeVariables`),we=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=b(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=b(C(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?x(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||x(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor=`#FFFFFF`,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||b(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},k={base:{getThemeVariables:ae},dark:{getThemeVariables:se},default:{getThemeVariables:le},forest:{getThemeVariables:de},neutral:{getThemeVariables:pe},neo:{getThemeVariables:he},"neo-dark":{getThemeVariables:_e},redux:{getThemeVariables:ye},"redux-dark":{getThemeVariables:xe},"redux-color":{getThemeVariables:Ce},"redux-dark-color":{getThemeVariables:t(e=>{let t=new we;return t.calculate(e),t},`getThemeVariables`)}},A={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:`arc`,ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:`"Open Sans", sans-serif`,actorFontWeight:400,noteFontSize:14,noteFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,noteFontWeight:400,noteAlign:`center`,messageFontSize:16,messageFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:`%Y-%m-%d`,topAxis:!1,displayMode:``,weekday:`sunday`},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:`20`,compositTitleSize:35,radius:5,defaultRenderer:`dagre-wrapper`},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:`TB`,minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:`right`,highlightSlice:``},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:``,filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Te={...A,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,nodePlacementAlignment:`NONE`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`,keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:k.default.getThemeVariables(),sequence:{...A.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{defaultRenderer:`dagre-wrapper`,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...A.gantt,tickInterval:void 0,useWidth:void 0},c4:{...A.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...A.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...A.pie,useWidth:984},xyChart:{...A.xyChart,useWidth:void 0},requirement:{...A.requirement,useWidth:void 0},packet:{...A.packet},eventmodeling:{...A.eventmodeling},treeView:{...A.treeView,useWidth:void 0},radar:{...A.radar},railroad:{...A.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...A.ishikawa},sankey:{...A.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...A.venn},cynefin:{...A.cynefin}},Ee=t((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...Ee(e[r],``)]:[...n,t+r],[]),`keyify`),De=new Set(Ee(Te,``)),Oe=Te,ke={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Ae=t((e,t)=>{for(let n of Object.keys(e)){let r=e[n];(n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||typeof r!=`string`||!t.test(r))&&(i.debug(`sanitize deleting dictionary entry:`,n,r),delete e[n])}},`sanitizeDictionaryConfig`),j=t(e=>{if(i.debug(`sanitizeDirective called with`,e),!(typeof e!=`object`||!e)){if(Array.isArray(e)){e.forEach(e=>j(e));return}for(let t of Object.keys(e)){if(i.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!De.has(t)||e[t]==null){i.debug(`sanitize deleting key: `,t),delete e[t];continue}if(typeof e[t]==`object`){let n=ke[t];n?Ae(e[t],n):(i.debug(`sanitizing object`,t),j(e[t]));continue}for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(i.debug(`sanitizing css option`,t),e[t]=je(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}i.debug(`After sanitization`,e)}},`sanitizeDirective`),je=t(e=>{let t=0,n=0;for(let r of e){if(t!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),P=T({},M),F,I=[],L=T({},M),R=t((e,t)=>{let n=T({},e),r={};for(let e of t)Le(e),r=T(r,e);if(n=T(n,r),r.theme&&r.theme in k){let e=T(T({},F).themeVariables||{},r.themeVariables);n.theme&&n.theme in k&&(n.themeVariables=k[n.theme].getThemeVariables(e))}return L=n,Ue(L),L},`updateCurrentConfig`),Me=t(e=>(P=T({},M),P=T(P,e),e.theme&&k[e.theme]&&(P.themeVariables=k[e.theme].getThemeVariables(e.themeVariables)),R(P,I),P),`setSiteConfig`),Ne=t(e=>{F=T({},e)},`saveConfigFromInitialize`),Pe=t(e=>(P=T(P,e),R(P,I),P),`updateSiteConfig`),Fe=t(()=>T({},P),`getSiteConfig`),Ie=t(e=>(R(L,[e]),z()),`setConfig`),z=t(()=>T({},L),`getConfig`),Le=t(e=>{e&&([`secure`,...P.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(i.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&Le(e[t])}))},`sanitize`),Re=t(e=>{j(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),I.push(e),R(P,I)},`addDirective`),ze=t((e=P)=>{I=[],R(e,I)},`reset`),Be={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},Ve={},He=t(e=>{Ve[e]||(i.warn(Be[e]),Ve[e]=!0)},`issueWarning`),Ue=t(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&He(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),We=t(()=>{let e={};F&&(e=T(e,F));for(let t of I)e=T(e,t);return e},`getUserDefinedConfig`),Ge=t(e=>(e.flowchart?.htmlLabels!=null&&He(`FLOWCHART_HTML_LABELS_DEPRECATED`),N(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),Ke=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,qe=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Je=/\s*%%.*\n/gm,Ye=class extends Error{static{t(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},B={},Xe=t(function(e,t){e=e.replace(Ke,``).replace(qe,``).replace(Je,` `);for(let[n,{detector:r}]of Object.entries(B))if(r(e,t))return n;throw new Ye(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),Ze=t((...e)=>{for(let{id:t,detector:n,loader:r}of e)Qe(t,n,r)},`registerLazyLoadedDiagrams`),Qe=t((e,t,n)=>{B[e]&&i.warn(`Detector with key ${e} already exists. Overwriting.`),B[e]={detector:t,loader:n},i.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),$e=t(e=>B[e].loader,`getDiagramLoader`),V=//gi,et=t(e=>e?lt(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),tt=(()=>{let e=!1;return()=>{e||=(nt(),!0)}})();function nt(){let e=`data-temp-href-target`;a.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),a.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}t(nt,`setupDompurifyHooks`);var rt=t(e=>(tt(),a.sanitize(e)),`removeScript`),it=t((e,t)=>{if(Ge(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=rt(e):n!==`loose`&&(e=lt(e),e=e.replace(//g,`>`),e=e.replace(/=/g,`=`),e=ct(e))}return e},`sanitizeMore`),H=t((e,t)=>e&&(e=t.dompurifyConfig?a.sanitize(it(e,t),t.dompurifyConfig).toString():a.sanitize(it(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),at=t((e,t)=>typeof e==`string`?H(e,t):e.flat().map(e=>H(e,t)),`sanitizeTextOrArray`),ot=t(e=>V.test(e),`hasBreaks`),st=t(e=>e.split(V),`splitBreaks`),ct=t(e=>e.replace(/#br#/g,`
`),`placeholderToBreak`),lt=t(e=>e.replace(V,`#br#`),`breakToPlaceholder`),ut=t(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),dt=t(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),ft=t(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),pt=t(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e0&&e+1Math.max(0,e.split(t).length-1),`countOccurrence`),mt=t((e,t)=>{let n=U(e,`~`),r=U(t,`~`);return n===1&&r===1},`shouldCombineSets`),ht=t(e=>{let t=U(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),gt=t(()=>window.MathMLElement!==void 0,`isMathMLSupported`),W=/\$\$(.*?)\$\$/g,G=t(e=>(e.match(W)?.length??0)>0,`hasKatex`),_t=t(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await yt(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),vt=t(async(t,n)=>{if(!G(t))return t;if(!(gt()||n.legacyMathML||n.forceLegacyMathML))return t.replace(W,`MathML is unsupported in this environment.`);{let{default:r}=await e(async()=>{let{default:e}=await import(`./katex-Vhh-h91d.js`);return{default:e}},[]),i=n.forceLegacyMathML||!gt()&&n.legacyMathML?`htmlAndMathml`:`mathml`;return t.split(V).map(e=>G(e)?`
${e}
`:`
${e}
`).join(``).replace(W,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g,` `).replace(//g,``))}return t.replace(W,`Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.`)},`renderKatexUnsanitized`),yt=t(async(e,t)=>H(await vt(e,t),t),`renderKatexSanitized`),bt={getRows:et,sanitizeText:H,sanitizeTextOrArray:at,hasBreaks:ot,splitBreaks:st,lineBreakRegex:V,removeScript:rt,getUrl:ut,evaluate:N,getMax:dt,getMin:ft},xt=t(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),St=t(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),Ct=t(function(e,t,n,r){xt(e,St(t,n,r))},`configureSvgSize`),wt=t(function(e,t,n,r){let a=t.node().getBBox(),o=a.width,s=a.height;i.info(`SVG bounds: ${o}x${s}`,a);let c=0,l=0;i.info(`Graph bounds: ${c}x${l}`,e),c=o+n*2,l=s+n*2,i.info(`Calculated bounds: ${c}x${l}`),Ct(t,l,c,r);let u=`${a.x-n} ${a.y-n} ${a.width+2*n} ${a.height+2*n}`;t.attr(`viewBox`,u)},`setupGraphViewbox`),K={};function Tt(e){return[...e.cssRules].map(e=>e.cssText).join(` `)}t(Tt,`cssStyleSheetToString`);var Et=t((e,t,n,r)=>{let a=``;return e in K&&K[e]?a=K[e]({...n,svgId:r}):i.warn(`No theme found for ${e}`),`& { font-family: ${n.fontFamily}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-CbPIJzjs.js b/apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-CbPIJzjs.js new file mode 100644 index 000000000..4fe7ec62f --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-CbPIJzjs.js @@ -0,0 +1,131 @@ +import{h as e,m as t}from"./src-CDd1avoI.js";import{n,t as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let a=n<.5?n*(1+t):n+t-n*t,o=2*n-a;switch(r){case`r`:return i.hue2rgb(o,a,e+1/3)*255;case`g`:return i.hue2rgb(o,a,e)*255;case`b`:return i.hue2rgb(o,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(tt>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},unit:{dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},o={};for(let e=0;e<=255;e++)o[e]=a.unit.dec2hex(e);const s={ALL:0,RGB:1,HSL:2};var c=class{constructor(){this.type=s.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=s.ALL}is(e){return this.type===e}};const l=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new c}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=s.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=a.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=a.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=a.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=a.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=a.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=a.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(s.HSL)&&t!==void 0?t:(this._ensureHSL(),a.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(s.HSL)&&t!==void 0?t:(this._ensureHSL(),a.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(s.HSL)&&t!==void 0?t:(this._ensureHSL(),a.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(s.RGB)&&t!==void 0?t:(this._ensureRGB(),a.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(s.RGB)&&t!==void 0?t:(this._ensureRGB(),a.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(s.RGB)&&t!==void 0?t:(this._ensureRGB(),a.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(s.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(s.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(s.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(s.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(s.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(s.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),u={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(u.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,d=a?0:-1,f=o?255:15;return l.set({r:(r>>c*(d+3)&f)*s,g:(r>>c*(d+2)&f)*s,b:(r>>c*(d+1)&f)*s,a:a?(r&f)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${o[Math.round(t)]}${o[Math.round(n)]}${o[Math.round(r)]}${o[Math.round(i*255)]}`:`#${o[Math.round(t)]}${o[Math.round(n)]}${o[Math.round(r)]}`}},d={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(d.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return a.channel.clamp.h(parseFloat(e)*.9);case`rad`:return a.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return a.channel.clamp.h(parseFloat(e)*360)}}return a.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(d.re);if(!n)return;let[,r,i,o,s,c]=n;return l.set({h:d._hue2deg(r),s:a.channel.clamp.s(parseFloat(i)),l:a.channel.clamp.l(parseFloat(o)),a:s?a.channel.clamp.a(c?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${a.lang.round(t)}, ${a.lang.round(n)}%, ${a.lang.round(r)}%, ${i})`:`hsl(${a.lang.round(t)}, ${a.lang.round(n)}%, ${a.lang.round(r)}%)`}},f={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=f.colors[e];if(t)return u.parse(t)},stringify:e=>{let t=u.stringify(e);for(let e in f.colors)if(f.colors[e]===t)return e}},p={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(p.re);if(!n)return;let[,r,i,o,s,c,u,d,f]=n;return l.set({r:a.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:a.channel.clamp.g(s?parseFloat(o)*2.55:parseFloat(o)),b:a.channel.clamp.b(u?parseFloat(c)*2.55:parseFloat(c)),a:d?a.channel.clamp.a(f?parseFloat(d)/100:parseFloat(d)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${a.lang.round(t)}, ${a.lang.round(n)}, ${a.lang.round(r)}, ${a.lang.round(i)})`:`rgb(${a.lang.round(t)}, ${a.lang.round(n)}, ${a.lang.round(r)})`}},m={format:{keyword:f,hex:u,rgb:p,rgba:p,hsl:d,hsla:d},parse:e=>{if(typeof e!=`string`)return e;let t=u.parse(e)||p.parse(e)||d.parse(e)||f.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(s.HSL)||e.data.r===void 0?d.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?p.stringify(e):u.stringify(e)},ee=(e,t)=>{let n=m.parse(e);for(let e in t)n[e]=a.channel.clamp[e](t[e]);return m.stringify(n)},h=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return ee(e,{a:t});let i=l.set({r:a.channel.clamp.r(e),g:a.channel.clamp.g(t),b:a.channel.clamp.b(n),a:a.channel.clamp.a(r)});return m.stringify(i)},g=e=>{let{r:t,g:n,b:r}=m.parse(e),i=.2126*a.channel.toLinear(t)+.7152*a.channel.toLinear(n)+.0722*a.channel.toLinear(r);return a.lang.round(i)},te=e=>g(e)>=.5,_=e=>!te(e),v=(e,t,n)=>{let r=m.parse(e),i=r[t],o=a.channel.clamp[t](i+n);return i!==o&&(r[t]=o),m.stringify(r)},y=(e,t)=>v(e,`l`,t),b=(e,t)=>v(e,`l`,-t),x=(e,t)=>{let n=m.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return ee(e,r)},ne=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=m.parse(e),{r:s,g:c,b:l,a:u}=m.parse(t),d=n/100,f=d*2-1,p=o-u,ee=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,g=1-ee;return h(r*ee+s*g,i*ee+c*g,a*ee+l*g,o*d+u*(1-d))},S=(e,t=100)=>{let n=m.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,ne(n,e,t)}; +/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */ +function C(e,t){this.v=e,this.k=t}function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n`u`?null:k(BigInt.prototype.toString),Ne=typeof Symbol>`u`?null:k(Symbol.prototype.toString),D=k(Object.prototype.hasOwnProperty),Pe=k(Object.prototype.toString),O=k(RegExp.prototype.test),Fe=Ie(TypeError);function k(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return _e(e,t,n)}}function Ie(e){return function(){return E(e,[...arguments])}}function A(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:we;if(de&&de(e,null),!Ce(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(fe(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Le(e){for(let t=0;t/g),$e=T(/\${[\w\W]*/g),et=T(/^data-[\-\w.\u00B7-\uFFFF]+$/),tt=T(/^aria-[\-\w]+$/),nt=T(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rt=T(/^(?:\w+script|data):/i),it=T(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),at=T(/^html$/i),ot=T(/^[a-z][.\w]*(-[.\w]+)+$/i),st=T(/<[/\w!]/g),ct=T(/<[/\w]/g),lt=T(/<\/no(script|embed|frames)/i),ut=T(/\/>/i),N={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},dt=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],ft=w(A({},dt)),pt=function(){let e={};return ve(dt,t=>{e[t]=T(RegExp(`])`,`i`))}),w(e)}(),mt=function(){return typeof window>`u`?null:window},ht=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},gt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},_t=function(e,t,n,r){return D(e,t)&&Ce(e[t])?A(r.base?j(r.base):{},e[t],r.transform):n},vt=function(e,t,n){let r=D(e,t)?e[t]:void 0;return r&&typeof r==`object`?j(r):n()};function yt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mt(),t=e=>yt(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==N.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=M(d,`cloneNode`),p=M(d,`remove`),m=M(d,`removeAttributeNode`),ee=M(d,`nextSibling`),h=M(d,`childNodes`),g=M(d,`parentNode`),te=M(d,`shadowRoot`),_=M(d,`attributes`),v=o&&o.prototype?M(o.prototype,`nodeType`):null,y=o&&o.prototype?M(o.prototype,`nodeName`):null,b=o&&o.prototype?M(o.prototype,`ownerDocument`):null,x=function(e){return v?v(e):e.nodeType},ne=function(e){return y?y(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let S,C=``,re,ie=!1,ae=0,oe=function(){if(ae>0)throw Fe(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},se=function(e){oe(),ae++;try{return S.createHTML(e)}finally{ae--}},ce=function(e){oe(),ae++;try{return S.createScriptURL(e)}finally{ae--}},le=function(){return ie||=(re=ht(u,i),!0),re},de=n,fe=de.implementation,pe=de.createNodeIterator,me=de.createDocumentFragment,ge=de.getElementsByTagName,_e=r.importNode,E=gt();t.isSupported=typeof ue==`function`&&typeof g==`function`&&fe&&fe.createHTMLDocument!==void 0;let Ae=Ze,je=Qe,Me=$e,Ne=et,Pe=tt,k=rt,Ie=it,Le=ot,dt=nt,P=null,bt=A({},[...Be,...Ve,...He,...We,...Ke]),F=null,I=A({},[...qe,...Je,...Ye,...Xe]),L=Object.seal(he(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),R=null,xt=null,z=Object.seal(he(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),St=!0,Ct=!0,wt=!1,Tt=!0,B=!1,V=!0,Et=!1,Dt=!1,Ot=null,kt=null,At=!1,jt=!1,Mt=!1,Nt=!1,Pt=!0,Ft=!1,It=`user-content-`,Lt=!0,Rt=!1,H={},U=null,zt=A({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Bt=null,Vt=A({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ht=null,Ut=A({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Wt=`http://www.w3.org/1998/Math/MathML`,Gt=`http://www.w3.org/2000/svg`,W=`http://www.w3.org/1999/xhtml`,G=W,Kt=!1,K=null,qt=A({},[Wt,Gt,W],Te),q=w([`mi`,`mo`,`mn`,`ms`,`mtext`]),Jt=A({},q),Yt=w([`annotation-xml`]),Xt=A({},Yt),Zt=A({},[`title`,`style`,`font`,`a`,`script`]),Qt=null,$t=[`application/xhtml+xml`,`text/html`],J=null,Y=null,en=n.createElement(`form`),tn=function(e){return e instanceof RegExp||e instanceof Function},nn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Y&&Y===e)return;(!e||typeof e!=`object`)&&(e={}),e=j(e),Qt=$t.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,J=Qt===`application/xhtml+xml`?Te:we,P=_t(e,`ALLOWED_TAGS`,bt,{transform:J}),F=_t(e,`ALLOWED_ATTR`,I,{transform:J}),K=_t(e,`ALLOWED_NAMESPACES`,qt,{transform:Te}),Ht=_t(e,`ADD_URI_SAFE_ATTR`,Ut,{transform:J,base:Ut}),Bt=_t(e,`ADD_DATA_URI_TAGS`,Vt,{transform:J,base:Vt}),U=_t(e,`FORBID_CONTENTS`,zt,{transform:J}),R=_t(e,`FORBID_TAGS`,j({}),{transform:J}),xt=_t(e,`FORBID_ATTR`,j({}),{transform:J}),H=D(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?j(e.USE_PROFILES):e.USE_PROFILES:!1,St=e.ALLOW_ARIA_ATTR!==!1,Ct=e.ALLOW_DATA_ATTR!==!1,wt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Tt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,B=e.SAFE_FOR_TEMPLATES||!1,V=e.SAFE_FOR_XML!==!1,Et=e.WHOLE_DOCUMENT||!1,jt=e.RETURN_DOM||!1,Mt=e.RETURN_DOM_FRAGMENT||!1,Nt=e.RETURN_TRUSTED_TYPE||!1,At=e.FORCE_BODY||!1,Pt=e.SANITIZE_DOM!==!1,Ft=e.SANITIZE_NAMED_PROPS||!1,Lt=e.KEEP_CONTENT!==!1,Rt=e.IN_PLACE||!1,dt=ze(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:nt,G=typeof e.NAMESPACE==`string`?e.NAMESPACE:W,Jt=vt(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>A({},q)),Xt=vt(e,`HTML_INTEGRATION_POINTS`,()=>A({},Yt));let t=vt(e,`CUSTOM_ELEMENT_HANDLING`,()=>he(null));if(L=he(null),D(t,`tagNameCheck`)&&tn(t.tagNameCheck)&&(L.tagNameCheck=t.tagNameCheck),D(t,`attributeNameCheck`)&&tn(t.attributeNameCheck)&&(L.attributeNameCheck=t.attributeNameCheck),D(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(L.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),T(L),B&&(Ct=!1),Mt&&(jt=!0),H&&(P=A({},Ke),F=he(null),H.html===!0&&(A(P,Be),A(F,qe)),H.svg===!0&&(A(P,Ve),A(F,Je),A(F,Xe)),H.svgFilters===!0&&(A(P,He),A(F,Je),A(F,Xe)),H.mathMl===!0&&(A(P,We),A(F,Ye),A(F,Xe))),z.tagCheck=null,z.attributeCheck=null,D(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?z.tagCheck=e.ADD_TAGS:Ce(e.ADD_TAGS)&&(P===bt&&(P=j(P)),A(P,e.ADD_TAGS,J))),D(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?z.attributeCheck=e.ADD_ATTR:Ce(e.ADD_ATTR)&&(F===I&&(F=j(F)),A(F,e.ADD_ATTR,J))),D(e,`ADD_FORBID_CONTENTS`)&&Ce(e.ADD_FORBID_CONTENTS)&&(U===zt&&(U=j(U)),A(U,e.ADD_FORBID_CONTENTS,J)),Lt&&(P[`#text`]=!0),Et&&A(P,[`html`,`head`,`body`]),P.table&&(A(P,[`tbody`]),delete R.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Fe(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Fe(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=S;S=e.TRUSTED_TYPES_POLICY;try{C=se(``)}catch(e){throw S=t,e}}else e.TRUSTED_TYPES_POLICY===null?(S=void 0,C=``):(S===void 0&&(S=le()),S&&typeof C==`string`&&(C=se(``)));w&&w(e),Y=e},rn=A({},[...Ve,...He,...Ue]),an=A({},[...We,...Ge]),on=function(e,t,n){return t.namespaceURI===W?e===`svg`:t.namespaceURI===Wt?e===`svg`&&(n===`annotation-xml`||Jt[n]):!!rn[e]},sn=function(e,t,n){return t.namespaceURI===W?e===`math`:t.namespaceURI===Gt?e===`math`&&Xt[n]:!!an[e]},cn=function(e,t,n){return t.namespaceURI===Gt&&!Xt[n]||t.namespaceURI===Wt&&!Jt[n]?!1:!an[e]&&(Zt[e]||!rn[e])},ln=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:G,tagName:`template`});let n=we(e.tagName),r=we(t.tagName);return K[e.namespaceURI]?e.namespaceURI===Gt?on(n,t,r):e.namespaceURI===Wt?sn(n,t,r):e.namespaceURI===W?cn(n,t,r):!!(Qt===`application/xhtml+xml`&&K[e.namespaceURI]):!1},X=function(e){xe(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw Fe(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},un=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},dn=function(e){pn(e);let t=h(e);if(t){let e=[];ve(t,t=>{xe(e,t)}),ve(e,e=>{try{p(e)}catch{}})}let n=_(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&un(e,r,i)}},Z=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}xe(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(jt||Mt)try{X(n)}catch{}else try{n.setAttribute(e,``)}catch{}},fn=function(e){let t=_(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||F[J(i)]||un(e,r,i)}},pn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();x(e)===N.element&&fn(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},mn=function(e,t){return V?e===`patchsrc`?!0:e===`for`&&t!==`label`&&t!==`output`:!1},hn=function(e){if(!V)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=x(e);if(n===N.processingInstruction||n===N.comment&&O(ct,e.data)){try{p(e)}catch{}continue}if(n===N.element){let t=e,n=J(ne(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&mn(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=h(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},gn=function(e){let t=null,r=null;if(At)e=``+e;else{let t=Ee(e,/^[\r\n\t ]+/);r=t&&t[0]}Qt===`application/xhtml+xml`&&G===W&&(e=``+e+``);let i=S?se(e):e;if(G===W)try{t=new l().parseFromString(i,Qt)}catch{}if(!t||!t.documentElement){t=fe.createDocument(G,`template`,null);try{t.documentElement.innerHTML=Kt?C:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),G===W?ge.call(t,Et?`html`:`body`)[0]:Et?t.documentElement:a},Q=function(e){let t=b?b(e):e.ownerDocument;return pe.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},_n=function(e){return e=De(e,Ae,` `),e=De(e,je,` `),e=De(e,Me,` `),e},vn=function(e){e.normalize();let t=b?b(e):e.ownerDocument,n=pe.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=_n(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&ve(i,e=>{bn(e.content)&&vn(e.content)})},yn=function(e){let t=y?y(e):null;return typeof t!=`string`||J(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==_(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==v(e)||e.childNodes!==h(e)},bn=function(e){if(!v||typeof e!=`object`||!e)return!1;try{return v(e)===N.documentFragment}catch{return!1}},xn=function(e){if(!v||typeof e!=`object`||!e)return!1;try{return typeof v(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&ve(e,e=>{e.call(t,n,r,Y)})}let Sn=function(e,t){return!!(V&&e.hasChildNodes()&&!xn(e.firstElementChild)&&O(st,e.textContent)&&O(st,e.innerHTML)||V&&e.namespaceURI===W&&ft[t]&&(xn(e.firstElementChild)||typeof e.textContent==`string`&&O(pt[t],e.textContent))||e.nodeType===N.processingInstruction||V&&e.nodeType===N.comment&&O(ct,e.data))},Cn=function(e,t){return e instanceof RegExp?O(e,t):e instanceof Function?!!e(t,...[...arguments].slice(2)):!1},wn=function(e,t,n){if(!R[t]&&An(t)&&Cn(L.tagNameCheck,t))return!1;if(Lt&&!U[t]){let t=g(e),r=h(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,ee(e))}}}return X(e),!0},Tn=function(e,t,n,r){return e.length===0?t:t===n||t===r?j(t):t},En=function(e,t){return e===t||g(e)!==null?!1:(Rt&&pn(e),!0)},Dn=function(e,n){if($(E.beforeSanitizeElements,e,null),En(e,n))return!0;if(yn(e))return X(e),!0;let r=J(ne(e));if(P=Tn(E.uponSanitizeElement,P,bt,Ot),$(E.uponSanitizeElement,e,{tagName:r,allowedTags:P}),En(e,n))return!0;if(Sn(e,r))return X(e),!0;if(R[r]||!(z.tagCheck instanceof Function&&z.tagCheck(r))&&!P[r]){let t=wn(e,r,n);return t===!1&&($(E.afterSanitizeElements,e,null),En(e,n))?!0:t}if(x(e)===N.element&&!ln(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&O(lt,e.innerHTML))return X(e),!0;if(B&&e.nodeType===N.text){let n=_n(e.textContent);e.textContent!==n&&(xe(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(E.afterSanitizeElements,e,null),En(e,n)},On=function(e,t,r){if(xt[t]||mn(t,e)||Pt&&(t===`id`||t===`name`)&&(r in n||r in en))return!1;let i=F[t]||z.attributeCheck instanceof Function&&z.attributeCheck(t,e);return Ct&&O(Ne,t)||St&&O(Pe,t)?!0:i?Ht[t]||O(dt,De(r,Ie,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Oe(r,`data:`)===0&&Bt[e]||wt&&!O(k,De(r,Ie,``))?!0:!r:An(e)&&Cn(L.tagNameCheck,e)&&Cn(L.attributeNameCheck,t,e)||t===`is`&&L.allowCustomizedBuiltInElements&&Cn(L.tagNameCheck,r)},kn=A({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),An=function(e){return!kn[we(e)]&&O(Le,e)},jn=function(e,t,n,r){if(S&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return se(r);case`TrustedScriptURL`:return ce(r)}return r},Mn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),yn(e)?(X(e),!1):!0}catch{return Z(t,e),!1}},Nn=function(e,n){if($(E.beforeSanitizeAttributes,e,null),En(e,n))return;let r=e.attributes;if(!r||yn(e))return;F=Tn(E.uponSanitizeAttribute,F,I,kt);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0},a=r.length,o=J(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=J(s),d=l,f=s===`value`?d:ke(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,$(E.uponSanitizeAttribute,e,i),f=i.attrValue,Ft&&(u===`id`||u===`name`)&&Oe(f,It)!==0&&(Z(s,e,n),f=It+f,p=!0),V&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Z(s,e,n);continue}if(u===`attributename`&&Ee(f,`href`)){Z(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){Z(s,e,n);continue}if(!Tt&&O(ut,f)){Z(s,e,n);continue}if(B&&(f=_n(f)),!On(o,u,f)){Z(s,e,n);continue}f=jn(o,u,c,f),f!==d&&Mn(e,s,c,f)&&p&&be(t.removed)}}$(E.afterSanitizeAttributes,e,null),En(e,n)},Pn=function(e){let t=null,n=Q(e);for($(E.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(E.uponSanitizeShadowNode,t,null),Dn(t,e),Nn(t,e),bn(t.content)&&Pn(t.content),x(t)===N.element){let e=te(t);bn(e)&&(Fn(e),Pn(e))}$(E.afterSanitizeShadowDOM,e,null)},Fn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Pn(e.shadow);continue}let n=e.node,r=x(n)===N.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=y?y(n):null;if(typeof e==`string`&&J(e)===`template`){let e=n.content;bn(e)&&t.push({node:e,shadow:null})}}if(r){let e=te(n);bn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Kt=!e,Kt&&(e=``),typeof e!=`string`&&!xn(e)&&(e=Re(e),typeof e!=`string`))throw Fe(`dirty is not a string, aborting`);if(!t.isSupported)return e;Dt?(P=Ot,F=kt):nn(n),(E.uponSanitizeElement.length>0||E.uponSanitizeAttribute.length>0)&&(P=j(P)),E.uponSanitizeAttribute.length>0&&(F=j(F)),t.removed=[];let c=Rt&&typeof e!=`string`&&xn(e);if(c){hn(e);let t=ne(e);if(typeof t==`string`){let n=J(t);if(!P[n]||R[n])throw dn(e),Fe(`root node is forbidden and cannot be sanitized in-place`)}if(yn(e))throw dn(e),Fe(`root node is clobbered and cannot be sanitized in-place`);try{Fn(e)}catch(t){throw dn(e),t}}else if(xn(e))i=gn(``),a=i.ownerDocument.importNode(e,!0),a.nodeType===N.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Fn(i);else{if(!jt&&!B&&!Et&&e.indexOf(`<`)===-1)return S&&Nt?se(e):e;if(i=gn(e),!i)return jt?null:Nt?C:``}i&&At&&X(i.firstChild);let l=c?e:i;try{let e=Q(l);for(;o=e.nextNode();)Dn(o,l),Nn(o,l),bn(o.content)&&Pn(o.content)}catch(n){throw c&&(dn(e),ve(t.removed,e=>{e.element&&pn(e.element)})),n}if(c){let n=!1;if(ve(t.removed,t=>{t.element&&(t.element===e&&(n=!0),pn(t.element))}),n)throw Fe(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return B&&vn(e),e}if(jt){if(B&&vn(i),Mt)for(s=me.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(F.shadowroot||F.shadowrootmode)&&(s=_e.call(r,s,!0)),s}let u=Et?i.outerHTML:i.innerHTML;return Et&&P[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&O(at,i.ownerDocument.doctype.name)&&(u=` +`+u),B&&(u=_n(u)),S&&Nt?se(u):u},t.setConfig=function(){nn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Dt=!0,Ot=P,kt=F},t.clearConfig=function(){Y=null,Dt=!1,Ot=null,kt=null,S=re,C=``},t.isValidAttribute=function(e,t,n){return Y||nn({}),On(J(e),J(t),n)},t.addHook=function(e,t){typeof t==`function`&&D(E,e)&&xe(E[e],t)},t.removeHook=function(e,t){if(D(E,e)){if(t!==void 0){let n=ye(E[e],t);return n===-1?void 0:Se(E[e],n,1)[0]}return be(E[e])}},t.removeHooks=function(e){D(E,e)&&(E[e]=[])},t.removeAllHooks=function(){E=gt()},t}var P=yt(),bt=n((e,t,{depth:n=2}={})=>{let r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(t=>bt(e,t,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.includes(t)||e.push(t)}),e;if(e==null||n<=0)return typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t;if(t!=null&&typeof e==`object`&&typeof t==`object`){let r=e;Object.entries(t).forEach(([t,i])=>{if(typeof i==`object`){if(i===null)return;Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),r[t]===void 0&&(r[t]=Array.isArray(i)?[]:{}),typeof r[t]==`object`&&(r[t]=bt(r[t],i,{depth:n-1}))}else typeof r[t]!=`object`&&(Object.hasOwn(e,t)?r[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))})}return e},`assignWithDepth`),F=bt,I=`#ffffff`,L=`#f2f2f2`,R=n((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),`mkBorder`),xt=class{static{n(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||y(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||`navy`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||b(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||b(this.mainBkg,10)):(this.rowOdd=this.rowOdd||y(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||y(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},z=n(e=>{let t=new xt;return t.calculate(e),t},`getThemeVariables`),St=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=y(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=y(S(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=h(255,255,255,.25),this.arrowheadColor=`calculated`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#F9FFFE`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`calculated`,this.activationBkgColor=`calculated`,this.sequenceNumberColor=`black`,this.clusterBkg=`#302F3D`,this.sectionBkgColor=b(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=b(this.sectionBkgColor,10),this.taskBorderColor=h(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=h(255,255,255,50),this.activeTaskBkgColor=`#81B1DB`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#E83737`,this.critBkgColor=`#E83737`,this.taskTextDarkColor=`calculated`,this.todayLineColor=`#DB5757`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||y(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||b(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){this.secondBkg=y(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=y(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=y(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=S(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#555`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#f4f4f4`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||`#0b0000`,this.cScale2=this.cScale2||`#4d1037`,this.cScale3=this.cScale3||`#3f5258`,this.cScale4=this.cScale4||`#4f2f1b`,this.cScale5=this.cScale5||`#6e0a0a`,this.cScale6=this.cScale6||`#3b0048`,this.cScale7=this.cScale7||`#995a01`,this.cScale8=this.cScale8||`#154706`,this.cScale9=this.cScale9||`#161722`,this.cScale10=this.cScale10||`#00296f`,this.cScale11=this.cScale11||`#01629c`,this.cScale12=this.cScale12||`#010029`,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Ct=n(e=>{let t=new St;return t.calculate(e),t},`getThemeVariables`),wt=class{static{n(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=`calculated`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBorderColor=`calculated`,this.critBkgColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.sectionBkgColor=h(102,102,255,.49),this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#fff400`,this.taskBorderColor=`#534fbc`,this.taskBkgColor=`#8a90dd`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`#534fbc`,this.activeTaskBkgColor=`#bfc7ff`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||b(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||b(this.tertiaryColor,40);for(let e=0;e{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Tt=n(e=>{let t=new wt;return t.calculate(e),t},`getThemeVariables`),B=class{static{n(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=y(`#cde498`,10),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.primaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){this.actorBorder=b(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||b(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||b(this.tertiaryColor,40);for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},V=n(e=>{let t=new B;return t.calculate(e),t},`getThemeVariables`),Et=class{static{n(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=y(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.lineColor=S(this.background),this.textColor=S(this.background),this.mainBkg=`#eee`,this.secondBkg=`calculated`,this.lineColor=`#666`,this.border1=`#999`,this.border2=`calculated`,this.note=`#ffa`,this.text=`#333`,this.critical=`#d42`,this.done=`#bbb`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||y(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){this.secondBkg=y(this.contrast,55),this.border2=this.contrast,this.actorBorder=y(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=`#999`,this.noteBkgColor=`#666`,this.noteTextColor=`#fff`,this.cScale0=this.cScale0||`#555`,this.cScale1=this.cScale1||`#F4F4F4`,this.cScale2=this.cScale2||`#555`,this.cScale3=this.cScale3||`#BBB`,this.cScale4=this.cScale4||`#777`,this.cScale5=this.cScale5||`#999`,this.cScale6=this.cScale6||`#DDD`,this.cScale7=this.cScale7||`#FFF`,this.cScale8=this.cScale8||`#DDD`,this.cScale9=this.cScale9||`#BBB`,this.cScale10=this.cScale10||`#999`,this.cScale11=this.cScale11||`#777`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Dt=n(e=>{let t=new Et;return t.calculate(e),t},`getThemeVariables`),Ot=class{static{n(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=x(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||y(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||x(e,{h:30}),this.cScale4=this.cScale4||x(e,{h:60}),this.cScale5=this.cScale5||x(e,{h:90}),this.cScale6=this.cScale6||x(e,{h:120}),this.cScale7=this.cScale7||x(e,{h:150}),this.cScale8=this.cScale8||x(e,{h:210,l:150}),this.cScale9=this.cScale9||x(e,{h:270}),this.cScale10=this.cScale10||x(e,{h:300}),this.cScale11=this.cScale11||x(e,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},kt=n(e=>{let t=new Ot;return t.calculate(e),t},`getThemeVariables`),At=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=y(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=y(S(`#323D47`),10),this.border1=`#ccc`,this.border2=h(255,255,255,.25),this.arrowheadColor=S(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||y(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},jt=n(e=>{let t=new At;return t.calculate(e),t},`getThemeVariables`),Mt=class{static{n(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=R(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||y(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Nt=n(e=>{let t=new Mt;return t.calculate(e),t},`getThemeVariables`),Pt=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=y(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=y(S(`#323D47`),10),this.border1=`#ccc`,this.border2=h(255,255,255,.25),this.arrowheadColor=S(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||y(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Ft=n(e=>{let t=new Pt;return t.calculate(e),t},`getThemeVariables`),It=class{static{n(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||y(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Lt=n(e=>{let t=new It;return t.calculate(e),t},`getThemeVariables`),Rt=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=y(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=S(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=S(this.primaryColor),this.secondaryTextColor=S(this.secondaryColor),this.tertiaryTextColor=S(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=y(S(`#323D47`),10),this.border1=`#ccc`,this.border2=h(255,255,255,.25),this.arrowheadColor=S(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||S(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||S(this.tertiaryColor),this.lineColor=this.lineColor||S(this.background),this.arrowheadColor=this.arrowheadColor||S(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||S(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor=`#FFFFFF`,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||y(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},H={base:{getThemeVariables:z},dark:{getThemeVariables:Ct},default:{getThemeVariables:Tt},forest:{getThemeVariables:V},neutral:{getThemeVariables:Dt},neo:{getThemeVariables:kt},"neo-dark":{getThemeVariables:jt},redux:{getThemeVariables:Nt},"redux-dark":{getThemeVariables:Ft},"redux-color":{getThemeVariables:Lt},"redux-dark-color":{getThemeVariables:n(e=>{let t=new Rt;return t.calculate(e),t},`getThemeVariables`)}},U={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:`arc`,ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:`"Open Sans", sans-serif`,actorFontWeight:400,noteFontSize:14,noteFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,noteFontWeight:400,noteAlign:`center`,messageFontSize:16,messageFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:`%Y-%m-%d`,topAxis:!1,displayMode:``,weekday:`sunday`},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:`20`,compositTitleSize:35,radius:5,defaultRenderer:`dagre-wrapper`},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:`TB`,minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:`right`,highlightSlice:``},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:``,filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},zt={...U,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,nodePlacementAlignment:`NONE`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`,keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:H.default.getThemeVariables(),sequence:{...U.sequence,messageFont:n(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:n(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:n(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{defaultRenderer:`dagre-wrapper`,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...U.gantt,tickInterval:void 0,useWidth:void 0},c4:{...U.c4,useWidth:void 0,personFont:n(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...U.flowchart,inheritDir:!1},external_personFont:n(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:n(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:n(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:n(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:n(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:n(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:n(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:n(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:n(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:n(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:n(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:n(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:n(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:n(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:n(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:n(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:n(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:n(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:n(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:n(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:n(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...U.pie,useWidth:984},xyChart:{...U.xyChart,useWidth:void 0},requirement:{...U.requirement,useWidth:void 0},packet:{...U.packet},eventmodeling:{...U.eventmodeling},treeView:{...U.treeView,useWidth:void 0},radar:{...U.radar},railroad:{...U.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...U.ishikawa},sankey:{...U.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...U.venn},cynefin:{...U.cynefin}},Bt=n((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...Bt(e[r],``)]:[...n,t+r],[]),`keyify`),Vt=new Set(Bt(zt,``)),Ht=zt,Ut={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Wt=n((e,n)=>{for(let r of Object.keys(e)){let i=e[r];(r.startsWith(`__`)||r.includes(`proto`)||r.includes(`constr`)||typeof i!=`string`||!n.test(i))&&(t.debug(`sanitize deleting dictionary entry:`,r,i),delete e[r])}},`sanitizeDictionaryConfig`),Gt=n(e=>{if(t.debug(`sanitizeDirective called with`,e),!(typeof e!=`object`||!e)){if(Array.isArray(e)){e.forEach(e=>Gt(e));return}for(let n of Object.keys(e)){if(t.debug(`Checking key`,n),n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||!Vt.has(n)||e[n]==null){t.debug(`sanitize deleting key: `,n),delete e[n];continue}if(typeof e[n]==`object`){let r=Ut[n];r?Wt(e[n],r):(t.debug(`sanitizing object`,n),Gt(e[n]));continue}for(let r of[`themeCSS`,`fontFamily`,`altFontFamily`])n.includes(r)&&(t.debug(`sanitizing css option`,n),e[n]=W(e[n]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}t.debug(`After sanitization`,e)}},`sanitizeDirective`),W=n(e=>{let t=0,n=0;for(let r of e){if(t!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),K=F({},G),qt,q=[],Jt=F({},G),Yt=n((e,t)=>{let n=F({},e),r={};for(let e of t)en(e),r=F(r,e);if(n=F(n,r),r.theme&&r.theme in H){let e=F(F({},qt).themeVariables||{},r.themeVariables);n.theme&&n.theme in H&&(n.themeVariables=H[n.theme].getThemeVariables(e))}return Jt=n,sn(Jt),Jt},`updateCurrentConfig`),Xt=n(e=>(K=F({},G),K=F(K,e),e.theme&&H[e.theme]&&(K.themeVariables=H[e.theme].getThemeVariables(e.themeVariables)),Yt(K,q),K),`setSiteConfig`),Zt=n(e=>{qt=F({},e)},`saveConfigFromInitialize`),Qt=n(e=>(K=F(K,e),Yt(K,q),K),`updateSiteConfig`),$t=n(()=>F({},K),`getSiteConfig`),J=n(e=>(Yt(Jt,[e]),Y()),`setConfig`),Y=n(()=>F({},Jt),`getConfig`),en=n(e=>{e&&([`secure`,...K.secure??[]].forEach(n=>{Object.hasOwn(e,n)&&(t.debug(`Denied attempt to modify a secure key ${n}`,e[n]),delete e[n])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&en(e[t])}))},`sanitize`),tn=n(e=>{Gt(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),q.push(e),Yt(K,q)},`addDirective`),nn=n((e=K)=>{q=[],Yt(e,q)},`reset`),rn={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},an={},on=n(e=>{an[e]||(t.warn(rn[e]),an[e]=!0)},`issueWarning`),sn=n(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&on(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),cn=n(()=>{let e={};qt&&(e=F(e,qt));for(let t of q)e=F(e,t);return e},`getUserDefinedConfig`),ln=n(e=>(e.flowchart?.htmlLabels!=null&&on(`FLOWCHART_HTML_LABELS_DEPRECATED`),Kt(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),X=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,un=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,dn=/\s*%%.*\n/gm,Z=class extends Error{static{n(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},fn={},pn=n(function(e,t){e=e.replace(X,``).replace(un,``).replace(dn,` +`);for(let[n,{detector:r}]of Object.entries(fn))if(r(e,t))return n;throw new Z(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),mn=n((...e)=>{for(let{id:t,detector:n,loader:r}of e)hn(t,n,r)},`registerLazyLoadedDiagrams`),hn=n((e,n,r)=>{fn[e]&&t.warn(`Detector with key ${e} already exists. Overwriting.`),fn[e]={detector:n,loader:r},t.debug(`Detector with key ${e} added${r?` with loader`:``}`)},`addDetector`),gn=n(e=>fn[e].loader,`getDiagramLoader`),Q=//gi,_n=n(e=>e?En(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),vn=(()=>{let e=!1;return()=>{e||=(yn(),!0)}})();function yn(){let e=`data-temp-href-target`;P.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),P.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}n(yn,`setupDompurifyHooks`);var bn=n(e=>(vn(),P.sanitize(e)),`removeScript`),xn=n((e,t)=>{if(ln(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=bn(e):n!==`loose`&&(e=En(e),e=e.replace(//g,`>`),e=e.replace(/=/g,`=`),e=Tn(e))}return e},`sanitizeMore`),$=n((e,t)=>e&&(e=t.dompurifyConfig?P.sanitize(xn(e,t),t.dompurifyConfig).toString():P.sanitize(xn(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),Sn=n((e,t)=>typeof e==`string`?$(e,t):e.flat().map(e=>$(e,t)),`sanitizeTextOrArray`),Cn=n(e=>Q.test(e),`hasBreaks`),wn=n(e=>e.split(Q),`splitBreaks`),Tn=n(e=>e.replace(/#br#/g,`
`),`placeholderToBreak`),En=n(e=>e.replace(Q,`#br#`),`breakToPlaceholder`),Dn=n(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),On=n(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),kn=n(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),An=n(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e0&&e+1Math.max(0,e.split(t).length-1),`countOccurrence`),Mn=n((e,t)=>{let n=jn(e,`~`),r=jn(t,`~`);return n===1&&r===1},`shouldCombineSets`),Nn=n(e=>{let t=jn(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),Pn=n(()=>window.MathMLElement!==void 0,`isMathMLSupported`),Fn=/\$\$(.*?)\$\$/g,In=n(e=>(e.match(Fn)?.length??0)>0,`hasKatex`),Ln=n(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await zn(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),Rn=n(async(e,t)=>{if(!In(e))return e;if(!(Pn()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Fn,`MathML is unsupported in this environment.`);{let{default:n}=await import(`./katex-Vhh-h91d.js`),r=t.forceLegacyMathML||!Pn()&&t.legacyMathML?`htmlAndMathml`:`mathml`;return e.split(Q).map(e=>In(e)?`
${e}
`:`
${e}
`).join(``).replace(Fn,(e,t)=>n.renderToString(t,{throwOnError:!0,displayMode:!0,output:r}).replace(/\n/g,` `).replace(//g,``))}return e.replace(Fn,`Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.`)},`renderKatexUnsanitized`),zn=n(async(e,t)=>$(await Rn(e,t),t),`renderKatexSanitized`),Bn={getRows:_n,sanitizeText:$,sanitizeTextOrArray:Sn,hasBreaks:Cn,splitBreaks:wn,lineBreakRegex:Q,removeScript:bn,getUrl:Dn,evaluate:Kt,getMax:On,getMin:kn},Vn=n(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),Hn=n(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),Un=n(function(e,t,n,r){Vn(e,Hn(t,n,r))},`configureSvgSize`),Wn=n(function(e,n,r,i){let a=n.node().getBBox(),o=a.width,s=a.height;t.info(`SVG bounds: ${o}x${s}`,a);let c=0,l=0;t.info(`Graph bounds: ${c}x${l}`,e),c=o+r*2,l=s+r*2,t.info(`Calculated bounds: ${c}x${l}`),Un(n,l,c,i);let u=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;n.attr(`viewBox`,u)},`setupGraphViewbox`),Gn={};function Kn(e){return[...e.cssRules].map(e=>e.cssText).join(` +`)}n(Kn,`cssStyleSheetToString`);var qn=n((e,n,r,i)=>{let a=``;return e in Gn&&Gn[e]?a=Gn[e]({...r,svgId:i}):t.warn(`No theme found for ${e}`),`& { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + @keyframes edge-animation-frame { + from { + stroke-dashoffset: 0; + } + } + @keyframes dash { + to { + stroke-dashoffset: 0; + } + } + & .edge-animation-slow { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 50s linear infinite; + stroke-linecap: round; + } + & .edge-animation-fast { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 20s linear infinite; + stroke-linecap: round; + } + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: ${r.strokeWidth??1}px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${a} + .node .neo-node { + stroke: ${r.nodeBorder}; + } + + [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { + stroke: ${r.useGradient?`url(`+i+`-gradient)`:r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace(`url(#drop-shadow)`,`url(${i}-drop-shadow)`):`none`}; + } + [data-look="neo"].swimlane.cluster rect { + filter: none; + } + + + [data-look="neo"].node path { + stroke: ${r.useGradient?`url(`+i+`-gradient)`:r.nodeBorder}; + stroke-width: ${r.strokeWidth??1}px; + } + + [data-look="neo"].node .outer-path { + filter: ${r.dropShadow?r.dropShadow.replace(`url(#drop-shadow)`,`url(${i}-drop-shadow)`):`none`}; + } + + [data-look="neo"].node .neo-line path { + stroke: ${r.nodeBorder}; + filter: none; + } + + [data-look="neo"].node circle{ + stroke: ${r.useGradient?`url(`+i+`-gradient)`:r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace(`url(#drop-shadow)`,`url(${i}-drop-shadow)`):`none`}; + } + + [data-look="neo"].node circle .state-start{ + fill: #000000; + } + + [data-look="neo"].icon-shape .icon { + fill: ${r.useGradient?`url(`+i+`-gradient)`:r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace(`url(#drop-shadow)`,`url(${i}-drop-shadow)`):`none`}; + } + + [data-look="neo"].icon-shape .icon-neo path { + stroke: ${r.useGradient?`url(`+i+`-gradient)`:r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace(`url(#drop-shadow)`,`url(${i}-drop-shadow)`):`none`}; + } + + ${n} +`},`getStyles`),Jn=n((e,t)=>{t!==void 0&&(Gn[e]=t)},`addStylesForDiagram`),Yn=qn,Xn={};r(Xn,{clear:()=>tr,getAccDescription:()=>ar,getAccTitle:()=>rr,getDiagramTitle:()=>sr,setAccDescription:()=>ir,setAccTitle:()=>nr,setDiagramTitle:()=>or});var Zn=``,Qn=``,$n=``,er=n(e=>$(e,Y()),`sanitizeText`),tr=n(()=>{Zn=``,$n=``,Qn=``},`clear`),nr=n(e=>{Zn=er(e).replace(/^\s+/g,``)},`setAccTitle`),rr=n(()=>Zn,`getAccTitle`),ir=n(e=>{$n=er(e).replace(/\n\s+/g,` +`)},`setAccDescription`),ar=n(()=>$n,`getAccDescription`),or=n(e=>{Qn=er(e)},`setDiagramTitle`),sr=n(()=>Qn,`getDiagramTitle`),cr=t,lr=e,ur=Y,dr=J,fr=G,pr=n(e=>$(e,ur()),`sanitizeText`),mr=Wn,hr=n(()=>Xn,`getCommonDb`),gr={},_r=n((e,t,n)=>{gr[e]&&cr.warn(`Diagram with id ${e} already registered. Overwriting.`),gr[e]=t,n&&hn(e,n),Jn(e,t.styles),t.injectUtils?.(cr,lr,ur,pr,mr,hr(),()=>{})},`registerDiagram`),vr=n(e=>{if(e in gr)return gr[e];throw new yr(e)},`getDiagram`),yr=class extends Error{static{n(this,`DiagramNotFoundError`)}constructor(e){super(`Diagram ${e} not found.`)}};export{P as $,In as A,pr as B,gn as C,Tt as D,$t as E,zn as F,dr as G,ir as H,nn as I,Wn as J,or as K,W as L,An as M,_r as N,Dn as O,mn as P,Qt as Q,Gt as R,vr as S,ln as T,nr as U,Zt as V,J as W,Yn as X,mr as Y,H as Z,X as _,tr as a,m as at,Y as b,Un as c,fr as d,b as et,Ht as f,Kt as g,un as h,Ln as i,h as it,Q as j,cn as k,Kn as l,fn as m,tn as n,v as nt,Xn as o,a as ot,pn as p,Xt as q,F as r,_ as rt,Bn as s,Z as t,y as tt,G as u,ar as v,sr as w,ur as x,rr as y,$ as z}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-CcF2nKWM.js b/apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-CcF2nKWM.js deleted file mode 100644 index 6387c2dca..000000000 --- a/apps/pythinker-code/dist-web/assets/chunk-DU6HZSFF-CcF2nKWM.js +++ /dev/null @@ -1,129 +0,0 @@ -import{h as e,m as t}from"./src-CDd1avoI.js";import{n,t as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let a=n<.5?n*(1+t):n+t-n*t,o=2*n-a;switch(r){case`r`:return i.hue2rgb(o,a,e+1/3)*255;case`g`:return i.hue2rgb(o,a,e)*255;case`b`:return i.hue2rgb(o,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(tt>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},unit:{dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},o={};for(let e=0;e<=255;e++)o[e]=a.unit.dec2hex(e);const s={ALL:0,RGB:1,HSL:2};var c=class{constructor(){this.type=s.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=s.ALL}is(e){return this.type===e}};const l=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new c}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=s.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=a.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=a.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=a.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=a.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=a.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=a.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(s.HSL)&&t!==void 0?t:(this._ensureHSL(),a.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(s.HSL)&&t!==void 0?t:(this._ensureHSL(),a.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(s.HSL)&&t!==void 0?t:(this._ensureHSL(),a.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(s.RGB)&&t!==void 0?t:(this._ensureRGB(),a.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(s.RGB)&&t!==void 0?t:(this._ensureRGB(),a.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(s.RGB)&&t!==void 0?t:(this._ensureRGB(),a.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(s.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(s.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(s.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(s.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(s.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(s.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),u={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(u.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,d=a?0:-1,f=o?255:15;return l.set({r:(r>>c*(d+3)&f)*s,g:(r>>c*(d+2)&f)*s,b:(r>>c*(d+1)&f)*s,a:a?(r&f)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${o[Math.round(t)]}${o[Math.round(n)]}${o[Math.round(r)]}${o[Math.round(i*255)]}`:`#${o[Math.round(t)]}${o[Math.round(n)]}${o[Math.round(r)]}`}},d={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(d.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return a.channel.clamp.h(parseFloat(e)*.9);case`rad`:return a.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return a.channel.clamp.h(parseFloat(e)*360)}}return a.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(d.re);if(!n)return;let[,r,i,o,s,c]=n;return l.set({h:d._hue2deg(r),s:a.channel.clamp.s(parseFloat(i)),l:a.channel.clamp.l(parseFloat(o)),a:s?a.channel.clamp.a(c?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${a.lang.round(t)}, ${a.lang.round(n)}%, ${a.lang.round(r)}%, ${i})`:`hsl(${a.lang.round(t)}, ${a.lang.round(n)}%, ${a.lang.round(r)}%)`}},f={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=f.colors[e];if(t)return u.parse(t)},stringify:e=>{let t=u.stringify(e);for(let e in f.colors)if(f.colors[e]===t)return e}},p={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(p.re);if(!n)return;let[,r,i,o,s,c,u,d,f]=n;return l.set({r:a.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:a.channel.clamp.g(s?parseFloat(o)*2.55:parseFloat(o)),b:a.channel.clamp.b(u?parseFloat(c)*2.55:parseFloat(c)),a:d?a.channel.clamp.a(f?parseFloat(d)/100:parseFloat(d)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${a.lang.round(t)}, ${a.lang.round(n)}, ${a.lang.round(r)}, ${a.lang.round(i)})`:`rgb(${a.lang.round(t)}, ${a.lang.round(n)}, ${a.lang.round(r)})`}},m={format:{keyword:f,hex:u,rgb:p,rgba:p,hsl:d,hsla:d},parse:e=>{if(typeof e!=`string`)return e;let t=u.parse(e)||p.parse(e)||d.parse(e)||f.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(s.HSL)||e.data.r===void 0?d.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?p.stringify(e):u.stringify(e)},h=(e,t)=>{let n=m.parse(e);for(let e in t)n[e]=a.channel.clamp[e](t[e]);return m.stringify(n)},g=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return h(e,{a:t});let i=l.set({r:a.channel.clamp.r(e),g:a.channel.clamp.g(t),b:a.channel.clamp.b(n),a:a.channel.clamp.a(r)});return m.stringify(i)},ee=e=>{let{r:t,g:n,b:r}=m.parse(e),i=.2126*a.channel.toLinear(t)+.7152*a.channel.toLinear(n)+.0722*a.channel.toLinear(r);return a.lang.round(i)},te=e=>ee(e)>=.5,_=e=>!te(e),v=(e,t,n)=>{let r=m.parse(e),i=r[t],o=a.channel.clamp[t](i+n);return i!==o&&(r[t]=o),m.stringify(r)},y=(e,t)=>v(e,`l`,t),b=(e,t)=>v(e,`l`,-t),x=(e,t)=>{let n=m.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return h(e,r)},S=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=m.parse(e),{r:s,g:c,b:l,a:u}=m.parse(t),d=n/100,f=d*2-1,p=o-u,h=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,ee=1-h;return g(r*h+s*ee,i*h+c*ee,a*h+l*ee,o*d+u*(1-d))},C=(e,t=100)=>{let n=m.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,S(n,e,t)}; -/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */ -function ne(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n`u`?null:k(BigInt.prototype.toString),je=typeof Symbol>`u`?null:k(Symbol.prototype.toString),D=k(Object.prototype.hasOwnProperty),Me=k(Object.prototype.toString),O=k(RegExp.prototype.test),Ne=Pe(TypeError);function k(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return he(e,t,n)}}function Pe(e){return function(){return ge(e,[...arguments])}}function A(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ce;if(le&&le(e,null),!Se(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ue(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Fe(e){for(let t=0;t/g),Ze=T(/\${[\w\W]*/g),Qe=T(/^data-[\-\w.\u00B7-\uFFFF]+$/),$e=T(/^aria-[\-\w]+$/),et=T(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tt=T(/^(?:\w+script|data):/i),nt=T(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),rt=T(/^html$/i),it=T(/^[a-z][.\w]*(-[.\w]+)+$/i),at=T(/<[/\w!]/g),ot=T(/<[/\w]/g),st=T(/<\/no(script|embed|frames)/i),ct=T(/\/>/i),N={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},lt=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],ut=w(A({},lt)),dt=function(){let e={};return _e(lt,t=>{e[t]=T(RegExp(`])`,`i`))}),w(e)}(),ft=function(){return typeof window>`u`?null:window},pt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},mt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ht=function(e,t,n,r){return D(e,t)&&Se(e[t])?A(r.base?j(r.base):{},e[t],r.transform):n},gt=function(e,t,n){let r=D(e,t)?e[t]:void 0;return r&&typeof r==`object`?j(r):n()};function _t(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ft(),t=e=>_t(e);if(t.version=`3.4.14`,t.removed=[],!e||!e.document||e.document.nodeType!==N.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=M(d,`cloneNode`),p=M(d,`remove`),m=M(d,`nextSibling`),h=M(d,`childNodes`),g=M(d,`parentNode`),ee=M(d,`shadowRoot`),te=M(d,`attributes`),_=o&&o.prototype?M(o.prototype,`nodeType`):null,v=o&&o.prototype?M(o.prototype,`nodeName`):null,y=o&&o.prototype?M(o.prototype,`ownerDocument`):null,b=function(e){return _?_(e):e.nodeType},x=function(e){return v?v(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let S,C=``,ne,re=!1,ie=0,ae=function(){if(ie>0)throw Ne(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},oe=function(e){ae(),ie++;try{return S.createHTML(e)}finally{ie--}},se=function(e){ae(),ie++;try{return S.createScriptURL(e)}finally{ie--}},le=function(){return re||=(ne=pt(u,i),!0),ne},ue=n,de=ue.implementation,fe=ue.createNodeIterator,me=ue.createDocumentFragment,he=ue.getElementsByTagName,ge=r.importNode,E=mt();t.isSupported=typeof ce==`function`&&typeof g==`function`&&de&&de.createHTMLDocument!==void 0;let ke=Ye,Ae=Xe,je=Ze,Me=Qe,k=$e,Pe=tt,Fe=nt,lt=it,vt=et,P=null,F=A({},[...Re,...ze,...Be,...He,...We]),I=null,L=A({},[...Ge,...Ke,...qe,...Je]),R=Object.seal(pe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),yt=null,bt=null,z=Object.seal(pe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),xt=!0,St=!0,Ct=!1,wt=!0,B=!1,Tt=!0,Et=!1,Dt=!1,Ot=null,kt=null,At=!1,jt=!1,Mt=!1,Nt=!1,Pt=!0,Ft=!1,It=`user-content-`,Lt=!0,V=!1,H={},U=null,Rt=A({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),zt=null,Bt=A({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Vt=null,Ht=A({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),W=`http://www.w3.org/1998/Math/MathML`,Ut=`http://www.w3.org/2000/svg`,G=`http://www.w3.org/1999/xhtml`,K=G,q=!1,Wt=null,Gt=A({},[W,Ut,G],we),Kt=w([`mi`,`mo`,`mn`,`ms`,`mtext`]),qt=A({},Kt),Jt=w([`annotation-xml`]),Yt=A({},Jt),Xt=A({},[`title`,`style`,`font`,`a`,`script`]),Zt=null,Qt=[`application/xhtml+xml`,`text/html`],J=null,$t=null,en=n.createElement(`form`),tn=function(e){return e instanceof RegExp||e instanceof Function},nn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if($t&&$t===e)return;(!e||typeof e!=`object`)&&(e={}),e=j(e),Zt=Qt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,J=Zt===`application/xhtml+xml`?we:Ce,P=ht(e,`ALLOWED_TAGS`,F,{transform:J}),I=ht(e,`ALLOWED_ATTR`,L,{transform:J}),Wt=ht(e,`ALLOWED_NAMESPACES`,Gt,{transform:we}),Vt=ht(e,`ADD_URI_SAFE_ATTR`,Ht,{transform:J,base:Ht}),zt=ht(e,`ADD_DATA_URI_TAGS`,Bt,{transform:J,base:Bt}),U=ht(e,`FORBID_CONTENTS`,Rt,{transform:J}),yt=ht(e,`FORBID_TAGS`,j({}),{transform:J}),bt=ht(e,`FORBID_ATTR`,j({}),{transform:J}),H=D(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?j(e.USE_PROFILES):e.USE_PROFILES:!1,xt=e.ALLOW_ARIA_ATTR!==!1,St=e.ALLOW_DATA_ATTR!==!1,Ct=e.ALLOW_UNKNOWN_PROTOCOLS||!1,wt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,B=e.SAFE_FOR_TEMPLATES||!1,Tt=e.SAFE_FOR_XML!==!1,Et=e.WHOLE_DOCUMENT||!1,jt=e.RETURN_DOM||!1,Mt=e.RETURN_DOM_FRAGMENT||!1,Nt=e.RETURN_TRUSTED_TYPE||!1,At=e.FORCE_BODY||!1,Pt=e.SANITIZE_DOM!==!1,Ft=e.SANITIZE_NAMED_PROPS||!1,Lt=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,vt=Le(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:et,K=typeof e.NAMESPACE==`string`?e.NAMESPACE:G,qt=gt(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>A({},Kt)),Yt=gt(e,`HTML_INTEGRATION_POINTS`,()=>A({},Jt));let t=gt(e,`CUSTOM_ELEMENT_HANDLING`,()=>pe(null));if(R=pe(null),D(t,`tagNameCheck`)&&tn(t.tagNameCheck)&&(R.tagNameCheck=t.tagNameCheck),D(t,`attributeNameCheck`)&&tn(t.attributeNameCheck)&&(R.attributeNameCheck=t.attributeNameCheck),D(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(R.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),T(R),B&&(St=!1),Mt&&(jt=!0),H&&(P=A({},We),I=pe(null),H.html===!0&&(A(P,Re),A(I,Ge)),H.svg===!0&&(A(P,ze),A(I,Ke),A(I,Je)),H.svgFilters===!0&&(A(P,Be),A(I,Ke),A(I,Je)),H.mathMl===!0&&(A(P,He),A(I,qe),A(I,Je))),z.tagCheck=null,z.attributeCheck=null,D(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?z.tagCheck=e.ADD_TAGS:Se(e.ADD_TAGS)&&(P===F&&(P=j(P)),A(P,e.ADD_TAGS,J))),D(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?z.attributeCheck=e.ADD_ATTR:Se(e.ADD_ATTR)&&(I===L&&(I=j(I)),A(I,e.ADD_ATTR,J))),D(e,`ADD_FORBID_CONTENTS`)&&Se(e.ADD_FORBID_CONTENTS)&&(U===Rt&&(U=j(U)),A(U,e.ADD_FORBID_CONTENTS,J)),Lt&&(P[`#text`]=!0),Et&&A(P,[`html`,`head`,`body`]),P.table&&(A(P,[`tbody`]),delete yt.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ne(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ne(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=S;S=e.TRUSTED_TYPES_POLICY;try{C=oe(``)}catch(e){throw S=t,e}}else e.TRUSTED_TYPES_POLICY===null?(S=void 0,C=``):(S===void 0&&(S=le()),S&&typeof C==`string`&&(C=oe(``)));w&&w(e),$t=e},rn=A({},[...ze,...Be,...Ve]),an=A({},[...He,...Ue]),on=function(e,t,n){return t.namespaceURI===G?e===`svg`:t.namespaceURI===W?e===`svg`&&(n===`annotation-xml`||qt[n]):!!rn[e]},sn=function(e,t,n){return t.namespaceURI===G?e===`math`:t.namespaceURI===Ut?e===`math`&&Yt[n]:!!an[e]},cn=function(e,t,n){return t.namespaceURI===Ut&&!Yt[n]||t.namespaceURI===W&&!qt[n]?!1:!an[e]&&(Xt[e]||!rn[e])},ln=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:K,tagName:`template`});let n=Ce(e.tagName),r=Ce(t.tagName);return Wt[e.namespaceURI]?e.namespaceURI===Ut?on(n,t,r):e.namespaceURI===W?sn(n,t,r):e.namespaceURI===G?cn(n,t,r):!!(Zt===`application/xhtml+xml`&&Wt[e.namespaceURI]):!1},Y=function(e){be(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw Ne(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},un=function(e,t,n){try{e.removeAttributeNode(t)}catch{try{e.removeAttribute(n)}catch{}}},dn=function(e){pn(e);let t=h(e);if(t){let e=[];_e(t,t=>{be(e,t)}),_e(e,e=>{try{p(e)}catch{}})}let n=te(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&un(e,r,i)}},X=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}be(t.removed,{attribute:r||null,from:n});try{r?n.removeAttributeNode(r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(jt||Mt)try{Y(n)}catch{}else try{n.setAttribute(e,``)}catch{}},fn=function(e){let t=te(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||I[J(i)]||un(e,r,i)}},pn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();b(e)===N.element&&fn(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},mn=function(e,t){return Tt?e===`patchsrc`?!0:e===`for`&&t!==`label`&&t!==`output`:!1},hn=function(e){if(!Tt)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=b(e);if(n===N.processingInstruction||n===N.comment&&O(ot,e.data)){try{p(e)}catch{}continue}if(n===N.element){let t=e,n=J(x(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&mn(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=h(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Z=function(e){let t=null,r=null;if(At)e=``+e;else{let t=Te(e,/^[\r\n\t ]+/);r=t&&t[0]}Zt===`application/xhtml+xml`&&K===G&&(e=``+e+``);let i=S?oe(e):e;if(K===G)try{t=new l().parseFromString(i,Zt)}catch{}if(!t||!t.documentElement){t=de.createDocument(K,`template`,null);try{t.documentElement.innerHTML=q?C:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),K===G?he.call(t,Et?`html`:`body`)[0]:Et?t.documentElement:a},gn=function(e){let t=y?y(e):e.ownerDocument;return fe.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},_n=function(e){return e=Ee(e,ke,` `),e=Ee(e,Ae,` `),e=Ee(e,je,` `),e},vn=function(e){e.normalize();let t=y?y(e):e.ownerDocument,n=fe.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=_n(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&_e(i,e=>{bn(e.content)&&vn(e.content)})},yn=function(e){let t=v?v(e):null;return typeof t!=`string`||J(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==te(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==_(e)||e.childNodes!==h(e)},bn=function(e){if(!_||typeof e!=`object`||!e)return!1;try{return _(e)===N.documentFragment}catch{return!1}},Q=function(e){if(!_||typeof e!=`object`||!e)return!1;try{return typeof _(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&_e(e,e=>{e.call(t,n,r,$t)})}let xn=function(e,t){return!!(Tt&&e.hasChildNodes()&&!Q(e.firstElementChild)&&O(at,e.textContent)&&O(at,e.innerHTML)||Tt&&e.namespaceURI===G&&ut[t]&&(Q(e.firstElementChild)||typeof e.textContent==`string`&&O(dt[t],e.textContent))||e.nodeType===N.processingInstruction||Tt&&e.nodeType===N.comment&&O(ot,e.data))},Sn=function(e,t){return e instanceof RegExp?O(e,t):e instanceof Function?!!e(t,...[...arguments].slice(2)):!1},Cn=function(e,t,n){if(!yt[t]&&kn(t)&&Sn(R.tagNameCheck,t))return!1;if(Lt&&!U[t]){let t=g(e),r=h(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,m(e))}}}return Y(e),!0},wn=function(e,t,n,r){return e.length===0?t:t===n||t===r?j(t):t},Tn=function(e,t){return e===t||g(e)!==null?!1:(V&&pn(e),!0)},En=function(e,n){if($(E.beforeSanitizeElements,e,null),Tn(e,n))return!0;if(yn(e))return Y(e),!0;let r=J(x(e));if(P=wn(E.uponSanitizeElement,P,F,Ot),$(E.uponSanitizeElement,e,{tagName:r,allowedTags:P}),Tn(e,n))return!0;if(xn(e,r))return Y(e),!0;if(yt[r]||!(z.tagCheck instanceof Function&&z.tagCheck(r))&&!P[r]){let t=Cn(e,r,n);return t===!1&&$(E.afterSanitizeElements,e,null),t}if(b(e)===N.element&&!ln(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&O(st,e.innerHTML))return Y(e),!0;if(B&&e.nodeType===N.text){let n=_n(e.textContent);e.textContent!==n&&(be(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(E.afterSanitizeElements,e,null),!1},Dn=function(e,t,r){if(bt[t]||mn(t,e)||Pt&&(t===`id`||t===`name`)&&(r in n||r in en))return!1;let i=I[t]||z.attributeCheck instanceof Function&&z.attributeCheck(t,e);return St&&O(Me,t)||xt&&O(k,t)?!0:i?Vt[t]||O(vt,Ee(r,Fe,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&De(r,`data:`)===0&&zt[e]||Ct&&!O(Pe,Ee(r,Fe,``))?!0:!r:kn(e)&&Sn(R.tagNameCheck,e)&&Sn(R.attributeNameCheck,t,e)||t===`is`&&R.allowCustomizedBuiltInElements&&Sn(R.tagNameCheck,r)},On=A({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),kn=function(e){return!On[Ce(e)]&&O(lt,e)},An=function(e,t,n,r){if(S&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return oe(r);case`TrustedScriptURL`:return se(r)}return r},jn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),yn(e)?Y(e):ye(t.removed)}catch{X(n,e)}},Mn=function(e){$(E.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||yn(e))return;I=wn(E.uponSanitizeAttribute,I,L,kt);let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0},r=t.length,i=J(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=J(o),u=c,d=o===`value`?u:Oe(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,$(E.uponSanitizeAttribute,e,n),d=n.attrValue,Ft&&(l===`id`||l===`name`)&&De(d,It)!==0&&(X(o,e,a),d=It+d),Tt&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){X(o,e,a);continue}if(l===`attributename`&&Te(d,`href`)){X(o,e,a);continue}if(!n.forceKeepAttr){if(!n.keepAttr){X(o,e,a);continue}if(!wt&&O(ct,d)){X(o,e,a);continue}if(B&&(d=_n(d)),!Dn(i,l,d)){X(o,e,a);continue}d=An(i,l,s,d),d!==u&&jn(e,o,s,d)}}$(E.afterSanitizeAttributes,e,null)},Nn=function(e){let t=null,n=gn(e);for($(E.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(E.uponSanitizeShadowNode,t,null),En(t,e),Mn(t),bn(t.content)&&Nn(t.content),b(t)===N.element){let e=ee(t);bn(e)&&(Pn(e),Nn(e))}$(E.afterSanitizeShadowDOM,e,null)},Pn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Nn(e.shadow);continue}let n=e.node,r=b(n)===N.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=v?v(n):null;if(typeof e==`string`&&J(e)===`template`){let e=n.content;bn(e)&&t.push({node:e,shadow:null})}}if(r){let e=ee(n);bn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(q=!e,q&&(e=``),typeof e!=`string`&&!Q(e)&&(e=Ie(e),typeof e!=`string`))throw Ne(`dirty is not a string, aborting`);if(!t.isSupported)return e;Dt?(P=Ot,I=kt):nn(n),(E.uponSanitizeElement.length>0||E.uponSanitizeAttribute.length>0)&&(P=j(P)),E.uponSanitizeAttribute.length>0&&(I=j(I)),t.removed=[];let c=V&&typeof e!=`string`&&Q(e);if(c){hn(e);let t=x(e);if(typeof t==`string`){let n=J(t);if(!P[n]||yt[n])throw dn(e),Ne(`root node is forbidden and cannot be sanitized in-place`)}if(yn(e))throw dn(e),Ne(`root node is clobbered and cannot be sanitized in-place`);try{Pn(e)}catch(t){throw dn(e),t}}else if(Q(e))i=Z(``),a=i.ownerDocument.importNode(e,!0),a.nodeType===N.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Pn(a);else{if(!jt&&!B&&!Et&&e.indexOf(`<`)===-1)return S&&Nt?oe(e):e;if(i=Z(e),!i)return jt?null:Nt?C:``}i&&At&&Y(i.firstChild);let l=c?e:i;try{let e=gn(l);for(;o=e.nextNode();)En(o,l),Mn(o),bn(o.content)&&Nn(o.content)}catch(n){throw c&&(dn(e),_e(t.removed,e=>{e.element&&pn(e.element)})),n}if(c)return _e(t.removed,e=>{e.element&&pn(e.element)}),B&&vn(e),e;if(jt){if(B&&vn(i),Mt)for(s=me.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(I.shadowroot||I.shadowrootmode)&&(s=ge.call(r,s,!0)),s}let u=Et?i.outerHTML:i.innerHTML;return Et&&P[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&O(rt,i.ownerDocument.doctype.name)&&(u=` -`+u),B&&(u=_n(u)),S&&Nt?oe(u):u},t.setConfig=function(){nn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Dt=!0,Ot=P,kt=I},t.clearConfig=function(){$t=null,Dt=!1,Ot=null,kt=null,S=ne,C=``},t.isValidAttribute=function(e,t,n){return $t||nn({}),Dn(J(e),J(t),n)},t.addHook=function(e,t){typeof t==`function`&&D(E,e)&&be(E[e],t)},t.removeHook=function(e,t){if(D(E,e)){if(t!==void 0){let n=ve(E[e],t);return n===-1?void 0:xe(E[e],n,1)[0]}return ye(E[e])}},t.removeHooks=function(e){D(E,e)&&(E[e]=[])},t.removeAllHooks=function(){E=mt()},t}var vt=_t(),P=n((e,t,{depth:n=2}={})=>{let r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(t=>P(e,t,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.includes(t)||e.push(t)}),e;if(e==null||n<=0)return typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t;if(t!=null&&typeof e==`object`&&typeof t==`object`){let r=e;Object.entries(t).forEach(([t,i])=>{if(typeof i==`object`){if(i===null)return;Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),r[t]===void 0&&(r[t]=Array.isArray(i)?[]:{}),typeof r[t]==`object`&&(r[t]=P(r[t],i,{depth:n-1}))}else typeof r[t]!=`object`&&(Object.hasOwn(e,t)?r[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))})}return e},`assignWithDepth`),F=P,I=`#ffffff`,L=`#f2f2f2`,R=n((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),`mkBorder`),yt=class{static{n(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||y(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||`navy`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||b(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||b(this.mainBkg,10)):(this.rowOdd=this.rowOdd||y(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||y(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},bt=n(e=>{let t=new yt;return t.calculate(e),t},`getThemeVariables`),z=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=y(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=y(C(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=g(255,255,255,.25),this.arrowheadColor=`calculated`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#F9FFFE`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`calculated`,this.activationBkgColor=`calculated`,this.sequenceNumberColor=`black`,this.clusterBkg=`#302F3D`,this.sectionBkgColor=b(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=b(this.sectionBkgColor,10),this.taskBorderColor=g(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=g(255,255,255,50),this.activeTaskBkgColor=`#81B1DB`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#E83737`,this.critBkgColor=`#E83737`,this.taskTextDarkColor=`calculated`,this.todayLineColor=`#DB5757`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||y(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||b(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){this.secondBkg=y(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=y(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=y(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=C(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#555`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#f4f4f4`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||`#0b0000`,this.cScale2=this.cScale2||`#4d1037`,this.cScale3=this.cScale3||`#3f5258`,this.cScale4=this.cScale4||`#4f2f1b`,this.cScale5=this.cScale5||`#6e0a0a`,this.cScale6=this.cScale6||`#3b0048`,this.cScale7=this.cScale7||`#995a01`,this.cScale8=this.cScale8||`#154706`,this.cScale9=this.cScale9||`#161722`,this.cScale10=this.cScale10||`#00296f`,this.cScale11=this.cScale11||`#01629c`,this.cScale12=this.cScale12||`#010029`,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},xt=n(e=>{let t=new z;return t.calculate(e),t},`getThemeVariables`),St=class{static{n(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=`calculated`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBorderColor=`calculated`,this.critBkgColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.sectionBkgColor=g(102,102,255,.49),this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#fff400`,this.taskBorderColor=`#534fbc`,this.taskBkgColor=`#8a90dd`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`#534fbc`,this.activeTaskBkgColor=`#bfc7ff`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||b(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||b(this.tertiaryColor,40);for(let e=0;e{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Ct=n(e=>{let t=new St;return t.calculate(e),t},`getThemeVariables`),wt=class{static{n(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=y(`#cde498`,10),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.primaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){this.actorBorder=b(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||b(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||b(this.tertiaryColor,40);for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},B=n(e=>{let t=new wt;return t.calculate(e),t},`getThemeVariables`),Tt=class{static{n(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=y(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.lineColor=C(this.background),this.textColor=C(this.background),this.mainBkg=`#eee`,this.secondBkg=`calculated`,this.lineColor=`#666`,this.border1=`#999`,this.border2=`calculated`,this.note=`#ffa`,this.text=`#333`,this.critical=`#d42`,this.done=`#bbb`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||y(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){this.secondBkg=y(this.contrast,55),this.border2=this.contrast,this.actorBorder=y(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=`#999`,this.noteBkgColor=`#666`,this.noteTextColor=`#fff`,this.cScale0=this.cScale0||`#555`,this.cScale1=this.cScale1||`#F4F4F4`,this.cScale2=this.cScale2||`#555`,this.cScale3=this.cScale3||`#BBB`,this.cScale4=this.cScale4||`#777`,this.cScale5=this.cScale5||`#999`,this.cScale6=this.cScale6||`#DDD`,this.cScale7=this.cScale7||`#FFF`,this.cScale8=this.cScale8||`#DDD`,this.cScale9=this.cScale9||`#BBB`,this.cScale10=this.cScale10||`#999`,this.cScale11=this.cScale11||`#777`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Et=n(e=>{let t=new Tt;return t.calculate(e),t},`getThemeVariables`),Dt=class{static{n(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=x(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||y(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||x(e,{h:30}),this.cScale4=this.cScale4||x(e,{h:60}),this.cScale5=this.cScale5||x(e,{h:90}),this.cScale6=this.cScale6||x(e,{h:120}),this.cScale7=this.cScale7||x(e,{h:150}),this.cScale8=this.cScale8||x(e,{h:210,l:150}),this.cScale9=this.cScale9||x(e,{h:270}),this.cScale10=this.cScale10||x(e,{h:300}),this.cScale11=this.cScale11||x(e,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Ot=n(e=>{let t=new Dt;return t.calculate(e),t},`getThemeVariables`),kt=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=y(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=y(C(`#323D47`),10),this.border1=`#ccc`,this.border2=g(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||y(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},At=n(e=>{let t=new kt;return t.calculate(e),t},`getThemeVariables`),jt=class{static{n(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=R(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||y(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Mt=n(e=>{let t=new jt;return t.calculate(e),t},`getThemeVariables`),Nt=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=y(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=y(C(`#323D47`),10),this.border1=`#ccc`,this.border2=g(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||y(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Pt=n(e=>{let t=new Nt;return t.calculate(e),t},`getThemeVariables`),Ft=class{static{n(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=R(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||y(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},It=n(e=>{let t=new Ft;return t.calculate(e),t},`getThemeVariables`),Lt=class{static{n(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=y(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=C(this.background),this.secondaryBorderColor=R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=R(this.tertiaryColor,this.darkMode),this.primaryTextColor=C(this.primaryColor),this.secondaryTextColor=C(this.secondaryColor),this.tertiaryTextColor=C(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=y(C(`#323D47`),10),this.border1=`#ccc`,this.border2=g(255,255,255,.25),this.arrowheadColor=C(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||R(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||R(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||R(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||R(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||C(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||C(this.tertiaryColor),this.lineColor=this.lineColor||C(this.background),this.arrowheadColor=this.arrowheadColor||C(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?b(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||b(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||C(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor=`#FFFFFF`,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||y(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},V={base:{getThemeVariables:bt},dark:{getThemeVariables:xt},default:{getThemeVariables:Ct},forest:{getThemeVariables:B},neutral:{getThemeVariables:Et},neo:{getThemeVariables:Ot},"neo-dark":{getThemeVariables:At},redux:{getThemeVariables:Mt},"redux-dark":{getThemeVariables:Pt},"redux-color":{getThemeVariables:It},"redux-dark-color":{getThemeVariables:n(e=>{let t=new Lt;return t.calculate(e),t},`getThemeVariables`)}},H={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:`arc`,ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:`"Open Sans", sans-serif`,actorFontWeight:400,noteFontSize:14,noteFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,noteFontWeight:400,noteAlign:`center`,messageFontSize:16,messageFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:`%Y-%m-%d`,topAxis:!1,displayMode:``,weekday:`sunday`},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:`20`,compositTitleSize:35,radius:5,defaultRenderer:`dagre-wrapper`},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:`TB`,minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:`right`,highlightSlice:``},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:``,filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},U={...H,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,nodePlacementAlignment:`NONE`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`,keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:V.default.getThemeVariables(),sequence:{...H.sequence,messageFont:n(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:n(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:n(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{defaultRenderer:`dagre-wrapper`,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...H.gantt,tickInterval:void 0,useWidth:void 0},c4:{...H.c4,useWidth:void 0,personFont:n(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...H.flowchart,inheritDir:!1},external_personFont:n(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:n(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:n(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:n(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:n(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:n(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:n(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:n(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:n(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:n(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:n(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:n(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:n(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:n(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:n(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:n(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:n(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:n(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:n(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:n(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:n(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...H.pie,useWidth:984},xyChart:{...H.xyChart,useWidth:void 0},requirement:{...H.requirement,useWidth:void 0},packet:{...H.packet},eventmodeling:{...H.eventmodeling},treeView:{...H.treeView,useWidth:void 0},radar:{...H.radar},railroad:{...H.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...H.ishikawa},sankey:{...H.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...H.venn},cynefin:{...H.cynefin}},Rt=n((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...Rt(e[r],``)]:[...n,t+r],[]),`keyify`),zt=new Set(Rt(U,``)),Bt=U,Vt={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Ht=n((e,n)=>{for(let r of Object.keys(e)){let i=e[r];(r.startsWith(`__`)||r.includes(`proto`)||r.includes(`constr`)||typeof i!=`string`||!n.test(i))&&(t.debug(`sanitize deleting dictionary entry:`,r,i),delete e[r])}},`sanitizeDictionaryConfig`),W=n(e=>{if(t.debug(`sanitizeDirective called with`,e),!(typeof e!=`object`||!e)){if(Array.isArray(e)){e.forEach(e=>W(e));return}for(let n of Object.keys(e)){if(t.debug(`Checking key`,n),n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||!zt.has(n)||e[n]==null){t.debug(`sanitize deleting key: `,n),delete e[n];continue}if(typeof e[n]==`object`){let r=Vt[n];r?Ht(e[n],r):(t.debug(`sanitizing object`,n),W(e[n]));continue}for(let r of[`themeCSS`,`fontFamily`,`altFontFamily`])n.includes(r)&&(t.debug(`sanitizing css option`,n),e[n]=Ut(e[n]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}t.debug(`After sanitization`,e)}},`sanitizeDirective`),Ut=n(e=>{let t=0,n=0;for(let r of e){if(t!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),q=F({},G),Wt,Gt=[],Kt=F({},G),qt=n((e,t)=>{let n=F({},e),r={};for(let e of t)$t(e),r=F(r,e);if(n=F(n,r),r.theme&&r.theme in V){let e=F(F({},Wt).themeVariables||{},r.themeVariables);n.theme&&n.theme in V&&(n.themeVariables=V[n.theme].getThemeVariables(e))}return Kt=n,on(Kt),Kt},`updateCurrentConfig`),Jt=n(e=>(q=F({},G),q=F(q,e),e.theme&&V[e.theme]&&(q.themeVariables=V[e.theme].getThemeVariables(e.themeVariables)),qt(q,Gt),q),`setSiteConfig`),Yt=n(e=>{Wt=F({},e)},`saveConfigFromInitialize`),Xt=n(e=>(q=F(q,e),qt(q,Gt),q),`updateSiteConfig`),Zt=n(()=>F({},q),`getSiteConfig`),Qt=n(e=>(qt(Kt,[e]),J()),`setConfig`),J=n(()=>F({},Kt),`getConfig`),$t=n(e=>{e&&([`secure`,...q.secure??[]].forEach(n=>{Object.hasOwn(e,n)&&(t.debug(`Denied attempt to modify a secure key ${n}`,e[n]),delete e[n])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&$t(e[t])}))},`sanitize`),en=n(e=>{W(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Gt.push(e),qt(q,Gt)},`addDirective`),tn=n((e=q)=>{Gt=[],qt(e,Gt)},`reset`),nn={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},rn={},an=n(e=>{rn[e]||(t.warn(nn[e]),rn[e]=!0)},`issueWarning`),on=n(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&an(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),sn=n(()=>{let e={};Wt&&(e=F(e,Wt));for(let t of Gt)e=F(e,t);return e},`getUserDefinedConfig`),cn=n(e=>(e.flowchart?.htmlLabels!=null&&an(`FLOWCHART_HTML_LABELS_DEPRECATED`),K(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),ln=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Y=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,un=/\s*%%.*\n/gm,dn=class extends Error{static{n(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},X={},fn=n(function(e,t){e=e.replace(ln,``).replace(Y,``).replace(un,` -`);for(let[n,{detector:r}]of Object.entries(X))if(r(e,t))return n;throw new dn(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),pn=n((...e)=>{for(let{id:t,detector:n,loader:r}of e)mn(t,n,r)},`registerLazyLoadedDiagrams`),mn=n((e,n,r)=>{X[e]&&t.warn(`Detector with key ${e} already exists. Overwriting.`),X[e]={detector:n,loader:r},t.debug(`Detector with key ${e} added${r?` with loader`:``}`)},`addDetector`),hn=n(e=>X[e].loader,`getDiagramLoader`),Z=//gi,gn=n(e=>e?wn(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),_n=(()=>{let e=!1;return()=>{e||=(vn(),!0)}})();function vn(){let e=`data-temp-href-target`;vt.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),vt.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}n(vn,`setupDompurifyHooks`);var yn=n(e=>(_n(),vt.sanitize(e)),`removeScript`),bn=n((e,t)=>{if(cn(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=yn(e):n!==`loose`&&(e=wn(e),e=e.replace(//g,`>`),e=e.replace(/=/g,`=`),e=Cn(e))}return e},`sanitizeMore`),Q=n((e,t)=>e&&(e=t.dompurifyConfig?vt.sanitize(bn(e,t),t.dompurifyConfig).toString():vt.sanitize(bn(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),$=n((e,t)=>typeof e==`string`?Q(e,t):e.flat().map(e=>Q(e,t)),`sanitizeTextOrArray`),xn=n(e=>Z.test(e),`hasBreaks`),Sn=n(e=>e.split(Z),`splitBreaks`),Cn=n(e=>e.replace(/#br#/g,`
`),`placeholderToBreak`),wn=n(e=>e.replace(Z,`#br#`),`breakToPlaceholder`),Tn=n(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),En=n(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),Dn=n(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),On=n(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e0&&e+1Math.max(0,e.split(t).length-1),`countOccurrence`),An=n((e,t)=>{let n=kn(e,`~`),r=kn(t,`~`);return n===1&&r===1},`shouldCombineSets`),jn=n(e=>{let t=kn(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),Mn=n(()=>window.MathMLElement!==void 0,`isMathMLSupported`),Nn=/\$\$(.*?)\$\$/g,Pn=n(e=>(e.match(Nn)?.length??0)>0,`hasKatex`),Fn=n(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await Ln(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),In=n(async(e,t)=>{if(!Pn(e))return e;if(!(Mn()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Nn,`MathML is unsupported in this environment.`);{let{default:n}=await import(`./katex-Vhh-h91d.js`),r=t.forceLegacyMathML||!Mn()&&t.legacyMathML?`htmlAndMathml`:`mathml`;return e.split(Z).map(e=>Pn(e)?`
${e}
`:`
${e}
`).join(``).replace(Nn,(e,t)=>n.renderToString(t,{throwOnError:!0,displayMode:!0,output:r}).replace(/\n/g,` `).replace(//g,``))}return e.replace(Nn,`Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.`)},`renderKatexUnsanitized`),Ln=n(async(e,t)=>Q(await In(e,t),t),`renderKatexSanitized`),Rn={getRows:gn,sanitizeText:Q,sanitizeTextOrArray:$,hasBreaks:xn,splitBreaks:Sn,lineBreakRegex:Z,removeScript:yn,getUrl:Tn,evaluate:K,getMax:En,getMin:Dn},zn=n(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),Bn=n(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),Vn=n(function(e,t,n,r){zn(e,Bn(t,n,r))},`configureSvgSize`),Hn=n(function(e,n,r,i){let a=n.node().getBBox(),o=a.width,s=a.height;t.info(`SVG bounds: ${o}x${s}`,a);let c=0,l=0;t.info(`Graph bounds: ${c}x${l}`,e),c=o+r*2,l=s+r*2,t.info(`Calculated bounds: ${c}x${l}`),Vn(n,l,c,i);let u=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;n.attr(`viewBox`,u)},`setupGraphViewbox`),Un={};function Wn(e){return[...e.cssRules].map(e=>e.cssText).join(` -`)}n(Wn,`cssStyleSheetToString`);var Gn=n((e,n,r,i)=>{let a=``;return e in Un&&Un[e]?a=Un[e]({...r,svgId:i}):t.warn(`No theme found for ${e}`),`& { - font-family: ${r.fontFamily}; - font-size: ${r.fontSize}; - fill: ${r.textColor} - } - @keyframes edge-animation-frame { - from { - stroke-dashoffset: 0; - } - } - @keyframes dash { - to { - stroke-dashoffset: 0; - } - } - & .edge-animation-slow { - stroke-dasharray: 9,5 !important; - stroke-dashoffset: 900; - animation: dash 50s linear infinite; - stroke-linecap: round; - } - & .edge-animation-fast { - stroke-dasharray: 9,5 !important; - stroke-dashoffset: 900; - animation: dash 20s linear infinite; - stroke-linecap: round; - } - /* Classes common for multiple diagrams */ - - & .error-icon { - fill: ${r.errorBkgColor}; - } - & .error-text { - fill: ${r.errorTextColor}; - stroke: ${r.errorTextColor}; - } - - & .edge-thickness-normal { - stroke-width: ${r.strokeWidth??1}px; - } - & .edge-thickness-thick { - stroke-width: 3.5px - } - & .edge-pattern-solid { - stroke-dasharray: 0; - } - & .edge-thickness-invisible { - stroke-width: 0; - fill: none; - } - & .edge-pattern-dashed{ - stroke-dasharray: 3; - } - .edge-pattern-dotted { - stroke-dasharray: 2; - } - - & .marker { - fill: ${r.lineColor}; - stroke: ${r.lineColor}; - } - & .marker.cross { - stroke: ${r.lineColor}; - } - - & svg { - font-family: ${r.fontFamily}; - font-size: ${r.fontSize}; - } - & p { - margin: 0 - } - - ${a} - .node .neo-node { - stroke: ${r.nodeBorder}; - } - - [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { - stroke: ${r.useGradient?`url(`+i+`-gradient)`:r.nodeBorder}; - filter: ${r.dropShadow?r.dropShadow.replace(`url(#drop-shadow)`,`url(${i}-drop-shadow)`):`none`}; - } - [data-look="neo"].swimlane.cluster rect { - filter: none; - } - - - [data-look="neo"].node path { - stroke: ${r.useGradient?`url(`+i+`-gradient)`:r.nodeBorder}; - stroke-width: ${r.strokeWidth??1}px; - } - - [data-look="neo"].node .outer-path { - filter: ${r.dropShadow?r.dropShadow.replace(`url(#drop-shadow)`,`url(${i}-drop-shadow)`):`none`}; - } - - [data-look="neo"].node .neo-line path { - stroke: ${r.nodeBorder}; - filter: none; - } - - [data-look="neo"].node circle{ - stroke: ${r.useGradient?`url(`+i+`-gradient)`:r.nodeBorder}; - filter: ${r.dropShadow?r.dropShadow.replace(`url(#drop-shadow)`,`url(${i}-drop-shadow)`):`none`}; - } - - [data-look="neo"].node circle .state-start{ - fill: #000000; - } - - [data-look="neo"].icon-shape .icon { - fill: ${r.useGradient?`url(`+i+`-gradient)`:r.nodeBorder}; - filter: ${r.dropShadow?r.dropShadow.replace(`url(#drop-shadow)`,`url(${i}-drop-shadow)`):`none`}; - } - - [data-look="neo"].icon-shape .icon-neo path { - stroke: ${r.useGradient?`url(`+i+`-gradient)`:r.nodeBorder}; - filter: ${r.dropShadow?r.dropShadow.replace(`url(#drop-shadow)`,`url(${i}-drop-shadow)`):`none`}; - } - - ${n} -`},`getStyles`),Kn=n((e,t)=>{t!==void 0&&(Un[e]=t)},`addStylesForDiagram`),qn=Gn,Jn={};r(Jn,{clear:()=>$n,getAccDescription:()=>rr,getAccTitle:()=>tr,getDiagramTitle:()=>ar,setAccDescription:()=>nr,setAccTitle:()=>er,setDiagramTitle:()=>ir});var Yn=``,Xn=``,Zn=``,Qn=n(e=>Q(e,J()),`sanitizeText`),$n=n(()=>{Yn=``,Zn=``,Xn=``},`clear`),er=n(e=>{Yn=Qn(e).replace(/^\s+/g,``)},`setAccTitle`),tr=n(()=>Yn,`getAccTitle`),nr=n(e=>{Zn=Qn(e).replace(/\n\s+/g,` -`)},`setAccDescription`),rr=n(()=>Zn,`getAccDescription`),ir=n(e=>{Xn=Qn(e)},`setDiagramTitle`),ar=n(()=>Xn,`getDiagramTitle`),or=t,sr=e,cr=J,lr=Qt,ur=G,dr=n(e=>Q(e,cr()),`sanitizeText`),fr=Hn,pr=n(()=>Jn,`getCommonDb`),mr={},hr=n((e,t,n)=>{mr[e]&&or.warn(`Diagram with id ${e} already registered. Overwriting.`),mr[e]=t,n&&mn(e,n),Kn(e,t.styles),t.injectUtils?.(or,sr,cr,dr,fr,pr(),()=>{})},`registerDiagram`),gr=n(e=>{if(e in mr)return mr[e];throw new _r(e)},`getDiagram`),_r=class extends Error{static{n(this,`DiagramNotFoundError`)}constructor(e){super(`Diagram ${e} not found.`)}};export{vt as $,Pn as A,dr as B,hn as C,Ct as D,Zt as E,Ln as F,lr as G,nr as H,tn as I,Hn as J,ir as K,Ut as L,On as M,hr as N,Tn as O,pn as P,Xt as Q,W as R,gr as S,cn as T,er as U,Yt as V,Qt as W,qn as X,fr as Y,V as Z,ln as _,$n as a,m as at,J as b,Vn as c,ur as d,b as et,Bt as f,K as g,Y as h,Fn as i,g as it,Z as j,sn as k,Wn as l,X as m,en as n,v as nt,Jn as o,a as ot,fn as p,Jt as q,F as r,_ as rt,Rn as s,dn as t,y as tt,G as u,rr as v,ar as w,cr as x,tr as y,Q as z}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-BiUOMdWi.js b/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-DTzbeXt1.js similarity index 93% rename from apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-BiUOMdWi.js rename to apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-DTzbeXt1.js index b5012fa59..8ad63c18b 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-BiUOMdWi.js +++ b/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-DTzbeXt1.js @@ -1 +1 @@ -import{p as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{j as n}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as r}from"./dist-B9JEmVDW.js";var i=r(),a=t((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),o=t((e,t)=>{a(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),s=t((e,t)=>{let r=t.text.replace(n,` `),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.attr(`class`,`legend`),i.style(`text-anchor`,t.anchor),t.class&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.text(r),i},`drawText`),c=t((e,t,n,r)=>{let a=e.append(`image`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,o)},`drawImage`),l=t((e,t,n,r)=>{let a=e.append(`use`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),u=t(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),d=t(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),f=t(()=>{let t=e(`.mermaidTooltip`);return t.empty()&&(t=e(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),t},`createTooltip`);export{a,d as c,c as i,o as n,s as o,l as r,u as s,f as t}; \ No newline at end of file +import{p as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{j as n}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as r}from"./dist-B9JEmVDW.js";var i=r(),a=t((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),o=t((e,t)=>{a(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),s=t((e,t)=>{let r=t.text.replace(n,` `),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.attr(`class`,`legend`),i.style(`text-anchor`,t.anchor),t.class&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.text(r),i},`drawText`),c=t((e,t,n,r)=>{let a=e.append(`image`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,o)},`drawImage`),l=t((e,t,n,r)=>{let a=e.append(`use`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),u=t(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),d=t(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),f=t(()=>{let t=e(`.mermaidTooltip`);return t.empty()&&(t=e(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),t},`createTooltip`);export{a,d as c,c as i,o as n,s as o,l as r,u as s,f as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-DeO1S11A.js b/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-Duq9tlNm.js similarity index 93% rename from apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-DeO1S11A.js rename to apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-Duq9tlNm.js index 1d15a3286..4fa101bc6 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-DeO1S11A.js +++ b/apps/pythinker-code/dist-web/assets/chunk-F27PBJKO-Duq9tlNm.js @@ -1 +1 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Cn6kALDM.js";import{j as n}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as r}from"./dist-lRkD-JPF.js";var i=r(),a=e((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),o=e((e,t)=>{a(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),s=e((e,t)=>{let r=t.text.replace(n,` `),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.attr(`class`,`legend`),i.style(`text-anchor`,t.anchor),t.class&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.text(r),i},`drawText`),c=e((e,t,n,r)=>{let a=e.append(`image`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,o)},`drawImage`),l=e((e,t,n,r)=>{let a=e.append(`use`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),u=e(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),d=e(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),f=e(()=>{let e=t(`.mermaidTooltip`);return e.empty()&&(e=t(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`);export{a,d as c,c as i,o as n,s as o,l as r,u as s,f as t}; \ No newline at end of file +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Cn6kALDM.js";import{j as n}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as r}from"./dist-lRkD-JPF.js";var i=r(),a=e((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),o=e((e,t)=>{a(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),s=e((e,t)=>{let r=t.text.replace(n,` `),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.attr(`class`,`legend`),i.style(`text-anchor`,t.anchor),t.class&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.text(r),i},`drawText`),c=e((e,t,n,r)=>{let a=e.append(`image`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,o)},`drawImage`),l=e((e,t,n,r)=>{let a=e.append(`use`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),u=e(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),d=e(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),f=e(()=>{let e=t(`.mermaidTooltip`);return e.empty()&&(e=t(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`);export{a,d as c,c as i,o as n,s as o,l as r,u as s,f as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-jIHtZ3sR.js b/apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-DO6QncBh.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-jIHtZ3sR.js rename to apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-DO6QncBh.js index 58de63885..4e4db1fe2 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-jIHtZ3sR.js +++ b/apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-DO6QncBh.js @@ -1,4 +1,4 @@ -import{_ as e,m as t,p as n,v as r}from"./src-CDd1avoI.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{A as a,F as o,b as s,s as c,z as l}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{a as u}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{n as d,t as f}from"./chunk-PWAF6VOD-DCTitH5S.js";var p=e(((e,t)=>{(function(e){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function r(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}r.prototype={constructor:r,runTasks:function(e){for(var t;t=e.shift();)t()},measure:function(e,t){var n=t?e.bind(t):e;return this.reads.push(n),i(this),n},mutate:function(e,t){var n=t?e.bind(t):e;return this.writes.push(n),i(this),n},clear:function(e){return o(this.reads,e)||o(this.writes,e)},extend:function(e){if(typeof e!=`object`)throw Error(`expected object`);var t=Object.create(this);return s(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};function i(e){e.scheduled||(e.scheduled=!0,e.raf(a.bind(null,e)))}function a(e){var t=e.writes,n=e.reads,r;try{n.length,e.runTasks(n),t.length,e.runTasks(t)}catch(e){r=e}if(e.scheduled=!1,(n.length||t.length)&&i(e),r)if(r.message,e.catch)e.catch(r);else throw r}function o(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}var c=e.fastdom=e.fastdom||new r;typeof define==`function`?define(function(){return c}):typeof t==`object`&&(t.exports=c)})(typeof window<`u`?window:e===void 0?globalThis:e)})),m=e(((e,t)=>{(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(e,t){return n(this,`mutate`,e,t)},measure:function(e,t){return n(this,`measure`,e,t)},clear:function(e){var t=this._tasks,n=t.get(e);this.fastdom.clear(n),t.delete(e)}};function n(e,t,n,r){var i=e._tasks,a=e.fastdom,o,s=new Promise(function(e,c){o=a[t](function(){i.delete(s);try{e(r?n.call(r):n())}catch(e){c(e)}},r)});return i.set(s,o),s}(typeof define)[0]==`f`?define(function(){return e}):(typeof t)[0]==`o`?t.exports=e:window.fastdomPromised=e})()})),h=r(p(),1),ee=r(m(),1);function g(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _=g();function te(e){_=e}var v={exec:()=>null};function y(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(b.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ne=(()=>{try{return!0}catch{return!1}})(),b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},re=/^(?:[ \t]*(?:\n|$))+/,ie=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ae=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,x=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,S=/(?:[*+-]|\d{1,9}[.)])/,se=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),le=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),C=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ue=/^[^\n]+/,w=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,de=y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,w).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fe=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,S).getRegex(),T=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,E=/|$))/,pe=y(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,E).replace(`tag`,T).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),D={blockquote:y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,me).getRegex(),code:ie,def:de,fences:ae,heading:oe,hr:x,html:pe,lheading:ce,list:fe,newline:re,paragraph:me,table:v,text:ue},he=y(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),ge={...D,lheading:le,table:he,paragraph:y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,he).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex()},_e={...D,html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,E).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(C).replace(`hr`,x).replace(`heading`,` *#{1,6} *[^ +import{_ as e,m as t,p as n,v as r}from"./src-CDd1avoI.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{A as a,F as o,b as s,s as c,z as l}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{a as u}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{n as d,t as f}from"./chunk-PWAF6VOD-Dsc8rvy3.js";var p=e(((e,t)=>{(function(e){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function r(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}r.prototype={constructor:r,runTasks:function(e){for(var t;t=e.shift();)t()},measure:function(e,t){var n=t?e.bind(t):e;return this.reads.push(n),i(this),n},mutate:function(e,t){var n=t?e.bind(t):e;return this.writes.push(n),i(this),n},clear:function(e){return o(this.reads,e)||o(this.writes,e)},extend:function(e){if(typeof e!=`object`)throw Error(`expected object`);var t=Object.create(this);return s(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};function i(e){e.scheduled||(e.scheduled=!0,e.raf(a.bind(null,e)))}function a(e){var t=e.writes,n=e.reads,r;try{n.length,e.runTasks(n),t.length,e.runTasks(t)}catch(e){r=e}if(e.scheduled=!1,(n.length||t.length)&&i(e),r)if(r.message,e.catch)e.catch(r);else throw r}function o(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}var c=e.fastdom=e.fastdom||new r;typeof define==`function`?define(function(){return c}):typeof t==`object`&&(t.exports=c)})(typeof window<`u`?window:e===void 0?globalThis:e)})),m=e(((e,t)=>{(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(e,t){return n(this,`mutate`,e,t)},measure:function(e,t){return n(this,`measure`,e,t)},clear:function(e){var t=this._tasks,n=t.get(e);this.fastdom.clear(n),t.delete(e)}};function n(e,t,n,r){var i=e._tasks,a=e.fastdom,o,s=new Promise(function(e,c){o=a[t](function(){i.delete(s);try{e(r?n.call(r):n())}catch(e){c(e)}},r)});return i.set(s,o),s}(typeof define)[0]==`f`?define(function(){return e}):(typeof t)[0]==`o`?t.exports=e:window.fastdomPromised=e})()})),h=r(p(),1),ee=r(m(),1);function g(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _=g();function te(e){_=e}var v={exec:()=>null};function y(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(b.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ne=(()=>{try{return!0}catch{return!1}})(),b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},re=/^(?:[ \t]*(?:\n|$))+/,ie=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ae=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,x=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,S=/(?:[*+-]|\d{1,9}[.)])/,se=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),le=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),C=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ue=/^[^\n]+/,w=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,de=y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,w).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fe=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,S).getRegex(),T=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,E=/|$))/,pe=y(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,E).replace(`tag`,T).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),D={blockquote:y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,me).getRegex(),code:ie,def:de,fences:ae,heading:oe,hr:x,html:pe,lheading:ce,list:fe,newline:re,paragraph:me,table:v,text:ue},he=y(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),ge={...D,lheading:le,table:he,paragraph:y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,he).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex()},_e={...D,html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,E).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(C).replace(`hr`,x).replace(`heading`,` *#{1,6} *[^ ]`).replace(`lheading`,ce).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ye=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,be=/^( {2,}|\\)\n(?!\s*$)/,xe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ne?"(?`+)[^`]+\k(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Oe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ke=y(Oe,`u`).replace(/punct/g,O).getRegex(),Ae=y(Oe,`u`).replace(/punct/g,we).getRegex(),je=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Me=y(je,`gu`).replace(/notPunctSpace/g,Se).replace(/punctSpace/g,k).replace(/punct/g,O).getRegex(),Ne=y(je,`gu`).replace(/notPunctSpace/g,Ee).replace(/punctSpace/g,Te).replace(/punct/g,we).getRegex(),Pe=y(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Se).replace(/punctSpace/g,k).replace(/punct/g,O).getRegex(),Fe=y(/\\(punct)/,`gu`).replace(/punct/g,O).getRegex(),Ie=y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Le=y(E).replace(`(?:-->|$)`,`-->`).getRegex(),Re=y(`^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,Le).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),A=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ze=y(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,A).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Be=y(/^!?\[(label)\]\[(ref)\]/).replace(`label`,A).replace(`ref`,w).getRegex(),Ve=y(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,w).getRegex(),He=y(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Be).replace(`nolink`,Ve).getRegex(),Ue=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,j={_backpedal:v,anyPunctuation:Fe,autolink:Ie,blockSkip:De,br:be,code:ye,del:v,emStrongLDelim:ke,emStrongRDelimAst:Me,emStrongRDelimUnd:Pe,escape:ve,link:ze,nolink:Ve,punctuation:Ce,reflink:Be,reflinkSearch:He,tag:Re,text:xe,url:v},We={...j,link:y(/^!?\[(label)\]\((.*?)\)/).replace(`label`,A).getRegex(),reflink:y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,A).getRegex()},M={...j,emStrongRDelimAst:Ne,emStrongLDelim:Ae,url:y(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Ue).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:y(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},qe=e=>Ke[e];function F(e,t){if(t){if(b.escapeTest.test(e))return e.replace(b.escapeReplace,qe)}else if(b.escapeTestNoEncode.test(e))return e.replace(b.escapeReplaceNoEncode,qe);return e}function Je(e){try{e=encodeURI(e).replace(b.percentDecode,`%`)}catch{return null}return e}function Ye(e,t){let n=e.replace(b.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(b.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function Ze(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Qe(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` `)}var L=class{options;rules;lexer;constructor(e){this.options=e||_}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:I(e,` diff --git a/apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-xizYnG4f.js b/apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-dCDLGP3F.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-xizYnG4f.js rename to apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-dCDLGP3F.js index ead8cf0f7..055c3492d 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-xizYnG4f.js +++ b/apps/pythinker-code/dist-web/assets/chunk-GMAD6QVW-dCDLGP3F.js @@ -1,4 +1,4 @@ -import{r as e,t}from"./chunk-QTnfLwEv.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r,p as i}from"./src-Cn6kALDM.js";import{A as a,F as o,b as s,s as c,z as l}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{a as u}from"./chunk-75Z2AOVW-D2HolPjd.js";import{n as d,t as f}from"./chunk-PWAF6VOD-vmg_e0ho.js";var p=t(((e,t)=>{(function(e){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function r(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}r.prototype={constructor:r,runTasks:function(e){for(var t;t=e.shift();)t()},measure:function(e,t){var n=t?e.bind(t):e;return this.reads.push(n),i(this),n},mutate:function(e,t){var n=t?e.bind(t):e;return this.writes.push(n),i(this),n},clear:function(e){return o(this.reads,e)||o(this.writes,e)},extend:function(e){if(typeof e!=`object`)throw Error(`expected object`);var t=Object.create(this);return s(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};function i(e){e.scheduled||(e.scheduled=!0,e.raf(a.bind(null,e)))}function a(e){var t=e.writes,n=e.reads,r;try{n.length,e.runTasks(n),t.length,e.runTasks(t)}catch(e){r=e}if(e.scheduled=!1,(n.length||t.length)&&i(e),r)if(r.message,e.catch)e.catch(r);else throw r}function o(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}var c=e.fastdom=e.fastdom||new r;typeof define==`function`?define(function(){return c}):typeof t==`object`&&(t.exports=c)})(typeof window<`u`?window:e===void 0?globalThis:e)})),m=t(((e,t)=>{(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(e,t){return n(this,`mutate`,e,t)},measure:function(e,t){return n(this,`measure`,e,t)},clear:function(e){var t=this._tasks,n=t.get(e);this.fastdom.clear(n),t.delete(e)}};function n(e,t,n,r){var i=e._tasks,a=e.fastdom,o,s=new Promise(function(e,c){o=a[t](function(){i.delete(s);try{e(r?n.call(r):n())}catch(e){c(e)}},r)});return i.set(s,o),s}(typeof define)[0]==`f`?define(function(){return e}):(typeof t)[0]==`o`?t.exports=e:window.fastdomPromised=e})()})),h=e(p(),1),ee=e(m(),1);function g(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _=g();function te(e){_=e}var v={exec:()=>null};function y(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(b.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ne=(()=>{try{return!0}catch{return!1}})(),b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},re=/^(?:[ \t]*(?:\n|$))+/,ie=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ae=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,x=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,S=/(?:[*+-]|\d{1,9}[.)])/,se=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),le=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),C=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ue=/^[^\n]+/,w=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,de=y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,w).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fe=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,S).getRegex(),T=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,E=/|$))/,pe=y(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,E).replace(`tag`,T).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),D={blockquote:y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,me).getRegex(),code:ie,def:de,fences:ae,heading:oe,hr:x,html:pe,lheading:ce,list:fe,newline:re,paragraph:me,table:v,text:ue},he=y(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),ge={...D,lheading:le,table:he,paragraph:y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,he).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex()},_e={...D,html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,E).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(C).replace(`hr`,x).replace(`heading`,` *#{1,6} *[^ +import{r as e,t}from"./chunk-QTnfLwEv.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r,p as i}from"./src-Cn6kALDM.js";import{A as a,F as o,b as s,s as c,z as l}from"./chunk-DU6HZSFF-B78kfBb6.js";import{a as u}from"./chunk-75Z2AOVW-CAoob5DH.js";import{n as d,t as f}from"./chunk-PWAF6VOD-D9eOryqj.js";var p=t(((e,t)=>{(function(e){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function r(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}r.prototype={constructor:r,runTasks:function(e){for(var t;t=e.shift();)t()},measure:function(e,t){var n=t?e.bind(t):e;return this.reads.push(n),i(this),n},mutate:function(e,t){var n=t?e.bind(t):e;return this.writes.push(n),i(this),n},clear:function(e){return o(this.reads,e)||o(this.writes,e)},extend:function(e){if(typeof e!=`object`)throw Error(`expected object`);var t=Object.create(this);return s(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};function i(e){e.scheduled||(e.scheduled=!0,e.raf(a.bind(null,e)))}function a(e){var t=e.writes,n=e.reads,r;try{n.length,e.runTasks(n),t.length,e.runTasks(t)}catch(e){r=e}if(e.scheduled=!1,(n.length||t.length)&&i(e),r)if(r.message,e.catch)e.catch(r);else throw r}function o(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}var c=e.fastdom=e.fastdom||new r;typeof define==`function`?define(function(){return c}):typeof t==`object`&&(t.exports=c)})(typeof window<`u`?window:e===void 0?globalThis:e)})),m=t(((e,t)=>{(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(e,t){return n(this,`mutate`,e,t)},measure:function(e,t){return n(this,`measure`,e,t)},clear:function(e){var t=this._tasks,n=t.get(e);this.fastdom.clear(n),t.delete(e)}};function n(e,t,n,r){var i=e._tasks,a=e.fastdom,o,s=new Promise(function(e,c){o=a[t](function(){i.delete(s);try{e(r?n.call(r):n())}catch(e){c(e)}},r)});return i.set(s,o),s}(typeof define)[0]==`f`?define(function(){return e}):(typeof t)[0]==`o`?t.exports=e:window.fastdomPromised=e})()})),h=e(p(),1),ee=e(m(),1);function g(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _=g();function te(e){_=e}var v={exec:()=>null};function y(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(b.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ne=(()=>{try{return!0}catch{return!1}})(),b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},re=/^(?:[ \t]*(?:\n|$))+/,ie=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ae=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,x=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,S=/(?:[*+-]|\d{1,9}[.)])/,se=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),le=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),C=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ue=/^[^\n]+/,w=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,de=y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,w).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fe=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,S).getRegex(),T=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,E=/|$))/,pe=y(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,E).replace(`tag`,T).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),D={blockquote:y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,me).getRegex(),code:ie,def:de,fences:ae,heading:oe,hr:x,html:pe,lheading:ce,list:fe,newline:re,paragraph:me,table:v,text:ue},he=y(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),ge={...D,lheading:le,table:he,paragraph:y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,he).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex()},_e={...D,html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,E).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(C).replace(`hr`,x).replace(`heading`,` *#{1,6} *[^ ]`).replace(`lheading`,ce).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ye=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,be=/^( {2,}|\\)\n(?!\s*$)/,xe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ne?"(?`+)[^`]+\k(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Oe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ke=y(Oe,`u`).replace(/punct/g,O).getRegex(),Ae=y(Oe,`u`).replace(/punct/g,we).getRegex(),je=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Me=y(je,`gu`).replace(/notPunctSpace/g,Se).replace(/punctSpace/g,k).replace(/punct/g,O).getRegex(),Ne=y(je,`gu`).replace(/notPunctSpace/g,Ee).replace(/punctSpace/g,Te).replace(/punct/g,we).getRegex(),Pe=y(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Se).replace(/punctSpace/g,k).replace(/punct/g,O).getRegex(),Fe=y(/\\(punct)/,`gu`).replace(/punct/g,O).getRegex(),Ie=y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Le=y(E).replace(`(?:-->|$)`,`-->`).getRegex(),Re=y(`^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,Le).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),A=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ze=y(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,A).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Be=y(/^!?\[(label)\]\[(ref)\]/).replace(`label`,A).replace(`ref`,w).getRegex(),Ve=y(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,w).getRegex(),He=y(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Be).replace(`nolink`,Ve).getRegex(),Ue=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,j={_backpedal:v,anyPunctuation:Fe,autolink:Ie,blockSkip:De,br:be,code:ye,del:v,emStrongLDelim:ke,emStrongRDelimAst:Me,emStrongRDelimUnd:Pe,escape:ve,link:ze,nolink:Ve,punctuation:Ce,reflink:Be,reflinkSearch:He,tag:Re,text:xe,url:v},We={...j,link:y(/^!?\[(label)\]\((.*?)\)/).replace(`label`,A).getRegex(),reflink:y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,A).getRegex()},M={...j,emStrongRDelimAst:Ne,emStrongLDelim:Ae,url:y(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Ue).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:y(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},qe=e=>Ke[e];function F(e,t){if(t){if(b.escapeTest.test(e))return e.replace(b.escapeReplace,qe)}else if(b.escapeTestNoEncode.test(e))return e.replace(b.escapeReplaceNoEncode,qe);return e}function Je(e){try{e=encodeURI(e).replace(b.percentDecode,`%`)}catch{return null}return e}function Ye(e,t){let n=e.replace(b.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(b.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function Ze(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Qe(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` `)}var L=class{options;rules;lexer;constructor(e){this.options=e||_}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:I(e,` diff --git a/apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-aw9OR1ii.js b/apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-CCw5T6ST.js similarity index 91% rename from apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-aw9OR1ii.js rename to apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-CCw5T6ST.js index 3e59d8612..2c5785db8 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-aw9OR1ii.js +++ b/apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-CCw5T6ST.js @@ -1 +1 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{u as n}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{o as r}from"./chunk-4HAMMTFA-B0yXCELs.js";var i=t(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`),a=new Map;async function o(e,t,i){let o,s;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let c=t.shape?r[t.shape]:void 0;if(!c)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;i.config.securityLevel===`sandbox`?n=`_top`:t.linkTarget&&(n=t.linkTarget||`_blank`),o=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,n??null),s=await c(o,t,i)}else s=await c(e,t,i),o=s;return o.attr(`data-look`,n(t.look)),t.tooltip&&s.attr(`title`,t.tooltip),a.set(t.id,o),t.haveCallback&&o.attr(`class`,o.attr(`class`)+` clickable`),o}t(o,`insertNode`);var s=t((e,t)=>{a.set(t.id,e)},`setNodeElem`),c=t(()=>{a.clear()},`clear`),l=t(t=>{let n=a.get(t.id);e.trace(`Transforming node`,t.diff,t,`translate(`+(t.x-t.width/2-5)+`, `+t.width/2+`)`);let r=t.diff||0;return t.clusterNode?n.attr(`transform`,`translate(`+(t.x+r-t.width/2)+`, `+(t.y-t.height/2-8)+`)`):n.attr(`transform`,`translate(`+t.x+`, `+t.y+`)`),r},`positionNode`);export{s as a,l as i,i as n,o as r,c as t}; \ No newline at end of file +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{u as n}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{o as r}from"./chunk-4HAMMTFA-X3JAMEe8.js";var i=t(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`),a=new Map;async function o(e,t,i){let o,s;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let c=t.shape?r[t.shape]:void 0;if(!c)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;i.config.securityLevel===`sandbox`?n=`_top`:t.linkTarget&&(n=t.linkTarget||`_blank`),o=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,n??null),s=await c(o,t,i)}else s=await c(e,t,i),o=s;return o.attr(`data-look`,n(t.look)),t.tooltip&&s.attr(`title`,t.tooltip),a.set(t.id,o),t.haveCallback&&o.attr(`class`,o.attr(`class`)+` clickable`),o}t(o,`insertNode`);var s=t((e,t)=>{a.set(t.id,e)},`setNodeElem`),c=t(()=>{a.clear()},`clear`),l=t(t=>{let n=a.get(t.id);e.trace(`Transforming node`,t.diff,t,`translate(`+(t.x-t.width/2-5)+`, `+t.width/2+`)`);let r=t.diff||0;return t.clusterNode?n.attr(`transform`,`translate(`+(t.x+r-t.width/2)+`, `+(t.y-t.height/2-8)+`)`):n.attr(`transform`,`translate(`+t.x+`, `+t.y+`)`),r},`positionNode`);export{s as a,l as i,i as n,o as r,c as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-BrOdU7Oy.js b/apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-Ddvf-Y11.js similarity index 91% rename from apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-BrOdU7Oy.js rename to apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-Ddvf-Y11.js index eafd87b36..17a9b968a 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-BrOdU7Oy.js +++ b/apps/pythinker-code/dist-web/assets/chunk-GVQU2GXP-Ddvf-Y11.js @@ -1 +1 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{u as n}from"./chunk-75Z2AOVW-D2HolPjd.js";import{o as r}from"./chunk-4HAMMTFA-B5soPjjq.js";var i=e(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`),a=new Map;async function o(e,t,i){let o,s;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let c=t.shape?r[t.shape]:void 0;if(!c)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;i.config.securityLevel===`sandbox`?n=`_top`:t.linkTarget&&(n=t.linkTarget||`_blank`),o=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,n??null),s=await c(o,t,i)}else s=await c(e,t,i),o=s;return o.attr(`data-look`,n(t.look)),t.tooltip&&s.attr(`title`,t.tooltip),a.set(t.id,o),t.haveCallback&&o.attr(`class`,o.attr(`class`)+` clickable`),o}e(o,`insertNode`);var s=e((e,t)=>{a.set(t.id,e)},`setNodeElem`),c=e(()=>{a.clear()},`clear`),l=e(e=>{let n=a.get(e.id);t.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?n.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):n.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);export{s as a,l as i,i as n,o as r,c as t}; \ No newline at end of file +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{u as n}from"./chunk-75Z2AOVW-CAoob5DH.js";import{o as r}from"./chunk-4HAMMTFA-Dlc4jvjp.js";var i=e(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`),a=new Map;async function o(e,t,i){let o,s;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let c=t.shape?r[t.shape]:void 0;if(!c)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;i.config.securityLevel===`sandbox`?n=`_top`:t.linkTarget&&(n=t.linkTarget||`_blank`),o=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,n??null),s=await c(o,t,i)}else s=await c(e,t,i),o=s;return o.attr(`data-look`,n(t.look)),t.tooltip&&s.attr(`title`,t.tooltip),a.set(t.id,o),t.haveCallback&&o.attr(`class`,o.attr(`class`)+` clickable`),o}e(o,`insertNode`);var s=e((e,t)=>{a.set(t.id,e)},`setNodeElem`),c=e(()=>{a.clear()},`clear`),l=e(e=>{let n=a.get(e.id);t.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?n.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):n.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);export{s as a,l as i,i as n,o as r,c as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-DWwC1m5B.js b/apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-6fpjZ3bW.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-DWwC1m5B.js rename to apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-6fpjZ3bW.js index d4304c6ca..c22a1fa28 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-DWwC1m5B.js +++ b/apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-6fpjZ3bW.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{H as r,K as i,U as a,a as o,s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as f}from"./purify.es-CvIXgbbv.js";import{g as p,s as m}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as h}from"./chunk-F27PBJKO-DeO1S11A.js";import{t as g}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as _}from"./chunk-POPQ4Y6H-BCRCUUP_.js";import{r as v}from"./chunk-TLUHSLCS-DN2eHVWx.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(j,[2,44],{58:[1,56]}),t(j,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:f,57:k},t(A,[2,17]),t(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(j,[2,46]),t(j,[2,47]),t(A,[2,15]),t(A,[2,19]),t(M,a,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{H as r,K as i,U as a,a as o,s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as f}from"./purify.es-F_7NWVtX.js";import{g as p,s as m}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as h}from"./chunk-F27PBJKO-Duq9tlNm.js";import{t as g}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as _}from"./chunk-POPQ4Y6H-mwDJO2QS.js";import{r as v}from"./chunk-TLUHSLCS-B1Sp0tTt.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(j,[2,44],{58:[1,56]}),t(j,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:f,57:k},t(A,[2,17]),t(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(j,[2,46]),t(j,[2,47]),t(A,[2,15]),t(A,[2,19]),t(M,a,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-Dc-ZKopU.js b/apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-BY2CmrFo.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-Dc-ZKopU.js rename to apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-BY2CmrFo.js index 872b2b02b..d038ffdff 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-Dc-ZKopU.js +++ b/apps/pythinker-code/dist-web/assets/chunk-IMKFNOWR-BY2CmrFo.js @@ -1,4 +1,4 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{$ as r,H as i,K as a,U as o,a as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{g as p,s as m}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{n as h}from"./mermaidParser.worker-_pLIm6No.js";import{t as g}from"./chunk-F27PBJKO-BiUOMdWi.js";import{t as _}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as v}from"./chunk-POPQ4Y6H-BiMU0_kH.js";var y=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,a,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{$ as r,H as i,K as a,U as o,a as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{g as p,s as m}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{n as h}from"./mermaidParser.worker-CBWarbNh.js";import{t as g}from"./chunk-F27PBJKO-DTzbeXt1.js";import{t as _}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as v}from"./chunk-POPQ4Y6H-1k8n9Sa3.js";var y=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,a,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/chunk-L3NEJ4N5-XwNqFvev.js b/apps/pythinker-code/dist-web/assets/chunk-L3NEJ4N5-BKsN7TKH.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/chunk-L3NEJ4N5-XwNqFvev.js rename to apps/pythinker-code/dist-web/assets/chunk-L3NEJ4N5-BKsN7TKH.js index fad1094a0..ee874bbef 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-L3NEJ4N5-XwNqFvev.js +++ b/apps/pythinker-code/dist-web/assets/chunk-L3NEJ4N5-BKsN7TKH.js @@ -1 +1 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{T as r,g as i,x as a}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{n as o}from"./chunk-GMAD6QVW-xizYnG4f.js";import{a as s,i as c}from"./chunk-P2QGCYS3-CQc2NCc1.js";import{t as l}from"./rough.esm-CSKSodPl.js";import{n as u,r as d,t as f}from"./chunk-4HAMMTFA-B5soPjjq.js";import{n as p}from"./chunk-GVQU2GXP-BrOdU7Oy.js";var m=e(async(e,r)=>{let u=a(),{themeVariables:f,handDrawnSeed:p}=u,{clusterBkg:m,clusterBorder:h}=f,g=h,{labelStyles:_,nodeStyles:v,borderStyles:y,backgroundStyles:b}=c(r),x=e.insert(`g`).attr(`class`,`cluster swimlane `+(r.cssClasses||``)).attr(`id`,r.id).attr(`data-id`,r.id).attr(`data-et`,`cluster`).attr(`data-look`,r.look),S=i(u.flowchart.htmlLabels),C=r.direction===`LR`,w=x.insert(`g`).attr(`class`,`cluster-label swimlane-label`),T=await o(w,r.label,{style:r.labelStyle,useHtmlLabels:S,isNode:!0,width:r.width}),E=T.getBBox();if(S){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=r.padding??0,O=r.width<=E.width+D?E.width+D:r.width;r.width<=E.width+D?r.diff=(O-r.width)/2-D:r.diff=-D;let k=r.height,A=r.y-k/2,j=r.y+k/2,M=r.x-O/2,N=r.swimlaneContentTop===void 0?A+k/3:r.swimlaneContentTop,P=C?4:0,F=E.height+2*P,I,L;if(C){let e=Math.max(F,E.height+2*P),t=M+e,n=Math.max(0,O-e);if(r.look===`handDrawn`){let i=l.svg(x),a=s(r,{roughness:.7,fill:m,stroke:g,fillWeight:3,seed:p}),o=s(r,{roughness:.7,fill:`none`,stroke:g,seed:p}),c=i.rectangle(M,A,e,k,a);I=x.insert(()=>c,`:first-child`);let u=i.rectangle(t,A,n,k,o);L=x.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,y.join(`;`)),I.select(`path`).attr(`style`,b.join(`;`).replace(`fill`,`stroke`))}else I=x.insert(`rect`,`:first-child`),L=x.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,v).attr(`x`,M).attr(`y`,A).attr(`width`,e).attr(`height`,k).attr(`fill`,m).attr(`stroke`,g),L.attr(`class`,`swimlane-body`).attr(`style`,v).attr(`x`,t).attr(`y`,A).attr(`width`,n).attr(`height`,k).attr(`fill`,`none`).attr(`stroke`,g);let i=M+e/2,a=r.y;w.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-E.width/2}, ${-E.height/2})`)}else{let e=Math.max(0,N-A),t=Math.min(F,e),n=A+t,i=Math.max(0,j-n),a=r.x-O/2;if(r.look===`handDrawn`){let e=l.svg(x),o=s(r,{roughness:.7,fill:m,stroke:g,fillWeight:3,seed:p}),c=s(r,{roughness:.7,fill:`none`,stroke:g,seed:p}),u=e.rectangle(a,A,O,t,o);I=x.insert(()=>u,`:first-child`);let d=e.rectangle(a,n,O,i,c);L=x.insert(()=>d,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,y.join(`;`)),I.select(`path`).attr(`style`,b.join(`;`).replace(`fill`,`stroke`))}else I=x.insert(`rect`,`:first-child`),L=x.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,v).attr(`x`,a).attr(`y`,A).attr(`width`,O).attr(`height`,t).attr(`fill`,m).attr(`stroke`,g),L.attr(`class`,`swimlane-body`).attr(`style`,v).attr(`x`,a).attr(`y`,n).attr(`width`,O).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,g);let o=r.x-E.width/2,c=A+(t-E.height)/2;w.attr(`transform`,`translate(${o}, ${c})`)}if(t.trace(`Swimlane data `,r,JSON.stringify(r)),_){let e=w.select(`span`);e&&e.attr(`style`,_)}return r.offsetX=0,r.width=O,r.height=k,r.offsetY=E.height-D/2,r.intersect=function(e){return d(r,e)},{cluster:x,labelBBox:E}},`swimlane`),h=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let m=a(),{themeVariables:h,handDrawnSeed:g}=m,{clusterBkg:_,clusterBorder:v}=h,{labelStyles:y,nodeStyles:b,borderStyles:x,backgroundStyles:S}=c(i),C=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),w=r(m),T=C.insert(`g`).attr(`class`,`cluster-label `),E;E=i.labelType===`markdown`?await o(T,i.label,{style:i.labelStyle,useHtmlLabels:w,isNode:!0,width:i.width}):await f(T,i.label,i.labelStyle||``,!1,!0);let D=E.getBBox();if(r(m)){let e=E.children[0],t=n(E);D=e.getBoundingClientRect(),t.attr(`width`,D.width),t.attr(`height`,D.height)}let O=i.width<=D.width+i.padding?D.width+i.padding:i.width;i.width<=D.width+i.padding?i.diff=(O-i.width)/2-i.padding:i.diff=-i.padding;let k=i.height,A=i.x-O/2,j=i.y-k/2;t.trace(`Data `,i,JSON.stringify(i));let M;if(i.look===`handDrawn`){let e=l.svg(C),n=s(i,{roughness:.7,fill:_,stroke:v,fillWeight:3,seed:g}),r=e.path(u(A,j,O,k,0),n);M=C.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,x.join(`;`)),M.select(`path`).attr(`style`,S.join(`;`).replace(`fill`,`stroke`))}else M=C.insert(`rect`,`:first-child`),M.attr(`style`,b).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k);let{subGraphTitleTopMargin:N}=p(m);if(T.attr(`transform`,`translate(${i.x-D.width/2}, ${i.y-i.height/2+N})`),y){let e=T.select(`span`);e&&e.attr(`style`,y)}let P=M.node().getBBox();return i.offsetX=0,i.width=P.width,i.height=P.height,i.offsetY=D.height-i.padding/2,i.intersect=function(e){return d(i,e)},{cluster:C,labelBBox:D}},`rect`),g={rect:h,squareRect:h,roundedWithTitle:e(async(e,t)=>{let i=a(),{themeVariables:o,handDrawnSeed:s}=i,{altBackground:c,compositeBackground:p,compositeTitleBackground:m,nodeBorder:h}=o,g=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),_=g.insert(`g`,`:first-child`),v=g.insert(`g`).attr(`class`,`cluster-label`),y=g.append(`rect`),b=await f(v,t.label,t.labelStyle,void 0,!0),x=b.getBBox();if(r(i)){let e=b.children[0],t=n(b);x=e.getBoundingClientRect(),t.attr(`width`,x.width),t.attr(`height`,x.height)}let S=0*t.padding,C=S/2,w=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+S;t.width<=x.width+t.padding?t.diff=(w-t.width)/2-t.padding:t.diff=-t.padding;let T=t.height+S,E=t.height+S-x.height-6,D=t.x-w/2,O=t.y-T/2;t.width=w;let k=t.y-t.height/2-C+x.height+2,A;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=l.svg(g),r=t.rx||t.ry?n.path(u(D,O,w,T,10),{roughness:.7,fill:m,fillStyle:`solid`,stroke:h,seed:s}):n.rectangle(D,O,w,T,{seed:s});A=g.insert(()=>r,`:first-child`);let i=n.rectangle(D,k,w,E,{fill:e?c:p,fillStyle:e?`hachure`:`solid`,stroke:h,seed:s});A=g.insert(()=>r,`:first-child`),y=g.insert(()=>i)}else A=_.insert(`rect`,`:first-child`),A.attr(`class`,`outer`).attr(`x`,D).attr(`y`,O).attr(`width`,w).attr(`height`,T).attr(`data-look`,t.look),y.attr(`class`,`inner`).attr(`x`,D).attr(`y`,k).attr(`width`,w).attr(`height`,E);return v.attr(`transform`,`translate(${t.x-x.width/2}, ${O+1-(r(i)?0:3)})`),t.height=A.node().getBBox().height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(e){return d(t,e)},{cluster:g,labelBBox:x}},`roundedWithTitle`),noteGroup:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return d(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=a(),{nodeBorder:i}=n,o=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),s=o.insert(`g`,`:first-child`),c=0*t.padding,u=t.width+c;t.diff=-t.padding;let f=t.height+c,p=t.x-u/2,m=t.y-f/2;t.width=u;let h;if(t.look===`handDrawn`){let e=l.svg(o).rectangle(p,m,u,f,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});h=o.insert(()=>e,`:first-child`)}else{h=s.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),h.attr(`class`,e).attr(`x`,p).attr(`y`,m).attr(`width`,u).attr(`height`,f).attr(`data-look`,t.look)}return t.height=h.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return d(t,e)},{cluster:o,labelBBox:{}}},`divider`),kanbanSection:e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let f=a(),{themeVariables:m,handDrawnSeed:h}=f,{clusterBkg:g,clusterBorder:_}=m,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=c(i),S=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),C=r(f),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await o(w,i.label,{style:i.labelStyle,useHtmlLabels:C,isNode:!0,width:i.width}),E=T.getBBox();if(r(f)){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.width<=E.width+i.padding?i.diff=(D-i.width)/2-i.padding:i.diff=-i.padding;let O=i.height,k=i.x-D/2,A=i.y-O/2;t.trace(`Data `,i,JSON.stringify(i));let j;if(i.look===`handDrawn`){let e=l.svg(S),n=s(i,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:h}),r=e.path(u(k,A,D,O,i.rx),n);j=S.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=p(f);if(w.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return d(i,e)},{cluster:S,labelBBox:E}},`kanbanSection`),swimlane:m},_=new Map,v=e(async(e,t)=>{let n=await g[t.shape||`rect`](e,t);return _.set(t.id,n),n},`insertCluster`),y=e(()=>{_=new Map},`clear`);export{v as n,y as t}; \ No newline at end of file +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{T as r,g as i,x as a}from"./chunk-DU6HZSFF-B78kfBb6.js";import{n as o}from"./chunk-GMAD6QVW-dCDLGP3F.js";import{a as s,i as c}from"./chunk-P2QGCYS3-BTLpY7ks.js";import{t as l}from"./rough.esm-CSKSodPl.js";import{n as u,r as d,t as f}from"./chunk-4HAMMTFA-Dlc4jvjp.js";import{n as p}from"./chunk-GVQU2GXP-Ddvf-Y11.js";var m=e(async(e,r)=>{let u=a(),{themeVariables:f,handDrawnSeed:p}=u,{clusterBkg:m,clusterBorder:h}=f,g=h,{labelStyles:_,nodeStyles:v,borderStyles:y,backgroundStyles:b}=c(r),x=e.insert(`g`).attr(`class`,`cluster swimlane `+(r.cssClasses||``)).attr(`id`,r.id).attr(`data-id`,r.id).attr(`data-et`,`cluster`).attr(`data-look`,r.look),S=i(u.flowchart.htmlLabels),C=r.direction===`LR`,w=x.insert(`g`).attr(`class`,`cluster-label swimlane-label`),T=await o(w,r.label,{style:r.labelStyle,useHtmlLabels:S,isNode:!0,width:r.width}),E=T.getBBox();if(S){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=r.padding??0,O=r.width<=E.width+D?E.width+D:r.width;r.width<=E.width+D?r.diff=(O-r.width)/2-D:r.diff=-D;let k=r.height,A=r.y-k/2,j=r.y+k/2,M=r.x-O/2,N=r.swimlaneContentTop===void 0?A+k/3:r.swimlaneContentTop,P=C?4:0,F=E.height+2*P,I,L;if(C){let e=Math.max(F,E.height+2*P),t=M+e,n=Math.max(0,O-e);if(r.look===`handDrawn`){let i=l.svg(x),a=s(r,{roughness:.7,fill:m,stroke:g,fillWeight:3,seed:p}),o=s(r,{roughness:.7,fill:`none`,stroke:g,seed:p}),c=i.rectangle(M,A,e,k,a);I=x.insert(()=>c,`:first-child`);let u=i.rectangle(t,A,n,k,o);L=x.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,y.join(`;`)),I.select(`path`).attr(`style`,b.join(`;`).replace(`fill`,`stroke`))}else I=x.insert(`rect`,`:first-child`),L=x.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,v).attr(`x`,M).attr(`y`,A).attr(`width`,e).attr(`height`,k).attr(`fill`,m).attr(`stroke`,g),L.attr(`class`,`swimlane-body`).attr(`style`,v).attr(`x`,t).attr(`y`,A).attr(`width`,n).attr(`height`,k).attr(`fill`,`none`).attr(`stroke`,g);let i=M+e/2,a=r.y;w.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-E.width/2}, ${-E.height/2})`)}else{let e=Math.max(0,N-A),t=Math.min(F,e),n=A+t,i=Math.max(0,j-n),a=r.x-O/2;if(r.look===`handDrawn`){let e=l.svg(x),o=s(r,{roughness:.7,fill:m,stroke:g,fillWeight:3,seed:p}),c=s(r,{roughness:.7,fill:`none`,stroke:g,seed:p}),u=e.rectangle(a,A,O,t,o);I=x.insert(()=>u,`:first-child`);let d=e.rectangle(a,n,O,i,c);L=x.insert(()=>d,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,y.join(`;`)),I.select(`path`).attr(`style`,b.join(`;`).replace(`fill`,`stroke`))}else I=x.insert(`rect`,`:first-child`),L=x.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,v).attr(`x`,a).attr(`y`,A).attr(`width`,O).attr(`height`,t).attr(`fill`,m).attr(`stroke`,g),L.attr(`class`,`swimlane-body`).attr(`style`,v).attr(`x`,a).attr(`y`,n).attr(`width`,O).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,g);let o=r.x-E.width/2,c=A+(t-E.height)/2;w.attr(`transform`,`translate(${o}, ${c})`)}if(t.trace(`Swimlane data `,r,JSON.stringify(r)),_){let e=w.select(`span`);e&&e.attr(`style`,_)}return r.offsetX=0,r.width=O,r.height=k,r.offsetY=E.height-D/2,r.intersect=function(e){return d(r,e)},{cluster:x,labelBBox:E}},`swimlane`),h=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let m=a(),{themeVariables:h,handDrawnSeed:g}=m,{clusterBkg:_,clusterBorder:v}=h,{labelStyles:y,nodeStyles:b,borderStyles:x,backgroundStyles:S}=c(i),C=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),w=r(m),T=C.insert(`g`).attr(`class`,`cluster-label `),E;E=i.labelType===`markdown`?await o(T,i.label,{style:i.labelStyle,useHtmlLabels:w,isNode:!0,width:i.width}):await f(T,i.label,i.labelStyle||``,!1,!0);let D=E.getBBox();if(r(m)){let e=E.children[0],t=n(E);D=e.getBoundingClientRect(),t.attr(`width`,D.width),t.attr(`height`,D.height)}let O=i.width<=D.width+i.padding?D.width+i.padding:i.width;i.width<=D.width+i.padding?i.diff=(O-i.width)/2-i.padding:i.diff=-i.padding;let k=i.height,A=i.x-O/2,j=i.y-k/2;t.trace(`Data `,i,JSON.stringify(i));let M;if(i.look===`handDrawn`){let e=l.svg(C),n=s(i,{roughness:.7,fill:_,stroke:v,fillWeight:3,seed:g}),r=e.path(u(A,j,O,k,0),n);M=C.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,x.join(`;`)),M.select(`path`).attr(`style`,S.join(`;`).replace(`fill`,`stroke`))}else M=C.insert(`rect`,`:first-child`),M.attr(`style`,b).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k);let{subGraphTitleTopMargin:N}=p(m);if(T.attr(`transform`,`translate(${i.x-D.width/2}, ${i.y-i.height/2+N})`),y){let e=T.select(`span`);e&&e.attr(`style`,y)}let P=M.node().getBBox();return i.offsetX=0,i.width=P.width,i.height=P.height,i.offsetY=D.height-i.padding/2,i.intersect=function(e){return d(i,e)},{cluster:C,labelBBox:D}},`rect`),g={rect:h,squareRect:h,roundedWithTitle:e(async(e,t)=>{let i=a(),{themeVariables:o,handDrawnSeed:s}=i,{altBackground:c,compositeBackground:p,compositeTitleBackground:m,nodeBorder:h}=o,g=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),_=g.insert(`g`,`:first-child`),v=g.insert(`g`).attr(`class`,`cluster-label`),y=g.append(`rect`),b=await f(v,t.label,t.labelStyle,void 0,!0),x=b.getBBox();if(r(i)){let e=b.children[0],t=n(b);x=e.getBoundingClientRect(),t.attr(`width`,x.width),t.attr(`height`,x.height)}let S=0*t.padding,C=S/2,w=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+S;t.width<=x.width+t.padding?t.diff=(w-t.width)/2-t.padding:t.diff=-t.padding;let T=t.height+S,E=t.height+S-x.height-6,D=t.x-w/2,O=t.y-T/2;t.width=w;let k=t.y-t.height/2-C+x.height+2,A;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=l.svg(g),r=t.rx||t.ry?n.path(u(D,O,w,T,10),{roughness:.7,fill:m,fillStyle:`solid`,stroke:h,seed:s}):n.rectangle(D,O,w,T,{seed:s});A=g.insert(()=>r,`:first-child`);let i=n.rectangle(D,k,w,E,{fill:e?c:p,fillStyle:e?`hachure`:`solid`,stroke:h,seed:s});A=g.insert(()=>r,`:first-child`),y=g.insert(()=>i)}else A=_.insert(`rect`,`:first-child`),A.attr(`class`,`outer`).attr(`x`,D).attr(`y`,O).attr(`width`,w).attr(`height`,T).attr(`data-look`,t.look),y.attr(`class`,`inner`).attr(`x`,D).attr(`y`,k).attr(`width`,w).attr(`height`,E);return v.attr(`transform`,`translate(${t.x-x.width/2}, ${O+1-(r(i)?0:3)})`),t.height=A.node().getBBox().height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(e){return d(t,e)},{cluster:g,labelBBox:x}},`roundedWithTitle`),noteGroup:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return d(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=a(),{nodeBorder:i}=n,o=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),s=o.insert(`g`,`:first-child`),c=0*t.padding,u=t.width+c;t.diff=-t.padding;let f=t.height+c,p=t.x-u/2,m=t.y-f/2;t.width=u;let h;if(t.look===`handDrawn`){let e=l.svg(o).rectangle(p,m,u,f,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});h=o.insert(()=>e,`:first-child`)}else{h=s.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),h.attr(`class`,e).attr(`x`,p).attr(`y`,m).attr(`width`,u).attr(`height`,f).attr(`data-look`,t.look)}return t.height=h.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return d(t,e)},{cluster:o,labelBBox:{}}},`divider`),kanbanSection:e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let f=a(),{themeVariables:m,handDrawnSeed:h}=f,{clusterBkg:g,clusterBorder:_}=m,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=c(i),S=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),C=r(f),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await o(w,i.label,{style:i.labelStyle,useHtmlLabels:C,isNode:!0,width:i.width}),E=T.getBBox();if(r(f)){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.width<=E.width+i.padding?i.diff=(D-i.width)/2-i.padding:i.diff=-i.padding;let O=i.height,k=i.x-D/2,A=i.y-O/2;t.trace(`Data `,i,JSON.stringify(i));let j;if(i.look===`handDrawn`){let e=l.svg(S),n=s(i,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:h}),r=e.path(u(k,A,D,O,i.rx),n);j=S.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=p(f);if(w.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return d(i,e)},{cluster:S,labelBBox:E}},`kanbanSection`),swimlane:m},_=new Map,v=e(async(e,t)=>{let n=await g[t.shape||`rect`](e,t);return _.set(t.id,n),n},`insertCluster`),y=e(()=>{_=new Map},`clear`);export{v as n,y as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-OSK3NFVY-BT2Y-lqQ.js b/apps/pythinker-code/dist-web/assets/chunk-OSK3NFVY-ZXiPE9OQ.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/chunk-OSK3NFVY-BT2Y-lqQ.js rename to apps/pythinker-code/dist-web/assets/chunk-OSK3NFVY-ZXiPE9OQ.js index 0cb30376e..614ceadcd 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-OSK3NFVY-BT2Y-lqQ.js +++ b/apps/pythinker-code/dist-web/assets/chunk-OSK3NFVY-ZXiPE9OQ.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{T as r,b as i,x as a}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{$ as o,J as s,K as c,Q as l,X as u,Y as d,Z as f,et as p,g as m,nt as h,q as g,rt as _,tt as v,u as y}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as b}from"./line-CleFFpQp.js";import{n as x,r as S}from"./chunk-GMAD6QVW-xizYnG4f.js";import{i as C,n as ee}from"./chunk-P2QGCYS3-CQc2NCc1.js";import{t as te}from"./rough.esm-CSKSodPl.js";import{t as w}from"./chunk-4HAMMTFA-B5soPjjq.js";import{n as T}from"./chunk-GVQU2GXP-BrOdU7Oy.js";var E=e((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),D={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},O={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function k(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=A(e),t=A(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}e(k,`calculateDeltaAndAngle`);var A=e(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),ne=e(t=>({x:e(function(e,n,r){let i=0,a=A(r[0]).x=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(D,t.arrowTypeEnd)){let{angle:e,deltaX:n}=k(r[r.length-1],r[r.length-2]);i=D[t.arrowTypeEnd]*Math.cos(e)*(n>=0?1:-1)}let o=Math.abs(A(e).x-A(r[r.length-1]).x),s=Math.abs(A(e).y-A(r[r.length-1]).y),c=Math.abs(A(e).x-A(r[0]).x),l=Math.abs(A(e).y-A(r[0]).y),u=D[t.arrowTypeStart],d=D[t.arrowTypeEnd];if(o0&&s0&&l=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(D,t.arrowTypeEnd)){let{angle:e,deltaY:n}=k(r[r.length-1],r[r.length-2]);i=D[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(n>=0?1:-1)}let o=Math.abs(A(e).y-A(r[r.length-1]).y),s=Math.abs(A(e).x-A(r[r.length-1]).x),c=Math.abs(A(e).y-A(r[0]).y),l=Math.abs(A(e).x-A(r[0]).x),u=D[t.arrowTypeStart],d=D[t.arrowTypeEnd];if(o0&&s0&&l{t.arrowTypeStart&&N(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&N(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),j={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},M=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],N=e((e,n,r,i,a,o,s=!1,c)=>{if(!r||r===`none`)return;let l=j[r],u=l&&M.includes(l.type);if(!l){t.warn(`Unknown arrow type: ${r}`);return}let d=`${a}_${o}-${l.type}${n===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let t=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(t)){let e=document.getElementById(d);if(e){let n=e.cloneNode(!0);n.id=t,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),e.parentNode?.appendChild(n)}}e.attr(`marker-${n}`,`url(${i}#${t})`)}else e.attr(`marker-${n}`,`url(${i}#${d})`)},`addEdgeMarker`),ie=e(e=>typeof e==`string`?e:a()?.flowchart?.curve,`resolveEdgeCurveType`),P=new Map,F=new Map,I=e(()=>{P.clear(),F.clear()},`clear`),L=e(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),R=e(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),z=e(async(e,i)=>{let o=a(),s=r(o),{labelStyles:c}=C(i);i.labelStyle=c;let l=e.insert(`g`).attr(`class`,`edgeLabel`),u=l.insert(`g`).attr(`class`,`label`).attr(`data-id`,i.id),d=i.labelType===`markdown`,f=await x(e,i.label,{style:R(i.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:d,width:void 0},o);u.node().appendChild(f),t.info(`abc82`,i,i.labelType);let p,m;if(s){let e=f.children[0],t=n(f);p=await S.measure(()=>e.getBoundingClientRect()),m=p,t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=n(f).select(`text`).node();await S.measure(()=>{p=f.getBBox(),m=e&&typeof e.getBBox==`function`?e.getBBox():p})}u.attr(`transform`,E(m,s)),P.set(i.id,l),i.width=p.width,i.height=p.height;let h;if(i.startLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(r,i.startLabelLeft,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).startLeft=t,B(h,i.startLabelLeft)}if(i.startLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(r,i.startLabelRight,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).startRight=t,B(h,i.startLabelRight)}if(i.endLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(t,i.endLabelLeft,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).endLeft=t,B(h,i.endLabelLeft)}if(i.endLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(t,i.endLabelRight,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).endRight=t,B(h,i.endLabelRight)}return f},`insertEdgeLabel`);function B(e,t){r(a())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}e(B,`setTerminalWidth`);var V=e((e,n)=>{t.debug(`Moving label abc88 `,e.id,e.label,P.get(e.id),n);let r=n.updatedPath?n.updatedPath:n.originalPath,{subGraphTitleTotalMargin:i}=T(a());if(e.label){let a=P.get(e.id),o=e.x,s=e.y;if(r){let i=m.calcLabelPosition(r);t.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(o=i.x,s=i.y)}a.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(e.startLabelLeft){let t=F.get(e.id).startLeft,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=F.get(e.id).startRight,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=F.get(e.id).endLeft,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=F.get(e.id).endRight,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),ae=e((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),H=e((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),U=e((e,n,r)=>{t.debug(`intersection calc abc89: +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{T as r,b as i,x as a}from"./chunk-DU6HZSFF-B78kfBb6.js";import{$ as o,J as s,K as c,Q as l,X as u,Y as d,Z as f,et as p,g as m,nt as h,q as g,rt as _,tt as v,u as y}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as b}from"./line-BbuATs2H.js";import{n as x,r as S}from"./chunk-GMAD6QVW-dCDLGP3F.js";import{i as C,n as ee}from"./chunk-P2QGCYS3-BTLpY7ks.js";import{t as te}from"./rough.esm-CSKSodPl.js";import{t as w}from"./chunk-4HAMMTFA-Dlc4jvjp.js";import{n as T}from"./chunk-GVQU2GXP-Ddvf-Y11.js";var E=e((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),D={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},O={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function k(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=A(e),t=A(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}e(k,`calculateDeltaAndAngle`);var A=e(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),ne=e(t=>({x:e(function(e,n,r){let i=0,a=A(r[0]).x=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(D,t.arrowTypeEnd)){let{angle:e,deltaX:n}=k(r[r.length-1],r[r.length-2]);i=D[t.arrowTypeEnd]*Math.cos(e)*(n>=0?1:-1)}let o=Math.abs(A(e).x-A(r[r.length-1]).x),s=Math.abs(A(e).y-A(r[r.length-1]).y),c=Math.abs(A(e).x-A(r[0]).x),l=Math.abs(A(e).y-A(r[0]).y),u=D[t.arrowTypeStart],d=D[t.arrowTypeEnd];if(o0&&s0&&l=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(D,t.arrowTypeEnd)){let{angle:e,deltaY:n}=k(r[r.length-1],r[r.length-2]);i=D[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(n>=0?1:-1)}let o=Math.abs(A(e).y-A(r[r.length-1]).y),s=Math.abs(A(e).x-A(r[r.length-1]).x),c=Math.abs(A(e).y-A(r[0]).y),l=Math.abs(A(e).x-A(r[0]).x),u=D[t.arrowTypeStart],d=D[t.arrowTypeEnd];if(o0&&s0&&l{t.arrowTypeStart&&N(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&N(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),j={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},M=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],N=e((e,n,r,i,a,o,s=!1,c)=>{if(!r||r===`none`)return;let l=j[r],u=l&&M.includes(l.type);if(!l){t.warn(`Unknown arrow type: ${r}`);return}let d=`${a}_${o}-${l.type}${n===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let t=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(t)){let e=document.getElementById(d);if(e){let n=e.cloneNode(!0);n.id=t,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),e.parentNode?.appendChild(n)}}e.attr(`marker-${n}`,`url(${i}#${t})`)}else e.attr(`marker-${n}`,`url(${i}#${d})`)},`addEdgeMarker`),ie=e(e=>typeof e==`string`?e:a()?.flowchart?.curve,`resolveEdgeCurveType`),P=new Map,F=new Map,I=e(()=>{P.clear(),F.clear()},`clear`),L=e(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),R=e(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),z=e(async(e,i)=>{let o=a(),s=r(o),{labelStyles:c}=C(i);i.labelStyle=c;let l=e.insert(`g`).attr(`class`,`edgeLabel`),u=l.insert(`g`).attr(`class`,`label`).attr(`data-id`,i.id),d=i.labelType===`markdown`,f=await x(e,i.label,{style:R(i.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:d,width:void 0},o);u.node().appendChild(f),t.info(`abc82`,i,i.labelType);let p,m;if(s){let e=f.children[0],t=n(f);p=await S.measure(()=>e.getBoundingClientRect()),m=p,t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=n(f).select(`text`).node();await S.measure(()=>{p=f.getBBox(),m=e&&typeof e.getBBox==`function`?e.getBBox():p})}u.attr(`transform`,E(m,s)),P.set(i.id,l),i.width=p.width,i.height=p.height;let h;if(i.startLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(r,i.startLabelLeft,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).startLeft=t,B(h,i.startLabelLeft)}if(i.startLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(r,i.startLabelRight,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).startRight=t,B(h,i.startLabelRight)}if(i.endLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(t,i.endLabelLeft,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).endLeft=t,B(h,i.endLabelLeft)}if(i.endLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await w(t,i.endLabelRight,R(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,E(o,s)),F.get(i.id)||F.set(i.id,{}),F.get(i.id).endRight=t,B(h,i.endLabelRight)}return f},`insertEdgeLabel`);function B(e,t){r(a())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}e(B,`setTerminalWidth`);var V=e((e,n)=>{t.debug(`Moving label abc88 `,e.id,e.label,P.get(e.id),n);let r=n.updatedPath?n.updatedPath:n.originalPath,{subGraphTitleTotalMargin:i}=T(a());if(e.label){let a=P.get(e.id),o=e.x,s=e.y;if(r){let i=m.calcLabelPosition(r);t.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(o=i.x,s=i.y)}a.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(e.startLabelLeft){let t=F.get(e.id).startLeft,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=F.get(e.id).startRight,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=F.get(e.id).endLeft,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=F.get(e.id).endRight,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),ae=e((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),H=e((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),U=e((e,n,r)=>{t.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(n)} insidePoint : ${JSON.stringify(r)} node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2,c=r.xMath.abs(i-n.x)*l){let e=r.y{t.warn(`abc88 cutPathAtIntersect`,e,n);let r=[],i=e[0],a=!1;return e.forEach(e=>{if(t.info(`abc88 checking point`,e,n),!H(n,e)&&!a){let o=U(n,i,e);t.debug(`abc88 inside`,e,i,o),t.debug(`abc88 intersection`,o,n);let s=!1;r.forEach(e=>{s||=e.x===o.x&&e.y===o.y}),r.some(e=>e.x===o.x&&e.y===o.y)?t.warn(`abc88 no intersect`,o,r):r.push(o),a=!0}else t.warn(`abc88 outside`,e,i),i=e,a||r.push(e)}),t.debug(`returning points`,r),r},`cutPathAtIntersect`);function G(e){let t=[],n=[];for(let r=1;r5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}e(G,`extractCornerPoints`);var K=e(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),oe=e(function(e){let{cornerPointPositions:n}=G(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10?(t.debug(`Corner point fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),f=o.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:u<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:u<0?s.y-5+d:s.y+5-d}):t.debug(`Corner point skipping fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),r.push(f,c)}else r.push(e[i]);return r},`fixCorners`),se=e((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(Number.isFinite(i)?Math.max(0,i):0).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),q=e(function(e,r,i,x,S,C,w,T=!1){if(!w)throw Error(`insertEdge: missing diagramId for edge "${r.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:E,layout:D}=a(),k=r.points,A=!1,j=S;var M=C;let N=[];for(let e in r.cssCompiledStyles)ee(e)||N.push(r.cssCompiledStyles[e]);if(D===`swimlane`){if(M.intersect&&j.intersect&&Array.isArray(k)&&k.length>=2)if(k.length===2)k=[j.intersect(k[0]),M.intersect(k[1])];else{let e=k.slice(1,-1),t=e[0],n=e[e.length-1],r=.5,i=Math.abs(k[k.length-1].x-n.x)!Number.isNaN(e.y)),I=ie(r.curve);I!==`rounded`&&(F=oe(F));let L=_;switch(I){case`linear`:L=_;break;case`basis`:L=p;break;case`cardinal`:L=o;break;case`bumpX`:L=v;break;case`bumpY`:L=h;break;case`catmullRom`:L=l;break;case`monotoneX`:L=u;break;case`monotoneY`:L=f;break;case`natural`:L=d;break;case`step`:L=s;break;case`stepAfter`:L=c;break;case`stepBefore`:L=g;break;case`rounded`:L=_;break;default:L=p}let{x:R,y:z}=ne(r),B=b().x(R).y(z).curve(L),V;switch(r.thickness){case`normal`:V=`edge-thickness-normal`;break;case`thick`:V=`edge-thickness-thick`;break;case`invisible`:V=`edge-thickness-invisible`;break;default:V=`edge-thickness-normal`}switch(r.pattern){case`solid`:V+=` edge-pattern-solid`;break;case`dotted`:V+=` edge-pattern-dotted`;break;case`dashed`:V+=` edge-pattern-dashed`;break;default:V+=` edge-pattern-solid`}let H,U=I===`rounded`?J(X(F,r),5):B(F),G=Array.isArray(r.style)?r.style:[r.style],K=G.find(e=>e?.startsWith(`stroke:`)),q=``;r.animate&&(q=`edge-animation-fast`),r.animation&&(q=`edge-animation-`+r.animation);let Y=!1;if(r.look===`handDrawn`){let t=te.svg(e);Object.assign([],F);let i=t.path(U,{roughness:.3,seed:E});V+=` transition`,H=n(i).select(`path`).attr(`id`,`${w}-${r.id}`).attr(`class`,` `+V+(r.classes?` `+r.classes:``)+(q?` `+q:``)).attr(`style`,G?G.reduce((e,t)=>e+`;`+t,``):``);let a=H.attr(`d`);H.attr(`d`,a),e.node().appendChild(H.node())}else{let t=N.join(`;`),n=G?G.reduce((e,t)=>e+t+`;`,``):``,i=(t?t+`;`+n+`;`:n)+`;`+(G?G.reduce((e,t)=>e+`;`+t,``):``);H=e.append(`path`).attr(`d`,U).attr(`id`,`${w}-${r.id}`).attr(`class`,` `+V+(r.classes?` `+r.classes:``)+(q?` `+q:``)).attr(`style`,i),K=i.match(/stroke:([^;]+)/)?.[1],Y=r.animate===!0||!!r.animation||t.includes(`animation`);let a=H.node(),o=typeof a.getTotalLength==`function`?a.getTotalLength():0,s=O[r.arrowTypeStart]||0,c=O[r.arrowTypeEnd]||0;if(r.look===`neo`&&!Y){let e=`stroke-dasharray: ${r.pattern===`dotted`||r.pattern===`dashed`?se(o,s,c):`0 ${s} ${o-s-c} ${c}`}; stroke-dashoffset: 0;`;H.attr(`style`,e+H.attr(`style`))}}H.attr(`data-edge`,!0),H.attr(`data-et`,`edge`),H.attr(`data-id`,r.id),H.attr(`data-points`,P),H.attr(`data-look`,y(r.look)),r.showPoints&&F.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let Z=``;(a().flowchart.arrowMarkerAbsolute||a().state.arrowMarkerAbsolute)&&(Z=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,Z=Z.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),t.info(`arrowTypeStart`,r.arrowTypeStart),t.info(`arrowTypeEnd`,r.arrowTypeEnd);let Q=!Y&&r?.look===`neo`;re(H,r,Z,w,x,Q,K);let ce=Math.floor(k.length/2),le=k[ce];m.isLabelCoordinateInPath(le,H.attr(`d`))||(A=!0);let $={};return A&&($.updatedPath=k),$.originalPath=r.points,$},`insertEdge`);function J(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a({...e}));if(e.length>=2&&D[t.arrowTypeStart]){let r=D[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=Y(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&D[t.arrowTypeEnd]){let i=D[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=Y(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}e(X,`applyMarkerOffsetsToPoints`);var Z=e((e,t,n,r)=>{t.forEach(t=>{Q[t](e,n,r)})},`insertMarkers`),Q={extension:e((e,n,r)=>{t.trace(`Making markers for `,r),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionStart`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd`).attr(`class`,`marker extension `+n).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,r+`_`+n+`-extensionStart-margin`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd-margin`).attr(`class`,`marker extension `+n).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:e((e,t,n)=>{let{themeVariables:r}=i(),{transitionColor:a}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${a}`)},`barbNeo`),only_one:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:e((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:e((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${a}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${a}`)},`only_one_neo`),zero_or_one_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a,mainBkg:o}=r,s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${a}`).attr(`r`,6),s.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${a}`);let c=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);c.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${a}`).attr(`r`,6),c.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${a}`)},`zero_or_one_neo`),one_or_more_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${a}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${a}`)},`one_or_more_neo`),zero_or_more_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a,mainBkg:o}=r,s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${a}`),s.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${a}`);let c=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);c.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${a}`),c.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${a}`)},`zero_or_more_neo`),requirement_arrow:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0 diff --git a/apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-CQc2NCc1.js b/apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-BTLpY7ks.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-CQc2NCc1.js rename to apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-BTLpY7ks.js index 529d62b37..85e58e19c 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-CQc2NCc1.js +++ b/apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-BTLpY7ks.js @@ -1 +1 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{x as t}from"./chunk-DU6HZSFF-DfRjAqU1.js";var n=e(e=>{let{handDrawnSeed:n}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:n}},`solidStateFill`),r=e(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),i=e(e=>{let t=a([...e.cssCompiledStyles||[],...e.cssStyles||[],...r(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),a=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),o=e(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),s=e(e=>{let{stylesArray:t}=i(e),n=[],r=[],a=[],s=[];return t.forEach(e=>{let t=e[0];o(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&a.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:a,backgroundStyles:s}},`styles2String`),c=e((e,n)=>{let{themeVariables:r,handDrawnSeed:a}=t(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:c}=i(e);return Object.assign({roughness:.7,fill:c.get(`fill`)||s,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:c.get(`stroke`)||o,seed:a,strokeWidth:c.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:l(c.get(`stroke-dasharray`))},n)},`userNodeOverrides`),l=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{c as a,s as i,o as n,n as r,i as t}; \ No newline at end of file +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{x as t}from"./chunk-DU6HZSFF-B78kfBb6.js";var n=e(e=>{let{handDrawnSeed:n}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:n}},`solidStateFill`),r=e(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),i=e(e=>{let t=a([...e.cssCompiledStyles||[],...e.cssStyles||[],...r(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),a=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),o=e(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),s=e(e=>{let{stylesArray:t}=i(e),n=[],r=[],a=[],s=[];return t.forEach(e=>{let t=e[0];o(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&a.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:a,backgroundStyles:s}},`styles2String`),c=e((e,n)=>{let{themeVariables:r,handDrawnSeed:a}=t(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:c}=i(e);return Object.assign({roughness:.7,fill:c.get(`fill`)||s,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:c.get(`stroke`)||o,seed:a,strokeWidth:c.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:l(c.get(`stroke-dasharray`))},n)},`userNodeOverrides`),l=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{c as a,s as i,o as n,n as r,i as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-DOQphBqd.js b/apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-DJwAvunU.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-DOQphBqd.js rename to apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-DJwAvunU.js index a3298a584..771b144fe 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-DOQphBqd.js +++ b/apps/pythinker-code/dist-web/assets/chunk-P2QGCYS3-DJwAvunU.js @@ -1 +1 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{x as t}from"./chunk-DU6HZSFF-CcF2nKWM.js";var n=e(e=>{let{handDrawnSeed:n}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:n}},`solidStateFill`),r=e(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),i=e(e=>{let t=a([...e.cssCompiledStyles||[],...e.cssStyles||[],...r(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),a=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),o=e(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),s=e(e=>{let{stylesArray:t}=i(e),n=[],r=[],a=[],s=[];return t.forEach(e=>{let t=e[0];o(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&a.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:a,backgroundStyles:s}},`styles2String`),c=e((e,n)=>{let{themeVariables:r,handDrawnSeed:a}=t(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:c}=i(e);return Object.assign({roughness:.7,fill:c.get(`fill`)||s,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:c.get(`stroke`)||o,seed:a,strokeWidth:c.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:l(c.get(`stroke-dasharray`))},n)},`userNodeOverrides`),l=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{c as a,s as i,o as n,n as r,i as t}; \ No newline at end of file +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{x as t}from"./chunk-DU6HZSFF-CbPIJzjs.js";var n=e(e=>{let{handDrawnSeed:n}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:n}},`solidStateFill`),r=e(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),i=e(e=>{let t=a([...e.cssCompiledStyles||[],...e.cssStyles||[],...r(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),a=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),o=e(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),s=e(e=>{let{stylesArray:t}=i(e),n=[],r=[],a=[],s=[];return t.forEach(e=>{let t=e[0];o(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&a.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:a,backgroundStyles:s}},`styles2String`),c=e((e,n)=>{let{themeVariables:r,handDrawnSeed:a}=t(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:c}=i(e);return Object.assign({roughness:.7,fill:c.get(`fill`)||s,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:c.get(`stroke`)||o,seed:a,strokeWidth:c.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:l(c.get(`stroke-dasharray`))},n)},`userNodeOverrides`),l=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{c as a,s as i,o as n,n as r,i as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BiMU0_kH.js b/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-1k8n9Sa3.js similarity index 77% rename from apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BiMU0_kH.js rename to apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-1k8n9Sa3.js index b3bae2ec7..8608a59b1 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BiMU0_kH.js +++ b/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-1k8n9Sa3.js @@ -1 +1 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{c as n}from"./chunk-DU6HZSFF-CcF2nKWM.js";var r=t((t,r,o,s)=>{t.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(t,r);n(t,l,c,s);let f=a(u,d,c,l,r);t.attr(`viewBox`,f),e.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=t((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=t((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t}; \ No newline at end of file +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{c as n}from"./chunk-DU6HZSFF-CbPIJzjs.js";var r=t((t,r,o,s)=>{t.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(t,r);n(t,l,c,s);let f=a(u,d,c,l,r);t.attr(`viewBox`,f),e.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=t((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=t((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BCRCUUP_.js b/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-mwDJO2QS.js similarity index 77% rename from apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BCRCUUP_.js rename to apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-mwDJO2QS.js index 9c61cb68e..89d66623f 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-BCRCUUP_.js +++ b/apps/pythinker-code/dist-web/assets/chunk-POPQ4Y6H-mwDJO2QS.js @@ -1 +1 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{c as n}from"./chunk-DU6HZSFF-DfRjAqU1.js";var r=e((e,r,o,s)=>{e.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(e,r);n(e,l,c,s);let f=a(u,d,c,l,r);e.attr(`viewBox`,f),t.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=e((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=e((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t}; \ No newline at end of file +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{c as n}from"./chunk-DU6HZSFF-B78kfBb6.js";var r=e((e,r,o,s)=>{e.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(e,r);n(e,l,c,s);let f=a(u,d,c,l,r);e.attr(`viewBox`,f),t.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=e((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=e((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-vmg_e0ho.js b/apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-D9eOryqj.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-vmg_e0ho.js rename to apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-D9eOryqj.js index da8266c81..65f39218d 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-vmg_e0ho.js +++ b/apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-D9eOryqj.js @@ -1 +1 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{b as n,z as r}from"./chunk-DU6HZSFF-DfRjAqU1.js";var i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...i,...a}),s=Object.freeze({...o,body:``,hidden:!1}),c=Object.freeze({width:null,height:null}),l=Object.freeze({...c,...a}),u=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!d(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!d(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!d(e,n)?null:e}return null},d=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function f(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function p(e,t){let n=f(e,t);for(let r in s)r in a?r in e&&!(r in n)&&(n[r]=a[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function m(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function h(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=p(r[e]||i[e],a)}return o(t),n.forEach(o),p(e,a)}function g(e,t){if(e.icons[t])return h(e,t,[]);let n=m(e,[t])[t];return n?h(e,t,n):null}var _=/(-?[0-9.]*[0-9]+[0-9.]*)/g,v=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=v.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function b(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(``,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function x(e,t){return e?``+e+``+t:t}function S(e,t,n){let r=b(e);return x(r.defs,t+r.content+n)}var C=e=>e===`unset`||e===`undefined`||e===`none`;function w(e,t){let n={...o,...e},r={...l,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=S(a,``,``))});let s=r.width,c=r.height,u=i.width,d=i.height,f,p;s===null?(p=c===null?`1em`:c===`auto`?d:c,f=y(p,u/d)):(f=s===`auto`?u:s,p=c===null?y(f,d/u):c===`auto`?d:c);let m={},h=(e,t)=>{C(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[i.left,i.top,u,d];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:a}}var T=/\sid="(\S+)"/g,E=new Map;function D(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=E.get(e)||0;return E.set(e,t+1),t?`${e}${t}`:e}function O(e){let t=[],n;for(;n=T.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=D(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function k(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return``+e+``}var A={body:`?`,height:80,width:80},j=new Map,M=new Map,N=e(e=>{for(let n of e){if(!n.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(t.debug(`Registering icon pack:`,n.name),`loader`in n)M.set(n.name,n.loader);else if(`icons`in n)j.set(n.name,n.icons);else throw t.error(`Invalid icon loader:`,n),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),P=e(async(e,n)=>{let r=u(e,!0,n!==void 0);if(!r)throw Error(`Invalid icon name: ${e}`);let i=r.prefix||n;if(!i)throw Error(`Icon name must contain a prefix: ${e}`);let a=j.get(i);if(!a){let e=M.get(i);if(!e)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await e(),prefix:i},j.set(i,a)}catch(e){throw t.error(e),Error(`Failed to load icon set: ${r.prefix}`)}}let o=g(a,r.name);if(!o)throw Error(`Icon not found: ${e}`);return o},`getRegisteredIconData`),F=e(async e=>{try{return await P(e),!0}catch{return!1}},`isIconAvailable`),I=e(async(e,i,a)=>{let o;try{o=await P(e,i?.fallbackPrefix)}catch(e){t.error(e),o=A}let s=w(o,i);return r(k(O(s.body),{...s.attributes,...a}),n())},`getIconSVG`);export{A as i,F as n,N as r,I as t}; \ No newline at end of file +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{b as n,z as r}from"./chunk-DU6HZSFF-B78kfBb6.js";var i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...i,...a}),s=Object.freeze({...o,body:``,hidden:!1}),c=Object.freeze({width:null,height:null}),l=Object.freeze({...c,...a}),u=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!d(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!d(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!d(e,n)?null:e}return null},d=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function f(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function p(e,t){let n=f(e,t);for(let r in s)r in a?r in e&&!(r in n)&&(n[r]=a[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function m(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function h(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=p(r[e]||i[e],a)}return o(t),n.forEach(o),p(e,a)}function g(e,t){if(e.icons[t])return h(e,t,[]);let n=m(e,[t])[t];return n?h(e,t,n):null}var _=/(-?[0-9.]*[0-9]+[0-9.]*)/g,v=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=v.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function b(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(``,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function x(e,t){return e?``+e+``+t:t}function S(e,t,n){let r=b(e);return x(r.defs,t+r.content+n)}var C=e=>e===`unset`||e===`undefined`||e===`none`;function w(e,t){let n={...o,...e},r={...l,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=S(a,``,``))});let s=r.width,c=r.height,u=i.width,d=i.height,f,p;s===null?(p=c===null?`1em`:c===`auto`?d:c,f=y(p,u/d)):(f=s===`auto`?u:s,p=c===null?y(f,d/u):c===`auto`?d:c);let m={},h=(e,t)=>{C(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[i.left,i.top,u,d];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:a}}var T=/\sid="(\S+)"/g,E=new Map;function D(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=E.get(e)||0;return E.set(e,t+1),t?`${e}${t}`:e}function O(e){let t=[],n;for(;n=T.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=D(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function k(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return``+e+``}var A={body:`?`,height:80,width:80},j=new Map,M=new Map,N=e(e=>{for(let n of e){if(!n.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(t.debug(`Registering icon pack:`,n.name),`loader`in n)M.set(n.name,n.loader);else if(`icons`in n)j.set(n.name,n.icons);else throw t.error(`Invalid icon loader:`,n),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),P=e(async(e,n)=>{let r=u(e,!0,n!==void 0);if(!r)throw Error(`Invalid icon name: ${e}`);let i=r.prefix||n;if(!i)throw Error(`Icon name must contain a prefix: ${e}`);let a=j.get(i);if(!a){let e=M.get(i);if(!e)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await e(),prefix:i},j.set(i,a)}catch(e){throw t.error(e),Error(`Failed to load icon set: ${r.prefix}`)}}let o=g(a,r.name);if(!o)throw Error(`Icon not found: ${e}`);return o},`getRegisteredIconData`),F=e(async e=>{try{return await P(e),!0}catch{return!1}},`isIconAvailable`),I=e(async(e,i,a)=>{let o;try{o=await P(e,i?.fallbackPrefix)}catch(e){t.error(e),o=A}let s=w(o,i);return r(k(O(s.body),{...s.attributes,...a}),n())},`getIconSVG`);export{A as i,F as n,N as r,I as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-DCTitH5S.js b/apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-Dsc8rvy3.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-DCTitH5S.js rename to apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-Dsc8rvy3.js index d539bd636..49a7cd357 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-DCTitH5S.js +++ b/apps/pythinker-code/dist-web/assets/chunk-PWAF6VOD-Dsc8rvy3.js @@ -1 +1 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{b as n,z as r}from"./chunk-DU6HZSFF-CcF2nKWM.js";const i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...i,...a}),s=Object.freeze({...o,body:``,hidden:!1}),c=Object.freeze({width:null,height:null}),l=Object.freeze({...c,...a}),u=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!d(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!d(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!d(e,n)?null:e}return null},d=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function f(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function p(e,t){let n=f(e,t);for(let r in s)r in a?r in e&&!(r in n)&&(n[r]=a[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function m(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function h(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=p(r[e]||i[e],a)}return o(t),n.forEach(o),p(e,a)}function g(e,t){if(e.icons[t])return h(e,t,[]);let n=m(e,[t])[t];return n?h(e,t,n):null}const _=/(-?[0-9.]*[0-9]+[0-9.]*)/g,v=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=v.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function b(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(``,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function x(e,t){return e?``+e+``+t:t}function S(e,t,n){let r=b(e);return x(r.defs,t+r.content+n)}const C=e=>e===`unset`||e===`undefined`||e===`none`;function w(e,t){let n={...o,...e},r={...l,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=S(a,``,``))});let s=r.width,c=r.height,u=i.width,d=i.height,f,p;s===null?(p=c===null?`1em`:c===`auto`?d:c,f=y(p,u/d)):(f=s===`auto`?u:s,p=c===null?y(f,d/u):c===`auto`?d:c);let m={},h=(e,t)=>{C(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[i.left,i.top,u,d];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:a}}const T=/\sid="(\S+)"/g,E=new Map;function D(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=E.get(e)||0;return E.set(e,t+1),t?`${e}${t}`:e}function O(e){let t=[],n;for(;n=T.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=D(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function k(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return``+e+``}var A={body:`?`,height:80,width:80},j=new Map,M=new Map,N=t(t=>{for(let n of t){if(!n.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(e.debug(`Registering icon pack:`,n.name),`loader`in n)M.set(n.name,n.loader);else if(`icons`in n)j.set(n.name,n.icons);else throw e.error(`Invalid icon loader:`,n),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),P=t(async(t,n)=>{let r=u(t,!0,n!==void 0);if(!r)throw Error(`Invalid icon name: ${t}`);let i=r.prefix||n;if(!i)throw Error(`Icon name must contain a prefix: ${t}`);let a=j.get(i);if(!a){let t=M.get(i);if(!t)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:i},j.set(i,a)}catch(t){throw e.error(t),Error(`Failed to load icon set: ${r.prefix}`)}}let o=g(a,r.name);if(!o)throw Error(`Icon not found: ${t}`);return o},`getRegisteredIconData`),F=t(async e=>{try{return await P(e),!0}catch{return!1}},`isIconAvailable`),I=t(async(t,i,a)=>{let o;try{o=await P(t,i?.fallbackPrefix)}catch(t){e.error(t),o=A}let s=w(o,i);return r(k(O(s.body),{...s.attributes,...a}),n())},`getIconSVG`);export{A as i,F as n,N as r,I as t}; \ No newline at end of file +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{b as n,z as r}from"./chunk-DU6HZSFF-CbPIJzjs.js";const i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...i,...a}),s=Object.freeze({...o,body:``,hidden:!1}),c=Object.freeze({width:null,height:null}),l=Object.freeze({...c,...a}),u=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!d(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!d(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!d(e,n)?null:e}return null},d=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function f(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function p(e,t){let n=f(e,t);for(let r in s)r in a?r in e&&!(r in n)&&(n[r]=a[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function m(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function h(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=p(r[e]||i[e],a)}return o(t),n.forEach(o),p(e,a)}function g(e,t){if(e.icons[t])return h(e,t,[]);let n=m(e,[t])[t];return n?h(e,t,n):null}const _=/(-?[0-9.]*[0-9]+[0-9.]*)/g,v=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=v.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function b(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(``,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function x(e,t){return e?``+e+``+t:t}function S(e,t,n){let r=b(e);return x(r.defs,t+r.content+n)}const C=e=>e===`unset`||e===`undefined`||e===`none`;function w(e,t){let n={...o,...e},r={...l,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=S(a,``,``))});let s=r.width,c=r.height,u=i.width,d=i.height,f,p;s===null?(p=c===null?`1em`:c===`auto`?d:c,f=y(p,u/d)):(f=s===`auto`?u:s,p=c===null?y(f,d/u):c===`auto`?d:c);let m={},h=(e,t)=>{C(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[i.left,i.top,u,d];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:a}}const T=/\sid="(\S+)"/g,E=new Map;function D(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=E.get(e)||0;return E.set(e,t+1),t?`${e}${t}`:e}function O(e){let t=[],n;for(;n=T.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=D(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function k(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return``+e+``}var A={body:`?`,height:80,width:80},j=new Map,M=new Map,N=t(t=>{for(let n of t){if(!n.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(e.debug(`Registering icon pack:`,n.name),`loader`in n)M.set(n.name,n.loader);else if(`icons`in n)j.set(n.name,n.icons);else throw e.error(`Invalid icon loader:`,n),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),P=t(async(t,n)=>{let r=u(t,!0,n!==void 0);if(!r)throw Error(`Invalid icon name: ${t}`);let i=r.prefix||n;if(!i)throw Error(`Icon name must contain a prefix: ${t}`);let a=j.get(i);if(!a){let t=M.get(i);if(!t)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:i},j.set(i,a)}catch(t){throw e.error(t),Error(`Failed to load icon set: ${r.prefix}`)}}let o=g(a,r.name);if(!o)throw Error(`Icon not found: ${t}`);return o},`getRegisteredIconData`),F=t(async e=>{try{return await P(e),!0}catch{return!1}},`isIconAvailable`),I=t(async(t,i,a)=>{let o;try{o=await P(t,i?.fallbackPrefix)}catch(t){e.error(t),o=A}let s=w(o,i);return r(k(O(s.body),{...s.attributes,...a}),n())},`getIconSVG`);export{A as i,F as n,N as r,I as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-DDD40i3c.js b/apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-CC_ZJJY0.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-DDD40i3c.js rename to apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-CC_ZJJY0.js index 3e8870871..ed7b062d2 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-DDD40i3c.js +++ b/apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-CC_ZJJY0.js @@ -1,4 +1,4 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{$ as r,G as i,H as a,K as o,U as s,a as c,d as l,it as u,k as d,s as f,v as p,w as ee,x as m,y as h}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as te}from"./channel-DGuPsbDk.js";import{c as g,g as _}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{i as ne}from"./chunk-4HAMMTFA-B0yXCELs.js";import{i as re,n as v,r as y,t as b}from"./mermaidParser.worker-_pLIm6No.js";import{t as x}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as S}from"./chunk-F27PBJKO-BiUOMdWi.js";import{t as C}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as w}from"./chunk-POPQ4Y6H-BiMU0_kH.js";var T=`flowchart-`,E=class{constructor(){this.vertexCounter=0,this.config=m(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=s,this.setAccDescription=a,this.setDiagramTitle=o,this.getAccTitle=h,this.getAccDescription=p,this.getDiagramTitle=ee,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{n(this,`FlowDB`)}sanitizeText(e){return f.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(t,n,r,i,a,o,s={},c){if(!t||t.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(` +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{$ as r,G as i,H as a,K as o,U as s,a as c,d as l,it as u,k as d,s as f,v as p,w as ee,x as m,y as h}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as te}from"./channel-CdQthrj0.js";import{c as g,g as _}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{i as ne}from"./chunk-4HAMMTFA-X3JAMEe8.js";import{i as re,n as v,r as y,t as b}from"./mermaidParser.worker-CBWarbNh.js";import{t as x}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as S}from"./chunk-F27PBJKO-DTzbeXt1.js";import{t as C}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as w}from"./chunk-POPQ4Y6H-1k8n9Sa3.js";var T=`flowchart-`,E=class{constructor(){this.vertexCounter=0,this.config=m(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=s,this.setAccDescription=a,this.setDiagramTitle=o,this.getAccTitle=h,this.getAccDescription=p,this.getDiagramTitle=ee,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{n(this,`FlowDB`)}sanitizeText(e){return f.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(t,n,r,i,a,o,s={},c){if(!t||t.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(` `)?c+` `:`{ `+c+` diff --git a/apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-BDvl1UFN.js b/apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-DUVFz2b-.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-BDvl1UFN.js rename to apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-DUVFz2b-.js index 63b6e6313..924d7d55a 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-BDvl1UFN.js +++ b/apps/pythinker-code/dist-web/assets/chunk-SHT3W25Y-DUVFz2b-.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{G as r,H as i,K as a,U as o,a as s,d as c,k as l,rt as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as g}from"./channel-BAi54gt4.js";import{t as ee}from"./purify.es-CvIXgbbv.js";import{c as _,g as te}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as ne}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{i as re}from"./chunk-4HAMMTFA-B5soPjjq.js";import{t as v}from"./chunk-F27PBJKO-DeO1S11A.js";import{t as y}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as b}from"./chunk-POPQ4Y6H-BCRCUUP_.js";import{r as x,t as S}from"./chunk-TLUHSLCS-DN2eHVWx.js";import{n as C,t as w}from"./chunk-LNGE3PJU-OosUmKKA.js";var T=`flowchart-`,E=class{constructor(){this.vertexCounter=0,this.config=m(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=o,this.setAccDescription=i,this.setDiagramTitle=a,this.getAccTitle=h,this.getAccDescription=f,this.getDiagramTitle=p,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`FlowDB`)}sanitizeText(e){return d.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,n,r,i,a,o,s={},c){if(!e||e.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(` +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{G as r,H as i,K as a,U as o,a as s,d as c,k as l,rt as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as g}from"./channel-CZ7H-7IH.js";import{t as ee}from"./purify.es-F_7NWVtX.js";import{c as _,g as te}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as ne}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{i as re}from"./chunk-4HAMMTFA-Dlc4jvjp.js";import{t as v}from"./chunk-F27PBJKO-Duq9tlNm.js";import{t as y}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as b}from"./chunk-POPQ4Y6H-mwDJO2QS.js";import{r as x,t as S}from"./chunk-TLUHSLCS-B1Sp0tTt.js";import{n as C,t as w}from"./chunk-LNGE3PJU-OosUmKKA.js";var T=`flowchart-`,E=class{constructor(){this.vertexCounter=0,this.config=m(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=o,this.setAccDescription=i,this.setDiagramTitle=a,this.getAccTitle=h,this.getAccDescription=f,this.getDiagramTitle=p,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`FlowDB`)}sanitizeText(e){return d.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,n,r,i,a,o,s={},c){if(!e||e.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(` `)?c+` `:`{ `+c+` diff --git a/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-BnQxQiBZ.js b/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-CWy3EboY.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-BnQxQiBZ.js rename to apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-CWy3EboY.js index 044e68ed5..9a293e272 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-BnQxQiBZ.js +++ b/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-CWy3EboY.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{D as n,a as r,b as i,c as a,x as o,z as s}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as c}from"./chunk-CLGD4ZFX-D_luxf7b.js";var l=``,u=``,d=``,f=[],p=new Map,m=e(e=>s(e,o()),`sanitizeText`),h=e(e=>{switch(e.type){case`terminal`:return{...e,value:m(e.value)};case`nonterminal`:return{...e,name:m(e.name)};case`sequence`:return{...e,elements:e.elements.map(h)};case`choice`:return{...e,alternatives:e.alternatives.map(h)};case`optional`:return{...e,element:h(e.element)};case`repetition`:return{...e,element:h(e.element),separator:e.separator?h(e.separator):void 0};case`special`:return{...e,text:m(e.text)}}},`sanitizeAstNode`),g=e(()=>{l=``,u=``,d=``,f.length=0,p.clear(),r(),t.debug(`[Railroad] Database cleared`)},`clear`),_=e(e=>{l=m(e),t.debug(`[Railroad] Title set:`,e)},`setTitle`),v=e(()=>l,`getTitle`),y={clear:g,setTitle:_,getTitle:v,addRule:e(e=>{let n={...e,name:m(e.name),definition:h(e.definition),comment:e.comment?m(e.comment):void 0};t.debug(`[Railroad] Adding rule:`,n.name),p.has(n.name)&&t.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`),f.push(n),p.set(n.name,n)},`addRule`),getRules:e(()=>f,`getRules`),getRule:e(e=>p.get(e),`getRule`),setAccTitle:e(e=>{u=m(e).replace(/^\s+/g,``),t.debug(`[Railroad] Accessibility title set:`,e)},`setAccTitle`),getAccTitle:e(()=>u,`getAccTitle`),setAccDescription:e(e=>{d=m(e).replace(/\n\s+/g,` +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{D as n,a as r,b as i,c as a,x as o,z as s}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as c}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";var l=``,u=``,d=``,f=[],p=new Map,m=e(e=>s(e,o()),`sanitizeText`),h=e(e=>{switch(e.type){case`terminal`:return{...e,value:m(e.value)};case`nonterminal`:return{...e,name:m(e.name)};case`sequence`:return{...e,elements:e.elements.map(h)};case`choice`:return{...e,alternatives:e.alternatives.map(h)};case`optional`:return{...e,element:h(e.element)};case`repetition`:return{...e,element:h(e.element),separator:e.separator?h(e.separator):void 0};case`special`:return{...e,text:m(e.text)}}},`sanitizeAstNode`),g=e(()=>{l=``,u=``,d=``,f.length=0,p.clear(),r(),t.debug(`[Railroad] Database cleared`)},`clear`),_=e(e=>{l=m(e),t.debug(`[Railroad] Title set:`,e)},`setTitle`),v=e(()=>l,`getTitle`),y={clear:g,setTitle:_,getTitle:v,addRule:e(e=>{let n={...e,name:m(e.name),definition:h(e.definition),comment:e.comment?m(e.comment):void 0};t.debug(`[Railroad] Adding rule:`,n.name),p.has(n.name)&&t.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`),f.push(n),p.set(n.name,n)},`addRule`),getRules:e(()=>f,`getRules`),getRule:e(e=>p.get(e),`getRule`),setAccTitle:e(e=>{u=m(e).replace(/^\s+/g,``),t.debug(`[Railroad] Accessibility title set:`,e)},`setAccTitle`),getAccTitle:e(()=>u,`getAccTitle`),setAccDescription:e(e=>{d=m(e).replace(/\n\s+/g,` `),t.debug(`[Railroad] Accessibility description set:`,e)},`setAccDescription`),getAccDescription:e(()=>d,`getAccDescription`),setDiagramTitle:_,getDiagramTitle:v},b={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:`monospace`,terminalFill:`#FFFFC0`,terminalStroke:`#000000`,terminalTextColor:`#000000`,nonTerminalFill:`#FFFFFF`,nonTerminalStroke:`#000000`,nonTerminalTextColor:`#000000`,lineColor:`#000000`,strokeWidth:2,markerFill:`#000000`,commentFill:`#E8E8E8`,commentStroke:`#888888`,commentTextColor:`#666666`,specialFill:`#F0E0FF`,specialStroke:`#8800CC`,ruleNameColor:`#000066`,showMarkers:!0,markerRadius:5},x=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,S=/^[\w "',.-]+$/,C=new Set([`compactMode`,`padding`,`verticalSeparation`,`horizontalSeparation`,`arcRadius`,`fontSize`,`fontFamily`,`terminalFill`,`terminalStroke`,`terminalTextColor`,`nonTerminalFill`,`nonTerminalStroke`,`nonTerminalTextColor`,`lineColor`,`strokeWidth`,`markerFill`,`commentFill`,`commentStroke`,`commentTextColor`,`specialFill`,`specialStroke`,`ruleNameColor`,`showMarkers`,`markerRadius`]),w=e(e=>e?Object.keys(e).every(e=>e===`railroad`||C.has(e)):!1,`isRailroadStyleOptions`),T=e(e=>e?`railroad`in e&&e.railroad?e.railroad:w(e)?e:{}:{},`extractRailroadOverrides`),E=e(e=>{if(!e||w(e))return{};let{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},`extractThemeOverrides`),D=e((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return x.test(n)?n:t},`sanitizeColorValue`),O=e((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return S.test(n)?n:t},`sanitizeFontFamilyValue`),k=e((e,t)=>{let n=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(n)&&n>=0?n:t},`sanitizeNumberValue`),A=e(e=>{let t=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(t)&&t>0?t:void 0},`parseThemeFontSize`),j=e(e=>{let t=O(e.fontFamily,b.fontFamily),n=A(e.fontSize)??b.fontSize;return{...b,fontFamily:t,fontSize:n,terminalFill:D(e.secondBkg??e.secondaryColor,b.terminalFill),terminalStroke:D(e.secondaryBorderColor??e.lineColor,b.terminalStroke),terminalTextColor:D(e.secondaryTextColor??e.textColor,b.terminalTextColor),nonTerminalFill:D(e.mainBkg??e.background,b.nonTerminalFill),nonTerminalStroke:D(e.primaryBorderColor??e.lineColor,b.nonTerminalStroke),nonTerminalTextColor:D(e.primaryTextColor??e.textColor,b.nonTerminalTextColor),lineColor:D(e.lineColor,b.lineColor),markerFill:D(e.lineColor,b.markerFill),commentFill:D(e.labelBackground??e.tertiaryColor,b.commentFill),commentStroke:D(e.tertiaryBorderColor??e.lineColor,b.commentStroke),commentTextColor:D(e.tertiaryTextColor??e.textColor,b.commentTextColor),specialFill:D(e.tertiaryColor??e.secondaryColor,b.specialFill),specialStroke:D(e.tertiaryBorderColor??e.secondaryBorderColor,b.specialStroke),ruleNameColor:D(e.titleColor??e.textColor,b.ruleNameColor)}},`buildThemeDefaults`),M=e(e=>{let t=i(),r=j({...n(),...t.themeVariables??{},...E(e)}),a={...t.railroad??{},...T(e)};return{compactMode:a.compactMode??r.compactMode,padding:k(a.padding,r.padding),verticalSeparation:k(a.verticalSeparation,r.verticalSeparation),horizontalSeparation:k(a.horizontalSeparation,r.horizontalSeparation),arcRadius:k(a.arcRadius,r.arcRadius),fontSize:k(a.fontSize,r.fontSize),fontFamily:O(a.fontFamily,r.fontFamily),terminalFill:D(a.terminalFill,r.terminalFill),terminalStroke:D(a.terminalStroke,r.terminalStroke),terminalTextColor:D(a.terminalTextColor,r.terminalTextColor),nonTerminalFill:D(a.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:D(a.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:D(a.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:D(a.lineColor,r.lineColor),strokeWidth:k(a.strokeWidth,r.strokeWidth),markerFill:D(a.markerFill,r.markerFill),commentFill:D(a.commentFill,r.commentFill),commentStroke:D(a.commentStroke,r.commentStroke),commentTextColor:D(a.commentTextColor,r.commentTextColor),specialFill:D(a.specialFill,r.specialFill),specialStroke:D(a.specialStroke,r.specialStroke),ruleNameColor:D(a.ruleNameColor,r.ruleNameColor),showMarkers:a.showMarkers??r.showMarkers,markerRadius:k(a.markerRadius,r.markerRadius)}},`buildRailroadStyleOptions`),N=e(e=>{let{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:s,nonTerminalTextColor:c,lineColor:l,strokeWidth:u,markerFill:d,commentFill:f,commentStroke:p,commentTextColor:m,specialFill:h,specialStroke:g,ruleNameColor:_}=M(e);return` .railroad-diagram { font-family: ${t}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-uaDelfR2.js b/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-Cw2zjcPU.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-uaDelfR2.js rename to apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-Cw2zjcPU.js index 2d0906635..bef1fd2f9 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-uaDelfR2.js +++ b/apps/pythinker-code/dist-web/assets/chunk-SVP7TREG-Cw2zjcPU.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as n,a as r,b as i,c as a,x as o,z as s}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{St as c}from"./mermaidParser.worker-_pLIm6No.js";var l=``,u=``,d=``,f=[],p=new Map,m=t(e=>s(e,o()),`sanitizeText`),h=t(e=>{switch(e.type){case`terminal`:return{...e,value:m(e.value)};case`nonterminal`:return{...e,name:m(e.name)};case`sequence`:return{...e,elements:e.elements.map(h)};case`choice`:return{...e,alternatives:e.alternatives.map(h)};case`optional`:return{...e,element:h(e.element)};case`repetition`:return{...e,element:h(e.element),separator:e.separator?h(e.separator):void 0};case`special`:return{...e,text:m(e.text)}}},`sanitizeAstNode`),g=t(()=>{l=``,u=``,d=``,f.length=0,p.clear(),r(),e.debug(`[Railroad] Database cleared`)},`clear`),_=t(t=>{l=m(t),e.debug(`[Railroad] Title set:`,t)},`setTitle`),v=t(()=>l,`getTitle`),y={clear:g,setTitle:_,getTitle:v,addRule:t(t=>{let n={...t,name:m(t.name),definition:h(t.definition),comment:t.comment?m(t.comment):void 0};e.debug(`[Railroad] Adding rule:`,n.name),p.has(n.name)&&e.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`),f.push(n),p.set(n.name,n)},`addRule`),getRules:t(()=>f,`getRules`),getRule:t(e=>p.get(e),`getRule`),setAccTitle:t(t=>{u=m(t).replace(/^\s+/g,``),e.debug(`[Railroad] Accessibility title set:`,t)},`setAccTitle`),getAccTitle:t(()=>u,`getAccTitle`),setAccDescription:t(t=>{d=m(t).replace(/\n\s+/g,` +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as n,a as r,b as i,c as a,x as o,z as s}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{St as c}from"./mermaidParser.worker-CBWarbNh.js";var l=``,u=``,d=``,f=[],p=new Map,m=t(e=>s(e,o()),`sanitizeText`),h=t(e=>{switch(e.type){case`terminal`:return{...e,value:m(e.value)};case`nonterminal`:return{...e,name:m(e.name)};case`sequence`:return{...e,elements:e.elements.map(h)};case`choice`:return{...e,alternatives:e.alternatives.map(h)};case`optional`:return{...e,element:h(e.element)};case`repetition`:return{...e,element:h(e.element),separator:e.separator?h(e.separator):void 0};case`special`:return{...e,text:m(e.text)}}},`sanitizeAstNode`),g=t(()=>{l=``,u=``,d=``,f.length=0,p.clear(),r(),e.debug(`[Railroad] Database cleared`)},`clear`),_=t(t=>{l=m(t),e.debug(`[Railroad] Title set:`,t)},`setTitle`),v=t(()=>l,`getTitle`),y={clear:g,setTitle:_,getTitle:v,addRule:t(t=>{let n={...t,name:m(t.name),definition:h(t.definition),comment:t.comment?m(t.comment):void 0};e.debug(`[Railroad] Adding rule:`,n.name),p.has(n.name)&&e.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`),f.push(n),p.set(n.name,n)},`addRule`),getRules:t(()=>f,`getRules`),getRule:t(e=>p.get(e),`getRule`),setAccTitle:t(t=>{u=m(t).replace(/^\s+/g,``),e.debug(`[Railroad] Accessibility title set:`,t)},`setAccTitle`),getAccTitle:t(()=>u,`getAccTitle`),setAccDescription:t(t=>{d=m(t).replace(/\n\s+/g,` `),e.debug(`[Railroad] Accessibility description set:`,t)},`setAccDescription`),getAccDescription:t(()=>d,`getAccDescription`),setDiagramTitle:_,getDiagramTitle:v},b={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:`monospace`,terminalFill:`#FFFFC0`,terminalStroke:`#000000`,terminalTextColor:`#000000`,nonTerminalFill:`#FFFFFF`,nonTerminalStroke:`#000000`,nonTerminalTextColor:`#000000`,lineColor:`#000000`,strokeWidth:2,markerFill:`#000000`,commentFill:`#E8E8E8`,commentStroke:`#888888`,commentTextColor:`#666666`,specialFill:`#F0E0FF`,specialStroke:`#8800CC`,ruleNameColor:`#000066`,showMarkers:!0,markerRadius:5},x=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,S=/^[\w "',.-]+$/,C=new Set([`compactMode`,`padding`,`verticalSeparation`,`horizontalSeparation`,`arcRadius`,`fontSize`,`fontFamily`,`terminalFill`,`terminalStroke`,`terminalTextColor`,`nonTerminalFill`,`nonTerminalStroke`,`nonTerminalTextColor`,`lineColor`,`strokeWidth`,`markerFill`,`commentFill`,`commentStroke`,`commentTextColor`,`specialFill`,`specialStroke`,`ruleNameColor`,`showMarkers`,`markerRadius`]),w=t(e=>e?Object.keys(e).every(e=>e===`railroad`||C.has(e)):!1,`isRailroadStyleOptions`),T=t(e=>e?`railroad`in e&&e.railroad?e.railroad:w(e)?e:{}:{},`extractRailroadOverrides`),E=t(e=>{if(!e||w(e))return{};let{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},`extractThemeOverrides`),D=t((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return x.test(n)?n:t},`sanitizeColorValue`),O=t((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return S.test(n)?n:t},`sanitizeFontFamilyValue`),k=t((e,t)=>{let n=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(n)&&n>=0?n:t},`sanitizeNumberValue`),A=t(e=>{let t=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(t)&&t>0?t:void 0},`parseThemeFontSize`),j=t(e=>{let t=O(e.fontFamily,b.fontFamily),n=A(e.fontSize)??b.fontSize;return{...b,fontFamily:t,fontSize:n,terminalFill:D(e.secondBkg??e.secondaryColor,b.terminalFill),terminalStroke:D(e.secondaryBorderColor??e.lineColor,b.terminalStroke),terminalTextColor:D(e.secondaryTextColor??e.textColor,b.terminalTextColor),nonTerminalFill:D(e.mainBkg??e.background,b.nonTerminalFill),nonTerminalStroke:D(e.primaryBorderColor??e.lineColor,b.nonTerminalStroke),nonTerminalTextColor:D(e.primaryTextColor??e.textColor,b.nonTerminalTextColor),lineColor:D(e.lineColor,b.lineColor),markerFill:D(e.lineColor,b.markerFill),commentFill:D(e.labelBackground??e.tertiaryColor,b.commentFill),commentStroke:D(e.tertiaryBorderColor??e.lineColor,b.commentStroke),commentTextColor:D(e.tertiaryTextColor??e.textColor,b.commentTextColor),specialFill:D(e.tertiaryColor??e.secondaryColor,b.specialFill),specialStroke:D(e.tertiaryBorderColor??e.secondaryBorderColor,b.specialStroke),ruleNameColor:D(e.titleColor??e.textColor,b.ruleNameColor)}},`buildThemeDefaults`),M=t(e=>{let t=i(),r=j({...n(),...t.themeVariables??{},...E(e)}),a={...t.railroad??{},...T(e)};return{compactMode:a.compactMode??r.compactMode,padding:k(a.padding,r.padding),verticalSeparation:k(a.verticalSeparation,r.verticalSeparation),horizontalSeparation:k(a.horizontalSeparation,r.horizontalSeparation),arcRadius:k(a.arcRadius,r.arcRadius),fontSize:k(a.fontSize,r.fontSize),fontFamily:O(a.fontFamily,r.fontFamily),terminalFill:D(a.terminalFill,r.terminalFill),terminalStroke:D(a.terminalStroke,r.terminalStroke),terminalTextColor:D(a.terminalTextColor,r.terminalTextColor),nonTerminalFill:D(a.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:D(a.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:D(a.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:D(a.lineColor,r.lineColor),strokeWidth:k(a.strokeWidth,r.strokeWidth),markerFill:D(a.markerFill,r.markerFill),commentFill:D(a.commentFill,r.commentFill),commentStroke:D(a.commentStroke,r.commentStroke),commentTextColor:D(a.commentTextColor,r.commentTextColor),specialFill:D(a.specialFill,r.specialFill),specialStroke:D(a.specialStroke,r.specialStroke),ruleNameColor:D(a.ruleNameColor,r.ruleNameColor),showMarkers:a.showMarkers??r.showMarkers,markerRadius:k(a.markerRadius,r.markerRadius)}},`buildRailroadStyleOptions`),N=t(e=>{let{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:s,nonTerminalTextColor:c,lineColor:l,strokeWidth:u,markerFill:d,commentFill:f,commentStroke:p,commentTextColor:m,specialFill:h,specialStroke:g,ruleNameColor:_}=M(e);return` .railroad-diagram { font-family: ${t}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-D3YZdu1V.js b/apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-B9Fi0GwS.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-D3YZdu1V.js rename to apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-B9Fi0GwS.js index 7f52e10cf..ead70de6c 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-D3YZdu1V.js +++ b/apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-B9Fi0GwS.js @@ -1,4 +1,4 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{$ as r,H as i,K as a,M as o,U as s,a as c,s as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{c as h,g}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{n as _,t as v}from"./mermaidParser.worker-_pLIm6No.js";import{t as y}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as b}from"./chunk-F27PBJKO-BiUOMdWi.js";import{t as x}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as S}from"./chunk-POPQ4Y6H-BiMU0_kH.js";var C=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],ee=[1,64],F=[1,8,9,41],te=[1,77],I=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,103],V=[1,121],H=[1,117],U=[1,113],W=[1,119],G=[1,114],K=[1,115],q=[1,116],J=[1,118],Y=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],X=[12,39],ae=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(D,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:ee}),{39:[1,65]},e(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:te,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e(I,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),e(I,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},e(L,[2,133]),e(L,[2,134]),e(L,[2,135]),e(L,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:t,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:ee},e(O,[2,64]),{67:93,73:P,74:ee},e(R,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),e(z,[2,84]),e(z,[2,85]),e(z,[2,86]),e(z,[2,87]),e(z,[2,88]),e(ne,[2,89]),e(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:B},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:V,50:H,59:110,60:U,82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},{60:[1,122]},{13:te,55:123},e(F,[2,72]),e(F,[2,138]),{22:V,50:H,59:124,60:U,61:[1,125],82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},e(re,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},e(I,[2,16]),e(I,[2,17]),e(I,[2,18]),{11:127,12:ie,39:[2,36]},e(X,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),e(X,[2,10]),e(ae,[2,55],{11:131,12:ie}),e(D,[2,7]),{9:[1,132]},e(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},e(R,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),e(R,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(F,[2,48],{39:[1,142]}),{41:[1,143]},e(F,[2,50]),{41:[2,61],45:144,51:B},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:oe}),e(se,[2,107],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(Q,[2,109]),e(Q,[2,111]),e(Q,[2,112]),e(Q,[2,113]),e(Q,[2,114]),e(Q,[2,115]),e(Q,[2,116]),e(Q,[2,117]),e(Q,[2,118]),e(Q,[2,119]),e(O,[2,106]),e(F,[2,71]),e(O,[2,73],{61:oe}),{60:[1,155]},e(I,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},e(X,[2,12]),e(ae,[2,56]),{1:[2,4]},e(Z,[2,69]),e(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},e(R,[2,80]),e(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:B},e(F,[2,49]),{41:[2,62]},e(F,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:V,50:H,60:U,82:W,84:169,85:112,86:G,87:K,88:q,89:J,90:Y},e(Q,[2,110]),e(re,[2,75]),{14:[1,170]},e(X,[2,11]),e(Z,[2,70]),e(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:B},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(se,[2,108],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(ae,[2,8]),e(F,[2,51]),{41:[1,175]},e(F,[2,54]),e(O,[2,104]),e(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{$ as r,H as i,K as a,M as o,U as s,a as c,s as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{c as h,g}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{n as _,t as v}from"./mermaidParser.worker-CBWarbNh.js";import{t as y}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as b}from"./chunk-F27PBJKO-DTzbeXt1.js";import{t as x}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as S}from"./chunk-POPQ4Y6H-1k8n9Sa3.js";var C=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],ee=[1,64],F=[1,8,9,41],te=[1,77],I=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,103],V=[1,121],H=[1,117],U=[1,113],W=[1,119],G=[1,114],K=[1,115],q=[1,116],J=[1,118],Y=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],X=[12,39],ae=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(D,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:ee}),{39:[1,65]},e(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:te,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e(I,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),e(I,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},e(L,[2,133]),e(L,[2,134]),e(L,[2,135]),e(L,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:t,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:ee},e(O,[2,64]),{67:93,73:P,74:ee},e(R,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),e(z,[2,84]),e(z,[2,85]),e(z,[2,86]),e(z,[2,87]),e(z,[2,88]),e(ne,[2,89]),e(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:B},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:V,50:H,59:110,60:U,82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},{60:[1,122]},{13:te,55:123},e(F,[2,72]),e(F,[2,138]),{22:V,50:H,59:124,60:U,61:[1,125],82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},e(re,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},e(I,[2,16]),e(I,[2,17]),e(I,[2,18]),{11:127,12:ie,39:[2,36]},e(X,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),e(X,[2,10]),e(ae,[2,55],{11:131,12:ie}),e(D,[2,7]),{9:[1,132]},e(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},e(R,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),e(R,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(F,[2,48],{39:[1,142]}),{41:[1,143]},e(F,[2,50]),{41:[2,61],45:144,51:B},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:oe}),e(se,[2,107],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(Q,[2,109]),e(Q,[2,111]),e(Q,[2,112]),e(Q,[2,113]),e(Q,[2,114]),e(Q,[2,115]),e(Q,[2,116]),e(Q,[2,117]),e(Q,[2,118]),e(Q,[2,119]),e(O,[2,106]),e(F,[2,71]),e(O,[2,73],{61:oe}),{60:[1,155]},e(I,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},e(X,[2,12]),e(ae,[2,56]),{1:[2,4]},e(Z,[2,69]),e(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},e(R,[2,80]),e(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:B},e(F,[2,49]),{41:[2,62]},e(F,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:V,50:H,60:U,82:W,84:169,85:112,86:G,87:K,88:q,89:J,90:Y},e(Q,[2,110]),e(re,[2,75]),{14:[1,170]},e(X,[2,11]),e(Z,[2,70]),e(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:B},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(se,[2,108],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(ae,[2,8]),e(F,[2,51]),{41:[1,175]},e(F,[2,54]),e(O,[2,104]),e(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};ce.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-DA5H3teo.js b/apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-YysjZR-U.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-DA5H3teo.js rename to apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-YysjZR-U.js index 412a9f13e..2866b8e54 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-DA5H3teo.js +++ b/apps/pythinker-code/dist-web/assets/chunk-TICWLB2K-YysjZR-U.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{H as r,K as i,M as a,U as o,a as s,s as c,v as l,w as u,x as d,y as f,z as p}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as m}from"./purify.es-CvIXgbbv.js";import{c as h,g}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as _}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as v}from"./chunk-F27PBJKO-DeO1S11A.js";import{t as y}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as b}from"./chunk-POPQ4Y6H-BCRCUUP_.js";import{r as x,t as S}from"./chunk-TLUHSLCS-DN2eHVWx.js";var C=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],ee=[1,63],P=[1,64],F=[1,8,9,41],te=[1,77],I=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,103],V=[1,121],H=[1,117],U=[1,113],W=[1,119],G=[1,114],K=[1,115],q=[1,116],J=[1,118],Y=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],X=[12,39],ae=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(D,[2,5],{8:[1,48]}),{8:[1,49]},t(O,[2,19],{22:[1,50]}),t(O,[2,21]),t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),{34:[1,51]},{36:[1,52]},t(O,[2,33]),t(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:ee,74:P}),{39:[1,65]},t(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(O,[2,65]),t(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:te,55:76},{58:78,60:[1,79]},t(O,[2,76]),t(O,[2,77]),t(O,[2,78]),t(O,[2,79]),t(I,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),t(I,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},t(L,[2,133]),t(L,[2,134]),t(L,[2,135]),t(L,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},t(O,[2,20]),t(O,[2,31]),t(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:ee,74:P},t(O,[2,64]),{67:93,73:ee,74:P},t(R,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),t(z,[2,84]),t(z,[2,85]),t(z,[2,86]),t(z,[2,87]),t(z,[2,88]),t(ne,[2,89]),t(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:B},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:V,50:H,59:110,60:U,82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},{60:[1,122]},{13:te,55:123},t(F,[2,72]),t(F,[2,138]),{22:V,50:H,59:124,60:U,61:[1,125],82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},t(re,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},t(I,[2,16]),t(I,[2,17]),t(I,[2,18]),{11:127,12:ie,39:[2,36]},t(X,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),t(X,[2,10]),t(ae,[2,55],{11:131,12:ie}),t(D,[2,7]),{9:[1,132]},t(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},t(R,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),t(R,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(F,[2,48],{39:[1,142]}),{41:[1,143]},t(F,[2,50]),{41:[2,61],45:144,51:B},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},t(O,[2,91],{13:[1,147]}),t(O,[2,93],{13:[1,149],77:[1,148]}),t(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(O,[2,105],{61:oe}),t(se,[2,107],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),t(Q,[2,109]),t(Q,[2,111]),t(Q,[2,112]),t(Q,[2,113]),t(Q,[2,114]),t(Q,[2,115]),t(Q,[2,116]),t(Q,[2,117]),t(Q,[2,118]),t(Q,[2,119]),t(O,[2,106]),t(F,[2,71]),t(O,[2,73],{61:oe}),{60:[1,155]},t(I,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},t(X,[2,12]),t(ae,[2,56]),{1:[2,4]},t(Z,[2,69]),t(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},t(R,[2,80]),t(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:B},t(F,[2,49]),{41:[2,62]},t(F,[2,52],{39:[1,164]}),t(O,[2,60]),t(O,[2,92]),t(O,[2,94]),t(O,[2,95],{77:[1,165]}),t(O,[2,98]),t(O,[2,99],{13:[1,166]}),t(O,[2,101],{13:[1,168],77:[1,167]}),{22:V,50:H,60:U,82:W,84:169,85:112,86:G,87:K,88:q,89:J,90:Y},t(Q,[2,110]),t(re,[2,75]),{14:[1,170]},t(X,[2,11]),t(Z,[2,70]),t(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:B},t(O,[2,96]),t(O,[2,100]),t(O,[2,102]),t(O,[2,103],{77:[1,174]}),t(se,[2,108],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),t(ae,[2,8]),t(F,[2,51]),{41:[1,175]},t(F,[2,54]),t(O,[2,104]),t(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{H as r,K as i,M as a,U as o,a as s,s as c,v as l,w as u,x as d,y as f,z as p}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as m}from"./purify.es-F_7NWVtX.js";import{c as h,g}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as _}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as v}from"./chunk-F27PBJKO-Duq9tlNm.js";import{t as y}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as b}from"./chunk-POPQ4Y6H-mwDJO2QS.js";import{r as x,t as S}from"./chunk-TLUHSLCS-B1Sp0tTt.js";var C=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],ee=[1,63],P=[1,64],F=[1,8,9,41],te=[1,77],I=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,103],V=[1,121],H=[1,117],U=[1,113],W=[1,119],G=[1,114],K=[1,115],q=[1,116],J=[1,118],Y=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],X=[12,39],ae=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(D,[2,5],{8:[1,48]}),{8:[1,49]},t(O,[2,19],{22:[1,50]}),t(O,[2,21]),t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),{34:[1,51]},{36:[1,52]},t(O,[2,33]),t(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:ee,74:P}),{39:[1,65]},t(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(O,[2,65]),t(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:te,55:76},{58:78,60:[1,79]},t(O,[2,76]),t(O,[2,77]),t(O,[2,78]),t(O,[2,79]),t(I,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),t(I,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},t(L,[2,133]),t(L,[2,134]),t(L,[2,135]),t(L,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},t(O,[2,20]),t(O,[2,31]),t(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:ee,74:P},t(O,[2,64]),{67:93,73:ee,74:P},t(R,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),t(z,[2,84]),t(z,[2,85]),t(z,[2,86]),t(z,[2,87]),t(z,[2,88]),t(ne,[2,89]),t(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:B},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:V,50:H,59:110,60:U,82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},{60:[1,122]},{13:te,55:123},t(F,[2,72]),t(F,[2,138]),{22:V,50:H,59:124,60:U,61:[1,125],82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},t(re,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},t(I,[2,16]),t(I,[2,17]),t(I,[2,18]),{11:127,12:ie,39:[2,36]},t(X,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),t(X,[2,10]),t(ae,[2,55],{11:131,12:ie}),t(D,[2,7]),{9:[1,132]},t(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},t(R,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),t(R,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(F,[2,48],{39:[1,142]}),{41:[1,143]},t(F,[2,50]),{41:[2,61],45:144,51:B},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},t(O,[2,91],{13:[1,147]}),t(O,[2,93],{13:[1,149],77:[1,148]}),t(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(O,[2,105],{61:oe}),t(se,[2,107],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),t(Q,[2,109]),t(Q,[2,111]),t(Q,[2,112]),t(Q,[2,113]),t(Q,[2,114]),t(Q,[2,115]),t(Q,[2,116]),t(Q,[2,117]),t(Q,[2,118]),t(Q,[2,119]),t(O,[2,106]),t(F,[2,71]),t(O,[2,73],{61:oe}),{60:[1,155]},t(I,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},t(X,[2,12]),t(ae,[2,56]),{1:[2,4]},t(Z,[2,69]),t(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},t(R,[2,80]),t(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:B},t(F,[2,49]),{41:[2,62]},t(F,[2,52],{39:[1,164]}),t(O,[2,60]),t(O,[2,92]),t(O,[2,94]),t(O,[2,95],{77:[1,165]}),t(O,[2,98]),t(O,[2,99],{13:[1,166]}),t(O,[2,101],{13:[1,168],77:[1,167]}),{22:V,50:H,60:U,82:W,84:169,85:112,86:G,87:K,88:q,89:J,90:Y},t(Q,[2,110]),t(re,[2,75]),{14:[1,170]},t(X,[2,11]),t(Z,[2,70]),t(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:B},t(O,[2,96]),t(O,[2,100]),t(O,[2,102]),t(O,[2,103],{77:[1,174]}),t(se,[2,108],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),t(ae,[2,8]),t(F,[2,51]),{41:[1,175]},t(F,[2,54]),t(O,[2,104]),t(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};ce.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/chunk-TLUHSLCS-DN2eHVWx.js b/apps/pythinker-code/dist-web/assets/chunk-TLUHSLCS-B1Sp0tTt.js similarity index 67% rename from apps/pythinker-code/dist-web/assets/chunk-TLUHSLCS-DN2eHVWx.js rename to apps/pythinker-code/dist-web/assets/chunk-TLUHSLCS-B1Sp0tTt.js index 6ee16bd41..0d0550798 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-TLUHSLCS-DN2eHVWx.js +++ b/apps/pythinker-code/dist-web/assets/chunk-TLUHSLCS-B1Sp0tTt.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-GXQ25YYZ-DJNYmRpQ.js","assets/chunk-PWAF6VOD-vmg_e0ho.js","assets/src-Cn6kALDM.js","assets/chunk-QTnfLwEv.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/chunk-DU6HZSFF-DfRjAqU1.js","assets/preload-helper-zJ_50EbN.js","assets/purify.es-CvIXgbbv.js","assets/chunk-75Z2AOVW-D2HolPjd.js","assets/dist-lRkD-JPF.js","assets/dagre-BJJUWK_n.js","assets/graphlib-B8gBHxth.js","assets/chunk-GMAD6QVW-xizYnG4f.js","assets/chunk-2E4U76K2-CUuPs4AQ.js","assets/chunk-4HAMMTFA-B5soPjjq.js","assets/chunk-P2QGCYS3-CQc2NCc1.js","assets/rough.esm-CSKSodPl.js","assets/chunk-GVQU2GXP-BrOdU7Oy.js","assets/chunk-L3NEJ4N5-XwNqFvev.js","assets/chunk-OSK3NFVY-BT2Y-lqQ.js","assets/line-CleFFpQp.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/swimlanes-42K2YHIH-DfN0uS4x.js","assets/cose-bilkent-JH36ORCC-DbdqJ1ug.js","assets/cytoscape.esm-dytuJj4e.js"])))=>i.map(i=>d[i]); -import{t as e}from"./preload-helper-zJ_50EbN.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{b as r,s as i}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{d as a}from"./chunk-75Z2AOVW-D2HolPjd.js";import{a as o}from"./chunk-4HAMMTFA-B5soPjjq.js";import{r as s}from"./chunk-GVQU2GXP-BrOdU7Oy.js";import{a as c,c as l,i as u,s as d}from"./chunk-OSK3NFVY-BT2Y-lqQ.js";import{n as f}from"./chunk-L3NEJ4N5-XwNqFvev.js";var p={common:i,getConfig:r,insertCluster:f,insertEdge:u,insertEdgeLabel:c,insertMarkers:d,insertNode:s,interpolateToCurve:a,labelHelper:o,log:n,positionEdgeLabel:l},m={},h=t(e=>{for(let t of e)m[t.name]=t},`registerLayoutLoaders`);t(()=>{h([{name:`dagre`,loader:t(async()=>await e(()=>import(`./dagre-GXQ25YYZ-DJNYmRpQ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),`loader`)},{name:`swimlane`,loader:t(async()=>await e(()=>import(`./swimlanes-42K2YHIH-DfN0uS4x.js`),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,12,13,11,14,15,16,17,18,19,20,21,22])),`loader`)},{name:`cose-bilkent`,loader:t(async()=>await e(()=>import(`./cose-bilkent-JH36ORCC-DbdqJ1ug.js`),__vite__mapDeps([24,3,25,2,4])),`loader`)}])},`registerDefaultLayoutLoaders`)();var g=t(async(e,t)=>{if(!(e.layoutAlgorithm in m))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=m[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,p,{algorithm:n.algorithm})},`render`),_=t((e=``,{fallback:t=`dagre`}={})=>{if(e in m)return e;if(t in m)return n.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`);export{h as n,g as r,_ as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-GXQ25YYZ-hj2RjtGx.js","assets/chunk-PWAF6VOD-D9eOryqj.js","assets/src-Cn6kALDM.js","assets/chunk-QTnfLwEv.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/chunk-DU6HZSFF-B78kfBb6.js","assets/preload-helper-zJ_50EbN.js","assets/purify.es-F_7NWVtX.js","assets/chunk-75Z2AOVW-CAoob5DH.js","assets/dist-lRkD-JPF.js","assets/dagre-BJJUWK_n.js","assets/graphlib-B8gBHxth.js","assets/chunk-GMAD6QVW-dCDLGP3F.js","assets/chunk-2E4U76K2-DSYv76d-.js","assets/chunk-4HAMMTFA-Dlc4jvjp.js","assets/chunk-P2QGCYS3-BTLpY7ks.js","assets/rough.esm-CSKSodPl.js","assets/chunk-GVQU2GXP-Ddvf-Y11.js","assets/chunk-L3NEJ4N5-BKsN7TKH.js","assets/chunk-OSK3NFVY-ZXiPE9OQ.js","assets/line-BbuATs2H.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/swimlanes-42K2YHIH-DxGEneRG.js","assets/cose-bilkent-JH36ORCC-DbdqJ1ug.js","assets/cytoscape.esm-dytuJj4e.js"])))=>i.map(i=>d[i]); +import{t as e}from"./preload-helper-zJ_50EbN.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{b as r,s as i}from"./chunk-DU6HZSFF-B78kfBb6.js";import{d as a}from"./chunk-75Z2AOVW-CAoob5DH.js";import{a as o}from"./chunk-4HAMMTFA-Dlc4jvjp.js";import{r as s}from"./chunk-GVQU2GXP-Ddvf-Y11.js";import{a as c,c as l,i as u,s as d}from"./chunk-OSK3NFVY-ZXiPE9OQ.js";import{n as f}from"./chunk-L3NEJ4N5-BKsN7TKH.js";var p={common:i,getConfig:r,insertCluster:f,insertEdge:u,insertEdgeLabel:c,insertMarkers:d,insertNode:s,interpolateToCurve:a,labelHelper:o,log:n,positionEdgeLabel:l},m={},h=t(e=>{for(let t of e)m[t.name]=t},`registerLayoutLoaders`);t(()=>{h([{name:`dagre`,loader:t(async()=>await e(()=>import(`./dagre-GXQ25YYZ-hj2RjtGx.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),`loader`)},{name:`swimlane`,loader:t(async()=>await e(()=>import(`./swimlanes-42K2YHIH-DxGEneRG.js`),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,12,13,11,14,15,16,17,18,19,20,21,22])),`loader`)},{name:`cose-bilkent`,loader:t(async()=>await e(()=>import(`./cose-bilkent-JH36ORCC-DbdqJ1ug.js`),__vite__mapDeps([24,3,25,2,4])),`loader`)}])},`registerDefaultLayoutLoaders`)();var g=t(async(e,t)=>{if(!(e.layoutAlgorithm in m))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=m[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,p,{algorithm:n.algorithm})},`render`),_=t((e=``,{fallback:t=`dagre`}={})=>{if(e in m)return e;if(t in m)return n.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`);export{h as n,g as r,_ as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-B2T_XUZj.js b/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-B2T_XUZj.js deleted file mode 100644 index f4e9006ec..000000000 --- a/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-B2T_XUZj.js +++ /dev/null @@ -1 +0,0 @@ -import"./src-CDd1avoI.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CcF2nKWM.js";import"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import"./chunk-GVQU2GXP-aw9OR1ii.js";import"./mermaidParser.worker-_pLIm6No.js";import"./chunk-F27PBJKO-BiUOMdWi.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-BiMU0_kH.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-D3YZdu1V.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-DgLfiy3d.js b/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-DgLfiy3d.js deleted file mode 100644 index 1c9d2bef5..000000000 --- a/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-DgLfiy3d.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import"./chunk-OSK3NFVY-BT2Y-lqQ.js";import"./chunk-F27PBJKO-DeO1S11A.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-BCRCUUP_.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import"./chunk-TLUHSLCS-DN2eHVWx.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-DA5H3teo.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-DzRD6r_-.js b/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-DzRD6r_-.js new file mode 100644 index 000000000..6f8cc1797 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-DzRD6r_-.js @@ -0,0 +1 @@ +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import"./chunk-OSK3NFVY-ZXiPE9OQ.js";import"./chunk-F27PBJKO-Duq9tlNm.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-mwDJO2QS.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import"./chunk-TLUHSLCS-B1Sp0tTt.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-YysjZR-U.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-kikADBqU.js b/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-kikADBqU.js new file mode 100644 index 000000000..3f3fd88fd --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/classDiagram-ZZMXUADV-kikADBqU.js @@ -0,0 +1 @@ +import"./src-CDd1avoI.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CbPIJzjs.js";import"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import"./chunk-GVQU2GXP-CCw5T6ST.js";import"./mermaidParser.worker-CBWarbNh.js";import"./chunk-F27PBJKO-DTzbeXt1.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-1k8n9Sa3.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-B9Fi0GwS.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-B2T_XUZj.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-B2T_XUZj.js deleted file mode 100644 index f4e9006ec..000000000 --- a/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-B2T_XUZj.js +++ /dev/null @@ -1 +0,0 @@ -import"./src-CDd1avoI.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CcF2nKWM.js";import"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import"./chunk-GVQU2GXP-aw9OR1ii.js";import"./mermaidParser.worker-_pLIm6No.js";import"./chunk-F27PBJKO-BiUOMdWi.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-BiMU0_kH.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-D3YZdu1V.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-DgLfiy3d.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-DgLfiy3d.js deleted file mode 100644 index 1c9d2bef5..000000000 --- a/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-DgLfiy3d.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import"./chunk-OSK3NFVY-BT2Y-lqQ.js";import"./chunk-F27PBJKO-DeO1S11A.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-BCRCUUP_.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import"./chunk-TLUHSLCS-DN2eHVWx.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-DA5H3teo.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-DzRD6r_-.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-DzRD6r_-.js new file mode 100644 index 000000000..6f8cc1797 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-DzRD6r_-.js @@ -0,0 +1 @@ +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import"./chunk-OSK3NFVY-ZXiPE9OQ.js";import"./chunk-F27PBJKO-Duq9tlNm.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-mwDJO2QS.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import"./chunk-TLUHSLCS-B1Sp0tTt.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-YysjZR-U.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-kikADBqU.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-kikADBqU.js new file mode 100644 index 000000000..3f3fd88fd --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/classDiagram-v2-VYDZK3BY-kikADBqU.js @@ -0,0 +1 @@ +import"./src-CDd1avoI.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CbPIJzjs.js";import"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import"./chunk-GVQU2GXP-CCw5T6ST.js";import"./mermaidParser.worker-CBWarbNh.js";import"./chunk-F27PBJKO-DTzbeXt1.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-1k8n9Sa3.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-B9Fi0GwS.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/cssMode-CtM0Hc-w.js b/apps/pythinker-code/dist-web/assets/cssMode-DjOfW8pt.js similarity index 93% rename from apps/pythinker-code/dist-web/assets/cssMode-CtM0Hc-w.js rename to apps/pythinker-code/dist-web/assets/cssMode-DjOfW8pt.js index 96fa1a152..610aec279 100644 --- a/apps/pythinker-code/dist-web/assets/cssMode-CtM0Hc-w.js +++ b/apps/pythinker-code/dist-web/assets/cssMode-DjOfW8pt.js @@ -1 +1 @@ -import{h as e}from"./editor.api2-BIJacb07.js";import{t}from"./workers-lk8skNfQ.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-C5inBXDM.js";var b=120*1e3,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/css/cssWorker`,createWorker:()=>new Worker(new URL(`/assets/css.worker-BERHMMy7.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function S(t){let n=[],s=[],c=new x(t);n.push(c);let g=(...e)=>c.getLanguageServiceWorker(...e);function y(){let{languageId:n,modeConfiguration:c}=t;w(s),c.completionItems&&s.push(e.registerCompletionItemProvider(n,new _(g,[`/`,`-`,`:`]))),c.hovers&&s.push(e.registerHoverProvider(n,new a(g))),c.documentHighlights&&s.push(e.registerDocumentHighlightProvider(n,new p(g))),c.definitions&&s.push(e.registerDefinitionProvider(n,new f(g))),c.references&&s.push(e.registerReferenceProvider(n,new o(g))),c.documentSymbols&&s.push(e.registerDocumentSymbolProvider(n,new u(g))),c.rename&&s.push(e.registerRenameProvider(n,new m(g))),c.colors&&s.push(e.registerColorProvider(n,new l(g))),c.foldingRanges&&s.push(e.registerFoldingRangeProvider(n,new v(g))),c.diagnostics&&s.push(new h(n,g,t.onDidChange)),c.selectionRanges&&s.push(e.registerSelectionRangeProvider(n,new d(g))),c.documentFormattingEdits&&s.push(e.registerDocumentFormattingEditProvider(n,new r(g))),c.documentRangeFormattingEdits&&s.push(e.registerDocumentRangeFormattingEditProvider(n,new i(g)))}return y(),n.push(C(s)),C(n)}function C(e){return{dispose:()=>w(e)}}function w(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,S as setupMode,n as toRange,y as toTextEdit}; \ No newline at end of file +import{h as e}from"./editor.api2-DVs509bq.js";import{t}from"./workers-CzVdMsP_.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-DXTWGW3J.js";var b=120*1e3,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/css/cssWorker`,createWorker:()=>new Worker(new URL(`/assets/css.worker-BERHMMy7.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function S(t){let n=[],s=[],c=new x(t);n.push(c);let g=(...e)=>c.getLanguageServiceWorker(...e);function y(){let{languageId:n,modeConfiguration:c}=t;w(s),c.completionItems&&s.push(e.registerCompletionItemProvider(n,new _(g,[`/`,`-`,`:`]))),c.hovers&&s.push(e.registerHoverProvider(n,new a(g))),c.documentHighlights&&s.push(e.registerDocumentHighlightProvider(n,new p(g))),c.definitions&&s.push(e.registerDefinitionProvider(n,new f(g))),c.references&&s.push(e.registerReferenceProvider(n,new o(g))),c.documentSymbols&&s.push(e.registerDocumentSymbolProvider(n,new u(g))),c.rename&&s.push(e.registerRenameProvider(n,new m(g))),c.colors&&s.push(e.registerColorProvider(n,new l(g))),c.foldingRanges&&s.push(e.registerFoldingRangeProvider(n,new v(g))),c.diagnostics&&s.push(new h(n,g,t.onDidChange)),c.selectionRanges&&s.push(e.registerSelectionRangeProvider(n,new d(g))),c.documentFormattingEdits&&s.push(e.registerDocumentFormattingEditProvider(n,new r(g))),c.documentRangeFormattingEdits&&s.push(e.registerDocumentRangeFormattingEditProvider(n,new i(g)))}return y(),n.push(C(s)),C(n)}function C(e){return{dispose:()=>w(e)}}function w(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,S as setupMode,n as toRange,y as toTextEdit}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-C9_d3GMr.js b/apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-CHJGzUZq.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-C9_d3GMr.js rename to apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-CHJGzUZq.js index 79d314cd5..2c90c8ca7 100644 --- a/apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-C9_d3GMr.js +++ b/apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-CHJGzUZq.js @@ -1,4 +1,4 @@ -import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,f as u,v as d,w as f,y as p}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{i as m}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as h}from"./chunk-CLGD4ZFX-D_luxf7b.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";var _=t(()=>({domains:new Map,transitions:[]}),`createDefaultData`),v=_(),y={getDomains:t(()=>v.domains,`getDomains`),getTransitions:t(()=>v.transitions,`getTransitions`),setDomains:t(e=>{if(e)for(let t of e){let e=t.domain,n=(t.items??[]).map(e=>({label:e.label}));v.domains.set(e,{name:e,items:n})}},`setDomains`),setTransitions:t(e=>{e&&(v.transitions=e.filter(e=>e.from===e.to?(n.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},`setTransitions`),getConfig:t(()=>m({...u.cynefin,...c().cynefin}),`getConfig`),clear:t(()=>{s(),v=_()},`clear`),setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:f,getAccDescription:d,setAccDescription:i},b=t(e=>{g(e,y),y.setDomains(e.domains),y.setTransitions(e.transitions)},`populate`),x={parse:t(async t=>{let r=await e(`cynefin`,t);n.debug(r),b(r)},`parse`)};function S(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}t(S,`seededRandom`);function C(e){let t=0;for(let n=0;n{let n=e/2,r=t/2;return{complex:{cx:n/2,cy:r/2,x:0,y:0,w:n,h:r},complicated:{cx:n+n/2,cy:r/2,x:n,y:0,w:n,h:r},chaotic:{cx:n/2,cy:r+r/2,x:0,y:r,w:n,h:r},clear:{cx:n+n/2,cy:r+r/2,x:n,y:r,w:n,h:r},confusion:{cx:n,cy:r,x:n*.7,y:r*.7,w:n*.6,h:r*.6}}},`getDomainLayouts`),j=t(()=>m(r(),c().themeVariables).cynefin,`getCynefinDomainColors`),M=3,N={draw:t((e,t,r,i)=>{let a=i.db,o=a.getDomains(),s=a.getTransitions(),c=a.getDiagramTitle(),u=a.getAccTitle(),d=a.getAccDescription(),f=a.getConfig(),p=j();n.debug(`Rendering Cynefin diagram`);let m=f.width,g=f.height,_=f.padding,v=f.showDomainDescriptions,y=f.boundaryAmplitude,b=m+_*2,x=g+_*2,S={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},C=h(t);l(C,x,b,f.useMaxWidth??!0),C.attr(`viewBox`,`0 0 ${b} ${x}`),u&&C.append(`title`).text(u),d&&C.append(`desc`).text(d);let N=C.append(`g`).attr(`transform`,`translate(${_}, ${_})`),P=A(m,g),F=w(f.seed,t),I=N.append(`g`).attr(`class`,`cynefin-backgrounds`),L=[`complex`,`complicated`,`chaotic`,`clear`];for(let e of L){let t=P[e];I.append(`rect`).attr(`class`,`cynefinDomain`).attr(`x`,t.x).attr(`y`,t.y).attr(`width`,t.w).attr(`height`,t.h).attr(`fill`,S[e]).attr(`fill-opacity`,.4).attr(`stroke`,`none`)}let R=N.append(`g`).attr(`class`,`cynefin-boundaries`);R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,T(m,g,F,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,E(m,g,F+100,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinCliff`).attr(`d`,D(m,g)).attr(`fill`,`none`);let z=m*.15,B=g*.15;N.append(`path`).attr(`class`,`cynefinConfusion`).attr(`d`,O(m/2,g/2,z,B)).attr(`fill`,S.confusion).attr(`fill-opacity`,.5);let V=N.append(`g`).attr(`class`,`cynefin-labels`);for(let e of L){let t=P[e];V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,t.cx).attr(`y`,v?t.cy-30:t.cy).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(e.charAt(0).toUpperCase()+e.slice(1))}if(V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,m/2).attr(`y`,v?g/2-10:g/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(`Confusion`),v){let e=N.append(`g`).attr(`class`,`cynefin-subtitles`);for(let t of L){let n=P[t],r=k[t];e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy-10).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.model),e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy+5).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.practice)}e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,m/2).attr(`y`,g/2+8).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(k.confusion.practice)}let H=N.append(`g`).attr(`class`,`cynefin-items`);for(let e of[`complex`,`complicated`,`chaotic`,`clear`,`confusion`]){let t=o.get(e);if(!t||t.items.length===0)continue;let n=P[e],r=e===`confusion`,i=t.items,a=0;r&&t.items.length>M&&(a=t.items.length-M,i=t.items.slice(0,M));let s;if(r){let e=v?22:14;s=n.cy+e}else s=n.cy+(v?25:15);if([...i].forEach((t,r)=>{let i=s+r*30,a=H.append(`g`),o=a.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,26/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(t.label),c=t.label.length*7,l=o.node();if(l&&typeof l.getBBox==`function`){let e=l.getBBox();e.width>0&&(c=e.width)}let u=c+20,d=n.cx-u/2;a.attr(`transform`,`translate(${d}, ${i})`),a.insert(`rect`,`text`).attr(`class`,`cynefinItem`).attr(`x`,0).attr(`y`,0).attr(`width`,u).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.95),o.attr(`x`,u/2).attr(`y`,26/2)}),a>0){let t=s+i.length*30,r=`+${a} more`,o=H.append(`g`),c=o.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,26/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(r),l=r.length*7,u=c.node();if(u&&typeof u.getBBox==`function`){let e=u.getBBox();e.width>0&&(l=e.width)}let d=l+20,f=n.cx-d/2;o.attr(`transform`,`translate(${f}, ${t})`),o.insert(`rect`,`text`).attr(`class`,`cynefinItemOverflow`).attr(`x`,0).attr(`y`,0).attr(`width`,d).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.6),c.attr(`x`,d/2).attr(`y`,26/2)}}if(s.length>0){let e=C.select(`defs`).empty()?C.append(`defs`):C.select(`defs`),r=`cynefin-arrow-${t}`;e.append(`marker`).attr(`id`,r).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`cynefinArrowHead`);let i=N.append(`g`).attr(`class`,`cynefin-arrows`);s.forEach(e=>{let t=P[e.from],a=P[e.to];if(!t||!a)return;if(e.from===e.to){n.warn(`Cynefin renderer: skipping self-loop on domain "${e.from}"`);return}let o=t.cx,s=t.cy,c=a.cx,l=a.cy,u=(o+c)/2,d=(s+l)/2,f=c-o,p=l-s,m=Math.sqrt(f*f+p*p),h=m*.15,g=-p/m,_=f/m,v=u+g*h,y=d+_*h;i.append(`path`).attr(`class`,`cynefinArrowLine`).attr(`d`,`M${o},${s} Q${v},${y} ${c},${l}`).attr(`fill`,`none`).attr(`marker-end`,`url(#${r})`),e.label&&i.append(`text`).attr(`class`,`cynefinArrowLabel`).attr(`x`,v).attr(`y`,y-6).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`auto`).text(e.label)})}c&&N.append(`text`).attr(`class`,`cynefinTitle`).attr(`x`,m/2).attr(`y`,-_/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(c)},`draw`)},P=t(()=>m(r(),c().themeVariables).cynefin,`getCynefinTheme`),F={parser:x,db:y,renderer:N,styles:t(()=>{let e=P();return` +import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,f as u,v as d,w as f,y as p}from"./chunk-DU6HZSFF-B78kfBb6.js";import{i as m}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as h}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";var _=t(()=>({domains:new Map,transitions:[]}),`createDefaultData`),v=_(),y={getDomains:t(()=>v.domains,`getDomains`),getTransitions:t(()=>v.transitions,`getTransitions`),setDomains:t(e=>{if(e)for(let t of e){let e=t.domain,n=(t.items??[]).map(e=>({label:e.label}));v.domains.set(e,{name:e,items:n})}},`setDomains`),setTransitions:t(e=>{e&&(v.transitions=e.filter(e=>e.from===e.to?(n.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},`setTransitions`),getConfig:t(()=>m({...u.cynefin,...c().cynefin}),`getConfig`),clear:t(()=>{s(),v=_()},`clear`),setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:f,getAccDescription:d,setAccDescription:i},b=t(e=>{g(e,y),y.setDomains(e.domains),y.setTransitions(e.transitions)},`populate`),x={parse:t(async t=>{let r=await e(`cynefin`,t);n.debug(r),b(r)},`parse`)};function S(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}t(S,`seededRandom`);function C(e){let t=0;for(let n=0;n{let n=e/2,r=t/2;return{complex:{cx:n/2,cy:r/2,x:0,y:0,w:n,h:r},complicated:{cx:n+n/2,cy:r/2,x:n,y:0,w:n,h:r},chaotic:{cx:n/2,cy:r+r/2,x:0,y:r,w:n,h:r},clear:{cx:n+n/2,cy:r+r/2,x:n,y:r,w:n,h:r},confusion:{cx:n,cy:r,x:n*.7,y:r*.7,w:n*.6,h:r*.6}}},`getDomainLayouts`),j=t(()=>m(r(),c().themeVariables).cynefin,`getCynefinDomainColors`),M=3,N={draw:t((e,t,r,i)=>{let a=i.db,o=a.getDomains(),s=a.getTransitions(),c=a.getDiagramTitle(),u=a.getAccTitle(),d=a.getAccDescription(),f=a.getConfig(),p=j();n.debug(`Rendering Cynefin diagram`);let m=f.width,g=f.height,_=f.padding,v=f.showDomainDescriptions,y=f.boundaryAmplitude,b=m+_*2,x=g+_*2,S={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},C=h(t);l(C,x,b,f.useMaxWidth??!0),C.attr(`viewBox`,`0 0 ${b} ${x}`),u&&C.append(`title`).text(u),d&&C.append(`desc`).text(d);let N=C.append(`g`).attr(`transform`,`translate(${_}, ${_})`),P=A(m,g),F=w(f.seed,t),I=N.append(`g`).attr(`class`,`cynefin-backgrounds`),L=[`complex`,`complicated`,`chaotic`,`clear`];for(let e of L){let t=P[e];I.append(`rect`).attr(`class`,`cynefinDomain`).attr(`x`,t.x).attr(`y`,t.y).attr(`width`,t.w).attr(`height`,t.h).attr(`fill`,S[e]).attr(`fill-opacity`,.4).attr(`stroke`,`none`)}let R=N.append(`g`).attr(`class`,`cynefin-boundaries`);R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,T(m,g,F,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,E(m,g,F+100,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinCliff`).attr(`d`,D(m,g)).attr(`fill`,`none`);let z=m*.15,B=g*.15;N.append(`path`).attr(`class`,`cynefinConfusion`).attr(`d`,O(m/2,g/2,z,B)).attr(`fill`,S.confusion).attr(`fill-opacity`,.5);let V=N.append(`g`).attr(`class`,`cynefin-labels`);for(let e of L){let t=P[e];V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,t.cx).attr(`y`,v?t.cy-30:t.cy).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(e.charAt(0).toUpperCase()+e.slice(1))}if(V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,m/2).attr(`y`,v?g/2-10:g/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(`Confusion`),v){let e=N.append(`g`).attr(`class`,`cynefin-subtitles`);for(let t of L){let n=P[t],r=k[t];e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy-10).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.model),e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy+5).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.practice)}e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,m/2).attr(`y`,g/2+8).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(k.confusion.practice)}let H=N.append(`g`).attr(`class`,`cynefin-items`);for(let e of[`complex`,`complicated`,`chaotic`,`clear`,`confusion`]){let t=o.get(e);if(!t||t.items.length===0)continue;let n=P[e],r=e===`confusion`,i=t.items,a=0;r&&t.items.length>M&&(a=t.items.length-M,i=t.items.slice(0,M));let s;if(r){let e=v?22:14;s=n.cy+e}else s=n.cy+(v?25:15);if([...i].forEach((t,r)=>{let i=s+r*30,a=H.append(`g`),o=a.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,26/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(t.label),c=t.label.length*7,l=o.node();if(l&&typeof l.getBBox==`function`){let e=l.getBBox();e.width>0&&(c=e.width)}let u=c+20,d=n.cx-u/2;a.attr(`transform`,`translate(${d}, ${i})`),a.insert(`rect`,`text`).attr(`class`,`cynefinItem`).attr(`x`,0).attr(`y`,0).attr(`width`,u).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.95),o.attr(`x`,u/2).attr(`y`,26/2)}),a>0){let t=s+i.length*30,r=`+${a} more`,o=H.append(`g`),c=o.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,26/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(r),l=r.length*7,u=c.node();if(u&&typeof u.getBBox==`function`){let e=u.getBBox();e.width>0&&(l=e.width)}let d=l+20,f=n.cx-d/2;o.attr(`transform`,`translate(${f}, ${t})`),o.insert(`rect`,`text`).attr(`class`,`cynefinItemOverflow`).attr(`x`,0).attr(`y`,0).attr(`width`,d).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.6),c.attr(`x`,d/2).attr(`y`,26/2)}}if(s.length>0){let e=C.select(`defs`).empty()?C.append(`defs`):C.select(`defs`),r=`cynefin-arrow-${t}`;e.append(`marker`).attr(`id`,r).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`cynefinArrowHead`);let i=N.append(`g`).attr(`class`,`cynefin-arrows`);s.forEach(e=>{let t=P[e.from],a=P[e.to];if(!t||!a)return;if(e.from===e.to){n.warn(`Cynefin renderer: skipping self-loop on domain "${e.from}"`);return}let o=t.cx,s=t.cy,c=a.cx,l=a.cy,u=(o+c)/2,d=(s+l)/2,f=c-o,p=l-s,m=Math.sqrt(f*f+p*p),h=m*.15,g=-p/m,_=f/m,v=u+g*h,y=d+_*h;i.append(`path`).attr(`class`,`cynefinArrowLine`).attr(`d`,`M${o},${s} Q${v},${y} ${c},${l}`).attr(`fill`,`none`).attr(`marker-end`,`url(#${r})`),e.label&&i.append(`text`).attr(`class`,`cynefinArrowLabel`).attr(`x`,v).attr(`y`,y-6).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`auto`).text(e.label)})}c&&N.append(`text`).attr(`class`,`cynefinTitle`).attr(`x`,m/2).attr(`y`,-_/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(c)},`draw`)},P=t(()=>m(r(),c().themeVariables).cynefin,`getCynefinTheme`),F={parser:x,db:y,renderer:N,styles:t(()=>{let e=P();return` .cynefinDomain { stroke: none; } diff --git a/apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-BWXngb8a.js b/apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-DFe0zgJu.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-BWXngb8a.js rename to apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-DFe0zgJu.js index bfa776ac9..cc5f01c1d 100644 --- a/apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-BWXngb8a.js +++ b/apps/pythinker-code/dist-web/assets/cynefinDiagram-5FMLGOSQ-DFe0zgJu.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{i as p}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{St as m}from"./mermaidParser.worker-_pLIm6No.js";import{n as h}from"./mermaid-parser.core-87cmcdBo.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";var _=t(()=>({domains:new Map,transitions:[]}),`createDefaultData`),v=_(),y={getDomains:t(()=>v.domains,`getDomains`),getTransitions:t(()=>v.transitions,`getTransitions`),setDomains:t(e=>{if(e)for(let t of e){let e=t.domain,n=(t.items??[]).map(e=>({label:e.label}));v.domains.set(e,{name:e,items:n})}},`setDomains`),setTransitions:t(t=>{t&&(v.transitions=t.filter(t=>t.from===t.to?(e.warn(`Cynefin: self-loop transition on domain "${t.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},`setTransitions`),getConfig:t(()=>p({...l.cynefin,...s().cynefin}),`getConfig`),clear:t(()=>{o(),v=_()},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r},b=t(e=>{g(e,y),y.setDomains(e.domains),y.setTransitions(e.transitions)},`populate`),x={parse:t(async t=>{let n=await h(`cynefin`,t);e.debug(n),b(n)},`parse`)};function S(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}t(S,`seededRandom`);function C(e){let t=0;for(let n=0;n{let n=e/2,r=t/2;return{complex:{cx:n/2,cy:r/2,x:0,y:0,w:n,h:r},complicated:{cx:n+n/2,cy:r/2,x:n,y:0,w:n,h:r},chaotic:{cx:n/2,cy:r+r/2,x:0,y:r,w:n,h:r},clear:{cx:n+n/2,cy:r+r/2,x:n,y:r,w:n,h:r},confusion:{cx:n,cy:r,x:n*.7,y:r*.7,w:n*.6,h:r*.6}}},`getDomainLayouts`),j=t(()=>p(n(),s().themeVariables).cynefin,`getCynefinDomainColors`),M=3,N={draw:t((t,n,r,i)=>{let a=i.db,o=a.getDomains(),s=a.getTransitions(),l=a.getDiagramTitle(),u=a.getAccTitle(),d=a.getAccDescription(),f=a.getConfig(),p=j();e.debug(`Rendering Cynefin diagram`);let h=f.width,g=f.height,_=f.padding,v=f.showDomainDescriptions,y=f.boundaryAmplitude,b=h+_*2,x=g+_*2,S={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},C=m(n);c(C,x,b,f.useMaxWidth??!0),C.attr(`viewBox`,`0 0 ${b} ${x}`),u&&C.append(`title`).text(u),d&&C.append(`desc`).text(d);let N=C.append(`g`).attr(`transform`,`translate(${_}, ${_})`),P=A(h,g),F=w(f.seed,n),I=N.append(`g`).attr(`class`,`cynefin-backgrounds`),L=[`complex`,`complicated`,`chaotic`,`clear`];for(let e of L){let t=P[e];I.append(`rect`).attr(`class`,`cynefinDomain`).attr(`x`,t.x).attr(`y`,t.y).attr(`width`,t.w).attr(`height`,t.h).attr(`fill`,S[e]).attr(`fill-opacity`,.4).attr(`stroke`,`none`)}let R=N.append(`g`).attr(`class`,`cynefin-boundaries`);R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,T(h,g,F,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,E(h,g,F+100,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinCliff`).attr(`d`,D(h,g)).attr(`fill`,`none`);let z=h*.15,B=g*.15;N.append(`path`).attr(`class`,`cynefinConfusion`).attr(`d`,O(h/2,g/2,z,B)).attr(`fill`,S.confusion).attr(`fill-opacity`,.5);let V=N.append(`g`).attr(`class`,`cynefin-labels`);for(let e of L){let t=P[e];V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,t.cx).attr(`y`,v?t.cy-30:t.cy).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(e.charAt(0).toUpperCase()+e.slice(1))}if(V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,h/2).attr(`y`,v?g/2-10:g/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(`Confusion`),v){let e=N.append(`g`).attr(`class`,`cynefin-subtitles`);for(let t of L){let n=P[t],r=k[t];e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy-10).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.model),e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy+5).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.practice)}e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,h/2).attr(`y`,g/2+8).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(k.confusion.practice)}let H=N.append(`g`).attr(`class`,`cynefin-items`);for(let e of[`complex`,`complicated`,`chaotic`,`clear`,`confusion`]){let t=o.get(e);if(!t||t.items.length===0)continue;let n=P[e],r=e===`confusion`,i=t.items,a=0;r&&t.items.length>M&&(a=t.items.length-M,i=t.items.slice(0,M));let s;if(r){let e=v?22:14;s=n.cy+e}else s=n.cy+(v?25:15);if([...i].forEach((t,r)=>{let i=s+r*30,a=H.append(`g`),o=a.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,26/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(t.label),c=t.label.length*7,l=o.node();if(l&&typeof l.getBBox==`function`){let e=l.getBBox();e.width>0&&(c=e.width)}let u=c+20,d=n.cx-u/2;a.attr(`transform`,`translate(${d}, ${i})`),a.insert(`rect`,`text`).attr(`class`,`cynefinItem`).attr(`x`,0).attr(`y`,0).attr(`width`,u).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.95),o.attr(`x`,u/2).attr(`y`,26/2)}),a>0){let t=s+i.length*30,r=`+${a} more`,o=H.append(`g`),c=o.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,26/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(r),l=r.length*7,u=c.node();if(u&&typeof u.getBBox==`function`){let e=u.getBBox();e.width>0&&(l=e.width)}let d=l+20,f=n.cx-d/2;o.attr(`transform`,`translate(${f}, ${t})`),o.insert(`rect`,`text`).attr(`class`,`cynefinItemOverflow`).attr(`x`,0).attr(`y`,0).attr(`width`,d).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.6),c.attr(`x`,d/2).attr(`y`,26/2)}}if(s.length>0){let t=C.select(`defs`).empty()?C.append(`defs`):C.select(`defs`),r=`cynefin-arrow-${n}`;t.append(`marker`).attr(`id`,r).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`cynefinArrowHead`);let i=N.append(`g`).attr(`class`,`cynefin-arrows`);s.forEach(t=>{let n=P[t.from],a=P[t.to];if(!n||!a)return;if(t.from===t.to){e.warn(`Cynefin renderer: skipping self-loop on domain "${t.from}"`);return}let o=n.cx,s=n.cy,c=a.cx,l=a.cy,u=(o+c)/2,d=(s+l)/2,f=c-o,p=l-s,m=Math.sqrt(f*f+p*p),h=m*.15,g=-p/m,_=f/m,v=u+g*h,y=d+_*h;i.append(`path`).attr(`class`,`cynefinArrowLine`).attr(`d`,`M${o},${s} Q${v},${y} ${c},${l}`).attr(`fill`,`none`).attr(`marker-end`,`url(#${r})`),t.label&&i.append(`text`).attr(`class`,`cynefinArrowLabel`).attr(`x`,v).attr(`y`,y-6).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`auto`).text(t.label)})}l&&N.append(`text`).attr(`class`,`cynefinTitle`).attr(`x`,h/2).attr(`y`,-_/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(l)},`draw`)},P=t(()=>p(n(),s().themeVariables).cynefin,`getCynefinTheme`),F={parser:x,db:y,renderer:N,styles:t(()=>{let e=P();return` +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{i as p}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{St as m}from"./mermaidParser.worker-CBWarbNh.js";import{n as h}from"./mermaid-parser.core-87cmcdBo.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";var _=t(()=>({domains:new Map,transitions:[]}),`createDefaultData`),v=_(),y={getDomains:t(()=>v.domains,`getDomains`),getTransitions:t(()=>v.transitions,`getTransitions`),setDomains:t(e=>{if(e)for(let t of e){let e=t.domain,n=(t.items??[]).map(e=>({label:e.label}));v.domains.set(e,{name:e,items:n})}},`setDomains`),setTransitions:t(t=>{t&&(v.transitions=t.filter(t=>t.from===t.to?(e.warn(`Cynefin: self-loop transition on domain "${t.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},`setTransitions`),getConfig:t(()=>p({...l.cynefin,...s().cynefin}),`getConfig`),clear:t(()=>{o(),v=_()},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r},b=t(e=>{g(e,y),y.setDomains(e.domains),y.setTransitions(e.transitions)},`populate`),x={parse:t(async t=>{let n=await h(`cynefin`,t);e.debug(n),b(n)},`parse`)};function S(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}t(S,`seededRandom`);function C(e){let t=0;for(let n=0;n{let n=e/2,r=t/2;return{complex:{cx:n/2,cy:r/2,x:0,y:0,w:n,h:r},complicated:{cx:n+n/2,cy:r/2,x:n,y:0,w:n,h:r},chaotic:{cx:n/2,cy:r+r/2,x:0,y:r,w:n,h:r},clear:{cx:n+n/2,cy:r+r/2,x:n,y:r,w:n,h:r},confusion:{cx:n,cy:r,x:n*.7,y:r*.7,w:n*.6,h:r*.6}}},`getDomainLayouts`),j=t(()=>p(n(),s().themeVariables).cynefin,`getCynefinDomainColors`),M=3,N={draw:t((t,n,r,i)=>{let a=i.db,o=a.getDomains(),s=a.getTransitions(),l=a.getDiagramTitle(),u=a.getAccTitle(),d=a.getAccDescription(),f=a.getConfig(),p=j();e.debug(`Rendering Cynefin diagram`);let h=f.width,g=f.height,_=f.padding,v=f.showDomainDescriptions,y=f.boundaryAmplitude,b=h+_*2,x=g+_*2,S={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},C=m(n);c(C,x,b,f.useMaxWidth??!0),C.attr(`viewBox`,`0 0 ${b} ${x}`),u&&C.append(`title`).text(u),d&&C.append(`desc`).text(d);let N=C.append(`g`).attr(`transform`,`translate(${_}, ${_})`),P=A(h,g),F=w(f.seed,n),I=N.append(`g`).attr(`class`,`cynefin-backgrounds`),L=[`complex`,`complicated`,`chaotic`,`clear`];for(let e of L){let t=P[e];I.append(`rect`).attr(`class`,`cynefinDomain`).attr(`x`,t.x).attr(`y`,t.y).attr(`width`,t.w).attr(`height`,t.h).attr(`fill`,S[e]).attr(`fill-opacity`,.4).attr(`stroke`,`none`)}let R=N.append(`g`).attr(`class`,`cynefin-boundaries`);R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,T(h,g,F,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,E(h,g,F+100,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinCliff`).attr(`d`,D(h,g)).attr(`fill`,`none`);let z=h*.15,B=g*.15;N.append(`path`).attr(`class`,`cynefinConfusion`).attr(`d`,O(h/2,g/2,z,B)).attr(`fill`,S.confusion).attr(`fill-opacity`,.5);let V=N.append(`g`).attr(`class`,`cynefin-labels`);for(let e of L){let t=P[e];V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,t.cx).attr(`y`,v?t.cy-30:t.cy).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(e.charAt(0).toUpperCase()+e.slice(1))}if(V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,h/2).attr(`y`,v?g/2-10:g/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(`Confusion`),v){let e=N.append(`g`).attr(`class`,`cynefin-subtitles`);for(let t of L){let n=P[t],r=k[t];e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy-10).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.model),e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy+5).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.practice)}e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,h/2).attr(`y`,g/2+8).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(k.confusion.practice)}let H=N.append(`g`).attr(`class`,`cynefin-items`);for(let e of[`complex`,`complicated`,`chaotic`,`clear`,`confusion`]){let t=o.get(e);if(!t||t.items.length===0)continue;let n=P[e],r=e===`confusion`,i=t.items,a=0;r&&t.items.length>M&&(a=t.items.length-M,i=t.items.slice(0,M));let s;if(r){let e=v?22:14;s=n.cy+e}else s=n.cy+(v?25:15);if([...i].forEach((t,r)=>{let i=s+r*30,a=H.append(`g`),o=a.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,26/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(t.label),c=t.label.length*7,l=o.node();if(l&&typeof l.getBBox==`function`){let e=l.getBBox();e.width>0&&(c=e.width)}let u=c+20,d=n.cx-u/2;a.attr(`transform`,`translate(${d}, ${i})`),a.insert(`rect`,`text`).attr(`class`,`cynefinItem`).attr(`x`,0).attr(`y`,0).attr(`width`,u).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.95),o.attr(`x`,u/2).attr(`y`,26/2)}),a>0){let t=s+i.length*30,r=`+${a} more`,o=H.append(`g`),c=o.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,26/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(r),l=r.length*7,u=c.node();if(u&&typeof u.getBBox==`function`){let e=u.getBBox();e.width>0&&(l=e.width)}let d=l+20,f=n.cx-d/2;o.attr(`transform`,`translate(${f}, ${t})`),o.insert(`rect`,`text`).attr(`class`,`cynefinItemOverflow`).attr(`x`,0).attr(`y`,0).attr(`width`,d).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.6),c.attr(`x`,d/2).attr(`y`,26/2)}}if(s.length>0){let t=C.select(`defs`).empty()?C.append(`defs`):C.select(`defs`),r=`cynefin-arrow-${n}`;t.append(`marker`).attr(`id`,r).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`cynefinArrowHead`);let i=N.append(`g`).attr(`class`,`cynefin-arrows`);s.forEach(t=>{let n=P[t.from],a=P[t.to];if(!n||!a)return;if(t.from===t.to){e.warn(`Cynefin renderer: skipping self-loop on domain "${t.from}"`);return}let o=n.cx,s=n.cy,c=a.cx,l=a.cy,u=(o+c)/2,d=(s+l)/2,f=c-o,p=l-s,m=Math.sqrt(f*f+p*p),h=m*.15,g=-p/m,_=f/m,v=u+g*h,y=d+_*h;i.append(`path`).attr(`class`,`cynefinArrowLine`).attr(`d`,`M${o},${s} Q${v},${y} ${c},${l}`).attr(`fill`,`none`).attr(`marker-end`,`url(#${r})`),t.label&&i.append(`text`).attr(`class`,`cynefinArrowLabel`).attr(`x`,v).attr(`y`,y-6).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`auto`).text(t.label)})}l&&N.append(`text`).attr(`class`,`cynefinTitle`).attr(`x`,h/2).attr(`y`,-_/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(l)},`draw`)},P=t(()=>p(n(),s().themeVariables).cynefin,`getCynefinTheme`),F={parser:x,db:y,renderer:N,styles:t(()=>{let e=P();return` .cynefinDomain { stroke: none; } diff --git a/apps/pythinker-code/dist-web/assets/dagre-BP-EatEF.js b/apps/pythinker-code/dist-web/assets/dagre-DvNxCnfe.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/dagre-BP-EatEF.js rename to apps/pythinker-code/dist-web/assets/dagre-DvNxCnfe.js index 8f48ac06b..7b70ab020 100644 --- a/apps/pythinker-code/dist-web/assets/dagre-BP-EatEF.js +++ b/apps/pythinker-code/dist-web/assets/dagre-DvNxCnfe.js @@ -1 +1 @@ -import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as ee,R as te,S as ne,T as re,U as ie,V as ae,W as oe,X as _,Y as se,Z as ce,_ as v,at as le,b as ue,ct as y,dt as b,et as de,f as x,ft as S,g as C,h as w,ht as fe,it as pe,j as me,k as he,lt as T,m as E,mt as ge,nt as _e,ot as ve,p as D,pt as ye,q as be,rt as xe,st as O,tt as Se,ut as k,v as Ce,w as we,x as Te,y as Ee,z as De}from"./mermaidParser.worker-_pLIm6No.js";var Oe=/\s/;function ke(e){for(var t=e.length;t--&&Oe.test(e.charAt(t)););return t}var Ae=/^\s+/;function je(e){return e&&e.slice(0,ke(e)+1).replace(Ae,``)}var Me=NaN,Ne=/^[-+]0x[0-9a-f]+$/i,Pe=/^0b[01]+$/i,Fe=/^0o[0-7]+$/i,Ie=parseInt;function Le(e){if(typeof e==`number`)return e;if(b(e))return Me;if(y(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=y(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=je(e);var n=Pe.test(e);return n||Fe.test(e)?Ie(e.slice(2),n?2:8):Ne.test(e)?Me:+e}var Re=1/0,ze=17976931348623157e292;function A(e){return e?(e=Le(e),e===Re||e===-Re?(e<0?-1:1)*ze:e===e?e:0):e===0?e:0}function Be(e){var t=A(e),n=t%1;return t===t?n?t-n:t:0}var Ve=Object.create,He=function(){function e(){}return function(t){if(!y(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ue(e,t){var n=-1,r=e.length;for(t||=Array(r);++n1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&P(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r2?n[2]:void 0;for(a&&P(n[0],n[1],a)&&(i=1);++r-1?o[s?t[c]:c]:void 0}}var Wn=Math.max;function Gn(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var a=n==null?0:Be(n);return a<0&&(a=Wn(i+a,0)),Se(e,r(t,3),a)}var Kn=Un(Gn);function qn(e,t){var n=-1,r=_(e)?Array(e.length):[];return ue(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function V(e,t){return(T(e)?k:qn)(e,r(t,3))}function Jn(e,t){return e==null?e:ne(e,Ce(t),F)}function Yn(e,t){return e&&Te(e,Ce(t))}function Xn(e,t){return e>t}var Zn=Object.prototype.hasOwnProperty;function Qn(e,t){return e!=null&&Zn.call(e,t)}function $n(e,t){return e!=null&&a(e,t,Qn)}var er=`[object String]`;function tr(e){return typeof e==`string`||!T(e)&&S(e)&&ye(e)==er}function nr(e,t){return et||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function dr(e,t,n){t=t.length?k(t,function(e){return T(e)?function(t){return l(t,e.length===1?e[0]:e)}:e}):[O];var i=-1;return t=k(t,d(r)),cr(qn(e,function(e,n,r){return{criteria:k(t,function(t){return t(e)}),index:++i,value:e}}),function(e,t){return ur(e,t,n)})}var fr=we(`length`),pr=`\\ud800-\\udfff`,mr=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,hr=`\\ufe0e\\ufe0f`,gr=`[`+pr+`]`,_r=`[`+mr+`]`,vr=`\\ud83c[\\udffb-\\udfff]`,yr=`(?:`+_r+`|`+vr+`)`,br=`[^`+pr+`]`,xr=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Sr=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Cr=`\\u200d`,wr=yr+`?`,Tr=`[`+hr+`]?`,Er=`(?:`+Cr+`(?:`+[br,xr,Sr].join(`|`)+`)`+Tr+wr+`)*`,Dr=Tr+wr+Er,Or=`(?:`+[br+_r+`?`,_r,xr,Sr,gr].join(`|`)+`)`,kr=RegExp(vr+`(?=`+vr+`)|`+Or+Dr,`g`);function Ar(e){for(var t=kr.lastIndex=0;kr.test(e);)++t;return t}function jr(e){return at(e)?Ar(e):fr(e)}function Mr(e,t){return sr(e,t,function(t,n){return re(e,n)})}var G=Ye(function(e,t){return e==null?{}:Mr(e,t)}),Nr=Math.ceil,Pr=Math.max;function Fr(e,t,n,r){for(var i=-1,a=Pr(Nr((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function Ir(e){return function(t,n,r){return r&&typeof r!=`number`&&P(t,n,r)&&(n=r=void 0),t=A(t),n===void 0?(n=t,t=0):n=A(n),r=r===void 0?t1&&P(e,t[0],t[1])?t=[]:n>2&&P(t[0],t[1],t[2])&&(t=[t[0]]),dr(e,g(t,1),[])}),Br=0;function Vr(e){var t=++Br;return De(e)+t}function Hr(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r0;--s)if(o=t[s].dequeue(),o){r=r.concat(Xr(e,t,n,o,!0));break}}}return r}function Xr(e,t,n,r,i){var a=i?[]:void 0;return v(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,Qr(t,n,s)}),v(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,Qr(t,n,o)}),e.removeNode(r.v),a}function Zr(e,t){var n=new x,r=0,i=0;v(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var a=K(i+r+3).map(function(){return new Wr}),o=r+1;return v(n.nodes(),function(e){Qr(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function Qr(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function $r(e){v(e.graph().acyclicer===`greedy`?Jr(e,t(e)):ei(e),function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,Vr(`rev`))});function t(e){return function(t){return e.edge(t).weight}}}function ei(e){var t=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,v(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return v(e.nodes(),i),t}function ti(e){v(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function J(e,t,n,r){var i;do i=Vr(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function ni(e){var t=new x().setGraph(e.graph());return v(e.nodes(),function(n){t.setNode(n,e.node(n))}),v(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function ri(e){var t=new x({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),v(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function ii(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function Y(e){var t=V(K(ci(e)+1),function(){return[]});return v(e.nodes(),function(n){var r=e.node(n),i=r.rank;E(i)||(t[i][r.order]=n)}),t}function ai(e){var t=W(V(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(n){var r=e.node(n);$n(r,`rank`)&&(r.rank-=t)})}function oi(e){var t=W(V(e.nodes(),function(t){return e.node(t).rank})),n=[];v(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=e.graph().nodeRankFactor;v(n,function(t,n){E(t)&&n%i!==0?--r:r&&v(t,function(t){e.node(t).rank+=r})})}function si(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),J(e,`border`,i,t)}function ci(e){return U(V(e.nodes(),function(t){var n=e.node(t).rank;if(!E(n))return n}))}function li(e,t){var n={lhs:[],rhs:[]};return v(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function ui(e,t){var n=Pn();try{return t()}finally{console.log(e+` time: `+(Pn()-n)+`ms`)}}function di(e,t){return t()}function fi(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&v(r,t),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;ao.lim&&(s=o,c=!0),ar(C(t.edges(),function(t){return c===Wi(e,e.node(t.v),s)&&c!==Wi(e,e.node(t.w),s)}),function(e){return Z(t,e)})}function Vi(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Li(e),Pi(e,t),Hi(e,t)}function Hi(e,t){var n=Ni(e,Kn(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),v(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function Ui(e,t,n){return e.hasEdge(t,n)}function Wi(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function Gi(e){switch(e.graph().ranker){case`network-simplex`:Ji(e);break;case`tight-tree`:qi(e);break;case`longest-path`:Ki(e);break;default:Ji(e)}}var Ki=wi;function qi(e){wi(e),Ti(e)}function Ji(e){$(e)}function Yi(e){var t=J(e,`root`,{},`_root`),n=Zi(e),r=U(w(n))-1,i=2*r+1;e.graph().nestingRoot=t,v(e.edges(),function(t){e.edge(t).minlen*=i});var a=Qi(e)+1;v(e.children(),function(o){Xi(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function Xi(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var c=si(e,`_bt`),l=si(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,v(s,function(s){Xi(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function Zi(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&v(a,function(e){n(e,i+1)}),t[r]=i}return v(e.children(),function(e){n(e,1)}),t}function Qi(e){return D(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function $i(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function ea(e,t,n){var r={},i;v(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function ta(e,t,n){var r=na(e),i=new x({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return v(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),v(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=E(r)?0:r.weight;i.setEdge(n,a,{weight:e.edge(t).weight+o})}),Object.prototype.hasOwnProperty.call(o,`minRank`)&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function na(e){for(var t;e.hasNode(t=Vr(`_root`)););return t}function ra(e,t){for(var n=0,r=1;r0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n})),c}function aa(e){var t={},n=C(e.nodes(),function(t){return!e.children(t).length}),r=V(K(U(V(n,function(t){return e.node(t).rank}))+1),function(){return[]});function i(n){$n(t,n)||(t[n]=!0,r[e.node(n).rank].push(n),v(e.successors(n),i))}return v(q(n,function(t){return e.node(t).rank}),i),r}function oa(e,t){return V(t,function(t){var n=e.inEdges(t);if(n.length){var r=D(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}function sa(e,t){var n={};return v(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};E(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),v(t.edges(),function(e){var t=n[e.v],r=n[e.w];!E(t)&&!E(r)&&(r.indegree++,t.out.push(n[e.w]))}),ca(C(n,function(e){return!e.indegree}))}function ca(e){var t=[];function n(e){return function(t){t.merged||(E(t.barycenter)||E(e.barycenter)||t.barycenter>=e.barycenter)&&la(e,t)}}function r(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),v(i.in.reverse(),n(i)),v(i.out,r(i))}return V(C(t,function(e){return!e.merged}),function(e){return G(e,[`vs`,`i`,`barycenter`,`weight`])})}function la(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function ua(e,t){var n=li(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=q(n.rhs,function(e){return-e.i}),a=[],o=0,s=0,c=0;r.sort(fa(!!t)),c=da(a,i,c),v(r,function(e){c+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,c=da(a,i,c)});var l={vs:I(a)};return s&&(l.barycenter=o/s,l.weight=s),l}function da(e,t,n){for(var r;t.length&&(r=B(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function fa(e){return function(t,n){return t.barycentern.barycenter?1:e?n.i-t.i:t.i-n.i}}function pa(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=C(i,function(e){return e!==o&&e!==s}));var l=oa(e,i);v(l,function(t){if(e.children(t.v).length){var i=pa(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&ha(t,i)}});var u=sa(l,n);ma(u,c);var d=ua(u,r);if(o&&(d.vs=I([o,d.vs,s]),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}function ma(e,t){v(e,function(e){e.vs=I(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function ha(e,t){E(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function ga(e){var t=ci(e),n=_a(e,K(1,t+1),`inEdges`),r=_a(e,K(t-1,-1,-1),`outEdges`),i=aa(e);ya(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){va(s%2?n:r,s%4>=2),i=Y(e);var l=ra(e,i);lo||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Sa(e){var t={},n=0;function r(i){var a=n;v(e.children(i),r),t[i]={low:a,lim:n++}}return v(e.children(),r),t}function Ca(e,t){var n={};function r(t,r){var i=0,a=0,o=t.length,s=B(r);return v(r,function(t,c){var l=Ta(e,t),u=l?e.node(l).order:o;(l||t===s)&&(v(r.slice(a,c+1),function(t){v(e.predecessors(t),function(r){var a=e.node(r),o=a.order;(oo)&&Ea(n,t,s)})})}function i(t,n){var i=-1,a,o=0;return v(n,function(s,c){if(e.node(s).dummy===`border`){var l=e.predecessors(s);l.length&&(a=e.node(l[0]).order,r(n,o,c,i,a),o=c,i=a)}r(n,o,n.length,a,t.length)}),n}return D(t,i),n}function Ta(e,t){if(e.node(t).dummy)return Kn(e.predecessors(t),function(t){return e.node(t).dummy})}function Ea(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Da(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Oa(e,t,n,r){var i={},a={},o={};return v(t,function(e){v(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),v(t,function(e){var t=-1;v(e,function(e){var s=r(e);if(s.length){s=q(s,function(e){return o[e]});for(var c=(s.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=s[l];a[e]===e&&t{var t=n(` buildLayoutGraph`,()=>Xa(e));n(` runLayout`,()=>Ba(t,n)),n(` updateInputGraph`,()=>Va(e,t))})}function Ba(e,t){t(` makeSpaceForEdgeLabels`,()=>Za(e)),t(` removeSelfEdges`,()=>oo(e)),t(` acyclic`,()=>$r(e)),t(` nestingGraph.run`,()=>Yi(e)),t(` rank`,()=>Gi(ri(e))),t(` injectEdgeLabelProxies`,()=>Qa(e)),t(` removeEmptyRanks`,()=>oi(e)),t(` nestingGraph.cleanup`,()=>$i(e)),t(` normalizeRanks`,()=>ai(e)),t(` assignRankMinMax`,()=>$a(e)),t(` removeEdgeLabelProxies`,()=>eo(e)),t(` normalize.run`,()=>xi(e)),t(` parentDummyChains`,()=>ba(e)),t(` addBorderSegments`,()=>fi(e)),t(` order`,()=>ga(e)),t(` insertSelfEdges`,()=>so(e)),t(` adjustCoordinateSystem`,()=>mi(e)),t(` position`,()=>La(e)),t(` positionSelfEdges`,()=>co(e)),t(` removeBorderNodes`,()=>ao(e)),t(` normalize.undo`,()=>Ci(e)),t(` fixupEdgeLabelCoords`,()=>ro(e)),t(` undoCoordinateSystem`,()=>hi(e)),t(` translateGraph`,()=>to(e)),t(` assignNodeIntersects`,()=>no(e)),t(` reversePoints`,()=>io(e)),t(` acyclic.undo`,()=>ti(e))}function Va(e,t){v(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),v(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Ha=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],Ua={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Wa=[`acyclicer`,`ranker`,`rankdir`,`align`],Ga=[`width`,`height`],Ka={width:0,height:0},qa=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Ja={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Ya=[`labelpos`];function Xa(e){var t=new x({multigraph:!0,compound:!0}),n=uo(e.graph());return t.setGraph(ir({},Ua,lo(n,Ha),G(n,Wa))),v(e.nodes(),function(n){var r=uo(e.node(n));t.setNode(n,Ln(lo(r,Ga),Ka)),t.setParent(n,e.parent(n))}),v(e.edges(),function(n){var r=uo(e.edge(n));t.setEdge(n,ir({},Ja,lo(r,qa),G(r,Ya)))}),t}function Za(e){var t=e.graph();t.ranksep/=2,v(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Qa(e){v(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);J(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function $a(e){var t=0;v(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=U(t,r.maxRank))}),e.graph().maxRank=t}function eo(e){v(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function to(e){var t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){var a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}v(e.nodes(),function(t){c(e.node(t))}),v(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&c(n)}),t-=o,r-=s,v(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=r}),v(e.edges(),function(n){var i=e.edge(n);v(i.points,function(e){e.x-=t,e.y-=r}),Object.prototype.hasOwnProperty.call(i,`x`)&&(i.x-=t),Object.prototype.hasOwnProperty.call(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function no(e){v(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(ii(r,a)),n.points.push(ii(i,o))})}function ro(e){v(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function io(e){v(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function ao(e){v(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(B(n.borderLeft)),o=e.node(B(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),v(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function oo(e){v(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function so(e){v(Y(e),function(t){var n=0;v(t,function(t,r){var i=e.node(t);i.order=r+n,v(i.selfEdges,function(t){J(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function co(e){v(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function lo(e,t){return H(G(e,t),Number)}function uo(e){var t={};return v(e,function(e,n){t[n.toLowerCase()]=e}),t}export{za as t}; \ No newline at end of file +import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as ee,R as te,S as ne,T as re,U as ie,V as ae,W as oe,X as _,Y as se,Z as ce,_ as v,at as le,b as ue,ct as y,dt as b,et as de,f as x,ft as S,g as C,h as w,ht as fe,it as pe,j as me,k as he,lt as T,m as E,mt as ge,nt as _e,ot as ve,p as D,pt as ye,q as be,rt as xe,st as O,tt as Se,ut as k,v as Ce,w as we,x as Te,y as Ee,z as De}from"./mermaidParser.worker-CBWarbNh.js";var Oe=/\s/;function ke(e){for(var t=e.length;t--&&Oe.test(e.charAt(t)););return t}var Ae=/^\s+/;function je(e){return e&&e.slice(0,ke(e)+1).replace(Ae,``)}var Me=NaN,Ne=/^[-+]0x[0-9a-f]+$/i,Pe=/^0b[01]+$/i,Fe=/^0o[0-7]+$/i,Ie=parseInt;function Le(e){if(typeof e==`number`)return e;if(b(e))return Me;if(y(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=y(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=je(e);var n=Pe.test(e);return n||Fe.test(e)?Ie(e.slice(2),n?2:8):Ne.test(e)?Me:+e}var Re=1/0,ze=17976931348623157e292;function A(e){return e?(e=Le(e),e===Re||e===-Re?(e<0?-1:1)*ze:e===e?e:0):e===0?e:0}function Be(e){var t=A(e),n=t%1;return t===t?n?t-n:t:0}var Ve=Object.create,He=function(){function e(){}return function(t){if(!y(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ue(e,t){var n=-1,r=e.length;for(t||=Array(r);++n1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&P(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r2?n[2]:void 0;for(a&&P(n[0],n[1],a)&&(i=1);++r-1?o[s?t[c]:c]:void 0}}var Wn=Math.max;function Gn(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var a=n==null?0:Be(n);return a<0&&(a=Wn(i+a,0)),Se(e,r(t,3),a)}var Kn=Un(Gn);function qn(e,t){var n=-1,r=_(e)?Array(e.length):[];return ue(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function V(e,t){return(T(e)?k:qn)(e,r(t,3))}function Jn(e,t){return e==null?e:ne(e,Ce(t),F)}function Yn(e,t){return e&&Te(e,Ce(t))}function Xn(e,t){return e>t}var Zn=Object.prototype.hasOwnProperty;function Qn(e,t){return e!=null&&Zn.call(e,t)}function $n(e,t){return e!=null&&a(e,t,Qn)}var er=`[object String]`;function tr(e){return typeof e==`string`||!T(e)&&S(e)&&ye(e)==er}function nr(e,t){return et||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function dr(e,t,n){t=t.length?k(t,function(e){return T(e)?function(t){return l(t,e.length===1?e[0]:e)}:e}):[O];var i=-1;return t=k(t,d(r)),cr(qn(e,function(e,n,r){return{criteria:k(t,function(t){return t(e)}),index:++i,value:e}}),function(e,t){return ur(e,t,n)})}var fr=we(`length`),pr=`\\ud800-\\udfff`,mr=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,hr=`\\ufe0e\\ufe0f`,gr=`[`+pr+`]`,_r=`[`+mr+`]`,vr=`\\ud83c[\\udffb-\\udfff]`,yr=`(?:`+_r+`|`+vr+`)`,br=`[^`+pr+`]`,xr=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Sr=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Cr=`\\u200d`,wr=yr+`?`,Tr=`[`+hr+`]?`,Er=`(?:`+Cr+`(?:`+[br,xr,Sr].join(`|`)+`)`+Tr+wr+`)*`,Dr=Tr+wr+Er,Or=`(?:`+[br+_r+`?`,_r,xr,Sr,gr].join(`|`)+`)`,kr=RegExp(vr+`(?=`+vr+`)|`+Or+Dr,`g`);function Ar(e){for(var t=kr.lastIndex=0;kr.test(e);)++t;return t}function jr(e){return at(e)?Ar(e):fr(e)}function Mr(e,t){return sr(e,t,function(t,n){return re(e,n)})}var G=Ye(function(e,t){return e==null?{}:Mr(e,t)}),Nr=Math.ceil,Pr=Math.max;function Fr(e,t,n,r){for(var i=-1,a=Pr(Nr((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function Ir(e){return function(t,n,r){return r&&typeof r!=`number`&&P(t,n,r)&&(n=r=void 0),t=A(t),n===void 0?(n=t,t=0):n=A(n),r=r===void 0?t1&&P(e,t[0],t[1])?t=[]:n>2&&P(t[0],t[1],t[2])&&(t=[t[0]]),dr(e,g(t,1),[])}),Br=0;function Vr(e){var t=++Br;return De(e)+t}function Hr(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r0;--s)if(o=t[s].dequeue(),o){r=r.concat(Xr(e,t,n,o,!0));break}}}return r}function Xr(e,t,n,r,i){var a=i?[]:void 0;return v(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,Qr(t,n,s)}),v(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,Qr(t,n,o)}),e.removeNode(r.v),a}function Zr(e,t){var n=new x,r=0,i=0;v(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var a=K(i+r+3).map(function(){return new Wr}),o=r+1;return v(n.nodes(),function(e){Qr(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function Qr(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function $r(e){v(e.graph().acyclicer===`greedy`?Jr(e,t(e)):ei(e),function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,Vr(`rev`))});function t(e){return function(t){return e.edge(t).weight}}}function ei(e){var t=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,v(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return v(e.nodes(),i),t}function ti(e){v(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function J(e,t,n,r){var i;do i=Vr(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function ni(e){var t=new x().setGraph(e.graph());return v(e.nodes(),function(n){t.setNode(n,e.node(n))}),v(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function ri(e){var t=new x({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),v(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function ii(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function Y(e){var t=V(K(ci(e)+1),function(){return[]});return v(e.nodes(),function(n){var r=e.node(n),i=r.rank;E(i)||(t[i][r.order]=n)}),t}function ai(e){var t=W(V(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(n){var r=e.node(n);$n(r,`rank`)&&(r.rank-=t)})}function oi(e){var t=W(V(e.nodes(),function(t){return e.node(t).rank})),n=[];v(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=e.graph().nodeRankFactor;v(n,function(t,n){E(t)&&n%i!==0?--r:r&&v(t,function(t){e.node(t).rank+=r})})}function si(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),J(e,`border`,i,t)}function ci(e){return U(V(e.nodes(),function(t){var n=e.node(t).rank;if(!E(n))return n}))}function li(e,t){var n={lhs:[],rhs:[]};return v(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function ui(e,t){var n=Pn();try{return t()}finally{console.log(e+` time: `+(Pn()-n)+`ms`)}}function di(e,t){return t()}function fi(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&v(r,t),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;ao.lim&&(s=o,c=!0),ar(C(t.edges(),function(t){return c===Wi(e,e.node(t.v),s)&&c!==Wi(e,e.node(t.w),s)}),function(e){return Z(t,e)})}function Vi(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Li(e),Pi(e,t),Hi(e,t)}function Hi(e,t){var n=Ni(e,Kn(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),v(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function Ui(e,t,n){return e.hasEdge(t,n)}function Wi(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function Gi(e){switch(e.graph().ranker){case`network-simplex`:Ji(e);break;case`tight-tree`:qi(e);break;case`longest-path`:Ki(e);break;default:Ji(e)}}var Ki=wi;function qi(e){wi(e),Ti(e)}function Ji(e){$(e)}function Yi(e){var t=J(e,`root`,{},`_root`),n=Zi(e),r=U(w(n))-1,i=2*r+1;e.graph().nestingRoot=t,v(e.edges(),function(t){e.edge(t).minlen*=i});var a=Qi(e)+1;v(e.children(),function(o){Xi(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function Xi(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var c=si(e,`_bt`),l=si(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,v(s,function(s){Xi(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function Zi(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&v(a,function(e){n(e,i+1)}),t[r]=i}return v(e.children(),function(e){n(e,1)}),t}function Qi(e){return D(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function $i(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function ea(e,t,n){var r={},i;v(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function ta(e,t,n){var r=na(e),i=new x({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return v(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),v(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=E(r)?0:r.weight;i.setEdge(n,a,{weight:e.edge(t).weight+o})}),Object.prototype.hasOwnProperty.call(o,`minRank`)&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function na(e){for(var t;e.hasNode(t=Vr(`_root`)););return t}function ra(e,t){for(var n=0,r=1;r0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n})),c}function aa(e){var t={},n=C(e.nodes(),function(t){return!e.children(t).length}),r=V(K(U(V(n,function(t){return e.node(t).rank}))+1),function(){return[]});function i(n){$n(t,n)||(t[n]=!0,r[e.node(n).rank].push(n),v(e.successors(n),i))}return v(q(n,function(t){return e.node(t).rank}),i),r}function oa(e,t){return V(t,function(t){var n=e.inEdges(t);if(n.length){var r=D(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}function sa(e,t){var n={};return v(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};E(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),v(t.edges(),function(e){var t=n[e.v],r=n[e.w];!E(t)&&!E(r)&&(r.indegree++,t.out.push(n[e.w]))}),ca(C(n,function(e){return!e.indegree}))}function ca(e){var t=[];function n(e){return function(t){t.merged||(E(t.barycenter)||E(e.barycenter)||t.barycenter>=e.barycenter)&&la(e,t)}}function r(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),v(i.in.reverse(),n(i)),v(i.out,r(i))}return V(C(t,function(e){return!e.merged}),function(e){return G(e,[`vs`,`i`,`barycenter`,`weight`])})}function la(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function ua(e,t){var n=li(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=q(n.rhs,function(e){return-e.i}),a=[],o=0,s=0,c=0;r.sort(fa(!!t)),c=da(a,i,c),v(r,function(e){c+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,c=da(a,i,c)});var l={vs:I(a)};return s&&(l.barycenter=o/s,l.weight=s),l}function da(e,t,n){for(var r;t.length&&(r=B(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function fa(e){return function(t,n){return t.barycentern.barycenter?1:e?n.i-t.i:t.i-n.i}}function pa(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=C(i,function(e){return e!==o&&e!==s}));var l=oa(e,i);v(l,function(t){if(e.children(t.v).length){var i=pa(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&ha(t,i)}});var u=sa(l,n);ma(u,c);var d=ua(u,r);if(o&&(d.vs=I([o,d.vs,s]),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}function ma(e,t){v(e,function(e){e.vs=I(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function ha(e,t){E(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function ga(e){var t=ci(e),n=_a(e,K(1,t+1),`inEdges`),r=_a(e,K(t-1,-1,-1),`outEdges`),i=aa(e);ya(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){va(s%2?n:r,s%4>=2),i=Y(e);var l=ra(e,i);lo||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Sa(e){var t={},n=0;function r(i){var a=n;v(e.children(i),r),t[i]={low:a,lim:n++}}return v(e.children(),r),t}function Ca(e,t){var n={};function r(t,r){var i=0,a=0,o=t.length,s=B(r);return v(r,function(t,c){var l=Ta(e,t),u=l?e.node(l).order:o;(l||t===s)&&(v(r.slice(a,c+1),function(t){v(e.predecessors(t),function(r){var a=e.node(r),o=a.order;(oo)&&Ea(n,t,s)})})}function i(t,n){var i=-1,a,o=0;return v(n,function(s,c){if(e.node(s).dummy===`border`){var l=e.predecessors(s);l.length&&(a=e.node(l[0]).order,r(n,o,c,i,a),o=c,i=a)}r(n,o,n.length,a,t.length)}),n}return D(t,i),n}function Ta(e,t){if(e.node(t).dummy)return Kn(e.predecessors(t),function(t){return e.node(t).dummy})}function Ea(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Da(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Oa(e,t,n,r){var i={},a={},o={};return v(t,function(e){v(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),v(t,function(e){var t=-1;v(e,function(e){var s=r(e);if(s.length){s=q(s,function(e){return o[e]});for(var c=(s.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=s[l];a[e]===e&&t{var t=n(` buildLayoutGraph`,()=>Xa(e));n(` runLayout`,()=>Ba(t,n)),n(` updateInputGraph`,()=>Va(e,t))})}function Ba(e,t){t(` makeSpaceForEdgeLabels`,()=>Za(e)),t(` removeSelfEdges`,()=>oo(e)),t(` acyclic`,()=>$r(e)),t(` nestingGraph.run`,()=>Yi(e)),t(` rank`,()=>Gi(ri(e))),t(` injectEdgeLabelProxies`,()=>Qa(e)),t(` removeEmptyRanks`,()=>oi(e)),t(` nestingGraph.cleanup`,()=>$i(e)),t(` normalizeRanks`,()=>ai(e)),t(` assignRankMinMax`,()=>$a(e)),t(` removeEdgeLabelProxies`,()=>eo(e)),t(` normalize.run`,()=>xi(e)),t(` parentDummyChains`,()=>ba(e)),t(` addBorderSegments`,()=>fi(e)),t(` order`,()=>ga(e)),t(` insertSelfEdges`,()=>so(e)),t(` adjustCoordinateSystem`,()=>mi(e)),t(` position`,()=>La(e)),t(` positionSelfEdges`,()=>co(e)),t(` removeBorderNodes`,()=>ao(e)),t(` normalize.undo`,()=>Ci(e)),t(` fixupEdgeLabelCoords`,()=>ro(e)),t(` undoCoordinateSystem`,()=>hi(e)),t(` translateGraph`,()=>to(e)),t(` assignNodeIntersects`,()=>no(e)),t(` reversePoints`,()=>io(e)),t(` acyclic.undo`,()=>ti(e))}function Va(e,t){v(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),v(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Ha=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],Ua={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Wa=[`acyclicer`,`ranker`,`rankdir`,`align`],Ga=[`width`,`height`],Ka={width:0,height:0},qa=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Ja={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Ya=[`labelpos`];function Xa(e){var t=new x({multigraph:!0,compound:!0}),n=uo(e.graph());return t.setGraph(ir({},Ua,lo(n,Ha),G(n,Wa))),v(e.nodes(),function(n){var r=uo(e.node(n));t.setNode(n,Ln(lo(r,Ga),Ka)),t.setParent(n,e.parent(n))}),v(e.edges(),function(n){var r=uo(e.edge(n));t.setEdge(n,ir({},Ja,lo(r,qa),G(r,Ya)))}),t}function Za(e){var t=e.graph();t.ranksep/=2,v(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Qa(e){v(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);J(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function $a(e){var t=0;v(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=U(t,r.maxRank))}),e.graph().maxRank=t}function eo(e){v(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function to(e){var t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){var a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}v(e.nodes(),function(t){c(e.node(t))}),v(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&c(n)}),t-=o,r-=s,v(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=r}),v(e.edges(),function(n){var i=e.edge(n);v(i.points,function(e){e.x-=t,e.y-=r}),Object.prototype.hasOwnProperty.call(i,`x`)&&(i.x-=t),Object.prototype.hasOwnProperty.call(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function no(e){v(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(ii(r,a)),n.points.push(ii(i,o))})}function ro(e){v(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function io(e){v(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function ao(e){v(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(B(n.borderLeft)),o=e.node(B(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),v(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function oo(e){v(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function so(e){v(Y(e),function(t){var n=0;v(t,function(t,r){var i=e.node(t);i.order=r+n,v(i.selfEdges,function(t){J(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function co(e){v(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function lo(e,t){return H(G(e,t),Number)}function uo(e){var t={};return v(e,function(e,n){t[n.toLowerCase()]=e}),t}export{za as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-Ywu0a3TZ.js b/apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-Bmj8OigH.js similarity index 95% rename from apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-Ywu0a3TZ.js rename to apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-Bmj8OigH.js index 5aa97bf81..e8112d596 100644 --- a/apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-Ywu0a3TZ.js +++ b/apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-Bmj8OigH.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{x as n}from"./chunk-DU6HZSFF-CcF2nKWM.js";import"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import{s as r}from"./chunk-4HAMMTFA-B0yXCELs.js";import{a as i,i as a,n as o}from"./chunk-GVQU2GXP-aw9OR1ii.js";import{t as s}from"./dagre-BP-EatEF.js";import{_t as c,a as l,bt as u,c as d,d as f,f as p,gt as m,l as h,o as g,s as _,u as v,xt as y}from"./mermaidParser.worker-_pLIm6No.js";var b=t((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),x=t((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),S=t(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`||e===`er`||e===`classDiagram`,`shouldMergeSelfLoopSegments`),C=[`x`,`y`,`width`,`height`,`labelBBox`,`intersect`,`calcIntersect`,`diff`,`clusterNode`],w=t((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return x(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:x(i)},`getSelfLoopSide`),T=t((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=b(Math.max(r,e.width*.35),36,c),u=b(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),E=t((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),D=t((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=w(e,l,n,c.start,a),f=T(l,d,t,u.width??0),p=E(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),O=t(async({element:n,graph:a,diagramType:s,id:l,parentCluster:u,siteConfig:f})=>{let p=a.graph().rankdir;e.trace(`Dir in recursive render - dir:`,p);let{clusters:m,edgePaths:_,edgeLabels:y,nodes:b,rootGroups:x}=d(n,{edgePathsClass:`edgePaths`});a.nodes()?e.info(`Recursive render XXX`,a.nodes()):e.info(`No nodes found for`,a),a.edges().length>0&&e.info(`Recursive edges`,a.edge(a.edges()[0]));let C=S(s);await Promise.all(a.nodes().map(async function(t){let n=a.node(t);if(u!==void 0){let n=JSON.parse(JSON.stringify(u.clusterData));e.trace(`Setting data for parent cluster XXX +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{x as n}from"./chunk-DU6HZSFF-CbPIJzjs.js";import"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import{s as r}from"./chunk-4HAMMTFA-X3JAMEe8.js";import{a as i,i as a,n as o}from"./chunk-GVQU2GXP-CCw5T6ST.js";import{t as s}from"./dagre-DvNxCnfe.js";import{_t as c,a as l,bt as u,c as d,d as f,f as p,gt as m,l as h,o as g,s as _,u as v,xt as y}from"./mermaidParser.worker-CBWarbNh.js";var b=t((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),x=t((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),S=t(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`||e===`er`||e===`classDiagram`,`shouldMergeSelfLoopSegments`),C=[`x`,`y`,`width`,`height`,`labelBBox`,`intersect`,`calcIntersect`,`diff`,`clusterNode`],w=t((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return x(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:x(i)},`getSelfLoopSide`),T=t((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=b(Math.max(r,e.width*.35),36,c),u=b(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),E=t((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),D=t((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=w(e,l,n,c.start,a),f=T(l,d,t,u.width??0),p=E(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),O=t(async({element:n,graph:a,diagramType:s,id:l,parentCluster:u,siteConfig:f})=>{let p=a.graph().rankdir;e.trace(`Dir in recursive render - dir:`,p);let{clusters:m,edgePaths:_,edgeLabels:y,nodes:b,rootGroups:x}=d(n,{edgePathsClass:`edgePaths`});a.nodes()?e.info(`Recursive render XXX`,a.nodes()):e.info(`No nodes found for`,a),a.edges().length>0&&e.info(`Recursive edges`,a.edge(a.edges()[0]));let C=S(s);await Promise.all(a.nodes().map(async function(t){let n=a.node(t);if(u!==void 0){let n=JSON.parse(JSON.stringify(u.clusterData));e.trace(`Setting data for parent cluster XXX Node.id = `,t,` data=`,n.height,` Parent cluster`,u.height),a.setNode(u.id,n),a.parent(t)||(e.trace(`Setting parent`,t,u.id),a.setParent(t,u.id,n))}if(e.info(`(Insert) Node XXX`+t+`: `+JSON.stringify(a.node(t))),n?.clusterNode){e.info(`Cluster identified XBX`,t,n.width,a.node(t));let{ranksep:o,nodesep:c}=a.graph();n.graph.setGraph({...n.graph.graph(),ranksep:o+25,nodesep:c});let u=await F({element:b,graph:n.graph,diagramType:s,id:l,parentCluster:a.node(t),siteConfig:f}),d=u.elem;r(n,d),n.diff=u.diff||0,e.info(`New compound node after recursive render XAX`,t,`width`,n.width,`height`,n.height),i(d,n)}else a.children(t).length>0?(e.trace(`Cluster - the non recursive path XBX`,t,n.id,n,n.width,`Graph:`,a),e.trace(h(n.id,a)),g.set(n.id,{id:h(n.id,a),node:n})):(e.trace(`Node - the non recursive path XAX`,t,b,a.node(t),p),await v(b,a.node(t),{config:f,dir:p}))})),await t(async()=>{let t=a.edges().map(async function(t){let n=a.edge(t.v,t.w,t.name);if(e.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),e.info(`Edge `+t.v+` -> `+t.w+`: `,t,` `,JSON.stringify(a.edge(t))),e.info(`Fix`,g,`ids:`,t.v,t.w,`Translating: `,g.get(t.v),g.get(t.w)),C&&n.selfLoop){if(n.selfLoop.order!==1)return;let e={...n.originalEdge,...n,id:n.selfLoop.id,startLabelLeft:n.originalEdge?.startLabelLeft??n.startLabelLeft,startLabelRight:n.originalEdge?.startLabelRight??n.startLabelRight,endLabelLeft:n.originalEdge?.endLabelLeft??n.endLabelLeft,endLabelRight:n.originalEdge?.endLabelRight??n.endLabelRight};await c(y,e),n.width=e.width,n.height=e.height,n.labelStyle=e.labelStyle;return}await c(y,n)});await Promise.all(t)},`processEdges`)();let{subGraphTitleTotalMargin:w}=o(f);return{elem:x,graph:a,groups:{clusters:m,edgePaths:_,edgeLabels:y,nodes:b,rootGroups:x},diagramType:s,id:l,mergeSelfLoops:C,subGraphTitleTotalMargin:w}},`measureDagreGraph`),k=t(t=>{e.info(`############################################# XXX`),e.info(`### Layout ### XXX`),e.info(`############################################# XXX`),s(t)},`runDagreGraphLayout`),A=t((e,t,n)=>{let r=e.node(t);if(!r)return;let i={...r};return r?.clusterNode?i.y=(r.y??0)+n:e.children(t).length>0?i.height=(r.height??0)+n:i.y=(r.y??0)+n/2,i},`normalizeDagreNode`),j=t((e,t)=>{C.forEach(n=>{t[n]!==void 0&&(e[n]=t[n])})},`applyDagreNodeLayout`),M=t((e,t,n,r)=>({...e,start:e.start??t,end:e.end??n,points:(e.points??[]).map(e=>({...e,y:typeof e.y==`number`?e.y+r:e.y}))}),`normalizeDagreEdge`),N=t((e,t)=>{let{graph:n,mergeSelfLoops:r,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(e=>[e.id,e]));f(n).forEach(e=>{let t=A(n,e,i);if(!t)return;j(n.node(e),t);let r=a.get(e);r&&j(r,t)});let o=i/2;return e.edges=D(n,o,{mergeSelfLoops:r}).map(({edge:e,start:t,end:n})=>M(e,t,n,o)),e},`applyDagreLayoutResult`),P=t(async({elem:t,graph:n,groups:{clusters:r,edgePaths:i},diagramType:o,id:s,mergeSelfLoops:c,subGraphTitleTotalMargin:l})=>{let d=0;await Promise.all(f(n).map(async function(t){let i=n.node(t);if(e.info(`Position XBX => `+t+`: (`+i.x,`,`+i.y,`) width: `,i.width,` height: `,i.height),i?.clusterNode)i.y+=l,e.info(`A tainted cluster node XBX1`,t,i.id,i.width,i.height,i.x,i.y,n.parent(t)),g.get(i.id).node=i,a(i);else if(n.children(t).length>0){e.info(`A pure cluster node XBX1`,t,i.id,i.x,i.y,i.width,i.height,n.parent(t)),i.height+=l,n.node(i.parentId);let a=i?.padding/2||0,o=i?.labelBBox?.height||0,s=o-a||0;e.debug(`OffsetY`,s,`labelHeight`,o,`halfPadding`,a),await y(r,i),g.get(i.id).node=i}else{let t=n.node(i.parentId);i.y+=l/2,e.info(`A regular node XBX1 - using the padding`,i.id,`parent`,i.parentId,i.width,i.height,i.x,i.y,`offsetY`,i.offsetY,`parent`,t,t?.offsetY,i),a(i)}}));let p=l/2;return D(n,p,{mergeSelfLoops:c}).forEach(function({edge:t,start:r,end:a}){e.info(`Edge `+r+` -> `+a+`: `+JSON.stringify(t),t),t.points.forEach(e=>e.y+=p),u(t,m(i,t,g,o,n.node(r),n.node(a),s))}),n.nodes().forEach(function(t){let r=n.node(t);e.info(t,r.type,r.diff),r.isGroup&&(d=r.diff)}),e.warn(`Returning from recursive render XAX`,t,d),{elem:t,diff:d}},`paintDagreLayoutCore`),F=t(async e=>{let t=await O(e);return k(t.graph),await P(t)},`renderDagreSubgraph`),I=t(t=>{let n=new p({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.nodeSpacing||t.config?.flowchart?.nodeSpacing,ranksep:t.config?.rankSpacing||t.rankSpacing||t.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return t.nodes.forEach(e=>{n.setNode(e.id,{...e}),e.parentId&&n.setParent(e.id,e.parentId)}),e.debug(`Edges:`,t.edges),t.edges.forEach(e=>{if(e.start===e.end){let t=e.start,r=t+`---`+t+`---1`,i=t+`---`+t+`---2`,a=n.node(t);n.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),n.setParent(r,a.parentId),n.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),n.setParent(i,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=t+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,a.isGroup&&(s.fromCluster=t,l.toCluster=t),l.id=t+`-cyclic-special-2`,l.arrowTypeStart=`none`,n.setEdge(t,r,s,t+`-cyclic-special-0`),n.setEdge(r,i,c,t+`-cyclic-special-1`),n.setEdge(i,t,l,t+`-cyclic-special-2`)}else n.setEdge(e.start,e.end,{...e},e.id)}),l(n),{graph:n}},`prepareLayoutForDagre`),L=t(async(e,{element:t,preparedLayout:r})=>{let i=r??I(e),a=n(),o=await O({element:t,graph:i.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:a});return i.measuredLayout=o,o},`measureDagreLayout`),R=t((e,t)=>{let n=t.preparedLayout?.measuredLayout;if(!n)throw Error(`runDagreLayoutCore requires measureDagreLayout to run first`);return k(n.graph),N(e,n),n},`runDagreLayoutCore`),z=_({prepareLayout:I,measureLayout:L,runLayoutCore:R,paintOptions:{clusterDb:g,getNodes:t((e,{measure:t})=>f(t.graph).map(e=>t.graph.node(e)).filter(Boolean),`getDagrePaintNodes`),getEdgeNode:t((e,t,{measure:n})=>e?n.graph.node(e):void 0,`getDagreEdgeNode`),skipNode:t((e,{measure:t})=>!t.graph.hasNode(e.id),`skipNode`),isCluster:t((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,`isCluster`)}});export{N as applyDagreLayoutResult,D as getEdgesToRender,L as measureDagreLayout,I as prepareLayoutForDagre,z as render,R as runDagreLayoutCore}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-DJNYmRpQ.js b/apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-hj2RjtGx.js similarity index 94% rename from apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-DJNYmRpQ.js rename to apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-hj2RjtGx.js index df5d3a216..d269bf089 100644 --- a/apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-DJNYmRpQ.js +++ b/apps/pythinker-code/dist-web/assets/dagre-GXQ25YYZ-hj2RjtGx.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{x as n}from"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import{s as r}from"./chunk-4HAMMTFA-B5soPjjq.js";import{a as i,i as a,n as o}from"./chunk-GVQU2GXP-BrOdU7Oy.js";import{a as s,c,i as l}from"./chunk-OSK3NFVY-BT2Y-lqQ.js";import{t as u}from"./graphlib-B8gBHxth.js";import{t as d}from"./dagre-BJJUWK_n.js";import{n as f}from"./chunk-L3NEJ4N5-XwNqFvev.js";import{a as p,c as m,i as h,r as g,s as _,t as v,u as y}from"./chunk-2E4U76K2-CUuPs4AQ.js";var b=e((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),x=e((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),S=e(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`||e===`er`||e===`classDiagram`,`shouldMergeSelfLoopSegments`),C=[`x`,`y`,`width`,`height`,`labelBBox`,`intersect`,`calcIntersect`,`diff`,`clusterNode`],w=e((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return x(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:x(i)},`getSelfLoopSide`),T=e((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=b(Math.max(r,e.width*.35),36,c),u=b(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),E=e((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),D=e((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=w(e,l,n,c.start,a),f=T(l,d,t,u.width??0),p=E(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),O=e(async({element:n,graph:a,diagramType:c,id:l,parentCluster:u,siteConfig:d})=>{let f=a.graph().rankdir;t.trace(`Dir in recursive render - dir:`,f);let{clusters:h,edgePaths:v,edgeLabels:y,nodes:b,rootGroups:x}=p(n,{edgePathsClass:`edgePaths`});a.nodes()?t.info(`Recursive render XXX`,a.nodes()):t.info(`No nodes found for`,a),a.edges().length>0&&t.info(`Recursive edges`,a.edge(a.edges()[0]));let C=S(c);await Promise.all(a.nodes().map(async function(e){let n=a.node(e);if(u!==void 0){let n=JSON.parse(JSON.stringify(u.clusterData));t.trace(`Setting data for parent cluster XXX +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{x as n}from"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import{s as r}from"./chunk-4HAMMTFA-Dlc4jvjp.js";import{a as i,i as a,n as o}from"./chunk-GVQU2GXP-Ddvf-Y11.js";import{a as s,c,i as l}from"./chunk-OSK3NFVY-ZXiPE9OQ.js";import{t as u}from"./graphlib-B8gBHxth.js";import{t as d}from"./dagre-BJJUWK_n.js";import{n as f}from"./chunk-L3NEJ4N5-BKsN7TKH.js";import{a as p,c as m,i as h,r as g,s as _,t as v,u as y}from"./chunk-2E4U76K2-DSYv76d-.js";var b=e((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),x=e((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),S=e(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`||e===`er`||e===`classDiagram`,`shouldMergeSelfLoopSegments`),C=[`x`,`y`,`width`,`height`,`labelBBox`,`intersect`,`calcIntersect`,`diff`,`clusterNode`],w=e((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return x(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:x(i)},`getSelfLoopSide`),T=e((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=b(Math.max(r,e.width*.35),36,c),u=b(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),E=e((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),D=e((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=w(e,l,n,c.start,a),f=T(l,d,t,u.width??0),p=E(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),O=e(async({element:n,graph:a,diagramType:c,id:l,parentCluster:u,siteConfig:d})=>{let f=a.graph().rankdir;t.trace(`Dir in recursive render - dir:`,f);let{clusters:h,edgePaths:v,edgeLabels:y,nodes:b,rootGroups:x}=p(n,{edgePathsClass:`edgePaths`});a.nodes()?t.info(`Recursive render XXX`,a.nodes()):t.info(`No nodes found for`,a),a.edges().length>0&&t.info(`Recursive edges`,a.edge(a.edges()[0]));let C=S(c);await Promise.all(a.nodes().map(async function(e){let n=a.node(e);if(u!==void 0){let n=JSON.parse(JSON.stringify(u.clusterData));t.trace(`Setting data for parent cluster XXX Node.id = `,e,` data=`,n.height,` Parent cluster`,u.height),a.setNode(u.id,n),a.parent(e)||(t.trace(`Setting parent`,e,u.id),a.setParent(e,u.id,n))}if(t.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(a.node(e))),n?.clusterNode){t.info(`Cluster identified XBX`,e,n.width,a.node(e));let{ranksep:o,nodesep:s}=a.graph();n.graph.setGraph({...n.graph.graph(),ranksep:o+25,nodesep:s});let u=await F({element:b,graph:n.graph,diagramType:c,id:l,parentCluster:a.node(e),siteConfig:d}),f=u.elem;r(n,f),n.diff=u.diff||0,t.info(`New compound node after recursive render XAX`,e,`width`,n.width,`height`,n.height),i(f,n)}else a.children(e).length>0?(t.trace(`Cluster - the non recursive path XBX`,e,n.id,n,n.width,`Graph:`,a),t.trace(_(n.id,a)),g.set(n.id,{id:_(n.id,a),node:n})):(t.trace(`Node - the non recursive path XAX`,e,b,a.node(e),f),await m(b,a.node(e),{config:d,dir:f}))})),await e(async()=>{let e=a.edges().map(async function(e){let n=a.edge(e.v,e.w,e.name);if(t.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),t.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(a.edge(e))),t.info(`Fix`,g,`ids:`,e.v,e.w,`Translating: `,g.get(e.v),g.get(e.w)),C&&n.selfLoop){if(n.selfLoop.order!==1)return;let e={...n.originalEdge,...n,id:n.selfLoop.id,startLabelLeft:n.originalEdge?.startLabelLeft??n.startLabelLeft,startLabelRight:n.originalEdge?.startLabelRight??n.startLabelRight,endLabelLeft:n.originalEdge?.endLabelLeft??n.endLabelLeft,endLabelRight:n.originalEdge?.endLabelRight??n.endLabelRight};await s(y,e),n.width=e.width,n.height=e.height,n.labelStyle=e.labelStyle;return}await s(y,n)});await Promise.all(e)},`processEdges`)();let{subGraphTitleTotalMargin:w}=o(d);return{elem:x,graph:a,groups:{clusters:h,edgePaths:v,edgeLabels:y,nodes:b,rootGroups:x},diagramType:c,id:l,mergeSelfLoops:C,subGraphTitleTotalMargin:w}},`measureDagreGraph`),k=e(e=>{t.info(`############################################# XXX`),t.info(`### Layout ### XXX`),t.info(`############################################# XXX`),d(e)},`runDagreGraphLayout`),A=e((e,t,n)=>{let r=e.node(t);if(!r)return;let i={...r};return r?.clusterNode?i.y=(r.y??0)+n:e.children(t).length>0?i.height=(r.height??0)+n:i.y=(r.y??0)+n/2,i},`normalizeDagreNode`),j=e((e,t)=>{C.forEach(n=>{t[n]!==void 0&&(e[n]=t[n])})},`applyDagreNodeLayout`),M=e((e,t,n,r)=>({...e,start:e.start??t,end:e.end??n,points:(e.points??[]).map(e=>({...e,y:typeof e.y==`number`?e.y+r:e.y}))}),`normalizeDagreEdge`),N=e((e,t)=>{let{graph:n,mergeSelfLoops:r,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(e=>[e.id,e]));y(n).forEach(e=>{let t=A(n,e,i);if(!t)return;j(n.node(e),t);let r=a.get(e);r&&j(r,t)});let o=i/2;return e.edges=D(n,o,{mergeSelfLoops:r}).map(({edge:e,start:t,end:n})=>M(e,t,n,o)),e},`applyDagreLayoutResult`),P=e(async({elem:e,graph:n,groups:{clusters:r,edgePaths:i},diagramType:o,id:s,mergeSelfLoops:u,subGraphTitleTotalMargin:d})=>{let p=0;await Promise.all(y(n).map(async function(e){let i=n.node(e);if(t.info(`Position XBX => `+e+`: (`+i.x,`,`+i.y,`) width: `,i.width,` height: `,i.height),i?.clusterNode)i.y+=d,t.info(`A tainted cluster node XBX1`,e,i.id,i.width,i.height,i.x,i.y,n.parent(e)),g.get(i.id).node=i,a(i);else if(n.children(e).length>0){t.info(`A pure cluster node XBX1`,e,i.id,i.x,i.y,i.width,i.height,n.parent(e)),i.height+=d,n.node(i.parentId);let a=i?.padding/2||0,o=i?.labelBBox?.height||0,s=o-a||0;t.debug(`OffsetY`,s,`labelHeight`,o,`halfPadding`,a),await f(r,i),g.get(i.id).node=i}else{let e=n.node(i.parentId);i.y+=d/2,t.info(`A regular node XBX1 - using the padding`,i.id,`parent`,i.parentId,i.width,i.height,i.x,i.y,`offsetY`,i.offsetY,`parent`,e,e?.offsetY,i),a(i)}}));let m=d/2;return D(n,m,{mergeSelfLoops:u}).forEach(function({edge:e,start:r,end:a}){t.info(`Edge `+r+` -> `+a+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=m),c(e,l(i,e,g,o,n.node(r),n.node(a),s))}),n.nodes().forEach(function(e){let r=n.node(e);t.info(e,r.type,r.diff),r.isGroup&&(p=r.diff)}),t.warn(`Returning from recursive render XAX`,e,p),{elem:e,diff:p}},`paintDagreLayoutCore`),F=e(async e=>{let t=await O(e);return k(t.graph),await P(t)},`renderDagreSubgraph`),I=e(e=>{let n=new u({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(e=>{n.setNode(e.id,{...e}),e.parentId&&n.setParent(e.id,e.parentId)}),t.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,r=t+`---`+t+`---1`,i=t+`---`+t+`---2`,a=n.node(t);n.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),n.setParent(r,a.parentId),n.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),n.setParent(i,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=t+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,a.isGroup&&(s.fromCluster=t,l.toCluster=t),l.id=t+`-cyclic-special-2`,l.arrowTypeStart=`none`,n.setEdge(t,r,s,t+`-cyclic-special-0`),n.setEdge(r,i,c,t+`-cyclic-special-1`),n.setEdge(i,t,l,t+`-cyclic-special-2`)}else n.setEdge(e.start,e.end,{...e},e.id)}),v(n),{graph:n}},`prepareLayoutForDagre`),L=e(async(e,{element:t,preparedLayout:r})=>{let i=r??I(e),a=n(),o=await O({element:t,graph:i.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:a});return i.measuredLayout=o,o},`measureDagreLayout`),R=e((e,t)=>{let n=t.preparedLayout?.measuredLayout;if(!n)throw Error(`runDagreLayoutCore requires measureDagreLayout to run first`);return k(n.graph),N(e,n),n},`runDagreLayoutCore`),z=h({prepareLayout:I,measureLayout:L,runLayoutCore:R,paintOptions:{clusterDb:g,getNodes:e((e,{measure:t})=>y(t.graph).map(e=>t.graph.node(e)).filter(Boolean),`getDagrePaintNodes`),getEdgeNode:e((e,t,{measure:n})=>e?n.graph.node(e):void 0,`getDagreEdgeNode`),skipNode:e((e,{measure:t})=>!t.graph.hasNode(e.id),`skipNode`),isCluster:e((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,`isCluster`)}});export{N as applyDagreLayoutResult,D as getEdgesToRender,L as measureDagreLayout,I as prepareLayoutForDagre,z as render,R as runDagreLayoutCore}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-DGGEwFK0.js b/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-D41hPypy.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-DGGEwFK0.js rename to apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-D41hPypy.js index 6a22c3517..a3c542fd3 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-DGGEwFK0.js +++ b/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-D41hPypy.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d,z as f}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{i as p}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{r as m,t as h}from"./chunk-PWAF6VOD-DCTitH5S.js";import{St as g}from"./mermaidParser.worker-_pLIm6No.js";import{n as _}from"./mermaid-parser.core-87cmcdBo.js";import{t as v}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as y}from"./chunk-2Q5K7J3B-C1jixKkw.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}t(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}t(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}t(k,`remapErrorLines`);function A(e){let t=e.split(` +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d,z as f}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{i as p}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{r as m,t as h}from"./chunk-PWAF6VOD-Dsc8rvy3.js";import{St as g}from"./mermaidParser.worker-CBWarbNh.js";import{n as _}from"./mermaid-parser.core-87cmcdBo.js";import{t as v}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as y}from"./chunk-2Q5K7J3B-C1jixKkw.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}t(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}t(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}t(k,`remapErrorLines`);function A(e){let t=e.split(` `),n=new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),M=t(()=>{j.reset(),a()},`clear`),N=t(()=>j.records.stack[0],`getRoot`),P=t(()=>j.records.cnt,`getCount`),F=c.treeView,I={clear:M,addNode:t((e,t,n,r,i,a)=>{for(;e<=j.records.stack[j.records.stack.length-1].level;)j.records.stack.pop();let o={id:j.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};j.records.stack[j.records.stack.length-1].children.push(o),j.records.stack.push(o)},`addNode`),getRoot:N,getCount:P,getConfig:t(()=>p(F,o().treeView),`getConfig`),getAccTitle:d,getAccDescription:l,getDiagramTitle:u,setAccDescription:n,setAccTitle:i,setDiagramTitle:r},L=t(e=>{v(e,I);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,r=n.endsWith(`/`);r&&(n=n.slice(0,-1));let i=r?`directory`:`file`,a=t.classAnnotation||void 0,s=t.iconAnnotation,c=s===void 0?void 0:s||`none`,l=t.descAnnotation||void 0,u=l?f(l,o()):void 0;I.addNode(e,n,i,a,c,u)}},`populate`),R={parse:t(async t=>{let{text:n,lineMap:r}=A(t);try{let t=await _(`treeView`,n);e.debug(t),L(t)}catch(e){throw r.size>0&&e instanceof Error&&(e.message=k(e.message,r)),e}},`parse`)},z={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:``},file:{body:``}}};function B(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}t(B,`detectIcon`);function V(e,t){return e.includes(`:`)?e:e in z.icons||!t?`${z.prefix}:${e}`:`${t}:${e}`}t(V,`qualifyIcon`);function H(e,t){if(e.icon!==`none`){if(e.icon)return V(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=B(e.name,t);if(n===`none`)return;if(n)return V(n,t.defaultIconPack)}return`${z.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}t(H,`getNodeIcon`),m([{name:z.prefix,icons:z}]);var U=14,W=4,G=16,K=t(async(e,n)=>{let r=[],i=t(e=>{let t=H(e,n);t&&r.push({icon:t,node:e}),e.children.forEach(i)},`collect`);i(e);let a=await Promise.all(r.map(async({icon:e,node:t})=>({id:t.id,svg:await h(e,{height:U,width:U})})));return new Map(a.map(({id:e,svg:t})=>[e,t]))},`resolveNodeIcons`),q=t((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=U+W,l=H(n,i),u=l!==void 0;l&&o.append(`g`).attr(`class`,`treeView-node-icon`).attr(`transform`,`translate(${e+i.paddingX}, ${t+i.paddingY})`).html(a.get(n.id)??``);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),J=t((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),Y=t((e,n,r,i)=>{let a=0,o=0,s=[],c=t((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=q(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;J(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=t((t,n=0)=>{c(e,t,r,n),t.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=t.BBox;if(t.children.length){let{y:n,height:s}=t.children[t.children.length-1].BBox;J(e,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+G;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),X={draw:t(async(t,n,r,i)=>{e.debug(`Rendering treeView diagram `+t);let a=i.db,o=a.getRoot(),c=a.getConfig(),l=g(n),u=l.append(`g`);u.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:f}=Y(u,o,c,await K(o,c));l.attr(`viewBox`,`-${c.lineThickness/2} 0 ${f} ${d}`),s(l,d,f,c.useMaxWidth)},`draw`)},Z={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},Q={db:I,renderer:X,parser:R,styles:t(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:s}=p(Z,e);return` diff --git a/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-B6QAjDJA.js b/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-IeYmPHWJ.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-B6QAjDJA.js rename to apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-IeYmPHWJ.js index a407944c2..b8650f08c 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-B6QAjDJA.js +++ b/apps/pythinker-code/dist-web/assets/diagram-S7CK7UJ4-IeYmPHWJ.js @@ -1,4 +1,4 @@ -import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{i as m}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as h}from"./chunk-CLGD4ZFX-D_luxf7b.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";import{r as _,t as v}from"./chunk-PWAF6VOD-vmg_e0ho.js";import{t as y}from"./chunk-2Q5K7J3B-C1jixKkw.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}t(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}t(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}t(k,`remapErrorLines`);function A(e){let t=e.split(` +import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-DU6HZSFF-B78kfBb6.js";import{i as m}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as h}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";import{r as _,t as v}from"./chunk-PWAF6VOD-D9eOryqj.js";import{t as y}from"./chunk-2Q5K7J3B-C1jixKkw.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}t(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}t(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}t(k,`remapErrorLines`);function A(e){let t=e.split(` `),n=new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),M=t(()=>{j.reset(),o()},`clear`),N=t(()=>j.records.stack[0],`getRoot`),P=t(()=>j.records.cnt,`getCount`),F=l.treeView,I={clear:M,addNode:t((e,t,n,r,i,a)=>{for(;e<=j.records.stack[j.records.stack.length-1].level;)j.records.stack.pop();let o={id:j.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};j.records.stack[j.records.stack.length-1].children.push(o),j.records.stack.push(o)},`addNode`),getRoot:N,getCount:P,getConfig:t(()=>m(F,s().treeView),`getConfig`),getAccTitle:f,getAccDescription:u,getDiagramTitle:d,setAccDescription:r,setAccTitle:a,setDiagramTitle:i},L=t(e=>{g(e,I);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,r=n.endsWith(`/`);r&&(n=n.slice(0,-1));let i=r?`directory`:`file`,a=t.classAnnotation||void 0,o=t.iconAnnotation,c=o===void 0?void 0:o||`none`,l=t.descAnnotation||void 0,u=l?p(l,s()):void 0;I.addNode(e,n,i,a,c,u)}},`populate`),R={parse:t(async t=>{let{text:r,lineMap:i}=A(t);try{let t=await e(`treeView`,r);n.debug(t),L(t)}catch(e){throw i.size>0&&e instanceof Error&&(e.message=k(e.message,i)),e}},`parse`)},z={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:``},file:{body:``}}};function B(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}t(B,`detectIcon`);function V(e,t){return e.includes(`:`)?e:e in z.icons||!t?`${z.prefix}:${e}`:`${t}:${e}`}t(V,`qualifyIcon`);function H(e,t){if(e.icon!==`none`){if(e.icon)return V(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=B(e.name,t);if(n===`none`)return;if(n)return V(n,t.defaultIconPack)}return`${z.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}t(H,`getNodeIcon`),_([{name:z.prefix,icons:z}]);var U=14,W=4,G=16,K=t(async(e,n)=>{let r=[],i=t(e=>{let t=H(e,n);t&&r.push({icon:t,node:e}),e.children.forEach(i)},`collect`);i(e);let a=await Promise.all(r.map(async({icon:e,node:t})=>({id:t.id,svg:await v(e,{height:U,width:U})})));return new Map(a.map(({id:e,svg:t})=>[e,t]))},`resolveNodeIcons`),q=t((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=U+W,l=H(n,i),u=l!==void 0;l&&o.append(`g`).attr(`class`,`treeView-node-icon`).attr(`transform`,`translate(${e+i.paddingX}, ${t+i.paddingY})`).html(a.get(n.id)??``);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),J=t((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),Y=t((e,n,r,i)=>{let a=0,o=0,s=[],c=t((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=q(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;J(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=t((t,n=0)=>{c(e,t,r,n),t.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=t.BBox;if(t.children.length){let{y:n,height:s}=t.children[t.children.length-1].BBox;J(e,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+G;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),X={draw:t(async(e,t,r,i)=>{n.debug(`Rendering treeView diagram `+e);let a=i.db,o=a.getRoot(),s=a.getConfig(),l=h(t),u=l.append(`g`);u.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:f}=Y(u,o,s,await K(o,s));l.attr(`viewBox`,`-${s.lineThickness/2} 0 ${f} ${d}`),c(l,d,f,s.useMaxWidth)},`draw`)},Z={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},Q={db:I,renderer:X,parser:R,styles:t(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:s}=m(Z,e);return` diff --git a/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-9p5-eMVt.js b/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-B659df5Q.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-9p5-eMVt.js rename to apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-B659df5Q.js index 9dc4e2ffe..ecdee439b 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-9p5-eMVt.js +++ b/apps/pythinker-code/dist-web/assets/diagram-UQ7AKVKN-B659df5Q.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{i as p}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{St as m}from"./mermaidParser.worker-_pLIm6No.js";import{n as h}from"./mermaid-parser.core-87cmcdBo.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v=32,y={axes:[],curves:[],options:_},b=structuredClone(y),x=l.radar,S=t(()=>p({...x,...s().radar}),`getConfig`),C=t(()=>b.axes,`getAxes`),w=t(()=>b.curves,`getCurves`),T=t(()=>b.options,`getOptions`),E=t(e=>{b.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),D=t(e=>{b.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:O(e.entries)}))},`setCurves`),O=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=C();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),k={getAxes:C,getCurves:w,getOptions:T,setAxes:E,setCurves:D,setOptions:t(t=>{let n=t.reduce((e,t)=>(e[t.name]=t,e),{});b.options={showLegend:n.showLegend?.value??_.showLegend,ticks:n.ticks?.value??_.ticks,max:n.max?.value??_.max,min:n.min?.value??_.min,graticule:n.graticule?.value??_.graticule},b.options.ticks>v&&(e.warn(`Radar diagram ticks (${b.options.ticks}) exceeds maximum allowed (${v}). Using ${v} instead.`),b.options.ticks=v)},`setOptions`),getConfig:S,clear:t(()=>{o(),b=structuredClone(y)},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r},A=t(e=>{g(e,k);let{axes:t,curves:n,options:r}=e;k.setAxes(t),k.setCurves(n),k.setOptions(r)},`populate`),j={parse:t(async t=>{let n=await h(`radar`,t);e.debug(n),A(n)},`parse`)},M=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=N(m(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;P(u,a,p,s.ticks,s.graticule),F(u,a,p,c),I(u,a,o,f,d,s.graticule,c),z(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),N=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return c(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),P=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),F=t((e,t,n,r)=>{let i=t.length;for(let a=0;a.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function I(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=L(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,R(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(I,`drawCurves`);function L(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(L,`relativeRadius`);function R(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(z,`drawLegend`);var B={draw:M},V=t((e,t)=>{let n=``;for(let r=0;rp({...x,...s().radar}),`getConfig`),C=t(()=>b.axes,`getAxes`),w=t(()=>b.curves,`getCurves`),T=t(()=>b.options,`getOptions`),E=t(e=>{b.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),D=t(e=>{b.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:O(e.entries)}))},`setCurves`),O=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=C();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),k={getAxes:C,getCurves:w,getOptions:T,setAxes:E,setCurves:D,setOptions:t(t=>{let n=t.reduce((e,t)=>(e[t.name]=t,e),{});b.options={showLegend:n.showLegend?.value??_.showLegend,ticks:n.ticks?.value??_.ticks,max:n.max?.value??_.max,min:n.min?.value??_.min,graticule:n.graticule?.value??_.graticule},b.options.ticks>v&&(e.warn(`Radar diagram ticks (${b.options.ticks}) exceeds maximum allowed (${v}). Using ${v} instead.`),b.options.ticks=v)},`setOptions`),getConfig:S,clear:t(()=>{o(),b=structuredClone(y)},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r},A=t(e=>{g(e,k);let{axes:t,curves:n,options:r}=e;k.setAxes(t),k.setCurves(n),k.setOptions(r)},`populate`),j={parse:t(async t=>{let n=await h(`radar`,t);e.debug(n),A(n)},`parse`)},M=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=N(m(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;P(u,a,p,s.ticks,s.graticule),F(u,a,p,c),I(u,a,o,f,d,s.graticule,c),z(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),N=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return c(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),P=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),F=t((e,t,n,r)=>{let i=t.length;for(let a=0;a.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function I(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=L(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,R(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(I,`drawCurves`);function L(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(L,`relativeRadius`);function R(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(z,`drawLegend`);var B={draw:M},V=t((e,t)=>{let n=``;for(let r=0;rm({...x,...c().radar}),`getConfig`),C=t(()=>b.axes,`getAxes`),w=t(()=>b.curves,`getCurves`),T=t(()=>b.options,`getOptions`),E=t(e=>{b.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),D=t(e=>{b.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:O(e.entries)}))},`setCurves`),O=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=C();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),k={getAxes:C,getCurves:w,getOptions:T,setAxes:E,setCurves:D,setOptions:t(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});b.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule},b.options.ticks>v&&(n.warn(`Radar diagram ticks (${b.options.ticks}) exceeds maximum allowed (${v}). Using ${v} instead.`),b.options.ticks=v)},`setOptions`),getConfig:S,clear:t(()=>{s(),b=structuredClone(y)},`clear`),setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:f,getAccDescription:d,setAccDescription:i},A=t(e=>{g(e,k);let{axes:t,curves:n,options:r}=e;k.setAxes(t),k.setCurves(n),k.setOptions(r)},`populate`),j={parse:t(async t=>{let r=await e(`radar`,t);n.debug(r),A(r)},`parse`)},M=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=N(h(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;P(u,a,p,s.ticks,s.graticule),F(u,a,p,c),I(u,a,o,f,d,s.graticule,c),z(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),N=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return l(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),P=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),F=t((e,t,n,r)=>{let i=t.length;for(let a=0;a.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function I(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=L(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,R(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(I,`drawCurves`);function L(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(L,`relativeRadius`);function R(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(z,`drawLegend`);var B={draw:M},V=t((e,t)=>{let n=``;for(let r=0;rm({...x,...c().radar}),`getConfig`),C=t(()=>b.axes,`getAxes`),w=t(()=>b.curves,`getCurves`),T=t(()=>b.options,`getOptions`),E=t(e=>{b.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),D=t(e=>{b.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:O(e.entries)}))},`setCurves`),O=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=C();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),k={getAxes:C,getCurves:w,getOptions:T,setAxes:E,setCurves:D,setOptions:t(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});b.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule},b.options.ticks>v&&(n.warn(`Radar diagram ticks (${b.options.ticks}) exceeds maximum allowed (${v}). Using ${v} instead.`),b.options.ticks=v)},`setOptions`),getConfig:S,clear:t(()=>{s(),b=structuredClone(y)},`clear`),setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:f,getAccDescription:d,setAccDescription:i},A=t(e=>{g(e,k);let{axes:t,curves:n,options:r}=e;k.setAxes(t),k.setCurves(n),k.setOptions(r)},`populate`),j={parse:t(async t=>{let r=await e(`radar`,t);n.debug(r),A(r)},`parse`)},M=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=N(h(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;P(u,a,p,s.ticks,s.graticule),F(u,a,p,c),I(u,a,o,f,d,s.graticule,c),z(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),N=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return l(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),P=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),F=t((e,t,n,r)=>{let i=t.length;for(let a=0;a.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function I(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=L(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,R(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(I,`drawCurves`);function L(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(L,`relativeRadius`);function R(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(z,`drawLegend`);var B={draw:M},V=t((e,t)=>{let n=``;for(let r=0;ree({...oe,...u().eventmodeling}),`getConfig`),C={};function w(){let e=ce,{ast:t}=C,n=D();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((i,a)=>{let o=P(i,t.dataEntities,n);e=J(e,{$kind:v,index:a,frame:i,textProps:o});let s;V(i)?(r.debug(`source frame`,i.sourceFrames),s=t.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=J(e,{$kind:b,index:a,frame:i,sourceFrame:t})})):e=J(e,{$kind:b,index:a,frame:i})}),e={...e,sortedSwimlanesArray:R(e.swimlanes)},e}n(w,`getState`);function T(e){C.ast=e}n(T,`setAst`);var E={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function D(){return E}n(D,`getDiagramProps`);var ce={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function O(e){let t=e.split(`.`);if(t.length===2)return t[0]}n(O,`extractNamespace`);function k(e){let t=e.split(`.`);return t.length===2?t[1]:e}n(k,`extractName`);function A(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}n(A,`findSwimlaneByNamespace`);function j(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&rNumber.parseInt(e)))+1}n(j,`findNextAvailableIndex`);function M(e,t){let n=O(e.entityIdentifier),r=A(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||E.labelUiAutomation}:n?{index:j(t,0,100),label:E.labelUiAutomationPrefix+n}:{index:0,label:E.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||E.labelCommandReadModel}:n?{index:j(t,100,200),label:E.labelCommandReadModelPrefix+n}:{index:100,label:E.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||E.labelEvents}:n?{index:j(t,200,300),label:E.labelEventsPrefix+n}:{index:200,label:E.labelEvents}}}n(M,`calculateSwimlaneProps`);function N(e){let{themeVariables:t}=u();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}n(N,`calculateEntityVisualProps`);function P(e,t,n){let i=u(),a=g(k(e.entityIdentifier)??``,i),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`
`},c=`${_(a,n.textMaxWidth,s)}`;if(e.dataInlineValue&&(o=e.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=g(o,i),o=_(o,n.textMaxWidth,s),o=o.replaceAll(` `,` `)),e.dataReference){let r=t.find(t=>t.name===e.dataReference?.$refText);r&&(o=r.dataBlockValue,o=o.substring(o.indexOf(`{ +import{T as e}from"./chunk-FOHPRMQF-Crrb2Aik.js";import{n as t}from"./mermaid-parser.core-BCOGZFb-.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r,p as i}from"./src-Cn6kALDM.js";import{H as a,K as o,U as s,Y as c,a as l,b as u,f as d,v as f,w as p,x as m,y as h,z as g}from"./chunk-DU6HZSFF-B78kfBb6.js";import{_,i as ee,t as te}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as ne}from"./chunk-JWPE2WC7-DVXcaiue.js";var v=`position frame`,y=`frame positioned`,b=`position relation`,x=`relation positioned`,re=n(function(e){r.debug(`options str`,e)},`setOptions`),ie=n(function(){return{}},`getOptions`),ae=n(function(){S(),l()},`clear`);function S(){C={}}n(S,`reset`);var oe=d.eventmodeling,se=n(()=>ee({...oe,...u().eventmodeling}),`getConfig`),C={};function w(){let e=ce,{ast:t}=C,n=D();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((i,a)=>{let o=P(i,t.dataEntities,n);e=J(e,{$kind:v,index:a,frame:i,textProps:o});let s;V(i)?(r.debug(`source frame`,i.sourceFrames),s=t.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=J(e,{$kind:b,index:a,frame:i,sourceFrame:t})})):e=J(e,{$kind:b,index:a,frame:i})}),e={...e,sortedSwimlanesArray:R(e.swimlanes)},e}n(w,`getState`);function T(e){C.ast=e}n(T,`setAst`);var E={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function D(){return E}n(D,`getDiagramProps`);var ce={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function O(e){let t=e.split(`.`);if(t.length===2)return t[0]}n(O,`extractNamespace`);function k(e){let t=e.split(`.`);return t.length===2?t[1]:e}n(k,`extractName`);function A(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}n(A,`findSwimlaneByNamespace`);function j(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&rNumber.parseInt(e)))+1}n(j,`findNextAvailableIndex`);function M(e,t){let n=O(e.entityIdentifier),r=A(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||E.labelUiAutomation}:n?{index:j(t,0,100),label:E.labelUiAutomationPrefix+n}:{index:0,label:E.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||E.labelCommandReadModel}:n?{index:j(t,100,200),label:E.labelCommandReadModelPrefix+n}:{index:100,label:E.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||E.labelEvents}:n?{index:j(t,200,300),label:E.labelEventsPrefix+n}:{index:200,label:E.labelEvents}}}n(M,`calculateSwimlaneProps`);function N(e){let{themeVariables:t}=u();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}n(N,`calculateEntityVisualProps`);function P(e,t,n){let i=u(),a=g(k(e.entityIdentifier)??``,i),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`
`},c=`${_(a,n.textMaxWidth,s)}`;if(e.dataInlineValue&&(o=e.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=g(o,i),o=_(o,n.textMaxWidth,s),o=o.replaceAll(` `,` `)),e.dataReference){let r=t.find(t=>t.name===e.dataReference?.$refText);r&&(o=r.dataBlockValue,o=o.substring(o.indexOf(`{ `)+2),o=o.substring(0,o.lastIndexOf(`}`)-1),o=g(o,i),o=_(o,n.textMaxWidth,s),o=o.replaceAll(` `,` `),o+=`
`)}let l=o!==void 0;l&&(c+=`

${o}`);let d={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=te(c,d),p=l?f.width/3:f.width,m={content:c,width:p,height:f.height};return r.debug(`[${e.name}] ${e.entityIdentifier} text`,m),m}n(P,`calculateTextProps`);function F(e,t){let n=t,r=N(n.frame),i={width:n.textProps.width+2*E.boxTextPadding,height:n.textProps.height+2*E.boxTextPadding};return[{$kind:y,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}n(F,`decidePositionFrame`);function I(e,t,n){return t===void 0?E.contentStartX:t.index===e.index&&e.r?e.r+E.boxPadding:n===void 0?E.contentStartX:n.r-E.boxOverlap+E.boxPadding}n(I,`calculateX`);function L(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}n(L,`calculateMaxRight`);function R(e){return Object.values(e).sort((e,t)=>e.index-t.index)}n(R,`sortedSwimlanesArray`);function z(e,t){let n=t,r=M(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*E.swimlaneMinHeight+E.swimlaneGap,height:E.swimlaneMinHeight,maxHeight:E.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(E.boxMinWidth,Math.min(E.boxMaxWidth,n.dimension.width))+2*E.boxPadding,height:Math.max(E.boxMinHeight,Math.min(E.boxMaxHeight,n.dimension.height))+2*E.boxPadding},c=I(i,o,a),l=c+s.width+E.boxPadding,u=L(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(E.swimlaneMinHeight,i.maxHeight)+2*E.swimlanePadding;let d={x:c,y:E.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=R(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e0}n(V,`hasSourceFrame`);function H(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}n(H,`findBoxByFrame`);function U(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}n(U,`findBoxByLineIndex`);function W(t,n){let r=n;if(e(r.frame)||B(r.index,r.frame))return[];let i=H(t.boxes,r.frame);if(i===void 0)throw Error(`Target box not found for frame ${r.frame.name}`);let a;return a=r.sourceFrame?H(t.boxes,r.sourceFrame):U(t.boxes,i.swimlane.index,r.index-1),a===void 0?[]:[{$kind:x,frame:r.frame,index:r.index,sourceBox:a,targetBox:i}]}n(W,`decidePositionRelation`);function G(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}n(G,`evolveRelationPositioned`);var le={[v]:F,[b]:W},ue={[y]:z,[x]:G};function K(e,t){let n=le[t.$kind];if(n==null)return[];let i=n(e,t);return r.debug(`decided events`,i),i}n(K,`decide`);function q(e,t){let n=t.reduce((e,t)=>{let n=ue[t.$kind];return n==null?e:n(e,t)},e);return r.debug(`evolve events`,{state:e,newState:n,events:t}),n}n(q,`evolve`);function J(e,t){return q(e,K(e,t))}n(J,`dispatch`);var Y={getConfig:se,setOptions:re,getOptions:ie,clear:ae,setAccTitle:s,getAccTitle:h,getAccDescription:f,setAccDescription:a,setDiagramTitle:o,getDiagramTitle:p,setAst:T,getDiagramProps:D,getState:w},de={parse:n(async e=>{let n=await t(`eventmodeling`,e);r.debug(n),Y.setAst(n),ne(n,Y)},`parse`)},fe=m()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}n(X,`renderD3Box`);function Z(e,t){return e>t}n(Z,`dirUpwards`);function Q(e,t,n,i){return a=>{let o=a.sourceBox.swimlane.y+t.swimlanePadding,s=a.targetBox.swimlane.y+t.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;r.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=i.emRelationStroke??a.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${n})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}n(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}n($,`renderD3Swimlane`);var pe={parser:de,db:Y,renderer:{draw:n(function(e,t,n,a){if(r.debug(`in eventmodeling renderer`,e+` `,`id:`,t,n),!fe)throw Error(`EventModeling config not found`);let o=a.db,{themeVariables:s,eventmodeling:l}=m(),u=i(`[id="${t}"]`),d=o.getDiagramProps(),f=o.getState(),p=`em-arrowhead-${t}`,h=s.emArrowhead??`#000000`;f.sortedSwimlanesArray.forEach($(u,f.maxR,d,s)),f.boxes.forEach(X(u,d)),f.relations.forEach(Q(u,d,p,s)),u.append(`defs`).append(`marker`).attr(`id`,p).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),c(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:n(e=>``,`getStyles`)};export{pe as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/diagram-VSXAHHWV-DPp46U4F.js b/apps/pythinker-code/dist-web/assets/diagram-VSXAHHWV-b6j5abVC.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/diagram-VSXAHHWV-DPp46U4F.js rename to apps/pythinker-code/dist-web/assets/diagram-VSXAHHWV-b6j5abVC.js index a5354b570..f26401885 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-VSXAHHWV-DPp46U4F.js +++ b/apps/pythinker-code/dist-web/assets/diagram-VSXAHHWV-b6j5abVC.js @@ -1,3 +1,3 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as r,K as i,U as a,Y as o,a as s,b as c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{_ as h,i as g,t as ee}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{T as te}from"./chunk-FOHPRMQF-C5TL2YeI.js";import{n as ne}from"./mermaid-parser.core-87cmcdBo.js";import{t as re}from"./chunk-JWPE2WC7-DVXcaiue.js";var _=`position frame`,v=`frame positioned`,y=`position relation`,b=`relation positioned`,ie=n(function(t){e.debug(`options str`,t)},`setOptions`),ae=n(function(){return{}},`getOptions`),oe=n(function(){x(),s()},`clear`);function x(){S={}}n(x,`reset`);var se=l.eventmodeling,ce=n(()=>g({...se,...c().eventmodeling}),`getConfig`),S={};function C(){let t=le,{ast:n}=S,r=E();if(!n)throw Error(`No data for EventModel`);return n.frames.forEach((i,a)=>{let o=N(i,n.dataEntities,r);t=q(t,{$kind:_,index:a,frame:i,textProps:o});let s;B(i)?(e.debug(`source frame`,i.sourceFrames),s=n.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(e=>{t=q(t,{$kind:y,index:a,frame:i,sourceFrame:e})})):t=q(t,{$kind:y,index:a,frame:i})}),t={...t,sortedSwimlanesArray:L(t.swimlanes)},t}n(C,`getState`);function w(e){S.ast=e}n(w,`setAst`);var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function E(){return T}n(E,`getDiagramProps`);var le={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function D(e){let t=e.split(`.`);if(t.length===2)return t[0]}n(D,`extractNamespace`);function O(e){let t=e.split(`.`);return t.length===2?t[1]:e}n(O,`extractName`);function k(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}n(k,`findSwimlaneByNamespace`);function A(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&rNumber.parseInt(e)))+1}n(A,`findNextAvailableIndex`);function j(e,t){let n=D(e.entityIdentifier),r=k(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||T.labelUiAutomation}:n?{index:A(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||T.labelCommandReadModel}:n?{index:A(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||T.labelEvents}:n?{index:A(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}n(j,`calculateSwimlaneProps`);function M(e){let{themeVariables:t}=c();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}n(M,`calculateEntityVisualProps`);function N(t,n,r){let i=c(),a=m(O(t.entityIdentifier)??``,i),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`
`},l=`${h(a,r.textMaxWidth,s)}`;if(t.dataInlineValue&&(o=t.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=m(o,i),o=h(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `)),t.dataReference){let e=n.find(e=>e.name===t.dataReference?.$refText);e&&(o=e.dataBlockValue,o=o.substring(o.indexOf(`{ +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as r,K as i,U as a,Y as o,a as s,b as c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{_ as h,i as g,t as ee}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{T as te}from"./chunk-FOHPRMQF-C5TL2YeI.js";import{n as ne}from"./mermaid-parser.core-87cmcdBo.js";import{t as re}from"./chunk-JWPE2WC7-DVXcaiue.js";var _=`position frame`,v=`frame positioned`,y=`position relation`,b=`relation positioned`,ie=n(function(t){e.debug(`options str`,t)},`setOptions`),ae=n(function(){return{}},`getOptions`),oe=n(function(){x(),s()},`clear`);function x(){S={}}n(x,`reset`);var se=l.eventmodeling,ce=n(()=>g({...se,...c().eventmodeling}),`getConfig`),S={};function C(){let t=le,{ast:n}=S,r=E();if(!n)throw Error(`No data for EventModel`);return n.frames.forEach((i,a)=>{let o=N(i,n.dataEntities,r);t=q(t,{$kind:_,index:a,frame:i,textProps:o});let s;B(i)?(e.debug(`source frame`,i.sourceFrames),s=n.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(e=>{t=q(t,{$kind:y,index:a,frame:i,sourceFrame:e})})):t=q(t,{$kind:y,index:a,frame:i})}),t={...t,sortedSwimlanesArray:L(t.swimlanes)},t}n(C,`getState`);function w(e){S.ast=e}n(w,`setAst`);var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function E(){return T}n(E,`getDiagramProps`);var le={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function D(e){let t=e.split(`.`);if(t.length===2)return t[0]}n(D,`extractNamespace`);function O(e){let t=e.split(`.`);return t.length===2?t[1]:e}n(O,`extractName`);function k(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}n(k,`findSwimlaneByNamespace`);function A(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&rNumber.parseInt(e)))+1}n(A,`findNextAvailableIndex`);function j(e,t){let n=D(e.entityIdentifier),r=k(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||T.labelUiAutomation}:n?{index:A(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||T.labelCommandReadModel}:n?{index:A(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||T.labelEvents}:n?{index:A(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}n(j,`calculateSwimlaneProps`);function M(e){let{themeVariables:t}=c();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}n(M,`calculateEntityVisualProps`);function N(t,n,r){let i=c(),a=m(O(t.entityIdentifier)??``,i),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`
`},l=`${h(a,r.textMaxWidth,s)}`;if(t.dataInlineValue&&(o=t.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=m(o,i),o=h(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `)),t.dataReference){let e=n.find(e=>e.name===t.dataReference?.$refText);e&&(o=e.dataBlockValue,o=o.substring(o.indexOf(`{ `)+2),o=o.substring(0,o.lastIndexOf(`}`)-1),o=m(o,i),o=h(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `),o+=`
`)}let u=o!==void 0;u&&(l+=`

${o}`);let d={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=ee(l,d),p=u?f.width/3:f.width,g={content:l,width:p,height:f.height};return e.debug(`[${t.name}] ${t.entityIdentifier} text`,g),g}n(N,`calculateTextProps`);function P(e,t){let n=t,r=M(n.frame),i={width:n.textProps.width+2*T.boxTextPadding,height:n.textProps.height+2*T.boxTextPadding};return[{$kind:v,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}n(P,`decidePositionFrame`);function F(e,t,n){return t===void 0?T.contentStartX:t.index===e.index&&e.r?e.r+T.boxPadding:n===void 0?T.contentStartX:n.r-T.boxOverlap+T.boxPadding}n(F,`calculateX`);function I(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}n(I,`calculateMaxRight`);function L(e){return Object.values(e).sort((e,t)=>e.index-t.index)}n(L,`sortedSwimlanesArray`);function R(e,t){let n=t,r=j(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*T.swimlaneMinHeight+T.swimlaneGap,height:T.swimlaneMinHeight,maxHeight:T.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(T.boxMinWidth,Math.min(T.boxMaxWidth,n.dimension.width))+2*T.boxPadding,height:Math.max(T.boxMinHeight,Math.min(T.boxMaxHeight,n.dimension.height))+2*T.boxPadding},c=F(i,o,a),l=c+s.width+T.boxPadding,u=I(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(T.swimlaneMinHeight,i.maxHeight)+2*T.swimlanePadding;let d={x:c,y:T.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=L(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e0}n(B,`hasSourceFrame`);function V(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}n(V,`findBoxByFrame`);function H(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}n(H,`findBoxByLineIndex`);function U(e,t){let n=t;if(te(n.frame)||z(n.index,n.frame))return[];let r=V(e.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let i;return i=n.sourceFrame?V(e.boxes,n.sourceFrame):H(e.boxes,r.swimlane.index,n.index-1),i===void 0?[]:[{$kind:b,frame:n.frame,index:n.index,sourceBox:i,targetBox:r}]}n(U,`decidePositionRelation`);function W(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}n(W,`evolveRelationPositioned`);var ue={[_]:P,[y]:U},de={[v]:R,[b]:W};function G(t,n){let r=ue[n.$kind];if(r==null)return[];let i=r(t,n);return e.debug(`decided events`,i),i}n(G,`decide`);function K(t,n){let r=n.reduce((e,t)=>{let n=de[t.$kind];return n==null?e:n(e,t)},t);return e.debug(`evolve events`,{state:t,newState:r,events:n}),r}n(K,`evolve`);function q(e,t){return K(e,G(e,t))}n(q,`dispatch`);var J={getConfig:ce,setOptions:ie,getOptions:ae,clear:oe,setAccTitle:a,getAccTitle:p,getAccDescription:u,setAccDescription:r,setDiagramTitle:i,getDiagramTitle:d,setAst:w,getDiagramProps:E,getState:C},fe={parse:n(async t=>{let n=await ne(`eventmodeling`,t);e.debug(n),J.setAst(n),re(n,J)},`parse`)},Y=f()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}n(X,`renderD3Box`);function Z(e,t){return e>t}n(Z,`dirUpwards`);function Q(t,n,r,i){return a=>{let o=a.sourceBox.swimlane.y+n.swimlanePadding,s=a.targetBox.swimlane.y+n.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;e.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=i.emRelationStroke??a.visual.stroke;t.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${r})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}n(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}n($,`renderD3Swimlane`);var pe={parser:fe,db:J,renderer:{draw:n(function(n,r,i,a){if(e.debug(`in eventmodeling renderer`,n+` `,`id:`,r,i),!Y)throw Error(`EventModeling config not found`);let s=a.db,{themeVariables:c,eventmodeling:l}=f(),u=t(`[id="${r}"]`),d=s.getDiagramProps(),p=s.getState(),m=`em-arrowhead-${r}`,h=c.emArrowhead??`#000000`;p.sortedSwimlanesArray.forEach($(u,p.maxR,d,c)),p.boxes.forEach(X(u,d)),p.relations.forEach(Q(u,d,m,c)),u.append(`defs`).append(`marker`).attr(`id`,m).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),o(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:n(e=>``,`getStyles`)};export{pe as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-CqD89nOU.js b/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-BeqD-7Ny.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-CqD89nOU.js rename to apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-BeqD-7Ny.js index c78945580..cbf88cd8c 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-CqD89nOU.js +++ b/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-BeqD-7Ny.js @@ -1,4 +1,4 @@ -import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-Cn6kALDM.js";import{D as i,H as a,K as o,U as s,a as c,b as l,c as u,f as d,v as f,w as p,y as m}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as h}from"./ordinal-hYBb2elL.js";import{t as g}from"./defaultLocale-C8Fc0cco.js";import{i as _}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as v}from"./chunk-CLGD4ZFX-D_luxf7b.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{i as b,n as x}from"./chunk-P2QGCYS3-CQc2NCc1.js";import{t as S}from"./chunk-POPQ4Y6H-BCRCUUP_.js";function C(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function M(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function ee(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function te(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++sv&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p1?t:1)},n})(re);function oe(){var e=ae,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(ee),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d{x(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){c(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Y(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}t(Y,`buildHierarchy`);var se=t((e,n)=>{y(e,n);let r=[];for(let t of e.TreemapRows??[])t.$type===`ClassDefStatement`&&n.addClass(t.className??``,t.styleText??``);for(let t of e.TreemapRows??[]){let e=t.item;if(!e)continue;let i=t.indent?parseInt(t.indent):0,a=ce(e),o=e.classSelector?n.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=Y(r),a=t((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),ce=t(e=>e.name?String(e.name):``,`getItemName`),X={parser:{yy:void 0},parse:t(async t=>{try{let r=await e(`treemap`,t);n.debug(`Treemap AST:`,r);let i=X.parser?.yy;if(!(i instanceof J))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);se(r,i)}catch(e){throw n.error(`Error parsing treemap:`,e),e}},`parse`)},Z=10,Q=10,$=25,le={draw:t((e,i,a,o)=>{let s=o.db,c=s.getConfig(),d=c.padding??Z,f=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:m}=l();if(!p)return;let _=f?30:0,y=v(i),x=c.nodeWidth?c.nodeWidth*Q:960,C=c.nodeHeight?c.nodeHeight*Q:500,w=x,T=C+_;y.attr(`viewBox`,`0 0 ${w} ${T}`),u(y,T,w,c.useMaxWidth);let E;try{let e=c.valueFormat||`,`;if(e===`$0,0`)E=t(e=>`$`+g(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let n=/\.\d+/.exec(e),r=n?n[0]:``;E=t(e=>`$`+g(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let n=e.substring(1);E=t(e=>`$`+g(n||``)(e),`valueFormat`)}else E=g(e)}catch(e){n.error(`Error creating format function:`,e),E=g(`,`)}let D=h().range([`transparent`,m.cScale0,m.cScale1,m.cScale2,m.cScale3,m.cScale4,m.cScale5,m.cScale6,m.cScale7,m.cScale8,m.cScale9,m.cScale10,m.cScale11]),O=h().range([`transparent`,m.cScalePeer0,m.cScalePeer1,m.cScalePeer2,m.cScalePeer3,m.cScalePeer4,m.cScalePeer5,m.cScalePeer6,m.cScalePeer7,m.cScalePeer8,m.cScalePeer9,m.cScalePeer10,m.cScalePeer11]),k=h().range([m.cScaleLabel0,m.cScaleLabel1,m.cScaleLabel2,m.cScaleLabel3,m.cScaleLabel4,m.cScaleLabel5,m.cScaleLabel6,m.cScaleLabel7,m.cScaleLabel8,m.cScaleLabel9,m.cScaleLabel10,m.cScaleLabel11]);f&&y.append(`text`).attr(`x`,w/2).attr(`y`,_/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=y.append(`g`).attr(`transform`,`translate(0, ${_})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=oe().size([x,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=b({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=r(this),n=e.data.name;t.text(n);let i=e.x1-e.x0,a;a=c.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=n;for(;e.length>0;){if(e=n.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),c.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>b({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=r(this),n=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=n-2*H,s=i-2*H;if(oo&&c>B;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(uo||c(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=r(this),n=this.parentNode;if(!n){t.style(`display`,`none`);return}let i=r(n).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+W;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*H;t.node().getComputedTextLength()>u||s+o>l||o{let t=_(i(),l().themeVariables),n=_(ue,e),r=n.titleColor??t.titleColor,a=n.labelColor??t.textColor,o=n.valueColor??t.textColor;return` +import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-Cn6kALDM.js";import{D as i,H as a,K as o,U as s,a as c,b as l,c as u,f as d,v as f,w as p,y as m}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as h}from"./ordinal-hYBb2elL.js";import{t as g}from"./defaultLocale-C8Fc0cco.js";import{i as _}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as v}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{i as b,n as x}from"./chunk-P2QGCYS3-BTLpY7ks.js";import{t as S}from"./chunk-POPQ4Y6H-mwDJO2QS.js";function C(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function M(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function ee(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function te(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++sv&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p1?t:1)},n})(re);function oe(){var e=ae,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(ee),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d{x(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){c(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Y(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}t(Y,`buildHierarchy`);var se=t((e,n)=>{y(e,n);let r=[];for(let t of e.TreemapRows??[])t.$type===`ClassDefStatement`&&n.addClass(t.className??``,t.styleText??``);for(let t of e.TreemapRows??[]){let e=t.item;if(!e)continue;let i=t.indent?parseInt(t.indent):0,a=ce(e),o=e.classSelector?n.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=Y(r),a=t((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),ce=t(e=>e.name?String(e.name):``,`getItemName`),X={parser:{yy:void 0},parse:t(async t=>{try{let r=await e(`treemap`,t);n.debug(`Treemap AST:`,r);let i=X.parser?.yy;if(!(i instanceof J))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);se(r,i)}catch(e){throw n.error(`Error parsing treemap:`,e),e}},`parse`)},Z=10,Q=10,$=25,le={draw:t((e,i,a,o)=>{let s=o.db,c=s.getConfig(),d=c.padding??Z,f=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:m}=l();if(!p)return;let _=f?30:0,y=v(i),x=c.nodeWidth?c.nodeWidth*Q:960,C=c.nodeHeight?c.nodeHeight*Q:500,w=x,T=C+_;y.attr(`viewBox`,`0 0 ${w} ${T}`),u(y,T,w,c.useMaxWidth);let E;try{let e=c.valueFormat||`,`;if(e===`$0,0`)E=t(e=>`$`+g(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let n=/\.\d+/.exec(e),r=n?n[0]:``;E=t(e=>`$`+g(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let n=e.substring(1);E=t(e=>`$`+g(n||``)(e),`valueFormat`)}else E=g(e)}catch(e){n.error(`Error creating format function:`,e),E=g(`,`)}let D=h().range([`transparent`,m.cScale0,m.cScale1,m.cScale2,m.cScale3,m.cScale4,m.cScale5,m.cScale6,m.cScale7,m.cScale8,m.cScale9,m.cScale10,m.cScale11]),O=h().range([`transparent`,m.cScalePeer0,m.cScalePeer1,m.cScalePeer2,m.cScalePeer3,m.cScalePeer4,m.cScalePeer5,m.cScalePeer6,m.cScalePeer7,m.cScalePeer8,m.cScalePeer9,m.cScalePeer10,m.cScalePeer11]),k=h().range([m.cScaleLabel0,m.cScaleLabel1,m.cScaleLabel2,m.cScaleLabel3,m.cScaleLabel4,m.cScaleLabel5,m.cScaleLabel6,m.cScaleLabel7,m.cScaleLabel8,m.cScaleLabel9,m.cScaleLabel10,m.cScaleLabel11]);f&&y.append(`text`).attr(`x`,w/2).attr(`y`,_/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=y.append(`g`).attr(`transform`,`translate(0, ${_})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=oe().size([x,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=b({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=r(this),n=e.data.name;t.text(n);let i=e.x1-e.x0,a;a=c.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=n;for(;e.length>0;){if(e=n.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),c.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>b({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=r(this),n=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=n-2*H,s=i-2*H;if(oo&&c>B;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(uo||c(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=r(this),n=this.parentNode;if(!n){t.style(`display`,`none`);return}let i=r(n).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+W;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*H;t.node().getComputedTextLength()>u||s+o>l||o{let t=_(i(),l().themeVariables),n=_(ue,e),r=n.titleColor??t.titleColor,a=n.labelColor??t.textColor,o=n.valueColor??t.textColor;return` .treemapNode.section { stroke: ${n.sectionStrokeColor}; stroke-width: ${n.sectionStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-DcLkCice.js b/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-CIR5Ggda.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-DcLkCice.js rename to apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-CIR5Ggda.js index a5040d360..f870073a8 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-DcLkCice.js +++ b/apps/pythinker-code/dist-web/assets/diagram-VX7I27RA-CIR5Ggda.js @@ -1,4 +1,4 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,f as u,v as d,w as f,y as p}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as m}from"./ordinal-C_XC5MEo.js";import{t as h}from"./defaultLocale-C8Fc0cco.js";import{i as g}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{i as _,n as v}from"./chunk-P2QGCYS3-DOQphBqd.js";import{St as y}from"./mermaidParser.worker-_pLIm6No.js";import{n as b}from"./mermaid-parser.core-87cmcdBo.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as S}from"./chunk-POPQ4Y6H-BiMU0_kH.js";function C(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function M(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function J(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function ee(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++sv&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p1?t:1)},n})(ne);function ae(){var e=ie,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(J),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d{v(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){s(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function X(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}n(X,`buildHierarchy`);var oe=n((e,t)=>{x(e,t);let r=[];for(let n of e.TreemapRows??[])n.$type===`ClassDefStatement`&&t.addClass(n.className??``,n.styleText??``);for(let n of e.TreemapRows??[]){let e=n.item;if(!e)continue;let i=n.indent?parseInt(n.indent):0,a=se(e),o=e.classSelector?t.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=X(r),a=n((e,n)=>{for(let r of e)t.addNode(r,n),r.children&&r.children.length>0&&a(r.children,n+1)},`addNodesRecursively`);a(i,0)},`populate`),se=n(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:n(async t=>{try{let n=await b(`treemap`,t);e.debug(`Treemap AST:`,n);let r=Z.parser?.yy;if(!(r instanceof Y))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);oe(n,r)}catch(t){throw e.error(`Error parsing treemap:`,t),t}},`parse`)},ce=10,Q=10,$=25,le={draw:n((r,i,a,o)=>{let s=o.db,u=s.getConfig(),d=u.padding??ce,f=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:g}=c();if(!p)return;let v=f?30:0,b=y(i),x=u.nodeWidth?u.nodeWidth*Q:960,C=u.nodeHeight?u.nodeHeight*Q:500,w=x,T=C+v;b.attr(`viewBox`,`0 0 ${w} ${T}`),l(b,T,w,u.useMaxWidth);let E;try{let e=u.valueFormat||`,`;if(e===`$0,0`)E=n(e=>`$`+h(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let t=/\.\d+/.exec(e),r=t?t[0]:``;E=n(e=>`$`+h(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let t=e.substring(1);E=n(e=>`$`+h(t||``)(e),`valueFormat`)}else E=h(e)}catch(t){e.error(`Error creating format function:`,t),E=h(`,`)}let D=m().range([`transparent`,g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),O=m().range([`transparent`,g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),k=m().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);f&&b.append(`text`).attr(`x`,w/2).attr(`y`,v/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=b.append(`g`).attr(`transform`,`translate(0, ${v})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=ae().size([x,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=_({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+_({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let n=t(this),r=e.data.name;n.text(r);let i=e.x1-e.x0,a;a=u.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=n.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){n.text(`...`),s.getComputedTextLength()>o&&n.text(``);break}if(n.text(e+`...`),s.getComputedTextLength()<=o)break}}}),u.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+_({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>_({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+_({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let n=t(this),r=e.x1-e.x0,i=e.y1-e.y0,a=n.node(),o=r-2*H,s=i-2*H;if(oo&&c>B;)c--,n.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(uo||c(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+_({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let n=t(this),r=this.parentNode;if(!r){n.style(`display`,`none`);return}let i=t(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){n.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));n.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+W;n.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*H;n.node().getComputedTextLength()>u||s+o>l||o{let t=g(r(),c().themeVariables),n=g(ue,e),i=n.titleColor??t.titleColor,a=n.labelColor??t.textColor,o=n.valueColor??t.textColor;return` +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,f as u,v as d,w as f,y as p}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as m}from"./ordinal-C_XC5MEo.js";import{t as h}from"./defaultLocale-C8Fc0cco.js";import{i as g}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{i as _,n as v}from"./chunk-P2QGCYS3-DJwAvunU.js";import{St as y}from"./mermaidParser.worker-CBWarbNh.js";import{n as b}from"./mermaid-parser.core-87cmcdBo.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as S}from"./chunk-POPQ4Y6H-1k8n9Sa3.js";function C(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function M(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function J(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function ee(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++sv&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p1?t:1)},n})(ne);function ae(){var e=ie,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(J),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d{v(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){s(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function X(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}n(X,`buildHierarchy`);var oe=n((e,t)=>{x(e,t);let r=[];for(let n of e.TreemapRows??[])n.$type===`ClassDefStatement`&&t.addClass(n.className??``,n.styleText??``);for(let n of e.TreemapRows??[]){let e=n.item;if(!e)continue;let i=n.indent?parseInt(n.indent):0,a=se(e),o=e.classSelector?t.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=X(r),a=n((e,n)=>{for(let r of e)t.addNode(r,n),r.children&&r.children.length>0&&a(r.children,n+1)},`addNodesRecursively`);a(i,0)},`populate`),se=n(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:n(async t=>{try{let n=await b(`treemap`,t);e.debug(`Treemap AST:`,n);let r=Z.parser?.yy;if(!(r instanceof Y))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);oe(n,r)}catch(t){throw e.error(`Error parsing treemap:`,t),t}},`parse`)},ce=10,Q=10,$=25,le={draw:n((r,i,a,o)=>{let s=o.db,u=s.getConfig(),d=u.padding??ce,f=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:g}=c();if(!p)return;let v=f?30:0,b=y(i),x=u.nodeWidth?u.nodeWidth*Q:960,C=u.nodeHeight?u.nodeHeight*Q:500,w=x,T=C+v;b.attr(`viewBox`,`0 0 ${w} ${T}`),l(b,T,w,u.useMaxWidth);let E;try{let e=u.valueFormat||`,`;if(e===`$0,0`)E=n(e=>`$`+h(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let t=/\.\d+/.exec(e),r=t?t[0]:``;E=n(e=>`$`+h(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let t=e.substring(1);E=n(e=>`$`+h(t||``)(e),`valueFormat`)}else E=h(e)}catch(t){e.error(`Error creating format function:`,t),E=h(`,`)}let D=m().range([`transparent`,g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),O=m().range([`transparent`,g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),k=m().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);f&&b.append(`text`).attr(`x`,w/2).attr(`y`,v/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=b.append(`g`).attr(`transform`,`translate(0, ${v})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=ae().size([x,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=_({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+_({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let n=t(this),r=e.data.name;n.text(r);let i=e.x1-e.x0,a;a=u.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=n.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){n.text(`...`),s.getComputedTextLength()>o&&n.text(``);break}if(n.text(e+`...`),s.getComputedTextLength()<=o)break}}}),u.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+_({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>_({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+_({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let n=t(this),r=e.x1-e.x0,i=e.y1-e.y0,a=n.node(),o=r-2*H,s=i-2*H;if(oo&&c>B;)c--,n.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(uo||c(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+_({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let n=t(this),r=this.parentNode;if(!r){n.style(`display`,`none`);return}let i=t(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){n.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));n.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+W;n.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*H;n.node().getComputedTextLength()>u||s+o>l||o{let t=g(r(),c().themeVariables),n=g(ue,e),i=n.titleColor??t.titleColor,a=n.labelColor??t.textColor,o=n.valueColor??t.textColor;return` .treemapNode.section { stroke: ${n.sectionStrokeColor}; stroke-width: ${n.sectionStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-BWQvjWeh.js b/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DU-LXpTD.js similarity index 95% rename from apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-BWQvjWeh.js rename to apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DU-LXpTD.js index 1e97bd59b..ca538fb94 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-BWQvjWeh.js +++ b/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DU-LXpTD.js @@ -1,4 +1,4 @@ -import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{i as p}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as m}from"./chunk-CLGD4ZFX-D_luxf7b.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";var g=l.packet,_=class{constructor(){this.packet=[],this.setAccTitle=a,this.getAccTitle=f,this.setDiagramTitle=i,this.getDiagramTitle=d,this.getAccDescription=u,this.setAccDescription=r}static{t(this,`PacketDB`)}getConfig(){let e=p({...g,...s().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){o(),this.packet=[]}},v=1e4,y=t((e,t)=>{h(e,t);let r=-1,i=[],a=1,{bitsPerRow:o}=t.getConfig();for(let{start:s,end:c,bits:l,label:u}of e.blocks){if(s!==void 0&&c!==void 0&&c{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:t(async t=>{let r=await e(`packet`,t),i=x.parser?.yy;if(!(i instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);n.debug(r),y(r,i)},`parse`)},S=t((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),p=o+s,h=p*(d.length+1)-(f?0:o),g=l*u+2,_=m(t);_.attr(`viewBox`,`0 0 ${g} ${h}`),c(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,h-p/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=t((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:t(({packet:e}={})=>{let t=p(T,e);return` +import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-DU6HZSFF-B78kfBb6.js";import{i as p}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as m}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";var g=l.packet,_=class{constructor(){this.packet=[],this.setAccTitle=a,this.getAccTitle=f,this.setDiagramTitle=i,this.getDiagramTitle=d,this.getAccDescription=u,this.setAccDescription=r}static{t(this,`PacketDB`)}getConfig(){let e=p({...g,...s().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){o(),this.packet=[]}},v=1e4,y=t((e,t)=>{h(e,t);let r=-1,i=[],a=1,{bitsPerRow:o}=t.getConfig();for(let{start:s,end:c,bits:l,label:u}of e.blocks){if(s!==void 0&&c!==void 0&&c{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:t(async t=>{let r=await e(`packet`,t),i=x.parser?.yy;if(!(i instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);n.debug(r),y(r,i)},`parse`)},S=t((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),p=o+s,h=p*(d.length+1)-(f?0:o),g=l*u+2,_=m(t);_.attr(`viewBox`,`0 0 ${g} ${h}`),c(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,h-p/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=t((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:t(({packet:e}={})=>{let t=p(T,e);return` .packetByte { font-size: ${t.byteFontSize}; } diff --git a/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DbX1HZ7c.js b/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-hYL7DRb_.js similarity index 95% rename from apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DbX1HZ7c.js rename to apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-hYL7DRb_.js index 854e2e46f..e231c054b 100644 --- a/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-DbX1HZ7c.js +++ b/apps/pythinker-code/dist-web/assets/diagram-Z3DM3KII-hYL7DRb_.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{i as f}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{St as p}from"./mermaidParser.worker-_pLIm6No.js";import{n as m}from"./mermaid-parser.core-87cmcdBo.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";var g=c.packet,_=class{constructor(){this.packet=[],this.setAccTitle=i,this.getAccTitle=d,this.setDiagramTitle=r,this.getDiagramTitle=u,this.getAccDescription=l,this.setAccDescription=n}static{t(this,`PacketDB`)}getConfig(){let e=f({...g,...o().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){a(),this.packet=[]}},v=1e4,y=t((t,n)=>{h(t,n);let r=-1,i=[],a=1,{bitsPerRow:o}=n.getConfig();for(let{start:s,end:c,bits:l,label:u}of t.blocks){if(s!==void 0&&c!==void 0&&c{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:t(async t=>{let n=await m(`packet`,t),r=x.parser?.yy;if(!(r instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);e.debug(n),y(n,r)},`parse`)},S=t((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:c,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),m=o+c,h=m*(d.length+1)-(f?0:o),g=l*u+2,_=p(t);_.attr(`viewBox`,`0 0 ${g} ${h}`),s(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,h-m/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=t((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:t(({packet:e}={})=>{let t=f(T,e);return` +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{i as f}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{St as p}from"./mermaidParser.worker-CBWarbNh.js";import{n as m}from"./mermaid-parser.core-87cmcdBo.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";var g=c.packet,_=class{constructor(){this.packet=[],this.setAccTitle=i,this.getAccTitle=d,this.setDiagramTitle=r,this.getDiagramTitle=u,this.getAccDescription=l,this.setAccDescription=n}static{t(this,`PacketDB`)}getConfig(){let e=f({...g,...o().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){a(),this.packet=[]}},v=1e4,y=t((t,n)=>{h(t,n);let r=-1,i=[],a=1,{bitsPerRow:o}=n.getConfig();for(let{start:s,end:c,bits:l,label:u}of t.blocks){if(s!==void 0&&c!==void 0&&c{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:t(async t=>{let n=await m(`packet`,t),r=x.parser?.yy;if(!(r instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);e.debug(n),y(n,r)},`parse`)},S=t((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:c,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),m=o+c,h=m*(d.length+1)-(f?0:o),g=l*u+2,_=p(t);_.attr(`viewBox`,`0 0 ${g} ${h}`),s(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,h-m/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=t((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:t(({packet:e}={})=>{let t=f(T,e);return` .packetByte { font-size: ${t.byteFontSize}; } diff --git a/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-Df7YYj_B.js b/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-CbseMTWH.js similarity index 90% rename from apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-Df7YYj_B.js rename to apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-CbseMTWH.js index 6b94b4309..de99755bd 100644 --- a/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-Df7YYj_B.js +++ b/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-CbseMTWH.js @@ -1 +1 @@ -import{f as e,t}from"./mermaid-parser.core-BCOGZFb-.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-CLGD4ZFX-D_luxf7b.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-BnQxQiBZ.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=e().RailroadEbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=n(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=n((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=n(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[EBNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram}; \ No newline at end of file +import{f as e,t}from"./mermaid-parser.core-BCOGZFb-.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-CWy3EboY.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=e().RailroadEbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=n(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=n((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=n(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[EBNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-FbIICErP.js b/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-DIMDDDGC.js similarity index 90% rename from apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-FbIICErP.js rename to apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-DIMDDDGC.js index 74af61084..00a4daa4f 100644 --- a/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-FbIICErP.js +++ b/apps/pythinker-code/dist-web/assets/ebnfDiagram-PWID7BFC-DIMDDDGC.js @@ -1 +1 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CcF2nKWM.js";import"./mermaidParser.worker-_pLIm6No.js";import{f as n,t as r}from"./mermaid-parser.core-87cmcdBo.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-uaDelfR2.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=n().RailroadEbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=t(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=t(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=t((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=t(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:t(t=>{o.clear(),e.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new r(n);let i=n.value;e.debug(`[EBNF Parser] Parsed rules:`,i.rules.length),h(i),e.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram}; \ No newline at end of file +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CbPIJzjs.js";import"./mermaidParser.worker-CBWarbNh.js";import{f as n,t as r}from"./mermaid-parser.core-87cmcdBo.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-Cw2zjcPU.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=n().RailroadEbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=t(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=t(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=t((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=t(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:t(t=>{o.clear(),e.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new r(n);let i=n.value;e.debug(`[EBNF Parser] Parsed rules:`,i.rules.length),h(i),e.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/editor.api2-BIJacb07.js b/apps/pythinker-code/dist-web/assets/editor.api2-DVs509bq.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/editor.api2-BIJacb07.js rename to apps/pythinker-code/dist-web/assets/editor.api2-DVs509bq.js index 550373143..c5d4df786 100644 --- a/apps/pythinker-code/dist-web/assets/editor.api2-BIJacb07.js +++ b/apps/pythinker-code/dist-web/assets/editor.api2-DVs509bq.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-QTnfLwEv.js";import{t}from"./purify.es-CvIXgbbv.js";function n(){return globalThis._VSCODE_NLS_MESSAGES}function r(){return globalThis._VSCODE_NLS_LANGUAGE}var i=r()===`pseudo`||typeof document<`u`&&document.location&&typeof document.location.hash==`string`&&document.location.hash.indexOf(`pseudo=true`)>=0;function a(e,t){let n;return n=t.length===0?e:e.replace(/\{(\d+)\}/g,(e,n)=>{let r=t[n[0]],i=e;return typeof r==`string`?i=r:(typeof r==`number`||typeof r==`boolean`||r==null)&&(i=String(r)),i}),i&&(n=`[`+n.replace(/[aouei]/g,`$&$&`)+`]`),n}function o(e,t,...n){return a(typeof e==`number`?s(e,t):t,n)}function s(e,t){let r=n()?.[e];if(typeof r!=`string`){if(typeof t==`string`)return t;throw Error(`!!! NLS MISSING: ${e} !!!`)}return r}function c(e,t,...n){let r;r=typeof e==`number`?s(e,t):t;let i=a(r,n);return{value:i,original:t===r?i:a(t,n)}}function l(e,t){let n=e;typeof n.vscodeWindowId!=`number`&&Object.defineProperty(n,"vscodeWindowId",{get:()=>t})}var u=window,d=class e{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new e}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}};function f(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}function p(e){return d.INSTANCE.getZoomFactor(e)}var m=navigator.userAgent,h=m.indexOf(`Firefox`)>=0,g=m.indexOf(`AppleWebKit`)>=0,_=m.indexOf(`Chrome`)>=0,v=!_&&m.indexOf(`Safari`)>=0,y=!_&&!v&&g;m.indexOf(`Electron/`);var b=m.indexOf(`Android`)>=0,x=!1;if(typeof u.matchMedia==`function`){let e=u.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=u.matchMedia(`(display-mode: fullscreen)`);x=e.matches,f(u,e,({matches:e})=>{x&&t.matches||(x=e)})}function S(){return globalThis.MonacoEnvironment}var ee=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?de.isErrorNoTelemetry(e)?new de(e.message+` +import{n as e}from"./chunk-QTnfLwEv.js";import{t}from"./purify.es-F_7NWVtX.js";function n(){return globalThis._VSCODE_NLS_MESSAGES}function r(){return globalThis._VSCODE_NLS_LANGUAGE}var i=r()===`pseudo`||typeof document<`u`&&document.location&&typeof document.location.hash==`string`&&document.location.hash.indexOf(`pseudo=true`)>=0;function a(e,t){let n;return n=t.length===0?e:e.replace(/\{(\d+)\}/g,(e,n)=>{let r=t[n[0]],i=e;return typeof r==`string`?i=r:(typeof r==`number`||typeof r==`boolean`||r==null)&&(i=String(r)),i}),i&&(n=`[`+n.replace(/[aouei]/g,`$&$&`)+`]`),n}function o(e,t,...n){return a(typeof e==`number`?s(e,t):t,n)}function s(e,t){let r=n()?.[e];if(typeof r!=`string`){if(typeof t==`string`)return t;throw Error(`!!! NLS MISSING: ${e} !!!`)}return r}function c(e,t,...n){let r;r=typeof e==`number`?s(e,t):t;let i=a(r,n);return{value:i,original:t===r?i:a(t,n)}}function l(e,t){let n=e;typeof n.vscodeWindowId!=`number`&&Object.defineProperty(n,"vscodeWindowId",{get:()=>t})}var u=window,d=class e{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new e}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}};function f(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}function p(e){return d.INSTANCE.getZoomFactor(e)}var m=navigator.userAgent,h=m.indexOf(`Firefox`)>=0,g=m.indexOf(`AppleWebKit`)>=0,_=m.indexOf(`Chrome`)>=0,v=!_&&m.indexOf(`Safari`)>=0,y=!_&&!v&&g;m.indexOf(`Electron/`);var b=m.indexOf(`Android`)>=0,x=!1;if(typeof u.matchMedia==`function`){let e=u.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=u.matchMedia(`(display-mode: fullscreen)`);x=e.matches,f(u,e,({matches:e})=>{x&&t.matches||(x=e)})}function S(){return globalThis.MonacoEnvironment}var ee=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?de.isErrorNoTelemetry(e)?new de(e.message+` `+e.stack):Error(e.message+` diff --git a/apps/pythinker-code/dist-web/assets/editor.main-cSwqhoaG.js b/apps/pythinker-code/dist-web/assets/editor.main-nZY5Vq00.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/editor.main-cSwqhoaG.js rename to apps/pythinker-code/dist-web/assets/editor.main-nZY5Vq00.js index bc1a17aa7..e1ee9443f 100644 --- a/apps/pythinker-code/dist-web/assets/editor.main-cSwqhoaG.js +++ b/apps/pythinker-code/dist-web/assets/editor.main-nZY5Vq00.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-CtM0Hc-w.js","assets/lspLanguageFeatures-C5inBXDM.js","assets/editor.api2-BIJacb07.js","assets/chunk-QTnfLwEv.js","assets/purify.es-CvIXgbbv.js","assets/editor-D_FpifaX.css","assets/workers-lk8skNfQ.js","assets/htmlMode-Dfjmf-G_.js","assets/jsonMode-PNN9RAuU.js","assets/freemarker2-B2uCKQQH.js","assets/handlebars-DAh6xqk0.js","assets/html-YYI_GKxn.js","assets/javascript-CKns3XZi.js","assets/typescript-DEieVXYx.js","assets/liquid-D2thJNk4.js","assets/mdx-CBrxVYq5.js","assets/python-sbAT-96o.js","assets/razor-BTd1E-Za.js","assets/xml-BURColbr.js","assets/yaml-BjhZAZzt.js"])))=>i.map(i=>d[i]); -import{n as e}from"./chunk-QTnfLwEv.js";import{t}from"./preload-helper-zJ_50EbN.js";import{a as n,c as r,d as i,f as a,h as o,i as s,l as c,m as ee,n as l,o as u,p as d,r as te,s as f,t as ne,u as re}from"./editor.api2-BIJacb07.js";import{t as ie}from"./monaco.contribution-DqkvvJIb.js";import{t as ae}from"./workers-lk8skNfQ.js";var oe=e({cssDefaults:()=>se,lessDefaults:()=>le,scssDefaults:()=>ce}),p=class{constructor(e,t,n){this._onDidChange=new l,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},m={validate:!0,lint:{compatibleVendorPrefixes:`ignore`,vendorPrefix:`warning`,duplicateProperties:`warning`,emptyRules:`warning`,importStatement:`ignore`,boxModel:`ignore`,universalSelector:`ignore`,zeroUnits:`ignore`,fontFaceProperties:`warning`,hexColorLength:`error`,argumentsInColorFunction:`error`,unknownProperties:`warning`,ieHack:`ignore`,unknownVendorSpecificProperties:`ignore`,propertyIgnoredDueToDisplay:`warning`,important:`ignore`,float:`ignore`,idSelector:`ignore`},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:`collapse`,maxPreserveNewLines:void 0,preserveNewLines:!0}},h={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},se=new p(`css`,m,h),ce=new p(`scss`,m,h),le=new p(`less`,m,h);function g(){return t(()=>import(`./cssMode-CtM0Hc-w.js`),__vite__mapDeps([0,1,2,3,4,5,6]))}o.onLanguage(`less`,()=>{g().then(e=>e.setupMode(le))}),o.onLanguage(`scss`,()=>{g().then(e=>e.setupMode(ce))}),o.onLanguage(`css`,()=>{g().then(e=>e.setupMode(se))});var ue=e({handlebarDefaults:()=>_e,handlebarLanguageService:()=>ge,htmlDefaults:()=>he,htmlLanguageService:()=>me,razorDefaults:()=>ye,razorLanguageService:()=>ve,registerHTMLLanguageService:()=>b}),de=class{constructor(e,t,n){this._onDidChange=new l,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},_={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:`default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var`,contentUnformatted:`pre`,indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:`head, body, /html`,wrapAttributes:`auto`},suggest:{},data:{useDefaultDataProvider:!0}};function v(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===y,documentFormattingEdits:e===y,documentRangeFormattingEdits:e===y}}var y=`html`,fe=`handlebars`,pe=`razor`,me=b(y,_,v(y)),he=me.defaults,ge=b(fe,_,v(fe)),_e=ge.defaults,ve=b(pe,_,v(pe)),ye=ve.defaults;function be(){return t(()=>import(`./htmlMode-Dfjmf-G_.js`),__vite__mapDeps([7,1,2,3,4,5,6]))}function b(e,t=_,n=v(e)){let r=new de(e,t,n),i,a=o.onLanguage(e,async()=>{i=(await be()).setupMode(r)});return{defaults:r,dispose(){a.dispose(),i?.dispose(),i=void 0}}}var xe=e({getWorker:()=>Ce,jsonDefaults:()=>Se}),Se=new class{constructor(e,t,n){this._onDidChange=new l,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}(`json`,{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:`warning`,schemaValidation:`warning`,comments:`error`,trailingCommas:`error`},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0}),Ce=()=>we().then(e=>e.getWorker());function we(){return t(()=>import(`./jsonMode-PNN9RAuU.js`),__vite__mapDeps([8,1,2,3,4,5,6]))}o.register({id:`json`,extensions:[`.json`,`.bowerrc`,`.jshintrc`,`.jscsrc`,`.eslintrc`,`.babelrc`,`.har`],aliases:[`JSON`,`json`],mimetypes:[`application/json`]}),o.onLanguage(`json`,()=>{we().then(e=>e.setupMode(Se))});var Te={},Ee={},De=class e{static getOrCreate(t){return Ee[t]||(Ee[t]=new e(t)),Ee[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,Te[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function x(e){let t=e.id;Te[t]=e,o.register(e);let n=De.getOrCreate(t);o.registerTokensProviderFactory(t,{create:async()=>(await n.load()).language}),o.onLanguageEncountered(t,async()=>{let e=await n.load();o.setLanguageConfiguration(t,e.conf)})}x({id:`abap`,extensions:[`.abap`],aliases:[`abap`,`ABAP`],loader:()=>t(()=>import(`./abap-08VXUWAP.js`),[])}),x({id:`apex`,extensions:[`.cls`],aliases:[`Apex`,`apex`],mimetypes:[`text/x-apex-source`,`text/x-apex`],loader:()=>t(()=>import(`./apex-BWPQTe0t.js`),[])}),x({id:`azcli`,extensions:[`.azcli`],aliases:[`Azure CLI`,`azcli`],loader:()=>t(()=>import(`./azcli-Bc_sGQ0U.js`),[])}),x({id:`bat`,extensions:[`.bat`,`.cmd`],aliases:[`Batch`,`bat`],loader:()=>t(()=>import(`./bat-i0X4ZdIN.js`),[])}),x({id:`bicep`,extensions:[`.bicep`],aliases:[`Bicep`],loader:()=>t(()=>import(`./bicep-B5-_aFwp.js`),[])}),x({id:`cameligo`,extensions:[`.mligo`],aliases:[`Cameligo`],loader:()=>t(()=>import(`./cameligo-DMUM7wLl.js`),[])}),x({id:`clojure`,extensions:[`.clj`,`.cljs`,`.cljc`,`.edn`],aliases:[`clojure`,`Clojure`],loader:()=>t(()=>import(`./clojure-Cm7r79vr.js`),[])}),x({id:`coffeescript`,extensions:[`.coffee`],aliases:[`CoffeeScript`,`coffeescript`,`coffee`],mimetypes:[`text/x-coffeescript`,`text/coffeescript`],loader:()=>t(()=>import(`./coffee-Ba7i2nA0.js`),[])}),x({id:`c`,extensions:[`.c`,`.h`],aliases:[`C`,`c`],loader:()=>t(()=>import(`./cpp-C7h46wYY.js`),[])}),x({id:`cpp`,extensions:[`.cpp`,`.cc`,`.cxx`,`.hpp`,`.hh`,`.hxx`],aliases:[`C++`,`Cpp`,`cpp`],loader:()=>t(()=>import(`./cpp-C7h46wYY.js`),[])}),x({id:`csharp`,extensions:[`.cs`,`.csx`,`.cake`],aliases:[`C#`,`csharp`],loader:()=>t(()=>import(`./csharp-BKxtCVv1.js`),[])}),x({id:`csp`,extensions:[`.csp`],aliases:[`CSP`,`csp`],loader:()=>t(()=>import(`./csp-bTuwJoIa.js`),[])}),x({id:`css`,extensions:[`.css`],aliases:[`CSS`,`css`],mimetypes:[`text/css`],loader:()=>t(()=>import(`./css-DIMkf-bt.js`),[])}),x({id:`cypher`,extensions:[`.cypher`,`.cyp`],aliases:[`Cypher`,`OpenCypher`],loader:()=>t(()=>import(`./cypher-CVaqCwHa.js`),[])}),x({id:`dart`,extensions:[`.dart`],aliases:[`Dart`,`dart`],mimetypes:[`text/x-dart-source`,`text/x-dart`],loader:()=>t(()=>import(`./dart-onAF5SnQ.js`),[])}),x({id:`dockerfile`,extensions:[`.dockerfile`],filenames:[`Dockerfile`],aliases:[`Dockerfile`],loader:()=>t(()=>import(`./dockerfile-DZFCIeNp.js`),[])}),x({id:`ecl`,extensions:[`.ecl`],aliases:[`ECL`,`Ecl`,`ecl`],loader:()=>t(()=>import(`./ecl-D05T4iGw.js`),[])}),x({id:`elixir`,extensions:[`.ex`,`.exs`],aliases:[`Elixir`,`elixir`,`ex`],loader:()=>t(()=>import(`./elixir-6RTg0lbw.js`),[])}),x({id:`flow9`,extensions:[`.flow`],aliases:[`Flow9`,`Flow`,`flow9`,`flow`],loader:()=>t(()=>import(`./flow9-C5_-GSwl.js`),[])}),x({id:`fsharp`,extensions:[`.fs`,`.fsi`,`.ml`,`.mli`,`.fsx`,`.fsscript`],aliases:[`F#`,`FSharp`,`fsharp`],loader:()=>t(()=>import(`./fsharp-C8Ef5oNN.js`),[])}),x({id:`freemarker2`,extensions:[`.ftl`,`.ftlh`,`.ftlx`],aliases:[`FreeMarker2`,`Apache FreeMarker2`],loader:()=>t(()=>import(`./freemarker2-B2uCKQQH.js`).then(e=>e.TagAutoInterpolationDollar),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-angle.interpolation-dollar`,aliases:[`FreeMarker2 (Angle/Dollar)`,`Apache FreeMarker2 (Angle/Dollar)`],loader:()=>t(()=>import(`./freemarker2-B2uCKQQH.js`).then(e=>e.TagAngleInterpolationDollar),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-bracket.interpolation-dollar`,aliases:[`FreeMarker2 (Bracket/Dollar)`,`Apache FreeMarker2 (Bracket/Dollar)`],loader:()=>t(()=>import(`./freemarker2-B2uCKQQH.js`).then(e=>e.TagBracketInterpolationDollar),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-angle.interpolation-bracket`,aliases:[`FreeMarker2 (Angle/Bracket)`,`Apache FreeMarker2 (Angle/Bracket)`],loader:()=>t(()=>import(`./freemarker2-B2uCKQQH.js`).then(e=>e.TagAngleInterpolationBracket),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-bracket.interpolation-bracket`,aliases:[`FreeMarker2 (Bracket/Bracket)`,`Apache FreeMarker2 (Bracket/Bracket)`],loader:()=>t(()=>import(`./freemarker2-B2uCKQQH.js`).then(e=>e.TagBracketInterpolationBracket),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-auto.interpolation-dollar`,aliases:[`FreeMarker2 (Auto/Dollar)`,`Apache FreeMarker2 (Auto/Dollar)`],loader:()=>t(()=>import(`./freemarker2-B2uCKQQH.js`).then(e=>e.TagAutoInterpolationDollar),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-auto.interpolation-bracket`,aliases:[`FreeMarker2 (Auto/Bracket)`,`Apache FreeMarker2 (Auto/Bracket)`],loader:()=>t(()=>import(`./freemarker2-B2uCKQQH.js`).then(e=>e.TagAutoInterpolationBracket),__vite__mapDeps([9,2,3,4,5]))}),x({id:`go`,extensions:[`.go`],aliases:[`Go`],loader:()=>t(()=>import(`./go-C-y9NEjX.js`),[])}),x({id:`graphql`,extensions:[`.graphql`,`.gql`],aliases:[`GraphQL`,`graphql`,`gql`],mimetypes:[`application/graphql`],loader:()=>t(()=>import(`./graphql-fmXr3nnJ.js`),[])}),x({id:`handlebars`,extensions:[`.handlebars`,`.hbs`],aliases:[`Handlebars`,`handlebars`,`hbs`],mimetypes:[`text/x-handlebars-template`],loader:()=>t(()=>import(`./handlebars-DAh6xqk0.js`),__vite__mapDeps([10,2,3,4,5]))}),x({id:`hcl`,extensions:[`.tf`,`.tfvars`,`.hcl`],aliases:[`Terraform`,`tf`,`HCL`,`hcl`],loader:()=>t(()=>import(`./hcl-CpzslTdj.js`),[])}),x({id:`html`,extensions:[`.html`,`.htm`,`.shtml`,`.xhtml`,`.mdoc`,`.jsp`,`.asp`,`.aspx`,`.jshtm`],aliases:[`HTML`,`htm`,`html`,`xhtml`],mimetypes:[`text/html`,`text/x-jshtm`,`text/template`,`text/ng-template`],loader:()=>t(()=>import(`./html-YYI_GKxn.js`),__vite__mapDeps([11,2,3,4,5]))}),x({id:`ini`,extensions:[`.ini`,`.properties`,`.gitconfig`],filenames:[`config`,`.gitattributes`,`.gitconfig`,`.editorconfig`],aliases:[`Ini`,`ini`],loader:()=>t(()=>import(`./ini-sBoK_t0W.js`),[])}),x({id:`java`,extensions:[`.java`,`.jav`],aliases:[`Java`,`java`],mimetypes:[`text/x-java-source`,`text/x-java`],loader:()=>t(()=>import(`./java-BEtHBSE6.js`),[])}),x({id:`javascript`,extensions:[`.js`,`.es6`,`.jsx`,`.mjs`,`.cjs`],firstLine:`^#!.*\\bnode`,filenames:[`jakefile`],aliases:[`JavaScript`,`javascript`,`js`],mimetypes:[`text/javascript`],loader:()=>t(()=>import(`./javascript-CKns3XZi.js`),__vite__mapDeps([12,13,2,3,4,5]))}),x({id:`julia`,extensions:[`.jl`],aliases:[`julia`,`Julia`],loader:()=>t(()=>import(`./julia-Bri6UV-V.js`),[])}),x({id:`kotlin`,extensions:[`.kt`,`.kts`],aliases:[`Kotlin`,`kotlin`],mimetypes:[`text/x-kotlin-source`,`text/x-kotlin`],loader:()=>t(()=>import(`./kotlin-BOotOW0E.js`),[])}),x({id:`less`,extensions:[`.less`],aliases:[`Less`,`less`],mimetypes:[`text/x-less`,`text/less`],loader:()=>t(()=>import(`./less-B9JPFI3C.js`),[])}),x({id:`lexon`,extensions:[`.lex`],aliases:[`Lexon`],loader:()=>t(()=>import(`./lexon-CfSJPG6W.js`),[])}),x({id:`lua`,extensions:[`.lua`],aliases:[`Lua`,`lua`],loader:()=>t(()=>import(`./lua-CsQS60Ue.js`),[])}),x({id:`liquid`,extensions:[`.liquid`,`.html.liquid`],aliases:[`Liquid`,`liquid`],mimetypes:[`application/liquid`],loader:()=>t(()=>import(`./liquid-D2thJNk4.js`),__vite__mapDeps([14,2,3,4,5]))}),x({id:`m3`,extensions:[`.m3`,`.i3`,`.mg`,`.ig`],aliases:[`Modula-3`,`Modula3`,`modula3`,`m3`],loader:()=>t(()=>import(`./m3-D-oSqn_W.js`),[])}),x({id:`markdown`,extensions:[`.md`,`.markdown`,`.mdown`,`.mkdn`,`.mkd`,`.mdwn`,`.mdtxt`,`.mdtext`],aliases:[`Markdown`,`markdown`],loader:()=>t(()=>import(`./markdown-Cimd5fb3.js`),[])}),x({id:`mdx`,extensions:[`.mdx`],aliases:[`MDX`,`mdx`],loader:()=>t(()=>import(`./mdx-CBrxVYq5.js`),__vite__mapDeps([15,2,3,4,5]))}),x({id:`mips`,extensions:[`.s`],aliases:[`MIPS`,`MIPS-V`],mimetypes:[`text/x-mips`,`text/mips`,`text/plaintext`],loader:()=>t(()=>import(`./mips-CIPQ_RoX.js`),[])}),x({id:`msdax`,extensions:[`.dax`,`.msdax`],aliases:[`DAX`,`MSDAX`],loader:()=>t(()=>import(`./msdax-DauUninz.js`),[])}),x({id:`mysql`,extensions:[],aliases:[`MySQL`,`mysql`],loader:()=>t(()=>import(`./mysql-SOo6toE5.js`),[])}),x({id:`objective-c`,extensions:[`.m`],aliases:[`Objective-C`],loader:()=>t(()=>import(`./objective-c-FvmIjYaQ.js`),[])}),x({id:`pascal`,extensions:[`.pas`,`.p`,`.pp`],aliases:[`Pascal`,`pas`],mimetypes:[`text/x-pascal-source`,`text/x-pascal`],loader:()=>t(()=>import(`./pascal-DrH0SRf2.js`),[])}),x({id:`pascaligo`,extensions:[`.ligo`],aliases:[`Pascaligo`,`ligo`],loader:()=>t(()=>import(`./pascaligo-D-ptJ9y-.js`),[])}),x({id:`perl`,extensions:[`.pl`,`.pm`],aliases:[`Perl`,`pl`],loader:()=>t(()=>import(`./perl-oz_6vUea.js`),[])}),x({id:`pgsql`,extensions:[],aliases:[`PostgreSQL`,`postgres`,`pg`,`postgre`],loader:()=>t(()=>import(`./pgsql-DTj74zXo.js`),[])}),x({id:`php`,extensions:[`.php`,`.php4`,`.php5`,`.phtml`,`.ctp`],aliases:[`PHP`,`php`],mimetypes:[`application/x-php`],loader:()=>t(()=>import(`./php-nr791fC2.js`),[])}),x({id:`pla`,extensions:[`.pla`],loader:()=>t(()=>import(`./pla-CopQ2nXW.js`),[])}),x({id:`postiats`,extensions:[`.dats`,`.sats`,`.hats`],aliases:[`ATS`,`ATS/Postiats`],loader:()=>t(()=>import(`./postiats-43DmfD33.js`),[])}),x({id:`powerquery`,extensions:[`.pq`,`.pqm`],aliases:[`PQ`,`M`,`Power Query`,`Power Query M`],loader:()=>t(()=>import(`./powerquery-D3hlyOfw.js`),[])}),x({id:`powershell`,extensions:[`.ps1`,`.psm1`,`.psd1`],aliases:[`PowerShell`,`powershell`,`ps`,`ps1`],loader:()=>t(()=>import(`./powershell-DmHpPYUd.js`),[])}),x({id:`proto`,extensions:[`.proto`],aliases:[`protobuf`,`Protocol Buffers`],loader:()=>t(()=>import(`./protobuf-C531GsRP.js`),[])}),x({id:`pug`,extensions:[`.jade`,`.pug`],aliases:[`Pug`,`Jade`,`jade`],loader:()=>t(()=>import(`./pug-Z5eAx3Zn.js`),[])}),x({id:`python`,extensions:[`.py`,`.rpy`,`.pyw`,`.cpy`,`.gyp`,`.gypi`],aliases:[`Python`,`py`],firstLine:`^#!/.*\\bpython[0-9.-]*\\b`,loader:()=>t(()=>import(`./python-sbAT-96o.js`),__vite__mapDeps([16,2,3,4,5]))}),x({id:`qsharp`,extensions:[`.qs`],aliases:[`Q#`,`qsharp`],loader:()=>t(()=>import(`./qsharp-DkqhCAOL.js`),[])}),x({id:`r`,extensions:[`.r`,`.rhistory`,`.rmd`,`.rprofile`,`.rt`],aliases:[`R`,`r`],loader:()=>t(()=>import(`./r-BwWrilGY.js`),[])}),x({id:`razor`,extensions:[`.cshtml`],aliases:[`Razor`,`razor`],mimetypes:[`text/x-cshtml`],loader:()=>t(()=>import(`./razor-BTd1E-Za.js`),__vite__mapDeps([17,2,3,4,5]))}),x({id:`redis`,extensions:[`.redis`],aliases:[`redis`],loader:()=>t(()=>import(`./redis-ClamHrr6.js`),[])}),x({id:`redshift`,extensions:[],aliases:[`Redshift`,`redshift`],loader:()=>t(()=>import(`./redshift-DT7zqm-g.js`),[])}),x({id:`restructuredtext`,extensions:[`.rst`],aliases:[`reStructuredText`,`restructuredtext`],loader:()=>t(()=>import(`./restructuredtext-BYgofb2h.js`),[])}),x({id:`ruby`,extensions:[`.rb`,`.rbx`,`.rjs`,`.gemspec`,`.pp`],filenames:[`rakefile`,`Gemfile`],aliases:[`Ruby`,`rb`],loader:()=>t(()=>import(`./ruby-DezsRK8O.js`),[])}),x({id:`rust`,extensions:[`.rs`,`.rlib`],aliases:[`Rust`,`rust`],loader:()=>t(()=>import(`./rust-DdL9SqIa.js`),[])}),x({id:`sb`,extensions:[`.sb`],aliases:[`Small Basic`,`sb`],loader:()=>t(()=>import(`./sb-CcwsVR0C.js`),[])}),x({id:`scala`,extensions:[`.scala`,`.sc`,`.sbt`],aliases:[`Scala`,`scala`,`SBT`,`Sbt`,`sbt`,`Dotty`,`dotty`],mimetypes:[`text/x-scala-source`,`text/x-scala`,`text/x-sbt`,`text/x-dotty`],loader:()=>t(()=>import(`./scala-DHpiXF5c.js`),[])}),x({id:`scheme`,extensions:[`.scm`,`.ss`,`.sch`,`.rkt`],aliases:[`scheme`,`Scheme`],loader:()=>t(()=>import(`./scheme-BeGwcela.js`),[])}),x({id:`scss`,extensions:[`.scss`],aliases:[`Sass`,`sass`,`scss`],mimetypes:[`text/x-scss`,`text/scss`],loader:()=>t(()=>import(`./scss-gp-XZpBa.js`),[])}),x({id:`shell`,extensions:[`.sh`,`.bash`],aliases:[`Shell`,`sh`],loader:()=>t(()=>import(`./shell-CC2rA5mh.js`),[])}),x({id:`sol`,extensions:[`.sol`],aliases:[`sol`,`solidity`,`Solidity`],loader:()=>t(()=>import(`./solidity-BEEn4gHE.js`),[])}),x({id:`aes`,extensions:[`.aes`],aliases:[`aes`,`sophia`,`Sophia`],loader:()=>t(()=>import(`./sophia-CRfGWb83.js`),[])}),x({id:`sparql`,extensions:[`.rq`],aliases:[`sparql`,`SPARQL`],loader:()=>t(()=>import(`./sparql-D_Lu-MrJ.js`),[])}),x({id:`sql`,extensions:[`.sql`],aliases:[`SQL`],loader:()=>t(()=>import(`./sql-NEE52Syq.js`),[])}),x({id:`st`,extensions:[`.st`,`.iecst`,`.iecplc`,`.lc3lib`,`.TcPOU`,`.TcDUT`,`.TcGVL`,`.TcIO`],aliases:[`StructuredText`,`scl`,`stl`],loader:()=>t(()=>import(`./st-DbInun42.js`),[])}),x({id:`swift`,aliases:[`Swift`,`swift`],extensions:[`.swift`],mimetypes:[`text/swift`],loader:()=>t(()=>import(`./swift-Bxkupp3x.js`),[])}),x({id:`systemverilog`,extensions:[`.sv`,`.svh`],aliases:[`SV`,`sv`,`SystemVerilog`,`systemverilog`],loader:()=>t(()=>import(`./systemverilog-Bz4Y3fRF.js`),[])}),x({id:`verilog`,extensions:[`.v`,`.vh`],aliases:[`V`,`v`,`Verilog`,`verilog`],loader:()=>t(()=>import(`./systemverilog-Bz4Y3fRF.js`),[])}),x({id:`tcl`,extensions:[`.tcl`],aliases:[`tcl`,`Tcl`,`tcltk`,`TclTk`,`tcl/tk`,`Tcl/Tk`],loader:()=>t(()=>import(`./tcl-DISqw1ZD.js`),[])}),x({id:`twig`,extensions:[`.twig`],aliases:[`Twig`,`twig`],mimetypes:[`text/x-twig`],loader:()=>t(()=>import(`./twig-De2hgUGE.js`),[])}),x({id:`typescript`,extensions:[`.ts`,`.tsx`,`.cts`,`.mts`],aliases:[`TypeScript`,`ts`,`typescript`],mimetypes:[`text/typescript`],loader:()=>t(()=>import(`./typescript-DEieVXYx.js`),__vite__mapDeps([13,2,3,4,5]))}),x({id:`typespec`,extensions:[`.tsp`],aliases:[`TypeSpec`],loader:()=>t(()=>import(`./typespec-B8J7ngcE.js`),[])}),x({id:`vb`,extensions:[`.vb`],aliases:[`Visual Basic`,`vb`],loader:()=>t(()=>import(`./vb-DV3o63ZY.js`),[])}),x({id:`wgsl`,extensions:[`.wgsl`],aliases:[`WebGPU Shading Language`,`WGSL`,`wgsl`],loader:()=>t(()=>import(`./wgsl-DpFanUEy.js`),[])}),x({id:`xml`,extensions:[`.xml`,`.xsd`,`.dtd`,`.ascx`,`.csproj`,`.config`,`.props`,`.targets`,`.wxi`,`.wxl`,`.wxs`,`.xaml`,`.svg`,`.svgz`,`.opf`,`.xslt`,`.xsl`],firstLine:`(\\<\\?xml.*)|(\\t(()=>import(`./xml-BURColbr.js`),__vite__mapDeps([18,2,3,4,5]))}),x({id:`yaml`,extensions:[`.yaml`,`.yml`],aliases:[`YAML`,`yaml`,`YML`,`yml`],mimetypes:[`application/x-yaml`,`text/x-yaml`],loader:()=>t(()=>import(`./yaml-BjhZAZzt.js`),__vite__mapDeps([19,2,3,4,5]))});var Oe=e({MonacoLspClient:()=>rr,WebSocketTransport:()=>or,createTransportToIFrame:()=>lr,createTransportToWorker:()=>cr}),ke=Object.defineProperty,Ae=(e,t,n)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t,n)=>Ae(e,typeof t==`symbol`?t:t+``,n),C,je,w,T,E;function Me(e){return e.method!==void 0}var Ne;(function(e){function t(e){return e}e.create=t})(Ne||={});var D;(function(e){e.parseError=-32700,e.invalidRequest=-32600,e.methodNotFound=-32601,e.invalidParams=-32602,e.internalError=-32603;function t(e){return-32099<=e&&e<=-32e3}e.isServerError=t;function n(e){if(!t(e))throw Error(`Invalid range for a server error.`);return e}e.serverError=n,e.unexpectedServerError=-32e3;function r(e){return!0}e.isApplicationError=r;function i(e){return e}e.applicationError=i,e.genericApplicationError=-320100})(D||={});var Pe=class{constructor(){S(this,`listeners`,new Set),S(this,`event`,e=>(this.listeners.add(e),{dispose:()=>{this.listeners.delete(e)}}))}fire(e){this.listeners.forEach(t=>t(e))}},Fe=class{constructor(e){S(this,`_value`),S(this,`eventEmitter`),this._value=e,this.eventEmitter=new Pe}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.eventEmitter.fire(e))}get onChange(){return this.eventEmitter.event}};function Ie(e,t){let n=setTimeout(t,e);return{dispose:()=>clearTimeout(n)}}function Le(e,t,n){return e instanceof Set?(e.add(t),{dispose:()=>e.delete(t)}):(e.set(t,n),{dispose:()=>e.delete(t)})}var Re=class{constructor(){S(this,`_state`,`none`),S(this,`promise`),S(this,`resolve`,()=>{}),S(this,`reject`,()=>{}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}get state(){return this._state}},ze=(C=class{constructor(){S(this,`_unprocessedMessages`,[]),S(this,`_messageListener`),S(this,`id`,C.id++),S(this,`_state`,new Fe({state:`open`})),S(this,`state`,this._state)}setListener(e){if(this._messageListener=e,e)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){let e=this._unprocessedMessages.shift();this._messageListener(e)}}send(e){return this._sendImpl(e)}_dispatchReceivedMessage(e){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(e):this._unprocessedMessages.push(e)}_onConnectionClosed(){this._state.value={state:`closed`,error:void 0}}log(e){return new Be(this,e??new Ve)}},S(C,`id`,0),C),Be=class{constructor(e,t){S(this,`baseStream`),S(this,`logger`),this.baseStream=e,this.logger=t}get state(){return this.baseStream.state}setListener(e){if(e===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(t=>{this.logger.log(this.baseStream,`incoming`,t),e(t)})}send(e){return this.logger.log(this.baseStream,`outgoing`,e),this.baseStream.send(e)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},Ve=class{log(e,t,n){console.log(`${t===`incoming`?`<-`:`->`} [${e.toString()}] ${JSON.stringify(n)}`)}},He=class e{constructor(e){S(this,`connect`),this.connect=e}mapContext(t){return new e(e=>this.connect(e?Ue(e,t):void 0))}};function Ue(e,t){return{handleNotification:(n,r)=>e.handleNotification(n,t(r)),handleRequest:(n,r,i)=>e.handleRequest(n,r,t(i))}}var We=class e{constructor(e,t,n){S(this,`_stream`),S(this,`_listener`),S(this,`_logger`),S(this,`_unprocessedResponses`,new Map),S(this,`_lastUsedRequestId`,0),this._stream=e,this._listener=t,this._logger=n,this._stream.setListener(e=>{Me(e)?e.id===void 0?this._processNotification(e):this._processRequest(e):this._processResponse(e)})}static createChannel(t,n){let r=!1;return new He(i=>{if(r)throw Error(`A channel to the stream ${t} was already constructed!`);return r=!0,new e(t,i,n)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw Error();if(!this._listener){this._logger&&this._logger.debug({text:`Notification ignored`,message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw Error();let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:D.internalError,message:`An unexpected exception was thrown.`,data:void 0}}}else this._logger&&this._logger.debug({text:`Received request even though not listening for requests`,message:e}),t={error:{code:D.methodNotFound,message:`This endpoint does not listen for requests or notifications.`,data:void 0}};let n;n=`result`in t?{jsonrpc:`2.0`,id:e.id,result:t.result}:{jsonrpc:`2.0`,id:e.id,error:t.error},await this._stream.send(n)}_processResponse(e){let t=``+e.id,n=this._unprocessedResponses.get(t);if(!n){this._logger&&this._logger.debug({text:`Got an unexpected response message`,message:e});return}this._unprocessedResponses.delete(t),n(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,n){let r={jsonrpc:`2.0`,id:this._newRequestId(),method:e.method,params:e.params||void 0};return n&&n(r.id),new Promise((e,t)=>{let n=``+r.id;this._unprocessedResponses.set(n,n=>{`result`in n?e({result:n.result}):(n.error||t(Error(`Response had neither 'result' nor 'error' field set.`)),e({error:n.error}))}),this._stream.send(r).then(void 0,e=>{this._unprocessedResponses.delete(n),t(e)})})}sendNotification(e,t){let n={jsonrpc:`2.0`,id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(n)}toString(){return`StreamChannel/`+this._stream.toString()}},O;(function(e){function t(){return{deserializeFromJson:e=>({hasErrors:!1,value:e}),serializeToJson:e=>e}}e.sAny=t;function n(){return{deserializeFromJson:e=>({hasErrors:!1,value:{}}),serializeToJson:e=>({})}}e.sEmptyObject=n;function r(){return{deserializeFromJson:e=>({hasErrors:!1,value:void 0}),serializeToJson:e=>null}}e.sVoidFromNull=r})(O||={});var Ge=Symbol(`OptionalMethodNotFound`),Ke=class{contextualize(e){return new qe(this,e)}},qe=class extends Ke{constructor(e,t){super(),S(this,`underylingTypedChannel`),S(this,`converters`),this.underylingTypedChannel=e,this.converters=t}async request(e,t,n){let r=await this.converters.getSendContext(n);return this.underylingTypedChannel.request(e,t,r)}async notify(e,t,n){let r=await this.converters.getSendContext(n);return this.underylingTypedChannel.notify(e,t,r)}registerNotificationHandler(e,t){return this.underylingTypedChannel.registerNotificationHandler(e,async(e,n)=>await t(e,await this.converters.getNewContext(n)))}registerRequestHandler(e,t){return this.underylingTypedChannel.registerRequestHandler(e,async(e,n,r)=>await t(e,n,await this.converters.getNewContext(r)))}},k=class e extends Ke{constructor(e,t={}){super(),S(this,`channelCtor`),S(this,`_requestSender`),S(this,`_handler`,new Map),S(this,`_unknownNotificationHandler`,new Set),S(this,`_timeout`),S(this,`sendExceptionDetails`,!1),S(this,`_logger`),S(this,`listeningDeferred`,new Re),S(this,`onListening`,this.listeningDeferred.promise),S(this,`_requestDidErrorEventEmitter`,new Pe),S(this,`onRequestDidError`,this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=Ie(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(t,n={}){return new e(We.createChannel(t,n.logger),n)}startListen(){if(this._requestSender)throw Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&=(this._timeout.dispose(),void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,n)=>this.handleRequest(e,t,n),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,n){let r=this._handler.get(e.method);if(!r)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:D.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(r.kind!=`request`){let t=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:t,data:{requestObject:e}}),{error:{code:D.invalidRequest,message:t,data:{method:e.method}}}}let i=r.requestType.paramsSerializer.deserializeFromJson(e.params);if(i.hasErrors){let t=`Got invalid params: ${i.errorMessage}`;return this._logger&&this._logger.debug({text:t,data:{requestObject:e,errorMessage:i.errorMessage}}),{error:{code:D.invalidParams,message:t,data:{errors:i.errorMessage}}}}else{let a=i.value,o;try{let e=await r.handler(a,t,n);if(`error`in e||`errorMessage`in e){let t=e.error?r.requestType.errorSerializer.serializeToJson(e.error):void 0;o={error:{code:e.errorCode||D.genericApplicationError,message:e.errorMessage||`An error was returned`,data:t}}}else o={result:r.requestType.resultSerializer.serializeToJson(e.ok)}}catch(t){t instanceof Ye?o={error:{code:t.code,message:t.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${t}.`,exception:t,data:{requestObject:e}}),o={error:{code:D.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${t}.`:`Server has thrown an unexpected exception`}})}return o}}async handleNotification(e,t){let n=this._handler.get(e.method);if(!n){for(let t of this._unknownNotificationHandler)t(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(n.kind!=`notification`){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}let r=n.notificationType.paramsSerializer.deserializeFromJson(e.params);if(r.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${r}`,data:{requestObject:e,errorMessage:r.errorMessage}});return}let i=r.value;for(let r of n.handlers)try{r(i,t)}catch(t){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${t}.`,exception:t,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return Le(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw Error(`Handler with method "${e.method}" already registered.`);return Le(this._handler,e.method,{kind:`request`,requestType:e,handler:t})}registerNotificationHandler(e,t){let n=this._handler.get(e.method);if(!n)n={kind:`notification`,notificationType:e,handlers:new Set},this._handler.set(e.method,n);else{if(n.kind!==`notification`)throw Error(`Method "${e.method}" was already registered as request handler.`);if(n.notificationType!==e)throw Error(`Method "${e.method}" was registered for a different type.`)}return Le(n.handlers,t)}getRegisteredTypes(){let e=[];for(let t of this._handler.values())t.kind===`notification`?e.push(t.notificationType):t.kind===`request`&&e.push(t.requestType);return e}async request(e,t,n){if(!this.checkChannel(this._requestSender))throw Error(`Impossible`);let r=e.paramsSerializer.serializeToJson(t);Je(r);let i=await this._requestSender.sendRequest({method:e.method,params:r},n);if(`error`in i){if(e.isOptional&&i.error.code===D.methodNotFound)return Ge;let t;if(i.error.data!==void 0){let n=e.errorSerializer.deserializeFromJson(i.error.data);if(n.hasErrors)throw Error(n.errorMessage);t=n.value}else t=void 0;let n=new Ye(i.error.message,t,i.error.code);throw this._requestDidErrorEventEmitter.fire({error:n}),n}else{let t=e.resultSerializer.deserializeFromJson(i.result);if(t.hasErrors)throw Error(`Could not deserialize response: `+t.errorMessage+` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-DjOfW8pt.js","assets/lspLanguageFeatures-DXTWGW3J.js","assets/editor.api2-DVs509bq.js","assets/chunk-QTnfLwEv.js","assets/purify.es-F_7NWVtX.js","assets/editor-D_FpifaX.css","assets/workers-CzVdMsP_.js","assets/htmlMode-yDIyz0I2.js","assets/jsonMode-W7-PSTjz.js","assets/freemarker2-C9IVHbVo.js","assets/handlebars-BL5nK9ri.js","assets/html-CsDKBQZf.js","assets/javascript-0aPrR7xc.js","assets/typescript-Bz0Zph5S.js","assets/liquid-CYLr1cCn.js","assets/mdx-Cs-NVxYA.js","assets/python-LA0u3Sgx.js","assets/razor-D6HVEdoN.js","assets/xml-BHQnAkaS.js","assets/yaml-mAa5_3XV.js"])))=>i.map(i=>d[i]); +import{n as e}from"./chunk-QTnfLwEv.js";import{t}from"./preload-helper-zJ_50EbN.js";import{a as n,c as r,d as i,f as a,h as o,i as s,l as c,m as ee,n as l,o as u,p as d,r as te,s as f,t as ne,u as re}from"./editor.api2-DVs509bq.js";import{t as ie}from"./monaco.contribution-C71ieqbT.js";import{t as ae}from"./workers-CzVdMsP_.js";var oe=e({cssDefaults:()=>se,lessDefaults:()=>le,scssDefaults:()=>ce}),p=class{constructor(e,t,n){this._onDidChange=new l,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},m={validate:!0,lint:{compatibleVendorPrefixes:`ignore`,vendorPrefix:`warning`,duplicateProperties:`warning`,emptyRules:`warning`,importStatement:`ignore`,boxModel:`ignore`,universalSelector:`ignore`,zeroUnits:`ignore`,fontFaceProperties:`warning`,hexColorLength:`error`,argumentsInColorFunction:`error`,unknownProperties:`warning`,ieHack:`ignore`,unknownVendorSpecificProperties:`ignore`,propertyIgnoredDueToDisplay:`warning`,important:`ignore`,float:`ignore`,idSelector:`ignore`},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:`collapse`,maxPreserveNewLines:void 0,preserveNewLines:!0}},h={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},se=new p(`css`,m,h),ce=new p(`scss`,m,h),le=new p(`less`,m,h);function g(){return t(()=>import(`./cssMode-DjOfW8pt.js`),__vite__mapDeps([0,1,2,3,4,5,6]))}o.onLanguage(`less`,()=>{g().then(e=>e.setupMode(le))}),o.onLanguage(`scss`,()=>{g().then(e=>e.setupMode(ce))}),o.onLanguage(`css`,()=>{g().then(e=>e.setupMode(se))});var ue=e({handlebarDefaults:()=>_e,handlebarLanguageService:()=>ge,htmlDefaults:()=>he,htmlLanguageService:()=>me,razorDefaults:()=>ye,razorLanguageService:()=>ve,registerHTMLLanguageService:()=>b}),de=class{constructor(e,t,n){this._onDidChange=new l,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},_={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:`default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var`,contentUnformatted:`pre`,indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:`head, body, /html`,wrapAttributes:`auto`},suggest:{},data:{useDefaultDataProvider:!0}};function v(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===y,documentFormattingEdits:e===y,documentRangeFormattingEdits:e===y}}var y=`html`,fe=`handlebars`,pe=`razor`,me=b(y,_,v(y)),he=me.defaults,ge=b(fe,_,v(fe)),_e=ge.defaults,ve=b(pe,_,v(pe)),ye=ve.defaults;function be(){return t(()=>import(`./htmlMode-yDIyz0I2.js`),__vite__mapDeps([7,1,2,3,4,5,6]))}function b(e,t=_,n=v(e)){let r=new de(e,t,n),i,a=o.onLanguage(e,async()=>{i=(await be()).setupMode(r)});return{defaults:r,dispose(){a.dispose(),i?.dispose(),i=void 0}}}var xe=e({getWorker:()=>Ce,jsonDefaults:()=>Se}),Se=new class{constructor(e,t,n){this._onDidChange=new l,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}(`json`,{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:`warning`,schemaValidation:`warning`,comments:`error`,trailingCommas:`error`},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0}),Ce=()=>we().then(e=>e.getWorker());function we(){return t(()=>import(`./jsonMode-W7-PSTjz.js`),__vite__mapDeps([8,1,2,3,4,5,6]))}o.register({id:`json`,extensions:[`.json`,`.bowerrc`,`.jshintrc`,`.jscsrc`,`.eslintrc`,`.babelrc`,`.har`],aliases:[`JSON`,`json`],mimetypes:[`application/json`]}),o.onLanguage(`json`,()=>{we().then(e=>e.setupMode(Se))});var Te={},Ee={},De=class e{static getOrCreate(t){return Ee[t]||(Ee[t]=new e(t)),Ee[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,Te[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function x(e){let t=e.id;Te[t]=e,o.register(e);let n=De.getOrCreate(t);o.registerTokensProviderFactory(t,{create:async()=>(await n.load()).language}),o.onLanguageEncountered(t,async()=>{let e=await n.load();o.setLanguageConfiguration(t,e.conf)})}x({id:`abap`,extensions:[`.abap`],aliases:[`abap`,`ABAP`],loader:()=>t(()=>import(`./abap-08VXUWAP.js`),[])}),x({id:`apex`,extensions:[`.cls`],aliases:[`Apex`,`apex`],mimetypes:[`text/x-apex-source`,`text/x-apex`],loader:()=>t(()=>import(`./apex-BWPQTe0t.js`),[])}),x({id:`azcli`,extensions:[`.azcli`],aliases:[`Azure CLI`,`azcli`],loader:()=>t(()=>import(`./azcli-Bc_sGQ0U.js`),[])}),x({id:`bat`,extensions:[`.bat`,`.cmd`],aliases:[`Batch`,`bat`],loader:()=>t(()=>import(`./bat-i0X4ZdIN.js`),[])}),x({id:`bicep`,extensions:[`.bicep`],aliases:[`Bicep`],loader:()=>t(()=>import(`./bicep-B5-_aFwp.js`),[])}),x({id:`cameligo`,extensions:[`.mligo`],aliases:[`Cameligo`],loader:()=>t(()=>import(`./cameligo-DMUM7wLl.js`),[])}),x({id:`clojure`,extensions:[`.clj`,`.cljs`,`.cljc`,`.edn`],aliases:[`clojure`,`Clojure`],loader:()=>t(()=>import(`./clojure-Cm7r79vr.js`),[])}),x({id:`coffeescript`,extensions:[`.coffee`],aliases:[`CoffeeScript`,`coffeescript`,`coffee`],mimetypes:[`text/x-coffeescript`,`text/coffeescript`],loader:()=>t(()=>import(`./coffee-Ba7i2nA0.js`),[])}),x({id:`c`,extensions:[`.c`,`.h`],aliases:[`C`,`c`],loader:()=>t(()=>import(`./cpp-C7h46wYY.js`),[])}),x({id:`cpp`,extensions:[`.cpp`,`.cc`,`.cxx`,`.hpp`,`.hh`,`.hxx`],aliases:[`C++`,`Cpp`,`cpp`],loader:()=>t(()=>import(`./cpp-C7h46wYY.js`),[])}),x({id:`csharp`,extensions:[`.cs`,`.csx`,`.cake`],aliases:[`C#`,`csharp`],loader:()=>t(()=>import(`./csharp-BKxtCVv1.js`),[])}),x({id:`csp`,extensions:[`.csp`],aliases:[`CSP`,`csp`],loader:()=>t(()=>import(`./csp-bTuwJoIa.js`),[])}),x({id:`css`,extensions:[`.css`],aliases:[`CSS`,`css`],mimetypes:[`text/css`],loader:()=>t(()=>import(`./css-DIMkf-bt.js`),[])}),x({id:`cypher`,extensions:[`.cypher`,`.cyp`],aliases:[`Cypher`,`OpenCypher`],loader:()=>t(()=>import(`./cypher-CVaqCwHa.js`),[])}),x({id:`dart`,extensions:[`.dart`],aliases:[`Dart`,`dart`],mimetypes:[`text/x-dart-source`,`text/x-dart`],loader:()=>t(()=>import(`./dart-onAF5SnQ.js`),[])}),x({id:`dockerfile`,extensions:[`.dockerfile`],filenames:[`Dockerfile`],aliases:[`Dockerfile`],loader:()=>t(()=>import(`./dockerfile-DZFCIeNp.js`),[])}),x({id:`ecl`,extensions:[`.ecl`],aliases:[`ECL`,`Ecl`,`ecl`],loader:()=>t(()=>import(`./ecl-D05T4iGw.js`),[])}),x({id:`elixir`,extensions:[`.ex`,`.exs`],aliases:[`Elixir`,`elixir`,`ex`],loader:()=>t(()=>import(`./elixir-6RTg0lbw.js`),[])}),x({id:`flow9`,extensions:[`.flow`],aliases:[`Flow9`,`Flow`,`flow9`,`flow`],loader:()=>t(()=>import(`./flow9-C5_-GSwl.js`),[])}),x({id:`fsharp`,extensions:[`.fs`,`.fsi`,`.ml`,`.mli`,`.fsx`,`.fsscript`],aliases:[`F#`,`FSharp`,`fsharp`],loader:()=>t(()=>import(`./fsharp-C8Ef5oNN.js`),[])}),x({id:`freemarker2`,extensions:[`.ftl`,`.ftlh`,`.ftlx`],aliases:[`FreeMarker2`,`Apache FreeMarker2`],loader:()=>t(()=>import(`./freemarker2-C9IVHbVo.js`).then(e=>e.TagAutoInterpolationDollar),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-angle.interpolation-dollar`,aliases:[`FreeMarker2 (Angle/Dollar)`,`Apache FreeMarker2 (Angle/Dollar)`],loader:()=>t(()=>import(`./freemarker2-C9IVHbVo.js`).then(e=>e.TagAngleInterpolationDollar),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-bracket.interpolation-dollar`,aliases:[`FreeMarker2 (Bracket/Dollar)`,`Apache FreeMarker2 (Bracket/Dollar)`],loader:()=>t(()=>import(`./freemarker2-C9IVHbVo.js`).then(e=>e.TagBracketInterpolationDollar),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-angle.interpolation-bracket`,aliases:[`FreeMarker2 (Angle/Bracket)`,`Apache FreeMarker2 (Angle/Bracket)`],loader:()=>t(()=>import(`./freemarker2-C9IVHbVo.js`).then(e=>e.TagAngleInterpolationBracket),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-bracket.interpolation-bracket`,aliases:[`FreeMarker2 (Bracket/Bracket)`,`Apache FreeMarker2 (Bracket/Bracket)`],loader:()=>t(()=>import(`./freemarker2-C9IVHbVo.js`).then(e=>e.TagBracketInterpolationBracket),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-auto.interpolation-dollar`,aliases:[`FreeMarker2 (Auto/Dollar)`,`Apache FreeMarker2 (Auto/Dollar)`],loader:()=>t(()=>import(`./freemarker2-C9IVHbVo.js`).then(e=>e.TagAutoInterpolationDollar),__vite__mapDeps([9,2,3,4,5]))}),x({id:`freemarker2.tag-auto.interpolation-bracket`,aliases:[`FreeMarker2 (Auto/Bracket)`,`Apache FreeMarker2 (Auto/Bracket)`],loader:()=>t(()=>import(`./freemarker2-C9IVHbVo.js`).then(e=>e.TagAutoInterpolationBracket),__vite__mapDeps([9,2,3,4,5]))}),x({id:`go`,extensions:[`.go`],aliases:[`Go`],loader:()=>t(()=>import(`./go-C-y9NEjX.js`),[])}),x({id:`graphql`,extensions:[`.graphql`,`.gql`],aliases:[`GraphQL`,`graphql`,`gql`],mimetypes:[`application/graphql`],loader:()=>t(()=>import(`./graphql-fmXr3nnJ.js`),[])}),x({id:`handlebars`,extensions:[`.handlebars`,`.hbs`],aliases:[`Handlebars`,`handlebars`,`hbs`],mimetypes:[`text/x-handlebars-template`],loader:()=>t(()=>import(`./handlebars-BL5nK9ri.js`),__vite__mapDeps([10,2,3,4,5]))}),x({id:`hcl`,extensions:[`.tf`,`.tfvars`,`.hcl`],aliases:[`Terraform`,`tf`,`HCL`,`hcl`],loader:()=>t(()=>import(`./hcl-CpzslTdj.js`),[])}),x({id:`html`,extensions:[`.html`,`.htm`,`.shtml`,`.xhtml`,`.mdoc`,`.jsp`,`.asp`,`.aspx`,`.jshtm`],aliases:[`HTML`,`htm`,`html`,`xhtml`],mimetypes:[`text/html`,`text/x-jshtm`,`text/template`,`text/ng-template`],loader:()=>t(()=>import(`./html-CsDKBQZf.js`),__vite__mapDeps([11,2,3,4,5]))}),x({id:`ini`,extensions:[`.ini`,`.properties`,`.gitconfig`],filenames:[`config`,`.gitattributes`,`.gitconfig`,`.editorconfig`],aliases:[`Ini`,`ini`],loader:()=>t(()=>import(`./ini-sBoK_t0W.js`),[])}),x({id:`java`,extensions:[`.java`,`.jav`],aliases:[`Java`,`java`],mimetypes:[`text/x-java-source`,`text/x-java`],loader:()=>t(()=>import(`./java-BEtHBSE6.js`),[])}),x({id:`javascript`,extensions:[`.js`,`.es6`,`.jsx`,`.mjs`,`.cjs`],firstLine:`^#!.*\\bnode`,filenames:[`jakefile`],aliases:[`JavaScript`,`javascript`,`js`],mimetypes:[`text/javascript`],loader:()=>t(()=>import(`./javascript-0aPrR7xc.js`),__vite__mapDeps([12,13,2,3,4,5]))}),x({id:`julia`,extensions:[`.jl`],aliases:[`julia`,`Julia`],loader:()=>t(()=>import(`./julia-Bri6UV-V.js`),[])}),x({id:`kotlin`,extensions:[`.kt`,`.kts`],aliases:[`Kotlin`,`kotlin`],mimetypes:[`text/x-kotlin-source`,`text/x-kotlin`],loader:()=>t(()=>import(`./kotlin-BOotOW0E.js`),[])}),x({id:`less`,extensions:[`.less`],aliases:[`Less`,`less`],mimetypes:[`text/x-less`,`text/less`],loader:()=>t(()=>import(`./less-B9JPFI3C.js`),[])}),x({id:`lexon`,extensions:[`.lex`],aliases:[`Lexon`],loader:()=>t(()=>import(`./lexon-CfSJPG6W.js`),[])}),x({id:`lua`,extensions:[`.lua`],aliases:[`Lua`,`lua`],loader:()=>t(()=>import(`./lua-CsQS60Ue.js`),[])}),x({id:`liquid`,extensions:[`.liquid`,`.html.liquid`],aliases:[`Liquid`,`liquid`],mimetypes:[`application/liquid`],loader:()=>t(()=>import(`./liquid-CYLr1cCn.js`),__vite__mapDeps([14,2,3,4,5]))}),x({id:`m3`,extensions:[`.m3`,`.i3`,`.mg`,`.ig`],aliases:[`Modula-3`,`Modula3`,`modula3`,`m3`],loader:()=>t(()=>import(`./m3-D-oSqn_W.js`),[])}),x({id:`markdown`,extensions:[`.md`,`.markdown`,`.mdown`,`.mkdn`,`.mkd`,`.mdwn`,`.mdtxt`,`.mdtext`],aliases:[`Markdown`,`markdown`],loader:()=>t(()=>import(`./markdown-Cimd5fb3.js`),[])}),x({id:`mdx`,extensions:[`.mdx`],aliases:[`MDX`,`mdx`],loader:()=>t(()=>import(`./mdx-Cs-NVxYA.js`),__vite__mapDeps([15,2,3,4,5]))}),x({id:`mips`,extensions:[`.s`],aliases:[`MIPS`,`MIPS-V`],mimetypes:[`text/x-mips`,`text/mips`,`text/plaintext`],loader:()=>t(()=>import(`./mips-CIPQ_RoX.js`),[])}),x({id:`msdax`,extensions:[`.dax`,`.msdax`],aliases:[`DAX`,`MSDAX`],loader:()=>t(()=>import(`./msdax-DauUninz.js`),[])}),x({id:`mysql`,extensions:[],aliases:[`MySQL`,`mysql`],loader:()=>t(()=>import(`./mysql-SOo6toE5.js`),[])}),x({id:`objective-c`,extensions:[`.m`],aliases:[`Objective-C`],loader:()=>t(()=>import(`./objective-c-FvmIjYaQ.js`),[])}),x({id:`pascal`,extensions:[`.pas`,`.p`,`.pp`],aliases:[`Pascal`,`pas`],mimetypes:[`text/x-pascal-source`,`text/x-pascal`],loader:()=>t(()=>import(`./pascal-DrH0SRf2.js`),[])}),x({id:`pascaligo`,extensions:[`.ligo`],aliases:[`Pascaligo`,`ligo`],loader:()=>t(()=>import(`./pascaligo-D-ptJ9y-.js`),[])}),x({id:`perl`,extensions:[`.pl`,`.pm`],aliases:[`Perl`,`pl`],loader:()=>t(()=>import(`./perl-oz_6vUea.js`),[])}),x({id:`pgsql`,extensions:[],aliases:[`PostgreSQL`,`postgres`,`pg`,`postgre`],loader:()=>t(()=>import(`./pgsql-DTj74zXo.js`),[])}),x({id:`php`,extensions:[`.php`,`.php4`,`.php5`,`.phtml`,`.ctp`],aliases:[`PHP`,`php`],mimetypes:[`application/x-php`],loader:()=>t(()=>import(`./php-nr791fC2.js`),[])}),x({id:`pla`,extensions:[`.pla`],loader:()=>t(()=>import(`./pla-CopQ2nXW.js`),[])}),x({id:`postiats`,extensions:[`.dats`,`.sats`,`.hats`],aliases:[`ATS`,`ATS/Postiats`],loader:()=>t(()=>import(`./postiats-43DmfD33.js`),[])}),x({id:`powerquery`,extensions:[`.pq`,`.pqm`],aliases:[`PQ`,`M`,`Power Query`,`Power Query M`],loader:()=>t(()=>import(`./powerquery-D3hlyOfw.js`),[])}),x({id:`powershell`,extensions:[`.ps1`,`.psm1`,`.psd1`],aliases:[`PowerShell`,`powershell`,`ps`,`ps1`],loader:()=>t(()=>import(`./powershell-DmHpPYUd.js`),[])}),x({id:`proto`,extensions:[`.proto`],aliases:[`protobuf`,`Protocol Buffers`],loader:()=>t(()=>import(`./protobuf-C531GsRP.js`),[])}),x({id:`pug`,extensions:[`.jade`,`.pug`],aliases:[`Pug`,`Jade`,`jade`],loader:()=>t(()=>import(`./pug-Z5eAx3Zn.js`),[])}),x({id:`python`,extensions:[`.py`,`.rpy`,`.pyw`,`.cpy`,`.gyp`,`.gypi`],aliases:[`Python`,`py`],firstLine:`^#!/.*\\bpython[0-9.-]*\\b`,loader:()=>t(()=>import(`./python-LA0u3Sgx.js`),__vite__mapDeps([16,2,3,4,5]))}),x({id:`qsharp`,extensions:[`.qs`],aliases:[`Q#`,`qsharp`],loader:()=>t(()=>import(`./qsharp-DkqhCAOL.js`),[])}),x({id:`r`,extensions:[`.r`,`.rhistory`,`.rmd`,`.rprofile`,`.rt`],aliases:[`R`,`r`],loader:()=>t(()=>import(`./r-BwWrilGY.js`),[])}),x({id:`razor`,extensions:[`.cshtml`],aliases:[`Razor`,`razor`],mimetypes:[`text/x-cshtml`],loader:()=>t(()=>import(`./razor-D6HVEdoN.js`),__vite__mapDeps([17,2,3,4,5]))}),x({id:`redis`,extensions:[`.redis`],aliases:[`redis`],loader:()=>t(()=>import(`./redis-ClamHrr6.js`),[])}),x({id:`redshift`,extensions:[],aliases:[`Redshift`,`redshift`],loader:()=>t(()=>import(`./redshift-DT7zqm-g.js`),[])}),x({id:`restructuredtext`,extensions:[`.rst`],aliases:[`reStructuredText`,`restructuredtext`],loader:()=>t(()=>import(`./restructuredtext-BYgofb2h.js`),[])}),x({id:`ruby`,extensions:[`.rb`,`.rbx`,`.rjs`,`.gemspec`,`.pp`],filenames:[`rakefile`,`Gemfile`],aliases:[`Ruby`,`rb`],loader:()=>t(()=>import(`./ruby-DezsRK8O.js`),[])}),x({id:`rust`,extensions:[`.rs`,`.rlib`],aliases:[`Rust`,`rust`],loader:()=>t(()=>import(`./rust-DdL9SqIa.js`),[])}),x({id:`sb`,extensions:[`.sb`],aliases:[`Small Basic`,`sb`],loader:()=>t(()=>import(`./sb-CcwsVR0C.js`),[])}),x({id:`scala`,extensions:[`.scala`,`.sc`,`.sbt`],aliases:[`Scala`,`scala`,`SBT`,`Sbt`,`sbt`,`Dotty`,`dotty`],mimetypes:[`text/x-scala-source`,`text/x-scala`,`text/x-sbt`,`text/x-dotty`],loader:()=>t(()=>import(`./scala-DHpiXF5c.js`),[])}),x({id:`scheme`,extensions:[`.scm`,`.ss`,`.sch`,`.rkt`],aliases:[`scheme`,`Scheme`],loader:()=>t(()=>import(`./scheme-BeGwcela.js`),[])}),x({id:`scss`,extensions:[`.scss`],aliases:[`Sass`,`sass`,`scss`],mimetypes:[`text/x-scss`,`text/scss`],loader:()=>t(()=>import(`./scss-gp-XZpBa.js`),[])}),x({id:`shell`,extensions:[`.sh`,`.bash`],aliases:[`Shell`,`sh`],loader:()=>t(()=>import(`./shell-CC2rA5mh.js`),[])}),x({id:`sol`,extensions:[`.sol`],aliases:[`sol`,`solidity`,`Solidity`],loader:()=>t(()=>import(`./solidity-BEEn4gHE.js`),[])}),x({id:`aes`,extensions:[`.aes`],aliases:[`aes`,`sophia`,`Sophia`],loader:()=>t(()=>import(`./sophia-CRfGWb83.js`),[])}),x({id:`sparql`,extensions:[`.rq`],aliases:[`sparql`,`SPARQL`],loader:()=>t(()=>import(`./sparql-D_Lu-MrJ.js`),[])}),x({id:`sql`,extensions:[`.sql`],aliases:[`SQL`],loader:()=>t(()=>import(`./sql-NEE52Syq.js`),[])}),x({id:`st`,extensions:[`.st`,`.iecst`,`.iecplc`,`.lc3lib`,`.TcPOU`,`.TcDUT`,`.TcGVL`,`.TcIO`],aliases:[`StructuredText`,`scl`,`stl`],loader:()=>t(()=>import(`./st-DbInun42.js`),[])}),x({id:`swift`,aliases:[`Swift`,`swift`],extensions:[`.swift`],mimetypes:[`text/swift`],loader:()=>t(()=>import(`./swift-Bxkupp3x.js`),[])}),x({id:`systemverilog`,extensions:[`.sv`,`.svh`],aliases:[`SV`,`sv`,`SystemVerilog`,`systemverilog`],loader:()=>t(()=>import(`./systemverilog-Bz4Y3fRF.js`),[])}),x({id:`verilog`,extensions:[`.v`,`.vh`],aliases:[`V`,`v`,`Verilog`,`verilog`],loader:()=>t(()=>import(`./systemverilog-Bz4Y3fRF.js`),[])}),x({id:`tcl`,extensions:[`.tcl`],aliases:[`tcl`,`Tcl`,`tcltk`,`TclTk`,`tcl/tk`,`Tcl/Tk`],loader:()=>t(()=>import(`./tcl-DISqw1ZD.js`),[])}),x({id:`twig`,extensions:[`.twig`],aliases:[`Twig`,`twig`],mimetypes:[`text/x-twig`],loader:()=>t(()=>import(`./twig-De2hgUGE.js`),[])}),x({id:`typescript`,extensions:[`.ts`,`.tsx`,`.cts`,`.mts`],aliases:[`TypeScript`,`ts`,`typescript`],mimetypes:[`text/typescript`],loader:()=>t(()=>import(`./typescript-Bz0Zph5S.js`),__vite__mapDeps([13,2,3,4,5]))}),x({id:`typespec`,extensions:[`.tsp`],aliases:[`TypeSpec`],loader:()=>t(()=>import(`./typespec-B8J7ngcE.js`),[])}),x({id:`vb`,extensions:[`.vb`],aliases:[`Visual Basic`,`vb`],loader:()=>t(()=>import(`./vb-DV3o63ZY.js`),[])}),x({id:`wgsl`,extensions:[`.wgsl`],aliases:[`WebGPU Shading Language`,`WGSL`,`wgsl`],loader:()=>t(()=>import(`./wgsl-DpFanUEy.js`),[])}),x({id:`xml`,extensions:[`.xml`,`.xsd`,`.dtd`,`.ascx`,`.csproj`,`.config`,`.props`,`.targets`,`.wxi`,`.wxl`,`.wxs`,`.xaml`,`.svg`,`.svgz`,`.opf`,`.xslt`,`.xsl`],firstLine:`(\\<\\?xml.*)|(\\t(()=>import(`./xml-BHQnAkaS.js`),__vite__mapDeps([18,2,3,4,5]))}),x({id:`yaml`,extensions:[`.yaml`,`.yml`],aliases:[`YAML`,`yaml`,`YML`,`yml`],mimetypes:[`application/x-yaml`,`text/x-yaml`],loader:()=>t(()=>import(`./yaml-mAa5_3XV.js`),__vite__mapDeps([19,2,3,4,5]))});var Oe=e({MonacoLspClient:()=>rr,WebSocketTransport:()=>or,createTransportToIFrame:()=>lr,createTransportToWorker:()=>cr}),ke=Object.defineProperty,Ae=(e,t,n)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t,n)=>Ae(e,typeof t==`symbol`?t:t+``,n),C,je,w,T,E;function Me(e){return e.method!==void 0}var Ne;(function(e){function t(e){return e}e.create=t})(Ne||={});var D;(function(e){e.parseError=-32700,e.invalidRequest=-32600,e.methodNotFound=-32601,e.invalidParams=-32602,e.internalError=-32603;function t(e){return-32099<=e&&e<=-32e3}e.isServerError=t;function n(e){if(!t(e))throw Error(`Invalid range for a server error.`);return e}e.serverError=n,e.unexpectedServerError=-32e3;function r(e){return!0}e.isApplicationError=r;function i(e){return e}e.applicationError=i,e.genericApplicationError=-320100})(D||={});var Pe=class{constructor(){S(this,`listeners`,new Set),S(this,`event`,e=>(this.listeners.add(e),{dispose:()=>{this.listeners.delete(e)}}))}fire(e){this.listeners.forEach(t=>t(e))}},Fe=class{constructor(e){S(this,`_value`),S(this,`eventEmitter`),this._value=e,this.eventEmitter=new Pe}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.eventEmitter.fire(e))}get onChange(){return this.eventEmitter.event}};function Ie(e,t){let n=setTimeout(t,e);return{dispose:()=>clearTimeout(n)}}function Le(e,t,n){return e instanceof Set?(e.add(t),{dispose:()=>e.delete(t)}):(e.set(t,n),{dispose:()=>e.delete(t)})}var Re=class{constructor(){S(this,`_state`,`none`),S(this,`promise`),S(this,`resolve`,()=>{}),S(this,`reject`,()=>{}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}get state(){return this._state}},ze=(C=class{constructor(){S(this,`_unprocessedMessages`,[]),S(this,`_messageListener`),S(this,`id`,C.id++),S(this,`_state`,new Fe({state:`open`})),S(this,`state`,this._state)}setListener(e){if(this._messageListener=e,e)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){let e=this._unprocessedMessages.shift();this._messageListener(e)}}send(e){return this._sendImpl(e)}_dispatchReceivedMessage(e){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(e):this._unprocessedMessages.push(e)}_onConnectionClosed(){this._state.value={state:`closed`,error:void 0}}log(e){return new Be(this,e??new Ve)}},S(C,`id`,0),C),Be=class{constructor(e,t){S(this,`baseStream`),S(this,`logger`),this.baseStream=e,this.logger=t}get state(){return this.baseStream.state}setListener(e){if(e===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(t=>{this.logger.log(this.baseStream,`incoming`,t),e(t)})}send(e){return this.logger.log(this.baseStream,`outgoing`,e),this.baseStream.send(e)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},Ve=class{log(e,t,n){console.log(`${t===`incoming`?`<-`:`->`} [${e.toString()}] ${JSON.stringify(n)}`)}},He=class e{constructor(e){S(this,`connect`),this.connect=e}mapContext(t){return new e(e=>this.connect(e?Ue(e,t):void 0))}};function Ue(e,t){return{handleNotification:(n,r)=>e.handleNotification(n,t(r)),handleRequest:(n,r,i)=>e.handleRequest(n,r,t(i))}}var We=class e{constructor(e,t,n){S(this,`_stream`),S(this,`_listener`),S(this,`_logger`),S(this,`_unprocessedResponses`,new Map),S(this,`_lastUsedRequestId`,0),this._stream=e,this._listener=t,this._logger=n,this._stream.setListener(e=>{Me(e)?e.id===void 0?this._processNotification(e):this._processRequest(e):this._processResponse(e)})}static createChannel(t,n){let r=!1;return new He(i=>{if(r)throw Error(`A channel to the stream ${t} was already constructed!`);return r=!0,new e(t,i,n)})}get state(){return this._stream.state}async _processNotification(e){if(e.id!==void 0)throw Error();if(!this._listener){this._logger&&this._logger.debug({text:`Notification ignored`,message:e});return}try{await this._listener.handleNotification({method:e.method,params:e.params||null})}catch(t){this._logger&&this._logger.warn({text:`Exception was thrown while handling notification: ${t}`,exception:t,message:e})}}async _processRequest(e){if(e.id===void 0)throw Error();let t;if(this._listener)try{t=await this._listener.handleRequest({method:e.method,params:e.params||null},e.id)}catch(n){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${n}`,message:e,exception:n}),t={error:{code:D.internalError,message:`An unexpected exception was thrown.`,data:void 0}}}else this._logger&&this._logger.debug({text:`Received request even though not listening for requests`,message:e}),t={error:{code:D.methodNotFound,message:`This endpoint does not listen for requests or notifications.`,data:void 0}};let n;n=`result`in t?{jsonrpc:`2.0`,id:e.id,result:t.result}:{jsonrpc:`2.0`,id:e.id,error:t.error},await this._stream.send(n)}_processResponse(e){let t=``+e.id,n=this._unprocessedResponses.get(t);if(!n){this._logger&&this._logger.debug({text:`Got an unexpected response message`,message:e});return}this._unprocessedResponses.delete(t),n(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,n){let r={jsonrpc:`2.0`,id:this._newRequestId(),method:e.method,params:e.params||void 0};return n&&n(r.id),new Promise((e,t)=>{let n=``+r.id;this._unprocessedResponses.set(n,n=>{`result`in n?e({result:n.result}):(n.error||t(Error(`Response had neither 'result' nor 'error' field set.`)),e({error:n.error}))}),this._stream.send(r).then(void 0,e=>{this._unprocessedResponses.delete(n),t(e)})})}sendNotification(e,t){let n={jsonrpc:`2.0`,id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(n)}toString(){return`StreamChannel/`+this._stream.toString()}},O;(function(e){function t(){return{deserializeFromJson:e=>({hasErrors:!1,value:e}),serializeToJson:e=>e}}e.sAny=t;function n(){return{deserializeFromJson:e=>({hasErrors:!1,value:{}}),serializeToJson:e=>({})}}e.sEmptyObject=n;function r(){return{deserializeFromJson:e=>({hasErrors:!1,value:void 0}),serializeToJson:e=>null}}e.sVoidFromNull=r})(O||={});var Ge=Symbol(`OptionalMethodNotFound`),Ke=class{contextualize(e){return new qe(this,e)}},qe=class extends Ke{constructor(e,t){super(),S(this,`underylingTypedChannel`),S(this,`converters`),this.underylingTypedChannel=e,this.converters=t}async request(e,t,n){let r=await this.converters.getSendContext(n);return this.underylingTypedChannel.request(e,t,r)}async notify(e,t,n){let r=await this.converters.getSendContext(n);return this.underylingTypedChannel.notify(e,t,r)}registerNotificationHandler(e,t){return this.underylingTypedChannel.registerNotificationHandler(e,async(e,n)=>await t(e,await this.converters.getNewContext(n)))}registerRequestHandler(e,t){return this.underylingTypedChannel.registerRequestHandler(e,async(e,n,r)=>await t(e,n,await this.converters.getNewContext(r)))}},k=class e extends Ke{constructor(e,t={}){super(),S(this,`channelCtor`),S(this,`_requestSender`),S(this,`_handler`,new Map),S(this,`_unknownNotificationHandler`,new Set),S(this,`_timeout`),S(this,`sendExceptionDetails`,!1),S(this,`_logger`),S(this,`listeningDeferred`,new Re),S(this,`onListening`,this.listeningDeferred.promise),S(this,`_requestDidErrorEventEmitter`,new Pe),S(this,`onRequestDidError`,this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=Ie(1e3,()=>{this._requestSender||console.warn(`"${this.startListen.name}" has not been called within 1 second after construction of this channel. Did you forget to call it?`,this)})}static fromTransport(t,n={}){return new e(We.createChannel(t,n.logger),n)}startListen(){if(this._requestSender)throw Error(`"${this.startListen.name}" can be called only once, but it already has been called.`);this._timeout&&=(this._timeout.dispose(),void 0),this._requestSender=this.channelCtor.connect({handleRequest:(e,t,n)=>this.handleRequest(e,t,n),handleNotification:(e,t)=>this.handleNotification(e,t)}),this.listeningDeferred.resolve()}checkChannel(e){if(!e)throw Error(`"${this.startListen.name}" must be called before any messages can be sent or received.`);return!0}async handleRequest(e,t,n){let r=this._handler.get(e.method);if(!r)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:D.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(r.kind!=`request`){let t=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:t,data:{requestObject:e}}),{error:{code:D.invalidRequest,message:t,data:{method:e.method}}}}let i=r.requestType.paramsSerializer.deserializeFromJson(e.params);if(i.hasErrors){let t=`Got invalid params: ${i.errorMessage}`;return this._logger&&this._logger.debug({text:t,data:{requestObject:e,errorMessage:i.errorMessage}}),{error:{code:D.invalidParams,message:t,data:{errors:i.errorMessage}}}}else{let a=i.value,o;try{let e=await r.handler(a,t,n);if(`error`in e||`errorMessage`in e){let t=e.error?r.requestType.errorSerializer.serializeToJson(e.error):void 0;o={error:{code:e.errorCode||D.genericApplicationError,message:e.errorMessage||`An error was returned`,data:t}}}else o={result:r.requestType.resultSerializer.serializeToJson(e.ok)}}catch(t){t instanceof Ye?o={error:{code:t.code,message:t.message}}:(this._logger&&this._logger.warn({text:`An exception was thrown while handling a request: ${t}.`,exception:t,data:{requestObject:e}}),o={error:{code:D.unexpectedServerError,message:this.sendExceptionDetails?`An exception was thrown while handling a request: ${t}.`:`Server has thrown an unexpected exception`}})}return o}}async handleNotification(e,t){let n=this._handler.get(e.method);if(!n){for(let t of this._unknownNotificationHandler)t(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(n.kind!=`notification`){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}let r=n.notificationType.paramsSerializer.deserializeFromJson(e.params);if(r.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${r}`,data:{requestObject:e,errorMessage:r.errorMessage}});return}let i=r.value;for(let r of n.handlers)try{r(i,t)}catch(t){this._logger&&this._logger.warn({text:`An exception was thrown while handling a notification: ${t}.`,exception:t,data:{requestObject:e}})}}registerUnknownNotificationHandler(e){return Le(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw Error(`Handler with method "${e.method}" already registered.`);return Le(this._handler,e.method,{kind:`request`,requestType:e,handler:t})}registerNotificationHandler(e,t){let n=this._handler.get(e.method);if(!n)n={kind:`notification`,notificationType:e,handlers:new Set},this._handler.set(e.method,n);else{if(n.kind!==`notification`)throw Error(`Method "${e.method}" was already registered as request handler.`);if(n.notificationType!==e)throw Error(`Method "${e.method}" was registered for a different type.`)}return Le(n.handlers,t)}getRegisteredTypes(){let e=[];for(let t of this._handler.values())t.kind===`notification`?e.push(t.notificationType):t.kind===`request`&&e.push(t.requestType);return e}async request(e,t,n){if(!this.checkChannel(this._requestSender))throw Error(`Impossible`);let r=e.paramsSerializer.serializeToJson(t);Je(r);let i=await this._requestSender.sendRequest({method:e.method,params:r},n);if(`error`in i){if(e.isOptional&&i.error.code===D.methodNotFound)return Ge;let t;if(i.error.data!==void 0){let n=e.errorSerializer.deserializeFromJson(i.error.data);if(n.hasErrors)throw Error(n.errorMessage);t=n.value}else t=void 0;let n=new Ye(i.error.message,t,i.error.code);throw this._requestDidErrorEventEmitter.fire({error:n}),n}else{let t=e.resultSerializer.deserializeFromJson(i.result);if(t.hasErrors)throw Error(`Could not deserialize response: `+t.errorMessage+` ${JSON.stringify(i,null,2)}`);return t.value}}async notify(e,t,n){if(!this.checkChannel(this._requestSender))throw Error();let r=e.paramsSerializer.serializeToJson(t);Je(r),this._requestSender.sendNotification({method:e.method,params:r},n)}};function Je(e){if(e!==null&&Array.isArray(e)&&typeof e!=`object`)throw Error(`Invalid value! Only null, array and object is allowed.`)}var Ye=class e extends Error{constructor(t,n,r=D.genericApplicationError){super(t),S(this,`data`),S(this,`code`),this.data=n,this.code=r,Object.setPrototypeOf(this,e.prototype)}},Xe=class e{constructor(e,t,n,r,i=!1){S(this,`method`),S(this,`paramsSerializer`),S(this,`resultSerializer`),S(this,`errorSerializer`),S(this,`isOptional`),S(this,`kind`,`request`),this.method=e,this.paramsSerializer=t,this.resultSerializer=n,this.errorSerializer=r,this.isOptional=i}withMethod(t){return new e(t,this.paramsSerializer,this.resultSerializer,this.errorSerializer)}optional(){return new e(this.method,this.paramsSerializer,this.resultSerializer,this.errorSerializer,!0)}},Ze=class e{constructor(e,t){S(this,`method`),S(this,`paramsSerializer`),S(this,`kind`,`notification`),this.method=e,this.paramsSerializer=t}withMethod(t){return new e(t,this.paramsSerializer)}};function A(e){return new Xe((e||{}).method,O.sAny(),O.sAny(),O.sAny())}function j(e){return new Ze((e||{}).method,O.sAny())}var Qe=(je=Symbol(),w=class{constructor(e){S(this,`error`),S(this,je),this.error=e}},S(w,`factory`,e=>new w(e)),w);function $e(e){let t=et(e.server),n=et(e.client);return new tt(e.tags||[],t,n)}function et(e){let t={};for(let[n,r]of Object.entries(e)){let e=r.method?r.method:n;t[n]=r.withMethod(e)}return t}var tt=class e{constructor(e=[],t,n){S(this,`tags`),S(this,`server`),S(this,`client`),this.tags=e,this.server=t,this.client=n}_onlyDesignTime(){return Error(`This property is not meant to be accessed at runtime`)}get TContractObject(){throw this._onlyDesignTime()}get TClientInterface(){throw this._onlyDesignTime()}get TServerInterface(){throw this._onlyDesignTime()}get TClientHandler(){throw this._onlyDesignTime()}get TServerHandler(){throw this._onlyDesignTime()}get TTags(){throw this._onlyDesignTime()}getInterface(e,t,n,r){let i=this.buildCounterpart(e,n),a=this.registerHandlers(e,t,r,i);return{counterpart:i,dispose:()=>a.dispose()}}buildCounterpart(e,t){let n={};for(let[r,i]of Object.entries(t)){let t;t=i.kind===`request`?i.isOptional?async(t,n)=>{t===void 0&&(t={});try{return await e.request(i,t,n)}catch(e){if(e&&e.code===D.methodNotFound)return Ge;throw e}}:(t,n)=>(t===void 0&&(t={}),e.request(i,t,n)):(t,n)=>(t===void 0&&(t={}),e.notify(i,t,n)),n[r]=t}return n}registerHandlers(e,t,n,r){let i=[];for(let[a,o]of Object.entries(t))if(o.kind===`request`){let t=n[a];if(!t)continue;let s=this.createRequestHandler(r,t);i.push(e.registerRequestHandler(o,s))}else{let t=n[a];t&&i.push(e.registerNotificationHandler(o,(e,n)=>{t(e,{context:n,counterpart:r})}))}return{dispose:()=>i.forEach(e=>e.dispose())}}createRequestHandler(e,t){return async(n,r,i)=>{let a=await t(n,{context:i,counterpart:e,newErr:Qe.factory,requestId:r});return a instanceof Qe?a.error:{ok:a}}}static getServerFromStream(e,t,n,r){let i=k.fromTransport(t,n),{server:a}=e.getServer(i,r);return i.startListen(),{channel:i,server:a}}static registerServerToStream(e,t,n,r){let i=k.fromTransport(t,n),{client:a}=e.registerServer(i,r);return i.startListen(),{channel:i,client:a}}getServer(e,t){let{counterpart:n,dispose:r}=this.getInterface(e,this.client,this.server,t);return{server:n,dispose:r}}registerServer(e,t){let{counterpart:n,dispose:r}=this.getInterface(e,this.server,this.client,t);return{client:n,dispose:r}}withContext(){return new e(this.tags,this.server,this.client)}},M=(function(e){return e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`,e})({}),N=(function(e){return e[e.File=1]=`File`,e[e.Module=2]=`Module`,e[e.Namespace=3]=`Namespace`,e[e.Package=4]=`Package`,e[e.Class=5]=`Class`,e[e.Method=6]=`Method`,e[e.Property=7]=`Property`,e[e.Field=8]=`Field`,e[e.Constructor=9]=`Constructor`,e[e.Enum=10]=`Enum`,e[e.Interface=11]=`Interface`,e[e.Function=12]=`Function`,e[e.Variable=13]=`Variable`,e[e.Constant=14]=`Constant`,e[e.String=15]=`String`,e[e.Number=16]=`Number`,e[e.Boolean=17]=`Boolean`,e[e.Array=18]=`Array`,e[e.Object=19]=`Object`,e[e.Key=20]=`Key`,e[e.Null=21]=`Null`,e[e.EnumMember=22]=`EnumMember`,e[e.Struct=23]=`Struct`,e[e.Event=24]=`Event`,e[e.Operator=25]=`Operator`,e[e.TypeParameter=26]=`TypeParameter`,e})({}),nt=(function(e){return e[e.Deprecated=1]=`Deprecated`,e})({}),rt=(function(e){return e[e.Type=1]=`Type`,e[e.Parameter=2]=`Parameter`,e})({}),it=(function(e){return e[e.None=0]=`None`,e[e.Full=1]=`Full`,e[e.Incremental=2]=`Incremental`,e})({}),P=(function(e){return e[e.Text=1]=`Text`,e[e.Method=2]=`Method`,e[e.Function=3]=`Function`,e[e.Constructor=4]=`Constructor`,e[e.Field=5]=`Field`,e[e.Variable=6]=`Variable`,e[e.Class=7]=`Class`,e[e.Interface=8]=`Interface`,e[e.Module=9]=`Module`,e[e.Property=10]=`Property`,e[e.Unit=11]=`Unit`,e[e.Value=12]=`Value`,e[e.Enum=13]=`Enum`,e[e.Keyword=14]=`Keyword`,e[e.Snippet=15]=`Snippet`,e[e.Color=16]=`Color`,e[e.File=17]=`File`,e[e.Reference=18]=`Reference`,e[e.Folder=19]=`Folder`,e[e.EnumMember=20]=`EnumMember`,e[e.Constant=21]=`Constant`,e[e.Struct=22]=`Struct`,e[e.Event=23]=`Event`,e[e.Operator=24]=`Operator`,e[e.TypeParameter=25]=`TypeParameter`,e})({}),at=(function(e){return e[e.Deprecated=1]=`Deprecated`,e})({}),ot=(function(e){return e[e.PlainText=1]=`PlainText`,e[e.Snippet=2]=`Snippet`,e})({}),F=(function(e){return e[e.Text=1]=`Text`,e[e.Read=2]=`Read`,e[e.Write=3]=`Write`,e})({}),I=(function(e){return e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`,e})({}),L=(function(e){return e.PlainText=`plaintext`,e.Markdown=`markdown`,e})({}),R=(function(e){return e[e.Error=1]=`Error`,e[e.Warning=2]=`Warning`,e[e.Information=3]=`Information`,e[e.Hint=4]=`Hint`,e})({}),st=(function(e){return e[e.Unnecessary=1]=`Unnecessary`,e[e.Deprecated=2]=`Deprecated`,e})({}),z=(function(e){return e[e.Invoked=1]=`Invoked`,e[e.TriggerCharacter=2]=`TriggerCharacter`,e[e.TriggerForIncompleteCompletions=3]=`TriggerForIncompleteCompletions`,e})({}),B=(function(e){return e[e.Invoked=1]=`Invoked`,e[e.TriggerCharacter=2]=`TriggerCharacter`,e[e.ContentChange=3]=`ContentChange`,e})({}),V=(function(e){return e[e.Invoked=1]=`Invoked`,e[e.Automatic=2]=`Automatic`,e})({}),ct=(function(e){return e.Relative=`relative`,e})({}),H=class{constructor(e){this.method=e}},U={textDocumentImplementation:new H(`textDocument/implementation`),textDocumentTypeDefinition:new H(`textDocument/typeDefinition`),textDocumentDocumentColor:new H(`textDocument/documentColor`),textDocumentColorPresentation:new H(`textDocument/colorPresentation`),textDocumentFoldingRange:new H(`textDocument/foldingRange`),textDocumentDeclaration:new H(`textDocument/declaration`),textDocumentSelectionRange:new H(`textDocument/selectionRange`),textDocumentPrepareCallHierarchy:new H(`textDocument/prepareCallHierarchy`),textDocumentSemanticTokensFull:new H(`textDocument/semanticTokens/full`),textDocumentSemanticTokensFullDelta:new H(`textDocument/semanticTokens/full/delta`),textDocumentLinkedEditingRange:new H(`textDocument/linkedEditingRange`),workspaceWillCreateFiles:new H(`workspace/willCreateFiles`),workspaceWillRenameFiles:new H(`workspace/willRenameFiles`),workspaceWillDeleteFiles:new H(`workspace/willDeleteFiles`),textDocumentMoniker:new H(`textDocument/moniker`),textDocumentPrepareTypeHierarchy:new H(`textDocument/prepareTypeHierarchy`),textDocumentInlineValue:new H(`textDocument/inlineValue`),textDocumentInlayHint:new H(`textDocument/inlayHint`),textDocumentDiagnostic:new H(`textDocument/diagnostic`),textDocumentInlineCompletion:new H(`textDocument/inlineCompletion`),textDocumentWillSaveWaitUntil:new H(`textDocument/willSaveWaitUntil`),textDocumentCompletion:new H(`textDocument/completion`),textDocumentHover:new H(`textDocument/hover`),textDocumentSignatureHelp:new H(`textDocument/signatureHelp`),textDocumentDefinition:new H(`textDocument/definition`),textDocumentReferences:new H(`textDocument/references`),textDocumentDocumentHighlight:new H(`textDocument/documentHighlight`),textDocumentDocumentSymbol:new H(`textDocument/documentSymbol`),textDocumentCodeAction:new H(`textDocument/codeAction`),workspaceSymbol:new H(`workspace/symbol`),textDocumentCodeLens:new H(`textDocument/codeLens`),textDocumentDocumentLink:new H(`textDocument/documentLink`),textDocumentFormatting:new H(`textDocument/formatting`),textDocumentRangeFormatting:new H(`textDocument/rangeFormatting`),textDocumentRangesFormatting:new H(`textDocument/rangesFormatting`),textDocumentOnTypeFormatting:new H(`textDocument/onTypeFormatting`),textDocumentRename:new H(`textDocument/rename`),workspaceExecuteCommand:new H(`workspace/executeCommand`),workspaceDidCreateFiles:new H(`workspace/didCreateFiles`),workspaceDidRenameFiles:new H(`workspace/didRenameFiles`),workspaceDidDeleteFiles:new H(`workspace/didDeleteFiles`),workspaceDidChangeConfiguration:new H(`workspace/didChangeConfiguration`),textDocumentDidOpen:new H(`textDocument/didOpen`),textDocumentDidChange:new H(`textDocument/didChange`),textDocumentDidClose:new H(`textDocument/didClose`),textDocumentDidSave:new H(`textDocument/didSave`),textDocumentWillSave:new H(`textDocument/willSave`),workspaceDidChangeWatchedFiles:new H(`workspace/didChangeWatchedFiles`)},W=$e({server:{textDocumentImplementation:A({method:`textDocument/implementation`}),textDocumentTypeDefinition:A({method:`textDocument/typeDefinition`}),textDocumentDocumentColor:A({method:`textDocument/documentColor`}),textDocumentColorPresentation:A({method:`textDocument/colorPresentation`}),textDocumentFoldingRange:A({method:`textDocument/foldingRange`}),textDocumentDeclaration:A({method:`textDocument/declaration`}),textDocumentSelectionRange:A({method:`textDocument/selectionRange`}),textDocumentPrepareCallHierarchy:A({method:`textDocument/prepareCallHierarchy`}),callHierarchyIncomingCalls:A({method:`callHierarchy/incomingCalls`}),callHierarchyOutgoingCalls:A({method:`callHierarchy/outgoingCalls`}),textDocumentSemanticTokensFull:A({method:`textDocument/semanticTokens/full`}),textDocumentSemanticTokensFullDelta:A({method:`textDocument/semanticTokens/full/delta`}),textDocumentSemanticTokensRange:A({method:`textDocument/semanticTokens/range`}),textDocumentLinkedEditingRange:A({method:`textDocument/linkedEditingRange`}),workspaceWillCreateFiles:A({method:`workspace/willCreateFiles`}),workspaceWillRenameFiles:A({method:`workspace/willRenameFiles`}),workspaceWillDeleteFiles:A({method:`workspace/willDeleteFiles`}),textDocumentMoniker:A({method:`textDocument/moniker`}),textDocumentPrepareTypeHierarchy:A({method:`textDocument/prepareTypeHierarchy`}),typeHierarchySupertypes:A({method:`typeHierarchy/supertypes`}),typeHierarchySubtypes:A({method:`typeHierarchy/subtypes`}),textDocumentInlineValue:A({method:`textDocument/inlineValue`}),textDocumentInlayHint:A({method:`textDocument/inlayHint`}),inlayHintResolve:A({method:`inlayHint/resolve`}),textDocumentDiagnostic:A({method:`textDocument/diagnostic`}),workspaceDiagnostic:A({method:`workspace/diagnostic`}),textDocumentInlineCompletion:A({method:`textDocument/inlineCompletion`}),initialize:A({method:`initialize`}),shutdown:A({method:`shutdown`}),textDocumentWillSaveWaitUntil:A({method:`textDocument/willSaveWaitUntil`}),textDocumentCompletion:A({method:`textDocument/completion`}),completionItemResolve:A({method:`completionItem/resolve`}),textDocumentHover:A({method:`textDocument/hover`}),textDocumentSignatureHelp:A({method:`textDocument/signatureHelp`}),textDocumentDefinition:A({method:`textDocument/definition`}),textDocumentReferences:A({method:`textDocument/references`}),textDocumentDocumentHighlight:A({method:`textDocument/documentHighlight`}),textDocumentDocumentSymbol:A({method:`textDocument/documentSymbol`}),textDocumentCodeAction:A({method:`textDocument/codeAction`}),codeActionResolve:A({method:`codeAction/resolve`}),workspaceSymbol:A({method:`workspace/symbol`}),workspaceSymbolResolve:A({method:`workspaceSymbol/resolve`}),textDocumentCodeLens:A({method:`textDocument/codeLens`}),codeLensResolve:A({method:`codeLens/resolve`}),textDocumentDocumentLink:A({method:`textDocument/documentLink`}),documentLinkResolve:A({method:`documentLink/resolve`}),textDocumentFormatting:A({method:`textDocument/formatting`}),textDocumentRangeFormatting:A({method:`textDocument/rangeFormatting`}),textDocumentRangesFormatting:A({method:`textDocument/rangesFormatting`}),textDocumentOnTypeFormatting:A({method:`textDocument/onTypeFormatting`}),textDocumentRename:A({method:`textDocument/rename`}),textDocumentPrepareRename:A({method:`textDocument/prepareRename`}),workspaceExecuteCommand:A({method:`workspace/executeCommand`}),workspaceDidChangeWorkspaceFolders:j({method:`workspace/didChangeWorkspaceFolders`}),windowWorkDoneProgressCancel:j({method:`window/workDoneProgress/cancel`}),workspaceDidCreateFiles:j({method:`workspace/didCreateFiles`}),workspaceDidRenameFiles:j({method:`workspace/didRenameFiles`}),workspaceDidDeleteFiles:j({method:`workspace/didDeleteFiles`}),notebookDocumentDidOpen:j({method:`notebookDocument/didOpen`}),notebookDocumentDidChange:j({method:`notebookDocument/didChange`}),notebookDocumentDidSave:j({method:`notebookDocument/didSave`}),notebookDocumentDidClose:j({method:`notebookDocument/didClose`}),initialized:j({method:`initialized`}),exit:j({method:`exit`}),workspaceDidChangeConfiguration:j({method:`workspace/didChangeConfiguration`}),textDocumentDidOpen:j({method:`textDocument/didOpen`}),textDocumentDidChange:j({method:`textDocument/didChange`}),textDocumentDidClose:j({method:`textDocument/didClose`}),textDocumentDidSave:j({method:`textDocument/didSave`}),textDocumentWillSave:j({method:`textDocument/willSave`}),workspaceDidChangeWatchedFiles:j({method:`workspace/didChangeWatchedFiles`}),setTrace:j({method:`$/setTrace`}),cancelRequest:j({method:`$/cancelRequest`}),progress:j({method:`$/progress`})},client:{workspaceWorkspaceFolders:A({method:`workspace/workspaceFolders`}).optional(),workspaceConfiguration:A({method:`workspace/configuration`}).optional(),workspaceFoldingRangeRefresh:A({method:`workspace/foldingRange/refresh`}).optional(),windowWorkDoneProgressCreate:A({method:`window/workDoneProgress/create`}).optional(),workspaceSemanticTokensRefresh:A({method:`workspace/semanticTokens/refresh`}).optional(),windowShowDocument:A({method:`window/showDocument`}).optional(),workspaceInlineValueRefresh:A({method:`workspace/inlineValue/refresh`}).optional(),workspaceInlayHintRefresh:A({method:`workspace/inlayHint/refresh`}).optional(),workspaceDiagnosticRefresh:A({method:`workspace/diagnostic/refresh`}).optional(),clientRegisterCapability:A({method:`client/registerCapability`}).optional(),clientUnregisterCapability:A({method:`client/unregisterCapability`}).optional(),windowShowMessageRequest:A({method:`window/showMessageRequest`}).optional(),workspaceCodeLensRefresh:A({method:`workspace/codeLens/refresh`}).optional(),workspaceApplyEdit:A({method:`workspace/applyEdit`}).optional(),windowShowMessage:j({method:`window/showMessage`}),windowLogMessage:j({method:`window/logMessage`}),telemetryEvent:j({method:`telemetry/event`}),textDocumentPublishDiagnostics:j({method:`textDocument/publishDiagnostics`}),logTrace:j({method:`$/logTrace`}),cancelRequest:j({method:`$/cancelRequest`}),progress:j({method:`$/progress`})}});function G(e,t){if(e.textModel!==t)throw Error(`Expected text model to be ${t}, but got ${e.textModel}`);return e}var K=(T=class{constructor(){S(this,`_store`,new q)}dispose(){this._store.dispose()}_register(e){if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._store.add(e)}},S(T,`None`,Object.freeze({dispose(){}})),T),q=(E=class{constructor(){S(this,`_toDispose`,new Set),S(this,`_isDisposed`,!1)}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){if(this._toDispose.size!==0)try{for(let e of this._toDispose)e.dispose()}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._isDisposed?E.DISABLE_DISPOSED_WARNING||console.warn(Error(`Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!`).stack):this._toDispose.add(e),e}},S(E,`DISABLE_DISPOSED_WARNING`,!1),E),lt=new Map([[I.Empty,``],[I.QuickFix,`quickfix`],[I.Refactor,`refactor`],[I.RefactorExtract,`refactor.extract`],[I.RefactorInline,`refactor.inline`],[I.RefactorRewrite,`refactor.rewrite`],[I.Source,`source`],[I.SourceOrganizeImports,`source.organizeImports`],[I.SourceFixAll,`source.fixAll`]]);function ut(e){if(e)return lt.get(e)??e}var dt=new Map([[o.CodeActionTriggerType.Invoke,V.Invoked],[o.CodeActionTriggerType.Auto,V.Automatic]]);function ft(e){return dt.get(e)??V.Invoked}var pt=new Map([[P.Text,o.CompletionItemKind.Text],[P.Method,o.CompletionItemKind.Method],[P.Function,o.CompletionItemKind.Function],[P.Constructor,o.CompletionItemKind.Constructor],[P.Field,o.CompletionItemKind.Field],[P.Variable,o.CompletionItemKind.Variable],[P.Class,o.CompletionItemKind.Class],[P.Interface,o.CompletionItemKind.Interface],[P.Module,o.CompletionItemKind.Module],[P.Property,o.CompletionItemKind.Property],[P.Unit,o.CompletionItemKind.Unit],[P.Value,o.CompletionItemKind.Value],[P.Enum,o.CompletionItemKind.Enum],[P.Keyword,o.CompletionItemKind.Keyword],[P.Snippet,o.CompletionItemKind.Snippet],[P.Color,o.CompletionItemKind.Color],[P.File,o.CompletionItemKind.File],[P.Reference,o.CompletionItemKind.Reference],[P.Folder,o.CompletionItemKind.Folder],[P.EnumMember,o.CompletionItemKind.EnumMember],[P.Constant,o.CompletionItemKind.Constant],[P.Struct,o.CompletionItemKind.Struct],[P.Event,o.CompletionItemKind.Event],[P.Operator,o.CompletionItemKind.Operator],[P.TypeParameter,o.CompletionItemKind.TypeParameter]]);function mt(e){return e?pt.get(e)??o.CompletionItemKind.Text:o.CompletionItemKind.Text}var ht=new Map([[at.Deprecated,o.CompletionItemTag.Deprecated]]);function gt(e){return ht.get(e)}var _t=new Map([[o.CompletionTriggerKind.Invoke,z.Invoked],[o.CompletionTriggerKind.TriggerCharacter,z.TriggerCharacter],[o.CompletionTriggerKind.TriggerForIncompleteCompletions,z.TriggerForIncompleteCompletions]]);function vt(e){return _t.get(e)??z.Invoked}var yt=new Map([[ot.Snippet,o.CompletionItemInsertTextRule.InsertAsSnippet]]);function bt(e){if(e)return yt.get(e)}var xt=new Map([[N.File,o.SymbolKind.File],[N.Module,o.SymbolKind.Module],[N.Namespace,o.SymbolKind.Namespace],[N.Package,o.SymbolKind.Package],[N.Class,o.SymbolKind.Class],[N.Method,o.SymbolKind.Method],[N.Property,o.SymbolKind.Property],[N.Field,o.SymbolKind.Field],[N.Constructor,o.SymbolKind.Constructor],[N.Enum,o.SymbolKind.Enum],[N.Interface,o.SymbolKind.Interface],[N.Function,o.SymbolKind.Function],[N.Variable,o.SymbolKind.Variable],[N.Constant,o.SymbolKind.Constant],[N.String,o.SymbolKind.String],[N.Number,o.SymbolKind.Number],[N.Boolean,o.SymbolKind.Boolean],[N.Array,o.SymbolKind.Array],[N.Object,o.SymbolKind.Object],[N.Key,o.SymbolKind.Key],[N.Null,o.SymbolKind.Null],[N.EnumMember,o.SymbolKind.EnumMember],[N.Struct,o.SymbolKind.Struct],[N.Event,o.SymbolKind.Event],[N.Operator,o.SymbolKind.Operator],[N.TypeParameter,o.SymbolKind.TypeParameter]]);function St(e){return xt.get(e)??o.SymbolKind.File}var Ct=new Map([[nt.Deprecated,o.SymbolTag.Deprecated]]);function wt(e){return Ct.get(e)}var Tt=new Map([[F.Text,o.DocumentHighlightKind.Text],[F.Read,o.DocumentHighlightKind.Read],[F.Write,o.DocumentHighlightKind.Write]]);function Et(e){return e?Tt.get(e)??o.DocumentHighlightKind.Text:o.DocumentHighlightKind.Text}var Dt=new Map([[M.Comment,o.FoldingRangeKind.Comment],[M.Imports,o.FoldingRangeKind.Imports],[M.Region,o.FoldingRangeKind.Region]]);function Ot(e){if(e)return Dt.get(e)}var kt=new Map([[n.Error,R.Error],[n.Warning,R.Warning],[n.Info,R.Information],[n.Hint,R.Hint]]);function At(e){return kt.get(e)??R.Error}var jt=new Map([[R.Error,n.Error],[R.Warning,n.Warning],[R.Information,n.Info],[R.Hint,n.Hint]]);function Mt(e){return e?jt.get(e)??n.Error:n.Error}var Nt=new Map([[st.Unnecessary,u.Unnecessary],[st.Deprecated,u.Deprecated]]);function Pt(e){return Nt.get(e)}var Ft=new Map([[o.SignatureHelpTriggerKind.Invoke,B.Invoked],[o.SignatureHelpTriggerKind.TriggerCharacter,B.TriggerCharacter],[o.SignatureHelpTriggerKind.ContentChange,B.ContentChange]]);function It(e){return Ft.get(e)??B.Invoked}function J(e){if(e)return{id:e.command,title:e.title,arguments:e.arguments}}var Lt=new Map([[rt.Type,o.InlayHintKind.Type],[rt.Parameter,o.InlayHintKind.Parameter]]);function Rt(e){return e?Lt.get(e)??o.InlayHintKind.Type:o.InlayHintKind.Type}function Y(e,t){if(`targetUri`in e){let n=t.bridge.translateBackRange({uri:e.targetUri},e.targetRange);return{uri:n.textModel.uri,range:n.range,originSelectionRange:e.originSelectionRange?t.bridge.translateBackRange({uri:e.targetUri},e.originSelectionRange).range:void 0,targetSelectionRange:e.targetSelectionRange?t.bridge.translateBackRange({uri:e.targetUri},e.targetSelectionRange).range:void 0}}else{let n=t.bridge.translateBackRange({uri:e.uri},e.range);return{uri:n.textModel.uri,range:n.range}}}function X(e){return!e||e.length===0?{language:`*`}:e.map(e=>`notebook`in e?typeof e.notebook==`string`?{notebookType:e.notebook,language:e.language}:{notebookType:e.notebook.notebookType,language:e.language,pattern:e.notebook.pattern,scheme:e.notebook.scheme}:{language:e.language,pattern:e.pattern,scheme:e.scheme})}function zt(e,t){if(!t)return!0;let n=e.getLanguageId();if(e.uri.toString(!0),!t||t.length===0)return!0;for(let e of t)if(!(e.language&&e.language!==`*`&&e.language!==n))return!0;return!1}function Z(e){let t={severity:Mt(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,source:e.source,code:typeof e.code==`string`?e.code:e.code?.toString()};return e.tags&&(t.tags=e.tags.map(e=>Pt(e)).filter(e=>e!==void 0)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(e=>({resource:a.parse(e.location.uri),startLineNumber:e.location.range.start.line+1,startColumn:e.location.range.start.character+1,endLineNumber:e.location.range.end.line+1,endColumn:e.location.range.end.character+1,message:e.message}))),t}var Bt=class extends K{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{completion:{dynamicRegistration:!0,contextSupport:!0,completionItemKind:{valueSet:Array.from(pt.keys())},completionItem:{tagSupport:{valueSet:Array.from(ht.keys())},commitCharactersSupport:!0,deprecatedSupport:!0,preselectSupport:!0}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(U.textDocumentCompletion,!0,e=>o.registerCompletionItemProvider(X(e.documentSelector),new Vt(this._connection,e))))}},Vt=class{constructor(e,t){S(this,`resolveCompletionItem`),this._client=e,this._capabilities=t,t.resolveProvider&&(this.resolveCompletionItem=async(e,t)=>(Ut(e,await this._client.server.completionItemResolve(e._lspItem),this._client.bridge,e._translated,e._model),e))}get triggerCharacters(){return this._capabilities.triggerCharacters}async provideCompletionItems(e,t,n,r){let i=this._client.bridge.translate(e,t),a=await this._client.server.textDocumentCompletion({textDocument:i.textDocument,position:i.position,context:n.triggerCharacter?{triggerKind:vt(n.triggerKind),triggerCharacter:n.triggerCharacter}:void 0});return a?{suggestions:(Array.isArray(a)?a:a.items).map(n=>({...Ht(n,this._client.bridge,i,e,t),_lspItem:n,_translated:i,_model:e}))}:{suggestions:[]}}};function Ht(e,t,n,i,a){let o=e.insertText||e.label,s;e.textEdit&&(`range`in e.textEdit?(o=e.textEdit.newText,s=G(t.translateBackRange(n.textDocument,e.textEdit.range),i).range):(o=e.textEdit.newText,s={insert:G(t.translateBackRange(n.textDocument,e.textEdit.insert),i).range,replace:G(t.translateBackRange(n.textDocument,e.textEdit.replace),i).range})),s||=r.fromPositions(a,a);let c={label:e.label,kind:mt(e.kind),insertText:o,sortText:e.sortText,filterText:e.filterText,preselect:e.preselect,commitCharacters:e.commitCharacters,range:s};return Ut(c,e,t,n,i),c}function Ut(e,t,n,r,i){t.detail!==void 0&&(e.detail=t.detail),t.documentation!==void 0&&(e.documentation=Wt(t.documentation)),t.insertTextFormat!==void 0&&(e.insertTextRules=bt(t.insertTextFormat)),t.tags&&t.tags.length>0&&(e.tags=t.tags.map(gt).filter(e=>e!==void 0)),t.additionalTextEdits&&t.additionalTextEdits.length>0&&(e.additionalTextEdits=t.additionalTextEdits.map(e=>({range:G(n.translateBackRange(r.textDocument,e.range),i).range,text:e.newText}))),t.command&&(e.command=J(t.command))}function Wt(e){if(e)return typeof e==`string`?e:{value:e.value,isTrusted:!0}}var Gt=class extends K{constructor(e){super(),this._connection=e,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{hover:{dynamicRegistration:!0,contentFormat:[L.Markdown,L.PlainText]}}})),this._register(this._connection.capabilities.registerCapabilityHandler(U.textDocumentHover,!0,e=>o.registerHoverProvider(X(e.documentSelector),new Kt(this._connection,e))))}},Kt=class{constructor(e,t){this._client=e,this._capabilities=t}async provideHover(e,t,n){let r=this._client.bridge.translate(e,t),i=await this._client.server.textDocumentHover({textDocument:r.textDocument,position:r.position});return!i||!i.contents?null:{contents:qt(i.contents),range:i.range?this._client.bridge.translateBackRange(r.textDocument,i.range).range:void 0}}};function qt(e){return Array.isArray(e)?e.map(e=>Jt(e)):[Jt(e)]}function Jt(e){return typeof e==`string`?{value:e,isTrusted:!0}:`kind`in e?{value:e.value,isTrusted:!0}:{value:`\`\`\`${e.language} ${e.value} diff --git a/apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-DN2h_Wg7.js b/apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-CC5LgS7F.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-DN2h_Wg7.js rename to apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-CC5LgS7F.js index 9a3c2679b..8c74843a2 100644 --- a/apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-DN2h_Wg7.js +++ b/apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-CC5LgS7F.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-Cn6kALDM.js";import{H as i,K as a,U as o,a as s,rt as c,s as l,v as u,w as d,x as f,y as p}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as m}from"./channel-BAi54gt4.js";import{c as h,g}from"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import"./chunk-OSK3NFVY-BT2Y-lqQ.js";import{t as _}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as v}from"./chunk-POPQ4Y6H-BCRCUUP_.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import{r as y,t as b}from"./chunk-TLUHSLCS-DN2eHVWx.js";var x=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],i=[1,7],a=[1,9],o=[1,10],s=[1,11],c=[1,12],l=[1,30],u=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],h=[1,19],g=[1,28],_=[1,29],v=[1,20],y=[1,18],b=[1,21],x=[1,22],S=[2,6],C=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],w=[1,36],T=[1,37],E=[1,38],D=[1,39],O=[1,40],k=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],A=[1,46],j=[1,47],M=[1,57],N=[43,51,53,54,55,74,75],P=[1,70],F=[1,68],I=[1,65],L=[1,69],R=[1,71],z=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],B=[1,78],V=[1,77],H=[1,76],U=[69,70,71,72,73],W=[1,91],G=[6,9,45,50],K=[6,9,12,44,45,50,51,52],q=[1,101],J=[1,100],Y=[1,99],X=[18,61],ee=[1,110],te=[1,109],ne=[20,43,51,53,54,55],Z=[18,61,64,66],Q={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,9:`NEWLINE`,12:`COLON`,14:`STYLE_SEPARATOR`,16:`BLOCK_START`,18:`BLOCK_STOP`,19:`SQS`,20:`SQE`,21:`title`,22:`title_value`,23:`acc_title`,24:`acc_title_value`,25:`acc_descr`,26:`acc_descr_value`,27:`acc_descr_multiline_value`,33:`END`,34:`SUBGRAPH`,37:`direction_tb`,38:`direction_bt`,39:`direction_rl`,40:`direction_lr`,41:`CLASSDEF`,43:`UNICODE_TEXT`,44:`STYLE_TEXT`,45:`COMMA`,46:`CLASS`,47:`STYLE`,50:`SEMI`,51:`NUM`,52:`BRKT`,53:`ENTITY_NAME`,54:`DECIMAL_NUM`,55:`ENTITY_ONE`,61:`ATTRIBUTE_WORD`,62:`?`,64:`,`,65:`ATTRIBUTE_KEY`,66:`COMMENT`,69:`ZERO_OR_ONE`,70:`ZERO_OR_MORE`,71:`ONE_OR_MORE`,72:`ONLY_ONE`,73:`MD_PARENT`,74:`NON_IDENTIFYING`,75:`IDENTIFYING`,76:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:this.$=a[s-1].concat(a[s]);break;case 4:this.$=a[s];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]),this.$=[a[s-4],a[s-2]];break;case 8:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-8],a[s-4]];break;case 9:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]),this.$=[a[s-6],a[s-2]];break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-6],a[s-4]];break;case 11:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]),this.$=[a[s-3]];break;case 12:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]),this.$=[a[s-5]];break;case 13:r.addEntity(a[s-2]),this.$=[a[s-2]];break;case 14:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-4]];break;case 15:r.addEntity(a[s]),this.$=[a[s]];break;case 16:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]),this.$=[a[s-2]];break;case 17:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]),this.$=[a[s-6]];break;case 18:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]),this.$=[a[s-8]];break;case 19:r.addEntity(a[s-5],a[s-3]),this.$=[a[s-5]];break;case 20:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]),this.$=[a[s-7]];break;case 21:r.addEntity(a[s-3],a[s-1]);break;case 22:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 23:case 24:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 27:r.subgraphDepth?this.$=a[s]:(r.setDirection(a[s].value),this.$=[]);break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:a[s-2].id},a[s-1],{text:a[s-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-1],text:a[s-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-4],text:a[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=a[s];break;case 35:this.$=a[s-1]+` `+a[s];break;case 36:this.$={stmt:`dir`,value:`TB`};break;case 37:this.$={stmt:`dir`,value:`BT`};break;case 38:this.$={stmt:`dir`,value:`RL`};break;case 39:this.$={stmt:`dir`,value:`LR`};break;case 40:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 41:case 42:case 63:case 72:this.$=[a[s]];break;case 43:case 44:this.$=a[s-2].concat([a[s]]);break;case 45:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 46:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 47:this.$=[a[s]];break;case 48:a[s-2].push(a[s]),this.$=a[s-2];break;case 50:this.$=a[s-1]+a[s];break;case 58:case 84:case 85:this.$=a[s].replace(/"/g,``);break;case 64:a[s].push(a[s-1]),this.$=a[s];break;case 65:this.$={type:a[s-1],name:a[s]};break;case 66:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 67:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 68:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 69:case 71:case 74:this.$=a[s];break;case 70:this.$=a[s-1]+a[s];break;case 73:a[s-2].push(a[s]),this.$=a[s-2];break;case 75:this.$=a[s].replace(/"/g,``);break;case 76:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,r,{5:3}),{6:[1,4],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},t(n,S,{1:[2,1]}),t(C,[2,3]),t(C,[2,4]),t(C,[2,5]),t(C,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:w,70:T,71:E,72:D,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},t(C,[2,26]),t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,r,{5:44}),t(k,[2,58]),t(k,[2,59]),t(k,[2,60]),t(k,[2,61]),t(k,[2,62]),t(C,[2,36]),t(C,[2,37]),t(C,[2,38]),t(C,[2,39]),{15:45,43:A,44:j},{15:48,43:A,44:j},{15:49,43:A,44:j},{10:50,43:h,51:v,53:y,54:b,55:x},{10:51,43:h,51:v,53:y,54:b,55:x},{15:52,43:A,44:j},{17:53,18:[1,54],56:55,57:56,61:M},{10:58,43:h,51:v,53:y,54:b,55:x},{68:59,74:[1,60],75:[1,61]},t(N,[2,77]),t(N,[2,78]),t(N,[2,79]),t(N,[2,80]),t(N,[2,81]),t(C,[2,23]),t(C,[2,24]),t(C,[2,25]),{6:[1,63],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},{12:P,42:64,44:F,45:I,48:66,49:67,51:L,52:R},t(z,[2,41]),t(z,[2,42]),{15:72,43:A,44:j,45:I},{12:P,42:73,44:F,45:I,48:66,49:67,51:L,52:R},{6:B,9:V,19:[1,75],35:74,50:H},{12:[1,79],14:[1,80]},t(C,[2,16],{67:35,11:81,16:[1,82],45:I,69:w,70:T,71:E,72:D,73:O}),{18:[1,83]},t(C,[2,13]),{17:84,18:[2,63],56:55,57:56,61:M},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:w,70:T,71:E,72:D,73:O},t(U,[2,82]),t(U,[2,83]),t(C,[2,31]),t(C,S),{6:B,9:V,35:90,45:W,50:H},{43:[1,92],44:[1,93]},t(G,[2,47],{49:94,12:P,44:F,51:L,52:R}),t(K,[2,49]),t(K,[2,54]),t(K,[2,55]),t(K,[2,56]),t(K,[2,57]),t(C,[2,45],{45:I}),{6:B,9:V,35:95,45:W,50:H},t(C,[2,32]),{10:97,36:96,43:h,51:v,53:y,54:b,55:x},t(C,[2,51]),t(C,[2,52]),t(C,[2,53]),{13:98,43:q,53:J,76:Y},{15:102,43:A,44:j},{10:103,43:h,51:v,53:y,54:b,55:x},{17:104,18:[1,105],56:55,57:56,61:M},t(C,[2,11]),{18:[2,64]},t(X,[2,65],{59:106,60:107,63:108,65:ee,66:te}),t([18,61,65,66],[2,71]),{61:[2,70]},t(C,[2,21],{14:[1,112],16:[1,111]}),t([43,51,53,54,55],[2,76]),t(C,[2,40]),{12:P,44:F,48:113,49:67,51:L,52:R},t(z,[2,43]),t(z,[2,44]),t(K,[2,50]),t(C,[2,46]),{10:115,20:[1,114],43:h,51:v,53:y,54:b,55:x},t(ne,[2,34]),t(C,[2,7]),t(C,[2,84]),t(C,[2,85]),t(C,[2,86]),{12:[1,116],45:I},{12:[1,118],14:[1,117]},{18:[1,119]},t(C,[2,14]),t(X,[2,66],{60:120,64:[1,121],66:te}),t(X,[2,67]),t(Z,[2,72]),t(X,[2,75]),t(Z,[2,74]),{17:122,18:[1,123],56:55,57:56,61:M},{15:124,43:A,44:j},t(G,[2,48],{49:94,12:P,44:F,51:L,52:R}),{6:B,9:V,35:125,50:H},t(ne,[2,35]),{13:126,43:q,53:J,76:Y},{15:127,43:A,44:j},{13:128,43:q,53:J,76:Y},t(C,[2,12]),t(X,[2,68]),{63:129,65:ee},{18:[1,130]},t(C,[2,19]),t(C,[2,22],{16:[1,131],45:I}),t(C,[2,33]),t(C,[2,10]),{12:[1,132],45:I},t(C,[2,9]),t(Z,[2,73]),t(C,[2,17]),{17:133,18:[1,134],56:55,57:56,61:M},{13:135,43:q,53:J,76:Y},{18:[1,136]},t(C,[2,20]),t(C,[2,8]),t(C,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-Cn6kALDM.js";import{H as i,K as a,U as o,a as s,rt as c,s as l,v as u,w as d,x as f,y as p}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as m}from"./channel-CZ7H-7IH.js";import{c as h,g}from"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import"./chunk-OSK3NFVY-ZXiPE9OQ.js";import{t as _}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as v}from"./chunk-POPQ4Y6H-mwDJO2QS.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import{r as y,t as b}from"./chunk-TLUHSLCS-B1Sp0tTt.js";var x=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],i=[1,7],a=[1,9],o=[1,10],s=[1,11],c=[1,12],l=[1,30],u=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],h=[1,19],g=[1,28],_=[1,29],v=[1,20],y=[1,18],b=[1,21],x=[1,22],S=[2,6],C=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],w=[1,36],T=[1,37],E=[1,38],D=[1,39],O=[1,40],k=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],A=[1,46],j=[1,47],M=[1,57],N=[43,51,53,54,55,74,75],P=[1,70],F=[1,68],I=[1,65],L=[1,69],R=[1,71],z=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],B=[1,78],V=[1,77],H=[1,76],U=[69,70,71,72,73],W=[1,91],G=[6,9,45,50],K=[6,9,12,44,45,50,51,52],q=[1,101],J=[1,100],Y=[1,99],X=[18,61],ee=[1,110],te=[1,109],ne=[20,43,51,53,54,55],Z=[18,61,64,66],Q={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,9:`NEWLINE`,12:`COLON`,14:`STYLE_SEPARATOR`,16:`BLOCK_START`,18:`BLOCK_STOP`,19:`SQS`,20:`SQE`,21:`title`,22:`title_value`,23:`acc_title`,24:`acc_title_value`,25:`acc_descr`,26:`acc_descr_value`,27:`acc_descr_multiline_value`,33:`END`,34:`SUBGRAPH`,37:`direction_tb`,38:`direction_bt`,39:`direction_rl`,40:`direction_lr`,41:`CLASSDEF`,43:`UNICODE_TEXT`,44:`STYLE_TEXT`,45:`COMMA`,46:`CLASS`,47:`STYLE`,50:`SEMI`,51:`NUM`,52:`BRKT`,53:`ENTITY_NAME`,54:`DECIMAL_NUM`,55:`ENTITY_ONE`,61:`ATTRIBUTE_WORD`,62:`?`,64:`,`,65:`ATTRIBUTE_KEY`,66:`COMMENT`,69:`ZERO_OR_ONE`,70:`ZERO_OR_MORE`,71:`ONE_OR_MORE`,72:`ONLY_ONE`,73:`MD_PARENT`,74:`NON_IDENTIFYING`,75:`IDENTIFYING`,76:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:this.$=a[s-1].concat(a[s]);break;case 4:this.$=a[s];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]),this.$=[a[s-4],a[s-2]];break;case 8:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-8],a[s-4]];break;case 9:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]),this.$=[a[s-6],a[s-2]];break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-6],a[s-4]];break;case 11:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]),this.$=[a[s-3]];break;case 12:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]),this.$=[a[s-5]];break;case 13:r.addEntity(a[s-2]),this.$=[a[s-2]];break;case 14:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-4]];break;case 15:r.addEntity(a[s]),this.$=[a[s]];break;case 16:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]),this.$=[a[s-2]];break;case 17:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]),this.$=[a[s-6]];break;case 18:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]),this.$=[a[s-8]];break;case 19:r.addEntity(a[s-5],a[s-3]),this.$=[a[s-5]];break;case 20:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]),this.$=[a[s-7]];break;case 21:r.addEntity(a[s-3],a[s-1]);break;case 22:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 23:case 24:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 27:r.subgraphDepth?this.$=a[s]:(r.setDirection(a[s].value),this.$=[]);break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:a[s-2].id},a[s-1],{text:a[s-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-1],text:a[s-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-4],text:a[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=a[s];break;case 35:this.$=a[s-1]+` `+a[s];break;case 36:this.$={stmt:`dir`,value:`TB`};break;case 37:this.$={stmt:`dir`,value:`BT`};break;case 38:this.$={stmt:`dir`,value:`RL`};break;case 39:this.$={stmt:`dir`,value:`LR`};break;case 40:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 41:case 42:case 63:case 72:this.$=[a[s]];break;case 43:case 44:this.$=a[s-2].concat([a[s]]);break;case 45:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 46:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 47:this.$=[a[s]];break;case 48:a[s-2].push(a[s]),this.$=a[s-2];break;case 50:this.$=a[s-1]+a[s];break;case 58:case 84:case 85:this.$=a[s].replace(/"/g,``);break;case 64:a[s].push(a[s-1]),this.$=a[s];break;case 65:this.$={type:a[s-1],name:a[s]};break;case 66:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 67:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 68:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 69:case 71:case 74:this.$=a[s];break;case 70:this.$=a[s-1]+a[s];break;case 73:a[s-2].push(a[s]),this.$=a[s-2];break;case 75:this.$=a[s].replace(/"/g,``);break;case 76:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,r,{5:3}),{6:[1,4],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},t(n,S,{1:[2,1]}),t(C,[2,3]),t(C,[2,4]),t(C,[2,5]),t(C,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:w,70:T,71:E,72:D,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},t(C,[2,26]),t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,r,{5:44}),t(k,[2,58]),t(k,[2,59]),t(k,[2,60]),t(k,[2,61]),t(k,[2,62]),t(C,[2,36]),t(C,[2,37]),t(C,[2,38]),t(C,[2,39]),{15:45,43:A,44:j},{15:48,43:A,44:j},{15:49,43:A,44:j},{10:50,43:h,51:v,53:y,54:b,55:x},{10:51,43:h,51:v,53:y,54:b,55:x},{15:52,43:A,44:j},{17:53,18:[1,54],56:55,57:56,61:M},{10:58,43:h,51:v,53:y,54:b,55:x},{68:59,74:[1,60],75:[1,61]},t(N,[2,77]),t(N,[2,78]),t(N,[2,79]),t(N,[2,80]),t(N,[2,81]),t(C,[2,23]),t(C,[2,24]),t(C,[2,25]),{6:[1,63],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},{12:P,42:64,44:F,45:I,48:66,49:67,51:L,52:R},t(z,[2,41]),t(z,[2,42]),{15:72,43:A,44:j,45:I},{12:P,42:73,44:F,45:I,48:66,49:67,51:L,52:R},{6:B,9:V,19:[1,75],35:74,50:H},{12:[1,79],14:[1,80]},t(C,[2,16],{67:35,11:81,16:[1,82],45:I,69:w,70:T,71:E,72:D,73:O}),{18:[1,83]},t(C,[2,13]),{17:84,18:[2,63],56:55,57:56,61:M},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:w,70:T,71:E,72:D,73:O},t(U,[2,82]),t(U,[2,83]),t(C,[2,31]),t(C,S),{6:B,9:V,35:90,45:W,50:H},{43:[1,92],44:[1,93]},t(G,[2,47],{49:94,12:P,44:F,51:L,52:R}),t(K,[2,49]),t(K,[2,54]),t(K,[2,55]),t(K,[2,56]),t(K,[2,57]),t(C,[2,45],{45:I}),{6:B,9:V,35:95,45:W,50:H},t(C,[2,32]),{10:97,36:96,43:h,51:v,53:y,54:b,55:x},t(C,[2,51]),t(C,[2,52]),t(C,[2,53]),{13:98,43:q,53:J,76:Y},{15:102,43:A,44:j},{10:103,43:h,51:v,53:y,54:b,55:x},{17:104,18:[1,105],56:55,57:56,61:M},t(C,[2,11]),{18:[2,64]},t(X,[2,65],{59:106,60:107,63:108,65:ee,66:te}),t([18,61,65,66],[2,71]),{61:[2,70]},t(C,[2,21],{14:[1,112],16:[1,111]}),t([43,51,53,54,55],[2,76]),t(C,[2,40]),{12:P,44:F,48:113,49:67,51:L,52:R},t(z,[2,43]),t(z,[2,44]),t(K,[2,50]),t(C,[2,46]),{10:115,20:[1,114],43:h,51:v,53:y,54:b,55:x},t(ne,[2,34]),t(C,[2,7]),t(C,[2,84]),t(C,[2,85]),t(C,[2,86]),{12:[1,116],45:I},{12:[1,118],14:[1,117]},{18:[1,119]},t(C,[2,14]),t(X,[2,66],{60:120,64:[1,121],66:te}),t(X,[2,67]),t(Z,[2,72]),t(X,[2,75]),t(Z,[2,74]),{17:122,18:[1,123],56:55,57:56,61:M},{15:124,43:A,44:j},t(G,[2,48],{49:94,12:P,44:F,51:L,52:R}),{6:B,9:V,35:125,50:H},t(ne,[2,35]),{13:126,43:q,53:J,76:Y},{15:127,43:A,44:j},{13:128,43:q,53:J,76:Y},t(C,[2,12]),t(X,[2,68]),{63:129,65:ee},{18:[1,130]},t(C,[2,19]),t(C,[2,22],{16:[1,131],45:I}),t(C,[2,33]),t(C,[2,10]),{12:[1,132],45:I},t(C,[2,9]),t(Z,[2,73]),t(C,[2,17]),{17:133,18:[1,134],56:55,57:56,61:M},{13:135,43:q,53:J,76:Y},{18:[1,136]},t(C,[2,20]),t(C,[2,8]),t(C,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Q.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-6Oiy-o19.js b/apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-Dn57ja8Z.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-6Oiy-o19.js rename to apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-Dn57ja8Z.js index f60df58b5..4261acf8e 100644 --- a/apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-6Oiy-o19.js +++ b/apps/pythinker-code/dist-web/assets/erDiagram-RLTQ6QDP-Dn57ja8Z.js @@ -1,4 +1,4 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n,t as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as i,K as a,U as o,a as s,it as c,s as l,v as u,w as d,x as f,y as p}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as m}from"./channel-DGuPsbDk.js";import{c as h,g}from"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import"./chunk-GVQU2GXP-aw9OR1ii.js";import{n as _,t as v}from"./mermaidParser.worker-_pLIm6No.js";import{t as y}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as b}from"./chunk-POPQ4Y6H-BiMU0_kH.js";var x=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],i=[1,7],a=[1,9],o=[1,10],s=[1,11],c=[1,12],l=[1,30],u=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],h=[1,19],g=[1,28],_=[1,29],v=[1,20],y=[1,18],b=[1,21],x=[1,22],S=[2,6],C=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],w=[1,36],T=[1,37],E=[1,38],D=[1,39],O=[1,40],k=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],A=[1,46],j=[1,47],M=[1,57],N=[43,51,53,54,55,74,75],P=[1,70],F=[1,68],I=[1,65],L=[1,69],R=[1,71],z=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],B=[1,78],V=[1,77],H=[1,76],U=[69,70,71,72,73],W=[1,91],G=[6,9,45,50],K=[6,9,12,44,45,50,51,52],q=[1,101],J=[1,100],Y=[1,99],X=[18,61],ee=[1,110],te=[1,109],ne=[20,43,51,53,54,55],Z=[18,61,64,66],Q={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,9:`NEWLINE`,12:`COLON`,14:`STYLE_SEPARATOR`,16:`BLOCK_START`,18:`BLOCK_STOP`,19:`SQS`,20:`SQE`,21:`title`,22:`title_value`,23:`acc_title`,24:`acc_title_value`,25:`acc_descr`,26:`acc_descr_value`,27:`acc_descr_multiline_value`,33:`END`,34:`SUBGRAPH`,37:`direction_tb`,38:`direction_bt`,39:`direction_rl`,40:`direction_lr`,41:`CLASSDEF`,43:`UNICODE_TEXT`,44:`STYLE_TEXT`,45:`COMMA`,46:`CLASS`,47:`STYLE`,50:`SEMI`,51:`NUM`,52:`BRKT`,53:`ENTITY_NAME`,54:`DECIMAL_NUM`,55:`ENTITY_ONE`,61:`ATTRIBUTE_WORD`,62:`?`,64:`,`,65:`ATTRIBUTE_KEY`,66:`COMMENT`,69:`ZERO_OR_ONE`,70:`ZERO_OR_MORE`,71:`ONE_OR_MORE`,72:`ONLY_ONE`,73:`MD_PARENT`,74:`NON_IDENTIFYING`,75:`IDENTIFYING`,76:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:this.$=a[s-1].concat(a[s]);break;case 4:this.$=a[s];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]),this.$=[a[s-4],a[s-2]];break;case 8:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-8],a[s-4]];break;case 9:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]),this.$=[a[s-6],a[s-2]];break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-6],a[s-4]];break;case 11:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]),this.$=[a[s-3]];break;case 12:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]),this.$=[a[s-5]];break;case 13:r.addEntity(a[s-2]),this.$=[a[s-2]];break;case 14:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-4]];break;case 15:r.addEntity(a[s]),this.$=[a[s]];break;case 16:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]),this.$=[a[s-2]];break;case 17:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]),this.$=[a[s-6]];break;case 18:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]),this.$=[a[s-8]];break;case 19:r.addEntity(a[s-5],a[s-3]),this.$=[a[s-5]];break;case 20:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]),this.$=[a[s-7]];break;case 21:r.addEntity(a[s-3],a[s-1]);break;case 22:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 23:case 24:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 27:r.subgraphDepth?this.$=a[s]:(r.setDirection(a[s].value),this.$=[]);break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:a[s-2].id},a[s-1],{text:a[s-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-1],text:a[s-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-4],text:a[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=a[s];break;case 35:this.$=a[s-1]+` `+a[s];break;case 36:this.$={stmt:`dir`,value:`TB`};break;case 37:this.$={stmt:`dir`,value:`BT`};break;case 38:this.$={stmt:`dir`,value:`RL`};break;case 39:this.$={stmt:`dir`,value:`LR`};break;case 40:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 41:case 42:case 63:case 72:this.$=[a[s]];break;case 43:case 44:this.$=a[s-2].concat([a[s]]);break;case 45:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 46:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 47:this.$=[a[s]];break;case 48:a[s-2].push(a[s]),this.$=a[s-2];break;case 50:this.$=a[s-1]+a[s];break;case 58:case 84:case 85:this.$=a[s].replace(/"/g,``);break;case 64:a[s].push(a[s-1]),this.$=a[s];break;case 65:this.$={type:a[s-1],name:a[s]};break;case 66:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 67:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 68:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 69:case 71:case 74:this.$=a[s];break;case 70:this.$=a[s-1]+a[s];break;case 73:a[s-2].push(a[s]),this.$=a[s-2];break;case 75:this.$=a[s].replace(/"/g,``);break;case 76:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,r,{5:3}),{6:[1,4],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},e(t,S,{1:[2,1]}),e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:w,70:T,71:E,72:D,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,r,{5:44}),e(k,[2,58]),e(k,[2,59]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),e(C,[2,39]),{15:45,43:A,44:j},{15:48,43:A,44:j},{15:49,43:A,44:j},{10:50,43:h,51:v,53:y,54:b,55:x},{10:51,43:h,51:v,53:y,54:b,55:x},{15:52,43:A,44:j},{17:53,18:[1,54],56:55,57:56,61:M},{10:58,43:h,51:v,53:y,54:b,55:x},{68:59,74:[1,60],75:[1,61]},e(N,[2,77]),e(N,[2,78]),e(N,[2,79]),e(N,[2,80]),e(N,[2,81]),e(C,[2,23]),e(C,[2,24]),e(C,[2,25]),{6:[1,63],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},{12:P,42:64,44:F,45:I,48:66,49:67,51:L,52:R},e(z,[2,41]),e(z,[2,42]),{15:72,43:A,44:j,45:I},{12:P,42:73,44:F,45:I,48:66,49:67,51:L,52:R},{6:B,9:V,19:[1,75],35:74,50:H},{12:[1,79],14:[1,80]},e(C,[2,16],{67:35,11:81,16:[1,82],45:I,69:w,70:T,71:E,72:D,73:O}),{18:[1,83]},e(C,[2,13]),{17:84,18:[2,63],56:55,57:56,61:M},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:w,70:T,71:E,72:D,73:O},e(U,[2,82]),e(U,[2,83]),e(C,[2,31]),e(C,S),{6:B,9:V,35:90,45:W,50:H},{43:[1,92],44:[1,93]},e(G,[2,47],{49:94,12:P,44:F,51:L,52:R}),e(K,[2,49]),e(K,[2,54]),e(K,[2,55]),e(K,[2,56]),e(K,[2,57]),e(C,[2,45],{45:I}),{6:B,9:V,35:95,45:W,50:H},e(C,[2,32]),{10:97,36:96,43:h,51:v,53:y,54:b,55:x},e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),{13:98,43:q,53:J,76:Y},{15:102,43:A,44:j},{10:103,43:h,51:v,53:y,54:b,55:x},{17:104,18:[1,105],56:55,57:56,61:M},e(C,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:ee,66:te}),e([18,61,65,66],[2,71]),{61:[2,70]},e(C,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(C,[2,40]),{12:P,44:F,48:113,49:67,51:L,52:R},e(z,[2,43]),e(z,[2,44]),e(K,[2,50]),e(C,[2,46]),{10:115,20:[1,114],43:h,51:v,53:y,54:b,55:x},e(ne,[2,34]),e(C,[2,7]),e(C,[2,84]),e(C,[2,85]),e(C,[2,86]),{12:[1,116],45:I},{12:[1,118],14:[1,117]},{18:[1,119]},e(C,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:te}),e(X,[2,67]),e(Z,[2,72]),e(X,[2,75]),e(Z,[2,74]),{17:122,18:[1,123],56:55,57:56,61:M},{15:124,43:A,44:j},e(G,[2,48],{49:94,12:P,44:F,51:L,52:R}),{6:B,9:V,35:125,50:H},e(ne,[2,35]),{13:126,43:q,53:J,76:Y},{15:127,43:A,44:j},{13:128,43:q,53:J,76:Y},e(C,[2,12]),e(X,[2,68]),{63:129,65:ee},{18:[1,130]},e(C,[2,19]),e(C,[2,22],{16:[1,131],45:I}),e(C,[2,33]),e(C,[2,10]),{12:[1,132],45:I},e(C,[2,9]),e(Z,[2,73]),e(C,[2,17]),{17:133,18:[1,134],56:55,57:56,61:M},{13:135,43:q,53:J,76:Y},{18:[1,136]},e(C,[2,20]),e(C,[2,8]),e(C,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{m as e,p as t}from"./src-CDd1avoI.js";import{n,t as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as i,K as a,U as o,a as s,it as c,s as l,v as u,w as d,x as f,y as p}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as m}from"./channel-CdQthrj0.js";import{c as h,g}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import"./chunk-GVQU2GXP-CCw5T6ST.js";import{n as _,t as v}from"./mermaidParser.worker-CBWarbNh.js";import{t as y}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as b}from"./chunk-POPQ4Y6H-1k8n9Sa3.js";var x=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],i=[1,7],a=[1,9],o=[1,10],s=[1,11],c=[1,12],l=[1,30],u=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],h=[1,19],g=[1,28],_=[1,29],v=[1,20],y=[1,18],b=[1,21],x=[1,22],S=[2,6],C=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],w=[1,36],T=[1,37],E=[1,38],D=[1,39],O=[1,40],k=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],A=[1,46],j=[1,47],M=[1,57],N=[43,51,53,54,55,74,75],P=[1,70],F=[1,68],I=[1,65],L=[1,69],R=[1,71],z=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],B=[1,78],V=[1,77],H=[1,76],U=[69,70,71,72,73],W=[1,91],G=[6,9,45,50],K=[6,9,12,44,45,50,51,52],q=[1,101],J=[1,100],Y=[1,99],X=[18,61],ee=[1,110],te=[1,109],ne=[20,43,51,53,54,55],Z=[18,61,64,66],Q={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,9:`NEWLINE`,12:`COLON`,14:`STYLE_SEPARATOR`,16:`BLOCK_START`,18:`BLOCK_STOP`,19:`SQS`,20:`SQE`,21:`title`,22:`title_value`,23:`acc_title`,24:`acc_title_value`,25:`acc_descr`,26:`acc_descr_value`,27:`acc_descr_multiline_value`,33:`END`,34:`SUBGRAPH`,37:`direction_tb`,38:`direction_bt`,39:`direction_rl`,40:`direction_lr`,41:`CLASSDEF`,43:`UNICODE_TEXT`,44:`STYLE_TEXT`,45:`COMMA`,46:`CLASS`,47:`STYLE`,50:`SEMI`,51:`NUM`,52:`BRKT`,53:`ENTITY_NAME`,54:`DECIMAL_NUM`,55:`ENTITY_ONE`,61:`ATTRIBUTE_WORD`,62:`?`,64:`,`,65:`ATTRIBUTE_KEY`,66:`COMMENT`,69:`ZERO_OR_ONE`,70:`ZERO_OR_MORE`,71:`ONE_OR_MORE`,72:`ONLY_ONE`,73:`MD_PARENT`,74:`NON_IDENTIFYING`,75:`IDENTIFYING`,76:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:this.$=a[s-1].concat(a[s]);break;case 4:this.$=a[s];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]),this.$=[a[s-4],a[s-2]];break;case 8:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-8],a[s-4]];break;case 9:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]),this.$=[a[s-6],a[s-2]];break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-6],a[s-4]];break;case 11:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]),this.$=[a[s-3]];break;case 12:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]),this.$=[a[s-5]];break;case 13:r.addEntity(a[s-2]),this.$=[a[s-2]];break;case 14:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-4]];break;case 15:r.addEntity(a[s]),this.$=[a[s]];break;case 16:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]),this.$=[a[s-2]];break;case 17:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]),this.$=[a[s-6]];break;case 18:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]),this.$=[a[s-8]];break;case 19:r.addEntity(a[s-5],a[s-3]),this.$=[a[s-5]];break;case 20:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]),this.$=[a[s-7]];break;case 21:r.addEntity(a[s-3],a[s-1]);break;case 22:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 23:case 24:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 27:r.subgraphDepth?this.$=a[s]:(r.setDirection(a[s].value),this.$=[]);break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:a[s-2].id},a[s-1],{text:a[s-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-1],text:a[s-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-4],text:a[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=a[s];break;case 35:this.$=a[s-1]+` `+a[s];break;case 36:this.$={stmt:`dir`,value:`TB`};break;case 37:this.$={stmt:`dir`,value:`BT`};break;case 38:this.$={stmt:`dir`,value:`RL`};break;case 39:this.$={stmt:`dir`,value:`LR`};break;case 40:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 41:case 42:case 63:case 72:this.$=[a[s]];break;case 43:case 44:this.$=a[s-2].concat([a[s]]);break;case 45:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 46:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 47:this.$=[a[s]];break;case 48:a[s-2].push(a[s]),this.$=a[s-2];break;case 50:this.$=a[s-1]+a[s];break;case 58:case 84:case 85:this.$=a[s].replace(/"/g,``);break;case 64:a[s].push(a[s-1]),this.$=a[s];break;case 65:this.$={type:a[s-1],name:a[s]};break;case 66:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 67:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 68:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 69:case 71:case 74:this.$=a[s];break;case 70:this.$=a[s-1]+a[s];break;case 73:a[s-2].push(a[s]),this.$=a[s-2];break;case 75:this.$=a[s].replace(/"/g,``);break;case 76:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,r,{5:3}),{6:[1,4],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},e(t,S,{1:[2,1]}),e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:w,70:T,71:E,72:D,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,r,{5:44}),e(k,[2,58]),e(k,[2,59]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),e(C,[2,39]),{15:45,43:A,44:j},{15:48,43:A,44:j},{15:49,43:A,44:j},{10:50,43:h,51:v,53:y,54:b,55:x},{10:51,43:h,51:v,53:y,54:b,55:x},{15:52,43:A,44:j},{17:53,18:[1,54],56:55,57:56,61:M},{10:58,43:h,51:v,53:y,54:b,55:x},{68:59,74:[1,60],75:[1,61]},e(N,[2,77]),e(N,[2,78]),e(N,[2,79]),e(N,[2,80]),e(N,[2,81]),e(C,[2,23]),e(C,[2,24]),e(C,[2,25]),{6:[1,63],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},{12:P,42:64,44:F,45:I,48:66,49:67,51:L,52:R},e(z,[2,41]),e(z,[2,42]),{15:72,43:A,44:j,45:I},{12:P,42:73,44:F,45:I,48:66,49:67,51:L,52:R},{6:B,9:V,19:[1,75],35:74,50:H},{12:[1,79],14:[1,80]},e(C,[2,16],{67:35,11:81,16:[1,82],45:I,69:w,70:T,71:E,72:D,73:O}),{18:[1,83]},e(C,[2,13]),{17:84,18:[2,63],56:55,57:56,61:M},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:w,70:T,71:E,72:D,73:O},e(U,[2,82]),e(U,[2,83]),e(C,[2,31]),e(C,S),{6:B,9:V,35:90,45:W,50:H},{43:[1,92],44:[1,93]},e(G,[2,47],{49:94,12:P,44:F,51:L,52:R}),e(K,[2,49]),e(K,[2,54]),e(K,[2,55]),e(K,[2,56]),e(K,[2,57]),e(C,[2,45],{45:I}),{6:B,9:V,35:95,45:W,50:H},e(C,[2,32]),{10:97,36:96,43:h,51:v,53:y,54:b,55:x},e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),{13:98,43:q,53:J,76:Y},{15:102,43:A,44:j},{10:103,43:h,51:v,53:y,54:b,55:x},{17:104,18:[1,105],56:55,57:56,61:M},e(C,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:ee,66:te}),e([18,61,65,66],[2,71]),{61:[2,70]},e(C,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(C,[2,40]),{12:P,44:F,48:113,49:67,51:L,52:R},e(z,[2,43]),e(z,[2,44]),e(K,[2,50]),e(C,[2,46]),{10:115,20:[1,114],43:h,51:v,53:y,54:b,55:x},e(ne,[2,34]),e(C,[2,7]),e(C,[2,84]),e(C,[2,85]),e(C,[2,86]),{12:[1,116],45:I},{12:[1,118],14:[1,117]},{18:[1,119]},e(C,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:te}),e(X,[2,67]),e(Z,[2,72]),e(X,[2,75]),e(Z,[2,74]),{17:122,18:[1,123],56:55,57:56,61:M},{15:124,43:A,44:j},e(G,[2,48],{49:94,12:P,44:F,51:L,52:R}),{6:B,9:V,35:125,50:H},e(ne,[2,35]),{13:126,43:q,53:J,76:Y},{15:127,43:A,44:j},{13:128,43:q,53:J,76:Y},e(C,[2,12]),e(X,[2,68]),{63:129,65:ee},{18:[1,130]},e(C,[2,19]),e(C,[2,22],{16:[1,131],45:I}),e(C,[2,33]),e(C,[2,10]),{12:[1,132],45:I},e(C,[2,9]),e(Z,[2,73]),e(C,[2,17]),{17:133,18:[1,134],56:55,57:56,61:M},{13:135,43:q,53:J,76:Y},{18:[1,136]},e(C,[2,20]),e(C,[2,8]),e(C,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Q.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-BbWuZrop.js b/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-BbWuZrop.js deleted file mode 100644 index caebd4f77..000000000 --- a/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-BbWuZrop.js +++ /dev/null @@ -1 +0,0 @@ -import"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import"./chunk-OSK3NFVY-BT2Y-lqQ.js";import"./chunk-F27PBJKO-DeO1S11A.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-BCRCUUP_.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import"./chunk-TLUHSLCS-DN2eHVWx.js";import"./chunk-LNGE3PJU-OosUmKKA.js";import{n as e}from"./chunk-SHT3W25Y-BDvl1UFN.js";export{e as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-CCg3XHcN.js b/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-CCg3XHcN.js new file mode 100644 index 000000000..94fa468f0 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-CCg3XHcN.js @@ -0,0 +1 @@ +import"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import"./chunk-OSK3NFVY-ZXiPE9OQ.js";import"./chunk-F27PBJKO-Duq9tlNm.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-mwDJO2QS.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import"./chunk-TLUHSLCS-B1Sp0tTt.js";import"./chunk-LNGE3PJU-OosUmKKA.js";import{n as e}from"./chunk-SHT3W25Y-DUVFz2b-.js";export{e as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-CGfHnzBR.js b/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-CGfHnzBR.js deleted file mode 100644 index 86c7be635..000000000 --- a/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-CGfHnzBR.js +++ /dev/null @@ -1 +0,0 @@ -import"./src-CDd1avoI.js";import"./chunk-DU6HZSFF-CcF2nKWM.js";import"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import"./chunk-GVQU2GXP-aw9OR1ii.js";import"./mermaidParser.worker-_pLIm6No.js";import"./chunk-F27PBJKO-BiUOMdWi.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-BiMU0_kH.js";import{n as e}from"./chunk-SHT3W25Y-DDD40i3c.js";export{e as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-DGMV3kO5.js b/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-DGMV3kO5.js new file mode 100644 index 000000000..fc9559e2e --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/flowDiagram-HODETNUW-DGMV3kO5.js @@ -0,0 +1 @@ +import"./src-CDd1avoI.js";import"./chunk-DU6HZSFF-CbPIJzjs.js";import"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import"./chunk-GVQU2GXP-CCw5T6ST.js";import"./mermaidParser.worker-CBWarbNh.js";import"./chunk-F27PBJKO-DTzbeXt1.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-1k8n9Sa3.js";import{n as e}from"./chunk-SHT3W25Y-CC_ZJJY0.js";export{e as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/freemarker2-B2uCKQQH.js b/apps/pythinker-code/dist-web/assets/freemarker2-C9IVHbVo.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/freemarker2-B2uCKQQH.js rename to apps/pythinker-code/dist-web/assets/freemarker2-C9IVHbVo.js index 22f1fd20f..f5498c6b1 100644 --- a/apps/pythinker-code/dist-web/assets/freemarker2-B2uCKQQH.js +++ b/apps/pythinker-code/dist-web/assets/freemarker2-C9IVHbVo.js @@ -1,3 +1,3 @@ -import{h as e}from"./editor.api2-BIJacb07.js";var t=[`assign`,`flush`,`ftl`,`return`,`global`,`import`,`include`,`break`,`continue`,`local`,`nested`,`nt`,`setting`,`stop`,`t`,`lt`,`rt`,`fallback`],n=[`attempt`,`autoesc`,`autoEsc`,`compress`,`comment`,`escape`,`noescape`,`function`,`if`,`list`,`items`,`sep`,`macro`,`noparse`,`noParse`,`noautoesc`,`noAutoEsc`,`outputformat`,`switch`,`visit`,`recurse`],r={close:`>`,id:`angle`,open:`<`},i={close:`\\]`,id:`bracket`,open:`\\[`},a={close:`[>\\]]`,id:`auto`,open:`[<\\[]`},o={close:`\\}`,id:`dollar`,open1:`\\$`,open2:`\\{`},s={close:`\\]`,id:`bracket`,open1:`\\[`,open2:`=`};function c(r){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],comments:{blockComment:[`${r.open}--`,`--${r.close}`]},autoCloseBefore:` +import{h as e}from"./editor.api2-DVs509bq.js";var t=[`assign`,`flush`,`ftl`,`return`,`global`,`import`,`include`,`break`,`continue`,`local`,`nested`,`nt`,`setting`,`stop`,`t`,`lt`,`rt`,`fallback`],n=[`attempt`,`autoesc`,`autoEsc`,`compress`,`comment`,`escape`,`noescape`,`function`,`if`,`list`,`items`,`sep`,`macro`,`noparse`,`noParse`,`noautoesc`,`noAutoEsc`,`outputformat`,`switch`,`visit`,`recurse`],r={close:`>`,id:`angle`,open:`<`},i={close:`\\]`,id:`bracket`,open:`\\[`},a={close:`[>\\]]`,id:`auto`,open:`[<\\[]`},o={close:`\\}`,id:`dollar`,open1:`\\$`,open2:`\\{`},s={close:`\\]`,id:`bracket`,open1:`\\[`,open2:`=`};function c(r){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],comments:{blockComment:[`${r.open}--`,`--${r.close}`]},autoCloseBefore:` \r }]),.:;=`,autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`${r.open}#(?:${n.join(`|`)})([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),end:RegExp(`${r.open}/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),afterText:RegExp(`^${r.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${r.close}$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`${r.open}#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/${r.close}]*(?!/)${r.close})[^${r.open}]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function l(){return{brackets:[[`<`,`>`],[`[`,`]`],[`(`,`)`],[`{`,`}`]],autoCloseBefore:` \r }]),.:;=`,autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`]}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`[<\\[]#(?:${n.join(`|`)})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:RegExp(`[<\\[]/#(?:${n.join(`|`)})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:RegExp(`^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$`),action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`[<\\[]#(?!(?:${t.join(`|`)}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:e.IndentAction.Indent}}]}}function u(e,t){let n=`_${e.id}_${t.id}`,r=e=>e.replace(/__id__/g,n),i=e=>{let t=e.source.replace(/__id__/g,n);return new RegExp(t,e.flags)};return{unicode:!0,includeLF:!1,start:r(`default__id__`),ignoreCase:!1,defaultToken:`invalid`,tokenPostfix:`.freemarker2`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`<`,close:`>`,token:`delimiter.angle`}],[r(`open__id__`)]:new RegExp(e.open),[r(`close__id__`)]:new RegExp(e.close),[r(`iOpen1__id__`)]:new RegExp(t.open1),[r(`iOpen2__id__`)]:new RegExp(t.open2),[r(`iClose__id__`)]:new RegExp(t.close),[r(`startTag__id__`)]:i(/(@open__id__)(#)/),[r(`endTag__id__`)]:i(/(@open__id__)(\/#)/),[r(`startOrEndTag__id__`)]:i(/(@open__id__)(\/?#)/),[r(`closeTag1__id__`)]:i(/((?:@blank)*)(@close__id__)/),[r(`closeTag2__id__`)]:i(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:[`false`,`true`,`in`,`as`,`using`],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:[`->`,`->`],delimiters:[`;`,`:`,`,`,`.`],stringOperators:[`lte`,`lt`,`gte`,`gt`],noParseTags:[`noparse`,`noParse`,`comment`],tokenizer:{[r(`default__id__`)]:[{include:r(`@directive_token__id__`)},{include:r(`@interpolation_and_text_token__id__`)}],[r(`fmExpression__id__.directive`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`fmExpression__id__.interpolation`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`inParen__id__.plain`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`inParen__id__.gt`)]:[{include:r(`@blank_and_expression_comment_token__id__`)},{include:r(`@expression_token__id__`)},{include:r(`@greater_operators_token__id__`)}],[r(`noSpaceExpression__id__`)]:[{include:r(`@no_space_expression_end_token__id__`)},{include:r(`@directive_end_token__id__`)},{include:r(`@expression_token__id__`)}],[r(`unifiedCall__id__`)]:[{include:r(`@unified_call_token__id__`)}],[r(`singleString__id__`)]:[{include:r(`@string_single_token__id__`)}],[r(`doubleString__id__`)]:[{include:r(`@string_double_token__id__`)}],[r(`rawSingleString__id__`)]:[{include:r(`@string_single_raw_token__id__`)}],[r(`rawDoubleString__id__`)]:[{include:r(`@string_double_raw_token__id__`)}],[r(`expressionComment__id__`)]:[{include:r(`@expression_comment_token__id__`)}],[r(`noParse__id__`)]:[{include:r(`@no_parse_token__id__`)}],[r(`terseComment__id__`)]:[{include:r(`@terse_comment_token__id__`)}],[r(`directive_token__id__`)]:[[i(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{cases:{"@noParseTags":{token:`tag`,next:r(`@noParse__id__.$3`)},"@default":{token:`tag`}}},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)(@)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`,next:r(`@unifiedCall__id__`)}]],[i(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`}]],[i(/(@open__id__)#--/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:{token:`comment`,next:r(`@terseComment__id__`)}],[i(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),e.id===`auto`?{cases:{"$1==<":{token:`@rematch`,switchTo:`@default_angle_${t.id}`},"$1==[":{token:`@rematch`,switchTo:`@default_bracket_${t.id}`}}}:[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag.invalid`,next:r(`@fmExpression__id__.directive`)}]]],[r(`interpolation_and_text_token__id__`)]:[[i(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:t.id===`bracket`?`@brackets.interpolation`:`delimiter.interpolation`},{token:t.id===`bracket`?`delimiter.interpolation`:`@brackets.interpolation`,next:r(`@fmExpression__id__.interpolation`)}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:`source`}]],[r(`string_single_token__id__`)]:[[/[^'\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/'/,{token:`string`,next:`@pop`}]],[r(`string_double_token__id__`)]:[[/[^"\\]/,{token:`string`}],[/@escapedChar/,{token:`string.escape`}],[/"/,{token:`string`,next:`@pop`}]],[r(`string_single_raw_token__id__`)]:[[/[^']+/,{token:`string.raw`}],[/'/,{token:`string.raw`,next:`@pop`}]],[r(`string_double_raw_token__id__`)]:[[/[^"]+/,{token:`string.raw`}],[/"/,{token:`string.raw`,next:`@pop`}]],[r(`expression_token__id__`)]:[[/(r?)(['"])/,{cases:{"r'":[{token:`keyword`},{token:`string.raw`,next:r(`@rawSingleString__id__`)}],'r"':[{token:`keyword`},{token:`string.raw`,next:r(`@rawDoubleString__id__`)}],"'":[{token:`source`},{token:`string`,next:r(`@singleString__id__`)}],'"':[{token:`source`},{token:`string`,next:r(`@doubleString__id__`)}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:`number`},"@default":{token:`number.float`}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:`delimiter`},{token:``},{token:`identifier`}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:`meta.arrow`},"@delimiters":{token:`delimiter`},"@default":{token:`operators`}}}],[/@id/,{cases:{"@keywords":{token:`keyword.$0`},"@stringOperators":{token:`operators`},"@default":{token:`identifier`}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\]":{cases:{...t.id===`bracket`?{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}}:{},...e.id===`bracket`?{"$S2==directive":{token:`@brackets.directive`,next:`@popall`}}:{},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\(":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"\\)":{cases:{[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}},"\\{":{cases:{"$S2==gt":{token:`@brackets`,next:r(`@inParen__id__.gt`)},"@default":{token:`@brackets`,next:r(`@inParen__id__.plain`)}}},"\\}":{cases:{...t.id===`bracket`?{}:{"$S2==interpolation":{token:`@brackets.interpolation`,next:`@popall`}},[r(`$S1==inParen__id__`)]:{token:`@brackets`,next:`@pop`},"@default":{token:`@brackets`}}}}}],[/\$\{/,{token:`delimiter.invalid`}]],[r(`blank_and_expression_comment_token__id__`)]:[[/(?:@blank)+/,{token:``}],[/[<\[][#!]--/,{token:`comment`,next:r(`@expressionComment__id__`)}]],[r(`directive_end_token__id__`)]:[[/>/,e.id===`bracket`?{token:`operators`}:{token:`@brackets.directive`,next:`@popall`}],[i(/(\/)(@close__id__)/),[{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]]],[r(`greater_operators_token__id__`)]:[[/>/,{token:`operators`}],[/>=/,{token:`operators`}]],[r(`no_space_expression_end_token__id__`)]:[[/(?:@blank)+/,{token:``,switchTo:r(`@fmExpression__id__.directive`)}]],[r(`unified_call_token__id__`)]:[[/(@id)((?:@blank)+)/,[{token:`tag`},{token:``,next:r(`@fmExpression__id__.directive`)}]],[i(/(@id)(\/?)(@close__id__)/),[{token:`tag`},{token:`delimiter.directive`},{token:`@brackets.directive`,next:`@popall`}]],[/./,{token:`@rematch`,next:r(`@noSpaceExpression__id__`)}]],[r(`no_parse_token__id__`)]:[[i(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:`@brackets.directive`},{token:`delimiter.directive`},{token:`tag`},{token:``},{token:`@brackets.directive`,next:`@popall`}],"$S2==comment":[{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`},{token:`comment`}],"@default":[{token:`source`},{token:`source`},{token:`source`},{token:`source`},{token:`source`}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:`comment`},"@default":{token:`source`}}}]],[r(`expression_comment_token__id__`)]:[[/--[>\]]/,{token:`comment`,next:`@pop`}],[/[^\->\]]+|[>\]\-]/,{token:`comment`}]],[r(`terse_comment_token__id__`)]:[[i(/--(?:@close__id__)/),{token:`comment`,next:`@popall`}],[/[^<\[\-]+|[<\[\-]/,{token:`comment`}]]}}}function d(e){let t=u(r,e),n=u(i,e),o=u(a,e);return{...t,...n,...o,unicode:!0,includeLF:!1,start:`default_auto_${e.id}`,ignoreCase:!1,defaultToken:`invalid`,tokenPostfix:`.freemarker2`,brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`},{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`<`,close:`>`,token:`delimiter.angle`}],tokenizer:{...t.tokenizer,...n.tokenizer,...o.tokenizer}}}var f={conf:c(r),language:u(r,o)},p={conf:c(i),language:u(i,o)},m={conf:c(r),language:u(r,s)},h={conf:c(i),language:u(i,s)},g={conf:l(),language:d(o)},_={conf:l(),language:d(s)};export{m as TagAngleInterpolationBracket,f as TagAngleInterpolationDollar,_ as TagAutoInterpolationBracket,g as TagAutoInterpolationDollar,h as TagBracketInterpolationBracket,p as TagBracketInterpolationDollar}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-Czj-N8IR.js b/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DHPrHAMn.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-Czj-N8IR.js rename to apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DHPrHAMn.js index e067e7a18..250bd503a 100644 --- a/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-Czj-N8IR.js +++ b/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DHPrHAMn.js @@ -1,4 +1,4 @@ -import{_ as e,a as t,c as n,d as r,f as i,g as a,i as o,m as s,p as c,s as l,u,v as d}from"./src-CDd1avoI.js";import{n as f}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as p,K as m,U as h,a as g,c as _,s as v,v as y,w as b,x,y as S}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{a as C,i as w,n as T,r as E,t as D}from"./linear-BdNtkfoP.js";import{t as O}from"./init-D6jRqBbL.js";import{t as k}from"./dist-B9JEmVDW.js";import{g as ee}from"./chunk-75Z2AOVW-Djshm1Dl.js";function te(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function ne(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function re(e){return e}var A=1,ie=2,ae=3,oe=4,se=1e-6;function ce(e){return`translate(`+e+`,0)`}function le(e){return`translate(0,`+e+`)`}function ue(e){return t=>+e(t)}function de(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function fe(){return!this.__axis}function pe(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===A||e===oe?-1:1,u=e===oe||e===ie?`x`:`y`,d=e===A||e===ae?ce:le;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):re),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?de:ue)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===A?`0em`:e===ae?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,se).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,se).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===oe||e===ie?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(fe).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===ie?`start`:e===oe?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function me(e){return pe(A,e)}function he(e){return pe(ae,e)}const ge=Math.PI/180,_e=180/Math.PI,ve=.96422,ye=.82521,be=4/29,xe=6/29,Se=3*xe*xe;function Ce(e){if(e instanceof j)return new j(e.l,e.a,e.b,e.opacity);if(e instanceof M)return je(e);e instanceof n||(e=u(e));var t=Oe(e.r),r=Oe(e.g),i=Oe(e.b),a=Te((.2225045*t+.7168786*r+.0606169*i)/1),o,s;return t===r&&r===i?o=s=a:(o=Te((.4360747*t+.3850649*r+.1430804*i)/ve),s=Te((.0139322*t+.0971045*r+.7141733*i)/ye)),new j(116*a-16,500*(o-a),200*(a-s),e.opacity)}function we(e,t,n,r){return arguments.length===1?Ce(e):new j(e,t,n,r??1)}function j(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}r(j,we,i(l,{brighter(e){return new j(this.l+18*(e??1),this.a,this.b,this.opacity)},darker(e){return new j(this.l-18*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=ve*Ee(t),e=1*Ee(e),r=ye*Ee(r),new n(De(3.1338561*t-1.6168667*e-.4906146*r),De(-.9787684*t+1.9161415*e+.033454*r),De(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function Te(e){return e>.008856451679035631?e**(1/3):e/Se+be}function Ee(e){return e>xe?e*e*e:Se*(e-be)}function De(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function Oe(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function ke(e){if(e instanceof M)return new M(e.h,e.c,e.l,e.opacity);if(e instanceof j||(e=Ce(e)),e.a===0&&e.b===0)return new M(NaN,0(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(sN(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Fe.setTime(+t),Ie.setTime(+r),e(Fe),e(Ie),Math.floor(n(Fe,Ie))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}const Le=N(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Le.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?N(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Le),Le.range;const P=1e3,F=P*60,I=F*60,L=I*24,Re=L*7,ze=L*30,Be=L*365,R=N(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*P)},(e,t)=>(t-e)/P,e=>e.getUTCSeconds());R.range;const Ve=N(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*P)},(e,t)=>{e.setTime(+e+t*F)},(e,t)=>(t-e)/F,e=>e.getMinutes());Ve.range;const He=N(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*F)},(e,t)=>(t-e)/F,e=>e.getUTCMinutes());He.range;const Ue=N(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*P-e.getMinutes()*F)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getHours());Ue.range;const We=N(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getUTCHours());We.range;const z=N(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*F)/L,e=>e.getDate()-1);z.range;const Ge=N(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/L,e=>e.getUTCDate()-1);Ge.range;const Ke=N(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/L,e=>Math.floor(e/L));Ke.range;function B(e){return N(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*F)/Re)}const qe=B(0),Je=B(1),Ye=B(2),Xe=B(3),V=B(4),Ze=B(5),Qe=B(6);qe.range,Je.range,Ye.range,Xe.range,V.range,Ze.range,Qe.range;function H(e){return N(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Re)}const $e=H(0),et=H(1),tt=H(2),nt=H(3),U=H(4),rt=H(5),it=H(6);$e.range,et.range,tt.range,nt.range,U.range,rt.range,it.range;const at=N(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());at.range;const ot=N(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ot.range;const W=N(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());W.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:N(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),W.range;const G=N(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());G.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:N(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),G.range;function st(e,t,n,r,i,a){let o=[[R,1,P],[R,5,5*P],[R,15,15*P],[R,30,30*P],[a,1,F],[a,5,5*F],[a,15,15*F],[a,30,30*F],[i,1,I],[i,3,3*I],[i,6,6*I],[i,12,12*I],[r,1,L],[r,2,2*L],[n,1,Re],[t,1,ze],[t,3,3*ze],[e,1,Be]];function s(e,t,n){let r=te).right(o,i);if(a===o.length)return e.every(w(t/Be,n/Be,r));if(a===0)return Le.every(Math.max(w(t,n,r),1));let[s,c]=o[i/o[a-1][2]53)return null;`w`in r||(r.w=1),`Z`in r?(a=pt(mt(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?et.ceil(a):et(a),a=Ge.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=ft(mt(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Je.ceil(a):Je(a),a=z.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?pt(mt(r.y,0,1)).getUTCDay():ft(mt(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,pt(r)):ft(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in gt?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,n,r){return w(e,t,n,r)}function te(e,t,r){return w(e,n,t,r)}function ne(e,t,n){return w(e,r,t,n)}function re(e){return o[e.getDay()]}function A(e){return a[e.getDay()]}function ie(e){return c[e.getMonth()]}function ae(e){return s[e.getMonth()]}function oe(e){return i[+(e.getHours()>=12)]}function se(e){return 1+~~(e.getMonth()/3)}function ce(e){return o[e.getUTCDay()]}function le(e){return a[e.getUTCDay()]}function ue(e){return c[e.getUTCMonth()]}function de(e){return s[e.getUTCMonth()]}function fe(e){return i[+(e.getUTCHours()>=12)]}function pe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var gt={"-":``,_:` `,0:`0`},K=/^\s*\d+/,_t=/^%/,vt=/[\\^$*+?|[\]().{}]/g;function q(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a[e.toLowerCase(),t]))}function St(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ct(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function wt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Tt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Et(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=K.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function kt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function At(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function jt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Mt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Nt(e,t,n){var r=K.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Pt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Ft(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function It(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Lt(e,t,n){var r=K.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=K.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zt(e,t,n){var r=_t.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Bt(e,t,n){var r=K.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Vt(e,t,n){var r=K.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Ht(e,t){return q(e.getDate(),t,2)}function Ut(e,t){return q(e.getHours(),t,2)}function Wt(e,t){return q(e.getHours()%12||12,t,2)}function Gt(e,t){return q(1+z.count(W(e),e),t,3)}function Kt(e,t){return q(e.getMilliseconds(),t,3)}function qt(e,t){return Kt(e,t)+`000`}function Jt(e,t){return q(e.getMonth()+1,t,2)}function Yt(e,t){return q(e.getMinutes(),t,2)}function Xt(e,t){return q(e.getSeconds(),t,2)}function Zt(e){var t=e.getDay();return t===0?7:t}function Qt(e,t){return q(qe.count(W(e)-1,e),t,2)}function $t(e){var t=e.getDay();return t>=4||t===0?V(e):V.ceil(e)}function en(e,t){return e=$t(e),q(V.count(W(e),e)+(W(e).getDay()===4),t,2)}function tn(e){return e.getDay()}function nn(e,t){return q(Je.count(W(e)-1,e),t,2)}function rn(e,t){return q(e.getFullYear()%100,t,2)}function an(e,t){return e=$t(e),q(e.getFullYear()%100,t,2)}function on(e,t){return q(e.getFullYear()%1e4,t,4)}function sn(e,t){var n=e.getDay();return e=n>=4||n===0?V(e):V.ceil(e),q(e.getFullYear()%1e4,t,4)}function cn(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+q(t/60|0,`0`,2)+q(t%60,`0`,2)}function ln(e,t){return q(e.getUTCDate(),t,2)}function un(e,t){return q(e.getUTCHours(),t,2)}function dn(e,t){return q(e.getUTCHours()%12||12,t,2)}function fn(e,t){return q(1+Ge.count(G(e),e),t,3)}function pn(e,t){return q(e.getUTCMilliseconds(),t,3)}function mn(e,t){return pn(e,t)+`000`}function hn(e,t){return q(e.getUTCMonth()+1,t,2)}function gn(e,t){return q(e.getUTCMinutes(),t,2)}function _n(e,t){return q(e.getUTCSeconds(),t,2)}function vn(e){var t=e.getUTCDay();return t===0?7:t}function yn(e,t){return q($e.count(G(e)-1,e),t,2)}function bn(e){var t=e.getUTCDay();return t>=4||t===0?U(e):U.ceil(e)}function xn(e,t){return e=bn(e),q(U.count(G(e),e)+(G(e).getUTCDay()===4),t,2)}function Sn(e){return e.getUTCDay()}function Cn(e,t){return q(et.count(G(e)-1,e),t,2)}function wn(e,t){return q(e.getUTCFullYear()%100,t,2)}function Tn(e,t){return e=bn(e),q(e.getUTCFullYear()%100,t,2)}function En(e,t){return q(e.getUTCFullYear()%1e4,t,4)}function Dn(e,t){var n=e.getUTCDay();return e=n>=4||n===0?U(e):U.ceil(e),q(e.getUTCFullYear()%1e4,t,4)}function On(){return`+0000`}function kn(){return`%`}function An(e){return+e}function jn(e){return Math.floor(e/1e3)}var J,Mn;Nn({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Nn(e){return J=ht(e),Mn=J.format,J.parse,J.utcFormat,J.utcParse,J}function Pn(e){return new Date(e)}function Fn(e){return e instanceof Date?+e:+new Date(+e)}function In(e,t,n,r,i,a,o,s,c,l){var u=T(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))})),zn=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Bn=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Vn=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Hn=k(),Y=d(a(),1),Un=d(Rn(),1),Wn=d(zn(),1),Gn=d(Bn(),1),Kn=d(Vn(),1),qn=(function(){var e=f(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],o=[1,30],s=[1,31],c=[1,32],l=[1,33],u=[1,34],d=[1,9],p=[1,10],m=[1,11],h=[1,12],g=[1,13],_=[1,14],v=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:f(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:f(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:c,19:18,20:l,21:u,22:d,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:c,19:18,20:l,21:u,22:d,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:f(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:f(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,c=0,l=0,u=0,d=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}f(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}f(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,te;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var ne=``;for(O in te=[],o[w])this.terminals_[O]&&O>d&&te.push(`'`+this.terminals_[O]+`'`);ne=h.showPosition?`Parse error on line `+(c+1)+`: +import{_ as e,a as t,c as n,d as r,f as i,g as a,i as o,m as s,p as c,s as l,u,v as d}from"./src-CDd1avoI.js";import{n as f}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as p,K as m,U as h,a as g,c as _,s as v,v as y,w as b,x,y as S}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{a as C,i as w,n as T,r as E,t as D}from"./linear-BdNtkfoP.js";import{t as O}from"./init-D6jRqBbL.js";import{t as k}from"./dist-B9JEmVDW.js";import{g as ee}from"./chunk-75Z2AOVW-3pIWy7Vc.js";function te(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function ne(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function re(e){return e}var A=1,ie=2,ae=3,oe=4,se=1e-6;function ce(e){return`translate(`+e+`,0)`}function le(e){return`translate(0,`+e+`)`}function ue(e){return t=>+e(t)}function de(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function fe(){return!this.__axis}function pe(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===A||e===oe?-1:1,u=e===oe||e===ie?`x`:`y`,d=e===A||e===ae?ce:le;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):re),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?de:ue)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===A?`0em`:e===ae?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,se).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,se).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===oe||e===ie?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(fe).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===ie?`start`:e===oe?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function me(e){return pe(A,e)}function he(e){return pe(ae,e)}const ge=Math.PI/180,_e=180/Math.PI,ve=.96422,ye=.82521,be=4/29,xe=6/29,Se=3*xe*xe;function Ce(e){if(e instanceof j)return new j(e.l,e.a,e.b,e.opacity);if(e instanceof M)return je(e);e instanceof n||(e=u(e));var t=Oe(e.r),r=Oe(e.g),i=Oe(e.b),a=Te((.2225045*t+.7168786*r+.0606169*i)/1),o,s;return t===r&&r===i?o=s=a:(o=Te((.4360747*t+.3850649*r+.1430804*i)/ve),s=Te((.0139322*t+.0971045*r+.7141733*i)/ye)),new j(116*a-16,500*(o-a),200*(a-s),e.opacity)}function we(e,t,n,r){return arguments.length===1?Ce(e):new j(e,t,n,r??1)}function j(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}r(j,we,i(l,{brighter(e){return new j(this.l+18*(e??1),this.a,this.b,this.opacity)},darker(e){return new j(this.l-18*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=ve*Ee(t),e=1*Ee(e),r=ye*Ee(r),new n(De(3.1338561*t-1.6168667*e-.4906146*r),De(-.9787684*t+1.9161415*e+.033454*r),De(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function Te(e){return e>.008856451679035631?e**(1/3):e/Se+be}function Ee(e){return e>xe?e*e*e:Se*(e-be)}function De(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function Oe(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function ke(e){if(e instanceof M)return new M(e.h,e.c,e.l,e.opacity);if(e instanceof j||(e=Ce(e)),e.a===0&&e.b===0)return new M(NaN,0(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(sN(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Fe.setTime(+t),Ie.setTime(+r),e(Fe),e(Ie),Math.floor(n(Fe,Ie))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}const Le=N(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Le.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?N(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Le),Le.range;const P=1e3,F=P*60,I=F*60,L=I*24,Re=L*7,ze=L*30,Be=L*365,R=N(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*P)},(e,t)=>(t-e)/P,e=>e.getUTCSeconds());R.range;const Ve=N(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*P)},(e,t)=>{e.setTime(+e+t*F)},(e,t)=>(t-e)/F,e=>e.getMinutes());Ve.range;const He=N(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*F)},(e,t)=>(t-e)/F,e=>e.getUTCMinutes());He.range;const Ue=N(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*P-e.getMinutes()*F)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getHours());Ue.range;const We=N(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getUTCHours());We.range;const z=N(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*F)/L,e=>e.getDate()-1);z.range;const Ge=N(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/L,e=>e.getUTCDate()-1);Ge.range;const Ke=N(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/L,e=>Math.floor(e/L));Ke.range;function B(e){return N(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*F)/Re)}const qe=B(0),Je=B(1),Ye=B(2),Xe=B(3),V=B(4),Ze=B(5),Qe=B(6);qe.range,Je.range,Ye.range,Xe.range,V.range,Ze.range,Qe.range;function H(e){return N(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Re)}const $e=H(0),et=H(1),tt=H(2),nt=H(3),U=H(4),rt=H(5),it=H(6);$e.range,et.range,tt.range,nt.range,U.range,rt.range,it.range;const at=N(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());at.range;const ot=N(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ot.range;const W=N(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());W.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:N(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),W.range;const G=N(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());G.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:N(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),G.range;function st(e,t,n,r,i,a){let o=[[R,1,P],[R,5,5*P],[R,15,15*P],[R,30,30*P],[a,1,F],[a,5,5*F],[a,15,15*F],[a,30,30*F],[i,1,I],[i,3,3*I],[i,6,6*I],[i,12,12*I],[r,1,L],[r,2,2*L],[n,1,Re],[t,1,ze],[t,3,3*ze],[e,1,Be]];function s(e,t,n){let r=te).right(o,i);if(a===o.length)return e.every(w(t/Be,n/Be,r));if(a===0)return Le.every(Math.max(w(t,n,r),1));let[s,c]=o[i/o[a-1][2]53)return null;`w`in r||(r.w=1),`Z`in r?(a=pt(mt(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?et.ceil(a):et(a),a=Ge.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=ft(mt(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Je.ceil(a):Je(a),a=z.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?pt(mt(r.y,0,1)).getUTCDay():ft(mt(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,pt(r)):ft(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in gt?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,n,r){return w(e,t,n,r)}function te(e,t,r){return w(e,n,t,r)}function ne(e,t,n){return w(e,r,t,n)}function re(e){return o[e.getDay()]}function A(e){return a[e.getDay()]}function ie(e){return c[e.getMonth()]}function ae(e){return s[e.getMonth()]}function oe(e){return i[+(e.getHours()>=12)]}function se(e){return 1+~~(e.getMonth()/3)}function ce(e){return o[e.getUTCDay()]}function le(e){return a[e.getUTCDay()]}function ue(e){return c[e.getUTCMonth()]}function de(e){return s[e.getUTCMonth()]}function fe(e){return i[+(e.getUTCHours()>=12)]}function pe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var gt={"-":``,_:` `,0:`0`},K=/^\s*\d+/,_t=/^%/,vt=/[\\^$*+?|[\]().{}]/g;function q(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a[e.toLowerCase(),t]))}function St(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ct(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function wt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Tt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Et(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=K.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function kt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function At(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function jt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Mt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Nt(e,t,n){var r=K.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Pt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Ft(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function It(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Lt(e,t,n){var r=K.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=K.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zt(e,t,n){var r=_t.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Bt(e,t,n){var r=K.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Vt(e,t,n){var r=K.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Ht(e,t){return q(e.getDate(),t,2)}function Ut(e,t){return q(e.getHours(),t,2)}function Wt(e,t){return q(e.getHours()%12||12,t,2)}function Gt(e,t){return q(1+z.count(W(e),e),t,3)}function Kt(e,t){return q(e.getMilliseconds(),t,3)}function qt(e,t){return Kt(e,t)+`000`}function Jt(e,t){return q(e.getMonth()+1,t,2)}function Yt(e,t){return q(e.getMinutes(),t,2)}function Xt(e,t){return q(e.getSeconds(),t,2)}function Zt(e){var t=e.getDay();return t===0?7:t}function Qt(e,t){return q(qe.count(W(e)-1,e),t,2)}function $t(e){var t=e.getDay();return t>=4||t===0?V(e):V.ceil(e)}function en(e,t){return e=$t(e),q(V.count(W(e),e)+(W(e).getDay()===4),t,2)}function tn(e){return e.getDay()}function nn(e,t){return q(Je.count(W(e)-1,e),t,2)}function rn(e,t){return q(e.getFullYear()%100,t,2)}function an(e,t){return e=$t(e),q(e.getFullYear()%100,t,2)}function on(e,t){return q(e.getFullYear()%1e4,t,4)}function sn(e,t){var n=e.getDay();return e=n>=4||n===0?V(e):V.ceil(e),q(e.getFullYear()%1e4,t,4)}function cn(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+q(t/60|0,`0`,2)+q(t%60,`0`,2)}function ln(e,t){return q(e.getUTCDate(),t,2)}function un(e,t){return q(e.getUTCHours(),t,2)}function dn(e,t){return q(e.getUTCHours()%12||12,t,2)}function fn(e,t){return q(1+Ge.count(G(e),e),t,3)}function pn(e,t){return q(e.getUTCMilliseconds(),t,3)}function mn(e,t){return pn(e,t)+`000`}function hn(e,t){return q(e.getUTCMonth()+1,t,2)}function gn(e,t){return q(e.getUTCMinutes(),t,2)}function _n(e,t){return q(e.getUTCSeconds(),t,2)}function vn(e){var t=e.getUTCDay();return t===0?7:t}function yn(e,t){return q($e.count(G(e)-1,e),t,2)}function bn(e){var t=e.getUTCDay();return t>=4||t===0?U(e):U.ceil(e)}function xn(e,t){return e=bn(e),q(U.count(G(e),e)+(G(e).getUTCDay()===4),t,2)}function Sn(e){return e.getUTCDay()}function Cn(e,t){return q(et.count(G(e)-1,e),t,2)}function wn(e,t){return q(e.getUTCFullYear()%100,t,2)}function Tn(e,t){return e=bn(e),q(e.getUTCFullYear()%100,t,2)}function En(e,t){return q(e.getUTCFullYear()%1e4,t,4)}function Dn(e,t){var n=e.getUTCDay();return e=n>=4||n===0?U(e):U.ceil(e),q(e.getUTCFullYear()%1e4,t,4)}function On(){return`+0000`}function kn(){return`%`}function An(e){return+e}function jn(e){return Math.floor(e/1e3)}var J,Mn;Nn({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Nn(e){return J=ht(e),Mn=J.format,J.parse,J.utcFormat,J.utcParse,J}function Pn(e){return new Date(e)}function Fn(e){return e instanceof Date?+e:+new Date(+e)}function In(e,t,n,r,i,a,o,s,c,l){var u=T(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))})),zn=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Bn=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Vn=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Hn=k(),Y=d(a(),1),Un=d(Rn(),1),Wn=d(zn(),1),Gn=d(Bn(),1),Kn=d(Vn(),1),qn=(function(){var e=f(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],o=[1,30],s=[1,31],c=[1,32],l=[1,33],u=[1,34],d=[1,9],p=[1,10],m=[1,11],h=[1,12],g=[1,13],_=[1,14],v=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:f(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:f(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:c,19:18,20:l,21:u,22:d,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:c,19:18,20:l,21:u,22:d,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:f(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:f(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,c=0,l=0,u=0,d=2,p=1,m=a.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;a.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}f(b,`popStack`);function x(){var e=r.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}f(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,te;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var ne=``;for(O in te=[],o[w])this.terminals_[O]&&O>d&&te.push(`'`+this.terminals_[O]+`'`);ne=h.showPosition?`Parse error on line `+(c+1)+`: `+h.showPosition()+` Expecting `+te.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(c+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(ne,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:te})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(h.yytext),a.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(l=h.yyleng,s=h.yytext,c=h.yylineno,v=h.yylloc,u>0&&u--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,l,c,g.yy,T[1],i,a].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),ee=o[n[n.length-2]][n[n.length-1]],n.push(ee);break;case 3:return!0}}return!0},`parse`)};D.lexer=(function(){return{EOF:1,parseError:f(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:f(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:f(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:f(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:f(function(){return this._more=!0,this},`more`),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:f(function(e){this.unput(this.match.slice(e))},`less`),pastInput:f(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:f(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:f(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-CVJjzfHN.js b/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DaO73M38.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-CVJjzfHN.js rename to apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DaO73M38.js index 0d28219c7..c2be1da28 100644 --- a/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-CVJjzfHN.js +++ b/apps/pythinker-code/dist-web/assets/ganttDiagram-EL5Y4UJY-DaO73M38.js @@ -1,4 +1,4 @@ -import{r as e,t}from"./chunk-QTnfLwEv.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{a as r,c as i,d as a,f as o,g as s,i as c,m as l,p as u,s as d,u as f}from"./src-Cn6kALDM.js";import{H as p,K as m,U as h,a as g,c as _,s as v,v as y,w as b,x,y as S}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{a as C,i as w,n as T,r as E,t as D}from"./linear-BVqbHFqZ.js";import{t as O}from"./init-D6jRqBbL.js";import{t as k}from"./dist-lRkD-JPF.js";import{g as ee}from"./chunk-75Z2AOVW-D2HolPjd.js";function A(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function te(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ne(e){return e}var j=1,re=2,ie=3,ae=4,oe=1e-6;function se(e){return`translate(`+e+`,0)`}function ce(e){return`translate(0,`+e+`)`}function le(e){return t=>+e(t)}function ue(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function de(){return!this.__axis}function fe(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===j||e===ae?-1:1,u=e===ae||e===re?`x`:`y`,d=e===j||e===ie?se:ce;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):ne),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?ue:le)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===j?`0em`:e===ie?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,oe).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,oe).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===ae||e===re?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(de).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===re?`start`:e===ae?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function pe(e){return fe(j,e)}function me(e){return fe(ie,e)}var he=Math.PI/180,ge=180/Math.PI,_e=18,ve=.96422,ye=1,be=.82521,xe=4/29,Se=6/29,Ce=3*Se*Se,we=Se*Se*Se;function Te(e){if(e instanceof M)return new M(e.l,e.a,e.b,e.opacity);if(e instanceof N)return Ne(e);e instanceof i||(e=f(e));var t=Ae(e.r),n=Ae(e.g),r=Ae(e.b),a=De((.2225045*t+.7168786*n+.0606169*r)/ye),o,s;return t===n&&n===r?o=s=a:(o=De((.4360747*t+.3850649*n+.1430804*r)/ve),s=De((.0139322*t+.0971045*n+.7141733*r)/be)),new M(116*a-16,500*(o-a),200*(a-s),e.opacity)}function Ee(e,t,n,r){return arguments.length===1?Te(e):new M(e,t,n,r??1)}function M(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}a(M,Ee,o(d,{brighter(e){return new M(this.l+_e*(e??1),this.a,this.b,this.opacity)},darker(e){return new M(this.l-_e*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=ve*Oe(t),e=ye*Oe(e),n=be*Oe(n),new i(ke(3.1338561*t-1.6168667*e-.4906146*n),ke(-.9787684*t+1.9161415*e+.033454*n),ke(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function De(e){return e>we?e**(1/3):e/Ce+xe}function Oe(e){return e>Se?e*e*e:Ce*(e-xe)}function ke(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function Ae(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function je(e){if(e instanceof N)return new N(e.h,e.c,e.l,e.opacity);if(e instanceof M||(e=Te(e)),e.a===0&&e.b===0)return new N(NaN,0(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(sP(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Le.setTime(+t),Re.setTime(+r),e(Le),e(Re),Math.floor(n(Le,Re))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var ze=P(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ze.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?P(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ze),ze.range;var F=1e3,I=F*60,L=I*60,R=L*24,Be=R*7,Ve=R*30,He=R*365,z=P(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*F)},(e,t)=>(t-e)/F,e=>e.getUTCSeconds());z.range;var Ue=P(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*F)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getMinutes());Ue.range;var We=P(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getUTCMinutes());We.range;var Ge=P(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*F-e.getMinutes()*I)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getHours());Ge.range;var Ke=P(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getUTCHours());Ke.range;var B=P(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/R,e=>e.getDate()-1);B.range;var qe=P(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/R,e=>e.getUTCDate()-1);qe.range;var Je=P(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/R,e=>Math.floor(e/R));Je.range;function V(e){return P(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/Be)}var Ye=V(0),Xe=V(1),Ze=V(2),Qe=V(3),H=V(4),$e=V(5),et=V(6);Ye.range,Xe.range,Ze.range,Qe.range,H.range,$e.range,et.range;function U(e){return P(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Be)}var tt=U(0),nt=U(1),rt=U(2),it=U(3),at=U(4),ot=U(5),st=U(6);tt.range,nt.range,rt.range,it.range,at.range,ot.range,st.range;var ct=P(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ct.range;var lt=P(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());lt.range;var W=P(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());W.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:P(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),W.range;var G=P(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());G.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:P(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),G.range;function ut(e,t,n,r,i,a){let o=[[z,1,F],[z,5,5*F],[z,15,15*F],[z,30,30*F],[a,1,I],[a,5,5*I],[a,15,15*I],[a,30,30*I],[i,1,L],[i,3,3*L],[i,6,6*L],[i,12,12*L],[r,1,R],[r,2,2*R],[n,1,Be],[t,1,Ve],[t,3,3*Ve],[e,1,He]];function s(e,t,n){let r=te).right(o,i);if(a===o.length)return e.every(w(t/He,n/He,r));if(a===0)return ze.every(Math.max(w(t,n,r),1));let[s,c]=o[i/o[a-1][2]53)return null;`w`in r||(r.w=1),`Z`in r?(a=gt(_t(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?nt.ceil(a):nt(a),a=qe.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=ht(_t(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Xe.ceil(a):Xe(a),a=B.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?gt(_t(r.y,0,1)).getUTCDay():ht(_t(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,gt(r)):ht(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in yt?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,n,r){return w(e,t,n,r)}function A(e,t,r){return w(e,n,t,r)}function te(e,t,n){return w(e,r,t,n)}function ne(e){return o[e.getDay()]}function j(e){return a[e.getDay()]}function re(e){return c[e.getMonth()]}function ie(e){return s[e.getMonth()]}function ae(e){return i[+(e.getHours()>=12)]}function oe(e){return 1+~~(e.getMonth()/3)}function se(e){return o[e.getUTCDay()]}function ce(e){return a[e.getUTCDay()]}function le(e){return c[e.getUTCMonth()]}function ue(e){return s[e.getUTCMonth()]}function de(e){return i[+(e.getUTCHours()>=12)]}function fe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var yt={"-":``,_:` `,0:`0`},K=/^\s*\d+/,bt=/^%/,xt=/[\\^$*+?|[\]().{}]/g;function q(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a[e.toLowerCase(),t]))}function Tt(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Et(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function kt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function At(e,t,n){var r=K.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function jt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Mt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Nt(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Pt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ft(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function It(e,t,n){var r=K.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Lt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function zt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Bt(e,t,n){var r=K.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Vt(e,t,n){var r=K.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ht(e,t,n){var r=bt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ut(e,t,n){var r=K.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Wt(e,t,n){var r=K.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Gt(e,t){return q(e.getDate(),t,2)}function Kt(e,t){return q(e.getHours(),t,2)}function qt(e,t){return q(e.getHours()%12||12,t,2)}function Jt(e,t){return q(1+B.count(W(e),e),t,3)}function Yt(e,t){return q(e.getMilliseconds(),t,3)}function Xt(e,t){return Yt(e,t)+`000`}function Zt(e,t){return q(e.getMonth()+1,t,2)}function Qt(e,t){return q(e.getMinutes(),t,2)}function $t(e,t){return q(e.getSeconds(),t,2)}function en(e){var t=e.getDay();return t===0?7:t}function tn(e,t){return q(Ye.count(W(e)-1,e),t,2)}function nn(e){var t=e.getDay();return t>=4||t===0?H(e):H.ceil(e)}function rn(e,t){return e=nn(e),q(H.count(W(e),e)+(W(e).getDay()===4),t,2)}function an(e){return e.getDay()}function on(e,t){return q(Xe.count(W(e)-1,e),t,2)}function sn(e,t){return q(e.getFullYear()%100,t,2)}function cn(e,t){return e=nn(e),q(e.getFullYear()%100,t,2)}function ln(e,t){return q(e.getFullYear()%1e4,t,4)}function un(e,t){var n=e.getDay();return e=n>=4||n===0?H(e):H.ceil(e),q(e.getFullYear()%1e4,t,4)}function dn(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+q(t/60|0,`0`,2)+q(t%60,`0`,2)}function fn(e,t){return q(e.getUTCDate(),t,2)}function pn(e,t){return q(e.getUTCHours(),t,2)}function mn(e,t){return q(e.getUTCHours()%12||12,t,2)}function hn(e,t){return q(1+qe.count(G(e),e),t,3)}function gn(e,t){return q(e.getUTCMilliseconds(),t,3)}function _n(e,t){return gn(e,t)+`000`}function vn(e,t){return q(e.getUTCMonth()+1,t,2)}function yn(e,t){return q(e.getUTCMinutes(),t,2)}function bn(e,t){return q(e.getUTCSeconds(),t,2)}function xn(e){var t=e.getUTCDay();return t===0?7:t}function Sn(e,t){return q(tt.count(G(e)-1,e),t,2)}function Cn(e){var t=e.getUTCDay();return t>=4||t===0?at(e):at.ceil(e)}function wn(e,t){return e=Cn(e),q(at.count(G(e),e)+(G(e).getUTCDay()===4),t,2)}function Tn(e){return e.getUTCDay()}function En(e,t){return q(nt.count(G(e)-1,e),t,2)}function Dn(e,t){return q(e.getUTCFullYear()%100,t,2)}function On(e,t){return e=Cn(e),q(e.getUTCFullYear()%100,t,2)}function kn(e,t){return q(e.getUTCFullYear()%1e4,t,4)}function An(e,t){var n=e.getUTCDay();return e=n>=4||n===0?at(e):at.ceil(e),q(e.getUTCFullYear()%1e4,t,4)}function jn(){return`+0000`}function Mn(){return`%`}function Nn(e){return+e}function Pn(e){return Math.floor(e/1e3)}var Fn,In;Ln({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Ln(e){return Fn=vt(e),In=Fn.format,Fn.parse,Fn.utcFormat,Fn.utcParse,Fn}function Rn(e){return new Date(e)}function zn(e){return e instanceof Date?+e:+new Date(+e)}function Bn(e,t,n,r,i,a,o,s,c,l){var u=T(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))})),Un=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Wn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Gn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Kn=k(),J=e(s(),1),qn=e(Hn(),1),Jn=e(Un(),1),Yn=e(Wn(),1),Xn=e(Gn(),1),Zn=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],i=[1,27],a=[1,28],o=[1,29],s=[1,30],c=[1,31],l=[1,32],u=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],h=[1,12],g=[1,13],_=[1,14],v=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:i,14:a,15:o,16:s,17:c,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:i,14:a,15:o,16:s,17:c,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: +import{r as e,t}from"./chunk-QTnfLwEv.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{a as r,c as i,d as a,f as o,g as s,i as c,m as l,p as u,s as d,u as f}from"./src-Cn6kALDM.js";import{H as p,K as m,U as h,a as g,c as _,s as v,v as y,w as b,x,y as S}from"./chunk-DU6HZSFF-B78kfBb6.js";import{a as C,i as w,n as T,r as E,t as D}from"./linear-BVqbHFqZ.js";import{t as O}from"./init-D6jRqBbL.js";import{t as k}from"./dist-lRkD-JPF.js";import{g as ee}from"./chunk-75Z2AOVW-CAoob5DH.js";function A(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function te(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ne(e){return e}var j=1,re=2,ie=3,ae=4,oe=1e-6;function se(e){return`translate(`+e+`,0)`}function ce(e){return`translate(0,`+e+`)`}function le(e){return t=>+e(t)}function ue(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function de(){return!this.__axis}function fe(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===j||e===ae?-1:1,u=e===ae||e===re?`x`:`y`,d=e===j||e===ie?se:ce;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):ne),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?ue:le)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===j?`0em`:e===ie?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,oe).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,oe).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===ae||e===re?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(de).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===re?`start`:e===ae?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function pe(e){return fe(j,e)}function me(e){return fe(ie,e)}var he=Math.PI/180,ge=180/Math.PI,_e=18,ve=.96422,ye=1,be=.82521,xe=4/29,Se=6/29,Ce=3*Se*Se,we=Se*Se*Se;function Te(e){if(e instanceof M)return new M(e.l,e.a,e.b,e.opacity);if(e instanceof N)return Ne(e);e instanceof i||(e=f(e));var t=Ae(e.r),n=Ae(e.g),r=Ae(e.b),a=De((.2225045*t+.7168786*n+.0606169*r)/ye),o,s;return t===n&&n===r?o=s=a:(o=De((.4360747*t+.3850649*n+.1430804*r)/ve),s=De((.0139322*t+.0971045*n+.7141733*r)/be)),new M(116*a-16,500*(o-a),200*(a-s),e.opacity)}function Ee(e,t,n,r){return arguments.length===1?Te(e):new M(e,t,n,r??1)}function M(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}a(M,Ee,o(d,{brighter(e){return new M(this.l+_e*(e??1),this.a,this.b,this.opacity)},darker(e){return new M(this.l-_e*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=ve*Oe(t),e=ye*Oe(e),n=be*Oe(n),new i(ke(3.1338561*t-1.6168667*e-.4906146*n),ke(-.9787684*t+1.9161415*e+.033454*n),ke(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function De(e){return e>we?e**(1/3):e/Ce+xe}function Oe(e){return e>Se?e*e*e:Ce*(e-xe)}function ke(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function Ae(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function je(e){if(e instanceof N)return new N(e.h,e.c,e.l,e.opacity);if(e instanceof M||(e=Te(e)),e.a===0&&e.b===0)return new N(NaN,0(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(sP(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Le.setTime(+t),Re.setTime(+r),e(Le),e(Re),Math.floor(n(Le,Re))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var ze=P(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ze.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?P(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ze),ze.range;var F=1e3,I=F*60,L=I*60,R=L*24,Be=R*7,Ve=R*30,He=R*365,z=P(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*F)},(e,t)=>(t-e)/F,e=>e.getUTCSeconds());z.range;var Ue=P(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*F)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getMinutes());Ue.range;var We=P(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getUTCMinutes());We.range;var Ge=P(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*F-e.getMinutes()*I)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getHours());Ge.range;var Ke=P(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getUTCHours());Ke.range;var B=P(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/R,e=>e.getDate()-1);B.range;var qe=P(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/R,e=>e.getUTCDate()-1);qe.range;var Je=P(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/R,e=>Math.floor(e/R));Je.range;function V(e){return P(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/Be)}var Ye=V(0),Xe=V(1),Ze=V(2),Qe=V(3),H=V(4),$e=V(5),et=V(6);Ye.range,Xe.range,Ze.range,Qe.range,H.range,$e.range,et.range;function U(e){return P(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Be)}var tt=U(0),nt=U(1),rt=U(2),it=U(3),at=U(4),ot=U(5),st=U(6);tt.range,nt.range,rt.range,it.range,at.range,ot.range,st.range;var ct=P(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ct.range;var lt=P(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());lt.range;var W=P(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());W.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:P(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),W.range;var G=P(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());G.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:P(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),G.range;function ut(e,t,n,r,i,a){let o=[[z,1,F],[z,5,5*F],[z,15,15*F],[z,30,30*F],[a,1,I],[a,5,5*I],[a,15,15*I],[a,30,30*I],[i,1,L],[i,3,3*L],[i,6,6*L],[i,12,12*L],[r,1,R],[r,2,2*R],[n,1,Be],[t,1,Ve],[t,3,3*Ve],[e,1,He]];function s(e,t,n){let r=te).right(o,i);if(a===o.length)return e.every(w(t/He,n/He,r));if(a===0)return ze.every(Math.max(w(t,n,r),1));let[s,c]=o[i/o[a-1][2]53)return null;`w`in r||(r.w=1),`Z`in r?(a=gt(_t(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?nt.ceil(a):nt(a),a=qe.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=ht(_t(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Xe.ceil(a):Xe(a),a=B.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?gt(_t(r.y,0,1)).getUTCDay():ht(_t(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,gt(r)):ht(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in yt?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,n,r){return w(e,t,n,r)}function A(e,t,r){return w(e,n,t,r)}function te(e,t,n){return w(e,r,t,n)}function ne(e){return o[e.getDay()]}function j(e){return a[e.getDay()]}function re(e){return c[e.getMonth()]}function ie(e){return s[e.getMonth()]}function ae(e){return i[+(e.getHours()>=12)]}function oe(e){return 1+~~(e.getMonth()/3)}function se(e){return o[e.getUTCDay()]}function ce(e){return a[e.getUTCDay()]}function le(e){return c[e.getUTCMonth()]}function ue(e){return s[e.getUTCMonth()]}function de(e){return i[+(e.getUTCHours()>=12)]}function fe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var yt={"-":``,_:` `,0:`0`},K=/^\s*\d+/,bt=/^%/,xt=/[\\^$*+?|[\]().{}]/g;function q(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a[e.toLowerCase(),t]))}function Tt(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Et(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function kt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function At(e,t,n){var r=K.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function jt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Mt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Nt(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Pt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ft(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function It(e,t,n){var r=K.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Lt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function zt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Bt(e,t,n){var r=K.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Vt(e,t,n){var r=K.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ht(e,t,n){var r=bt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ut(e,t,n){var r=K.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Wt(e,t,n){var r=K.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Gt(e,t){return q(e.getDate(),t,2)}function Kt(e,t){return q(e.getHours(),t,2)}function qt(e,t){return q(e.getHours()%12||12,t,2)}function Jt(e,t){return q(1+B.count(W(e),e),t,3)}function Yt(e,t){return q(e.getMilliseconds(),t,3)}function Xt(e,t){return Yt(e,t)+`000`}function Zt(e,t){return q(e.getMonth()+1,t,2)}function Qt(e,t){return q(e.getMinutes(),t,2)}function $t(e,t){return q(e.getSeconds(),t,2)}function en(e){var t=e.getDay();return t===0?7:t}function tn(e,t){return q(Ye.count(W(e)-1,e),t,2)}function nn(e){var t=e.getDay();return t>=4||t===0?H(e):H.ceil(e)}function rn(e,t){return e=nn(e),q(H.count(W(e),e)+(W(e).getDay()===4),t,2)}function an(e){return e.getDay()}function on(e,t){return q(Xe.count(W(e)-1,e),t,2)}function sn(e,t){return q(e.getFullYear()%100,t,2)}function cn(e,t){return e=nn(e),q(e.getFullYear()%100,t,2)}function ln(e,t){return q(e.getFullYear()%1e4,t,4)}function un(e,t){var n=e.getDay();return e=n>=4||n===0?H(e):H.ceil(e),q(e.getFullYear()%1e4,t,4)}function dn(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+q(t/60|0,`0`,2)+q(t%60,`0`,2)}function fn(e,t){return q(e.getUTCDate(),t,2)}function pn(e,t){return q(e.getUTCHours(),t,2)}function mn(e,t){return q(e.getUTCHours()%12||12,t,2)}function hn(e,t){return q(1+qe.count(G(e),e),t,3)}function gn(e,t){return q(e.getUTCMilliseconds(),t,3)}function _n(e,t){return gn(e,t)+`000`}function vn(e,t){return q(e.getUTCMonth()+1,t,2)}function yn(e,t){return q(e.getUTCMinutes(),t,2)}function bn(e,t){return q(e.getUTCSeconds(),t,2)}function xn(e){var t=e.getUTCDay();return t===0?7:t}function Sn(e,t){return q(tt.count(G(e)-1,e),t,2)}function Cn(e){var t=e.getUTCDay();return t>=4||t===0?at(e):at.ceil(e)}function wn(e,t){return e=Cn(e),q(at.count(G(e),e)+(G(e).getUTCDay()===4),t,2)}function Tn(e){return e.getUTCDay()}function En(e,t){return q(nt.count(G(e)-1,e),t,2)}function Dn(e,t){return q(e.getUTCFullYear()%100,t,2)}function On(e,t){return e=Cn(e),q(e.getUTCFullYear()%100,t,2)}function kn(e,t){return q(e.getUTCFullYear()%1e4,t,4)}function An(e,t){var n=e.getUTCDay();return e=n>=4||n===0?at(e):at.ceil(e),q(e.getUTCFullYear()%1e4,t,4)}function jn(){return`+0000`}function Mn(){return`%`}function Nn(e){return+e}function Pn(e){return Math.floor(e/1e3)}var Fn,In;Ln({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Ln(e){return Fn=vt(e),In=Fn.format,Fn.parse,Fn.utcFormat,Fn.utcParse,Fn}function Rn(e){return new Date(e)}function zn(e){return e instanceof Date?+e:+new Date(+e)}function Bn(e,t,n,r,i,a,o,s,c,l){var u=T(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))})),Un=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Wn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Gn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Kn=k(),J=e(s(),1),qn=e(Hn(),1),Jn=e(Un(),1),Yn=e(Wn(),1),Xn=e(Gn(),1),Zn=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],i=[1,27],a=[1,28],o=[1,29],s=[1,30],c=[1,31],l=[1,32],u=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],h=[1,12],g=[1,13],_=[1,14],v=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:i,14:a,15:o,16:s,17:c,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:i,14:a,15:o,16:s,17:c,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};D.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-DECM8ouV.js b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-BaBqnEaT.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-DECM8ouV.js rename to apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-BaBqnEaT.js index 71554e4a6..3f2f46741 100644 --- a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-DECM8ouV.js +++ b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-BaBqnEaT.js @@ -1,4 +1,4 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as r,K as i,U as a,Y as o,a as s,b as c,f as l,s as u,v as d,w as f,x as p,y as m}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{g as h,i as g,m as _}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{n as v}from"./mermaid-parser.core-87cmcdBo.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=l.gitGraph,S=n(()=>g({...ee,...c().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return _({length:7})}n(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}n(T,`uniqBy`);var te=n(function(e){C.records.direction=e},`setDirection`),ne=n(function(t){e.debug(`options str`,t),t=t?.trim(),t||=`{}`;try{C.records.options=JSON.parse(t)}catch(t){e.error(`error while parsing gitGraph options`,t.message)}},`setOptions`),re=n(function(){return C.records.options},`getOptions`),ie=n(function(t){let n=t.msg,r=t.id,i=t.type,a=t.tags;e.info(`commit`,n,r,i,a),e.debug(`Entering commit:`,n,r,i,a);let o=S();r=u.sanitizeText(r,o),n=u.sanitizeText(n,o),a=a?.map(e=>u.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:n,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,e.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&e.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),e.debug(`in pushCommit `+s.id)},`commit`),ae=n(function(t){let n=t.name,r=t.order;if(n=u.sanitizeText(n,S()),C.records.branches.has(n))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${n}")`);C.records.branches.set(n,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(n,{name:n,order:r}),E(n),e.debug(`in createBranch`)},`branch`),oe=n(t=>{let n=t.branch,r=t.id,i=t.type,a=t.tags,o=S();n=u.sanitizeText(n,o),r&&=u.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(n),l=s?C.records.commits.get(s):void 0,d=c?C.records.commits.get(c):void 0;if(l&&d&&l.branch===n)throw Error(`Cannot merge branch '${n}' into itself.`);if(C.records.currBranch===n){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`commit`]},e}if(!C.records.branches.has(n)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) does not exist`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch ${n}`]},e}if(d===void 0||!d){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`"commit"`]},e}if(l===d){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${n} ${r} ${i} ${a?.join(` `)}`,token:`merge ${n} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${n} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${n} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),e.debug(C.records.branches),e.debug(`in mergeBranch`)},`merge`),se=n(function(t){let n=t.id,r=t.targetId,i=t.tags,a=t.parent;e.debug(`Entering cherryPick:`,n,r,i);let o=S();if(n=u.sanitizeText(n,o),r=u.sanitizeText(r,o),i=i?.map(e=>u.sanitizeText(e,o)),a=u.sanitizeText(a,o),!n||!C.records.commits.has(n)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(n);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let t=C.records.branches.get(C.records.currBranch);if(t===void 0||!t){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(t);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),e.debug(C.records.branches),e.debug(`in cherryPick`)}},`cherryPick`),E=n(function(e){if(e=u.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}n(D,`upsert`);function O(t){let n=t.reduce((e,t)=>e.seq>t.seq?e:t,t[0]),r=``;t.forEach(function(e){e===n?r+=` *`:r+=` |`});let i=[r,n.id,n.seq];for(let e in C.records.branches)C.records.branches.get(e)===n.id&&i.push(e);if(e.debug(i.join(` `)),n.parents&&n.parents.length==2&&n.parents[0]&&n.parents[1]){let e=C.records.commits.get(n.parents[0]);D(t,n,e),n.parents[1]&&t.push(C.records.commits.get(n.parents[1]))}else if(n.parents.length==0)return;else if(n.parents[0]){let e=C.records.commits.get(n.parents[0]);D(t,n,e)}t=T(t,e=>e.id),O(t)}n(O,`prettyPrintCommitHistory`);var ce=n(function(){e.debug(C.records.commits);let t=k()[0];O([t])},`prettyPrint`),le=n(function(){C.reset(),s()},`clear`),ue=n(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=n(function(){return C.records.branches},`getBranches`),fe=n(function(){return C.records.commits},`getCommits`),k=n(function(){let t=[...C.records.commits.values()];return t.forEach(function(t){e.debug(t.id)}),t.sort((e,t)=>e.seq-t.seq),t},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:n(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:n(function(){return C.records.direction},`getDirection`),getHead:n(function(){return C.records.head},`getHead`),setAccTitle:a,getAccTitle:m,getAccDescription:d,setAccDescription:r,setDiagramTitle:i,getDiagramTitle:f},pe=n((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=n((t,r)=>{let i={Commit:n(e=>r.commit(he(e)),`Commit`),Branch:n(e=>r.branch(ge(e)),`Branch`),Merge:n(e=>r.merge(_e(e)),`Merge`),Checkout:n(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:n(e=>r.cherryPick(ye(e)),`CherryPicking`)}[t.$type];i?i(t):e.error(`Unknown statement type: ${t.$type}`)},`parseStatement`),he=n(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=n(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=n(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=n(e=>e.branch,`parseCheckout`),ye=n(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:n(async t=>{let n=await v(`gitGraph`,t);e.debug(n),pe(n,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=n((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,q=n(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),J=n(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),Y=n(e=>{let t,r,i;return K===`BT`?(r=n((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=n((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let n=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;n!==void 0&&r(n,i)&&(t=e,i=n)}),t},`findClosestParent`),Se=n(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),Ce=n((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Te(n),i=Math.max(r,i)):a.push(n),Ee(n,r)}),r=i,a.forEach(e=>{De(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Se(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),we=n(e=>{let t=Y(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Te=n(e=>we(e)+M,`calculateCommitPosition`),Ee=n((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),De=n((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),Oe=n((e,t,n,r,i,a)=>{let{theme:o}=p(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),ke=n((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Ae=n((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,` +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as r,K as i,U as a,Y as o,a as s,b as c,f as l,s as u,v as d,w as f,x as p,y as m}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{g as h,i as g,m as _}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{n as v}from"./mermaid-parser.core-87cmcdBo.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=l.gitGraph,S=n(()=>g({...ee,...c().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return _({length:7})}n(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}n(T,`uniqBy`);var te=n(function(e){C.records.direction=e},`setDirection`),ne=n(function(t){e.debug(`options str`,t),t=t?.trim(),t||=`{}`;try{C.records.options=JSON.parse(t)}catch(t){e.error(`error while parsing gitGraph options`,t.message)}},`setOptions`),re=n(function(){return C.records.options},`getOptions`),ie=n(function(t){let n=t.msg,r=t.id,i=t.type,a=t.tags;e.info(`commit`,n,r,i,a),e.debug(`Entering commit:`,n,r,i,a);let o=S();r=u.sanitizeText(r,o),n=u.sanitizeText(n,o),a=a?.map(e=>u.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:n,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,e.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&e.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),e.debug(`in pushCommit `+s.id)},`commit`),ae=n(function(t){let n=t.name,r=t.order;if(n=u.sanitizeText(n,S()),C.records.branches.has(n))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${n}")`);C.records.branches.set(n,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(n,{name:n,order:r}),E(n),e.debug(`in createBranch`)},`branch`),oe=n(t=>{let n=t.branch,r=t.id,i=t.type,a=t.tags,o=S();n=u.sanitizeText(n,o),r&&=u.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(n),l=s?C.records.commits.get(s):void 0,d=c?C.records.commits.get(c):void 0;if(l&&d&&l.branch===n)throw Error(`Cannot merge branch '${n}' into itself.`);if(C.records.currBranch===n){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`commit`]},e}if(!C.records.branches.has(n)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) does not exist`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch ${n}`]},e}if(d===void 0||!d){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`"commit"`]},e}if(l===d){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${n} ${r} ${i} ${a?.join(` `)}`,token:`merge ${n} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${n} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${n} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),e.debug(C.records.branches),e.debug(`in mergeBranch`)},`merge`),se=n(function(t){let n=t.id,r=t.targetId,i=t.tags,a=t.parent;e.debug(`Entering cherryPick:`,n,r,i);let o=S();if(n=u.sanitizeText(n,o),r=u.sanitizeText(r,o),i=i?.map(e=>u.sanitizeText(e,o)),a=u.sanitizeText(a,o),!n||!C.records.commits.has(n)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(n);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let t=C.records.branches.get(C.records.currBranch);if(t===void 0||!t){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(t);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),e.debug(C.records.branches),e.debug(`in cherryPick`)}},`cherryPick`),E=n(function(e){if(e=u.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}n(D,`upsert`);function O(t){let n=t.reduce((e,t)=>e.seq>t.seq?e:t,t[0]),r=``;t.forEach(function(e){e===n?r+=` *`:r+=` |`});let i=[r,n.id,n.seq];for(let e in C.records.branches)C.records.branches.get(e)===n.id&&i.push(e);if(e.debug(i.join(` `)),n.parents&&n.parents.length==2&&n.parents[0]&&n.parents[1]){let e=C.records.commits.get(n.parents[0]);D(t,n,e),n.parents[1]&&t.push(C.records.commits.get(n.parents[1]))}else if(n.parents.length==0)return;else if(n.parents[0]){let e=C.records.commits.get(n.parents[0]);D(t,n,e)}t=T(t,e=>e.id),O(t)}n(O,`prettyPrintCommitHistory`);var ce=n(function(){e.debug(C.records.commits);let t=k()[0];O([t])},`prettyPrint`),le=n(function(){C.reset(),s()},`clear`),ue=n(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=n(function(){return C.records.branches},`getBranches`),fe=n(function(){return C.records.commits},`getCommits`),k=n(function(){let t=[...C.records.commits.values()];return t.forEach(function(t){e.debug(t.id)}),t.sort((e,t)=>e.seq-t.seq),t},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:n(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:n(function(){return C.records.direction},`getDirection`),getHead:n(function(){return C.records.head},`getHead`),setAccTitle:a,getAccTitle:m,getAccDescription:d,setAccDescription:r,setDiagramTitle:i,getDiagramTitle:f},pe=n((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=n((t,r)=>{let i={Commit:n(e=>r.commit(he(e)),`Commit`),Branch:n(e=>r.branch(ge(e)),`Branch`),Merge:n(e=>r.merge(_e(e)),`Merge`),Checkout:n(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:n(e=>r.cherryPick(ye(e)),`CherryPicking`)}[t.$type];i?i(t):e.error(`Unknown statement type: ${t.$type}`)},`parseStatement`),he=n(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=n(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=n(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=n(e=>e.branch,`parseCheckout`),ye=n(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:n(async t=>{let n=await v(`gitGraph`,t);e.debug(n),pe(n,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=n((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,q=n(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),J=n(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),Y=n(e=>{let t,r,i;return K===`BT`?(r=n((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=n((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let n=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;n!==void 0&&r(n,i)&&(t=e,i=n)}),t},`findClosestParent`),Se=n(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),Ce=n((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Te(n),i=Math.max(r,i)):a.push(n),Ee(n,r)}),r=i,a.forEach(e=>{De(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Se(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),we=n(e=>{let t=Y(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Te=n(e=>we(e)+M,`calculateCommitPosition`),Ee=n((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),De=n((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),Oe=n((e,t,n,r,i,a)=>{let{theme:o}=p(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),ke=n((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Ae=n((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,` ${r-a/2-N/2},${l+P} ${r-a/2-N/2},${l-P} ${n.posWithOffset-a/2-N},${l-s-P} diff --git a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-CrtmeRwl.js b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-Zl3vpThU.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-CrtmeRwl.js rename to apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-Zl3vpThU.js index efd5e248d..50d878ae2 100644 --- a/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-CrtmeRwl.js +++ b/apps/pythinker-code/dist-web/assets/gitGraphDiagram-WWUBYQGX-Zl3vpThU.js @@ -1,4 +1,4 @@ -import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-Cn6kALDM.js";import{H as i,K as a,U as o,Y as s,a as c,b as l,f as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{g,i as _,m as v}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=u.gitGraph,S=t(()=>_({...ee,...l().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return v({length:7})}t(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}t(T,`uniqBy`);var te=t(function(e){C.records.direction=e},`setDirection`),ne=t(function(e){n.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){n.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=t(function(){return C.records.options},`getOptions`),ie=t(function(e){let t=e.msg,r=e.id,i=e.type,a=e.tags;n.info(`commit`,t,r,i,a),n.debug(`Entering commit:`,t,r,i,a);let o=S();r=d.sanitizeText(r,o),t=d.sanitizeText(t,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,n.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&n.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),n.debug(`in pushCommit `+s.id)},`commit`),ae=t(function(e){let t=e.name,r=e.order;if(t=d.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:r}),E(t),n.debug(`in createBranch`)},`branch`),oe=t(e=>{let t=e.branch,r=e.id,i=e.type,a=e.tags,o=S();t=d.sanitizeText(t,o),r&&=d.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,u=c?C.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${r} ${i} ${a?.join(` `)}`,token:`merge ${t} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),n.debug(C.records.branches),n.debug(`in mergeBranch`)},`merge`),se=t(function(e){let t=e.id,r=e.targetId,i=e.tags,a=e.parent;n.debug(`Entering cherryPick:`,t,r,i);let o=S();if(t=d.sanitizeText(t,o),r=d.sanitizeText(r,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),n.debug(C.records.branches),n.debug(`in cherryPick`)}},`cherryPick`),E=t(function(e){if(e=d.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}t(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){e===t?r+=` *`:r+=` |`});let i=[r,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&i.push(e);if(n.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}t(O,`prettyPrintCommitHistory`);var ce=t(function(){n.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=t(function(){C.reset(),c()},`clear`),ue=t(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=t(function(){return C.records.branches},`getBranches`),fe=t(function(){return C.records.commits},`getCommits`),k=t(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){n.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:t(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:t(function(){return C.records.direction},`getDirection`),getHead:t(function(){return C.records.head},`getHead`),setAccTitle:o,getAccTitle:h,getAccDescription:f,setAccDescription:i,setDiagramTitle:a,getDiagramTitle:p},pe=t((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=t((e,r)=>{let i={Commit:t(e=>r.commit(he(e)),`Commit`),Branch:t(e=>r.branch(ge(e)),`Branch`),Merge:t(e=>r.merge(_e(e)),`Merge`),Checkout:t(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:t(e=>r.cherryPick(ye(e)),`CherryPicking`)}[e.$type];i?i(e):n.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),he=t(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=t(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=t(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=t(e=>e.branch,`parseCheckout`),ye=t(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:t(async t=>{let r=await e(`gitGraph`,t);n.debug(r),pe(r,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=t((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,Se=t(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=t(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),J=t(e=>{let n,r,i;return K===`BT`?(r=t((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=t((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Ce=t(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),we=t((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Ee(n),i=Math.max(r,i)):a.push(n),De(n,r)}),r=i,a.forEach(e=>{Oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Ce(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),Te=t(e=>{let t=J(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Ee=t(e=>Te(e)+M,`calculateCommitPosition`),De=t((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Oe=t((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),ke=t((e,t,n,r,i,a)=>{let{theme:o}=m(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),Ae=t((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),je=t((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,` +import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-Cn6kALDM.js";import{H as i,K as a,U as o,Y as s,a as c,b as l,f as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-DU6HZSFF-B78kfBb6.js";import{g,i as _,m as v}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=u.gitGraph,S=t(()=>_({...ee,...l().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return v({length:7})}t(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}t(T,`uniqBy`);var te=t(function(e){C.records.direction=e},`setDirection`),ne=t(function(e){n.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){n.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=t(function(){return C.records.options},`getOptions`),ie=t(function(e){let t=e.msg,r=e.id,i=e.type,a=e.tags;n.info(`commit`,t,r,i,a),n.debug(`Entering commit:`,t,r,i,a);let o=S();r=d.sanitizeText(r,o),t=d.sanitizeText(t,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,n.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&n.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),n.debug(`in pushCommit `+s.id)},`commit`),ae=t(function(e){let t=e.name,r=e.order;if(t=d.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:r}),E(t),n.debug(`in createBranch`)},`branch`),oe=t(e=>{let t=e.branch,r=e.id,i=e.type,a=e.tags,o=S();t=d.sanitizeText(t,o),r&&=d.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,u=c?C.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${r} ${i} ${a?.join(` `)}`,token:`merge ${t} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),n.debug(C.records.branches),n.debug(`in mergeBranch`)},`merge`),se=t(function(e){let t=e.id,r=e.targetId,i=e.tags,a=e.parent;n.debug(`Entering cherryPick:`,t,r,i);let o=S();if(t=d.sanitizeText(t,o),r=d.sanitizeText(r,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),n.debug(C.records.branches),n.debug(`in cherryPick`)}},`cherryPick`),E=t(function(e){if(e=d.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}t(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){e===t?r+=` *`:r+=` |`});let i=[r,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&i.push(e);if(n.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}t(O,`prettyPrintCommitHistory`);var ce=t(function(){n.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=t(function(){C.reset(),c()},`clear`),ue=t(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=t(function(){return C.records.branches},`getBranches`),fe=t(function(){return C.records.commits},`getCommits`),k=t(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){n.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:t(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:t(function(){return C.records.direction},`getDirection`),getHead:t(function(){return C.records.head},`getHead`),setAccTitle:o,getAccTitle:h,getAccDescription:f,setAccDescription:i,setDiagramTitle:a,getDiagramTitle:p},pe=t((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=t((e,r)=>{let i={Commit:t(e=>r.commit(he(e)),`Commit`),Branch:t(e=>r.branch(ge(e)),`Branch`),Merge:t(e=>r.merge(_e(e)),`Merge`),Checkout:t(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:t(e=>r.cherryPick(ye(e)),`CherryPicking`)}[e.$type];i?i(e):n.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),he=t(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=t(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=t(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=t(e=>e.branch,`parseCheckout`),ye=t(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:t(async t=>{let r=await e(`gitGraph`,t);n.debug(r),pe(r,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=t((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,Se=t(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=t(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),J=t(e=>{let n,r,i;return K===`BT`?(r=t((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=t((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Ce=t(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),we=t((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Ee(n),i=Math.max(r,i)):a.push(n),De(n,r)}),r=i,a.forEach(e=>{Oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Ce(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),Te=t(e=>{let t=J(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Ee=t(e=>Te(e)+M,`calculateCommitPosition`),De=t((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Oe=t((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),ke=t((e,t,n,r,i,a)=>{let{theme:o}=m(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),Ae=t((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),je=t((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,` ${r-a/2-N/2},${l+P} ${r-a/2-N/2},${l-P} ${n.posWithOffset-a/2-N},${l-s-P} diff --git a/apps/pythinker-code/dist-web/assets/handlebars-DAh6xqk0.js b/apps/pythinker-code/dist-web/assets/handlebars-BL5nK9ri.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/handlebars-DAh6xqk0.js rename to apps/pythinker-code/dist-web/assets/handlebars-BL5nK9ri.js index ba2b4aaac..785370baf 100644 --- a/apps/pythinker-code/dist-web/assets/handlebars-DAh6xqk0.js +++ b/apps/pythinker-code/dist-web/assets/handlebars-BL5nK9ri.js @@ -1 +1 @@ -import{h as e}from"./editor.api2-BIJacb07.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`{{!--`,`--}}`]},brackets:[[``],[`<`,`>`],[`{{`,`}}`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`<`,close:`>`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,tokenizer:{root:[[/\{\{!--/,`comment.block.start.handlebars`,`@commentBlock`],[/\{\{!/,`comment.start.handlebars`,`@comment`],[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.root`}],[/)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)([:\w]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)(\w+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/\}\}/,`comment.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentBlock:[[/--\}\}/,`comment.block.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentHtml:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.script`}],[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterType`}],[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.scriptEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],style:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.style`}],[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterType`}],[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],handlebarsInSimpleState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`}],{include:`handlebarsRoot`}],handlebarsInEmbeddedState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],{include:`handlebarsRoot`}],handlebarsRoot:[[/"[^"]*"/,`string.handlebars`],[/[#/][^\s}]+/,`keyword.helper.handlebars`],[/else\b/,`keyword.helper.handlebars`],[/[\s]+/],[/[^}]/,`variable.parameter.handlebars`]]}};export{n as conf,r as language}; \ No newline at end of file +import{h as e}from"./editor.api2-DVs509bq.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`{{!--`,`--}}`]},brackets:[[``],[`<`,`>`],[`{{`,`}}`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`<`,close:`>`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,tokenizer:{root:[[/\{\{!--/,`comment.block.start.handlebars`,`@commentBlock`],[/\{\{!/,`comment.start.handlebars`,`@comment`],[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.root`}],[/)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)([:\w]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)(\w+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/\}\}/,`comment.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentBlock:[[/--\}\}/,`comment.block.end.handlebars`,`@pop`],[/./,`comment.content.handlebars`]],commentHtml:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.comment`}],[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.script`}],[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterType`}],[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.scriptWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.scriptEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],style:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.style`}],[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterType`}],[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/\{\{/,{token:`@rematch`,switchTo:`@handlebarsInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],handlebarsInSimpleState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`}],{include:`handlebarsRoot`}],handlebarsInEmbeddedState:[[/\{\{\{?/,`delimiter.handlebars`],[/\}\}\}?/,{token:`delimiter.handlebars`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],{include:`handlebarsRoot`}],handlebarsRoot:[[/"[^"]*"/,`string.handlebars`],[/[#/][^\s}]+/,`keyword.helper.handlebars`],[/else\b/,`keyword.helper.handlebars`],[/[\s]+/],[/[^}]/,`variable.parameter.handlebars`]]}};export{n as conf,r as language}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/html-YYI_GKxn.js b/apps/pythinker-code/dist-web/assets/html-CsDKBQZf.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/html-YYI_GKxn.js rename to apps/pythinker-code/dist-web/assets/html-CsDKBQZf.js index d205c6e82..a59ba75bf 100644 --- a/apps/pythinker-code/dist-web/assets/html-YYI_GKxn.js +++ b/apps/pythinker-code/dist-web/assets/html-CsDKBQZf.js @@ -1 +1 @@ -import{h as e}from"./editor.api2-BIJacb07.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[``]},brackets:[[``],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:RegExp(`^\\s*`),end:RegExp(`^\\s*`)}}},r={defaultToken:``,tokenPostfix:`.html`,ignoreCase:!0,tokenizer:{root:[[/)/,[`delimiter`,`tag`,``,`delimiter`]],[/(<)(script)/,[`delimiter`,{token:`tag`,next:`@script`}]],[/(<)(style)/,[`delimiter`,{token:`tag`,next:`@style`}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/]+/,`metatag.content`],[/>/,`metatag`,`@pop`]],comment:[[/-->/,`comment`,`@pop`],[/[^-]+/,`comment.content`],[/./,`comment.content`]],otherTag:[[/\/?>/,`delimiter`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],scriptAfterType:[[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/"module"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/'module'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/>/,{token:`delimiter`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]],style:[[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],styleAfterType:[[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/>/,{token:`delimiter`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]]}};export{n as conf,r as language}; \ No newline at end of file +import{h as e}from"./editor.api2-DVs509bq.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[``]},brackets:[[``],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:RegExp(`^\\s*`),end:RegExp(`^\\s*`)}}},r={defaultToken:``,tokenPostfix:`.html`,ignoreCase:!0,tokenizer:{root:[[/)/,[`delimiter`,`tag`,``,`delimiter`]],[/(<)(script)/,[`delimiter`,{token:`tag`,next:`@script`}]],[/(<)(style)/,[`delimiter`,{token:`tag`,next:`@style`}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,[`delimiter`,{token:`tag`,next:`@otherTag`}]],[/]+/,`metatag.content`],[/>/,`metatag`,`@pop`]],comment:[[/-->/,`comment`,`@pop`],[/[^-]+/,`comment.content`],[/./,`comment.content`]],otherTag:[[/\/?>/,`delimiter`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],scriptAfterType:[[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/"module"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/'module'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.text/javascript`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@scriptEmbedded`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/>/,{token:`delimiter`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]],style:[[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter`,`tag`,{token:`delimiter`,next:`@pop`}]]],styleAfterType:[[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter`,next:`@styleEmbedded`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/>/,{token:`delimiter`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}],[/[^<]+/,``]]}};export{n as conf,r as language}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/htmlMode-Dfjmf-G_.js b/apps/pythinker-code/dist-web/assets/htmlMode-yDIyz0I2.js similarity index 94% rename from apps/pythinker-code/dist-web/assets/htmlMode-Dfjmf-G_.js rename to apps/pythinker-code/dist-web/assets/htmlMode-yDIyz0I2.js index cc33daa48..91792d13a 100644 --- a/apps/pythinker-code/dist-web/assets/htmlMode-Dfjmf-G_.js +++ b/apps/pythinker-code/dist-web/assets/htmlMode-yDIyz0I2.js @@ -1 +1 @@ -import{h as e}from"./editor.api2-BIJacb07.js";import{t}from"./workers-lk8skNfQ.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-C5inBXDM.js";var b=120*1e3,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/html/htmlWorker`,createWorker:()=>new Worker(new URL(`/assets/html.worker-DRK-BLhy.js`,``+import.meta.url),{type:`module`}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}},S=class extends _{constructor(e){super(e,[`.`,`:`,`<`,`"`,`=`,`/`])}};function C(t){let n=new x(t),o=(...e)=>n.getLanguageServiceWorker(...e),s=t.languageId;e.registerCompletionItemProvider(s,new S(o)),e.registerHoverProvider(s,new a(o)),e.registerDocumentHighlightProvider(s,new p(o)),e.registerLinkProvider(s,new g(o)),e.registerFoldingRangeProvider(s,new v(o)),e.registerDocumentSymbolProvider(s,new u(o)),e.registerSelectionRangeProvider(s,new d(o)),e.registerRenameProvider(s,new m(o)),s===`html`&&(e.registerDocumentFormattingEditProvider(s,new r(o)),e.registerDocumentRangeFormattingEditProvider(s,new i(o)))}function w(t){let n=[],o=[],s=new x(t);n.push(s);let c=(...e)=>s.getLanguageServiceWorker(...e);function l(){let{languageId:n,modeConfiguration:s}=t;E(o),s.completionItems&&o.push(e.registerCompletionItemProvider(n,new S(c))),s.hovers&&o.push(e.registerHoverProvider(n,new a(c))),s.documentHighlights&&o.push(e.registerDocumentHighlightProvider(n,new p(c))),s.links&&o.push(e.registerLinkProvider(n,new g(c))),s.documentSymbols&&o.push(e.registerDocumentSymbolProvider(n,new u(c))),s.rename&&o.push(e.registerRenameProvider(n,new m(c))),s.foldingRanges&&o.push(e.registerFoldingRangeProvider(n,new v(c))),s.selectionRanges&&o.push(e.registerSelectionRangeProvider(n,new d(c))),s.documentFormattingEdits&&o.push(e.registerDocumentFormattingEditProvider(n,new r(c))),s.documentRangeFormattingEdits&&o.push(e.registerDocumentRangeFormattingEditProvider(n,new i(c)))}return l(),n.push(T(o)),T(n)}function T(e){return{dispose:()=>E(e)}}function E(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,w as setupMode,C as setupMode1,n as toRange,y as toTextEdit}; \ No newline at end of file +import{h as e}from"./editor.api2-DVs509bq.js";import{t}from"./workers-CzVdMsP_.js";import{_ as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,s as g,t as _,u as v,v as y}from"./lspLanguageFeatures-DXTWGW3J.js";var b=120*1e3,x=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=t({moduleId:`vs/language/html/htmlWorker`,createWorker:()=>new Worker(new URL(`/assets/html.worker-DRK-BLhy.js`,``+import.meta.url),{type:`module`}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}},S=class extends _{constructor(e){super(e,[`.`,`:`,`<`,`"`,`=`,`/`])}};function C(t){let n=new x(t),o=(...e)=>n.getLanguageServiceWorker(...e),s=t.languageId;e.registerCompletionItemProvider(s,new S(o)),e.registerHoverProvider(s,new a(o)),e.registerDocumentHighlightProvider(s,new p(o)),e.registerLinkProvider(s,new g(o)),e.registerFoldingRangeProvider(s,new v(o)),e.registerDocumentSymbolProvider(s,new u(o)),e.registerSelectionRangeProvider(s,new d(o)),e.registerRenameProvider(s,new m(o)),s===`html`&&(e.registerDocumentFormattingEditProvider(s,new r(o)),e.registerDocumentRangeFormattingEditProvider(s,new i(o)))}function w(t){let n=[],o=[],s=new x(t);n.push(s);let c=(...e)=>s.getLanguageServiceWorker(...e);function l(){let{languageId:n,modeConfiguration:s}=t;E(o),s.completionItems&&o.push(e.registerCompletionItemProvider(n,new S(c))),s.hovers&&o.push(e.registerHoverProvider(n,new a(c))),s.documentHighlights&&o.push(e.registerDocumentHighlightProvider(n,new p(c))),s.links&&o.push(e.registerLinkProvider(n,new g(c))),s.documentSymbols&&o.push(e.registerDocumentSymbolProvider(n,new u(c))),s.rename&&o.push(e.registerRenameProvider(n,new m(c))),s.foldingRanges&&o.push(e.registerFoldingRangeProvider(n,new v(c))),s.selectionRanges&&o.push(e.registerSelectionRangeProvider(n,new d(c))),s.documentFormattingEdits&&o.push(e.registerDocumentFormattingEditProvider(n,new r(c))),s.documentRangeFormattingEdits&&o.push(e.registerDocumentRangeFormattingEditProvider(n,new i(c)))}return l(),n.push(T(o)),T(n)}function T(e){return{dispose:()=>E(e)}}function E(e){for(;e.length;)e.pop().dispose()}export{_ as CompletionAdapter,f as DefinitionAdapter,h as DiagnosticsAdapter,l as DocumentColorAdapter,r as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,g as DocumentLinkAdapter,i as DocumentRangeFormattingEditProvider,u as DocumentSymbolAdapter,v as FoldingRangeAdapter,a as HoverAdapter,o as ReferenceAdapter,m as RenameAdapter,d as SelectionRangeAdapter,x as WorkerManager,c as fromPosition,s as fromRange,w as setupMode,C as setupMode1,n as toRange,y as toTextEdit}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/index-CJN6blp7.js b/apps/pythinker-code/dist-web/assets/index-CIrZXSM-.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index-CJN6blp7.js rename to apps/pythinker-code/dist-web/assets/index-CIrZXSM-.js index 22afb938c..ecdd6233b 100644 --- a/apps/pythinker-code/dist-web/assets/index-CJN6blp7.js +++ b/apps/pythinker-code/dist-web/assets/index-CIrZXSM-.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-CC7yy3PX.js","assets/vue.runtime.esm-bundler-Cwbj1t-C.js","assets/chunk-QTnfLwEv.js","assets/DesignSystemView-BKLoAAV8.css","assets/mhchem-CCsrOXlE.js","assets/katex-BMCG0xok.js","assets/mermaid.core-Ddyah3MZ.js","assets/preload-helper-zJ_50EbN.js","assets/chunk-PWAF6VOD-vmg_e0ho.js","assets/src-Cn6kALDM.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/chunk-DU6HZSFF-DfRjAqU1.js","assets/purify.es-CvIXgbbv.js","assets/chunk-75Z2AOVW-D2HolPjd.js","assets/dist-lRkD-JPF.js","assets/chunk-GMAD6QVW-xizYnG4f.js","assets/chunk-2E4U76K2-CUuPs4AQ.js","assets/graphlib-B8gBHxth.js","assets/chunk-4HAMMTFA-B5soPjjq.js","assets/chunk-P2QGCYS3-CQc2NCc1.js","assets/rough.esm-CSKSodPl.js","assets/chunk-GVQU2GXP-BrOdU7Oy.js","assets/chunk-L3NEJ4N5-XwNqFvev.js","assets/chunk-OSK3NFVY-BT2Y-lqQ.js","assets/line-CleFFpQp.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-CLGD4ZFX-D_luxf7b.js","assets/chunk-LNGE3PJU-OosUmKKA.js","assets/chunk-TLUHSLCS-DN2eHVWx.js","assets/Tooltip-CYPLmGXR.js","assets/CodeBlockNode-uERC4D15.js","assets/index7-ClZ3JBPh.js","assets/index6-KRBW8xCP.js","assets/index5-DTEBXfOq.js","assets/index11-BLu1h3am.js","assets/index10-cR1J5t3a.js","assets/index8-CkSxjxQO.js","assets/index3-mVb7iXlv.js","assets/index4-BTqbYikG.js","assets/index9-C3TPz6s3.js","assets/editor.main-cSwqhoaG.js","assets/editor.api2-BIJacb07.js","assets/editor-D_FpifaX.css","assets/workers-lk8skNfQ.js","assets/monaco.contribution-DqkvvJIb.js","assets/dist-1YXee3Wk.js","assets/dist-3s__bTmB.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-CaJPKGCg.js","assets/vue.runtime.esm-bundler-Cwbj1t-C.js","assets/chunk-QTnfLwEv.js","assets/DesignSystemView-BKLoAAV8.css","assets/mhchem-CCsrOXlE.js","assets/katex-BMCG0xok.js","assets/mermaid.core-D-hNgJPv.js","assets/preload-helper-zJ_50EbN.js","assets/chunk-PWAF6VOD-D9eOryqj.js","assets/src-Cn6kALDM.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/chunk-DU6HZSFF-B78kfBb6.js","assets/purify.es-F_7NWVtX.js","assets/chunk-75Z2AOVW-CAoob5DH.js","assets/dist-lRkD-JPF.js","assets/chunk-GMAD6QVW-dCDLGP3F.js","assets/chunk-2E4U76K2-DSYv76d-.js","assets/graphlib-B8gBHxth.js","assets/chunk-4HAMMTFA-Dlc4jvjp.js","assets/chunk-P2QGCYS3-BTLpY7ks.js","assets/rough.esm-CSKSodPl.js","assets/chunk-GVQU2GXP-Ddvf-Y11.js","assets/chunk-L3NEJ4N5-BKsN7TKH.js","assets/chunk-OSK3NFVY-ZXiPE9OQ.js","assets/line-BbuATs2H.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-CLGD4ZFX-BVZ8CvLY.js","assets/chunk-LNGE3PJU-OosUmKKA.js","assets/chunk-TLUHSLCS-B1Sp0tTt.js","assets/Tooltip-DbjeYWS5.js","assets/CodeBlockNode-BscDteEG.js","assets/index7-pWd8I70s.js","assets/index6-CmbcA3ap.js","assets/index5-DnCMqCxw.js","assets/index11-CUNXwyvL.js","assets/index10-GMiYl4V4.js","assets/index8-wWmUQ9CO.js","assets/index3-CeHHGRW3.js","assets/index4-Gxd-bmd4.js","assets/index9-C8yZCmv2.js","assets/editor.main-nZY5Vq00.js","assets/editor.api2-DVs509bq.js","assets/editor-D_FpifaX.css","assets/workers-CzVdMsP_.js","assets/monaco.contribution-C71ieqbT.js","assets/dist-1YXee3Wk.js","assets/dist-3s__bTmB.js"])))=>i.map(i=>d[i]); import{n as e}from"./chunk-QTnfLwEv.js";import{$ as t,A as n,B as r,C as i,D as a,E as o,G as s,I as c,J as l,K as u,L as d,M as f,N as p,O as m,P as h,Q as g,R as _,S as v,T as y,U as b,V as x,W as S,X as C,Y as w,Z as T,_ as E,a as D,at as O,b as k,c as A,ct as j,d as M,et as N,f as ee,g as P,h as F,i as I,it as te,j as ne,k as re,l as ie,lt as ae,m as L,n as oe,nt as R,o as se,ot as z,p as ce,q as B,r as le,rt as ue,s as de,st as V,tt as fe,u as H,ut as U,v as W,w as G,x as K,y as pe,z as me}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{t as he}from"./preload-helper-zJ_50EbN.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var ge=typeof window<`u`,_e=(e,t=!1)=>t?Symbol.for(e):Symbol(e),ve=(e,t,n)=>ye({l:e,k:t,s:n}),ye=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),be=e=>typeof e==`number`&&isFinite(e),xe=e=>Le(e)===`[object Date]`,Se=e=>Le(e)===`[object RegExp]`,Ce=e=>Re(e)&&Object.keys(e).length===0,we=Object.assign,Te=Object.create,Ee=(e=null)=>Te(e),De,Oe=()=>De||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:Ee(),ke=Object.prototype.hasOwnProperty;function Ae(e,t){return ke.call(e,t)}var je=Array.isArray,Me=e=>typeof e==`function`,q=e=>typeof e==`string`,Ne=e=>typeof e==`boolean`,Pe=e=>typeof e==`object`&&!!e,Fe=e=>Pe(e)&&Me(e.then)&&Me(e.catch),Ie=Object.prototype.toString,Le=e=>Ie.call(e),Re=e=>Le(e)===`[object Object]`,ze=e=>e==null?``:je(e)||Re(e)&&e.toString===Ie?JSON.stringify(e,null,2):String(e);function Be(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}function Ve(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}function He(e){return e.replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/\//g,`/`).replace(/=/g,`=`)}function Ue(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(//g,`>`)}var We=/^javascript:/i,Ge=/^(?:href|src|action|formaction)$/i,Ke=/&#(?:x([0-9a-f]+)|(\d+));?/gi,qe=/&(?:Tab|NewLine);/g,Je=/:?/gi,Ye=/[\u0000-\u0020\u007f-\u009f]/g,Xe=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,Ze=/(^|[\s"'<>/])on(\w+\s*=)/gi,Qe=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function $e(e,t,n){let r=t||n;if(!r)return e;let i=Number.parseInt(r,t?16:10);return i<=127?String.fromCharCode(i):e}function et(e){let t=e.replace(Ke,$e).replace(qe,``).replace(Je,`:`).replace(Ye,``);return We.test(t)}function tt(e){let t=/url\s*\(/gi,n=``,r=0,i;for(;(i=t.exec(e))!==null;){let a=i.index,o=t.lastIndex-1,s=o+1,c=1,l=null;for(;s`${t}="${nt(t,n)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${nt(t,n)}'`),Xe.test(e)&&(e=e.replace(Ze,`$1on$2`)),e=e.replace(Qe,(e,t,n,r)=>et(r)?`${t}${n}about:blank`:e),e}var it=e=>!Pe(e)||je(e);function at(e,t){if(it(e)||it(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{if(r===`__proto__`)return;let i=e[r];if(je(i)){let e=[];e.length=i.length,t[r]=e,n.push({src:i,des:e})}else Pe(i)?((!Pe(t[r])||je(t[r]))&&(t[r]=Ee()),n.push({src:i,des:t[r]})):t[r]=i})}}function ot(e,t,n){return{line:e,column:t,offset:n}}function st(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var ct={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16};ct.EXPECTED_TOKEN,ct.INVALID_TOKEN_IN_PLACEHOLDER,ct.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,ct.UNKNOWN_ESCAPE_SEQUENCE,ct.INVALID_UNICODE_ESCAPE_SEQUENCE,ct.UNBALANCED_CLOSING_BRACE,ct.UNTERMINATED_CLOSING_BRACE,ct.EMPTY_PLACEHOLDER,ct.NOT_ALLOW_NEST_PLACEHOLDER,ct.INVALID_LINKED_FORMAT,ct.MUST_HAVE_MESSAGES_IN_PLURAL,ct.UNEXPECTED_EMPTY_LINKED_MODIFIER,ct.UNEXPECTED_EMPTY_LINKED_KEY,ct.UNEXPECTED_LEXICAL_ANALYSIS,ct.UNHANDLED_CODEGEN_NODE_TYPE,ct.UNHANDLED_MINIFIER_NODE_TYPE;function lt(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function ut(e){throw e}var dt=` `,ft=`\r`,pt=` `,mt=`\u2028`,ht=`\u2029`;function gt(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===ft&&t[e+1]===pt,s=e=>t[e]===pt,c=e=>t[e]===ht,l=e=>t[e]===mt,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?pt:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}var _t=void 0,vt=`'`,yt=`tokenizer`;function bt(e,t={}){let n=t.location!==!1,r=gt(e),i=()=>r.index(),a=()=>ot(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:13,offset:s,startLoc:o,endLoc:o,lastType:13,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();t.column+=r,t.offset+=r,u&&u(lt(e,n?st(a.startLoc,t):null,{domain:yt,args:i}))}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=st(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,13);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(ct.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===dt||e.currentPeek()===pt;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===_t)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===_t)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===vt;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==7)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(!(n===7||n===11))return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function T(e,t){let{currentType:n}=t;if(n!==9)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`|`||t===`:`||t===`.`||t===dt||!t?!1:t===pt?(e.peek(),r()):D(e,!1)},i=r();return e.resetPeek(),i}function E(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function D(e,t=!0){let n=(t=!1,r=``)=>{let i=e.currentPeek();return i===`{`||i===`@`||!i?t:i===`|`?!(r===dt||r===pt):i===dt?(e.peek(),n(!0,dt)):i===pt?(e.peek(),n(!0,pt)):!0},r=n();return t&&e.resetPeek(),r}function O(e,t){let n=e.currentChar();if(n!==_t)return t(n)?(e.next(),n):null}function k(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function A(e){return O(e,k)}function j(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function M(e){return O(e,j)}function N(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function ee(e){return O(e,N)}function P(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function F(e){return O(e,P)}function I(e){let t=``,n=``;for(;t=ee(e);)n+=t;return n}function te(e){let t=``;for(;;){let n=e.currentChar();if(n===`\\`){let r=e.peek();r===`{`||r===`}`||r===`@`||r===`|`||r===`\\`?(t+=n+r,e.next(),e.next()):(e.resetPeek(),t+=n,e.next())}else if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;else if(n===dt||n===pt)if(D(e))t+=n,e.next();else if(E(e))break;else t+=n,e.next();else t+=n,e.next()}return t}function ne(e){g(e);let t=``,n=``;for(;t=M(e);)n+=t;let r=e.currentChar();if(r&&r!==`}`&&r!==_t&&r!==dt&&r!==pt&&r!==` `){let t=se(e);return d(ct.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n+t),n+t}return e.currentChar()===_t&&d(ct.UNTERMINATED_CLOSING_BRACE,a(),0),n}function re(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${I(e)}`):t+=I(e),e.currentChar()===_t&&d(ct.UNTERMINATED_CLOSING_BRACE,a(),0),t}function ie(e){return e!==vt&&e!==pt}function ae(e){g(e),m(e,`'`);let t=``,n=``;for(;t=O(e,ie);)t===`\\`?n+=L(e):n+=t;let r=e.currentChar();return r===pt||r===_t?(d(ct.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===pt&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function L(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return oe(e,t,4);case`U`:return oe(e,t,6);default:return d(ct.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function oe(e,t,n){m(e,t);let r=``;for(let i=0;i{let r=e.currentChar();return r===`{`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===dt?n:(n+=r,e.next(),t(n))};return t(``)}function B(e){g(e);let t=m(e,`|`);return g(e),t}function le(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d(ct.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(ct.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(ct.UNTERMINATED_CLOSING_BRACE,a(),0),n=ue(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(E(e))return t.braceNest>0&&d(ct.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,B(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===4||t.currentType===5||t.currentType===6))return d(ct.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,de(e,t);if(r=y(e,t))return n=f(t,4,ne(e)),g(e),n;if(i=b(e,t))return n=f(t,5,re(e)),g(e),n;if(o=x(e,t))return n=f(t,6,ae(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,12,se(e)),d(ct.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function ue(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===7||n===8||n===11||n===9)&&(i===pt||i===dt)&&d(ct.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,7,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,8,`.`);case`:`:return g(e),e.next(),f(t,9,`:`);default:return E(e)?(r=f(t,1,B(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||w(e,t)?(g(e),ue(e,t)):C(e,t)?(g(e),f(t,11,z(e))):T(e,t)?(g(e),i===`{`?le(e,t)||r:f(t,10,ce(e))):(n===7&&d(ct.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,de(e,t))}}function de(e,t){let n={type:13};if(t.braceNest>0)return le(e,t)||p(t);if(t.inLinked)return ue(e,t)||p(t);switch(e.currentChar()){case`{`:return le(e,t)||p(t);case`}`:return d(ct.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return ue(e,t)||p(t);default:if(E(e))return n=f(t,1,B(e)),t.braceNest=0,t.inLinked=!1,n;if(D(e))return f(t,0,te(e));break}return n}function V(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===_t?f(c,13):de(r,c)}return{nextToken:V,currentOffset:i,currentPosition:a,context:l}}var xt=`parser`,St=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,Ct=/\\([\\@{}|])/g;function wt(e,t){return t}function Tt(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function Et(e={}){let t=e.location!==!1,{onError:n}=e;function r(e,r,i,a,...o){let s=e.currentPosition();s.offset+=a,s.column+=a,n&&n(lt(r,t?st(i,s):null,{domain:xt,args:o}))}function i(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function a(e,n,r,i){t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){let n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t.replace(Ct,wt),a(r,e.currentOffset(),e.currentPosition()),r}function s(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(5,n,r);return o.index=parseInt(t,10),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function c(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(4,n,r);return o.key=t,e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(9,n,r);return o.value=t.replace(St,Tt),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function u(e){let t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,c=i(8,o,s);return t.type===11?(t.value??r(e,ct.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,Dt(t)),c.value=t.value||``,a(c,e.currentOffset(),e.currentPosition()),{node:c}):(r(e,ct.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,a(c,o,s),{nextConsumeToken:t,node:c})}function d(e,t){let n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function f(e){let t=e.context(),n=i(6,t.offset,t.startLoc),o=e.nextToken();if(o.type===8){let t=u(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(o.type!==9&&r(e,ct.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Dt(o)),o=e.nextToken(),o.type===2&&(o=e.nextToken()),o.type){case 10:o.value??r(e,ct.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Dt(o)),n.key=d(e,o.value||``);break;case 4:o.value??r(e,ct.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Dt(o)),n.key=c(e,o.value||``);break;case 5:o.value??r(e,ct.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Dt(o)),n.key=s(e,o.value||``);break;case 6:o.value??r(e,ct.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Dt(o)),n.key=l(e,o.value||``);break;default:{r(e,ct.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let s=e.context(),c=i(7,s.offset,s.startLoc);return c.value=``,a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:o,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function p(e){let t=e.context(),n=i(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let u=null;do{let i=u||e.nextToken();switch(u=null,i.type){case 0:i.value??r(e,ct.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Dt(i)),n.items.push(o(e,i.value||``));break;case 5:i.value??r(e,ct.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Dt(i)),n.items.push(s(e,i.value||``));break;case 4:i.value??r(e,ct.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Dt(i)),n.items.push(c(e,i.value||``));break;case 6:i.value??r(e,ct.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,Dt(i)),n.items.push(l(e,i.value||``));break;case 7:{let t=f(e);n.items.push(t.node),u=t.nextConsumeToken||null;break}}}while(t.currentType!==13&&t.currentType!==1);return a(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function m(e,t,n,o){let s=e.context(),c=o.items.length===0,l=i(1,t,n);l.cases=[],l.cases.push(o);do{let t=p(e);c||=t.items.length===0,l.cases.push(t)}while(s.currentType!==13);return c&&r(e,ct.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(l,e.currentOffset(),e.currentPosition()),l}function h(e){let t=e.context(),{offset:n,startLoc:r}=t,i=p(e);return t.currentType===13?i:m(e,n,r,i)}function g(n){let o=bt(n,we({},e)),s=o.context(),c=i(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=h(o),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),s.currentType!==13&&r(o,ct.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,0,n[s.offset]||``),a(c,o.currentOffset(),o.currentPosition()),c}return{parse:g}}function Dt(e){if(e.type===13)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function Ot(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function kt(e,t){for(let n=0;nNt(e)),e}function Nt(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;no;function c(e,t){o.code+=e}function l(e,t=!0){let n=t?r:``;c(i?n+` `.repeat(e):n)}function u(e=!0){let t=++o.indentLevel;e&&l(t)}function d(e=!0){let t=--o.indentLevel;e&&l(t)}function f(){l(o.indentLevel)}return{context:s,push:c,indent:u,deindent:d,newline:f,helper:e=>`_${e}`,needIndent:()=>o.needIndent}}function It(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),Bt(e,t.key),t.modifier?(e.push(`, `),Bt(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function Lt(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n{let n=q(t.mode)?t.mode:`normal`,r=q(t.filename)?t.filename:`message.intl`;t.sourceMap;let i=t.breakLineCode==null?n===`arrow`?`;`:` `:t.breakLineCode,a=t.needIndent?t.needIndent:n!==`arrow`,o=e.helpers||[],s=Ft(e,{filename:r,breakLineCode:i,needIndent:a});s.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),s.indent(a),o.length>0&&(s.push(`const { ${Be(o.map(e=>`${e}: _${e}`),`, `)} } = ctx`),s.newline()),s.push(`return `),Bt(s,e),s.deindent(a),s.push(`}`),delete e.helpers;let{code:c,map:l}=s.context();return{ast:e,code:c,map:l?l.toJSON():void 0}};function Ht(e,t={}){let n=we({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null?!0:n.optimize,o=Et(n).parse(e);return r?(a&&Mt(o),i&&Pt(o),{ast:o,code:``}):(jt(o,n),Vt(o,n))}function Ut(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(Oe().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(Oe().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Wt(e){return Pe(e)&&en(e)===0&&(Ae(e,`b`)||Ae(e,`body`))}var Gt=[`b`,`body`];function Kt(e){return cn(e,Gt)}var qt=[`c`,`cases`];function Jt(e){return cn(e,qt,[])}var Yt=[`s`,`static`];function Xt(e){return cn(e,Yt)}var Zt=[`i`,`items`];function Qt(e){return cn(e,Zt,[])}var $t=[`t`,`type`];function en(e){return cn(e,$t)}var tn=[`v`,`value`];function nn(e,t){let n=cn(e,tn);if(n!=null)return n;throw un(t)}var rn=[`m`,`modifier`];function an(e){return cn(e,rn)}var on=[`k`,`key`];function sn(e){let t=cn(e,on);if(t)return t;throw un(6)}function cn(e,t,n){for(let n=0;nfn(t,e)}function fn(e,t){let n=Kt(t);if(n==null)throw un(0);if(en(n)===1){let t=Jt(n);return e.plural(t.reduce((t,n)=>[...t,pn(e,n)],[]))}else return pn(e,n)}function pn(e,t){let n=Xt(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=Qt(t).reduce((t,n)=>[...t,mn(e,n)],[]);return e.normalize(n)}}function mn(e,t){let n=en(t);switch(n){case 3:return nn(t,n);case 9:return nn(t,n);case 4:{let r=t;if(Ae(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(Ae(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw un(n)}case 5:{let r=t;if(Ae(r,`i`)&&be(r.i))return e.interpolate(e.list(r.i));if(Ae(r,`index`)&&be(r.index))return e.interpolate(e.list(r.index));throw un(n)}case 6:{let n=t,r=an(n),i=sn(n);return e.linked(mn(e,i),r?mn(e,r):void 0,e.type)}case 7:return nn(t,n);case 8:return nn(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var hn=e=>e,gn=Ee();function _n(e,t={}){let n=!1,r=t.onError||ut;return t.onError=e=>{n=!0,r(e)},{...Ht(e,t),detectError:n}}function vn(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&q(e)){Ne(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||hn)(e),r=gn[n];if(r)return r;let{ast:i,detectError:a}=_n(e,{...t,location:!1,jit:!0}),o=dn(i);return a?o:gn[n]=o}else{let t=e.cacheKey;return t?gn[t]||(gn[t]=dn(e)):dn(e)}}var yn=null;function bn(e){yn=e}function xn(e,t,n){yn&&yn.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}var Sn=Cn(`function:translate`);function Cn(e){return t=>yn&&yn.emit(e,t)}var wn={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function Tn(e){return lt(e,null,void 0)}wn.INVALID_ARGUMENT,wn.INVALID_DATE_ARGUMENT,wn.INVALID_ISO_DATE_ARGUMENT,wn.NOT_SUPPORT_NON_STRING_MESSAGE,wn.NOT_SUPPORT_LOCALE_PROMISE_VALUE,wn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,wn.NOT_SUPPORT_LOCALE_TYPE;function En(e,t){return t.locale==null?On(e.locale):On(t.locale)}var Dn;function On(e){if(q(e))return e;if(Me(e)){if(e.resolvedOnce&&Dn!=null)return Dn;if(e.constructor.name===`Function`){let t=e();if(Fe(t))throw Tn(wn.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Dn=t}else throw Tn(wn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Tn(wn.NOT_SUPPORT_LOCALE_TYPE)}function kn(e,t,n){return[...new Set([n,...je(t)?t:Pe(t)?Object.keys(t).filter(e=>e!=="default"):q(t)?[t]:[n]])]}function An(e,t,n){let r=q(n)?n:Kn,i=e,a;Pe(t)?(i.__localeChainObjectCache||=new WeakMap,a=i.__localeChainObjectCache.get(t),a||(a=new Map,i.__localeChainObjectCache.set(t,a))):(i.__localeChainCache||=new Map,a=i.__localeChainCache.get(t),a||(a=new Map,i.__localeChainCache.set(t,a)));let o=a.get(r);if(o)return o;let s=[],c=[n];for(;je(c);)c=jn(s,c,t);let l=je(t)||!Re(t)?t:t.default?t.default:null;return c=q(l)?[l]:l,je(c)&&jn(s,c,!1),a.set(r,s),s}function jn(e,t,n){let r=!0;for(let i=0;i{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=zn(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=Rn(a),d=Pn[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var Vn=new Map;function Hn(e,t){return Pe(e)?e[t]:null}function Un(e,t){if(!Pe(e))return null;let n=Vn.get(t);if(n||(n=Bn(t),n&&Vn.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Jn(){return{upper:(e,t)=>t===`text`&&q(e)?e.toUpperCase():t===`vnode`&&Pe(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&q(e)?e.toLowerCase():t===`vnode`&&Pe(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&q(e)?qn(e):t===`vnode`&&Pe(e)&&`__v_isVNode`in e?qn(e.children):e}}var Yn;function Xn(e){Yn=e}var Zn;function Qn(e){Zn=e}var $n;function er(e){$n=e}var tr=null,nr=()=>tr,rr=null,ir=e=>{rr=e},ar=()=>rr,or=0;function sr(e={}){let t=Me(e.onWarn)?e.onWarn:Ve,n=q(e.version)?e.version:Gn,r=q(e.locale)||Me(e.locale)?e.locale:Kn,i=Me(r)?Kn:r,a=je(e.fallbackLocale)||Re(e.fallbackLocale)||q(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=Re(e.messages)?e.messages:cr(i),s=Re(e.datetimeFormats)?e.datetimeFormats:cr(i),c=Re(e.numberFormats)?e.numberFormats:cr(i),l=we(Ee(),e.modifiers,Jn()),u=e.pluralRules||Ee(),d=Me(e.missing)?e.missing:null,f=Ne(e.missingWarn)||Se(e.missingWarn)?e.missingWarn:!0,p=Ne(e.fallbackWarn)||Se(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=Me(e.postTranslation)?e.postTranslation:null,_=Re(e.processor)?e.processor:null,v=Ne(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,b=Me(e.messageCompiler)?e.messageCompiler:Yn,x=Me(e.messageResolver)?e.messageResolver:Zn||Hn,S=Me(e.localeFallbacker)?e.localeFallbacker:$n||kn,C=Pe(e.fallbackContext)?e.fallbackContext:void 0,w=e,T=Pe(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,E=Pe(w.__numberFormatters)?w.__numberFormatters:new Map,D=Pe(w.__meta)?w.__meta:{};or++;let O={version:n,cid:or,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:C,onWarn:t,__meta:D};return O.datetimeFormats=s,O.numberFormats=c,O.__datetimeFormatters=T,O.__numberFormatters=E,__INTLIFY_PROD_DEVTOOLS__&&xn(O,n,D),O}var cr=e=>({[e]:Ee()});function lr(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(a!==null){let r=a(e,n,t,i);return q(r)?r:t}else return t}function ur(e,t){let n=e;Pe(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function dr(e,t,n){ur(e,n),e.fallbackContext&&ur(e.fallbackContext,n),e.localeFallbacker(e,n,t)}function fr(e,t){return e===t?!1:e.split(`-`)[0]===t.split(`-`)[0]}function pr(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r{r.includes(e)?s[e]=i[e]:t[e]=i[e]}),q(a)?t.locale=a:Re(a)&&(s=a),Re(o)&&(s=o),s}var vr=typeof Intl<`u`;vr&&Intl.DateTimeFormat,vr&&Intl.NumberFormat;function yr(e,...t){let{datetimeFormats:n,unresolving:r,onWarn:i}=e,{__datetimeFormatters:a}=e;if(!q(t[0])&&!xe(t[0])&&!be(t[0]))return``;let[o,s,c,l]=xr(...t),u=Ne(c.missingWarn)?c.missingWarn:e.missingWarn,d=Ne(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=En(e,c);if(!q(o)||o===``){let e=new Intl.DateTimeFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=mr(e,o,p,n,u,d,`datetime format`);if(!q(m))return r?-1:o;let h=n[m][o],g=hr(m,o,l),_=a.get(g);return _||(_=new Intl.DateTimeFormat(m,we({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var br=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function xr(...e){let[t]=e,n=Ee(),r=Ee(),i;if(q(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Tn(wn.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();i=new Date(n);try{i.toISOString()}catch{throw Tn(wn.INVALID_ISO_DATE_ARGUMENT)}}else if(xe(t)){if(isNaN(t.getTime()))throw Tn(wn.INVALID_DATE_ARGUMENT);i=t}else if(be(t))i=t;else throw Tn(wn.INVALID_ARGUMENT);let a=_r(e,n,r,br);return[n.key||``,i,n,a]}function Sr(e,t,n){gr(e.__datetimeFormatters,t,n)}function Cr(e,...t){let{numberFormats:n,unresolving:r,onWarn:i}=e,{__numberFormatters:a}=e;if(!be(t[0]))return``;let[o,s,c,l]=Tr(...t),u=Ne(c.missingWarn)?c.missingWarn:e.missingWarn,d=Ne(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=En(e,c);if(!q(o)||o===``){let e=new Intl.NumberFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=mr(e,o,p,n,u,d,`number format`);if(!q(m))return r?-1:o;let h=n[m][o],g=hr(m,o,l),_=a.get(g);return _||(_=new Intl.NumberFormat(m,we({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var wr=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function Tr(...e){let[t]=e,n=Ee(),r=Ee();if(!be(t))throw Tn(wn.INVALID_ARGUMENT);let i=t,a=_r(e,n,r,wr);return[n.key||``,i,n,a]}function Er(e,t,n){gr(e.__numberFormatters,t,n)}var Dr=e=>e,Or=e=>``,kr=`text`,Ar=e=>e.length===0?``:Be(e),jr=ze;function Mr(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function Nr(e){let t=be(e.pluralIndex)?e.pluralIndex:-1;return be(e.named?.count)?e.named.count:be(e.named?.n)?e.named.n:t}function Pr(e={}){let t=e.locale,n=Nr(e),r=q(t)&&Me(e.pluralRules?.[t])?e.pluralRules[t]:Mr,i=r===Mr?void 0:Mr,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||Ee();be(e.pluralIndex)&&(c.count||=e.pluralIndex,c.n||=e.pluralIndex);let l=e=>c[e];function u(t,n){return(Me(e.messages)?e.messages(t,!!n):Pe(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):Or)}let d=t=>e.modifiers?e.modifiers[t]:Dr,f=Me(e.processor?.normalize)?e.processor.normalize:Ar,p=Me(e.processor?.interpolate)?e.processor.interpolate:jr,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?Pe(n)?(a=n.modifier||a,i=n.type||i):q(n)&&(a=n||a):t.length===2&&(q(n)&&(a=n||a),q(r)&&(i=r||i));let o=u(e,!0)(m),s=o===``||o===void 0?e:o,c=i===`vnode`&&je(s)&&a?s[0]:s;return a?d(a)(c,i):c},message:u,type:q(e.processor?.type)?e.processor.type:kr,interpolate:p,normalize:f,values:we(Ee(),o,c)};return m}var Fr=()=>``,Ir=e=>Me(e);function Lr(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=Hr(...t),u=Ne(l.missingWarn)?l.missingWarn:e.missingWarn,d=Ne(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=Ne(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=q(l.default)||Ne(l.default)?Ne(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&(q(m)||Me(m)),g=En(e,l);f&&Rr(l);let[_,v,y]=p?[c,g,s[g]||Ee()]:zr(e,c,g,o,d,u),b=_,x=c;if(!p&&!(q(b)||Wt(b)||Ir(b))&&h&&(b=m,x=b),!p&&(!(q(b)||Wt(b)||Ir(b))||!q(v)))return i?-1:c;let S=!1,C=Ir(b)?b:Br(e,c,v,b,x,()=>{S=!0});if(S)return b;let w=Vr(e,C,Pr(Wr(e,v,y,l))),T=r?r(w,c):w;if(f&&q(T)&&(T=rt(T)),__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:q(c)?c:Ir(b)?b.key:``,locale:v||(Ir(b)?b.locale:``),format:q(b)?b:Ir(b)?b.source:``,message:T};t.meta=we({},e.__meta,nr()||{}),Sn(t)}return T}function Rr(e){je(e.list)?e.list=e.list.map(e=>q(e)?He(e):e):Pe(e.named)&&Object.keys(e.named).forEach(t=>{q(e.named[t])&&(e.named[t]=He(e.named[t]))})}function zr(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=Ee(),f,p=null;for(let n=0;nr);return e.locale=n,e.key=t,e}let c=o(r,Ur(e,n,i,r,s,a));return c.locale=n,c.key=t,c.source=r,c}function Vr(e,t,n){return t(n)}function Hr(...e){let[t,n,r]=e,i=Ee();if(!q(t)&&!be(t)&&!Ir(t)&&!Wt(t))throw Tn(wn.INVALID_ARGUMENT);let a=be(t)?String(t):(Ir(t),t);return be(n)?i.plural=n:q(n)?i.default=n:Re(n)&&!Ce(n)?i.named=n:je(n)&&(i.list=n),be(r)?i.plural=r:q(r)?i.default=r:Re(r)&&we(i,r),[a,i]}function Ur(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:e=>{throw a&&a(e),e},onCacheKey:e=>ve(t,n,e)}}function Wr(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[n,,i]=zr(u||e,r,t,s,c,l);a=n??o(i,r)}if(q(a)||Wt(a)){let n=!1,i=Br(e,r,t,a,r,()=>{n=!0});return n?Fr:i}else if(Ir(a))return a;else return Fr}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),be(r.plural)&&(d.pluralIndex=r.plural),d}Ut();var Gr=`11.4.12`;function Kr(){typeof __VUE_I18N_FULL_INSTALL__!=`boolean`&&(Oe().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!=`boolean`&&(Oe().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(Oe().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(Oe().__INTLIFY_PROD_DEVTOOLS__=!1)}var qr={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Jr(e,...t){return lt(e,null,void 0)}qr.UNEXPECTED_RETURN_TYPE,qr.INVALID_ARGUMENT,qr.MUST_BE_CALL_SETUP_TOP,qr.NOT_INSTALLED,qr.UNEXPECTED_ERROR,qr.REQUIRED_VALUE,qr.INVALID_VALUE,qr.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN,qr.NOT_INSTALLED_WITH_PROVIDE,qr.NOT_COMPATIBLE_LEGACY_VUE_I18N,qr.NOT_AVAILABLE_COMPOSITION_IN_LEGACY;var Yr=_e(`__translateVNode`),Xr=_e(`__datetimeParts`),Zr=_e(`__numberParts`),Qr=_e(`__setPluralRules`);_e(`__intlifyMeta`);var $r=_e(`__injectWithOption`),ei=_e(`__dispose`),ti={FALLBACK_TO_ROOT:10,NOT_FOUND_PARENT_SCOPE:11,IGNORE_OBJ_FLATTEN:12,DEPRECATE_LEGACY_MODE:13,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:14,DUPLICATE_USE_I18N_CALLING:15};ti.FALLBACK_TO_ROOT,ti.NOT_FOUND_PARENT_SCOPE,ti.IGNORE_OBJ_FLATTEN,ti.DEPRECATE_LEGACY_MODE,ti.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE,ti.DUPLICATE_USE_I18N_CALLING;var ni=null;{let e=Oe().__VUE_INSTANCE_SETTERS__;je(e)&&e.push(e=>{ni=e})}function ri(e){if(!Pe(e)||Wt(e))return e;for(let t in e)if(Ae(e,t))if(!t.includes(`.`))Pe(e[t])&&ri(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||Ee(),at(n,o[t])):at(n,o)}else q(e)&&at(JSON.parse(e),o)}),i==null&&a)for(let e in o)Ae(o,e)&&ri(o[e]);return o}function ai(e){return e.type}function oi(e,t,n){let r=Pe(t.messages)?t.messages:Ee();`__i18nGlobal`in n&&(r=ii(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),Pe(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(Pe(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function si(e){return v(ce,null,e,0)}function ci(){return ni??y()}var li=()=>[],ui=()=>!1,di=0;function fi(e){return((t,n,r,i)=>e(n,r,ci()||void 0,i))}function pi(e={}){let{__root:t,__injectWithOption:n}=e,r=t===void 0,i=e.flatJson,a=ge?R:ue,o=Ne(e.inheritLocale)?e.inheritLocale:!0,c=a(t&&o?t.locale.value:q(e.locale)?e.locale:Kn),l=a(t&&o?t.fallbackLocale.value:q(e.fallbackLocale)||je(e.fallbackLocale)||Re(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:c.value),u=a(ii(c.value,e)),d=a(Re(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),f=a(Re(e.numberFormats)?e.numberFormats:{[c.value]:{}}),p=t?t.missingWarn:Ne(e.missingWarn)||Se(e.missingWarn)?e.missingWarn:!0,m=t?t.fallbackWarn:Ne(e.fallbackWarn)||Se(e.fallbackWarn)?e.fallbackWarn:!0,h=t?t.fallbackRoot:Ne(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,_=Me(e.missing)?e.missing:null,v=Me(e.missing)?fi(e.missing):null,y=Me(e.postTranslation)?e.postTranslation:null,b=t?t.warnHtmlMessage:Ne(e.warnHtmlMessage)?e.warnHtmlMessage:!0,x=!!e.escapeParameter,S=t?t.modifiers:Re(e.modifiers)?e.modifiers:{},C=e.pluralRules||t&&t.pluralRules,w;w=(()=>{r&&ir(null);let t={version:Gr,locale:c.value,fallbackLocale:l.value,messages:u.value,modifiers:S,pluralRules:C,missing:v===null?void 0:v,missingWarn:p,fallbackWarn:m,fallbackFormat:g,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:b,escapeParameter:x,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=d.value,t.numberFormats=f.value,t.__datetimeFormatters=Re(w)?w.__datetimeFormatters:void 0,t.__numberFormatters=Re(w)?w.__numberFormatters:void 0;let n=sr(t);return r&&ir(n),n})(),dr(w,c.value,l.value);function T(){return[c.value,l.value,u.value,d.value,f.value]}let E=L({get:()=>c.value,set:e=>{w.locale=e,c.value=e}});function D(e){r||(w.fallbackContext=t?ar():void 0);try{dr(w,c.value,e)}finally{r||(w.fallbackContext=void 0)}}let O=L({get:()=>l.value,set:e=>{l.value=e,w.fallbackLocale=l.value,D(l.value)}}),k=L(()=>u.value),A=L(()=>d.value),j=L(()=>f.value);function M(){return Me(y)?y:null}function N(e){y=e,w.postTranslation=e}function ee(){return _}function P(e){e!==null&&(v=fi(e)),_=e,w.missing=v}let F=(e,n,i,a,o,s)=>{T();let c;try{__INTLIFY_PROD_DEVTOOLS__,r||(w.fallbackContext=t?ar():void 0),c=e(w)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(w.fallbackContext=void 0)}if(i!==`translate exists`&&be(c)&&c===-1||i===`translate exists`&&!c){let[e,r]=n();return t&&h?a(t):o(e)}else if(s(c))return c;else throw Jr(qr.UNEXPECTED_RETURN_TYPE)};function I(...e){return F(t=>Reflect.apply(Lr,null,[t,...e]),()=>Hr(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>q(e))}function te(...e){let[t,n,r]=e;if(r&&!Pe(r))throw Jr(qr.INVALID_ARGUMENT);return I(t,n,we({resolvedMessage:!0},r||{}))}function ne(...e){return F(t=>Reflect.apply(yr,null,[t,...e]),()=>xr(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>q(e)||je(e))}function re(...e){return F(t=>Reflect.apply(Cr,null,[t,...e]),()=>Tr(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>q(e)||je(e))}function ie(e){return e.map(e=>q(e)||be(e)||Ne(e)?si(String(e)):e)}let ae={normalize:ie,interpolate:e=>e,type:`vnode`};function oe(...e){return F(t=>{let n,r=t;try{r.processor=ae,n=Reflect.apply(Lr,null,[r,...e])}finally{r.processor=null}return n},()=>Hr(...e),`translate`,t=>t[Yr](...e),e=>[si(e)],e=>je(e))}function se(...e){return F(t=>Reflect.apply(Cr,null,[t,...e]),()=>Tr(...e),`number format`,t=>t[Zr](...e),li,e=>q(e)||je(e))}function z(...e){return F(t=>Reflect.apply(yr,null,[t,...e]),()=>xr(...e),`datetime format`,t=>t[Xr](...e),li,e=>q(e)||je(e))}function ce(e){C=e,w.pluralRules=C}function B(e,t){return F(()=>{if(!e)return!1;let n=q(t)?t:c.value,r=q(t)?[n]:An(w,l.value,n);for(let t=0;t[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),ui,e=>Ne(e))}function le(e){let t=null,n=An(w,l.value,c.value);for(let r=0;rD(l.value),{deep:!0,flush:`sync`}),t&&ge&&(s(t.locale,e=>{o&&(c.value=e,w.locale=e,dr(w,c.value,l.value))}),s(t.fallbackLocale,e=>{o&&(l.value=e,w.fallbackLocale=l.value,dr(w,c.value,l.value))}));let he={id:di,locale:E,fallbackLocale:O,get inheritLocale(){return o},set inheritLocale(e){o=e,e&&t&&(E.value=t.locale.value,O.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(u.value).sort()},messages:k,get modifiers(){return S},get pluralRules(){return C||{}},get isGlobal(){return r},get missingWarn(){return p},set missingWarn(e){p=e,w.missingWarn=p},get fallbackWarn(){return m},set fallbackWarn(e){m=e,w.fallbackWarn=m},get fallbackRoot(){return h},set fallbackRoot(e){h=e},get fallbackFormat(){return g},set fallbackFormat(e){g=e,w.fallbackFormat=g},get warnHtmlMessage(){return b},set warnHtmlMessage(e){b=e,w.warnHtmlMessage=e},get escapeParameter(){return x},set escapeParameter(e){x=e,w.escapeParameter=e},t:I,getLocaleMessage:V,setLocaleMessage:fe,mergeLocaleMessage:H,getPostTranslationHandler:M,setPostTranslationHandler:N,getMissingHandler:ee,setMissingHandler:P,[Qr]:ce};return he.datetimeFormats=A,he.numberFormats=j,he.rt=te,he.te=B,he.tm=de,he.d=ne,he.n=re,he.getDateTimeFormat=U,he.setDateTimeFormat=W,he.mergeDateTimeFormat=G,he.getNumberFormat=K,he.setNumberFormat=pe,he.mergeNumberFormat=me,he[$r]=n,he[Yr]=oe,he[Xr]=z,he[Zr]=se,he}function mi(e){let t=q(e.locale)?e.locale:Kn,n=q(e.fallbackLocale)||je(e.fallbackLocale)||Re(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=Me(e.missing)?e.missing:void 0,i=Ne(e.silentTranslationWarn)||Se(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=Ne(e.silentFallbackWarn)||Se(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=Ne(e.fallbackRoot)?e.fallbackRoot:!0,s=!!e.formatFallbackMessages,c=Re(e.modifiers)?e.modifiers:{},l=e.pluralizationRules,u=Me(e.postTranslation)?e.postTranslation:void 0,d=q(e.warnHtmlInMessage)?e.warnHtmlInMessage!==`off`:!0,f=!!e.escapeParameterHtml,p=Ne(e.sync)?e.sync:!0,m=e.messages;if(Re(e.sharedMessages)){let t=e.sharedMessages;m=Object.keys(t).reduce((e,n)=>(we(e[n]||(e[n]={}),t[n]),e),m||{})}let{__i18n:h,__root:g,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:b,datetimeFormats:v,numberFormats:y,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:s,modifiers:c,pluralRules:l,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:h,__root:g,__injectWithOption:_}}function hi(e={}){let t=pi(mi(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return Ne(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=Ne(e)?!e:e},get silentFallbackWarn(){return Ne(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=Ne(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?`warn`:`off`},set warnHtmlInMessage(e){t.warnHtmlMessage=e!==`off`},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){return Reflect.apply(t.t,t,[...e])},rt(...e){return Reflect.apply(t.rt,t,[...e])},te(e,n){return t.te(e,n)},tm(e){return t.tm(e)},getLocaleMessage(e){return t.getLocaleMessage(e)},setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d(...e){return Reflect.apply(t.d,t,[...e])},getDateTimeFormat(e){return t.getDateTimeFormat(e)},setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n(...e){return Reflect.apply(t.n,t,[...e])},getNumberFormat(e){return t.getNumberFormat(e)},setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)}};return r.__extender=n,r}function gi(e,t,n){return{beforeCreate(){let r=ci();if(!r)throw Jr(qr.UNEXPECTED_ERROR);let i=this.$options;if(i.i18n){let r=i.i18n;if(i.__i18n&&(r.__i18n=i.__i18n),r.__root=t,this===this.$root)this.$i18n=_i(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=hi(r);let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=_i(e,i);else{this.$i18n=hi({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&oi(t,i,i),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){let e=ci();if(!e)throw Jr(qr.UNEXPECTED_ERROR);let t=this.$i18n;t&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t?.__disposer&&(t.__disposer(),delete t.__disposer,delete t.__extender),n.__deleteInstance(e),delete this.$i18n)}}}function _i(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[Qr](t.pluralizationRules||e.pluralizationRules);let n=ii(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(t=>e.mergeLocaleMessage(t,n[t])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}var vi={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function yi({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((e,t)=>[...e,...t.type===M?t.children:[t]],[]):t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},Ee())}function bi(){return M}var xi=G({name:`i18n-t`,props:we({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>be(e)||!isNaN(e)}},vi),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||J({useScope:e.scope,__useComponent:!0});return()=>{let o=()=>{let r=Object.keys(n).filter(e=>e[0]!==`_`),a=Ee();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=q(e.plural)?+e.plural:e.plural);let o=yi(t,r);return i[Yr](e.keypath,o,a)},s=we(Ee(),r),c=q(e.tag)||Pe(e.tag)?e.tag:bi();return Pe(c)?a(c,s,{default:o}):a(c,s,o())}}});function Si(e){return je(e)&&!q(e[0])}function Ci(e,t,n,r){let{slots:i,attrs:o}=t;return()=>{let t=()=>{let t={part:!0},a=Ee();e.locale&&(t.locale=e.locale),q(e.format)?t.key=e.format:Pe(e.format)&&(q(e.format.key)&&(t.key=e.format.key),a=Object.keys(e.format).reduce((t,r)=>n.includes(r)?we(Ee(),t,{[r]:e.format[r]}):t,Ee()));let o=r(e.value,t,a),s=[t.key];return je(o)?s=o.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:o}):[e.value];return Si(r)&&(r[0].key=`${e.type}-${t}`),r}):q(o)&&(s=[o]),s},s=we(Ee(),o),c=q(e.tag)||Pe(e.tag)?e.tag:bi();return Pe(c)?a(c,s,{default:t}):a(c,s,t())}}var wi=G({name:`i18n-n`,props:we({value:{type:Number,required:!0},format:{type:[String,Object]}},vi),setup(e,t){let n=e.i18n||J({useScope:e.scope,__useComponent:!0});return Ci(e,t,wr,(...e)=>n[Zr](...e))}});function Ti(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function Ei(e){let t=t=>{let{instance:n,value:r}=t;if(!n||!n.$)throw Jr(qr.UNEXPECTED_ERROR);let i=Ti(e,n.$),a=Di(r);return[Reflect.apply(i.t,i,[...Oi(a)]),i]};return{created:(e,n)=>{let[r,i]=t(n);ge&&(e.__i18nWatcher=s(i.locale,()=>{n.instance&&n.instance.$forceUpdate()})),e.__composer=i,e.textContent=r},unmounted:e=>{ge&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=Di(t);e.textContent=Reflect.apply(n.t,n,[...Oi(r)])}},getSSRProps:e=>{let[n]=t(e);return{textContent:n}}}}function Di(e){if(q(e))return{path:e};if(Re(e)){if(!(`path`in e))throw Jr(qr.REQUIRED_VALUE,`path`);return e}else throw Jr(qr.INVALID_VALUE)}function Oi(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return q(n)&&(o.locale=n),be(i)&&(o.plural=i),be(a)&&(o.plural=a),[t,s,o]}function ki(e,t,...n){let r=Re(n[0])?n[0]:{};(!Ne(r.globalInstall)||r.globalInstall)&&([xi.name,`I18nT`].forEach(t=>e.component(t,xi)),[wi.name,`I18nN`].forEach(t=>e.component(t,wi)),[Hi.name,`I18nD`].forEach(t=>e.component(t,Hi))),e.directive(`t`,Ei(t))}var Ai=_e(`global-vue-i18n`);function ji(e={}){let t=__VUE_I18N_LEGACY_API__&&Ne(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Ne(e.globalInjection)?e.globalInjection:!0,r=new Map,[i,a]=Mi(e,t),o=_e(``);function s(e){return r.get(e)||null}function c(e,t){r.set(e,t)}function l(e){r.delete(e)}let u={get mode(){return __VUE_I18N_LEGACY_API__&&t?`legacy`:`composition`},async install(e,...r){if(e.__VUE_I18N_SYMBOL__=o,e.provide(e.__VUE_I18N_SYMBOL__,u),Re(r[0])){let e=r[0];u.__composerExtend=e.__composerExtend,u.__vueI18nExtend=e.__vueI18nExtend}let i=null;!t&&n&&(i=Vi(e,u.global)),__VUE_I18N_FULL_INSTALL__&&ki(e,u,...r),__VUE_I18N_LEGACY_API__&&t&&e.mixin(gi(a,a.__composer,u));let s=e.unmount;e.unmount=()=>{i&&i(),u.dispose(),s()}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:s,__setInstance:c,__deleteInstance:l};return u}function J(e={}){let n=ci();if(n==null)throw Jr(qr.MUST_BE_CALL_SETUP_TOP);if(!n.isCE&&n.appContext.app!=null&&!n.appContext.app.__VUE_I18N_SYMBOL__)throw Jr(qr.NOT_INSTALLED);let r=Ni(n),i=Fi(r),a=ai(n),o=Pi(e,a);if(o===`global`)return oi(i,e,a),i;if(o===`parent`){let t=Ii(r,n,e.__useComponent);return t??=i,t}if(o===`isolated`){if(r.mode!==`composition`)throw Jr(qr.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);let a=r,o=we({},e);o.__root=Ii(r,n)||i;let s=pi(o);return a.__composerExtend&&(s[ei]=a.__composerExtend(s)),C()&&t(()=>{let e=s[ei];e&&(e(),delete s[ei])}),s}let s=r,c=s.__getInstance(n);if(c==null){let t=we({},e);`__i18n`in a&&(t.__i18n=a.__i18n),i&&(t.__root=i),c=pi(t),s.__composerExtend&&(c[ei]=s.__composerExtend(c)),Ri(s,n,c),s.__setInstance(n,c)}return c}function Mi(e,t){let n=w(),r=__VUE_I18N_LEGACY_API__&&t?n.run(()=>hi(e)):n.run(()=>pi(e));if(r==null)throw Jr(qr.UNEXPECTED_ERROR);return[n,r]}function Ni(e){let t=m(e.isCE?Ai:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Jr(e.isCE?qr.NOT_INSTALLED_WITH_PROVIDE:qr.UNEXPECTED_ERROR);return t}function Pi(e,t){return Ce(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function Fi(e){return e.mode===`composition`?e.global:e.global.__composer}function Ii(e,t,n=!1){let r=null,i=t.root,a=Li(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let e=t.__getInstance(a);e!=null&&(r=e.__composer,n&&r&&!r[$r]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function Li(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Ri(e,t,n){p(()=>{},t),h(()=>{let r=n;e.__deleteInstance(t);let i=r[ei];i&&(i(),delete r[ei])},t)}var zi=[`locale`,`fallbackLocale`,`availableLocales`],Bi=[`t`,`rt`,`d`,`n`,`tm`,`te`];function Vi(e,t){let n=Object.create(null);return zi.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw Jr(qr.UNEXPECTED_ERROR);let i=T(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,Bi.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw Jr(qr.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)}),()=>{delete e.config.globalProperties.$i18n,Bi.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}var Hi=G({name:`i18n-d`,props:we({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},vi),setup(e,t){let n=e.i18n||J({useScope:e.scope,__useComponent:!0});return Ci(e,t,br,(...e)=>n[Xr](...e))}});if(Kr(),Xn(vn),Qn(Un),er(An),__INTLIFY_PROD_DEVTOOLS__){let e=Oe();e.__INTLIFY__=!0,bn(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var Ui=`/brand/pythinker_banner_dark.svg`;async function Wi(e){let t=typeof navigator<`u`?navigator.clipboard:void 0;if(t&&typeof t.writeText==`function`)try{return await t.writeText(e),!0}catch{}return Ki(e)}function Gi(e){if(typeof e!=`string`)return;let t=typeof navigator<`u`?navigator.clipboard:void 0;t&&typeof t.writeText==`function`||Wi(e)}function Ki(e){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.top=`-9999px`,t.style.left=`-9999px`,t.style.opacity=`0`,document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand(`copy`)}catch{n=!1}finally{document.body.removeChild(t)}return n}var qi={permission:`pythinker-web.permission`,activeWorkspace:`pythinker-active-workspace`,planMode:`pythinker-web.plan-mode`,planArmed:`pythinker-web.plan-armed`,dynamicWorkflowMode:`pythinker-web.dynamic-workflow-mode`,goalMode:`pythinker-web.goal-mode`,discussionPair:`pythinker-web.discussion-pair`,discussionReasoning:`pythinker-web.discussion-reasoning`,uiFontSize:`pythinker-web.ui-font-size`,starredModels:`pythinker-web.starred-models`,unread:`pythinker-web.unread`,onboarded:`pythinker-web.onboarded`,accent:`pythinker-web.accent`,colorScheme:`pythinker-web.color-scheme`,hiddenWorkspaces:`pythinker-web.hidden-workspaces`,collapsedWorkspaces:`pythinker-web.collapsed-workspaces`,workspaceOrder:`pythinker-web.workspace-order`,workspaceNameOverrides:`pythinker-web.workspace-name-overrides`,workspaceSort:`pythinker-web.workspace-sort`,pinnedSessions:`pythinker-web.pinned-sessions`,pinnedCollapsed:`pythinker-web.pinned-collapsed`,recentEmojis:`pythinker-web.recent-emojis`,conversationToc:`pythinker-web.beta-toc`,turnFolding:`pythinker-web.turn-folding`,activityRunFolding:`pythinker-web.activity-run-folding`,notifyOnComplete:`pythinker-web.notify-on-complete`,notifyOnQuestion:`pythinker-web.notify-on-question`,notifyOnApproval:`pythinker-web.notify-on-approval`,soundOnComplete:`pythinker-web.sound-on-complete`,inputHistory:`pythinker-web.input-history`,clientId:`pythinker-web.client-id`,debug:`pythinker-web.debug`,openInLastTarget:`pythinker-web.open-in.last-target`,sidebarCollapsed:`pythinker-web.sidebar-collapsed`,sidebarPinnedHeight:`pythinker-web.sidebar-pinned-height`,sidebarWidth:`pythinker-web.sidebar-width`,codeFont:`pythinker-web.code-font`,contentAlign:`pythinker-web.content-align`,theme:`pythinker-web.theme`,thinking:`pythinker-web.thinking`};function Ji(e){return`pythinker-web.draft.${e&&e.length>0?e:`__new__`}`}function Yi(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Xi(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function Zi(e){try{globalThis.localStorage.removeItem(e)}catch{}}function Qi(e){let t=Yi(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function $i(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function ea(){let e=Yi(qi.unread);if(!e)return{};try{let t=JSON.parse(e);if(!t||typeof t!=`object`)return{};let n={};for(let[e,r]of Object.entries(t))r===!0&&(n[e]=!0);return n}catch{return{}}}function ta(e){let t={...ea()};for(let[n,r]of Object.entries(e))r?t[n]=!0:delete t[n];Xi(qi.unread,JSON.stringify(t))}function na(){let e=Qi(qi.collapsedWorkspaces);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function ra(e){$i(qi.collapsedWorkspaces,Array.from(e))}function ia(){let e=Qi(qi.workspaceOrder);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function aa(e){$i(qi.workspaceOrder,Array.from(e))}function oa(){let e=Qi(qi.workspaceNameOverrides);if(!e||typeof e!=`object`)return{};let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function sa(e){$i(qi.workspaceNameOverrides,e)}function ca(){return Yi(qi.workspaceSort)}function la(e){Xi(qi.workspaceSort,e)}function ua(e,t){if(e.length===0)return null;let n=new Set(e),r=t.filter(e=>n.has(e)),i=e.filter(e=>!t.includes(e));return i.length===0&&r.length===t.length?null:[...i,...r]}function da(e,t){let n=new Map(t.map((e,t)=>[e,t]));return e.toSorted((e,t)=>(n.get(e.id)??-1)-(n.get(t.id)??-1))}function fa(e,t,n,r=`before`){let i=e.indexOf(t),a=e.indexOf(n);if(i===-1||a===-1||i===a)return e;let o=[...e];o.splice(i,1);let s=i(t.get(n.id)??-1/0)-(t.get(e.id)??-1/0))}var ma={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function ha(e){return e.replace(/[&<>"']/g,e=>ma[e]??e)}function ga(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function _a(e,t,n=40){let r=e.replace(/\s+/g,` `).trim();if(r.length===0)return``;let i=t.trim();if(i.length===0)return va(r,n*2);let a=r.toLowerCase().indexOf(i.toLowerCase());if(a<0)return va(r,n*2);let o=Math.max(0,a-n),s=Math.min(r.length,a+i.length+n),c=o>0,l=s`${e}`)}var ba=R(0),xa=[`type`,`disabled`,`aria-label`],Sa=G({__name:`IconButton`,props:{size:{default:`md`},disabled:{type:Boolean},label:{},type:{default:`button`}},setup(e,{expose:t}){let n=R();return t({el:n}),(t,r)=>(c(),W(`button`,{ref_key:`el`,ref:n,class:V([`ui-icon-button`,`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[me(t.$slots,`default`,{},void 0,!0)],10,xa))}}),Y=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Ca=Y(Sa,[[`__scopeId`,`data-v-4b23513f`]]),wa=R(!1),Ta=!1;function Ea(){let e=document.documentElement.dataset.colorScheme;return e===`dark`?!0:e===`light`||typeof window.matchMedia!=`function`?!1:window.matchMedia(`(prefers-color-scheme: dark)`).matches}function Da(){return!Ta&&typeof window<`u`&&typeof document<`u`&&(Ta=!0,wa.value=Ea(),new MutationObserver(()=>{wa.value=Ea()}).observe(document.documentElement,{attributes:!0,attributeFilter:[`data-color-scheme`]}),window.matchMedia?.(`(prefers-color-scheme: dark)`)?.addEventListener(`change`,()=>{wa.value=Ea()})),wa}var Oa={"._sc_":`godot-assets`,".adonisrc.json":`adonis`,".aiexclude":`gemini-ai`,".angular-cli.json":`angular`,".appveyor.yml":`appveyor`,".astylerc":`astyle`,".autorc":`auto`,".babel-plugin-macrosrc":`babel`,".babel-plugin-macrosrc.cjs":`babel`,".babel-plugin-macrosrc.cts":`babel`,".babel-plugin-macrosrc.js":`babel`,".babel-plugin-macrosrc.json":`babel`,".babel-plugin-macrosrc.json5":`babel`,".babel-plugin-macrosrc.jsonc":`babel`,".babel-plugin-macrosrc.mjs":`babel`,".babel-plugin-macrosrc.mts":`babel`,".babel-plugin-macrosrc.toml":`babel`,".babel-plugin-macrosrc.ts":`babel`,".babel-plugin-macrosrc.yaml":`babel`,".babel-plugin-macrosrc.yml":`babel`,".babelrc":`babel`,".babelrc.cjs":`babel`,".babelrc.cts":`babel`,".babelrc.js":`babel`,".babelrc.json":`babel`,".babelrc.json5":`babel`,".babelrc.jsonc":`babel`,".babelrc.mjs":`babel`,".babelrc.mts":`babel`,".babelrc.toml":`babel`,".babelrc.ts":`babel`,".babelrc.yaml":`babel`,".babelrc.yml":`babel`,".bazelignore":`bazel`,".bazelrc":`bazel`,".bazelversion":`bazel`,".biome.json":`biome`,".biome.jsonc":`biome`,".bithoundrc":`bithound`,".blitz.config.compiled.js":`blitz`,".bowerrc":`bower`,".browserslistrc":`browserlist`,".buckconfig":`buck`,".buildignore":`settings`,".bun-version":`bun`,".cfignore":`cloudfoundry`,".clang-format":`settings`,".clang-format-ignore":`settings`,".clang-tidy":`settings`,".clangd":`clangd`,".clinerules":`cline`,".codeclimate.yml":`code-climate`,".codecov.yaml":`codecov`,".codecov.yml":`codecov`,".coderabbit.yaml":`coderabbit-ai`,".coderabbit.yml":`coderabbit-ai`,".commitlint.yaml":`commitlint`,".commitlint.yml":`commitlint`,".commitlintrc":`commitlint`,".commitlintrc.cjs":`commitlint`,".commitlintrc.cts":`commitlint`,".commitlintrc.js":`commitlint`,".commitlintrc.json":`commitlint`,".commitlintrc.json5":`commitlint`,".commitlintrc.jsonc":`commitlint`,".commitlintrc.mjs":`commitlint`,".commitlintrc.mts":`commitlint`,".commitlintrc.toml":`commitlint`,".commitlintrc.ts":`commitlint`,".commitlintrc.yaml":`commitlint`,".commitlintrc.yml":`commitlint`,".conf":`settings`,".config/babel-plugin-macrosrc":`babel`,".config/babel-plugin-macrosrc.cjs":`babel`,".config/babel-plugin-macrosrc.cts":`babel`,".config/babel-plugin-macrosrc.js":`babel`,".config/babel-plugin-macrosrc.json":`babel`,".config/babel-plugin-macrosrc.json5":`babel`,".config/babel-plugin-macrosrc.jsonc":`babel`,".config/babel-plugin-macrosrc.mjs":`babel`,".config/babel-plugin-macrosrc.mts":`babel`,".config/babel-plugin-macrosrc.toml":`babel`,".config/babel-plugin-macrosrc.ts":`babel`,".config/babel-plugin-macrosrc.yaml":`babel`,".config/babel-plugin-macrosrc.yml":`babel`,".config/babelrc":`babel`,".config/babelrc.cjs":`babel`,".config/babelrc.cts":`babel`,".config/babelrc.js":`babel`,".config/babelrc.json":`babel`,".config/babelrc.json5":`babel`,".config/babelrc.jsonc":`babel`,".config/babelrc.mjs":`babel`,".config/babelrc.mts":`babel`,".config/babelrc.toml":`babel`,".config/babelrc.ts":`babel`,".config/babelrc.yaml":`babel`,".config/babelrc.yml":`babel`,".config/commitlintrc":`commitlint`,".config/commitlintrc.cjs":`commitlint`,".config/commitlintrc.cts":`commitlint`,".config/commitlintrc.js":`commitlint`,".config/commitlintrc.json":`commitlint`,".config/commitlintrc.json5":`commitlint`,".config/commitlintrc.jsonc":`commitlint`,".config/commitlintrc.mjs":`commitlint`,".config/commitlintrc.mts":`commitlint`,".config/commitlintrc.toml":`commitlint`,".config/commitlintrc.ts":`commitlint`,".config/commitlintrc.yaml":`commitlint`,".config/commitlintrc.yml":`commitlint`,".config/cracorc":`craco`,".config/cracorc.cjs":`craco`,".config/cracorc.cts":`craco`,".config/cracorc.js":`craco`,".config/cracorc.json":`craco`,".config/cracorc.json5":`craco`,".config/cracorc.jsonc":`craco`,".config/cracorc.mjs":`craco`,".config/cracorc.mts":`craco`,".config/cracorc.toml":`craco`,".config/cracorc.ts":`craco`,".config/cracorc.yaml":`craco`,".config/cracorc.yml":`craco`,".config/eslintrc":`eslint`,".config/eslintrc.cjs":`eslint`,".config/eslintrc.cts":`eslint`,".config/eslintrc.js":`eslint`,".config/eslintrc.json":`eslint`,".config/eslintrc.json5":`eslint`,".config/eslintrc.jsonc":`eslint`,".config/eslintrc.mjs":`eslint`,".config/eslintrc.mts":`eslint`,".config/eslintrc.toml":`eslint`,".config/eslintrc.ts":`eslint`,".config/eslintrc.yaml":`eslint`,".config/eslintrc.yml":`eslint`,".config/graphqlrc":`graphql`,".config/graphqlrc.cjs":`graphql`,".config/graphqlrc.cts":`graphql`,".config/graphqlrc.js":`graphql`,".config/graphqlrc.json":`graphql`,".config/graphqlrc.json5":`graphql`,".config/graphqlrc.jsonc":`graphql`,".config/graphqlrc.mjs":`graphql`,".config/graphqlrc.mts":`graphql`,".config/graphqlrc.toml":`graphql`,".config/graphqlrc.ts":`graphql`,".config/graphqlrc.yaml":`graphql`,".config/graphqlrc.yml":`graphql`,".config/huskyrc":`husky`,".config/huskyrc.cjs":`husky`,".config/huskyrc.cts":`husky`,".config/huskyrc.js":`husky`,".config/huskyrc.json":`husky`,".config/huskyrc.json5":`husky`,".config/huskyrc.jsonc":`husky`,".config/huskyrc.mjs":`husky`,".config/huskyrc.mts":`husky`,".config/huskyrc.toml":`husky`,".config/huskyrc.ts":`husky`,".config/huskyrc.yaml":`husky`,".config/huskyrc.yml":`husky`,".config/postcssrc":`postcss`,".config/postcssrc.cjs":`postcss`,".config/postcssrc.cts":`postcss`,".config/postcssrc.js":`postcss`,".config/postcssrc.json":`postcss`,".config/postcssrc.json5":`postcss`,".config/postcssrc.jsonc":`postcss`,".config/postcssrc.mjs":`postcss`,".config/postcssrc.mts":`postcss`,".config/postcssrc.toml":`postcss`,".config/postcssrc.ts":`postcss`,".config/postcssrc.yaml":`postcss`,".config/postcssrc.yml":`postcss`,".config/posthtmlrc":`posthtml`,".config/posthtmlrc.cjs":`posthtml`,".config/posthtmlrc.cts":`posthtml`,".config/posthtmlrc.js":`posthtml`,".config/posthtmlrc.json":`posthtml`,".config/posthtmlrc.json5":`posthtml`,".config/posthtmlrc.jsonc":`posthtml`,".config/posthtmlrc.mjs":`posthtml`,".config/posthtmlrc.mts":`posthtml`,".config/posthtmlrc.toml":`posthtml`,".config/posthtmlrc.ts":`posthtml`,".config/posthtmlrc.yaml":`posthtml`,".config/posthtmlrc.yml":`posthtml`,".config/prettierrc":`prettier`,".config/prettierrc.cjs":`prettier`,".config/prettierrc.cts":`prettier`,".config/prettierrc.js":`prettier`,".config/prettierrc.json":`prettier`,".config/prettierrc.json5":`prettier`,".config/prettierrc.jsonc":`prettier`,".config/prettierrc.mjs":`prettier`,".config/prettierrc.mts":`prettier`,".config/prettierrc.toml":`prettier`,".config/prettierrc.ts":`prettier`,".config/prettierrc.yaml":`prettier`,".config/prettierrc.yml":`prettier`,".config/puppeteerrc":`puppeteer`,".config/puppeteerrc.cjs":`puppeteer`,".config/puppeteerrc.cts":`puppeteer`,".config/puppeteerrc.js":`puppeteer`,".config/puppeteerrc.json":`puppeteer`,".config/puppeteerrc.json5":`puppeteer`,".config/puppeteerrc.jsonc":`puppeteer`,".config/puppeteerrc.mjs":`puppeteer`,".config/puppeteerrc.mts":`puppeteer`,".config/puppeteerrc.toml":`puppeteer`,".config/puppeteerrc.ts":`puppeteer`,".config/puppeteerrc.yaml":`puppeteer`,".config/puppeteerrc.yml":`puppeteer`,".config/releaserc":`semantic-release`,".config/releaserc.cjs":`semantic-release`,".config/releaserc.cts":`semantic-release`,".config/releaserc.js":`semantic-release`,".config/releaserc.json":`semantic-release`,".config/releaserc.json5":`semantic-release`,".config/releaserc.jsonc":`semantic-release`,".config/releaserc.mjs":`semantic-release`,".config/releaserc.mts":`semantic-release`,".config/releaserc.toml":`semantic-release`,".config/releaserc.ts":`semantic-release`,".config/releaserc.yaml":`semantic-release`,".config/releaserc.yml":`semantic-release`,".config/stylelintrc":`stylelint`,".config/stylelintrc.cjs":`stylelint`,".config/stylelintrc.cts":`stylelint`,".config/stylelintrc.js":`stylelint`,".config/stylelintrc.json":`stylelint`,".config/stylelintrc.json5":`stylelint`,".config/stylelintrc.jsonc":`stylelint`,".config/stylelintrc.mjs":`stylelint`,".config/stylelintrc.mts":`stylelint`,".config/stylelintrc.toml":`stylelint`,".config/stylelintrc.ts":`stylelint`,".config/stylelintrc.yaml":`stylelint`,".config/stylelintrc.yml":`stylelint`,".config/svgrrc":`svgr`,".config/svgrrc.cjs":`svgr`,".config/svgrrc.cts":`svgr`,".config/svgrrc.js":`svgr`,".config/svgrrc.json":`svgr`,".config/svgrrc.json5":`svgr`,".config/svgrrc.jsonc":`svgr`,".config/svgrrc.mjs":`svgr`,".config/svgrrc.mts":`svgr`,".config/svgrrc.toml":`svgr`,".config/svgrrc.ts":`svgr`,".config/svgrrc.yaml":`svgr`,".config/svgrrc.yml":`svgr`,".config/syncpackrc":`syncpack`,".config/syncpackrc.cjs":`syncpack`,".config/syncpackrc.cts":`syncpack`,".config/syncpackrc.js":`syncpack`,".config/syncpackrc.json":`syncpack`,".config/syncpackrc.json5":`syncpack`,".config/syncpackrc.jsonc":`syncpack`,".config/syncpackrc.mjs":`syncpack`,".config/syncpackrc.mts":`syncpack`,".config/syncpackrc.toml":`syncpack`,".config/syncpackrc.ts":`syncpack`,".config/syncpackrc.yaml":`syncpack`,".config/syncpackrc.yml":`syncpack`,".copilotignore":`copilot`,".coverage":`python-misc`,".coveragerc":`python-misc`,".cracorc":`craco`,".cracorc.cjs":`craco`,".cracorc.cts":`craco`,".cracorc.js":`craco`,".cracorc.json":`craco`,".cracorc.json5":`craco`,".cracorc.jsonc":`craco`,".cracorc.mjs":`craco`,".cracorc.mts":`craco`,".cracorc.toml":`craco`,".cracorc.ts":`craco`,".cracorc.yaml":`craco`,".cracorc.yml":`craco`,".cursor":`cursor`,".cursor.json":`cursor`,".cursorignore":`cursor`,".cursorindexingignore":`cursor`,".cursorrc":`cursor`,".cursorrules":`cursor`,".cz.json":`commitizen`,".cz.toml":`commitizen`,".cz.yaml":`commitizen`,".cz.yml":`commitizen`,".czrc":`commitizen`,".deepsource.toml":`deepsource`,".dev.vars":`tune`,".drone.yml":`drone`,".easignore":`expo`,".ecrc":`editorconfig`,".editorconfig":`editorconfig`,".editorconfig-checker.json":`editorconfig`,".ember-cli":`ember`,".ember-cli.js":`ember`,".env.alpha":`tune`,".env.defaults":`tune`,".env.dev":`tune`,".env.dev.local":`tune`,".env.development":`tune`,".env.development.local":`tune`,".env.dist":`tune`,".env.e2e":`tune`,".env.example":`tune`,".env.local":`tune`,".env.preview":`tune`,".env.prod":`tune`,".env.prod.example":`tune`,".env.prod.local":`tune`,".env.production":`tune`,".env.production.example":`tune`,".env.production.local":`tune`,".env.qa":`tune`,".env.qa.local":`tune`,".env.sample":`tune`,".env.schema":`tune`,".env.sentry-build-plugin":`sentry`,".env.stage":`tune`,".env.staging":`tune`,".env.staging.local":`tune`,".env.stg":`tune`,".env.stg.local":`tune`,".env.template":`tune`,".env.test":`tune`,".env.test.local":`tune`,".env.testing":`tune`,".env.uat":`tune`,".envrc":`console`,".esformatter":`json`,".eslintcache":`eslint`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc-jsdoc.js":`eslint`,".eslintrc-md.js":`eslint`,".eslintrc.base.json":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.cts":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.json5":`eslint`,".eslintrc.jsonc":`eslint`,".eslintrc.mjs":`eslint`,".eslintrc.mts":`eslint`,".eslintrc.toml":`eslint`,".eslintrc.ts":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".esmrc":`nodejs`,".firebaserc":`firebase`,".flowconfig":`flow`,".gardenignore":`garden`,".gcloudignore":`gcp`,".gdignore":`godot-assets`,".git":`git`,".git-blame-ignore":`git`,".git-blame-ignore-revs":`git`,".git-for-windows-updater":`git`,".gitattributes":`git`,".gitattributes-global":`git`,".gitattributes_global":`git`,".gitconfig":`git`,".github/funding.yml":`github-sponsors`,".github/labeler.yaml":`label`,".github/labeler.yml":`label`,".gitignore":`git`,".gitignore-global":`git`,".gitignore_global":`git`,".gitinclude":`git`,".gitkeep":`git`,".gitmessage":`git`,".gitmodules":`git`,".gitpod.yml":`gitpod`,".gitpreserve":`git`,".graphqlconfig":`graphql`,".graphqlrc":`graphql`,".graphqlrc.cjs":`graphql`,".graphqlrc.cts":`graphql`,".graphqlrc.js":`graphql`,".graphqlrc.json":`graphql`,".graphqlrc.json5":`graphql`,".graphqlrc.jsonc":`graphql`,".graphqlrc.mjs":`graphql`,".graphqlrc.mts":`graphql`,".graphqlrc.toml":`graphql`,".graphqlrc.ts":`graphql`,".graphqlrc.yaml":`graphql`,".graphqlrc.yml":`graphql`,".hadolint.yaml":`hadolint`,".hadolint.yml":`hadolint`,".happo.cjs":`happo`,".happo.js":`happo`,".happo.mjs":`happo`,".helmignore":`helm`,".hg":`mercurial`,".hgflow":`mercurial`,".hgignore":`mercurial`,".hgrc":`mercurial`,".hgtags":`mercurial`,".hhconfig":`hack`,".hintrc":`webhint`,".histoire.cjs":`histoire`,".histoire.cts":`histoire`,".histoire.js":`histoire`,".histoire.mjs":`histoire`,".histoire.mts":`histoire`,".histoire.ts":`histoire`,".htaccess":`xml`,".htpasswd":`key`,".hushlogin":`console`,".huskyrc":`husky`,".huskyrc.cjs":`husky`,".huskyrc.cts":`husky`,".huskyrc.js":`husky`,".huskyrc.json":`husky`,".huskyrc.json5":`husky`,".huskyrc.jsonc":`husky`,".huskyrc.mjs":`husky`,".huskyrc.mts":`husky`,".huskyrc.toml":`husky`,".huskyrc.ts":`husky`,".huskyrc.yaml":`husky`,".huskyrc.yml":`husky`,".io-config.json":`ionic`,".istanbul.yml":`istanbul`,".jestrc":`jest`,".jestrc.js":`jest`,".jestrc.json":`jest`,".jsbeautifyrc":`json`,".jscsrc":`json`,".jshintignore":`settings`,".jshintrc":`json`,".justfile":`just`,".k8s.yaml":`kubernetes`,".k8s.yml":`kubernetes`,".keep":`git`,".kl":`kl`,".knip.json":`knip`,".knip.jsonc":`knip`,".latexmkrc":`latexmk`,".lefthook-local.json":`lefthook`,".lefthook-local.toml":`lefthook`,".lefthook-local.yaml":`lefthook`,".lefthook-local.yml":`lefthook`,".lefthook.json":`lefthook`,".lefthook.toml":`lefthook`,".lefthook.yaml":`lefthook`,".lefthook.yml":`lefthook`,".lefthookrc":`lefthook`,".liaraignore":`liara`,".lighthouserc.cjs":`lighthouse`,".lighthouserc.js":`lighthouse`,".lighthouserc.json":`lighthouse`,".lighthouserc.yaml":`lighthouse`,".lighthouserc.yml":`lighthouse`,".lintstagedrc":`lintstaged`,".lintstagedrc.cjs":`lintstaged`,".lintstagedrc.js":`lintstaged`,".lintstagedrc.json":`lintstaged`,".lintstagedrc.mjs":`lintstaged`,".lintstagedrc.yaml":`lintstaged`,".lintstagedrc.yml":`lintstaged`,".luacheckrc":`lua`,".luaurc":`luau`,".mailmap":`email`,".markdownlint-cli2.cjs":`markdownlint`,".markdownlint-cli2.jsonc":`markdownlint`,".markdownlint-cli2.mjs":`markdownlint`,".markdownlint-cli2.yaml":`markdownlint`,".markdownlint.json":`markdownlint`,".markdownlint.jsonc":`markdownlint`,".markdownlint.yaml":`markdownlint`,".markdownlint.yml":`markdownlint`,".markdownlintignore":`markdownlint`,".mcattributes":`minecraft`,".mcdefinitions":`minecraft`,".mcignore":`minecraft`,".mincloudrc":`ifanr-cloud`,".mjmlconfig":`mjml`,".mocharc.cjs":`mocha`,".mocharc.js":`mocha`,".mocharc.json":`mocha`,".mocharc.jsonc":`mocha`,".mocharc.yaml":`mocha`,".mocharc.yml":`mocha`,".modernizrrc":`modernizr`,".modernizrrc.js":`modernizr`,".modernizrrc.json":`modernizr`,".mrconfig":`settings`,".nano-staged.cjs":`nano-staged`,".nano-staged.js":`nano-staged`,".nano-staged.json":`nano-staged`,".nano-staged.mjs":`nano-staged`,".nanostagedrc":`nano-staged`,".nest-cli.json":`nest`,".nestconfig.json":`nest`,".node-version":`nodejs`,".nowignore":`vercel`,".npmignore":`npm`,".npmrc":`npm`,".nuspec":`nuget`,".nuxtignore":`nuxt`,".nuxtrc":`nuxt`,".nvmrc":`nodejs`,".nxignore":`nx`,".nycrc":`istanbul`,".nycrc.json":`istanbul`,".nycrc.yaml":`istanbul`,".nycrc.yml":`istanbul`,".oxfmtrc.json":`oxc`,".oxfmtrc.jsonc":`oxc`,".oxlintrc.json":`oxc`,".oxlintrc.jsonc":`oxc`,".packshiprc":`packship`,".packshiprc.js":`packship`,".packshiprc.json":`packship`,".packshiprc.ts":`packship`,".parcelrc":`parcel`,".pdm-python":`pdm`,".percy.yml":`percy`,".php-cs-fixer.dist.php":`php-cs-fixer`,".php-cs-fixer.php":`php-cs-fixer`,".php_cs":`php-cs-fixer`,".php_cs.dist":`php-cs-fixer`,".php_cs.dist.php":`php-cs-fixer`,".php_cs.php":`php-cs-fixer`,".phpunit-watcher.yml":`phpunit`,".phpunit.result.cache":`phpunit`,".pnpmfile.cjs":`pnpm`,".postcssrc":`postcss`,".postcssrc.cjs":`postcss`,".postcssrc.cts":`postcss`,".postcssrc.js":`postcss`,".postcssrc.json":`postcss`,".postcssrc.json5":`postcss`,".postcssrc.jsonc":`postcss`,".postcssrc.mjs":`postcss`,".postcssrc.mts":`postcss`,".postcssrc.toml":`postcss`,".postcssrc.ts":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".posthtmlrc":`posthtml`,".posthtmlrc.cjs":`posthtml`,".posthtmlrc.cts":`posthtml`,".posthtmlrc.js":`posthtml`,".posthtmlrc.json":`posthtml`,".posthtmlrc.json5":`posthtml`,".posthtmlrc.jsonc":`posthtml`,".posthtmlrc.mjs":`posthtml`,".posthtmlrc.mts":`posthtml`,".posthtmlrc.toml":`posthtml`,".posthtmlrc.ts":`posthtml`,".posthtmlrc.yaml":`posthtml`,".posthtmlrc.yml":`posthtml`,".pre-commit-config.yaml":`pre-commit`,".pre-commit-hooks.yaml":`pre-commit`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.cts":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.json5":`prettier`,".prettierrc.jsonc":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.mts":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.ts":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".pubignore":`dart`,".pug-lintrc":`pug`,".pug-lintrc.js":`pug`,".pug-lintrc.json":`pug`,".puppeteerrc":`puppeteer`,".puppeteerrc.cjs":`puppeteer`,".puppeteerrc.cts":`puppeteer`,".puppeteerrc.js":`puppeteer`,".puppeteerrc.json":`puppeteer`,".puppeteerrc.json5":`puppeteer`,".puppeteerrc.jsonc":`puppeteer`,".puppeteerrc.mjs":`puppeteer`,".puppeteerrc.mts":`puppeteer`,".puppeteerrc.toml":`puppeteer`,".puppeteerrc.ts":`puppeteer`,".puppeteerrc.yaml":`puppeteer`,".puppeteerrc.yml":`puppeteer`,".pylintrc":`python-misc`,".python-version":`python-misc`,".qa-mincloudrc":`ifanr-cloud`,".release-it.cjs":`rocket`,".release-it.js":`rocket`,".release-it.json":`rocket`,".release-it.toml":`rocket`,".release-it.ts":`rocket`,".release-it.yaml":`rocket`,".release-it.yml":`rocket`,".release-plz.toml":`rocket`,".releaserc":`semantic-release`,".releaserc.cjs":`semantic-release`,".releaserc.cts":`semantic-release`,".releaserc.js":`semantic-release`,".releaserc.json":`semantic-release`,".releaserc.json5":`semantic-release`,".releaserc.jsonc":`semantic-release`,".releaserc.mjs":`semantic-release`,".releaserc.mts":`semantic-release`,".releaserc.toml":`semantic-release`,".releaserc.ts":`semantic-release`,".releaserc.yaml":`semantic-release`,".releaserc.yml":`semantic-release`,".remarkignore":`remark`,".remarkrc":`remark`,".remarkrc.cjs":`remark`,".remarkrc.js":`remark`,".remarkrc.json":`remark`,".remarkrc.mjs":`remark`,".remarkrc.yaml":`remark`,".remarkrc.yml":`remark`,".renovaterc":`renovate`,".renovaterc.json":`renovate`,".replit":`replit`,".rhistory":`r`,".rspec":`rspec`,".rubocop-todo.yml":`rubocop`,".rubocop.yml":`rubocop`,".rubocop_todo.yml":`rubocop`,".ruby-version":`ruby`,".ruff.toml":`ruff`,".scrapy":`python-misc`,".secrets":`key`,".semgrepignore":`semgrep`,".sentryclirc":`sentry`,".sequelizerc":`sequelize`,".shellcheckrc":`shellcheck`,".slugignore":`slug`,".snyk":`snyk`,".sonarcloud.properties":`sonarcloud`,".stackblitzrc":`stackblitz`,".steadybit.yaml":`steadybit`,".steadybit.yml":`steadybit`,".stryker.conf.cjs":`stryker`,".stryker.conf.js":`stryker`,".stryker.conf.json":`stryker`,".stryker.conf.mjs":`stryker`,".stryker.config.cjs":`stryker`,".stryker.config.js":`stryker`,".stryker.config.json":`stryker`,".stryker.config.mjs":`stryker`,".stylelintcache":`stylelint`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.cts":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.json5":`stylelint`,".stylelintrc.jsonc":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.mts":`stylelint`,".stylelintrc.toml":`stylelint`,".stylelintrc.ts":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".svgrrc":`svgr`,".svgrrc.cjs":`svgr`,".svgrrc.cts":`svgr`,".svgrrc.js":`svgr`,".svgrrc.json":`svgr`,".svgrrc.json5":`svgr`,".svgrrc.jsonc":`svgr`,".svgrrc.mjs":`svgr`,".svgrrc.mts":`svgr`,".svgrrc.toml":`svgr`,".svgrrc.ts":`svgr`,".svgrrc.yaml":`svgr`,".svgrrc.yml":`svgr`,".swift-format":`swift`,".swift-version":`swift`,".swiftformat":`swift`,".syncpackrc":`syncpack`,".syncpackrc.cjs":`syncpack`,".syncpackrc.cts":`syncpack`,".syncpackrc.js":`syncpack`,".syncpackrc.json":`syncpack`,".syncpackrc.json5":`syncpack`,".syncpackrc.jsonc":`syncpack`,".syncpackrc.mjs":`syncpack`,".syncpackrc.mts":`syncpack`,".syncpackrc.toml":`syncpack`,".syncpackrc.ts":`syncpack`,".syncpackrc.yaml":`syncpack`,".syncpackrc.yml":`syncpack`,".taskrc.yaml":`taskfile`,".taskrc.yml":`taskfile`,".taurignore":`tauri`,".tazerc":`taze`,".tazerc.json":`taze`,".textlintignore":`textlint`,".textlintrc":`textlint`,".textlintrc.cjs":`textlint`,".textlintrc.js":`textlint`,".textlintrc.json":`textlint`,".textlintrc.yaml":`textlint`,".textlintrc.yml":`textlint`,".tobimake":`tobimake`,".travis.yml":`travis`,".umirc.cjs":`umi`,".umirc.cts":`umi`,".umirc.js":`umi`,".umirc.mjs":`umi`,".umirc.mts":`umi`,".umirc.ts":`umi`,".uv.toml":`uv`,".vars":`tune`,".vercelignore":`vercel`,".vfl":`vfl`,".vsconfig":`visualstudio`,".vuerc":`vue-config`,".wakatime-project":`wakatime`,".watchmanconfig":`watchman`,".whitesource":`json`,".yardopts":`settings`,".yarn-integrity":`yarn`,".yarnclean":`yarn`,".yarnrc":`yarn`,".yarnrc.yaml":`yarn`,".yarnrc.yml":`yarn`,_sc_:`godot-assets`,ace:`adonis`,"amplify.yml":`amplify`,"androidmanifest.xml":`android`,"angular-cli.json":`angular`,"angular.json":`angular`,apkbuild:`console`,"apollo.config.js":`apollo`,appfile:`fastlane`,appraisals:`ruby`,"appveyor.yml":`appveyor`,"appwrite.js":`appwrite`,"appwrite.json":`appwrite`,"appwrite.ts":`appwrite`,architecture:`architecture`,"architecture.md":`architecture`,"architecture.rst":`architecture`,"architecture.txt":`architecture`,artisan:`laravel`,"astro.config.cjs":`astro-config`,"astro.config.cts":`astro-config`,"astro.config.js":`astro-config`,"astro.config.mjs":`astro-config`,"astro.config.mts":`astro-config`,"astro.config.ts":`astro-config`,"aurelia.json":`aurelia`,authors:`authors`,"authors.md":`authors`,"authors.rst":`authors`,"authors.txt":`authors`,"auto-config.js":`auto`,"auto-config.json":`auto`,"auto-config.ts":`auto`,"auto-config.yaml":`auto`,"auto-config.yml":`auto`,"auto.config.js":`auto`,"auto.config.ts":`auto`,"azure-pipelines-main.yaml":`azure-pipelines`,"azure-pipelines-main.yml":`azure-pipelines`,"azure-pipelines.yaml":`azure-pipelines`,"azure-pipelines.yml":`azure-pipelines`,"babel-plugin-macros.config.cjs":`babel`,"babel-plugin-macros.config.cts":`babel`,"babel-plugin-macros.config.js":`babel`,"babel-plugin-macros.config.json":`babel`,"babel-plugin-macros.config.json5":`babel`,"babel-plugin-macros.config.jsonc":`babel`,"babel-plugin-macros.config.mjs":`babel`,"babel-plugin-macros.config.mts":`babel`,"babel-plugin-macros.config.toml":`babel`,"babel-plugin-macros.config.ts":`babel`,"babel-plugin-macros.config.yaml":`babel`,"babel-plugin-macros.config.yml":`babel`,"babel-transform.js":`babel`,"babel.config.cjs":`babel`,"babel.config.cts":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.json5":`babel`,"babel.config.jsonc":`babel`,"babel.config.mjs":`babel`,"babel.config.mts":`babel`,"babel.config.toml":`babel`,"babel.config.ts":`babel`,"babel.config.yaml":`babel`,"babel.config.yml":`babel`,bashrc_apple_terminal:`console`,berksfile:`ruby`,"berksfile.lock":`ruby`,"biome.json":`biome`,"biome.jsonc":`biome`,"bitbucket-pipelines.yaml":`bitbucket`,"bitbucket-pipelines.yml":`bitbucket`,"blitz.config.js":`blitz`,"blitz.config.ts":`blitz`,"bower.json":`bower`,brewfile:`ruby`,browserslist:`browserlist`,"buildkite.yaml":`buildkite`,"buildkite.yml":`buildkite`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"cabal.project":`cabal`,"cabal.project.freeze":`cabal`,"cabal.project.local":`cabal`,caddyfile:`caddy`,"capacitor.config.json":`capacitor`,"capacitor.config.ts":`capacitor`,capfile:`ruby`,"cdp.pid":`json`,"celerybeat-schedule":`python-misc`,"celerybeat.pid":`python-misc`,changelog:`changelog`,"changelog.md":`changelog`,"changelog.rst":`changelog`,"changelog.txt":`changelog`,changes:`changelog`,"changes.md":`changelog`,"changes.rst":`changelog`,"changes.txt":`changelog`,cheffile:`ruby`,"chromatic.config.json":`chromatic`,"circle.yml":`circleci`,"citation.cff":`citation`,"claude.local.md":`claude`,"claude.md":`claude`,"cmakecache.txt":`cmake`,"cmakelists.txt":`cmake`,"cmakepresets.json":`cmake`,cname:`http`,code_of_conduct:`conduct`,"code_of_conduct.md":`conduct`,"code_of_conduct.txt":`conduct`,"codecov.yaml":`codecov`,"codecov.yml":`codecov`,codeowners:`codeowners`,"commit-msg":`console`,commit_editmsg:`git`,"commitlint.config.cjs":`commitlint`,"commitlint.config.cts":`commitlint`,"commitlint.config.js":`commitlint`,"commitlint.config.json":`commitlint`,"commitlint.config.json5":`commitlint`,"commitlint.config.jsonc":`commitlint`,"commitlint.config.mjs":`commitlint`,"commitlint.config.mts":`commitlint`,"commitlint.config.toml":`commitlint`,"commitlint.config.ts":`commitlint`,"commitlint.config.yaml":`commitlint`,"commitlint.config.yml":`commitlint`,"compile_flags.txt":`settings`,"compose.alpha.yaml":`docker`,"compose.alpha.yml":`docker`,"compose.beta.yaml":`docker`,"compose.beta.yml":`docker`,"compose.ci.yaml":`docker`,"compose.ci.yml":`docker`,"compose.dev.yaml":`docker`,"compose.dev.yml":`docker`,"compose.development.yaml":`docker`,"compose.development.yml":`docker`,"compose.local.yaml":`docker`,"compose.local.yml":`docker`,"compose.override.yaml":`docker`,"compose.override.yml":`docker`,"compose.prod.yaml":`docker`,"compose.prod.yml":`docker`,"compose.production.yaml":`docker`,"compose.production.yml":`docker`,"compose.stage.yaml":`docker`,"compose.stage.yml":`docker`,"compose.staging.yaml":`docker`,"compose.staging.yml":`docker`,"compose.test.yaml":`docker`,"compose.test.yml":`docker`,"compose.testing.yaml":`docker`,"compose.testing.yml":`docker`,"compose.web.yaml":`docker`,"compose.web.yml":`docker`,"compose.worker.yaml":`docker`,"compose.worker.yml":`docker`,"compose.yaml":`docker`,"compose.yml":`docker`,"composer.lock":`json`,"concourse.yml":`concourse`,containerfile:`docker`,"containerfile.alpha":`docker`,"containerfile.beta":`docker`,"containerfile.ci":`docker`,"containerfile.dev":`docker`,"containerfile.development":`docker`,"containerfile.local":`docker`,"containerfile.prod":`docker`,"containerfile.production":`docker`,"containerfile.stage":`docker`,"containerfile.staging":`docker`,"containerfile.test":`docker`,"containerfile.testing":`docker`,"containerfile.web":`docker`,"containerfile.worker":`docker`,"contentlayer.config.cjs":`contentlayer`,"contentlayer.config.cts":`contentlayer`,"contentlayer.config.js":`contentlayer`,"contentlayer.config.mjs":`contentlayer`,"contentlayer.config.mts":`contentlayer`,"contentlayer.config.ts":`contentlayer`,contributing:`contributing`,"contributing.md":`contributing`,"contributing.rst":`contributing`,"contributing.txt":`contributing`,contributors:`authors`,"contributors.md":`authors`,"contributors.rst":`authors`,"contributors.txt":`authors`,"copilot-instructions.md":`copilot`,copying:`license`,"copying.md":`license`,"copying.rst":`license`,"copying.txt":`license`,copyright:`license`,"copyright.md":`license`,"copyright.rst":`license`,"copyright.txt":`license`,"craco.config.cjs":`craco`,"craco.config.cts":`craco`,"craco.config.js":`craco`,"craco.config.json":`craco`,"craco.config.json5":`craco`,"craco.config.jsonc":`craco`,"craco.config.mjs":`craco`,"craco.config.mts":`craco`,"craco.config.toml":`craco`,"craco.config.ts":`craco`,"craco.config.yaml":`craco`,"craco.config.yml":`craco`,credits:`credits`,"credits.md":`credits`,"credits.rst":`credits`,"credits.txt":`credits`,"cypress.config.cjs":`cypress`,"cypress.config.cts":`cypress`,"cypress.config.js":`cypress`,"cypress.config.mjs":`cypress`,"cypress.config.mts":`cypress`,"cypress.config.ts":`cypress`,"cypress.env.json":`cypress`,"cypress.json":`cypress`,"cz.json":`commitizen`,"cz.toml":`commitizen`,"cz.yaml":`commitizen`,"cz.yml":`commitizen`,dangerfile:`ruby`,deliverfile:`ruby`,"deno.json":`deno`,"deno.jsonc":`deno`,"deno.lock":`deno`,"dependabot.yaml":`dependabot`,"dependabot.yml":`dependabot`,"docker-compose.alpha.yaml":`docker`,"docker-compose.alpha.yml":`docker`,"docker-compose.beta.yaml":`docker`,"docker-compose.beta.yml":`docker`,"docker-compose.ci.yaml":`docker`,"docker-compose.ci.yml":`docker`,"docker-compose.dev.yaml":`docker`,"docker-compose.dev.yml":`docker`,"docker-compose.development.yaml":`docker`,"docker-compose.development.yml":`docker`,"docker-compose.local.yaml":`docker`,"docker-compose.local.yml":`docker`,"docker-compose.override.yaml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.prod.yaml":`docker`,"docker-compose.prod.yml":`docker`,"docker-compose.production.yaml":`docker`,"docker-compose.production.yml":`docker`,"docker-compose.stage.yaml":`docker`,"docker-compose.stage.yml":`docker`,"docker-compose.staging.yaml":`docker`,"docker-compose.staging.yml":`docker`,"docker-compose.test.yaml":`docker`,"docker-compose.test.yml":`docker`,"docker-compose.testing.yaml":`docker`,"docker-compose.testing.yml":`docker`,"docker-compose.web.yaml":`docker`,"docker-compose.web.yml":`docker`,"docker-compose.worker.yaml":`docker`,"docker-compose.worker.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"dockerfile.alpha":`docker`,"dockerfile.beta":`docker`,"dockerfile.ci":`docker`,"dockerfile.dev":`docker`,"dockerfile.development":`docker`,"dockerfile.local":`docker`,"dockerfile.prod":`docker`,"dockerfile.production":`docker`,"dockerfile.stage":`docker`,"dockerfile.staging":`docker`,"dockerfile.test":`docker`,"dockerfile.testing":`docker`,"dockerfile.web":`docker`,"dockerfile.windows":`docker`,"dockerfile.worker":`docker`,"drizzle.config.dev.js":`drizzle`,"drizzle.config.dev.json":`drizzle`,"drizzle.config.dev.ts":`drizzle`,"drizzle.config.js":`drizzle`,"drizzle.config.json":`drizzle`,"drizzle.config.prod.js":`drizzle`,"drizzle.config.prod.json":`drizzle`,"drizzle.config.prod.ts":`drizzle`,"drizzle.config.ts":`drizzle`,"duc.fbs":`duc`,dune:`dune`,"dune-project":`dune`,"dune-workspace":`dune`,"dune-workspace.dev":`dune`,"eas.json":`expo`,"ecosystem.config.cjs":`pm2-ecosystem`,"ecosystem.config.cts":`pm2-ecosystem`,"ecosystem.config.js":`pm2-ecosystem`,"ecosystem.config.mjs":`pm2-ecosystem`,"ecosystem.config.mts":`pm2-ecosystem`,"ecosystem.config.ts":`pm2-ecosystem`,"ember-cli-builds.js":`ember`,"esbuild.cjs":`esbuild`,"esbuild.config.cjs":`esbuild`,"esbuild.config.cts":`esbuild`,"esbuild.config.js":`esbuild`,"esbuild.config.mjs":`esbuild`,"esbuild.config.mts":`esbuild`,"esbuild.config.ts":`esbuild`,"esbuild.cts":`esbuild`,"esbuild.dev.cjs":`esbuild`,"esbuild.dev.cts":`esbuild`,"esbuild.dev.js":`esbuild`,"esbuild.dev.mjs":`esbuild`,"esbuild.dev.mts":`esbuild`,"esbuild.dev.ts":`esbuild`,"esbuild.js":`esbuild`,"esbuild.mjs":`esbuild`,"esbuild.mts":`esbuild`,"esbuild.prod.cjs":`esbuild`,"esbuild.prod.cts":`esbuild`,"esbuild.prod.js":`esbuild`,"esbuild.prod.mjs":`esbuild`,"esbuild.prod.mts":`esbuild`,"esbuild.prod.ts":`esbuild`,"esbuild.stage.cjs":`esbuild`,"esbuild.stage.cts":`esbuild`,"esbuild.stage.js":`esbuild`,"esbuild.stage.mjs":`esbuild`,"esbuild.stage.mts":`esbuild`,"esbuild.stage.ts":`esbuild`,"esbuild.test.cjs":`esbuild`,"esbuild.test.cts":`esbuild`,"esbuild.test.js":`esbuild`,"esbuild.test.mjs":`esbuild`,"esbuild.test.mts":`esbuild`,"esbuild.test.ts":`esbuild`,"esbuild.ts":`esbuild`,"eslint-options.js":`eslint`,"eslint.config.cjs":`eslint`,"eslint.config.cts":`eslint`,"eslint.config.js":`eslint`,"eslint.config.json":`eslint`,"eslint.config.json5":`eslint`,"eslint.config.jsonc":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.toml":`eslint`,"eslint.config.ts":`eslint`,"eslint.config.yaml":`eslint`,"eslint.config.yml":`eslint`,excalidraw:`excalidraw`,"excalidraw.json":`excalidraw`,"excalidraw.png":`excalidraw`,"excalidraw.svg":`excalidraw`,"fabric.mod.json":`minecraft-fabric`,fastfile:`fastlane`,"favicon.ico":`favicon`,"firebase.config.js":`firebase`,"firebase.json":`firebase`,"firestore.indexes.json":`firebase`,"firestore.rules":`firebase`,"fuse.js":`fusebox`,"garden.yaml":`garden`,"garden.yml":`garden`,"gatsby-browser.js":`gatsby`,"gatsby-browser.tsx":`gatsby`,"gatsby-config.js":`gatsby`,"gatsby-config.mjs":`gatsby`,"gatsby-config.ts":`gatsby`,"gatsby-node.js":`gatsby`,"gatsby-node.mjs":`gatsby`,"gatsby-node.ts":`gatsby`,"gatsby-ssr.js":`gatsby`,"gatsby-ssr.tsx":`gatsby`,gemfile:`gemfile`,"gemini.md":`gemini-ai`,"git-history":`git`,"git-rebase-todo":`git`,"gleam.toml":`gleam`,gnumakefile:`makefile`,"go.mod":`go-mod`,"go.sum":`go-mod`,"go.work":`go-mod`,"go.work.sum":`go-mod`,"google-services.json":`google`,"googleservice-info.plist":`google`,"gradle-wrapper.properties":`gradle`,"gradle.properties":`gradle`,gradlew:`gradle`,"gradlew.bat":`gradle`,"graphql.config.cjs":`graphql`,"graphql.config.cts":`graphql`,"graphql.config.js":`graphql`,"graphql.config.json":`graphql`,"graphql.config.json5":`graphql`,"graphql.config.jsonc":`graphql`,"graphql.config.mjs":`graphql`,"graphql.config.mts":`graphql`,"graphql.config.toml":`graphql`,"graphql.config.ts":`graphql`,"graphql.config.yaml":`graphql`,"graphql.config.yml":`graphql`,"gridsome.config.js":`gridsome`,"gridsome.server.js":`gridsome`,"gruntfile.babel.coffee":`grunt`,"gruntfile.babel.js":`grunt`,"gruntfile.babel.ts":`grunt`,"gruntfile.cjs":`grunt`,"gruntfile.coffee":`grunt`,"gruntfile.cts":`grunt`,"gruntfile.js":`grunt`,"gruntfile.ts":`grunt`,guardfile:`ruby`,"gulpfile.babel.js":`gulp`,"gulpfile.cjs":`gulp`,"gulpfile.cts":`gulp`,"gulpfile.js":`gulp`,"gulpfile.mjs":`gulp`,"gulpfile.mts":`gulp`,"gulpfile.ts":`gulp`,gymfile:`ruby`,"hadolint.yaml":`hadolint`,"hadolint.yml":`hadolint`,"hardhat.config.js":`hardhat`,"hardhat.config.ts":`hardhat`,"harmonix.config.js":`harmonix`,"harmonix.config.ts":`harmonix`,hgrc:`mercurial`,"histoire.config.cjs":`histoire`,"histoire.config.cts":`histoire`,"histoire.config.js":`histoire`,"histoire.config.mjs":`histoire`,"histoire.config.mts":`histoire`,"histoire.config.ts":`histoire`,hobofile:`ruby`,"horusec-config.json":`horusec`,hosts:`hosts`,"husky.config.cjs":`husky`,"husky.config.cts":`husky`,"husky.config.js":`husky`,"husky.config.json":`husky`,"husky.config.json5":`husky`,"husky.config.jsonc":`husky`,"husky.config.mjs":`husky`,"husky.config.mts":`husky`,"husky.config.toml":`husky`,"husky.config.ts":`husky`,"husky.config.yaml":`husky`,"husky.config.yml":`husky`,install:`installation`,installation:`installation`,"ionic.config.json":`ionic`,jakefile:`javascript`,jenkinsfile:`jenkins`,"jest-e2e.config.cjs":`jest`,"jest-e2e.config.cts":`jest`,"jest-e2e.config.js":`jest`,"jest-e2e.config.json":`jest`,"jest-e2e.config.mjs":`jest`,"jest-e2e.config.mts":`jest`,"jest-e2e.config.ts":`jest`,"jest-e2e.json":`jest`,"jest-github-actions-reporter.js":`jest`,"jest-preset.cjs":`jest`,"jest-preset.js":`jest`,"jest-preset.json":`jest`,"jest-preset.mjs":`jest`,"jest-unit.config.js":`jest`,"jest.config.cjs":`jest`,"jest.config.cts":`jest`,"jest.config.js":`jest`,"jest.config.json":`jest`,"jest.config.mjs":`jest`,"jest.config.mts":`jest`,"jest.config.ts":`jest`,"jest.e2e.config.cjs":`jest`,"jest.e2e.config.cts":`jest`,"jest.e2e.config.js":`jest`,"jest.e2e.config.json":`jest`,"jest.e2e.config.mjs":`jest`,"jest.e2e.config.mts":`jest`,"jest.e2e.config.ts":`jest`,"jest.e2e.json":`jest`,"jest.json":`jest`,"jest.preset.cjs":`jest`,"jest.preset.js":`jest`,"jest.preset.json":`jest`,"jest.preset.mjs":`jest`,"jest.setup.js":`jest`,"jest.setup.ts":`jest`,"jest.teardown.js":`jest`,"jsconfig.json":`jsconfig`,"jsr.json":`jsr`,"jsr.jsonc":`jsr`,justfile:`just`,"jvm.config":`maven`,"k8s.yaml":`kubernetes`,"k8s.yml":`kubernetes`,"karma-main.js":`karma`,"karma-main.ts":`karma`,"karma.conf.coffee":`karma`,"karma.conf.js":`karma`,"karma.conf.ts":`karma`,"karma.config.js":`karma`,"karma.config.ts":`karma`,kbuild:`makefile`,"kcl.mod":`kcl`,"kcl.yaml":`kcl`,"kcl.yml":`kcl`,"keystatic.config.js":`keystatic`,"keystatic.config.jsx":`keystatic`,"keystatic.config.ts":`keystatic`,"keystatic.config.tsx":`keystatic`,"knip.config.js":`knip`,"knip.config.ts":`knip`,"knip.js":`knip`,"knip.json":`knip`,"knip.jsonc":`knip`,"knip.ts":`knip`,"kubernetes.yaml":`kubernetes`,"kubernetes.yml":`kubernetes`,latexmkrc:`latexmk`,"lefthook-local.json":`lefthook`,"lefthook-local.toml":`lefthook`,"lefthook-local.yaml":`lefthook`,"lefthook-local.yml":`lefthook`,"lefthook.json":`lefthook`,"lefthook.toml":`lefthook`,"lefthook.yaml":`lefthook`,"lefthook.yml":`lefthook`,lefthookrc:`lefthook`,"lerna.json":`lerna`,"liara.json":`liara`,licence:`license`,"licence-agpl":`license`,"licence-apache":`license`,"licence-bsd":`license`,"licence-gpl":`license`,"licence-lgpl":`license`,"licence-mit":`license`,"licence.md":`license`,"licence.rst":`license`,"licence.txt":`license`,license:`license`,"license-agpl":`license`,"license-apache":`license`,"license-bsd":`license`,"license-gpl":`license`,"license-lgpl":`license`,"license-mit":`license`,"license.md":`license`,"license.rst":`license`,"license.txt":`license`,"lighthouserc.cjs":`lighthouse`,"lighthouserc.js":`lighthouse`,"lighthouserc.json":`lighthouse`,"lighthouserc.yaml":`lighthouse`,"lighthouserc.yml":`lighthouse`,"lint-staged.config.cjs":`lintstaged`,"lint-staged.config.js":`lintstaged`,"lint-staged.config.mjs":`lintstaged`,"lynx.config.cjs":`lynx`,"lynx.config.cts":`lynx`,"lynx.config.js":`lynx`,"lynx.config.mjs":`lynx`,"lynx.config.mts":`lynx`,"lynx.config.ts":`lynx`,makefile:`makefile`,"manifest.in":`python-misc`,"manifest.mf":`settings`,"markdoc.config.cjs":`markdoc-config`,"markdoc.config.cts":`markdoc-config`,"markdoc.config.js":`markdoc-config`,"markdoc.config.mjs":`markdoc-config`,"markdoc.config.mts":`markdoc-config`,"markdoc.config.ts":`markdoc-config`,matchfile:`ruby`,"maven.config":`maven`,"mercurial.ini":`mercurial`,merge_msg:`git`,"meson.build":`meson`,"meson.options":`meson`,"meson_options.txt":`meson`,"metro.config.cjs":`metro`,"metro.config.cts":`metro`,"metro.config.js":`metro`,"metro.config.json":`metro`,"metro.config.mjs":`metro`,"metro.config.mts":`metro`,"metro.config.ts":`metro`,"milestones.md":`roadmap`,"milestones.txt":`roadmap`,"mocha.opts":`mocha`,"moon.yml":`moon`,"nano-staged.cjs":`nano-staged`,"nano-staged.js":`nano-staged`,"nano-staged.json":`nano-staged`,"nano-staged.mjs":`nano-staged`,"nest-cli.json":`nest`,"nestconfig.json":`nest`,"netlify.json":`netlify`,"netlify.toml":`netlify`,"netlify.yaml":`netlify`,"netlify.yml":`netlify`,"next.config.js":`next`,"next.config.mjs":`next`,"next.config.mts":`next`,"next.config.ts":`next`,"ng-package.json":`angular`,"nginx.conf":`nginx`,"nodemon-debug.json":`nodemon`,"nodemon.json":`nodemon`,"now.json":`vercel`,"nuget.config":`nuget`,"nuget.exe":`nuget`,"nuxt.config.js":`nuxt`,"nuxt.config.ts":`nuxt`,"nx.json":`nx`,"nyc.config.cjs":`istanbul`,"nyc.config.js":`istanbul`,"openapi.json":`openapi`,"openapi.yaml":`openapi`,"openapi.yml":`openapi`,"opencode.json":`opencode`,"opencode.jsonc":`opencode`,owners:`codeowners`,"oxfmt.config.ts":`oxc`,"oxlint.config.ts":`oxc`,"package-lock.json":`nodejs`,"package.json":`nodejs`,"packship.config.js":`packship`,"packship.config.json":`packship`,"packship.config.mjs":`packship`,"packship.config.mts":`packship`,"packship.config.ts":`packship`,"panda.config.cjs":`panda`,"panda.config.cts":`panda`,"panda.config.js":`panda`,"panda.config.mjs":`panda`,"panda.config.mts":`panda`,"panda.config.ts":`panda`,"payload.config.js":`payload`,"payload.config.mjs":`payload`,"payload.config.mts":`payload`,"payload.config.ts":`payload`,"pdm.lock":`pdm`,"pdm.toml":`pdm`,"phpstan.dist.neon":`phpstan`,"phpstan.neon":`phpstan`,"phpstan.neon.dist":`phpstan`,"phpunit-watcher.yml":`phpunit`,"phpunit-watcher.yml.dist":`phpunit`,"phpunit.xml":`phpunit`,"phpunit.xml.dist":`phpunit`,pipfile:`python-misc`,pkgbuild:`console`,pklproject:`pkl`,"pklproject.deps.json":`pkl`,"plastic.branchexplorer":`plastic`,"plastic.selector":`plastic`,"plastic.wktree":`plastic`,"plastic.workspace":`plastic`,"plastic.workspaces":`plastic`,"playwright-ct.config.cjs":`playwright`,"playwright-ct.config.cts":`playwright`,"playwright-ct.config.js":`playwright`,"playwright-ct.config.mjs":`playwright`,"playwright-ct.config.mts":`playwright`,"playwright-ct.config.ts":`playwright`,"playwright.config.base.cjs":`playwright`,"playwright.config.base.cts":`playwright`,"playwright.config.base.js":`playwright`,"playwright.config.base.mjs":`playwright`,"playwright.config.base.mts":`playwright`,"playwright.config.base.ts":`playwright`,"playwright.config.cjs":`playwright`,"playwright.config.cts":`playwright`,"playwright.config.js":`playwright`,"playwright.config.mjs":`playwright`,"playwright.config.mts":`playwright`,"playwright.config.ts":`playwright`,"plopfile.cjs":`plop`,"plopfile.js":`plop`,"plopfile.mjs":`plop`,"plopfile.ts":`plop`,"pnpm-lock.yaml":`pnpm`,"pnpm-workspace.yaml":`pnpm`,podfile:`ruby`,"poetry.lock":`poetry`,"pom.xml":`maven`,"post-merge":`console`,"postcss.config.cjs":`postcss`,"postcss.config.cts":`postcss`,"postcss.config.js":`postcss`,"postcss.config.json":`postcss`,"postcss.config.json5":`postcss`,"postcss.config.jsonc":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.mts":`postcss`,"postcss.config.toml":`postcss`,"postcss.config.ts":`postcss`,"postcss.config.yaml":`postcss`,"postcss.config.yml":`postcss`,"posthtml.config.cjs":`posthtml`,"posthtml.config.cts":`posthtml`,"posthtml.config.js":`posthtml`,"posthtml.config.json":`posthtml`,"posthtml.config.json5":`posthtml`,"posthtml.config.jsonc":`posthtml`,"posthtml.config.mjs":`posthtml`,"posthtml.config.mts":`posthtml`,"posthtml.config.toml":`posthtml`,"posthtml.config.ts":`posthtml`,"posthtml.config.yaml":`posthtml`,"posthtml.config.yml":`posthtml`,"pre-commit":`console`,"pre-push":`console`,"prettier.config.cjs":`prettier`,"prettier.config.cts":`prettier`,"prettier.config.js":`prettier`,"prettier.config.json":`prettier`,"prettier.config.json5":`prettier`,"prettier.config.jsonc":`prettier`,"prettier.config.mjs":`prettier`,"prettier.config.mts":`prettier`,"prettier.config.toml":`prettier`,"prettier.config.ts":`prettier`,"prettier.config.yaml":`prettier`,"prettier.config.yml":`prettier`,"prisma.config.ts":`prisma`,"prisma.yml":`prisma`,procfile:`heroku`,"procfile.windows":`heroku`,"project.garden.yaml":`garden`,"project.garden.yml":`garden`,"project.graphcool":`graphcool`,"protractor.conf.coffee":`protractor`,"protractor.conf.js":`protractor`,"protractor.conf.ts":`protractor`,"protractor.config.js":`protractor`,"protractor.config.ts":`protractor`,"puppeteer.config.cjs":`puppeteer`,"puppeteer.config.cts":`puppeteer`,"puppeteer.config.js":`puppeteer`,"puppeteer.config.json":`puppeteer`,"puppeteer.config.json5":`puppeteer`,"puppeteer.config.jsonc":`puppeteer`,"puppeteer.config.mjs":`puppeteer`,"puppeteer.config.mts":`puppeteer`,"puppeteer.config.toml":`puppeteer`,"puppeteer.config.ts":`puppeteer`,"puppeteer.config.yaml":`puppeteer`,"puppeteer.config.yml":`puppeteer`,puppetfile:`ruby`,"py.typed":`python-misc`,pylintrc:`python-misc`,"pyproject.toml":`python-misc`,"quasar.conf.js":`quasar`,"quasar.conf.ts":`quasar`,"quasar.config.cjs":`quasar`,"quasar.config.js":`quasar`,"quasar.config.ts":`quasar`,rakefile:`ruby`,rantfile:`ruby`,readme:`readme`,"readme.md":`readme`,"readme.rst":`readme`,"readme.txt":`readme`,"release-plz.toml":`rocket`,"release.config.cjs":`semantic-release`,"release.config.cts":`semantic-release`,"release.config.js":`semantic-release`,"release.config.json":`semantic-release`,"release.config.json5":`semantic-release`,"release.config.jsonc":`semantic-release`,"release.config.mjs":`semantic-release`,"release.config.mts":`semantic-release`,"release.config.toml":`semantic-release`,"release.config.ts":`semantic-release`,"release.config.yaml":`semantic-release`,"release.config.yml":`semantic-release`,"release.toml":`rocket`,"remix.config.js":`remix`,"remix.config.ts":`remix`,"renovate-config.json":`renovate`,"renovate.json":`renovate`,"renovate.json5":`renovate`,"requirements.txt":`python-misc`,"roadmap.md":`roadmap`,"roadmap.txt":`roadmap`,"robots.txt":`robots`,"rolldown.config.cjs":`rolldown`,"rolldown.config.cts":`rolldown`,"rolldown.config.js":`rolldown`,"rolldown.config.mjs":`rolldown`,"rolldown.config.mts":`rolldown`,"rolldown.config.ts":`rolldown`,"rollup-config.js":`rollup`,"rollup-config.mjs":`rollup`,"rollup-config.ts":`rollup`,"rollup.config.base.js":`rollup`,"rollup.config.base.mjs":`rollup`,"rollup.config.base.ts":`rollup`,"rollup.config.common.js":`rollup`,"rollup.config.common.mjs":`rollup`,"rollup.config.common.ts":`rollup`,"rollup.config.dev.js":`rollup`,"rollup.config.dev.mjs":`rollup`,"rollup.config.dev.ts":`rollup`,"rollup.config.js":`rollup`,"rollup.config.mjs":`rollup`,"rollup.config.prod.js":`rollup`,"rollup.config.prod.mjs":`rollup`,"rollup.config.prod.ts":`rollup`,"rollup.config.prod.vendor.js":`rollup`,"rollup.config.prod.vendor.mjs":`rollup`,"rollup.config.prod.vendor.ts":`rollup`,"rollup.config.ts":`rollup`,"rome.json":`rome`,"route.js":`routing`,"route.jsx":`routing`,"route.ts":`routing`,"route.tsx":`routing`,"router.js":`routing`,"router.jsx":`routing`,"router.ts":`routing`,"router.tsx":`routing`,"routes.js":`routing`,"routes.jsx":`routing`,"routes.ts":`routing`,"routes.tsx":`routing`,"rsbuild.config.cjs":`rstack`,"rsbuild.config.cts":`rstack`,"rsbuild.config.js":`rstack`,"rsbuild.config.mjs":`rstack`,"rsbuild.config.mts":`rstack`,"rsbuild.config.ts":`rstack`,"rslib.config.cjs":`rstack`,"rslib.config.cts":`rstack`,"rslib.config.js":`rstack`,"rslib.config.mjs":`rstack`,"rslib.config.mts":`rstack`,"rslib.config.ts":`rstack`,"rslint.config.cjs":`rstack`,"rslint.config.cts":`rstack`,"rslint.config.js":`rstack`,"rslint.config.mjs":`rstack`,"rslint.config.mts":`rstack`,"rslint.config.ts":`rstack`,"rslint.json":`rstack`,"rslint.jsonc":`rstack`,"rspack.config.cjs":`rstack`,"rspack.config.cts":`rstack`,"rspack.config.js":`rstack`,"rspack.config.mjs":`rstack`,"rspack.config.mts":`rstack`,"rspack.config.ts":`rstack`,"rspress.config.cjs":`rstack`,"rspress.config.cts":`rstack`,"rspress.config.js":`rstack`,"rspress.config.mjs":`rstack`,"rspress.config.mts":`rstack`,"rspress.config.ts":`rstack`,"rstest.config.cjs":`rstack`,"rstest.config.cts":`rstack`,"rstest.config.js":`rstack`,"rstest.config.mjs":`rstack`,"rstest.config.mts":`rstack`,"rstest.config.ts":`rstack`,"ruff.toml":`ruff`,scanfile:`ruby`,sconscript:`scons`,sconstruct:`scons`,"screwdriver.yaml":`screwdriver`,"screwdriver.yml":`screwdriver`,scsub:`scons`,security:`lock`,"security.md":`lock`,"security.txt":`lock`,"semgrep.yml":`semgrep`,"sentry.client.config.cjs":`sentry`,"sentry.client.config.cts":`sentry`,"sentry.client.config.js":`sentry`,"sentry.client.config.mjs":`sentry`,"sentry.client.config.mts":`sentry`,"sentry.client.config.ts":`sentry`,"sentry.edge.config.cjs":`sentry`,"sentry.edge.config.cts":`sentry`,"sentry.edge.config.js":`sentry`,"sentry.edge.config.mjs":`sentry`,"sentry.edge.config.mts":`sentry`,"sentry.edge.config.ts":`sentry`,"sentry.server.config.cjs":`sentry`,"sentry.server.config.cts":`sentry`,"sentry.server.config.js":`sentry`,"sentry.server.config.mjs":`sentry`,"sentry.server.config.mts":`sentry`,"sentry.server.config.ts":`sentry`,"serverless.js":`serverless`,"serverless.json":`serverless`,"serverless.ts":`serverless`,"serverless.yaml":`serverless`,"serverless.yml":`serverless`,sha256sums:`key`,shellcheckrc:`shellcheck`,"skill.md":`skill`,snakefile:`snakemake`,"snapcraft.yaml":`snapcraft`,"snapcraft.yml":`snapcraft`,snapfile:`ruby`,"snowpack.config.cjs":`snowpack`,"snowpack.config.cts":`snowpack`,"snowpack.config.js":`snowpack`,"snowpack.config.json":`snowpack`,"snowpack.config.mjs":`snowpack`,"snowpack.config.mts":`snowpack`,"snowpack.config.ts":`snowpack`,"snowpack.deps.json":`snowpack`,"sonar-project.properties":`sonarcloud`,"sonarcloud.yaml":`sonarcloud`,"sonarqube.analysis.xml":`sonarcloud`,"src/bashly.yaml":`bashly`,"src/bashly.yml":`bashly`,"steadybit.yaml":`steadybit`,"steadybit.yml":`steadybit`,"stencil.config.js":`stencil`,"stencil.config.ts":`stencil`,"stitches.config.js":`stitches`,"stitches.config.ts":`stitches`,"stryker.conf.cjs":`stryker`,"stryker.conf.js":`stryker`,"stryker.conf.json":`stryker`,"stryker.conf.mjs":`stryker`,"stryker.config.cjs":`stryker`,"stryker.config.js":`stryker`,"stryker.config.json":`stryker`,"stryker.config.mjs":`stryker`,"stylelint.config.cjs":`stylelint`,"stylelint.config.cts":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.json":`stylelint`,"stylelint.config.json5":`stylelint`,"stylelint.config.jsonc":`stylelint`,"stylelint.config.mjs":`stylelint`,"stylelint.config.mts":`stylelint`,"stylelint.config.toml":`stylelint`,"stylelint.config.ts":`stylelint`,"stylelint.config.yaml":`stylelint`,"stylelint.config.yml":`stylelint`,"supabase.js":`supabase`,"supabase.py":`supabase`,"supabase.ts":`supabase`,"svelte.config.cjs":`svelte`,"svelte.config.cts":`svelte`,"svelte.config.js":`svelte`,"svelte.config.mjs":`svelte`,"svelte.config.mts":`svelte`,"svelte.config.ts":`svelte`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgr.config.cjs":`svgr`,"svgr.config.cts":`svgr`,"svgr.config.js":`svgr`,"svgr.config.json":`svgr`,"svgr.config.json5":`svgr`,"svgr.config.jsonc":`svgr`,"svgr.config.mjs":`svgr`,"svgr.config.mts":`svgr`,"svgr.config.toml":`svgr`,"svgr.config.ts":`svgr`,"svgr.config.yaml":`svgr`,"svgr.config.yml":`svgr`,"swagger.json":`swagger`,"swagger.yaml":`swagger`,"swagger.yml":`swagger`,"syncpack.config.cjs":`syncpack`,"syncpack.config.cts":`syncpack`,"syncpack.config.js":`syncpack`,"syncpack.config.json":`syncpack`,"syncpack.config.json5":`syncpack`,"syncpack.config.jsonc":`syncpack`,"syncpack.config.mjs":`syncpack`,"syncpack.config.mts":`syncpack`,"syncpack.config.toml":`syncpack`,"syncpack.config.ts":`syncpack`,"syncpack.config.yaml":`syncpack`,"syncpack.config.yml":`syncpack`,tags:`label`,"tailwind.config.cjs":`tailwindcss`,"tailwind.config.cts":`tailwindcss`,"tailwind.config.js":`tailwindcss`,"tailwind.config.mjs":`tailwindcss`,"tailwind.config.mts":`tailwindcss`,"tailwind.config.ts":`tailwindcss`,"tailwind.js":`tailwindcss`,"tailwind.ts":`tailwindcss`,"taskfile.dist.yaml":`taskfile`,"taskfile.dist.yml":`taskfile`,"taskfile.yaml":`taskfile`,"taskfile.yml":`taskfile`,"tauri.conf.json":`tauri`,"tauri.config.json":`tauri`,"tauri.linux.conf.json":`tauri`,"tauri.macos.conf.json":`tauri`,"tauri.windows.conf.json":`tauri`,"taze.config.cjs":`taze`,"taze.config.cts":`taze`,"taze.config.js":`taze`,"taze.config.mjs":`taze`,"taze.config.mts":`taze`,"taze.config.ts":`taze`,thorfile:`ruby`,tiltfile:`tilt`,"timeline.md":`roadmap`,"timeline.txt":`roadmap`,"todo.md":`todo`,"todos.md":`todo`,"trigger.config.cjs":`trigger`,"trigger.config.cts":`trigger`,"trigger.config.js":`trigger`,"trigger.config.mjs":`trigger`,"trigger.config.mts":`trigger`,"trigger.config.ts":`trigger`,"tsconfig.app.json":`tsconfig`,"tsconfig.base.json":`tsconfig`,"tsconfig.build.json":`tsconfig`,"tsconfig.cjs.json":`tsconfig`,"tsconfig.client.json":`tsconfig`,"tsconfig.config.json":`tsconfig`,"tsconfig.declaration.json":`tsconfig`,"tsconfig.doc.json":`tsconfig`,"tsconfig.e2e.json":`tsconfig`,"tsconfig.editor.json":`tsconfig`,"tsconfig.eslint.json":`tsconfig`,"tsconfig.esm.json":`tsconfig`,"tsconfig.json":`tsconfig`,"tsconfig.lib.json":`tsconfig`,"tsconfig.lib.prod.json":`tsconfig`,"tsconfig.main.json":`tsconfig`,"tsconfig.mjs.json":`tsconfig`,"tsconfig.node.json":`tsconfig`,"tsconfig.paths.json":`tsconfig`,"tsconfig.renderer.json":`tsconfig`,"tsconfig.server.json":`tsconfig`,"tsconfig.spec.json":`tsconfig`,"tsconfig.test.json":`tsconfig`,"tsconfig.vitest.json":`tsconfig`,"tsconfig.web.json":`tsconfig`,"tsconfig.webworker.json":`tsconfig`,"tsconfig.worker.json":`tsconfig`,"tsdoc.json":`tsdoc`,"tsdown.config":`tsdown`,"tsdown.config.cjs":`tsdown`,"tsdown.config.cts":`tsdown`,"tsdown.config.js":`tsdown`,"tsdown.config.json":`tsdown`,"tsdown.config.mjs":`tsdown`,"tsdown.config.mts":`tsdown`,"tsdown.config.ts":`tsdown`,"turbo.json":`turborepo`,"turbo.jsonc":`turborepo`,"typedoc.js":`typedoc`,"typedoc.json":`typedoc`,"typst.toml":`typst`,unlicense:`unlicense`,"unlicense.txt":`unlicense`,"uno.config.js":`unocss`,"uno.config.mjs":`unocss`,"uno.config.mts":`unocss`,"uno.config.ts":`unocss`,"unocss.config.js":`unocss`,"unocss.config.mjs":`unocss`,"unocss.config.mts":`unocss`,"unocss.config.ts":`unocss`,"uv.lock":`uv`,"uv.toml":`uv`,"v.mod":`vlang`,vagrantfile:`vagrant`,"velite.config.cjs":`velite`,"velite.config.cts":`velite`,"velite.config.js":`velite`,"velite.config.mjs":`velite`,"velite.config.mts":`velite`,"velite.config.ts":`velite`,"vercel.json":`vercel`,"vercel.ts":`vercel`,"verdaccio.yml":`verdaccio`,"vetur.config.js":`vue-config`,"vetur.config.ts":`vue-config`,"vite.config.cjs":`vite`,"vite.config.cts":`vite`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"vitest.config.cjs":`vitest`,"vitest.config.cts":`vitest`,"vitest.config.js":`vitest`,"vitest.config.mjs":`vitest`,"vitest.config.mts":`vitest`,"vitest.config.ts":`vitest`,"vitest.e2e.config.cjs":`vitest`,"vitest.e2e.config.cts":`vitest`,"vitest.e2e.config.js":`vitest`,"vitest.e2e.config.mjs":`vitest`,"vitest.e2e.config.mts":`vitest`,"vitest.e2e.config.ts":`vitest`,"vitest.unit.config.cjs":`vitest`,"vitest.unit.config.cts":`vitest`,"vitest.unit.config.js":`vitest`,"vitest.unit.config.mjs":`vitest`,"vitest.unit.config.mts":`vitest`,"vitest.unit.config.ts":`vitest`,"vitest.workspace.cjs":`vitest`,"vitest.workspace.cts":`vitest`,"vitest.workspace.js":`vitest`,"vitest.workspace.mjs":`vitest`,"vitest.workspace.mts":`vitest`,"vitest.workspace.ts":`vitest`,"volar.config.js":`vue-config`,"vpkg.json":`vlang`,"vue.config.cjs":`vue-config`,"vue.config.js":`vue-config`,"vue.config.mjs":`vue-config`,"vue.config.ts":`vue-config`,"wallaby.conf.js":`wallaby`,"wallaby.js":`wallaby`,"wally.toml":`wally`,"warp.md":`warp`,"webpack.base.cjs":`webpack`,"webpack.base.cts":`webpack`,"webpack.base.js":`webpack`,"webpack.base.mjs":`webpack`,"webpack.base.mts":`webpack`,"webpack.base.ts":`webpack`,"webpack.cjs":`webpack`,"webpack.client.cjs":`webpack`,"webpack.client.cts":`webpack`,"webpack.client.js":`webpack`,"webpack.client.mjs":`webpack`,"webpack.client.mts":`webpack`,"webpack.client.ts":`webpack`,"webpack.common.cjs":`webpack`,"webpack.common.cts":`webpack`,"webpack.common.js":`webpack`,"webpack.common.mjs":`webpack`,"webpack.common.mts":`webpack`,"webpack.common.ts":`webpack`,"webpack.config.babel.cjs":`webpack`,"webpack.config.babel.cts":`webpack`,"webpack.config.babel.js":`webpack`,"webpack.config.babel.mjs":`webpack`,"webpack.config.babel.mts":`webpack`,"webpack.config.babel.ts":`webpack`,"webpack.config.base.babel.cjs":`webpack`,"webpack.config.base.babel.cts":`webpack`,"webpack.config.base.babel.js":`webpack`,"webpack.config.base.babel.mjs":`webpack`,"webpack.config.base.babel.mts":`webpack`,"webpack.config.base.babel.ts":`webpack`,"webpack.config.base.cjs":`webpack`,"webpack.config.base.cts":`webpack`,"webpack.config.base.js":`webpack`,"webpack.config.base.mjs":`webpack`,"webpack.config.base.mts":`webpack`,"webpack.config.base.ts":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.client.cjs":`webpack`,"webpack.config.client.cts":`webpack`,"webpack.config.client.js":`webpack`,"webpack.config.client.mjs":`webpack`,"webpack.config.client.mts":`webpack`,"webpack.config.client.ts":`webpack`,"webpack.config.coffee":`webpack`,"webpack.config.common.babel.cjs":`webpack`,"webpack.config.common.babel.cts":`webpack`,"webpack.config.common.babel.js":`webpack`,"webpack.config.common.babel.mjs":`webpack`,"webpack.config.common.babel.mts":`webpack`,"webpack.config.common.babel.ts":`webpack`,"webpack.config.common.cjs":`webpack`,"webpack.config.common.cts":`webpack`,"webpack.config.common.js":`webpack`,"webpack.config.common.mjs":`webpack`,"webpack.config.common.mts":`webpack`,"webpack.config.common.ts":`webpack`,"webpack.config.cts":`webpack`,"webpack.config.dev.babel.cjs":`webpack`,"webpack.config.dev.babel.cts":`webpack`,"webpack.config.dev.babel.js":`webpack`,"webpack.config.dev.babel.mjs":`webpack`,"webpack.config.dev.babel.mts":`webpack`,"webpack.config.dev.babel.ts":`webpack`,"webpack.config.dev.cjs":`webpack`,"webpack.config.dev.cts":`webpack`,"webpack.config.dev.js":`webpack`,"webpack.config.dev.mjs":`webpack`,"webpack.config.dev.mts":`webpack`,"webpack.config.dev.ts":`webpack`,"webpack.config.js":`webpack`,"webpack.config.main.cjs":`webpack`,"webpack.config.main.cts":`webpack`,"webpack.config.main.js":`webpack`,"webpack.config.main.mjs":`webpack`,"webpack.config.main.mts":`webpack`,"webpack.config.main.ts":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.mts":`webpack`,"webpack.config.prod.babel.cjs":`webpack`,"webpack.config.prod.babel.cts":`webpack`,"webpack.config.prod.babel.js":`webpack`,"webpack.config.prod.babel.mjs":`webpack`,"webpack.config.prod.babel.mts":`webpack`,"webpack.config.prod.babel.ts":`webpack`,"webpack.config.prod.cjs":`webpack`,"webpack.config.prod.cts":`webpack`,"webpack.config.prod.js":`webpack`,"webpack.config.prod.mjs":`webpack`,"webpack.config.prod.mts":`webpack`,"webpack.config.prod.ts":`webpack`,"webpack.config.production.babel.cjs":`webpack`,"webpack.config.production.babel.cts":`webpack`,"webpack.config.production.babel.js":`webpack`,"webpack.config.production.babel.mjs":`webpack`,"webpack.config.production.babel.mts":`webpack`,"webpack.config.production.babel.ts":`webpack`,"webpack.config.production.cjs":`webpack`,"webpack.config.production.cts":`webpack`,"webpack.config.production.js":`webpack`,"webpack.config.production.mjs":`webpack`,"webpack.config.production.mts":`webpack`,"webpack.config.production.ts":`webpack`,"webpack.config.renderer.cjs":`webpack`,"webpack.config.renderer.cts":`webpack`,"webpack.config.renderer.js":`webpack`,"webpack.config.renderer.mjs":`webpack`,"webpack.config.renderer.mts":`webpack`,"webpack.config.renderer.ts":`webpack`,"webpack.config.server.cjs":`webpack`,"webpack.config.server.cts":`webpack`,"webpack.config.server.js":`webpack`,"webpack.config.server.mjs":`webpack`,"webpack.config.server.mts":`webpack`,"webpack.config.server.ts":`webpack`,"webpack.config.staging.babel.cjs":`webpack`,"webpack.config.staging.babel.cts":`webpack`,"webpack.config.staging.babel.js":`webpack`,"webpack.config.staging.babel.mjs":`webpack`,"webpack.config.staging.babel.mts":`webpack`,"webpack.config.staging.babel.ts":`webpack`,"webpack.config.staging.cjs":`webpack`,"webpack.config.staging.cts":`webpack`,"webpack.config.staging.js":`webpack`,"webpack.config.staging.mjs":`webpack`,"webpack.config.staging.mts":`webpack`,"webpack.config.staging.ts":`webpack`,"webpack.config.test.cjs":`webpack`,"webpack.config.test.cts":`webpack`,"webpack.config.test.js":`webpack`,"webpack.config.test.mjs":`webpack`,"webpack.config.test.mts":`webpack`,"webpack.config.test.ts":`webpack`,"webpack.config.ts":`webpack`,"webpack.config.vendor.cjs":`webpack`,"webpack.config.vendor.cts":`webpack`,"webpack.config.vendor.js":`webpack`,"webpack.config.vendor.mjs":`webpack`,"webpack.config.vendor.mts":`webpack`,"webpack.config.vendor.production.cjs":`webpack`,"webpack.config.vendor.production.cts":`webpack`,"webpack.config.vendor.production.js":`webpack`,"webpack.config.vendor.production.mjs":`webpack`,"webpack.config.vendor.production.mts":`webpack`,"webpack.config.vendor.production.ts":`webpack`,"webpack.config.vendor.ts":`webpack`,"webpack.cts":`webpack`,"webpack.dev.cjs":`webpack`,"webpack.dev.cts":`webpack`,"webpack.dev.js":`webpack`,"webpack.dev.mjs":`webpack`,"webpack.dev.mts":`webpack`,"webpack.dev.ts":`webpack`,"webpack.development.cjs":`webpack`,"webpack.development.cts":`webpack`,"webpack.development.js":`webpack`,"webpack.development.mjs":`webpack`,"webpack.development.mts":`webpack`,"webpack.development.ts":`webpack`,"webpack.dist.cjs":`webpack`,"webpack.dist.cts":`webpack`,"webpack.dist.js":`webpack`,"webpack.dist.mjs":`webpack`,"webpack.dist.mts":`webpack`,"webpack.dist.ts":`webpack`,"webpack.js":`webpack`,"webpack.mix.cjs":`webpack`,"webpack.mix.cts":`webpack`,"webpack.mix.js":`webpack`,"webpack.mix.mjs":`webpack`,"webpack.mix.mts":`webpack`,"webpack.mix.ts":`webpack`,"webpack.mjs":`webpack`,"webpack.mts":`webpack`,"webpack.prod.cjs":`webpack`,"webpack.prod.config.cjs":`webpack`,"webpack.prod.config.cts":`webpack`,"webpack.prod.config.js":`webpack`,"webpack.prod.config.mjs":`webpack`,"webpack.prod.config.mts":`webpack`,"webpack.prod.config.ts":`webpack`,"webpack.prod.cts":`webpack`,"webpack.prod.js":`webpack`,"webpack.prod.mjs":`webpack`,"webpack.prod.mts":`webpack`,"webpack.prod.ts":`webpack`,"webpack.production.cjs":`webpack`,"webpack.production.cts":`webpack`,"webpack.production.js":`webpack`,"webpack.production.mjs":`webpack`,"webpack.production.mts":`webpack`,"webpack.production.ts":`webpack`,"webpack.server.cjs":`webpack`,"webpack.server.cts":`webpack`,"webpack.server.js":`webpack`,"webpack.server.mjs":`webpack`,"webpack.server.mts":`webpack`,"webpack.server.ts":`webpack`,"webpack.test.cjs":`webpack`,"webpack.test.cts":`webpack`,"webpack.test.js":`webpack`,"webpack.test.mjs":`webpack`,"webpack.test.mts":`webpack`,"webpack.test.ts":`webpack`,"webpack.ts":`webpack`,"webpackfile.cjs":`webpack`,"webpackfile.cts":`webpack`,"webpackfile.js":`webpack`,"webpackfile.mjs":`webpack`,"webpackfile.mts":`webpack`,"webpackfile.ts":`webpack`,"werf-giterminism.yaml":`werf`,"werf-giterminism.yml":`werf`,"werf-includes.lock":`werf`,"werf-includes.yaml":`werf`,"werf-includes.yml":`werf`,"werf.yaml":`werf`,"werf.yml":`werf`,"windi.config.cjs":`windicss`,"windi.config.cts":`windicss`,"windi.config.js":`windicss`,"windi.config.json":`windicss`,"windi.config.ts":`windicss`,"wrangler.json":`wrangler`,"wrangler.jsonc":`wrangler`,"wrangler.toml":`wrangler`,"wxt.config.cjs":`wxt`,"wxt.config.cts":`wxt`,"wxt.config.js":`wxt`,"wxt.config.mjs":`wxt`,"wxt.config.mts":`wxt`,"wxt.config.ts":`wxt`,"xamlstyler.json":`xaml`,xmake:`xmake`,"xmake.lua":`xmake`,"yarn-error.log":`yarn`,"yarn.lock":`yarn`,"zeabur.json":`zeabur`,"zeabur.json5":`zeabur`,"zeabur.jsonc":`zeabur`,"zeabur.toml":`zeabur`,"zeabur.yaml":`zeabur`,"zeabur.yml":`zeabur`,zlogin:`console`,zlogout:`console`,zprofile:`console`,zshenv:`console`,zshrc:`console`,zshrc_apple_terminal:`console`},ka={60:`slint`,".ncurc.js":`dependencies-update`,".ncurc.json":`dependencies-update`,".ncurc.yml":`dependencies-update`,".wakatime-project":`wakatime`,"001":`zip`,"123dx":`3d`,"3dm":`3d`,"3ds":`3d`,"3fr":`image`,"3mf":`3d`,"4th":`forth`,"7z":`zip`,"8svx":`audio`,a:`lib`,a51:`assembly`,aa:`audio`,aac:`audio`,aax:`audio`,abap:`abap`,abc:`abc`,ac:`3d`,ac3:`audio`,accdb:`database`,accde:`database`,acds:`abap`,act:`palette`,ad:`asciidoc`,ada:`ada`,adb:`ada`,adoc:`asciidoc`,adp:`database`,ads:`ada`,aea:`assembly`,afphoto:`image`,agc:`assembly`,ags:`assembly`,ahk:`autohotkey`,ai:`adobe-illustrator`,aif:`audio`,aiff:`audio`,ait:`adobe-illustrator`,alac:`audio`,ali:`ada`,alloy:`grafana-alloy`,ami:`image`,amr:`audio`,amx:`pawn`,ape:`audio`,apfs:`zip`,apib:`apiblueprint`,apiblueprint:`apiblueprint`,apk:`android`,applescript:`applescript`,apx:`image`,argus:`assembly`,ari:`image`,arj:`zip`,arw:`image`,as:`actionscript`,asc:`key`,asciidoc:`asciidoc`,ascx:`xml`,asddls:`abap`,ase:`image`,aseprite:`image`,asm:`assembly`,asp:`html`,aspx:`html`,ass:`subtitles`,ast:`sas`,astore:`sas`,astro:`astro`,atom:`xml`,au3:`autoit`,aux:`tex`,avi:`video`,avif:`image`,awk:`console`,axaml:`xml`,axml:`xml`,azcli:`azure`,"azure-pipelines-main.yaml":`azure-pipelines`,"azure-pipelines-main.yml":`azure-pipelines`,"azure-pipelines.yaml":`azure-pipelines`,"azure-pipelines.yml":`azure-pipelines`,b:`brainfuck`,bak:`database`,bal:`ballerina`,balx:`ballerina`,bas:`visualstudio`,bash:`console`,bash_aliases:`console`,bash_login:`console`,bash_logout:`console`,bash_profile:`console`,bashrc:`console`,bat:`console`,bay:`image`,bazel:`bazel`,bbl:`bibliography`,bbx:`bbx`,bcf:`bibliography`,bdb:`database`,bean:`beancount`,beancount:`beancount`,"bench.cjs":`bench-js`,"bench.cts":`bench-ts`,"bench.js":`bench-js`,"bench.jsx":`bench-jsx`,"bench.mjs":`bench-js`,"bench.mts":`bench-ts`,"bench.ts":`bench-ts`,"bench.tsx":`bench-jsx`,bf:`brainfuck`,bib:`bibliography`,bicep:`bicep`,bin:`hex`,binsource:`assembly`,"blade.php":`laravel`,blend:`blender`,blend1:`blender`,blend2:`blender`,blg:`bibliography`,blink:`blink`,bmap:`font`,bmp:`image`,bpg:`image`,bpmn:`xml`,br:`zip`,braw:`image`,brk:`image`,brotli:`zip`,brs:`visualstudio`,bru:`bruno`,bst:`bibtex-style`,bubble:`dinophp`,bz2:`zip`,bzip2:`zip`,bzl:`bazel`,c:`c`,"c++":`cpp`,"c++m":`cpp`,c3:`c3`,cab:`zip`,cabal:`cabal`,caf:`audio`,cairo:`cairo`,cake:`cake`,cap:`image`,capnp:`capnp`,catpart:`3d`,catproduct:`3d`,cbl:`cobol`,cbx:`cbx`,cc:`cpp`,ccm:`cpp`,cda:`audio`,cdc:`cadence`,cdr:`audio`,cds:`cds`,cer:`certificate`,cert:`certificate`,cfc:`coldfusion`,cff:`yaml`,cfg:`settings`,cfm:`coldfusion`,cfml:`coldfusion`,cginc:`shader`,cjs:`javascript`,"cjs.map":`javascript-map`,cl:`lisp`,class:`javaclass`,clip:`image`,clj:`clojure`,cljc:`clojure`,cljs:`clojure`,cljx:`clojure`,clo:`tex`,clojure:`clojure`,cls:`tex`,cm:`sml`,cmake:`cmake`,cmd:`console`,cmj:`bucklescript`,cmx:`ocaml`,cnf:`settings`,coafile:`coala`,coarc:`coala`,cob:`cobol`,coco:`coconut`,"code-profile":`vscode`,"code-search":`search`,"code-snippets":`vscode`,"code-workplace":`vscode`,"code-workspace":`vscode`,coffee:`coffee`,command:`command`,comp:`shader`,"comp.glsl":`shader`,"comp.hlsl":`shader`,"compose.yaml":`docker`,"compose.yml":`docker`,compute:`shader`,"compute.glsl":`shader`,"compute.hlsl":`shader`,computeshader:`shader`,conf:`settings`,config:`settings`,containerfile:`docker`,containerignore:`docker`,"controller.js":`controller`,"controller.ts":`controller`,copilotmd:`markdown`,cp:`cpp`,cpio:`zip`,cpn:`coloredpetrinets`,cpp:`cpp`,cppm:`cpp`,cpt:`image`,cpy:`python`,cr:`crystal`,cr2:`image`,cr3:`image`,crt:`certificate`,crw:`image`,crx:`chrome`,cs:`csharp`,csh:`console`,csharp:`csharp`,cshrc:`console`,cshtml:`razor`,csl:`xml`,cson:`coffee`,csproj:`visualstudio`,"csproj.user":`xml`,css:`css`,"css.cjs":`vanilla-extract`,"css.js":`vanilla-extract`,"css.jsx":`vanilla-extract`,"css.map":`css-map`,"css.mjs":`vanilla-extract`,"css.ts":`vanilla-extract`,"css.tsx":`vanilla-extract`,csv:`table`,csx:`csharp`,ctp:`php`,cts:`typescript`,ctx:`context`,cu:`cuda`,cue:`cue`,cuh:`cuda`,cur:`image`,cxx:`cpp`,cxxm:`cpp`,"cy.js":`test-js`,"cy.jsx":`test-jsx`,"cy.ts":`test-ts`,"cy.tsx":`test-jsx`,d:`d`,"d.cts":`typescript-def`,"d.ets":`typescript-def`,"d.mts":`typescript-def`,"d.ts":`typescript-def`,dae:`3d`,dart:`dart`,dat:`hex`,data:`image`,db:`database`,db3:`database`,dbf:`database`,dblite:`database`,dblite3:`database`,dcr:`image`,dcs:`image`,dds:`image`,deb:`zip`,debugsymbols:`database`,def:`dotjs`,dex:`android`,dfxp:`subtitles`,dhall:`dhall`,dhallb:`dhall`,diff:`diff`,dio:`drawio`,directory:`settings`,dita:`xml`,ditamap:`xml`,djt:`django`,dlc:`settings`,dll:`dll`,dmg:`disc`,dmn:`xml`,dng:`image`,do:`tcl`,doc:`word`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,dockerignore:`docker`,docx:`word`,dot:`dotjs`,drawio:`drawio`,drf:`image`,"drone.yml":`drone`,dsc:`denizenscript`,dsql:`database`,dss:`audio`,dtd:`xml`,dtml:`xml`,duc:`duc`,dwg:`3d`,dxf:`3d`,"e2e-spec.cjs":`test-js`,"e2e-spec.cts":`test-ts`,"e2e-spec.js":`test-js`,"e2e-spec.mjs":`test-js`,"e2e-spec.mts":`test-ts`,"e2e-spec.ts":`test-ts`,ebuild:`console`,ec3:`audio`,eclass:`console`,ecr:`crystal`,edb:`email`,edge:`edge`,edn:`clojure`,eex:`elixir`,efs:`audio`,egg:`python-misc`,eip:`image`,ejs:`ejs`,elm:`elm`,eml:`email`,emlx:`email`,enc:`audio`,ent:`xml`,env:`tune`,eot:`font`,eps:`image`,epub:`epub`,erb:`ruby`,erf:`image`,erl:`erlang`,es6:`javascript`,esd:`zip`,esx:`javascript`,ex:`elixir`,excalidraw:`excalidraw`,"excalidraw.json":`excalidraw`,"excalidraw.png":`excalidraw`,"excalidraw.svg":`excalidraw`,exe:`exe`,exp:`console`,exr:`image`,exrc:`vim`,exs:`elixir`,eyaml:`yaml`,eyml:`yaml`,f:`fortran`,f03:`fortran`,f08:`fortran`,f3d:`3d`,f77:`fortran`,f90:`fortran`,f95:`fortran`,far:`zip`,fast:`lisp`,fat:`zip`,fbx:`3d`,fdb:`database`,feather:`database`,feature:`cucumber`,features:`cucumber`,fen:`chess`,fff:`image`,fhtml:`velocity`,fig:`figma`,fish:`console`,flac:`audio`,flp:`audio`,flv:`video`,fnt:`font`,font:`font`,fonts:`font`,fpx:`image`,frag:`shader`,"frag.glsl":`shader`,"fragment.glsl":`shader`,fragmentshader:`shader`,"freezed.dart":`dart_generated`,frm:`database`,frt:`forth`,fs:`fsharp`,"fs.glsl":`shader`,fsi:`fsharp`,fsproj:`fsharp`,fsscript:`fsharp`,fsx:`fsharp`,fth:`forth`,ftl:`freemarker`,fun:`sml`,fx:`shader`,fxh:`shader`,fxml:`xml`,fxp:`foxpro`,"g.dart":`dart_generated`,g4:`antlr`,"garden.yaml":`garden`,"garden.yml":`garden`,gbr:`image`,gd:`godot`,gdb:`database`,gdextension:`godot-assets`,gdnlib:`godot-assets`,gdns:`godot-assets`,gdshader:`godot-assets`,gdshaderinc:`godot-assets`,gemini:`gemini`,gemspec:`ruby`,geojson:`json`,geom:`shader`,"geom.glsl":`shader`,"geom.hlsl":`shader`,"geometry.glsl":`shader`,"geometry.hlsl":`shader`,geometryshader:`shader`,gif:`image`,gifv:`video`,"gitlab-ci.yml":`gitlab`,glb:`3d`,gleam:`gleam`,glsl:`shader`,gltf:`3d`,gmi:`gemini`,gml:`gamemaker`,gnu:`gnuplot`,go:`go`,godot:`godot-assets`,gp:`audio`,gpg:`key`,gpl:`palette`,gpr:`image`,gql:`graphql`,gr:`grain`,gradle:`gradle`,graphcool:`graphcool`,graphql:`graphql`,grm:`sml`,groovy:`groovy`,gs:`apps-script`,"gs.glsl":`shader`,gsm:`audio`,gvimrc:`vim`,gvy:`groovy`,gyp:`python`,gypi:`python`,gz:`zip`,gzip:`zip`,h:`h`,"h++":`hpp`,"h.in":`cpp`,haml:`haml`,handlebars:`handlebars`,har:`json`,hbs:`handlebars`,hcl:`hcl`,hdd:`disc`,heex:`elixir`,heic:`image`,heif:`image`,hex:`hex`,hfs:`zip`,hh:`hpp`,hip:`hip`,hjs:`handlebars`,hjson:`hjson`,hlsl:`shader`,hlsli:`shader`,"horusec-config.json":`horusec`,hp:`hpp`,hpp:`hpp`,"hpp.in":`cpp`,hs:`haskell`,htm:`html`,html:`html`,"html.bubble":`dinophp`,html_vm:`html`,http:`http`,huff:`huff`,hurl:`hurl`,hx:`haxe`,hxx:`hpp`,i:`c`,iam:`3d`,ibc:`idris`,ibd:`database`,iced:`coffee`,icns:`image`,ico:`image`,ics:`email`,idr:`idris`,ige:`3d`,iges:`3d`,igs:`3d`,ii:`cpp`,iiq:`image`,ilk:`dll`,imba:`imba`,img:`image`,iml:`xml`,inc:`assembly`,ini:`settings`,"inky.php":`laravel`,inl:`hpp`,ino:`arduino`,ins:`doctex-installer`,ipa:`applescript`,ipp:`cpp`,ipt:`3d`,ipy:`python`,ipynb:`jupyter`,isml:`xml`,iso:`disc`,it:`audio`,iuml:`uml`,ixx:`cpp`,j2:`jinja`,jade:`pug`,jar:`jar`,jav:`java`,java:`java`,jb2:`image`,jbig2:`image`,jenkins:`jenkins`,jenkinsfile:`jenkins`,jfif:`image`,jinja:`jinja`,"jinja-html":`jinja`,jinja2:`jinja`,jl:`julia`,jmx:`xml`,jng:`image`,jpeg:`image`,jpg:`image`,jrxml:`xml`,js:`javascript`,"js.map":`javascript-map`,"js.snap":`test-js`,"jsconfig.json":`jsconfig`,jshtm:`html`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsonld:`json`,jsp:`java`,jst:`dotjs`,jsx:`react`,"jsx.snap":`test-jsx`,jt:`3d`,jxl:`image`,jxr:`image`,k:`kcl`,k25:`image`,kdbx:`database`,kdc:`image`,key:`key`,kl:`kl`,kql:`kusto`,kra:`image`,ksh:`console`,kt:`kotlin`,kts:`kotlin`,ktx:`image`,ktx2:`image`,kv:`kivy`,lang:`i18n`,latex:`tex`,launch:`xml`,lbx:`lbx`,ldf:`database`,lean:`lean`,leex:`elixir`,less:`less`,lex:`sml`,lha:`zip`,lhs:`haskell`,lib:`lib`,liquid:`liquid`,lisp:`lisp`,litcoffee:`markdown`,liz:`zip`,lock:`lock`,log:`log`,lol:`lolcode`,lottie:`lottie`,lrc:`lyric`,ls:`livescript`,lsp:`lisp`,ltx:`tex`,lua:`lua`,luau:`luau`,lucee:`coldfusion`,ly:`lilypond`,lz:`zip`,lz4:`zip`,lz5:`zip`,lzh:`zip`,lzma:`zip`,lzma2:`zip`,m:`objective-c`,m2:`macaulay2`,m2v:`video`,m3u:`audio`,m3u8:`audio`,m4a:`audio`,m4b:`audio`,m4p:`audio`,m4r:`audio`,m4v:`video`,mak:`settings`,manifest:`xml`,markdn:`markdown`,markdoc:`markdoc`,"markdoc.md":`markdoc`,markdown:`markdown`,marko:`markojs`,mbox:`email`,mca:`minecraft`,mcaddon:`minecraft`,mcfunction:`minecraft`,mcgame:`minecraft`,mclevel:`minecraft`,mcmeta:`minecraft`,mcpack:`minecraft`,mcproject:`minecraft`,mcr:`minecraft`,mcstructure:`minecraft`,mctemplate:`minecraft`,mcworld:`minecraft`,md:`markdown`,mdb:`database`,mdc:`image`,mde:`database`,mdf:`database`,mdoc:`markdoc`,mdown:`markdown`,mdp:`image`,mdtext:`markdown`,mdtxt:`markdown`,mdwn:`markdown`,mdx:`mdx`,mef:`image`,menu:`xml`,merlin:`merlin`,mermaid:`mermaid`,mesh:`3d`,mi:`c`,mid:`audio`,mii:`cpp`,mine:`minecraft`,mint:`mint`,mitigus:`assembly`,mjml:`mjml`,mjs:`javascript`,"mjs.map":`javascript-map`,mk:`makefile`,mka:`audio`,mkd:`markdown`,mkdn:`markdown`,mkv:`video`,ml:`ocaml`,mlb:`sml`,mli:`ocaml`,mlton:`sml`,mm:`objective-cpp`,mmd:`mermaid`,mmf:`audio`,mo:`i18n`,mod:`audio`,"module.js":`angular`,"module.ts":`angular`,mojo:`mojo`,moon:`moonscript`,mos:`image`,mov:`video`,mp2:`video`,mp3:`audio`,mp4:`video`,mpc:`audio`,mpe:`video`,mpeg:`video`,mpg:`video`,mpv:`video`,mqo:`3d`,mrf:`font`,mrpack:`mrpack`,mrw:`image`,ms:`assembly`,mscz:`audio`,msg:`email`,msi:`exe`,mtm:`audio`,mts:`typescript`,mui:`audio`,mus:`minecraft`,mustache:`handlebars`,musx:`audio`,mxl:`audio`,mxml:`mxml`,myd:`database`,myi:`database`,nasm:`assembly`,nb:`mathematica`,ndf:`database`,ndjson:`json`,"ndst.json":`ndst`,"ndst.yaml":`ndst`,"ndst.yml":`ndst`,nef:`image`,nf:`groovy`,"ng-template":`angular`,nginx:`nginx`,nginxconf:`nginx`,nginxconfig:`nginx`,nim:`nim`,nimble:`nim`,nix:`nix`,njk:`nunjucks`,npmrc:`settings`,nrw:`image`,nsa:`audio`,ntf:`font`,ntfs:`zip`,nu:`console`,nunjucks:`nunjucks`,nupkg:`nuget`,nuspec:`nuget`,o:`3d`,obj:`3d`,obm:`image`,odb:`database`,odin:`odin`,odp:`powerpoint`,ods:`table`,odt:`word`,odttf:`font`,oft:`email`,ogg:`video`,ogv:`video`,olm:`email`,onnx:`onnx`,opam:`opam`,"openapi.json":`openapi`,"openapi.yaml":`openapi`,"openapi.yml":`openapi`,opml:`xml`,option:`settings`,opus:`audio`,ora:`image`,orc:`database`,orf:`image`,ost:`email`,otf:`font`,otne:`otne`,owl:`xml`,p:`prolog`,p7s:`email`,pac:`javascript`,pal:`palette`,parquet:`database`,pas:`pascal`,passwd:`key`,patch:`git`,pbm:`image`,pcss:`postcss`,pdb:`database`,pde:`processing`,pdf:`pdf`,"pdm.lock":`pdm`,"pdm.toml":`pdm`,pdn:`image`,pef:`image`,pem:`key`,pgf:`image`,pgm:`image`,pgn:`chess`,pgsql:`database`,php:`php`,"php.bubble":`dinophp`,php4:`php`,php5:`php`,phtml:`php`,pic:`image`,pine:`pinejs`,pipeline:`pipeline`,"pixel.hlsl":`shader`,pkb:`database`,pkf:`audio`,pkl:`pkl`,pks:`database`,pl:`prolog`,plantuml:`uml`,plist:`xml`,plpgsql:`database`,ply:`3d`,pm:`perl`,pmd:`3d`,pmx:`3d`,png:`image`,pnm:`image`,pnml:`coloredpetrinets`,po:`i18n`,pod:`perl`,podspec:`ruby`,postgres:`database`,pot:`i18n`,potm:`powerpoint`,potx:`powerpoint`,pp:`puppet`,ppa:`powerpoint`,ppam:`powerpoint`,ppm:`image`,pps:`powerpoint`,ppsm:`powerpoint`,ppsx:`powerpoint`,ppt:`powerpoint`,pptm:`powerpoint`,pptx:`powerpoint`,prefs:`settings`,prg:`foxpro`,prisma:`prisma`,pro:`prolog`,profile:`console`,proj:`xml`,project:`xml`,"prompt.md":`prompt`,"prompts.md":`prompt`,prop:`settings`,properties:`settings`,props:`settings`,proto:`proto`,prt:`3d`,prw:`advpl`,prx:`advpl`,ps1:`powershell`,ps1xml:`powershell`,psb:`adobe-photoshop`,psc1:`powershell`,psd:`adobe-photoshop`,psd1:`powershell`,psdt:`adobe-photoshop`,psgi:`perl`,psh:`shader`,psm1:`powershell`,psql:`database`,psrc:`powershell`,pssc:`powershell`,pst:`email`,psv:`table`,pt:`pytorch`,pth:`pytorch`,ptx:`image`,pu:`uml`,pub:`key`,publishsettings:`xml`,pubxml:`xml`,"pubxml.user":`xml`,pug:`pug`,puml:`uml`,pure:`purescript`,purs:`purescript`,pwf:`pytorch`,pwn:`pawn`,"px.hlsl":`shader`,pxn:`image`,py:`python`,pyc:`python-misc`,pyi:`python`,pyt:`python`,pyw:`python`,qcow:`disc`,qcow2:`disc`,qcp:`audio`,qed:`disc`,qmd:`quarto`,qs:`qsharp`,qt:`video`,"quokka.js":`quokka`,"quokka.jsx":`quokka`,"quokka.ts":`quokka`,"quokka.tsx":`quokka`,r:`r`,r3d:`image`,ra:`audio`,raf:`image`,rahit:`shader`,"rahit.glsl":`shader`,rake:`ruby`,raku:`perl`,raml:`raml`,rar:`zip`,raw:`image`,razor:`razor`,rb:`ruby`,rbi:`ruby`,rbs:`ruby`,rbx:`ruby`,rbxl:`roblox`,rbxlx:`roblox`,rbxm:`roblox`,"rbxmk.lua":`rbxmk`,"rbxmk.luau":`rbxmk`,rbxmx:`roblox`,rc:`rc`,rcall:`shader`,"rcall.glsl":`shader`,rchit:`shader`,"rchit.glsl":`shader`,rdf:`xml`,re:`reason`,reb:`image`,red:`red`,reg:`regedit`,rego:`opa`,rei:`reason`,rej:`diff`,repo:`settings`,res:`rescript`,resi:`rescript-interface`,rest:`http`,restql:`restql`,resx:`xml`,rf64:`audio`,rgen:`shader`,"rgen.glsl":`shader`,rhistory:`r`,rhtml:`html`,rint:`shader`,"rint.glsl":`shader`,riot:`riot`,rip:`audio`,rjs:`ruby`,rkt:`racket`,rm:`video`,rmd:`r`,rmiss:`shader`,"rmiss.glsl":`shader`,rmvb:`video`,rng:`xml`,robot:`robot`,ron:`rust`,ronn:`markdown`,"route.js":`routing`,"route.jsx":`routing`,"route.ts":`routing`,"route.tsx":`routing`,"routes.js":`routing`,"routes.jsx":`routing`,"routes.ts":`routing`,"routes.tsx":`routing`,"routing.js":`routing`,"routing.jsx":`routing`,"routing.ts":`routing`,"routing.tsx":`routing`,rpm:`zip`,rpmsg:`email`,rprofile:`r`,rpy:`python`,rql:`restql`,rs:`rust`,rss:`xml`,rst:`markdown`,rt:`r`,rtf:`word`,ru:`ruby`,ruleset:`visualstudio`,rw2:`image`,rwl:`image`,rwz:`image`,s:`assembly`,sab:`3d`,sai:`image`,san:`san`,sas:`sas`,sas7bdat:`sas`,sashdat:`sas`,sass:`sass`,sast:`sas`,sat:`3d`,sbt:`sbt`,sbv:`subtitles`,sc:`scala`,scala:`scala`,"schema.json":`json_schema`,scm:`scheme`,scss:`sass`,sdf:`database`,sdt:`audio`,secret:`key`,sesx:`audio`,settings:`settings`,sf2:`audio`,sh:`console`,sha256:`key`,sha256sum:`key`,sha256sums:`key`,shader:`shader`,shasum:`key`,shproj:`xml`,shtml:`html`,sig:`sml`,"sigstore.json":`verified`,sketch:`sketch`,"skill.md":`skill`,"skills.md":`skill`,skp:`3d`,slang:`shader`,sldasm:`3d`,slddrw:`3d`,sldprt:`3d`,slim:`slim`,slint:`slint`,sln:`visualstudio`,"sln.dotsettings":`settings`,"sln.dotsettings.user":`settings`,slnf:`visualstudio`,slnx:`visualstudio`,sls:`salt`,slx:`simulink`,smali:`android`,smb:`3d`,smk:`snakemake`,sml:`sml`,smt:`3d`,snakemake:`snakemake`,so:`dll`,sol:`solidity`,"spec-d.ts":`test-ts`,"spec-d.tsx":`test-jsx`,"spec.cjs":`test-js`,"spec.cts":`test-ts`,"spec.js":`test-js`,"spec.jsx":`test-jsx`,"spec.mjs":`test-js`,"spec.mts":`test-ts`,"spec.ts":`test-ts`,"spec.tsx":`test-jsx`,spv:`shader`,spwn:`spwn`,sql:`database`,sqlite:`database`,sqlite3:`database`,squashfs:`zip`,sr2:`image`,srf:`image`,srt:`subtitles`,srw:`image`,ss:`scheme`,ssa:`subtitles`,sss:`postcss`,"st.css":`stylable`,stan:`stan`,stap:`audio`,ste:`3d`,"steadybit.yaml":`steadybit`,"steadybit.yml":`steadybit`,step:`3d`,stl:`3d`,"stories.js":`storybook`,"stories.jsx":`storybook`,"stories.mdx":`storybook`,"stories.svelte":`storybook`,"stories.ts":`storybook`,"stories.tsx":`storybook`,"stories.vue":`storybook`,"story.js":`storybook`,"story.jsx":`storybook`,"story.mdx":`storybook`,"story.ts":`storybook`,"story.tsx":`storybook`,storyboard:`xml`,stp:`3d`,styl:`stylus`,sub:`subtitles`,"sublime-project":`sublime`,"sublime-workspace":`sublime`,sui:`font`,suit:`font`,suo:`visualstudio`,sv:`verilog`,svelte:`svelte`,svg:`svg`,svh:`verilog`,svx:`mdsvex`,sw:`sway`,"swagger.json":`swagger`,"swagger.yaml":`swagger`,"swagger.yml":`swagger`,swc:`adobe-swc`,swcrc:`swc`,swf:`flash`,swift:`swift`,swiftdeps:`swift`,swiftdoc:`swift`,swiftmodule:`swift`,swiftsourceinfo:`swift`,swm:`zip`,sy:`siyuan`,synctex:`tex`,"synctex.gz":`tex`,t:`perl`,tag:`riot`,tar:`zip`,targets:`xml`,"taskfile.yaml":`taskfile`,"taskfile.yml":`taskfile`,tauri:`tauri`,taz:`zip`,tbz:`zip`,tbz2:`zip`,tcc:`hpp`,tcl:`tcl`,tcsh:`console`,tcshrc:`console`,templ:`templ`,template:`template`,terraformignore:`terraform`,tesc:`shader`,"tesc.glsl":`shader`,tese:`shader`,"tese.glsl":`shader`,"tess.hlsl":`shader`,"tessellation.hlsl":`shader`,"test-d.ts":`test-ts`,"test-d.tsx":`test-jsx`,"test.cjs":`test-js`,"test.cts":`test-ts`,"test.js":`test-js`,"test.jsx":`test-jsx`,"test.mjs":`test-js`,"test.mts":`test-ts`,"test.ts":`test-ts`,"test.tsx":`test-jsx`,tex:`tex`,tf:`terraform`,"tf.json":`terraform`,tfbackend:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tg:`audio`,tga:`image`,tgz:`zip`,tif:`image`,tiff:`image`,tikz:`tex`,tl:`teal`,tld:`xml`,tldr:`tldraw`,tlz:`zip`,tmlanguage:`xml`,tmx:`xml`,tnef:`email`,tobi:`tobi`,toc:`toc`,todo:`todo`,tofu:`opentofu`,toml:`toml`,"tool-versions":`settings`,toon:`toon`,tpl:`smarty`,tpp:`cpp`,tpz:`zip`,tree:`tree`,tres:`godot-assets`,ts:`typescript`,"ts.glsl":`shader`,"ts.map":`json`,"ts.snap":`test-ts`,tsbuildinfo:`json`,tscn:`godot-assets`,"tsconfig.json":`tsconfig`,tsv:`table`,tsx:`react_ts`,"tsx.snap":`test-jsx`,ttc:`font`,ttf:`font`,ttml:`subtitles`,tw:`twine`,twee:`twine`,twig:`twig`,txt:`document`,txx:`cpp`,txz:`zip`,typ:`typst`,tz:`zip`,tzst:`zip`,tzstd:`zip`,ua:`uiua`,unity:`unity`,unitypackage:`unity`,url:`url`,usd:`3d`,usdz:`3d`,use:`sml`,v:`vlang`,vac:`3d`,vagrantfile:`vagrant`,vala:`vala`,vb:`visualstudio`,vba:`visualstudio`,vbhtml:`razor`,vbox:`virtual`,"vbox-prev":`virtual`,vbproj:`xml`,"vbproj.user":`xml`,vbs:`visualstudio`,vcl:`varnish`,vcxitems:`visualstudio`,"vcxitems.filters":`visualstudio`,vcxproj:`visualstudio`,"vcxproj.filters":`visualstudio`,vdi:`virtual`,vdp:`3d`,ved:`vedic`,veda:`vedic`,vedic:`vedic`,verse:`verse`,vert:`shader`,"vert.glsl":`shader`,"vertex.glsl":`shader`,vertexshader:`shader`,vfl:`vfl`,vhd:`verilog`,vhdl:`verilog`,vhdx:`verilog`,vim:`vim`,viminfo:`vim`,vimrc:`vim`,vm:`velocity`,vmdk:`disc`,vob:`video`,voc:`audio`,volt:`html`,vox:`3d`,vqf:`audio`,"vs.glsl":`shader`,vscodeignore:`vscode`,vsh:`shader`,vsix:`vscode`,vsixmanifest:`vscode`,vtl:`velocity`,vtt:`subtitles`,vue:`vue`,wasm:`webassembly`,wat:`webassembly`,wav:`audio`,weba:`audio`,webm:`video`,webmanifest:`json`,webp:`image`,wfp:`audio`,wgsl:`shader`,whl:`python-misc`,wim:`zip`,windi:`windicss`,winget:`yaml`,wire:`3d`,wixproj:`visualstudio`,wl:`wolframlanguage`,wls:`wolframlanguage`,wma:`audio`,wmv:`video`,woff:`font`,woff2:`font`,workbook:`markdown`,wpl:`audio`,wproj:`audio`,wpy:`wepy`,wrap:`meson`,wrl:`3d`,wsd:`uml`,wsdl:`xml`,wv:`audio`,wxi:`xml`,wxl:`xml`,wxs:`xml`,x3f:`image`,x_b:`3d`,x_t:`3d`,xaml:`xaml`,xar:`zip`,xbl:`xml`,xcf:`image`,xcplayground:`swift`,xht:`html`,xhtml:`html`,xib:`xml`,xlf:`i18n`,xliff:`xml`,xls:`table`,xlsm:`table`,xlsx:`table`,xml:`xml`,"xml.dist":`xml`,"xml.dist.sample":`xml`,xmp:`xml`,xoml:`xml`,xpdl:`xml`,xprofile:`console`,xquery:`xml`,xsd:`xml`,xsession:`console`,xsessionrc:`console`,xsh:`console`,xsl:`xml`,xslt:`xml`,xul:`xml`,xz:`zip`,yaml:`yaml`,"yaml-tmlanguage":`yaml`,"yaml-tmpreferences":`yaml`,"yaml-tmtheme":`yaml`,"yaml.dist":`yaml`,yang:`yang`,yash_profile:`console`,yashrc:`console`,yml:`yaml`,"yml.dist":`yaml`,yuv:`video`,yy:`gamemaker`,yyp:`gamemaker`,yyz:`gamemaker`,z:`zip`,zeabur:`zeabur`,zig:`zig`,zip:`zip`,zlogin:`console`,zlogout:`console`,zon:`zig`,zprofile:`console`,zsh:`console`,"zsh-theme":`console`,zshenv:`console`,zshrc:`console`,zst:`zip`,zstd:`zip`,ц:`tsil`,"🔥":`mojo`},Aa={"-@types":`folder-typescript`,"-addin":`folder-plugin`,"-addins":`folder-plugin`,"-addon":`folder-plugin`,"-addons":`folder-plugin`,"-admin":`folder-admin`,"-admins":`folder-admin`,"-agent":`folder-robot`,"-agents":`folder-robot`,"-android":`folder-android`,"-angular":`folder-angular`,"-anim":`folder-animation`,"-animated":`folder-animation`,"-animation":`folder-animation`,"-animations":`folder-animation`,"-anims":`folder-animation`,"-ansible":`folder-ansible`,"-api":`folder-api`,"-apis":`folder-api`,"-apollo":`folder-apollo`,"-apollo-cache":`folder-apollo`,"-apollo-client":`folder-apollo`,"-apollo-config":`folder-apollo`,"-app":`folder-app`,"-apple":`folder-macos`,"-application":`folder-app`,"-applications":`folder-app`,"-apps":`folder-app`,"-appwrite":`folder-appwrite`,"-arc":`folder-archive`,"-archival":`folder-archive`,"-archive":`folder-archive`,"-archives":`folder-archive`,"-arcs":`folder-archive`,"-article":`folder-docs`,"-articles":`folder-docs`,"-asm":`folder-assembly`,"-assembly":`folder-assembly`,"-asset":`folder-resource`,"-assets":`folder-resource`,"-astro":`folder-astro`,"-atom":`folder-atom`,"-atoms":`folder-atom`,"-attachment":`folder-attachment`,"-attachments":`folder-attachment`,"-aud":`folder-audio`,"-audio":`folder-audio`,"-audios":`folder-audio`,"-auds":`folder-audio`,"-aurelia_project":`folder-aurelia`,"-auth":`folder-secure`,"-authentication":`folder-secure`,"-auto":`folder-generator`,"-aws":`folder-aws`,"-azure":`folder-aws`,"-azure-pipelines":`folder-azure-pipelines`,"-azure-pipelines-ci":`folder-azure-pipelines`,"-back-up":`folder-backup`,"-back-ups":`folder-backup`,"-backend":`folder-server`,"-backends":`folder-server`,"-backup":`folder-backup`,"-backups":`folder-backup`,"-bak":`folder-backup`,"-baks":`folder-backup`,"-base":`folder-base`,"-bases":`folder-base`,"-batch":`folder-batch`,"-batches":`folder-batch`,"-batchs":`folder-batch`,"-bench":`folder-benchmark`,"-benches":`folder-benchmark`,"-benchmark":`folder-benchmark`,"-benchmarks":`folder-benchmark`,"-bibliographies":`folder-bibliography`,"-bibliography":`folder-bibliography`,"-bicep":`folder-bicep`,"-bin":`folder-dist`,"-bkp":`folder-backup`,"-bkps":`folder-backup`,"-blender":`folder-blender`,"-blender-assets":`folder-blender`,"-blender-files":`folder-blender`,"-blender-models":`folder-blender`,"-blender-project":`folder-blender`,"-bloc":`folder-bloc`,"-blocs":`folder-bloc`,"-blog":`folder-docs`,"-book":`folder-bibliography`,"-books":`folder-bibliography`,"-bot":`folder-robot`,"-bots":`folder-robot`,"-bower_components":`folder-bower`,"-browser":`folder-public`,"-browsers":`folder-public`,"-build":`folder-dist`,"-buildkite":`folder-buildkite`,"-builds":`folder-dist`,"-built":`folder-dist`,"-bull":`folder-queue`,"-cache":`folder-temp`,"-cached":`folder-temp`,"-calc":`folder-functions`,"-calcs":`folder-functions`,"-calculation":`folder-functions`,"-calculations":`folder-functions`,"-cargo":`folder-rust`,"-cart":`folder-cart`,"-centos":`folder-linux`,"-cert":`folder-secure`,"-certificate":`folder-secure`,"-certificates":`folder-secure`,"-certs":`folder-secure`,"-cfg":`folder-config`,"-cfgs":`folder-config`,"-cfn-gen":`folder-generator`,"-changes":`folder-delta`,"-changeset":`folder-changesets`,"-changesets":`folder-changesets`,"-chat":`folder-messages`,"-chats":`folder-messages`,"-ci":`folder-ci`,"-cipher":`folder-secure`,"-circleci":`folder-circleci`,"-cjs":`folder-javascript`,"-class":`folder-class`,"-classes":`folder-class`,"-claude":`folder-claude`,"-cli":`folder-command`,"-client":`folder-client`,"-clients":`folder-client`,"-cline_docs":`folder-cline`,"-clis":`folder-command`,"-cloud-firestore":`folder-firestore`,"-cloud-functions":`folder-cloud-functions`,"-cloudflare":`folder-cloudflare`,"-cloudfunctions":`folder-cloud-functions`,"-cluster":`folder-cluster`,"-clusters":`folder-cluster`,"-cmd":`folder-command`,"-cobol":`folder-cobol`,"-code":`folder-src`,"-color":`folder-theme`,"-colors":`folder-theme`,"-colour":`folder-theme`,"-colours":`folder-theme`,"-command":`folder-command`,"-commandline":`folder-command`,"-commands":`folder-command`,"-common":`folder-shared`,"-compiled":`folder-dist`,"-components":`folder-components`,"-composable":`folder-functions`,"-composables":`folder-functions`,"-concept":`folder-mock`,"-concepts":`folder-mock`,"-conf":`folder-config`,"-config":`folder-config`,"-configs":`folder-config`,"-configuration":`folder-config`,"-configurations":`folder-config`,"-confs":`folder-config`,"-connection":`folder-connection`,"-connections":`folder-connection`,"-console":`folder-console`,"-const":`folder-constant`,"-constant":`folder-constant`,"-constants":`folder-constant`,"-consts":`folder-constant`,"-container":`folder-container`,"-containers":`folder-container`,"-content":`folder-content`,"-contents":`folder-content`,"-context":`folder-context`,"-contexts":`folder-context`,"-contract":`folder-contract`,"-contract-test":`folder-contract`,"-contract-testing":`folder-contract`,"-contract-tests":`folder-contract`,"-contracts":`folder-contract`,"-controller":`folder-controller`,"-controllers":`folder-controller`,"-controls":`folder-controller`,"-conversation":`folder-messages`,"-conversations":`folder-messages`,"-core":`folder-core`,"-coverage":`folder-coverage`,"-crash":`folder-error`,"-crashes":`folder-error`,"-crates":`folder-lib`,"-css":`folder-css`,"-cts":`folder-typescript`,"-cubit":`folder-bloc`,"-cubits":`folder-bloc`,"-cue":`folder-cue`,"-cues":`folder-cue`,"-cursor":`folder-cursor`,"-custom":`folder-custom`,"-customs":`folder-custom`,"-cypher":`folder-secure`,"-cypress":`folder-cypress`,"-dal":`folder-dal`,"-dart":`folder-dart`,"-dart_tool":`folder-dart`,"-dart_tools":`folder-dart`,"-data":`folder-database`,"-data-access":`folder-dal`,"-data-access-layer":`folder-dal`,"-database":`folder-database`,"-databases":`folder-database`,"-db":`folder-database`,"-deb":`folder-linux`,"-debian":`folder-linux`,"-debug":`folder-debug`,"-debugger":`folder-debug`,"-debugging":`folder-debug`,"-decorator":`folder-decorators`,"-decorators":`folder-decorators`,"-deepin":`folder-linux`,"-delta":`folder-delta`,"-deltas":`folder-delta`,"-demo":`folder-examples`,"-demos":`folder-examples`,"-dependencies":`folder-packages`,"-design":`folder-theme`,"-designs":`folder-theme`,"-desktop":`folder-desktop`,"-devcontainer":`folder-container`,"-devpackages":`folder-packages`,"-devtools":`folder-tools`,"-dialog":`folder-messages`,"-dialogs":`folder-messages`,"-diary":`folder-docs`,"-directive":`folder-directive`,"-directives":`folder-directive`,"-display":`folder-desktop`,"-dist":`folder-dist`,"-distribution":`folder-dist`,"-doc":`folder-docs`,"-docker":`folder-docker`,"-dockerfiles":`folder-docker`,"-dockerhub":`folder-docker`,"-docs":`folder-docs`,"-document":`folder-docs`,"-documentation":`folder-docs`,"-documents":`folder-docs`,"-download":`folder-download`,"-downloader":`folder-download`,"-downloaders":`folder-download`,"-downloads":`folder-download`,"-draft":`folder-mock`,"-drafts":`folder-mock`,"-drizzle":`folder-drizzle`,"-ds_store":`folder-macos`,"-dump":`folder-dump`,"-dumps":`folder-dump`,"-e2e":`folder-coverage`,"-easing":`folder-animation`,"-easings":`folder-animation`,"-element":`folder-element`,"-elements":`folder-element`,"-email":`folder-mail`,"-emails":`folder-mail`,"-enum":`folder-enum`,"-enums":`folder-enum`,"-env":`folder-environment`,"-environment":`folder-environment`,"-environments":`folder-environment`,"-envs":`folder-environment`,"-err":`folder-error`,"-error":`folder-error`,"-errors":`folder-error`,"-errs":`folder-error`,"-eslint":`folder-eslint`,"-eslint-config":`folder-eslint`,"-eslint-configs":`folder-eslint`,"-eslint-plugin":`folder-eslint`,"-eslint-plugins":`folder-eslint`,"-etc":`folder-other`,"-event":`folder-event`,"-events":`folder-event`,"-example":`folder-examples`,"-examples":`folder-examples`,"-expo":`folder-expo`,"-expo-shared":`folder-expo`,"-export":`folder-export`,"-exported":`folder-export`,"-exports":`folder-export`,"-extension":`folder-plugin`,"-extensions":`folder-plugin`,"-external":`folder-lib`,"-externals":`folder-lib`,"-extra":`folder-other`,"-extras":`folder-other`,"-fastlane":`folder-fastlane`,"-favicon":`folder-favicon`,"-favicons":`folder-favicon`,"-feat":`folder-features`,"-feats":`folder-features`,"-feature":`folder-features`,"-features":`folder-features`,"-fig":`folder-images`,"-figs":`folder-images`,"-figure":`folder-images`,"-figures":`folder-images`,"-filter":`folder-filter`,"-filters":`folder-filter`,"-firebase":`folder-firebase`,"-firebase-cloud-functions":`folder-cloud-functions`,"-firebase-cloudfunctions":`folder-cloud-functions`,"-firebase-firestore":`folder-firestore`,"-firestore":`folder-firestore`,"-fixture":`folder-mock`,"-fixtures":`folder-mock`,"-flow-typed":`folder-flow`,"-flutter":`folder-flutter`,"-font":`folder-font`,"-fonts":`folder-font`,"-forgejo":`folder-forgejo`,"-form":`folder-form`,"-forms":`folder-form`,"-forum":`folder-messages`,"-fragments":`folder-components`,"-frontend":`folder-client`,"-frontends":`folder-client`,"-func":`folder-functions`,"-funcs":`folder-functions`,"-function":`folder-functions`,"-functions":`folder-functions`,"-game":`folder-console`,"-gamemaker":`folder-gamemaker`,"-gamemaker2":`folder-gamemaker`,"-games":`folder-console`,"-gcp":`folder-aws`,"-gemini":`folder-gemini-ai`,"-gemini-ai":`folder-gemini-ai`,"-geminiai":`folder-gemini-ai`,"-gen":`folder-generator`,"-generated":`folder-generator`,"-generator":`folder-generator`,"-generators":`folder-generator`,"-gens":`folder-generator`,"-git":`folder-git`,"-gitea":`folder-gitea`,"-githooks":`folder-git`,"-github":`folder-github`,"-github/issue_template":`folder-template`,"-github/pull_request_template":`folder-template`,"-github/workflows":`folder-gh-workflows`,"-gitlab":`folder-gitlab`,"-global":`folder-global`,"-glsl":`folder-shader`,"-go":`folder-go`,"-godot":`folder-godot`,"-godot-cpp":`folder-godot`,"-golang":`folder-go`,"-gql":`folder-graphql`,"-gradle":`folder-gradle`,"-graphql":`folder-graphql`,"-guard":`folder-guard`,"-guards":`folder-guard`,"-gui":`folder-ui`,"-gulp":`folder-gulp`,"-gulp-tasks":`folder-gulp`,"-gulpfile.babel.js":`folder-gulp`,"-gulpfile.js":`folder-gulp`,"-gulpfile.mjs":`folder-gulp`,"-gulpfile.ts":`folder-gulp`,"-gulpfiles":`folder-gulp`,"-handler":`folder-controller`,"-handlers":`folder-controller`,"-helm":`folder-helm`,"-helmchart":`folder-helm`,"-helmcharts":`folder-helm`,"-helper":`folder-helper`,"-helpers":`folder-helper`,"-hg":`folder-mercurial`,"-hgext":`folder-mercurial`,"-hghooks":`folder-mercurial`,"-histories":`folder-backup`,"-history":`folder-backup`,"-hlsl":`folder-shader`,"-home":`folder-home`,"-hook":`folder-hook`,"-hooks":`folder-hook`,"-html":`folder-views`,"-husky":`folder-husky`,"-i18n":`folder-i18n`,"-ico":`folder-images`,"-icon":`folder-images`,"-icons":`folder-images`,"-icos":`folder-images`,"-idea":`folder-intellij`,"-image":`folder-images`,"-images":`folder-images`,"-img":`folder-images`,"-imgs":`folder-images`,"-import":`folder-import`,"-imported":`folder-import`,"-imports":`folder-import`,"-in":`folder-input`,"-inc":`folder-include`,"-inc64":`folder-include`,"-include":`folder-include`,"-includes":`folder-include`,"-infra":`folder-server`,"-infrastructure":`folder-server`,"-input":`folder-input`,"-inputs":`folder-input`,"-integration":`folder-connection`,"-integration-test":`folder-coverage`,"-integration-tests":`folder-coverage`,"-integrations":`folder-connection`,"-interceptor":`folder-interceptor`,"-interceptors":`folder-interceptor`,"-interface":`folder-interface`,"-interfaces":`folder-interface`,"-internationalization":`folder-i18n`,"-inventories":`folder-server`,"-inventory":`folder-server`,"-io":`folder-input`,"-ios":`folder-ios`,"-ipad":`folder-macos`,"-iphone":`folder-macos`,"-ipod":`folder-macos`,"-ipynb":`folder-jupyter`,"-it":`folder-coverage`,"-j2":`folder-jinja`,"-java":`folder-java`,"-javascript":`folder-javascript`,"-javascripts":`folder-javascript`,"-jinja":`folder-jinja`,"-jinja2":`folder-jinja`,"-job":`folder-job`,"-jobs":`folder-job`,"-js":`folder-javascript`,"-json":`folder-json`,"-jsonc":`folder-json`,"-jsonl":`folder-json`,"-jsons":`folder-json`,"-jupyter":`folder-jupyter`,"-jwt":`folder-keys`,"-k8s":`folder-kubernetes`,"-key":`folder-keys`,"-keys":`folder-keys`,"-kit":`folder-tools`,"-kits":`folder-tools`,"-knowledge":`folder-docs`,"-kotlin":`folder-kotlin`,"-kql":`folder-kusto`,"-kubernetes":`folder-kubernetes`,"-kusto":`folder-kusto`,"-l10n":`folder-i18n`,"-lambda":`folder-functions`,"-lambdas":`folder-functions`,"-landing":`folder-home`,"-lang":`folder-i18n`,"-langs":`folder-i18n`,"-language":`folder-i18n`,"-languages":`folder-i18n`,"-layout":`folder-layout`,"-layouts":`folder-layout`,"-lefthook":`folder-lefthook`,"-lefthook-local":`folder-lefthook`,"-less":`folder-less`,"-lib":`folder-lib`,"-lib64":`folder-lib`,"-libraries":`folder-lib`,"-library":`folder-lib`,"-libs":`folder-lib`,"-license":`folder-license`,"-licenses":`folder-license`,"-link":`folder-link`,"-links":`folder-link`,"-linux":`folder-linux`,"-linuxbsd":`folder-linux`,"-liquibase":`folder-liquibase`,"-locale":`folder-i18n`,"-locales":`folder-i18n`,"-localization":`folder-i18n`,"-log":`folder-log`,"-logging":`folder-log`,"-logic":`folder-functions`,"-logs":`folder-log`,"-lottie":`folder-lottie`,"-lottiefiles":`folder-lottie`,"-lotties":`folder-lottie`,"-lua":`folder-lua`,"-luau":`folder-luau`,"-mac":`folder-macos`,"-macbook":`folder-macos`,"-macbook-air":`folder-macos`,"-macos":`folder-macos`,"-macosx":`folder-macos`,"-mail":`folder-mail`,"-mailers":`folder-mail`,"-mails":`folder-mail`,"-main":`folder-home`,"-manager":`folder-admin`,"-managers":`folder-admin`,"-mapping":`folder-mappings`,"-mappings":`folder-mappings`,"-markdown":`folder-markdown`,"-math":`folder-functions`,"-maths":`folder-functions`,"-md":`folder-markdown`,"-measure":`folder-benchmark`,"-measurement":`folder-benchmark`,"-measures":`folder-benchmark`,"-media":`folder-video`,"-messages":`folder-messages`,"-messaging":`folder-messages`,"-meta":`folder-meta`,"-meta-inf":`folder-config`,"-metadata":`folder-meta`,"-metro":`folder-metro`,"-middleware":`folder-middleware`,"-middlewares":`folder-middleware`,"-migration":`folder-migrations`,"-migrations":`folder-migrations`,"-mint":`folder-linux`,"-misc":`folder-other`,"-miscellaneous":`folder-other`,"-mjml":`folder-mjml`,"-mjs":`folder-javascript`,"-mobile":`folder-mobile`,"-mobiles":`folder-mobile`,"-mock":`folder-mock`,"-mocks":`folder-mock`,"-mod":`folder-plugin`,"-modding":`folder-plugin`,"-model":`folder-class`,"-models":`folder-class`,"-moderator":`folder-admin`,"-moderators":`folder-admin`,"-mods":`folder-plugin`,"-module":`folder-plugin`,"-modules":`folder-plugin`,"-mojo":`folder-mojo`,"-molecule":`folder-molecule`,"-molecules":`folder-molecule`,"-moon":`folder-moon`,"-motion":`folder-animation`,"-motions":`folder-animation`,"-movie":`folder-video`,"-movies":`folder-video`,"-mq":`folder-queue`,"-mts":`folder-typescript`,"-music":`folder-audio`,"-navigation":`folder-routes`,"-navigations":`folder-routes`,"-netlify":`folder-netlify`,"-news":`folder-docs`,"-next":`folder-next`,"-nginx":`folder-nginx`,"-node":`folder-node`,"-node_modules":`folder-node`,"-nodejs":`folder-node`,"-note":`folder-docs`,"-notebook":`folder-jupyter`,"-notebooks":`folder-jupyter`,"-notes":`folder-docs`,"-now":`folder-vercel`,"-nuxt":`folder-nuxt`,"-nyc-output":`folder-coverage`,"-nyc_output":`folder-coverage`,"-obsidian":`folder-obsidian`,"-opencode":`folder-opencode`,"-option":`folder-config`,"-options":`folder-config`,"-organism":`folder-organism`,"-organisms":`folder-organism`,"-osx":`folder-macos`,"-other":`folder-other`,"-others":`folder-other`,"-out":`folder-dist`,"-output":`folder-dist`,"-outputs":`folder-dist`,"-package":`folder-packages`,"-packages":`folder-packages`,"-pact":`folder-contract`,"-pacts":`folder-contract`,"-page":`folder-views`,"-pages":`folder-views`,"-palette":`folder-theme`,"-palettes":`folder-theme`,"-partial":`folder-include`,"-partials":`folder-include`,"-patches":`folder-git`,"-pdf":`folder-pdf`,"-pdfs":`folder-pdf`,"-pdm-build":`folder-pdm`,"-pdm-plugins":`folder-pdm`,"-perf":`folder-benchmark`,"-performance":`folder-benchmark`,"-phone":`folder-mobile`,"-phones":`folder-mobile`,"-photo":`folder-images`,"-photograph":`folder-images`,"-photographs":`folder-images`,"-photos":`folder-images`,"-php":`folder-php`,"-phpmailer":`folder-phpmailer`,"-pic":`folder-images`,"-pics":`folder-images`,"-picture":`folder-images`,"-pictures":`folder-images`,"-pipe":`folder-pipe`,"-pipeline":`folder-pipe`,"-pipelines":`folder-pipe`,"-pipes":`folder-pipe`,"-pkg":`folder-packages`,"-pkgs":`folder-packages`,"-plastic":`folder-plastic`,"-playground":`folder-sandbox`,"-playgrounds":`folder-sandbox`,"-playlist":`folder-audio`,"-playlists":`folder-audio`,"-plugin":`folder-plugin`,"-plugins":`folder-plugin`,"-policies":`folder-policy`,"-policy":`folder-policy`,"-popos":`folder-linux`,"-portability":`folder-mobile`,"-portable":`folder-mobile`,"-post":`folder-docs`,"-postman":`folder-postman`,"-posts":`folder-docs`,"-powershell":`folder-powershell`,"-pref":`folder-config`,"-preference":`folder-config`,"-preferences":`folder-config`,"-prefs":`folder-config`,"-presentation":`folder-ui`,"-preview":`folder-review`,"-previews":`folder-review`,"-prisma":`folder-prisma`,"-prisma/schema":`folder-prisma`,"-private":`folder-private`,"-profiling":`folder-benchmark`,"-proj":`folder-project`,"-project":`folder-project`,"-projects":`folder-project`,"-projs":`folder-project`,"-prompt":`folder-prompts`,"-prompts":`folder-prompts`,"-properties":`folder-config`,"-props":`folder-config`,"-proto":`folder-proto`,"-protobuf":`folder-proto`,"-protobufs":`folder-proto`,"-protos":`folder-proto`,"-provider":`folder-controller`,"-providers":`folder-controller`,"-proxy":`folder-public`,"-ps":`folder-powershell`,"-ps1":`folder-powershell`,"-ps4":`folder-console`,"-ps5":`folder-console`,"-public":`folder-public`,"-public_html":`folder-views`,"-pwa":`folder-client`,"-pycache":`folder-python`,"-pytest_cache":`folder-python`,"-python":`folder-python`,"-pytorch":`folder-pytorch`,"-quasar":`folder-quasar`,"-queue":`folder-queue`,"-queues":`folder-queue`,"-r":`folder-r`,"-recordings":`folder-audio`,"-release":`folder-dist`,"-remote":`folder-connection`,"-remotes":`folder-connection`,"-repo":`folder-repository`,"-report":`folder-resource`,"-reports":`folder-resource`,"-repos":`folder-repository`,"-repositories":`folder-repository`,"-repository":`folder-repository`,"-res":`folder-resource`,"-resolver":`folder-resolver`,"-resolvers":`folder-resolver`,"-resource":`folder-resource`,"-resources":`folder-resource`,"-restapi":`folder-api`,"-review":`folder-review`,"-reviewed":`folder-review`,"-reviews":`folder-review`,"-revisal":`folder-review`,"-revisals":`folder-review`,"-robot":`folder-robot`,"-robots":`folder-robot`,"-router":`folder-routes`,"-routers":`folder-routes`,"-routes":`folder-routes`,"-routing":`folder-routes`,"-rule":`folder-rules`,"-rules":`folder-rules`,"-rust":`folder-rust`,"-salt":`folder-salt`,"-saltstack":`folder-salt`,"-sample":`folder-examples`,"-sample-data":`folder-examples`,"-samples":`folder-examples`,"-sandbox":`folder-sandbox`,"-sandboxes":`folder-sandbox`,"-sass":`folder-sass`,"-scala":`folder-scala`,"-schema":`folder-class`,"-schemas":`folder-class`,"-sconf_temp":`folder-scons`,"-scons":`folder-scons`,"-scons_cache":`folder-scons`,"-screen":`folder-views`,"-screengrab":`folder-images`,"-screengrabs":`folder-images`,"-screens":`folder-views`,"-screenshot":`folder-images`,"-screenshots":`folder-images`,"-script":`folder-scripts`,"-scripting":`folder-scripts`,"-scripts":`folder-scripts`,"-scss":`folder-sass`,"-secret":`folder-keys`,"-secrets":`folder-keys`,"-secure":`folder-secure`,"-security":`folder-secure`,"-seed":`folder-seeders`,"-seeders":`folder-seeders`,"-seeding":`folder-seeders`,"-seeds":`folder-seeders`,"-server":`folder-server`,"-serverless":`folder-serverless`,"-serverpackages":`folder-packages`,"-servers":`folder-server`,"-service":`folder-controller`,"-services":`folder-controller`,"-setting":`folder-config`,"-settings":`folder-config`,"-shader":`folder-shader`,"-shaders":`folder-shader`,"-shared":`folder-shared`,"-shop":`folder-cart`,"-shopping":`folder-cart`,"-shopping-cart":`folder-cart`,"-sim":`folder-simulations`,"-sims":`folder-simulations`,"-simulation":`folder-simulations`,"-simulations":`folder-simulations`,"-site":`folder-public`,"-sketch":`folder-mock`,"-sketches":`folder-mock`,"-skill":`folder-skills`,"-skills":`folder-skills`,"-smtp":`folder-mail`,"-snap":`folder-snapcraft`,"-snapcraft":`folder-snapcraft`,"-snapshots":`folder-test`,"-snippet":`folder-snippet`,"-snippets":`folder-snippet`,"-song":`folder-audio`,"-songs":`folder-audio`,"-sound":`folder-audio`,"-sounds":`folder-audio`,"-source":`folder-src`,"-sources":`folder-src`,"-spa":`folder-client`,"-spec":`folder-test`,"-specs":`folder-test`,"-spellcheck":`folder-syntax`,"-spellcheckers":`folder-syntax`,"-sql":`folder-database`,"-src":`folder-src`,"-src-tauri":`folder-src-tauri`,"-srcs":`folder-src`,"-ssl":`folder-secure`,"-stack":`folder-stack`,"-stacks":`folder-stack`,"-start":`folder-home`,"-static":`folder-resource`,"-stencil":`folder-stencil`,"-store":`folder-store`,"-stores":`folder-store`,"-stories":`folder-storybook`,"-storybook":`folder-storybook`,"-style":`folder-css`,"-styles":`folder-css`,"-stylesheet":`folder-css`,"-stylesheets":`folder-css`,"-stylus":`folder-stylus`,"-sublime":`folder-sublime`,"-submodules":`folder-git`,"-supabase":`folder-supabase`,"-svelte":`folder-svelte`,"-svelte-kit":`folder-svelte`,"-svg":`folder-svg`,"-svgs":`folder-svg`,"-switch":`folder-console`,"-syntax":`folder-syntax`,"-syntaxes":`folder-syntax`,"-table-of-contents":`folder-toc`,"-target":`folder-target`,"-taskfile":`folder-taskfile`,"-taskfiles":`folder-taskfile`,"-tasks":`folder-tasks`,"-television":`folder-television`,"-temp":`folder-temp`,"-template":`folder-template`,"-templates":`folder-template`,"-terraform":`folder-terraform`,"-test":`folder-test`,"-testfiles":`folder-test`,"-testing":`folder-test`,"-tests":`folder-test`,"-texture":`folder-images`,"-textures":`folder-images`,"-theme":`folder-theme`,"-themes":`folder-theme`,"-third-party":`folder-lib`,"-thirdparty":`folder-lib`,"-tickets":`folder-tasks`,"-tls":`folder-secure`,"-tmp":`folder-temp`,"-toc":`folder-toc`,"-token":`folder-keys`,"-tokens":`folder-keys`,"-toolbox":`folder-tools`,"-toolboxes":`folder-tools`,"-tooling":`folder-tools`,"-toolkit":`folder-tools`,"-toolkits":`folder-tools`,"-tools":`folder-tools`,"-torch":`folder-pytorch`,"-transition":`folder-animation`,"-transitions":`folder-animation`,"-translate":`folder-i18n`,"-translation":`folder-i18n`,"-translations":`folder-i18n`,"-trash":`folder-trash`,"-trigger":`folder-trigger`,"-triggers":`folder-trigger`,"-ts":`folder-typescript`,"-turbo":`folder-turborepo`,"-tv":`folder-television`,"-tx":`folder-i18n`,"-typeface":`folder-font`,"-typefaces":`folder-font`,"-types":`folder-typescript`,"-typescript":`folder-typescript`,"-typings":`folder-typescript`,"-ubuntu":`folder-linux`,"-ui":`folder-ui`,"-unity":`folder-unity`,"-unix":`folder-linux`,"-update":`folder-update`,"-updates":`folder-update`,"-upgrade":`folder-update`,"-upgrades":`folder-update`,"-upload":`folder-upload`,"-uploads":`folder-upload`,"-util":`folder-utils`,"-utilities":`folder-utils`,"-utility":`folder-utils`,"-utils":`folder-utils`,"-ux":`folder-ui`,"-validation":`folder-rules`,"-validations":`folder-rules`,"-validator":`folder-rules`,"-validators":`folder-rules`,"-vector":`folder-svg`,"-vectors":`folder-svg`,"-vendor":`folder-lib`,"-vendors":`folder-lib`,"-venv":`folder-environment`,"-vercel":`folder-vercel`,"-verdaccio":`folder-verdaccio`,"-vid":`folder-video`,"-video":`folder-video`,"-videos":`folder-video`,"-vids":`folder-video`,"-view":`folder-views`,"-views":`folder-views`,"-vm":`folder-vm`,"-vms":`folder-vm`,"-voice":`folder-audio`,"-voices":`folder-audio`,"-vscode":`folder-vscode`,"-vscode-test":`folder-vscode`,"-vue":`folder-vue`,"-vuepress":`folder-vuepress`,"-wakatime":`folder-wakatime`,"-web":`folder-public`,"-webpack":`folder-webpack`,"-website":`folder-public`,"-websites":`folder-public`,"-widget":`folder-components`,"-widgets":`folder-components`,"-wiki":`folder-docs`,"-win":`folder-windows`,"-win10":`folder-windows`,"-win11":`folder-windows`,"-win32":`folder-windows`,"-windows":`folder-windows`,"-windows10":`folder-windows`,"-windows11":`folder-windows`,"-windowsnt":`folder-windows`,"-windowsxp":`folder-windows`,"-winnt":`folder-windows`,"-winxp":`folder-windows`,"-wordpress-org":`folder-wordpress`,"-wp-content":`folder-wordpress`,"-wsl":`folder-linux`,"-www":`folder-public`,"-wwwroot":`folder-public`,"-xbox":`folder-console`,"-xtask":`folder-scripts`,"-yarn":`folder-yarn`,"-zeabur":`folder-zeabur`,"-zed":`folder-zed`,".@types":`folder-typescript`,".addin":`folder-plugin`,".addins":`folder-plugin`,".addon":`folder-plugin`,".addons":`folder-plugin`,".admin":`folder-admin`,".admins":`folder-admin`,".agent":`folder-robot`,".agents":`folder-robot`,".android":`folder-android`,".angular":`folder-angular`,".anim":`folder-animation`,".animated":`folder-animation`,".animation":`folder-animation`,".animations":`folder-animation`,".anims":`folder-animation`,".ansible":`folder-ansible`,".api":`folder-api`,".apis":`folder-api`,".apollo":`folder-apollo`,".apollo-cache":`folder-apollo`,".apollo-client":`folder-apollo`,".apollo-config":`folder-apollo`,".app":`folder-app`,".apple":`folder-macos`,".application":`folder-app`,".applications":`folder-app`,".apps":`folder-app`,".appwrite":`folder-appwrite`,".arc":`folder-archive`,".archival":`folder-archive`,".archive":`folder-archive`,".archives":`folder-archive`,".arcs":`folder-archive`,".article":`folder-docs`,".articles":`folder-docs`,".asm":`folder-assembly`,".assembly":`folder-assembly`,".asset":`folder-resource`,".assets":`folder-resource`,".astro":`folder-astro`,".atom":`folder-atom`,".atoms":`folder-atom`,".attachment":`folder-attachment`,".attachments":`folder-attachment`,".aud":`folder-audio`,".audio":`folder-audio`,".audios":`folder-audio`,".auds":`folder-audio`,".aurelia_project":`folder-aurelia`,".auth":`folder-secure`,".authentication":`folder-secure`,".auto":`folder-generator`,".aws":`folder-aws`,".azure":`folder-aws`,".azure-pipelines":`folder-azure-pipelines`,".azure-pipelines-ci":`folder-azure-pipelines`,".back-up":`folder-backup`,".back-ups":`folder-backup`,".backend":`folder-server`,".backends":`folder-server`,".backup":`folder-backup`,".backups":`folder-backup`,".bak":`folder-backup`,".baks":`folder-backup`,".base":`folder-base`,".bases":`folder-base`,".batch":`folder-batch`,".batches":`folder-batch`,".batchs":`folder-batch`,".bench":`folder-benchmark`,".benches":`folder-benchmark`,".benchmark":`folder-benchmark`,".benchmarks":`folder-benchmark`,".bibliographies":`folder-bibliography`,".bibliography":`folder-bibliography`,".bicep":`folder-bicep`,".bin":`folder-dist`,".bkp":`folder-backup`,".bkps":`folder-backup`,".blender":`folder-blender`,".blender-assets":`folder-blender`,".blender-files":`folder-blender`,".blender-models":`folder-blender`,".blender-project":`folder-blender`,".bloc":`folder-bloc`,".blocs":`folder-bloc`,".blog":`folder-docs`,".book":`folder-bibliography`,".books":`folder-bibliography`,".bot":`folder-robot`,".bots":`folder-robot`,".bower_components":`folder-bower`,".browser":`folder-public`,".browsers":`folder-public`,".build":`folder-dist`,".buildkite":`folder-buildkite`,".builds":`folder-dist`,".built":`folder-dist`,".bull":`folder-queue`,".cache":`folder-temp`,".cached":`folder-temp`,".calc":`folder-functions`,".calcs":`folder-functions`,".calculation":`folder-functions`,".calculations":`folder-functions`,".cargo":`folder-rust`,".cart":`folder-cart`,".centos":`folder-linux`,".cert":`folder-secure`,".certificate":`folder-secure`,".certificates":`folder-secure`,".certs":`folder-secure`,".cfg":`folder-config`,".cfgs":`folder-config`,".cfn-gen":`folder-generator`,".changes":`folder-delta`,".changeset":`folder-changesets`,".changesets":`folder-changesets`,".chat":`folder-messages`,".chats":`folder-messages`,".ci":`folder-ci`,".cipher":`folder-secure`,".circleci":`folder-circleci`,".cjs":`folder-javascript`,".class":`folder-class`,".classes":`folder-class`,".claude":`folder-claude`,".cli":`folder-command`,".client":`folder-client`,".clients":`folder-client`,".cline_docs":`folder-cline`,".clis":`folder-command`,".cloud-firestore":`folder-firestore`,".cloud-functions":`folder-cloud-functions`,".cloudflare":`folder-cloudflare`,".cloudfunctions":`folder-cloud-functions`,".cluster":`folder-cluster`,".clusters":`folder-cluster`,".cmd":`folder-command`,".cobol":`folder-cobol`,".code":`folder-src`,".color":`folder-theme`,".colors":`folder-theme`,".colour":`folder-theme`,".colours":`folder-theme`,".command":`folder-command`,".commandline":`folder-command`,".commands":`folder-command`,".common":`folder-shared`,".compiled":`folder-dist`,".components":`folder-components`,".composable":`folder-functions`,".composables":`folder-functions`,".concept":`folder-mock`,".concepts":`folder-mock`,".conf":`folder-config`,".config":`folder-config`,".configs":`folder-config`,".configuration":`folder-config`,".configurations":`folder-config`,".confs":`folder-config`,".connection":`folder-connection`,".connections":`folder-connection`,".console":`folder-console`,".const":`folder-constant`,".constant":`folder-constant`,".constants":`folder-constant`,".consts":`folder-constant`,".container":`folder-container`,".containers":`folder-container`,".content":`folder-content`,".contents":`folder-content`,".context":`folder-context`,".contexts":`folder-context`,".contract":`folder-contract`,".contract-test":`folder-contract`,".contract-testing":`folder-contract`,".contract-tests":`folder-contract`,".contracts":`folder-contract`,".controller":`folder-controller`,".controllers":`folder-controller`,".controls":`folder-controller`,".conversation":`folder-messages`,".conversations":`folder-messages`,".core":`folder-core`,".coverage":`folder-coverage`,".crash":`folder-error`,".crashes":`folder-error`,".crates":`folder-lib`,".css":`folder-css`,".cts":`folder-typescript`,".cubit":`folder-bloc`,".cubits":`folder-bloc`,".cue":`folder-cue`,".cues":`folder-cue`,".cursor":`folder-cursor`,".custom":`folder-custom`,".customs":`folder-custom`,".cypher":`folder-secure`,".cypress":`folder-cypress`,".dal":`folder-dal`,".dart":`folder-dart`,".dart_tool":`folder-dart`,".dart_tools":`folder-dart`,".data":`folder-database`,".data-access":`folder-dal`,".data-access-layer":`folder-dal`,".database":`folder-database`,".databases":`folder-database`,".db":`folder-database`,".deb":`folder-linux`,".debian":`folder-linux`,".debug":`folder-debug`,".debugger":`folder-debug`,".debugging":`folder-debug`,".decorator":`folder-decorators`,".decorators":`folder-decorators`,".deepin":`folder-linux`,".delta":`folder-delta`,".deltas":`folder-delta`,".demo":`folder-examples`,".demos":`folder-examples`,".dependencies":`folder-packages`,".design":`folder-theme`,".designs":`folder-theme`,".desktop":`folder-desktop`,".devcontainer":`folder-container`,".devpackages":`folder-packages`,".devtools":`folder-tools`,".dialog":`folder-messages`,".dialogs":`folder-messages`,".diary":`folder-docs`,".directive":`folder-directive`,".directives":`folder-directive`,".display":`folder-desktop`,".dist":`folder-dist`,".distribution":`folder-dist`,".doc":`folder-docs`,".docker":`folder-docker`,".dockerfiles":`folder-docker`,".dockerhub":`folder-docker`,".docs":`folder-docs`,".document":`folder-docs`,".documentation":`folder-docs`,".documents":`folder-docs`,".download":`folder-download`,".downloader":`folder-download`,".downloaders":`folder-download`,".downloads":`folder-download`,".draft":`folder-mock`,".drafts":`folder-mock`,".drizzle":`folder-drizzle`,".ds_store":`folder-macos`,".dump":`folder-dump`,".dumps":`folder-dump`,".e2e":`folder-coverage`,".easing":`folder-animation`,".easings":`folder-animation`,".element":`folder-element`,".elements":`folder-element`,".email":`folder-mail`,".emails":`folder-mail`,".enum":`folder-enum`,".enums":`folder-enum`,".env":`folder-environment`,".environment":`folder-environment`,".environments":`folder-environment`,".envs":`folder-environment`,".err":`folder-error`,".error":`folder-error`,".errors":`folder-error`,".errs":`folder-error`,".eslint":`folder-eslint`,".eslint-config":`folder-eslint`,".eslint-configs":`folder-eslint`,".eslint-plugin":`folder-eslint`,".eslint-plugins":`folder-eslint`,".etc":`folder-other`,".event":`folder-event`,".events":`folder-event`,".example":`folder-examples`,".examples":`folder-examples`,".expo":`folder-expo`,".expo-shared":`folder-expo`,".export":`folder-export`,".exported":`folder-export`,".exports":`folder-export`,".extension":`folder-plugin`,".extensions":`folder-plugin`,".external":`folder-lib`,".externals":`folder-lib`,".extra":`folder-other`,".extras":`folder-other`,".fastlane":`folder-fastlane`,".favicon":`folder-favicon`,".favicons":`folder-favicon`,".feat":`folder-features`,".feats":`folder-features`,".feature":`folder-features`,".features":`folder-features`,".fig":`folder-images`,".figs":`folder-images`,".figure":`folder-images`,".figures":`folder-images`,".filter":`folder-filter`,".filters":`folder-filter`,".firebase":`folder-firebase`,".firebase-cloud-functions":`folder-cloud-functions`,".firebase-cloudfunctions":`folder-cloud-functions`,".firebase-firestore":`folder-firestore`,".firestore":`folder-firestore`,".fixture":`folder-mock`,".fixtures":`folder-mock`,".flow-typed":`folder-flow`,".flutter":`folder-flutter`,".font":`folder-font`,".fonts":`folder-font`,".forgejo":`folder-forgejo`,".form":`folder-form`,".forms":`folder-form`,".forum":`folder-messages`,".fragments":`folder-components`,".frontend":`folder-client`,".frontends":`folder-client`,".func":`folder-functions`,".funcs":`folder-functions`,".function":`folder-functions`,".functions":`folder-functions`,".game":`folder-console`,".gamemaker":`folder-gamemaker`,".gamemaker2":`folder-gamemaker`,".games":`folder-console`,".gcp":`folder-aws`,".gemini":`folder-gemini-ai`,".gemini-ai":`folder-gemini-ai`,".geminiai":`folder-gemini-ai`,".gen":`folder-generator`,".generated":`folder-generator`,".generator":`folder-generator`,".generators":`folder-generator`,".gens":`folder-generator`,".git":`folder-git`,".gitea":`folder-gitea`,".githooks":`folder-git`,".github":`folder-github`,".github/issue_template":`folder-template`,".github/pull_request_template":`folder-template`,".github/workflows":`folder-gh-workflows`,".gitlab":`folder-gitlab`,".global":`folder-global`,".glsl":`folder-shader`,".go":`folder-go`,".godot":`folder-godot`,".godot-cpp":`folder-godot`,".golang":`folder-go`,".gql":`folder-graphql`,".gradle":`folder-gradle`,".graphql":`folder-graphql`,".guard":`folder-guard`,".guards":`folder-guard`,".gui":`folder-ui`,".gulp":`folder-gulp`,".gulp-tasks":`folder-gulp`,".gulpfile.babel.js":`folder-gulp`,".gulpfile.js":`folder-gulp`,".gulpfile.mjs":`folder-gulp`,".gulpfile.ts":`folder-gulp`,".gulpfiles":`folder-gulp`,".handler":`folder-controller`,".handlers":`folder-controller`,".helm":`folder-helm`,".helmchart":`folder-helm`,".helmcharts":`folder-helm`,".helper":`folder-helper`,".helpers":`folder-helper`,".hg":`folder-mercurial`,".hgext":`folder-mercurial`,".hghooks":`folder-mercurial`,".histories":`folder-backup`,".history":`folder-backup`,".hlsl":`folder-shader`,".home":`folder-home`,".hook":`folder-hook`,".hooks":`folder-hook`,".html":`folder-views`,".husky":`folder-husky`,".i18n":`folder-i18n`,".ico":`folder-images`,".icon":`folder-images`,".icons":`folder-images`,".icos":`folder-images`,".idea":`folder-intellij`,".image":`folder-images`,".images":`folder-images`,".img":`folder-images`,".imgs":`folder-images`,".import":`folder-import`,".imported":`folder-import`,".imports":`folder-import`,".in":`folder-input`,".inc":`folder-include`,".inc64":`folder-include`,".include":`folder-include`,".includes":`folder-include`,".infra":`folder-server`,".infrastructure":`folder-server`,".input":`folder-input`,".inputs":`folder-input`,".integration":`folder-connection`,".integration-test":`folder-coverage`,".integration-tests":`folder-coverage`,".integrations":`folder-connection`,".interceptor":`folder-interceptor`,".interceptors":`folder-interceptor`,".interface":`folder-interface`,".interfaces":`folder-interface`,".internationalization":`folder-i18n`,".inventories":`folder-server`,".inventory":`folder-server`,".io":`folder-input`,".ios":`folder-ios`,".ipad":`folder-macos`,".iphone":`folder-macos`,".ipod":`folder-macos`,".ipynb":`folder-jupyter`,".it":`folder-coverage`,".j2":`folder-jinja`,".java":`folder-java`,".javascript":`folder-javascript`,".javascripts":`folder-javascript`,".jinja":`folder-jinja`,".jinja2":`folder-jinja`,".job":`folder-job`,".jobs":`folder-job`,".js":`folder-javascript`,".json":`folder-json`,".jsonc":`folder-json`,".jsonl":`folder-json`,".jsons":`folder-json`,".jupyter":`folder-jupyter`,".jwt":`folder-keys`,".k8s":`folder-kubernetes`,".key":`folder-keys`,".keys":`folder-keys`,".kit":`folder-tools`,".kits":`folder-tools`,".knowledge":`folder-docs`,".kotlin":`folder-kotlin`,".kql":`folder-kusto`,".kubernetes":`folder-kubernetes`,".kusto":`folder-kusto`,".l10n":`folder-i18n`,".lambda":`folder-functions`,".lambdas":`folder-functions`,".landing":`folder-home`,".lang":`folder-i18n`,".langs":`folder-i18n`,".language":`folder-i18n`,".languages":`folder-i18n`,".layout":`folder-layout`,".layouts":`folder-layout`,".lefthook":`folder-lefthook`,".lefthook-local":`folder-lefthook`,".less":`folder-less`,".lib":`folder-lib`,".lib64":`folder-lib`,".libraries":`folder-lib`,".library":`folder-lib`,".libs":`folder-lib`,".license":`folder-license`,".licenses":`folder-license`,".link":`folder-link`,".links":`folder-link`,".linux":`folder-linux`,".linuxbsd":`folder-linux`,".liquibase":`folder-liquibase`,".locale":`folder-i18n`,".locales":`folder-i18n`,".localization":`folder-i18n`,".log":`folder-log`,".logging":`folder-log`,".logic":`folder-functions`,".logs":`folder-log`,".lottie":`folder-lottie`,".lottiefiles":`folder-lottie`,".lotties":`folder-lottie`,".lua":`folder-lua`,".luau":`folder-luau`,".mac":`folder-macos`,".macbook":`folder-macos`,".macbook-air":`folder-macos`,".macos":`folder-macos`,".macosx":`folder-macos`,".mail":`folder-mail`,".mailers":`folder-mail`,".mails":`folder-mail`,".main":`folder-home`,".manager":`folder-admin`,".managers":`folder-admin`,".mapping":`folder-mappings`,".mappings":`folder-mappings`,".markdown":`folder-markdown`,".math":`folder-functions`,".maths":`folder-functions`,".md":`folder-markdown`,".measure":`folder-benchmark`,".measurement":`folder-benchmark`,".measures":`folder-benchmark`,".media":`folder-video`,".messages":`folder-messages`,".messaging":`folder-messages`,".meta":`folder-meta`,".meta-inf":`folder-config`,".metadata":`folder-meta`,".metro":`folder-metro`,".middleware":`folder-middleware`,".middlewares":`folder-middleware`,".migration":`folder-migrations`,".migrations":`folder-migrations`,".mint":`folder-linux`,".misc":`folder-other`,".miscellaneous":`folder-other`,".mjml":`folder-mjml`,".mjs":`folder-javascript`,".mobile":`folder-mobile`,".mobiles":`folder-mobile`,".mock":`folder-mock`,".mocks":`folder-mock`,".mod":`folder-plugin`,".modding":`folder-plugin`,".model":`folder-class`,".models":`folder-class`,".moderator":`folder-admin`,".moderators":`folder-admin`,".mods":`folder-plugin`,".module":`folder-plugin`,".modules":`folder-plugin`,".mojo":`folder-mojo`,".molecule":`folder-molecule`,".molecules":`folder-molecule`,".moon":`folder-moon`,".motion":`folder-animation`,".motions":`folder-animation`,".movie":`folder-video`,".movies":`folder-video`,".mq":`folder-queue`,".mts":`folder-typescript`,".music":`folder-audio`,".navigation":`folder-routes`,".navigations":`folder-routes`,".netlify":`folder-netlify`,".news":`folder-docs`,".next":`folder-next`,".nginx":`folder-nginx`,".node":`folder-node`,".node_modules":`folder-node`,".nodejs":`folder-node`,".note":`folder-docs`,".notebook":`folder-jupyter`,".notebooks":`folder-jupyter`,".notes":`folder-docs`,".now":`folder-vercel`,".nuxt":`folder-nuxt`,".nyc-output":`folder-coverage`,".nyc_output":`folder-coverage`,".obsidian":`folder-obsidian`,".opencode":`folder-opencode`,".option":`folder-config`,".options":`folder-config`,".organism":`folder-organism`,".organisms":`folder-organism`,".osx":`folder-macos`,".other":`folder-other`,".others":`folder-other`,".out":`folder-dist`,".output":`folder-dist`,".outputs":`folder-dist`,".package":`folder-packages`,".packages":`folder-packages`,".pact":`folder-contract`,".pacts":`folder-contract`,".page":`folder-views`,".pages":`folder-views`,".palette":`folder-theme`,".palettes":`folder-theme`,".partial":`folder-include`,".partials":`folder-include`,".patches":`folder-git`,".pdf":`folder-pdf`,".pdfs":`folder-pdf`,".pdm-build":`folder-pdm`,".pdm-plugins":`folder-pdm`,".perf":`folder-benchmark`,".performance":`folder-benchmark`,".phone":`folder-mobile`,".phones":`folder-mobile`,".photo":`folder-images`,".photograph":`folder-images`,".photographs":`folder-images`,".photos":`folder-images`,".php":`folder-php`,".phpmailer":`folder-phpmailer`,".pic":`folder-images`,".pics":`folder-images`,".picture":`folder-images`,".pictures":`folder-images`,".pipe":`folder-pipe`,".pipeline":`folder-pipe`,".pipelines":`folder-pipe`,".pipes":`folder-pipe`,".pkg":`folder-packages`,".pkgs":`folder-packages`,".plastic":`folder-plastic`,".playground":`folder-sandbox`,".playgrounds":`folder-sandbox`,".playlist":`folder-audio`,".playlists":`folder-audio`,".plugin":`folder-plugin`,".plugins":`folder-plugin`,".policies":`folder-policy`,".policy":`folder-policy`,".popos":`folder-linux`,".portability":`folder-mobile`,".portable":`folder-mobile`,".post":`folder-docs`,".postman":`folder-postman`,".posts":`folder-docs`,".powershell":`folder-powershell`,".pref":`folder-config`,".preference":`folder-config`,".preferences":`folder-config`,".prefs":`folder-config`,".presentation":`folder-ui`,".preview":`folder-review`,".previews":`folder-review`,".prisma":`folder-prisma`,".prisma/schema":`folder-prisma`,".private":`folder-private`,".profiling":`folder-benchmark`,".proj":`folder-project`,".project":`folder-project`,".projects":`folder-project`,".projs":`folder-project`,".prompt":`folder-prompts`,".prompts":`folder-prompts`,".properties":`folder-config`,".props":`folder-config`,".proto":`folder-proto`,".protobuf":`folder-proto`,".protobufs":`folder-proto`,".protos":`folder-proto`,".provider":`folder-controller`,".providers":`folder-controller`,".proxy":`folder-public`,".ps":`folder-powershell`,".ps1":`folder-powershell`,".ps4":`folder-console`,".ps5":`folder-console`,".public":`folder-public`,".public_html":`folder-views`,".pwa":`folder-client`,".pycache":`folder-python`,".pytest_cache":`folder-python`,".python":`folder-python`,".pytorch":`folder-pytorch`,".quasar":`folder-quasar`,".queue":`folder-queue`,".queues":`folder-queue`,".r":`folder-r`,".recordings":`folder-audio`,".release":`folder-dist`,".remote":`folder-connection`,".remotes":`folder-connection`,".repo":`folder-repository`,".report":`folder-resource`,".reports":`folder-resource`,".repos":`folder-repository`,".repositories":`folder-repository`,".repository":`folder-repository`,".res":`folder-resource`,".resolver":`folder-resolver`,".resolvers":`folder-resolver`,".resource":`folder-resource`,".resources":`folder-resource`,".restapi":`folder-api`,".review":`folder-review`,".reviewed":`folder-review`,".reviews":`folder-review`,".revisal":`folder-review`,".revisals":`folder-review`,".robot":`folder-robot`,".robots":`folder-robot`,".router":`folder-routes`,".routers":`folder-routes`,".routes":`folder-routes`,".routing":`folder-routes`,".rule":`folder-rules`,".rules":`folder-rules`,".rust":`folder-rust`,".salt":`folder-salt`,".saltstack":`folder-salt`,".sample":`folder-examples`,".sample-data":`folder-examples`,".samples":`folder-examples`,".sandbox":`folder-sandbox`,".sandboxes":`folder-sandbox`,".sass":`folder-sass`,".scala":`folder-scala`,".schema":`folder-class`,".schemas":`folder-class`,".sconf_temp":`folder-scons`,".scons":`folder-scons`,".scons_cache":`folder-scons`,".screen":`folder-views`,".screengrab":`folder-images`,".screengrabs":`folder-images`,".screens":`folder-views`,".screenshot":`folder-images`,".screenshots":`folder-images`,".script":`folder-scripts`,".scripting":`folder-scripts`,".scripts":`folder-scripts`,".scss":`folder-sass`,".secret":`folder-keys`,".secrets":`folder-keys`,".secure":`folder-secure`,".security":`folder-secure`,".seed":`folder-seeders`,".seeders":`folder-seeders`,".seeding":`folder-seeders`,".seeds":`folder-seeders`,".server":`folder-server`,".serverless":`folder-serverless`,".serverpackages":`folder-packages`,".servers":`folder-server`,".service":`folder-controller`,".services":`folder-controller`,".setting":`folder-config`,".settings":`folder-config`,".shader":`folder-shader`,".shaders":`folder-shader`,".shared":`folder-shared`,".shop":`folder-cart`,".shopping":`folder-cart`,".shopping-cart":`folder-cart`,".sim":`folder-simulations`,".sims":`folder-simulations`,".simulation":`folder-simulations`,".simulations":`folder-simulations`,".site":`folder-public`,".sketch":`folder-mock`,".sketches":`folder-mock`,".skill":`folder-skills`,".skills":`folder-skills`,".smtp":`folder-mail`,".snap":`folder-snapcraft`,".snapcraft":`folder-snapcraft`,".snapshots":`folder-test`,".snippet":`folder-snippet`,".snippets":`folder-snippet`,".song":`folder-audio`,".songs":`folder-audio`,".sound":`folder-audio`,".sounds":`folder-audio`,".source":`folder-src`,".sources":`folder-src`,".spa":`folder-client`,".spec":`folder-test`,".specs":`folder-test`,".spellcheck":`folder-syntax`,".spellcheckers":`folder-syntax`,".sql":`folder-database`,".src":`folder-src`,".src-tauri":`folder-src-tauri`,".srcs":`folder-src`,".ssl":`folder-secure`,".stack":`folder-stack`,".stacks":`folder-stack`,".start":`folder-home`,".static":`folder-resource`,".stencil":`folder-stencil`,".store":`folder-store`,".stores":`folder-store`,".stories":`folder-storybook`,".storybook":`folder-storybook`,".style":`folder-css`,".styles":`folder-css`,".stylesheet":`folder-css`,".stylesheets":`folder-css`,".stylus":`folder-stylus`,".sublime":`folder-sublime`,".submodules":`folder-git`,".supabase":`folder-supabase`,".svelte":`folder-svelte`,".svelte-kit":`folder-svelte`,".svg":`folder-svg`,".svgs":`folder-svg`,".switch":`folder-console`,".syntax":`folder-syntax`,".syntaxes":`folder-syntax`,".table-of-contents":`folder-toc`,".target":`folder-target`,".taskfile":`folder-taskfile`,".taskfiles":`folder-taskfile`,".tasks":`folder-tasks`,".television":`folder-television`,".temp":`folder-temp`,".template":`folder-template`,".templates":`folder-template`,".terraform":`folder-terraform`,".test":`folder-test`,".testfiles":`folder-test`,".testing":`folder-test`,".tests":`folder-test`,".texture":`folder-images`,".textures":`folder-images`,".theme":`folder-theme`,".themes":`folder-theme`,".third-party":`folder-lib`,".thirdparty":`folder-lib`,".tickets":`folder-tasks`,".tls":`folder-secure`,".tmp":`folder-temp`,".toc":`folder-toc`,".token":`folder-keys`,".tokens":`folder-keys`,".toolbox":`folder-tools`,".toolboxes":`folder-tools`,".tooling":`folder-tools`,".toolkit":`folder-tools`,".toolkits":`folder-tools`,".tools":`folder-tools`,".torch":`folder-pytorch`,".transition":`folder-animation`,".transitions":`folder-animation`,".translate":`folder-i18n`,".translation":`folder-i18n`,".translations":`folder-i18n`,".trash":`folder-trash`,".trigger":`folder-trigger`,".triggers":`folder-trigger`,".ts":`folder-typescript`,".turbo":`folder-turborepo`,".tv":`folder-television`,".tx":`folder-i18n`,".typeface":`folder-font`,".typefaces":`folder-font`,".types":`folder-typescript`,".typescript":`folder-typescript`,".typings":`folder-typescript`,".ubuntu":`folder-linux`,".ui":`folder-ui`,".unity":`folder-unity`,".unix":`folder-linux`,".update":`folder-update`,".updates":`folder-update`,".upgrade":`folder-update`,".upgrades":`folder-update`,".upload":`folder-upload`,".uploads":`folder-upload`,".util":`folder-utils`,".utilities":`folder-utils`,".utility":`folder-utils`,".utils":`folder-utils`,".ux":`folder-ui`,".validation":`folder-rules`,".validations":`folder-rules`,".validator":`folder-rules`,".validators":`folder-rules`,".vector":`folder-svg`,".vectors":`folder-svg`,".vendor":`folder-lib`,".vendors":`folder-lib`,".venv":`folder-environment`,".vercel":`folder-vercel`,".verdaccio":`folder-verdaccio`,".vid":`folder-video`,".video":`folder-video`,".videos":`folder-video`,".vids":`folder-video`,".view":`folder-views`,".views":`folder-views`,".vm":`folder-vm`,".vms":`folder-vm`,".voice":`folder-audio`,".voices":`folder-audio`,".vscode":`folder-vscode`,".vscode-test":`folder-vscode`,".vue":`folder-vue`,".vuepress":`folder-vuepress`,".wakatime":`folder-wakatime`,".web":`folder-public`,".webpack":`folder-webpack`,".website":`folder-public`,".websites":`folder-public`,".widget":`folder-components`,".widgets":`folder-components`,".wiki":`folder-docs`,".win":`folder-windows`,".win10":`folder-windows`,".win11":`folder-windows`,".win32":`folder-windows`,".windows":`folder-windows`,".windows10":`folder-windows`,".windows11":`folder-windows`,".windowsnt":`folder-windows`,".windowsxp":`folder-windows`,".winnt":`folder-windows`,".winxp":`folder-windows`,".wordpress-org":`folder-wordpress`,".wp-content":`folder-wordpress`,".wsl":`folder-linux`,".www":`folder-public`,".wwwroot":`folder-public`,".xbox":`folder-console`,".xtask":`folder-scripts`,".yarn":`folder-yarn`,".zeabur":`folder-zeabur`,".zed":`folder-zed`,"@types":`folder-typescript`,"_@types":`folder-typescript`,"__@types__":`folder-typescript`,__addin__:`folder-plugin`,__addins__:`folder-plugin`,__addon__:`folder-plugin`,__addons__:`folder-plugin`,__admin__:`folder-admin`,__admins__:`folder-admin`,__agent__:`folder-robot`,__agents__:`folder-robot`,__android__:`folder-android`,__angular__:`folder-angular`,__anim__:`folder-animation`,__animated__:`folder-animation`,__animation__:`folder-animation`,__animations__:`folder-animation`,__anims__:`folder-animation`,__ansible__:`folder-ansible`,__api__:`folder-api`,__apis__:`folder-api`,"__apollo-cache__":`folder-apollo`,"__apollo-client__":`folder-apollo`,"__apollo-config__":`folder-apollo`,__apollo__:`folder-apollo`,__app__:`folder-app`,__apple__:`folder-macos`,__application__:`folder-app`,__applications__:`folder-app`,__apps__:`folder-app`,__appwrite__:`folder-appwrite`,__arc__:`folder-archive`,__archival__:`folder-archive`,__archive__:`folder-archive`,__archives__:`folder-archive`,__arcs__:`folder-archive`,__article__:`folder-docs`,__articles__:`folder-docs`,__asm__:`folder-assembly`,__assembly__:`folder-assembly`,__asset__:`folder-resource`,__assets__:`folder-resource`,__astro__:`folder-astro`,__atom__:`folder-atom`,__atoms__:`folder-atom`,__attachment__:`folder-attachment`,__attachments__:`folder-attachment`,__aud__:`folder-audio`,__audio__:`folder-audio`,__audios__:`folder-audio`,__auds__:`folder-audio`,__aurelia_project__:`folder-aurelia`,__auth__:`folder-secure`,__authentication__:`folder-secure`,__auto__:`folder-generator`,__aws__:`folder-aws`,"__azure-pipelines-ci__":`folder-azure-pipelines`,"__azure-pipelines__":`folder-azure-pipelines`,__azure__:`folder-aws`,"__back-up__":`folder-backup`,"__back-ups__":`folder-backup`,__backend__:`folder-server`,__backends__:`folder-server`,__backup__:`folder-backup`,__backups__:`folder-backup`,__bak__:`folder-backup`,__baks__:`folder-backup`,__base__:`folder-base`,__bases__:`folder-base`,__batch__:`folder-batch`,__batches__:`folder-batch`,__batchs__:`folder-batch`,__bench__:`folder-benchmark`,__benches__:`folder-benchmark`,__benchmark__:`folder-benchmark`,__benchmarks__:`folder-benchmark`,__bibliographies__:`folder-bibliography`,__bibliography__:`folder-bibliography`,__bicep__:`folder-bicep`,__bin__:`folder-dist`,__bkp__:`folder-backup`,__bkps__:`folder-backup`,"__blender-assets__":`folder-blender`,"__blender-files__":`folder-blender`,"__blender-models__":`folder-blender`,"__blender-project__":`folder-blender`,__blender__:`folder-blender`,__bloc__:`folder-bloc`,__blocs__:`folder-bloc`,__blog__:`folder-docs`,__book__:`folder-bibliography`,__books__:`folder-bibliography`,__bot__:`folder-robot`,__bots__:`folder-robot`,__bower_components__:`folder-bower`,__browser__:`folder-public`,__browsers__:`folder-public`,__build__:`folder-dist`,__buildkite__:`folder-buildkite`,__builds__:`folder-dist`,__built__:`folder-dist`,__bull__:`folder-queue`,__cache__:`folder-temp`,__cached__:`folder-temp`,__calc__:`folder-functions`,__calcs__:`folder-functions`,__calculation__:`folder-functions`,__calculations__:`folder-functions`,__cargo__:`folder-rust`,__cart__:`folder-cart`,__centos__:`folder-linux`,__cert__:`folder-secure`,__certificate__:`folder-secure`,__certificates__:`folder-secure`,__certs__:`folder-secure`,__cfg__:`folder-config`,__cfgs__:`folder-config`,"__cfn-gen__":`folder-generator`,__changes__:`folder-delta`,__changeset__:`folder-changesets`,__changesets__:`folder-changesets`,__chat__:`folder-messages`,__chats__:`folder-messages`,__ci__:`folder-ci`,__cipher__:`folder-secure`,__circleci__:`folder-circleci`,__cjs__:`folder-javascript`,__class__:`folder-class`,__classes__:`folder-class`,__claude__:`folder-claude`,__cli__:`folder-command`,__client__:`folder-client`,__clients__:`folder-client`,__cline_docs__:`folder-cline`,__clis__:`folder-command`,"__cloud-firestore__":`folder-firestore`,"__cloud-functions__":`folder-cloud-functions`,__cloudflare__:`folder-cloudflare`,__cloudfunctions__:`folder-cloud-functions`,__cluster__:`folder-cluster`,__clusters__:`folder-cluster`,__cmd__:`folder-command`,__cobol__:`folder-cobol`,__code__:`folder-src`,__color__:`folder-theme`,__colors__:`folder-theme`,__colour__:`folder-theme`,__colours__:`folder-theme`,__command__:`folder-command`,__commandline__:`folder-command`,__commands__:`folder-command`,__common__:`folder-shared`,__compiled__:`folder-dist`,__components__:`folder-components`,__composable__:`folder-functions`,__composables__:`folder-functions`,__concept__:`folder-mock`,__concepts__:`folder-mock`,__conf__:`folder-config`,__config__:`folder-config`,__configs__:`folder-config`,__configuration__:`folder-config`,__configurations__:`folder-config`,__confs__:`folder-config`,__connection__:`folder-connection`,__connections__:`folder-connection`,__console__:`folder-console`,__const__:`folder-constant`,__constant__:`folder-constant`,__constants__:`folder-constant`,__consts__:`folder-constant`,__container__:`folder-container`,__containers__:`folder-container`,__content__:`folder-content`,__contents__:`folder-content`,__context__:`folder-context`,__contexts__:`folder-context`,"__contract-test__":`folder-contract`,"__contract-testing__":`folder-contract`,"__contract-tests__":`folder-contract`,__contract__:`folder-contract`,__contracts__:`folder-contract`,__controller__:`folder-controller`,__controllers__:`folder-controller`,__controls__:`folder-controller`,__conversation__:`folder-messages`,__conversations__:`folder-messages`,__core__:`folder-core`,__coverage__:`folder-coverage`,__crash__:`folder-error`,__crashes__:`folder-error`,__crates__:`folder-lib`,__css__:`folder-css`,__cts__:`folder-typescript`,__cubit__:`folder-bloc`,__cubits__:`folder-bloc`,__cue__:`folder-cue`,__cues__:`folder-cue`,__cursor__:`folder-cursor`,__custom__:`folder-custom`,__customs__:`folder-custom`,__cypher__:`folder-secure`,__cypress__:`folder-cypress`,__dal__:`folder-dal`,__dart__:`folder-dart`,__dart_tool__:`folder-dart`,__dart_tools__:`folder-dart`,"__data-access-layer__":`folder-dal`,"__data-access__":`folder-dal`,__data__:`folder-database`,__database__:`folder-database`,__databases__:`folder-database`,__db__:`folder-database`,__deb__:`folder-linux`,__debian__:`folder-linux`,__debug__:`folder-debug`,__debugger__:`folder-debug`,__debugging__:`folder-debug`,__decorator__:`folder-decorators`,__decorators__:`folder-decorators`,__deepin__:`folder-linux`,__delta__:`folder-delta`,__deltas__:`folder-delta`,__demo__:`folder-examples`,__demos__:`folder-examples`,__dependencies__:`folder-packages`,__design__:`folder-theme`,__designs__:`folder-theme`,__desktop__:`folder-desktop`,__devcontainer__:`folder-container`,__devpackages__:`folder-packages`,__devtools__:`folder-tools`,__dialog__:`folder-messages`,__dialogs__:`folder-messages`,__diary__:`folder-docs`,__directive__:`folder-directive`,__directives__:`folder-directive`,__display__:`folder-desktop`,__dist__:`folder-dist`,__distribution__:`folder-dist`,__doc__:`folder-docs`,__docker__:`folder-docker`,__dockerfiles__:`folder-docker`,__dockerhub__:`folder-docker`,__docs__:`folder-docs`,__document__:`folder-docs`,__documentation__:`folder-docs`,__documents__:`folder-docs`,__download__:`folder-download`,__downloader__:`folder-download`,__downloaders__:`folder-download`,__downloads__:`folder-download`,__draft__:`folder-mock`,__drafts__:`folder-mock`,__drizzle__:`folder-drizzle`,__ds_store__:`folder-macos`,__dump__:`folder-dump`,__dumps__:`folder-dump`,__e2e__:`folder-coverage`,__easing__:`folder-animation`,__easings__:`folder-animation`,__element__:`folder-element`,__elements__:`folder-element`,__email__:`folder-mail`,__emails__:`folder-mail`,__enum__:`folder-enum`,__enums__:`folder-enum`,__env__:`folder-environment`,__environment__:`folder-environment`,__environments__:`folder-environment`,__envs__:`folder-environment`,__err__:`folder-error`,__error__:`folder-error`,__errors__:`folder-error`,__errs__:`folder-error`,"__eslint-config__":`folder-eslint`,"__eslint-configs__":`folder-eslint`,"__eslint-plugin__":`folder-eslint`,"__eslint-plugins__":`folder-eslint`,__eslint__:`folder-eslint`,__etc__:`folder-other`,__event__:`folder-event`,__events__:`folder-event`,__example__:`folder-examples`,__examples__:`folder-examples`,"__expo-shared__":`folder-expo`,__expo__:`folder-expo`,__export__:`folder-export`,__exported__:`folder-export`,__exports__:`folder-export`,__extension__:`folder-plugin`,__extensions__:`folder-plugin`,__external__:`folder-lib`,__externals__:`folder-lib`,__extra__:`folder-other`,__extras__:`folder-other`,__fastlane__:`folder-fastlane`,__favicon__:`folder-favicon`,__favicons__:`folder-favicon`,__feat__:`folder-features`,__feats__:`folder-features`,__feature__:`folder-features`,__features__:`folder-features`,__fig__:`folder-images`,__figs__:`folder-images`,__figure__:`folder-images`,__figures__:`folder-images`,__filter__:`folder-filter`,__filters__:`folder-filter`,"__firebase-cloud-functions__":`folder-cloud-functions`,"__firebase-cloudfunctions__":`folder-cloud-functions`,"__firebase-firestore__":`folder-firestore`,__firebase__:`folder-firebase`,__firestore__:`folder-firestore`,__fixture__:`folder-mock`,__fixtures__:`folder-mock`,"__flow-typed__":`folder-flow`,__flutter__:`folder-flutter`,__font__:`folder-font`,__fonts__:`folder-font`,__forgejo__:`folder-forgejo`,__form__:`folder-form`,__forms__:`folder-form`,__forum__:`folder-messages`,__fragments__:`folder-components`,__frontend__:`folder-client`,__frontends__:`folder-client`,__func__:`folder-functions`,__funcs__:`folder-functions`,__function__:`folder-functions`,__functions__:`folder-functions`,__game__:`folder-console`,__gamemaker2__:`folder-gamemaker`,__gamemaker__:`folder-gamemaker`,__games__:`folder-console`,__gcp__:`folder-aws`,"__gemini-ai__":`folder-gemini-ai`,__gemini__:`folder-gemini-ai`,__geminiai__:`folder-gemini-ai`,__gen__:`folder-generator`,__generated__:`folder-generator`,__generator__:`folder-generator`,__generators__:`folder-generator`,__gens__:`folder-generator`,__git__:`folder-git`,__gitea__:`folder-gitea`,__githooks__:`folder-git`,"__github/issue_template__":`folder-template`,"__github/pull_request_template__":`folder-template`,"__github/workflows__":`folder-gh-workflows`,__github__:`folder-github`,__gitlab__:`folder-gitlab`,__global__:`folder-global`,__glsl__:`folder-shader`,__go__:`folder-go`,"__godot-cpp__":`folder-godot`,__godot__:`folder-godot`,__golang__:`folder-go`,__gql__:`folder-graphql`,__gradle__:`folder-gradle`,__graphql__:`folder-graphql`,__guard__:`folder-guard`,__guards__:`folder-guard`,__gui__:`folder-ui`,"__gulp-tasks__":`folder-gulp`,__gulp__:`folder-gulp`,"__gulpfile.babel.js__":`folder-gulp`,"__gulpfile.js__":`folder-gulp`,"__gulpfile.mjs__":`folder-gulp`,"__gulpfile.ts__":`folder-gulp`,__gulpfiles__:`folder-gulp`,__handler__:`folder-controller`,__handlers__:`folder-controller`,__helm__:`folder-helm`,__helmchart__:`folder-helm`,__helmcharts__:`folder-helm`,__helper__:`folder-helper`,__helpers__:`folder-helper`,__hg__:`folder-mercurial`,__hgext__:`folder-mercurial`,__hghooks__:`folder-mercurial`,__histories__:`folder-backup`,__history__:`folder-backup`,__hlsl__:`folder-shader`,__home__:`folder-home`,__hook__:`folder-hook`,__hooks__:`folder-hook`,__html__:`folder-views`,__husky__:`folder-husky`,__i18n__:`folder-i18n`,__ico__:`folder-images`,__icon__:`folder-images`,__icons__:`folder-images`,__icos__:`folder-images`,__idea__:`folder-intellij`,__image__:`folder-images`,__images__:`folder-images`,__img__:`folder-images`,__imgs__:`folder-images`,__import__:`folder-import`,__imported__:`folder-import`,__imports__:`folder-import`,__in__:`folder-input`,__inc64__:`folder-include`,__inc__:`folder-include`,__include__:`folder-include`,__includes__:`folder-include`,__infra__:`folder-server`,__infrastructure__:`folder-server`,__input__:`folder-input`,__inputs__:`folder-input`,"__integration-test__":`folder-coverage`,"__integration-tests__":`folder-coverage`,__integration__:`folder-connection`,__integrations__:`folder-connection`,__interceptor__:`folder-interceptor`,__interceptors__:`folder-interceptor`,__interface__:`folder-interface`,__interfaces__:`folder-interface`,__internationalization__:`folder-i18n`,__inventories__:`folder-server`,__inventory__:`folder-server`,__io__:`folder-input`,__ios__:`folder-ios`,__ipad__:`folder-macos`,__iphone__:`folder-macos`,__ipod__:`folder-macos`,__ipynb__:`folder-jupyter`,__it__:`folder-coverage`,__j2__:`folder-jinja`,__java__:`folder-java`,__javascript__:`folder-javascript`,__javascripts__:`folder-javascript`,__jinja2__:`folder-jinja`,__jinja__:`folder-jinja`,__job__:`folder-job`,__jobs__:`folder-job`,__js__:`folder-javascript`,__json__:`folder-json`,__jsonc__:`folder-json`,__jsonl__:`folder-json`,__jsons__:`folder-json`,__jupyter__:`folder-jupyter`,__jwt__:`folder-keys`,__k8s__:`folder-kubernetes`,__key__:`folder-keys`,__keys__:`folder-keys`,__kit__:`folder-tools`,__kits__:`folder-tools`,__knowledge__:`folder-docs`,__kotlin__:`folder-kotlin`,__kql__:`folder-kusto`,__kubernetes__:`folder-kubernetes`,__kusto__:`folder-kusto`,__l10n__:`folder-i18n`,__lambda__:`folder-functions`,__lambdas__:`folder-functions`,__landing__:`folder-home`,__lang__:`folder-i18n`,__langs__:`folder-i18n`,__language__:`folder-i18n`,__languages__:`folder-i18n`,__layout__:`folder-layout`,__layouts__:`folder-layout`,"__lefthook-local__":`folder-lefthook`,__lefthook__:`folder-lefthook`,__less__:`folder-less`,__lib64__:`folder-lib`,__lib__:`folder-lib`,__libraries__:`folder-lib`,__library__:`folder-lib`,__libs__:`folder-lib`,__license__:`folder-license`,__licenses__:`folder-license`,__link__:`folder-link`,__links__:`folder-link`,__linux__:`folder-linux`,__linuxbsd__:`folder-linux`,__liquibase__:`folder-liquibase`,__locale__:`folder-i18n`,__locales__:`folder-i18n`,__localization__:`folder-i18n`,__log__:`folder-log`,__logging__:`folder-log`,__logic__:`folder-functions`,__logs__:`folder-log`,__lottie__:`folder-lottie`,__lottiefiles__:`folder-lottie`,__lotties__:`folder-lottie`,__lua__:`folder-lua`,__luau__:`folder-luau`,__mac__:`folder-macos`,"__macbook-air__":`folder-macos`,__macbook__:`folder-macos`,__macos__:`folder-macos`,__macosx__:`folder-macos`,__mail__:`folder-mail`,__mailers__:`folder-mail`,__mails__:`folder-mail`,__main__:`folder-home`,__manager__:`folder-admin`,__managers__:`folder-admin`,__mapping__:`folder-mappings`,__mappings__:`folder-mappings`,__markdown__:`folder-markdown`,__math__:`folder-functions`,__maths__:`folder-functions`,__md__:`folder-markdown`,__measure__:`folder-benchmark`,__measurement__:`folder-benchmark`,__measures__:`folder-benchmark`,__media__:`folder-video`,__messages__:`folder-messages`,__messaging__:`folder-messages`,"__meta-inf__":`folder-config`,__meta__:`folder-meta`,__metadata__:`folder-meta`,__metro__:`folder-metro`,__middleware__:`folder-middleware`,__middlewares__:`folder-middleware`,__migration__:`folder-migrations`,__migrations__:`folder-migrations`,__mint__:`folder-linux`,__misc__:`folder-other`,__miscellaneous__:`folder-other`,__mjml__:`folder-mjml`,__mjs__:`folder-javascript`,__mobile__:`folder-mobile`,__mobiles__:`folder-mobile`,__mock__:`folder-mock`,__mocks__:`folder-mock`,__mod__:`folder-plugin`,__modding__:`folder-plugin`,__model__:`folder-class`,__models__:`folder-class`,__moderator__:`folder-admin`,__moderators__:`folder-admin`,__mods__:`folder-plugin`,__module__:`folder-plugin`,__modules__:`folder-plugin`,__mojo__:`folder-mojo`,__molecule__:`folder-molecule`,__molecules__:`folder-molecule`,__moon__:`folder-moon`,__motion__:`folder-animation`,__motions__:`folder-animation`,__movie__:`folder-video`,__movies__:`folder-video`,__mq__:`folder-queue`,__mts__:`folder-typescript`,__music__:`folder-audio`,__navigation__:`folder-routes`,__navigations__:`folder-routes`,__netlify__:`folder-netlify`,__news__:`folder-docs`,__next__:`folder-next`,__nginx__:`folder-nginx`,__node__:`folder-node`,__node_modules__:`folder-node`,__nodejs__:`folder-node`,__note__:`folder-docs`,__notebook__:`folder-jupyter`,__notebooks__:`folder-jupyter`,__notes__:`folder-docs`,__now__:`folder-vercel`,__nuxt__:`folder-nuxt`,"__nyc-output__":`folder-coverage`,__nyc_output__:`folder-coverage`,__obsidian__:`folder-obsidian`,__opencode__:`folder-opencode`,__option__:`folder-config`,__options__:`folder-config`,__organism__:`folder-organism`,__organisms__:`folder-organism`,__osx__:`folder-macos`,__other__:`folder-other`,__others__:`folder-other`,__out__:`folder-dist`,__output__:`folder-dist`,__outputs__:`folder-dist`,__package__:`folder-packages`,__packages__:`folder-packages`,__pact__:`folder-contract`,__pacts__:`folder-contract`,__page__:`folder-views`,__pages__:`folder-views`,__palette__:`folder-theme`,__palettes__:`folder-theme`,__partial__:`folder-include`,__partials__:`folder-include`,__patches__:`folder-git`,__pdf__:`folder-pdf`,__pdfs__:`folder-pdf`,"__pdm-build__":`folder-pdm`,"__pdm-plugins__":`folder-pdm`,__perf__:`folder-benchmark`,__performance__:`folder-benchmark`,__phone__:`folder-mobile`,__phones__:`folder-mobile`,__photo__:`folder-images`,__photograph__:`folder-images`,__photographs__:`folder-images`,__photos__:`folder-images`,__php__:`folder-php`,__phpmailer__:`folder-phpmailer`,__pic__:`folder-images`,__pics__:`folder-images`,__picture__:`folder-images`,__pictures__:`folder-images`,__pipe__:`folder-pipe`,__pipeline__:`folder-pipe`,__pipelines__:`folder-pipe`,__pipes__:`folder-pipe`,__pkg__:`folder-packages`,__pkgs__:`folder-packages`,__plastic__:`folder-plastic`,__playground__:`folder-sandbox`,__playgrounds__:`folder-sandbox`,__playlist__:`folder-audio`,__playlists__:`folder-audio`,__plugin__:`folder-plugin`,__plugins__:`folder-plugin`,__policies__:`folder-policy`,__policy__:`folder-policy`,__popos__:`folder-linux`,__portability__:`folder-mobile`,__portable__:`folder-mobile`,__post__:`folder-docs`,__postman__:`folder-postman`,__posts__:`folder-docs`,__powershell__:`folder-powershell`,__pref__:`folder-config`,__preference__:`folder-config`,__preferences__:`folder-config`,__prefs__:`folder-config`,__presentation__:`folder-ui`,__preview__:`folder-review`,__previews__:`folder-review`,"__prisma/schema__":`folder-prisma`,__prisma__:`folder-prisma`,__private__:`folder-private`,__profiling__:`folder-benchmark`,__proj__:`folder-project`,__project__:`folder-project`,__projects__:`folder-project`,__projs__:`folder-project`,__prompt__:`folder-prompts`,__prompts__:`folder-prompts`,__properties__:`folder-config`,__props__:`folder-config`,__protobuf__:`folder-proto`,__protobufs__:`folder-proto`,__protos__:`folder-proto`,__provider__:`folder-controller`,__providers__:`folder-controller`,__proxy__:`folder-public`,__ps1__:`folder-powershell`,__ps4__:`folder-console`,__ps5__:`folder-console`,__ps__:`folder-powershell`,__public__:`folder-public`,__public_html__:`folder-views`,__pwa__:`folder-client`,__pycache__:`folder-python`,__pytest_cache__:`folder-python`,__python__:`folder-python`,__pytorch__:`folder-pytorch`,__quasar__:`folder-quasar`,__queue__:`folder-queue`,__queues__:`folder-queue`,__r__:`folder-r`,__recordings__:`folder-audio`,__release__:`folder-dist`,__remote__:`folder-connection`,__remotes__:`folder-connection`,__repo__:`folder-repository`,__report__:`folder-resource`,__reports__:`folder-resource`,__repos__:`folder-repository`,__repositories__:`folder-repository`,__repository__:`folder-repository`,__res__:`folder-resource`,__resolver__:`folder-resolver`,__resolvers__:`folder-resolver`,__resource__:`folder-resource`,__resources__:`folder-resource`,__restapi__:`folder-api`,__review__:`folder-review`,__reviewed__:`folder-review`,__reviews__:`folder-review`,__revisal__:`folder-review`,__revisals__:`folder-review`,__robot__:`folder-robot`,__robots__:`folder-robot`,__router__:`folder-routes`,__routers__:`folder-routes`,__routes__:`folder-routes`,__routing__:`folder-routes`,__rule__:`folder-rules`,__rules__:`folder-rules`,__rust__:`folder-rust`,__salt__:`folder-salt`,__saltstack__:`folder-salt`,"__sample-data__":`folder-examples`,__sample__:`folder-examples`,__samples__:`folder-examples`,__sandbox__:`folder-sandbox`,__sandboxes__:`folder-sandbox`,__sass__:`folder-sass`,__scala__:`folder-scala`,__schema__:`folder-class`,__schemas__:`folder-class`,__sconf_temp__:`folder-scons`,__scons__:`folder-scons`,__scons_cache__:`folder-scons`,__screen__:`folder-views`,__screengrab__:`folder-images`,__screengrabs__:`folder-images`,__screens__:`folder-views`,__screenshot__:`folder-images`,__screenshots__:`folder-images`,__script__:`folder-scripts`,__scripting__:`folder-scripts`,__scripts__:`folder-scripts`,__scss__:`folder-sass`,__secret__:`folder-keys`,__secrets__:`folder-keys`,__secure__:`folder-secure`,__security__:`folder-secure`,__seed__:`folder-seeders`,__seeders__:`folder-seeders`,__seeding__:`folder-seeders`,__seeds__:`folder-seeders`,__server__:`folder-server`,__serverless__:`folder-serverless`,__serverpackages__:`folder-packages`,__servers__:`folder-server`,__service__:`folder-controller`,__services__:`folder-controller`,__setting__:`folder-config`,__settings__:`folder-config`,__shader__:`folder-shader`,__shaders__:`folder-shader`,__shared__:`folder-shared`,__shop__:`folder-cart`,"__shopping-cart__":`folder-cart`,__shopping__:`folder-cart`,__sim__:`folder-simulations`,__sims__:`folder-simulations`,__simulation__:`folder-simulations`,__simulations__:`folder-simulations`,__site__:`folder-public`,__sketch__:`folder-mock`,__sketches__:`folder-mock`,__skill__:`folder-skills`,__skills__:`folder-skills`,__smtp__:`folder-mail`,__snap__:`folder-snapcraft`,__snapcraft__:`folder-snapcraft`,__snapshots__:`folder-test`,__snippet__:`folder-snippet`,__snippets__:`folder-snippet`,__song__:`folder-audio`,__songs__:`folder-audio`,__sound__:`folder-audio`,__sounds__:`folder-audio`,__source__:`folder-src`,__sources__:`folder-src`,__spa__:`folder-client`,__spec__:`folder-test`,__specs__:`folder-test`,__spellcheck__:`folder-syntax`,__spellcheckers__:`folder-syntax`,__sql__:`folder-database`,"__src-tauri__":`folder-src-tauri`,__src__:`folder-src`,__srcs__:`folder-src`,__ssl__:`folder-secure`,__stack__:`folder-stack`,__stacks__:`folder-stack`,__start__:`folder-home`,__static__:`folder-resource`,__stencil__:`folder-stencil`,__store__:`folder-store`,__stores__:`folder-store`,__stories__:`folder-storybook`,__storybook__:`folder-storybook`,__style__:`folder-css`,__styles__:`folder-css`,__stylesheet__:`folder-css`,__stylesheets__:`folder-css`,__stylus__:`folder-stylus`,__sublime__:`folder-sublime`,__submodules__:`folder-git`,__supabase__:`folder-supabase`,"__svelte-kit__":`folder-svelte`,__svelte__:`folder-svelte`,__svg__:`folder-svg`,__svgs__:`folder-svg`,__switch__:`folder-console`,__syntax__:`folder-syntax`,__syntaxes__:`folder-syntax`,"__table-of-contents__":`folder-toc`,__target__:`folder-target`,__taskfile__:`folder-taskfile`,__taskfiles__:`folder-taskfile`,__tasks__:`folder-tasks`,__television__:`folder-television`,__temp__:`folder-temp`,__template__:`folder-template`,__templates__:`folder-template`,__terraform__:`folder-terraform`,__test__:`folder-test`,__testfiles__:`folder-test`,__testing__:`folder-test`,__tests__:`folder-test`,__texture__:`folder-images`,__textures__:`folder-images`,__theme__:`folder-theme`,__themes__:`folder-theme`,"__third-party__":`folder-lib`,__thirdparty__:`folder-lib`,__tickets__:`folder-tasks`,__tls__:`folder-secure`,__tmp__:`folder-temp`,__toc__:`folder-toc`,__token__:`folder-keys`,__tokens__:`folder-keys`,__toolbox__:`folder-tools`,__toolboxes__:`folder-tools`,__tooling__:`folder-tools`,__toolkit__:`folder-tools`,__toolkits__:`folder-tools`,__tools__:`folder-tools`,__torch__:`folder-pytorch`,__transition__:`folder-animation`,__transitions__:`folder-animation`,__translate__:`folder-i18n`,__translation__:`folder-i18n`,__translations__:`folder-i18n`,__trash__:`folder-trash`,__trigger__:`folder-trigger`,__triggers__:`folder-trigger`,__ts__:`folder-typescript`,__turbo__:`folder-turborepo`,__tv__:`folder-television`,__tx__:`folder-i18n`,__typeface__:`folder-font`,__typefaces__:`folder-font`,__types__:`folder-typescript`,__typescript__:`folder-typescript`,__typings__:`folder-typescript`,__ubuntu__:`folder-linux`,__ui__:`folder-ui`,__unity__:`folder-unity`,__unix__:`folder-linux`,__update__:`folder-update`,__updates__:`folder-update`,__upgrade__:`folder-update`,__upgrades__:`folder-update`,__upload__:`folder-upload`,__uploads__:`folder-upload`,__util__:`folder-utils`,__utilities__:`folder-utils`,__utility__:`folder-utils`,__utils__:`folder-utils`,__ux__:`folder-ui`,__validation__:`folder-rules`,__validations__:`folder-rules`,__validator__:`folder-rules`,__validators__:`folder-rules`,__vector__:`folder-svg`,__vectors__:`folder-svg`,__vendor__:`folder-lib`,__vendors__:`folder-lib`,__venv__:`folder-environment`,__vercel__:`folder-vercel`,__verdaccio__:`folder-verdaccio`,__vid__:`folder-video`,__video__:`folder-video`,__videos__:`folder-video`,__vids__:`folder-video`,__view__:`folder-views`,__views__:`folder-views`,__vm__:`folder-vm`,__vms__:`folder-vm`,__voice__:`folder-audio`,__voices__:`folder-audio`,"__vscode-test__":`folder-vscode`,__vscode__:`folder-vscode`,__vue__:`folder-vue`,__vuepress__:`folder-vuepress`,__wakatime__:`folder-wakatime`,__web__:`folder-public`,__webpack__:`folder-webpack`,__website__:`folder-public`,__websites__:`folder-public`,__widget__:`folder-components`,__widgets__:`folder-components`,__wiki__:`folder-docs`,__win10__:`folder-windows`,__win11__:`folder-windows`,__win32__:`folder-windows`,__win__:`folder-windows`,__windows10__:`folder-windows`,__windows11__:`folder-windows`,__windows__:`folder-windows`,__windowsnt__:`folder-windows`,__windowsxp__:`folder-windows`,__winnt__:`folder-windows`,__winxp__:`folder-windows`,"__wordpress-org__":`folder-wordpress`,"__wp-content__":`folder-wordpress`,__wsl__:`folder-linux`,__www__:`folder-public`,__wwwroot__:`folder-public`,__xbox__:`folder-console`,__xtask__:`folder-scripts`,__yarn__:`folder-yarn`,__zeabur__:`folder-zeabur`,__zed__:`folder-zed`,_addin:`folder-plugin`,_addins:`folder-plugin`,_addon:`folder-plugin`,_addons:`folder-plugin`,_admin:`folder-admin`,_admins:`folder-admin`,_agent:`folder-robot`,_agents:`folder-robot`,_android:`folder-android`,_angular:`folder-angular`,_anim:`folder-animation`,_animated:`folder-animation`,_animation:`folder-animation`,_animations:`folder-animation`,_anims:`folder-animation`,_ansible:`folder-ansible`,_api:`folder-api`,_apis:`folder-api`,_apollo:`folder-apollo`,"_apollo-cache":`folder-apollo`,"_apollo-client":`folder-apollo`,"_apollo-config":`folder-apollo`,_app:`folder-app`,_apple:`folder-macos`,_application:`folder-app`,_applications:`folder-app`,_apps:`folder-app`,_appwrite:`folder-appwrite`,_arc:`folder-archive`,_archival:`folder-archive`,_archive:`folder-archive`,_archives:`folder-archive`,_arcs:`folder-archive`,_article:`folder-docs`,_articles:`folder-docs`,_asm:`folder-assembly`,_assembly:`folder-assembly`,_asset:`folder-resource`,_assets:`folder-resource`,_astro:`folder-astro`,_atom:`folder-atom`,_atoms:`folder-atom`,_attachment:`folder-attachment`,_attachments:`folder-attachment`,_aud:`folder-audio`,_audio:`folder-audio`,_audios:`folder-audio`,_auds:`folder-audio`,_aurelia_project:`folder-aurelia`,_auth:`folder-secure`,_authentication:`folder-secure`,_auto:`folder-generator`,_aws:`folder-aws`,_azure:`folder-aws`,"_azure-pipelines":`folder-azure-pipelines`,"_azure-pipelines-ci":`folder-azure-pipelines`,"_back-up":`folder-backup`,"_back-ups":`folder-backup`,_backend:`folder-server`,_backends:`folder-server`,_backup:`folder-backup`,_backups:`folder-backup`,_bak:`folder-backup`,_baks:`folder-backup`,_base:`folder-base`,_bases:`folder-base`,_batch:`folder-batch`,_batches:`folder-batch`,_batchs:`folder-batch`,_bench:`folder-benchmark`,_benches:`folder-benchmark`,_benchmark:`folder-benchmark`,_benchmarks:`folder-benchmark`,_bibliographies:`folder-bibliography`,_bibliography:`folder-bibliography`,_bicep:`folder-bicep`,_bin:`folder-dist`,_bkp:`folder-backup`,_bkps:`folder-backup`,_blender:`folder-blender`,"_blender-assets":`folder-blender`,"_blender-files":`folder-blender`,"_blender-models":`folder-blender`,"_blender-project":`folder-blender`,_bloc:`folder-bloc`,_blocs:`folder-bloc`,_blog:`folder-docs`,_book:`folder-bibliography`,_books:`folder-bibliography`,_bot:`folder-robot`,_bots:`folder-robot`,_bower_components:`folder-bower`,_browser:`folder-public`,_browsers:`folder-public`,_build:`folder-dist`,_buildkite:`folder-buildkite`,_builds:`folder-dist`,_built:`folder-dist`,_bull:`folder-queue`,_cache:`folder-temp`,_cached:`folder-temp`,_calc:`folder-functions`,_calcs:`folder-functions`,_calculation:`folder-functions`,_calculations:`folder-functions`,_cargo:`folder-rust`,_cart:`folder-cart`,_centos:`folder-linux`,_cert:`folder-secure`,_certificate:`folder-secure`,_certificates:`folder-secure`,_certs:`folder-secure`,_cfg:`folder-config`,_cfgs:`folder-config`,"_cfn-gen":`folder-generator`,_changes:`folder-delta`,_changeset:`folder-changesets`,_changesets:`folder-changesets`,_chat:`folder-messages`,_chats:`folder-messages`,_ci:`folder-ci`,_cipher:`folder-secure`,_circleci:`folder-circleci`,_cjs:`folder-javascript`,_class:`folder-class`,_classes:`folder-class`,_claude:`folder-claude`,_cli:`folder-command`,_client:`folder-client`,_clients:`folder-client`,_cline_docs:`folder-cline`,_clis:`folder-command`,"_cloud-firestore":`folder-firestore`,"_cloud-functions":`folder-cloud-functions`,_cloudflare:`folder-cloudflare`,_cloudfunctions:`folder-cloud-functions`,_cluster:`folder-cluster`,_clusters:`folder-cluster`,_cmd:`folder-command`,_cobol:`folder-cobol`,_code:`folder-src`,_color:`folder-theme`,_colors:`folder-theme`,_colour:`folder-theme`,_colours:`folder-theme`,_command:`folder-command`,_commandline:`folder-command`,_commands:`folder-command`,_common:`folder-shared`,_compiled:`folder-dist`,_components:`folder-components`,_composable:`folder-functions`,_composables:`folder-functions`,_concept:`folder-mock`,_concepts:`folder-mock`,_conf:`folder-config`,_config:`folder-config`,_configs:`folder-config`,_configuration:`folder-config`,_configurations:`folder-config`,_confs:`folder-config`,_connection:`folder-connection`,_connections:`folder-connection`,_console:`folder-console`,_const:`folder-constant`,_constant:`folder-constant`,_constants:`folder-constant`,_consts:`folder-constant`,_container:`folder-container`,_containers:`folder-container`,_content:`folder-content`,_contents:`folder-content`,_context:`folder-context`,_contexts:`folder-context`,_contract:`folder-contract`,"_contract-test":`folder-contract`,"_contract-testing":`folder-contract`,"_contract-tests":`folder-contract`,_contracts:`folder-contract`,_controller:`folder-controller`,_controllers:`folder-controller`,_controls:`folder-controller`,_conversation:`folder-messages`,_conversations:`folder-messages`,_core:`folder-core`,_coverage:`folder-coverage`,_crash:`folder-error`,_crashes:`folder-error`,_crates:`folder-lib`,_css:`folder-css`,_cts:`folder-typescript`,_cubit:`folder-bloc`,_cubits:`folder-bloc`,_cue:`folder-cue`,_cues:`folder-cue`,_cursor:`folder-cursor`,_custom:`folder-custom`,_customs:`folder-custom`,_cypher:`folder-secure`,_cypress:`folder-cypress`,_dal:`folder-dal`,_dart:`folder-dart`,_dart_tool:`folder-dart`,_dart_tools:`folder-dart`,_data:`folder-database`,"_data-access":`folder-dal`,"_data-access-layer":`folder-dal`,_database:`folder-database`,_databases:`folder-database`,_db:`folder-database`,_deb:`folder-linux`,_debian:`folder-linux`,_debug:`folder-debug`,_debugger:`folder-debug`,_debugging:`folder-debug`,_decorator:`folder-decorators`,_decorators:`folder-decorators`,_deepin:`folder-linux`,_delta:`folder-delta`,_deltas:`folder-delta`,_demo:`folder-examples`,_demos:`folder-examples`,_dependencies:`folder-packages`,_design:`folder-theme`,_designs:`folder-theme`,_desktop:`folder-desktop`,_devcontainer:`folder-container`,_devpackages:`folder-packages`,_devtools:`folder-tools`,_dialog:`folder-messages`,_dialogs:`folder-messages`,_diary:`folder-docs`,_directive:`folder-directive`,_directives:`folder-directive`,_display:`folder-desktop`,_dist:`folder-dist`,_distribution:`folder-dist`,_doc:`folder-docs`,_docker:`folder-docker`,_dockerfiles:`folder-docker`,_dockerhub:`folder-docker`,_docs:`folder-docs`,_document:`folder-docs`,_documentation:`folder-docs`,_documents:`folder-docs`,_download:`folder-download`,_downloader:`folder-download`,_downloaders:`folder-download`,_downloads:`folder-download`,_draft:`folder-mock`,_drafts:`folder-mock`,_drizzle:`folder-drizzle`,_ds_store:`folder-macos`,_dump:`folder-dump`,_dumps:`folder-dump`,_e2e:`folder-coverage`,_easing:`folder-animation`,_easings:`folder-animation`,_element:`folder-element`,_elements:`folder-element`,_email:`folder-mail`,_emails:`folder-mail`,_enum:`folder-enum`,_enums:`folder-enum`,_env:`folder-environment`,_environment:`folder-environment`,_environments:`folder-environment`,_envs:`folder-environment`,_err:`folder-error`,_error:`folder-error`,_errors:`folder-error`,_errs:`folder-error`,_eslint:`folder-eslint`,"_eslint-config":`folder-eslint`,"_eslint-configs":`folder-eslint`,"_eslint-plugin":`folder-eslint`,"_eslint-plugins":`folder-eslint`,_etc:`folder-other`,_event:`folder-event`,_events:`folder-event`,_example:`folder-examples`,_examples:`folder-examples`,_expo:`folder-expo`,"_expo-shared":`folder-expo`,_export:`folder-export`,_exported:`folder-export`,_exports:`folder-export`,_extension:`folder-plugin`,_extensions:`folder-plugin`,_external:`folder-lib`,_externals:`folder-lib`,_extra:`folder-other`,_extras:`folder-other`,_fastlane:`folder-fastlane`,_favicon:`folder-favicon`,_favicons:`folder-favicon`,_feat:`folder-features`,_feats:`folder-features`,_feature:`folder-features`,_features:`folder-features`,_fig:`folder-images`,_figs:`folder-images`,_figure:`folder-images`,_figures:`folder-images`,_filter:`folder-filter`,_filters:`folder-filter`,_firebase:`folder-firebase`,"_firebase-cloud-functions":`folder-cloud-functions`,"_firebase-cloudfunctions":`folder-cloud-functions`,"_firebase-firestore":`folder-firestore`,_firestore:`folder-firestore`,_fixture:`folder-mock`,_fixtures:`folder-mock`,"_flow-typed":`folder-flow`,_flutter:`folder-flutter`,_font:`folder-font`,_fonts:`folder-font`,_forgejo:`folder-forgejo`,_form:`folder-form`,_forms:`folder-form`,_forum:`folder-messages`,_fragments:`folder-components`,_frontend:`folder-client`,_frontends:`folder-client`,_func:`folder-functions`,_funcs:`folder-functions`,_function:`folder-functions`,_functions:`folder-functions`,_game:`folder-console`,_gamemaker:`folder-gamemaker`,_gamemaker2:`folder-gamemaker`,_games:`folder-console`,_gcp:`folder-aws`,_gemini:`folder-gemini-ai`,"_gemini-ai":`folder-gemini-ai`,_geminiai:`folder-gemini-ai`,_gen:`folder-generator`,_generated:`folder-generator`,_generator:`folder-generator`,_generators:`folder-generator`,_gens:`folder-generator`,_git:`folder-git`,_gitea:`folder-gitea`,_githooks:`folder-git`,_github:`folder-github`,"_github/issue_template":`folder-template`,"_github/pull_request_template":`folder-template`,"_github/workflows":`folder-gh-workflows`,_gitlab:`folder-gitlab`,_global:`folder-global`,_glsl:`folder-shader`,_go:`folder-go`,_godot:`folder-godot`,"_godot-cpp":`folder-godot`,_golang:`folder-go`,_gql:`folder-graphql`,_gradle:`folder-gradle`,_graphql:`folder-graphql`,_guard:`folder-guard`,_guards:`folder-guard`,_gui:`folder-ui`,_gulp:`folder-gulp`,"_gulp-tasks":`folder-gulp`,"_gulpfile.babel.js":`folder-gulp`,"_gulpfile.js":`folder-gulp`,"_gulpfile.mjs":`folder-gulp`,"_gulpfile.ts":`folder-gulp`,_gulpfiles:`folder-gulp`,_handler:`folder-controller`,_handlers:`folder-controller`,_helm:`folder-helm`,_helmchart:`folder-helm`,_helmcharts:`folder-helm`,_helper:`folder-helper`,_helpers:`folder-helper`,_hg:`folder-mercurial`,_hgext:`folder-mercurial`,_hghooks:`folder-mercurial`,_histories:`folder-backup`,_history:`folder-backup`,_hlsl:`folder-shader`,_home:`folder-home`,_hook:`folder-hook`,_hooks:`folder-hook`,_html:`folder-views`,_husky:`folder-husky`,_i18n:`folder-i18n`,_ico:`folder-images`,_icon:`folder-images`,_icons:`folder-images`,_icos:`folder-images`,_idea:`folder-intellij`,_image:`folder-images`,_images:`folder-images`,_img:`folder-images`,_imgs:`folder-images`,_import:`folder-import`,_imported:`folder-import`,_imports:`folder-import`,_in:`folder-input`,_inc:`folder-include`,_inc64:`folder-include`,_include:`folder-include`,_includes:`folder-include`,_infra:`folder-server`,_infrastructure:`folder-server`,_input:`folder-input`,_inputs:`folder-input`,_integration:`folder-connection`,"_integration-test":`folder-coverage`,"_integration-tests":`folder-coverage`,_integrations:`folder-connection`,_interceptor:`folder-interceptor`,_interceptors:`folder-interceptor`,_interface:`folder-interface`,_interfaces:`folder-interface`,_internationalization:`folder-i18n`,_inventories:`folder-server`,_inventory:`folder-server`,_io:`folder-input`,_ios:`folder-ios`,_ipad:`folder-macos`,_iphone:`folder-macos`,_ipod:`folder-macos`,_ipynb:`folder-jupyter`,_it:`folder-coverage`,_j2:`folder-jinja`,_java:`folder-java`,_javascript:`folder-javascript`,_javascripts:`folder-javascript`,_jinja:`folder-jinja`,_jinja2:`folder-jinja`,_job:`folder-job`,_jobs:`folder-job`,_js:`folder-javascript`,_json:`folder-json`,_jsonc:`folder-json`,_jsonl:`folder-json`,_jsons:`folder-json`,_jupyter:`folder-jupyter`,_jwt:`folder-keys`,_k8s:`folder-kubernetes`,_key:`folder-keys`,_keys:`folder-keys`,_kit:`folder-tools`,_kits:`folder-tools`,_knowledge:`folder-docs`,_kotlin:`folder-kotlin`,_kql:`folder-kusto`,_kubernetes:`folder-kubernetes`,_kusto:`folder-kusto`,_l10n:`folder-i18n`,_lambda:`folder-functions`,_lambdas:`folder-functions`,_landing:`folder-home`,_lang:`folder-i18n`,_langs:`folder-i18n`,_language:`folder-i18n`,_languages:`folder-i18n`,_layout:`folder-layout`,_layouts:`folder-layout`,_lefthook:`folder-lefthook`,"_lefthook-local":`folder-lefthook`,_less:`folder-less`,_lib:`folder-lib`,_lib64:`folder-lib`,_libraries:`folder-lib`,_library:`folder-lib`,_libs:`folder-lib`,_license:`folder-license`,_licenses:`folder-license`,_link:`folder-link`,_links:`folder-link`,_linux:`folder-linux`,_linuxbsd:`folder-linux`,_liquibase:`folder-liquibase`,_locale:`folder-i18n`,_locales:`folder-i18n`,_localization:`folder-i18n`,_log:`folder-log`,_logging:`folder-log`,_logic:`folder-functions`,_logs:`folder-log`,_lottie:`folder-lottie`,_lottiefiles:`folder-lottie`,_lotties:`folder-lottie`,_lua:`folder-lua`,_luau:`folder-luau`,_mac:`folder-macos`,_macbook:`folder-macos`,"_macbook-air":`folder-macos`,_macos:`folder-macos`,_macosx:`folder-macos`,_mail:`folder-mail`,_mailers:`folder-mail`,_mails:`folder-mail`,_main:`folder-home`,_manager:`folder-admin`,_managers:`folder-admin`,_mapping:`folder-mappings`,_mappings:`folder-mappings`,_markdown:`folder-markdown`,_math:`folder-functions`,_maths:`folder-functions`,_md:`folder-markdown`,_measure:`folder-benchmark`,_measurement:`folder-benchmark`,_measures:`folder-benchmark`,_media:`folder-video`,_messages:`folder-messages`,_messaging:`folder-messages`,_meta:`folder-meta`,"_meta-inf":`folder-config`,_metadata:`folder-meta`,_metro:`folder-metro`,_middleware:`folder-middleware`,_middlewares:`folder-middleware`,_migration:`folder-migrations`,_migrations:`folder-migrations`,_mint:`folder-linux`,_misc:`folder-other`,_miscellaneous:`folder-other`,_mjml:`folder-mjml`,_mjs:`folder-javascript`,_mobile:`folder-mobile`,_mobiles:`folder-mobile`,_mock:`folder-mock`,_mocks:`folder-mock`,_mod:`folder-plugin`,_modding:`folder-plugin`,_model:`folder-class`,_models:`folder-class`,_moderator:`folder-admin`,_moderators:`folder-admin`,_mods:`folder-plugin`,_module:`folder-plugin`,_modules:`folder-plugin`,_mojo:`folder-mojo`,_molecule:`folder-molecule`,_molecules:`folder-molecule`,_moon:`folder-moon`,_motion:`folder-animation`,_motions:`folder-animation`,_movie:`folder-video`,_movies:`folder-video`,_mq:`folder-queue`,_mts:`folder-typescript`,_music:`folder-audio`,_navigation:`folder-routes`,_navigations:`folder-routes`,_netlify:`folder-netlify`,_news:`folder-docs`,_next:`folder-next`,_nginx:`folder-nginx`,_node:`folder-node`,_node_modules:`folder-node`,_nodejs:`folder-node`,_note:`folder-docs`,_notebook:`folder-jupyter`,_notebooks:`folder-jupyter`,_notes:`folder-docs`,_now:`folder-vercel`,_nuxt:`folder-nuxt`,"_nyc-output":`folder-coverage`,_nyc_output:`folder-coverage`,_obsidian:`folder-obsidian`,_opencode:`folder-opencode`,_option:`folder-config`,_options:`folder-config`,_organism:`folder-organism`,_organisms:`folder-organism`,_osx:`folder-macos`,_other:`folder-other`,_others:`folder-other`,_out:`folder-dist`,_output:`folder-dist`,_outputs:`folder-dist`,_package:`folder-packages`,_packages:`folder-packages`,_pact:`folder-contract`,_pacts:`folder-contract`,_page:`folder-views`,_pages:`folder-views`,_palette:`folder-theme`,_palettes:`folder-theme`,_partial:`folder-include`,_partials:`folder-include`,_patches:`folder-git`,_pdf:`folder-pdf`,_pdfs:`folder-pdf`,"_pdm-build":`folder-pdm`,"_pdm-plugins":`folder-pdm`,_perf:`folder-benchmark`,_performance:`folder-benchmark`,_phone:`folder-mobile`,_phones:`folder-mobile`,_photo:`folder-images`,_photograph:`folder-images`,_photographs:`folder-images`,_photos:`folder-images`,_php:`folder-php`,_phpmailer:`folder-phpmailer`,_pic:`folder-images`,_pics:`folder-images`,_picture:`folder-images`,_pictures:`folder-images`,_pipe:`folder-pipe`,_pipeline:`folder-pipe`,_pipelines:`folder-pipe`,_pipes:`folder-pipe`,_pkg:`folder-packages`,_pkgs:`folder-packages`,_plastic:`folder-plastic`,_playground:`folder-sandbox`,_playgrounds:`folder-sandbox`,_playlist:`folder-audio`,_playlists:`folder-audio`,_plugin:`folder-plugin`,_plugins:`folder-plugin`,_policies:`folder-policy`,_policy:`folder-policy`,_popos:`folder-linux`,_portability:`folder-mobile`,_portable:`folder-mobile`,_post:`folder-docs`,_postman:`folder-postman`,_posts:`folder-docs`,_powershell:`folder-powershell`,_pref:`folder-config`,_preference:`folder-config`,_preferences:`folder-config`,_prefs:`folder-config`,_presentation:`folder-ui`,_preview:`folder-review`,_previews:`folder-review`,_prisma:`folder-prisma`,"_prisma/schema":`folder-prisma`,_private:`folder-private`,_profiling:`folder-benchmark`,_proj:`folder-project`,_project:`folder-project`,_projects:`folder-project`,_projs:`folder-project`,_prompt:`folder-prompts`,_prompts:`folder-prompts`,_properties:`folder-config`,_props:`folder-config`,_proto:`folder-proto`,_protobuf:`folder-proto`,_protobufs:`folder-proto`,_protos:`folder-proto`,_provider:`folder-controller`,_providers:`folder-controller`,_proxy:`folder-public`,_ps:`folder-powershell`,_ps1:`folder-powershell`,_ps4:`folder-console`,_ps5:`folder-console`,_public:`folder-public`,_public_html:`folder-views`,_pwa:`folder-client`,_pycache:`folder-python`,_pytest_cache:`folder-python`,_python:`folder-python`,_pytorch:`folder-pytorch`,_quasar:`folder-quasar`,_queue:`folder-queue`,_queues:`folder-queue`,_r:`folder-r`,_recordings:`folder-audio`,_release:`folder-dist`,_remote:`folder-connection`,_remotes:`folder-connection`,_repo:`folder-repository`,_report:`folder-resource`,_reports:`folder-resource`,_repos:`folder-repository`,_repositories:`folder-repository`,_repository:`folder-repository`,_res:`folder-resource`,_resolver:`folder-resolver`,_resolvers:`folder-resolver`,_resource:`folder-resource`,_resources:`folder-resource`,_restapi:`folder-api`,_review:`folder-review`,_reviewed:`folder-review`,_reviews:`folder-review`,_revisal:`folder-review`,_revisals:`folder-review`,_robot:`folder-robot`,_robots:`folder-robot`,_router:`folder-routes`,_routers:`folder-routes`,_routes:`folder-routes`,_routing:`folder-routes`,_rule:`folder-rules`,_rules:`folder-rules`,_rust:`folder-rust`,_salt:`folder-salt`,_saltstack:`folder-salt`,_sample:`folder-examples`,"_sample-data":`folder-examples`,_samples:`folder-examples`,_sandbox:`folder-sandbox`,_sandboxes:`folder-sandbox`,_sass:`folder-sass`,_scala:`folder-scala`,_schema:`folder-class`,_schemas:`folder-class`,_sconf_temp:`folder-scons`,_scons:`folder-scons`,_scons_cache:`folder-scons`,_screen:`folder-views`,_screengrab:`folder-images`,_screengrabs:`folder-images`,_screens:`folder-views`,_screenshot:`folder-images`,_screenshots:`folder-images`,_script:`folder-scripts`,_scripting:`folder-scripts`,_scripts:`folder-scripts`,_scss:`folder-sass`,_secret:`folder-keys`,_secrets:`folder-keys`,_secure:`folder-secure`,_security:`folder-secure`,_seed:`folder-seeders`,_seeders:`folder-seeders`,_seeding:`folder-seeders`,_seeds:`folder-seeders`,_server:`folder-server`,_serverless:`folder-serverless`,_serverpackages:`folder-packages`,_servers:`folder-server`,_service:`folder-controller`,_services:`folder-controller`,_setting:`folder-config`,_settings:`folder-config`,_shader:`folder-shader`,_shaders:`folder-shader`,_shared:`folder-shared`,_shop:`folder-cart`,_shopping:`folder-cart`,"_shopping-cart":`folder-cart`,_sim:`folder-simulations`,_sims:`folder-simulations`,_simulation:`folder-simulations`,_simulations:`folder-simulations`,_site:`folder-public`,_sketch:`folder-mock`,_sketches:`folder-mock`,_skill:`folder-skills`,_skills:`folder-skills`,_smtp:`folder-mail`,_snap:`folder-snapcraft`,_snapcraft:`folder-snapcraft`,_snapshots:`folder-test`,_snippet:`folder-snippet`,_snippets:`folder-snippet`,_song:`folder-audio`,_songs:`folder-audio`,_sound:`folder-audio`,_sounds:`folder-audio`,_source:`folder-src`,_sources:`folder-src`,_spa:`folder-client`,_spec:`folder-test`,_specs:`folder-test`,_spellcheck:`folder-syntax`,_spellcheckers:`folder-syntax`,_sql:`folder-database`,_src:`folder-src`,"_src-tauri":`folder-src-tauri`,_srcs:`folder-src`,_ssl:`folder-secure`,_stack:`folder-stack`,_stacks:`folder-stack`,_start:`folder-home`,_static:`folder-resource`,_stencil:`folder-stencil`,_store:`folder-store`,_stores:`folder-store`,_stories:`folder-storybook`,_storybook:`folder-storybook`,_style:`folder-css`,_styles:`folder-css`,_stylesheet:`folder-css`,_stylesheets:`folder-css`,_stylus:`folder-stylus`,_sublime:`folder-sublime`,_submodules:`folder-git`,_supabase:`folder-supabase`,_svelte:`folder-svelte`,"_svelte-kit":`folder-svelte`,_svg:`folder-svg`,_svgs:`folder-svg`,_switch:`folder-console`,_syntax:`folder-syntax`,_syntaxes:`folder-syntax`,"_table-of-contents":`folder-toc`,_target:`folder-target`,_taskfile:`folder-taskfile`,_taskfiles:`folder-taskfile`,_tasks:`folder-tasks`,_television:`folder-television`,_temp:`folder-temp`,_template:`folder-template`,_templates:`folder-template`,_terraform:`folder-terraform`,_test:`folder-test`,_testfiles:`folder-test`,_testing:`folder-test`,_tests:`folder-test`,_texture:`folder-images`,_textures:`folder-images`,_theme:`folder-theme`,_themes:`folder-theme`,"_third-party":`folder-lib`,_thirdparty:`folder-lib`,_tickets:`folder-tasks`,_tls:`folder-secure`,_tmp:`folder-temp`,_toc:`folder-toc`,_token:`folder-keys`,_tokens:`folder-keys`,_toolbox:`folder-tools`,_toolboxes:`folder-tools`,_tooling:`folder-tools`,_toolkit:`folder-tools`,_toolkits:`folder-tools`,_tools:`folder-tools`,_torch:`folder-pytorch`,_transition:`folder-animation`,_transitions:`folder-animation`,_translate:`folder-i18n`,_translation:`folder-i18n`,_translations:`folder-i18n`,_trash:`folder-trash`,_trigger:`folder-trigger`,_triggers:`folder-trigger`,_ts:`folder-typescript`,_turbo:`folder-turborepo`,_tv:`folder-television`,_tx:`folder-i18n`,_typeface:`folder-font`,_typefaces:`folder-font`,_types:`folder-typescript`,_typescript:`folder-typescript`,_typings:`folder-typescript`,_ubuntu:`folder-linux`,_ui:`folder-ui`,_unity:`folder-unity`,_unix:`folder-linux`,_update:`folder-update`,_updates:`folder-update`,_upgrade:`folder-update`,_upgrades:`folder-update`,_upload:`folder-upload`,_uploads:`folder-upload`,_util:`folder-utils`,_utilities:`folder-utils`,_utility:`folder-utils`,_utils:`folder-utils`,_ux:`folder-ui`,_validation:`folder-rules`,_validations:`folder-rules`,_validator:`folder-rules`,_validators:`folder-rules`,_vector:`folder-svg`,_vectors:`folder-svg`,_vendor:`folder-lib`,_vendors:`folder-lib`,_venv:`folder-environment`,_vercel:`folder-vercel`,_verdaccio:`folder-verdaccio`,_vid:`folder-video`,_video:`folder-video`,_videos:`folder-video`,_vids:`folder-video`,_view:`folder-views`,_views:`folder-views`,_vm:`folder-vm`,_vms:`folder-vm`,_voice:`folder-audio`,_voices:`folder-audio`,_vscode:`folder-vscode`,"_vscode-test":`folder-vscode`,_vue:`folder-vue`,_vuepress:`folder-vuepress`,_wakatime:`folder-wakatime`,_web:`folder-public`,_webpack:`folder-webpack`,_website:`folder-public`,_websites:`folder-public`,_widget:`folder-components`,_widgets:`folder-components`,_wiki:`folder-docs`,_win:`folder-windows`,_win10:`folder-windows`,_win11:`folder-windows`,_win32:`folder-windows`,_windows:`folder-windows`,_windows10:`folder-windows`,_windows11:`folder-windows`,_windowsnt:`folder-windows`,_windowsxp:`folder-windows`,_winnt:`folder-windows`,_winxp:`folder-windows`,"_wordpress-org":`folder-wordpress`,"_wp-content":`folder-wordpress`,_wsl:`folder-linux`,_www:`folder-public`,_wwwroot:`folder-public`,_xbox:`folder-console`,_xtask:`folder-scripts`,_yarn:`folder-yarn`,_zeabur:`folder-zeabur`,_zed:`folder-zed`,addin:`folder-plugin`,addins:`folder-plugin`,addon:`folder-plugin`,addons:`folder-plugin`,admin:`folder-admin`,admins:`folder-admin`,agent:`folder-robot`,agents:`folder-robot`,android:`folder-android`,angular:`folder-angular`,anim:`folder-animation`,animated:`folder-animation`,animation:`folder-animation`,animations:`folder-animation`,anims:`folder-animation`,ansible:`folder-ansible`,api:`folder-api`,apis:`folder-api`,apollo:`folder-apollo`,"apollo-cache":`folder-apollo`,"apollo-client":`folder-apollo`,"apollo-config":`folder-apollo`,app:`folder-app`,apple:`folder-macos`,application:`folder-app`,applications:`folder-app`,apps:`folder-app`,appwrite:`folder-appwrite`,arc:`folder-archive`,archival:`folder-archive`,archive:`folder-archive`,archives:`folder-archive`,arcs:`folder-archive`,article:`folder-docs`,articles:`folder-docs`,asm:`folder-assembly`,assembly:`folder-assembly`,asset:`folder-resource`,assets:`folder-resource`,astro:`folder-astro`,atom:`folder-atom`,atoms:`folder-atom`,attachment:`folder-attachment`,attachments:`folder-attachment`,aud:`folder-audio`,audio:`folder-audio`,audios:`folder-audio`,auds:`folder-audio`,aurelia_project:`folder-aurelia`,auth:`folder-secure`,authentication:`folder-secure`,auto:`folder-generator`,aws:`folder-aws`,azure:`folder-aws`,"azure-pipelines":`folder-azure-pipelines`,"azure-pipelines-ci":`folder-azure-pipelines`,"back-up":`folder-backup`,"back-ups":`folder-backup`,backend:`folder-server`,backends:`folder-server`,backup:`folder-backup`,backups:`folder-backup`,bak:`folder-backup`,baks:`folder-backup`,base:`folder-base`,bases:`folder-base`,batch:`folder-batch`,batches:`folder-batch`,batchs:`folder-batch`,bench:`folder-benchmark`,benches:`folder-benchmark`,benchmark:`folder-benchmark`,benchmarks:`folder-benchmark`,bibliographies:`folder-bibliography`,bibliography:`folder-bibliography`,bicep:`folder-bicep`,bin:`folder-dist`,bkp:`folder-backup`,bkps:`folder-backup`,blender:`folder-blender`,"blender-assets":`folder-blender`,"blender-files":`folder-blender`,"blender-models":`folder-blender`,"blender-project":`folder-blender`,bloc:`folder-bloc`,blocs:`folder-bloc`,blog:`folder-docs`,book:`folder-bibliography`,books:`folder-bibliography`,bot:`folder-robot`,bots:`folder-robot`,bower_components:`folder-bower`,browser:`folder-public`,browsers:`folder-public`,build:`folder-dist`,buildkite:`folder-buildkite`,builds:`folder-dist`,built:`folder-dist`,bull:`folder-queue`,cache:`folder-temp`,cached:`folder-temp`,calc:`folder-functions`,calcs:`folder-functions`,calculation:`folder-functions`,calculations:`folder-functions`,cargo:`folder-rust`,cart:`folder-cart`,centos:`folder-linux`,cert:`folder-secure`,certificate:`folder-secure`,certificates:`folder-secure`,certs:`folder-secure`,cfg:`folder-config`,cfgs:`folder-config`,"cfn-gen":`folder-generator`,changes:`folder-delta`,changeset:`folder-changesets`,changesets:`folder-changesets`,chat:`folder-messages`,chats:`folder-messages`,ci:`folder-ci`,cipher:`folder-secure`,circleci:`folder-circleci`,cjs:`folder-javascript`,class:`folder-class`,classes:`folder-class`,claude:`folder-claude`,cli:`folder-command`,client:`folder-client`,clients:`folder-client`,cline_docs:`folder-cline`,clis:`folder-command`,"cloud-firestore":`folder-firestore`,"cloud-functions":`folder-cloud-functions`,cloudflare:`folder-cloudflare`,cloudfunctions:`folder-cloud-functions`,cluster:`folder-cluster`,clusters:`folder-cluster`,cmd:`folder-command`,cobol:`folder-cobol`,code:`folder-src`,color:`folder-theme`,colors:`folder-theme`,colour:`folder-theme`,colours:`folder-theme`,command:`folder-command`,commandline:`folder-command`,commands:`folder-command`,common:`folder-shared`,compiled:`folder-dist`,components:`folder-components`,composable:`folder-functions`,composables:`folder-functions`,concept:`folder-mock`,concepts:`folder-mock`,conf:`folder-config`,config:`folder-config`,configs:`folder-config`,configuration:`folder-config`,configurations:`folder-config`,confs:`folder-config`,connection:`folder-connection`,connections:`folder-connection`,console:`folder-console`,const:`folder-constant`,constant:`folder-constant`,constants:`folder-constant`,consts:`folder-constant`,container:`folder-container`,containers:`folder-container`,content:`folder-content`,contents:`folder-content`,context:`folder-context`,contexts:`folder-context`,contract:`folder-contract`,"contract-test":`folder-contract`,"contract-testing":`folder-contract`,"contract-tests":`folder-contract`,contracts:`folder-contract`,controller:`folder-controller`,controllers:`folder-controller`,controls:`folder-controller`,conversation:`folder-messages`,conversations:`folder-messages`,core:`folder-core`,coverage:`folder-coverage`,crash:`folder-error`,crashes:`folder-error`,crates:`folder-lib`,css:`folder-css`,cts:`folder-typescript`,cubit:`folder-bloc`,cubits:`folder-bloc`,cue:`folder-cue`,cues:`folder-cue`,cursor:`folder-cursor`,custom:`folder-custom`,customs:`folder-custom`,cypher:`folder-secure`,cypress:`folder-cypress`,dal:`folder-dal`,dart:`folder-dart`,dart_tool:`folder-dart`,dart_tools:`folder-dart`,data:`folder-database`,"data-access":`folder-dal`,"data-access-layer":`folder-dal`,database:`folder-database`,databases:`folder-database`,db:`folder-database`,deb:`folder-linux`,debian:`folder-linux`,debug:`folder-debug`,debugger:`folder-debug`,debugging:`folder-debug`,decorator:`folder-decorators`,decorators:`folder-decorators`,deepin:`folder-linux`,delta:`folder-delta`,deltas:`folder-delta`,demo:`folder-examples`,demos:`folder-examples`,dependencies:`folder-packages`,design:`folder-theme`,designs:`folder-theme`,desktop:`folder-desktop`,devcontainer:`folder-container`,devpackages:`folder-packages`,devtools:`folder-tools`,dialog:`folder-messages`,dialogs:`folder-messages`,diary:`folder-docs`,directive:`folder-directive`,directives:`folder-directive`,display:`folder-desktop`,dist:`folder-dist`,distribution:`folder-dist`,doc:`folder-docs`,docker:`folder-docker`,dockerfiles:`folder-docker`,dockerhub:`folder-docker`,docs:`folder-docs`,document:`folder-docs`,documentation:`folder-docs`,documents:`folder-docs`,download:`folder-download`,downloader:`folder-download`,downloaders:`folder-download`,downloads:`folder-download`,draft:`folder-mock`,drafts:`folder-mock`,drizzle:`folder-drizzle`,ds_store:`folder-macos`,dump:`folder-dump`,dumps:`folder-dump`,e2e:`folder-coverage`,easing:`folder-animation`,easings:`folder-animation`,element:`folder-element`,elements:`folder-element`,email:`folder-mail`,emails:`folder-mail`,enum:`folder-enum`,enums:`folder-enum`,env:`folder-environment`,environment:`folder-environment`,environments:`folder-environment`,envs:`folder-environment`,err:`folder-error`,error:`folder-error`,errors:`folder-error`,errs:`folder-error`,eslint:`folder-eslint`,"eslint-config":`folder-eslint`,"eslint-configs":`folder-eslint`,"eslint-plugin":`folder-eslint`,"eslint-plugins":`folder-eslint`,etc:`folder-other`,event:`folder-event`,events:`folder-event`,example:`folder-examples`,examples:`folder-examples`,expo:`folder-expo`,"expo-shared":`folder-expo`,export:`folder-export`,exported:`folder-export`,exports:`folder-export`,extension:`folder-plugin`,extensions:`folder-plugin`,external:`folder-lib`,externals:`folder-lib`,extra:`folder-other`,extras:`folder-other`,fastlane:`folder-fastlane`,favicon:`folder-favicon`,favicons:`folder-favicon`,feat:`folder-features`,feats:`folder-features`,feature:`folder-features`,features:`folder-features`,fig:`folder-images`,figs:`folder-images`,figure:`folder-images`,figures:`folder-images`,filter:`folder-filter`,filters:`folder-filter`,firebase:`folder-firebase`,"firebase-cloud-functions":`folder-cloud-functions`,"firebase-cloudfunctions":`folder-cloud-functions`,"firebase-firestore":`folder-firestore`,firestore:`folder-firestore`,fixture:`folder-mock`,fixtures:`folder-mock`,"flow-typed":`folder-flow`,flutter:`folder-flutter`,font:`folder-font`,fonts:`folder-font`,forgejo:`folder-forgejo`,form:`folder-form`,forms:`folder-form`,forum:`folder-messages`,fragments:`folder-components`,frontend:`folder-client`,frontends:`folder-client`,func:`folder-functions`,funcs:`folder-functions`,function:`folder-functions`,functions:`folder-functions`,game:`folder-console`,gamemaker:`folder-gamemaker`,gamemaker2:`folder-gamemaker`,games:`folder-console`,gcp:`folder-aws`,gemini:`folder-gemini-ai`,"gemini-ai":`folder-gemini-ai`,geminiai:`folder-gemini-ai`,gen:`folder-generator`,generated:`folder-generator`,generator:`folder-generator`,generators:`folder-generator`,gens:`folder-generator`,git:`folder-git`,gitea:`folder-gitea`,githooks:`folder-git`,github:`folder-github`,"github/issue_template":`folder-template`,"github/pull_request_template":`folder-template`,"github/workflows":`folder-gh-workflows`,gitlab:`folder-gitlab`,global:`folder-global`,glsl:`folder-shader`,go:`folder-go`,godot:`folder-godot`,"godot-cpp":`folder-godot`,golang:`folder-go`,gql:`folder-graphql`,gradle:`folder-gradle`,graphql:`folder-graphql`,guard:`folder-guard`,guards:`folder-guard`,gui:`folder-ui`,gulp:`folder-gulp`,"gulp-tasks":`folder-gulp`,"gulpfile.babel.js":`folder-gulp`,"gulpfile.js":`folder-gulp`,"gulpfile.mjs":`folder-gulp`,"gulpfile.ts":`folder-gulp`,gulpfiles:`folder-gulp`,handler:`folder-controller`,handlers:`folder-controller`,helm:`folder-helm`,helmchart:`folder-helm`,helmcharts:`folder-helm`,helper:`folder-helper`,helpers:`folder-helper`,hg:`folder-mercurial`,hgext:`folder-mercurial`,hghooks:`folder-mercurial`,histories:`folder-backup`,history:`folder-backup`,hlsl:`folder-shader`,home:`folder-home`,hook:`folder-hook`,hooks:`folder-hook`,html:`folder-views`,husky:`folder-husky`,i18n:`folder-i18n`,ico:`folder-images`,icon:`folder-images`,icons:`folder-images`,icos:`folder-images`,idea:`folder-intellij`,image:`folder-images`,images:`folder-images`,img:`folder-images`,imgs:`folder-images`,import:`folder-import`,imported:`folder-import`,imports:`folder-import`,in:`folder-input`,inc:`folder-include`,inc64:`folder-include`,include:`folder-include`,includes:`folder-include`,infra:`folder-server`,infrastructure:`folder-server`,input:`folder-input`,inputs:`folder-input`,integration:`folder-connection`,"integration-test":`folder-coverage`,"integration-tests":`folder-coverage`,integrations:`folder-connection`,interceptor:`folder-interceptor`,interceptors:`folder-interceptor`,interface:`folder-interface`,interfaces:`folder-interface`,internationalization:`folder-i18n`,inventories:`folder-server`,inventory:`folder-server`,io:`folder-input`,ios:`folder-ios`,ipad:`folder-macos`,iphone:`folder-macos`,ipod:`folder-macos`,ipynb:`folder-jupyter`,it:`folder-coverage`,j2:`folder-jinja`,java:`folder-java`,javascript:`folder-javascript`,javascripts:`folder-javascript`,jinja:`folder-jinja`,jinja2:`folder-jinja`,job:`folder-job`,jobs:`folder-job`,js:`folder-javascript`,json:`folder-json`,jsonc:`folder-json`,jsonl:`folder-json`,jsons:`folder-json`,jupyter:`folder-jupyter`,jwt:`folder-keys`,k8s:`folder-kubernetes`,key:`folder-keys`,keys:`folder-keys`,kit:`folder-tools`,kits:`folder-tools`,knowledge:`folder-docs`,kotlin:`folder-kotlin`,kql:`folder-kusto`,kubernetes:`folder-kubernetes`,kusto:`folder-kusto`,l10n:`folder-i18n`,lambda:`folder-functions`,lambdas:`folder-functions`,landing:`folder-home`,lang:`folder-i18n`,langs:`folder-i18n`,language:`folder-i18n`,languages:`folder-i18n`,layout:`folder-layout`,layouts:`folder-layout`,lefthook:`folder-lefthook`,"lefthook-local":`folder-lefthook`,less:`folder-less`,lib:`folder-lib`,lib64:`folder-lib`,libraries:`folder-lib`,library:`folder-lib`,libs:`folder-lib`,license:`folder-license`,licenses:`folder-license`,link:`folder-link`,links:`folder-link`,linux:`folder-linux`,linuxbsd:`folder-linux`,liquibase:`folder-liquibase`,locale:`folder-i18n`,locales:`folder-i18n`,localization:`folder-i18n`,log:`folder-log`,logging:`folder-log`,logic:`folder-functions`,logs:`folder-log`,lottie:`folder-lottie`,lottiefiles:`folder-lottie`,lotties:`folder-lottie`,lua:`folder-lua`,luau:`folder-luau`,mac:`folder-macos`,macbook:`folder-macos`,"macbook-air":`folder-macos`,macos:`folder-macos`,macosx:`folder-macos`,mail:`folder-mail`,mailers:`folder-mail`,mails:`folder-mail`,main:`folder-home`,manager:`folder-admin`,managers:`folder-admin`,mapping:`folder-mappings`,mappings:`folder-mappings`,markdown:`folder-markdown`,math:`folder-functions`,maths:`folder-functions`,md:`folder-markdown`,measure:`folder-benchmark`,measurement:`folder-benchmark`,measures:`folder-benchmark`,media:`folder-video`,messages:`folder-messages`,messaging:`folder-messages`,meta:`folder-meta`,"meta-inf":`folder-config`,metadata:`folder-meta`,metro:`folder-metro`,middleware:`folder-middleware`,middlewares:`folder-middleware`,migration:`folder-migrations`,migrations:`folder-migrations`,mint:`folder-linux`,misc:`folder-other`,miscellaneous:`folder-other`,mjml:`folder-mjml`,mjs:`folder-javascript`,mobile:`folder-mobile`,mobiles:`folder-mobile`,mock:`folder-mock`,mocks:`folder-mock`,mod:`folder-plugin`,modding:`folder-plugin`,model:`folder-class`,models:`folder-class`,moderator:`folder-admin`,moderators:`folder-admin`,mods:`folder-plugin`,module:`folder-plugin`,modules:`folder-plugin`,mojo:`folder-mojo`,molecule:`folder-molecule`,molecules:`folder-molecule`,moon:`folder-moon`,motion:`folder-animation`,motions:`folder-animation`,movie:`folder-video`,movies:`folder-video`,mq:`folder-queue`,mts:`folder-typescript`,music:`folder-audio`,navigation:`folder-routes`,navigations:`folder-routes`,netlify:`folder-netlify`,news:`folder-docs`,next:`folder-next`,nginx:`folder-nginx`,node:`folder-node`,node_modules:`folder-node`,nodejs:`folder-node`,note:`folder-docs`,notebook:`folder-jupyter`,notebooks:`folder-jupyter`,notes:`folder-docs`,now:`folder-vercel`,nuxt:`folder-nuxt`,"nyc-output":`folder-coverage`,nyc_output:`folder-coverage`,obsidian:`folder-obsidian`,opencode:`folder-opencode`,option:`folder-config`,options:`folder-config`,organism:`folder-organism`,organisms:`folder-organism`,osx:`folder-macos`,other:`folder-other`,others:`folder-other`,out:`folder-dist`,output:`folder-dist`,outputs:`folder-dist`,package:`folder-packages`,packages:`folder-packages`,pact:`folder-contract`,pacts:`folder-contract`,page:`folder-views`,pages:`folder-views`,palette:`folder-theme`,palettes:`folder-theme`,partial:`folder-include`,partials:`folder-include`,patches:`folder-git`,pdf:`folder-pdf`,pdfs:`folder-pdf`,"pdm-build":`folder-pdm`,"pdm-plugins":`folder-pdm`,perf:`folder-benchmark`,performance:`folder-benchmark`,phone:`folder-mobile`,phones:`folder-mobile`,photo:`folder-images`,photograph:`folder-images`,photographs:`folder-images`,photos:`folder-images`,php:`folder-php`,phpmailer:`folder-phpmailer`,pic:`folder-images`,pics:`folder-images`,picture:`folder-images`,pictures:`folder-images`,pipe:`folder-pipe`,pipeline:`folder-pipe`,pipelines:`folder-pipe`,pipes:`folder-pipe`,pkg:`folder-packages`,pkgs:`folder-packages`,plastic:`folder-plastic`,playground:`folder-sandbox`,playgrounds:`folder-sandbox`,playlist:`folder-audio`,playlists:`folder-audio`,plugin:`folder-plugin`,plugins:`folder-plugin`,policies:`folder-policy`,policy:`folder-policy`,popos:`folder-linux`,portability:`folder-mobile`,portable:`folder-mobile`,post:`folder-docs`,postman:`folder-postman`,posts:`folder-docs`,powershell:`folder-powershell`,pref:`folder-config`,preference:`folder-config`,preferences:`folder-config`,prefs:`folder-config`,presentation:`folder-ui`,preview:`folder-review`,previews:`folder-review`,prisma:`folder-prisma`,"prisma/schema":`folder-prisma`,private:`folder-private`,profiling:`folder-benchmark`,proj:`folder-project`,project:`folder-project`,projects:`folder-project`,projs:`folder-project`,prompt:`folder-prompts`,prompts:`folder-prompts`,properties:`folder-config`,props:`folder-config`,proto:`folder-proto`,protobuf:`folder-proto`,protobufs:`folder-proto`,protos:`folder-proto`,provider:`folder-controller`,providers:`folder-controller`,proxy:`folder-public`,ps:`folder-powershell`,ps1:`folder-powershell`,ps4:`folder-console`,ps5:`folder-console`,public:`folder-public`,public_html:`folder-views`,pwa:`folder-client`,pycache:`folder-python`,pytest_cache:`folder-python`,python:`folder-python`,pytorch:`folder-pytorch`,quasar:`folder-quasar`,queue:`folder-queue`,queues:`folder-queue`,r:`folder-r`,recordings:`folder-audio`,release:`folder-dist`,remote:`folder-connection`,remotes:`folder-connection`,repo:`folder-repository`,report:`folder-resource`,reports:`folder-resource`,repos:`folder-repository`,repositories:`folder-repository`,repository:`folder-repository`,res:`folder-resource`,resolver:`folder-resolver`,resolvers:`folder-resolver`,resource:`folder-resource`,resources:`folder-resource`,restapi:`folder-api`,review:`folder-review`,reviewed:`folder-review`,reviews:`folder-review`,revisal:`folder-review`,revisals:`folder-review`,robot:`folder-robot`,robots:`folder-robot`,router:`folder-routes`,routers:`folder-routes`,routes:`folder-routes`,routing:`folder-routes`,rule:`folder-rules`,rules:`folder-rules`,rust:`folder-rust`,salt:`folder-salt`,saltstack:`folder-salt`,sample:`folder-examples`,"sample-data":`folder-examples`,samples:`folder-examples`,sandbox:`folder-sandbox`,sandboxes:`folder-sandbox`,sass:`folder-sass`,scala:`folder-scala`,schema:`folder-class`,schemas:`folder-class`,sconf_temp:`folder-scons`,scons:`folder-scons`,scons_cache:`folder-scons`,screen:`folder-views`,screengrab:`folder-images`,screengrabs:`folder-images`,screens:`folder-views`,screenshot:`folder-images`,screenshots:`folder-images`,script:`folder-scripts`,scripting:`folder-scripts`,scripts:`folder-scripts`,scss:`folder-sass`,secret:`folder-keys`,secrets:`folder-keys`,secure:`folder-secure`,security:`folder-secure`,seed:`folder-seeders`,seeders:`folder-seeders`,seeding:`folder-seeders`,seeds:`folder-seeders`,server:`folder-server`,serverless:`folder-serverless`,serverpackages:`folder-packages`,servers:`folder-server`,service:`folder-controller`,services:`folder-controller`,setting:`folder-config`,settings:`folder-config`,shader:`folder-shader`,shaders:`folder-shader`,shared:`folder-shared`,shop:`folder-cart`,shopping:`folder-cart`,"shopping-cart":`folder-cart`,sim:`folder-simulations`,sims:`folder-simulations`,simulation:`folder-simulations`,simulations:`folder-simulations`,site:`folder-public`,sketch:`folder-mock`,sketches:`folder-mock`,skill:`folder-skills`,skills:`folder-skills`,smtp:`folder-mail`,snap:`folder-snapcraft`,snapcraft:`folder-snapcraft`,snapshots:`folder-test`,snippet:`folder-snippet`,snippets:`folder-snippet`,song:`folder-audio`,songs:`folder-audio`,sound:`folder-audio`,sounds:`folder-audio`,source:`folder-src`,sources:`folder-src`,spa:`folder-client`,spec:`folder-test`,specs:`folder-test`,spellcheck:`folder-syntax`,spellcheckers:`folder-syntax`,sql:`folder-database`,src:`folder-src`,"src-tauri":`folder-src-tauri`,srcs:`folder-src`,ssl:`folder-secure`,stack:`folder-stack`,stacks:`folder-stack`,start:`folder-home`,static:`folder-resource`,stencil:`folder-stencil`,store:`folder-store`,stores:`folder-store`,stories:`folder-storybook`,storybook:`folder-storybook`,style:`folder-css`,styles:`folder-css`,stylesheet:`folder-css`,stylesheets:`folder-css`,stylus:`folder-stylus`,sublime:`folder-sublime`,submodules:`folder-git`,supabase:`folder-supabase`,svelte:`folder-svelte`,"svelte-kit":`folder-svelte`,svg:`folder-svg`,svgs:`folder-svg`,switch:`folder-console`,syntax:`folder-syntax`,syntaxes:`folder-syntax`,"table-of-contents":`folder-toc`,target:`folder-target`,taskfile:`folder-taskfile`,taskfiles:`folder-taskfile`,tasks:`folder-tasks`,television:`folder-television`,temp:`folder-temp`,template:`folder-template`,templates:`folder-template`,terraform:`folder-terraform`,test:`folder-test`,testfiles:`folder-test`,testing:`folder-test`,tests:`folder-test`,texture:`folder-images`,textures:`folder-images`,theme:`folder-theme`,themes:`folder-theme`,"third-party":`folder-lib`,thirdparty:`folder-lib`,tickets:`folder-tasks`,tls:`folder-secure`,tmp:`folder-temp`,toc:`folder-toc`,token:`folder-keys`,tokens:`folder-keys`,toolbox:`folder-tools`,toolboxes:`folder-tools`,tooling:`folder-tools`,toolkit:`folder-tools`,toolkits:`folder-tools`,tools:`folder-tools`,torch:`folder-pytorch`,transition:`folder-animation`,transitions:`folder-animation`,translate:`folder-i18n`,translation:`folder-i18n`,translations:`folder-i18n`,trash:`folder-trash`,trigger:`folder-trigger`,triggers:`folder-trigger`,ts:`folder-typescript`,turbo:`folder-turborepo`,tv:`folder-television`,tx:`folder-i18n`,typeface:`folder-font`,typefaces:`folder-font`,types:`folder-typescript`,typescript:`folder-typescript`,typings:`folder-typescript`,ubuntu:`folder-linux`,ui:`folder-ui`,unity:`folder-unity`,unix:`folder-linux`,update:`folder-update`,updates:`folder-update`,upgrade:`folder-update`,upgrades:`folder-update`,upload:`folder-upload`,uploads:`folder-upload`,util:`folder-utils`,utilities:`folder-utils`,utility:`folder-utils`,utils:`folder-utils`,ux:`folder-ui`,validation:`folder-rules`,validations:`folder-rules`,validator:`folder-rules`,validators:`folder-rules`,vector:`folder-svg`,vectors:`folder-svg`,vendor:`folder-lib`,vendors:`folder-lib`,venv:`folder-environment`,vercel:`folder-vercel`,verdaccio:`folder-verdaccio`,vid:`folder-video`,video:`folder-video`,videos:`folder-video`,vids:`folder-video`,view:`folder-views`,views:`folder-views`,vm:`folder-vm`,vms:`folder-vm`,voice:`folder-audio`,voices:`folder-audio`,vscode:`folder-vscode`,"vscode-test":`folder-vscode`,vue:`folder-vue`,vuepress:`folder-vuepress`,wakatime:`folder-wakatime`,web:`folder-public`,webpack:`folder-webpack`,website:`folder-public`,websites:`folder-public`,widget:`folder-components`,widgets:`folder-components`,wiki:`folder-docs`,win:`folder-windows`,win10:`folder-windows`,win11:`folder-windows`,win32:`folder-windows`,windows:`folder-windows`,windows10:`folder-windows`,windows11:`folder-windows`,windowsnt:`folder-windows`,windowsxp:`folder-windows`,winnt:`folder-windows`,winxp:`folder-windows`,"wordpress-org":`folder-wordpress`,"wp-content":`folder-wordpress`,wsl:`folder-linux`,www:`folder-public`,wwwroot:`folder-public`,xbox:`folder-console`,xtask:`folder-scripts`,yarn:`folder-yarn`,zeabur:`folder-zeabur`,zed:`folder-zed`},ja={".autorc":`auto_light`,".browserslistrc":`browserlist_light`,".bun-version":`bun_light`,".codeclimate.yml":`code-climate_light`,".config/releaserc":`semantic-release_light`,".config/releaserc.cjs":`semantic-release_light`,".config/releaserc.cts":`semantic-release_light`,".config/releaserc.js":`semantic-release_light`,".config/releaserc.json":`semantic-release_light`,".config/releaserc.json5":`semantic-release_light`,".config/releaserc.jsonc":`semantic-release_light`,".config/releaserc.mjs":`semantic-release_light`,".config/releaserc.mts":`semantic-release_light`,".config/releaserc.toml":`semantic-release_light`,".config/releaserc.ts":`semantic-release_light`,".config/releaserc.yaml":`semantic-release_light`,".config/releaserc.yml":`semantic-release_light`,".config/stylelintrc":`stylelint_light`,".config/stylelintrc.cjs":`stylelint_light`,".config/stylelintrc.cts":`stylelint_light`,".config/stylelintrc.js":`stylelint_light`,".config/stylelintrc.json":`stylelint_light`,".config/stylelintrc.json5":`stylelint_light`,".config/stylelintrc.jsonc":`stylelint_light`,".config/stylelintrc.mjs":`stylelint_light`,".config/stylelintrc.mts":`stylelint_light`,".config/stylelintrc.toml":`stylelint_light`,".config/stylelintrc.ts":`stylelint_light`,".config/stylelintrc.yaml":`stylelint_light`,".config/stylelintrc.yml":`stylelint_light`,".copilotignore":`copilot_light`,".cursor":`cursor_light`,".cursor.json":`cursor_light`,".cursorignore":`cursor_light`,".cursorindexingignore":`cursor_light`,".cursorrc":`cursor_light`,".cursorrules":`cursor_light`,".drone.yml":`drone_light`,".easignore":`expo_light`,".nano-staged.cjs":`nano-staged_light`,".nano-staged.js":`nano-staged_light`,".nano-staged.json":`nano-staged_light`,".nano-staged.mjs":`nano-staged_light`,".nanostagedrc":`nano-staged_light`,".nowignore":`vercel_light`,".pnpmfile.cjs":`pnpm_light`,".releaserc":`semantic-release_light`,".releaserc.cjs":`semantic-release_light`,".releaserc.cts":`semantic-release_light`,".releaserc.js":`semantic-release_light`,".releaserc.json":`semantic-release_light`,".releaserc.json5":`semantic-release_light`,".releaserc.jsonc":`semantic-release_light`,".releaserc.mjs":`semantic-release_light`,".releaserc.mts":`semantic-release_light`,".releaserc.toml":`semantic-release_light`,".releaserc.ts":`semantic-release_light`,".releaserc.yaml":`semantic-release_light`,".releaserc.yml":`semantic-release_light`,".rubocop-todo.yml":`rubocop_light`,".rubocop.yml":`rubocop_light`,".rubocop_todo.yml":`rubocop_light`,".shellcheckrc":`shellcheck_light`,".stylelintcache":`stylelint_light`,".stylelintignore":`stylelint_light`,".stylelintrc":`stylelint_light`,".stylelintrc.cjs":`stylelint_light`,".stylelintrc.cts":`stylelint_light`,".stylelintrc.js":`stylelint_light`,".stylelintrc.json":`stylelint_light`,".stylelintrc.json5":`stylelint_light`,".stylelintrc.jsonc":`stylelint_light`,".stylelintrc.mjs":`stylelint_light`,".stylelintrc.mts":`stylelint_light`,".stylelintrc.toml":`stylelint_light`,".stylelintrc.ts":`stylelint_light`,".stylelintrc.yaml":`stylelint_light`,".stylelintrc.yml":`stylelint_light`,".vercelignore":`vercel_light`,".wakatime-project":`wakatime_light`,"auto-config.js":`auto_light`,"auto-config.json":`auto_light`,"auto-config.ts":`auto_light`,"auto-config.yaml":`auto_light`,"auto-config.yml":`auto_light`,"auto.config.js":`auto_light`,"auto.config.ts":`auto_light`,browserslist:`browserlist_light`,"bun.lock":`bun_light`,"bun.lockb":`bun_light`,"bunfig.toml":`bun_light`,"circle.yml":`circleci_light`,"copilot-instructions.md":`copilot_light`,"deno.json":`deno_light`,"deno.jsonc":`deno_light`,"deno.lock":`deno_light`,"eas.json":`expo_light`,hosts:`hosts_light`,"jsr.json":`jsr_light`,"jsr.jsonc":`jsr_light`,"nano-staged.cjs":`nano-staged_light`,"nano-staged.js":`nano-staged_light`,"nano-staged.json":`nano-staged_light`,"nano-staged.mjs":`nano-staged_light`,"netlify.json":`netlify_light`,"netlify.toml":`netlify_light`,"netlify.yaml":`netlify_light`,"netlify.yml":`netlify_light`,"next.config.js":`next_light`,"next.config.mjs":`next_light`,"next.config.mts":`next_light`,"next.config.ts":`next_light`,"now.json":`vercel_light`,"openapi.json":`openapi_light`,"openapi.yaml":`openapi_light`,"openapi.yml":`openapi_light`,"opencode.json":`opencode_light`,"opencode.jsonc":`opencode_light`,"payload.config.js":`payload_light`,"payload.config.mjs":`payload_light`,"payload.config.mts":`payload_light`,"payload.config.ts":`payload_light`,"pnpm-lock.yaml":`pnpm_light`,"pnpm-workspace.yaml":`pnpm_light`,"release.config.cjs":`semantic-release_light`,"release.config.cts":`semantic-release_light`,"release.config.js":`semantic-release_light`,"release.config.json":`semantic-release_light`,"release.config.json5":`semantic-release_light`,"release.config.jsonc":`semantic-release_light`,"release.config.mjs":`semantic-release_light`,"release.config.mts":`semantic-release_light`,"release.config.toml":`semantic-release_light`,"release.config.ts":`semantic-release_light`,"release.config.yaml":`semantic-release_light`,"release.config.yml":`semantic-release_light`,"remix.config.js":`remix_light`,"remix.config.ts":`remix_light`,sconscript:`scons_light`,sconstruct:`scons_light`,scsub:`scons_light`,shellcheckrc:`shellcheck_light`,"snowpack.config.cjs":`snowpack_light`,"snowpack.config.cts":`snowpack_light`,"snowpack.config.js":`snowpack_light`,"snowpack.config.json":`snowpack_light`,"snowpack.config.mjs":`snowpack_light`,"snowpack.config.mts":`snowpack_light`,"snowpack.config.ts":`snowpack_light`,"snowpack.deps.json":`snowpack_light`,"stitches.config.js":`stitches_light`,"stitches.config.ts":`stitches_light`,"stylelint.config.cjs":`stylelint_light`,"stylelint.config.cts":`stylelint_light`,"stylelint.config.js":`stylelint_light`,"stylelint.config.json":`stylelint_light`,"stylelint.config.json5":`stylelint_light`,"stylelint.config.jsonc":`stylelint_light`,"stylelint.config.mjs":`stylelint_light`,"stylelint.config.mts":`stylelint_light`,"stylelint.config.toml":`stylelint_light`,"stylelint.config.ts":`stylelint_light`,"stylelint.config.yaml":`stylelint_light`,"stylelint.config.yml":`stylelint_light`,"turbo.json":`turborepo_light`,"turbo.jsonc":`turborepo_light`,"vercel.json":`vercel_light`,"vercel.ts":`vercel_light`,"warp.md":`warp_light`,"zeabur.json":`zeabur_light`,"zeabur.json5":`zeabur_light`,"zeabur.jsonc":`zeabur_light`,"zeabur.toml":`zeabur_light`,"zeabur.yaml":`zeabur_light`,"zeabur.yml":`zeabur_light`},Ma={".wakatime-project":`wakatime_light`,ai:`adobe-illustrator_light`,ait:`adobe-illustrator_light`,blink:`blink_light`,cr:`crystal_light`,"drone.yml":`drone_light`,ecr:`crystal_light`,fen:`chess_light`,hcl:`hcl_light`,huff:`huff_light`,iuml:`uml_light`,j2:`jinja_light`,jinja:`jinja_light`,"jinja-html":`jinja_light`,jinja2:`jinja_light`,"openapi.json":`openapi_light`,"openapi.yaml":`openapi_light`,"openapi.yml":`openapi_light`,pgn:`chess_light`,plantuml:`uml_light`,psb:`adobe-photoshop_light`,psd:`adobe-photoshop_light`,psdt:`adobe-photoshop_light`,pu:`uml_light`,puml:`uml_light`,tldr:`tldraw_light`,tofu:`opentofu_light`,toml:`toml_light`,verse:`verse_light`,wsd:`uml_light`,zeabur:`zeabur_light`},Na={"-cursor":`folder-cursor_light`,"-idea":`folder-intellij_light`,"-j2":`folder-jinja_light`,"-jinja":`folder-jinja_light`,"-jinja2":`folder-jinja_light`,".cursor":`folder-cursor_light`,".idea":`folder-intellij_light`,".j2":`folder-jinja_light`,".jinja":`folder-jinja_light`,".jinja2":`folder-jinja_light`,__cursor__:`folder-cursor_light`,__idea__:`folder-intellij_light`,__j2__:`folder-jinja_light`,__jinja2__:`folder-jinja_light`,__jinja__:`folder-jinja_light`,_cursor:`folder-cursor_light`,_idea:`folder-intellij_light`,_j2:`folder-jinja_light`,_jinja:`folder-jinja_light`,_jinja2:`folder-jinja_light`,cursor:`folder-cursor_light`,idea:`folder-intellij_light`,j2:`folder-jinja_light`,jinja:`folder-jinja_light`,jinja2:`folder-jinja_light`},Pa={pug:``,just:``,json:``,playwright:``,xml:``,javascript:``,rocket:``,routing:``,settings:``,typedoc:``,"markdoc-config":``,"astro-config":``,visualstudio:``,"go-mod":``,"python-misc":``,ruff:``,uv:``,scons:``,console:``,excalidraw:``,gradle:``,license:``,unlicense:``,key:``,keystatic:``,ruby:``,gemfile:``,rubocop:``,rspec:``,swift:``,docker:``,latexmk:``,email:``,graphql:``,xaml:``,happo:``,chromatic:``,git:``,lua:``,r:``,dart:``,cmake:``,semgrep:``,"vue-config":``,nuxt:``,harmonix:``,lock:``,angular:``,mjml:``,vercel:``,liara:``,verdaccio:``,payload:``,next:``,remark:``,remix:``,laravel:``,vfl:``,kl:``,postcss:``,posthtml:``,todo:``,cabal:``,http:``,graphcool:``,webpack:``,rstack:``,lynx:``,ionic:``,gulp:``,nodejs:``,npm:``,yarn:``,android:``,tune:``,turborepo:``,babel:``,blitz:``,contributing:``,readme:``,changelog:``,architecture:``,credits:``,authors:``,flow:``,favicon:``,karma:``,bithound:``,svgo:``,appveyor:``,travis:``,codecov:``,sonarcloud:``,protractor:``,fusebox:``,heroku:``,editorconfig:``,bower:``,eslint:``,conduct:``,watchman:``,aurelia:``,auto:``,mocha:``,jenkins:``,firebase:``,rollup:``,hack:``,hardhat:``,stylelint:``,"code-climate":``,prettier:``,renovate:``,apollo:``,nodemon:``,webhint:``,browserlist:``,snyk:``,drone:``,opencode:``,sequelize:``,gatsby:``,wakatime:``,circleci:``,cloudfoundry:``,grunt:``,jest:``,fastlane:``,helm:``,wallaby:``,stencil:``,makefile:``,"semantic-release":``,bitbucket:``,bazel:``,"godot-assets":``,"azure-pipelines":``,vagrant:``,prisma:``,istanbul:``,tailwindcss:``,buildkite:``,netlify:``,svelte:``,nest:``,moon:``,percy:``,gitpod:``,stackblitz:``,codeowners:``,gcp:``,amplify:``,husky:``,tilt:``,capacitor:``,adonis:``,meson:``,commitizen:``,commitlint:``,buck:``,nx:``,dune:``,roadmap:``,nuget:``,stryker:``,modernizr:``,slug:``,stitches:``,nginx:``,minecraft:``,replit:``,duc:``,snowpack:``,quasar:``,dependabot:``,vite:``,vitest:``,velite:``,rolldown:``,lerna:``,windicss:``,textlint:``,vlang:``,sentry:``,contentlayer:``,phpunit:``,"php-cs-fixer":``,robots:``,tsconfig:``,tauri:``,jsconfig:``,maven:``,serverless:``,supabase:``,ember:``,horusec:``,poetry:``,pdm:``,parcel:``,astyle:``,lighthouse:``,svgr:``,rome:``,cypress:``,plop:``,tobimake:``,gleam:``,pnpm:``,gridsome:``,steadybit:``,caddy:``,openapi:``,swagger:``,bun:``,"nano-staged":``,knip:``,taskfile:``,craco:``,mercurial:``,deno:``,plastic:``,typst:``,unocss:``,"ifanr-cloud":``,concourse:``,syncpack:``,werf:``,luau:``,wally:``,panda:``,biome:``,esbuild:``,drizzle:``,puppeteer:``,garden:``,pkl:``,kubernetes:``,phpstan:``,screwdriver:``,snapcraft:``,kcl:``,clangd:``,markdownlint:``,trigger:``,deepsource:``,jsr:``,"coderabbit-ai":``,"gemini-ai":``,taze:``,wxt:``,lefthook:``,label:``,zeabur:``,copilot:``,"pre-commit":``,lintstaged:``,histoire:``,installation:``,"github-sponsors":``,"minecraft-fabric":``,umi:``,"pm2-ecosystem":``,hosts:``,citation:``,xmake:``,wrangler:``,cline:``,packship:``,snakemake:``,hadolint:``,tsdoc:``,oxc:``,claude:``,cursor:``,metro:``,bashly:``,google:``,shellcheck:``,warp:``,skill:``,tsdown:``,appwrite:``,expo:``,slint:``,html:``,markdown:``,blink:``,css:``,sass:``,less:``,json_schema:``,hjson:``,jinja:``,proto:``,prompt:``,sublime:``,simulink:``,quarto:``,twine:``,yaml:``,toml:``,toon:``,image:``,palette:``,react:``,react_ts:``,typescript:``,"typescript-def":``,markdoc:``,markojs:``,astro:``,pdf:``,table:``,vscode:``,varnish:``,database:``,kusto:``,csharp:``,qsharp:``,zip:``,vala:``,zig:``,exe:``,hex:``,java:``,jar:``,javaclass:``,c3:``,c:``,h:``,hip:``,cpp:``,hpp:``,"objective-c":``,"objective-cpp":``,rc:``,go:``,python:``,url:``,powershell:``,word:``,certificate:``,font:``,lib:``,bibliography:``,"bibtex-style":``,dll:``,fsharp:``,arduino:``,tex:``,context:``,"doctex-installer":``,bbx:``,cbx:``,lbx:``,powerpoint:``,video:``,virtual:``,vedic:``,audio:``,coffee:``,document:``,lyric:``,rust:``,raml:``,haskell:``,kotlin:``,otne:``,diff:``,clojure:``,groovy:``,dart_generated:``,actionscript:``,mxml:``,autohotkey:``,flash:``,"adobe-swc":``,swc:``,assembly:``,vue:``,ocaml:``,odin:``,onnx:``,"javascript-map":``,"css-map":``,handlebars:``,perl:``,haxe:``,"test-ts":``,"test-jsx":``,"test-js":``,puppet:``,elixir:``,livescript:``,erlang:``,twig:``,julia:``,elm:``,purescript:``,smarty:``,stylus:``,reason:``,bucklescript:``,merlin:``,verilog:``,mathematica:``,wolframlanguage:``,nunjucks:``,robot:``,solidity:``,autoit:``,haml:``,yang:``,terraform:``,opentofu:``,applescript:``,cake:``,cucumber:``,nim:``,apiblueprint:``,riot:``,coldfusion:``,nix:``,slim:``,restql:``,kivy:``,sbt:``,gitlab:``,figma:``,huff:``,crystal:``,cuda:``,log:``,dotjs:``,ejs:``,processing:``,storybook:``,wepy:``,hcl:``,san:``,quokka:``,django:``,red:``,foxpro:``,i18n:``,webassembly:``,jupyter:``,d:``,mdx:``,mdsvex:``,ballerina:``,racket:``,mint:``,velocity:``,godot:``,azure:``,razor:``,abc:``,asciidoc:``,edge:``,scheme:``,lisp:``,"3d":``,svg:``,"adobe-illustrator":``,"adobe-photoshop":``,vim:``,moonscript:``,advpl:``,disc:``,fortran:``,tcl:``,liquid:``,prolog:``,coconut:``,sketch:``,pawn:``,forth:``,uml:``,dhall:``,sml:``,opam:``,imba:``,drawio:``,pascal:``,unity:``,sas:``,command:``,denizenscript:``,search:``,rescript:``,"rescript-interface":``,brainfuck:``,bicep:``,cobol:``,grain:``,lolcode:``,idris:``,pipeline:``,opa:``,scala:``,lilypond:``,chess:``,gemini:``,php:``,ada:``,coala:``,dinophp:``,teal:``,template:``,shader:``,siyuan:``,ndst:``,tobi:``,capnp:``,tree:``,cadence:``,antlr:``,stylable:``,pinejs:``,gamemaker:``,tldraw:``,mermaid:``,mojo:``,roblox:``,rbxmk:``,spwn:``,templ:``,chrome:``,stan:``,abap:``,lottie:``,"apps-script":``,verified:``,bruno:``,cairo:``,"grafana-alloy":``,freemarker:``,tsil:``,hurl:``,cds:``,verse:``,sway:``,"bench-ts":``,"bench-jsx":``,"bench-js":``,controller:``,"dependencies-update":``,subtitles:``,beancount:``,epub:``,regedit:``,gnuplot:``,coloredpetrinets:``,pytorch:``,blender:``,"vanilla-extract":``,toc:``,cue:``,lean:``,salt:``,macaulay2:``,uiua:``,mrpack:``,"folder-rust":``,"folder-robot":``,"folder-src":``,"folder-dist":``,"folder-css":``,"folder-sass":``,"folder-television":``,"folder-desktop":``,"folder-console":``,"folder-images":``,"folder-scripts":``,"folder-node":``,"folder-javascript":``,"folder-json":``,"folder-font":``,"folder-bower":``,"folder-test":``,"folder-directive":``,"folder-jinja":``,"folder-markdown":``,"folder-pdm":``,"folder-php":``,"folder-phpmailer":``,"folder-sublime":``,"folder-docs":``,"folder-gh-workflows":``,"folder-git":``,"folder-github":``,"folder-gitea":``,"folder-gitlab":``,"folder-forgejo":``,"folder-vscode":``,"folder-views":``,"folder-vue":``,"folder-vuepress":``,"folder-expo":``,"folder-config":``,"folder-i18n":``,"folder-components":``,"folder-verdaccio":``,"folder-aurelia":``,"folder-resource":``,"folder-lib":``,"folder-theme":``,"folder-webpack":``,"folder-global":``,"folder-public":``,"folder-include":``,"folder-docker":``,"folder-nginx":``,"folder-astro":``,"folder-database":``,"folder-migrations":``,"folder-log":``,"folder-target":``,"folder-temp":``,"folder-aws":``,"folder-audio":``,"folder-video":``,"folder-kubernetes":``,"folder-import":``,"folder-export":``,"folder-wakatime":``,"folder-circleci":``,"folder-wordpress":``,"folder-gradle":``,"folder-coverage":``,"folder-class":``,"folder-other":``,"folder-lua":``,"folder-turborepo":``,"folder-typescript":``,"folder-graphql":``,"folder-routes":``,"folder-ci":``,"folder-eslint":``,"folder-benchmark":``,"folder-messages":``,"folder-less":``,"folder-gulp":``,"folder-python":``,"folder-r":``,"folder-sandbox":``,"folder-scons":``,"folder-mojo":``,"folder-moon":``,"folder-debug":``,"folder-fastlane":``,"folder-plugin":``,"folder-middleware":``,"folder-controller":``,"folder-ansible":``,"folder-server":``,"folder-client":``,"folder-tasks":``,"folder-android":``,"folder-ios":``,"folder-ui":``,"folder-upload":``,"folder-download":``,"folder-tools":``,"folder-helper":``,"folder-serverless":``,"folder-api":``,"folder-app":``,"folder-apollo":``,"folder-archive":``,"folder-backup":``,"folder-batch":``,"folder-buildkite":``,"folder-cluster":``,"folder-command":``,"folder-constant":``,"folder-container":``,"folder-content":``,"folder-context":``,"folder-core":``,"folder-delta":``,"folder-dump":``,"folder-examples":``,"folder-environment":``,"folder-functions":``,"folder-generator":``,"folder-hook":``,"folder-trigger":``,"folder-job":``,"folder-keys":``,"folder-layout":``,"folder-mail":``,"folder-mappings":``,"folder-meta":``,"folder-changesets":``,"folder-packages":``,"folder-shared":``,"folder-shader":``,"folder-stack":``,"folder-template":``,"folder-utils":``,"folder-supabase":``,"folder-private":``,"folder-linux":``,"folder-windows":``,"folder-macos":``,"folder-error":``,"folder-event":``,"folder-secure":``,"folder-custom":``,"folder-mock":``,"folder-syntax":``,"folder-vm":``,"folder-stylus":``,"folder-flow":``,"folder-rules":``,"folder-review":``,"folder-animation":``,"folder-guard":``,"folder-prisma":``,"folder-pipe":``,"folder-interceptor":``,"folder-svg":``,"folder-nuxt":``,"folder-terraform":``,"folder-mobile":``,"folder-stencil":``,"folder-firebase":``,"folder-firestore":``,"folder-cloud-functions":``,"folder-svelte":``,"folder-update":``,"folder-intellij":``,"folder-azure-pipelines":``,"folder-mjml":``,"folder-admin":``,"folder-jupyter":``,"folder-scala":``,"folder-connection":``,"folder-quasar":``,"folder-next":``,"folder-dal":``,"folder-cobol":``,"folder-yarn":``,"folder-husky":``,"folder-storybook":``,"folder-base":``,"folder-cart":``,"folder-home":``,"folder-project":``,"folder-prompts":``,"folder-interface":``,"folder-netlify":``,"folder-enum":``,"folder-contract":``,"folder-helm":``,"folder-queue":``,"folder-vercel":``,"folder-cypress":``,"folder-decorators":``,"folder-java":``,"folder-resolver":``,"folder-angular":``,"folder-unity":``,"folder-pdf":``,"folder-proto":``,"folder-plastic":``,"folder-gamemaker":``,"folder-mercurial":``,"folder-godot":``,"folder-lottie":``,"folder-taskfile":``,"folder-drizzle":``,"folder-cloudflare":``,"folder-seeders":``,"folder-store":``,"folder-bicep":``,"folder-snapcraft":``,"folder-flutter":``,"folder-snippet":``,"folder-element":``,"folder-src-tauri":``,"folder-favicon":``,"folder-features":``,"folder-lefthook":``,"folder-bloc":``,"folder-powershell":``,"folder-repository":``,"folder-luau":``,"folder-obsidian":``,"folder-trash":``,"folder-cline":``,"folder-liquibase":``,"folder-dart":``,"folder-zeabur":``,"folder-kusto":``,"folder-policy":``,"folder-attachment":``,"folder-bibliography":``,"folder-link":``,"folder-pytorch":``,"folder-blender":``,"folder-atom":``,"folder-molecule":``,"folder-organism":``,"folder-claude":``,"folder-cursor":``,"folder-gemini-ai":``,"folder-opencode":``,"folder-input":``,"folder-salt":``,"folder-simulations":``,"folder-metro":``,"folder-filter":``,"folder-toc":``,"folder-cue":``,"folder-license":``,"folder-form":``,"folder-postman":``,"folder-skills":``,"folder-zed":``,"folder-appwrite":``,"folder-assembly":``,"folder-go":``,"folder-kotlin":``,file:``,folder:``,scons_light:``,rubocop_light:``,vercel_light:``,payload_light:``,next_light:``,remix_light:``,turborepo_light:``,auto_light:``,stylelint_light:``,"code-climate_light":``,browserlist_light:``,drone_light:``,opencode_light:``,wakatime_light:``,circleci_light:``,"semantic-release_light":``,netlify_light:``,stitches_light:``,snowpack_light:``,pnpm_light:``,openapi_light:``,bun_light:``,"nano-staged_light":``,deno_light:``,jsr_light:``,zeabur_light:``,copilot_light:``,hosts_light:``,cursor_light:``,shellcheck_light:``,warp_light:``,expo_light:``,blink_light:``,jinja_light:``,toml_light:``,opentofu_light:``,huff_light:``,crystal_light:``,hcl_light:``,"adobe-illustrator_light":``,"adobe-photoshop_light":``,uml_light:``,chess_light:``,tldraw_light:``,verse_light:``,"folder-jinja_light":``,"folder-intellij_light":``,"folder-cursor_light":``};function Fa(e,t){return Object.hasOwn(e,t)}function Ia(e,t,n,r){let i=e[n];return!r||!Fa(t,n)?i:t[n]}function La(){return typeof window<`u`&&typeof window.matchMedia!=`function`?!1:!Da().value}function Ra(e,t){let n=e.toLowerCase();if(Fa(Oa,e))return Ia(Oa,ja,e,t);if(Fa(Oa,n))return Ia(Oa,ja,n,t)}function za(e,t){let n=e.toLowerCase().split(`.`);for(let e=1;ee.length>0).at(-1)??e}function Ha(e){return e.replaceAll(/\s(?:width|height)="[^"]*"/g,``).replace(/^
-
`};let c=/^\[(\d+)\]/,l=/^\[([^\]\n]+)\]/,u=e=>{if(!e.startsWith(`[`))return!1;let t=l.exec(e);if(!t)return e!==`[`&&!/^\[\d+$/.test(e);let n=String(t[1]??``);return e.slice(t[0].length).startsWith(`(`)?!1:!/^\d+$/.test(n)};n.inline.ruler.before(`escape`,`reference`,(e,t)=>{let n=e;if(n.src[n.pos]!==`[`)return!1;let r=c.exec(n.src.slice(n.pos));if(!r)return!1;let i=n.src.slice(Math.max(0,n.pos-120),n.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(i))return!1;let a=n.src.slice(n.pos+r[0].length);if(a.startsWith(`](`)||a.startsWith(`(`)||u(a))return!1;if(!t){let e=r[1],t=n.push(`reference`,`span`,0);t.content=e,t.markup=r[0],t.raw=r[0]}return n.pos+=r[0].length,!0}),n.renderer.rules.reference=(e,t)=>{let n=String(e[t].content??``);return`${n}`};let d=n.use.bind(n);return n.use=((...e)=>(r.__markstreamHasCustomParserExtensions=!0,d(...e))),n}function YK({nextContent:e,previousContent:t,typewriterEnabled:n}){return!n||e===t?{settledContent:e,streamedDelta:``,appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:``,appended:!1}}function XK({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:r,streamRenderVersionChanged:i=!1}){let a=`${n.settledContent}${n.streamedDelta}`;return r?n.streamedDelta&&a===e?i?{settledContent:a,streamedDelta:``,appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:YK({nextContent:e,previousContent:t??a,typewriterEnabled:r}):{settledContent:e,streamedDelta:``,appended:!1}}var ZK={plain:`plaintext`,text:`plaintext`,txt:`plaintext`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,mts:`typescript`,cts:`typescript`,golang:`go`,py:`python`,rb:`ruby`,rs:`rust`,kt:`kotlin`,kts:`kotlin`,md:`markdown`,yml:`yaml`,sh:`shellscript`,bash:`shellscript`,zsh:`shellscript`,shell:`shellscript`,shellscript:`shellscript`,ps:`powershell`,ps1:`powershell`,pwsh:`powershell`,"c++":`cpp`,"c#":`csharp`,cs:`csharp`,objc:`objective-c`,objectivec:`objective-c`,"objective-c":`objective-c`,objectivecpp:`objective-cpp`,"objective-c++":`objective-cpp`,"objective-cpp":`objective-cpp`};function QK(e){let t=String(e??``).trim();if(!t)return``;let[n=``]=t.split(/\s+/);return n.split(`:`)[0]?.trim().toLowerCase()??``}function $K(e){let t=QK(e);return ZK[t]??t}function eq(e){if(!Array.isArray(e))return;let t=e.filter(e=>typeof e==`string`).map(e=>$K(e)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function tq(e){if(!Array.isArray(e))return;let t=[],n=new Set;for(let r of e){if(typeof r!=`string`)continue;let e=r.trim();!e||n.has(e)||(n.add(e),t.push(e))}return t.length>0?t:void 0}function nq(e){return tq(e)?.join(`\0`)??``}function rq(e,t){return`${nq(e)}\u0000\u0000${eq(t)?.join(`\0`)??``}`}function iq(e,t,n=1){let r=Number(e);return Number.isFinite(r)?Math.max(n,r):t}function aq(e,t){let n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var oq=class{constructor(e={},t){this.source=``,this.visible=``,this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=e=>this.destroyed?()=>{}:(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.enqueue=e=>{if(this.destroyed||!e)return;this.done&&=!1;let t=this.source.length>0,n=this.pendingChars<=0;if(this.source+=e,n){let e=uq();this.startedAt=t&&this.hasStarted?e-this.normalizedStartDelayMs:e,this.lastTick=e,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(e={})=>{if(!this.destroyed){if(this.done=!0,e.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(e=``)=>{this.destroyed||(this.cancelLoop(),this.source=e,this.visible=e,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;let e=uq();this.lastTick=e,this.startedAt||=e,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=e=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(e-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,a=dq(r/Math.max(.001,i/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(a-this.currentCps)*.2,this.charBudget+=this.currentCps*(n/1e3),this.charBudget<1){this.ensureLoop();return}let o=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),s=lq(this.source.slice(this.visible.length),o,this.segmenter);s.text&&(this.visible+=s.text,this.charBudget=Math.max(0,this.charBudget-s.graphemeCount),this.emit()),this.ensureLoop()};let{minCharsPerSecond:n=40,maxCharsPerSecond:r=1e3,targetLatencyMs:i=900,catchUpLatencyMs:a=350,catchUpThreshold:o=600,maxCommitFps:s=30,startDelayMs:c=80,maxCharsPerCommit:l=80,flushOnFinish:u=!1}=e;this.minCharsPerSecond=iq(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,iq(r,1e3,1)),this.normalizedTargetLatencyMs=iq(i,900,1),this.normalizedCatchUpLatencyMs=iq(a,350,1),this.normalizedCatchUpThreshold=aq(o,600),this.normalizedStartDelayMs=aq(c,80),this.maxCommitFps=Math.trunc(iq(s,30,1)),this.maxCharsPerCommit=Math.trunc(iq(l,80,1)),this.flushOnFinish=u,this.segmenter=cq(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!=`function`){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&=(typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(this.rafId),0)}emit(){if(!this.destroyed)for(let e of this.listeners)e()}};function sq(e={},t){let n=new oq(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function cq(){if(typeof Intl>`u`)return null;let e=Intl.Segmenter;return e?new e(void 0,{granularity:`grapheme`}):null}function lq(e,t,n){if(!e||t<=0)return{text:``,graphemeCount:0};if(!n){let n=Array.from(e).slice(0,t);return{text:n.join(``),graphemeCount:n.length}}let r=``,i=0;for(let a of n.segment(e)){if(i>=t)break;r+=a.segment,i++}return{text:r,graphemeCount:i}}function uq(){return typeof performance<`u`?performance.now():Date.now()}function dq(e,t,n){return Math.min(n,Math.max(t,e))}var fq=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),pq=Symbol.for(`markstream-vue:node-lifecycle`);function mq(){}var hq=new Map,gq=`material`,_q=new Map,vq=new Map,yq=null;function bq(e){hq.set(e.id,e)}function xq(e){let t=hq.get(gq);if(!t)return;let n=t.core[e];if(n)return n;let r=_q.get(t.id);if(r){let t=r[e];if(t)return t}t.loadExtended&&!_q.has(t.id)&&Cq(t)}function Sq(){return hq.get(gq)?.fallback??``}function Cq(e){return fq(this,null,function*(){if(_q.has(e.id))return _q.get(e.id)??null;let t=vq.get(e.id);return t||(t=(e.loadExtended?.call(e)??Promise.resolve(null)).then(t=>(_q.set(e.id,t),yq?.(),t)).catch(()=>(_q.set(e.id,null),null)),vq.set(e.id,t)),t})}var wq=``,Tq=``,Eq={id:`material`,core:{"":Tq,plain:``,text:Tq,javascript:``,typescript:``,jsx:``,tsx:``,html:``,css:``,scss:``,json:``,python:``,ruby:``,go:``,java:``,kotlin:``,c:``,cpp:``,cs:wq,csharp:wq,php:``,shell:``,powershell:``,sql:``,yaml:``,markdown:``,xml:``,rust:``,vue:``,mermaid:``},fallback:``,loadExtended:()=>he(()=>import(`./extended-BP0HZdSW.js`).then(e=>e.materialExtendedMap),[])},Dq=null,Oq=ue(0);yq=()=>{Oq.value++},bq(Eq);var kq={"":``,javascript:`javascript`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,typescript:`typescript`,ts:`typescript`,jsx:`jsx`,tsx:`tsx`,golang:`go`,py:`python`,rb:`ruby`,sh:`shell`,bash:`shell`,zsh:`shell`,shellscript:`shell`,bat:`shell`,batch:`shell`,ps1:`powershell`,plaintext:`plain`,text:`plain`,txt:`plain`,"c++":`cpp`,"c#":`csharp`,cs:`csharp`,"objective-c":`objectivec`,"objective-c++":`objectivecpp`,yml:`yaml`,md:`markdown`,rs:`rust`,kt:`kotlin`};function Aq(e){let t=function(e){if(!e)return``;let t=e.trim();if(!t)return``;let[n]=t.split(/\s+/),[r]=n.split(`:`);return r.toLowerCase()}(e);return kq[t]??t}function jq(e){let t=Aq(e);if(!t)return`plaintext`;switch(t){case`plain`:return`plaintext`;case`jsx`:return`javascript`;case`tsx`:return`typescript`;case`objectivec`:return`objective-c`;case`objectivecpp`:return`objective-cpp`;default:return t}}function Mq(e){if(Dq){let t=Dq(e);if(t!=null&&t!==``)return t}return xq(Aq(e))||Sq()}var Nq={js:`JavaScript`,javascript:`JavaScript`,ts:`TypeScript`,jsx:`JSX`,tsx:`TSX`,html:`HTML`,css:`CSS`,scss:`SCSS`,json:`JSON`,py:`Python`,python:`Python`,rb:`Ruby`,go:`Go`,java:`Java`,c:`C`,cpp:`C++`,cs:`C#`,csharp:`C#`,php:`PHP`,sh:`Shell`,bash:`Bash`,sql:`SQL`,yaml:`YAML`,md:`Markdown`,d2:`D2`,d2lang:`D2`,"":`Plain Text`,plain:`Plain Text`},Pq=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Fq=null,Iq=!1,Lq=null,Rq=Vq;function zq(e){let t=e?.default??e;return t&&typeof t.renderToString==`function`?t:null}function Bq(){try{return zq(globalThis?.katex)}catch{return null}}function Vq(){return Pq(null,null,function*(){let e=Bq();if(e)return e;let t=yield he(()=>import(`./katex-BMCG0xok.js`),[]);try{yield he(()=>import(`./mhchem-CCsrOXlE.js`),__vite__mapDeps([4,5]))}catch{}return zq(t)})}function Hq(e){let t=Promise.resolve(e).then(e=>Lq===t&&e?(Fq=zq(e)??e,Fq):null).catch(()=>null).finally(()=>{Lq===t&&(Lq=null)});return Lq=t,Iq=!0,t}function Uq(e){Rq=e,Fq=null,Iq=!1,Lq=null}function Wq(e){Uq(e??Vq)}function Gq(){return typeof Rq==`function`}function Kq(){let e=Rq;if(!e||e===Vq)return null;if(Fq)return Fq;let t=Bq();if(t)return Fq=t,Fq;if(Iq)return null;try{let t=e();return t?typeof t?.then==`function`?(Hq(t),null):(Fq=zq(t)??t,Fq):null}catch{return null}}function qq(){return Pq(this,null,function*(){let e=Bq();if(e)return Fq=e,Fq;if(Fq)return Fq;if(Lq)return Lq;if(Iq)return null;let t=Rq;if(!t)return Iq=!0,null;try{let e=t();if(typeof e?.then==`function`)return Hq(e);if(e)return Fq=zq(e)??e,Iq=!0,Fq}catch{}return Iq=!0,null})}function Jq(e){return e?e.replace(/·/g,`⋅`).replace(/℃/g,`°C`):``}var Yq=null,Xq=null,Zq=new Map,Qq=new Map,$q=5,eJ=new Set;function tJ(){if(Zq.size<$q&&eJ.size){let e=$q-Zq.size;for(let t of Array.from(eJ)){if(e<=0)break;eJ.delete(t),e--;try{t()}catch{}}}}function nJ(){for(let e of Array.from(eJ)){eJ.delete(e);try{e()}catch{}}}function rJ(e){Yq=e,Xq=null,Yq.onmessage=e=>{let{id:t,html:n,error:r}=e.data,i=Zq.get(t);if(i)if(Zq.delete(t),clearTimeout(i.timeoutId),i.cleanup(),tJ(),r)i.aborted||i.reject(Error(r));else{let{content:t,displayMode:r}=e.data;if(t){let e=`${r?`d`:`i`}:${t}`;if(Qq.set(e,n),Qq.size>200){let e=Qq.keys().next().value;Qq.delete(e)}}i.aborted||i.resolve(n)}},Yq.onerror=e=>{console.error(`[katexWorkerClient] Worker error:`,e);for(let[t,n]of Zq.entries())clearTimeout(n.timeoutId),n.cleanup(),n.aborted||n.reject(Error(`Worker error: ${e.message}`));Zq.clear(),nJ()}}function iJ(){var e;for(let e of Zq.values())clearTimeout(e.timeoutId),e.cleanup(),e.aborted||e.reject(Error(`Worker cleared`));Zq.clear(),nJ(),Yq&&((e=Yq.terminate)==null||e.call(Yq)),Yq=null,Xq=null}function aJ(e,t=!0,n=2e3,r){return Pq(this,null,function*(){performance.now();let i=Jq(e);if(!Gq()){let e=Error(`KaTeX rendering disabled`);return e.name=`KaTeXDisabled`,e.code=`KATEX_DISABLED`,Promise.reject(e)}if(Xq)return Promise.reject(Xq);let a=`${t?`d`:`i`}:${i}`,o=Qq.get(a);if(o)return tJ(),Promise.resolve(o);let s=Yq||(Xq=Error(`[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker().`),Xq.name=`WorkerInitError`,Xq.code=`WORKER_INIT_ERROR`,null);if(!s)return Promise.reject(Xq);if(Zq.size>=$q){let e=Error(`Worker busy`);return e.name=`WorkerBusy`,e.code=`WORKER_BUSY`,e.busy=!0,e.inFlight=Zq.size,e.max=$q,Promise.reject(e)}return new Promise((e,a)=>{if(r?.aborted){let e=Error(`Aborted`);e.name=`AbortError`,a(e);return}let o=Math.random().toString(36).slice(2),c=null,l=globalThis.setTimeout(()=>{let e=Zq.get(o);if(!e)return;Zq.delete(o),e.cleanup();let t=Error(`Worker render timed out`);t.name=`WorkerTimeout`,t.code=`WORKER_TIMEOUT`,e.aborted||e.reject(t),tJ()},n);c=()=>{let e=Zq.get(o);if(!e||e.aborted)return;e.aborted=!0,e.cleanup();let t=Error(`Aborted`);t.name=`AbortError`,a(t)},r&&r.addEventListener(`abort`,c,{once:!0});let u=e,d=a;Zq.set(o,{resolve:e=>{u(e)},reject:e=>{d(e)},timeoutId:l,aborted:!1,cleanup:()=>{r&&c&&r.removeEventListener(`abort`,c),c=null}});try{s.postMessage({id:o,content:i,displayMode:t})}catch(e){let t=Zq.get(o);Zq.delete(o),clearTimeout(l),t?.cleanup(),t?.reject(e),tJ()}})})}function oJ(e,t=!0,n){let r=`${t?`d`:`i`}:${Jq(e)}`;if(Qq.set(r,n),Qq.size>200){let e=Qq.keys().next().value;Qq.delete(e)}}var sJ=`WORKER_BUSY`;function cJ(e=2e3,t){return Zq.size<$q?Promise.resolve():new Promise((n,r)=>{let i,a=!1,o=null,s=()=>{},c=()=>{i&&globalThis.clearTimeout(i),eJ.delete(s),t&&o&&t.removeEventListener(`abort`,o),o=null};s=()=>{a||(a=!0,c(),n())},eJ.add(s),i=globalThis.setTimeout(()=>{if(a)return;a=!0,c();let e=Error(`Wait for worker slot timed out`);e.name=`WorkerBusyTimeout`,e.code=`WORKER_BUSY_TIMEOUT`,r(e)},e),queueMicrotask(()=>tJ()),t&&(o=()=>{if(a)return;a=!0,c();let e=Error(`Aborted`);e.name=`AbortError`,r(e)},t.aborted?o():t.addEventListener(`abort`,o,{once:!0}))})}var lJ={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function uJ(e){return Pq(this,arguments,function*(e,t=!0,n={}){if(!Gq()){let e=Error(`KaTeX rendering disabled`);throw e.name=`KaTeXDisabled`,e.code=`KATEX_DISABLED`,e}let r=n.timeout??lJ.timeout,i=n.waitTimeout??lJ.waitTimeout,a=n.backoffMs??lJ.backoffMs,o=n.maxRetries??lJ.maxRetries,s=Number.isFinite(o)?Math.max(0,Math.min(Math.floor(o),8)):lJ.maxRetries,c=n.signal,l=0;for(;;){if(c?.aborted){let e=Error(`Aborted`);throw e.name=`AbortError`,e}try{return yield aJ(e,t,r,c)}catch(e){if(e?.code!==`WORKER_BUSY`||l>=s)throw e;if(l++,yield cJ(i,c).catch(()=>{}),c?.aborted){let e=Error(`Aborted`);throw e.name=`AbortError`,e}a>0&&(yield new Promise(e=>globalThis.setTimeout(e,a*l)))}}})}function dJ(e){let t=typeof e==`number`?e:Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:null}function fJ(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!(!e||e.startsWith(`%%`)))return(e.match(/^([A-Z][\w-]*)\b/i)?.[1])?.toLowerCase()||``}return``}function pJ(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith(`%%`)),n=Math.max(1,t.length),r=fJ(e);return r===`gantt`?220+28*n:r===`sequencediagram`?180+26*n:r===`classdiagram`||r===`statediagram`||r===`erdiagram`?180+24*n:r===`flowchart`||r===`graph`?170+28*n:200+22*n}function mJ(e){let t=e.split(/\r?\n/).filter(e=>/^\s*-\s+/.test(e)).length;return t>=3?500:t>0?280+60*t:360}function hJ(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function gJ(e,t=360,n=500){return hJ(e,t,n)}function _J(e,t=360,n=500){return hJ(e,t,n)}var vJ=Object.defineProperty,yJ=Object.defineProperties,bJ=Object.getOwnPropertyDescriptors,xJ=Object.getOwnPropertySymbols,SJ=Object.prototype.hasOwnProperty,CJ=Object.prototype.propertyIsEnumerable,wJ=(e,t,n)=>t in e?vJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TJ=(e,t)=>{for(var n in t||={})SJ.call(t,n)&&wJ(e,n,t[n]);if(xJ)for(var n of xJ(t))CJ.call(t,n)&&wJ(e,n,t[n]);return e},EJ=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),DJ=()=>he(()=>import(`./mermaid.core-Ddyah3MZ.js`),__vite__mapDeps([6,7,8,9,2,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])),OJ=null,kJ=DJ,AJ=null,jJ=!1,MJ=!1,NJ=0;function PJ(e){kJ=e,NJ++,OJ=null,AJ=null,jJ=!1,MJ=!1}function FJ(e){PJ(e??DJ)}function IJ(){return typeof kJ==`function`}function LJ(e){if(!e)return e;let t=e&&e.default?e.default:e;if(t&&(typeof t.render==`function`||typeof t.parse==`function`||typeof t.initialize==`function`))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render==`function`||typeof t.mermaidAPI.parse==`function`)){let e=t.mermaidAPI;return n=TJ({},t),r={render:e.render.bind(e),parse:e.parse?e.parse.bind(e):void 0,initialize:n=>typeof t.initialize==`function`?t.initialize(n):e.initialize?e.initialize(n):void 0},yJ(n,bJ(r))}var n,r;return e.mermaid&&typeof e.mermaid.render==`function`?e.mermaid:t}function RJ(e){if(e)try{let t=e?.initialize;e.initialize=n=>{let r=TJ({suppressErrorRendering:!0},n||{});return typeof t==`function`?t.call(e,r):e?.mermaidAPI&&typeof e.mermaidAPI.initialize==`function`?e.mermaidAPI.initialize(r):void 0}}catch{}}function zJ(){return EJ(this,null,function*(){if(OJ)return OJ;let e=function(){try{return LJ(globalThis?.mermaid)}catch{return null}}();if(e)return OJ=e,RJ(OJ),OJ;let t=kJ,n=NJ;return t?t===DJ&&jJ?null:AJ||(AJ=EJ(null,null,function*(){let e;try{e=yield t()}catch(e){if(t===DJ)return n===NJ&&t===kJ&&(jJ=!0,function(e){MJ||(MJ=!0,console.warn(`[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.`,e))}(e)),null;throw e}finally{n===NJ&&t===kJ&&(AJ=null)}return n!==NJ||t!==kJ?null:e?(OJ=LJ(e),RJ(OJ),OJ):null}),AJ):null})}var BJ=null,VJ=null,HJ=new Map,UJ=new Map;function WJ(e){for(let t of HJ.values())t.reject(e);HJ.clear(),UJ.clear()}var GJ=5,KJ=!1,qJ=`MERMAID_DISABLED`;function JJ(e){if(BJ&&BJ!==e){let e=Error(`Worker replaced`);e.code=`WORKER_REPLACED`,WJ(e)}BJ=e,VJ=null;let t=e;BJ.onmessage=e=>{if(BJ!==t)return;let{id:n,ok:r,result:i,error:a}=e.data,o=HJ.get(n);o&&(!1===r||a?o.reject(Error(a||`Unknown error`)):o.resolve(i))},BJ.onerror=e=>{var n,r;if(BJ===t)if(HJ.size!==0){try{KJ?console.error(`[mermaidWorkerClient] Worker error:`,e?.message||e):(r=console.debug)==null||r.call(console,`[mermaidWorkerClient] Worker error:`,e?.message||e)}catch{}WJ(Error(`Worker error: ${e.message}`))}else (n=console.debug)==null||n.call(console,`[mermaidWorkerClient] Worker error (no pending):`,e?.message||e)},BJ.onmessageerror=e=>{var n,r;if(BJ===t)if(HJ.size!==0){try{KJ?console.error(`[mermaidWorkerClient] Worker messageerror:`,e):(r=console.debug)==null||r.call(console,`[mermaidWorkerClient] Worker messageerror:`,e)}catch{}WJ(Error(`Worker messageerror`))}else (n=console.debug)==null||n.call(console,`[mermaidWorkerClient] Worker messageerror (no pending):`,e)}}function YJ(){var e;if(BJ)try{WJ(Error(`Worker cleared`)),(e=BJ.terminate)==null||e.call(BJ)}catch{}BJ=null,VJ=null}function XJ(e,t,n,r){if(!IJ()){let e=Error(`Mermaid rendering disabled`);return e.name=`MermaidDisabled`,e.code=qJ,Promise.reject(e)}let i=`${e}\0${t.theme}\0${n}\0${t.code}`,a=UJ.get(i);return a||(a=function(e,t,n=1400){if(!IJ()){let e=Error(`Mermaid rendering disabled`);return e.name=`MermaidDisabled`,e.code=`MERMAID_DISABLED`,Promise.reject(e)}if(VJ)return Promise.reject(VJ);let r=BJ||(VJ=Error(`[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker().`),VJ.name=`WorkerInitError`,VJ.code=`WORKER_INIT_ERROR`,null);if(!r)return Promise.reject(VJ);if(HJ.size>=GJ){let e=Error(`Worker busy`);return e.name=`WorkerBusy`,e.code=`WORKER_BUSY`,e.inFlight=HJ.size,e.max=GJ,Promise.reject(e)}return new Promise((i,a)=>{let o=Math.random().toString(36).slice(2),s,c=!1,l=()=>{c||(c=!0,s!=null&&globalThis.clearTimeout(s),HJ.delete(o))};HJ.set(o,{resolve:e=>{l(),i(e)},reject:e=>{l(),a(e)}});try{r.postMessage({id:o,action:e,payload:t})}catch(e){HJ.delete(o),a(e);return}s=globalThis.setTimeout(()=>{let e=Error(`Worker call timed out`);e.name=`WorkerTimeout`,e.code=`WORKER_TIMEOUT`;let t=HJ.get(o);t&&t.reject(e)},n)})}(e,t,n),UJ.set(i,a),a.then(()=>{UJ.get(i)===a&&UJ.delete(i)},()=>{UJ.get(i)===a&&UJ.delete(i)})),function(e,t){if(!t)return e;if(t.aborted){let e=Error(`Aborted`);return e.name=`AbortError`,Promise.reject(e)}return new Promise((n,r)=>{let i=()=>{},a=()=>t.removeEventListener(`abort`,i);i=()=>{a();let e=Error(`Aborted`);e.name=`AbortError`,r(e)},t.addEventListener(`abort`,i,{once:!0}),e.then(e=>{a(),n(e)},e=>{a(),r(e)})})}(a,r)}function ZJ(e,t,n=1400,r){return XJ(`canParse`,{code:e,theme:t},n,r)}function QJ(e,t,n=1400,r){return XJ(`findPrefix`,{code:e,theme:t},n,r)}function $J(e){try{if(typeof globalThis<`u`&&typeof globalThis.requestAnimationFrame==`function`)return globalThis.requestAnimationFrame(e)}catch{}return globalThis.setTimeout(e,0)}function eY(e){try{if(e==null)return;if(typeof globalThis<`u`&&typeof globalThis.cancelAnimationFrame==`function`)return void globalThis.cancelAnimationFrame(e)}catch{}try{globalThis.clearTimeout(e)}catch{}}var tY=Object.defineProperty,nY=Object.defineProperties,rY=Object.getOwnPropertyDescriptors,iY=Object.getOwnPropertySymbols,aY=Object.prototype.hasOwnProperty,oY=Object.prototype.propertyIsEnumerable,sY=(e,t,n)=>t in e?tY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cY=(e,t)=>{for(var n in t||={})aY.call(t,n)&&sY(e,n,t[n]);if(iY)for(var n of iY(t))oY.call(t,n)&&sY(e,n,t[n]);return e},lY=(e,t)=>nY(e,rY(t)),uY=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),dY=`__global__`,fY=`__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__`,pY=(()=>{let e=globalThis;if(e[fY])return e[fY];let t={scopedCustomComponents:{},revision:ue(0)};return e[fY]=t,t})(),mY=pY.revision,hY=Symbol(`markstreamCustomComponents`),gY=new Set(`text.paragraph.heading.code_block.list.list_item.blockquote.table.table_row.table_cell.definition_list.definition_item.footnote.footnote_reference.footnote_anchor.admonition.hardbreak.link.image.thematic_break.math_inline.math_block.strong.emphasis.strikethrough.highlight.insert.subscript.superscript.emoji.checkbox.checkbox_input.inline_code.html_inline.html_block.reference.mermaid.infographic.d2.vmr_container`.split(`.`));function _Y(e){return gY.has(String(e).trim().toLowerCase())}function vY(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/[_\s]+/g,`-`).toLowerCase()}function yY(e={}){let t={};for(let[n,r]of Object.entries(e))if(r!=null){t[n]=r;for(let e of new Set([xL(n),xL(vY(n))]))!e||_Y(e)||Object.prototype.hasOwnProperty.call(t,e)||(t[e]=r)}return t}function bY(e){let t=m(hY,null);return L(()=>(mY.value,function(e,t={}){return mY.value,cY(cY(cY({},yY(pY.scopedCustomComponents[dY]||{})),yY(t)),yY(function(e){return e&&pY.scopedCustomComponents[e]||{}}(e)))}(e?.(),t?.value??{})))}var xY=[`aria-label`],SY={key:0,xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,class:`checkbox-icon checkbox-unchecked`},CY={key:1,xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,class:`checkbox-icon checkbox-checked`},wY=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},TY=wY(G({__name:`CheckboxNode`,props:{node:{}},setup:e=>(t,n)=>(c(),W(`span`,{class:`checkbox-node`,role:`img`,"aria-label":e.node.checked?`checked`:`unchecked`},[e.node.checked?(c(),W(`svg`,CY,[...n[1]||=[F(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`4`,fill:`currentColor`},null,-1),F(`path`,{d:`M9 12l2 2 4-4`,stroke:`hsl(var(--ms-background))`,"stroke-width":`2.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1)]])):(c(),W(`svg`,SY,[...n[0]||=[F(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`4`,stroke:`currentColor`,"stroke-width":`2`},null,-1)]]))],8,xY))}),[[`__scopeId`,`data-v-be21ab83`]]);TY.install=e=>{e.component(TY.__name,TY)};var EY={class:`emoji-node`},DY=wY(G({__name:`EmojiNode`,props:{node:{}},setup:e=>(t,n)=>(c(),W(`span`,EY,U(e.node.name),1))}),[[`__scopeId`,`data-v-de55dc97`]]);DY.install=e=>{e.component(DY.__name,DY)};var OY=[`id`],kY=[`title`],AY=wY(G({__name:`FootnoteReferenceNode`,props:{node:{}},setup(e){let t=`#fnref--${e.node.id}`;function n(){if(typeof document>`u`)return;let e=document.querySelector(t);e?e.scrollIntoView({behavior:`smooth`}):console.warn(`Element with href: ${t} not found`)}return(r,i)=>(c(),W(`sup`,{id:`fnref-${e.node.id}`,class:`footnote-reference`,onClick:n},[F(`span`,{href:t,title:`查看脚注 ${e.node.id}`,class:`footnote-link cursor-pointer`},`[`+U(e.node.id)+`]`,9,kY)],8,OY))}}),[[`__scopeId`,`data-v-c1463a29`]]);AY.install=e=>{e.component(AY.__name,AY)};var jY=(()=>{try{return!1}catch{}return!1})();function MY(e){jY&&console.warn(e)}function NY(e,t=`safe`,n){return uK(e,t,n)}function PY(e){return mK(e)}function FY(e){return!0===e?``:!1===e?`false`:e==null?null:String(e)}function IY(e,t=`safe`){let n=String(e.tag||e.type||``).trim(),r=fK((i=e.attrs)?Array.isArray(i)?i.every(Array.isArray)?i.map(([e,t])=>[String(e),FY(t)]):i.filter(e=>e&&typeof e==`object`&&!Array.isArray(e)&&`name`in e).map(e=>[String(e.name),FY(e.value)]):Object.entries(i).map(([e,t])=>[e,FY(t)]):null,t,n);var i;if(!r)return;let a=PY(dK(r));return Object.keys(a).length>0?a:void 0}function LY(e,t,n=!1){let r=Object.entries(t??{}),i=r.length>0?r.map(([e,t])=>t===``?` ${e}`:` ${e}="${t}"`).join(``):``;return n?`<${e}${i} />`:`<${e}${i}>`}function RY(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function zY(e,t,n,r,i,o,s=!1){let c=function(e,t){return lK(e,t)}(e,r);if(JI.has(e.toLowerCase())||!c&&tK(e,o))return null;if(!c&&eK(e,o))return s?[LY(e,t,!0)]:[LY(e,t),...n,``];let l=uK(t,o,e),u=l.key,d=u!=null&&u!==``?u:i;return c?a(r[e]||r[e.toLowerCase()],lY(cY({},PY(l)),{key:d}),n.length>0?n:void 0):a(e,lY(cY({},l),{innerHTML:void 0,key:d}),n.length>0?n:void 0)}function BY(e,t){return yK(e,t)}function VY(e,t,n=`safe`){if(!e)return[];try{return function(e,t,n=`safe`){let r=0,i=[],a=[];for(let o of e)if(o.type===`text`)(i.length>0?i[i.length-1].children:a).push(o.content);else if(o.type===`self_closing`){let e=zY(o.tagName,o.attrs||{},[],t,`ms-html-`+ r++,n,!0);RY(i.length>0?i[i.length-1].children:a,e)}else if(o.type===`tag_open`)i.push({tagName:o.tagName,children:[],attrs:o.attrs,autoKey:`ms-html-`+ r++});else if(o.type===`tag_close`){let e=o.tagName.toLowerCase(),r=-1;for(let t=i.length-1;t>=0;t--)if(i[t].tagName.toLowerCase()===e){r=t;break}if(r!==-1)for(;i.length>r;){let o=i.pop(),s=zY(o.tagName,o.attrs||{},o.children,t,o.autoKey,n);i.length>0?RY(i[i.length-1].children,s):RY(a,s),o.tagName.toLowerCase()!==e&&i.length>r&&MY(`Auto-closing unclosed tag: <${o.tagName}>`)}else MY(`Ignoring closing tag with no matching opening tag: `)}for(;i.length>0;){let e=i.pop(),r=zY(e.tagName,e.attrs||{},e.children,t,e.autoKey,n);i.length>0?RY(i[i.length-1].children,r):RY(a,r),MY(`Auto-closing unclosed tag: <${e.tagName}>`)}return a}(gK(e),t,n)}catch(e){return r=e,jY&&console.error(`Failed to parse HTML to VNodes:`,r),null}var r}var HY=[`innerHTML`],UY=wY(G({__name:`HtmlInlineNode`,props:{node:{},customId:{},htmlPolicy:{}},setup(e){let t=e,n=m(`markstreamHtmlPolicy`,void 0),r=L(()=>t.htmlPolicy??n?.value??`safe`),i=bY(()=>t.customId),a=G({name:`DynamicRenderer`,props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),o=L(()=>{let e=t.node.content;if(!e)return{mode:`html`,content:``};if(r.value===`escape`)return{mode:`html`,content:bK(e,r.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:`text`,content:e};if(t.node.loading&&t.node.autoClosed){let t=VY(e,i.value,r.value);if(t!==null)return{mode:`dynamic`,nodes:t}}if(!BY(e,i.value))return{mode:`html`,content:bK(e,r.value)};let n=VY(e,i.value,r.value);return n===null?{mode:`html`,content:bK(e,r.value)}:{mode:`dynamic`,nodes:n}});return(e,n)=>o.value.mode===`dynamic`?(c(),W(`span`,{key:0,class:V([`html-inline-node`,{"html-inline-node--loading":t.node.loading}])},[v(z(a),{nodes:o.value.nodes},null,8,[`nodes`])],2)):o.value.mode===`text`?(c(),W(`span`,{key:1,class:V([`html-inline-node`,{"html-inline-node--loading":t.node.loading}])},U(o.value.content),3)):(c(),W(`span`,{key:2,class:V([`html-inline-node`,{"html-inline-node--loading":t.node.loading}]),innerHTML:o.value.content},null,10,HY))}}),[[`__scopeId`,`data-v-d17f12b0`]]);UY.install=e=>{e.component(UY.__name,UY)};var WY={class:`inline-code`},GY={key:0},KY=wY(G({__name:`InlineCodeNode`,props:{node:{}},setup(e){let n=e,r=b(),i=m(`markstreamFade`,void 0),a=m(`markstreamTextStreamState`,void 0),o=m(`markstreamStreamVersion`,void 0),l=L(()=>{let e=r.fade;return e===``||!0===e||e===`true`||!1!==e&&e!==`false`&&void 0}),u=L(()=>typeof l.value==`boolean`?l.value:typeof i?.value!=`boolean`||i.value),d=L(()=>String(n.node.code??``)),f=L(()=>!u.value),p=L(()=>{let e=r[`index-key`]??r.indexKey;return e==null||e===``?``:String(e)}),h=R(n.node.code),g=R(``),_=R(0),v;function y(){v?.(),v=void 0}function x(){y(),g.value&&=(h.value+=g.value,``)}s([()=>n.node.code,p,u],([e])=>{let t=String(e??``),n=p.value,r=XK({nextContent:t,persistedContent:n?a?.get(n):void 0,currentState:{settledContent:h.value,streamedDelta:g.value},typewriterEnabled:u.value});h.value=r.settledContent,g.value=r.streamedDelta,r.appended?(_.value+=1,function(){if(!g.value||v||!o)return;let e=o.value;v=s(()=>o.value,t=>{t!==e&&x()},{flush:`sync`})}()):g.value||y(),n&&a?.set(n,t)},{immediate:!0}),t(y);let S=L(()=>_.value%2==0?`inline-code-stream-delta--a`:`inline-code-stream-delta--b`);return(e,t)=>(c(),W(`code`,WY,[f.value?(c(),W(M,{key:0},[K(U(d.value),1)],64)):(c(),W(M,{key:1},[h.value?(c(),W(`span`,GY,U(h.value),1)):E(``,!0),g.value?(c(),W(`span`,{key:1,class:V([`inline-code-stream-delta`,[S.value]]),onAnimationend:x},U(g.value),35)):E(``,!0)],64))]))}}),[[`__scopeId`,`data-v-4e331c97`]]);KY.install=e=>{e.component(KY.__name,KY)};var qY=R(!1),JY=R(``),YY=R(`top`),XY=R(null),ZY=R(null),QY=R(null),$Y=R(null),eX=R(null),tX=null,nX=null,rX=0;function iX(){tX&&=(clearTimeout(tX),null),nX&&=(clearTimeout(nX),null)}var aX=!1,oX=null,sX=!1;function cX(e,t,n=`top`,r=!1,i,a){if(!e)return;let o=++rX;iX();let s=()=>uY(null,null,function*(){if(yield function(){return uY(this,null,function*(){if(!aX&&!sX&&typeof document<`u`){oX??=uY(null,null,function*(){let[{createApp:e,h:t},{default:n}]=yield Promise.all([he(()=>import(`./vue.runtime.esm-bundler-Cwbj1t-C.js`).then(e=>e.t),__vite__mapDeps([1,2])),he(()=>import(`./Tooltip-CYPLmGXR.js`),__vite__mapDeps([30,7,1,2]))]),r=document.createElement(`div`);r.setAttribute(`data-singleton-tooltip`,`1`),document.body.appendChild(r),e({setup:()=>()=>t(n,{visible:qY.value,"anchor-el":XY.value,content:JY.value,placement:YY.value,id:ZY.value,originX:QY.value,originY:$Y.value,isDark:eX.value??void 0})}).mount(r),aX=!0});try{yield oX}catch(e){aX=!1,oX=null,sX=!0,console.warn(`[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.`,e)}}})}(),aX&&o===rX){ZY.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,XY.value=e,JY.value=t,YY.value=n,QY.value=i?.x??null,$Y.value=i?.y??null,eX.value=typeof a==`boolean`?a:null,qY.value=!0;try{e.setAttribute(`aria-describedby`,ZY.value)}catch{}}});r?s():tX=setTimeout(s,80)}function lX(e=!1){rX+=1,iX();let t=()=>{if(XY.value&&ZY.value)try{XY.value.removeAttribute(`aria-describedby`)}catch{}qY.value=!1,XY.value=null,ZY.value=null,QY.value=null,$Y.value=null};e?t():nX=setTimeout(t,120)}var uX={"common.copy":`Copy`,"common.copied":`Copied`,"common.decrease":`Decrease`,"common.reset":`Reset`,"common.increase":`Increase`,"common.expand":`Expand`,"common.collapse":`Collapse`,"common.preview":`Preview`,"common.source":`Source`,"common.export":`Export`,"common.open":`Open`,"common.minimize":`Minimize`,"common.zoomIn":`Zoom in`,"common.zoomOut":`Zoom out`,"common.resetZoom":`Reset zoom`,"image.loadError":`Image failed to load`,"image.loading":`Loading image...`},dX=Symbol(`markstreamI18nFallback`);function fX(e,t){return t?.[e]??uX[e]}var pX=(e,t)=>fX(e,t)??function(e){return(e.split(`.`).pop()||e).replace(/[_-]/g,` `).replace(/([A-Z])/g,` $1`).replace(/\s+/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}(e);function mX(e,t){return{t(n){let r=fX(n,t);if(e.te&&r!=null&&!e.te(n))return pX(n,t);let i=e.t(n);return i===n&&r!=null?pX(n,t):i}}}function hX(){let e=function(){try{let e=y(),t=dX,n=e?.provides,r=e?.appContext?.provides;return n?.[t]??r?.[t]??null}catch{}return null}(),t=function(){try{let e=y(),t=e?.proxy,n=t?.$t;if(typeof n==`function`){let e=t?.$te;return{t:n.bind(t),te:typeof e==`function`?e.bind(t):void 0}}let r=e?.appContext?.config?.globalProperties,i=r?.$t;if(typeof i==`function`){let e=r?.$te;return{t:i.bind(r),te:typeof e==`function`?e.bind(r):void 0}}}catch{}return null}();if(t)return mX(t,e);try{let t=globalThis.$vueI18nUse||null;if(t&&typeof t==`function`)try{let n=t();if(n&&typeof n.t==`function`)return mX({t:n.t.bind(n),te:typeof n.te==`function`?n.te.bind(n):void 0},e)}catch{}}catch{}return{t:t=>pX(t,e)}}var gX=Symbol(`ViewportPriority`),_X=Symbol(`ViewportPriorityOptions`),vX=Symbol(`OffscreenHeavyNodeDeferral`),yX=L(()=>!1),bX=`400px`;function xX(){return m(_X,void 0)}function SX(){return m(vX,yX)}function CX(e,t){let n=typeof window<`u`&&typeof document<`u`,r=typeof t==`boolean`?R(t):t,i=n?window.requestIdleCallback??(e=>window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),16)):null,a=n?window.cancelIdleCallback??(e=>window.clearTimeout(e)):null,o=new WeakMap,c=1,l=new Map,u=new Map,f=new Set,p=null,m=null;function h(e){if(!e)return`viewport`;let t=o.get(e);return t||(t=c++,o.set(e,t)),String(t)}function g(){if(p!=null){try{a?.(p)}catch{}p=null}}function _(e){if(e){let t=l.get(e);if(t&&!t.targets.size){try{t.io.disconnect()}catch{}l.delete(e)}}u.size||f.size||g()}function v(e){let t=u.get(e);if(!t)return;let n=l.get(t.bucketKey);if(!t.visible.value){t.visible.value=!0;try{t.resolve()}catch{}}try{n?.io.unobserve(e)}catch{}n?.targets.delete(e),u.delete(e),f.delete(e),_(t.bucketKey)}function y(){!0!==window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__&&i&&p==null&&f.size&&(p=i(()=>{p=null;let e=f.values().next().value;e&&(f.delete(e),v(e),f.size&&y())},{timeout:1200}))}function b(t,r){if(!n||typeof IntersectionObserver>`u`)return null;let i=function(t,n){return{root:e?.(t??null)??null,rootMargin:n?.rootMargin??bX,threshold:n?.threshold??0}}(t,r),a=[h((o=i).root),o.rootMargin,o.threshold].join(`\0`);var o;let s=l.get(a);if(s)return{key:a,bucket:s};let c;try{c=new IntersectionObserver(e=>{for(let t of e)(t.isIntersecting||t.intersectionRatio>0)&&v(t.target)},{root:i.root,rootMargin:i.rootMargin,threshold:i.threshold})}catch{return null}let u={io:c,targets:new Map};return l.set(a,u),{key:a,bucket:u}}function x(){if(n&&r.value)for(let[e,t]of Array.from(u.entries())){let n=b(e,t.opts);if(!n){v(e);continue}if(n.key===t.bucketKey)continue;let r=t.bucketKey,i=l.get(r);try{i?.io.unobserve(e)}catch{}i?.targets.delete(e),t.bucketKey=n.key,n.bucket.targets.set(e,t),n.bucket.io.observe(e),_(r)}}s(r,e=>{if(!e){for(let e of Array.from(u.keys()))v(e);g()}},{flush:`sync`});let S=(e,t)=>{let i=R(!1),a,o=!1,s=new Promise(e=>{a=()=>{o||(o=!0,e())}}),c=()=>{let t=u.get(e);if(!t)return f.delete(e),void _();let n=l.get(t.bucketKey);try{n?.io.unobserve(e)}catch{}n?.targets.delete(e),u.delete(e),f.delete(e),_(t.bucketKey)};if(!n||!r.value)return i.value=!0,a(),{isVisible:i,whenVisible:s,destroy:c};let d=b(e,t);if(!d)return i.value=!0,a(),{isVisible:i,whenVisible:s,destroy:c};let p={resolve:a,visible:i,bucketKey:d.key,opts:t};return u.set(e,p),d.bucket.targets.set(e,p),d.bucket.io.observe(e),n&&m==null&&(m=window.requestAnimationFrame(()=>{m=null,x()})),!1!==t?.allowIdle&&(f.add(e),y()),{isVisible:i,whenVisible:s,destroy:c}};return S.refresh=x,d(gX,S),S}function wX(){let e=m(gX,void 0);if(e)return e;let t=new WeakMap,n=new Map,r=new Set,i=null,a=typeof window<`u`?window.requestIdleCallback??(e=>window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),16)):null,o=typeof window<`u`?window.cancelIdleCallback??(e=>window.clearTimeout(e)):null,s=()=>{if(i!=null){try{o?.(i)}catch{}i=null}},c=e=>{if(!e)return;let t=n.get(e);if(t&&!t.targets.size){try{t.io.disconnect()}catch{}n.delete(e)}},l=e=>{let i=t.get(e);if(!i)return;let a=n.get(i.bucketKey);if(!i.visible.value){i.visible.value=!0;try{i.resolve()}catch{}}try{a?.io.unobserve(e)}catch{}t.delete(e),a?.targets.delete(e),r.delete(e),c(i.bucketKey),r.size||s()},u=()=>{!0!==window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__&&a&&i==null&&r.size&&(i=a(()=>{i=null;let e=r.values().next().value;e&&(r.delete(e),l(e),r.size&&u())},{timeout:1200}))};return(e,i)=>{let a=R(!1),o,d=!1,f=new Promise(e=>{o=()=>{d||(d=!0,e())}}),p=()=>{let i=t.get(e);if(!i)return r.delete(e),void(r.size||s());let a=n.get(i.bucketKey);try{a?.io.unobserve(e)}catch{}t.delete(e),a?.targets.delete(e),r.delete(e),c(i.bucketKey),r.size||s()},m=(e=>{if(typeof window>`u`||typeof IntersectionObserver>`u`)return null;let t=(e=>[e?.rootMargin??bX,e?.threshold??0].join(`\0`))(e),r=n.get(t);if(r)return{key:t,bucket:r};let i=e?.rootMargin??bX,a;try{a=new IntersectionObserver(e=>{for(let t of e)(t.isIntersecting||t.intersectionRatio>0)&&l(t.target)},{root:null,rootMargin:i,threshold:e?.threshold??0})}catch{return null}let o={io:a,targets:new Set};return n.set(t,o),{key:t,bucket:o}})(i);return m?(t.set(e,{resolve:o,visible:a,bucketKey:m.key}),m.bucket.targets.add(e),m.bucket.io.observe(e),!1!==i?.allowIdle&&(r.add(e),u()),{isVisible:a,whenVisible:f,destroy:p}):(a.value=!0,o(),{isVisible:a,whenVisible:f,destroy:p})}}function TX(e,t){let n=e.indexKey??t[`index-key`]??t.indexKey;return n==null||n===``?``:String(n)}var EX=[`data-markstream-viewport-pending`],DX=[`src`,`alt`,`title`,`loading`,`fetchpriority`,`decoding`,`tabindex`,`aria-label`],OX={key:1,class:`image-placeholder`},kX={key:1,class:`image-node__raw-text`},AX={key:2,class:`image-shimmer-overlay`},jX={key:1,class:`image-node__raw-text`},MX={key:3,class:`image-error`},NX=wY(G({__name:`ImageNode`,props:{node:{},fallbackSrc:{default:``},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:[`load`,`error`,`click`],setup(e,{emit:t}){var r;let i=e,a=t,o=R(!1),l=R(!1),u=R(``),d=R(`primary`),f=R(null),p=b(),h=m(pq,null),g=wX(),_=xX(),v=SX(),x=L(()=>dL(i.node.src)),S=L(()=>dL(i.fallbackSrc)),C=((r=y()?.vnode.el)?.querySelector)?.call(r,`img`),w=typeof window<`u`&&C?.getAttribute(`src`)===(x.value||S.value),T=R(typeof window>`u`||w||!v.value),D=ue(null),O=``,k=null,A=L(()=>u.value),j=L(()=>!i.lazy),M=L(()=>typeof window<`u`&&v.value&&!w),N=L(()=>!M.value||T.value),ee=L(()=>N.value?A.value:``),P=L(()=>_?.value.heavyBlockMargin??_?.value.rootMargin??bX),I=L(()=>!i.node.loading&&d.value!==`failed`&&u.value.length>0),te=L(()=>d.value===`failed`),re=L(()=>(!j.value||M.value&&!T.value)&&!o.value&&!l.value&&d.value!==`failed`&&u.value.length>0),ie=L(()=>TX(i,p));function ae(e=ie.value){e&&f.value&&h?.reportHeight(e,f.value.offsetHeight)}function oe(e=ie.value){e&&n(()=>{ae(e)})}function se(){k&&=(clearTimeout(k),null)}function ce(){let e=ie.value;e&&O!==e&&(O&&h?.markSettled(O),se(),O=e,h?.markPending(e),typeof window<`u`&&(k=window.setTimeout(()=>{O===e&&(oe(e),B())},8e3)))}function B(){return uY(this,null,function*(){let e=O;e&&(se(),O=``,yield n(),ae(e),h?.markSettled(e))})}function le(){if(d.value===`primary`&&S.value&&S.value!==u.value)return d.value=`fallback`,u.value=S.value,o.value=!1,l.value=!1,void oe();d.value=`failed`,l.value=!0,a(`error`,u.value),oe()}function de(){o.value=!0,l.value=!1,a(`load`,A.value),oe()}function fe(e){e.preventDefault(),o.value&&!l.value&&a(`click`,[e,A.value])}let{t:H}=hX();return s([x,S,()=>i.node.loading],()=>(o.value=!1,l.value=!1,i.node.loading||x.value?(u.value=x.value,void(d.value=`primary`)):S.value?(u.value=S.value,void(d.value=`fallback`)):(u.value=``,d.value=`failed`,void(l.value=!0))),{immediate:!0}),typeof window<`u`&&s([f,M],([e,t],n,r)=>{var i;if((i=D.value)==null||i.destroy(),D.value=null,!t||T.value)return void(T.value=!0);if(!e)return void(T.value=!1);let a=!0,o=g(e,{rootMargin:P.value,allowIdle:!1});D.value=o,T.value=o.isVisible.value,o.whenVisible.then(()=>{a&&D.value===o&&(T.value=!0)}),r(()=>{a=!1,o.destroy(),D.value===o&&(D.value=null)})},{immediate:!0}),s([I,o,l,A,()=>i.lazy,N],([e,t,n,r,i,a])=>e&&r&&!n&&a?t?(B(),void oe()):i?(ce(),void oe()):void(t||n||ce()):(B(),void oe()),{flush:`post`,immediate:!0}),ne(()=>{var e;(e=D.value)==null||e.destroy(),D.value=null,function(){let e=O;e&&(se(),O=``,h?.markSettled(e))}()}),(t,n)=>(c(),W(`span`,{ref_key:`rootRef`,ref:f,class:`image-node-container`,"data-markstream-viewport-pending":M.value&&!T.value?`true`:void 0},[I.value?(c(),W(`img`,{key:0,src:ee.value||void 0,alt:String(i.node.alt??i.node.title??``),title:String(i.node.title??i.node.alt??``),class:V([`image-node__img`,{"is-loading":!j.value&&!o.value,"is-loaded":j.value||o.value,"has-natural-size":o.value,"cursor-pointer":o.value}]),loading:i.lazy?`lazy`:void 0,fetchpriority:j.value?`high`:void 0,decoding:j.value?`sync`:`async`,tabindex:o.value?0:-1,"aria-label":i.node.alt??z(H)(`image.preview`),onError:le,onLoad:de,onClick:fe},null,42,DX)):E(``,!0),e.node.loading&&!l.value?(c(),W(`span`,OX,[i.usePlaceholder?me(t.$slots,`placeholder`,{key:0,node:i.node,displaySrc:A.value,imageLoaded:o.value,hasError:l.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[n[0]||=F(`span`,{class:`image-shimmer`},null,-1)],!0):(c(),W(`span`,kX,U(e.node.raw),1))])):E(``,!0),re.value&&!e.node.loading?(c(),W(`span`,AX,[i.usePlaceholder?me(t.$slots,`placeholder`,{key:0,node:i.node,displaySrc:A.value,imageLoaded:o.value,hasError:l.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[n[1]||=F(`span`,{class:`image-shimmer`},null,-1)],!0):(c(),W(`span`,jX,U(e.node.raw),1))])):E(``,!0),te.value?(c(),W(`span`,MX,[me(t.$slots,`error`,{node:i.node,displaySrc:A.value,imageLoaded:o.value,hasError:l.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[n[2]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`},[F(`path`,{fill:`currentColor`,d:`M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z`})],-1),F(`span`,null,U(z(H)(`image.loadError`)),1)],!0)])):E(``,!0)],8,EX))}}),[[`__scopeId`,`data-v-046e82ac`]]);NX.install=e=>{e.component(NX.__name,NX)};var PX={key:2},FX=G({__name:`NodeChildRenderer`,props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){let t=e,n=bY(()=>t.customId),r=m(`markstreamHtmlPolicy`,void 0),a=m(`markstreamNestedRendererProps`,void 0),o=L(()=>r?.value??`safe`),s=L(()=>{let e=a?.value??{};return lY(cY({},e),{customId:t.customId??e.customId,htmlPolicy:o.value})}),l=i({loader:()=>Promise.resolve().then(()=>F0),suspensible:!1}),u=L(()=>t.components[String(t.node.type)]),d=L(()=>!!(u.value&&n.value[t.node.type]&&!_Y(String(t.node.type)))),f=L(()=>d.value?IY(t.node,o.value):void 0),p=L(()=>Array.isArray(t.node.children)&&t.node.children.length>0),h=L(()=>String(t.node.content??``)),g=L(()=>String(t.node.content??t.node.raw??``));return(t,n)=>u.value&&d.value?(c(),P(x(u.value),re({key:0},f.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":s.value.isDark}),{default:B(()=>[p.value?(c(),P(z(l),re({key:0},s.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):h.value?(c(),P(z(l),re({key:1},s.value,{content:h.value,final:!e.node.loading,"index-key":`${e.indexKey||`child`}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):E(``,!0)]),_:1},16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):u.value?(c(),P(x(u.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,[`node`,`custom-id`,`index-key`])):e.fallbackToText?(c(),W(`span`,PX,U(g.value),1)):E(``,!0)}}),IX=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function LX(e){var t;if(typeof e==`boolean`)return e;if(e&&typeof e==`object`){let n=e;return lY(cY(cY({},IX),n),{enabled:(t=n.enabled)==null||t})}return cY({},IX)}function RX(e,t){if(!1===e.renderSideBySide)return!0;if(!0!==e.useInlineViewWhenSpaceIsLimited)return!1;let n=e.renderSideBySideInlineBreakpoint;return t>0&&t<=(typeof n==`number`&&Number.isFinite(n)?n:900)}function zX(e){let t=String(e??``).split(/\r?\n/,1)[0]?.trim()??``;if(t.length<3)return``;let n=t[0];if(n!=="`"&&n!==`~`||t[1]!==n||t[2]!==n)return``;let r=3;for(;t[r]===n;)r+=1;return t.slice(r).trim()}function BX(e){return(String(e??``).trim().split(/\s+/,1)[0]??``)===`diff`}function VX(e){return!0===e.diff||BX(e.language)||BX(zX(String(e.raw??``)))}function HX(e,t,n){let r=function(e){let t=zX(e);if(!t)return``;let n=t.split(/\s+/).filter(Boolean);if(!n.length)return``;let r=n[0]===`diff`?n.slice(1):n;for(let e of r){let t=e.includes(`:`)?e.slice(e.indexOf(`:`)+1):e;if(t&&/[./\\-]/.test(t))return t}return``}(e);return{title:r||t,caption:r?n?`Diff / ${t}`:t:``}}var UX=[`aria-busy`,`aria-label`,`data-language`,`data-markstream-line-numbers`],WX={key:0,translate:`no`,class:`markstream-pre__diff-code`},GX={class:`markstream-pre__diff-pane-content`},KX={class:`markstream-pre__diff-number`,"aria-hidden":`true`},qX={class:`markstream-pre__diff-content`},JX={class:`markstream-pre__diff-content-inner`},YX={key:0,class:`markstream-pre__line-numbers`,"aria-hidden":`true`},XX=[`textContent`],ZX=[`textContent`],QX=G({__name:`PreCodeNode`,props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){let t=e;function r(e,t){let n=String(e??``);return t?n:n.replace(/\r\n$|\n$|\r$/,``)}let i=L(()=>{let e=String(t.node?.language??``);return String(String(e).split(/\s+/g)[0]??``).toLowerCase().replace(/[^\w-]/g,``)||`plaintext`}),a=L(()=>`language-${i.value}`),o=L(()=>!0===t.loading||!0===t.node?.loading),l=L(()=>r(t.node?.code,o.value)),u=``,d=1,f=L(()=>function(e){let t=0,n=1;e.startsWith(u)&&(t=u.length,n=d,t>0&&e[t-1]===`\r`&&e[t]===` + `};let c=/^\[(\d+)\]/,l=/^\[([^\]\n]+)\]/,u=e=>{if(!e.startsWith(`[`))return!1;let t=l.exec(e);if(!t)return e!==`[`&&!/^\[\d+$/.test(e);let n=String(t[1]??``);return e.slice(t[0].length).startsWith(`(`)?!1:!/^\d+$/.test(n)};n.inline.ruler.before(`escape`,`reference`,(e,t)=>{let n=e;if(n.src[n.pos]!==`[`)return!1;let r=c.exec(n.src.slice(n.pos));if(!r)return!1;let i=n.src.slice(Math.max(0,n.pos-120),n.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(i))return!1;let a=n.src.slice(n.pos+r[0].length);if(a.startsWith(`](`)||a.startsWith(`(`)||u(a))return!1;if(!t){let e=r[1],t=n.push(`reference`,`span`,0);t.content=e,t.markup=r[0],t.raw=r[0]}return n.pos+=r[0].length,!0}),n.renderer.rules.reference=(e,t)=>{let n=String(e[t].content??``);return`${n}`};let d=n.use.bind(n);return n.use=((...e)=>(r.__markstreamHasCustomParserExtensions=!0,d(...e))),n}function YK({nextContent:e,previousContent:t,typewriterEnabled:n}){return!n||e===t?{settledContent:e,streamedDelta:``,appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:``,appended:!1}}function XK({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:r,streamRenderVersionChanged:i=!1}){let a=`${n.settledContent}${n.streamedDelta}`;return r?n.streamedDelta&&a===e?i?{settledContent:a,streamedDelta:``,appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:YK({nextContent:e,previousContent:t??a,typewriterEnabled:r}):{settledContent:e,streamedDelta:``,appended:!1}}var ZK={plain:`plaintext`,text:`plaintext`,txt:`plaintext`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,mts:`typescript`,cts:`typescript`,golang:`go`,py:`python`,rb:`ruby`,rs:`rust`,kt:`kotlin`,kts:`kotlin`,md:`markdown`,yml:`yaml`,sh:`shellscript`,bash:`shellscript`,zsh:`shellscript`,shell:`shellscript`,shellscript:`shellscript`,ps:`powershell`,ps1:`powershell`,pwsh:`powershell`,"c++":`cpp`,"c#":`csharp`,cs:`csharp`,objc:`objective-c`,objectivec:`objective-c`,"objective-c":`objective-c`,objectivecpp:`objective-cpp`,"objective-c++":`objective-cpp`,"objective-cpp":`objective-cpp`};function QK(e){let t=String(e??``).trim();if(!t)return``;let[n=``]=t.split(/\s+/);return n.split(`:`)[0]?.trim().toLowerCase()??``}function $K(e){let t=QK(e);return ZK[t]??t}function eq(e){if(!Array.isArray(e))return;let t=e.filter(e=>typeof e==`string`).map(e=>$K(e)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function tq(e){if(!Array.isArray(e))return;let t=[],n=new Set;for(let r of e){if(typeof r!=`string`)continue;let e=r.trim();!e||n.has(e)||(n.add(e),t.push(e))}return t.length>0?t:void 0}function nq(e){return tq(e)?.join(`\0`)??``}function rq(e,t){return`${nq(e)}\u0000\u0000${eq(t)?.join(`\0`)??``}`}function iq(e,t,n=1){let r=Number(e);return Number.isFinite(r)?Math.max(n,r):t}function aq(e,t){let n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var oq=class{constructor(e={},t){this.source=``,this.visible=``,this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=e=>this.destroyed?()=>{}:(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.enqueue=e=>{if(this.destroyed||!e)return;this.done&&=!1;let t=this.source.length>0,n=this.pendingChars<=0;if(this.source+=e,n){let e=uq();this.startedAt=t&&this.hasStarted?e-this.normalizedStartDelayMs:e,this.lastTick=e,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(e={})=>{if(!this.destroyed){if(this.done=!0,e.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(e=``)=>{this.destroyed||(this.cancelLoop(),this.source=e,this.visible=e,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;let e=uq();this.lastTick=e,this.startedAt||=e,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=e=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(e-this.startedAtthis.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,a=dq(r/Math.max(.001,i/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(a-this.currentCps)*.2,this.charBudget+=this.currentCps*(n/1e3),this.charBudget<1){this.ensureLoop();return}let o=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),s=lq(this.source.slice(this.visible.length),o,this.segmenter);s.text&&(this.visible+=s.text,this.charBudget=Math.max(0,this.charBudget-s.graphemeCount),this.emit()),this.ensureLoop()};let{minCharsPerSecond:n=40,maxCharsPerSecond:r=1e3,targetLatencyMs:i=900,catchUpLatencyMs:a=350,catchUpThreshold:o=600,maxCommitFps:s=30,startDelayMs:c=80,maxCharsPerCommit:l=80,flushOnFinish:u=!1}=e;this.minCharsPerSecond=iq(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,iq(r,1e3,1)),this.normalizedTargetLatencyMs=iq(i,900,1),this.normalizedCatchUpLatencyMs=iq(a,350,1),this.normalizedCatchUpThreshold=aq(o,600),this.normalizedStartDelayMs=aq(c,80),this.maxCommitFps=Math.trunc(iq(s,30,1)),this.maxCharsPerCommit=Math.trunc(iq(l,80,1)),this.flushOnFinish=u,this.segmenter=cq(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!=`function`){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&=(typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(this.rafId),0)}emit(){if(!this.destroyed)for(let e of this.listeners)e()}};function sq(e={},t){let n=new oq(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function cq(){if(typeof Intl>`u`)return null;let e=Intl.Segmenter;return e?new e(void 0,{granularity:`grapheme`}):null}function lq(e,t,n){if(!e||t<=0)return{text:``,graphemeCount:0};if(!n){let n=Array.from(e).slice(0,t);return{text:n.join(``),graphemeCount:n.length}}let r=``,i=0;for(let a of n.segment(e)){if(i>=t)break;r+=a.segment,i++}return{text:r,graphemeCount:i}}function uq(){return typeof performance<`u`?performance.now():Date.now()}function dq(e,t,n){return Math.min(n,Math.max(t,e))}var fq=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),pq=Symbol.for(`markstream-vue:node-lifecycle`);function mq(){}var hq=new Map,gq=`material`,_q=new Map,vq=new Map,yq=null;function bq(e){hq.set(e.id,e)}function xq(e){let t=hq.get(gq);if(!t)return;let n=t.core[e];if(n)return n;let r=_q.get(t.id);if(r){let t=r[e];if(t)return t}t.loadExtended&&!_q.has(t.id)&&Cq(t)}function Sq(){return hq.get(gq)?.fallback??``}function Cq(e){return fq(this,null,function*(){if(_q.has(e.id))return _q.get(e.id)??null;let t=vq.get(e.id);return t||(t=(e.loadExtended?.call(e)??Promise.resolve(null)).then(t=>(_q.set(e.id,t),yq?.(),t)).catch(()=>(_q.set(e.id,null),null)),vq.set(e.id,t)),t})}var wq=``,Tq=``,Eq={id:`material`,core:{"":Tq,plain:``,text:Tq,javascript:``,typescript:``,jsx:``,tsx:``,html:``,css:``,scss:``,json:``,python:``,ruby:``,go:``,java:``,kotlin:``,c:``,cpp:``,cs:wq,csharp:wq,php:``,shell:``,powershell:``,sql:``,yaml:``,markdown:``,xml:``,rust:``,vue:``,mermaid:``},fallback:``,loadExtended:()=>he(()=>import(`./extended-BP0HZdSW.js`).then(e=>e.materialExtendedMap),[])},Dq=null,Oq=ue(0);yq=()=>{Oq.value++},bq(Eq);var kq={"":``,javascript:`javascript`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,typescript:`typescript`,ts:`typescript`,jsx:`jsx`,tsx:`tsx`,golang:`go`,py:`python`,rb:`ruby`,sh:`shell`,bash:`shell`,zsh:`shell`,shellscript:`shell`,bat:`shell`,batch:`shell`,ps1:`powershell`,plaintext:`plain`,text:`plain`,txt:`plain`,"c++":`cpp`,"c#":`csharp`,cs:`csharp`,"objective-c":`objectivec`,"objective-c++":`objectivecpp`,yml:`yaml`,md:`markdown`,rs:`rust`,kt:`kotlin`};function Aq(e){let t=function(e){if(!e)return``;let t=e.trim();if(!t)return``;let[n]=t.split(/\s+/),[r]=n.split(`:`);return r.toLowerCase()}(e);return kq[t]??t}function jq(e){let t=Aq(e);if(!t)return`plaintext`;switch(t){case`plain`:return`plaintext`;case`jsx`:return`javascript`;case`tsx`:return`typescript`;case`objectivec`:return`objective-c`;case`objectivecpp`:return`objective-cpp`;default:return t}}function Mq(e){if(Dq){let t=Dq(e);if(t!=null&&t!==``)return t}return xq(Aq(e))||Sq()}var Nq={js:`JavaScript`,javascript:`JavaScript`,ts:`TypeScript`,jsx:`JSX`,tsx:`TSX`,html:`HTML`,css:`CSS`,scss:`SCSS`,json:`JSON`,py:`Python`,python:`Python`,rb:`Ruby`,go:`Go`,java:`Java`,c:`C`,cpp:`C++`,cs:`C#`,csharp:`C#`,php:`PHP`,sh:`Shell`,bash:`Bash`,sql:`SQL`,yaml:`YAML`,md:`Markdown`,d2:`D2`,d2lang:`D2`,"":`Plain Text`,plain:`Plain Text`},Pq=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Fq=null,Iq=!1,Lq=null,Rq=Vq;function zq(e){let t=e?.default??e;return t&&typeof t.renderToString==`function`?t:null}function Bq(){try{return zq(globalThis?.katex)}catch{return null}}function Vq(){return Pq(null,null,function*(){let e=Bq();if(e)return e;let t=yield he(()=>import(`./katex-BMCG0xok.js`),[]);try{yield he(()=>import(`./mhchem-CCsrOXlE.js`),__vite__mapDeps([4,5]))}catch{}return zq(t)})}function Hq(e){let t=Promise.resolve(e).then(e=>Lq===t&&e?(Fq=zq(e)??e,Fq):null).catch(()=>null).finally(()=>{Lq===t&&(Lq=null)});return Lq=t,Iq=!0,t}function Uq(e){Rq=e,Fq=null,Iq=!1,Lq=null}function Wq(e){Uq(e??Vq)}function Gq(){return typeof Rq==`function`}function Kq(){let e=Rq;if(!e||e===Vq)return null;if(Fq)return Fq;let t=Bq();if(t)return Fq=t,Fq;if(Iq)return null;try{let t=e();return t?typeof t?.then==`function`?(Hq(t),null):(Fq=zq(t)??t,Fq):null}catch{return null}}function qq(){return Pq(this,null,function*(){let e=Bq();if(e)return Fq=e,Fq;if(Fq)return Fq;if(Lq)return Lq;if(Iq)return null;let t=Rq;if(!t)return Iq=!0,null;try{let e=t();if(typeof e?.then==`function`)return Hq(e);if(e)return Fq=zq(e)??e,Iq=!0,Fq}catch{}return Iq=!0,null})}function Jq(e){return e?e.replace(/·/g,`⋅`).replace(/℃/g,`°C`):``}var Yq=null,Xq=null,Zq=new Map,Qq=new Map,$q=5,eJ=new Set;function tJ(){if(Zq.size<$q&&eJ.size){let e=$q-Zq.size;for(let t of Array.from(eJ)){if(e<=0)break;eJ.delete(t),e--;try{t()}catch{}}}}function nJ(){for(let e of Array.from(eJ)){eJ.delete(e);try{e()}catch{}}}function rJ(e){Yq=e,Xq=null,Yq.onmessage=e=>{let{id:t,html:n,error:r}=e.data,i=Zq.get(t);if(i)if(Zq.delete(t),clearTimeout(i.timeoutId),i.cleanup(),tJ(),r)i.aborted||i.reject(Error(r));else{let{content:t,displayMode:r}=e.data;if(t){let e=`${r?`d`:`i`}:${t}`;if(Qq.set(e,n),Qq.size>200){let e=Qq.keys().next().value;Qq.delete(e)}}i.aborted||i.resolve(n)}},Yq.onerror=e=>{console.error(`[katexWorkerClient] Worker error:`,e);for(let[t,n]of Zq.entries())clearTimeout(n.timeoutId),n.cleanup(),n.aborted||n.reject(Error(`Worker error: ${e.message}`));Zq.clear(),nJ()}}function iJ(){var e;for(let e of Zq.values())clearTimeout(e.timeoutId),e.cleanup(),e.aborted||e.reject(Error(`Worker cleared`));Zq.clear(),nJ(),Yq&&((e=Yq.terminate)==null||e.call(Yq)),Yq=null,Xq=null}function aJ(e,t=!0,n=2e3,r){return Pq(this,null,function*(){performance.now();let i=Jq(e);if(!Gq()){let e=Error(`KaTeX rendering disabled`);return e.name=`KaTeXDisabled`,e.code=`KATEX_DISABLED`,Promise.reject(e)}if(Xq)return Promise.reject(Xq);let a=`${t?`d`:`i`}:${i}`,o=Qq.get(a);if(o)return tJ(),Promise.resolve(o);let s=Yq||(Xq=Error(`[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker().`),Xq.name=`WorkerInitError`,Xq.code=`WORKER_INIT_ERROR`,null);if(!s)return Promise.reject(Xq);if(Zq.size>=$q){let e=Error(`Worker busy`);return e.name=`WorkerBusy`,e.code=`WORKER_BUSY`,e.busy=!0,e.inFlight=Zq.size,e.max=$q,Promise.reject(e)}return new Promise((e,a)=>{if(r?.aborted){let e=Error(`Aborted`);e.name=`AbortError`,a(e);return}let o=Math.random().toString(36).slice(2),c=null,l=globalThis.setTimeout(()=>{let e=Zq.get(o);if(!e)return;Zq.delete(o),e.cleanup();let t=Error(`Worker render timed out`);t.name=`WorkerTimeout`,t.code=`WORKER_TIMEOUT`,e.aborted||e.reject(t),tJ()},n);c=()=>{let e=Zq.get(o);if(!e||e.aborted)return;e.aborted=!0,e.cleanup();let t=Error(`Aborted`);t.name=`AbortError`,a(t)},r&&r.addEventListener(`abort`,c,{once:!0});let u=e,d=a;Zq.set(o,{resolve:e=>{u(e)},reject:e=>{d(e)},timeoutId:l,aborted:!1,cleanup:()=>{r&&c&&r.removeEventListener(`abort`,c),c=null}});try{s.postMessage({id:o,content:i,displayMode:t})}catch(e){let t=Zq.get(o);Zq.delete(o),clearTimeout(l),t?.cleanup(),t?.reject(e),tJ()}})})}function oJ(e,t=!0,n){let r=`${t?`d`:`i`}:${Jq(e)}`;if(Qq.set(r,n),Qq.size>200){let e=Qq.keys().next().value;Qq.delete(e)}}var sJ=`WORKER_BUSY`;function cJ(e=2e3,t){return Zq.size<$q?Promise.resolve():new Promise((n,r)=>{let i,a=!1,o=null,s=()=>{},c=()=>{i&&globalThis.clearTimeout(i),eJ.delete(s),t&&o&&t.removeEventListener(`abort`,o),o=null};s=()=>{a||(a=!0,c(),n())},eJ.add(s),i=globalThis.setTimeout(()=>{if(a)return;a=!0,c();let e=Error(`Wait for worker slot timed out`);e.name=`WorkerBusyTimeout`,e.code=`WORKER_BUSY_TIMEOUT`,r(e)},e),queueMicrotask(()=>tJ()),t&&(o=()=>{if(a)return;a=!0,c();let e=Error(`Aborted`);e.name=`AbortError`,r(e)},t.aborted?o():t.addEventListener(`abort`,o,{once:!0}))})}var lJ={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function uJ(e){return Pq(this,arguments,function*(e,t=!0,n={}){if(!Gq()){let e=Error(`KaTeX rendering disabled`);throw e.name=`KaTeXDisabled`,e.code=`KATEX_DISABLED`,e}let r=n.timeout??lJ.timeout,i=n.waitTimeout??lJ.waitTimeout,a=n.backoffMs??lJ.backoffMs,o=n.maxRetries??lJ.maxRetries,s=Number.isFinite(o)?Math.max(0,Math.min(Math.floor(o),8)):lJ.maxRetries,c=n.signal,l=0;for(;;){if(c?.aborted){let e=Error(`Aborted`);throw e.name=`AbortError`,e}try{return yield aJ(e,t,r,c)}catch(e){if(e?.code!==`WORKER_BUSY`||l>=s)throw e;if(l++,yield cJ(i,c).catch(()=>{}),c?.aborted){let e=Error(`Aborted`);throw e.name=`AbortError`,e}a>0&&(yield new Promise(e=>globalThis.setTimeout(e,a*l)))}}})}function dJ(e){let t=typeof e==`number`?e:Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:null}function fJ(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!(!e||e.startsWith(`%%`)))return(e.match(/^([A-Z][\w-]*)\b/i)?.[1])?.toLowerCase()||``}return``}function pJ(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith(`%%`)),n=Math.max(1,t.length),r=fJ(e);return r===`gantt`?220+28*n:r===`sequencediagram`?180+26*n:r===`classdiagram`||r===`statediagram`||r===`erdiagram`?180+24*n:r===`flowchart`||r===`graph`?170+28*n:200+22*n}function mJ(e){let t=e.split(/\r?\n/).filter(e=>/^\s*-\s+/.test(e)).length;return t>=3?500:t>0?280+60*t:360}function hJ(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function gJ(e,t=360,n=500){return hJ(e,t,n)}function _J(e,t=360,n=500){return hJ(e,t,n)}var vJ=Object.defineProperty,yJ=Object.defineProperties,bJ=Object.getOwnPropertyDescriptors,xJ=Object.getOwnPropertySymbols,SJ=Object.prototype.hasOwnProperty,CJ=Object.prototype.propertyIsEnumerable,wJ=(e,t,n)=>t in e?vJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TJ=(e,t)=>{for(var n in t||={})SJ.call(t,n)&&wJ(e,n,t[n]);if(xJ)for(var n of xJ(t))CJ.call(t,n)&&wJ(e,n,t[n]);return e},EJ=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),DJ=()=>he(()=>import(`./mermaid.core-D-hNgJPv.js`),__vite__mapDeps([6,7,8,9,2,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])),OJ=null,kJ=DJ,AJ=null,jJ=!1,MJ=!1,NJ=0;function PJ(e){kJ=e,NJ++,OJ=null,AJ=null,jJ=!1,MJ=!1}function FJ(e){PJ(e??DJ)}function IJ(){return typeof kJ==`function`}function LJ(e){if(!e)return e;let t=e&&e.default?e.default:e;if(t&&(typeof t.render==`function`||typeof t.parse==`function`||typeof t.initialize==`function`))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render==`function`||typeof t.mermaidAPI.parse==`function`)){let e=t.mermaidAPI;return n=TJ({},t),r={render:e.render.bind(e),parse:e.parse?e.parse.bind(e):void 0,initialize:n=>typeof t.initialize==`function`?t.initialize(n):e.initialize?e.initialize(n):void 0},yJ(n,bJ(r))}var n,r;return e.mermaid&&typeof e.mermaid.render==`function`?e.mermaid:t}function RJ(e){if(e)try{let t=e?.initialize;e.initialize=n=>{let r=TJ({suppressErrorRendering:!0},n||{});return typeof t==`function`?t.call(e,r):e?.mermaidAPI&&typeof e.mermaidAPI.initialize==`function`?e.mermaidAPI.initialize(r):void 0}}catch{}}function zJ(){return EJ(this,null,function*(){if(OJ)return OJ;let e=function(){try{return LJ(globalThis?.mermaid)}catch{return null}}();if(e)return OJ=e,RJ(OJ),OJ;let t=kJ,n=NJ;return t?t===DJ&&jJ?null:AJ||(AJ=EJ(null,null,function*(){let e;try{e=yield t()}catch(e){if(t===DJ)return n===NJ&&t===kJ&&(jJ=!0,function(e){MJ||(MJ=!0,console.warn(`[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.`,e))}(e)),null;throw e}finally{n===NJ&&t===kJ&&(AJ=null)}return n!==NJ||t!==kJ?null:e?(OJ=LJ(e),RJ(OJ),OJ):null}),AJ):null})}var BJ=null,VJ=null,HJ=new Map,UJ=new Map;function WJ(e){for(let t of HJ.values())t.reject(e);HJ.clear(),UJ.clear()}var GJ=5,KJ=!1,qJ=`MERMAID_DISABLED`;function JJ(e){if(BJ&&BJ!==e){let e=Error(`Worker replaced`);e.code=`WORKER_REPLACED`,WJ(e)}BJ=e,VJ=null;let t=e;BJ.onmessage=e=>{if(BJ!==t)return;let{id:n,ok:r,result:i,error:a}=e.data,o=HJ.get(n);o&&(!1===r||a?o.reject(Error(a||`Unknown error`)):o.resolve(i))},BJ.onerror=e=>{var n,r;if(BJ===t)if(HJ.size!==0){try{KJ?console.error(`[mermaidWorkerClient] Worker error:`,e?.message||e):(r=console.debug)==null||r.call(console,`[mermaidWorkerClient] Worker error:`,e?.message||e)}catch{}WJ(Error(`Worker error: ${e.message}`))}else (n=console.debug)==null||n.call(console,`[mermaidWorkerClient] Worker error (no pending):`,e?.message||e)},BJ.onmessageerror=e=>{var n,r;if(BJ===t)if(HJ.size!==0){try{KJ?console.error(`[mermaidWorkerClient] Worker messageerror:`,e):(r=console.debug)==null||r.call(console,`[mermaidWorkerClient] Worker messageerror:`,e)}catch{}WJ(Error(`Worker messageerror`))}else (n=console.debug)==null||n.call(console,`[mermaidWorkerClient] Worker messageerror (no pending):`,e)}}function YJ(){var e;if(BJ)try{WJ(Error(`Worker cleared`)),(e=BJ.terminate)==null||e.call(BJ)}catch{}BJ=null,VJ=null}function XJ(e,t,n,r){if(!IJ()){let e=Error(`Mermaid rendering disabled`);return e.name=`MermaidDisabled`,e.code=qJ,Promise.reject(e)}let i=`${e}\0${t.theme}\0${n}\0${t.code}`,a=UJ.get(i);return a||(a=function(e,t,n=1400){if(!IJ()){let e=Error(`Mermaid rendering disabled`);return e.name=`MermaidDisabled`,e.code=`MERMAID_DISABLED`,Promise.reject(e)}if(VJ)return Promise.reject(VJ);let r=BJ||(VJ=Error(`[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker().`),VJ.name=`WorkerInitError`,VJ.code=`WORKER_INIT_ERROR`,null);if(!r)return Promise.reject(VJ);if(HJ.size>=GJ){let e=Error(`Worker busy`);return e.name=`WorkerBusy`,e.code=`WORKER_BUSY`,e.inFlight=HJ.size,e.max=GJ,Promise.reject(e)}return new Promise((i,a)=>{let o=Math.random().toString(36).slice(2),s,c=!1,l=()=>{c||(c=!0,s!=null&&globalThis.clearTimeout(s),HJ.delete(o))};HJ.set(o,{resolve:e=>{l(),i(e)},reject:e=>{l(),a(e)}});try{r.postMessage({id:o,action:e,payload:t})}catch(e){HJ.delete(o),a(e);return}s=globalThis.setTimeout(()=>{let e=Error(`Worker call timed out`);e.name=`WorkerTimeout`,e.code=`WORKER_TIMEOUT`;let t=HJ.get(o);t&&t.reject(e)},n)})}(e,t,n),UJ.set(i,a),a.then(()=>{UJ.get(i)===a&&UJ.delete(i)},()=>{UJ.get(i)===a&&UJ.delete(i)})),function(e,t){if(!t)return e;if(t.aborted){let e=Error(`Aborted`);return e.name=`AbortError`,Promise.reject(e)}return new Promise((n,r)=>{let i=()=>{},a=()=>t.removeEventListener(`abort`,i);i=()=>{a();let e=Error(`Aborted`);e.name=`AbortError`,r(e)},t.addEventListener(`abort`,i,{once:!0}),e.then(e=>{a(),n(e)},e=>{a(),r(e)})})}(a,r)}function ZJ(e,t,n=1400,r){return XJ(`canParse`,{code:e,theme:t},n,r)}function QJ(e,t,n=1400,r){return XJ(`findPrefix`,{code:e,theme:t},n,r)}function $J(e){try{if(typeof globalThis<`u`&&typeof globalThis.requestAnimationFrame==`function`)return globalThis.requestAnimationFrame(e)}catch{}return globalThis.setTimeout(e,0)}function eY(e){try{if(e==null)return;if(typeof globalThis<`u`&&typeof globalThis.cancelAnimationFrame==`function`)return void globalThis.cancelAnimationFrame(e)}catch{}try{globalThis.clearTimeout(e)}catch{}}var tY=Object.defineProperty,nY=Object.defineProperties,rY=Object.getOwnPropertyDescriptors,iY=Object.getOwnPropertySymbols,aY=Object.prototype.hasOwnProperty,oY=Object.prototype.propertyIsEnumerable,sY=(e,t,n)=>t in e?tY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cY=(e,t)=>{for(var n in t||={})aY.call(t,n)&&sY(e,n,t[n]);if(iY)for(var n of iY(t))oY.call(t,n)&&sY(e,n,t[n]);return e},lY=(e,t)=>nY(e,rY(t)),uY=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),dY=`__global__`,fY=`__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__`,pY=(()=>{let e=globalThis;if(e[fY])return e[fY];let t={scopedCustomComponents:{},revision:ue(0)};return e[fY]=t,t})(),mY=pY.revision,hY=Symbol(`markstreamCustomComponents`),gY=new Set(`text.paragraph.heading.code_block.list.list_item.blockquote.table.table_row.table_cell.definition_list.definition_item.footnote.footnote_reference.footnote_anchor.admonition.hardbreak.link.image.thematic_break.math_inline.math_block.strong.emphasis.strikethrough.highlight.insert.subscript.superscript.emoji.checkbox.checkbox_input.inline_code.html_inline.html_block.reference.mermaid.infographic.d2.vmr_container`.split(`.`));function _Y(e){return gY.has(String(e).trim().toLowerCase())}function vY(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/[_\s]+/g,`-`).toLowerCase()}function yY(e={}){let t={};for(let[n,r]of Object.entries(e))if(r!=null){t[n]=r;for(let e of new Set([xL(n),xL(vY(n))]))!e||_Y(e)||Object.prototype.hasOwnProperty.call(t,e)||(t[e]=r)}return t}function bY(e){let t=m(hY,null);return L(()=>(mY.value,function(e,t={}){return mY.value,cY(cY(cY({},yY(pY.scopedCustomComponents[dY]||{})),yY(t)),yY(function(e){return e&&pY.scopedCustomComponents[e]||{}}(e)))}(e?.(),t?.value??{})))}var xY=[`aria-label`],SY={key:0,xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,class:`checkbox-icon checkbox-unchecked`},CY={key:1,xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,class:`checkbox-icon checkbox-checked`},wY=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},TY=wY(G({__name:`CheckboxNode`,props:{node:{}},setup:e=>(t,n)=>(c(),W(`span`,{class:`checkbox-node`,role:`img`,"aria-label":e.node.checked?`checked`:`unchecked`},[e.node.checked?(c(),W(`svg`,CY,[...n[1]||=[F(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`4`,fill:`currentColor`},null,-1),F(`path`,{d:`M9 12l2 2 4-4`,stroke:`hsl(var(--ms-background))`,"stroke-width":`2.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1)]])):(c(),W(`svg`,SY,[...n[0]||=[F(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`4`,stroke:`currentColor`,"stroke-width":`2`},null,-1)]]))],8,xY))}),[[`__scopeId`,`data-v-be21ab83`]]);TY.install=e=>{e.component(TY.__name,TY)};var EY={class:`emoji-node`},DY=wY(G({__name:`EmojiNode`,props:{node:{}},setup:e=>(t,n)=>(c(),W(`span`,EY,U(e.node.name),1))}),[[`__scopeId`,`data-v-de55dc97`]]);DY.install=e=>{e.component(DY.__name,DY)};var OY=[`id`],kY=[`title`],AY=wY(G({__name:`FootnoteReferenceNode`,props:{node:{}},setup(e){let t=`#fnref--${e.node.id}`;function n(){if(typeof document>`u`)return;let e=document.querySelector(t);e?e.scrollIntoView({behavior:`smooth`}):console.warn(`Element with href: ${t} not found`)}return(r,i)=>(c(),W(`sup`,{id:`fnref-${e.node.id}`,class:`footnote-reference`,onClick:n},[F(`span`,{href:t,title:`查看脚注 ${e.node.id}`,class:`footnote-link cursor-pointer`},`[`+U(e.node.id)+`]`,9,kY)],8,OY))}}),[[`__scopeId`,`data-v-c1463a29`]]);AY.install=e=>{e.component(AY.__name,AY)};var jY=(()=>{try{return!1}catch{}return!1})();function MY(e){jY&&console.warn(e)}function NY(e,t=`safe`,n){return uK(e,t,n)}function PY(e){return mK(e)}function FY(e){return!0===e?``:!1===e?`false`:e==null?null:String(e)}function IY(e,t=`safe`){let n=String(e.tag||e.type||``).trim(),r=fK((i=e.attrs)?Array.isArray(i)?i.every(Array.isArray)?i.map(([e,t])=>[String(e),FY(t)]):i.filter(e=>e&&typeof e==`object`&&!Array.isArray(e)&&`name`in e).map(e=>[String(e.name),FY(e.value)]):Object.entries(i).map(([e,t])=>[e,FY(t)]):null,t,n);var i;if(!r)return;let a=PY(dK(r));return Object.keys(a).length>0?a:void 0}function LY(e,t,n=!1){let r=Object.entries(t??{}),i=r.length>0?r.map(([e,t])=>t===``?` ${e}`:` ${e}="${t}"`).join(``):``;return n?`<${e}${i} />`:`<${e}${i}>`}function RY(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function zY(e,t,n,r,i,o,s=!1){let c=function(e,t){return lK(e,t)}(e,r);if(JI.has(e.toLowerCase())||!c&&tK(e,o))return null;if(!c&&eK(e,o))return s?[LY(e,t,!0)]:[LY(e,t),...n,``];let l=uK(t,o,e),u=l.key,d=u!=null&&u!==``?u:i;return c?a(r[e]||r[e.toLowerCase()],lY(cY({},PY(l)),{key:d}),n.length>0?n:void 0):a(e,lY(cY({},l),{innerHTML:void 0,key:d}),n.length>0?n:void 0)}function BY(e,t){return yK(e,t)}function VY(e,t,n=`safe`){if(!e)return[];try{return function(e,t,n=`safe`){let r=0,i=[],a=[];for(let o of e)if(o.type===`text`)(i.length>0?i[i.length-1].children:a).push(o.content);else if(o.type===`self_closing`){let e=zY(o.tagName,o.attrs||{},[],t,`ms-html-`+ r++,n,!0);RY(i.length>0?i[i.length-1].children:a,e)}else if(o.type===`tag_open`)i.push({tagName:o.tagName,children:[],attrs:o.attrs,autoKey:`ms-html-`+ r++});else if(o.type===`tag_close`){let e=o.tagName.toLowerCase(),r=-1;for(let t=i.length-1;t>=0;t--)if(i[t].tagName.toLowerCase()===e){r=t;break}if(r!==-1)for(;i.length>r;){let o=i.pop(),s=zY(o.tagName,o.attrs||{},o.children,t,o.autoKey,n);i.length>0?RY(i[i.length-1].children,s):RY(a,s),o.tagName.toLowerCase()!==e&&i.length>r&&MY(`Auto-closing unclosed tag: <${o.tagName}>`)}else MY(`Ignoring closing tag with no matching opening tag: `)}for(;i.length>0;){let e=i.pop(),r=zY(e.tagName,e.attrs||{},e.children,t,e.autoKey,n);i.length>0?RY(i[i.length-1].children,r):RY(a,r),MY(`Auto-closing unclosed tag: <${e.tagName}>`)}return a}(gK(e),t,n)}catch(e){return r=e,jY&&console.error(`Failed to parse HTML to VNodes:`,r),null}var r}var HY=[`innerHTML`],UY=wY(G({__name:`HtmlInlineNode`,props:{node:{},customId:{},htmlPolicy:{}},setup(e){let t=e,n=m(`markstreamHtmlPolicy`,void 0),r=L(()=>t.htmlPolicy??n?.value??`safe`),i=bY(()=>t.customId),a=G({name:`DynamicRenderer`,props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),o=L(()=>{let e=t.node.content;if(!e)return{mode:`html`,content:``};if(r.value===`escape`)return{mode:`html`,content:bK(e,r.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:`text`,content:e};if(t.node.loading&&t.node.autoClosed){let t=VY(e,i.value,r.value);if(t!==null)return{mode:`dynamic`,nodes:t}}if(!BY(e,i.value))return{mode:`html`,content:bK(e,r.value)};let n=VY(e,i.value,r.value);return n===null?{mode:`html`,content:bK(e,r.value)}:{mode:`dynamic`,nodes:n}});return(e,n)=>o.value.mode===`dynamic`?(c(),W(`span`,{key:0,class:V([`html-inline-node`,{"html-inline-node--loading":t.node.loading}])},[v(z(a),{nodes:o.value.nodes},null,8,[`nodes`])],2)):o.value.mode===`text`?(c(),W(`span`,{key:1,class:V([`html-inline-node`,{"html-inline-node--loading":t.node.loading}])},U(o.value.content),3)):(c(),W(`span`,{key:2,class:V([`html-inline-node`,{"html-inline-node--loading":t.node.loading}]),innerHTML:o.value.content},null,10,HY))}}),[[`__scopeId`,`data-v-d17f12b0`]]);UY.install=e=>{e.component(UY.__name,UY)};var WY={class:`inline-code`},GY={key:0},KY=wY(G({__name:`InlineCodeNode`,props:{node:{}},setup(e){let n=e,r=b(),i=m(`markstreamFade`,void 0),a=m(`markstreamTextStreamState`,void 0),o=m(`markstreamStreamVersion`,void 0),l=L(()=>{let e=r.fade;return e===``||!0===e||e===`true`||!1!==e&&e!==`false`&&void 0}),u=L(()=>typeof l.value==`boolean`?l.value:typeof i?.value!=`boolean`||i.value),d=L(()=>String(n.node.code??``)),f=L(()=>!u.value),p=L(()=>{let e=r[`index-key`]??r.indexKey;return e==null||e===``?``:String(e)}),h=R(n.node.code),g=R(``),_=R(0),v;function y(){v?.(),v=void 0}function x(){y(),g.value&&=(h.value+=g.value,``)}s([()=>n.node.code,p,u],([e])=>{let t=String(e??``),n=p.value,r=XK({nextContent:t,persistedContent:n?a?.get(n):void 0,currentState:{settledContent:h.value,streamedDelta:g.value},typewriterEnabled:u.value});h.value=r.settledContent,g.value=r.streamedDelta,r.appended?(_.value+=1,function(){if(!g.value||v||!o)return;let e=o.value;v=s(()=>o.value,t=>{t!==e&&x()},{flush:`sync`})}()):g.value||y(),n&&a?.set(n,t)},{immediate:!0}),t(y);let S=L(()=>_.value%2==0?`inline-code-stream-delta--a`:`inline-code-stream-delta--b`);return(e,t)=>(c(),W(`code`,WY,[f.value?(c(),W(M,{key:0},[K(U(d.value),1)],64)):(c(),W(M,{key:1},[h.value?(c(),W(`span`,GY,U(h.value),1)):E(``,!0),g.value?(c(),W(`span`,{key:1,class:V([`inline-code-stream-delta`,[S.value]]),onAnimationend:x},U(g.value),35)):E(``,!0)],64))]))}}),[[`__scopeId`,`data-v-4e331c97`]]);KY.install=e=>{e.component(KY.__name,KY)};var qY=R(!1),JY=R(``),YY=R(`top`),XY=R(null),ZY=R(null),QY=R(null),$Y=R(null),eX=R(null),tX=null,nX=null,rX=0;function iX(){tX&&=(clearTimeout(tX),null),nX&&=(clearTimeout(nX),null)}var aX=!1,oX=null,sX=!1;function cX(e,t,n=`top`,r=!1,i,a){if(!e)return;let o=++rX;iX();let s=()=>uY(null,null,function*(){if(yield function(){return uY(this,null,function*(){if(!aX&&!sX&&typeof document<`u`){oX??=uY(null,null,function*(){let[{createApp:e,h:t},{default:n}]=yield Promise.all([he(()=>import(`./vue.runtime.esm-bundler-Cwbj1t-C.js`).then(e=>e.t),__vite__mapDeps([1,2])),he(()=>import(`./Tooltip-DbjeYWS5.js`),__vite__mapDeps([30,7,1,2]))]),r=document.createElement(`div`);r.setAttribute(`data-singleton-tooltip`,`1`),document.body.appendChild(r),e({setup:()=>()=>t(n,{visible:qY.value,"anchor-el":XY.value,content:JY.value,placement:YY.value,id:ZY.value,originX:QY.value,originY:$Y.value,isDark:eX.value??void 0})}).mount(r),aX=!0});try{yield oX}catch(e){aX=!1,oX=null,sX=!0,console.warn(`[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.`,e)}}})}(),aX&&o===rX){ZY.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,XY.value=e,JY.value=t,YY.value=n,QY.value=i?.x??null,$Y.value=i?.y??null,eX.value=typeof a==`boolean`?a:null,qY.value=!0;try{e.setAttribute(`aria-describedby`,ZY.value)}catch{}}});r?s():tX=setTimeout(s,80)}function lX(e=!1){rX+=1,iX();let t=()=>{if(XY.value&&ZY.value)try{XY.value.removeAttribute(`aria-describedby`)}catch{}qY.value=!1,XY.value=null,ZY.value=null,QY.value=null,$Y.value=null};e?t():nX=setTimeout(t,120)}var uX={"common.copy":`Copy`,"common.copied":`Copied`,"common.decrease":`Decrease`,"common.reset":`Reset`,"common.increase":`Increase`,"common.expand":`Expand`,"common.collapse":`Collapse`,"common.preview":`Preview`,"common.source":`Source`,"common.export":`Export`,"common.open":`Open`,"common.minimize":`Minimize`,"common.zoomIn":`Zoom in`,"common.zoomOut":`Zoom out`,"common.resetZoom":`Reset zoom`,"image.loadError":`Image failed to load`,"image.loading":`Loading image...`},dX=Symbol(`markstreamI18nFallback`);function fX(e,t){return t?.[e]??uX[e]}var pX=(e,t)=>fX(e,t)??function(e){return(e.split(`.`).pop()||e).replace(/[_-]/g,` `).replace(/([A-Z])/g,` $1`).replace(/\s+/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}(e);function mX(e,t){return{t(n){let r=fX(n,t);if(e.te&&r!=null&&!e.te(n))return pX(n,t);let i=e.t(n);return i===n&&r!=null?pX(n,t):i}}}function hX(){let e=function(){try{let e=y(),t=dX,n=e?.provides,r=e?.appContext?.provides;return n?.[t]??r?.[t]??null}catch{}return null}(),t=function(){try{let e=y(),t=e?.proxy,n=t?.$t;if(typeof n==`function`){let e=t?.$te;return{t:n.bind(t),te:typeof e==`function`?e.bind(t):void 0}}let r=e?.appContext?.config?.globalProperties,i=r?.$t;if(typeof i==`function`){let e=r?.$te;return{t:i.bind(r),te:typeof e==`function`?e.bind(r):void 0}}}catch{}return null}();if(t)return mX(t,e);try{let t=globalThis.$vueI18nUse||null;if(t&&typeof t==`function`)try{let n=t();if(n&&typeof n.t==`function`)return mX({t:n.t.bind(n),te:typeof n.te==`function`?n.te.bind(n):void 0},e)}catch{}}catch{}return{t:t=>pX(t,e)}}var gX=Symbol(`ViewportPriority`),_X=Symbol(`ViewportPriorityOptions`),vX=Symbol(`OffscreenHeavyNodeDeferral`),yX=L(()=>!1),bX=`400px`;function xX(){return m(_X,void 0)}function SX(){return m(vX,yX)}function CX(e,t){let n=typeof window<`u`&&typeof document<`u`,r=typeof t==`boolean`?R(t):t,i=n?window.requestIdleCallback??(e=>window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),16)):null,a=n?window.cancelIdleCallback??(e=>window.clearTimeout(e)):null,o=new WeakMap,c=1,l=new Map,u=new Map,f=new Set,p=null,m=null;function h(e){if(!e)return`viewport`;let t=o.get(e);return t||(t=c++,o.set(e,t)),String(t)}function g(){if(p!=null){try{a?.(p)}catch{}p=null}}function _(e){if(e){let t=l.get(e);if(t&&!t.targets.size){try{t.io.disconnect()}catch{}l.delete(e)}}u.size||f.size||g()}function v(e){let t=u.get(e);if(!t)return;let n=l.get(t.bucketKey);if(!t.visible.value){t.visible.value=!0;try{t.resolve()}catch{}}try{n?.io.unobserve(e)}catch{}n?.targets.delete(e),u.delete(e),f.delete(e),_(t.bucketKey)}function y(){!0!==window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__&&i&&p==null&&f.size&&(p=i(()=>{p=null;let e=f.values().next().value;e&&(f.delete(e),v(e),f.size&&y())},{timeout:1200}))}function b(t,r){if(!n||typeof IntersectionObserver>`u`)return null;let i=function(t,n){return{root:e?.(t??null)??null,rootMargin:n?.rootMargin??bX,threshold:n?.threshold??0}}(t,r),a=[h((o=i).root),o.rootMargin,o.threshold].join(`\0`);var o;let s=l.get(a);if(s)return{key:a,bucket:s};let c;try{c=new IntersectionObserver(e=>{for(let t of e)(t.isIntersecting||t.intersectionRatio>0)&&v(t.target)},{root:i.root,rootMargin:i.rootMargin,threshold:i.threshold})}catch{return null}let u={io:c,targets:new Map};return l.set(a,u),{key:a,bucket:u}}function x(){if(n&&r.value)for(let[e,t]of Array.from(u.entries())){let n=b(e,t.opts);if(!n){v(e);continue}if(n.key===t.bucketKey)continue;let r=t.bucketKey,i=l.get(r);try{i?.io.unobserve(e)}catch{}i?.targets.delete(e),t.bucketKey=n.key,n.bucket.targets.set(e,t),n.bucket.io.observe(e),_(r)}}s(r,e=>{if(!e){for(let e of Array.from(u.keys()))v(e);g()}},{flush:`sync`});let S=(e,t)=>{let i=R(!1),a,o=!1,s=new Promise(e=>{a=()=>{o||(o=!0,e())}}),c=()=>{let t=u.get(e);if(!t)return f.delete(e),void _();let n=l.get(t.bucketKey);try{n?.io.unobserve(e)}catch{}n?.targets.delete(e),u.delete(e),f.delete(e),_(t.bucketKey)};if(!n||!r.value)return i.value=!0,a(),{isVisible:i,whenVisible:s,destroy:c};let d=b(e,t);if(!d)return i.value=!0,a(),{isVisible:i,whenVisible:s,destroy:c};let p={resolve:a,visible:i,bucketKey:d.key,opts:t};return u.set(e,p),d.bucket.targets.set(e,p),d.bucket.io.observe(e),n&&m==null&&(m=window.requestAnimationFrame(()=>{m=null,x()})),!1!==t?.allowIdle&&(f.add(e),y()),{isVisible:i,whenVisible:s,destroy:c}};return S.refresh=x,d(gX,S),S}function wX(){let e=m(gX,void 0);if(e)return e;let t=new WeakMap,n=new Map,r=new Set,i=null,a=typeof window<`u`?window.requestIdleCallback??(e=>window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),16)):null,o=typeof window<`u`?window.cancelIdleCallback??(e=>window.clearTimeout(e)):null,s=()=>{if(i!=null){try{o?.(i)}catch{}i=null}},c=e=>{if(!e)return;let t=n.get(e);if(t&&!t.targets.size){try{t.io.disconnect()}catch{}n.delete(e)}},l=e=>{let i=t.get(e);if(!i)return;let a=n.get(i.bucketKey);if(!i.visible.value){i.visible.value=!0;try{i.resolve()}catch{}}try{a?.io.unobserve(e)}catch{}t.delete(e),a?.targets.delete(e),r.delete(e),c(i.bucketKey),r.size||s()},u=()=>{!0!==window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__&&a&&i==null&&r.size&&(i=a(()=>{i=null;let e=r.values().next().value;e&&(r.delete(e),l(e),r.size&&u())},{timeout:1200}))};return(e,i)=>{let a=R(!1),o,d=!1,f=new Promise(e=>{o=()=>{d||(d=!0,e())}}),p=()=>{let i=t.get(e);if(!i)return r.delete(e),void(r.size||s());let a=n.get(i.bucketKey);try{a?.io.unobserve(e)}catch{}t.delete(e),a?.targets.delete(e),r.delete(e),c(i.bucketKey),r.size||s()},m=(e=>{if(typeof window>`u`||typeof IntersectionObserver>`u`)return null;let t=(e=>[e?.rootMargin??bX,e?.threshold??0].join(`\0`))(e),r=n.get(t);if(r)return{key:t,bucket:r};let i=e?.rootMargin??bX,a;try{a=new IntersectionObserver(e=>{for(let t of e)(t.isIntersecting||t.intersectionRatio>0)&&l(t.target)},{root:null,rootMargin:i,threshold:e?.threshold??0})}catch{return null}let o={io:a,targets:new Set};return n.set(t,o),{key:t,bucket:o}})(i);return m?(t.set(e,{resolve:o,visible:a,bucketKey:m.key}),m.bucket.targets.add(e),m.bucket.io.observe(e),!1!==i?.allowIdle&&(r.add(e),u()),{isVisible:a,whenVisible:f,destroy:p}):(a.value=!0,o(),{isVisible:a,whenVisible:f,destroy:p})}}function TX(e,t){let n=e.indexKey??t[`index-key`]??t.indexKey;return n==null||n===``?``:String(n)}var EX=[`data-markstream-viewport-pending`],DX=[`src`,`alt`,`title`,`loading`,`fetchpriority`,`decoding`,`tabindex`,`aria-label`],OX={key:1,class:`image-placeholder`},kX={key:1,class:`image-node__raw-text`},AX={key:2,class:`image-shimmer-overlay`},jX={key:1,class:`image-node__raw-text`},MX={key:3,class:`image-error`},NX=wY(G({__name:`ImageNode`,props:{node:{},fallbackSrc:{default:``},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:[`load`,`error`,`click`],setup(e,{emit:t}){var r;let i=e,a=t,o=R(!1),l=R(!1),u=R(``),d=R(`primary`),f=R(null),p=b(),h=m(pq,null),g=wX(),_=xX(),v=SX(),x=L(()=>dL(i.node.src)),S=L(()=>dL(i.fallbackSrc)),C=((r=y()?.vnode.el)?.querySelector)?.call(r,`img`),w=typeof window<`u`&&C?.getAttribute(`src`)===(x.value||S.value),T=R(typeof window>`u`||w||!v.value),D=ue(null),O=``,k=null,A=L(()=>u.value),j=L(()=>!i.lazy),M=L(()=>typeof window<`u`&&v.value&&!w),N=L(()=>!M.value||T.value),ee=L(()=>N.value?A.value:``),P=L(()=>_?.value.heavyBlockMargin??_?.value.rootMargin??bX),I=L(()=>!i.node.loading&&d.value!==`failed`&&u.value.length>0),te=L(()=>d.value===`failed`),re=L(()=>(!j.value||M.value&&!T.value)&&!o.value&&!l.value&&d.value!==`failed`&&u.value.length>0),ie=L(()=>TX(i,p));function ae(e=ie.value){e&&f.value&&h?.reportHeight(e,f.value.offsetHeight)}function oe(e=ie.value){e&&n(()=>{ae(e)})}function se(){k&&=(clearTimeout(k),null)}function ce(){let e=ie.value;e&&O!==e&&(O&&h?.markSettled(O),se(),O=e,h?.markPending(e),typeof window<`u`&&(k=window.setTimeout(()=>{O===e&&(oe(e),B())},8e3)))}function B(){return uY(this,null,function*(){let e=O;e&&(se(),O=``,yield n(),ae(e),h?.markSettled(e))})}function le(){if(d.value===`primary`&&S.value&&S.value!==u.value)return d.value=`fallback`,u.value=S.value,o.value=!1,l.value=!1,void oe();d.value=`failed`,l.value=!0,a(`error`,u.value),oe()}function de(){o.value=!0,l.value=!1,a(`load`,A.value),oe()}function fe(e){e.preventDefault(),o.value&&!l.value&&a(`click`,[e,A.value])}let{t:H}=hX();return s([x,S,()=>i.node.loading],()=>(o.value=!1,l.value=!1,i.node.loading||x.value?(u.value=x.value,void(d.value=`primary`)):S.value?(u.value=S.value,void(d.value=`fallback`)):(u.value=``,d.value=`failed`,void(l.value=!0))),{immediate:!0}),typeof window<`u`&&s([f,M],([e,t],n,r)=>{var i;if((i=D.value)==null||i.destroy(),D.value=null,!t||T.value)return void(T.value=!0);if(!e)return void(T.value=!1);let a=!0,o=g(e,{rootMargin:P.value,allowIdle:!1});D.value=o,T.value=o.isVisible.value,o.whenVisible.then(()=>{a&&D.value===o&&(T.value=!0)}),r(()=>{a=!1,o.destroy(),D.value===o&&(D.value=null)})},{immediate:!0}),s([I,o,l,A,()=>i.lazy,N],([e,t,n,r,i,a])=>e&&r&&!n&&a?t?(B(),void oe()):i?(ce(),void oe()):void(t||n||ce()):(B(),void oe()),{flush:`post`,immediate:!0}),ne(()=>{var e;(e=D.value)==null||e.destroy(),D.value=null,function(){let e=O;e&&(se(),O=``,h?.markSettled(e))}()}),(t,n)=>(c(),W(`span`,{ref_key:`rootRef`,ref:f,class:`image-node-container`,"data-markstream-viewport-pending":M.value&&!T.value?`true`:void 0},[I.value?(c(),W(`img`,{key:0,src:ee.value||void 0,alt:String(i.node.alt??i.node.title??``),title:String(i.node.title??i.node.alt??``),class:V([`image-node__img`,{"is-loading":!j.value&&!o.value,"is-loaded":j.value||o.value,"has-natural-size":o.value,"cursor-pointer":o.value}]),loading:i.lazy?`lazy`:void 0,fetchpriority:j.value?`high`:void 0,decoding:j.value?`sync`:`async`,tabindex:o.value?0:-1,"aria-label":i.node.alt??z(H)(`image.preview`),onError:le,onLoad:de,onClick:fe},null,42,DX)):E(``,!0),e.node.loading&&!l.value?(c(),W(`span`,OX,[i.usePlaceholder?me(t.$slots,`placeholder`,{key:0,node:i.node,displaySrc:A.value,imageLoaded:o.value,hasError:l.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[n[0]||=F(`span`,{class:`image-shimmer`},null,-1)],!0):(c(),W(`span`,kX,U(e.node.raw),1))])):E(``,!0),re.value&&!e.node.loading?(c(),W(`span`,AX,[i.usePlaceholder?me(t.$slots,`placeholder`,{key:0,node:i.node,displaySrc:A.value,imageLoaded:o.value,hasError:l.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[n[1]||=F(`span`,{class:`image-shimmer`},null,-1)],!0):(c(),W(`span`,jX,U(e.node.raw),1))])):E(``,!0),te.value?(c(),W(`span`,MX,[me(t.$slots,`error`,{node:i.node,displaySrc:A.value,imageLoaded:o.value,hasError:l.value,fallbackSrc:i.fallbackSrc,lazy:i.lazy},()=>[n[2]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`},[F(`path`,{fill:`currentColor`,d:`M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z`})],-1),F(`span`,null,U(z(H)(`image.loadError`)),1)],!0)])):E(``,!0)],8,EX))}}),[[`__scopeId`,`data-v-046e82ac`]]);NX.install=e=>{e.component(NX.__name,NX)};var PX={key:2},FX=G({__name:`NodeChildRenderer`,props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){let t=e,n=bY(()=>t.customId),r=m(`markstreamHtmlPolicy`,void 0),a=m(`markstreamNestedRendererProps`,void 0),o=L(()=>r?.value??`safe`),s=L(()=>{let e=a?.value??{};return lY(cY({},e),{customId:t.customId??e.customId,htmlPolicy:o.value})}),l=i({loader:()=>Promise.resolve().then(()=>F0),suspensible:!1}),u=L(()=>t.components[String(t.node.type)]),d=L(()=>!!(u.value&&n.value[t.node.type]&&!_Y(String(t.node.type)))),f=L(()=>d.value?IY(t.node,o.value):void 0),p=L(()=>Array.isArray(t.node.children)&&t.node.children.length>0),h=L(()=>String(t.node.content??``)),g=L(()=>String(t.node.content??t.node.raw??``));return(t,n)=>u.value&&d.value?(c(),P(x(u.value),re({key:0},f.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":s.value.isDark}),{default:B(()=>[p.value?(c(),P(z(l),re({key:0},s.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):h.value?(c(),P(z(l),re({key:1},s.value,{content:h.value,final:!e.node.loading,"index-key":`${e.indexKey||`child`}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):E(``,!0)]),_:1},16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):u.value?(c(),P(x(u.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,[`node`,`custom-id`,`index-key`])):e.fallbackToText?(c(),W(`span`,PX,U(g.value),1)):E(``,!0)}}),IX=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function LX(e){var t;if(typeof e==`boolean`)return e;if(e&&typeof e==`object`){let n=e;return lY(cY(cY({},IX),n),{enabled:(t=n.enabled)==null||t})}return cY({},IX)}function RX(e,t){if(!1===e.renderSideBySide)return!0;if(!0!==e.useInlineViewWhenSpaceIsLimited)return!1;let n=e.renderSideBySideInlineBreakpoint;return t>0&&t<=(typeof n==`number`&&Number.isFinite(n)?n:900)}function zX(e){let t=String(e??``).split(/\r?\n/,1)[0]?.trim()??``;if(t.length<3)return``;let n=t[0];if(n!=="`"&&n!==`~`||t[1]!==n||t[2]!==n)return``;let r=3;for(;t[r]===n;)r+=1;return t.slice(r).trim()}function BX(e){return(String(e??``).trim().split(/\s+/,1)[0]??``)===`diff`}function VX(e){return!0===e.diff||BX(e.language)||BX(zX(String(e.raw??``)))}function HX(e,t,n){let r=function(e){let t=zX(e);if(!t)return``;let n=t.split(/\s+/).filter(Boolean);if(!n.length)return``;let r=n[0]===`diff`?n.slice(1):n;for(let e of r){let t=e.includes(`:`)?e.slice(e.indexOf(`:`)+1):e;if(t&&/[./\\-]/.test(t))return t}return``}(e);return{title:r||t,caption:r?n?`Diff / ${t}`:t:``}}var UX=[`aria-busy`,`aria-label`,`data-language`,`data-markstream-line-numbers`],WX={key:0,translate:`no`,class:`markstream-pre__diff-code`},GX={class:`markstream-pre__diff-pane-content`},KX={class:`markstream-pre__diff-number`,"aria-hidden":`true`},qX={class:`markstream-pre__diff-content`},JX={class:`markstream-pre__diff-content-inner`},YX={key:0,class:`markstream-pre__line-numbers`,"aria-hidden":`true`},XX=[`textContent`],ZX=[`textContent`],QX=G({__name:`PreCodeNode`,props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){let t=e;function r(e,t){let n=String(e??``);return t?n:n.replace(/\r\n$|\n$|\r$/,``)}let i=L(()=>{let e=String(t.node?.language??``);return String(String(e).split(/\s+/g)[0]??``).toLowerCase().replace(/[^\w-]/g,``)||`plaintext`}),a=L(()=>`language-${i.value}`),o=L(()=>!0===t.loading||!0===t.node?.loading),l=L(()=>r(t.node?.code,o.value)),u=``,d=1,f=L(()=>function(e){let t=0,n=1;e.startsWith(u)&&(t=u.length,n=d,t>0&&e[t-1]===`\r`&&e[t]===` `&&t++);for(let r=t;rl.value.split(/\r\n|\n|\r/)),m=0,h=``,g=L(()=>{let e=f.value;e!0===t.showLineNumbers&&!0===t.node?.diff),y=L(()=>v.value&&!0===t.diffInline),b=L(()=>{let e=Number(t.reservedHeightPx);if(!Number.isFinite(e)||e<=0)return;let n=`${Math.ceil(e)}px`;return o.value?{maxHeight:n,overflow:`auto`}:{height:n,minHeight:n,maxHeight:n,overflow:`auto`}}),x=[`diff `,`index `,`--- `,`+++ `,`@@ `];function S(e){return String(e??``).trim().length===0}function C(e,t=`context`,n={}){let r=S(e);return{code:e,kind:r&&t!==`hunk`&&t!==`spacer`&&!n.preserveBlankKind?`context`:t,empty:r}}function w(e){let t=r(e,o.value);return t?t.split(/\r\n|\n|\r/):[]}function T(e,t){return!S(e[t])||tx.some(t=>e.startsWith(t)))}function A(e,t){return t||!e.startsWith(` `)||e.startsWith(` `)?e:` ${e}`}function j(e,t){let n=e.length,r=t.length,i=[],a=0;for(;a=a&&l>=a&&e[c]===t[l];)s.unshift({originalIndex:c,modifiedIndex:l}),c--,l--;let u=c-a+1,d=l-a+1;if(u<=0||d<=0||o.value||(u+1)*(d+1)>15e5)return i.concat(s);let f=d+1,p=new Uint32Array((u+1)*(d+1));for(let n=u-1;n>=0;n--)for(let r=d-1;r>=0;r--){let i=n*f+r;if(e[a+n]===t[a+r])p[i]=p[(n+1)*f+r+1]+1;else{let e=p[(n+1)*f+r],t=p[n*f+r+1];p[i]=e>=t?e:t}}let m=[],h=0,g=0;for(;h=p[h*f+g+1]?h++:g++;return i.concat(m,s)}function N(e){let n=function(){let e=t.diffHideUnchangedRegions;if(e==null||!1===e)return null;let n=!0===e?{}:e;return!1===n.enabled?null:{contextLineCount:Math.max(0,Math.floor(n.contextLineCount??2)),minimumLineCount:Math.max(1,Math.floor(n.minimumLineCount??4))}}();if(!n||e.length<1||e.length>2||e.length===2&&e[0].lines.length!==e[1].lines.length)return e;let r=e[0].lines,i=e[1]?.lines,a=e=>r[e].kind===`context`&&(i===void 0||i[e].kind===`context`&&r[e].code===i[e].code),o=[],s=0;for(;s=n.minimumLineCount){let i=e+(e===0?0:n.contextLineCount),a=t-(t===r.length?0:n.contextLineCount);a-i>=n.minimumLineCount&&o.push({start:i,end:a})}s===e&&s++}return o.length?e.map((e,t)=>{let n=[],r=0;for(let i of o)n.push(...e.lines.slice(r,i.start)),n.push({code:t===0?`Unmodified lines`:``,kind:`collapsed`,empty:!1,key:`${e.key}-collapsed-${i.start}-${i.end}`,number:``}),r=i.end;return n.push(...e.lines.slice(r)),lY(cY({},e),{lines:n})}):e}let ee=L(()=>{if(!v.value)return[];let e=function(e){let n=e.some(e=>D(e)),r=e.some(e=>O(e));return n&&r||function(){if(i.value===`diff`)return!0;let e=String(t.node?.raw??``).split(/\r?\n/,1)[0]?.trim()??``;return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(e)}()&&(n||r)}(p.value),n=function(){return t.node?.originalCode!=null||t.node?.updatedCode!=null}();if(y.value)return N([{key:`inline`,className:`markstream-pre__diff-pane--inline`,lines:n?function(e,t){let n=w(e),r=w(t),i=j(n,r);if(i.length>0){let e=[],t=0,a=0;for(let o of i){for(;t=o&&c>=o&&n[s]===r[c];)l.unshift(lY(cY({},C(r[c])),{key:`inline-suffix-${c}`,number:c+1})),s--,c--;for(let e=o;e<=s;e++)a.push(lY(cY({},C(n[e],`removed`,{preserveBlankKind:T(n,e)})),{key:`inline-removed-source-${e}`,number:e+1}));for(let e=o;e<=c;e++)a.push(lY(cY({},C(r[e],`added`,{preserveBlankKind:T(r,e)})),{key:`inline-added-source-${e}`,number:e+1}));return a.concat(l)}(t.node?.originalCode,t.node?.updatedCode):function(e){let t=[],n=1,r=1,i=k(e);for(let[a,o]of e.entries())if(o.startsWith(`@@`)){let e=o.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);e&&(n=Number(e[1]),r=Number(e[2])),t.push(lY(cY({},C(o,`hunk`)),{key:`inline-hunk-${a}`,number:``}))}else if(D(o))t.push(lY(cY({},C(A(o.slice(1),i),`removed`,{preserveBlankKind:!0})),{key:`inline-removed-${a}`,number:n++}));else if(O(o))t.push(lY(cY({},C(A(o.slice(1),i),`added`,{preserveBlankKind:!0})),{key:`inline-added-${a}`,number:r++}));else{let e=i&&o.startsWith(` `)?o.slice(1):o;t.push(lY(cY({},C(e)),{key:`inline-context-${a}`,number:r})),n++,r++}return t}(p.value)}]);if(!e&&n)return function(e,t){let n=w(e),r=w(t),i=j(n,r),a=[],o=[],s=0,c=0,l=0,u=(e,t)=>{let i=Math.max(e-s,t-c);for(let u=0;ulY(cY({},e),{key:`original-${t}`,number:t+1}))},{key:`modified`,className:`markstream-pre__diff-pane--modified`,lines:a.map((e,t)=>lY(cY({},e),{key:`modified-${t}`,number:t+1}))}])}),P=L(()=>ee.value.some(e=>e.lines.some(e=>e.kind===`collapsed`))),I=L(()=>{let e=i.value;return e?`Code block: ${e}`:`Code block`}),te=R(null),re=R([]),ie=null,oe=!1,se=null;function z(e){let t=Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:0}function ce(e,t){if(!e)return t;if(e.classList.contains(`markstream-pre__diff-line--collapsed`))return 32;let n=e.querySelector(`.markstream-pre__diff-content`)?.getBoundingClientRect()?.height??0;return Math.max(t,Math.ceil(n))}function B(){oe||typeof window>`u`||(ie!=null&&window.cancelAnimationFrame(ie),ie=window.requestAnimationFrame(()=>{ie=null,oe||function(){ie=null;let e=te.value;if(!e||!v.value||y.value||!e.classList.contains(`is-wrap`))return void(re.value.length&&(re.value=[]));let t=function(e){let t=window.getComputedStyle(e),n=z(t.getPropertyValue(`--markstream-pre-diff-line-height`));if(n>0)return n;let r=z(t.lineHeight);return r>0?r:18}(e),n=Array.from(e.querySelectorAll(`.markstream-pre__diff-pane--original .markstream-pre__diff-line`)),r=Array.from(e.querySelectorAll(`.markstream-pre__diff-pane--modified .markstream-pre__diff-line`)),i=Math.max(n.length,r.length),a=[];for(let e=0;e{let n=s[t];return n&&Math.abs(e.rowHeight-n.rowHeight)<=.5&&Math.abs(e.originalHeight-n.originalHeight)<=.5&&Math.abs(e.modifiedHeight-n.modifiedHeight)<=.5})||(re.value=a)}()}))}function le(e){se?.disconnect(),se=null,e&&v.value&&!y.value&&typeof ResizeObserver<`u`&&(se=new ResizeObserver(()=>{B()}),se.observe(e))}function ue(e,t){let n=re.value[e];if(!n)return;let r=t===`original`?n.originalHeight:n.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(n.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(r)}px`}}return s(te,e=>{le(e),n(()=>B())},{flush:`post`}),s([v,y,ee],()=>{le(te.value),n(()=>B())},{flush:`post`,immediate:!0}),ne(()=>{oe=!0,ie!=null&&(window.cancelAnimationFrame(ie),ie=null),se?.disconnect(),se=null}),(e,n)=>(c(),W(`pre`,{ref_key:`preRef`,ref:te,style:ae(b.value),class:V([a.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":v.value,"markstream-pre--diff-inline":y.value,"markstream-pre--diff-collapsed":P.value}]),"aria-busy":o.value,"aria-label":I.value,"data-language":i.value,"data-markstream-line-numbers":t.showLineNumbers?`1`:void 0,"data-markstream-pre":`1`,tabindex:`0`},[v.value?(c(),W(`code`,WX,[(c(!0),W(M,null,_(ee.value,e=>(c(),W(`span`,{key:e.key,class:V([`markstream-pre__diff-pane`,e.className])},[F(`span`,GX,[(c(!0),W(M,null,_(e.lines,(t,r)=>(c(),W(`span`,{key:t.key,class:V([`markstream-pre__diff-line`,[`markstream-pre__diff-line--${t.kind}`,{"markstream-pre__diff-line--empty":t.empty}]]),style:ae(ue(r,e.key))},[n[0]||=F(`span`,{class:`markstream-pre__diff-rail`,"aria-hidden":`true`},null,-1),F(`span`,KX,U(t.number),1),F(`span`,qX,[F(`span`,JX,U(t.code),1)])],6))),128))])],2))),128))])):(c(),W(M,{key:1},[t.showLineNumbers?(c(),W(`span`,YX,[F(`span`,{class:`markstream-pre__line-numbers-text`,textContent:U(g.value)},null,8,XX)])):E(``,!0),F(`code`,{translate:`no`,class:`markstream-pre__code`,textContent:U(l.value)},null,8,ZX)],64))],14,UX))}});QX.install=e=>{e.component(QX.__name,QX)};var $X={key:0},eZ=wY(G({__name:`TextNode`,props:{node:{}},emits:[`copy`],setup(e){let n=e,r=b(),i=m(`markstreamFade`,void 0),a=m(`markstreamTextStreamState`,void 0),o=m(`markstreamStreamVersion`,void 0),l=L(()=>{let e=r.fade;return e===``||!0===e||e===`true`||!1!==e&&e!==`false`&&void 0}),u=L(()=>typeof l.value==`boolean`?l.value:typeof i?.value!=`boolean`||i.value),d=L(()=>{let e=r[`index-key`]??r.indexKey;return e==null||e===``?``:String(e)}),f=R(n.node.content),p=R(``),h=R(0),g;function _(){g?.(),g=void 0}function v(){_(),p.value&&=(f.value+=p.value,``)}s([()=>n.node.content,d,u],([e])=>{let t=String(e??``),n=d.value,r=XK({nextContent:t,persistedContent:n?a?.get(n):void 0,currentState:{settledContent:f.value,streamedDelta:p.value},typewriterEnabled:u.value});f.value=r.settledContent,p.value=r.streamedDelta,r.appended?(h.value+=1,function(){if(!p.value||g||!o)return;let e=o.value;g=s(()=>o.value,t=>{t!==e&&v()},{flush:`sync`})}()):p.value||_(),n&&a?.set(n,t)},{immediate:!0}),t(_);let y=L(()=>h.value%2==0?`text-node-stream-delta--a`:`text-node-stream-delta--b`);return(t,n)=>(c(),W(`span`,{class:V([[e.node.center?`text-node-center`:``],`text-node`])},[f.value?(c(),W(`span`,$X,U(f.value),1)):E(``,!0),p.value?(c(),W(`span`,{key:1,class:V([`text-node-stream-delta`,[y.value]]),onAnimationend:v},U(p.value),35)):E(``,!0)],2))}}),[[`__scopeId`,`data-v-a7e90764`]]);function tZ(e,t,n){return G({name:e,inheritAttrs:!1,setup(e,{attrs:r,slots:i}){let o=wX(),c=xX(),l=SX(),u=typeof window<`u`&&y()?.vnode.el?.nodeType===1,d=R(typeof window>`u`||u||!l.value),f=ue(null),p=null;function m(e){let t=e&&`$el`in e?e.$el:e;f.value=t instanceof HTMLElement?t:null}return typeof window<`u`&&s([f,l],([e,t],n,r)=>{if(p?.destroy(),p=null,!t||d.value)return void(d.value=!0);if(!e)return;let i=!0,a=o(e,{rootMargin:c?.value.heavyBlockMargin,allowIdle:!1});p=a,d.value=a.isVisible.value,a.whenVisible.then(()=>{i&&p===a&&(d.value=!0)}),r(()=>{i=!1,a.destroy(),p===a&&(p=null)})},{immediate:!0}),ne(()=>{p?.destroy(),p=null}),()=>a(d.value?t:n,lY(cY({},r),{ref:m}),i)}})}eZ.install=e=>{e.component(eZ.__name,eZ)};var nZ=G({name:`CodeBlockNodeLoading`,inheritAttrs:!1,props:`node.isDark.loading.stream.theme.darkTheme.lightTheme.isShowPreview.monacoOptions.enableFontSizeControl.minWidth.maxWidth.themes.showHeader.showCopyButton.showExpandButton.showPreviewButton.showCollapseButton.showFontSizeButtons.showTooltips.htmlPreviewAllowScripts.htmlPreviewSandbox.customId.estimatedHeightPx.estimatedContentHeightPx.estimatedDiffInline`.split(`.`),emits:[`previewCode`,`copy`],setup(e,{attrs:t}){let n=e;return()=>{let e=Aq(String(n.node?.language??``)),r=Nq[e]||(e?e.charAt(0).toUpperCase()+e.slice(1):Nq[``]),i=VX(n.node),o=HX(String(n.node?.raw??``),r,i),s=n.monacoOptions,c=i&&(n.estimatedDiffInline??RX(s??{},typeof window>`u`?0:window.innerWidth)),l=s?.diffAppearance,u=l===`dark`||l!==`light`&&!0===n.isDark,d=typeof s?.fontSize==`number`&&Number.isFinite(s.fontSize)&&s.fontSize>0?s.fontSize:12,f=typeof s?.lineHeight==`number`&&Number.isFinite(s.lineHeight)&&s.lineHeight>0?s.lineHeight:d===12?18:Math.max(12,Math.round(1.5*d)),p=typeof s?.tabSize==`number`&&Number.isFinite(s.tabSize)&&s.tabSize>0?s.tabSize:4,m=i?0:8,h=typeof s?.padding?.top==`number`&&Number.isFinite(s.padding.top)&&s.padding.top>=0?s.padding.top:m,g=typeof s?.padding?.bottom==`number`&&Number.isFinite(s.padding.bottom)&&s.padding.bottom>=0?s.padding.bottom:m,_=typeof s?.fontFamily==`string`?s.fontFamily.trim():``,v=cY(cY({fontSize:`${d}px`,lineHeight:`${f}px`,tabSize:p,paddingTop:`${h}px`,paddingBottom:`${g}px`,"--markstream-pre-line-number-top":`${h}px`},i?{"--markstream-pre-diff-line-height":`${f}px`}:{}),_?{"--markstream-code-font-family":_}:{}),y=()=>a(`button`,{class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0`,"aria-hidden":`true`,disabled:!0,tabindex:-1,type:`button`},[a(`svg`,{class:`action-icon`})]),b=!1!==n.isShowPreview&&(e===`html`||e===`svg`),x=!1!==n.showFontSizeButtons&&!1!==n.enableFontSizeControl||!1!==n.showExpandButton||b&&!1!==n.showPreviewButton,S=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},C=cY(cY(cY({"--markstream-code-layout-character-width":`1ch`},S(n.minWidth)?{minWidth:S(n.minWidth)}:{}),S(n.maxWidth)?{maxWidth:S(n.maxWidth)}:{}),i?{}:{color:`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))`,backgroundColor:`var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))`,borderColor:`var(--markstream-code-border-color, var(--code-border))`});return a(`div`,lY(cY({},t),{class:[`code-block-container`,`rounded-lg`,`border`,{dark:!0===n.isDark,"is-rendering":!1!==n.loading,"is-dark":u,"is-diff":i,"is-plain-text":e===``||e===`plaintext`||e===`text`},t.class],style:[C,t.style],"data-markstream-code-block":`1`,"data-markstream-enhanced":`false`,"data-markstream-code-block-state":n.loading?`streaming`:`settled`,"data-markstream-code-loading":`1`}),[!1===n.showHeader?null:a(`div`,{class:`code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]`},[a(`div`,{class:`code-header-main`},[a(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`}),a(`div`,{class:`code-header-copy`},[a(`div`,{class:`code-header-title`},o.title),o.caption?a(`div`,{class:`code-header-caption`},o.caption):null])]),a(`div`,{class:`flex items-center gap-0.5`,style:{visibility:`hidden`}},[i?a(`div`,{class:`code-diff-stats`,"aria-hidden":`true`},[a(`span`,{class:`code-diff-stat removed`},`-0`),a(`span`,{class:`code-diff-stat added`},`+0`)]):null,!1===n.showCopyButton?null:y(),!1===n.showCollapseButton?null:y(),x?a(`div`,{class:`relative`},[y()]):null])]),a(`div`,{class:`code-block-shell-content`,style:!1!==n.stream||!1===n.loading?void 0:{display:`none`}},[a(QX,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:i?void 0:n.estimatedContentHeightPx,diffInline:c,diffHideUnchangedRegions:i?LX(s?.diffHideUnchangedRegions):void 0,class:`code-pre-fallback`,style:v,"data-markstream-code-loading":`1`})]),a(`div`,{class:`code-loading-placeholder`,style:!1===n.stream&&!1!==n.loading?void 0:{display:`none`}},[a(`div`,{class:`loading-skeleton`},[a(`div`,{class:`skeleton-line`}),a(`div`,{class:`skeleton-line`}),a(`div`,{class:`skeleton-line short`})])]),a(`span`,{class:`sr-only`,"aria-live":`polite`,role:`status`})])}}}),rZ=tZ(`ViewportDeferredCodeBlockNode`,i({loader:()=>uY(null,null,function*(){try{return(yield he(()=>import(`./CodeBlockNode-uERC4D15.js`),__vite__mapDeps([31,7,1,2]))).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".`,e),QX}}),loadingComponent:nZ,delay:0,suspensible:!1}),nZ),iZ=i(()=>uY(null,null,function*(){if(function(){return Reflect.get(globalThis,`process`)?.env}()?.NODE_ENV===`test`&&typeof window<`u`)return e=>a(eZ,lY(cY({},e),{node:{type:`text`,content:e.node.raw??`$${e.node.content??``}$`,raw:e.node.raw??`$${e.node.content??``}$`}}));try{return yield qq(),(yield he(()=>import(`./index7-ClZ3JBPh.js`),__vite__mapDeps([32,1,2]))).default}catch(e){console.warn(`[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".`,e)}return e=>a(eZ,lY(cY({},e),{node:{type:`text`,content:e.node.raw??`$${e.node.content??``}$`,raw:e.node.raw??`$${e.node.content??``}$`}}))})),aZ=i(()=>uY(null,null,function*(){try{return yield qq(),(yield he(()=>import(`./index6-KRBW8xCP.js`),__vite__mapDeps([33,1,2]))).default}catch(e){console.warn(`[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".`,e)}return e=>a(eZ,lY(cY({},e),{node:{type:`text`,content:e.node.raw??`$$${e.node.content??``}$$`,raw:e.node.raw??`$$${e.node.content??``}$$`}}))})),oZ=wY(G({__name:`ReferenceNode`,props:{node:{},messageId:{},threadId:{}},emits:[`click`,`mouseEnter`,`mouseLeave`],setup:e=>(t,n)=>(c(),W(`span`,{class:`reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5`,role:`button`,tabindex:`0`,onClick:n[0]||=n=>t.$emit(`click`,n,e.node.id,e.messageId,e.threadId),onMouseenter:n[1]||=n=>t.$emit(`mouseEnter`,n,e.node.id,e.messageId,e.threadId),onMouseleave:n[2]||=n=>t.$emit(`mouseLeave`,n,e.node.id,e.messageId,e.threadId)},U(e.node.id),33))}),[[`__scopeId`,`data-v-775c65e4`]]);oZ.install=e=>{e.component(oZ.__name,oZ)};var sZ={class:`superscript-node`},cZ=wY(G({__name:`SuperscriptNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,emphasis:TZ,footnote_reference:AY,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,emoji:DY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`sup`,sZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`superscript`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`superscript`}-${i}`,"fallback-to-text":``},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-24160b22`]]);cZ.install=e=>{e.component(cZ.__name,cZ)};var lZ={class:`subscript-node`},uZ=wY(G({__name:`SubscriptNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,emphasis:TZ,footnote_reference:AY,strikethrough:mZ,highlight:CZ,insert:xZ,superscript:cZ,emoji:DY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`sub`,lZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`subscript`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`subscript`}-${i}`,"fallback-to-text":``},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-197fa13b`]]);uZ.install=e=>{e.component(uZ.__name,uZ)};var dZ={class:`strong-node`},fZ=wY(G({__name:`StrongNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,emphasis:TZ,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,footnote_reference:AY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`strong`,dZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`strong`}-${i}`,components:r.value,node:n,"index-key":`${e.indexKey||`strong`}-${i}`,"custom-id":t.customId},null,8,[`components`,`node`,`index-key`,`custom-id`]))),128))]))}}),[[`__scopeId`,`data-v-a8647104`]]);fZ.install=e=>{e.component(fZ.__name,fZ)};var pZ={class:`strikethrough-node`},mZ=wY(G({__name:`StrikethroughNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,emphasis:TZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,footnote_reference:AY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`del`,pZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`strikethrough`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`strikethrough`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-b7a531fa`]]);mZ.install=e=>{e.component(mZ.__name,mZ)};var hZ=[`href`,`title`,`aria-label`,`aria-hidden`,`target`,`rel`],gZ=[`aria-hidden`],_Z={class:`link-text-wrapper relative inline-flex`},vZ={class:`leading-[normal] link-text`},yZ=wY(G({__name:`LinkNode`,props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){let t=e,n=m(`markstreamShowTooltips`,void 0),r=L(()=>{let e=n?.value;return typeof e==`boolean`?e:t.showTooltip}),i=L(()=>{let e=t.underlineBottom===void 0?`-3px`:typeof t.underlineBottom==`number`?`${t.underlineBottom}px`:String(t.underlineBottom),n=t.animationOpacity??.35,r=Math.max(.12,Math.min(.5*n,n)),i={"--underline-height":`${t.underlineHeight??2}px`,"--underline-bottom":e,"--underline-opacity":String(n),"--underline-rest-opacity":String(r),"--underline-duration":`${t.animationDuration??1.6}s`,"--underline-timing":t.animationTiming??`ease-in-out`,"--underline-iteration":typeof t.animationIteration==`number`?String(t.animationIteration):t.animationIteration??`infinite`};return t.color&&(i[`--link-color`]=t.color),i}),a=bY(()=>t.customId),o=L(()=>cY({text:eZ,strong:fZ,strikethrough:mZ,emphasis:TZ,image:NX,html_inline:UY,inline_code:KY},a.value)),s=b(),l=L(()=>{let e=t.node?.attrs;if(!e||typeof e!=`object`)return{};let n={};if(Array.isArray(e))for(let t of e)Array.isArray(t)&&t[0]&&(n[String(t[0])]=String(t[1]??``));else for(let[t,r]of Object.entries(e))t&&r!=null&&!1!==r&&(n[t]=!0===r?``:String(r));return NY(n,`safe`,`a`)}),u=L(()=>cY(cY({},s),l.value)),d=L(()=>NY({href:String(t.node?.href??``)},`safe`,`a`).href),f=L(()=>{if(!d.value)return;let e=u.value.target;return(typeof e==`string`?e.trim():String(e??``).trim())||(lL(d.value)?`_blank`:void 0)}),p=L(()=>String(f.value??``).trim().toLowerCase()===`_blank`),h=L(()=>{if(!d.value)return;let e=u.value.rel,t=new Set((typeof e==`string`?e:String(e??``)).split(/\s+/).filter(Boolean)),n=new Set(Array.from(t).filter(e=>e.toLowerCase()!==`opener`));return p.value&&(n.add(`noopener`),n.add(`noreferrer`)),n.size>0?Array.from(n).join(` `):void 0}),g=L(()=>{let e=cY({},u.value);return delete e.title,delete e.href,delete e.target,delete e.rel,e});function y(){r.value&&lX()}let x=L(()=>{let e=t.node?.title;return typeof e==`string`&&e.trim().length>0?e:String(d.value??``)});return(n,a)=>e.node.loading?(c(),W(`span`,re({key:1,class:`link-loading inline-flex items-baseline gap-1.5`,"aria-hidden":e.node.loading?`false`:`true`},z(s),{style:i.value}),[F(`span`,_Z,[F(`span`,vZ,[v(z(eZ),{class:`leading-[normal] link-text`,node:{type:`text`,content:String(e.node.text??``),raw:String(e.node.text??``)},"index-key":`${e.indexKey||`link-text`}-loading`},null,8,[`node`,`index-key`])]),a[1]||=F(`span`,{class:`link-loading-indicator`,"aria-hidden":`true`},null,-1)])],16,gZ)):(c(),W(`a`,re({key:0,class:`link-node`,href:d.value,title:r.value?``:x.value,"aria-label":`Link: ${x.value}`,"aria-hidden":e.node.loading?`true`:`false`,target:f.value,rel:h.value},g.value,{style:i.value,onMouseenter:a[0]||=e=>function(e){if(!r.value)return;let n=e,i=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0,a=t.node?.title||(d.value?.includes(`xn--`)&&(t.node?.text)?.includes(`://`)?t.node.text:d.value)||``;cX(e.currentTarget,a,`top`,!1,i)}(e),onMouseleave:y}),[(c(!0),W(M,null,_(e.node.children,(n,r)=>(c(),P(z(FX),{key:`${e.indexKey||`emphasis`}-${r}`,components:o.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`link-text`}-${r}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))],16,hZ))}}),[[`__scopeId`,`data-v-367e6ca4`]]);yZ.install=e=>{e.component(yZ.__name,yZ)};var bZ={class:`insert-node`},xZ=wY(G({__name:`InsertNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,emphasis:TZ,strikethrough:mZ,highlight:CZ,subscript:uZ,superscript:cZ,emoji:DY,footnote_reference:AY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`ins`,bZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`insert`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`insert`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-1e2c29d4`]]);xZ.install=e=>{e.component(xZ.__name,xZ)};var SZ={class:`highlight-node`},CZ=wY(G({__name:`HighlightNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,emphasis:TZ,strikethrough:mZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,footnote_reference:AY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`mark`,SZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`highlight`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`highlight`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-7a62982a`]]);CZ.install=e=>{e.component(CZ.__name,CZ)};var wZ={class:`emphasis-node`},TZ=wY(G({__name:`EmphasisNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,footnote_reference:AY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`em`,wZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`emphasis`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`emphasis`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-2a5aafbf`]]);TZ.install=e=>{e.component(TZ.__name,TZ)};var EZ={class:`hard-break`},DZ=wY(G({__name:`HardBreakNode`,props:{node:{}},setup:e=>(e,t)=>(c(),W(`br`,EZ))}),[[`__scopeId`,`data-v-50c58f70`]]);DZ.install=e=>{e.component(DZ.__name,DZ)};var OZ=G({__name:`SimpleInlineRenderer`,props:{nodes:{},customId:{},indexKey:{}},setup(e){let t=e,n=g({checkbox:TY,checkbox_input:TY,emoji:DY,emphasis:TZ,hardbreak:DZ,highlight:CZ,inline_code:KY,insert:xZ,link:yZ,reference:oZ,strikethrough:mZ,strong:fZ,subscript:uZ,superscript:cZ,text:eZ}),r=bY(()=>t.customId),i=L(()=>{let e=r.value;return Object.keys(e).length>0?cY(cY({},n),e):n});return(n,r)=>(c(!0),W(M,null,_(e.nodes,(n,r)=>(c(),P(z(FX),{key:r,components:i.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`inline`}-${r}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))}});function kZ(e){if(!e||typeof e!=`object`)return!1;let t=`|${e.type}|`;if(!`|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|`.includes(t))return!1;if(!`|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|`.includes(t))return!0;let n=e.children;return Array.isArray(n)&&n.every(kZ)}function AZ(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(kZ))return e;if(!t||e.length!==1)return null;let r=e[0];if(r?.type!==`paragraph`||!Array.isArray(r.children))return null;let i=r.children;return(n||i.length>0)&&i.every(kZ)?i:null}function jZ(e){if(!e?.length)return null;let t=``;for(let n of e){if(n?.type!==`text`||!0===n.center)return null;t+=String(n.content??n.raw??``)}return t}var MZ=[`cite`],NZ={key:0,dir:`auto`,class:`paragraph-node`},PZ=[`custom-id`],FZ=wY(G({__name:`BlockquoteNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>!!n.value.paragraph),i=L(()=>!!n.value.text),a=L(()=>AZ(t.node.children,!r.value)),o=L(()=>!1!==t.fade||i.value?null:jZ(a.value));return d(`markstreamShowTooltips`,L(()=>t.showTooltips)),d(`markstreamFade`,L(()=>t.fade)),(n,r)=>(c(),W(`blockquote`,{class:`blockquote blockquote-node`,dir:`auto`,cite:e.node.cite},[a.value?(c(),W(`p`,NZ,[o.value===null?(c(),P(z(OZ),{key:1,nodes:a.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(o.value),9,PZ))])):(c(),P(z(P0),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:r[0]||=e=>n.$emit(`copy`,e)},null,8,[`show-tooltips`,`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`]))],8,MZ))}}),[[`__scopeId`,`data-v-abfecebc`]]);FZ.install=e=>{e.component(FZ.__name,FZ)};var IZ={class:`definition-list`},LZ={class:`definition-term`},RZ={class:`definition-desc`},zZ=wY(G({__name:`DefinitionListNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e){let t=e;return(e,n)=>(c(),W(`dl`,IZ,[(c(!0),W(M,null,_(t.node.items,(r,i)=>(c(),W(M,{key:i},[F(`dt`,LZ,[v(z(P0),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:r.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:n[0]||=t=>e.$emit(`copy`,t)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])]),F(`dd`,RZ,[v(z(P0),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:r.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:n[1]||=t=>e.$emit(`copy`,t)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])])],64))),128))]))}}),[[`__scopeId`,`data-v-4e103b30`]]);zZ.install=e=>{e.component(zZ.__name,zZ)};var BZ=[`href`,`title`],VZ=wY(G({__name:`FootnoteAnchorNode`,props:{node:{}},setup(e){let t=e;function n(e){if(e.preventDefault(),typeof document>`u`)return;let n=`fnref-${String(t.node.id??``)}`,r=document.getElementById(n);r&&r.scrollIntoView({behavior:`smooth`,block:`center`})}return(t,r)=>(c(),W(`a`,{class:`footnote-anchor text-sm hover:underline cursor-pointer`,href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n},` ↩︎ `,8,BZ))}}),[[`__scopeId`,`data-v-e1eb37b6`]]);VZ.install=e=>{e.component(VZ.__name,VZ)};var HZ=[`id`],UZ={class:`flex-1`},WZ=G({__name:`FootnoteNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e){let t=e;return(n,r)=>(c(),W(`div`,{id:`fnref--${e.node.id}`,class:`footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2`},[F(`div`,UZ,[v(z(P0),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:r[0]||=e=>n.$emit(`copy`,e)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])])],8,HZ))}});WZ.install=e=>{e.component(WZ.__name,WZ)};var GZ=[`custom-id`],KZ=wY(G({__name:`HeadingNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=m(`markstreamFade`,void 0),i=L(()=>!1!==r?.value||n.value.text?null:jZ(t.node.children)),a=L(()=>cY({text:eZ,inline_code:KY,link:yZ,image:NX,strong:fZ,emphasis:TZ,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,checkbox:TY,checkbox_input:TY,footnote_reference:AY,hardbreak:DZ,math_inline:iZ,reference:oZ},n.value));return(n,r)=>(c(),P(x(`h${e.node.level}`),re({class:[`heading-node`,[`heading-${e.node.level}`]],dir:`auto`},e.node.attrs),{default:B(()=>[i.value===null?(c(!0),W(M,{key:1},_(e.node.children,(n,r)=>(c(),P(z(FX),{key:r,components:a.value,"custom-id":t.customId,node:n,"index-key":`${e.indexKey||`heading`}-${r}`},null,8,[`components`,`custom-id`,`node`,`index-key`]))),128)):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(i.value),9,GZ))]),_:1},16,[`class`]))}}),[[`__scopeId`,`data-v-7122dbe1`]]),qZ=KZ;qZ.install=e=>{e.component(KZ.__name,KZ)};var JZ={key:0,dir:`auto`,class:`paragraph-node`},YZ=[`custom-id`],XZ={dir:`auto`,class:`paragraph-node`},ZZ=[`custom-id`],QZ=wY(G({__name:`ListItemNode`,props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=L(()=>t.node??t.item),r=bY(()=>t.customId),i=L(()=>!!r.value.paragraph),a=L(()=>!!r.value.text),o=L(()=>AZ(n.value?.children,!i.value)),s=L(()=>{if(i.value)return null;let e=n.value?.children;if(!Array.isArray(e)||e.length<2)return null;let t=e[0];if(t?.type!==`paragraph`||!Array.isArray(t.children))return null;let r=e.slice(1);if(!r.every(e=>e?.type===`list`))return null;let a=AZ([t]);return a?{paragraphChildren:a,nestedLists:r}:null});function l(){return!1===t.fade&&!a.value}let u=L(()=>l()?jZ(o.value):null),f=L(()=>l()?jZ(s.value?.paragraphChildren):null),p=Object.freeze({}),m=L(()=>{let{value:e}=t;return typeof e==`number`&&Number.isFinite(e)?{value:e}:p});return d(`markstreamShowTooltips`,L(()=>t.showTooltips)),d(`markstreamFade`,L(()=>t.fade)),(e,r)=>(c(),W(`li`,re({class:`list-item`,dir:`auto`},m.value),[o.value?(c(),W(`p`,JZ,[u.value===null?(c(),P(z(OZ),{key:1,nodes:o.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(u.value),9,YZ))])):s.value?(c(),W(M,{key:1},[F(`p`,XZ,[f.value===null?(c(),P(z(OZ),{key:1,nodes:s.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(f.value),9,ZZ))]),(c(!0),W(M,null,_(s.value.nestedLists,(n,i)=>(c(),P(z(P0),{key:i,nodes:[n],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${i}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:r[0]||=t=>e.$emit(`copy`,t)},null,8,[`nodes`,`custom-id`,`index-key`,`show-tooltips`,`typewriter`,`fade`,`is-dark`]))),128))],64)):(c(),P(z(P0),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:n.value?.children??[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:r[1]||=t=>e.$emit(`copy`,t)},null,8,[`show-tooltips`,`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`,`is-dark`]))],16))}}),[[`__scopeId`,`data-v-617214f9`]]);QZ.install=e=>{e.component(QZ.__name,QZ)};var $Z=wY(G({__name:`ListNode`,props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:[`copy`],setup(e){let t=bY(()=>e.customId),n=L(()=>t.value.list_item||QZ);return(t,r)=>(c(),P(x(e.node.ordered?`ol`:`ul`),{class:V([`list-node`,{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:B(()=>[(c(!0),W(M,null,_(e.node.items,(i,a)=>(c(),P(x(n.value),re({key:`${e.indexKey||`list`}-${a}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||`list`}-${a}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?(e.node.start??1)+a:void 0,onCopy:r[0]||=e=>t.$emit(`copy`,e)}),null,16,[`node`,`custom-id`,`index-key`,`typewriter`,`fade`,`is-dark`,`value`]))),128))]),_:1},8,[`class`]))}}),[[`__scopeId`,`data-v-99cb95e0`]]);$Z.install=e=>{e.component($Z.__name,$Z)};var eQ={key:2,class:`html-block-node__raw`},tQ=[`innerHTML`],nQ={key:1,class:`html-block-node__placeholder`},rQ=wY(G({__name:`HtmlBlockNode`,props:{node:{},customId:{},htmlPolicy:{}},setup(e){let t=e,n=m(`markstreamHtmlPolicy`,void 0),r=m(`markstreamNestedRendererProps`,void 0),a=L(()=>t.htmlPolicy??n?.value??`safe`),l=L(()=>{let e=r?.value??{};return lY(cY({},e),{customId:t.customId??e.customId,htmlPolicy:a.value})}),u=i({loader:()=>Promise.resolve().then(()=>F0),suspensible:!1}),d=L(()=>{let e=fK(t.node.attrs,a.value);if(!e)return;let n=dK(e);return Object.keys(n).length>0?n:void 0}),f=L(()=>{let e=String(t.node.tag||``).trim(),n=fK(t.node.attrs,a.value,e);if(!n)return;let r=dK(n);return Object.keys(r).length>0?r:void 0}),p=bY(()=>t.customId),h=G({name:`DynamicRenderer`,props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),g=R(null),_=R(typeof window>`u`),v=R(t.node.content),y=L(()=>Array.isArray(t.node.children)?t.node.children:[]),b=L(()=>String(t.node.tag||`div`)),S=L(()=>{if(b.value.trim().toLowerCase()!==`details`||t.node.attrs?.some(([e])=>String(e).toLowerCase()===`open`))return null;let e=y.value[0];return e?.type===`html_block`&&String(e.tag||``).toLowerCase()===`summary`?e:null}),C=L(()=>jZ(S.value?.children)),w=L(()=>{let e=S.value;if(!e)return;let t=fK(e.attrs,a.value,`summary`);if(!t)return;let n=dK(t);return Object.keys(n).length>0?n:void 0}),T=L(()=>C.value==null?y.value:y.value.slice(1)),D=L(()=>{let e=b.value.trim().toLowerCase();return YI.has(e)||eK(e,a.value)}),O=L(()=>y.value.length>0&&!!t.node.tag&&!D.value),k=L(()=>{if(O.value)return{mode:`structured`};if(!_.value)return{mode:`html`,content:v.value??``};let e=v.value??t.node.content;if(!e)return{mode:`html`,content:``};if(a.value===`escape`)return{mode:`html`,content:bK(e,a.value)};if(t.node.loading){let n=VY(e,p.value,a.value);return n===null?{mode:`text`,content:t.node.raw??e}:{mode:`dynamic`,nodes:n}}if(!BY(e,p.value))return{mode:`html`,content:bK(e,a.value)};let n=VY(e,p.value,a.value);return n===null?{mode:`html`,content:bK(e,a.value)}:{mode:`dynamic`,nodes:n}}),A=wX(),N=xX(),ee=SX(),I=ue(null),te=!!t.node.loading;return typeof window<`u`?(s([()=>g.value,()=>N?.value.heavyBlockMargin,()=>N?.value.rootMargin],([e],n,r)=>{var i,a;if((a=(i=I.value)?.destroy)==null||a.call(i),I.value=null,!te)return _.value=!0,void(v.value=t.node.content);if(!e)return void(_.value=!1);let o=!0,s=A(e,{rootMargin:N?.value.heavyBlockMargin??N?.value.rootMargin??bX,allowIdle:!ee.value});I.value=s,_.value=_.value||s.isVisible.value,s.whenVisible.then(()=>{o&&I.value===s&&(_.value=!0)}),r(()=>{o=!1,s.destroy(),I.value===s&&(I.value=null)})},{immediate:!0}),s(()=>t.node.content,e=>{te&&!_.value||(v.value=e)})):_.value=!0,ne(()=>{var e,t;(t=(e=I.value)?.destroy)==null||t.call(e),I.value=null}),(t,n)=>(c(),P(x(O.value?b.value:`div`),re({ref_key:`htmlRef`,ref:g,class:`html-block-node`,"data-markstream-viewport-pending":z(ee)&&!_.value?`true`:void 0},O.value?f.value:void 0),{default:B(()=>[_.value?(c(),W(M,{key:0},[k.value.mode===`structured`?(c(),W(M,{key:0},[C.value===null?(c(),P(z(u),re({key:1},l.value,{nodes:y.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`])):(c(),W(M,{key:0},[F(`summary`,j(o(w.value)),U(C.value),17),T.value.length?(c(),P(z(u),re({key:0},l.value,{nodes:T.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`])):E(``,!0)],64))],64)):k.value.mode===`dynamic`?(c(),P(z(h),{key:1,nodes:k.value.nodes},null,8,[`nodes`])):k.value.mode===`text`?(c(),W(`pre`,eQ,U(k.value.content),1)):(c(),W(`div`,re({key:3},d.value,{innerHTML:k.value.content}),null,16,tQ))],64)):(c(),W(`div`,nQ,[me(t.$slots,`placeholder`,{node:e.node},()=>[n[0]||=F(`span`,{class:`html-block-node__placeholder-bar`},null,-1),n[1]||=F(`span`,{class:`html-block-node__placeholder-bar w-4/5`},null,-1),n[2]||=F(`span`,{class:`html-block-node__placeholder-bar w-2/3`},null,-1)],!0)]))]),_:3},16,[`data-markstream-viewport-pending`]))}}),[[`__scopeId`,`data-v-e140a874`]]);rQ.install=e=>{e.component(rQ.__name,rQ)};var iQ={dir:`auto`,class:`paragraph-node`},aQ=[`custom-id`],oQ=wY(G({__name:`ParagraphNode`,props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){let t=e,n=bY(()=>t.customId),r=m(`markstreamHtmlPolicy`,void 0),a=m(`markstreamFade`,void 0),o=m(`markstreamParseOptions`,void 0),s=m(`markstreamCustomMarkdownIt`,void 0),l=m(`markstreamNestedRendererProps`,void 0),u=L(()=>r?.value??`safe`),d=L(()=>t.parseOptions??o?.value),f=L(()=>t.customMarkdownIt??s?.value),p=L(()=>t.customHtmlTags??l?.value?.customHtmlTags),h=L(()=>{let e=l?.value??{};return lY(cY({},e),{customId:t.customId??e.customId,customHtmlTags:p.value,parseOptions:d.value,customMarkdownIt:f.value,htmlPolicy:u.value})}),g=i({loader:()=>Promise.resolve().then(()=>F0),suspensible:!1});function v(e){return e.type===`text`&&String(e.content??``).trim()===``}let y=L(()=>t.node.children.filter(e=>!v(e))),b=L(()=>y.value.length>0&&y.value.every(e=>e.type===`image`||function(e){let t=function(e){return e.type===`link`&&Array.isArray(e.children)?e.children.filter(e=>!v(e)):[]}(e);return t.length===1&&t[0]?.type===`image`}(e))),S=L(()=>new Set(SL(p.value))),C=L(()=>{if(!b.value||y.value.length<=1)return t.node.children;let e=[];for(let n=0;n0,a=t.node.children.slice(n+1).some(e=>!v(e));i&&a&&e.push(lY(cY({},r),{content:` `,raw:` `}))}return e}),w=L(()=>!1===a?.value&&!n.value.text),T=L(()=>w.value?jZ(C.value):null);function D(e,n){return{node:e,"index-key":`${t.indexKey}-${n}`,"custom-id":t.customId,"custom-html-tags":p.value}}let O=L(()=>cY({inline_code:KY,image:NX,link:yZ,hardbreak:DZ,emphasis:TZ,strong:fZ,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,html_inline:UY,html_block:rQ,emoji:DY,checkbox:TY,math_inline:iZ,checkbox_input:TY,reference:oZ,footnote_anchor:VZ,footnote_reference:AY,text:eZ},n.value)),k=L(()=>C.value.map((e,r)=>{let i=function(e){if(e.type===`html_block`||e.type===`html_inline`){let t=String(e.tag??``).trim().toLowerCase()||TL(e.content);if(t&&!S.value.has(t)&&DL(e.content??e.raw,t)){let t=String(e.content??e.raw??``);return{child:{type:`text`,content:t,raw:t},component:eZ,isCustomComponent:!1}}}return{child:e,component:O.value[e.type],isCustomComponent:!!(n.value[e.type]&&!_Y(String(e.type)))}}(e);return lY(cY({},i),{index:r,key:`${t.indexKey||`paragraph`}-${r}`,customAttrs:i.isCustomComponent?IY(i.child,u.value):void 0,hasSlotChildren:Array.isArray(i.child.children)&&i.child.children.length>0,slotContent:String(i.child.content??``),originalChild:e})}));return(e,n)=>(c(),W(`p`,iQ,[T.value===null?(c(!0),W(M,{key:1},_(k.value,e=>{return c(),W(M,{key:e.key},[b.value&&v(e.originalChild)?(c(),W(M,{key:0},[K(U((n=e.originalChild,String((r=n.content)??``))),1)],64)):e.isCustomComponent?(c(),P(x(e.component),re({key:1,ref_for:!0},e.customAttrs,{node:e.child,loading:e.child.loading,"index-key":e.key,"custom-id":t.customId,"custom-html-tags":p.value,"is-dark":h.value.isDark}),{default:B(()=>[e.hasSlotChildren?(c(),P(z(g),re({key:0,ref_for:!0},h.value,{nodes:e.child.children,"index-key":e.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(c(),P(z(g),re({key:1,ref_for:!0},h.value,{content:e.slotContent,final:!e.child.loading,"index-key":`${e.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):E(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`custom-html-tags`,`is-dark`])):(c(),P(x(e.component),re({key:2,ref_for:!0},D(e.child,e.index)),null,16))],64);var n,r}),128)):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(T.value),9,aQ))]))}}),[[`__scopeId`,`data-v-c59ff506`]]);oQ.install=e=>{e.component(oQ.__name,oQ)};var sQ={class:`table-node-wrapper`},cQ=[`aria-busy`],lQ={key:0},uQ=[`custom-id`],dQ=[`aria-label`,`onPointerdown`],fQ=[`custom-id`],pQ={key:0,class:`table-node__loading`,role:`status`,"aria-live":`polite`},mQ=wY(G({__name:`TableNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=L(()=>{var e;return(e=t.node.loading)!=null&&e}),r=L(()=>t.node.rows??[]),i=R(null),a=R([]),o=null,l=L(()=>t.node.header.cells.length),u=L(()=>a.value.some(e=>Number.isFinite(e)&&e>0)),f=L(()=>u.value?a.value.map(e=>e>0?{width:`${e}px`}:void 0):[]);d(`markstreamShowTooltips`,L(()=>t.showTooltips)),d(`markstreamFade`,L(()=>t.fade));let p=bY(()=>t.customId),m=L(()=>!!p.value.text),h=L(()=>!!p.value.paragraph),g=new WeakMap;function y(e){let n=!1===t.fade&&!m.value,r=!h.value,i=g.get(e);if(i?.children===e.children&&i.textFastPath===n&&i.paragraphFastPath===r)return i.info;let a=AZ(e.children,r,!0),o={simpleChildren:a,plainText:a&&n?jZ(a):null};return g.set(e,{children:e.children,textFastPath:n,paragraphFastPath:r,info:o}),o}function b(e){if(!o)return;e.preventDefault();let t=o.startWidth+o.nextStartWidth,n=Math.min(48,Math.floor(t/2)),r=Math.max(n,Math.min(t-n,Math.round(o.startWidth+e.clientX-o.startX))),i=[...o.widths];i[o.index]=r,i[o.index+1]=t-r,a.value=i}function x(){o&&=(window.removeEventListener(`pointermove`,b),window.removeEventListener(`pointerup`,x),window.removeEventListener(`pointercancel`,x),null)}return s(l,()=>{x(),a.value=[]}),ne(x),(s,l)=>(c(),W(`div`,sQ,[F(`table`,{ref_key:`tableRef`,ref:i,class:V([`table-node`,{"table-node--loading":n.value}]),"aria-busy":n.value},[u.value?(c(),W(`colgroup`,lQ,[(c(!0),W(M,null,_(e.node.header.cells,(e,t)=>(c(),W(`col`,{key:t,style:ae(f.value[t])},null,4))),128))])):E(``,!0),F(`thead`,null,[F(`tr`,null,[(c(!0),W(M,null,_(e.node.header.cells,(n,r)=>(c(),W(`th`,{key:r,dir:`auto`,class:V([n.align===`right`?`text-right`:n.align===`center`?`text-center`:`text-left`])},[y(n).plainText===null?y(n).simpleChildren?(c(),P(z(OZ),{key:1,nodes:y(n).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${r}`},null,8,[`nodes`,`custom-id`,`index-key`])):(c(),P(z(P0),{key:2,nodes:n.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:l[0]||=e=>s.$emit(`copy`,e)},null,8,[`nodes`,`index-key`,`custom-id`,`typewriter`,`fade`,`show-tooltips`])):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(y(n).plainText),9,uQ)),rfunction(e,t){if(t.button!==0)return;let n=function(){let e=i.value?.querySelectorAll(`thead th`);return Array.from(e??[],e=>Math.round(e.getBoundingClientRect().width))}(),r=n[e],s=n[e+1];r&&s&&(t.preventDefault(),o={index:e,startX:t.clientX,startWidth:r,nextStartWidth:s,widths:n},a.value=n,window.addEventListener(`pointermove`,b),window.addEventListener(`pointerup`,x),window.addEventListener(`pointercancel`,x))}(r,e)},null,40,dQ)):E(``,!0)],2))),128))])]),F(`tbody`,null,[(c(!0),W(M,null,_(r.value,(e,n)=>(c(),W(`tr`,{key:n},[(c(!0),W(M,null,_(e.cells,(e,r)=>(c(),W(`td`,{key:r,class:V([e.align===`right`?`text-right`:e.align===`center`?`text-center`:`text-left`]),dir:`auto`},[y(e).plainText===null?y(e).simpleChildren?(c(),P(z(OZ),{key:1,nodes:y(e).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${n}-${r}`},null,8,[`nodes`,`custom-id`,`index-key`])):(c(),P(z(P0),{key:2,nodes:e.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:l[1]||=e=>s.$emit(`copy`,e)},null,8,[`nodes`,`index-key`,`custom-id`,`typewriter`,`fade`,`show-tooltips`])):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(y(e).plainText),9,fQ))],2))),128))]))),128))])],10,cQ),v(oe,{name:`table-node-fade`},{default:B(()=>[n.value?(c(),W(`div`,pQ,[me(s.$slots,`loading`,{isLoading:n.value},()=>[l[2]||=F(`span`,{class:`table-node__spinner animate-spin`,"aria-hidden":`true`},null,-1),l[3]||=F(`span`,{class:`sr-only`},`Loading`,-1)],!0)])):E(``,!0)]),_:3})]))}}),[[`__scopeId`,`data-v-39f87b5d`]]);mQ.install=e=>{e.component(mQ.__name,mQ)};var hQ={class:`hr-node`},gQ=wY({},[[`render`,function(e,t){return c(),W(`hr`,hQ)}],[`__scopeId`,`data-v-39b2349c`]]);gQ.install=e=>{e.component(gQ.__name,gQ)};var _Q={class:`unknown-node`},vQ=G({__name:`FallbackComponent`,props:{node:{}},setup:e=>(t,n)=>(c(),W(`div`,_Q,U(e.node.raw),1))}),yQ=wY(G({__name:`VmrContainerNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){let t=e,n=L(()=>`vmr-container vmr-container-${t.node.name}`),r=bY(()=>t.customId),i=L(()=>cY({text:eZ,paragraph:oQ,heading:qZ,inline_code:KY,link:yZ,image:NX,strong:fZ,emphasis:TZ,strikethrough:mZ,insert:xZ,subscript:uZ,superscript:cZ,checkbox:TY,checkbox_input:TY,hardbreak:DZ,math_inline:iZ,reference:oZ,list:$Z,math_block:aZ,table:mQ},r.value));return(r,a)=>(c(),W(`div`,re({class:n.value},e.node.attrs),[(c(!0),W(M,null,_(e.node.children,(n,r)=>{return c(),P(x((a=n.type,i.value[a]||vQ)),{key:`${e.indexKey||`vmr-container`}-${r}`,"custom-id":t.customId,node:n,"index-key":`${e.indexKey||`vmr-container`}-${r}`,typewriter:t.typewriter,fade:t.fade},null,8,[`custom-id`,`node`,`index-key`,`typewriter`,`fade`]);var a}),128))],16))}}),[[`__scopeId`,`data-v-911e41c4`]]);yQ.install=e=>{e.component(yQ.__name,yQ)};var bQ=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.ON.ON.ET.ET.ET.ON.ON.ON.ON.ON.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.ON.ET.ET.ET.ET.ON.ON.ON.ON.L.ON.ON.BN.ON.ON.ET.ET.EN.EN.ON.L.ON.ON.ON.EN.L.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L`.split(`.`),xQ=[[697,698,`ON`],[706,719,`ON`],[722,735,`ON`],[741,749,`ON`],[751,767,`ON`],[768,879,`NSM`],[884,885,`ON`],[894,894,`ON`],[900,901,`ON`],[903,903,`ON`],[1014,1014,`ON`],[1155,1161,`NSM`],[1418,1418,`ON`],[1421,1422,`ON`],[1423,1423,`ET`],[1424,1424,`R`],[1425,1469,`NSM`],[1470,1470,`R`],[1471,1471,`NSM`],[1472,1472,`R`],[1473,1474,`NSM`],[1475,1475,`R`],[1476,1477,`NSM`],[1478,1478,`R`],[1479,1479,`NSM`],[1480,1535,`R`],[1536,1541,`AN`],[1542,1543,`ON`],[1544,1544,`AL`],[1545,1546,`ET`],[1547,1547,`AL`],[1548,1548,`CS`],[1549,1549,`AL`],[1550,1551,`ON`],[1552,1562,`NSM`],[1563,1610,`AL`],[1611,1631,`NSM`],[1632,1641,`AN`],[1642,1642,`ET`],[1643,1644,`AN`],[1645,1647,`AL`],[1648,1648,`NSM`],[1649,1749,`AL`],[1750,1756,`NSM`],[1757,1757,`AN`],[1758,1758,`ON`],[1759,1764,`NSM`],[1765,1766,`AL`],[1767,1768,`NSM`],[1769,1769,`ON`],[1770,1773,`NSM`],[1774,1775,`AL`],[1776,1785,`EN`],[1786,1808,`AL`],[1809,1809,`NSM`],[1810,1839,`AL`],[1840,1866,`NSM`],[1867,1957,`AL`],[1958,1968,`NSM`],[1969,1983,`AL`],[1984,2026,`R`],[2027,2035,`NSM`],[2036,2037,`R`],[2038,2041,`ON`],[2042,2044,`R`],[2045,2045,`NSM`],[2046,2069,`R`],[2070,2073,`NSM`],[2074,2074,`R`],[2075,2083,`NSM`],[2084,2084,`R`],[2085,2087,`NSM`],[2088,2088,`R`],[2089,2093,`NSM`],[2094,2136,`R`],[2137,2139,`NSM`],[2140,2143,`R`],[2144,2191,`AL`],[2192,2193,`AN`],[2194,2198,`AL`],[2199,2207,`NSM`],[2208,2249,`AL`],[2250,2273,`NSM`],[2274,2274,`AN`],[2275,2306,`NSM`],[2362,2362,`NSM`],[2364,2364,`NSM`],[2369,2376,`NSM`],[2381,2381,`NSM`],[2385,2391,`NSM`],[2402,2403,`NSM`],[2433,2433,`NSM`],[2492,2492,`NSM`],[2497,2500,`NSM`],[2509,2509,`NSM`],[2530,2531,`NSM`],[2546,2547,`ET`],[2555,2555,`ET`],[2558,2558,`NSM`],[2561,2562,`NSM`],[2620,2620,`NSM`],[2625,2626,`NSM`],[2631,2632,`NSM`],[2635,2637,`NSM`],[2641,2641,`NSM`],[2672,2673,`NSM`],[2677,2677,`NSM`],[2689,2690,`NSM`],[2748,2748,`NSM`],[2753,2757,`NSM`],[2759,2760,`NSM`],[2765,2765,`NSM`],[2786,2787,`NSM`],[2801,2801,`ET`],[2810,2815,`NSM`],[2817,2817,`NSM`],[2876,2876,`NSM`],[2879,2879,`NSM`],[2881,2884,`NSM`],[2893,2893,`NSM`],[2901,2902,`NSM`],[2914,2915,`NSM`],[2946,2946,`NSM`],[3008,3008,`NSM`],[3021,3021,`NSM`],[3059,3064,`ON`],[3065,3065,`ET`],[3066,3066,`ON`],[3072,3072,`NSM`],[3076,3076,`NSM`],[3132,3132,`NSM`],[3134,3136,`NSM`],[3142,3144,`NSM`],[3146,3149,`NSM`],[3157,3158,`NSM`],[3170,3171,`NSM`],[3192,3198,`ON`],[3201,3201,`NSM`],[3260,3260,`NSM`],[3276,3277,`NSM`],[3298,3299,`NSM`],[3328,3329,`NSM`],[3387,3388,`NSM`],[3393,3396,`NSM`],[3405,3405,`NSM`],[3426,3427,`NSM`],[3457,3457,`NSM`],[3530,3530,`NSM`],[3538,3540,`NSM`],[3542,3542,`NSM`],[3633,3633,`NSM`],[3636,3642,`NSM`],[3647,3647,`ET`],[3655,3662,`NSM`],[3761,3761,`NSM`],[3764,3772,`NSM`],[3784,3790,`NSM`],[3864,3865,`NSM`],[3893,3893,`NSM`],[3895,3895,`NSM`],[3897,3897,`NSM`],[3898,3901,`ON`],[3953,3966,`NSM`],[3968,3972,`NSM`],[3974,3975,`NSM`],[3981,3991,`NSM`],[3993,4028,`NSM`],[4038,4038,`NSM`],[4141,4144,`NSM`],[4146,4151,`NSM`],[4153,4154,`NSM`],[4157,4158,`NSM`],[4184,4185,`NSM`],[4190,4192,`NSM`],[4209,4212,`NSM`],[4226,4226,`NSM`],[4229,4230,`NSM`],[4237,4237,`NSM`],[4253,4253,`NSM`],[4957,4959,`NSM`],[5008,5017,`ON`],[5120,5120,`ON`],[5760,5760,`WS`],[5787,5788,`ON`],[5906,5908,`NSM`],[5938,5939,`NSM`],[5970,5971,`NSM`],[6002,6003,`NSM`],[6068,6069,`NSM`],[6071,6077,`NSM`],[6086,6086,`NSM`],[6089,6099,`NSM`],[6107,6107,`ET`],[6109,6109,`NSM`],[6128,6137,`ON`],[6144,6154,`ON`],[6155,6157,`NSM`],[6158,6158,`BN`],[6159,6159,`NSM`],[6277,6278,`NSM`],[6313,6313,`NSM`],[6432,6434,`NSM`],[6439,6440,`NSM`],[6450,6450,`NSM`],[6457,6459,`NSM`],[6464,6464,`ON`],[6468,6469,`ON`],[6622,6655,`ON`],[6679,6680,`NSM`],[6683,6683,`NSM`],[6742,6742,`NSM`],[6744,6750,`NSM`],[6752,6752,`NSM`],[6754,6754,`NSM`],[6757,6764,`NSM`],[6771,6780,`NSM`],[6783,6783,`NSM`],[6832,6877,`NSM`],[6880,6891,`NSM`],[6912,6915,`NSM`],[6964,6964,`NSM`],[6966,6970,`NSM`],[6972,6972,`NSM`],[6978,6978,`NSM`],[7019,7027,`NSM`],[7040,7041,`NSM`],[7074,7077,`NSM`],[7080,7081,`NSM`],[7083,7085,`NSM`],[7142,7142,`NSM`],[7144,7145,`NSM`],[7149,7149,`NSM`],[7151,7153,`NSM`],[7212,7219,`NSM`],[7222,7223,`NSM`],[7376,7378,`NSM`],[7380,7392,`NSM`],[7394,7400,`NSM`],[7405,7405,`NSM`],[7412,7412,`NSM`],[7416,7417,`NSM`],[7616,7679,`NSM`],[8125,8125,`ON`],[8127,8129,`ON`],[8141,8143,`ON`],[8157,8159,`ON`],[8173,8175,`ON`],[8189,8190,`ON`],[8192,8202,`WS`],[8203,8205,`BN`],[8207,8207,`R`],[8208,8231,`ON`],[8232,8232,`WS`],[8233,8233,`B`],[8234,8238,`BN`],[8239,8239,`CS`],[8240,8244,`ET`],[8245,8259,`ON`],[8260,8260,`CS`],[8261,8286,`ON`],[8287,8287,`WS`],[8288,8303,`BN`],[8304,8304,`EN`],[8308,8313,`EN`],[8314,8315,`ES`],[8316,8318,`ON`],[8320,8329,`EN`],[8330,8331,`ES`],[8332,8334,`ON`],[8352,8399,`ET`],[8400,8432,`NSM`],[8448,8449,`ON`],[8451,8454,`ON`],[8456,8457,`ON`],[8468,8468,`ON`],[8470,8472,`ON`],[8478,8483,`ON`],[8485,8485,`ON`],[8487,8487,`ON`],[8489,8489,`ON`],[8494,8494,`ET`],[8506,8507,`ON`],[8512,8516,`ON`],[8522,8525,`ON`],[8528,8543,`ON`],[8585,8587,`ON`],[8592,8721,`ON`],[8722,8722,`ES`],[8723,8723,`ET`],[8724,9013,`ON`],[9083,9108,`ON`],[9110,9257,`ON`],[9280,9290,`ON`],[9312,9351,`ON`],[9352,9371,`EN`],[9450,9899,`ON`],[9901,10239,`ON`],[10496,11123,`ON`],[11126,11263,`ON`],[11493,11498,`ON`],[11503,11505,`NSM`],[11513,11519,`ON`],[11647,11647,`NSM`],[11744,11775,`NSM`],[11776,11869,`ON`],[11904,11929,`ON`],[11931,12019,`ON`],[12032,12245,`ON`],[12272,12287,`ON`],[12288,12288,`WS`],[12289,12292,`ON`],[12296,12320,`ON`],[12330,12333,`NSM`],[12336,12336,`ON`],[12342,12343,`ON`],[12349,12351,`ON`],[12441,12442,`NSM`],[12443,12444,`ON`],[12448,12448,`ON`],[12539,12539,`ON`],[12736,12773,`ON`],[12783,12783,`ON`],[12829,12830,`ON`],[12880,12895,`ON`],[12924,12926,`ON`],[12977,12991,`ON`],[13004,13007,`ON`],[13175,13178,`ON`],[13278,13279,`ON`],[13311,13311,`ON`],[19904,19967,`ON`],[42128,42182,`ON`],[42509,42511,`ON`],[42607,42610,`NSM`],[42611,42611,`ON`],[42612,42621,`NSM`],[42622,42623,`ON`],[42654,42655,`NSM`],[42736,42737,`NSM`],[42752,42785,`ON`],[42888,42888,`ON`],[43010,43010,`NSM`],[43014,43014,`NSM`],[43019,43019,`NSM`],[43045,43046,`NSM`],[43048,43051,`ON`],[43052,43052,`NSM`],[43064,43065,`ET`],[43124,43127,`ON`],[43204,43205,`NSM`],[43232,43249,`NSM`],[43263,43263,`NSM`],[43302,43309,`NSM`],[43335,43345,`NSM`],[43392,43394,`NSM`],[43443,43443,`NSM`],[43446,43449,`NSM`],[43452,43453,`NSM`],[43493,43493,`NSM`],[43561,43566,`NSM`],[43569,43570,`NSM`],[43573,43574,`NSM`],[43587,43587,`NSM`],[43596,43596,`NSM`],[43644,43644,`NSM`],[43696,43696,`NSM`],[43698,43700,`NSM`],[43703,43704,`NSM`],[43710,43711,`NSM`],[43713,43713,`NSM`],[43756,43757,`NSM`],[43766,43766,`NSM`],[43882,43883,`ON`],[44005,44005,`NSM`],[44008,44008,`NSM`],[44013,44013,`NSM`],[64285,64285,`R`],[64286,64286,`NSM`],[64287,64296,`R`],[64297,64297,`ES`],[64298,64335,`R`],[64336,64450,`AL`],[64451,64466,`ON`],[64467,64829,`AL`],[64830,64847,`ON`],[64848,64911,`AL`],[64912,64913,`ON`],[64914,64967,`AL`],[64968,64975,`ON`],[64976,65007,`BN`],[65008,65020,`AL`],[65021,65023,`ON`],[65024,65039,`NSM`],[65040,65049,`ON`],[65056,65071,`NSM`],[65072,65103,`ON`],[65104,65104,`CS`],[65105,65105,`ON`],[65106,65106,`CS`],[65108,65108,`ON`],[65109,65109,`CS`],[65110,65118,`ON`],[65119,65119,`ET`],[65120,65121,`ON`],[65122,65123,`ES`],[65124,65126,`ON`],[65128,65128,`ON`],[65129,65130,`ET`],[65131,65131,`ON`],[65136,65278,`AL`],[65279,65279,`BN`],[65281,65282,`ON`],[65283,65285,`ET`],[65286,65290,`ON`],[65291,65291,`ES`],[65292,65292,`CS`],[65293,65293,`ES`],[65294,65295,`CS`],[65296,65305,`EN`],[65306,65306,`CS`],[65307,65312,`ON`],[65339,65344,`ON`],[65371,65381,`ON`],[65504,65505,`ET`],[65506,65508,`ON`],[65509,65510,`ET`],[65512,65518,`ON`],[65520,65528,`BN`],[65529,65533,`ON`],[65534,65535,`BN`],[65793,65793,`ON`],[65856,65932,`ON`],[65936,65948,`ON`],[65952,65952,`ON`],[66045,66045,`NSM`],[66272,66272,`NSM`],[66273,66299,`EN`],[66422,66426,`NSM`],[67584,67870,`R`],[67871,67871,`ON`],[67872,68096,`R`],[68097,68099,`NSM`],[68100,68100,`R`],[68101,68102,`NSM`],[68103,68107,`R`],[68108,68111,`NSM`],[68112,68151,`R`],[68152,68154,`NSM`],[68155,68158,`R`],[68159,68159,`NSM`],[68160,68324,`R`],[68325,68326,`NSM`],[68327,68408,`R`],[68409,68415,`ON`],[68416,68863,`R`],[68864,68899,`AL`],[68900,68903,`NSM`],[68904,68911,`AL`],[68912,68921,`AN`],[68922,68927,`AL`],[68928,68937,`AN`],[68938,68968,`R`],[68969,68973,`NSM`],[68974,68974,`ON`],[68975,69215,`R`],[69216,69246,`AN`],[69247,69290,`R`],[69291,69292,`NSM`],[69293,69311,`R`],[69312,69327,`AL`],[69328,69336,`ON`],[69337,69369,`AL`],[69370,69375,`NSM`],[69376,69423,`R`],[69424,69445,`AL`],[69446,69456,`NSM`],[69457,69487,`AL`],[69488,69505,`R`],[69506,69509,`NSM`],[69510,69631,`R`],[69633,69633,`NSM`],[69688,69702,`NSM`],[69714,69733,`ON`],[69744,69744,`NSM`],[69747,69748,`NSM`],[69759,69761,`NSM`],[69811,69814,`NSM`],[69817,69818,`NSM`],[69826,69826,`NSM`],[69888,69890,`NSM`],[69927,69931,`NSM`],[69933,69940,`NSM`],[70003,70003,`NSM`],[70016,70017,`NSM`],[70070,70078,`NSM`],[70089,70092,`NSM`],[70095,70095,`NSM`],[70191,70193,`NSM`],[70196,70196,`NSM`],[70198,70199,`NSM`],[70206,70206,`NSM`],[70209,70209,`NSM`],[70367,70367,`NSM`],[70371,70378,`NSM`],[70400,70401,`NSM`],[70459,70460,`NSM`],[70464,70464,`NSM`],[70502,70508,`NSM`],[70512,70516,`NSM`],[70587,70592,`NSM`],[70606,70606,`NSM`],[70608,70608,`NSM`],[70610,70610,`NSM`],[70625,70626,`NSM`],[70712,70719,`NSM`],[70722,70724,`NSM`],[70726,70726,`NSM`],[70750,70750,`NSM`],[70835,70840,`NSM`],[70842,70842,`NSM`],[70847,70848,`NSM`],[70850,70851,`NSM`],[71090,71093,`NSM`],[71100,71101,`NSM`],[71103,71104,`NSM`],[71132,71133,`NSM`],[71219,71226,`NSM`],[71229,71229,`NSM`],[71231,71232,`NSM`],[71264,71276,`ON`],[71339,71339,`NSM`],[71341,71341,`NSM`],[71344,71349,`NSM`],[71351,71351,`NSM`],[71453,71453,`NSM`],[71455,71455,`NSM`],[71458,71461,`NSM`],[71463,71467,`NSM`],[71727,71735,`NSM`],[71737,71738,`NSM`],[71995,71996,`NSM`],[71998,71998,`NSM`],[72003,72003,`NSM`],[72148,72151,`NSM`],[72154,72155,`NSM`],[72160,72160,`NSM`],[72193,72198,`NSM`],[72201,72202,`NSM`],[72243,72248,`NSM`],[72251,72254,`NSM`],[72263,72263,`NSM`],[72273,72278,`NSM`],[72281,72283,`NSM`],[72330,72342,`NSM`],[72344,72345,`NSM`],[72544,72544,`NSM`],[72546,72548,`NSM`],[72550,72550,`NSM`],[72752,72758,`NSM`],[72760,72765,`NSM`],[72850,72871,`NSM`],[72874,72880,`NSM`],[72882,72883,`NSM`],[72885,72886,`NSM`],[73009,73014,`NSM`],[73018,73018,`NSM`],[73020,73021,`NSM`],[73023,73029,`NSM`],[73031,73031,`NSM`],[73104,73105,`NSM`],[73109,73109,`NSM`],[73111,73111,`NSM`],[73459,73460,`NSM`],[73472,73473,`NSM`],[73526,73530,`NSM`],[73536,73536,`NSM`],[73538,73538,`NSM`],[73562,73562,`NSM`],[73685,73692,`ON`],[73693,73696,`ET`],[73697,73713,`ON`],[78912,78912,`NSM`],[78919,78933,`NSM`],[90398,90409,`NSM`],[90413,90415,`NSM`],[92912,92916,`NSM`],[92976,92982,`NSM`],[94031,94031,`NSM`],[94095,94098,`NSM`],[94178,94178,`ON`],[94180,94180,`NSM`],[113821,113822,`NSM`],[113824,113827,`BN`],[117760,117973,`ON`],[118e3,118009,`EN`],[118010,118012,`ON`],[118016,118451,`ON`],[118458,118480,`ON`],[118496,118512,`ON`],[118528,118573,`NSM`],[118576,118598,`NSM`],[119143,119145,`NSM`],[119155,119162,`BN`],[119163,119170,`NSM`],[119173,119179,`NSM`],[119210,119213,`NSM`],[119273,119274,`ON`],[119296,119361,`ON`],[119362,119364,`NSM`],[119365,119365,`ON`],[119552,119638,`ON`],[120513,120513,`ON`],[120539,120539,`ON`],[120571,120571,`ON`],[120597,120597,`ON`],[120629,120629,`ON`],[120655,120655,`ON`],[120687,120687,`ON`],[120713,120713,`ON`],[120745,120745,`ON`],[120771,120771,`ON`],[120782,120831,`EN`],[121344,121398,`NSM`],[121403,121452,`NSM`],[121461,121461,`NSM`],[121476,121476,`NSM`],[121499,121503,`NSM`],[121505,121519,`NSM`],[122880,122886,`NSM`],[122888,122904,`NSM`],[122907,122913,`NSM`],[122915,122916,`NSM`],[122918,122922,`NSM`],[123023,123023,`NSM`],[123184,123190,`NSM`],[123566,123566,`NSM`],[123628,123631,`NSM`],[123647,123647,`ET`],[124140,124143,`NSM`],[124398,124399,`NSM`],[124643,124643,`NSM`],[124646,124646,`NSM`],[124654,124655,`NSM`],[124661,124661,`NSM`],[124928,125135,`R`],[125136,125142,`NSM`],[125143,125251,`R`],[125252,125258,`NSM`],[125259,126063,`R`],[126064,126143,`AL`],[126144,126207,`R`],[126208,126287,`AL`],[126288,126463,`R`],[126464,126703,`AL`],[126704,126705,`ON`],[126706,126719,`AL`],[126720,126975,`R`],[126976,127019,`ON`],[127024,127123,`ON`],[127136,127150,`ON`],[127153,127167,`ON`],[127169,127183,`ON`],[127185,127221,`ON`],[127232,127242,`EN`],[127243,127247,`ON`],[127279,127279,`ON`],[127338,127343,`ON`],[127405,127405,`ON`],[127584,127589,`ON`],[127744,128728,`ON`],[128732,128748,`ON`],[128752,128764,`ON`],[128768,128985,`ON`],[128992,129003,`ON`],[129008,129008,`ON`],[129024,129035,`ON`],[129040,129095,`ON`],[129104,129113,`ON`],[129120,129159,`ON`],[129168,129197,`ON`],[129200,129211,`ON`],[129216,129217,`ON`],[129232,129240,`ON`],[129280,129623,`ON`],[129632,129645,`ON`],[129648,129660,`ON`],[129664,129674,`ON`],[129678,129734,`ON`],[129736,129736,`ON`],[129741,129756,`ON`],[129759,129770,`ON`],[129775,129784,`ON`],[129792,129938,`ON`],[129940,130031,`ON`],[130032,130041,`EN`],[130042,130042,`ON`],[131070,131071,`BN`],[196606,196607,`BN`],[262142,262143,`BN`],[327678,327679,`BN`],[393214,393215,`BN`],[458750,458751,`BN`],[524286,524287,`BN`],[589822,589823,`BN`],[655358,655359,`BN`],[720894,720895,`BN`],[786430,786431,`BN`],[851966,851967,`BN`],[917502,917759,`BN`],[917760,917999,`NSM`],[918e3,921599,`BN`],[983038,983039,`BN`],[1048574,1048575,`BN`],[1114110,1114111,`BN`]];function SQ(e){if(e<=255)return bQ[e];let t=0,n=xQ.length-1;for(;t<=n;){let r=t+n>>1,i=xQ[r];if(ei[1]))return i[2];t=r+1}}return`L`}var CQ=/[ \t\n\r\f]+/g,wQ=/[\t\n\r\f]| {2,}|^ | $/,TQ=null,EQ=RegExp(`\\p{Script=Arabic}`,`u`),DQ=RegExp(`\\p{M}`,`u`),OQ=RegExp(`\\p{Nd}`,`u`);function kQ(e){return EQ.test(e)}function AQ(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function jQ(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&r<=57343){if(AQ(r-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(AQ(n))return!0}}return!1}var MQ=new Set([`\xA0`,` `,`⁠`,``]),NQ=new Set([`-`,`‐`,`–`,`—`]);function PQ(e,t){return!(function(e){let t=qQ(e);return t!==null&&MQ.has(t)}(e)||t&&(function(e){let t=qQ(e);return t!==null&&(FQ.has(t)||RQ.has(t))}(e)||function(e){let t=qQ(e);return t!==null&&NQ.has(t)}(e)))}var FQ=new Set(`,...!.:.;.?.、.。.・.).〕.〉.》.」.』.】.〗.〙.〛.ー.々.〻.ゝ.ゞ.ヽ.ヾ`.split(`.`)),IQ=new Set([`"`,`(`,`[`,`{`,`¡`,`¿`,`“`,`‘`,`‚`,`„`,`«`,`‹`,`⸘`,`(`,`〔`,`〈`,`《`,`「`,`『`,`【`,`〖`,`〘`,`〚`]),LQ=new Set([`'`,`’`]),RQ=new Set(`.(,(!(?(:(;(،(؛(؟(।(॥(၊(။(၌(၍(၏()(](}(%("(”(’(»(›(…`.split(`(`)),zQ=new Set([`:`,`.`,`،`,`؛`]),BQ=new Set([`၏`]),VQ=new Set([`”`,`’`,`»`,`›`,`」`,`』`,`】`,`》`,`〉`,`〕`,`)`]);function HQ(e){if(GQ(e))return!0;let t=!1;for(let n of e)if(RQ.has(n)||YQ(n))t=!0;else if(!t||!DQ.test(n))return!1;return t}function UQ(e){for(let t of e)if(!FQ.has(t)&&!RQ.has(t))return!1;return e.length>0}function WQ(e){if(GQ(e))return!0;for(let t of e)if(!(IQ.has(t)||LQ.has(t)||DQ.test(t)||YQ(t)))return!1;return e.length>0}function GQ(e){let t=!1;for(let n of e)if(n!==`\\`&&!DQ.test(n)){if(!(IQ.has(n)||RQ.has(n)||LQ.has(n)))return!1;t=!0}return t}function KQ(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let r=e.charCodeAt(n);if(r<56320||r>57343)return n;let i=n-1;if(i<0)return n;let a=e.charCodeAt(i);return a>=55296&&a<=56319?i:n}function qQ(e){if(e.length===0)return null;let t=KQ(e,e.length);return e.slice(t)}var JQ=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function YQ(e){let t=e.codePointAt(0);return t!==void 0&&function(e,t){for(let n=0;n=t[n]&&e<=t[n+1])return!0;return!1}(t,JQ)}function XQ(e){let t=function(e){for(let t of e)if(!DQ.test(t))return t;return null}(e);return t!==null&&OQ.test(t)}function ZQ(e){let t=Array.from(e),n=t.length;for(;n>0;){let e=t[n-1];if(DQ.test(e))n--;else{if(!IQ.has(e)&&!LQ.has(e))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(``),tail:t.slice(n).join(``)}}function QQ(e,t,n){return n!==`text`||t||e.length!==1||e===`-`||e===`—`?null:e}function $Q(e,t,n,r){let i=t[r],a=e[r];if(i==null)return a;let o=n[r];if(a.length===o)return a;let s=i.repeat(o);return e[r]=s,s}function e$(e,t){return e&&t!==null&&zQ.has(t)}function t$(e){let t=qQ(e);return t!==null&&BQ.has(t)}function n$(e){if(e.length<2||e[0]!==` `)return null;let t=e.slice(1);return RegExp(`^\\p{M}+$`,`u`).test(t)?{space:` `,marks:t}:null}function r$(e){let t=e.length;for(;t>0;){let n=KQ(e,t),r=e.slice(n,t);if(VQ.has(r))return!0;if(!RQ.has(r))return!1;t=n}return!1}function i$(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===` `)return`preserved-space`;if(e===` `)return`tab`;if(t.preserveHardBreaks&&e===` +`:``}${t}`;return m=e,h}),v=L(()=>!0===t.showLineNumbers&&!0===t.node?.diff),y=L(()=>v.value&&!0===t.diffInline),b=L(()=>{let e=Number(t.reservedHeightPx);if(!Number.isFinite(e)||e<=0)return;let n=`${Math.ceil(e)}px`;return o.value?{maxHeight:n,overflow:`auto`}:{height:n,minHeight:n,maxHeight:n,overflow:`auto`}}),x=[`diff `,`index `,`--- `,`+++ `,`@@ `];function S(e){return String(e??``).trim().length===0}function C(e,t=`context`,n={}){let r=S(e);return{code:e,kind:r&&t!==`hunk`&&t!==`spacer`&&!n.preserveBlankKind?`context`:t,empty:r}}function w(e){let t=r(e,o.value);return t?t.split(/\r\n|\n|\r/):[]}function T(e,t){return!S(e[t])||tx.some(t=>e.startsWith(t)))}function A(e,t){return t||!e.startsWith(` `)||e.startsWith(` `)?e:` ${e}`}function j(e,t){let n=e.length,r=t.length,i=[],a=0;for(;a=a&&l>=a&&e[c]===t[l];)s.unshift({originalIndex:c,modifiedIndex:l}),c--,l--;let u=c-a+1,d=l-a+1;if(u<=0||d<=0||o.value||(u+1)*(d+1)>15e5)return i.concat(s);let f=d+1,p=new Uint32Array((u+1)*(d+1));for(let n=u-1;n>=0;n--)for(let r=d-1;r>=0;r--){let i=n*f+r;if(e[a+n]===t[a+r])p[i]=p[(n+1)*f+r+1]+1;else{let e=p[(n+1)*f+r],t=p[n*f+r+1];p[i]=e>=t?e:t}}let m=[],h=0,g=0;for(;h=p[h*f+g+1]?h++:g++;return i.concat(m,s)}function N(e){let n=function(){let e=t.diffHideUnchangedRegions;if(e==null||!1===e)return null;let n=!0===e?{}:e;return!1===n.enabled?null:{contextLineCount:Math.max(0,Math.floor(n.contextLineCount??2)),minimumLineCount:Math.max(1,Math.floor(n.minimumLineCount??4))}}();if(!n||e.length<1||e.length>2||e.length===2&&e[0].lines.length!==e[1].lines.length)return e;let r=e[0].lines,i=e[1]?.lines,a=e=>r[e].kind===`context`&&(i===void 0||i[e].kind===`context`&&r[e].code===i[e].code),o=[],s=0;for(;s=n.minimumLineCount){let i=e+(e===0?0:n.contextLineCount),a=t-(t===r.length?0:n.contextLineCount);a-i>=n.minimumLineCount&&o.push({start:i,end:a})}s===e&&s++}return o.length?e.map((e,t)=>{let n=[],r=0;for(let i of o)n.push(...e.lines.slice(r,i.start)),n.push({code:t===0?`Unmodified lines`:``,kind:`collapsed`,empty:!1,key:`${e.key}-collapsed-${i.start}-${i.end}`,number:``}),r=i.end;return n.push(...e.lines.slice(r)),lY(cY({},e),{lines:n})}):e}let ee=L(()=>{if(!v.value)return[];let e=function(e){let n=e.some(e=>D(e)),r=e.some(e=>O(e));return n&&r||function(){if(i.value===`diff`)return!0;let e=String(t.node?.raw??``).split(/\r?\n/,1)[0]?.trim()??``;return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(e)}()&&(n||r)}(p.value),n=function(){return t.node?.originalCode!=null||t.node?.updatedCode!=null}();if(y.value)return N([{key:`inline`,className:`markstream-pre__diff-pane--inline`,lines:n?function(e,t){let n=w(e),r=w(t),i=j(n,r);if(i.length>0){let e=[],t=0,a=0;for(let o of i){for(;t=o&&c>=o&&n[s]===r[c];)l.unshift(lY(cY({},C(r[c])),{key:`inline-suffix-${c}`,number:c+1})),s--,c--;for(let e=o;e<=s;e++)a.push(lY(cY({},C(n[e],`removed`,{preserveBlankKind:T(n,e)})),{key:`inline-removed-source-${e}`,number:e+1}));for(let e=o;e<=c;e++)a.push(lY(cY({},C(r[e],`added`,{preserveBlankKind:T(r,e)})),{key:`inline-added-source-${e}`,number:e+1}));return a.concat(l)}(t.node?.originalCode,t.node?.updatedCode):function(e){let t=[],n=1,r=1,i=k(e);for(let[a,o]of e.entries())if(o.startsWith(`@@`)){let e=o.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);e&&(n=Number(e[1]),r=Number(e[2])),t.push(lY(cY({},C(o,`hunk`)),{key:`inline-hunk-${a}`,number:``}))}else if(D(o))t.push(lY(cY({},C(A(o.slice(1),i),`removed`,{preserveBlankKind:!0})),{key:`inline-removed-${a}`,number:n++}));else if(O(o))t.push(lY(cY({},C(A(o.slice(1),i),`added`,{preserveBlankKind:!0})),{key:`inline-added-${a}`,number:r++}));else{let e=i&&o.startsWith(` `)?o.slice(1):o;t.push(lY(cY({},C(e)),{key:`inline-context-${a}`,number:r})),n++,r++}return t}(p.value)}]);if(!e&&n)return function(e,t){let n=w(e),r=w(t),i=j(n,r),a=[],o=[],s=0,c=0,l=0,u=(e,t)=>{let i=Math.max(e-s,t-c);for(let u=0;ulY(cY({},e),{key:`original-${t}`,number:t+1}))},{key:`modified`,className:`markstream-pre__diff-pane--modified`,lines:a.map((e,t)=>lY(cY({},e),{key:`modified-${t}`,number:t+1}))}])}),P=L(()=>ee.value.some(e=>e.lines.some(e=>e.kind===`collapsed`))),I=L(()=>{let e=i.value;return e?`Code block: ${e}`:`Code block`}),te=R(null),re=R([]),ie=null,oe=!1,se=null;function z(e){let t=Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:0}function ce(e,t){if(!e)return t;if(e.classList.contains(`markstream-pre__diff-line--collapsed`))return 32;let n=e.querySelector(`.markstream-pre__diff-content`)?.getBoundingClientRect()?.height??0;return Math.max(t,Math.ceil(n))}function B(){oe||typeof window>`u`||(ie!=null&&window.cancelAnimationFrame(ie),ie=window.requestAnimationFrame(()=>{ie=null,oe||function(){ie=null;let e=te.value;if(!e||!v.value||y.value||!e.classList.contains(`is-wrap`))return void(re.value.length&&(re.value=[]));let t=function(e){let t=window.getComputedStyle(e),n=z(t.getPropertyValue(`--markstream-pre-diff-line-height`));if(n>0)return n;let r=z(t.lineHeight);return r>0?r:18}(e),n=Array.from(e.querySelectorAll(`.markstream-pre__diff-pane--original .markstream-pre__diff-line`)),r=Array.from(e.querySelectorAll(`.markstream-pre__diff-pane--modified .markstream-pre__diff-line`)),i=Math.max(n.length,r.length),a=[];for(let e=0;e{let n=s[t];return n&&Math.abs(e.rowHeight-n.rowHeight)<=.5&&Math.abs(e.originalHeight-n.originalHeight)<=.5&&Math.abs(e.modifiedHeight-n.modifiedHeight)<=.5})||(re.value=a)}()}))}function le(e){se?.disconnect(),se=null,e&&v.value&&!y.value&&typeof ResizeObserver<`u`&&(se=new ResizeObserver(()=>{B()}),se.observe(e))}function ue(e,t){let n=re.value[e];if(!n)return;let r=t===`original`?n.originalHeight:n.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(n.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(r)}px`}}return s(te,e=>{le(e),n(()=>B())},{flush:`post`}),s([v,y,ee],()=>{le(te.value),n(()=>B())},{flush:`post`,immediate:!0}),ne(()=>{oe=!0,ie!=null&&(window.cancelAnimationFrame(ie),ie=null),se?.disconnect(),se=null}),(e,n)=>(c(),W(`pre`,{ref_key:`preRef`,ref:te,style:ae(b.value),class:V([a.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":v.value,"markstream-pre--diff-inline":y.value,"markstream-pre--diff-collapsed":P.value}]),"aria-busy":o.value,"aria-label":I.value,"data-language":i.value,"data-markstream-line-numbers":t.showLineNumbers?`1`:void 0,"data-markstream-pre":`1`,tabindex:`0`},[v.value?(c(),W(`code`,WX,[(c(!0),W(M,null,_(ee.value,e=>(c(),W(`span`,{key:e.key,class:V([`markstream-pre__diff-pane`,e.className])},[F(`span`,GX,[(c(!0),W(M,null,_(e.lines,(t,r)=>(c(),W(`span`,{key:t.key,class:V([`markstream-pre__diff-line`,[`markstream-pre__diff-line--${t.kind}`,{"markstream-pre__diff-line--empty":t.empty}]]),style:ae(ue(r,e.key))},[n[0]||=F(`span`,{class:`markstream-pre__diff-rail`,"aria-hidden":`true`},null,-1),F(`span`,KX,U(t.number),1),F(`span`,qX,[F(`span`,JX,U(t.code),1)])],6))),128))])],2))),128))])):(c(),W(M,{key:1},[t.showLineNumbers?(c(),W(`span`,YX,[F(`span`,{class:`markstream-pre__line-numbers-text`,textContent:U(g.value)},null,8,XX)])):E(``,!0),F(`code`,{translate:`no`,class:`markstream-pre__code`,textContent:U(l.value)},null,8,ZX)],64))],14,UX))}});QX.install=e=>{e.component(QX.__name,QX)};var $X={key:0},eZ=wY(G({__name:`TextNode`,props:{node:{}},emits:[`copy`],setup(e){let n=e,r=b(),i=m(`markstreamFade`,void 0),a=m(`markstreamTextStreamState`,void 0),o=m(`markstreamStreamVersion`,void 0),l=L(()=>{let e=r.fade;return e===``||!0===e||e===`true`||!1!==e&&e!==`false`&&void 0}),u=L(()=>typeof l.value==`boolean`?l.value:typeof i?.value!=`boolean`||i.value),d=L(()=>{let e=r[`index-key`]??r.indexKey;return e==null||e===``?``:String(e)}),f=R(n.node.content),p=R(``),h=R(0),g;function _(){g?.(),g=void 0}function v(){_(),p.value&&=(f.value+=p.value,``)}s([()=>n.node.content,d,u],([e])=>{let t=String(e??``),n=d.value,r=XK({nextContent:t,persistedContent:n?a?.get(n):void 0,currentState:{settledContent:f.value,streamedDelta:p.value},typewriterEnabled:u.value});f.value=r.settledContent,p.value=r.streamedDelta,r.appended?(h.value+=1,function(){if(!p.value||g||!o)return;let e=o.value;g=s(()=>o.value,t=>{t!==e&&v()},{flush:`sync`})}()):p.value||_(),n&&a?.set(n,t)},{immediate:!0}),t(_);let y=L(()=>h.value%2==0?`text-node-stream-delta--a`:`text-node-stream-delta--b`);return(t,n)=>(c(),W(`span`,{class:V([[e.node.center?`text-node-center`:``],`text-node`])},[f.value?(c(),W(`span`,$X,U(f.value),1)):E(``,!0),p.value?(c(),W(`span`,{key:1,class:V([`text-node-stream-delta`,[y.value]]),onAnimationend:v},U(p.value),35)):E(``,!0)],2))}}),[[`__scopeId`,`data-v-a7e90764`]]);function tZ(e,t,n){return G({name:e,inheritAttrs:!1,setup(e,{attrs:r,slots:i}){let o=wX(),c=xX(),l=SX(),u=typeof window<`u`&&y()?.vnode.el?.nodeType===1,d=R(typeof window>`u`||u||!l.value),f=ue(null),p=null;function m(e){let t=e&&`$el`in e?e.$el:e;f.value=t instanceof HTMLElement?t:null}return typeof window<`u`&&s([f,l],([e,t],n,r)=>{if(p?.destroy(),p=null,!t||d.value)return void(d.value=!0);if(!e)return;let i=!0,a=o(e,{rootMargin:c?.value.heavyBlockMargin,allowIdle:!1});p=a,d.value=a.isVisible.value,a.whenVisible.then(()=>{i&&p===a&&(d.value=!0)}),r(()=>{i=!1,a.destroy(),p===a&&(p=null)})},{immediate:!0}),ne(()=>{p?.destroy(),p=null}),()=>a(d.value?t:n,lY(cY({},r),{ref:m}),i)}})}eZ.install=e=>{e.component(eZ.__name,eZ)};var nZ=G({name:`CodeBlockNodeLoading`,inheritAttrs:!1,props:`node.isDark.loading.stream.theme.darkTheme.lightTheme.isShowPreview.monacoOptions.enableFontSizeControl.minWidth.maxWidth.themes.showHeader.showCopyButton.showExpandButton.showPreviewButton.showCollapseButton.showFontSizeButtons.showTooltips.htmlPreviewAllowScripts.htmlPreviewSandbox.customId.estimatedHeightPx.estimatedContentHeightPx.estimatedDiffInline`.split(`.`),emits:[`previewCode`,`copy`],setup(e,{attrs:t}){let n=e;return()=>{let e=Aq(String(n.node?.language??``)),r=Nq[e]||(e?e.charAt(0).toUpperCase()+e.slice(1):Nq[``]),i=VX(n.node),o=HX(String(n.node?.raw??``),r,i),s=n.monacoOptions,c=i&&(n.estimatedDiffInline??RX(s??{},typeof window>`u`?0:window.innerWidth)),l=s?.diffAppearance,u=l===`dark`||l!==`light`&&!0===n.isDark,d=typeof s?.fontSize==`number`&&Number.isFinite(s.fontSize)&&s.fontSize>0?s.fontSize:12,f=typeof s?.lineHeight==`number`&&Number.isFinite(s.lineHeight)&&s.lineHeight>0?s.lineHeight:d===12?18:Math.max(12,Math.round(1.5*d)),p=typeof s?.tabSize==`number`&&Number.isFinite(s.tabSize)&&s.tabSize>0?s.tabSize:4,m=i?0:8,h=typeof s?.padding?.top==`number`&&Number.isFinite(s.padding.top)&&s.padding.top>=0?s.padding.top:m,g=typeof s?.padding?.bottom==`number`&&Number.isFinite(s.padding.bottom)&&s.padding.bottom>=0?s.padding.bottom:m,_=typeof s?.fontFamily==`string`?s.fontFamily.trim():``,v=cY(cY({fontSize:`${d}px`,lineHeight:`${f}px`,tabSize:p,paddingTop:`${h}px`,paddingBottom:`${g}px`,"--markstream-pre-line-number-top":`${h}px`},i?{"--markstream-pre-diff-line-height":`${f}px`}:{}),_?{"--markstream-code-font-family":_}:{}),y=()=>a(`button`,{class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0`,"aria-hidden":`true`,disabled:!0,tabindex:-1,type:`button`},[a(`svg`,{class:`action-icon`})]),b=!1!==n.isShowPreview&&(e===`html`||e===`svg`),x=!1!==n.showFontSizeButtons&&!1!==n.enableFontSizeControl||!1!==n.showExpandButton||b&&!1!==n.showPreviewButton,S=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},C=cY(cY(cY({"--markstream-code-layout-character-width":`1ch`},S(n.minWidth)?{minWidth:S(n.minWidth)}:{}),S(n.maxWidth)?{maxWidth:S(n.maxWidth)}:{}),i?{}:{color:`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))`,backgroundColor:`var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))`,borderColor:`var(--markstream-code-border-color, var(--code-border))`});return a(`div`,lY(cY({},t),{class:[`code-block-container`,`rounded-lg`,`border`,{dark:!0===n.isDark,"is-rendering":!1!==n.loading,"is-dark":u,"is-diff":i,"is-plain-text":e===``||e===`plaintext`||e===`text`},t.class],style:[C,t.style],"data-markstream-code-block":`1`,"data-markstream-enhanced":`false`,"data-markstream-code-block-state":n.loading?`streaming`:`settled`,"data-markstream-code-loading":`1`}),[!1===n.showHeader?null:a(`div`,{class:`code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]`},[a(`div`,{class:`code-header-main`},[a(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`}),a(`div`,{class:`code-header-copy`},[a(`div`,{class:`code-header-title`},o.title),o.caption?a(`div`,{class:`code-header-caption`},o.caption):null])]),a(`div`,{class:`flex items-center gap-0.5`,style:{visibility:`hidden`}},[i?a(`div`,{class:`code-diff-stats`,"aria-hidden":`true`},[a(`span`,{class:`code-diff-stat removed`},`-0`),a(`span`,{class:`code-diff-stat added`},`+0`)]):null,!1===n.showCopyButton?null:y(),!1===n.showCollapseButton?null:y(),x?a(`div`,{class:`relative`},[y()]):null])]),a(`div`,{class:`code-block-shell-content`,style:!1!==n.stream||!1===n.loading?void 0:{display:`none`}},[a(QX,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:i?void 0:n.estimatedContentHeightPx,diffInline:c,diffHideUnchangedRegions:i?LX(s?.diffHideUnchangedRegions):void 0,class:`code-pre-fallback`,style:v,"data-markstream-code-loading":`1`})]),a(`div`,{class:`code-loading-placeholder`,style:!1===n.stream&&!1!==n.loading?void 0:{display:`none`}},[a(`div`,{class:`loading-skeleton`},[a(`div`,{class:`skeleton-line`}),a(`div`,{class:`skeleton-line`}),a(`div`,{class:`skeleton-line short`})])]),a(`span`,{class:`sr-only`,"aria-live":`polite`,role:`status`})])}}}),rZ=tZ(`ViewportDeferredCodeBlockNode`,i({loader:()=>uY(null,null,function*(){try{return(yield he(()=>import(`./CodeBlockNode-BscDteEG.js`),__vite__mapDeps([31,7,1,2]))).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependency stream-diffs is missing. Falling back to preformatted code rendering. To enable enhanced code block features, please install "stream-diffs".`,e),QX}}),loadingComponent:nZ,delay:0,suspensible:!1}),nZ),iZ=i(()=>uY(null,null,function*(){if(function(){return Reflect.get(globalThis,`process`)?.env}()?.NODE_ENV===`test`&&typeof window<`u`)return e=>a(eZ,lY(cY({},e),{node:{type:`text`,content:e.node.raw??`$${e.node.content??``}$`,raw:e.node.raw??`$${e.node.content??``}$`}}));try{return yield qq(),(yield he(()=>import(`./index7-pWd8I70s.js`),__vite__mapDeps([32,1,2]))).default}catch(e){console.warn(`[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".`,e)}return e=>a(eZ,lY(cY({},e),{node:{type:`text`,content:e.node.raw??`$${e.node.content??``}$`,raw:e.node.raw??`$${e.node.content??``}$`}}))})),aZ=i(()=>uY(null,null,function*(){try{return yield qq(),(yield he(()=>import(`./index6-CmbcA3ap.js`),__vite__mapDeps([33,1,2]))).default}catch(e){console.warn(`[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".`,e)}return e=>a(eZ,lY(cY({},e),{node:{type:`text`,content:e.node.raw??`$$${e.node.content??``}$$`,raw:e.node.raw??`$$${e.node.content??``}$$`}}))})),oZ=wY(G({__name:`ReferenceNode`,props:{node:{},messageId:{},threadId:{}},emits:[`click`,`mouseEnter`,`mouseLeave`],setup:e=>(t,n)=>(c(),W(`span`,{class:`reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5`,role:`button`,tabindex:`0`,onClick:n[0]||=n=>t.$emit(`click`,n,e.node.id,e.messageId,e.threadId),onMouseenter:n[1]||=n=>t.$emit(`mouseEnter`,n,e.node.id,e.messageId,e.threadId),onMouseleave:n[2]||=n=>t.$emit(`mouseLeave`,n,e.node.id,e.messageId,e.threadId)},U(e.node.id),33))}),[[`__scopeId`,`data-v-775c65e4`]]);oZ.install=e=>{e.component(oZ.__name,oZ)};var sZ={class:`superscript-node`},cZ=wY(G({__name:`SuperscriptNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,emphasis:TZ,footnote_reference:AY,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,emoji:DY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`sup`,sZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`superscript`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`superscript`}-${i}`,"fallback-to-text":``},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-24160b22`]]);cZ.install=e=>{e.component(cZ.__name,cZ)};var lZ={class:`subscript-node`},uZ=wY(G({__name:`SubscriptNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,emphasis:TZ,footnote_reference:AY,strikethrough:mZ,highlight:CZ,insert:xZ,superscript:cZ,emoji:DY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`sub`,lZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`subscript`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`subscript`}-${i}`,"fallback-to-text":``},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-197fa13b`]]);uZ.install=e=>{e.component(uZ.__name,uZ)};var dZ={class:`strong-node`},fZ=wY(G({__name:`StrongNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,emphasis:TZ,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,footnote_reference:AY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`strong`,dZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`strong`}-${i}`,components:r.value,node:n,"index-key":`${e.indexKey||`strong`}-${i}`,"custom-id":t.customId},null,8,[`components`,`node`,`index-key`,`custom-id`]))),128))]))}}),[[`__scopeId`,`data-v-a8647104`]]);fZ.install=e=>{e.component(fZ.__name,fZ)};var pZ={class:`strikethrough-node`},mZ=wY(G({__name:`StrikethroughNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,emphasis:TZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,footnote_reference:AY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`del`,pZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`strikethrough`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`strikethrough`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-b7a531fa`]]);mZ.install=e=>{e.component(mZ.__name,mZ)};var hZ=[`href`,`title`,`aria-label`,`aria-hidden`,`target`,`rel`],gZ=[`aria-hidden`],_Z={class:`link-text-wrapper relative inline-flex`},vZ={class:`leading-[normal] link-text`},yZ=wY(G({__name:`LinkNode`,props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){let t=e,n=m(`markstreamShowTooltips`,void 0),r=L(()=>{let e=n?.value;return typeof e==`boolean`?e:t.showTooltip}),i=L(()=>{let e=t.underlineBottom===void 0?`-3px`:typeof t.underlineBottom==`number`?`${t.underlineBottom}px`:String(t.underlineBottom),n=t.animationOpacity??.35,r=Math.max(.12,Math.min(.5*n,n)),i={"--underline-height":`${t.underlineHeight??2}px`,"--underline-bottom":e,"--underline-opacity":String(n),"--underline-rest-opacity":String(r),"--underline-duration":`${t.animationDuration??1.6}s`,"--underline-timing":t.animationTiming??`ease-in-out`,"--underline-iteration":typeof t.animationIteration==`number`?String(t.animationIteration):t.animationIteration??`infinite`};return t.color&&(i[`--link-color`]=t.color),i}),a=bY(()=>t.customId),o=L(()=>cY({text:eZ,strong:fZ,strikethrough:mZ,emphasis:TZ,image:NX,html_inline:UY,inline_code:KY},a.value)),s=b(),l=L(()=>{let e=t.node?.attrs;if(!e||typeof e!=`object`)return{};let n={};if(Array.isArray(e))for(let t of e)Array.isArray(t)&&t[0]&&(n[String(t[0])]=String(t[1]??``));else for(let[t,r]of Object.entries(e))t&&r!=null&&!1!==r&&(n[t]=!0===r?``:String(r));return NY(n,`safe`,`a`)}),u=L(()=>cY(cY({},s),l.value)),d=L(()=>NY({href:String(t.node?.href??``)},`safe`,`a`).href),f=L(()=>{if(!d.value)return;let e=u.value.target;return(typeof e==`string`?e.trim():String(e??``).trim())||(lL(d.value)?`_blank`:void 0)}),p=L(()=>String(f.value??``).trim().toLowerCase()===`_blank`),h=L(()=>{if(!d.value)return;let e=u.value.rel,t=new Set((typeof e==`string`?e:String(e??``)).split(/\s+/).filter(Boolean)),n=new Set(Array.from(t).filter(e=>e.toLowerCase()!==`opener`));return p.value&&(n.add(`noopener`),n.add(`noreferrer`)),n.size>0?Array.from(n).join(` `):void 0}),g=L(()=>{let e=cY({},u.value);return delete e.title,delete e.href,delete e.target,delete e.rel,e});function y(){r.value&&lX()}let x=L(()=>{let e=t.node?.title;return typeof e==`string`&&e.trim().length>0?e:String(d.value??``)});return(n,a)=>e.node.loading?(c(),W(`span`,re({key:1,class:`link-loading inline-flex items-baseline gap-1.5`,"aria-hidden":e.node.loading?`false`:`true`},z(s),{style:i.value}),[F(`span`,_Z,[F(`span`,vZ,[v(z(eZ),{class:`leading-[normal] link-text`,node:{type:`text`,content:String(e.node.text??``),raw:String(e.node.text??``)},"index-key":`${e.indexKey||`link-text`}-loading`},null,8,[`node`,`index-key`])]),a[1]||=F(`span`,{class:`link-loading-indicator`,"aria-hidden":`true`},null,-1)])],16,gZ)):(c(),W(`a`,re({key:0,class:`link-node`,href:d.value,title:r.value?``:x.value,"aria-label":`Link: ${x.value}`,"aria-hidden":e.node.loading?`true`:`false`,target:f.value,rel:h.value},g.value,{style:i.value,onMouseenter:a[0]||=e=>function(e){if(!r.value)return;let n=e,i=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0,a=t.node?.title||(d.value?.includes(`xn--`)&&(t.node?.text)?.includes(`://`)?t.node.text:d.value)||``;cX(e.currentTarget,a,`top`,!1,i)}(e),onMouseleave:y}),[(c(!0),W(M,null,_(e.node.children,(n,r)=>(c(),P(z(FX),{key:`${e.indexKey||`emphasis`}-${r}`,components:o.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`link-text`}-${r}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))],16,hZ))}}),[[`__scopeId`,`data-v-367e6ca4`]]);yZ.install=e=>{e.component(yZ.__name,yZ)};var bZ={class:`insert-node`},xZ=wY(G({__name:`InsertNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,emphasis:TZ,strikethrough:mZ,highlight:CZ,subscript:uZ,superscript:cZ,emoji:DY,footnote_reference:AY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`ins`,bZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`insert`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`insert`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-1e2c29d4`]]);xZ.install=e=>{e.component(xZ.__name,xZ)};var SZ={class:`highlight-node`},CZ=wY(G({__name:`HighlightNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,emphasis:TZ,strikethrough:mZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,footnote_reference:AY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`mark`,SZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`highlight`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`highlight`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-7a62982a`]]);CZ.install=e=>{e.component(CZ.__name,CZ)};var wZ={class:`emphasis-node`},TZ=wY(G({__name:`EmphasisNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>cY({text:eZ,inline_code:KY,link:yZ,html_inline:UY,strong:fZ,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,footnote_reference:AY,math_inline:iZ,reference:oZ},n.value));return(n,i)=>(c(),W(`em`,wZ,[(c(!0),W(M,null,_(e.node.children,(n,i)=>(c(),P(z(FX),{key:`${e.indexKey||`emphasis`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`emphasis`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-2a5aafbf`]]);TZ.install=e=>{e.component(TZ.__name,TZ)};var EZ={class:`hard-break`},DZ=wY(G({__name:`HardBreakNode`,props:{node:{}},setup:e=>(e,t)=>(c(),W(`br`,EZ))}),[[`__scopeId`,`data-v-50c58f70`]]);DZ.install=e=>{e.component(DZ.__name,DZ)};var OZ=G({__name:`SimpleInlineRenderer`,props:{nodes:{},customId:{},indexKey:{}},setup(e){let t=e,n=g({checkbox:TY,checkbox_input:TY,emoji:DY,emphasis:TZ,hardbreak:DZ,highlight:CZ,inline_code:KY,insert:xZ,link:yZ,reference:oZ,strikethrough:mZ,strong:fZ,subscript:uZ,superscript:cZ,text:eZ}),r=bY(()=>t.customId),i=L(()=>{let e=r.value;return Object.keys(e).length>0?cY(cY({},n),e):n});return(n,r)=>(c(!0),W(M,null,_(e.nodes,(n,r)=>(c(),P(z(FX),{key:r,components:i.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`inline`}-${r}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))}});function kZ(e){if(!e||typeof e!=`object`)return!1;let t=`|${e.type}|`;if(!`|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|`.includes(t))return!1;if(!`|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|`.includes(t))return!0;let n=e.children;return Array.isArray(n)&&n.every(kZ)}function AZ(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(kZ))return e;if(!t||e.length!==1)return null;let r=e[0];if(r?.type!==`paragraph`||!Array.isArray(r.children))return null;let i=r.children;return(n||i.length>0)&&i.every(kZ)?i:null}function jZ(e){if(!e?.length)return null;let t=``;for(let n of e){if(n?.type!==`text`||!0===n.center)return null;t+=String(n.content??n.raw??``)}return t}var MZ=[`cite`],NZ={key:0,dir:`auto`,class:`paragraph-node`},PZ=[`custom-id`],FZ=wY(G({__name:`BlockquoteNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=bY(()=>t.customId),r=L(()=>!!n.value.paragraph),i=L(()=>!!n.value.text),a=L(()=>AZ(t.node.children,!r.value)),o=L(()=>!1!==t.fade||i.value?null:jZ(a.value));return d(`markstreamShowTooltips`,L(()=>t.showTooltips)),d(`markstreamFade`,L(()=>t.fade)),(n,r)=>(c(),W(`blockquote`,{class:`blockquote blockquote-node`,dir:`auto`,cite:e.node.cite},[a.value?(c(),W(`p`,NZ,[o.value===null?(c(),P(z(OZ),{key:1,nodes:a.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(o.value),9,PZ))])):(c(),P(z(P0),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:r[0]||=e=>n.$emit(`copy`,e)},null,8,[`show-tooltips`,`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`]))],8,MZ))}}),[[`__scopeId`,`data-v-abfecebc`]]);FZ.install=e=>{e.component(FZ.__name,FZ)};var IZ={class:`definition-list`},LZ={class:`definition-term`},RZ={class:`definition-desc`},zZ=wY(G({__name:`DefinitionListNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e){let t=e;return(e,n)=>(c(),W(`dl`,IZ,[(c(!0),W(M,null,_(t.node.items,(r,i)=>(c(),W(M,{key:i},[F(`dt`,LZ,[v(z(P0),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:r.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:n[0]||=t=>e.$emit(`copy`,t)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])]),F(`dd`,RZ,[v(z(P0),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:r.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:n[1]||=t=>e.$emit(`copy`,t)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])])],64))),128))]))}}),[[`__scopeId`,`data-v-4e103b30`]]);zZ.install=e=>{e.component(zZ.__name,zZ)};var BZ=[`href`,`title`],VZ=wY(G({__name:`FootnoteAnchorNode`,props:{node:{}},setup(e){let t=e;function n(e){if(e.preventDefault(),typeof document>`u`)return;let n=`fnref-${String(t.node.id??``)}`,r=document.getElementById(n);r&&r.scrollIntoView({behavior:`smooth`,block:`center`})}return(t,r)=>(c(),W(`a`,{class:`footnote-anchor text-sm hover:underline cursor-pointer`,href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n},` ↩︎ `,8,BZ))}}),[[`__scopeId`,`data-v-e1eb37b6`]]);VZ.install=e=>{e.component(VZ.__name,VZ)};var HZ=[`id`],UZ={class:`flex-1`},WZ=G({__name:`FootnoteNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e){let t=e;return(n,r)=>(c(),W(`div`,{id:`fnref--${e.node.id}`,class:`footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2`},[F(`div`,UZ,[v(z(P0),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:r[0]||=e=>n.$emit(`copy`,e)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])])],8,HZ))}});WZ.install=e=>{e.component(WZ.__name,WZ)};var GZ=[`custom-id`],KZ=wY(G({__name:`HeadingNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=bY(()=>t.customId),r=m(`markstreamFade`,void 0),i=L(()=>!1!==r?.value||n.value.text?null:jZ(t.node.children)),a=L(()=>cY({text:eZ,inline_code:KY,link:yZ,image:NX,strong:fZ,emphasis:TZ,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,checkbox:TY,checkbox_input:TY,footnote_reference:AY,hardbreak:DZ,math_inline:iZ,reference:oZ},n.value));return(n,r)=>(c(),P(x(`h${e.node.level}`),re({class:[`heading-node`,[`heading-${e.node.level}`]],dir:`auto`},e.node.attrs),{default:B(()=>[i.value===null?(c(!0),W(M,{key:1},_(e.node.children,(n,r)=>(c(),P(z(FX),{key:r,components:a.value,"custom-id":t.customId,node:n,"index-key":`${e.indexKey||`heading`}-${r}`},null,8,[`components`,`custom-id`,`node`,`index-key`]))),128)):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(i.value),9,GZ))]),_:1},16,[`class`]))}}),[[`__scopeId`,`data-v-7122dbe1`]]),qZ=KZ;qZ.install=e=>{e.component(KZ.__name,KZ)};var JZ={key:0,dir:`auto`,class:`paragraph-node`},YZ=[`custom-id`],XZ={dir:`auto`,class:`paragraph-node`},ZZ=[`custom-id`],QZ=wY(G({__name:`ListItemNode`,props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=L(()=>t.node??t.item),r=bY(()=>t.customId),i=L(()=>!!r.value.paragraph),a=L(()=>!!r.value.text),o=L(()=>AZ(n.value?.children,!i.value)),s=L(()=>{if(i.value)return null;let e=n.value?.children;if(!Array.isArray(e)||e.length<2)return null;let t=e[0];if(t?.type!==`paragraph`||!Array.isArray(t.children))return null;let r=e.slice(1);if(!r.every(e=>e?.type===`list`))return null;let a=AZ([t]);return a?{paragraphChildren:a,nestedLists:r}:null});function l(){return!1===t.fade&&!a.value}let u=L(()=>l()?jZ(o.value):null),f=L(()=>l()?jZ(s.value?.paragraphChildren):null),p=Object.freeze({}),m=L(()=>{let{value:e}=t;return typeof e==`number`&&Number.isFinite(e)?{value:e}:p});return d(`markstreamShowTooltips`,L(()=>t.showTooltips)),d(`markstreamFade`,L(()=>t.fade)),(e,r)=>(c(),W(`li`,re({class:`list-item`,dir:`auto`},m.value),[o.value?(c(),W(`p`,JZ,[u.value===null?(c(),P(z(OZ),{key:1,nodes:o.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(u.value),9,YZ))])):s.value?(c(),W(M,{key:1},[F(`p`,XZ,[f.value===null?(c(),P(z(OZ),{key:1,nodes:s.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(f.value),9,ZZ))]),(c(!0),W(M,null,_(s.value.nestedLists,(n,i)=>(c(),P(z(P0),{key:i,nodes:[n],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${i}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:r[0]||=t=>e.$emit(`copy`,t)},null,8,[`nodes`,`custom-id`,`index-key`,`show-tooltips`,`typewriter`,`fade`,`is-dark`]))),128))],64)):(c(),P(z(P0),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:n.value?.children??[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:r[1]||=t=>e.$emit(`copy`,t)},null,8,[`show-tooltips`,`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`,`is-dark`]))],16))}}),[[`__scopeId`,`data-v-617214f9`]]);QZ.install=e=>{e.component(QZ.__name,QZ)};var $Z=wY(G({__name:`ListNode`,props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:[`copy`],setup(e){let t=bY(()=>e.customId),n=L(()=>t.value.list_item||QZ);return(t,r)=>(c(),P(x(e.node.ordered?`ol`:`ul`),{class:V([`list-node`,{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:B(()=>[(c(!0),W(M,null,_(e.node.items,(i,a)=>(c(),P(x(n.value),re({key:`${e.indexKey||`list`}-${a}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||`list`}-${a}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?(e.node.start??1)+a:void 0,onCopy:r[0]||=e=>t.$emit(`copy`,e)}),null,16,[`node`,`custom-id`,`index-key`,`typewriter`,`fade`,`is-dark`,`value`]))),128))]),_:1},8,[`class`]))}}),[[`__scopeId`,`data-v-99cb95e0`]]);$Z.install=e=>{e.component($Z.__name,$Z)};var eQ={key:2,class:`html-block-node__raw`},tQ=[`innerHTML`],nQ={key:1,class:`html-block-node__placeholder`},rQ=wY(G({__name:`HtmlBlockNode`,props:{node:{},customId:{},htmlPolicy:{}},setup(e){let t=e,n=m(`markstreamHtmlPolicy`,void 0),r=m(`markstreamNestedRendererProps`,void 0),a=L(()=>t.htmlPolicy??n?.value??`safe`),l=L(()=>{let e=r?.value??{};return lY(cY({},e),{customId:t.customId??e.customId,htmlPolicy:a.value})}),u=i({loader:()=>Promise.resolve().then(()=>F0),suspensible:!1}),d=L(()=>{let e=fK(t.node.attrs,a.value);if(!e)return;let n=dK(e);return Object.keys(n).length>0?n:void 0}),f=L(()=>{let e=String(t.node.tag||``).trim(),n=fK(t.node.attrs,a.value,e);if(!n)return;let r=dK(n);return Object.keys(r).length>0?r:void 0}),p=bY(()=>t.customId),h=G({name:`DynamicRenderer`,props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),g=R(null),_=R(typeof window>`u`),v=R(t.node.content),y=L(()=>Array.isArray(t.node.children)?t.node.children:[]),b=L(()=>String(t.node.tag||`div`)),S=L(()=>{if(b.value.trim().toLowerCase()!==`details`||t.node.attrs?.some(([e])=>String(e).toLowerCase()===`open`))return null;let e=y.value[0];return e?.type===`html_block`&&String(e.tag||``).toLowerCase()===`summary`?e:null}),C=L(()=>jZ(S.value?.children)),w=L(()=>{let e=S.value;if(!e)return;let t=fK(e.attrs,a.value,`summary`);if(!t)return;let n=dK(t);return Object.keys(n).length>0?n:void 0}),T=L(()=>C.value==null?y.value:y.value.slice(1)),D=L(()=>{let e=b.value.trim().toLowerCase();return YI.has(e)||eK(e,a.value)}),O=L(()=>y.value.length>0&&!!t.node.tag&&!D.value),k=L(()=>{if(O.value)return{mode:`structured`};if(!_.value)return{mode:`html`,content:v.value??``};let e=v.value??t.node.content;if(!e)return{mode:`html`,content:``};if(a.value===`escape`)return{mode:`html`,content:bK(e,a.value)};if(t.node.loading){let n=VY(e,p.value,a.value);return n===null?{mode:`text`,content:t.node.raw??e}:{mode:`dynamic`,nodes:n}}if(!BY(e,p.value))return{mode:`html`,content:bK(e,a.value)};let n=VY(e,p.value,a.value);return n===null?{mode:`html`,content:bK(e,a.value)}:{mode:`dynamic`,nodes:n}}),A=wX(),N=xX(),ee=SX(),I=ue(null),te=!!t.node.loading;return typeof window<`u`?(s([()=>g.value,()=>N?.value.heavyBlockMargin,()=>N?.value.rootMargin],([e],n,r)=>{var i,a;if((a=(i=I.value)?.destroy)==null||a.call(i),I.value=null,!te)return _.value=!0,void(v.value=t.node.content);if(!e)return void(_.value=!1);let o=!0,s=A(e,{rootMargin:N?.value.heavyBlockMargin??N?.value.rootMargin??bX,allowIdle:!ee.value});I.value=s,_.value=_.value||s.isVisible.value,s.whenVisible.then(()=>{o&&I.value===s&&(_.value=!0)}),r(()=>{o=!1,s.destroy(),I.value===s&&(I.value=null)})},{immediate:!0}),s(()=>t.node.content,e=>{te&&!_.value||(v.value=e)})):_.value=!0,ne(()=>{var e,t;(t=(e=I.value)?.destroy)==null||t.call(e),I.value=null}),(t,n)=>(c(),P(x(O.value?b.value:`div`),re({ref_key:`htmlRef`,ref:g,class:`html-block-node`,"data-markstream-viewport-pending":z(ee)&&!_.value?`true`:void 0},O.value?f.value:void 0),{default:B(()=>[_.value?(c(),W(M,{key:0},[k.value.mode===`structured`?(c(),W(M,{key:0},[C.value===null?(c(),P(z(u),re({key:1},l.value,{nodes:y.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`])):(c(),W(M,{key:0},[F(`summary`,j(o(w.value)),U(C.value),17),T.value.length?(c(),P(z(u),re({key:0},l.value,{nodes:T.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`])):E(``,!0)],64))],64)):k.value.mode===`dynamic`?(c(),P(z(h),{key:1,nodes:k.value.nodes},null,8,[`nodes`])):k.value.mode===`text`?(c(),W(`pre`,eQ,U(k.value.content),1)):(c(),W(`div`,re({key:3},d.value,{innerHTML:k.value.content}),null,16,tQ))],64)):(c(),W(`div`,nQ,[me(t.$slots,`placeholder`,{node:e.node},()=>[n[0]||=F(`span`,{class:`html-block-node__placeholder-bar`},null,-1),n[1]||=F(`span`,{class:`html-block-node__placeholder-bar w-4/5`},null,-1),n[2]||=F(`span`,{class:`html-block-node__placeholder-bar w-2/3`},null,-1)],!0)]))]),_:3},16,[`data-markstream-viewport-pending`]))}}),[[`__scopeId`,`data-v-e140a874`]]);rQ.install=e=>{e.component(rQ.__name,rQ)};var iQ={dir:`auto`,class:`paragraph-node`},aQ=[`custom-id`],oQ=wY(G({__name:`ParagraphNode`,props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){let t=e,n=bY(()=>t.customId),r=m(`markstreamHtmlPolicy`,void 0),a=m(`markstreamFade`,void 0),o=m(`markstreamParseOptions`,void 0),s=m(`markstreamCustomMarkdownIt`,void 0),l=m(`markstreamNestedRendererProps`,void 0),u=L(()=>r?.value??`safe`),d=L(()=>t.parseOptions??o?.value),f=L(()=>t.customMarkdownIt??s?.value),p=L(()=>t.customHtmlTags??l?.value?.customHtmlTags),h=L(()=>{let e=l?.value??{};return lY(cY({},e),{customId:t.customId??e.customId,customHtmlTags:p.value,parseOptions:d.value,customMarkdownIt:f.value,htmlPolicy:u.value})}),g=i({loader:()=>Promise.resolve().then(()=>F0),suspensible:!1});function v(e){return e.type===`text`&&String(e.content??``).trim()===``}let y=L(()=>t.node.children.filter(e=>!v(e))),b=L(()=>y.value.length>0&&y.value.every(e=>e.type===`image`||function(e){let t=function(e){return e.type===`link`&&Array.isArray(e.children)?e.children.filter(e=>!v(e)):[]}(e);return t.length===1&&t[0]?.type===`image`}(e))),S=L(()=>new Set(SL(p.value))),C=L(()=>{if(!b.value||y.value.length<=1)return t.node.children;let e=[];for(let n=0;n0,a=t.node.children.slice(n+1).some(e=>!v(e));i&&a&&e.push(lY(cY({},r),{content:` `,raw:` `}))}return e}),w=L(()=>!1===a?.value&&!n.value.text),T=L(()=>w.value?jZ(C.value):null);function D(e,n){return{node:e,"index-key":`${t.indexKey}-${n}`,"custom-id":t.customId,"custom-html-tags":p.value}}let O=L(()=>cY({inline_code:KY,image:NX,link:yZ,hardbreak:DZ,emphasis:TZ,strong:fZ,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,html_inline:UY,html_block:rQ,emoji:DY,checkbox:TY,math_inline:iZ,checkbox_input:TY,reference:oZ,footnote_anchor:VZ,footnote_reference:AY,text:eZ},n.value)),k=L(()=>C.value.map((e,r)=>{let i=function(e){if(e.type===`html_block`||e.type===`html_inline`){let t=String(e.tag??``).trim().toLowerCase()||TL(e.content);if(t&&!S.value.has(t)&&DL(e.content??e.raw,t)){let t=String(e.content??e.raw??``);return{child:{type:`text`,content:t,raw:t},component:eZ,isCustomComponent:!1}}}return{child:e,component:O.value[e.type],isCustomComponent:!!(n.value[e.type]&&!_Y(String(e.type)))}}(e);return lY(cY({},i),{index:r,key:`${t.indexKey||`paragraph`}-${r}`,customAttrs:i.isCustomComponent?IY(i.child,u.value):void 0,hasSlotChildren:Array.isArray(i.child.children)&&i.child.children.length>0,slotContent:String(i.child.content??``),originalChild:e})}));return(e,n)=>(c(),W(`p`,iQ,[T.value===null?(c(!0),W(M,{key:1},_(k.value,e=>{return c(),W(M,{key:e.key},[b.value&&v(e.originalChild)?(c(),W(M,{key:0},[K(U((n=e.originalChild,String((r=n.content)??``))),1)],64)):e.isCustomComponent?(c(),P(x(e.component),re({key:1,ref_for:!0},e.customAttrs,{node:e.child,loading:e.child.loading,"index-key":e.key,"custom-id":t.customId,"custom-html-tags":p.value,"is-dark":h.value.isDark}),{default:B(()=>[e.hasSlotChildren?(c(),P(z(g),re({key:0,ref_for:!0},h.value,{nodes:e.child.children,"index-key":e.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(c(),P(z(g),re({key:1,ref_for:!0},h.value,{content:e.slotContent,final:!e.child.loading,"index-key":`${e.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):E(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`custom-html-tags`,`is-dark`])):(c(),P(x(e.component),re({key:2,ref_for:!0},D(e.child,e.index)),null,16))],64);var n,r}),128)):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(T.value),9,aQ))]))}}),[[`__scopeId`,`data-v-c59ff506`]]);oQ.install=e=>{e.component(oQ.__name,oQ)};var sQ={class:`table-node-wrapper`},cQ=[`aria-busy`],lQ={key:0},uQ=[`custom-id`],dQ=[`aria-label`,`onPointerdown`],fQ=[`custom-id`],pQ={key:0,class:`table-node__loading`,role:`status`,"aria-live":`polite`},mQ=wY(G({__name:`TableNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=L(()=>{var e;return(e=t.node.loading)!=null&&e}),r=L(()=>t.node.rows??[]),i=R(null),a=R([]),o=null,l=L(()=>t.node.header.cells.length),u=L(()=>a.value.some(e=>Number.isFinite(e)&&e>0)),f=L(()=>u.value?a.value.map(e=>e>0?{width:`${e}px`}:void 0):[]);d(`markstreamShowTooltips`,L(()=>t.showTooltips)),d(`markstreamFade`,L(()=>t.fade));let p=bY(()=>t.customId),m=L(()=>!!p.value.text),h=L(()=>!!p.value.paragraph),g=new WeakMap;function y(e){let n=!1===t.fade&&!m.value,r=!h.value,i=g.get(e);if(i?.children===e.children&&i.textFastPath===n&&i.paragraphFastPath===r)return i.info;let a=AZ(e.children,r,!0),o={simpleChildren:a,plainText:a&&n?jZ(a):null};return g.set(e,{children:e.children,textFastPath:n,paragraphFastPath:r,info:o}),o}function b(e){if(!o)return;e.preventDefault();let t=o.startWidth+o.nextStartWidth,n=Math.min(48,Math.floor(t/2)),r=Math.max(n,Math.min(t-n,Math.round(o.startWidth+e.clientX-o.startX))),i=[...o.widths];i[o.index]=r,i[o.index+1]=t-r,a.value=i}function x(){o&&=(window.removeEventListener(`pointermove`,b),window.removeEventListener(`pointerup`,x),window.removeEventListener(`pointercancel`,x),null)}return s(l,()=>{x(),a.value=[]}),ne(x),(s,l)=>(c(),W(`div`,sQ,[F(`table`,{ref_key:`tableRef`,ref:i,class:V([`table-node`,{"table-node--loading":n.value}]),"aria-busy":n.value},[u.value?(c(),W(`colgroup`,lQ,[(c(!0),W(M,null,_(e.node.header.cells,(e,t)=>(c(),W(`col`,{key:t,style:ae(f.value[t])},null,4))),128))])):E(``,!0),F(`thead`,null,[F(`tr`,null,[(c(!0),W(M,null,_(e.node.header.cells,(n,r)=>(c(),W(`th`,{key:r,dir:`auto`,class:V([n.align===`right`?`text-right`:n.align===`center`?`text-center`:`text-left`])},[y(n).plainText===null?y(n).simpleChildren?(c(),P(z(OZ),{key:1,nodes:y(n).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${r}`},null,8,[`nodes`,`custom-id`,`index-key`])):(c(),P(z(P0),{key:2,nodes:n.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:l[0]||=e=>s.$emit(`copy`,e)},null,8,[`nodes`,`index-key`,`custom-id`,`typewriter`,`fade`,`show-tooltips`])):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(y(n).plainText),9,uQ)),rfunction(e,t){if(t.button!==0)return;let n=function(){let e=i.value?.querySelectorAll(`thead th`);return Array.from(e??[],e=>Math.round(e.getBoundingClientRect().width))}(),r=n[e],s=n[e+1];r&&s&&(t.preventDefault(),o={index:e,startX:t.clientX,startWidth:r,nextStartWidth:s,widths:n},a.value=n,window.addEventListener(`pointermove`,b),window.addEventListener(`pointerup`,x),window.addEventListener(`pointercancel`,x))}(r,e)},null,40,dQ)):E(``,!0)],2))),128))])]),F(`tbody`,null,[(c(!0),W(M,null,_(r.value,(e,n)=>(c(),W(`tr`,{key:n},[(c(!0),W(M,null,_(e.cells,(e,r)=>(c(),W(`td`,{key:r,class:V([e.align===`right`?`text-right`:e.align===`center`?`text-center`:`text-left`]),dir:`auto`},[y(e).plainText===null?y(e).simpleChildren?(c(),P(z(OZ),{key:1,nodes:y(e).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${n}-${r}`},null,8,[`nodes`,`custom-id`,`index-key`])):(c(),P(z(P0),{key:2,nodes:e.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:l[1]||=e=>s.$emit(`copy`,e)},null,8,[`nodes`,`index-key`,`custom-id`,`typewriter`,`fade`,`show-tooltips`])):(c(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},U(y(e).plainText),9,fQ))],2))),128))]))),128))])],10,cQ),v(oe,{name:`table-node-fade`},{default:B(()=>[n.value?(c(),W(`div`,pQ,[me(s.$slots,`loading`,{isLoading:n.value},()=>[l[2]||=F(`span`,{class:`table-node__spinner animate-spin`,"aria-hidden":`true`},null,-1),l[3]||=F(`span`,{class:`sr-only`},`Loading`,-1)],!0)])):E(``,!0)]),_:3})]))}}),[[`__scopeId`,`data-v-39f87b5d`]]);mQ.install=e=>{e.component(mQ.__name,mQ)};var hQ={class:`hr-node`},gQ=wY({},[[`render`,function(e,t){return c(),W(`hr`,hQ)}],[`__scopeId`,`data-v-39b2349c`]]);gQ.install=e=>{e.component(gQ.__name,gQ)};var _Q={class:`unknown-node`},vQ=G({__name:`FallbackComponent`,props:{node:{}},setup:e=>(t,n)=>(c(),W(`div`,_Q,U(e.node.raw),1))}),yQ=wY(G({__name:`VmrContainerNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){let t=e,n=L(()=>`vmr-container vmr-container-${t.node.name}`),r=bY(()=>t.customId),i=L(()=>cY({text:eZ,paragraph:oQ,heading:qZ,inline_code:KY,link:yZ,image:NX,strong:fZ,emphasis:TZ,strikethrough:mZ,insert:xZ,subscript:uZ,superscript:cZ,checkbox:TY,checkbox_input:TY,hardbreak:DZ,math_inline:iZ,reference:oZ,list:$Z,math_block:aZ,table:mQ},r.value));return(r,a)=>(c(),W(`div`,re({class:n.value},e.node.attrs),[(c(!0),W(M,null,_(e.node.children,(n,r)=>{return c(),P(x((a=n.type,i.value[a]||vQ)),{key:`${e.indexKey||`vmr-container`}-${r}`,"custom-id":t.customId,node:n,"index-key":`${e.indexKey||`vmr-container`}-${r}`,typewriter:t.typewriter,fade:t.fade},null,8,[`custom-id`,`node`,`index-key`,`typewriter`,`fade`]);var a}),128))],16))}}),[[`__scopeId`,`data-v-911e41c4`]]);yQ.install=e=>{e.component(yQ.__name,yQ)};var bQ=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.ON.ON.ET.ET.ET.ON.ON.ON.ON.ON.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.ON.ET.ET.ET.ET.ON.ON.ON.ON.L.ON.ON.BN.ON.ON.ET.ET.EN.EN.ON.L.ON.ON.ON.EN.L.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L`.split(`.`),xQ=[[697,698,`ON`],[706,719,`ON`],[722,735,`ON`],[741,749,`ON`],[751,767,`ON`],[768,879,`NSM`],[884,885,`ON`],[894,894,`ON`],[900,901,`ON`],[903,903,`ON`],[1014,1014,`ON`],[1155,1161,`NSM`],[1418,1418,`ON`],[1421,1422,`ON`],[1423,1423,`ET`],[1424,1424,`R`],[1425,1469,`NSM`],[1470,1470,`R`],[1471,1471,`NSM`],[1472,1472,`R`],[1473,1474,`NSM`],[1475,1475,`R`],[1476,1477,`NSM`],[1478,1478,`R`],[1479,1479,`NSM`],[1480,1535,`R`],[1536,1541,`AN`],[1542,1543,`ON`],[1544,1544,`AL`],[1545,1546,`ET`],[1547,1547,`AL`],[1548,1548,`CS`],[1549,1549,`AL`],[1550,1551,`ON`],[1552,1562,`NSM`],[1563,1610,`AL`],[1611,1631,`NSM`],[1632,1641,`AN`],[1642,1642,`ET`],[1643,1644,`AN`],[1645,1647,`AL`],[1648,1648,`NSM`],[1649,1749,`AL`],[1750,1756,`NSM`],[1757,1757,`AN`],[1758,1758,`ON`],[1759,1764,`NSM`],[1765,1766,`AL`],[1767,1768,`NSM`],[1769,1769,`ON`],[1770,1773,`NSM`],[1774,1775,`AL`],[1776,1785,`EN`],[1786,1808,`AL`],[1809,1809,`NSM`],[1810,1839,`AL`],[1840,1866,`NSM`],[1867,1957,`AL`],[1958,1968,`NSM`],[1969,1983,`AL`],[1984,2026,`R`],[2027,2035,`NSM`],[2036,2037,`R`],[2038,2041,`ON`],[2042,2044,`R`],[2045,2045,`NSM`],[2046,2069,`R`],[2070,2073,`NSM`],[2074,2074,`R`],[2075,2083,`NSM`],[2084,2084,`R`],[2085,2087,`NSM`],[2088,2088,`R`],[2089,2093,`NSM`],[2094,2136,`R`],[2137,2139,`NSM`],[2140,2143,`R`],[2144,2191,`AL`],[2192,2193,`AN`],[2194,2198,`AL`],[2199,2207,`NSM`],[2208,2249,`AL`],[2250,2273,`NSM`],[2274,2274,`AN`],[2275,2306,`NSM`],[2362,2362,`NSM`],[2364,2364,`NSM`],[2369,2376,`NSM`],[2381,2381,`NSM`],[2385,2391,`NSM`],[2402,2403,`NSM`],[2433,2433,`NSM`],[2492,2492,`NSM`],[2497,2500,`NSM`],[2509,2509,`NSM`],[2530,2531,`NSM`],[2546,2547,`ET`],[2555,2555,`ET`],[2558,2558,`NSM`],[2561,2562,`NSM`],[2620,2620,`NSM`],[2625,2626,`NSM`],[2631,2632,`NSM`],[2635,2637,`NSM`],[2641,2641,`NSM`],[2672,2673,`NSM`],[2677,2677,`NSM`],[2689,2690,`NSM`],[2748,2748,`NSM`],[2753,2757,`NSM`],[2759,2760,`NSM`],[2765,2765,`NSM`],[2786,2787,`NSM`],[2801,2801,`ET`],[2810,2815,`NSM`],[2817,2817,`NSM`],[2876,2876,`NSM`],[2879,2879,`NSM`],[2881,2884,`NSM`],[2893,2893,`NSM`],[2901,2902,`NSM`],[2914,2915,`NSM`],[2946,2946,`NSM`],[3008,3008,`NSM`],[3021,3021,`NSM`],[3059,3064,`ON`],[3065,3065,`ET`],[3066,3066,`ON`],[3072,3072,`NSM`],[3076,3076,`NSM`],[3132,3132,`NSM`],[3134,3136,`NSM`],[3142,3144,`NSM`],[3146,3149,`NSM`],[3157,3158,`NSM`],[3170,3171,`NSM`],[3192,3198,`ON`],[3201,3201,`NSM`],[3260,3260,`NSM`],[3276,3277,`NSM`],[3298,3299,`NSM`],[3328,3329,`NSM`],[3387,3388,`NSM`],[3393,3396,`NSM`],[3405,3405,`NSM`],[3426,3427,`NSM`],[3457,3457,`NSM`],[3530,3530,`NSM`],[3538,3540,`NSM`],[3542,3542,`NSM`],[3633,3633,`NSM`],[3636,3642,`NSM`],[3647,3647,`ET`],[3655,3662,`NSM`],[3761,3761,`NSM`],[3764,3772,`NSM`],[3784,3790,`NSM`],[3864,3865,`NSM`],[3893,3893,`NSM`],[3895,3895,`NSM`],[3897,3897,`NSM`],[3898,3901,`ON`],[3953,3966,`NSM`],[3968,3972,`NSM`],[3974,3975,`NSM`],[3981,3991,`NSM`],[3993,4028,`NSM`],[4038,4038,`NSM`],[4141,4144,`NSM`],[4146,4151,`NSM`],[4153,4154,`NSM`],[4157,4158,`NSM`],[4184,4185,`NSM`],[4190,4192,`NSM`],[4209,4212,`NSM`],[4226,4226,`NSM`],[4229,4230,`NSM`],[4237,4237,`NSM`],[4253,4253,`NSM`],[4957,4959,`NSM`],[5008,5017,`ON`],[5120,5120,`ON`],[5760,5760,`WS`],[5787,5788,`ON`],[5906,5908,`NSM`],[5938,5939,`NSM`],[5970,5971,`NSM`],[6002,6003,`NSM`],[6068,6069,`NSM`],[6071,6077,`NSM`],[6086,6086,`NSM`],[6089,6099,`NSM`],[6107,6107,`ET`],[6109,6109,`NSM`],[6128,6137,`ON`],[6144,6154,`ON`],[6155,6157,`NSM`],[6158,6158,`BN`],[6159,6159,`NSM`],[6277,6278,`NSM`],[6313,6313,`NSM`],[6432,6434,`NSM`],[6439,6440,`NSM`],[6450,6450,`NSM`],[6457,6459,`NSM`],[6464,6464,`ON`],[6468,6469,`ON`],[6622,6655,`ON`],[6679,6680,`NSM`],[6683,6683,`NSM`],[6742,6742,`NSM`],[6744,6750,`NSM`],[6752,6752,`NSM`],[6754,6754,`NSM`],[6757,6764,`NSM`],[6771,6780,`NSM`],[6783,6783,`NSM`],[6832,6877,`NSM`],[6880,6891,`NSM`],[6912,6915,`NSM`],[6964,6964,`NSM`],[6966,6970,`NSM`],[6972,6972,`NSM`],[6978,6978,`NSM`],[7019,7027,`NSM`],[7040,7041,`NSM`],[7074,7077,`NSM`],[7080,7081,`NSM`],[7083,7085,`NSM`],[7142,7142,`NSM`],[7144,7145,`NSM`],[7149,7149,`NSM`],[7151,7153,`NSM`],[7212,7219,`NSM`],[7222,7223,`NSM`],[7376,7378,`NSM`],[7380,7392,`NSM`],[7394,7400,`NSM`],[7405,7405,`NSM`],[7412,7412,`NSM`],[7416,7417,`NSM`],[7616,7679,`NSM`],[8125,8125,`ON`],[8127,8129,`ON`],[8141,8143,`ON`],[8157,8159,`ON`],[8173,8175,`ON`],[8189,8190,`ON`],[8192,8202,`WS`],[8203,8205,`BN`],[8207,8207,`R`],[8208,8231,`ON`],[8232,8232,`WS`],[8233,8233,`B`],[8234,8238,`BN`],[8239,8239,`CS`],[8240,8244,`ET`],[8245,8259,`ON`],[8260,8260,`CS`],[8261,8286,`ON`],[8287,8287,`WS`],[8288,8303,`BN`],[8304,8304,`EN`],[8308,8313,`EN`],[8314,8315,`ES`],[8316,8318,`ON`],[8320,8329,`EN`],[8330,8331,`ES`],[8332,8334,`ON`],[8352,8399,`ET`],[8400,8432,`NSM`],[8448,8449,`ON`],[8451,8454,`ON`],[8456,8457,`ON`],[8468,8468,`ON`],[8470,8472,`ON`],[8478,8483,`ON`],[8485,8485,`ON`],[8487,8487,`ON`],[8489,8489,`ON`],[8494,8494,`ET`],[8506,8507,`ON`],[8512,8516,`ON`],[8522,8525,`ON`],[8528,8543,`ON`],[8585,8587,`ON`],[8592,8721,`ON`],[8722,8722,`ES`],[8723,8723,`ET`],[8724,9013,`ON`],[9083,9108,`ON`],[9110,9257,`ON`],[9280,9290,`ON`],[9312,9351,`ON`],[9352,9371,`EN`],[9450,9899,`ON`],[9901,10239,`ON`],[10496,11123,`ON`],[11126,11263,`ON`],[11493,11498,`ON`],[11503,11505,`NSM`],[11513,11519,`ON`],[11647,11647,`NSM`],[11744,11775,`NSM`],[11776,11869,`ON`],[11904,11929,`ON`],[11931,12019,`ON`],[12032,12245,`ON`],[12272,12287,`ON`],[12288,12288,`WS`],[12289,12292,`ON`],[12296,12320,`ON`],[12330,12333,`NSM`],[12336,12336,`ON`],[12342,12343,`ON`],[12349,12351,`ON`],[12441,12442,`NSM`],[12443,12444,`ON`],[12448,12448,`ON`],[12539,12539,`ON`],[12736,12773,`ON`],[12783,12783,`ON`],[12829,12830,`ON`],[12880,12895,`ON`],[12924,12926,`ON`],[12977,12991,`ON`],[13004,13007,`ON`],[13175,13178,`ON`],[13278,13279,`ON`],[13311,13311,`ON`],[19904,19967,`ON`],[42128,42182,`ON`],[42509,42511,`ON`],[42607,42610,`NSM`],[42611,42611,`ON`],[42612,42621,`NSM`],[42622,42623,`ON`],[42654,42655,`NSM`],[42736,42737,`NSM`],[42752,42785,`ON`],[42888,42888,`ON`],[43010,43010,`NSM`],[43014,43014,`NSM`],[43019,43019,`NSM`],[43045,43046,`NSM`],[43048,43051,`ON`],[43052,43052,`NSM`],[43064,43065,`ET`],[43124,43127,`ON`],[43204,43205,`NSM`],[43232,43249,`NSM`],[43263,43263,`NSM`],[43302,43309,`NSM`],[43335,43345,`NSM`],[43392,43394,`NSM`],[43443,43443,`NSM`],[43446,43449,`NSM`],[43452,43453,`NSM`],[43493,43493,`NSM`],[43561,43566,`NSM`],[43569,43570,`NSM`],[43573,43574,`NSM`],[43587,43587,`NSM`],[43596,43596,`NSM`],[43644,43644,`NSM`],[43696,43696,`NSM`],[43698,43700,`NSM`],[43703,43704,`NSM`],[43710,43711,`NSM`],[43713,43713,`NSM`],[43756,43757,`NSM`],[43766,43766,`NSM`],[43882,43883,`ON`],[44005,44005,`NSM`],[44008,44008,`NSM`],[44013,44013,`NSM`],[64285,64285,`R`],[64286,64286,`NSM`],[64287,64296,`R`],[64297,64297,`ES`],[64298,64335,`R`],[64336,64450,`AL`],[64451,64466,`ON`],[64467,64829,`AL`],[64830,64847,`ON`],[64848,64911,`AL`],[64912,64913,`ON`],[64914,64967,`AL`],[64968,64975,`ON`],[64976,65007,`BN`],[65008,65020,`AL`],[65021,65023,`ON`],[65024,65039,`NSM`],[65040,65049,`ON`],[65056,65071,`NSM`],[65072,65103,`ON`],[65104,65104,`CS`],[65105,65105,`ON`],[65106,65106,`CS`],[65108,65108,`ON`],[65109,65109,`CS`],[65110,65118,`ON`],[65119,65119,`ET`],[65120,65121,`ON`],[65122,65123,`ES`],[65124,65126,`ON`],[65128,65128,`ON`],[65129,65130,`ET`],[65131,65131,`ON`],[65136,65278,`AL`],[65279,65279,`BN`],[65281,65282,`ON`],[65283,65285,`ET`],[65286,65290,`ON`],[65291,65291,`ES`],[65292,65292,`CS`],[65293,65293,`ES`],[65294,65295,`CS`],[65296,65305,`EN`],[65306,65306,`CS`],[65307,65312,`ON`],[65339,65344,`ON`],[65371,65381,`ON`],[65504,65505,`ET`],[65506,65508,`ON`],[65509,65510,`ET`],[65512,65518,`ON`],[65520,65528,`BN`],[65529,65533,`ON`],[65534,65535,`BN`],[65793,65793,`ON`],[65856,65932,`ON`],[65936,65948,`ON`],[65952,65952,`ON`],[66045,66045,`NSM`],[66272,66272,`NSM`],[66273,66299,`EN`],[66422,66426,`NSM`],[67584,67870,`R`],[67871,67871,`ON`],[67872,68096,`R`],[68097,68099,`NSM`],[68100,68100,`R`],[68101,68102,`NSM`],[68103,68107,`R`],[68108,68111,`NSM`],[68112,68151,`R`],[68152,68154,`NSM`],[68155,68158,`R`],[68159,68159,`NSM`],[68160,68324,`R`],[68325,68326,`NSM`],[68327,68408,`R`],[68409,68415,`ON`],[68416,68863,`R`],[68864,68899,`AL`],[68900,68903,`NSM`],[68904,68911,`AL`],[68912,68921,`AN`],[68922,68927,`AL`],[68928,68937,`AN`],[68938,68968,`R`],[68969,68973,`NSM`],[68974,68974,`ON`],[68975,69215,`R`],[69216,69246,`AN`],[69247,69290,`R`],[69291,69292,`NSM`],[69293,69311,`R`],[69312,69327,`AL`],[69328,69336,`ON`],[69337,69369,`AL`],[69370,69375,`NSM`],[69376,69423,`R`],[69424,69445,`AL`],[69446,69456,`NSM`],[69457,69487,`AL`],[69488,69505,`R`],[69506,69509,`NSM`],[69510,69631,`R`],[69633,69633,`NSM`],[69688,69702,`NSM`],[69714,69733,`ON`],[69744,69744,`NSM`],[69747,69748,`NSM`],[69759,69761,`NSM`],[69811,69814,`NSM`],[69817,69818,`NSM`],[69826,69826,`NSM`],[69888,69890,`NSM`],[69927,69931,`NSM`],[69933,69940,`NSM`],[70003,70003,`NSM`],[70016,70017,`NSM`],[70070,70078,`NSM`],[70089,70092,`NSM`],[70095,70095,`NSM`],[70191,70193,`NSM`],[70196,70196,`NSM`],[70198,70199,`NSM`],[70206,70206,`NSM`],[70209,70209,`NSM`],[70367,70367,`NSM`],[70371,70378,`NSM`],[70400,70401,`NSM`],[70459,70460,`NSM`],[70464,70464,`NSM`],[70502,70508,`NSM`],[70512,70516,`NSM`],[70587,70592,`NSM`],[70606,70606,`NSM`],[70608,70608,`NSM`],[70610,70610,`NSM`],[70625,70626,`NSM`],[70712,70719,`NSM`],[70722,70724,`NSM`],[70726,70726,`NSM`],[70750,70750,`NSM`],[70835,70840,`NSM`],[70842,70842,`NSM`],[70847,70848,`NSM`],[70850,70851,`NSM`],[71090,71093,`NSM`],[71100,71101,`NSM`],[71103,71104,`NSM`],[71132,71133,`NSM`],[71219,71226,`NSM`],[71229,71229,`NSM`],[71231,71232,`NSM`],[71264,71276,`ON`],[71339,71339,`NSM`],[71341,71341,`NSM`],[71344,71349,`NSM`],[71351,71351,`NSM`],[71453,71453,`NSM`],[71455,71455,`NSM`],[71458,71461,`NSM`],[71463,71467,`NSM`],[71727,71735,`NSM`],[71737,71738,`NSM`],[71995,71996,`NSM`],[71998,71998,`NSM`],[72003,72003,`NSM`],[72148,72151,`NSM`],[72154,72155,`NSM`],[72160,72160,`NSM`],[72193,72198,`NSM`],[72201,72202,`NSM`],[72243,72248,`NSM`],[72251,72254,`NSM`],[72263,72263,`NSM`],[72273,72278,`NSM`],[72281,72283,`NSM`],[72330,72342,`NSM`],[72344,72345,`NSM`],[72544,72544,`NSM`],[72546,72548,`NSM`],[72550,72550,`NSM`],[72752,72758,`NSM`],[72760,72765,`NSM`],[72850,72871,`NSM`],[72874,72880,`NSM`],[72882,72883,`NSM`],[72885,72886,`NSM`],[73009,73014,`NSM`],[73018,73018,`NSM`],[73020,73021,`NSM`],[73023,73029,`NSM`],[73031,73031,`NSM`],[73104,73105,`NSM`],[73109,73109,`NSM`],[73111,73111,`NSM`],[73459,73460,`NSM`],[73472,73473,`NSM`],[73526,73530,`NSM`],[73536,73536,`NSM`],[73538,73538,`NSM`],[73562,73562,`NSM`],[73685,73692,`ON`],[73693,73696,`ET`],[73697,73713,`ON`],[78912,78912,`NSM`],[78919,78933,`NSM`],[90398,90409,`NSM`],[90413,90415,`NSM`],[92912,92916,`NSM`],[92976,92982,`NSM`],[94031,94031,`NSM`],[94095,94098,`NSM`],[94178,94178,`ON`],[94180,94180,`NSM`],[113821,113822,`NSM`],[113824,113827,`BN`],[117760,117973,`ON`],[118e3,118009,`EN`],[118010,118012,`ON`],[118016,118451,`ON`],[118458,118480,`ON`],[118496,118512,`ON`],[118528,118573,`NSM`],[118576,118598,`NSM`],[119143,119145,`NSM`],[119155,119162,`BN`],[119163,119170,`NSM`],[119173,119179,`NSM`],[119210,119213,`NSM`],[119273,119274,`ON`],[119296,119361,`ON`],[119362,119364,`NSM`],[119365,119365,`ON`],[119552,119638,`ON`],[120513,120513,`ON`],[120539,120539,`ON`],[120571,120571,`ON`],[120597,120597,`ON`],[120629,120629,`ON`],[120655,120655,`ON`],[120687,120687,`ON`],[120713,120713,`ON`],[120745,120745,`ON`],[120771,120771,`ON`],[120782,120831,`EN`],[121344,121398,`NSM`],[121403,121452,`NSM`],[121461,121461,`NSM`],[121476,121476,`NSM`],[121499,121503,`NSM`],[121505,121519,`NSM`],[122880,122886,`NSM`],[122888,122904,`NSM`],[122907,122913,`NSM`],[122915,122916,`NSM`],[122918,122922,`NSM`],[123023,123023,`NSM`],[123184,123190,`NSM`],[123566,123566,`NSM`],[123628,123631,`NSM`],[123647,123647,`ET`],[124140,124143,`NSM`],[124398,124399,`NSM`],[124643,124643,`NSM`],[124646,124646,`NSM`],[124654,124655,`NSM`],[124661,124661,`NSM`],[124928,125135,`R`],[125136,125142,`NSM`],[125143,125251,`R`],[125252,125258,`NSM`],[125259,126063,`R`],[126064,126143,`AL`],[126144,126207,`R`],[126208,126287,`AL`],[126288,126463,`R`],[126464,126703,`AL`],[126704,126705,`ON`],[126706,126719,`AL`],[126720,126975,`R`],[126976,127019,`ON`],[127024,127123,`ON`],[127136,127150,`ON`],[127153,127167,`ON`],[127169,127183,`ON`],[127185,127221,`ON`],[127232,127242,`EN`],[127243,127247,`ON`],[127279,127279,`ON`],[127338,127343,`ON`],[127405,127405,`ON`],[127584,127589,`ON`],[127744,128728,`ON`],[128732,128748,`ON`],[128752,128764,`ON`],[128768,128985,`ON`],[128992,129003,`ON`],[129008,129008,`ON`],[129024,129035,`ON`],[129040,129095,`ON`],[129104,129113,`ON`],[129120,129159,`ON`],[129168,129197,`ON`],[129200,129211,`ON`],[129216,129217,`ON`],[129232,129240,`ON`],[129280,129623,`ON`],[129632,129645,`ON`],[129648,129660,`ON`],[129664,129674,`ON`],[129678,129734,`ON`],[129736,129736,`ON`],[129741,129756,`ON`],[129759,129770,`ON`],[129775,129784,`ON`],[129792,129938,`ON`],[129940,130031,`ON`],[130032,130041,`EN`],[130042,130042,`ON`],[131070,131071,`BN`],[196606,196607,`BN`],[262142,262143,`BN`],[327678,327679,`BN`],[393214,393215,`BN`],[458750,458751,`BN`],[524286,524287,`BN`],[589822,589823,`BN`],[655358,655359,`BN`],[720894,720895,`BN`],[786430,786431,`BN`],[851966,851967,`BN`],[917502,917759,`BN`],[917760,917999,`NSM`],[918e3,921599,`BN`],[983038,983039,`BN`],[1048574,1048575,`BN`],[1114110,1114111,`BN`]];function SQ(e){if(e<=255)return bQ[e];let t=0,n=xQ.length-1;for(;t<=n;){let r=t+n>>1,i=xQ[r];if(ei[1]))return i[2];t=r+1}}return`L`}var CQ=/[ \t\n\r\f]+/g,wQ=/[\t\n\r\f]| {2,}|^ | $/,TQ=null,EQ=RegExp(`\\p{Script=Arabic}`,`u`),DQ=RegExp(`\\p{M}`,`u`),OQ=RegExp(`\\p{Nd}`,`u`);function kQ(e){return EQ.test(e)}function AQ(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function jQ(e){for(let t=0;t=55296&&n<=56319&&t+1=56320&&r<=57343){if(AQ(r-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(AQ(n))return!0}}return!1}var MQ=new Set([`\xA0`,` `,`⁠`,``]),NQ=new Set([`-`,`‐`,`–`,`—`]);function PQ(e,t){return!(function(e){let t=qQ(e);return t!==null&&MQ.has(t)}(e)||t&&(function(e){let t=qQ(e);return t!==null&&(FQ.has(t)||RQ.has(t))}(e)||function(e){let t=qQ(e);return t!==null&&NQ.has(t)}(e)))}var FQ=new Set(`,...!.:.;.?.、.。.・.).〕.〉.》.」.』.】.〗.〙.〛.ー.々.〻.ゝ.ゞ.ヽ.ヾ`.split(`.`)),IQ=new Set([`"`,`(`,`[`,`{`,`¡`,`¿`,`“`,`‘`,`‚`,`„`,`«`,`‹`,`⸘`,`(`,`〔`,`〈`,`《`,`「`,`『`,`【`,`〖`,`〘`,`〚`]),LQ=new Set([`'`,`’`]),RQ=new Set(`.(,(!(?(:(;(،(؛(؟(।(॥(၊(။(၌(၍(၏()(](}(%("(”(’(»(›(…`.split(`(`)),zQ=new Set([`:`,`.`,`،`,`؛`]),BQ=new Set([`၏`]),VQ=new Set([`”`,`’`,`»`,`›`,`」`,`』`,`】`,`》`,`〉`,`〕`,`)`]);function HQ(e){if(GQ(e))return!0;let t=!1;for(let n of e)if(RQ.has(n)||YQ(n))t=!0;else if(!t||!DQ.test(n))return!1;return t}function UQ(e){for(let t of e)if(!FQ.has(t)&&!RQ.has(t))return!1;return e.length>0}function WQ(e){if(GQ(e))return!0;for(let t of e)if(!(IQ.has(t)||LQ.has(t)||DQ.test(t)||YQ(t)))return!1;return e.length>0}function GQ(e){let t=!1;for(let n of e)if(n!==`\\`&&!DQ.test(n)){if(!(IQ.has(n)||RQ.has(n)||LQ.has(n)))return!1;t=!0}return t}function KQ(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let r=e.charCodeAt(n);if(r<56320||r>57343)return n;let i=n-1;if(i<0)return n;let a=e.charCodeAt(i);return a>=55296&&a<=56319?i:n}function qQ(e){if(e.length===0)return null;let t=KQ(e,e.length);return e.slice(t)}var JQ=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function YQ(e){let t=e.codePointAt(0);return t!==void 0&&function(e,t){for(let n=0;n=t[n]&&e<=t[n+1])return!0;return!1}(t,JQ)}function XQ(e){let t=function(e){for(let t of e)if(!DQ.test(t))return t;return null}(e);return t!==null&&OQ.test(t)}function ZQ(e){let t=Array.from(e),n=t.length;for(;n>0;){let e=t[n-1];if(DQ.test(e))n--;else{if(!IQ.has(e)&&!LQ.has(e))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(``),tail:t.slice(n).join(``)}}function QQ(e,t,n){return n!==`text`||t||e.length!==1||e===`-`||e===`—`?null:e}function $Q(e,t,n,r){let i=t[r],a=e[r];if(i==null)return a;let o=n[r];if(a.length===o)return a;let s=i.repeat(o);return e[r]=s,s}function e$(e,t){return e&&t!==null&&zQ.has(t)}function t$(e){let t=qQ(e);return t!==null&&BQ.has(t)}function n$(e){if(e.length<2||e[0]!==` `)return null;let t=e.slice(1);return RegExp(`^\\p{M}+$`,`u`).test(t)?{space:` `,marks:t}:null}function r$(e){let t=e.length;for(;t>0;){let n=KQ(e,t),r=e.slice(n,t);if(VQ.has(r))return!0;if(!RQ.has(r))return!1;t=n}return!1}function i$(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===` `)return`preserved-space`;if(e===` `)return`tab`;if(t.preserveHardBreaks&&e===` `)return`hard-break`}return e===` `?`space`:e===`\xA0`||e===` `||e===`⁠`||e===``?`glue`:e===`​`?`zero-width-break`:e===`­`?`soft-hyphen`:`text`}var a$=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function o$(e){return e.length===1?e[0]:e.join(``)}function s$(e,t){let n=[];for(let t=e.length-1;t>=0;t--)n.push(e[t]);return n.push(t),o$(n)}function c$(e,t,n,r){if(!a$.test(e))return[{text:e,isWordLike:t,kind:`text`,start:n}];let i=[],a=null,o=[],s=n,c=!1,l=0;for(let u of e){let e=i$(u,r),d=e===`text`&&t;a===null||e!==a||d!==c?(a!==null&&i.push({text:o$(o),isWordLike:c,kind:a,start:s}),a=e,o=[u],s=n+l,c=d,l+=u.length):(o.push(u),l+=u.length)}return a!==null&&i.push({text:o$(o),isWordLike:c,kind:a,start:s}),i}function l$(e){return e===`space`||e===`preserved-space`||e===`zero-width-break`||e===`hard-break`}var u$=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function d$(e,t){let n=e.texts[t];return!!n.startsWith(`www.`)||u$.test(n)&&t+1=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}(t):!g$.has(e)&&!h$.test(e)&&m$.test(e)}function v$(e){let t=!1;for(let n of e)if(!DQ.test(n)){if(!_$(n))return!1;t=!0}return t}function y$(e,t,n,r){let i=!t&&v$(e),a=!r&&v$(n),o=function(e){let t=function(e){for(let t=e.length;t>0;){let n=KQ(e,t),r=e.slice(n,t);if(!DQ.test(r))return r;t=n}return null}(e);return t!==null&&YQ(t)}(e),s=(t||o)&&function(e){for(let t=e.length;t>0;){let n=KQ(e,t),r=e.slice(n,t);if(!DQ.test(r))return _$(r)||YQ(r);t=n}return!1}(e);return!!(i||a||s)&&!jQ(e)&&!jQ(n)&&(t||i||o)&&(r||a)}function b$(e){for(let t of e)if(OQ.test(t))return!0;return!1}function x$(e){if(e.length===0)return!1;for(let t of e)if(!OQ.test(t)&&!p$.has(t))return!1;return!0}function S$(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],r=0;for(let t=0;t0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}(e);if(a.length===0)return{normalized:a,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let o=function(e,t,n){var r;let i=(TQ===null&&(TQ=new Intl.Segmenter(void 0,{granularity:`word`})),TQ),a=0,o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=[],_=[];for(let v of i.segment(e))for(let e of c$(v.segment,(r=v.isWordLike)!=null&&r,v.index,n)){let n=function(){d[C]!==null&&(s[C]=[$Q(o,d,f,C)],d[C]=null),s[C].push(e.text),c[C]=c[C]||e.isWordLike,p[C]=p[C]||v,m[C]=m[C]||y,h[C]=x,g[C]=S,_[C]=e$(m[C],b)},r=e.kind===`text`,i=QQ(e.text,e.isWordLike,e.kind),v=jQ(e.text),y=kQ(e.text),b=qQ(e.text),x=r$(e.text),S=t$(e.text),C=a-1;t.carryCJKAfterClosingQuote&&r&&a>0&&l[C]===`text`&&v&&p[C]&&h[C]||r&&a>0&&l[C]===`text`&&UQ(e.text)&&p[C]||r&&a>0&&l[C]===`text`&&g[C]?n():r&&a>0&&l[C]===`text`&&e.isWordLike&&y&&_[C]?(n(),c[C]=!0):i!==null&&a>0&&l[C]===`text`&&d[C]===i?f[C]=(f[C]??1)+1:r&&!e.isWordLike&&a>0&&l[C]===`text`&&!p[C]&&(HQ(e.text)||e.text===`-`&&c[C])?n():(o[a]=e.text,s[a]=[e.text],c[a]=e.isWordLike,l[a]=e.kind,u[a]=e.start,d[a]=i,f[a]=i===null?0:1,p[a]=v,m[a]=y,h[a]=x,g[a]=S,_[a]=e$(y,b),a++)}for(let e=0;enull),y=-1;for(let e=a-1;e>=0;e--){let t=o[e];if(t.length!==0){if(l[e]===`text`&&!c[e]&&y>=0&&l[y]===`text`&&(WQ(t)||t===`-`&&XQ(o[y]))){let n=v[y]??[];n.push(t),v[y]=n,u[y]=u[e],o[e]=``;continue}y=e}}for(let e=0;ea+1){t.push(o$(s)),n.push(u),r.push(`text`),i.push(e.starts[a]),a=l;continue}}t.push(o),n.push(c),r.push(s),i.push(e.starts[a]),a++}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){let t=[],n=[],r=[],i=[];for(let a=0;a1;for(let e=0;e=e.len||l$(e.kinds[s]))continue;let c=[],l=e.starts[s],u=s;for(;u0&&(t.push(o$(c)),n.push(!0),r.push(`text`),i.push(l),a=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let i=0;i=0&&!PQ(t.texts[e-1],n)&&u(e),s<0&&(s=e),c||=jQ(l)):(u(e),r.push(l),i.push(t.isWordLike[e]),a.push(d),o.push(t.starts[e]))}return u(t.len),{len:r.length,texts:r,isWordLike:i,kinds:a,starts:o}}(a,o,t.breakKeepAllAfterPunctuation):o;return cY({normalized:a,chunks:S$(s,i)},s)}var w$=null,T$=new Map,E$=null,D$=RegExp(`\\p{Emoji_Presentation}`,`u`),O$=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,k$=null,A$=new Map;function j$(){if(w$!==null)return w$;if(typeof OffscreenCanvas<`u`)return w$=new OffscreenCanvas(1,1).getContext(`2d`),w$;if(typeof document<`u`)return w$=document.createElement(`canvas`).getContext(`2d`),w$;throw Error(`Text measurement requires OffscreenCanvas or a DOM canvas context.`)}function M$(e,t){let n=t.get(e);return n===void 0&&(n={width:j$().measureText(e).width,containsCJK:jQ(e)},t.set(e,n)),n}function N$(){if(E$!==null)return E$;if(typeof navigator>`u`)return E$={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},E$;let e=navigator.userAgent,t=navigator.vendor===`Apple Computer, Inc.`&&e.includes(`Safari/`)&&!e.includes(`Chrome/`)&&!e.includes(`Chromium/`)&&!e.includes(`CriOS/`)&&!e.includes(`FxiOS/`)&&!e.includes(`EdgiOS/`),n=e.includes(`Chrome/`)||e.includes(`Chromium/`)||e.includes(`CriOS/`)||e.includes(`Edg/`);return E$={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},E$}function P$(){return k$===null&&(k$=new Intl.Segmenter(void 0,{granularity:`grapheme`})),k$}function F$(e){return D$.test(e)||e.includes(`️`)}function I$(e,t,n){return n===0?t.width:t.width-function(e,t){return t.emojiCount===void 0&&(t.emojiCount=function(e){let t=0,n=P$();for(let r of n.segment(e))F$(r.segment)&&t++;return t}(e)),t.emojiCount}(e,t)*n}function L$(e){return e===`space`||e===`zero-width-break`||e===`soft-hyphen`}function R$(e){return e===`space`||e===`preserved-space`||e===`tab`||e===`zero-width-break`||e===`soft-hyphen`}function z$(e,t,n=e.widths.length){for(;t0?e.letterSpacing:0}function H$(e,t){return t===0?0:e+t}function U$(e,t,n,r,i){return H$(r,t===`tab`?i+function(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}(e,n):e.lineEndFitAdvances[n])}function W$(e,t,n,r){return H$(r,t===`tab`?0:e.lineEndFitAdvances[n])}function G$(e,t,n,r,i){return H$(r,t===`tab`?i:e.lineEndPaintAdvances[n])}function K$(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function q$(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function J$(e,t,n){let r=t;for(;ro){if(r!==null&&f>t){m(e,f,p),h=f,s=J$(r,s,h+1),f=-1,p=0;continue}m(),g(e,h,i)}else c+=i,u=e,d=h+1;else g(e,h,i);let a=h+1;r!==null&&r[s]===a&&(f=a,p=c,s++),h++}l&&u===e&&d===n.length&&(u=e+1,d=0)}let y=0;for(;y=n.length)));){let e=n[y],t=R$(r[y]);if(l)if(c+e>o){if(t){_(y,e),m(y+1,0,c-e),y++;continue}if(f>=0){if(u>f||u===f&&d>0){m();continue}m(f,0,p);continue}if(e>o&&i[y]!==null){m(),v(y,0),y++;continue}m()}else _(y,e),t&&(f=y+1,p=c-e),y++;else e>o&&i[y]!==null?v(y,0):h(y,e),t&&(f=y+1,p=c-e),y++}return l&&m(),s}(e,t);let{widths:n,kinds:r,breakableFitAdvances:i,breakablePreferredBreaks:a,discretionaryHyphenWidth:o,chunks:s}=e;if(n.length===0||s.length===0)return 0;let c=N$(),l=t+c.lineFitEpsilon,u=0,d=0,f=!1,p=0,m=0,h=-1,g=0,_=null;function v(){h=-1,g=0,_=null}function y(e=p,t=m,n){u++,d=0,f=!1,v()}function b(e,t){f=!0,p=e+1,m=0,d=t}function x(e,t,n){f=!0,p=e,m=t+1,d=n}function S(e,t){f?(d+=t,p=e+1,m=0):b(e,t)}function C(t,n,r,i,a,o){if(!n)return;let s=W$(e,t,r,a),c=G$(e,t,r,a,i);h=r+1,g=d-o+s,d-o+c,_=t}function w(t,n){let r=i[t],o=a[t]??null,s=o===null?-1:J$(o,0,n+1),c=-1,u=n;for(;ul){if(o!==null&&c>n){y(t,c),u=c,s=J$(o,s,u+1),c=-1;continue}y(),x(t,u,i)}else d=a,p=t,m=u+1}else x(t,u,i);let a=u+1;o!==null&&o[s]===a&&(c=a,s++),u++}f&&p===t&&m===r.length&&(p=t+1,m=0)}function T(e){u++,v()}for(let t=0;t=a.endSegmentIndex)));){let t=r[u],a=R$(t),s=V$(e,f,u),v=t===`tab`?B$(d+s,e.tabStopAdvance):n[u],x=s+v,T=U$(e,t,u,s,v);if(t!==`soft-hyphen`)if(f){if(d+T>l){let n=d+W$(e,t,u,s);if(G$(e,t,u,s,v),_===`soft-hyphen`&&c.preferEarlySoftHyphenBreak&&g<=l){y(h,0);continue}if(a&&n<=l){S(u,x),y(u+1,0),u++;continue}if(h>=0&&g<=l){if(p>h||p===h&&m>0){y();continue}let e=h;y(e,0),u=e;continue}if(T>l&&i[u]!==null){y(),w(u,0),u++;continue}y();continue}S(u,x),C(t,a,u,v,s,x),u++}else T>l&&i[u]!==null?w(u,0):b(u,v),C(t,a,u,v,s,x),u++;else f&&(p=u+1,m=0,h=u+1,g=d+o,d+o,_=t),u++}f&&(a.consumedEndSegmentIndex,y(a.consumedEndSegmentIndex,0))}return u}(e,t)}var X$=null;function Z$(){return X$===null&&(X$=new Intl.Segmenter(void 0,{granularity:`grapheme`})),X$}function Q$(e,t){let n=[],r=[],i=0,a=!1,o=!1,s=!1;function c(){r.length!==0&&(n.push({text:r.length===1?r[0]:r.join(``),start:i}),r=[],a=!1,o=!1,s=!1)}function l(e,t,n){r=[e],i=t,a=n,o=r$(e),s=IQ.has(e)}function u(e,t){r.push(e),a||=t;let n=r$(e);o=e.length===1&&RQ.has(e)&&o||n,s=!1}for(let n of Z$().segment(e)){let e=n.segment,i=jQ(e);r.length===0?l(e,n.index,i):s||FQ.has(e)||RQ.has(e)||t.carryCJKAfterClosingQuote&&i&&o?u(e,i):a||i?(c(),l(e,n.index,i)):u(e,i)}return c(),n}function $$(e,t,n){if(t.length<=1)return t;let r=[],i=-1,a=!1;function o(n){if(!(i<0)){if(a)i+1===n?r.push(t[i]):function(n,i){let a=t[n].start,o=i=0&&!PQ(t[e-1].text,n)&&o(e),i<0&&(i=e),a||=jQ(r.text)}return o(t.length),r}function e1(e,t){if(t===`zero-width-break`||t===`soft-hyphen`||t===`hard-break`)return 0;if(t===`tab`)return 1;let n=0,r=Z$();for(let t of r.segment(e))n++;return n}function t1(e){return e===`-`||e===`֊`||e===`‐`||e===`‒`||e===`–`||e===`—`}function n1(e,t,n,r,i){let a=N$(),{cache:o,emojiCorrection:s}=function(e,t){j$().font=e;let n=function(e){let t=T$.get(e);return t||(t=new Map,T$.set(e,t)),t}(e),r=function(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}(e);return{cache:n,fontSize:r,emojiCorrection:t?function(e,t){let n=A$.get(e);if(n!==void 0)return n;let r=j$();r.font=e;let i=r.measureText(`😀`).width;if(n=0,i>t+.5&&typeof document<`u`&&document.body!==null){let t=document.createElement(`span`);t.style.font=e,t.style.display=`inline-block`,t.style.visibility=`hidden`,t.style.position=`absolute`,t.textContent=`😀`,document.body.appendChild(t);let r=t.getBoundingClientRect().width;document.body.removeChild(t),i-r>.5&&(n=i-r)}return A$.set(e,n),n}(e,r):0}}(t,(c=e.normalized,O$.test(c)));var c;let l=I$(`-`,M$(`-`,o),s)+(i===0?0:2*i),u=8*I$(` `,M$(` `,o),s),d=i!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};let f=[],p=[],m=[],h=[],g=e.chunks.length<=1&&!d,_=n?[]:null,v=[],y=[],b=[],x=n?[]:null,S=Array.from({length:e.len});function C(e,t,n,r,i,a,o,s,c){i!==`text`&&i!==`space`&&i!==`zero-width-break`&&(g=!1),f.push(t),p.push(n),m.push(r),h.push(i),_?.push(a),v.push(o),y.push(s),d&&b.push(c),x!==null&&x.push(e)}function w(e,t,n,c,l){let u=M$(e,o),f=d?e1(e,t):0,p=function(e,t,n){return t>1?e+(t-1)*n:e}(I$(e,u,s),f,i),m=t===`space`||t===`preserved-space`||t===`zero-width-break`?0:p,h=m===0?0:m+(f>0?i:0),g=t===`space`||t===`zero-width-break`?0:p;if(l&&c&&e.length>1){let c=`sum-graphemes`;i===0?x$(e)?c=`pair-context`:a.preferPrefixWidthsForBreakableRuns&&(c=`segment-prefixes`):c=`segment-prefixes`;let l=function(e,t,n,r,i){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===i)return t.breakableFitAdvances;t.breakableFitMode=i;let a=P$(),o=[];for(let t of a.segment(e))o.push(t.segment);if(o.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(i===`sum-graphemes`){let e=[];for(let t of o){let i=M$(t,n);e.push(I$(t,i,r))}return t.breakableFitAdvances=e,t.breakableFitAdvances}if(i===`pair-context`||o.length>96){let e=[],i=null,a=0;for(let t of o){let o=I$(t,M$(t,n),r);if(i===null)e.push(o);else{let o=i+t,s=M$(o,n);e.push(I$(o,s,r)-a)}i=t,a=o}return t.breakableFitAdvances=e,t.breakableFitAdvances}let s=[],c=``,l=0;for(let e of o){c+=e;let t=I$(c,M$(c,n),r);s.push(t-l),l=t}return t.breakableFitAdvances=s,t.breakableFitAdvances}(e,u,o,s,c);C(e,p,h,g,t,n,l,l===null||r===`keep-all`?null:function(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;let t=[],n=0;for(let r of Z$().segment(e))n++,t1(r.segment)&&t.push(n);return t.length===0?null:t}(e),f);return}C(e,p,h,g,t,n,null,null,f)}for(let t=0;t=55296&&a<=56319&&i+1=56320&&t<=57343&&(o=t-56320+(a-55296<<10)+65536,s=2)}let c=SQ(o);c!==`R`&&c!==`AL`&&c!==`AN`||(r=!0);for(let e=0;e=0&&n[r]===`ET`;r--)n[r]=`EN`;for(r=e+1;r0?n[e-1]:s)===`L`?`L`:`R`;if(i===((r{let e=globalThis;if(e[r1])return e[r1];let t={configs:{},controllers:{},revision:ue(0),preparedCache:new Map,blockEstimateCache:new Map};return e[r1]=t,t})(),o1=null,s1=a1.revision;function c1(e){var t;return e&&(t=a1.configs[e])!=null?t:null}function l1(e,t){let n=Number.parseFloat(String(e??``));return Number.isFinite(n)&&n>0?n:t}function u1(e){return e?.type===`text`||e?.type===`emoji`||e?.type===`hardbreak`}function d1(e){if(!Array.isArray(e)||e.length===0)return null;let t=``;for(let n of e){if(!u1(n))return null;n.type===`text`?t+=String(n.content??``):n.type===`emoji`?t+=String(n.name??n.raw??``):n.type===`hardbreak`&&(t+=` @@ -885,11 +885,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs. `,t-1)+1;return e.slice(n,t).trim()}function J1(e){let t=Y1(e);return t.length>=2&&t.every(e=>{let t=e.trim();return t.length>=1&&t.replace(/^:/,``).replace(/:$/,``).split(``).every(e=>e===`-`)})}function Y1(e){return e.includes(`|`)?e.replace(/^\|/,``).replace(/\|$/,``).split(`|`):[]}function X1(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function Z1(e){let t=String(e??``);return`${t.length}:${X1(t)}`}function Q1(e,t=new WeakMap,n=0){if(e==null||typeof e==`number`||typeof e==`boolean`)return String(e);if(typeof e==`string`)return`s:${function(e){return e.length<=8192?Z1(e):`${e.length}:${X1(e.slice(0,8192))}:truncated`}(e)}`;if(typeof e==`function`)return`fn:${G1(e)}`;if(typeof e!=`object`)return typeof e;let r=e,i=t.get(r);if(i)return`cycle:${i}`;if(n>=6)return`object:${G1(r)}`;let a=G1(r);if(t.set(r,a),Array.isArray(e)){let r=e.slice(0,200);return`a:${e.length}:${r.map(e=>Q1(e,t,n+1)).join(`,`)}`}if(typeof e==`object`){let r=e,i=Object.keys(r).sort(),a=i.slice(0,80);return`o:${i.length}:${a.sort().map(e=>`${e}:${Q1(r[e],t,n+1)}`).join(`;`)}`}return typeof e}function $1(e){return typeof e==`object`&&!!e&&typeof e.type==`string`&&typeof e.raw==`string`}function e0(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(e=>$1(e)?r0(e,t,n+1):e0(e,t,n+1)).join(`,`)}`:$1(e)?r0(e,t,n):Q1(e,t,n)}function t0(e,t,n){return Object.keys(e).sort().filter(e=>e!==`children`&&!z1.includes(e)).map(r=>{let i=e[r];return typeof i==`string`?`${r}=s:${Z1(i)}`:typeof i==`number`||typeof i==`boolean`||i==null?`${r}=${String(i)}`:typeof i==`function`?`${r}=fn:${G1(i)}`:R1.has(r)&&(Array.isArray(i)||typeof i==`object`)?`${r}=${e0(i,t,n+1)}`:i&&typeof i==`object`?`${r}=object:${G1(i)}`:``}).filter(Boolean).join(`;`)}function n0(e){return z1.map(t=>{let n=e[t];return typeof n==`string`?`${t}=s:${Z1(n)}`:``}).filter(Boolean).join(`;`)}function r0(e,t=new WeakMap,n=0){let r=V1.get(e);if(r)return r;let i=e,a=t.get(i);if(a)return`node-cycle:${a}`;if(n>=6)return`node:${e.type}:${G1(i)}`;let o=G1(i);t.set(i,o);let s=function(e,t,n){let r=e,i=Array.isArray(r.children)?r.children:[],a=i.length?i.slice(0,200).map(e=>r0(e,t,n+1)).join(`|`):``;return[e.type,n0(r),t0(r,t,n),i.length,a].join(`:`)}(e,t,n);return V1.set(i,s),s}function i0(e,t){return r0(e)===r0(t)}function a0(e,t,n){let r=U1(),i=t===`stabilizeSignatureMs`?`stabilizeSignatureCallCount`:`primeSignatureCallCount`;try{return n()}finally{e[t]+=U1()-r,e[i]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function o0(e,t,n){return a0(t,n,()=>r0(e))}function s0(e,t,n){return o0(e,n,`stabilizeSignatureMs`)===o0(t,n,`stabilizeSignatureMs`)}function c0(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function l0(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function u0(e){return!0===e.__markstreamHasCustomParserExtensions||function(e){return Number(e.__markstreamRegisteredPluginCount??0)>0}(e)}function d0(e,t){return e.length===t.length&&e===t}function f0(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;let r=e,i=t,a=Object.keys(r).filter(e=>e!==`type`&&e!==`children`).sort(),o=Object.keys(i).filter(e=>e!==`type`&&e!==`children`).sort();if(a.length!==o.length)return!1;for(let e=0;e{r=f0(e,t)}),r??s0(e,t,n)}function h0(e,t){let n={};for(let r of I1){let i=e[r],a=t?.[r];typeof i==`number`&&(n[r]=i-(typeof a==`number`?a:0))}return n}function g0(e,n){let r=JK(n.instanceMsgId),i=new Map,a=n.smoothStreamingEnabled??L(()=>!1),o=R(n.renderContent.value),c=[],l=``,u=``,d=``,f=!1,p=function(){let e=``,t=0,n=!1,r=!1,i=!1,a=!1;function o(){e=``,t=0,n=!1,r=!1,i=!1,a=!1}function s(e){let o=!1;for(let s=0;s{if(!t||!n.startsWith(t)||n.length<=t.length)return o(),[!0,0];let r=0;e!==t&&(o(),s(t),r=t.length);let i=n.slice(t.length),a=s(i);return e=n,[a,r+i.length]}}(),m,h=0,_=0,v=U1(),y=-1,b=0;function x(e){y=Number.isInteger(e)?e:0,b+=1}function S(){m&&=(clearTimeout(m),void 0)}function C(){S();let e=n.renderContent.value;o.value!==e&&(o.value=e),v=U1()}s([n.renderContent,n.effectiveFinal,a],([t,n,r])=>{o.value!==t&&(!r||n||function(e,t){if(!e&&t||t.length<=80||t.length\s*|`{3,}|~{3,})/.test(n))||n.endsWith(` -`)&&!function(e){let t=q1(e);if(J1(t))return!1;let n=Y1(t);return n.length>=2&&n.some(e=>e.trim())}(t))}(o.value,t)?C():function(){if(_+=1,m)return;let t=Math.max(0,function(e){let t=e.parseCoalesceMs;return typeof t==`number`&&Number.isFinite(t)&&t>=0?t:80}(e)-(U1()-v));t<=0?C():m=setTimeout(C,t)}())},{flush:`sync`,immediate:!0}),t(S);let w=L(()=>{var t;return CL(e.customHtmlTags,e.parseOptions?.customHtmlTags,(t=n.customComponentsMap?.value??{},Object.entries(t).map(([e,t])=>{let n=xL(e);return t==null||!n||_Y(n)||GI.has(n)||JI.has(n)?``:n}).filter(Boolean)))}),T=L(()=>{let{key:e,tags:t}=wL(w.value);if(!e)return r;let a=i.get(e);if(a)return a;let o=JK(n.instanceMsgId,{customHtmlTags:t});return i.set(e,o),o}),E=L(()=>{let t=T.value;if(!e.customMarkdownIt)return t;let n=e.customMarkdownIt(t);return t.__markstreamHasCustomParserExtensions=!0,n.__markstreamHasCustomParserExtensions=!0,n}),D=L(()=>{var t;let r=e.parseOptions??{},i=n.effectiveFinal.value,a=w.value,o=i!=null,s=a.length>0;return o||s||r.streamParse==null?cY(cY(lY(cY({},r),{streamParse:(t=r.streamParse)==null||t}),o?{final:i}:{}),s?{customHtmlTags:a}:{}):r}),O=L(()=>new Set((D.value.customHtmlTags??[]).map(e=>String(e).trim().toLowerCase()).filter(Boolean))),k=L(()=>K1(D.value,E.value,e.customMarkdownIt,{includeFinal:!0})),A=L(()=>K1(D.value,E.value,e.customMarkdownIt,{includeFinal:!1}));return s([k,A],([e,t],[n,r])=>{n&&(e===n&&t===r||(C(),t!==r&&(c=[],d=``)))},{flush:`sync`}),{effectiveCustomHtmlTags:w,effectiveCustomHtmlTagsSet:O,mdBase:T,mdInstance:E,mergedParseOptions:D,getParsedNodesDirtyStartIndex:()=>y,getParsedNodesRevision:()=>b,parsedNodes:L(()=>{if(e.nodes?.length)return c=[],d=``,x(0),g(e.nodes.slice());let t=o.value;if(!t)return c=[],d=``,x(-1),[];let r=n.debugPerformanceEnabled.value,i=r?U1():0,a=E.value,s=k.value,m=A.value;l&&s!==l&&function(e){var t,n;(n=(t=e.stream)?.reset)==null||n.call(t)}(a),u&&m!==u&&(c=[],d=``);let v=Object.keys(n.customComponentsMap?.value??{}).length>0||typeof D.value.postTransformNodes==`function`;v!==f&&(c=[],d=``);let b=!v&&c.length>0&&t.startsWith(d)&&m===u,S=r?W1(a):null,C=r?{}:void 0,w=u0(a),T=!w&&!v,O=UG(t,a,cY(cY(lY(cY({},D.value),{__reuseStableTopLevelNodes:T}),w?{__disableStreamParse:!0}:{}),C?{__timing:C}:{})),j=r?U1():0,M=r?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0,N,ee=r?c0(O.length):void 0,P=0,F=0,I=0;if(b){let n=r?U1():0,[i,o]=function(e){let[t,n]=e.scanGlobalReferenceAppend(e.previousContent,e.content),r=e.parseOptions;return[e.previousDirtyStartIndex>0&&!0!==r.final&&!e.customMarkdownIt&&!u0(e.md)&&!t&&typeof r.preTransformTokens!=`function`&&typeof r.postTransformTokens!=`function`&&typeof r.postTransformNodes!=`function`&&(r.customHtmlTags?.length??0)===0?e.previousDirtyStartIndex:0,n]}({content:t,previousContent:d,previousDirtyStartIndex:y,parseOptions:D.value,customMarkdownIt:e.customMarkdownIt,md:a,scanGlobalReferenceAppend:p});I=o;let s=i<=0;if(M){let e=function(e,t,n,r={}){if(!t.length)return{nodes:e,metrics:c0(e.length)};let i=r.scanStartIndex??0,a=!1!==r.reuseDirtyTail,o=function(e,t,n,r=0){let i=Math.min(e.length,t.length);for(let a=Math.min(i,Math.max(0,r));ar0(e[r]))}(N,M,F):function(e,t=0){for(let n=Math.max(0,t);n(S?.total??0);n.logPerf(r?`parse(stream)`:`parse(sync)`,cY(cY(cY({rendererId:n.instanceMsgId,ms:Math.round(U1()-i),nodes:N.length,contentLength:t.length,parseCommitCount:h,parseCoalescedCount:_,nodeReuseMs:te,referenceDefinitionScanChars:I,signatureMs:M?.signatureMs??0,stabilizeSignatureMs:M?.stabilizeSignatureMs??0,primeSignatureMs:M?.primeSignatureMs??0,signatureCallCount:M?.signatureCallCount??0,stabilizeSignatureCallCount:M?.stabilizeSignatureCallCount??0,primeSignatureCallCount:M?.primeSignatureCallCount??0,stabilizeMs:P},ee??{}),C?Object.fromEntries(L1.map(e=>[e,C[e]??0])):{}),e?{streamMode:e.lastMode,streamDelta:h0(e,S),streamStats:e}:{}))}return g(N)})}}function _0(e){let{isClient:t}=e,n=R(new Set),r=new Map,i=new Map,a=new Map;function o(e){if(!t)return;let n=a.get(e);n!=null&&(window.clearTimeout(n),a.delete(e))}function s(){if(t)for(let e of a.values())window.clearTimeout(e);a.clear()}function c(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:r,nodeVisibilityWatchStops:i,nodeVisibilityFallbackTimers:a,clearVisibilityFallback:o,clearAllVisibilityFallbacks:s,markNodeVisible:function(t,r=!0){var i;r&&o(t),function(t,r){if((a=(i=e.shouldTrackVisibleNodeIndices)?.call(e))!=null&&!a)return;var i,a;let o=n.value,s=o.has(t);if(r){if(s)return;let e=new Set(o);e.add(t),n.value=e;return}if(!s)return;let c=new Set(o);c.delete(t),n.value=c}(t,r),r&&((i=e.onNodeMarkedVisible)==null||i.call(e,t))},resetNodeVisibleState:c,cleanupNodeVisibility:function(t){var s;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(let[e,n]of i.entries())e{let e=a.getSnapshot();n.value=e.source,r.value=e.visible,i.value=e.done},s=a.subscribe(o);o();let c=L(()=>Math.max(0,n.value.length-r.value.length)),l=L(()=>c.value===0),u=L(()=>i.value&&l.value);return C()&&t(()=>{s(),a.destroy()}),{source:n,visible:r,done:i,final:u,caughtUp:l,pendingChars:c,enqueue:e=>a.enqueue(e),finish:e=>a.finish(e),flush:()=>a.flush(),reset:e=>a.reset(e),pause:()=>a.pause(),resume:()=>a.resume()}}var y0={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},b0=/auto|scroll|overlay/i;function x0(e){if(!e)return!1;let t=(e.overflowY||``).toLowerCase(),n=(e.overflow||``).toLowerCase();return b0.test(t)||b0.test(n)}function S0(e){let t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}var C0={class:`m-0 p-0`},w0=[`data-probe`],T0=wY(G(lY(cY({},{name:`HeightEstimationProbes`}),{__name:`HeightEstimationProbes`,props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){let t=e;function n(e){return t.headingNodes?.[e]??null}return(t,r)=>(c(),W(`div`,{class:`height-estimation-probes`,style:ae({width:`${e.width}px`}),"aria-hidden":`true`},[F(`div`,{ref:t=>e.setParagraphWrapper(t),class:V([`node-content`,{"node-content-flow-root":e.flowRoot}]),"data-probe":`paragraph`},[v(z(oQ),{node:e.paragraphNode,"index-key":`probe-paragraph`},null,8,[`node`])],2),F(`div`,{ref:t=>e.setListItemWrapper(t),class:V([`node-content`,{"node-content-flow-root":e.flowRoot}]),"data-probe":`list-item`},[F(`ul`,C0,[v(z(QZ),{node:e.listItemNode,"index-key":`probe-list-item`},null,8,[`node`])])],2),F(`div`,{ref:t=>e.setListWrapper(t),class:V([`node-content`,{"node-content-flow-root":e.flowRoot}]),"data-probe":`list`},[v(z($Z),{node:e.listNode,"index-key":`probe-list`},null,8,[`node`])],2),(c(),W(M,null,_(6,t=>F(`div`,{key:`probe-heading-${t}`,ref_for:!0,ref:n=>e.setHeadingWrapper(t,n),class:V([`node-content`,{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${t}`},[v(z(qZ),{node:n(t),"index-key":`probe-heading-${t}`},null,8,[`node`,`index-key`])],10,w0)),64))],4))}})),[[`__scopeId`,`data-v-3e0766e2`]]),E0=G({name:`InfographicBlockNodeLoading`,props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){let t=L(()=>_J(dJ(e.estimatedPreviewHeightPx)??mJ(String(e.node.code??``))));return()=>a(`div`,{class:`infographic-block-container rounded-lg border overflow-hidden`,style:{margin:`var(--ms-flow-diagram-y) 0`,background:`var(--diagram-bg)`,borderColor:`var(--diagram-border)`,color:`hsl(var(--ms-foreground))`},"data-markstream-infographic":`1`,"data-markstream-mode":`pending`},[e.showHeader?a(`div`,{class:`infographic-block-header flex justify-between items-center border-b`,style:{padding:`var(--ms-inset-panel-y) var(--ms-inset-panel-x)`,background:`var(--diagram-header-bg)`,borderColor:`var(--diagram-border)`,minHeight:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)`}},[a(`div`,{class:`flex items-center gap-x-2 overflow-hidden`},[a(`span`,{class:`icon-slot action-icon shrink-0`,style:{display:`inline-flex`,width:`var(--ms-action-btn-icon)`,height:`var(--ms-action-btn-icon)`}}),a(`span`,{class:`infographic-label font-medium font-mono truncate`,style:{fontSize:`var(--ms-text-label)`,color:`hsl(var(--ms-muted-foreground))`}},`Infographic`)]),a(`div`,{class:`infographic-header-actions flex items-center opacity-0 pointer-events-none`,style:{gap:`var(--ms-gap-header-actions)`},"aria-hidden":`true`},Array.from({length:4},()=>a(`span`,{class:`infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`,style:{width:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))`,height:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))`}})))]):null,a(`div`,{class:`infographic-preview relative overflow-hidden block`,style:{height:`${t.value}px`,minHeight:`var(--ms-size-diagram-min-height)`,background:`var(--diagram-bg)`}},[a(`pre`,{class:`infographic-pending-source text-sm font-mono whitespace-pre-wrap`,style:{position:`absolute`,inset:`0`,zIndex:`1`,margin:`0`,padding:`var(--ms-inset-panel-body)`,overflow:`auto`,textAlign:`left`}},String(e.node.code??``)),a(`div`,{class:`absolute inset-0`},[a(`div`,{class:`w-full text-center flex items-center justify-center min-h-full`})])])])}}),D0=G({name:`MermaidBlockNodeLoading`,props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){let t=L(()=>gJ(dJ(e.estimatedPreviewHeightPx)??pJ(String(e.node.code??``))));return()=>a(`div`,{class:`mermaid-block-container rounded-lg border overflow-hidden`,style:{margin:`var(--ms-flow-diagram-y) 0`,borderColor:`var(--diagram-border)`},"data-markstream-mermaid":`1`,"data-markstream-mode":`pending`},[e.showHeader?a(`div`,{class:`mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]`,style:{background:`var(--diagram-header-bg)`,borderColor:`var(--diagram-border)`}},[a(`div`,{class:`flex items-center gap-x-2 overflow-hidden`},[a(`span`,{class:`mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate`,style:{color:`var(--code-action-fg)`}},`Mermaid`)]),a(`div`,{class:`mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none`,"aria-hidden":`true`},Array.from({length:4},()=>a(`span`,{class:`mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`},[a(`span`,{class:`action-icon block`})])))]):null,a(`div`,{class:`mermaid-preview-area relative overflow-hidden block`,style:{height:`${t.value}px`,minHeight:`var(--ms-size-diagram-min-height)`,background:`var(--diagram-bg)`}},[a(`pre`,{class:`mermaid-source-code text-sm font-mono whitespace-pre-wrap`,style:{position:`absolute`,inset:`0`,margin:`0`,padding:`var(--ms-inset-panel-body)`,overflow:`auto`,textAlign:`left`}},String(e.node.code??``)),a(`div`,{class:`_mermaid w-full text-center flex items-center justify-center min-h-full`,style:{fontFamily:`inherit`,contentVisibility:`auto`,contain:`content`,containIntrinsicSize:`var(--ms-size-diagram-min-height) 240px`}})])])}}),O0={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:`auto`},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:`auto`},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:`auto`}};function k0(e){if(e==null)return``;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}var A0=[`data-custom-id`],j0=[`data-node-index`,`data-node-type`],M0=`typewriter-simple-cursor-target`,N0=wY(G(lY(cY({},{name:`NodeRenderer`}),{__name:`NodeRenderer`,props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:`auto`},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:[`copy`,`copy-code`,`handleArtifactClick`,`click`,`mouseover`,`mouseout`,`virtual-state-change`,`height-change`,`render-settled`,`render-final`,`anchor-change`],setup(e,{expose:t,emit:a}){let o=e,l=a;function f(e){if(!(typeof Event<`u`&&e instanceof Event))return typeof e==`string`&&l(`copy-code`,e),void l(`copy`,e)}let h=y(),v=m(`markstreamNestedRendererProps`,void 0);function S(e){let t=h?.vnode.props;return!!t&&(Object.prototype.hasOwnProperty.call(t,e)||Object.prototype.hasOwnProperty.call(t,String(e).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)))}function C(e){let t=o[e];return S(e)?t:v?.value?.[e]??t}let w=L(()=>{return(e=C(`mode`))===`chat`||e===`minimal`||e===`docs`?e:`docs`;var e}),T=L(()=>C1(C(`typewriter`))),D=L(()=>T.value!==`off`),k=L(()=>C(`domMode`)===`minimal`?`minimal`:`full`),A=L(()=>{return!0===(e={mode:w.value,codeRenderer:C(`codeRenderer`),renderCodeBlocksAsPre:C(`renderCodeBlocksAsPre`)}).renderCodeBlocksAsPre?`pre`:e.codeRenderer===`pre`||e.codeRenderer===`shiki`||e.codeRenderer===`monaco`?e.codeRenderer:!1===e.renderCodeBlocksAsPre||e.mode===`docs`?`monaco`:`pre`;var e}),j=L(()=>O0[w.value]),ee=L(()=>C(`showTooltips`)??j.value.showTooltips),F=L(()=>C(`fade`)??j.value.fade),I=L(()=>C(`batchRendering`)??j.value.batchRendering),te=L(()=>C(`initialRenderBatchSize`)??j.value.initialRenderBatchSize),ie=L(()=>C(`renderBatchSize`)??j.value.renderBatchSize),se=L(()=>C(`renderBatchDelay`)??j.value.renderBatchDelay),ce=L(()=>C(`renderBatchBudgetMs`)??j.value.renderBatchBudgetMs),le=L(()=>C(`renderBatchIdleTimeoutMs`)??j.value.renderBatchIdleTimeoutMs),de=L(()=>C(`deferNodesUntilVisible`)??j.value.deferNodesUntilVisible),fe=L(()=>C(`maxLiveNodes`)??j.value.maxLiveNodes),H=L(()=>C(`liveNodeBuffer`)??j.value.liveNodeBuffer),U=L(()=>C(`nodeVirtual`)??j.value.nodeVirtual),G={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return C(`parseOptions`)},get customMarkdownIt(){return C(`customMarkdownIt`)},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return C(`customHtmlTags`)},get mode(){return C(`mode`)},get domMode(){return k.value},get htmlPolicy(){return C(`htmlPolicy`)},get viewportPriority(){return C(`viewportPriority`)},get viewportPriorityOptions(){return C(`viewportPriorityOptions`)},get codeBlockStream(){return C(`codeBlockStream`)},get codeBlockDarkTheme(){return C(`codeBlockDarkTheme`)},get codeBlockLightTheme(){return C(`codeBlockLightTheme`)},get codeBlockMonacoOptions(){return C(`codeBlockMonacoOptions`)},get codeRenderer(){return C(`codeRenderer`)},get renderCodeBlocksAsPre(){return C(`renderCodeBlocksAsPre`)},get codeBlockMinWidth(){return C(`codeBlockMinWidth`)},get codeBlockMaxWidth(){return C(`codeBlockMaxWidth`)},get codeBlockProps(){return C(`codeBlockProps`)},get mermaidProps(){return C(`mermaidProps`)},get d2Props(){return C(`d2Props`)},get infographicProps(){return C(`infographicProps`)},get showTooltips(){return ee.value},get themes(){return C(`themes`)},get langs(){return C(`langs`)},get isDark(){return C(`isDark`)},get customId(){return C(`customId`)},get indexKey(){return o.indexKey},get typewriter(){return C(`typewriter`)},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return C(`smoothStreamingOptions`)},get parseCoalesceMs(){return C(`parseCoalesceMs`)},get fade(){return F.value},get batchRendering(){return I.value},get initialRenderBatchSize(){return te.value},get renderBatchSize(){return ie.value},get renderBatchDelay(){return se.value},get renderBatchBudgetMs(){return ce.value},get renderBatchIdleTimeoutMs(){return le.value},get deferNodesUntilVisible(){return de.value},get maxLiveNodes(){return fe.value},get liveNodeBuffer(){return H.value},get nodeVirtual(){return U.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function K(e){l(`height-change`,e)}function pe(e){l(`virtual-state-change`,e)}function me(e){l(`anchor-change`,e)}let ge=R(),_e=R(null),ve=R(null),ye=R(null),be=N({1:null,2:null,3:null,4:null,5:null,6:null}),xe=R(!1),Se=new Map,Ce=R(0),we=R(0),Te=R({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function Ee(e,t){return typeof e==`string`&&e.trim()||t}function De(e){let t=Number(e);return Number.isFinite(t)&&t>0?Math.max(1,Math.trunc(t)):640}let Oe=L(()=>{let e=G.viewportPriorityOptions??{},t=Ee(e.rootMargin,bX);return{rootMargin:t,heavyBlockMargin:Ee(e.heavyBlockMargin,t),maxTargets:De(e.maxTargets)}}),ke=L(()=>Oe.value.rootMargin??bX),Ae=L(()=>Oe.value.maxTargets??640);function je(){if(!0!==o.virtualScroll?.enabled)return null;let e=o.virtualScroll?.scrollRoot;return Me(typeof e==`function`?e():e)}function Me(e){return e?typeof HTMLElement<`u`&&e instanceof HTMLElement?e:typeof e==`object`&&`value`in e?Me(e.value):typeof e==`object`&&`$el`in e?Me(e.$el):null:null}d(_X,Oe);let{isClient:q,renderAsFragment:Ne,debugPerformanceEnabled:Pe,resolvedShowTooltips:Fe,resolvedHtmlPolicy:Ie,inheritedSmoothStreaming:Le,ownsTypewriterCursor:Re}=function(e){let t=typeof window<`u`,n=b(),r=m(`markstreamHtmlPolicy`,void 0),i=m(`markstreamTypewriterCursor`,void 0),a=m(`markstreamSmoothStreaming`,void 0);return{isClient:t,renderAsFragment:L(()=>!0===e.renderAsFragment),debugPerformanceEnabled:L(()=>!!(e.debugPerformance&&t&&typeof console<`u`)),resolvedShowTooltips:L(()=>{if(typeof e.showTooltips==`boolean`)return e.showTooltips;let t=n.showTooltips??n[`show-tooltips`];return t===``||!0===t||t===`true`||!1!==t&&t!==`false`&&void 0}),resolvedHtmlPolicy:L(()=>e.htmlPolicy??r?.value??`safe`),inheritedSmoothStreaming:a,inheritedTypewriterCursor:i,ownsTypewriterCursor:L(()=>!0!==i?.value)}}(G),{resolveViewportRoot:ze,resolveScrollContainer:Be,isReverseFlexScrollRoot:Ve,getNormalizedScrollTop:He,getOffsetTopWithinRoot:Ue}=function(e,t){function n(){return t.scrollRoot?.call(t)??null}function r(t){if(typeof window>`u`)return null;let r=n();if(r)return r;let i=t??e.value;if(!i)return null;let a=i.ownerDocument||document,o=a.scrollingElement||a.documentElement,s=i;for(;s&&s!==a.body&&s!==o;){if(x0(window.getComputedStyle(s))&&S0(s))return s;s=s.parentElement}return null}function i(e){if(!t.isClient)return!1;try{let t=window.getComputedStyle(e);return!!(t.display||``).toLowerCase().includes(`flex`)&&(t.flexDirection||``).toLowerCase().endsWith(`reverse`)}catch{return!1}}function a(e,t,n){if(n)return o(t);let r=e.scrollTop;if(!i(e))return r;let a=r<0?-r:r;return Math.max(0,(e.scrollHeight??0)-(e.clientHeight??0))-a}function o(e){let t=Number(e.scrollingElement?.scrollTop),n=Number(e.documentElement?.scrollTop??0),r=Number(e.body?.scrollTop??0);return Math.max(0,Number.isFinite(t)?t:0,Number.isFinite(n)?n:0,Number.isFinite(r)?r:0)}return{resolveViewportRoot:r,resolveScrollContainer:function(t){let i=n();if(i)return i;let a=r(t??e.value??null);if(a)return a;let o=t?.ownerDocument??e.value?.ownerDocument??(typeof document<`u`?document:null);return o?.scrollingElement||o?.documentElement||null},isReverseFlexScrollRoot:i,getNormalizedScrollTop:a,getOffsetTopWithinRoot:function(e,t){let n=t.ownerDocument||e.ownerDocument||document;if(function(e,t){return e===t.documentElement||e===t.body||e===t.scrollingElement}(t,n))return e.getBoundingClientRect().top+o(n);let r=t.getBoundingClientRect(),i=e.getBoundingClientRect(),s=a(t,n,!1);return i.top-r.top+s}}}(ge,{isClient:q,scrollRoot:je});d(`markstreamShowTooltips`,Fe),d(`markstreamHtmlPolicy`,Ie),d(`markstreamTypewriter`,D),d(`markstreamFade`,L(()=>!1!==G.fade)),d(`markstreamTypewriterCursor`,L(()=>!0)),d(`markstreamTextStreamState`,Se),d(`markstreamStreamVersion`,Ce),d(`markstreamParseOptions`,L(()=>G.parseOptions)),d(`markstreamCustomMarkdownIt`,L(()=>G.customMarkdownIt));let{smoothStreamingEnabled:We,renderContent:Ge,requestedFinal:Ke,effectiveFinal:qe}=function(e,t){let n=v0(cY(cY({},y0),e.smoothStreamingOptions)),r=L(()=>!1!==e.smoothStreaming&&!e.nodes?.length&&(!0===e.smoothStreaming||!t.inheritedSmoothStreaming?.value)&&(!0===e.smoothStreaming||C1(e.typewriter)!==`off`||(e.maxLiveNodes??0)<=0)),i=R(!t.isClient||!0===e.smoothStreaming);p(()=>{i.value=!0});let a=L(()=>i.value&&r.value),o=L(()=>a.value?n.visible.value:e.content??``),c=L(()=>{let t=e.parseOptions??{};return e.final??t.final}),l=L(()=>{let e=c.value;return a.value&&e!=null?!!e&&n.caughtUp.value:e}),u=0,d=!1;function f(){u=0,d=!1}return s([()=>e.content,()=>e.nodes,a,c],([e,t,r,i])=>{if(t?.length)return f(),void n.reset(``);let a=e??``;if(!r)return f(),n.reset(a),void(i&&n.finish({flush:!0}));let o=n.source.value;if(a){if(a!==o)if(a.startsWith(o)){let e=a.slice(o.length),t=n.pendingChars.value;e.length<=8?(u++,d||u>=2&&t<=8?(d=!0,n.reset(a)):n.enqueue(e)):(f(),n.enqueue(e))}else f(),n.reset(a)}else f(),n.reset(``);i&&n.finish()},{immediate:!0}),{smoothStream:n,smoothStreamingEligible:r,smoothStreamingEnabled:a,renderContent:o,requestedFinal:c,effectiveFinal:l}}(G,{isClient:q,inheritedSmoothStreaming:Le}),Je=!0===Ke.value;d(`markstreamSmoothStreaming`,We);let Ye=R(!1),Xe=R(!1),Ze=R(!1),Qe=``,$e=!1,et=null;function tt(){q&&et!=null&&(window.clearTimeout(et),et=null)}function nt(){Ye.value=!1,tt()}function rt(e,t){if(!Pe.value)return;let n=function(){if(!Pe.value)return null;let e=ct(it),t=ct(at),n=Math.max(st,t);if(e<=0&&n<=0)return null;let r={total:e,maxPerFrame:n,byLabel:(i=it,Object.fromEntries(Array.from(i.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))))};var i;return it.clear(),at.clear(),st=0,r}();console.info(`[markstream-vue][perf] ${e}`,n?lY(cY({},t),{layoutReads:n}):t)}s([()=>G.indexKey,()=>G.customId],()=>{nt(),Xe.value=!1,Ze.value=!o.nodes?.length&&!0!==Ke.value&&!!o.content,Qe=Ge.value??``,$e=Qe.length>0},{flush:`sync`}),s([()=>o.content,()=>o.nodes,Ke],([e,t,n])=>{!t?.length&&!0!==n&&e&&(Ze.value=!0)},{flush:`sync`,immediate:!0}),s([Ge,()=>o.nodes,Ke],([e,t,n])=>{let r=e??``;t?.length||!0===n?(nt(),Xe.value=!1,Qe=r,$e=!0):(r.length>0&&(Ze.value=!0),$e?(Qe&&r.length>Qe.length&&r.startsWith(Qe)?(Ye.value=!0,Xe.value=!0,q&&(tt(),et=window.setTimeout(()=>{var e;et=null,!0===qe.value||(e=o.nodes)!=null&&e.length||(po(),Ye.value=!1,ho())},1200))):(r.length`u`)return null;let e=window;if(e.__markstreamLayoutReadPerformance)return e.__markstreamLayoutReadPerformance;let t={total:0,maxPerFrame:0,byLabel:{}};return e.__markstreamLayoutReadPerformance=t,t}();t&&(t.total=Number(t.total||0)+1,t.byLabel[e]=Number(t.byLabel[e]||0)+1,t.currentFrameTotal=Number(t.currentFrameTotal||0)+1,t.frameScheduled||(t.frameScheduled=!0,typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>ut(t)):typeof queueMicrotask==`function`?queueMicrotask(()=>ut(t)):setTimeout(()=>ut(t),0)))}(e),ot||(ot=!0,q&&typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(lt):typeof queueMicrotask==`function`?queueMicrotask(lt):setTimeout(lt,0)))}function ft(e,t){return dt(e),t()}let pt=G.customId?`renderer-${G.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,mt=function(e){let t=new Map;return{scope:e,cache:t,clear:()=>t.clear()}}(pt),ht=pt;d(w1,mt);let gt=bY(()=>G.customId),{effectiveCustomHtmlTagsSet:_t,mergedParseOptions:vt,parsedNodes:yt,getParsedNodesDirtyStartIndex:bt,getParsedNodesRevision:xt}=g0(G,{instanceMsgId:pt,renderContent:Ge,effectiveFinal:qe,smoothStreamingEnabled:We,debugPerformanceEnabled:Pe,customComponentsMap:gt,logPerf:rt});s(yt,()=>{Ye.value||mt.clear(),Ce.value+=1},{immediate:!0});let St=L(()=>({customId:G.customId,customHtmlTags:vt.value.customHtmlTags,parseOptions:G.parseOptions,customMarkdownIt:G.customMarkdownIt,htmlPolicy:Ie.value,viewportPriority:G.viewportPriority,viewportPriorityOptions:Oe.value,mode:w.value,domMode:G.domMode,codeRenderer:A.value,codeBlockStream:G.codeBlockStream,codeBlockDarkTheme:G.codeBlockDarkTheme,codeBlockLightTheme:G.codeBlockLightTheme,codeBlockMonacoOptions:G.codeBlockMonacoOptions,renderCodeBlocksAsPre:G.renderCodeBlocksAsPre,codeBlockMinWidth:G.codeBlockMinWidth,codeBlockMaxWidth:G.codeBlockMaxWidth,codeBlockProps:G.codeBlockProps,mermaidProps:G.mermaidProps,d2Props:G.d2Props,infographicProps:G.infographicProps,showTooltips:Fe.value,themes:G.themes,langs:G.langs,isDark:G.isDark,typewriter:D.value,smoothStreamingOptions:G.smoothStreamingOptions,parseCoalesceMs:G.parseCoalesceMs,fade:G.fade}));d(`markstreamNestedRendererProps`,St);let Ct=L(()=>yt.value),wt=L(()=>yt.value.length),Tt=R(null),Et=R(null),Dt=R(null),Ot=R(null),kt=o.indexKey!=null&&String(o.indexKey).startsWith(`list-item-`),At=!kt&&G.customId?c1(G.customId):null,jt=L(()=>At?(s1.value,c1(G.customId)):null),Mt=L(()=>!!(!Ne.value&&G.customId&&!kt&&jt.value?.enabled)),Nt=L(()=>!!(q&&Mt.value)),Pt=L(()=>!!(!Ne.value&&o.virtualScroll?.enabled)),Ft=L(()=>Pt.value),It=R(!1);p(()=>{It.value=!0});let Lt=L(()=>!!(q&&Pt.value));d(`markstreamHostScrollManaged`,Lt);let Rt=L(()=>!!(It.value&&Lt.value)),zt=L(()=>Nt.value||Lt.value),Bt=L(()=>Nt.value||Rt.value),Vt=L(()=>zt.value&&!1!==jt.value?.textEstimation);function Ht(){let e=we.value||ft(`getMeasuredContainerWidth.clientWidth`,()=>ge.value?.clientWidth||0);return Number.isFinite(e)&&e>0?e:0}let Ut=L(()=>{let e=Ht();return e>0?Math.max(1,Math.round(e)):640}),Wt=L(()=>!(!0!==qe.value||Pt.value||w.value!==`chat`&&w.value!==`minimal`||S(`maxLiveNodes`)||S(`liveNodeBuffer`)||o.nodes?.length||Ze.value||!((G.maxLiveNodes??0)<=0))),Gt=L(()=>Wt.value?50:Math.max(1,G.maxLiveNodes??320)),Kt=L(()=>Wt.value?16:Math.max(0,G.liveNodeBuffer??60)),qt=L(()=>!Ne.value&&!1!==G.nodeVirtual&&!((G.maxLiveNodes??0)<=0&&!Wt.value)&&(!0===G.nodeVirtual?yt.value.length>0:yt.value.length>Gt.value)),Jt=L(()=>qt.value||Nt.value||Lt.value),Yt=L(()=>!1!==G.viewportPriority),Xt=L(()=>!!Yt.value&&!xe.value);d(vX,L(()=>Yt.value));let Zt=L(()=>!(Ne.value||!1===G.deferNodesUntilVisible||(G.maxLiveNodes??0)<=0||qt.value||yt.value.length>900||!1===G.viewportPriority)),Qt=CX(e=>ze(e??ge.value??null),Yt),{requestFrame:$t,cancelFrame:en,hasIdleCallback:tn,isTestEnv:nn}=function(e){return{requestFrame:e.isClient&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame.bind(window):null,cancelFrame:e.isClient&&typeof window.cancelAnimationFrame==`function`?window.cancelAnimationFrame.bind(window):null,hasIdleCallback:e.isClient&&typeof window.requestIdleCallback==`function`,isTestEnv:function(){return typeof globalThis>`u`||!(`process`in globalThis)?void 0:Object.getOwnPropertyDescriptor(globalThis,`process`)?.value?.env}()?.NODE_ENV===`test`}}({isClient:q}),rn=L(()=>!0===qe.value&&!Pt.value),{resolvedBatchSize:an,resolvedInitialBatch:on,batchingEnabled:sn,incrementalRenderingActive:cn,renderedCount:ln,previousRenderContext:un,adaptiveBatchSize:dn,previousBatchConfig:fn}=function(e,t){let n=L(()=>{let t=Math.trunc(e.renderBatchSize??80);return Number.isFinite(t)?Math.max(0,t):0}),r=L(()=>{let t=Math.trunc(e.initialRenderBatchSize??n.value);return Number.isFinite(t)?Math.max(0,t):n.value}),i=L(()=>!t.renderAsFragment.value&&!1!==e.batchRendering&&n.value>0&&t.isClient&&!t.isTestEnv),a=R(0),o=R({key:e.indexKey,total:0}),s=R(Math.max(1,n.value||1)),c=L(()=>i.value&&!t.continuousStreaming?.value&&!t.forceFullRenderFinalContent?.value&&(e.maxLiveNodes??0)<=0);return{resolvedBatchSize:n,resolvedInitialBatch:r,batchingEnabled:i,incrementalRenderingActive:c,renderedCount:a,previousRenderContext:o,adaptiveBatchSize:s,previousBatchConfig:R({batchSize:n.value,initial:r.value,delay:e.renderBatchDelay??16,enabled:c.value})}}(G,{isClient:q,isTestEnv:nn,renderAsFragment:Ne,forceFullRenderFinalContent:rn,continuousStreaming:L(()=>Xe.value&&!0!==qe.value)}),pn=L(()=>!Ne.value&&!1!==G.batchRendering&&an.value>0&&!nn&&(G.maxLiveNodes??0)<=0&&!rn.value),mn=L(()=>pn.value),hn=L(()=>zt.value||mn.value),gn=L(()=>hn.value&&!1!==jt.value?.codeBlockEstimation),_n=new Map,vn=new Map,yn=new WeakMap,bn=null,xn=new WeakMap,Sn=new Map,Cn=[],wn=[],Tn=[],En=-1,Dn=ue(Cn),On=new Set,kn=R(0),An=0,jn=R(0),Mn=L(()=>(jn.value,Array.from(_n.entries()).sort((e,t)=>e[0]-t[0]))),Nn=R(null),Pn=R(null),Fn,In=null,Ln=0,Rn=null;function zn(){Fn.markFallbackHeightPrefixDirty()}function Bn(e){return Fn.getFallbackNodeHeight(e)}function Vn(e,t){return Fn.estimateHeightRange(e,t)}function Hn(e){return Fn.estimateIndexForOffset(e)}let{activeRestoreAnchor:Un,getRelativeScrollTopWithinContainer:Wn,setRelativeScrollTopWithinContainer:Gn,resolveAnchorOffset:Kn,clearRestoreReconcile:qn,scheduleRestoreReconcile:Jn,captureRestoreAnchor:Yn,restoreAnchor:Xn,getAnchorDrift:Zn}=function(e){let{isClient:t,containerRef:n,parsedNodeCount:r,requestFrame:i,cancelFrame:a,resolveScrollContainer:o,getNormalizedScrollTop:s,getOffsetTopWithinRoot:c,isReverseFlexScrollRoot:l,estimateIndexForOffset:u,estimateHeightRange:d,getFallbackNodeHeight:f,clamp:p}=e,m=R(null),h=null,g=[];function _(){let e=o(),t=n.value;if(!e||!t)return null;let r=e.ownerDocument||t.ownerDocument||document;if(e===r.documentElement||e===r.body||e===r.scrollingElement){let e=t.getBoundingClientRect();return Math.max(0,-e.top)}return Math.max(0,s(e,r,!1)-c(t,e))}function v(e){var t;let r=o(),i=n.value;if(!r||!i)return;let a=Math.max(0,e),u=r.ownerDocument||i.ownerDocument||document,d=u.defaultView||(typeof window<`u`?window:null);if(r===u.documentElement||r===u.body||r===u.scrollingElement){let e=s(r,u,!0)+i.getBoundingClientRect().top;(t=d?.scrollTo)==null||t.call(d,0,Math.max(0,e+a));return}x1(r,u,c(i,r)+a,{isReverseFlexScrollRoot:e=>{var t;return(t=l?.(e))!=null&&t},getNormalizedScrollTop:s})}function y(e){let t=r.value;return d(0,p(e.nodeIndex,0,Math.max(0,t-1)))+Math.max(0,e.offsetWithinNodePx)}function b(){if(h!=null&&(a?.(h),h=null),t)for(let e of g)window.clearTimeout(e);g=[]}function x(e){let t=y(e),n=_();n!=null&&Math.abs(n-t)<=.5||v(t)}return{activeRestoreAnchor:m,getRelativeScrollTopWithinContainer:_,setRelativeScrollTopWithinContainer:v,resolveAnchorOffset:y,clearRestoreReconcile:b,applyRestoreAnchor:x,scheduleRestoreReconcile:function(){m.value&&t&&h==null&&(h=i?i(()=>{h=null,m.value&&x(m.value)}):null,h==null&&m.value&&x(m.value))},captureRestoreAnchor:function(){let e=_(),t=r.value;if(e==null||t<=0)return null;let n=p(u(e+1),0,t-1),i=d(0,n),a=f(n);return{nodeIndex:n,offsetWithinNodePx:p(e-i,0,Math.max(0,a-1))}},restoreAnchor:function(e){let n=r.value;if(m.value={nodeIndex:p(e.nodeIndex,0,Math.max(0,n-1)),offsetWithinNodePx:Math.max(0,e.offsetWithinNodePx)},b(),x(m.value),t)for(let e of[0,120,280,480])g.push(window.setTimeout(()=>{m.value&&x(m.value)},e))},getAnchorDrift:function(e){let t=_();return t==null?null:t-y(e)}}}({isClient:q,containerRef:ge,parsedNodeCount:wt,requestFrame:$t,cancelFrame:en,resolveScrollContainer:()=>Nn.value||Be(),getNormalizedScrollTop:He,getOffsetTopWithinRoot:Ue,isReverseFlexScrollRoot:Ve,estimateIndexForOffset:Hn,estimateHeightRange:Vn,getFallbackNodeHeight:Bn,clamp:ui}),{nodeHeights:Qn,heightStats:$n,heightTreeSize:er,heightSumTree:tr,heightKnownTree:nr,averageNodeHeight:rr,resetHeightMeasurements:ir,pruneHeightMeasurements:ar,rebuildHeightTrees:or,recordNodeHeight:sr,removeNodeHeights:cr,exportHeightCache:lr,importHeightCache:ur,fenwickRangeSum:dr}=function(e={}){let t=N({}),n=N({total:0,count:0}),r=R(0),i=R([]),a=R([]);function o(){for(let e of Object.keys(t))delete t[Number(e)];n.total=0,n.count=0,r.value=0,i.value=[],a.value=[]}function s(e,t,n){for(let r=t+1;r0;r-=r&-r)n+=e[r];return n}function l(e){r.value=e;let n=Array(e+1).fill(0),o=Array(e+1).fill(0);for(let[r,i]of Object.entries(t)){let t=Number(r),a=Number(i);!Number.isFinite(t)||t<0||t>=e||!Number.isFinite(a)||a<=0||(s(n,t,a),s(o,t,1))}i.value=n,a.value=o}function u(e){if(!Number.isInteger(e)||e<0)return!1;let o=t[e];if(!Number.isFinite(o)||o<=0)return!1;if(delete t[e],n.total=Math.max(0,n.total-o),n.count=Math.max(0,n.count-1),r.value>e){let t=i.value,n=a.value;t.length&&n.length&&(s(t,e,-o),s(n,e,-1))}return!0}return{nodeHeights:t,heightStats:n,heightTreeSize:r,heightSumTree:i,heightKnownTree:a,averageNodeHeight:L(()=>n.count>0?Math.max(12,n.total/n.count):32),resetHeightMeasurements:o,pruneHeightMeasurements:function(e){if(e<=0)return void o();let r=0,i=0;for(let[n,a]of Object.entries(t)){let o=Number(n),s=Number(a);!Number.isFinite(o)||o<0||o>=e||!Number.isFinite(s)||s<=0?delete t[o]:(r+=s,i++)}n.total=r,n.count=i},rebuildHeightTrees:l,recordNodeHeight:function(o,c,l={}){(function(o,c,l={}){var u;if(!Number.isFinite(c)||c<=0)return!1;let d=t[o];if(d&&(!1===l.allowShrink&&co){let e=i.value,t=a.value;if(e.length&&t.length)if(d){let t=c-d;t!==0&&s(e,o,t)}else s(e,o,c),s(t,o,1)}!1!==l.notify&&((u=e.onHeightRecorded)==null||u.call(e))})(o,c,lY(cY({},l),{notify:!0}))},removeNodeHeight:function(t,n={}){var r;let i=u(t);return i&&!1!==n.notify&&((r=e.onHeightRecorded)==null||r.call(e)),i},removeNodeHeights:function(t,n={}){var r;let i=0;for(let e of t)u(Number(e))&&i++;return i>0&&!1!==n.notify&&((r=e.onHeightRecorded)==null||r.call(e)),i},exportHeightCache:function(){return Object.entries(t).map(([e,t])=>({index:Number(e),height:Number(t)})).filter(e=>Number.isFinite(e.index)&&e.index>=0&&Number.isFinite(e.height)&&e.height>0).sort((e,t)=>e.index-t.index)},importHeightCache:function(i,a={}){var o;if(!Array.isArray(i))return;let s=r.value,c=!1;if(a.mode!==`merge`){let e=Object.keys(t);if(e.length>0){for(let n of e)delete t[Number(n)];c=!0}}for(let e of i){let n=Number(e.index),r=Number(e.height);if(!Number.isInteger(n)||n<0||s>0&&n>=s||!Number.isFinite(r)||r<=0)continue;let i=t[n];i&&Math.abs(i-r)<=1||(t[n]=r,c=!0)}c&&(function(){let e=0,i=0,a=r.value;for(let[n,r]of Object.entries(t)){let o=Number(n),s=Number(r);!Number.isFinite(o)||o<0||a>0&&o>=a||!Number.isFinite(s)||s<=0?delete t[o]:(e+=s,i++)}n.total=e,n.count=i}(),s>0&&l(s),(o=e.onHeightRecorded)==null||o.call(e))},fenwickRangeSum:function(e,t,n){if(n<=t)return 0;let r=c(e,n-1);return t<=0?r:r-c(e,t-1)}}}({onHeightRecorded:()=>{zn(),Lt.value&&wo(),Un.value&&Jn(),Pn.value&&xa(),oo(`node-resize`)}});function fr(e){Number.isInteger(e)&&e>=0&&On.add(e)}function pr(e){for(let t of e)fr(Number(t))}function mr(e){An++;let t=!0;try{let n=e();return t=!1!==n,n}finally{An--,An===0&&t&&kn.value++}}function hr(){wn=[],Tn=[],En=-1,On.clear(),Dn.value=Cn}function gr(){hr(),mr(()=>ir()),Sn.clear()}function _r(e){!Number.isInteger(e)||e<0||e>=yt.value.length||Sn.set(e,pa(e))}function vr(e,t,n={}){let r=Qn[e];fr(e),sr(e,t,n);let i=Qn[e];return Object.is(r,i)?(On.delete(e),!1):(i&&i>0?_r(e):r&&Sn.delete(e),!0)}function yr(e,t){let n=ft(`getNodeLayoutHeight.slot.offsetHeight`,()=>_n.get(e)?.offsetHeight??0);return n>0?n:ft(`getNodeLayoutHeight.content.offsetHeight`,()=>t.offsetHeight)}function br(e,t={}){t.mode===`merge`?pr(e.map(e=>e.index)):hr(),mr(()=>ur(e,t)),La()}let xr=L(()=>Zt.value&&Xt.value),Sr=L(()=>!Ne.value&&!1!==G.batchRendering&&an.value>0&&(G.maxLiveNodes??0)<=0),Cr=L(()=>!Ne.value&&Je&&!0===qe.value&&!qt.value&&!Pt.value&&!Mt.value&&!xr.value&&!Sr.value),wr=L(()=>!!Qt&&xr.value),Tr=L(()=>qt.value||Lt.value),{focusIndex:Er,liveRange:Dr,updateLiveRange:Or}=function(e,t){let{parsedNodeCount:n,virtualizationEnabled:r,maxLiveNodesResolved:i,liveNodeBufferResolved:a,clamp:o}=t,s=a??L(()=>Math.max(0,e.liveNodeBuffer??60)),c=R(0),l=N({start:0,end:0});return{liveNodeBufferResolved:s,focusIndex:c,liveRange:l,updateLiveRange:function(){let e=n.value;if(!r.value||e===0)return l.start=0,void(l.end=e);let t=Math.min(i.value,e),a=s.value,u=o(c.value-a,0,Math.max(0,e-t));l.start=u,l.end=Math.min(e,u+t)}}}(G,{parsedNodeCount:wt,virtualizationEnabled:qt,maxLiveNodesResolved:Gt,liveNodeBufferResolved:Kt,clamp:ui}),kr=new Map,Ar=new Map,jr=new Map,Mr=[],Nr=new Map,Pr=new Set,Fr=R(0),Ir=!1,Lr=L(()=>(Fr.value,Pr.size)),Rr=new Map,zr=new Map,Br=R(0),Vr=L(()=>{Br.value;let e=0;for(let t of Rr.values())e+=Math.max(0,t);return e}),Hr=null,Ur=L(()=>{if(!qt.value)return yt.value.length;let e=Kt.value,t=Math.max(Dr.end+e,on.value),n=Math.min(yt.value.length,t);return Math.max(ln.value,n)});function Wr(){Ir||(Ir=!0,queueMicrotask(()=>{Ir=!1,Fr.value+=1}))}function Gr(e,t,n=`node-resize`){if(!q||typeof window>`u`)return null;let r=window.setTimeout(()=>{Pr.delete(r)&&Wr();try{t()}finally{oo(n)}},Math.max(0,e));return Pr.add(r),Wr(),r}function Kr(e){q&&e!=null&&(Pr.delete(e)&&Wr(),window.clearTimeout(e))}function qr(){if(q&&typeof window<`u`)for(let e of Pr)window.clearTimeout(e);Pr.size&&(Pr.clear(),Wr()),Mr.length=0,jr.clear()}function Jr(e){_e.value=e}function Yr(e){ve.value=e}function Xr(e){ye.value=e}let{cancelScheduledFocusSync:Zr,scheduleFocusSync:Qr}=function(e){let{isClient:t,containerRef:n,virtualizationEnabled:r,requestFrame:i,cancelFrame:a,syncFocusToScroll:o}=e,s=null;function c(){return n.value?.ownerDocument?.defaultView??(typeof window<`u`?window:null)}function l(){if(!s)return;let e=c();s.viaTimeout?e?e.clearTimeout(s.id):clearTimeout(s.id):a?.(s.id),s=null}return{cancelScheduledFocusSync:l,scheduleFocusSync:function(e={}){if(!r.value)return;if(!t)return void o(!0);if(e.immediate)return l(),void o(!0);if(s)return;let n=()=>{s=null,o()};if(i)return void(s={id:i(n),viaTimeout:!1});let a=c();s={id:a?a.setTimeout(n,16):setTimeout(n,16),viaTimeout:!0}}}}({isClient:q,containerRef:ge,virtualizationEnabled:qt,requestFrame:$t,cancelFrame:en,syncFocusToScroll:function(e=!1){if(!qt.value)return;let t=Nn.value||Be();if(!t)return;let n=t.ownerDocument||ge.value?.ownerDocument||document,r=n?.defaultView||(typeof window<`u`?window:null),i=t===n?.documentElement||t===n?.body,a=yt.value.length;if(a<=0)return;if(!i&&a>0&&Ve(t)){let n=ft(`syncFocusToScroll.clientHeight`,()=>t.clientHeight||0),r=ft(`syncFocusToScroll.scrollTop`,()=>t.scrollTop),i=r<0?-r:r;li(ui((o=Math.max(0,i)+.5*Math.max(0,n),Fn.estimateIndexForOffsetFromEnd(o)),0,Math.max(0,a-1)),e);return}var o;let s=function(e,t,n,r){let i=ge.value;if(!i)return null;let a=r?0:ft(`syncFocusToScroll.model.root.getBoundingClientRect`,()=>e.getBoundingClientRect().top),o=ft(`syncFocusToScroll.model.container.getBoundingClientRect`,()=>i.getBoundingClientRect().top),s=Math.max(0,a-o),c=r?ft(`syncFocusToScroll.model.viewport.clientHeight`,()=>n?.innerHeight??t.documentElement?.clientHeight??e.clientHeight??0):ft(`syncFocusToScroll.model.root.clientHeight`,()=>e.clientHeight);return ui(Hn(s+.5*Math.max(0,c)),0,Math.max(0,yt.value.length-1))}(t,n,r,i);if(s!=null)return void li(s,e);let c=i?null:ft(`syncFocusToScroll.root.getBoundingClientRect`,()=>t.getBoundingClientRect()),l=i?0:c.top,u=i?ft(`syncFocusToScroll.viewport.clientHeight`,()=>r?.innerHeight??t.clientHeight??0):c.bottom,d=Mn.value,f=null,p=null;for(let[e,t]of d){if(!t)continue;let n=ft(`syncFocusToScroll.slot.getBoundingClientRect`,()=>t.getBoundingClientRect());n.bottom<=l||n.top>=u||(f??=e,p=e)}if(f==null||p==null){let e=ge.value;if(!e)return;let a=i?{top:0}:ft(`syncFocusToScroll.fallback.root.getBoundingClientRect`,()=>t.getBoundingClientRect()),o=ft(`syncFocusToScroll.fallback.scrollTop`,()=>He(t,n,i)),s=i?(()=>{let t=ft(`syncFocusToScroll.fallback.container.getBoundingClientRect`,()=>e.getBoundingClientRect()),n=(i?0:a.top)-t.top;return Math.max(0,n)})():(()=>{let n=Ue(e,t);return Math.max(0,o-n)})(),c=i?ft(`syncFocusToScroll.fallback.viewport.clientHeight`,()=>r?.innerHeight??n?.documentElement?.clientHeight??t.clientHeight??0):ft(`syncFocusToScroll.fallback.root.clientHeight`,()=>t.clientHeight);li(ui(Hn(s+.5*Math.max(0,c)),0,Math.max(0,yt.value.length-1)),!0);return}li(Math.round((f+p)/2),e)}}),{visibleNodeIndices:$r,nodeVisibilityHandles:ei,nodeVisibilityWatchStops:ti,nodeVisibilityFallbackTimers:ni,clearVisibilityFallback:ri,markNodeVisible:ii,cleanupNodeVisibility:ai,destroyNodeVisibilityState:oi}=_0({isClient:q,shouldTrackVisibleNodeIndices:()=>xr.value,shouldCleanupNodeVisibility:()=>qt.value,onNodeMarkedVisible:e=>{qt.value?Qr():Er.value=ui(e,0,Math.max(0,yt.value.length-1))},onNodeVisibilityCleaned:e=>{_n.delete(e)&&so()}}),{cleanupScrollListener:si,setupScrollListener:ci}=function(e){let{isClient:t,virtualizationEnabled:n,listenerEnabled:r,scrollRootElement:i,resolveScrollContainer:a,scheduleFocusSync:o,onScroll:s}=e,c=null,l=null;function u(){c&&=(c(),null),l=null,i.value=null}function d(t){let n=e.getScrollTop?e.getScrollTop(t):t.scrollTop;return Math.max(0,Number.isFinite(n)?Math.abs(n):0)}return{cleanupScrollListener:u,setupScrollListener:function(){if(!t)return;if(!((e=r?.value)??n.value))return void u();var e;let f=a();if(!f)return void u();if(i.value===f&&c)return;u(),l=d(f);let p=()=>{if(s?.(),n.value){let e=function(e){let t=d(e),n=l;l=t;let r=Math.max(480,.75*(e.clientHeight||0));return n==null?t>r?{immediate:!0}:void 0:Math.abs(t-n)>r?{immediate:!0}:void 0}(f);e?o(e):o()}};f.addEventListener(`scroll`,p,{passive:!0}),i.value=f,c=()=>{f.removeEventListener(`scroll`,p)}}}}({isClient:q,virtualizationEnabled:qt,listenerEnabled:Tr,scrollRootElement:Nn,resolveScrollContainer:Be,scheduleFocusSync:Qr,onScroll:function(){let e=Pn.value;if(!e)return;let t=na();if(!t||function(e){if(Xa()>=Ln)return Rn=null,!1;let t=Rn;if(t==null)return!0;let n=Math.abs(e.scrollTop-t)<=2;return n||(Rn=null),n}(t))return;let n=ia(t);(n==null||n<-32||Math.abs(Math.max(0,n)-Math.max(0,e.distanceFromBottomPx))>32)&&ba(`restore`)},getScrollTop:e=>{let t=e.ownerDocument||ge.value?.ownerDocument||document,n=e===t.documentElement||e===t.body||e===t.scrollingElement;return ft(`scrollListener.getScrollTop`,()=>He(e,t,n))}});function li(e,t=!1){let n=ui(e,0,Math.max(0,yt.value.length-1));!t&&Math.abs(n-Er.value)<=1||(Er.value=n,Or())}function ui(e,t,n){return Math.min(Math.max(e,t),n)}function di(e=yt.value.length){let t=bt();return!Number.isInteger(t)||t<0?e:ui(t,0,e)}function fi(e){return e?.firstElementChild}function pi(e,t){return e?e.matches?.call(e,t)?e:e.querySelector(t):null}function mi(e,t){e<1||e>6||(be[e]=t)}function hi(){if(!zt.value)return void(we.value=0);let e=ft(`updateExperimentContainerWidth.clientWidth`,()=>ge.value?.clientWidth??0);we.value=e>0?e:0}let gi=null;function _i(){gi?.disconnect(),gi=null}let vi=tZ(`ViewportDeferredMarkdownCodeBlockNode`,i({loader:()=>uY(null,null,function*(){return(yield he(()=>import(`./index5-DTEBXfOq.js`),__vite__mapDeps([34,1,2,31,7]))).default}),loadingComponent:nZ,delay:0,suspensible:!1}),nZ);function yi(e){return e===vi}let bi=L(()=>A.value===`pre`?QX:A.value===`shiki`?vi:rZ);function xi(){return!1!==G.codeBlockProps?.showHeader}function Si(e,t,n){let r=Qn[t],i=typeof r==`number`&&r>0;if(Vt.value&&!i&&!function(e){return!!gt.value.paragraph&&(e.type===`paragraph`||e.type===`list_item`||e.type===`list`)}(e)){let t=p1(e,n,Te.value);if(t)return t}if(gn.value&&e.type===`code_block`){let t=function(e){if(e.type!==`code_block`)return null;let t=ns(e,Zo(e));return yi(t)?`markdown`:t===QX?`pre`:t===bi.value||t===rZ?`monaco`:null}(e);if(t===`monaco`||t===`markdown`||t===`pre`)return function(e,t){if(!e||e.type!==`code_block`)return null;let n=t.rendererKind,r=n!==`pre`&&!1!==t.showHeader,i=!!e.diff,a=0,o=500;if(n===`monaco`){let n=t.monacoOptions??{},r=g1(e,n,t.width),s=function(e){let t=typeof e?.fontSize==`number`&&e.fontSize>0?e.fontSize:12;return typeof e?.lineHeight==`number`&&e.lineHeight>0?e.lineHeight:Math.round(1.5*t)}(n),c=function(e,t){let n=typeof e?.padding?.top==`number`?e.padding.top:t?0:8,r=typeof e?.padding?.bottom==`number`?e.padding.bottom:t?0:8;return Math.max(0,n)+Math.max(0,r)}(n,i);o=typeof n.MAX_HEIGHT==`number`&&n.MAX_HEIGHT>0?n.MAX_HEIGHT:500,a=Math.round(r*s+c)}else if(n===`markdown`){let t=g1(e);a=Math.round(21*t+32)}else{let t=g1(e);a=Math.round(28*t),o=1/0}let s=Math.max(1,Math.min(a,o));return cY({kind:`code-block`,height:Math.round(s+(r?40:0)),contentHeight:s,rendererKind:n},i&&n===`monaco`?{diffInline:RX(t.monacoOptions??{},t.width??0)}:{})}(e,{rendererKind:t,monacoOptions:G.codeBlockMonacoOptions,showHeader:xi(),width:n})}return null}u(()=>{if(kn.value,An>0)return;let e=yt.value,t=xt();if(!e.length||!hn.value)return wn=[],Tn=[],En=-1,On.clear(),void(Dn.value=Cn);let n=we.value||ft(`estimatedNodeHeights.clientWidth`,()=>ge.value?.clientWidth||0);if(!Number.isFinite(n)||n<=0)return wn=[],Tn=[],En=-1,On.clear(),void(Dn.value=Cn);let r=function(e){return[Math.round(e),Vt.value,gn.value,Te.value,G.codeBlockMonacoOptions,xi(),A.value,gt.value,s1.value]}(n),i=wn.length<=e.length&&(o=r,(a=Tn).length===o.length&&a.every((e,t)=>Object.is(e,o[t])));var a,o;let s=i&&En===t?e.length:i?di(e.length):0,c=i?Array.from(On):[];wn.length=e.length;for(let t=s;t=0&&tDn.value);Fn=function(e){let t=!0,n=[0],r=``;function i(t){let n=e.nodeHeights[t];if(Number.isFinite(n)&&n>0)return n;let r=e.parsedNodes.value[t],i=r?.type,a=!!e.hasCustomParagraphComponent?.call(e),o=e.estimatedNodeHeights.value[t],s=o?.height;if(!function(e,t,n){return!!(n&&t?.kind===`simple-text`&&(e===`paragraph`||e===`list_item`||e===`list`))}(i,o,a)&&Number.isFinite(s)&&s>0)return s;let c=P1(r,e.getContainerWidth()||640);return i===`heading`||i===`paragraph`&&c<=28&&function(e,t){if(t)return!1;let n=e.children;return!Array.isArray(n)||!n.length||n.every(A1)}(r,a)?c:Math.max(e.averageNodeHeight.value,c)}function a(){let a=e.parsedNodes.value.length,o=e.getPrefixCacheKeyParts().join(`:`);if(!t&&r===o)return n;let s=Array(a+1);s[0]=0;for(let t=0;t=(r[n]??0))return n-1;let i=0,o=n-1,s=n-1;for(;i<=o;){let e=i+o>>1;(r[e+1]??0)>=t?(s=e,o=e-1):i=e+1}return s}function s(t,n){if(t>=n)return 0;if(e.heightEstimationActive.value)return function(t,n){let r=e.parsedNodes.value.length,i=F1(Math.trunc(t),0,r),o=F1(Math.trunc(n),i,r);if(i>=o)return 0;let s=a();return(s[o]??0)-(s[i]??0)}(t,n);if(e.heightTreeSize.value!==e.parsedNodes.value.length){let r=0;for(let i=t;it<=0?0:e.fenwickRangeSum(i,0,t)+(t-e.fenwickRangeSum(a,0,t))*r,s=0,c=n.length-1,l=n.length-1;for(;s<=c;){let e=s+c>>1;o(e+1)>=t?(l=e,c=e-1):s=e+1}return l}let r=t;for(let t=0;t0||t++}return t}return{markFallbackHeightPrefixDirty:function(){t=!0},getFallbackNodeHeight:i,estimateHeightRange:s,estimateIndexForOffset:c,estimateIndexForOffsetFromEnd:function(t){let n=e.parsedNodes.value;if(!n.length)return 0;if(t<=0)return Math.max(0,n.length-1);if(e.heightEstimationActive.value){let e=a()[n.length]??0;return o(Math.max(0,e-t))}if(e.heightTreeSize.value===n.length){let e=s(0,n.length);return c(Math.max(0,e-t))}let r=t;for(let t=n.length-1;t>=0;t--){let n=e.nodeHeights[t]??e.averageNodeHeight.value;if(r<=n)return t;r-=n}return 0},getEstimatedNodeHeightCount:l,buildVirtualHeightSummary:function(t){let n=e.parsedNodes.value.length;return{totalNodes:n,measuredCount:e.heightStats.count,estimatedCount:l(),averageNodeHeight:e.averageNodeHeight.value,topSpacerHeight:t.topSpacerHeight,bottomSpacerHeight:t.bottomSpacerHeight,estimatedTotalHeight:s(0,n),width:t.width??e.getContainerWidth()}}}}({parsedNodes:yt,nodeHeights:Qn,heightStats:$n,heightTreeSize:er,heightSumTree:tr,heightKnownTree:nr,averageNodeHeight:rr,heightEstimationActive:zt,estimatedNodeHeights:Ci,getContainerWidth:Ht,hasCustomParagraphComponent:()=>!!gt.value.paragraph,getPrefixCacheKeyParts:()=>{let e=O1(we.value||ft(`getFallbackHeightPrefix.clientWidth`,()=>ge.value?.clientWidth||0)),t=o.virtualScroll?.measurementKey==null?``:String(o.virtualScroll.measurementKey);return[yt.value.length,$n.count,Math.round($n.total),Math.round(100*rr.value),t,e,+!!zt.value,s1.value,Ce.value,+!!gt.value.paragraph]},fenwickRangeSum:dr}),s(()=>yt.value.length,e=>{var t;zn(),e<=0?gr():(ear(t))),e!==er.value&&or(e))},{immediate:!0});let wi=L(()=>{if(!qt.value)return yt.value.map((e,t)=>({node:e,index:t}));let e=yt.value.length,t=ui(Dr.start,0,e),n=ui(Dr.end,t,e);return yt.value.slice(t,n).map((e,n)=>({node:e,index:t+n}))}),Ti=L(()=>qt.value?Vn(0,Math.min(Dr.start,yt.value.length)):0),Ei=L(()=>{if(!qt.value)return 0;let e=yt.value.length;return Vn(Math.min(Dr.end,e),e)});function Di(){return Fn.buildVirtualHeightSummary({topSpacerHeight:Ti.value,bottomSpacerHeight:Ei.value,width:Fi()})}function Oi(){let e=yt.value;return lY(cY({},Di()),{probe:{paragraphReady:!!Te.value.paragraph,listItemReady:!!Te.value.listItem,listWrapperOverhead:Te.value.listWrapperOverhead,headingReadyLevels:Object.entries(Te.value.headings).filter(([,e])=>!!e).map(([e])=>Number(e))},nodes:e.map((e,t)=>({index:t,type:e.type,estimateKind:Ci.value[t]?.kind??null,rendererKind:Ci.value[t]?.rendererKind??null,estimatedHeight:Ci.value[t]?.height??null,estimatedContentHeight:Ci.value[t]?.contentHeight??null,measuredHeight:Qn[t]??null}))})}function ki(){return o.indexKey==null?Pt.value?`virtual-${ji()}`:`markdown-renderer`:String(o.indexKey)}function Ai(e){let t=String(e),n=`${ki()}-`;if(!t.startsWith(n))return null;let r=t.slice(n.length).match(/^(\d+)(?:$|-)/);if(!r)return null;let i=Number(r[1]);return!Number.isInteger(i)||i<0||i>=yt.value.length?null:i}function ji(){let e=o.virtualScroll?.sessionKey;return String(e!=null&&e!==``?e:o.indexKey??G.customId??pt)}function J(){let e=o.virtualScroll?.threadKey;return e==null||e===``?void 0:String(e)}let Mi=L(()=>J()??String(o.indexKey??G.customId??pt));function Ni(e){return(e??``)===(J()??``)}function Pi(){var e,t;return e=o.virtualScroll?.measurementKey,t=function(){let e=A.value;return function(e){let t=e.renderer,n=t===`monaco`?e.codeBlockMonacoOptions:void 0,r=e.codeBlockProps,i=t===`shiki`;return[e.isDark?`dark`:`light`,t===`monaco`?`code-rich`:t===`pre`?`code-pre`:`code-shiki`,!1===e.codeBlockStream?`code-static`:`code-stream`,k0(e.codeBlockMinWidth),k0(e.codeBlockMaxWidth),...i?[rq(r?.themes??e.themes,r?.langs??e.langs)]:[],k0(n?.fontSize),k0(n?.lineHeight),k0(n?.fontFamily),k0(n?.tabSize),k0(n?.MAX_HEIGHT),k0(n?.wordWrap),k0(n?.wrappingIndent),k0(n?.padding),k0(r?.showHeader),k0(r?.showCopyButton),k0(r?.showExpandButton),k0(r?.showPreviewButton),k0(r?.showCollapseButton),k0(r?.showFontSizeButtons)].join(`\0`)}({renderer:e,isDark:G.isDark,codeBlockStream:G.codeBlockStream,codeBlockMinWidth:G.codeBlockMinWidth,codeBlockMaxWidth:G.codeBlockMaxWidth,codeBlockMonacoOptions:e===`monaco`?G.codeBlockMonacoOptions:void 0,codeBlockProps:G.codeBlockProps,themes:e===`shiki`?G.themes:void 0,langs:e===`shiki`?G.langs:void 0})}(),[e==null?``:String(e),t].join(`\0`)}function Fi(){return Ht()}let Ii=L(()=>O1(Fi())),Li=L(()=>[Pi(),Ii.value].join(`\0`)),Ri=L(()=>Pt.value?[`virtual`,J()??``,ji(),Li.value].join(`\0`):o.indexKey);function zi(){Br.value+=1}function Bi(e){return!(!e||!Number.isInteger(e.index)||e.index<0||e.index>=yt.value.length||e.sessionKey!==ji()||e.threadKey!==J()||e.layoutEpochKey!==Li.value)}function Vi(e){let t=String(e),n=zr.get(t);return n?Bi(n)?n.index:null:Ai(t)}function Hi(e=`async-node`){(Rr.size||zr.size)&&(Rr.clear(),zr.clear(),zi(),oo(e))}let Ui=m(pq,null),Wi={reportHeight(e,t){if(!Lt.value)return;let n=Vi(e);if(n==null)return;let r=kr.get(n);if(!r)return;let i=Number(t),a=yr(n,r);(function(e,t,n={}){mr(()=>vr(e,t,n))})(n,Number.isFinite(i)&&i>0?Math.max(i,a||0):a)},markPending(e){if(!Lt.value)return;let t=Ai(e);t!=null&&function(e,t){let n=zr.get(e);if(n&&Bi(n))return Rr.set(e,Math.max(0,Rr.get(e)??0)+1),zi(),void oo(`async-node`);Rr.set(e,1),zr.set(e,function(e){return{index:e,sessionKey:ji(),threadKey:J(),layoutEpochKey:Li.value}}(t)),zi(),oo(`async-node`)}(String(e),t)},markSettled(e){if(!Lt.value)return;let t=String(e),n=Vi(e);(n!=null||function(e){return Rr.has(String(e))}(t))&&function(e){let t=Rr.get(e)??0;return!(t<=0||(t<=1?(Rr.delete(e),zr.delete(e)):Rr.set(e,t-1),zi(),t===1&&oo(`async-node`),0))}(t)&&n!=null&&ho()}};function Gi(){let e=0;for(let t of kr.values())e+=ft(`getVisibleDomHeight.offsetHeight`,()=>t?.offsetHeight??0);return Math.ceil(Math.max(0,e))}d(pq,{reportHeight(e,t){Wi.reportHeight(e,t),Ui?.reportHeight(e,t)},markPending(e){Wi.markPending(e),Ui?.markPending(e)},markSettled(e){Wi.markSettled(e),Ui?.markSettled(e)}});let Ki,qi=null,Ji=null;function Yi(e){return!1!==e&&e!=null&&e!==``}function Xi(){return qt.value?function(){if(!qt.value)return!0;let e=yt.value.length,t=ui(Dr.start,0,e),n=ui(Dr.end,t,e);if(t>=n)return!0;for(let e=t;e=Ur.value}function Zi(){return!0===qe.value&&!Ye.value&&Vr.value===0&&Pr.size===0&&Nr.size===0&&Hr==null&&Xi()}function Qi(){if(o.virtualScroll?.settleMode!==`manual`||qi===ji()&&Ki===J())return!0;let e=o.virtualScroll?.settledToken;return!!Yi(e)&&Ji===Do(e)}function $i(){return Zi()&&Qi()}function ea(e,t){return t.totalNodes<=0?e===`final`?`final`:`estimate`:t.measuredCount>=t.totalNodes?e===`final`?`final`:`measured`:t.measuredCount>0||t.estimatedCount>0?`mixed`:`estimate`}function ta(e=`manual`,t){let n=Di(),r=function(e){return e||(!0===qe.value?!Xi()||Nr.size>0||Hr!=null?`measuring`:$i()?`settled`:`settling`:yt.value.length>0?`streaming`:`estimating`)}(t);return{sessionKey:ji(),threadKey:J(),phase:r,nodeCount:n.totalNodes,liveRange:{start:Dr.start,end:Dr.end},renderedCount:ln.value,measuredCount:n.measuredCount,estimatedCount:n.estimatedCount,averageNodeHeight:n.averageNodeHeight,topSpacerHeight:n.topSpacerHeight,bottomSpacerHeight:n.bottomSpacerHeight,visibleDomHeight:Gi(),totalHeight:ra(),width:n.width,final:!0===qe.value,stable:$i(),confidence:ea(r,n),reason:e}}function na(){let e=Nn.value||Be(),t=ge.value;if(!e||!t)return null;let n=e.ownerDocument||t.ownerDocument||document,r=e===n.documentElement||e===n.body||e===n.scrollingElement;return{root:e,doc:n,isViewportRoot:r,scrollTop:ft(`getScrollBox.scrollTop`,()=>He(e,n,r)),scrollHeight:ft(`getScrollBox.scrollHeight`,()=>r?Math.max(n.documentElement?.scrollHeight??0,n.body?.scrollHeight??0,e.scrollHeight??0):e.scrollHeight),clientHeight:ft(`getScrollBox.clientHeight`,()=>r?n.documentElement?.clientHeight||e.clientHeight||0:e.clientHeight)}}function ra(){let e=yt.value.length,t=Math.max(0,Vn(0,e)),n=ft(`getRendererLogicalHeight.offsetHeight`,()=>ge.value?.offsetHeight??0),r=Math.max(0,n>0?n:ft(`getRendererLogicalHeight.scrollHeight`,()=>ge.value?.scrollHeight??0));return e<=0?Math.ceil(n):qt.value?t>0?Math.max(1,Math.ceil(t),function(){let e=Ti.value+Ei.value;for(let t of _n.values())t&&(e+=Math.max(0,ft(`getVirtualizedDomLogicalHeight.offsetHeight`,()=>t.offsetHeight||0)));return Math.ceil(Math.max(0,e))}(),function(e,t){return e<=0||t<=0?0:t<=e+Math.max(512,.05*e)?Math.ceil(t):0}(t,r)):Math.max(1,Math.ceil(r)):Lt.value?t>0||$n.count>0||Fn.getEstimatedNodeHeightCount()>0?(cn.value&&ln.value,Math.max(1,Math.ceil(r),Math.ceil(t))):Math.ceil(r):Math.max(1,Math.ceil(r),Math.ceil(t))}function ia(e){let t=ge.value;if(!t)return null;let n=ft(`getRendererBottomDistanceFromViewport.getBoundingClientRect`,()=>t.getBoundingClientRect());return function(e){return e.isViewportRoot?e.clientHeight:ft(`getViewportBottomInRoot.getBoundingClientRect`,()=>e.root.getBoundingClientRect().bottom)}(e)-n.bottom}function aa(e={}){let t=!1!==e.requireViewport,n=function(e=64){let t=na(),n=ge.value;if(!t||!n)return!1;let r=function(e){if(e.isViewportRoot)return{top:0,bottom:e.clientHeight};let t=ft(`getVirtualViewportRect.getBoundingClientRect`,()=>e.root.getBoundingClientRect());return{top:t.top,bottom:t.bottom}}(t),i=ft(`isRendererNearVirtualViewport.getBoundingClientRect`,()=>n.getBoundingClientRect());return i.bottom>=r.top-e&&i.top<=r.bottom+e}();if(t&&!n)return null;let r=function(){let e=na(),t=ge.value;if(!e||!t||Math.max(0,e.scrollHeight-e.scrollTop-e.clientHeight)>64)return null;let n=ia(e);return n==null?null:n>=-8&&n<=160?{type:`bottom`,distanceFromBottomPx:Math.max(0,n)}:null}();if(r)return{anchor:r,captured:!0};let i=Yn();if(i)return{anchor:{type:`node`,nodeIndex:i.nodeIndex,offsetWithinNodePx:i.offsetWithinNodePx},captured:n};if(!0===e.allowFallback){let e=function(){let e=yt.value.length;return e<=0?null:{type:`node`,nodeIndex:ui(Er.value,0,Math.max(0,e-1)),offsetWithinNodePx:0}}();return e?{anchor:e,captured:!1}:null}return null}function oa(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function sa(e,t){let n=e;for(let e=0;e8192?`${e.slice(0,8192)}...${e.length}`:e;return`${e.length}:${oa(t)}`}(e)}`;if(typeof e==`function`)return`fn`;if(typeof e!=`object`)return typeof e;if(t.has(e))return`cycle`;if(n>=6)return`max-depth`;t.add(e);try{if(Array.isArray(e)){if(e.length<=160){let r=[];for(let i=0;i=a&&i.push(c)}return[`a:${e.length}`,`h=${r.join(`,`)}`,`t=${i.join(`,`)}`,`all=${(o>>>0).toString(36)}`].join(`:`)}let r=e,i=Object.keys(r).filter(e=>{let t=r[e];return e!==`parent`&&e!==`el`&&e!==`component`&&(t==null||typeof t==`string`||typeof t==`number`||typeof t==`boolean`||ca.has(e))}).sort();return`o:${i.length}:${i.map(e=>`${e}=${la(r[e],t,n+1)}`).join(`;`)}`}finally{t.delete(e)}}let ua=-1,da=``,fa=[2166136261];function pa(e){let t=yt.value[e];return t?oa(la(t)):``}function ma(e,t){let n=e;for(let e=0;e>>0}function ha(){let e=Ce.value;if(ua===e)return da;let t=yt.value.length,n=di(t);(ua!==e-1||n>t||fa.length>>0).toString(36),ua=e,da}function ga(e,t={}){let n=!0===t.includeHeightCache,r=t.includeContentHash??n,i=n?function(e){let t=function(){let e=Number(o.virtualScroll?.heightCacheLimit??5e3);return!Number.isFinite(e)||e<=0?1/0:Math.max(1,Math.trunc(e))}();if(!Number.isFinite(t)||e.length<=t)return e;let n=new Map,r=e=>{!e||n.size>=t||n.set(e.index,e)},i=yt.value.length,a=ui(Dr.start-2*Kt.value,0,i),s=ui(Dr.end+2*Kt.value,a,i);for(let t of e)t.index>=a&&t.index=0&&n.sizee.index-t.index).slice(0,t)}(lr().map(e=>{let t=yt.value[e.index];return t?lY(cY({},e),{nodeType:String(t.type??``),signature:pa(e.index)}):null}).filter(e=>!!e)):[],a=aa({allowFallback:!0===t.allowAnchorFallback,requireViewport:t.requireViewport});return a||i.length||!0===t.includeEmptyState?lY(cY({sessionKey:e.sessionKey,threadKey:e.threadKey},a?{anchor:a.anchor,anchorCaptured:a.captured}:{anchorCaptured:!1}),{metrics:e,width:e.width,contentHash:r?ha():void 0,measurementKey:Pi()||void 0,heightCache:i.length?i:void 0}):null}function _a(e){var t,n;let r=na();if(!r)return;let i=function(e){let t=ge.value;if(!t)return null;let n=Ue(t,e.root),r=yt.value.length,i=ft(`getRendererBottomOffsetWithinRoot.offsetHeight`,()=>t.offsetHeight||0),a=Math.max(0,i>0?i:r>0?ft(`getRendererBottomOffsetWithinRoot.scrollHeight`,()=>t.scrollHeight||0):0),o=ra();return n+Math.max(a,o)}(r);if(i==null)return;let a=Math.max(0,e.distanceFromBottomPx),o=Math.max(0,i-r.clientHeight-a);(function(e){Ln=Xa()+120,Rn=e})(o),r.isViewportRoot?(n=(t=r.doc.defaultView)?.scrollTo)==null||n.call(t,0,o):x1(r.root,r.doc,o,{isReverseFlexScrollRoot:Ve,getNormalizedScrollTop:He})}let va=[];function ya(){if(q)for(In!=null&&(en?.(In),In=null);va.length;){let e=va.pop();e!=null&&window.clearTimeout(e)}}function ba(e){let t=!!Pn.value;Pn.value=null,Ln=0,Rn=null,ya(),t&&e&&oo(e)}function xa(){if(!Pn.value||!q||In!=null)return;let e=()=>{In=null;let e=Pn.value;e&&_a(e)};In=$t?$t(e):null,In??e()}function Sa(e,t={}){let n=yt.value.length;return n<=0?[]:e.filter(e=>!(!Number.isInteger(e.index)||e.index<0||e.index>=n)&&!(!Number.isFinite(e.height)||e.height<=0)&&!(t.requireSignature&&!e.signature)&&!(t.requireCompatibilityMetadata&&!e.nodeType&&!e.signature)&&function(e){let t=yt.value[e.index];return!(!t||e.nodeType&&e.nodeType!==String(t.type??``)||e.signature&&e.signature!==pa(e.index))}(e))}function Y(e){let t=O1(Fi()),n=O1(e);return t!==-1&&n!==-1&&t===n}function Ca(e){let t=Number(e?.width);if(Number.isFinite(t)&&t>0)return t;let n=Number(e?.metrics?.width);return Number.isFinite(n)&&n>0?n:null}function wa(e){return e.sessionKey===ji()&&!!Ni(e.threadKey)&&(e.measurementKey??``)===Pi()&&!!Y(Ca(e))&&!!function(e){let t=e.heightCache;return!!t?.length&&(Ta(e)?t.some(e=>!!(e.nodeType||e.signature)):t.some(e=>!!e.signature))}(e)}function Ta(e){return!!(e.contentHash&&e.contentHash===ha())}function Ea(e){return!Ta(e)}let Da=null,Oa=null,ka=null,Aa=null,ja=null;function Ma(e){let t=e.map(e=>[e.index,Math.round(10*e.height),e.nodeType??``,e.signature??``].join(``)).join(``),n=O1(Fi());return[J()??``,ji(),Pi(),yt.value.length,n,e.length,oa(t)].join(`:`)}function Na(e=(e=>(e=o.virtualScroll)?.heightCache)()){if(!Lt.value||!e?.length||yt.value.length<=0||!Y((t=o.virtualScroll)?.heightCacheWidth))return!1;var t;let n=Sa(e,{requireSignature:!0});if(!n.length)return!1;let r=Ma(n);return r===Da?(Oa=`standalone`,!0):(br(n,{mode:`merge`}),zn(),Da=r,Oa=`standalone`,eo(),oo(`restore`),!0)}function Pa(e,t={}){if(!Lt.value||!e||e.sessionKey!==ji()||!Ni(e.threadKey)||yt.value.length<=0)return!1;let r=!!e.heightCache?.length&&!Fa(),i=!e.anchor||!1===e.anchorCaptured&&!0!==t.allowUncapturedAnchor?null:e.anchor,a=!0===t.restoreAnchor&&!!i&&!Fa()&&Number(Ca(e))>0,o=!1;if(e.heightCache?.length&&wa(e)){let t=Sa(e.heightCache,{requireCompatibilityMetadata:!e.contentHash,requireSignature:Ea(e)});t.length&&(br(t,{mode:`merge`}),zn(),Da=Ma(t),Oa=`restore`,eo(),o=!0)}if(r||a)return!1;if(!t.restoreAnchor||!i)return o&&oo(`restore`),!0;let s=function(e,t){let n=e.anchor,r=n?n.type===`bottom`?`bottom:${Math.round(n.distanceFromBottomPx)}`:`node:${n.nodeIndex}:${Math.round(n.offsetWithinNodePx)}`:`none`;return[J()??``,ji(),Pi(),Ii.value,t,r].join(`:`)}(e,t.restoreToken??`imperative`);return ka===s?(o&&oo(`restore`),!0):(ka=s,function(e){let t=()=>{if(e.type===`node`)return ba(),void Xn({nodeIndex:e.nodeIndex,offsetWithinNodePx:e.offsetWithinNodePx});if(qn(),Un.value=null,Pn.value=e,ya(),_a(e),q)for(let e of[0,120,280,480])va.push(window.setTimeout(()=>{let e=Pn.value;e&&_a(e)},e))};(function(e){if(!qt.value)return!1;let t=yt.value.length;return!(t<=0||(Er.value=e.type===`node`?ui(e.nodeIndex,0,t-1):t-1,Or(),0))})(e)?n(t):t()}(i),oo(`restore`),!0)}function Fa(){let e=Fi();return Number.isFinite(e)&&e>0}function Ia(e){return e.sessionKey===ji()&&!!Ni(e.threadKey)&&(yt.value.length<=0||!(!e.heightCache?.length||Fa())||!(!(e.anchor&&Number(Ca(e))>0)||Fa()))}function La(){Sn.clear();for(let e of Object.keys(Qn)){let t=Number(e);Number.isInteger(t)&&t>=0&&t{let t=!1,n=null,r=()=>{t||(t=!0,n!=null&&window.clearTimeout(n),e())};if($t)return $t(r),void(n=window.setTimeout(r,50));n=window.setTimeout(r,0)})}function Ba(e,t=J(),n=Li.value){return ji()===e&&J()===t&&Li.value===n}function Va(){return uY(this,arguments,function*(e={}){let t=ji(),r=J(),i=Li.value,a=e.frames??2,s=e.timeoutMs??120,c=e.reason??`manual`,l=e.expectedSettledTokenKey,u=!0===e.flushPendingTimers,d=ta(c),f=()=>lY(cY({},d),{phase:d.final?`settling`:d.phase,stable:!1,confidence:d.confidence===`final`?`mixed`:d.confidence,reason:c}),p=()=>Ba(t,r,i)&&(l==null||Qa()===l);for(let e=0;ewindow.setTimeout(t,e))}(s),!p()||(u&&qr(),ho(),Ra(),!p()))return f();let m=Zi();m&&(qi=t,Ki=r,o.virtualScroll?.settleMode===`manual`&&l!=null&&Yi(o.virtualScroll?.settledToken)&&Qa()===l&&(Ji=Do(o.virtualScroll.settledToken)));let h=ta(c,p()&&m&&Qi()?`final`:void 0);return ro(h,!0),h})}let Ha=`content`,Ua=null,Wa=null,Ga=0,Ka=null,qa=null,Ja=null,Ya=null;function Xa(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function Za(e){let t=Ka;if(!t)return!0;let n=o.virtualScroll?.heightDiffThresholdPx??1;return Math.abs(e.totalHeight-t.totalHeight)>n||e.sessionKey!==t.sessionKey||e.phase!==t.phase||e.stable!==t.stable||e.final!==t.final||e.threadKey!==t.threadKey||e.nodeCount!==t.nodeCount||e.measuredCount!==t.measuredCount||e.width!==t.width}function Qa(e=(e=>(e=o.virtualScroll)?.settledToken)()){return k0(e)}function $a(e,t){return[e,t.sessionKey,t.threadKey??``,Pi(),ha(),k0(o.virtualScroll?.settledToken),Math.round(t.totalHeight),Math.round(t.width)].join(`\0`)}function eo(){Ja=null,Ya=null,qa=null}function to(e){let t=e.heightCache;return t?.length?Ma(t):``}function no(e){let t=e.metrics,n=e.anchor?(r=e.anchor).type===`bottom`?`bottom:${Math.round(r.distanceFromBottomPx)}`:`node:${r.nodeIndex}:${Math.round(r.offsetWithinNodePx)}`:`none`;var r;return[e.sessionKey,e.threadKey??``,e.measurementKey??Pi(),e.contentHash??``,to(e),n,+!!e.anchorCaptured,t.liveRange.start,t.liveRange.end,t.renderedCount,t.nodeCount,Math.round(t.totalHeight),Math.round(t.width),t.phase,+!!t.stable].join(`\0`)}function ro(e,t=!1){if(!Lt.value||function(e=!1){return!e&&Pt.value&&!Rt.value}(t))return;let n=t||Za(e),r=function(e,t=!1){return t||e.stable||e.phase===`final`?{state:ga(e,{includeHeightCache:!0})}:{state:ga(e)}}(e,t).state,i=!!(r&&(n||function(e,t=!1){return!!t||no(e)!==qa}(r,t)));if(n&&(K(e),Ka=e,Ga=Xa()),r&&i&&(pe(r),r.anchor&&me(r.anchor),qa=no(r)),e.stable){let t=$a(`settled`,e);if(t!==Ja){Ja=t;let n=ga(e,{includeHeightCache:!0});n&&(pe(n),qa=no(n)),function(e){l(`render-settled`,e)}(e)}}if(e.phase===`final`){let t=$a(`final`,e);if(t!==Ya){Ya=t;let n=ga(e,{includeHeightCache:!0});n&&(pe(n),qa=no(n)),function(e){l(`render-final`,e)}(e)}}}function io(){Ua!=null&&(en?.(Ua),Ua=null),Wa!=null&&q&&(window.clearTimeout(Wa),Wa=null)}function ao(){Ua=null,Wa=null,function(e){if(Nr.size>0||Hr!=null)return!0;switch(e){case`node-resize`:case`async-node`:case`resize`:case`restore`:case`final`:case`manual`:return!0;default:return!1}}(Ha)&&(ho(),Ra()),ro(ta(Ha))}function oo(e){if(!Lt.value||(Ha=e,Ua!=null||Wa!=null))return;let t=Math.max(0,o.virtualScroll?.emitIntervalMs??32),n=Math.max(0,t-(Xa()-Ga)),r=()=>{Wa=null,Ua=$t?$t(ao):null,Ua??ao()};q&&n>0?Wa=window.setTimeout(r,n):r()}function so(){jn.value+=1}function co(e){if(cn.value&&e>=ln.value){let t=yt.value[e],n=!0===Ke.value&&!0!==qe.value&&e>=yt.value.length-2,r=t?.type===`code_block`||t?.type===`image`||t?.type===`mermaid`||t?.type===`infographic`;if(!n||r)return!1}return!xr.value||e=Ae.value&&(xe.value||(xe.value=!0,oi()),!wr.value||!Qt))return lo(e),void(t&&ii(e,!0));if(e{if(ni.delete(e),!xr.value||$r.value.has(e))return;let t=_n.get(e);if(!t)return;let n=Be(t),r=t.ownerDocument||document,i=r.defaultView||window,a=!n||n===r.documentElement||n===r.body,o=!a&&n?ft(`nodeVisibilityFallback.root.getBoundingClientRect`,()=>n.getBoundingClientRect()):null,s=a?0:o.top,c=a?ft(`nodeVisibilityFallback.clientHeight`,()=>i.innerHeight??n?.clientHeight??0):o.bottom,l=ft(`nodeVisibilityFallback.node.getBoundingClientRect`,()=>t.getBoundingClientRect());l.bottom>=s-500&&l.top<=c+500&&ii(e,!0)},1800+t);ni.set(e,n)}(e);let i=null;i=s(()=>r.isVisible.value,t=>{if(t){ri(e),ii(e,!0),i?.(),ti.delete(e),ei.get(e)===r&&ei.delete(e);try{r.destroy()}catch{}}},{immediate:!0}),ti.set(e,i),qt.value&&Qr()}function fo(){Hr=null,mr(()=>{let e=!1;for(let[t,n]of Nr)Nr.delete(t),kr.get(t)===n.el&&Ar.get(t)===n.version&&(e=vr(t,n.height,{allowShrink:n.allowShrink})||e);return e})}function po(){Hr!=null&&(en?.(Hr),Hr=null),Nr.clear()}function mo(e,t){(function(e,t,n){if(!Number.isFinite(n)||n<=0||kr.get(e)!==t)return;let r=Ar.get(e);if(r==null)return;let i=yt.value[e],a=Ye.value&&!0!==qe.value&&!o.nodes?.length&&e>=yt.value.length-2,s=!(!0===i?.loading||a),c=Nr.get(e),l=c?c.allowShrink&&s:s,u=c&&!l?Math.max(c.height,n):n;Nr.set(e,{height:u,allowShrink:l,version:r,el:t}),Hr??(Hr=$t?$t(fo):null,Hr??fo())})(e,t,yr(e,t))}function ho(){for(let[e,t]of kr)t&&mo(e,t)}function go(){bn?.disconnect(),bn=null,vn.clear()}function _o(){for(;Mr.length;)Kr(Mr.pop())}s(Rt,e=>{e&&oo(`content`)},{flush:`post`}),t({getVirtualMetrics:ta,captureVirtualState:function(e={}){var t;return ga(ta(`manual`),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!0===e.allowFallbackAnchor,requireViewport:!0===e.requireViewport,includeEmptyState:(t=e.includeEmptyState)==null||t})},restoreVirtualState:function(e,t={}){let n=!0===t.restoreAnchor,r=t.restoreToken==null?`imperative`:String(t.restoreToken);Aa=e,ja={restoreAnchor:n,restoreToken:r,allowUncapturedAnchor:!0===t.allowUncapturedAnchor},!Pa(e,{restoreAnchor:n,restoreToken:r,allowUncapturedAnchor:!0===t.allowUncapturedAnchor})&&Ia(e)||(Aa=null,ja=null)},forceMeasure:function(e=`manual`){return uY(this,null,function*(){yield n(),yield za(),ho(),Ra(),yield n();let t=ta(e);return ro(t,!0),t})},settle:Va,scrollToNode:function(e,t=`start`){ba(),qn();let r=yt.value.length;if(r<=0)return;let i=ui(e,0,r-1),a=()=>{let e=Kn({nodeIndex:i,offsetWithinNodePx:0}),n=Bn(i),r=na()?.clientHeight??0,a=Wn(),o=e;if(t===`center`)o=e-r/2+n/2;else if(t===`end`)o=e-r+n;else if(t===`nearest`&&a!=null){if(e>=a&&e+n<=a+r)return;o=eJt.value,e=>{if(!e){go();for(let e of jr.values())for(let t of e)Kr(t);jr.clear(),Ar.clear(),_o(),po()}},{immediate:!0}),s(qe,e=>{e&&function(){if(q&&qe.value&&kr.size){_o();for(let e of[80,240,640]){let t=Gr(e,()=>{for(let[e,t]of kr)t&&mo(e,t)},`final`);t!=null&&Mr.push(t)}}}(),oo(e?`final`:`content`)});let vo=S1(()=>oo(`content`),16),yo=S1(()=>oo(`batch`),16);s([()=>yt.value.length,()=>ln.value],()=>{Pn.value&&xa(),vo()},{flush:`post`,immediate:!0}),s([()=>Dr.start,()=>Dr.end],()=>{yo()},{flush:`post`});let{cleanupBatchScheduler:bo}=function(e){let{props:t,isClient:r,isTestEnv:i,parsedNodesIdentity:a,parsedNodeCount:o,desiredRenderedCount:c,datasetKey:l,batchingEnabled:u,incrementalRenderingActive:d,resolvedBatchSize:f,resolvedInitialBatch:p,renderedCount:m,adaptiveBatchSize:h,previousRenderContext:g,previousBatchConfig:_,requestFrame:v,cancelFrame:y,hasIdleCallback:b,cleanupNodeVisibility:x,onDatasetKeyChanged:S,onDatasetChanged:C}=e,w=null,T=`raf`,E=null,D=0,O=!1,k=!1,A=new Set,j=new Set;function M(){if(r){w!=null&&(T===`raf`&&y?y(w):T===`idle`&&typeof window.cancelIdleCallback==`function`?window.cancelIdleCallback(w):T===`timeout`&&window.clearTimeout(w),w=null),D+=1;for(let e of A)y&&y(e);for(let e of j)window.clearTimeout(e);A.clear(),j.clear(),E=null,O=!1,k=!1}}function N(){return typeof performance<`u`?performance.now():Date.now()}function ee(e){(function(e){if(!d.value)return;let n=Math.max(2,t.renderBatchBudgetMs??6),r=Math.max(1,f.value||1),i=Math.max(1,Math.floor(r/4));e>1.5*n?h.value=Math.max(i,Math.floor(.8*h.value)):e<.6*n&&h.value=o)return;let s=Math.max(1,e),l=()=>{let e=N();w=null;let i=E??s;E=null;let a=N();m.value=Math.min(o,m.value+i),x(m.value),function(e,i){if(!r)return void ee(i);O=!0;let a=++D;n().then(()=>{if(a!==D)return;let n=N(),r=Math.max(i,n-e),o=()=>{a===D&&ee(r)};if(v){let e=null,n=null,r=!1,i=()=>{r||(r=!0,e!==null&&(A.delete(e),e=null),n!==null&&(j.delete(n),window.clearTimeout(n),n=null),o())};e=v(()=>{i()}),A.add(e),n=window.setTimeout(()=>{e!==null&&y&&y(e),i()},Math.max(32,t.renderBatchIdleTimeoutMs??120)),j.add(n);return}let s=window.setTimeout(()=>{j.delete(s),o()},0);j.add(s)})}(e,N()-a)};if(!r||a.immediate)return void l();let u=Math.max(0,t.renderBatchDelay??16);if(E=E==null?s:Math.max(E,s),w==null){if(!i&&b&&window.requestIdleCallback){let e=Math.max(0,t.renderBatchIdleTimeoutMs??120);T=`idle`,w=window.requestIdleCallback(()=>l(),{timeout:e});return}if(v&&!i)return T=`raf`,void(w=v(()=>{u===0?l():(T=`timeout`,w=window.setTimeout(()=>l(),u))}));T=`timeout`,w=window.setTimeout(()=>l(),u)}}function F(e,t={}){O?k=!0:e==null?I():P(e,t)}function I(){d.value&&P(u.value?Math.max(1,Math.round(h.value)):Math.max(1,f.value))}return s([a,o,l,d,f,p,()=>t.renderBatchDelay],()=>{let e=o.value,n=g.value,i=l.value,a=!Object.is(i,n.key),s=e!==n.total,u=a||s;g.value={key:i,total:e};let v=_.value,y=t.renderBatchDelay??16,b=v.batchSize!==f.value||v.initial!==p.value||v.delay!==y||v.enabled!==d.value;_.value={batchSize:f.value,initial:p.value,delay:y,enabled:d.value},a&&S(e),(u||b||!d.value)&&M(),(u||b)&&(h.value=Math.max(1,f.value||1)),u&&C();let w=c.value;if(!e)return m.value=0,void x(0);if(!d.value)return m.value=w,void x(m.value);m.value=a||n.total===0||b?Math.min(w,p.value):Math.min(m.value,w);let T=Math.max(1,p.value||f.value||e);m.value{d.value&&(typeof t==`number`&&e<=t||e>m.value&&F())}),{cleanupBatchScheduler:M}}({props:G,isClient:q,isTestEnv:nn,parsedNodesIdentity:Ct,parsedNodeCount:wt,desiredRenderedCount:Ur,datasetKey:Ri,batchingEnabled:sn,incrementalRenderingActive:cn,resolvedBatchSize:an,resolvedInitialBatch:on,renderedCount:ln,adaptiveBatchSize:dn,previousRenderContext:un,previousBatchConfig:fn,requestFrame:$t,cancelFrame:en,hasIdleCallback:tn,cleanupNodeVisibility:ai,onDatasetKeyChanged:e=>{po(),gr(),zn(),eo(),e>0&&or(e)},onDatasetChanged:()=>{qt.value&&Qr({immediate:!0})}});s([Tr,qt,()=>ge.value,()=>je()],([e,t])=>{if(!e)return si(),void Zr();ci(),t?Qr({immediate:!0}):Zr()},{flush:`post`,immediate:!0}),s([()=>yt.value.length,()=>qt.value],e=>uY(null,[e],function*([e,t]){t&&e&&q&&(yield n(),Qr({immediate:!0}))}),{flush:`post`}),s(zt,e=>{e&&function(){if(Tt.value&&Et.value&&Dt.value&&Ot.value?.[1])return;let e=g({type:`paragraph`,children:[{type:`text`,content:`Probe paragraph text`,raw:`Probe paragraph text`}],raw:`Probe paragraph text`}),t=g({type:`list_item`,children:[e],raw:`- Probe paragraph text`}),n=g({type:`list`,ordered:!1,items:[t],raw:`- Probe paragraph text`});Tt.value=e,Et.value=t,Dt.value=n;let r={1:null,2:null,3:null,4:null,5:null,6:null};for(let e=1;e<=6;e++)r[e]=g({type:`heading`,level:e,text:`Probe heading`,children:[{type:`text`,content:`Probe heading`,raw:`Probe heading`}],raw:`${`#`.repeat(e)} Probe heading`});Ot.value=r}()},{immediate:!0}),s([()=>ge.value,zt],()=>{if(!zt.value)return _i(),void(we.value=0);hi(),_i(),zt.value&&ge.value&&typeof ResizeObserver<`u`&&(gi=new ResizeObserver(()=>{hi(),Un.value&&Jn(),Pn.value&&xa(),oo(`resize`)}),gi.observe(ge.value))},{immediate:!0}),s([zt,Ut,Li],()=>uY(null,null,function*(){if(!zt.value)return Te.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void zn();yield n(),function(){if(!zt.value||typeof window>`u`)return Te.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void zn();let e={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},t=pi(fi(_e.value),`.paragraph-node`);e.paragraph=v1(_e.value,t,`pre-wrap`);let n=fi(ve.value)?.querySelector(`.paragraph-node`);e.listItem=v1(ve.value,n,`pre-wrap`);let r=ft(`readSimpleTextProbeProfile.list.offsetHeight`,()=>ye.value?.offsetHeight??0),i=ft(`readSimpleTextProbeProfile.listItem.offsetHeight`,()=>ve.value?.offsetHeight??0);e.listWrapperOverhead=Math.max(0,r-i);for(let t=1;t<=6;t++){let n=pi(fi(be[t]),`h${t}`);e.headings[t]=v1(be[t],n,`pre-wrap`)}Te.value=e,zn()}()}),{flush:`post`,immediate:!0}),s(()=>yt.value.length,()=>{qt.value&&Qr({immediate:!0})}),s([zt,we],()=>{zn(),qt.value&&Qr({immediate:!0}),Un.value&&Jn(),Pn.value&&xa(),oo(`resize`)},{immediate:!1}),s(()=>xr.value,e=>{if(e)for(let[e,t]of _n)uo(e,t);else if(oi(),qt.value)Qr({immediate:!0});else for(let[e,t]of _n)t&&ii(e,!0)},{immediate:!1}),s([ke,Ae,()=>je()],()=>{var e;(e=Qt.refresh)==null||e.call(Qt);for(let[e,t]of _n)uo(e,t)},{immediate:!1}),s([()=>G.viewportPriority,()=>yt.value.length,Ae],([e,t,n])=>{if(!1!==e){if(xe.value&&(t<=200||t<=n)){xe.value=!1;for(let[e,t]of _n)uo(e,t)}}else xe.value=!1}),s(()=>ln.value,()=>{qt.value&&Qr({immediate:!0})}),s([Er,Gt,Kt,()=>yt.value.length,qt],()=>{Or()},{immediate:!0});let xo=null,So=!1,Co=null;function wo(){xo=null,qi=null,Ki=void 0,Ji=null,eo()}function To(){po(),gr(),zn(),Sn.clear();let e=yt.value.length;e>0&&or(e),La()}function Eo(){io(),qr(),Ka=null,Da=null,Oa=null,ka=null,Aa=null,ja=null,So=!1,wo(),Hi(`restore`),qn(),ba()}function Do(e){return[J()??``,ji(),Pi(),Ii.value,Qa(e),yt.value.length,Math.round(Vn(0,yt.value.length)),Math.round(Fi()),$n.count,Math.round($n.total)].join(`:`)}function Oo(){return uY(this,null,function*(){let e=o.virtualScroll?.settledToken,t=Qa(e),r=ji(),i=J(),a=Li.value;if(Lt.value&&o.virtualScroll?.settleMode===`manual`&&Yi(e))if(Zi()){if(Do(e)!==Ji&&!So){So=!0;try{let e=yield Va({reason:`manual`,expectedSettledTokenKey:t}),n=Qa()===t;Ba(r,i,a)&&e.sessionKey===r&&e.threadKey===i&&n&&e.stable&&e.phase===`final`&&(Ji=Do(o.virtualScroll?.settledToken))}finally{So=!1,yield n();let e=o.virtualScroll?.settledToken,t=Yi(e)?Do(e):``;Ba(r,i,a)&&t&&Ji!==t&&Oo()}}}else oo(`manual`)})}s(Lt,(e,t)=>{if(e!==t){if(!e)return Eo(),void io();Eo(),To(),Co=Li.value,oo(`content`)}},{flush:`post`}),s([Lt,Li],([e,t])=>{e?Co==null?Co=t:Co!==t&&(Co=t,function(e=`resize`){po(),gr(),zn(),Sn.clear();let t=yt.value.length;t>0&&or(t),La(),Da=null,Oa=null,ka=null,Ka=null,So=!1,wo(),Na(),n(()=>{ho(),Un.value&&Jn(),Pn.value&&xa(),oo(e)})}(`resize`)):Co=null},{flush:`post`,immediate:!0}),s([Lt,()=>ji(),()=>J()],([e])=>{e&&(Eo(),To(),Hi(`content`),oo(`content`))}),s([Lt,()=>ji(),()=>J(),Li,()=>yt.value.length],([e])=>{e&&function(e=`async-node`){let t=!1;for(let[e,n]of Array.from(zr.entries()))Bi(n)||(zr.delete(e),Rr.delete(e),t=!0);t&&(zi(),oo(e))}(`async-node`)},{flush:`post`}),s([Lt,()=>o.virtualScroll?.sessionKey,()=>o.virtualScroll?.measurementKey,()=>o.indexKey,()=>Ce.value],([e])=>{e&&(eo(),function(e=`content`){if(!Lt.value)return;let t=[],n=yt.value.length,r=di(n);for(let e of Array.from(Sn.keys())){if(e>=n){t.push(e);continue}if(e=n&&Sn.delete(e);t.length&&(function(e,t={}){let n=Array.from(e,Number);pr(n);let r=0;if(mr(()=>(r=cr(n,t),r>0)),r>0)(function(e){for(let t of e)Sn.delete(t)})(n);else for(let e of n)On.delete(e)}(t,{notify:!1}),zn(),wo(),Un.value&&Jn(),Pn.value&&xa(),oo(e))}(`content`))},{flush:`post`,immediate:!0}),s([Lt,()=>yt.value.length,()=>ji(),()=>J()],([e,t,n,r],[i,a,o,s])=>{e&&i&&n===o&&r===s&&t!==a&&wo()},{flush:`post`}),s([Lt,()=>o.virtualScroll?.heightCache,()=>o.virtualScroll?.heightCacheWidth,()=>o.virtualScroll?.restoreState,()=>o.virtualScroll?.measurementKey,()=>yt.value.length,()=>ji(),we],()=>{Na()},{flush:`post`,immediate:!0}),s([Lt,()=>o.virtualScroll?.restoreState,()=>o.virtualScroll?.restoreAnchor,()=>o.virtualScroll?.measurementKey,()=>yt.value.length,()=>ji(),we],e=>uY(null,[e],function*([e,t]){if(!e||!t)return;yield n();let r=function(){let e=o.virtualScroll?.restoreAnchor;return e==null||!1===e?null:!0===e?`true`:String(e)}();Pa(t,{restoreAnchor:r!=null,restoreToken:r??void 0})}),{flush:`post`,immediate:!0}),s([Lt,we,()=>o.virtualScroll?.restoreState,()=>o.virtualScroll?.measurementKey],([e])=>{if(!e)return;let t=o.virtualScroll?.restoreState;t&&Da&&Oa===`restore`&&(wa(t)||(To(),Da=null,Oa=null,oo(`resize`)))},{flush:`post`}),s([Lt,()=>yt.value.length,()=>ji(),we],e=>uY(null,[e],function*([e]){let t=Aa,r=ja;e&&t&&(yield n(),!Pa(t,{restoreAnchor:!0===r?.restoreAnchor,restoreToken:r?.restoreToken??`imperative`,allowUncapturedAnchor:!0===r?.allowUncapturedAnchor})&&Ia(t)||(Aa=null,ja=null))}),{flush:`post`,immediate:!0}),s([Lt,qe,()=>o.virtualScroll?.settleMode,()=>ji(),()=>J(),Li,Vr,Lr,()=>ln.value,Ur,()=>$n.count,()=>$n.total],([e,t,n])=>{if(!e||!0!==t||n===`manual`||!$i())return;let r=function(){let e=yt.value.length;return[J()??``,ji(),Pi(),Ii.value,e,Math.round(Vn(0,e)),Math.round(Fi()),$n.count,Math.round($n.total)].join(`:`)}();xo!==r&&(xo=r,Va({reason:`final`}).then(e=>{e.stable||xo!==r||(xo=null)}))},{flush:`post`,immediate:!0}),s([Lt,qe,()=>o.virtualScroll?.settleMode,()=>o.virtualScroll?.settledToken,()=>ji(),()=>J(),Li,Vr,Lr,()=>ln.value,Ur,()=>yt.value.length,()=>$n.count,()=>$n.total],()=>{Oo()},{flush:`post`,immediate:!0}),s([()=>yt.value.length,qt,Gt,Kt,()=>Dr.start,()=>Dr.end],([e,t,n,r,i,a])=>{Pe.value&&rt(`virtualization`,{nodes:e,virtualization:t,maxLiveNodes:n,buffer:r,focusIndex:Er.value,scroll:t?(()=>{let e=Nn.value||Be();return e?{reverse:Ve(e),scrollTop:Math.round(e.scrollTop),scrollTopAbs:Math.round(Math.abs(e.scrollTop)),scrollHeight:Math.round(e.scrollHeight),clientHeight:Math.round(e.clientHeight)}:null})():null,liveRange:{start:i,end:a},rendered:ln.value})}),s([()=>G.customId],([e],t,n)=>{if(!e||kt)return;let r=function(e,t){return e?(a1.controllers[e]=t,()=>{a1.controllers[e]===t&&delete a1.controllers[e]}):()=>{}}(e,{captureRestoreAnchor:Yn,restoreAnchor:Xn,getAnchorDrift:Zn,getReport:Oi});n(()=>{r()})},{immediate:!0}),ne(()=>{(function(){if(Lt.value)try{ho(),Ra();let e=ta(`manual`);Za(e)&&(K(e),Ka=e,Ga=Xa());let t=ga(e,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});t&&(pe(t),t.anchor&&me(t.anchor),qa=no(t))}catch{}})(),bo(),oi(),tt(),go();for(let e of jr.values())for(let t of e)Kr(t);jr.clear(),Ar.clear(),Sn.clear(),_o(),po(),_i(),qn(),ba(),io(),si(),Zr()});let ko=tZ(`ViewportDeferredMermaidBlockNode`,i({loader:()=>uY(null,null,function*(){try{return(yield he(()=>import(`./index11-BLu1h3am.js`),__vite__mapDeps([35,1,2]))).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".`,e),QX}}),loadingComponent:D0,delay:0}),D0),Ao=tZ(`ViewportDeferredInfographicBlockNode`,i({loader:()=>uY(null,null,function*(){try{return(yield he(()=>import(`./index10-cR1J5t3a.js`),__vite__mapDeps([36,1,2]))).default}catch(e){return console.warn(`[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.`,e),QX}}),loadingComponent:E0,delay:0}),E0),jo=tZ(`ViewportDeferredD2BlockNode`,i(()=>uY(null,null,function*(){try{return(yield he(()=>import(`./index8-CkSxjxQO.js`),__vite__mapDeps([37,1,2]))).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".`,e),QX}})),QX),Mo={text:eZ,paragraph:oQ,heading:qZ,code_block:rZ,list:$Z,list_item:QZ,blockquote:FZ,table:mQ,definition_list:zZ,footnote:WZ,footnote_reference:AY,footnote_anchor:VZ,admonition:U0,vmr_container:yQ,hardbreak:DZ,link:yZ,image:NX,thematic_break:gQ,math_inline:iZ,math_block:aZ,strong:fZ,emphasis:TZ,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,checkbox:TY,checkbox_input:TY,inline_code:KY,html_inline:UY,reference:oZ,html_block:rQ},No=L(()=>ki()),Po=L(()=>b1(G.codeBlockProps)),Fo=L(()=>b1(G.codeBlockProps,{omit:[`langs`]})),Io=L(()=>cY(cY({stream:G.codeBlockStream,darkTheme:G.codeBlockDarkTheme,lightTheme:G.codeBlockLightTheme,monacoOptions:G.codeBlockMonacoOptions,themes:G.themes,langs:A.value===`shiki`?G.langs:void 0,minWidth:G.codeBlockMinWidth,maxWidth:G.codeBlockMaxWidth},typeof Fe.value==`boolean`?{showTooltips:Fe.value}:{}),Fo.value)),Lo=L(()=>cY(lY(cY({},Io.value),{langs:G.langs}),Po.value));function Ro(e){return typeof e==`boolean`?e:void 0}let zo=L(()=>{let e=G.codeBlockProps||{},t={},n=Ro(e.showLineNumbers);n!==void 0&&(t.showLineNumbers=n);let r=Ro(e.diffInline);r!==void 0&&(t.diffInline=r);let i=function(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:void 0}(e.reservedHeightPx);return i!==void 0&&(t.reservedHeightPx=i),t}),Bo=L(()=>cY(cY({stream:G.codeBlockStream,darkTheme:G.codeBlockDarkTheme,lightTheme:G.codeBlockLightTheme,themes:G.themes,langs:G.langs,minWidth:G.codeBlockMinWidth,maxWidth:G.codeBlockMaxWidth},typeof Fe.value==`boolean`?{showTooltips:Fe.value}:{}),Po.value)),Vo=L(()=>cY({},G.mermaidProps||{})),Ho=L(()=>cY({},G.d2Props||{})),Uo=L(()=>cY({},G.infographicProps||{})),Wo=L(()=>({typewriter:D.value,fade:G.fade,customHtmlTags:vt.value.customHtmlTags})),Go=L(()=>cY(cY({},Wo.value),typeof Fe.value==`boolean`?{showTooltip:Fe.value}:{})),Ko=L(()=>cY(cY({},Wo.value),typeof Fe.value==`boolean`?{showTooltips:Fe.value}:{})),qo=L(()=>cY(cY({},Wo.value),typeof Fe.value==`boolean`?{showTooltips:Fe.value}:{})),Jo=L(()=>cY(cY({},Wo.value),typeof Fe.value==`boolean`?{showTooltips:Fe.value}:{}));function Yo(e){return Array.isArray(e.children)&&e.children.length>0}let Xo=L(()=>wi.value.map(e=>{let t=function(e){if(e.type!==`code_block`)return e;let t=e,n=[String(t.language??``),String(t.loading??``),String(t.diff??``),String(t.code??``),String(t.originalCode??``),String(t.updatedCode??``),String(t.raw??``)].join(`\0`),r=xn.get(t);if(r&&r.signature===n)return r.node;let i=cY({},t);return xn.set(t,{signature:n,node:i}),i}(e.node),n=Zo(t),r=ns(t,n);if((t.type===`html_block`||t.type===`html_inline`)&&r===Mo[t.type]){let e=t,n=String(e.tag??``).trim().toLowerCase()||TL(e.content);if(n){let i=gt.value[n];if(_t.value.has(n)&&i)r=i,t=lY(cY({},e),{type:n,tag:n,content:OL(e.content,n)});else if(DL(e.content??e.raw,n)){let n=String(e.content??e.raw??``);t.type===`html_inline`?(r=eZ,t={type:`text`,content:n,raw:n}):(r=oQ,t={type:`paragraph`,children:[{type:`text`,content:n,raw:n}],raw:n})}}}let i=t.type===`code_block`&&A.value===`pre`&&r===QX&&!Qo(gt.value,n),a=cY({},function(e,t,n){let r=t??Zo(e);if(e.type===`code_block`){let t=r?Qo(gt.value,r):void 0;if(n&&A.value===`pre`&&!t&&n===QX)return zo.value;if(n&&r&&n===t)return r===`mermaid`?es(e):r===`infographic`?ts(e):r===`d2`||r===`d2lang`?Ho.value:Lo.value;if(n&&n===gt.value.code_block)return Lo.value;if(yi(n))return Bo.value}return r===`mermaid`?es(e):r===`infographic`?ts(e):r===`d2`||r===`d2lang`?Ho.value:e.type===`link`?Go.value:e.type===`list`?Ko.value:e.type===`blockquote`?qo.value:e.type===`table`?Jo.value:e.type===`code_block`?Io.value:Wo.value}(t,n,r)),o=zt.value?Ci.value[e.index]:null;t.type===`code_block`&&o?.kind===`code-block`&&(a=lY(cY({},a),i?{reservedHeightPx:o.height??o.contentHeight}:{estimatedHeightPx:o.height,estimatedContentHeightPx:o.contentHeight,estimatedDiffInline:o.diffInline})),i||t.type!==`code_block`||n!==`mermaid`||dJ(a.estimatedPreviewHeightPx)!=null||(a=lY(cY({},a),{estimatedPreviewHeightPx:gJ(pJ(String(t.code??``)))})),i||t.type!==`code_block`||n!==`infographic`||dJ(a.estimatedPreviewHeightPx)!=null||(a=lY(cY({},a),{estimatedPreviewHeightPx:_J(mJ(String(t.code??``)))})),t.type===`math_block`&&(a=lY(cY({},a),{cacheScope:ht}));let s=function(e,t){let n=String(e.type);return!_Y(n)&>.value[n]===t}(t,r),c=s?IY(t,Ie.value):void 0;return lY(cY({},e),{node:t,component:r,bindings:a,customBindings:cY(cY({},c??{}),a),rendersCustomNode:s,hasSlotChildren:Yo(t),slotContent:String(t.content??``),isCodeBlock:t.type===`code_block`,indexKey:`${No.value}-${e.index}`,vnodeKey:`${Mi.value}\0${e.index}\0${t.type}`})}));function Zo(e){return e?.type===`code_block`?String(e.language??``).trim().toLowerCase():``}function Qo(e,t){let n=t.trim().toLowerCase();if(n)for(let t of[n,Aq(n),$K(n)]){let n=t&&e[t];if(n)return n}}function $o(e,t,n,r){let i=cY({},e.value);return dJ(i.estimatedPreviewHeightPx)??(i.estimatedPreviewHeightPx=r(n(String(t?.code??``)),void 0,i.maxHeight===`none`?null:dJ(i.maxHeight)??void 0)),i}function es(e){return $o(Vo,e,pJ,gJ)}function ts(e){return $o(Uo,e,mJ,_J)}function ns(e,t){if(!e)return vQ;let n=gt.value,r=n[String(e.type)];if(e.type===`code_block`){let i=t??Zo(e);return(i?Qo(n,i):void 0)||(A.value===`pre`?n.code_block||QX:i===`mermaid`?n.mermaid||ko:i===`infographic`?n.infographic||Ao:i===`d2`||i===`d2lang`?n.d2||jo:r||n.code_block||bi.value)}return r||Mo[String(e.type)]||vQ}function rs(e){l(`click`,e)}function is(e){var t;(t=e.target)!=null&&t.closest(`[data-node-index]`)&&l(`mouseover`,e)}function as(e){var t;(t=e.target)!=null&&t.closest(`[data-node-index]`)&&l(`mouseout`,e)}function os(e){l(`mouseover`,e)}function ss(e){l(`mouseout`,e)}let cs=R(null),ls=R(!1),us=R(null),ds=L(()=>!(G.domMode!==`minimal`||Ne.value||!1!==G.fade||D.value||ls.value||pn.value||qt.value||Ft.value||Mt.value||Zt.value||Object.keys(gt.value).length!==0)),fs,ps=null,ms=0,hs=0,gs=0,_s=[`code_block`,`admonition`,`table`,`math_block`,`html_block`,`image`,`thematic_break`],vs=new Set(_s),ys=[`.typewriter-cursor`,`.height-estimation-probes`,..._s.map(e=>`[data-node-type="${e}"]`),`script`,`style`].join(`,`);function bs(e){if(!e||typeof e!=`object`)return!1;let t=e.type;return typeof t==`string`&&vs.has(t)}function xs(e){if(!e||typeof e!=`object`)return 0;let t=e,n=t.raw??t.content??t.code;if(typeof n==`string`)return n.length;let r=t.children;if(Array.isArray(r))return r.reduce((e,t)=>e+xs(t),0);let i=t.items;return Array.isArray(i)?i.reduce((e,t)=>e+xs(t),0):0}function Ss(){fs&&=(clearTimeout(fs),void 0)}function Cs(){ms+=1,ps!=null&&(en?.(ps),ps=null)}function ws(){Cs(),Os(),cs.value&&(cs.value.style.visibility=`hidden`)}function Ts(e){if(e.nodeType!==Node.TEXT_NODE||!(e.textContent??``).trim())return!1;let t=e.parentElement;return!!t&&!t.closest(ys)}function Es(e){let t=e.lastChild;for(;t;){if(Ts(t))return t;if(t.nodeType===Node.ELEMENT_NODE){let e=t;if(!e.matches(ys)&&e.lastChild){t=e.lastChild;continue}}for(;t&&t!==e&&!t.previousSibling;)t=t.parentNode;if(!t||t===e)break;t=t.previousSibling}return null}function Ds(){let e=Xo.value;for(let t=e.length-1;t>=0;t--){let n=e[t];if(!n||bs(n.node)||!co(n.index))continue;let r=_n.get(n.index);if(!r)continue;let i=Es(r);if(i)return i}return null}function Os(){us.value&&=(us.value.classList.remove(M0),null)}function ks(){if(T.value!==`simple`||!q||!ls.value||!ge.value)return void Os();let e=Ds(),t=e?function(e){let t=e.parentElement?.closest(`.text-node`);return t instanceof HTMLElement?t:e.parentElement}(e):null;t!==us.value&&(Os(),t&&(t.classList.add(M0),us.value=t))}function As(){if(T.value!==`precise`||!q||!ls.value||ps!=null)return;let e=ms,t=()=>{ps=null,e===ms&&function(){if(T.value!==`precise`||!(q&&ls.value&&ge.value&&cs.value))return;let e=ge.value,t=cs.value;t.style.visibility=`hidden`;let n=Ds();if(!n)return;let r=0,i=0,a=20,o=!1;if(n?.textContent){let t=n.textContent.length,s=document.createRange();s.setStart(n,Math.max(0,t-1)),s.setEnd(n,t);let c=typeof s.getClientRects==`function`?s.getClientRects():void 0,l=c?.[c.length-1]??n.parentElement?.getBoundingClientRect();if(l){let t=ft(`typewriterCursor.root.getBoundingClientRect`,()=>e.getBoundingClientRect());r=l.right-t.left+e.scrollLeft,i=l.top-t.top+e.scrollTop,a=l.height||a,o=!0}s.detach()}o&&(t.style.transform=`translate(${Math.max(0,r)}px, ${Math.max(0,i)}px)`,t.style.height=`${a}px`,t.style.visibility=`visible`)}()};$t?ps=$t(t):t()}return s([Ge,()=>o.content,()=>o.nodes,()=>G.typewriter,qe],()=>uY(null,null,function*(){if(!q||Ne.value||!Re.value)return;if(qe.value)return ls.value=!1,Ss(),void ws();if(o.nodes?.length)return ls.value=!1,Ss(),ws(),hs=(o.content??``).length,void(gs=Ge.value.length);let e=function(){return o.nodes?.length?o.nodes.reduce((e,t)=>e+xs(t),0):(o.content??``).length}(),t=function(){return o.nodes?.length?o.nodes.reduce((e,t)=>e+xs(t),0):Ge.value.length}(),r=!bs(yt.value[yt.value.length-1]),i=e>hs,a=t>gs;if(!D.value||!r||!i&&!a)return D.value&&r||(ls.value=!1,ws()),hs=e,void(gs=t);hs=e,gs=t,ls.value=!0,T.value===`precise`&&cs.value&&(cs.value.style.visibility=`hidden`),Ss(),yield n(),T.value===`simple`?ks():(Os(),As()),fs=setTimeout(()=>{fs=void 0,ls.value=!1},3e3)}),{flush:`post`,immediate:!0}),s(ls,e=>uY(null,null,function*(){e?(yield n(),T.value===`simple`?ks():(Os(),T.value===`precise`&&As())):ws()}),{flush:`post`}),s(T,()=>uY(null,null,function*(){if(q&&!Ne.value&&Re.value&&ls.value){if(yield n(),T.value===`simple`)return Cs(),void ks();Os(),T.value===`precise`?As():ws()}}),{flush:`post`}),s([()=>ln.value,()=>Dr.start,()=>Dr.end],()=>uY(null,null,function*(){q&&!Ne.value&&Re.value&&ls.value&&(yield n(),T.value===`simple`?ks():(Os(),T.value===`precise`&&As()))}),{flush:`post`}),ne(()=>{Ss(),Cs(),Os(),mt.clear()}),(e,t)=>{let n=r(`NodeRenderer`,!0);return z(Ne)?(c(!0),W(M,{key:0},_(Xo.value,e=>(c(),W(M,{key:e.vnodeKey},[e.rendersCustomNode?(c(),P(x(e.component),re({key:0,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":G.customId,"is-dark":G.isDark,onClick:rs,onMouseover:os,onMouseout:ss,onCopy:t[0]||=e=>f(e),onHandleArtifactClick:t[1]||=e=>l(`handleArtifactClick`,e)}),{default:B(()=>[e.hasSlotChildren?(c(),P(n,re({key:0,ref_for:!0},St.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(c(),P(n,re({key:1,ref_for:!0},St.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):E(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(c(),P(x(e.component),re({key:1,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":G.customId,"is-dark":G.isDark,onClick:rs,onMouseover:os,onMouseout:ss,onCopy:t[2]||=e=>f(e),onHandleArtifactClick:t[3]||=e=>l(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`]))],64))),128)):(c(),W(`div`,{key:1,ref_key:`containerRef`,ref:ge,class:V([`markstream-vue markdown-renderer`,[{dark:G.isDark},{virtualized:qt.value},{"virtual-scroll-coordinated":Rt.value},{"stable-layout":Cr.value},{"typewriter-simple-cursor":ls.value&&T.value===`simple`}]]),"data-custom-id":G.customId,onClick:rs,onMouseover:is,onMouseout:as},[Bt.value||qt.value?(c(),W(M,{key:0},[Bt.value?(c(),P(T0,{key:0,width:Ut.value,"flow-root":qt.value||Rt.value,"paragraph-node":Tt.value,"list-item-node":Et.value,"list-node":Dt.value,"heading-nodes":Ot.value,"set-paragraph-wrapper":Jr,"set-list-item-wrapper":Yr,"set-list-wrapper":Xr,"set-heading-wrapper":mi},null,8,[`width`,`flow-root`,`paragraph-node`,`list-item-node`,`list-node`,`heading-nodes`])):E(``,!0),qt.value?(c(),W(`div`,{key:1,class:`node-spacer`,style:ae({height:`${Ti.value}px`}),"aria-hidden":`true`},null,4)):E(``,!0)],64)):E(``,!0),ds.value?(c(!0),W(M,{key:1},_(Xo.value,e=>(c(),W(M,{key:e.vnodeKey},[co(e.index)?(c(),P(x(e.component),re({key:0,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":G.customId,"is-dark":G.isDark,onMouseover:t[4]||=e=>l(`mouseover`,e),onMouseout:t[5]||=e=>l(`mouseout`,e),onCopy:t[6]||=e=>f(e),onHandleArtifactClick:t[7]||=e=>l(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):E(``,!0)],64))),128)):(c(!0),W(M,{key:2},_(Xo.value,e=>(c(),W(`div`,{key:e.vnodeKey,ref_for:!0,ref:t=>uo(e.index,t),class:`node-slot`,"data-node-index":e.index,"data-node-type":e.node.type},[co(e.index)?(c(),W(`div`,{key:0,ref_for:!0,ref:t=>function(e,t){t||function(e){let t=`${ki()}-${e}`,n=!1;for(let r of Array.from(Rr.keys()))(zr.get(r)?.index===e||r===t||r.startsWith(`${t}-`))&&(Rr.delete(r),zr.delete(r),n=!0);n&&(zi(),oo(`async-node`))}(e),Nr.delete(e),function(e){let t=(Ar.get(e)??0)+1;Ar.set(e,t)}(e);let n=jr.get(e);if(n){for(let e of n)Kr(e);jr.delete(e)}if(function(e){let t=vn.get(e);t&&(bn?.unobserve(t),yn.delete(t),vn.delete(e))}(e),!t||!Jt.value)return kr.delete(e),void Ar.delete(e);kr.set(e,t);let r=()=>{mo(e,t)};queueMicrotask(r);let i=(bn||typeof ResizeObserver>`u`||(bn=new ResizeObserver(e=>{if(e.length)for(let t of e){let e=yn.get(t.target),n=vn.get(e??-1);e!=null&&n&&mo(e,n)}else ho()})),bn);if(i&&(vn.set(e,t),yn.set(t,e),i.observe(t)),typeof window<`u`){let t=yt.value[e]?.type===`code_block`?[16,80,240,800]:qe.value?[80]:[];if(t.length){let n=t.map(e=>Gr(e,r,`node-resize`)).filter(e=>e!=null);n.length&&jr.set(e,n)}}}(e.index,t),class:`node-content`},[e.isCodeBlock?e.rendersCustomNode?(c(),P(x(e.component),re({key:1,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":G.customId,"is-dark":G.isDark,onCopy:t[12]||=e=>f(e),onHandleArtifactClick:t[13]||=e=>l(`handleArtifactClick`,e)}),{default:B(()=>[e.hasSlotChildren?(c(),P(n,re({key:0,ref_for:!0},St.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(c(),P(n,re({key:1,ref_for:!0},St.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):E(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(c(),P(x(e.component),re({key:2,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":G.customId,"is-dark":G.isDark,onCopy:t[14]||=e=>f(e),onHandleArtifactClick:t[15]||=e=>l(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(c(),P(oe,{key:0,name:`fade`,css:!1!==G.fade,appear:!1!==G.fade},{default:B(()=>[e.rendersCustomNode?(c(),P(x(e.component),re({key:0,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":G.customId,"is-dark":G.isDark,onCopy:t[8]||=e=>f(e),onHandleArtifactClick:t[9]||=e=>l(`handleArtifactClick`,e)}),{default:B(()=>[e.hasSlotChildren?(c(),P(n,re({key:0,ref_for:!0},St.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(c(),P(n,re({key:1,ref_for:!0},St.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):E(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(c(),P(x(e.component),re({key:1,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":G.customId,"is-dark":G.isDark,onCopy:t[10]||=e=>f(e),onHandleArtifactClick:t[11]||=e=>l(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`]))]),_:2},1032,[`css`,`appear`]))],512)):(c(),W(`div`,{key:1,class:`node-placeholder`,style:ae({height:`${Bn(e.index)}px`})},null,4))],8,j0))),128)),ls.value&&T.value===`precise`?(c(),W(`span`,{key:3,ref_key:`typewriterCursorRef`,ref:cs,class:`typewriter-cursor`,"aria-hidden":`true`},null,512)):E(``,!0),qt.value?(c(),W(`div`,{key:4,class:`node-spacer`,style:ae({height:`${Ei.value}px`}),"aria-hidden":`true`},null,4)):E(``,!0)],42,A0))}}})),[[`__scopeId`,`data-v-a9489508`]]),P0=N0;P0.install=e=>{let t=new Set([`MarkdownRender`,`NodeRenderer`,P0.__name,P0.name].filter(e=>!!e));for(let n of t)e.component(n,N0)};var F0=Object.freeze(Object.defineProperty({__proto__:null,default:P0},Symbol.toStringTag,{value:`Module`})),I0={key:0,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},L0={key:1,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},R0={key:2,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},z0={key:3,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},B0={class:`admonition-title`},V0=[`aria-expanded`,`aria-controls`],H0=[`id`],U0=wY(G({__name:`AdmonitionNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e,{emit:t}){var n;let r=e,i=t,a=L(()=>{if(r.node.title&&r.node.title.trim().length)return r.node.title;let e=r.node.kind||`note`;return e.charAt(0).toUpperCase()+e.slice(1)}),o=R(!!r.node.collapsible&&!((n=r.node.open)==null||n));function s(){r.node.collapsible&&(o.value=!o.value)}let u=`admonition-${Math.random().toString(36).slice(2,9)}`;return(t,n)=>(c(),W(`div`,{class:V([`admonition`,[`admonition-${r.node.kind}`]])},[F(`div`,{id:u,class:`admonition-legend`},[r.node.kind===`note`||r.node.kind===`info`?(c(),W(`svg`,I0,[...n[1]||=[F(`circle`,{cx:`12`,cy:`12`,r:`10`},null,-1),F(`path`,{d:`M12 16v-4`},null,-1),F(`path`,{d:`M12 8h.01`},null,-1)]])):r.node.kind===`tip`?(c(),W(`svg`,L0,[...n[2]||=[F(`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`},null,-1),F(`path`,{d:`M9 18h6`},null,-1),F(`path`,{d:`M10 22h4`},null,-1)]])):r.node.kind===`warning`||r.node.kind===`caution`?(c(),W(`svg`,R0,[...n[3]||=[F(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`},null,-1),F(`path`,{d:`M12 9v4`},null,-1),F(`path`,{d:`M12 17h.01`},null,-1)]])):r.node.kind===`danger`||r.node.kind===`error`?(c(),W(`svg`,z0,[...n[4]||=[F(`polygon`,{points:`7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2`},null,-1),F(`path`,{d:`M12 8v4`},null,-1),F(`path`,{d:`M12 16h.01`},null,-1)]])):E(``,!0),F(`span`,B0,U(a.value),1),r.node.collapsible?(c(),W(`button`,{key:4,class:`admonition-toggle`,"aria-expanded":!o.value,"aria-controls":`${u}-content`,onClick:s},[(c(),W(`svg`,{style:ae({rotate:o.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[...n[5]||=[F(`path`,{d:`m9 18 6-6-6-6`},null,-1)]],4))],8,V0)):E(``,!0)]),l(F(`div`,{id:`${u}-content`,class:`admonition-content`,"aria-labelledby":u},[v(z(P0),{"index-key":`admonition-${e.indexKey}`,nodes:r.node.children,"custom-id":r.customId,typewriter:r.typewriter,fade:r.fade,onCopy:n[0]||=e=>i(`copy`,e)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])],8,H0),[[A,!o.value]])],2))}}),[[`__scopeId`,`data-v-a83480e1`]]);U0.install=e=>{e.component(U0.__name,U0)};var W0=()=>he(()=>import(`./d2_markstream-vue-xMoF3M5G.js`),[]),G0=null,K0=W0,q0=null,J0=!1,Y0=!1,X0=0;function Z0(){return uY(this,null,function*(){if(G0)return G0;let e=K0,t=X0;return e?e===W0&&J0?null:q0||(q0=uY(null,null,function*(){let n;try{n=yield e()}catch(n){if(e===W0)return t===X0&&e===K0&&(J0=!0,function(e){Y0||(Y0=!0,console.warn(`[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.`,e))}(n)),null;throw n}finally{t===X0&&e===K0&&(q0=null)}return t!==X0||e!==K0?null:n?(G0=function(e){if(!e)return e;if(e.D2&&typeof e.D2==`function`)return e.D2;if(e.default&&e.default.D2&&typeof e.default.D2==`function`)return e.default.D2;let t=e.default??e;return typeof t==`function`?t:t?.D2&&typeof t.D2==`function`?t.D2:t}(n),G0):null}),q0):null})}var Q0=null,$0=null,e2=null,t2=0;function n2(){return typeof $0==`function`}function r2(){return uY(this,null,function*(){if(Q0)return Q0;let e=$0,t=t2;return e?e2||(e2=uY(null,null,function*(){let n=yield e();if(t!==t2||e!==$0)return null;let r=function(e){if(!e)return null;let t=e.default??e,n=typeof t==`function`&&typeof t.prototype?.render==`function`?t:e.Infographic??t?.Infographic;return typeof n==`function`?n:null}(n);return t!==t2||e!==$0?null:r?(Q0=r,Q0):null}).finally(()=>{t===t2&&e===$0&&(e2=null)}),e2):null})}function i2(e){let t=Number.parseFloat(String(e??``));return Number.isFinite(t)?t:0}function a2(e,t){e?.(t)}function o2(e,t){return e?(a2(t,`readElementBoxHeight.offsetHeight`),Math.ceil(Math.max(0,e.offsetHeight||0))):0}function s2(e,t){let n=o2(e,t);if(!e||typeof window>`u`||typeof window.getComputedStyle!=`function`)return n;a2(t,`readElementOuterHeight.getComputedStyle`);let r=window.getComputedStyle(e),i=i2(r.marginTop),a=i2(r.marginBottom);return Math.ceil(Math.max(0,n+i+a))}function c2(e,t,n){if(!e)return 0;let r=function(e){return e?e.matches?.call(e,`.markstream-vue.markdown-renderer`)?e:e.querySelector(`.markstream-vue.markdown-renderer`):null}(e);if(!r)return 0;let i=Number.isFinite(n)?Number(n):s2(e,t),a=o2(r,t);return Math.max(0,i-a)}function l2(e,t,n){let r=n.getKey?.call(n,e,t)??e.id??t;return String(r)}function u2(e,t,n){return n.getKind?.call(n,e,t)??String(e.kind??``)}function d2(e,t,n){let r=n.getContent?.call(n,e,t)??e.content;return typeof r==`string`?r:``}function f2(e,t,n){let r=n.getFinal?.call(n,e,t);if(typeof r==`boolean`)return r;let i=e.final;return typeof i!=`boolean`||i}function p2(e,t,n){return n.getRevision?.call(n,e,t)??e.revision}function m2(e,t,n){let r=u2(e,t,n);return r===`assistant-markdown`||r===`markdown`||!r&&d2(e,t,n).length>0}function h2(e,t,n){let r=n.estimateItemHeight?.call(n,e,t);if(Number.isFinite(r)&&r>0)return r;let i=u2(e,t,n);return i===`assistant-markdown`||i===`markdown`?360:i===`system-divider`?44:i===`tool-call`?72:i===`thinking`?92:i===`error`?76:i===`user-message`?88:d2(e,t,n).length>0?360:96}var g2=Symbol(`markstreamLanguageIconResolver`);function _2(e){return i(e)}_2(()=>he(()=>import(`./index3-mVb7iXlv.js`),__vite__mapDeps([38,31,7,1,2]))),_2(()=>he(()=>import(`./index6-KRBW8xCP.js`),__vite__mapDeps([33,1,2]))),_2(()=>he(()=>import(`./index7-ClZ3JBPh.js`),__vite__mapDeps([32,1,2]))),_2(()=>he(()=>import(`./index11-BLu1h3am.js`),__vite__mapDeps([35,1,2]))),_2(()=>he(()=>import(`./index10-cR1J5t3a.js`),__vite__mapDeps([36,1,2]))),_2(()=>he(()=>import(`./index8-CkSxjxQO.js`),__vite__mapDeps([37,1,2]))),_2(()=>he(()=>import(`./index4-BTqbYikG.js`),__vite__mapDeps([39,30,7,1,2]))),_2(()=>he(()=>import(`./index5-DTEBXfOq.js`),__vite__mapDeps([34,1,2,31,7]))),_2(()=>he(()=>import(`./index9-C3TPz6s3.js`),__vite__mapDeps([40,1,2])));var v2=`cjs.css.csv.gif.htm.html.jpeg.jpg.js.json.jsx.log.md.mjs.pdf.png.scss.svg.ts.tsx.txt.vue.webp.xml.yaml.yml`.split(`.`),y2=new Set([`AGENTS.md`,`CHANGELOG.md`,`Dockerfile`,`LICENSE`,`Makefile`,`README.md`,`package.json`,`pnpm-lock.yaml`,`pnpm-workspace.yaml`,`tsconfig.json`,`vite.config.ts`]),b2=[...v2].toSorted((e,t)=>t.length-e.length).join(`|`),x2=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${b2}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${b2})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?])`].join(``),`gi`),S2=/[),.;!?]+$/;function C2(e){let t=e.toLowerCase();return v2.some(e=>t.endsWith(`.${e}`))}function w2(e){let t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${b2}))["']`,`gi`),r;for(;(r=n.exec(e))!==null;){let e=r[1];if(!e)continue;let n=e.split(`/`).pop();n&&t.set(n,e)}return t}function T2(e,t={}){let n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;let r=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!r)return null;let i=(r[1]??``).replace(S2,``);if(!i)return null;let a=i.split(`/`).pop()??i,o=i.includes(`/`),s=y2.has(a),c=C2(a);if(o&&!s&&!c)return null;if(!o&&!s){let e=t.aliases?.get(a);if(!e)return null;i=e}let l=r[2]??r[3],u=l?Number(l):void 0;return{path:i,line:u!==void 0&&Number.isFinite(u)&&u>0?u:void 0}}function E2(e,t={}){let n=[];x2.lastIndex=0;let r;for(;(r=x2.exec(e))!==null;){let e=r[0]??``,i=r[1]??``,a=e.indexOf(i);if(a<0)continue;let o=i+(r[2]??r[3]?e.slice(a+i.length):``),s=o.replace(S2,``),c=o.length-s.length;o=s;let l=T2(o,t);if(!l)continue;let u=r.index+a,d=u+o.length;n.push({...l,start:u,end:d,text:o}),c>0&&(x2.lastIndex-=c)}return n}var D2=12e4,O2=6e4,k2=32,A2=3e4,j2=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function M2(e){let t=0,n=0,r=0;j2.lastIndex=0;let i;for(;(i=j2.exec(e))!==null;){let e=i[3]??``;t+=1,n+=e.length,r=Math.max(r,e.length)}return{codeRenderer:e.length>=D2||n>=O2||t>=k2||r>=A2?`pre`:`shiki`,codeFenceCount:t,codeChars:n}}function N2(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n%2==1}var P2=/\s/,F2=/\p{Nd}/u;function I2(e,t){let n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function L2(e,t){if(t<=0)return;let n=e.codePointAt(t-1),r=n!==void 0&&n>=55296&&n<=56319&&t>1?t-2:t-1,i=e.codePointAt(r);return i===void 0?void 0:String.fromCodePoint(i)}function R2(e){return e!==void 0&&P2.test(e)}function z2(e){return e!==void 0&&F2.test(e)}function B2(e){return e!==void 0&&e>=`A`&&e<=`Z`}var V2=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function H2(e,t){if(!B2(e[t-1]))return!1;let n=t-1;for(;n>0&&B2(e[n-1]);)n--;return V2.test(e.slice(n,t))||z2(I2(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??``)&&!/\p{L}/u.test(I2(e,t+1)??``)}function U2(e,t){if(!B2(e[t-1]))return!1;let n=t-1;for(;n>0&&B2(e[n-1]);)n--;return V2.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??``)}function W2(e,t){let n=e[t+1];return z2(I2(e,t+1))?!0:(n===`-`||n===`+`||n===`.`||n===`−`)&&z2(I2(e,t+2))}var G2=/^[-–—,;:~([/]$/;function K2(e,t){let n=e[t+1];if(n!==`-`&&n!==`+`&&n!==`.`||!z2(I2(e,t+2)))return!1;let r=e[t-1];return r!==void 0&&G2.test(r)}var q2=String.raw`[,;:~\-–—/\s()=*×]|and|or`;function J2(e){let t=e.replace(new RegExp(String.raw`^(?:${q2})+`,`u`),``);for(;;){let e=t.replace(new RegExp(String.raw`^\p{L}+(?:${q2})+`,`u`),``).replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,``);if(e===t)break;t=e}if(!/\p{Nd}/u.test(t))return!1;let n=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${n}(?:\p{L}+)?(?:(?:${q2})+${n}(?:\p{L}+)?)*$`,`u`).test(t)}var Y2=1,X2=2,Z2=3,Q2=-1;function $2(e){let t=e.length,n=new Uint8Array(t),r=new Int32Array(t+1).fill(Q2),i=new Int32Array(t+1),a=new Int32Array(t+1),o=[],s=[];{let n=[];for(let r=0;r=2&&n.some(e=>e.trim())}(t))}(o.value,t)?C():function(){if(_+=1,m)return;let t=Math.max(0,function(e){let t=e.parseCoalesceMs;return typeof t==`number`&&Number.isFinite(t)&&t>=0?t:80}(e)-(U1()-v));t<=0?C():m=setTimeout(C,t)}())},{flush:`sync`,immediate:!0}),t(S);let w=L(()=>{var t;return CL(e.customHtmlTags,e.parseOptions?.customHtmlTags,(t=n.customComponentsMap?.value??{},Object.entries(t).map(([e,t])=>{let n=xL(e);return t==null||!n||_Y(n)||GI.has(n)||JI.has(n)?``:n}).filter(Boolean)))}),T=L(()=>{let{key:e,tags:t}=wL(w.value);if(!e)return r;let a=i.get(e);if(a)return a;let o=JK(n.instanceMsgId,{customHtmlTags:t});return i.set(e,o),o}),E=L(()=>{let t=T.value;if(!e.customMarkdownIt)return t;let n=e.customMarkdownIt(t);return t.__markstreamHasCustomParserExtensions=!0,n.__markstreamHasCustomParserExtensions=!0,n}),D=L(()=>{var t;let r=e.parseOptions??{},i=n.effectiveFinal.value,a=w.value,o=i!=null,s=a.length>0;return o||s||r.streamParse==null?cY(cY(lY(cY({},r),{streamParse:(t=r.streamParse)==null||t}),o?{final:i}:{}),s?{customHtmlTags:a}:{}):r}),O=L(()=>new Set((D.value.customHtmlTags??[]).map(e=>String(e).trim().toLowerCase()).filter(Boolean))),k=L(()=>K1(D.value,E.value,e.customMarkdownIt,{includeFinal:!0})),A=L(()=>K1(D.value,E.value,e.customMarkdownIt,{includeFinal:!1}));return s([k,A],([e,t],[n,r])=>{n&&(e===n&&t===r||(C(),t!==r&&(c=[],d=``)))},{flush:`sync`}),{effectiveCustomHtmlTags:w,effectiveCustomHtmlTagsSet:O,mdBase:T,mdInstance:E,mergedParseOptions:D,getParsedNodesDirtyStartIndex:()=>y,getParsedNodesRevision:()=>b,parsedNodes:L(()=>{if(e.nodes?.length)return c=[],d=``,x(0),g(e.nodes.slice());let t=o.value;if(!t)return c=[],d=``,x(-1),[];let r=n.debugPerformanceEnabled.value,i=r?U1():0,a=E.value,s=k.value,m=A.value;l&&s!==l&&function(e){var t,n;(n=(t=e.stream)?.reset)==null||n.call(t)}(a),u&&m!==u&&(c=[],d=``);let v=Object.keys(n.customComponentsMap?.value??{}).length>0||typeof D.value.postTransformNodes==`function`;v!==f&&(c=[],d=``);let b=!v&&c.length>0&&t.startsWith(d)&&m===u,S=r?W1(a):null,C=r?{}:void 0,w=u0(a),T=!w&&!v,O=UG(t,a,cY(cY(lY(cY({},D.value),{__reuseStableTopLevelNodes:T}),w?{__disableStreamParse:!0}:{}),C?{__timing:C}:{})),j=r?U1():0,M=r?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0,N,ee=r?c0(O.length):void 0,P=0,F=0,I=0;if(b){let n=r?U1():0,[i,o]=function(e){let[t,n]=e.scanGlobalReferenceAppend(e.previousContent,e.content),r=e.parseOptions;return[e.previousDirtyStartIndex>0&&!0!==r.final&&!e.customMarkdownIt&&!u0(e.md)&&!t&&typeof r.preTransformTokens!=`function`&&typeof r.postTransformTokens!=`function`&&typeof r.postTransformNodes!=`function`&&(r.customHtmlTags?.length??0)===0?e.previousDirtyStartIndex:0,n]}({content:t,previousContent:d,previousDirtyStartIndex:y,parseOptions:D.value,customMarkdownIt:e.customMarkdownIt,md:a,scanGlobalReferenceAppend:p});I=o;let s=i<=0;if(M){let e=function(e,t,n,r={}){if(!t.length)return{nodes:e,metrics:c0(e.length)};let i=r.scanStartIndex??0,a=!1!==r.reuseDirtyTail,o=function(e,t,n,r=0){let i=Math.min(e.length,t.length);for(let a=Math.min(i,Math.max(0,r));ar0(e[r]))}(N,M,F):function(e,t=0){for(let n=Math.max(0,t);n(S?.total??0);n.logPerf(r?`parse(stream)`:`parse(sync)`,cY(cY(cY({rendererId:n.instanceMsgId,ms:Math.round(U1()-i),nodes:N.length,contentLength:t.length,parseCommitCount:h,parseCoalescedCount:_,nodeReuseMs:te,referenceDefinitionScanChars:I,signatureMs:M?.signatureMs??0,stabilizeSignatureMs:M?.stabilizeSignatureMs??0,primeSignatureMs:M?.primeSignatureMs??0,signatureCallCount:M?.signatureCallCount??0,stabilizeSignatureCallCount:M?.stabilizeSignatureCallCount??0,primeSignatureCallCount:M?.primeSignatureCallCount??0,stabilizeMs:P},ee??{}),C?Object.fromEntries(L1.map(e=>[e,C[e]??0])):{}),e?{streamMode:e.lastMode,streamDelta:h0(e,S),streamStats:e}:{}))}return g(N)})}}function _0(e){let{isClient:t}=e,n=R(new Set),r=new Map,i=new Map,a=new Map;function o(e){if(!t)return;let n=a.get(e);n!=null&&(window.clearTimeout(n),a.delete(e))}function s(){if(t)for(let e of a.values())window.clearTimeout(e);a.clear()}function c(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:r,nodeVisibilityWatchStops:i,nodeVisibilityFallbackTimers:a,clearVisibilityFallback:o,clearAllVisibilityFallbacks:s,markNodeVisible:function(t,r=!0){var i;r&&o(t),function(t,r){if((a=(i=e.shouldTrackVisibleNodeIndices)?.call(e))!=null&&!a)return;var i,a;let o=n.value,s=o.has(t);if(r){if(s)return;let e=new Set(o);e.add(t),n.value=e;return}if(!s)return;let c=new Set(o);c.delete(t),n.value=c}(t,r),r&&((i=e.onNodeMarkedVisible)==null||i.call(e,t))},resetNodeVisibleState:c,cleanupNodeVisibility:function(t){var s;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(let[e,n]of i.entries())e{let e=a.getSnapshot();n.value=e.source,r.value=e.visible,i.value=e.done},s=a.subscribe(o);o();let c=L(()=>Math.max(0,n.value.length-r.value.length)),l=L(()=>c.value===0),u=L(()=>i.value&&l.value);return C()&&t(()=>{s(),a.destroy()}),{source:n,visible:r,done:i,final:u,caughtUp:l,pendingChars:c,enqueue:e=>a.enqueue(e),finish:e=>a.finish(e),flush:()=>a.flush(),reset:e=>a.reset(e),pause:()=>a.pause(),resume:()=>a.resume()}}var y0={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},b0=/auto|scroll|overlay/i;function x0(e){if(!e)return!1;let t=(e.overflowY||``).toLowerCase(),n=(e.overflow||``).toLowerCase();return b0.test(t)||b0.test(n)}function S0(e){let t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}var C0={class:`m-0 p-0`},w0=[`data-probe`],T0=wY(G(lY(cY({},{name:`HeightEstimationProbes`}),{__name:`HeightEstimationProbes`,props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){let t=e;function n(e){return t.headingNodes?.[e]??null}return(t,r)=>(c(),W(`div`,{class:`height-estimation-probes`,style:ae({width:`${e.width}px`}),"aria-hidden":`true`},[F(`div`,{ref:t=>e.setParagraphWrapper(t),class:V([`node-content`,{"node-content-flow-root":e.flowRoot}]),"data-probe":`paragraph`},[v(z(oQ),{node:e.paragraphNode,"index-key":`probe-paragraph`},null,8,[`node`])],2),F(`div`,{ref:t=>e.setListItemWrapper(t),class:V([`node-content`,{"node-content-flow-root":e.flowRoot}]),"data-probe":`list-item`},[F(`ul`,C0,[v(z(QZ),{node:e.listItemNode,"index-key":`probe-list-item`},null,8,[`node`])])],2),F(`div`,{ref:t=>e.setListWrapper(t),class:V([`node-content`,{"node-content-flow-root":e.flowRoot}]),"data-probe":`list`},[v(z($Z),{node:e.listNode,"index-key":`probe-list`},null,8,[`node`])],2),(c(),W(M,null,_(6,t=>F(`div`,{key:`probe-heading-${t}`,ref_for:!0,ref:n=>e.setHeadingWrapper(t,n),class:V([`node-content`,{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${t}`},[v(z(qZ),{node:n(t),"index-key":`probe-heading-${t}`},null,8,[`node`,`index-key`])],10,w0)),64))],4))}})),[[`__scopeId`,`data-v-3e0766e2`]]),E0=G({name:`InfographicBlockNodeLoading`,props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){let t=L(()=>_J(dJ(e.estimatedPreviewHeightPx)??mJ(String(e.node.code??``))));return()=>a(`div`,{class:`infographic-block-container rounded-lg border overflow-hidden`,style:{margin:`var(--ms-flow-diagram-y) 0`,background:`var(--diagram-bg)`,borderColor:`var(--diagram-border)`,color:`hsl(var(--ms-foreground))`},"data-markstream-infographic":`1`,"data-markstream-mode":`pending`},[e.showHeader?a(`div`,{class:`infographic-block-header flex justify-between items-center border-b`,style:{padding:`var(--ms-inset-panel-y) var(--ms-inset-panel-x)`,background:`var(--diagram-header-bg)`,borderColor:`var(--diagram-border)`,minHeight:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)`}},[a(`div`,{class:`flex items-center gap-x-2 overflow-hidden`},[a(`span`,{class:`icon-slot action-icon shrink-0`,style:{display:`inline-flex`,width:`var(--ms-action-btn-icon)`,height:`var(--ms-action-btn-icon)`}}),a(`span`,{class:`infographic-label font-medium font-mono truncate`,style:{fontSize:`var(--ms-text-label)`,color:`hsl(var(--ms-muted-foreground))`}},`Infographic`)]),a(`div`,{class:`infographic-header-actions flex items-center opacity-0 pointer-events-none`,style:{gap:`var(--ms-gap-header-actions)`},"aria-hidden":`true`},Array.from({length:4},()=>a(`span`,{class:`infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`,style:{width:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))`,height:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))`}})))]):null,a(`div`,{class:`infographic-preview relative overflow-hidden block`,style:{height:`${t.value}px`,minHeight:`var(--ms-size-diagram-min-height)`,background:`var(--diagram-bg)`}},[a(`pre`,{class:`infographic-pending-source text-sm font-mono whitespace-pre-wrap`,style:{position:`absolute`,inset:`0`,zIndex:`1`,margin:`0`,padding:`var(--ms-inset-panel-body)`,overflow:`auto`,textAlign:`left`}},String(e.node.code??``)),a(`div`,{class:`absolute inset-0`},[a(`div`,{class:`w-full text-center flex items-center justify-center min-h-full`})])])])}}),D0=G({name:`MermaidBlockNodeLoading`,props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){let t=L(()=>gJ(dJ(e.estimatedPreviewHeightPx)??pJ(String(e.node.code??``))));return()=>a(`div`,{class:`mermaid-block-container rounded-lg border overflow-hidden`,style:{margin:`var(--ms-flow-diagram-y) 0`,borderColor:`var(--diagram-border)`},"data-markstream-mermaid":`1`,"data-markstream-mode":`pending`},[e.showHeader?a(`div`,{class:`mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]`,style:{background:`var(--diagram-header-bg)`,borderColor:`var(--diagram-border)`}},[a(`div`,{class:`flex items-center gap-x-2 overflow-hidden`},[a(`span`,{class:`mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate`,style:{color:`var(--code-action-fg)`}},`Mermaid`)]),a(`div`,{class:`mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none`,"aria-hidden":`true`},Array.from({length:4},()=>a(`span`,{class:`mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`},[a(`span`,{class:`action-icon block`})])))]):null,a(`div`,{class:`mermaid-preview-area relative overflow-hidden block`,style:{height:`${t.value}px`,minHeight:`var(--ms-size-diagram-min-height)`,background:`var(--diagram-bg)`}},[a(`pre`,{class:`mermaid-source-code text-sm font-mono whitespace-pre-wrap`,style:{position:`absolute`,inset:`0`,margin:`0`,padding:`var(--ms-inset-panel-body)`,overflow:`auto`,textAlign:`left`}},String(e.node.code??``)),a(`div`,{class:`_mermaid w-full text-center flex items-center justify-center min-h-full`,style:{fontFamily:`inherit`,contentVisibility:`auto`,contain:`content`,containIntrinsicSize:`var(--ms-size-diagram-min-height) 240px`}})])])}}),O0={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:`auto`},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:`auto`},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:`auto`}};function k0(e){if(e==null)return``;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}var A0=[`data-custom-id`],j0=[`data-node-index`,`data-node-type`],M0=`typewriter-simple-cursor-target`,N0=wY(G(lY(cY({},{name:`NodeRenderer`}),{__name:`NodeRenderer`,props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:`auto`},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:[`copy`,`copy-code`,`handleArtifactClick`,`click`,`mouseover`,`mouseout`,`virtual-state-change`,`height-change`,`render-settled`,`render-final`,`anchor-change`],setup(e,{expose:t,emit:a}){let o=e,l=a;function f(e){if(!(typeof Event<`u`&&e instanceof Event))return typeof e==`string`&&l(`copy-code`,e),void l(`copy`,e)}let h=y(),v=m(`markstreamNestedRendererProps`,void 0);function S(e){let t=h?.vnode.props;return!!t&&(Object.prototype.hasOwnProperty.call(t,e)||Object.prototype.hasOwnProperty.call(t,String(e).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)))}function C(e){let t=o[e];return S(e)?t:v?.value?.[e]??t}let w=L(()=>{return(e=C(`mode`))===`chat`||e===`minimal`||e===`docs`?e:`docs`;var e}),T=L(()=>C1(C(`typewriter`))),D=L(()=>T.value!==`off`),k=L(()=>C(`domMode`)===`minimal`?`minimal`:`full`),A=L(()=>{return!0===(e={mode:w.value,codeRenderer:C(`codeRenderer`),renderCodeBlocksAsPre:C(`renderCodeBlocksAsPre`)}).renderCodeBlocksAsPre?`pre`:e.codeRenderer===`pre`||e.codeRenderer===`shiki`||e.codeRenderer===`monaco`?e.codeRenderer:!1===e.renderCodeBlocksAsPre||e.mode===`docs`?`monaco`:`pre`;var e}),j=L(()=>O0[w.value]),ee=L(()=>C(`showTooltips`)??j.value.showTooltips),F=L(()=>C(`fade`)??j.value.fade),I=L(()=>C(`batchRendering`)??j.value.batchRendering),te=L(()=>C(`initialRenderBatchSize`)??j.value.initialRenderBatchSize),ie=L(()=>C(`renderBatchSize`)??j.value.renderBatchSize),se=L(()=>C(`renderBatchDelay`)??j.value.renderBatchDelay),ce=L(()=>C(`renderBatchBudgetMs`)??j.value.renderBatchBudgetMs),le=L(()=>C(`renderBatchIdleTimeoutMs`)??j.value.renderBatchIdleTimeoutMs),de=L(()=>C(`deferNodesUntilVisible`)??j.value.deferNodesUntilVisible),fe=L(()=>C(`maxLiveNodes`)??j.value.maxLiveNodes),H=L(()=>C(`liveNodeBuffer`)??j.value.liveNodeBuffer),U=L(()=>C(`nodeVirtual`)??j.value.nodeVirtual),G={get content(){return o.content},get nodes(){return o.nodes},get final(){return o.final},get parseOptions(){return C(`parseOptions`)},get customMarkdownIt(){return C(`customMarkdownIt`)},get debugPerformance(){return o.debugPerformance},get customHtmlTags(){return C(`customHtmlTags`)},get mode(){return C(`mode`)},get domMode(){return k.value},get htmlPolicy(){return C(`htmlPolicy`)},get viewportPriority(){return C(`viewportPriority`)},get viewportPriorityOptions(){return C(`viewportPriorityOptions`)},get codeBlockStream(){return C(`codeBlockStream`)},get codeBlockDarkTheme(){return C(`codeBlockDarkTheme`)},get codeBlockLightTheme(){return C(`codeBlockLightTheme`)},get codeBlockMonacoOptions(){return C(`codeBlockMonacoOptions`)},get codeRenderer(){return C(`codeRenderer`)},get renderCodeBlocksAsPre(){return C(`renderCodeBlocksAsPre`)},get codeBlockMinWidth(){return C(`codeBlockMinWidth`)},get codeBlockMaxWidth(){return C(`codeBlockMaxWidth`)},get codeBlockProps(){return C(`codeBlockProps`)},get mermaidProps(){return C(`mermaidProps`)},get d2Props(){return C(`d2Props`)},get infographicProps(){return C(`infographicProps`)},get showTooltips(){return ee.value},get themes(){return C(`themes`)},get langs(){return C(`langs`)},get isDark(){return C(`isDark`)},get customId(){return C(`customId`)},get indexKey(){return o.indexKey},get typewriter(){return C(`typewriter`)},get smoothStreaming(){return o.smoothStreaming},get smoothStreamingOptions(){return C(`smoothStreamingOptions`)},get parseCoalesceMs(){return C(`parseCoalesceMs`)},get fade(){return F.value},get batchRendering(){return I.value},get initialRenderBatchSize(){return te.value},get renderBatchSize(){return ie.value},get renderBatchDelay(){return se.value},get renderBatchBudgetMs(){return ce.value},get renderBatchIdleTimeoutMs(){return le.value},get deferNodesUntilVisible(){return de.value},get maxLiveNodes(){return fe.value},get liveNodeBuffer(){return H.value},get nodeVirtual(){return U.value},get virtualScroll(){return o.virtualScroll},get renderAsFragment(){return o.renderAsFragment}};function K(e){l(`height-change`,e)}function pe(e){l(`virtual-state-change`,e)}function me(e){l(`anchor-change`,e)}let ge=R(),_e=R(null),ve=R(null),ye=R(null),be=N({1:null,2:null,3:null,4:null,5:null,6:null}),xe=R(!1),Se=new Map,Ce=R(0),we=R(0),Te=R({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function Ee(e,t){return typeof e==`string`&&e.trim()||t}function De(e){let t=Number(e);return Number.isFinite(t)&&t>0?Math.max(1,Math.trunc(t)):640}let Oe=L(()=>{let e=G.viewportPriorityOptions??{},t=Ee(e.rootMargin,bX);return{rootMargin:t,heavyBlockMargin:Ee(e.heavyBlockMargin,t),maxTargets:De(e.maxTargets)}}),ke=L(()=>Oe.value.rootMargin??bX),Ae=L(()=>Oe.value.maxTargets??640);function je(){if(!0!==o.virtualScroll?.enabled)return null;let e=o.virtualScroll?.scrollRoot;return Me(typeof e==`function`?e():e)}function Me(e){return e?typeof HTMLElement<`u`&&e instanceof HTMLElement?e:typeof e==`object`&&`value`in e?Me(e.value):typeof e==`object`&&`$el`in e?Me(e.$el):null:null}d(_X,Oe);let{isClient:q,renderAsFragment:Ne,debugPerformanceEnabled:Pe,resolvedShowTooltips:Fe,resolvedHtmlPolicy:Ie,inheritedSmoothStreaming:Le,ownsTypewriterCursor:Re}=function(e){let t=typeof window<`u`,n=b(),r=m(`markstreamHtmlPolicy`,void 0),i=m(`markstreamTypewriterCursor`,void 0),a=m(`markstreamSmoothStreaming`,void 0);return{isClient:t,renderAsFragment:L(()=>!0===e.renderAsFragment),debugPerformanceEnabled:L(()=>!!(e.debugPerformance&&t&&typeof console<`u`)),resolvedShowTooltips:L(()=>{if(typeof e.showTooltips==`boolean`)return e.showTooltips;let t=n.showTooltips??n[`show-tooltips`];return t===``||!0===t||t===`true`||!1!==t&&t!==`false`&&void 0}),resolvedHtmlPolicy:L(()=>e.htmlPolicy??r?.value??`safe`),inheritedSmoothStreaming:a,inheritedTypewriterCursor:i,ownsTypewriterCursor:L(()=>!0!==i?.value)}}(G),{resolveViewportRoot:ze,resolveScrollContainer:Be,isReverseFlexScrollRoot:Ve,getNormalizedScrollTop:He,getOffsetTopWithinRoot:Ue}=function(e,t){function n(){return t.scrollRoot?.call(t)??null}function r(t){if(typeof window>`u`)return null;let r=n();if(r)return r;let i=t??e.value;if(!i)return null;let a=i.ownerDocument||document,o=a.scrollingElement||a.documentElement,s=i;for(;s&&s!==a.body&&s!==o;){if(x0(window.getComputedStyle(s))&&S0(s))return s;s=s.parentElement}return null}function i(e){if(!t.isClient)return!1;try{let t=window.getComputedStyle(e);return!!(t.display||``).toLowerCase().includes(`flex`)&&(t.flexDirection||``).toLowerCase().endsWith(`reverse`)}catch{return!1}}function a(e,t,n){if(n)return o(t);let r=e.scrollTop;if(!i(e))return r;let a=r<0?-r:r;return Math.max(0,(e.scrollHeight??0)-(e.clientHeight??0))-a}function o(e){let t=Number(e.scrollingElement?.scrollTop),n=Number(e.documentElement?.scrollTop??0),r=Number(e.body?.scrollTop??0);return Math.max(0,Number.isFinite(t)?t:0,Number.isFinite(n)?n:0,Number.isFinite(r)?r:0)}return{resolveViewportRoot:r,resolveScrollContainer:function(t){let i=n();if(i)return i;let a=r(t??e.value??null);if(a)return a;let o=t?.ownerDocument??e.value?.ownerDocument??(typeof document<`u`?document:null);return o?.scrollingElement||o?.documentElement||null},isReverseFlexScrollRoot:i,getNormalizedScrollTop:a,getOffsetTopWithinRoot:function(e,t){let n=t.ownerDocument||e.ownerDocument||document;if(function(e,t){return e===t.documentElement||e===t.body||e===t.scrollingElement}(t,n))return e.getBoundingClientRect().top+o(n);let r=t.getBoundingClientRect(),i=e.getBoundingClientRect(),s=a(t,n,!1);return i.top-r.top+s}}}(ge,{isClient:q,scrollRoot:je});d(`markstreamShowTooltips`,Fe),d(`markstreamHtmlPolicy`,Ie),d(`markstreamTypewriter`,D),d(`markstreamFade`,L(()=>!1!==G.fade)),d(`markstreamTypewriterCursor`,L(()=>!0)),d(`markstreamTextStreamState`,Se),d(`markstreamStreamVersion`,Ce),d(`markstreamParseOptions`,L(()=>G.parseOptions)),d(`markstreamCustomMarkdownIt`,L(()=>G.customMarkdownIt));let{smoothStreamingEnabled:We,renderContent:Ge,requestedFinal:Ke,effectiveFinal:qe}=function(e,t){let n=v0(cY(cY({},y0),e.smoothStreamingOptions)),r=L(()=>!1!==e.smoothStreaming&&!e.nodes?.length&&(!0===e.smoothStreaming||!t.inheritedSmoothStreaming?.value)&&(!0===e.smoothStreaming||C1(e.typewriter)!==`off`||(e.maxLiveNodes??0)<=0)),i=R(!t.isClient||!0===e.smoothStreaming);p(()=>{i.value=!0});let a=L(()=>i.value&&r.value),o=L(()=>a.value?n.visible.value:e.content??``),c=L(()=>{let t=e.parseOptions??{};return e.final??t.final}),l=L(()=>{let e=c.value;return a.value&&e!=null?!!e&&n.caughtUp.value:e}),u=0,d=!1;function f(){u=0,d=!1}return s([()=>e.content,()=>e.nodes,a,c],([e,t,r,i])=>{if(t?.length)return f(),void n.reset(``);let a=e??``;if(!r)return f(),n.reset(a),void(i&&n.finish({flush:!0}));let o=n.source.value;if(a){if(a!==o)if(a.startsWith(o)){let e=a.slice(o.length),t=n.pendingChars.value;e.length<=8?(u++,d||u>=2&&t<=8?(d=!0,n.reset(a)):n.enqueue(e)):(f(),n.enqueue(e))}else f(),n.reset(a)}else f(),n.reset(``);i&&n.finish()},{immediate:!0}),{smoothStream:n,smoothStreamingEligible:r,smoothStreamingEnabled:a,renderContent:o,requestedFinal:c,effectiveFinal:l}}(G,{isClient:q,inheritedSmoothStreaming:Le}),Je=!0===Ke.value;d(`markstreamSmoothStreaming`,We);let Ye=R(!1),Xe=R(!1),Ze=R(!1),Qe=``,$e=!1,et=null;function tt(){q&&et!=null&&(window.clearTimeout(et),et=null)}function nt(){Ye.value=!1,tt()}function rt(e,t){if(!Pe.value)return;let n=function(){if(!Pe.value)return null;let e=ct(it),t=ct(at),n=Math.max(st,t);if(e<=0&&n<=0)return null;let r={total:e,maxPerFrame:n,byLabel:(i=it,Object.fromEntries(Array.from(i.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))))};var i;return it.clear(),at.clear(),st=0,r}();console.info(`[markstream-vue][perf] ${e}`,n?lY(cY({},t),{layoutReads:n}):t)}s([()=>G.indexKey,()=>G.customId],()=>{nt(),Xe.value=!1,Ze.value=!o.nodes?.length&&!0!==Ke.value&&!!o.content,Qe=Ge.value??``,$e=Qe.length>0},{flush:`sync`}),s([()=>o.content,()=>o.nodes,Ke],([e,t,n])=>{!t?.length&&!0!==n&&e&&(Ze.value=!0)},{flush:`sync`,immediate:!0}),s([Ge,()=>o.nodes,Ke],([e,t,n])=>{let r=e??``;t?.length||!0===n?(nt(),Xe.value=!1,Qe=r,$e=!0):(r.length>0&&(Ze.value=!0),$e?(Qe&&r.length>Qe.length&&r.startsWith(Qe)?(Ye.value=!0,Xe.value=!0,q&&(tt(),et=window.setTimeout(()=>{var e;et=null,!0===qe.value||(e=o.nodes)!=null&&e.length||(po(),Ye.value=!1,ho())},1200))):(r.length`u`)return null;let e=window;if(e.__markstreamLayoutReadPerformance)return e.__markstreamLayoutReadPerformance;let t={total:0,maxPerFrame:0,byLabel:{}};return e.__markstreamLayoutReadPerformance=t,t}();t&&(t.total=Number(t.total||0)+1,t.byLabel[e]=Number(t.byLabel[e]||0)+1,t.currentFrameTotal=Number(t.currentFrameTotal||0)+1,t.frameScheduled||(t.frameScheduled=!0,typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>ut(t)):typeof queueMicrotask==`function`?queueMicrotask(()=>ut(t)):setTimeout(()=>ut(t),0)))}(e),ot||(ot=!0,q&&typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(lt):typeof queueMicrotask==`function`?queueMicrotask(lt):setTimeout(lt,0)))}function ft(e,t){return dt(e),t()}let pt=G.customId?`renderer-${G.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,mt=function(e){let t=new Map;return{scope:e,cache:t,clear:()=>t.clear()}}(pt),ht=pt;d(w1,mt);let gt=bY(()=>G.customId),{effectiveCustomHtmlTagsSet:_t,mergedParseOptions:vt,parsedNodes:yt,getParsedNodesDirtyStartIndex:bt,getParsedNodesRevision:xt}=g0(G,{instanceMsgId:pt,renderContent:Ge,effectiveFinal:qe,smoothStreamingEnabled:We,debugPerformanceEnabled:Pe,customComponentsMap:gt,logPerf:rt});s(yt,()=>{Ye.value||mt.clear(),Ce.value+=1},{immediate:!0});let St=L(()=>({customId:G.customId,customHtmlTags:vt.value.customHtmlTags,parseOptions:G.parseOptions,customMarkdownIt:G.customMarkdownIt,htmlPolicy:Ie.value,viewportPriority:G.viewportPriority,viewportPriorityOptions:Oe.value,mode:w.value,domMode:G.domMode,codeRenderer:A.value,codeBlockStream:G.codeBlockStream,codeBlockDarkTheme:G.codeBlockDarkTheme,codeBlockLightTheme:G.codeBlockLightTheme,codeBlockMonacoOptions:G.codeBlockMonacoOptions,renderCodeBlocksAsPre:G.renderCodeBlocksAsPre,codeBlockMinWidth:G.codeBlockMinWidth,codeBlockMaxWidth:G.codeBlockMaxWidth,codeBlockProps:G.codeBlockProps,mermaidProps:G.mermaidProps,d2Props:G.d2Props,infographicProps:G.infographicProps,showTooltips:Fe.value,themes:G.themes,langs:G.langs,isDark:G.isDark,typewriter:D.value,smoothStreamingOptions:G.smoothStreamingOptions,parseCoalesceMs:G.parseCoalesceMs,fade:G.fade}));d(`markstreamNestedRendererProps`,St);let Ct=L(()=>yt.value),wt=L(()=>yt.value.length),Tt=R(null),Et=R(null),Dt=R(null),Ot=R(null),kt=o.indexKey!=null&&String(o.indexKey).startsWith(`list-item-`),At=!kt&&G.customId?c1(G.customId):null,jt=L(()=>At?(s1.value,c1(G.customId)):null),Mt=L(()=>!!(!Ne.value&&G.customId&&!kt&&jt.value?.enabled)),Nt=L(()=>!!(q&&Mt.value)),Pt=L(()=>!!(!Ne.value&&o.virtualScroll?.enabled)),Ft=L(()=>Pt.value),It=R(!1);p(()=>{It.value=!0});let Lt=L(()=>!!(q&&Pt.value));d(`markstreamHostScrollManaged`,Lt);let Rt=L(()=>!!(It.value&&Lt.value)),zt=L(()=>Nt.value||Lt.value),Bt=L(()=>Nt.value||Rt.value),Vt=L(()=>zt.value&&!1!==jt.value?.textEstimation);function Ht(){let e=we.value||ft(`getMeasuredContainerWidth.clientWidth`,()=>ge.value?.clientWidth||0);return Number.isFinite(e)&&e>0?e:0}let Ut=L(()=>{let e=Ht();return e>0?Math.max(1,Math.round(e)):640}),Wt=L(()=>!(!0!==qe.value||Pt.value||w.value!==`chat`&&w.value!==`minimal`||S(`maxLiveNodes`)||S(`liveNodeBuffer`)||o.nodes?.length||Ze.value||!((G.maxLiveNodes??0)<=0))),Gt=L(()=>Wt.value?50:Math.max(1,G.maxLiveNodes??320)),Kt=L(()=>Wt.value?16:Math.max(0,G.liveNodeBuffer??60)),qt=L(()=>!Ne.value&&!1!==G.nodeVirtual&&!((G.maxLiveNodes??0)<=0&&!Wt.value)&&(!0===G.nodeVirtual?yt.value.length>0:yt.value.length>Gt.value)),Jt=L(()=>qt.value||Nt.value||Lt.value),Yt=L(()=>!1!==G.viewportPriority),Xt=L(()=>!!Yt.value&&!xe.value);d(vX,L(()=>Yt.value));let Zt=L(()=>!(Ne.value||!1===G.deferNodesUntilVisible||(G.maxLiveNodes??0)<=0||qt.value||yt.value.length>900||!1===G.viewportPriority)),Qt=CX(e=>ze(e??ge.value??null),Yt),{requestFrame:$t,cancelFrame:en,hasIdleCallback:tn,isTestEnv:nn}=function(e){return{requestFrame:e.isClient&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame.bind(window):null,cancelFrame:e.isClient&&typeof window.cancelAnimationFrame==`function`?window.cancelAnimationFrame.bind(window):null,hasIdleCallback:e.isClient&&typeof window.requestIdleCallback==`function`,isTestEnv:function(){return typeof globalThis>`u`||!(`process`in globalThis)?void 0:Object.getOwnPropertyDescriptor(globalThis,`process`)?.value?.env}()?.NODE_ENV===`test`}}({isClient:q}),rn=L(()=>!0===qe.value&&!Pt.value),{resolvedBatchSize:an,resolvedInitialBatch:on,batchingEnabled:sn,incrementalRenderingActive:cn,renderedCount:ln,previousRenderContext:un,adaptiveBatchSize:dn,previousBatchConfig:fn}=function(e,t){let n=L(()=>{let t=Math.trunc(e.renderBatchSize??80);return Number.isFinite(t)?Math.max(0,t):0}),r=L(()=>{let t=Math.trunc(e.initialRenderBatchSize??n.value);return Number.isFinite(t)?Math.max(0,t):n.value}),i=L(()=>!t.renderAsFragment.value&&!1!==e.batchRendering&&n.value>0&&t.isClient&&!t.isTestEnv),a=R(0),o=R({key:e.indexKey,total:0}),s=R(Math.max(1,n.value||1)),c=L(()=>i.value&&!t.continuousStreaming?.value&&!t.forceFullRenderFinalContent?.value&&(e.maxLiveNodes??0)<=0);return{resolvedBatchSize:n,resolvedInitialBatch:r,batchingEnabled:i,incrementalRenderingActive:c,renderedCount:a,previousRenderContext:o,adaptiveBatchSize:s,previousBatchConfig:R({batchSize:n.value,initial:r.value,delay:e.renderBatchDelay??16,enabled:c.value})}}(G,{isClient:q,isTestEnv:nn,renderAsFragment:Ne,forceFullRenderFinalContent:rn,continuousStreaming:L(()=>Xe.value&&!0!==qe.value)}),pn=L(()=>!Ne.value&&!1!==G.batchRendering&&an.value>0&&!nn&&(G.maxLiveNodes??0)<=0&&!rn.value),mn=L(()=>pn.value),hn=L(()=>zt.value||mn.value),gn=L(()=>hn.value&&!1!==jt.value?.codeBlockEstimation),_n=new Map,vn=new Map,yn=new WeakMap,bn=null,xn=new WeakMap,Sn=new Map,Cn=[],wn=[],Tn=[],En=-1,Dn=ue(Cn),On=new Set,kn=R(0),An=0,jn=R(0),Mn=L(()=>(jn.value,Array.from(_n.entries()).sort((e,t)=>e[0]-t[0]))),Nn=R(null),Pn=R(null),Fn,In=null,Ln=0,Rn=null;function zn(){Fn.markFallbackHeightPrefixDirty()}function Bn(e){return Fn.getFallbackNodeHeight(e)}function Vn(e,t){return Fn.estimateHeightRange(e,t)}function Hn(e){return Fn.estimateIndexForOffset(e)}let{activeRestoreAnchor:Un,getRelativeScrollTopWithinContainer:Wn,setRelativeScrollTopWithinContainer:Gn,resolveAnchorOffset:Kn,clearRestoreReconcile:qn,scheduleRestoreReconcile:Jn,captureRestoreAnchor:Yn,restoreAnchor:Xn,getAnchorDrift:Zn}=function(e){let{isClient:t,containerRef:n,parsedNodeCount:r,requestFrame:i,cancelFrame:a,resolveScrollContainer:o,getNormalizedScrollTop:s,getOffsetTopWithinRoot:c,isReverseFlexScrollRoot:l,estimateIndexForOffset:u,estimateHeightRange:d,getFallbackNodeHeight:f,clamp:p}=e,m=R(null),h=null,g=[];function _(){let e=o(),t=n.value;if(!e||!t)return null;let r=e.ownerDocument||t.ownerDocument||document;if(e===r.documentElement||e===r.body||e===r.scrollingElement){let e=t.getBoundingClientRect();return Math.max(0,-e.top)}return Math.max(0,s(e,r,!1)-c(t,e))}function v(e){var t;let r=o(),i=n.value;if(!r||!i)return;let a=Math.max(0,e),u=r.ownerDocument||i.ownerDocument||document,d=u.defaultView||(typeof window<`u`?window:null);if(r===u.documentElement||r===u.body||r===u.scrollingElement){let e=s(r,u,!0)+i.getBoundingClientRect().top;(t=d?.scrollTo)==null||t.call(d,0,Math.max(0,e+a));return}x1(r,u,c(i,r)+a,{isReverseFlexScrollRoot:e=>{var t;return(t=l?.(e))!=null&&t},getNormalizedScrollTop:s})}function y(e){let t=r.value;return d(0,p(e.nodeIndex,0,Math.max(0,t-1)))+Math.max(0,e.offsetWithinNodePx)}function b(){if(h!=null&&(a?.(h),h=null),t)for(let e of g)window.clearTimeout(e);g=[]}function x(e){let t=y(e),n=_();n!=null&&Math.abs(n-t)<=.5||v(t)}return{activeRestoreAnchor:m,getRelativeScrollTopWithinContainer:_,setRelativeScrollTopWithinContainer:v,resolveAnchorOffset:y,clearRestoreReconcile:b,applyRestoreAnchor:x,scheduleRestoreReconcile:function(){m.value&&t&&h==null&&(h=i?i(()=>{h=null,m.value&&x(m.value)}):null,h==null&&m.value&&x(m.value))},captureRestoreAnchor:function(){let e=_(),t=r.value;if(e==null||t<=0)return null;let n=p(u(e+1),0,t-1),i=d(0,n),a=f(n);return{nodeIndex:n,offsetWithinNodePx:p(e-i,0,Math.max(0,a-1))}},restoreAnchor:function(e){let n=r.value;if(m.value={nodeIndex:p(e.nodeIndex,0,Math.max(0,n-1)),offsetWithinNodePx:Math.max(0,e.offsetWithinNodePx)},b(),x(m.value),t)for(let e of[0,120,280,480])g.push(window.setTimeout(()=>{m.value&&x(m.value)},e))},getAnchorDrift:function(e){let t=_();return t==null?null:t-y(e)}}}({isClient:q,containerRef:ge,parsedNodeCount:wt,requestFrame:$t,cancelFrame:en,resolveScrollContainer:()=>Nn.value||Be(),getNormalizedScrollTop:He,getOffsetTopWithinRoot:Ue,isReverseFlexScrollRoot:Ve,estimateIndexForOffset:Hn,estimateHeightRange:Vn,getFallbackNodeHeight:Bn,clamp:ui}),{nodeHeights:Qn,heightStats:$n,heightTreeSize:er,heightSumTree:tr,heightKnownTree:nr,averageNodeHeight:rr,resetHeightMeasurements:ir,pruneHeightMeasurements:ar,rebuildHeightTrees:or,recordNodeHeight:sr,removeNodeHeights:cr,exportHeightCache:lr,importHeightCache:ur,fenwickRangeSum:dr}=function(e={}){let t=N({}),n=N({total:0,count:0}),r=R(0),i=R([]),a=R([]);function o(){for(let e of Object.keys(t))delete t[Number(e)];n.total=0,n.count=0,r.value=0,i.value=[],a.value=[]}function s(e,t,n){for(let r=t+1;r0;r-=r&-r)n+=e[r];return n}function l(e){r.value=e;let n=Array(e+1).fill(0),o=Array(e+1).fill(0);for(let[r,i]of Object.entries(t)){let t=Number(r),a=Number(i);!Number.isFinite(t)||t<0||t>=e||!Number.isFinite(a)||a<=0||(s(n,t,a),s(o,t,1))}i.value=n,a.value=o}function u(e){if(!Number.isInteger(e)||e<0)return!1;let o=t[e];if(!Number.isFinite(o)||o<=0)return!1;if(delete t[e],n.total=Math.max(0,n.total-o),n.count=Math.max(0,n.count-1),r.value>e){let t=i.value,n=a.value;t.length&&n.length&&(s(t,e,-o),s(n,e,-1))}return!0}return{nodeHeights:t,heightStats:n,heightTreeSize:r,heightSumTree:i,heightKnownTree:a,averageNodeHeight:L(()=>n.count>0?Math.max(12,n.total/n.count):32),resetHeightMeasurements:o,pruneHeightMeasurements:function(e){if(e<=0)return void o();let r=0,i=0;for(let[n,a]of Object.entries(t)){let o=Number(n),s=Number(a);!Number.isFinite(o)||o<0||o>=e||!Number.isFinite(s)||s<=0?delete t[o]:(r+=s,i++)}n.total=r,n.count=i},rebuildHeightTrees:l,recordNodeHeight:function(o,c,l={}){(function(o,c,l={}){var u;if(!Number.isFinite(c)||c<=0)return!1;let d=t[o];if(d&&(!1===l.allowShrink&&co){let e=i.value,t=a.value;if(e.length&&t.length)if(d){let t=c-d;t!==0&&s(e,o,t)}else s(e,o,c),s(t,o,1)}!1!==l.notify&&((u=e.onHeightRecorded)==null||u.call(e))})(o,c,lY(cY({},l),{notify:!0}))},removeNodeHeight:function(t,n={}){var r;let i=u(t);return i&&!1!==n.notify&&((r=e.onHeightRecorded)==null||r.call(e)),i},removeNodeHeights:function(t,n={}){var r;let i=0;for(let e of t)u(Number(e))&&i++;return i>0&&!1!==n.notify&&((r=e.onHeightRecorded)==null||r.call(e)),i},exportHeightCache:function(){return Object.entries(t).map(([e,t])=>({index:Number(e),height:Number(t)})).filter(e=>Number.isFinite(e.index)&&e.index>=0&&Number.isFinite(e.height)&&e.height>0).sort((e,t)=>e.index-t.index)},importHeightCache:function(i,a={}){var o;if(!Array.isArray(i))return;let s=r.value,c=!1;if(a.mode!==`merge`){let e=Object.keys(t);if(e.length>0){for(let n of e)delete t[Number(n)];c=!0}}for(let e of i){let n=Number(e.index),r=Number(e.height);if(!Number.isInteger(n)||n<0||s>0&&n>=s||!Number.isFinite(r)||r<=0)continue;let i=t[n];i&&Math.abs(i-r)<=1||(t[n]=r,c=!0)}c&&(function(){let e=0,i=0,a=r.value;for(let[n,r]of Object.entries(t)){let o=Number(n),s=Number(r);!Number.isFinite(o)||o<0||a>0&&o>=a||!Number.isFinite(s)||s<=0?delete t[o]:(e+=s,i++)}n.total=e,n.count=i}(),s>0&&l(s),(o=e.onHeightRecorded)==null||o.call(e))},fenwickRangeSum:function(e,t,n){if(n<=t)return 0;let r=c(e,n-1);return t<=0?r:r-c(e,t-1)}}}({onHeightRecorded:()=>{zn(),Lt.value&&wo(),Un.value&&Jn(),Pn.value&&xa(),oo(`node-resize`)}});function fr(e){Number.isInteger(e)&&e>=0&&On.add(e)}function pr(e){for(let t of e)fr(Number(t))}function mr(e){An++;let t=!0;try{let n=e();return t=!1!==n,n}finally{An--,An===0&&t&&kn.value++}}function hr(){wn=[],Tn=[],En=-1,On.clear(),Dn.value=Cn}function gr(){hr(),mr(()=>ir()),Sn.clear()}function _r(e){!Number.isInteger(e)||e<0||e>=yt.value.length||Sn.set(e,pa(e))}function vr(e,t,n={}){let r=Qn[e];fr(e),sr(e,t,n);let i=Qn[e];return Object.is(r,i)?(On.delete(e),!1):(i&&i>0?_r(e):r&&Sn.delete(e),!0)}function yr(e,t){let n=ft(`getNodeLayoutHeight.slot.offsetHeight`,()=>_n.get(e)?.offsetHeight??0);return n>0?n:ft(`getNodeLayoutHeight.content.offsetHeight`,()=>t.offsetHeight)}function br(e,t={}){t.mode===`merge`?pr(e.map(e=>e.index)):hr(),mr(()=>ur(e,t)),La()}let xr=L(()=>Zt.value&&Xt.value),Sr=L(()=>!Ne.value&&!1!==G.batchRendering&&an.value>0&&(G.maxLiveNodes??0)<=0),Cr=L(()=>!Ne.value&&Je&&!0===qe.value&&!qt.value&&!Pt.value&&!Mt.value&&!xr.value&&!Sr.value),wr=L(()=>!!Qt&&xr.value),Tr=L(()=>qt.value||Lt.value),{focusIndex:Er,liveRange:Dr,updateLiveRange:Or}=function(e,t){let{parsedNodeCount:n,virtualizationEnabled:r,maxLiveNodesResolved:i,liveNodeBufferResolved:a,clamp:o}=t,s=a??L(()=>Math.max(0,e.liveNodeBuffer??60)),c=R(0),l=N({start:0,end:0});return{liveNodeBufferResolved:s,focusIndex:c,liveRange:l,updateLiveRange:function(){let e=n.value;if(!r.value||e===0)return l.start=0,void(l.end=e);let t=Math.min(i.value,e),a=s.value,u=o(c.value-a,0,Math.max(0,e-t));l.start=u,l.end=Math.min(e,u+t)}}}(G,{parsedNodeCount:wt,virtualizationEnabled:qt,maxLiveNodesResolved:Gt,liveNodeBufferResolved:Kt,clamp:ui}),kr=new Map,Ar=new Map,jr=new Map,Mr=[],Nr=new Map,Pr=new Set,Fr=R(0),Ir=!1,Lr=L(()=>(Fr.value,Pr.size)),Rr=new Map,zr=new Map,Br=R(0),Vr=L(()=>{Br.value;let e=0;for(let t of Rr.values())e+=Math.max(0,t);return e}),Hr=null,Ur=L(()=>{if(!qt.value)return yt.value.length;let e=Kt.value,t=Math.max(Dr.end+e,on.value),n=Math.min(yt.value.length,t);return Math.max(ln.value,n)});function Wr(){Ir||(Ir=!0,queueMicrotask(()=>{Ir=!1,Fr.value+=1}))}function Gr(e,t,n=`node-resize`){if(!q||typeof window>`u`)return null;let r=window.setTimeout(()=>{Pr.delete(r)&&Wr();try{t()}finally{oo(n)}},Math.max(0,e));return Pr.add(r),Wr(),r}function Kr(e){q&&e!=null&&(Pr.delete(e)&&Wr(),window.clearTimeout(e))}function qr(){if(q&&typeof window<`u`)for(let e of Pr)window.clearTimeout(e);Pr.size&&(Pr.clear(),Wr()),Mr.length=0,jr.clear()}function Jr(e){_e.value=e}function Yr(e){ve.value=e}function Xr(e){ye.value=e}let{cancelScheduledFocusSync:Zr,scheduleFocusSync:Qr}=function(e){let{isClient:t,containerRef:n,virtualizationEnabled:r,requestFrame:i,cancelFrame:a,syncFocusToScroll:o}=e,s=null;function c(){return n.value?.ownerDocument?.defaultView??(typeof window<`u`?window:null)}function l(){if(!s)return;let e=c();s.viaTimeout?e?e.clearTimeout(s.id):clearTimeout(s.id):a?.(s.id),s=null}return{cancelScheduledFocusSync:l,scheduleFocusSync:function(e={}){if(!r.value)return;if(!t)return void o(!0);if(e.immediate)return l(),void o(!0);if(s)return;let n=()=>{s=null,o()};if(i)return void(s={id:i(n),viaTimeout:!1});let a=c();s={id:a?a.setTimeout(n,16):setTimeout(n,16),viaTimeout:!0}}}}({isClient:q,containerRef:ge,virtualizationEnabled:qt,requestFrame:$t,cancelFrame:en,syncFocusToScroll:function(e=!1){if(!qt.value)return;let t=Nn.value||Be();if(!t)return;let n=t.ownerDocument||ge.value?.ownerDocument||document,r=n?.defaultView||(typeof window<`u`?window:null),i=t===n?.documentElement||t===n?.body,a=yt.value.length;if(a<=0)return;if(!i&&a>0&&Ve(t)){let n=ft(`syncFocusToScroll.clientHeight`,()=>t.clientHeight||0),r=ft(`syncFocusToScroll.scrollTop`,()=>t.scrollTop),i=r<0?-r:r;li(ui((o=Math.max(0,i)+.5*Math.max(0,n),Fn.estimateIndexForOffsetFromEnd(o)),0,Math.max(0,a-1)),e);return}var o;let s=function(e,t,n,r){let i=ge.value;if(!i)return null;let a=r?0:ft(`syncFocusToScroll.model.root.getBoundingClientRect`,()=>e.getBoundingClientRect().top),o=ft(`syncFocusToScroll.model.container.getBoundingClientRect`,()=>i.getBoundingClientRect().top),s=Math.max(0,a-o),c=r?ft(`syncFocusToScroll.model.viewport.clientHeight`,()=>n?.innerHeight??t.documentElement?.clientHeight??e.clientHeight??0):ft(`syncFocusToScroll.model.root.clientHeight`,()=>e.clientHeight);return ui(Hn(s+.5*Math.max(0,c)),0,Math.max(0,yt.value.length-1))}(t,n,r,i);if(s!=null)return void li(s,e);let c=i?null:ft(`syncFocusToScroll.root.getBoundingClientRect`,()=>t.getBoundingClientRect()),l=i?0:c.top,u=i?ft(`syncFocusToScroll.viewport.clientHeight`,()=>r?.innerHeight??t.clientHeight??0):c.bottom,d=Mn.value,f=null,p=null;for(let[e,t]of d){if(!t)continue;let n=ft(`syncFocusToScroll.slot.getBoundingClientRect`,()=>t.getBoundingClientRect());n.bottom<=l||n.top>=u||(f??=e,p=e)}if(f==null||p==null){let e=ge.value;if(!e)return;let a=i?{top:0}:ft(`syncFocusToScroll.fallback.root.getBoundingClientRect`,()=>t.getBoundingClientRect()),o=ft(`syncFocusToScroll.fallback.scrollTop`,()=>He(t,n,i)),s=i?(()=>{let t=ft(`syncFocusToScroll.fallback.container.getBoundingClientRect`,()=>e.getBoundingClientRect()),n=(i?0:a.top)-t.top;return Math.max(0,n)})():(()=>{let n=Ue(e,t);return Math.max(0,o-n)})(),c=i?ft(`syncFocusToScroll.fallback.viewport.clientHeight`,()=>r?.innerHeight??n?.documentElement?.clientHeight??t.clientHeight??0):ft(`syncFocusToScroll.fallback.root.clientHeight`,()=>t.clientHeight);li(ui(Hn(s+.5*Math.max(0,c)),0,Math.max(0,yt.value.length-1)),!0);return}li(Math.round((f+p)/2),e)}}),{visibleNodeIndices:$r,nodeVisibilityHandles:ei,nodeVisibilityWatchStops:ti,nodeVisibilityFallbackTimers:ni,clearVisibilityFallback:ri,markNodeVisible:ii,cleanupNodeVisibility:ai,destroyNodeVisibilityState:oi}=_0({isClient:q,shouldTrackVisibleNodeIndices:()=>xr.value,shouldCleanupNodeVisibility:()=>qt.value,onNodeMarkedVisible:e=>{qt.value?Qr():Er.value=ui(e,0,Math.max(0,yt.value.length-1))},onNodeVisibilityCleaned:e=>{_n.delete(e)&&so()}}),{cleanupScrollListener:si,setupScrollListener:ci}=function(e){let{isClient:t,virtualizationEnabled:n,listenerEnabled:r,scrollRootElement:i,resolveScrollContainer:a,scheduleFocusSync:o,onScroll:s}=e,c=null,l=null;function u(){c&&=(c(),null),l=null,i.value=null}function d(t){let n=e.getScrollTop?e.getScrollTop(t):t.scrollTop;return Math.max(0,Number.isFinite(n)?Math.abs(n):0)}return{cleanupScrollListener:u,setupScrollListener:function(){if(!t)return;if(!((e=r?.value)??n.value))return void u();var e;let f=a();if(!f)return void u();if(i.value===f&&c)return;u(),l=d(f);let p=()=>{if(s?.(),n.value){let e=function(e){let t=d(e),n=l;l=t;let r=Math.max(480,.75*(e.clientHeight||0));return n==null?t>r?{immediate:!0}:void 0:Math.abs(t-n)>r?{immediate:!0}:void 0}(f);e?o(e):o()}};f.addEventListener(`scroll`,p,{passive:!0}),i.value=f,c=()=>{f.removeEventListener(`scroll`,p)}}}}({isClient:q,virtualizationEnabled:qt,listenerEnabled:Tr,scrollRootElement:Nn,resolveScrollContainer:Be,scheduleFocusSync:Qr,onScroll:function(){let e=Pn.value;if(!e)return;let t=na();if(!t||function(e){if(Xa()>=Ln)return Rn=null,!1;let t=Rn;if(t==null)return!0;let n=Math.abs(e.scrollTop-t)<=2;return n||(Rn=null),n}(t))return;let n=ia(t);(n==null||n<-32||Math.abs(Math.max(0,n)-Math.max(0,e.distanceFromBottomPx))>32)&&ba(`restore`)},getScrollTop:e=>{let t=e.ownerDocument||ge.value?.ownerDocument||document,n=e===t.documentElement||e===t.body||e===t.scrollingElement;return ft(`scrollListener.getScrollTop`,()=>He(e,t,n))}});function li(e,t=!1){let n=ui(e,0,Math.max(0,yt.value.length-1));!t&&Math.abs(n-Er.value)<=1||(Er.value=n,Or())}function ui(e,t,n){return Math.min(Math.max(e,t),n)}function di(e=yt.value.length){let t=bt();return!Number.isInteger(t)||t<0?e:ui(t,0,e)}function fi(e){return e?.firstElementChild}function pi(e,t){return e?e.matches?.call(e,t)?e:e.querySelector(t):null}function mi(e,t){e<1||e>6||(be[e]=t)}function hi(){if(!zt.value)return void(we.value=0);let e=ft(`updateExperimentContainerWidth.clientWidth`,()=>ge.value?.clientWidth??0);we.value=e>0?e:0}let gi=null;function _i(){gi?.disconnect(),gi=null}let vi=tZ(`ViewportDeferredMarkdownCodeBlockNode`,i({loader:()=>uY(null,null,function*(){return(yield he(()=>import(`./index5-DnCMqCxw.js`),__vite__mapDeps([34,1,2,31,7]))).default}),loadingComponent:nZ,delay:0,suspensible:!1}),nZ);function yi(e){return e===vi}let bi=L(()=>A.value===`pre`?QX:A.value===`shiki`?vi:rZ);function xi(){return!1!==G.codeBlockProps?.showHeader}function Si(e,t,n){let r=Qn[t],i=typeof r==`number`&&r>0;if(Vt.value&&!i&&!function(e){return!!gt.value.paragraph&&(e.type===`paragraph`||e.type===`list_item`||e.type===`list`)}(e)){let t=p1(e,n,Te.value);if(t)return t}if(gn.value&&e.type===`code_block`){let t=function(e){if(e.type!==`code_block`)return null;let t=ns(e,Zo(e));return yi(t)?`markdown`:t===QX?`pre`:t===bi.value||t===rZ?`monaco`:null}(e);if(t===`monaco`||t===`markdown`||t===`pre`)return function(e,t){if(!e||e.type!==`code_block`)return null;let n=t.rendererKind,r=n!==`pre`&&!1!==t.showHeader,i=!!e.diff,a=0,o=500;if(n===`monaco`){let n=t.monacoOptions??{},r=g1(e,n,t.width),s=function(e){let t=typeof e?.fontSize==`number`&&e.fontSize>0?e.fontSize:12;return typeof e?.lineHeight==`number`&&e.lineHeight>0?e.lineHeight:Math.round(1.5*t)}(n),c=function(e,t){let n=typeof e?.padding?.top==`number`?e.padding.top:t?0:8,r=typeof e?.padding?.bottom==`number`?e.padding.bottom:t?0:8;return Math.max(0,n)+Math.max(0,r)}(n,i);o=typeof n.MAX_HEIGHT==`number`&&n.MAX_HEIGHT>0?n.MAX_HEIGHT:500,a=Math.round(r*s+c)}else if(n===`markdown`){let t=g1(e);a=Math.round(21*t+32)}else{let t=g1(e);a=Math.round(28*t),o=1/0}let s=Math.max(1,Math.min(a,o));return cY({kind:`code-block`,height:Math.round(s+(r?40:0)),contentHeight:s,rendererKind:n},i&&n===`monaco`?{diffInline:RX(t.monacoOptions??{},t.width??0)}:{})}(e,{rendererKind:t,monacoOptions:G.codeBlockMonacoOptions,showHeader:xi(),width:n})}return null}u(()=>{if(kn.value,An>0)return;let e=yt.value,t=xt();if(!e.length||!hn.value)return wn=[],Tn=[],En=-1,On.clear(),void(Dn.value=Cn);let n=we.value||ft(`estimatedNodeHeights.clientWidth`,()=>ge.value?.clientWidth||0);if(!Number.isFinite(n)||n<=0)return wn=[],Tn=[],En=-1,On.clear(),void(Dn.value=Cn);let r=function(e){return[Math.round(e),Vt.value,gn.value,Te.value,G.codeBlockMonacoOptions,xi(),A.value,gt.value,s1.value]}(n),i=wn.length<=e.length&&(o=r,(a=Tn).length===o.length&&a.every((e,t)=>Object.is(e,o[t])));var a,o;let s=i&&En===t?e.length:i?di(e.length):0,c=i?Array.from(On):[];wn.length=e.length;for(let t=s;t=0&&tDn.value);Fn=function(e){let t=!0,n=[0],r=``;function i(t){let n=e.nodeHeights[t];if(Number.isFinite(n)&&n>0)return n;let r=e.parsedNodes.value[t],i=r?.type,a=!!e.hasCustomParagraphComponent?.call(e),o=e.estimatedNodeHeights.value[t],s=o?.height;if(!function(e,t,n){return!!(n&&t?.kind===`simple-text`&&(e===`paragraph`||e===`list_item`||e===`list`))}(i,o,a)&&Number.isFinite(s)&&s>0)return s;let c=P1(r,e.getContainerWidth()||640);return i===`heading`||i===`paragraph`&&c<=28&&function(e,t){if(t)return!1;let n=e.children;return!Array.isArray(n)||!n.length||n.every(A1)}(r,a)?c:Math.max(e.averageNodeHeight.value,c)}function a(){let a=e.parsedNodes.value.length,o=e.getPrefixCacheKeyParts().join(`:`);if(!t&&r===o)return n;let s=Array(a+1);s[0]=0;for(let t=0;t=(r[n]??0))return n-1;let i=0,o=n-1,s=n-1;for(;i<=o;){let e=i+o>>1;(r[e+1]??0)>=t?(s=e,o=e-1):i=e+1}return s}function s(t,n){if(t>=n)return 0;if(e.heightEstimationActive.value)return function(t,n){let r=e.parsedNodes.value.length,i=F1(Math.trunc(t),0,r),o=F1(Math.trunc(n),i,r);if(i>=o)return 0;let s=a();return(s[o]??0)-(s[i]??0)}(t,n);if(e.heightTreeSize.value!==e.parsedNodes.value.length){let r=0;for(let i=t;it<=0?0:e.fenwickRangeSum(i,0,t)+(t-e.fenwickRangeSum(a,0,t))*r,s=0,c=n.length-1,l=n.length-1;for(;s<=c;){let e=s+c>>1;o(e+1)>=t?(l=e,c=e-1):s=e+1}return l}let r=t;for(let t=0;t0||t++}return t}return{markFallbackHeightPrefixDirty:function(){t=!0},getFallbackNodeHeight:i,estimateHeightRange:s,estimateIndexForOffset:c,estimateIndexForOffsetFromEnd:function(t){let n=e.parsedNodes.value;if(!n.length)return 0;if(t<=0)return Math.max(0,n.length-1);if(e.heightEstimationActive.value){let e=a()[n.length]??0;return o(Math.max(0,e-t))}if(e.heightTreeSize.value===n.length){let e=s(0,n.length);return c(Math.max(0,e-t))}let r=t;for(let t=n.length-1;t>=0;t--){let n=e.nodeHeights[t]??e.averageNodeHeight.value;if(r<=n)return t;r-=n}return 0},getEstimatedNodeHeightCount:l,buildVirtualHeightSummary:function(t){let n=e.parsedNodes.value.length;return{totalNodes:n,measuredCount:e.heightStats.count,estimatedCount:l(),averageNodeHeight:e.averageNodeHeight.value,topSpacerHeight:t.topSpacerHeight,bottomSpacerHeight:t.bottomSpacerHeight,estimatedTotalHeight:s(0,n),width:t.width??e.getContainerWidth()}}}}({parsedNodes:yt,nodeHeights:Qn,heightStats:$n,heightTreeSize:er,heightSumTree:tr,heightKnownTree:nr,averageNodeHeight:rr,heightEstimationActive:zt,estimatedNodeHeights:Ci,getContainerWidth:Ht,hasCustomParagraphComponent:()=>!!gt.value.paragraph,getPrefixCacheKeyParts:()=>{let e=O1(we.value||ft(`getFallbackHeightPrefix.clientWidth`,()=>ge.value?.clientWidth||0)),t=o.virtualScroll?.measurementKey==null?``:String(o.virtualScroll.measurementKey);return[yt.value.length,$n.count,Math.round($n.total),Math.round(100*rr.value),t,e,+!!zt.value,s1.value,Ce.value,+!!gt.value.paragraph]},fenwickRangeSum:dr}),s(()=>yt.value.length,e=>{var t;zn(),e<=0?gr():(ear(t))),e!==er.value&&or(e))},{immediate:!0});let wi=L(()=>{if(!qt.value)return yt.value.map((e,t)=>({node:e,index:t}));let e=yt.value.length,t=ui(Dr.start,0,e),n=ui(Dr.end,t,e);return yt.value.slice(t,n).map((e,n)=>({node:e,index:t+n}))}),Ti=L(()=>qt.value?Vn(0,Math.min(Dr.start,yt.value.length)):0),Ei=L(()=>{if(!qt.value)return 0;let e=yt.value.length;return Vn(Math.min(Dr.end,e),e)});function Di(){return Fn.buildVirtualHeightSummary({topSpacerHeight:Ti.value,bottomSpacerHeight:Ei.value,width:Fi()})}function Oi(){let e=yt.value;return lY(cY({},Di()),{probe:{paragraphReady:!!Te.value.paragraph,listItemReady:!!Te.value.listItem,listWrapperOverhead:Te.value.listWrapperOverhead,headingReadyLevels:Object.entries(Te.value.headings).filter(([,e])=>!!e).map(([e])=>Number(e))},nodes:e.map((e,t)=>({index:t,type:e.type,estimateKind:Ci.value[t]?.kind??null,rendererKind:Ci.value[t]?.rendererKind??null,estimatedHeight:Ci.value[t]?.height??null,estimatedContentHeight:Ci.value[t]?.contentHeight??null,measuredHeight:Qn[t]??null}))})}function ki(){return o.indexKey==null?Pt.value?`virtual-${ji()}`:`markdown-renderer`:String(o.indexKey)}function Ai(e){let t=String(e),n=`${ki()}-`;if(!t.startsWith(n))return null;let r=t.slice(n.length).match(/^(\d+)(?:$|-)/);if(!r)return null;let i=Number(r[1]);return!Number.isInteger(i)||i<0||i>=yt.value.length?null:i}function ji(){let e=o.virtualScroll?.sessionKey;return String(e!=null&&e!==``?e:o.indexKey??G.customId??pt)}function J(){let e=o.virtualScroll?.threadKey;return e==null||e===``?void 0:String(e)}let Mi=L(()=>J()??String(o.indexKey??G.customId??pt));function Ni(e){return(e??``)===(J()??``)}function Pi(){var e,t;return e=o.virtualScroll?.measurementKey,t=function(){let e=A.value;return function(e){let t=e.renderer,n=t===`monaco`?e.codeBlockMonacoOptions:void 0,r=e.codeBlockProps,i=t===`shiki`;return[e.isDark?`dark`:`light`,t===`monaco`?`code-rich`:t===`pre`?`code-pre`:`code-shiki`,!1===e.codeBlockStream?`code-static`:`code-stream`,k0(e.codeBlockMinWidth),k0(e.codeBlockMaxWidth),...i?[rq(r?.themes??e.themes,r?.langs??e.langs)]:[],k0(n?.fontSize),k0(n?.lineHeight),k0(n?.fontFamily),k0(n?.tabSize),k0(n?.MAX_HEIGHT),k0(n?.wordWrap),k0(n?.wrappingIndent),k0(n?.padding),k0(r?.showHeader),k0(r?.showCopyButton),k0(r?.showExpandButton),k0(r?.showPreviewButton),k0(r?.showCollapseButton),k0(r?.showFontSizeButtons)].join(`\0`)}({renderer:e,isDark:G.isDark,codeBlockStream:G.codeBlockStream,codeBlockMinWidth:G.codeBlockMinWidth,codeBlockMaxWidth:G.codeBlockMaxWidth,codeBlockMonacoOptions:e===`monaco`?G.codeBlockMonacoOptions:void 0,codeBlockProps:G.codeBlockProps,themes:e===`shiki`?G.themes:void 0,langs:e===`shiki`?G.langs:void 0})}(),[e==null?``:String(e),t].join(`\0`)}function Fi(){return Ht()}let Ii=L(()=>O1(Fi())),Li=L(()=>[Pi(),Ii.value].join(`\0`)),Ri=L(()=>Pt.value?[`virtual`,J()??``,ji(),Li.value].join(`\0`):o.indexKey);function zi(){Br.value+=1}function Bi(e){return!(!e||!Number.isInteger(e.index)||e.index<0||e.index>=yt.value.length||e.sessionKey!==ji()||e.threadKey!==J()||e.layoutEpochKey!==Li.value)}function Vi(e){let t=String(e),n=zr.get(t);return n?Bi(n)?n.index:null:Ai(t)}function Hi(e=`async-node`){(Rr.size||zr.size)&&(Rr.clear(),zr.clear(),zi(),oo(e))}let Ui=m(pq,null),Wi={reportHeight(e,t){if(!Lt.value)return;let n=Vi(e);if(n==null)return;let r=kr.get(n);if(!r)return;let i=Number(t),a=yr(n,r);(function(e,t,n={}){mr(()=>vr(e,t,n))})(n,Number.isFinite(i)&&i>0?Math.max(i,a||0):a)},markPending(e){if(!Lt.value)return;let t=Ai(e);t!=null&&function(e,t){let n=zr.get(e);if(n&&Bi(n))return Rr.set(e,Math.max(0,Rr.get(e)??0)+1),zi(),void oo(`async-node`);Rr.set(e,1),zr.set(e,function(e){return{index:e,sessionKey:ji(),threadKey:J(),layoutEpochKey:Li.value}}(t)),zi(),oo(`async-node`)}(String(e),t)},markSettled(e){if(!Lt.value)return;let t=String(e),n=Vi(e);(n!=null||function(e){return Rr.has(String(e))}(t))&&function(e){let t=Rr.get(e)??0;return!(t<=0||(t<=1?(Rr.delete(e),zr.delete(e)):Rr.set(e,t-1),zi(),t===1&&oo(`async-node`),0))}(t)&&n!=null&&ho()}};function Gi(){let e=0;for(let t of kr.values())e+=ft(`getVisibleDomHeight.offsetHeight`,()=>t?.offsetHeight??0);return Math.ceil(Math.max(0,e))}d(pq,{reportHeight(e,t){Wi.reportHeight(e,t),Ui?.reportHeight(e,t)},markPending(e){Wi.markPending(e),Ui?.markPending(e)},markSettled(e){Wi.markSettled(e),Ui?.markSettled(e)}});let Ki,qi=null,Ji=null;function Yi(e){return!1!==e&&e!=null&&e!==``}function Xi(){return qt.value?function(){if(!qt.value)return!0;let e=yt.value.length,t=ui(Dr.start,0,e),n=ui(Dr.end,t,e);if(t>=n)return!0;for(let e=t;e=Ur.value}function Zi(){return!0===qe.value&&!Ye.value&&Vr.value===0&&Pr.size===0&&Nr.size===0&&Hr==null&&Xi()}function Qi(){if(o.virtualScroll?.settleMode!==`manual`||qi===ji()&&Ki===J())return!0;let e=o.virtualScroll?.settledToken;return!!Yi(e)&&Ji===Do(e)}function $i(){return Zi()&&Qi()}function ea(e,t){return t.totalNodes<=0?e===`final`?`final`:`estimate`:t.measuredCount>=t.totalNodes?e===`final`?`final`:`measured`:t.measuredCount>0||t.estimatedCount>0?`mixed`:`estimate`}function ta(e=`manual`,t){let n=Di(),r=function(e){return e||(!0===qe.value?!Xi()||Nr.size>0||Hr!=null?`measuring`:$i()?`settled`:`settling`:yt.value.length>0?`streaming`:`estimating`)}(t);return{sessionKey:ji(),threadKey:J(),phase:r,nodeCount:n.totalNodes,liveRange:{start:Dr.start,end:Dr.end},renderedCount:ln.value,measuredCount:n.measuredCount,estimatedCount:n.estimatedCount,averageNodeHeight:n.averageNodeHeight,topSpacerHeight:n.topSpacerHeight,bottomSpacerHeight:n.bottomSpacerHeight,visibleDomHeight:Gi(),totalHeight:ra(),width:n.width,final:!0===qe.value,stable:$i(),confidence:ea(r,n),reason:e}}function na(){let e=Nn.value||Be(),t=ge.value;if(!e||!t)return null;let n=e.ownerDocument||t.ownerDocument||document,r=e===n.documentElement||e===n.body||e===n.scrollingElement;return{root:e,doc:n,isViewportRoot:r,scrollTop:ft(`getScrollBox.scrollTop`,()=>He(e,n,r)),scrollHeight:ft(`getScrollBox.scrollHeight`,()=>r?Math.max(n.documentElement?.scrollHeight??0,n.body?.scrollHeight??0,e.scrollHeight??0):e.scrollHeight),clientHeight:ft(`getScrollBox.clientHeight`,()=>r?n.documentElement?.clientHeight||e.clientHeight||0:e.clientHeight)}}function ra(){let e=yt.value.length,t=Math.max(0,Vn(0,e)),n=ft(`getRendererLogicalHeight.offsetHeight`,()=>ge.value?.offsetHeight??0),r=Math.max(0,n>0?n:ft(`getRendererLogicalHeight.scrollHeight`,()=>ge.value?.scrollHeight??0));return e<=0?Math.ceil(n):qt.value?t>0?Math.max(1,Math.ceil(t),function(){let e=Ti.value+Ei.value;for(let t of _n.values())t&&(e+=Math.max(0,ft(`getVirtualizedDomLogicalHeight.offsetHeight`,()=>t.offsetHeight||0)));return Math.ceil(Math.max(0,e))}(),function(e,t){return e<=0||t<=0?0:t<=e+Math.max(512,.05*e)?Math.ceil(t):0}(t,r)):Math.max(1,Math.ceil(r)):Lt.value?t>0||$n.count>0||Fn.getEstimatedNodeHeightCount()>0?(cn.value&&ln.value,Math.max(1,Math.ceil(r),Math.ceil(t))):Math.ceil(r):Math.max(1,Math.ceil(r),Math.ceil(t))}function ia(e){let t=ge.value;if(!t)return null;let n=ft(`getRendererBottomDistanceFromViewport.getBoundingClientRect`,()=>t.getBoundingClientRect());return function(e){return e.isViewportRoot?e.clientHeight:ft(`getViewportBottomInRoot.getBoundingClientRect`,()=>e.root.getBoundingClientRect().bottom)}(e)-n.bottom}function aa(e={}){let t=!1!==e.requireViewport,n=function(e=64){let t=na(),n=ge.value;if(!t||!n)return!1;let r=function(e){if(e.isViewportRoot)return{top:0,bottom:e.clientHeight};let t=ft(`getVirtualViewportRect.getBoundingClientRect`,()=>e.root.getBoundingClientRect());return{top:t.top,bottom:t.bottom}}(t),i=ft(`isRendererNearVirtualViewport.getBoundingClientRect`,()=>n.getBoundingClientRect());return i.bottom>=r.top-e&&i.top<=r.bottom+e}();if(t&&!n)return null;let r=function(){let e=na(),t=ge.value;if(!e||!t||Math.max(0,e.scrollHeight-e.scrollTop-e.clientHeight)>64)return null;let n=ia(e);return n==null?null:n>=-8&&n<=160?{type:`bottom`,distanceFromBottomPx:Math.max(0,n)}:null}();if(r)return{anchor:r,captured:!0};let i=Yn();if(i)return{anchor:{type:`node`,nodeIndex:i.nodeIndex,offsetWithinNodePx:i.offsetWithinNodePx},captured:n};if(!0===e.allowFallback){let e=function(){let e=yt.value.length;return e<=0?null:{type:`node`,nodeIndex:ui(Er.value,0,Math.max(0,e-1)),offsetWithinNodePx:0}}();return e?{anchor:e,captured:!1}:null}return null}function oa(e){let t=2166136261;for(let n=0;n>>0).toString(36)}function sa(e,t){let n=e;for(let e=0;e8192?`${e.slice(0,8192)}...${e.length}`:e;return`${e.length}:${oa(t)}`}(e)}`;if(typeof e==`function`)return`fn`;if(typeof e!=`object`)return typeof e;if(t.has(e))return`cycle`;if(n>=6)return`max-depth`;t.add(e);try{if(Array.isArray(e)){if(e.length<=160){let r=[];for(let i=0;i=a&&i.push(c)}return[`a:${e.length}`,`h=${r.join(`,`)}`,`t=${i.join(`,`)}`,`all=${(o>>>0).toString(36)}`].join(`:`)}let r=e,i=Object.keys(r).filter(e=>{let t=r[e];return e!==`parent`&&e!==`el`&&e!==`component`&&(t==null||typeof t==`string`||typeof t==`number`||typeof t==`boolean`||ca.has(e))}).sort();return`o:${i.length}:${i.map(e=>`${e}=${la(r[e],t,n+1)}`).join(`;`)}`}finally{t.delete(e)}}let ua=-1,da=``,fa=[2166136261];function pa(e){let t=yt.value[e];return t?oa(la(t)):``}function ma(e,t){let n=e;for(let e=0;e>>0}function ha(){let e=Ce.value;if(ua===e)return da;let t=yt.value.length,n=di(t);(ua!==e-1||n>t||fa.length>>0).toString(36),ua=e,da}function ga(e,t={}){let n=!0===t.includeHeightCache,r=t.includeContentHash??n,i=n?function(e){let t=function(){let e=Number(o.virtualScroll?.heightCacheLimit??5e3);return!Number.isFinite(e)||e<=0?1/0:Math.max(1,Math.trunc(e))}();if(!Number.isFinite(t)||e.length<=t)return e;let n=new Map,r=e=>{!e||n.size>=t||n.set(e.index,e)},i=yt.value.length,a=ui(Dr.start-2*Kt.value,0,i),s=ui(Dr.end+2*Kt.value,a,i);for(let t of e)t.index>=a&&t.index=0&&n.sizee.index-t.index).slice(0,t)}(lr().map(e=>{let t=yt.value[e.index];return t?lY(cY({},e),{nodeType:String(t.type??``),signature:pa(e.index)}):null}).filter(e=>!!e)):[],a=aa({allowFallback:!0===t.allowAnchorFallback,requireViewport:t.requireViewport});return a||i.length||!0===t.includeEmptyState?lY(cY({sessionKey:e.sessionKey,threadKey:e.threadKey},a?{anchor:a.anchor,anchorCaptured:a.captured}:{anchorCaptured:!1}),{metrics:e,width:e.width,contentHash:r?ha():void 0,measurementKey:Pi()||void 0,heightCache:i.length?i:void 0}):null}function _a(e){var t,n;let r=na();if(!r)return;let i=function(e){let t=ge.value;if(!t)return null;let n=Ue(t,e.root),r=yt.value.length,i=ft(`getRendererBottomOffsetWithinRoot.offsetHeight`,()=>t.offsetHeight||0),a=Math.max(0,i>0?i:r>0?ft(`getRendererBottomOffsetWithinRoot.scrollHeight`,()=>t.scrollHeight||0):0),o=ra();return n+Math.max(a,o)}(r);if(i==null)return;let a=Math.max(0,e.distanceFromBottomPx),o=Math.max(0,i-r.clientHeight-a);(function(e){Ln=Xa()+120,Rn=e})(o),r.isViewportRoot?(n=(t=r.doc.defaultView)?.scrollTo)==null||n.call(t,0,o):x1(r.root,r.doc,o,{isReverseFlexScrollRoot:Ve,getNormalizedScrollTop:He})}let va=[];function ya(){if(q)for(In!=null&&(en?.(In),In=null);va.length;){let e=va.pop();e!=null&&window.clearTimeout(e)}}function ba(e){let t=!!Pn.value;Pn.value=null,Ln=0,Rn=null,ya(),t&&e&&oo(e)}function xa(){if(!Pn.value||!q||In!=null)return;let e=()=>{In=null;let e=Pn.value;e&&_a(e)};In=$t?$t(e):null,In??e()}function Sa(e,t={}){let n=yt.value.length;return n<=0?[]:e.filter(e=>!(!Number.isInteger(e.index)||e.index<0||e.index>=n)&&!(!Number.isFinite(e.height)||e.height<=0)&&!(t.requireSignature&&!e.signature)&&!(t.requireCompatibilityMetadata&&!e.nodeType&&!e.signature)&&function(e){let t=yt.value[e.index];return!(!t||e.nodeType&&e.nodeType!==String(t.type??``)||e.signature&&e.signature!==pa(e.index))}(e))}function Y(e){let t=O1(Fi()),n=O1(e);return t!==-1&&n!==-1&&t===n}function Ca(e){let t=Number(e?.width);if(Number.isFinite(t)&&t>0)return t;let n=Number(e?.metrics?.width);return Number.isFinite(n)&&n>0?n:null}function wa(e){return e.sessionKey===ji()&&!!Ni(e.threadKey)&&(e.measurementKey??``)===Pi()&&!!Y(Ca(e))&&!!function(e){let t=e.heightCache;return!!t?.length&&(Ta(e)?t.some(e=>!!(e.nodeType||e.signature)):t.some(e=>!!e.signature))}(e)}function Ta(e){return!!(e.contentHash&&e.contentHash===ha())}function Ea(e){return!Ta(e)}let Da=null,Oa=null,ka=null,Aa=null,ja=null;function Ma(e){let t=e.map(e=>[e.index,Math.round(10*e.height),e.nodeType??``,e.signature??``].join(``)).join(``),n=O1(Fi());return[J()??``,ji(),Pi(),yt.value.length,n,e.length,oa(t)].join(`:`)}function Na(e=(e=>(e=o.virtualScroll)?.heightCache)()){if(!Lt.value||!e?.length||yt.value.length<=0||!Y((t=o.virtualScroll)?.heightCacheWidth))return!1;var t;let n=Sa(e,{requireSignature:!0});if(!n.length)return!1;let r=Ma(n);return r===Da?(Oa=`standalone`,!0):(br(n,{mode:`merge`}),zn(),Da=r,Oa=`standalone`,eo(),oo(`restore`),!0)}function Pa(e,t={}){if(!Lt.value||!e||e.sessionKey!==ji()||!Ni(e.threadKey)||yt.value.length<=0)return!1;let r=!!e.heightCache?.length&&!Fa(),i=!e.anchor||!1===e.anchorCaptured&&!0!==t.allowUncapturedAnchor?null:e.anchor,a=!0===t.restoreAnchor&&!!i&&!Fa()&&Number(Ca(e))>0,o=!1;if(e.heightCache?.length&&wa(e)){let t=Sa(e.heightCache,{requireCompatibilityMetadata:!e.contentHash,requireSignature:Ea(e)});t.length&&(br(t,{mode:`merge`}),zn(),Da=Ma(t),Oa=`restore`,eo(),o=!0)}if(r||a)return!1;if(!t.restoreAnchor||!i)return o&&oo(`restore`),!0;let s=function(e,t){let n=e.anchor,r=n?n.type===`bottom`?`bottom:${Math.round(n.distanceFromBottomPx)}`:`node:${n.nodeIndex}:${Math.round(n.offsetWithinNodePx)}`:`none`;return[J()??``,ji(),Pi(),Ii.value,t,r].join(`:`)}(e,t.restoreToken??`imperative`);return ka===s?(o&&oo(`restore`),!0):(ka=s,function(e){let t=()=>{if(e.type===`node`)return ba(),void Xn({nodeIndex:e.nodeIndex,offsetWithinNodePx:e.offsetWithinNodePx});if(qn(),Un.value=null,Pn.value=e,ya(),_a(e),q)for(let e of[0,120,280,480])va.push(window.setTimeout(()=>{let e=Pn.value;e&&_a(e)},e))};(function(e){if(!qt.value)return!1;let t=yt.value.length;return!(t<=0||(Er.value=e.type===`node`?ui(e.nodeIndex,0,t-1):t-1,Or(),0))})(e)?n(t):t()}(i),oo(`restore`),!0)}function Fa(){let e=Fi();return Number.isFinite(e)&&e>0}function Ia(e){return e.sessionKey===ji()&&!!Ni(e.threadKey)&&(yt.value.length<=0||!(!e.heightCache?.length||Fa())||!(!(e.anchor&&Number(Ca(e))>0)||Fa()))}function La(){Sn.clear();for(let e of Object.keys(Qn)){let t=Number(e);Number.isInteger(t)&&t>=0&&t{let t=!1,n=null,r=()=>{t||(t=!0,n!=null&&window.clearTimeout(n),e())};if($t)return $t(r),void(n=window.setTimeout(r,50));n=window.setTimeout(r,0)})}function Ba(e,t=J(),n=Li.value){return ji()===e&&J()===t&&Li.value===n}function Va(){return uY(this,arguments,function*(e={}){let t=ji(),r=J(),i=Li.value,a=e.frames??2,s=e.timeoutMs??120,c=e.reason??`manual`,l=e.expectedSettledTokenKey,u=!0===e.flushPendingTimers,d=ta(c),f=()=>lY(cY({},d),{phase:d.final?`settling`:d.phase,stable:!1,confidence:d.confidence===`final`?`mixed`:d.confidence,reason:c}),p=()=>Ba(t,r,i)&&(l==null||Qa()===l);for(let e=0;ewindow.setTimeout(t,e))}(s),!p()||(u&&qr(),ho(),Ra(),!p()))return f();let m=Zi();m&&(qi=t,Ki=r,o.virtualScroll?.settleMode===`manual`&&l!=null&&Yi(o.virtualScroll?.settledToken)&&Qa()===l&&(Ji=Do(o.virtualScroll.settledToken)));let h=ta(c,p()&&m&&Qi()?`final`:void 0);return ro(h,!0),h})}let Ha=`content`,Ua=null,Wa=null,Ga=0,Ka=null,qa=null,Ja=null,Ya=null;function Xa(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function Za(e){let t=Ka;if(!t)return!0;let n=o.virtualScroll?.heightDiffThresholdPx??1;return Math.abs(e.totalHeight-t.totalHeight)>n||e.sessionKey!==t.sessionKey||e.phase!==t.phase||e.stable!==t.stable||e.final!==t.final||e.threadKey!==t.threadKey||e.nodeCount!==t.nodeCount||e.measuredCount!==t.measuredCount||e.width!==t.width}function Qa(e=(e=>(e=o.virtualScroll)?.settledToken)()){return k0(e)}function $a(e,t){return[e,t.sessionKey,t.threadKey??``,Pi(),ha(),k0(o.virtualScroll?.settledToken),Math.round(t.totalHeight),Math.round(t.width)].join(`\0`)}function eo(){Ja=null,Ya=null,qa=null}function to(e){let t=e.heightCache;return t?.length?Ma(t):``}function no(e){let t=e.metrics,n=e.anchor?(r=e.anchor).type===`bottom`?`bottom:${Math.round(r.distanceFromBottomPx)}`:`node:${r.nodeIndex}:${Math.round(r.offsetWithinNodePx)}`:`none`;var r;return[e.sessionKey,e.threadKey??``,e.measurementKey??Pi(),e.contentHash??``,to(e),n,+!!e.anchorCaptured,t.liveRange.start,t.liveRange.end,t.renderedCount,t.nodeCount,Math.round(t.totalHeight),Math.round(t.width),t.phase,+!!t.stable].join(`\0`)}function ro(e,t=!1){if(!Lt.value||function(e=!1){return!e&&Pt.value&&!Rt.value}(t))return;let n=t||Za(e),r=function(e,t=!1){return t||e.stable||e.phase===`final`?{state:ga(e,{includeHeightCache:!0})}:{state:ga(e)}}(e,t).state,i=!!(r&&(n||function(e,t=!1){return!!t||no(e)!==qa}(r,t)));if(n&&(K(e),Ka=e,Ga=Xa()),r&&i&&(pe(r),r.anchor&&me(r.anchor),qa=no(r)),e.stable){let t=$a(`settled`,e);if(t!==Ja){Ja=t;let n=ga(e,{includeHeightCache:!0});n&&(pe(n),qa=no(n)),function(e){l(`render-settled`,e)}(e)}}if(e.phase===`final`){let t=$a(`final`,e);if(t!==Ya){Ya=t;let n=ga(e,{includeHeightCache:!0});n&&(pe(n),qa=no(n)),function(e){l(`render-final`,e)}(e)}}}function io(){Ua!=null&&(en?.(Ua),Ua=null),Wa!=null&&q&&(window.clearTimeout(Wa),Wa=null)}function ao(){Ua=null,Wa=null,function(e){if(Nr.size>0||Hr!=null)return!0;switch(e){case`node-resize`:case`async-node`:case`resize`:case`restore`:case`final`:case`manual`:return!0;default:return!1}}(Ha)&&(ho(),Ra()),ro(ta(Ha))}function oo(e){if(!Lt.value||(Ha=e,Ua!=null||Wa!=null))return;let t=Math.max(0,o.virtualScroll?.emitIntervalMs??32),n=Math.max(0,t-(Xa()-Ga)),r=()=>{Wa=null,Ua=$t?$t(ao):null,Ua??ao()};q&&n>0?Wa=window.setTimeout(r,n):r()}function so(){jn.value+=1}function co(e){if(cn.value&&e>=ln.value){let t=yt.value[e],n=!0===Ke.value&&!0!==qe.value&&e>=yt.value.length-2,r=t?.type===`code_block`||t?.type===`image`||t?.type===`mermaid`||t?.type===`infographic`;if(!n||r)return!1}return!xr.value||e=Ae.value&&(xe.value||(xe.value=!0,oi()),!wr.value||!Qt))return lo(e),void(t&&ii(e,!0));if(e{if(ni.delete(e),!xr.value||$r.value.has(e))return;let t=_n.get(e);if(!t)return;let n=Be(t),r=t.ownerDocument||document,i=r.defaultView||window,a=!n||n===r.documentElement||n===r.body,o=!a&&n?ft(`nodeVisibilityFallback.root.getBoundingClientRect`,()=>n.getBoundingClientRect()):null,s=a?0:o.top,c=a?ft(`nodeVisibilityFallback.clientHeight`,()=>i.innerHeight??n?.clientHeight??0):o.bottom,l=ft(`nodeVisibilityFallback.node.getBoundingClientRect`,()=>t.getBoundingClientRect());l.bottom>=s-500&&l.top<=c+500&&ii(e,!0)},1800+t);ni.set(e,n)}(e);let i=null;i=s(()=>r.isVisible.value,t=>{if(t){ri(e),ii(e,!0),i?.(),ti.delete(e),ei.get(e)===r&&ei.delete(e);try{r.destroy()}catch{}}},{immediate:!0}),ti.set(e,i),qt.value&&Qr()}function fo(){Hr=null,mr(()=>{let e=!1;for(let[t,n]of Nr)Nr.delete(t),kr.get(t)===n.el&&Ar.get(t)===n.version&&(e=vr(t,n.height,{allowShrink:n.allowShrink})||e);return e})}function po(){Hr!=null&&(en?.(Hr),Hr=null),Nr.clear()}function mo(e,t){(function(e,t,n){if(!Number.isFinite(n)||n<=0||kr.get(e)!==t)return;let r=Ar.get(e);if(r==null)return;let i=yt.value[e],a=Ye.value&&!0!==qe.value&&!o.nodes?.length&&e>=yt.value.length-2,s=!(!0===i?.loading||a),c=Nr.get(e),l=c?c.allowShrink&&s:s,u=c&&!l?Math.max(c.height,n):n;Nr.set(e,{height:u,allowShrink:l,version:r,el:t}),Hr??(Hr=$t?$t(fo):null,Hr??fo())})(e,t,yr(e,t))}function ho(){for(let[e,t]of kr)t&&mo(e,t)}function go(){bn?.disconnect(),bn=null,vn.clear()}function _o(){for(;Mr.length;)Kr(Mr.pop())}s(Rt,e=>{e&&oo(`content`)},{flush:`post`}),t({getVirtualMetrics:ta,captureVirtualState:function(e={}){var t;return ga(ta(`manual`),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!0===e.allowFallbackAnchor,requireViewport:!0===e.requireViewport,includeEmptyState:(t=e.includeEmptyState)==null||t})},restoreVirtualState:function(e,t={}){let n=!0===t.restoreAnchor,r=t.restoreToken==null?`imperative`:String(t.restoreToken);Aa=e,ja={restoreAnchor:n,restoreToken:r,allowUncapturedAnchor:!0===t.allowUncapturedAnchor},!Pa(e,{restoreAnchor:n,restoreToken:r,allowUncapturedAnchor:!0===t.allowUncapturedAnchor})&&Ia(e)||(Aa=null,ja=null)},forceMeasure:function(e=`manual`){return uY(this,null,function*(){yield n(),yield za(),ho(),Ra(),yield n();let t=ta(e);return ro(t,!0),t})},settle:Va,scrollToNode:function(e,t=`start`){ba(),qn();let r=yt.value.length;if(r<=0)return;let i=ui(e,0,r-1),a=()=>{let e=Kn({nodeIndex:i,offsetWithinNodePx:0}),n=Bn(i),r=na()?.clientHeight??0,a=Wn(),o=e;if(t===`center`)o=e-r/2+n/2;else if(t===`end`)o=e-r+n;else if(t===`nearest`&&a!=null){if(e>=a&&e+n<=a+r)return;o=eJt.value,e=>{if(!e){go();for(let e of jr.values())for(let t of e)Kr(t);jr.clear(),Ar.clear(),_o(),po()}},{immediate:!0}),s(qe,e=>{e&&function(){if(q&&qe.value&&kr.size){_o();for(let e of[80,240,640]){let t=Gr(e,()=>{for(let[e,t]of kr)t&&mo(e,t)},`final`);t!=null&&Mr.push(t)}}}(),oo(e?`final`:`content`)});let vo=S1(()=>oo(`content`),16),yo=S1(()=>oo(`batch`),16);s([()=>yt.value.length,()=>ln.value],()=>{Pn.value&&xa(),vo()},{flush:`post`,immediate:!0}),s([()=>Dr.start,()=>Dr.end],()=>{yo()},{flush:`post`});let{cleanupBatchScheduler:bo}=function(e){let{props:t,isClient:r,isTestEnv:i,parsedNodesIdentity:a,parsedNodeCount:o,desiredRenderedCount:c,datasetKey:l,batchingEnabled:u,incrementalRenderingActive:d,resolvedBatchSize:f,resolvedInitialBatch:p,renderedCount:m,adaptiveBatchSize:h,previousRenderContext:g,previousBatchConfig:_,requestFrame:v,cancelFrame:y,hasIdleCallback:b,cleanupNodeVisibility:x,onDatasetKeyChanged:S,onDatasetChanged:C}=e,w=null,T=`raf`,E=null,D=0,O=!1,k=!1,A=new Set,j=new Set;function M(){if(r){w!=null&&(T===`raf`&&y?y(w):T===`idle`&&typeof window.cancelIdleCallback==`function`?window.cancelIdleCallback(w):T===`timeout`&&window.clearTimeout(w),w=null),D+=1;for(let e of A)y&&y(e);for(let e of j)window.clearTimeout(e);A.clear(),j.clear(),E=null,O=!1,k=!1}}function N(){return typeof performance<`u`?performance.now():Date.now()}function ee(e){(function(e){if(!d.value)return;let n=Math.max(2,t.renderBatchBudgetMs??6),r=Math.max(1,f.value||1),i=Math.max(1,Math.floor(r/4));e>1.5*n?h.value=Math.max(i,Math.floor(.8*h.value)):e<.6*n&&h.value=o)return;let s=Math.max(1,e),l=()=>{let e=N();w=null;let i=E??s;E=null;let a=N();m.value=Math.min(o,m.value+i),x(m.value),function(e,i){if(!r)return void ee(i);O=!0;let a=++D;n().then(()=>{if(a!==D)return;let n=N(),r=Math.max(i,n-e),o=()=>{a===D&&ee(r)};if(v){let e=null,n=null,r=!1,i=()=>{r||(r=!0,e!==null&&(A.delete(e),e=null),n!==null&&(j.delete(n),window.clearTimeout(n),n=null),o())};e=v(()=>{i()}),A.add(e),n=window.setTimeout(()=>{e!==null&&y&&y(e),i()},Math.max(32,t.renderBatchIdleTimeoutMs??120)),j.add(n);return}let s=window.setTimeout(()=>{j.delete(s),o()},0);j.add(s)})}(e,N()-a)};if(!r||a.immediate)return void l();let u=Math.max(0,t.renderBatchDelay??16);if(E=E==null?s:Math.max(E,s),w==null){if(!i&&b&&window.requestIdleCallback){let e=Math.max(0,t.renderBatchIdleTimeoutMs??120);T=`idle`,w=window.requestIdleCallback(()=>l(),{timeout:e});return}if(v&&!i)return T=`raf`,void(w=v(()=>{u===0?l():(T=`timeout`,w=window.setTimeout(()=>l(),u))}));T=`timeout`,w=window.setTimeout(()=>l(),u)}}function F(e,t={}){O?k=!0:e==null?I():P(e,t)}function I(){d.value&&P(u.value?Math.max(1,Math.round(h.value)):Math.max(1,f.value))}return s([a,o,l,d,f,p,()=>t.renderBatchDelay],()=>{let e=o.value,n=g.value,i=l.value,a=!Object.is(i,n.key),s=e!==n.total,u=a||s;g.value={key:i,total:e};let v=_.value,y=t.renderBatchDelay??16,b=v.batchSize!==f.value||v.initial!==p.value||v.delay!==y||v.enabled!==d.value;_.value={batchSize:f.value,initial:p.value,delay:y,enabled:d.value},a&&S(e),(u||b||!d.value)&&M(),(u||b)&&(h.value=Math.max(1,f.value||1)),u&&C();let w=c.value;if(!e)return m.value=0,void x(0);if(!d.value)return m.value=w,void x(m.value);m.value=a||n.total===0||b?Math.min(w,p.value):Math.min(m.value,w);let T=Math.max(1,p.value||f.value||e);m.value{d.value&&(typeof t==`number`&&e<=t||e>m.value&&F())}),{cleanupBatchScheduler:M}}({props:G,isClient:q,isTestEnv:nn,parsedNodesIdentity:Ct,parsedNodeCount:wt,desiredRenderedCount:Ur,datasetKey:Ri,batchingEnabled:sn,incrementalRenderingActive:cn,resolvedBatchSize:an,resolvedInitialBatch:on,renderedCount:ln,adaptiveBatchSize:dn,previousRenderContext:un,previousBatchConfig:fn,requestFrame:$t,cancelFrame:en,hasIdleCallback:tn,cleanupNodeVisibility:ai,onDatasetKeyChanged:e=>{po(),gr(),zn(),eo(),e>0&&or(e)},onDatasetChanged:()=>{qt.value&&Qr({immediate:!0})}});s([Tr,qt,()=>ge.value,()=>je()],([e,t])=>{if(!e)return si(),void Zr();ci(),t?Qr({immediate:!0}):Zr()},{flush:`post`,immediate:!0}),s([()=>yt.value.length,()=>qt.value],e=>uY(null,[e],function*([e,t]){t&&e&&q&&(yield n(),Qr({immediate:!0}))}),{flush:`post`}),s(zt,e=>{e&&function(){if(Tt.value&&Et.value&&Dt.value&&Ot.value?.[1])return;let e=g({type:`paragraph`,children:[{type:`text`,content:`Probe paragraph text`,raw:`Probe paragraph text`}],raw:`Probe paragraph text`}),t=g({type:`list_item`,children:[e],raw:`- Probe paragraph text`}),n=g({type:`list`,ordered:!1,items:[t],raw:`- Probe paragraph text`});Tt.value=e,Et.value=t,Dt.value=n;let r={1:null,2:null,3:null,4:null,5:null,6:null};for(let e=1;e<=6;e++)r[e]=g({type:`heading`,level:e,text:`Probe heading`,children:[{type:`text`,content:`Probe heading`,raw:`Probe heading`}],raw:`${`#`.repeat(e)} Probe heading`});Ot.value=r}()},{immediate:!0}),s([()=>ge.value,zt],()=>{if(!zt.value)return _i(),void(we.value=0);hi(),_i(),zt.value&&ge.value&&typeof ResizeObserver<`u`&&(gi=new ResizeObserver(()=>{hi(),Un.value&&Jn(),Pn.value&&xa(),oo(`resize`)}),gi.observe(ge.value))},{immediate:!0}),s([zt,Ut,Li],()=>uY(null,null,function*(){if(!zt.value)return Te.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void zn();yield n(),function(){if(!zt.value||typeof window>`u`)return Te.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void zn();let e={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},t=pi(fi(_e.value),`.paragraph-node`);e.paragraph=v1(_e.value,t,`pre-wrap`);let n=fi(ve.value)?.querySelector(`.paragraph-node`);e.listItem=v1(ve.value,n,`pre-wrap`);let r=ft(`readSimpleTextProbeProfile.list.offsetHeight`,()=>ye.value?.offsetHeight??0),i=ft(`readSimpleTextProbeProfile.listItem.offsetHeight`,()=>ve.value?.offsetHeight??0);e.listWrapperOverhead=Math.max(0,r-i);for(let t=1;t<=6;t++){let n=pi(fi(be[t]),`h${t}`);e.headings[t]=v1(be[t],n,`pre-wrap`)}Te.value=e,zn()}()}),{flush:`post`,immediate:!0}),s(()=>yt.value.length,()=>{qt.value&&Qr({immediate:!0})}),s([zt,we],()=>{zn(),qt.value&&Qr({immediate:!0}),Un.value&&Jn(),Pn.value&&xa(),oo(`resize`)},{immediate:!1}),s(()=>xr.value,e=>{if(e)for(let[e,t]of _n)uo(e,t);else if(oi(),qt.value)Qr({immediate:!0});else for(let[e,t]of _n)t&&ii(e,!0)},{immediate:!1}),s([ke,Ae,()=>je()],()=>{var e;(e=Qt.refresh)==null||e.call(Qt);for(let[e,t]of _n)uo(e,t)},{immediate:!1}),s([()=>G.viewportPriority,()=>yt.value.length,Ae],([e,t,n])=>{if(!1!==e){if(xe.value&&(t<=200||t<=n)){xe.value=!1;for(let[e,t]of _n)uo(e,t)}}else xe.value=!1}),s(()=>ln.value,()=>{qt.value&&Qr({immediate:!0})}),s([Er,Gt,Kt,()=>yt.value.length,qt],()=>{Or()},{immediate:!0});let xo=null,So=!1,Co=null;function wo(){xo=null,qi=null,Ki=void 0,Ji=null,eo()}function To(){po(),gr(),zn(),Sn.clear();let e=yt.value.length;e>0&&or(e),La()}function Eo(){io(),qr(),Ka=null,Da=null,Oa=null,ka=null,Aa=null,ja=null,So=!1,wo(),Hi(`restore`),qn(),ba()}function Do(e){return[J()??``,ji(),Pi(),Ii.value,Qa(e),yt.value.length,Math.round(Vn(0,yt.value.length)),Math.round(Fi()),$n.count,Math.round($n.total)].join(`:`)}function Oo(){return uY(this,null,function*(){let e=o.virtualScroll?.settledToken,t=Qa(e),r=ji(),i=J(),a=Li.value;if(Lt.value&&o.virtualScroll?.settleMode===`manual`&&Yi(e))if(Zi()){if(Do(e)!==Ji&&!So){So=!0;try{let e=yield Va({reason:`manual`,expectedSettledTokenKey:t}),n=Qa()===t;Ba(r,i,a)&&e.sessionKey===r&&e.threadKey===i&&n&&e.stable&&e.phase===`final`&&(Ji=Do(o.virtualScroll?.settledToken))}finally{So=!1,yield n();let e=o.virtualScroll?.settledToken,t=Yi(e)?Do(e):``;Ba(r,i,a)&&t&&Ji!==t&&Oo()}}}else oo(`manual`)})}s(Lt,(e,t)=>{if(e!==t){if(!e)return Eo(),void io();Eo(),To(),Co=Li.value,oo(`content`)}},{flush:`post`}),s([Lt,Li],([e,t])=>{e?Co==null?Co=t:Co!==t&&(Co=t,function(e=`resize`){po(),gr(),zn(),Sn.clear();let t=yt.value.length;t>0&&or(t),La(),Da=null,Oa=null,ka=null,Ka=null,So=!1,wo(),Na(),n(()=>{ho(),Un.value&&Jn(),Pn.value&&xa(),oo(e)})}(`resize`)):Co=null},{flush:`post`,immediate:!0}),s([Lt,()=>ji(),()=>J()],([e])=>{e&&(Eo(),To(),Hi(`content`),oo(`content`))}),s([Lt,()=>ji(),()=>J(),Li,()=>yt.value.length],([e])=>{e&&function(e=`async-node`){let t=!1;for(let[e,n]of Array.from(zr.entries()))Bi(n)||(zr.delete(e),Rr.delete(e),t=!0);t&&(zi(),oo(e))}(`async-node`)},{flush:`post`}),s([Lt,()=>o.virtualScroll?.sessionKey,()=>o.virtualScroll?.measurementKey,()=>o.indexKey,()=>Ce.value],([e])=>{e&&(eo(),function(e=`content`){if(!Lt.value)return;let t=[],n=yt.value.length,r=di(n);for(let e of Array.from(Sn.keys())){if(e>=n){t.push(e);continue}if(e=n&&Sn.delete(e);t.length&&(function(e,t={}){let n=Array.from(e,Number);pr(n);let r=0;if(mr(()=>(r=cr(n,t),r>0)),r>0)(function(e){for(let t of e)Sn.delete(t)})(n);else for(let e of n)On.delete(e)}(t,{notify:!1}),zn(),wo(),Un.value&&Jn(),Pn.value&&xa(),oo(e))}(`content`))},{flush:`post`,immediate:!0}),s([Lt,()=>yt.value.length,()=>ji(),()=>J()],([e,t,n,r],[i,a,o,s])=>{e&&i&&n===o&&r===s&&t!==a&&wo()},{flush:`post`}),s([Lt,()=>o.virtualScroll?.heightCache,()=>o.virtualScroll?.heightCacheWidth,()=>o.virtualScroll?.restoreState,()=>o.virtualScroll?.measurementKey,()=>yt.value.length,()=>ji(),we],()=>{Na()},{flush:`post`,immediate:!0}),s([Lt,()=>o.virtualScroll?.restoreState,()=>o.virtualScroll?.restoreAnchor,()=>o.virtualScroll?.measurementKey,()=>yt.value.length,()=>ji(),we],e=>uY(null,[e],function*([e,t]){if(!e||!t)return;yield n();let r=function(){let e=o.virtualScroll?.restoreAnchor;return e==null||!1===e?null:!0===e?`true`:String(e)}();Pa(t,{restoreAnchor:r!=null,restoreToken:r??void 0})}),{flush:`post`,immediate:!0}),s([Lt,we,()=>o.virtualScroll?.restoreState,()=>o.virtualScroll?.measurementKey],([e])=>{if(!e)return;let t=o.virtualScroll?.restoreState;t&&Da&&Oa===`restore`&&(wa(t)||(To(),Da=null,Oa=null,oo(`resize`)))},{flush:`post`}),s([Lt,()=>yt.value.length,()=>ji(),we],e=>uY(null,[e],function*([e]){let t=Aa,r=ja;e&&t&&(yield n(),!Pa(t,{restoreAnchor:!0===r?.restoreAnchor,restoreToken:r?.restoreToken??`imperative`,allowUncapturedAnchor:!0===r?.allowUncapturedAnchor})&&Ia(t)||(Aa=null,ja=null))}),{flush:`post`,immediate:!0}),s([Lt,qe,()=>o.virtualScroll?.settleMode,()=>ji(),()=>J(),Li,Vr,Lr,()=>ln.value,Ur,()=>$n.count,()=>$n.total],([e,t,n])=>{if(!e||!0!==t||n===`manual`||!$i())return;let r=function(){let e=yt.value.length;return[J()??``,ji(),Pi(),Ii.value,e,Math.round(Vn(0,e)),Math.round(Fi()),$n.count,Math.round($n.total)].join(`:`)}();xo!==r&&(xo=r,Va({reason:`final`}).then(e=>{e.stable||xo!==r||(xo=null)}))},{flush:`post`,immediate:!0}),s([Lt,qe,()=>o.virtualScroll?.settleMode,()=>o.virtualScroll?.settledToken,()=>ji(),()=>J(),Li,Vr,Lr,()=>ln.value,Ur,()=>yt.value.length,()=>$n.count,()=>$n.total],()=>{Oo()},{flush:`post`,immediate:!0}),s([()=>yt.value.length,qt,Gt,Kt,()=>Dr.start,()=>Dr.end],([e,t,n,r,i,a])=>{Pe.value&&rt(`virtualization`,{nodes:e,virtualization:t,maxLiveNodes:n,buffer:r,focusIndex:Er.value,scroll:t?(()=>{let e=Nn.value||Be();return e?{reverse:Ve(e),scrollTop:Math.round(e.scrollTop),scrollTopAbs:Math.round(Math.abs(e.scrollTop)),scrollHeight:Math.round(e.scrollHeight),clientHeight:Math.round(e.clientHeight)}:null})():null,liveRange:{start:i,end:a},rendered:ln.value})}),s([()=>G.customId],([e],t,n)=>{if(!e||kt)return;let r=function(e,t){return e?(a1.controllers[e]=t,()=>{a1.controllers[e]===t&&delete a1.controllers[e]}):()=>{}}(e,{captureRestoreAnchor:Yn,restoreAnchor:Xn,getAnchorDrift:Zn,getReport:Oi});n(()=>{r()})},{immediate:!0}),ne(()=>{(function(){if(Lt.value)try{ho(),Ra();let e=ta(`manual`);Za(e)&&(K(e),Ka=e,Ga=Xa());let t=ga(e,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});t&&(pe(t),t.anchor&&me(t.anchor),qa=no(t))}catch{}})(),bo(),oi(),tt(),go();for(let e of jr.values())for(let t of e)Kr(t);jr.clear(),Ar.clear(),Sn.clear(),_o(),po(),_i(),qn(),ba(),io(),si(),Zr()});let ko=tZ(`ViewportDeferredMermaidBlockNode`,i({loader:()=>uY(null,null,function*(){try{return(yield he(()=>import(`./index11-CUNXwyvL.js`),__vite__mapDeps([35,1,2]))).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".`,e),QX}}),loadingComponent:D0,delay:0}),D0),Ao=tZ(`ViewportDeferredInfographicBlockNode`,i({loader:()=>uY(null,null,function*(){try{return(yield he(()=>import(`./index10-GMiYl4V4.js`),__vite__mapDeps([36,1,2]))).default}catch(e){return console.warn(`[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.`,e),QX}}),loadingComponent:E0,delay:0}),E0),jo=tZ(`ViewportDeferredD2BlockNode`,i(()=>uY(null,null,function*(){try{return(yield he(()=>import(`./index8-wWmUQ9CO.js`),__vite__mapDeps([37,1,2]))).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".`,e),QX}})),QX),Mo={text:eZ,paragraph:oQ,heading:qZ,code_block:rZ,list:$Z,list_item:QZ,blockquote:FZ,table:mQ,definition_list:zZ,footnote:WZ,footnote_reference:AY,footnote_anchor:VZ,admonition:U0,vmr_container:yQ,hardbreak:DZ,link:yZ,image:NX,thematic_break:gQ,math_inline:iZ,math_block:aZ,strong:fZ,emphasis:TZ,strikethrough:mZ,highlight:CZ,insert:xZ,subscript:uZ,superscript:cZ,emoji:DY,checkbox:TY,checkbox_input:TY,inline_code:KY,html_inline:UY,reference:oZ,html_block:rQ},No=L(()=>ki()),Po=L(()=>b1(G.codeBlockProps)),Fo=L(()=>b1(G.codeBlockProps,{omit:[`langs`]})),Io=L(()=>cY(cY({stream:G.codeBlockStream,darkTheme:G.codeBlockDarkTheme,lightTheme:G.codeBlockLightTheme,monacoOptions:G.codeBlockMonacoOptions,themes:G.themes,langs:A.value===`shiki`?G.langs:void 0,minWidth:G.codeBlockMinWidth,maxWidth:G.codeBlockMaxWidth},typeof Fe.value==`boolean`?{showTooltips:Fe.value}:{}),Fo.value)),Lo=L(()=>cY(lY(cY({},Io.value),{langs:G.langs}),Po.value));function Ro(e){return typeof e==`boolean`?e:void 0}let zo=L(()=>{let e=G.codeBlockProps||{},t={},n=Ro(e.showLineNumbers);n!==void 0&&(t.showLineNumbers=n);let r=Ro(e.diffInline);r!==void 0&&(t.diffInline=r);let i=function(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:void 0}(e.reservedHeightPx);return i!==void 0&&(t.reservedHeightPx=i),t}),Bo=L(()=>cY(cY({stream:G.codeBlockStream,darkTheme:G.codeBlockDarkTheme,lightTheme:G.codeBlockLightTheme,themes:G.themes,langs:G.langs,minWidth:G.codeBlockMinWidth,maxWidth:G.codeBlockMaxWidth},typeof Fe.value==`boolean`?{showTooltips:Fe.value}:{}),Po.value)),Vo=L(()=>cY({},G.mermaidProps||{})),Ho=L(()=>cY({},G.d2Props||{})),Uo=L(()=>cY({},G.infographicProps||{})),Wo=L(()=>({typewriter:D.value,fade:G.fade,customHtmlTags:vt.value.customHtmlTags})),Go=L(()=>cY(cY({},Wo.value),typeof Fe.value==`boolean`?{showTooltip:Fe.value}:{})),Ko=L(()=>cY(cY({},Wo.value),typeof Fe.value==`boolean`?{showTooltips:Fe.value}:{})),qo=L(()=>cY(cY({},Wo.value),typeof Fe.value==`boolean`?{showTooltips:Fe.value}:{})),Jo=L(()=>cY(cY({},Wo.value),typeof Fe.value==`boolean`?{showTooltips:Fe.value}:{}));function Yo(e){return Array.isArray(e.children)&&e.children.length>0}let Xo=L(()=>wi.value.map(e=>{let t=function(e){if(e.type!==`code_block`)return e;let t=e,n=[String(t.language??``),String(t.loading??``),String(t.diff??``),String(t.code??``),String(t.originalCode??``),String(t.updatedCode??``),String(t.raw??``)].join(`\0`),r=xn.get(t);if(r&&r.signature===n)return r.node;let i=cY({},t);return xn.set(t,{signature:n,node:i}),i}(e.node),n=Zo(t),r=ns(t,n);if((t.type===`html_block`||t.type===`html_inline`)&&r===Mo[t.type]){let e=t,n=String(e.tag??``).trim().toLowerCase()||TL(e.content);if(n){let i=gt.value[n];if(_t.value.has(n)&&i)r=i,t=lY(cY({},e),{type:n,tag:n,content:OL(e.content,n)});else if(DL(e.content??e.raw,n)){let n=String(e.content??e.raw??``);t.type===`html_inline`?(r=eZ,t={type:`text`,content:n,raw:n}):(r=oQ,t={type:`paragraph`,children:[{type:`text`,content:n,raw:n}],raw:n})}}}let i=t.type===`code_block`&&A.value===`pre`&&r===QX&&!Qo(gt.value,n),a=cY({},function(e,t,n){let r=t??Zo(e);if(e.type===`code_block`){let t=r?Qo(gt.value,r):void 0;if(n&&A.value===`pre`&&!t&&n===QX)return zo.value;if(n&&r&&n===t)return r===`mermaid`?es(e):r===`infographic`?ts(e):r===`d2`||r===`d2lang`?Ho.value:Lo.value;if(n&&n===gt.value.code_block)return Lo.value;if(yi(n))return Bo.value}return r===`mermaid`?es(e):r===`infographic`?ts(e):r===`d2`||r===`d2lang`?Ho.value:e.type===`link`?Go.value:e.type===`list`?Ko.value:e.type===`blockquote`?qo.value:e.type===`table`?Jo.value:e.type===`code_block`?Io.value:Wo.value}(t,n,r)),o=zt.value?Ci.value[e.index]:null;t.type===`code_block`&&o?.kind===`code-block`&&(a=lY(cY({},a),i?{reservedHeightPx:o.height??o.contentHeight}:{estimatedHeightPx:o.height,estimatedContentHeightPx:o.contentHeight,estimatedDiffInline:o.diffInline})),i||t.type!==`code_block`||n!==`mermaid`||dJ(a.estimatedPreviewHeightPx)!=null||(a=lY(cY({},a),{estimatedPreviewHeightPx:gJ(pJ(String(t.code??``)))})),i||t.type!==`code_block`||n!==`infographic`||dJ(a.estimatedPreviewHeightPx)!=null||(a=lY(cY({},a),{estimatedPreviewHeightPx:_J(mJ(String(t.code??``)))})),t.type===`math_block`&&(a=lY(cY({},a),{cacheScope:ht}));let s=function(e,t){let n=String(e.type);return!_Y(n)&>.value[n]===t}(t,r),c=s?IY(t,Ie.value):void 0;return lY(cY({},e),{node:t,component:r,bindings:a,customBindings:cY(cY({},c??{}),a),rendersCustomNode:s,hasSlotChildren:Yo(t),slotContent:String(t.content??``),isCodeBlock:t.type===`code_block`,indexKey:`${No.value}-${e.index}`,vnodeKey:`${Mi.value}\0${e.index}\0${t.type}`})}));function Zo(e){return e?.type===`code_block`?String(e.language??``).trim().toLowerCase():``}function Qo(e,t){let n=t.trim().toLowerCase();if(n)for(let t of[n,Aq(n),$K(n)]){let n=t&&e[t];if(n)return n}}function $o(e,t,n,r){let i=cY({},e.value);return dJ(i.estimatedPreviewHeightPx)??(i.estimatedPreviewHeightPx=r(n(String(t?.code??``)),void 0,i.maxHeight===`none`?null:dJ(i.maxHeight)??void 0)),i}function es(e){return $o(Vo,e,pJ,gJ)}function ts(e){return $o(Uo,e,mJ,_J)}function ns(e,t){if(!e)return vQ;let n=gt.value,r=n[String(e.type)];if(e.type===`code_block`){let i=t??Zo(e);return(i?Qo(n,i):void 0)||(A.value===`pre`?n.code_block||QX:i===`mermaid`?n.mermaid||ko:i===`infographic`?n.infographic||Ao:i===`d2`||i===`d2lang`?n.d2||jo:r||n.code_block||bi.value)}return r||Mo[String(e.type)]||vQ}function rs(e){l(`click`,e)}function is(e){var t;(t=e.target)!=null&&t.closest(`[data-node-index]`)&&l(`mouseover`,e)}function as(e){var t;(t=e.target)!=null&&t.closest(`[data-node-index]`)&&l(`mouseout`,e)}function os(e){l(`mouseover`,e)}function ss(e){l(`mouseout`,e)}let cs=R(null),ls=R(!1),us=R(null),ds=L(()=>!(G.domMode!==`minimal`||Ne.value||!1!==G.fade||D.value||ls.value||pn.value||qt.value||Ft.value||Mt.value||Zt.value||Object.keys(gt.value).length!==0)),fs,ps=null,ms=0,hs=0,gs=0,_s=[`code_block`,`admonition`,`table`,`math_block`,`html_block`,`image`,`thematic_break`],vs=new Set(_s),ys=[`.typewriter-cursor`,`.height-estimation-probes`,..._s.map(e=>`[data-node-type="${e}"]`),`script`,`style`].join(`,`);function bs(e){if(!e||typeof e!=`object`)return!1;let t=e.type;return typeof t==`string`&&vs.has(t)}function xs(e){if(!e||typeof e!=`object`)return 0;let t=e,n=t.raw??t.content??t.code;if(typeof n==`string`)return n.length;let r=t.children;if(Array.isArray(r))return r.reduce((e,t)=>e+xs(t),0);let i=t.items;return Array.isArray(i)?i.reduce((e,t)=>e+xs(t),0):0}function Ss(){fs&&=(clearTimeout(fs),void 0)}function Cs(){ms+=1,ps!=null&&(en?.(ps),ps=null)}function ws(){Cs(),Os(),cs.value&&(cs.value.style.visibility=`hidden`)}function Ts(e){if(e.nodeType!==Node.TEXT_NODE||!(e.textContent??``).trim())return!1;let t=e.parentElement;return!!t&&!t.closest(ys)}function Es(e){let t=e.lastChild;for(;t;){if(Ts(t))return t;if(t.nodeType===Node.ELEMENT_NODE){let e=t;if(!e.matches(ys)&&e.lastChild){t=e.lastChild;continue}}for(;t&&t!==e&&!t.previousSibling;)t=t.parentNode;if(!t||t===e)break;t=t.previousSibling}return null}function Ds(){let e=Xo.value;for(let t=e.length-1;t>=0;t--){let n=e[t];if(!n||bs(n.node)||!co(n.index))continue;let r=_n.get(n.index);if(!r)continue;let i=Es(r);if(i)return i}return null}function Os(){us.value&&=(us.value.classList.remove(M0),null)}function ks(){if(T.value!==`simple`||!q||!ls.value||!ge.value)return void Os();let e=Ds(),t=e?function(e){let t=e.parentElement?.closest(`.text-node`);return t instanceof HTMLElement?t:e.parentElement}(e):null;t!==us.value&&(Os(),t&&(t.classList.add(M0),us.value=t))}function As(){if(T.value!==`precise`||!q||!ls.value||ps!=null)return;let e=ms,t=()=>{ps=null,e===ms&&function(){if(T.value!==`precise`||!(q&&ls.value&&ge.value&&cs.value))return;let e=ge.value,t=cs.value;t.style.visibility=`hidden`;let n=Ds();if(!n)return;let r=0,i=0,a=20,o=!1;if(n?.textContent){let t=n.textContent.length,s=document.createRange();s.setStart(n,Math.max(0,t-1)),s.setEnd(n,t);let c=typeof s.getClientRects==`function`?s.getClientRects():void 0,l=c?.[c.length-1]??n.parentElement?.getBoundingClientRect();if(l){let t=ft(`typewriterCursor.root.getBoundingClientRect`,()=>e.getBoundingClientRect());r=l.right-t.left+e.scrollLeft,i=l.top-t.top+e.scrollTop,a=l.height||a,o=!0}s.detach()}o&&(t.style.transform=`translate(${Math.max(0,r)}px, ${Math.max(0,i)}px)`,t.style.height=`${a}px`,t.style.visibility=`visible`)}()};$t?ps=$t(t):t()}return s([Ge,()=>o.content,()=>o.nodes,()=>G.typewriter,qe],()=>uY(null,null,function*(){if(!q||Ne.value||!Re.value)return;if(qe.value)return ls.value=!1,Ss(),void ws();if(o.nodes?.length)return ls.value=!1,Ss(),ws(),hs=(o.content??``).length,void(gs=Ge.value.length);let e=function(){return o.nodes?.length?o.nodes.reduce((e,t)=>e+xs(t),0):(o.content??``).length}(),t=function(){return o.nodes?.length?o.nodes.reduce((e,t)=>e+xs(t),0):Ge.value.length}(),r=!bs(yt.value[yt.value.length-1]),i=e>hs,a=t>gs;if(!D.value||!r||!i&&!a)return D.value&&r||(ls.value=!1,ws()),hs=e,void(gs=t);hs=e,gs=t,ls.value=!0,T.value===`precise`&&cs.value&&(cs.value.style.visibility=`hidden`),Ss(),yield n(),T.value===`simple`?ks():(Os(),As()),fs=setTimeout(()=>{fs=void 0,ls.value=!1},3e3)}),{flush:`post`,immediate:!0}),s(ls,e=>uY(null,null,function*(){e?(yield n(),T.value===`simple`?ks():(Os(),T.value===`precise`&&As())):ws()}),{flush:`post`}),s(T,()=>uY(null,null,function*(){if(q&&!Ne.value&&Re.value&&ls.value){if(yield n(),T.value===`simple`)return Cs(),void ks();Os(),T.value===`precise`?As():ws()}}),{flush:`post`}),s([()=>ln.value,()=>Dr.start,()=>Dr.end],()=>uY(null,null,function*(){q&&!Ne.value&&Re.value&&ls.value&&(yield n(),T.value===`simple`?ks():(Os(),T.value===`precise`&&As()))}),{flush:`post`}),ne(()=>{Ss(),Cs(),Os(),mt.clear()}),(e,t)=>{let n=r(`NodeRenderer`,!0);return z(Ne)?(c(!0),W(M,{key:0},_(Xo.value,e=>(c(),W(M,{key:e.vnodeKey},[e.rendersCustomNode?(c(),P(x(e.component),re({key:0,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":G.customId,"is-dark":G.isDark,onClick:rs,onMouseover:os,onMouseout:ss,onCopy:t[0]||=e=>f(e),onHandleArtifactClick:t[1]||=e=>l(`handleArtifactClick`,e)}),{default:B(()=>[e.hasSlotChildren?(c(),P(n,re({key:0,ref_for:!0},St.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(c(),P(n,re({key:1,ref_for:!0},St.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):E(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(c(),P(x(e.component),re({key:1,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":G.customId,"is-dark":G.isDark,onClick:rs,onMouseover:os,onMouseout:ss,onCopy:t[2]||=e=>f(e),onHandleArtifactClick:t[3]||=e=>l(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`]))],64))),128)):(c(),W(`div`,{key:1,ref_key:`containerRef`,ref:ge,class:V([`markstream-vue markdown-renderer`,[{dark:G.isDark},{virtualized:qt.value},{"virtual-scroll-coordinated":Rt.value},{"stable-layout":Cr.value},{"typewriter-simple-cursor":ls.value&&T.value===`simple`}]]),"data-custom-id":G.customId,onClick:rs,onMouseover:is,onMouseout:as},[Bt.value||qt.value?(c(),W(M,{key:0},[Bt.value?(c(),P(T0,{key:0,width:Ut.value,"flow-root":qt.value||Rt.value,"paragraph-node":Tt.value,"list-item-node":Et.value,"list-node":Dt.value,"heading-nodes":Ot.value,"set-paragraph-wrapper":Jr,"set-list-item-wrapper":Yr,"set-list-wrapper":Xr,"set-heading-wrapper":mi},null,8,[`width`,`flow-root`,`paragraph-node`,`list-item-node`,`list-node`,`heading-nodes`])):E(``,!0),qt.value?(c(),W(`div`,{key:1,class:`node-spacer`,style:ae({height:`${Ti.value}px`}),"aria-hidden":`true`},null,4)):E(``,!0)],64)):E(``,!0),ds.value?(c(!0),W(M,{key:1},_(Xo.value,e=>(c(),W(M,{key:e.vnodeKey},[co(e.index)?(c(),P(x(e.component),re({key:0,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":G.customId,"is-dark":G.isDark,onMouseover:t[4]||=e=>l(`mouseover`,e),onMouseout:t[5]||=e=>l(`mouseout`,e),onCopy:t[6]||=e=>f(e),onHandleArtifactClick:t[7]||=e=>l(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):E(``,!0)],64))),128)):(c(!0),W(M,{key:2},_(Xo.value,e=>(c(),W(`div`,{key:e.vnodeKey,ref_for:!0,ref:t=>uo(e.index,t),class:`node-slot`,"data-node-index":e.index,"data-node-type":e.node.type},[co(e.index)?(c(),W(`div`,{key:0,ref_for:!0,ref:t=>function(e,t){t||function(e){let t=`${ki()}-${e}`,n=!1;for(let r of Array.from(Rr.keys()))(zr.get(r)?.index===e||r===t||r.startsWith(`${t}-`))&&(Rr.delete(r),zr.delete(r),n=!0);n&&(zi(),oo(`async-node`))}(e),Nr.delete(e),function(e){let t=(Ar.get(e)??0)+1;Ar.set(e,t)}(e);let n=jr.get(e);if(n){for(let e of n)Kr(e);jr.delete(e)}if(function(e){let t=vn.get(e);t&&(bn?.unobserve(t),yn.delete(t),vn.delete(e))}(e),!t||!Jt.value)return kr.delete(e),void Ar.delete(e);kr.set(e,t);let r=()=>{mo(e,t)};queueMicrotask(r);let i=(bn||typeof ResizeObserver>`u`||(bn=new ResizeObserver(e=>{if(e.length)for(let t of e){let e=yn.get(t.target),n=vn.get(e??-1);e!=null&&n&&mo(e,n)}else ho()})),bn);if(i&&(vn.set(e,t),yn.set(t,e),i.observe(t)),typeof window<`u`){let t=yt.value[e]?.type===`code_block`?[16,80,240,800]:qe.value?[80]:[];if(t.length){let n=t.map(e=>Gr(e,r,`node-resize`)).filter(e=>e!=null);n.length&&jr.set(e,n)}}}(e.index,t),class:`node-content`},[e.isCodeBlock?e.rendersCustomNode?(c(),P(x(e.component),re({key:1,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":G.customId,"is-dark":G.isDark,onCopy:t[12]||=e=>f(e),onHandleArtifactClick:t[13]||=e=>l(`handleArtifactClick`,e)}),{default:B(()=>[e.hasSlotChildren?(c(),P(n,re({key:0,ref_for:!0},St.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(c(),P(n,re({key:1,ref_for:!0},St.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):E(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(c(),P(x(e.component),re({key:2,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":G.customId,"is-dark":G.isDark,onCopy:t[14]||=e=>f(e),onHandleArtifactClick:t[15]||=e=>l(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(c(),P(oe,{key:0,name:`fade`,css:!1!==G.fade,appear:!1!==G.fade},{default:B(()=>[e.rendersCustomNode?(c(),P(x(e.component),re({key:0,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":G.customId,"is-dark":G.isDark,onCopy:t[8]||=e=>f(e),onHandleArtifactClick:t[9]||=e=>l(`handleArtifactClick`,e)}),{default:B(()=>[e.hasSlotChildren?(c(),P(n,re({key:0,ref_for:!0},St.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(c(),P(n,re({key:1,ref_for:!0},St.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):E(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(c(),P(x(e.component),re({key:1,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":G.customId,"is-dark":G.isDark,onCopy:t[10]||=e=>f(e),onHandleArtifactClick:t[11]||=e=>l(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`]))]),_:2},1032,[`css`,`appear`]))],512)):(c(),W(`div`,{key:1,class:`node-placeholder`,style:ae({height:`${Bn(e.index)}px`})},null,4))],8,j0))),128)),ls.value&&T.value===`precise`?(c(),W(`span`,{key:3,ref_key:`typewriterCursorRef`,ref:cs,class:`typewriter-cursor`,"aria-hidden":`true`},null,512)):E(``,!0),qt.value?(c(),W(`div`,{key:4,class:`node-spacer`,style:ae({height:`${Ei.value}px`}),"aria-hidden":`true`},null,4)):E(``,!0)],42,A0))}}})),[[`__scopeId`,`data-v-a9489508`]]),P0=N0;P0.install=e=>{let t=new Set([`MarkdownRender`,`NodeRenderer`,P0.__name,P0.name].filter(e=>!!e));for(let n of t)e.component(n,N0)};var F0=Object.freeze(Object.defineProperty({__proto__:null,default:P0},Symbol.toStringTag,{value:`Module`})),I0={key:0,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},L0={key:1,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},R0={key:2,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},z0={key:3,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},B0={class:`admonition-title`},V0=[`aria-expanded`,`aria-controls`],H0=[`id`],U0=wY(G({__name:`AdmonitionNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e,{emit:t}){var n;let r=e,i=t,a=L(()=>{if(r.node.title&&r.node.title.trim().length)return r.node.title;let e=r.node.kind||`note`;return e.charAt(0).toUpperCase()+e.slice(1)}),o=R(!!r.node.collapsible&&!((n=r.node.open)==null||n));function s(){r.node.collapsible&&(o.value=!o.value)}let u=`admonition-${Math.random().toString(36).slice(2,9)}`;return(t,n)=>(c(),W(`div`,{class:V([`admonition`,[`admonition-${r.node.kind}`]])},[F(`div`,{id:u,class:`admonition-legend`},[r.node.kind===`note`||r.node.kind===`info`?(c(),W(`svg`,I0,[...n[1]||=[F(`circle`,{cx:`12`,cy:`12`,r:`10`},null,-1),F(`path`,{d:`M12 16v-4`},null,-1),F(`path`,{d:`M12 8h.01`},null,-1)]])):r.node.kind===`tip`?(c(),W(`svg`,L0,[...n[2]||=[F(`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`},null,-1),F(`path`,{d:`M9 18h6`},null,-1),F(`path`,{d:`M10 22h4`},null,-1)]])):r.node.kind===`warning`||r.node.kind===`caution`?(c(),W(`svg`,R0,[...n[3]||=[F(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`},null,-1),F(`path`,{d:`M12 9v4`},null,-1),F(`path`,{d:`M12 17h.01`},null,-1)]])):r.node.kind===`danger`||r.node.kind===`error`?(c(),W(`svg`,z0,[...n[4]||=[F(`polygon`,{points:`7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2`},null,-1),F(`path`,{d:`M12 8v4`},null,-1),F(`path`,{d:`M12 16h.01`},null,-1)]])):E(``,!0),F(`span`,B0,U(a.value),1),r.node.collapsible?(c(),W(`button`,{key:4,class:`admonition-toggle`,"aria-expanded":!o.value,"aria-controls":`${u}-content`,onClick:s},[(c(),W(`svg`,{style:ae({rotate:o.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[...n[5]||=[F(`path`,{d:`m9 18 6-6-6-6`},null,-1)]],4))],8,V0)):E(``,!0)]),l(F(`div`,{id:`${u}-content`,class:`admonition-content`,"aria-labelledby":u},[v(z(P0),{"index-key":`admonition-${e.indexKey}`,nodes:r.node.children,"custom-id":r.customId,typewriter:r.typewriter,fade:r.fade,onCopy:n[0]||=e=>i(`copy`,e)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])],8,H0),[[A,!o.value]])],2))}}),[[`__scopeId`,`data-v-a83480e1`]]);U0.install=e=>{e.component(U0.__name,U0)};var W0=()=>he(()=>import(`./d2_markstream-vue-xMoF3M5G.js`),[]),G0=null,K0=W0,q0=null,J0=!1,Y0=!1,X0=0;function Z0(){return uY(this,null,function*(){if(G0)return G0;let e=K0,t=X0;return e?e===W0&&J0?null:q0||(q0=uY(null,null,function*(){let n;try{n=yield e()}catch(n){if(e===W0)return t===X0&&e===K0&&(J0=!0,function(e){Y0||(Y0=!0,console.warn(`[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.`,e))}(n)),null;throw n}finally{t===X0&&e===K0&&(q0=null)}return t!==X0||e!==K0?null:n?(G0=function(e){if(!e)return e;if(e.D2&&typeof e.D2==`function`)return e.D2;if(e.default&&e.default.D2&&typeof e.default.D2==`function`)return e.default.D2;let t=e.default??e;return typeof t==`function`?t:t?.D2&&typeof t.D2==`function`?t.D2:t}(n),G0):null}),q0):null})}var Q0=null,$0=null,e2=null,t2=0;function n2(){return typeof $0==`function`}function r2(){return uY(this,null,function*(){if(Q0)return Q0;let e=$0,t=t2;return e?e2||(e2=uY(null,null,function*(){let n=yield e();if(t!==t2||e!==$0)return null;let r=function(e){if(!e)return null;let t=e.default??e,n=typeof t==`function`&&typeof t.prototype?.render==`function`?t:e.Infographic??t?.Infographic;return typeof n==`function`?n:null}(n);return t!==t2||e!==$0?null:r?(Q0=r,Q0):null}).finally(()=>{t===t2&&e===$0&&(e2=null)}),e2):null})}function i2(e){let t=Number.parseFloat(String(e??``));return Number.isFinite(t)?t:0}function a2(e,t){e?.(t)}function o2(e,t){return e?(a2(t,`readElementBoxHeight.offsetHeight`),Math.ceil(Math.max(0,e.offsetHeight||0))):0}function s2(e,t){let n=o2(e,t);if(!e||typeof window>`u`||typeof window.getComputedStyle!=`function`)return n;a2(t,`readElementOuterHeight.getComputedStyle`);let r=window.getComputedStyle(e),i=i2(r.marginTop),a=i2(r.marginBottom);return Math.ceil(Math.max(0,n+i+a))}function c2(e,t,n){if(!e)return 0;let r=function(e){return e?e.matches?.call(e,`.markstream-vue.markdown-renderer`)?e:e.querySelector(`.markstream-vue.markdown-renderer`):null}(e);if(!r)return 0;let i=Number.isFinite(n)?Number(n):s2(e,t),a=o2(r,t);return Math.max(0,i-a)}function l2(e,t,n){let r=n.getKey?.call(n,e,t)??e.id??t;return String(r)}function u2(e,t,n){return n.getKind?.call(n,e,t)??String(e.kind??``)}function d2(e,t,n){let r=n.getContent?.call(n,e,t)??e.content;return typeof r==`string`?r:``}function f2(e,t,n){let r=n.getFinal?.call(n,e,t);if(typeof r==`boolean`)return r;let i=e.final;return typeof i!=`boolean`||i}function p2(e,t,n){return n.getRevision?.call(n,e,t)??e.revision}function m2(e,t,n){let r=u2(e,t,n);return r===`assistant-markdown`||r===`markdown`||!r&&d2(e,t,n).length>0}function h2(e,t,n){let r=n.estimateItemHeight?.call(n,e,t);if(Number.isFinite(r)&&r>0)return r;let i=u2(e,t,n);return i===`assistant-markdown`||i===`markdown`?360:i===`system-divider`?44:i===`tool-call`?72:i===`thinking`?92:i===`error`?76:i===`user-message`?88:d2(e,t,n).length>0?360:96}var g2=Symbol(`markstreamLanguageIconResolver`);function _2(e){return i(e)}_2(()=>he(()=>import(`./index3-CeHHGRW3.js`),__vite__mapDeps([38,31,7,1,2]))),_2(()=>he(()=>import(`./index6-CmbcA3ap.js`),__vite__mapDeps([33,1,2]))),_2(()=>he(()=>import(`./index7-pWd8I70s.js`),__vite__mapDeps([32,1,2]))),_2(()=>he(()=>import(`./index11-CUNXwyvL.js`),__vite__mapDeps([35,1,2]))),_2(()=>he(()=>import(`./index10-GMiYl4V4.js`),__vite__mapDeps([36,1,2]))),_2(()=>he(()=>import(`./index8-wWmUQ9CO.js`),__vite__mapDeps([37,1,2]))),_2(()=>he(()=>import(`./index4-Gxd-bmd4.js`),__vite__mapDeps([39,30,7,1,2]))),_2(()=>he(()=>import(`./index5-DnCMqCxw.js`),__vite__mapDeps([34,1,2,31,7]))),_2(()=>he(()=>import(`./index9-C8yZCmv2.js`),__vite__mapDeps([40,1,2])));var v2=`cjs.css.csv.gif.htm.html.jpeg.jpg.js.json.jsx.log.md.mjs.pdf.png.scss.svg.ts.tsx.txt.vue.webp.xml.yaml.yml`.split(`.`),y2=new Set([`AGENTS.md`,`CHANGELOG.md`,`Dockerfile`,`LICENSE`,`Makefile`,`README.md`,`package.json`,`pnpm-lock.yaml`,`pnpm-workspace.yaml`,`tsconfig.json`,`vite.config.ts`]),b2=[...v2].toSorted((e,t)=>t.length-e.length).join(`|`),x2=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${b2}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${b2})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?])`].join(``),`gi`),S2=/[),.;!?]+$/;function C2(e){let t=e.toLowerCase();return v2.some(e=>t.endsWith(`.${e}`))}function w2(e){let t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${b2}))["']`,`gi`),r;for(;(r=n.exec(e))!==null;){let e=r[1];if(!e)continue;let n=e.split(`/`).pop();n&&t.set(n,e)}return t}function T2(e,t={}){let n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;let r=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!r)return null;let i=(r[1]??``).replace(S2,``);if(!i)return null;let a=i.split(`/`).pop()??i,o=i.includes(`/`),s=y2.has(a),c=C2(a);if(o&&!s&&!c)return null;if(!o&&!s){let e=t.aliases?.get(a);if(!e)return null;i=e}let l=r[2]??r[3],u=l?Number(l):void 0;return{path:i,line:u!==void 0&&Number.isFinite(u)&&u>0?u:void 0}}function E2(e,t={}){let n=[];x2.lastIndex=0;let r;for(;(r=x2.exec(e))!==null;){let e=r[0]??``,i=r[1]??``,a=e.indexOf(i);if(a<0)continue;let o=i+(r[2]??r[3]?e.slice(a+i.length):``),s=o.replace(S2,``),c=o.length-s.length;o=s;let l=T2(o,t);if(!l)continue;let u=r.index+a,d=u+o.length;n.push({...l,start:u,end:d,text:o}),c>0&&(x2.lastIndex-=c)}return n}var D2=12e4,O2=6e4,k2=32,A2=3e4,j2=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function M2(e){let t=0,n=0,r=0;j2.lastIndex=0;let i;for(;(i=j2.exec(e))!==null;){let e=i[3]??``;t+=1,n+=e.length,r=Math.max(r,e.length)}return{codeRenderer:e.length>=D2||n>=O2||t>=k2||r>=A2?`pre`:`shiki`,codeFenceCount:t,codeChars:n}}function N2(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n%2==1}var P2=/\s/,F2=/\p{Nd}/u;function I2(e,t){let n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function L2(e,t){if(t<=0)return;let n=e.codePointAt(t-1),r=n!==void 0&&n>=55296&&n<=56319&&t>1?t-2:t-1,i=e.codePointAt(r);return i===void 0?void 0:String.fromCodePoint(i)}function R2(e){return e!==void 0&&P2.test(e)}function z2(e){return e!==void 0&&F2.test(e)}function B2(e){return e!==void 0&&e>=`A`&&e<=`Z`}var V2=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function H2(e,t){if(!B2(e[t-1]))return!1;let n=t-1;for(;n>0&&B2(e[n-1]);)n--;return V2.test(e.slice(n,t))||z2(I2(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??``)&&!/\p{L}/u.test(I2(e,t+1)??``)}function U2(e,t){if(!B2(e[t-1]))return!1;let n=t-1;for(;n>0&&B2(e[n-1]);)n--;return V2.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??``)}function W2(e,t){let n=e[t+1];return z2(I2(e,t+1))?!0:(n===`-`||n===`+`||n===`.`||n===`−`)&&z2(I2(e,t+2))}var G2=/^[-–—,;:~([/]$/;function K2(e,t){let n=e[t+1];if(n!==`-`&&n!==`+`&&n!==`.`||!z2(I2(e,t+2)))return!1;let r=e[t-1];return r!==void 0&&G2.test(r)}var q2=String.raw`[,;:~\-–—/\s()=*×]|and|or`;function J2(e){let t=e.replace(new RegExp(String.raw`^(?:${q2})+`,`u`),``);for(;;){let e=t.replace(new RegExp(String.raw`^\p{L}+(?:${q2})+`,`u`),``).replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,``);if(e===t)break;t=e}if(!/\p{Nd}/u.test(t))return!1;let n=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${n}(?:\p{L}+)?(?:(?:${q2})+${n}(?:\p{L}+)?)*$`,`u`).test(t)}var Y2=1,X2=2,Z2=3,Q2=-1;function $2(e){let t=e.length,n=new Uint8Array(t),r=new Int32Array(t+1).fill(Q2),i=new Int32Array(t+1),a=new Int32Array(t+1),o=[],s=[];{let n=[];for(let r=0;r\`*—–“”‘’`),l=[];for(let t of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))l.push(t.index);for(let t of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))l.push(t.index);for(let t of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(t.index===0||!/[\w~/.-]/.test(e[t.index-1]??``))&&l.push(t.index);l.sort((e,t)=>e-t);let u=-1;for(let n of l){if(nn+7&&!/[\w/?#@~.+&=%-]/.test(e[r+1]??``))break}o.push([n,r]),u=r}let d=[];for(let n=0;n]/.test(s))continue;let c=Q2,l=Q2;for(;i`){l=i;break}if(!a&&n===`/`&&e[i+1]===`>`){l=i+1;break}if(!/\s/.test(n)){c=i;break}for(;i`){l=i;break}if(a){c=i;break}if(r===`/`&&e[i+1]===`>`){l=i+1;break}let o=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(i));if(!o){c=i;break}i+=o[0].length;let s=i;for(;s`]+/.exec(e.slice(s));if(!t){c=s;break}i=s+t[0].length}}}if(l!==Q2)d.push([n,l+1]),n=l;else if(c!==Q2){let t=e.indexOf(`<`,n+1);n=(t!==-1&&t`,n+2);t===-1?f=!1:(d.push([n,t+2]),n=t+1,i=!0)}else if(r===`!`){if(e[n+2]===`-`&&e[n+3]===`-`){if(p){let t=e.indexOf(`-->`,n+4);t===-1?p=!1:(d.push([n,t+3]),n=t+2,i=!0)}}else if(e.startsWith(`[CDATA[`,n+2)){if(m){let t=e.indexOf(`]]>`,n+9);t===-1?m=!1:(d.push([n,t+3]),n=t+2,i=!0)}}else if(h&&/[A-Z]/.test(e[n+2]??``)){let t=e.indexOf(`>`,n+3);t===-1?h=!1:(d.push([n,t+1]),n=t,i=!0)}}if(i)continue;if(r!==void 0&&/[a-zA-Z]/.test(r)){let r=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(n+1));if(r){let i=n+1+r[0].length;for(;i`&&e[i]!==`<`&&!/\s/.test(e[i]);)i++;if(e[i]===`>`){d.push([n,i+1]),n=i;continue}}}if(r===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(r))continue;let a=n+1;for(;a`&&(d.push([n,a+1]),n=a)}}d.sort((e,t)=>e[0]-t[0]);let g=[];for(let e of d){let t=g.at(-1);t&&e[0]<=t[1]?t[1]=Math.max(t[1],e[1]):g.push([e[0],e[1]])}o.push(...g);let _=e=>{let t=0;for(;t=(s[t]?.[1]??0);)t++;let n=s[t];return n!==void 0&&e>=n[0]},v=e=>{let t=0;for(;t=(g[t]?.[1]??0);)t++;let n=g[t];return n!==void 0&&e>=n[0]},y=[],b=null,x=0,S=!1;for(let n=0;n`&&(S=!1);continue}if(!(_(n)||v(n))){if(b!==null){e[n]===b&&(b=null);continue}if(y.length>0&&(e[n]===`"`||e[n]===`'`)&&n>0&&/\s/.test(e[n-1]??``))b=e[n];else if(e[n]===`[`)x++;else if(e[n]===`]`)x>0&&e[n+1]===`(`&&(y.push(n),S=e[n+2]===`<`,n++),x=Math.max(0,x-1);else if(e[n]===`(`&&y.length>0)y.push(-1);else if(e[n]===`)`&&y.length>0){let t=y.pop();if(t!==void 0&&t>=0){let r=e.slice(t+2,n);(/\s/.exec(r)===null||r.startsWith(`<`)&&/^<(?:\\[<>]|[^<>])*>$/.test(r)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(r))&&o.push([t,n+1])}}}}o.sort((e,t)=>e[0]-t[0]);let C=[];for(let e of o){let t=C.at(-1);t&&e[0]<=t[1]?t[1]=Math.max(t[1],e[1]):C.push([e[0],e[1]])}let w=e=>{let t=0,n=C.length-1;for(;t<=n;){let r=t+n>>1,i=C[r];if(i===void 0)return!1;if(e=i[1])t=r+1;else return!0}return!1},T=new Uint8Array(t);{let n=-1,r=!1,i=!1,a=0;for(let o=0;o<=t;o++){let s=o0&&(c===`{`?a++:c===`}`&&a--)}}for(let r=0;r=0;e--)n[e]===Z2&&(E=e),r[e]=E;let D=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,O=/[^\p{L}\p{Nd}\s]$/u,k=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,A=/(?:^|\s)[a-z]{2,}/,j=(t,n)=>{let o=I2(e,t+1);if(o===void 0||!D.test(o))return!1;let s=r[t+1]??Q2;if(s!==Q2){let n=e.slice(t+1,s);return s-(t+1)!==((e.codePointAt(t+1)??0)>65535?2:1)&&k.test(n)||/[,;:!?]$/.test(n)||/^[a-z]{2,}$/.test(n)?!1:(i[s]??0)-(i[t+1]??0)===0&&(a[s]??0)-(a[t+1]??0)===0}return O.test(n)||k.test(n)||A.test(n)};return(o,s=-1)=>{if(e[o]!==`$`||n[o]===Y2||e[o+1]===`$`||e[o-1]===`$`&&s!==o||H2(e,o)||o+1>=t||R2(I2(e,o+1)))return null;let c=r[o+1]??Q2;if(c===Q2||(i[c]??0)-(i[o+1]??0)>0||(a[c]??0)-(a[o+1]??0)>0)return null;let l=e.slice(o+1,c);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(l)||e[c+1]===`{`&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(l)||z2(L2(e,o))&&J2(l)||W2(e,o)&&(j(c,l)||U2(e,c)||/\s/.test(l)&&/\p{Nd}$/u.test(l)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(l))||e[c+1]===`$`&&!/\p{L}/u.test(l)&&O.test(l)?null:{content:l,end:c+1}}}var nse=/^---[ \t]*(?:\r\n|\n)/,rse=/^---[ \t]*$/;function ise(e){let t=nse.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length,r=n;for(;n<=e.length;){let t=e.indexOf(` `,n);t===-1&&(t=e.length);let i=e.slice(n,t);if(i.endsWith(`\r`)&&(i=i.slice(0,-1)),rse.test(i)){let i=e.slice(r,n);return i===``?{frontmatter:null,body:e}:{frontmatter:i,body:t\n]*>|[^()\s]+)\)/g,ase=/^[a-zA-Z][a-zA-Z0-9+.-]*:/,ose=/^[a-zA-Z]:(?:[\\/]|%5c)/i,sse=/^[A-Za-z0-9._~-]$/,cse=`pythinker-code://skill/`,t4;function n4(e){return e.replaceAll(`%`,`%25`).replaceAll(`&`,`%26`).replaceAll(`<`,`%3C`).replaceAll(`>`,`%3E`).replaceAll(/[[\]\\]/g,`\\$&`).replaceAll(` `,`%0A`).replaceAll(`\r`,`%0D`)}function lse(e){return e.replaceAll(/\\([\\[\]])/g,`$1`).replaceAll(`%26`,`&`).replaceAll(`%3C`,`<`).replaceAll(`%3E`,`>`).replaceAll(`%0A`,` -`).replaceAll(`%0D`,`\r`).replaceAll(`%25`,`%`)}function r4(e){let t=``;for(let n of e){let e=n.codePointAt(0);e>127||sse.test(n)?t+=n:t+=`%${e.toString(16).toUpperCase().padStart(2,`0`)}`}return t}function use(e){let t=e.split(`/`).map(r4).join(`/`);return t.startsWith(`//`)?`/%2F${t.slice(2)}`:t}function i4(e){return e.startsWith(`<`)&&e.endsWith(`>`)?e.slice(1,-1):e}function a4(e){let t=i4(e);try{return decodeURIComponent(t)}catch{return t}}function dse(e){let t=i4(e);return!t||t.startsWith(`#`)||t.startsWith(`?`)||t.startsWith(`//`)?null:t.startsWith(`pythinker-code://skill/`)&&t.length>23?`skill`:ase.test(t)&&!ose.test(t)?null:/(?:[\\/]|%5c)$/i.test(t)?`folder`:`file`}function o4(e,t){if(!t)return;let n=e.at(-1);n?.type===`text`?n.value+=t:e.push({type:`text`,value:t})}function s4(e){if(e.kind===`skill`)return`[${n4(e.name)}](${cse}${r4(e.name)})`;let t=e.kind===`folder`&&!/[\\/]$/.test(e.path)?`${e.path}/`:e.path;return`[${n4(e.name)}](${use(t)})`}function c4(e){let t=[],n=0;e4.lastIndex=0;for(let r of e.matchAll(e4)){let i=r.index;o4(t,e.slice(n,i));let a=r[0],o=r[1],s=r[2],c=e[i-1]===`!`?null:dse(s);if(c&&o){let e=c===`skill`?a4(s).slice(23):void 0;t.push({type:`mention`,attrs:{kind:c,name:e??lse(o),path:c===`skill`?``:a4(s)}})}else o4(t,a);n=i+a.length}return o4(t,e.slice(n)),t}function l4(e){let t=c4(e.args??``).filter(e=>e.type===`mention`&&e.attrs.kind===`skill`),n=t[0];return t.length===1&&n?.type===`mention`&&n.attrs.name===e.name}function u4(e,t){if(l4(e))return t.revivePill?e.args??``:null;if(e.name.includes(` `))return null;let n=e.args??``;return`/skill:${e.name}${n.length>0?` ${n}`:``}`}function fse(e,t){return u4(e,t)!==null}function pse(e){if(l4(e))return e.args??``;let t=s4({kind:`skill`,name:e.name,path:``});return e.args?`${t} ${e.args}`:t}function d4(e){return t4??=new Intl.Segmenter(`und`,{granularity:`grapheme`}),Array.from(t4.segment(e),({segment:e})=>e)}function f4(e){let t=d4(e);if(t.length<=32)return e;let n=e.lastIndexOf(`.`),r=(n>=0?d4(e.slice(n)).length:0)+4,i=31-r;return i<8?`${t.slice(0,31).join(``)}…`:`${t.slice(0,i).join(``)}…${t.slice(-r).join(``)}`}function mse(e){return new Worker(`/assets/katexRenderer.worker-DE1eyXe6.js`,{type:`module`,name:e?.name})}function hse(e){return new Worker(`/assets/mermaidParser.worker-_pLIm6No.js`,{type:`module`,name:e?.name})}var gse={key:0,class:`md-frontmatter`},_se={class:`diff-bar`},vse=[`aria-label`,`onClick`],yse={class:`diff-pre`},bse={key:0,class:`diff-sign`},xse={class:`diff-text`},Sse=`data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7`,Cse=`pythinker-code://skill/`,p4=`md-table-wide`,m4=`md-table-toggle`,h4=`md-table-fade`,g4=`md-table-toggle--show`,wse=`md-table-at-end`,Tse=26,_4=`md-code-wrap`,v4=`md-code-wrap-toggle`,y4=`md-code-nums`,b4=`md-code-nums-toggle`,x4=`data-md-code-css`,Ese=` +`).replaceAll(`%0D`,`\r`).replaceAll(`%25`,`%`)}function r4(e){let t=``;for(let n of e){let e=n.codePointAt(0);e>127||sse.test(n)?t+=n:t+=`%${e.toString(16).toUpperCase().padStart(2,`0`)}`}return t}function use(e){let t=e.split(`/`).map(r4).join(`/`);return t.startsWith(`//`)?`/%2F${t.slice(2)}`:t}function i4(e){return e.startsWith(`<`)&&e.endsWith(`>`)?e.slice(1,-1):e}function a4(e){let t=i4(e);try{return decodeURIComponent(t)}catch{return t}}function dse(e){let t=i4(e);return!t||t.startsWith(`#`)||t.startsWith(`?`)||t.startsWith(`//`)?null:t.startsWith(`pythinker-code://skill/`)&&t.length>23?`skill`:ase.test(t)&&!ose.test(t)?null:/(?:[\\/]|%5c)$/i.test(t)?`folder`:`file`}function o4(e,t){if(!t)return;let n=e.at(-1);n?.type===`text`?n.value+=t:e.push({type:`text`,value:t})}function s4(e){if(e.kind===`skill`)return`[${n4(e.name)}](${cse}${r4(e.name)})`;let t=e.kind===`folder`&&!/[\\/]$/.test(e.path)?`${e.path}/`:e.path;return`[${n4(e.name)}](${use(t)})`}function c4(e){let t=[],n=0;e4.lastIndex=0;for(let r of e.matchAll(e4)){let i=r.index;o4(t,e.slice(n,i));let a=r[0],o=r[1],s=r[2],c=e[i-1]===`!`?null:dse(s);if(c&&o){let e=c===`skill`?a4(s).slice(23):void 0;t.push({type:`mention`,attrs:{kind:c,name:e??lse(o),path:c===`skill`?``:a4(s)}})}else o4(t,a);n=i+a.length}return o4(t,e.slice(n)),t}function l4(e){let t=c4(e.args??``).filter(e=>e.type===`mention`&&e.attrs.kind===`skill`),n=t[0];return t.length===1&&n?.type===`mention`&&n.attrs.name===e.name}function u4(e,t){if(l4(e))return t.revivePill?e.args??``:null;if(e.name.includes(` `))return null;let n=e.args??``;return`/skill:${e.name}${n.length>0?` ${n}`:``}`}function fse(e,t){return u4(e,t)!==null}function pse(e){if(l4(e))return e.args??``;let t=s4({kind:`skill`,name:e.name,path:``});return e.args?`${t} ${e.args}`:t}function d4(e){return t4??=new Intl.Segmenter(`und`,{granularity:`grapheme`}),Array.from(t4.segment(e),({segment:e})=>e)}function f4(e){let t=d4(e);if(t.length<=32)return e;let n=e.lastIndexOf(`.`),r=(n>=0?d4(e.slice(n)).length:0)+4,i=31-r;return i<8?`${t.slice(0,31).join(``)}…`:`${t.slice(0,i).join(``)}…${t.slice(-r).join(``)}`}function mse(e){return new Worker(`/assets/katexRenderer.worker-DE1eyXe6.js`,{type:`module`,name:e?.name})}function hse(e){return new Worker(`/assets/mermaidParser.worker-CBWarbNh.js`,{type:`module`,name:e?.name})}var gse={key:0,class:`md-frontmatter`},_se={class:`diff-bar`},vse=[`aria-label`,`onClick`],yse={class:`diff-pre`},bse={key:0,class:`diff-sign`},xse={class:`diff-text`},Sse=`data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7`,Cse=`pythinker-code://skill/`,p4=`md-table-wide`,m4=`md-table-toggle`,h4=`md-table-fade`,g4=`md-table-toggle--show`,wse=`md-table-at-end`,Tse=26,_4=`md-code-wrap`,v4=`md-code-wrap-toggle`,y4=`md-code-nums`,b4=`md-code-nums-toggle`,x4=`data-md-code-css`,Ese=` [data-line], [data-no-newline] { padding-inline: var(--space-3); } pre::selection, pre ::selection { background: var(--color-code-selection); @@ -979,7 +979,7 @@ pre[data-md-nums="on"] [data-line]::before { `)}function A(){i.planArmed||i.planMode||(i.goalMode&&o(`toggleGoal`),o(`togglePlan`))}function j(){if(wn.value){o(`focusGoal`);return}i.goalMode||((i.planArmed||i.planMode)&&o(`togglePlan`),o(`toggleGoal`))}let N=R(!1);function I(){N.value=!N.value,n(()=>{b(),se(),y.value?.focus()})}function te(){N.value&&(N.value=!1,n(b))}function ne(e){if(typeof getComputedStyle>`u`)return I7;let t=Number.parseFloat(getComputedStyle(e).minHeight);return Number.isFinite(t)&&t>0?t:I7}let re=R(!1);function se(){let e=y.value;re.value=!!e&&e.scrollHeight>ne(e)}s(g,()=>{n(se)}),s(()=>i.sessionId,()=>{N.value=!1,ue.value=!1,me.value=!1,C.value=[]});let ce=Ype({text:g,textareaRef:y,autosize:b,sessionId:()=>i.sessionId});function le(e){if(e===`/plan`){A();return}if(e===`/goal`){j();return}if(e===`/discussion`||e===`/expert-talk`||e===`/expert-opinion`){ir();return}o(`command`,e)}let{open:ue,items:fe,active:G,update:K,select:pe}=Xpe({text:g,textareaRef:y,autosize:b,skills:()=>i.skills,emitCommand:le,historyPush:e=>ce.push(e),clearDraft:S}),{open:me,items:he,active:ge,loading:_e,stale:ve,update:ye,select:be,complete:xe,close:Se,getMentionToken:Ce}=Zpe({text:g,textareaRef:y,autosize:b,searchFiles:()=>i.searchFiles}),we=R(null),Te=R(null),Ee=R(null);function De(e){y.value?.setSelectionRange(e,e)}let Oe=L({get:()=>g.value.startsWith(`/`)?g.value.slice(1):g.value,set:e=>{g.value=`/${e}`,n(()=>{De(g.value.length),K()})}}),ke=L({get:()=>{let e=Ee.value;return e?g.value.slice(e.start+1,e.end):``},set:e=>{let t=Ee.value;if(!t)return;g.value=`${g.value.slice(0,t.start)}@${e}${g.value.slice(t.end)}`;let r=t.start+e.length+1;Ee.value={start:t.start,end:r},n(()=>{De(r),ye()})}});s([ue,f],async([e,t])=>{!e||!t||(await n(),we.value?.focus())}),s([me,f],async([e,t])=>{!e||!t||(Ee.value=Ce(),await n(),Te.value?.focus())});function Ae(){ue.value=!1,y.value?.focus()}function je(e){e||Ae()}function Me(){Se(),Ee.value=null,y.value?.focus()}function q(e){e||Me()}function Ne(){ce.resetBrowsing(),K(),ye()}let{attachments:Pe,previewAttachment:Fe,fileInputRef:Ie,isDragOver:Le,removeAttachment:Re,reorderAttachment:ze,mediaLabel:Be,openAttachmentPreview:Ve,closeAttachmentPreview:He,openFilePicker:Ue,handleFileInputChange:We,handleDragOver:Ge,handleDragLeave:Ke,handleDrop:qe,clearAfterSubmit:Je,loadAttachments:Ye}=$pe({uploadImage:()=>i.uploadImage,sessionId:()=>i.sessionId});function Xe(){let e=Pe.value.map(e=>e.localId);for(let t of e)Re(t)}let Ze=L(()=>Pe.value.filter(e=>e.kind!==`file`)),Qe=L(()=>Pe.value.filter(e=>e.kind===`file`));function $e(e){let t=Be(e),r=y.value,i=r?.selectionStart??g.value.length,a=r?.selectionEnd??i,o=g.value.slice(0,i),s=g.value.slice(a),c=o.length>0&&!/\s$/.test(o),l=s.length>0&&!/^\s/.test(s),u=`${c?` `:``}${t}${l?` `:``}`;g.value=`${o}${u}${s}`,n(()=>{De(i+u.length),r?.focus(),b()})}function et(e,t){let n=Pe.value.findIndex(t=>t.localId===e.localId);n<0||ze(e.localId,n+t)}let tt=R(null);function nt(e,t){tt.value=e.localId,t.dataTransfer?.setData(`text/plain`,e.localId),t.dataTransfer&&(t.dataTransfer.effectAllowed=`move`)}function rt(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`)}function it(e,t){t.preventDefault();let n=t.dataTransfer?.getData(`text/plain`)||tt.value;if(tt.value=null,!n||n===e.localId)return;let r=Pe.value.findIndex(t=>t.localId===e.localId);r<0||ze(n,r)}function at(){tt.value=null}let ot=R(null),st=R(null),ct=R(!1),lt=null;function ut(){let e=ot.value;ct.value=e!==null&&e.scrollHeight>e.clientHeight+1}s(ot,e=>{lt?.disconnect(),lt=null,e&&typeof ResizeObserver==`function`&&(lt=new ResizeObserver(ut),lt.observe(e)),ut()},{immediate:!0}),s(Pe,()=>void n(ut),{deep:!0}),s(()=>[Ze.value.length,Qe.value.length],([e,t],[r,i])=>{e<=r&&t<=i||n(()=>{let t=ot.value;t&&(t.scrollTop=e>r&&st.value?st.value.offsetHeight-t.clientHeight:t.scrollHeight)})}),p(()=>{g.value&&n(()=>{b(),se()})}),h(()=>{document.removeEventListener(`click`,tn,!0),lt?.disconnect(),Kn?.disconnect(),kn?.disconnect(),St()});function dt(){y.value?.focus({preventScroll:!0})}function ft(e){Ye(e)}t({loadForEdit:x,loadAttachmentsForEdit:ft,insertQuote:D,focus:dt,anyPopupOpen:L(()=>ue.value||me.value||Mt.value||Nt.value||Pt.value||Vn.value),isEmpty:L(()=>g.value.trim().length===0&&Pe.value.length===0&&C.value.length===0)});let pt=R(null),mt=null;function ht(e){pt.value=u(`composer.noArgCommand`,{cmd:e}),mt!==null&&clearTimeout(mt),mt=setTimeout(()=>{pt.value=null,mt=null},3e3)}h(()=>{mt!==null&&clearTimeout(mt)});function gt(e){return{fileId:e.fileId,kind:e.kind,name:e.name,mediaType:e.mediaType,size:e.size}}function _t(e){if(e.kind===`file`){e.fileId!==void 0&&q4(e.fileId,e.name,e.mediaType);return}Ve(e)}function vt(){let e=g.value.trim(),t=k(e);if(Pe.value.some(e=>e.uploading))return;let n=Pe.value.filter(e=>!e.uploading&&!e.error&&e.fileId);if(!t&&n.length===0)return;if(C.value.length===0&&e===`/plan`){ce.push(e),g.value=``,S(),ue.value=!1,te(),A();return}if(C.value.length===0&&e===`/goal`){ce.push(e),g.value=``,S(),ue.value=!1,te(),j();return}if(C.value.length===0&&e){let t=Vpe(e),n=t===null?``:t.cmd===`/expert-talk`||t.cmd===`/expert-opinion`?`/discussion`:t.cmd,r=t?J3(i.skills).find(e=>e.name===n||e.name===`/skill:${n.slice(1)}`):void 0;if(t&&r){if(t.arg.trim()&&r.acceptsInput!==!0){ht(t.cmd);return}ce.push(e),g.value=``,S(),ue.value=!1,te(),le(t.arg?`${n} ${t.arg}`:n);return}}e&&ce.push(e);let r={text:t,attachments:n.map(e=>gt(e))};Fe.value=null,Je(),g.value=``,C.value=[],S(),ue.value=!1,me.value=!1,te(),o(`submit`,r)}function yt(){if(!i.running||Pe.value.some(e=>e.uploading))return;let e=g.value.trim(),t=k(e),n=Pe.value.filter(e=>!e.uploading&&!e.error&&e.fileId);if(!t&&n.length===0&&i.queued.length===0)return;let r={text:t,attachments:n.map(e=>gt(e))};Je(),e&&ce.push(e),g.value=``,C.value=[],S(),ue.value=!1,me.value=!1,te(),o(`steer`,r)}let bt=!1,xt=null;function St(){xt!==null&&(clearTimeout(xt),xt=null)}function Ct(){St(),bt=!0}function wt(){St(),xt=setTimeout(()=>{xt=null,bt=!1},0)}function Tt(e){return bt||e.isComposing||e.keyCode===229}function Et(e){if(!Tt(e)){if(Tn.value&&e.key===`Backspace`&&!e.shiftKey&&!e.altKey&&!e.metaKey&&!e.ctrlKey){let t=y.value;if(t&&t.selectionStart===0&&t.selectionEnd===0){e.preventDefault(),An();return}}if(e.key===`Escape`){if(Vn.value){e.preventDefault(),Yn();return}if(Mt.value){e.preventDefault(),Zt();return}if(Nt.value){e.preventDefault(),Xt();return}if(Pt.value){e.preventDefault(),$t();return}}if(ue.value){if(e.key===`Escape`){e.preventDefault(),ue.value=!1;return}if(e.key===`Tab`&&fe.value.length===0){ue.value=!1;return}if(e.key===`ArrowDown`){e.preventDefault(),G.value=(G.value+1)%fe.value.length;return}if(e.key===`ArrowUp`){e.preventDefault(),G.value=(G.value-1+fe.value.length)%fe.value.length;return}if(e.key===`Enter`||e.key===`Tab`){e.preventDefault();let t=fe.value[G.value];t&&pe(t);return}}if(me.value&&!_e.value){if(e.key===`ArrowDown`){e.preventDefault(),ge.value=(ge.value+1)%Math.max(1,he.value.length);return}if(e.key===`ArrowUp`){e.preventDefault(),ge.value=(ge.value-1+Math.max(1,he.value.length))%Math.max(1,he.value.length);return}if(e.key===`Tab`){e.preventDefault();let t=he.value[ge.value];t&&xe(t);return}if(e.key===`Enter`){e.preventDefault();let t=he.value[ge.value];t&&be(t);return}if(e.key===`Escape`){e.preventDefault(),me.value=!1;return}}if(e.key===`Escape`&&Fn.value?.cancelActive()){e.preventDefault();return}if(e.key===`s`&&(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey){i.running&&(e.preventDefault(),yt());return}if(!N.value&&!ue.value&&!me.value&&!e.shiftKey&&!e.altKey&&!e.metaKey&&!e.ctrlKey){let t=ce.isBrowsing();if(e.key===`ArrowUp`&&ce.hasHistory()&&(t||ce.caretAtTextStart())){e.preventDefault(),ce.recallOlder(),ue.value=!1;return}if(e.key===`ArrowDown`&&t){e.preventDefault(),ce.recallNewer(),ue.value=!1;return}}if(e.key===`Enter`&&!e.shiftKey){if(N.value&&!(e.metaKey||e.ctrlKey))return;e.preventDefault(),vt()}}}let Dt=L(()=>u(`composer.send`)),Ot=L(()=>!!i.uploadImage),kt=L(()=>!Pe.value.some(e=>e.uploading)&&(g.value.trim()!==``||C.value.length>0||Pe.value.some(e=>!e.error&&e.fileId))),At=L(()=>{if(ue.value)return`composer-slash-menu`;if(me.value)return`composer-mention-menu`}),jt=L(()=>{if(ue.value&&fe.value.length>0)return`composer-slash-option-${G.value}`;if(me.value&&he.value.length>0)return`composer-mention-option-${ge.value}`}),Mt=R(!1),Nt=R(!1),Pt=R(!1),Ft=R(null),It=R(null),Lt=R(null),Rt=R(null),zt=R(null),Bt=R(null),Vt=R(null),Ht=R(null);pp(Bt),pp(Vt),pp(Ht);let Ut=R(``),Wt=R(``),Gt=R(``),Kt=R(``),qt=R(!1);function Jt(){Mt.value=!Mt.value,Mt.value&&(rn(),Nt.value=!1,Pt.value=!1,Yn(),ue.value=!1,me.value=!1,document.addEventListener(`click`,tn,!0))}function Yt(){mn.value||(Nt.value=!Nt.value,Nt.value&&(an(),Mt.value=!1,Pt.value=!1,Yn(),ue.value=!1,me.value=!1,document.addEventListener(`click`,tn,!0)))}function Xt(){Nt.value=!1,en()}function Zt(){Mt.value=!1,en()}function Qt(){Pt.value=!Pt.value,Pt.value&&(nn(),Mt.value=!1,Nt.value=!1,Yn(),ue.value=!1,me.value=!1,document.addEventListener(`click`,tn,!0))}function $t(){Pt.value=!1,en()}function en(){!Mt.value&&!Nt.value&&!Pt.value&&!Vn.value&&document.removeEventListener(`click`,tn,!0)}function tn(e){let t=e.target;Ft.value?.contains(t)||Hn.value?.contains(t)||Un.value?.contains(t)||(Zt(),Xt(),$t(),Yn())}function nn(){let e=It.value,t=Ft.value;Ut.value=e&&t?`${Math.round(e.getBoundingClientRect().left-t.getBoundingClientRect().left)}px`:``}function rn(){let e=Lt.value,t=Ft.value;Wt.value=e&&t?`${Math.round(t.getBoundingClientRect().right-e.getBoundingClientRect().right)}px`:``}function an(){let e=Rt.value,t=Ft.value;Gt.value=e&&t?`${Math.round(t.getBoundingClientRect().right-e.getBoundingClientRect().right)}px`:``}let on=L(()=>{let e=i.status?.ctxMax??0;return e<=0?0:Math.min(100,Math.max(0,Math.ceil((i.status?.ctxUsed??0)/e*100)))}),sn=L(()=>u(`status.ctxTooltip`,{used:yO(i.status?.ctxUsed??0),max:yO(i.status?.ctxMax??0),pct:on.value})),cn=L(()=>on.value>=80),ln=L(()=>i.models?.find(e=>e.id===i.status?.modelId)),un=L(()=>Y3(ln.value)),dn=L(()=>Q3(ln.value)),fn=L(()=>n6(ln.value,i.thinking)),pn=L(()=>dn.value.includes(fn.value)?fn.value:``),mn=L(()=>un.value===`unsupported`||dn.value.length<=1),hn=L(()=>{let e=(ln.value?.supportEfforts?.length??0)>0,t=fn.value;return e&&t!==`on`&&t!==`off`?$3(t):vn(t)}),gn=L(()=>u(`composer.thinkingControl`,{level:hn.value}));function _n(e){mn.value||(o(`setThinking`,t6(ln.value,e)),Xt())}function vn(e){return e===`on`?u(`status.thinkingOn`):e===`off`?u(`status.thinkingOff`):$3(e)}let yn=L(()=>dn.value.map(e=>({value:e,label:vn(e)}))),bn=L(()=>i.planArmed===!0||i.planMode===!0),xn=L(()=>i.workflowActive===!0),Sn=L(()=>i.towerMode===!0),Cn=L(()=>i.goal?.status??i.activationBadges?.goal?.status??null),wn=L(()=>Cn.value!==null&&Cn.value!==`complete`),Tn=L(()=>i.goalMode?`goal`:i.towerMode?`tower`:i.planArmed?`plan`:null),En=R(null),Dn=R(``),On=L(()=>Dn.value?{textIndent:Dn.value}:void 0),kn=null;function An(){Tn.value===`goal`?o(`toggleGoal`):Tn.value===`tower`?o(`toggleTower`):Tn.value===`plan`&&o(`togglePlan`)}function jn(e){return e===`goal`?`target`:e===`tower`?`git-fork`:`file-edit`}function Mn(e){return u(e===`goal`?`status.goalLabel`:e===`tower`?`status.towerLabel`:`status.planLabel`)}function Nn(){let e=En.value;Dn.value=e?`calc(${e.offsetWidth}px + var(--space-1-5) - var(--space-05))`:``}s(Tn,async e=>{if(kn?.disconnect(),kn=null,!e){Dn.value=``;return}await n(),Nn(),typeof ResizeObserver==`function`&&En.value&&(kn=new ResizeObserver(Nn),kn.observe(En.value))},{immediate:!0});let Pn=R(null),Fn=R(null),In=m(D7,void 0),Ln=L(()=>In?.status.value?.activation.state===`armed`||In?.run.value?.state===`running`),Rn=L(()=>Ln.value?u(`expertTalk.title`):i.status?.model??``);s(Ln,e=>{e&&Zt()});function zn(e){x(u(`expertTalk.buildPrompt`,{answer:e})),vt()}function Bn(){if(Ln.value){Fn.value?.openDialog();return}Jt()}let Vn=R(!1),Hn=R(null),Un=R(null);pp(Hn),pp(Un);let Wn=R(null),Gn=R(null),Kn=null,qn=L(()=>{let e=[];return Ot.value&&e.push({id:`files`,icon:`attachment`,nameKey:`composer.addFiles`,action:er}),f.value&&e.push({id:`slash`,icon:`terminal`,nameKey:`composer.addSlash`,descKey:`composer.addSlashDesc`,action:tr},{id:`mention`,icon:`link`,nameKey:`composer.addMention`,descKey:`composer.addMentionDesc`,action:nr}),e.push({id:`capabilities`,icon:`sliders`,nameKey:`capabilityMenu.trigger`,action:rr},...Fn.value?.available?[{id:`expertOpinion`,icon:`sparkles`,nameKey:`expertTalk.title`,descKey:`composer.addExpertOpinionDesc`,action:ir}]:[],{id:`goal`,icon:`target`,nameKey:`status.goalLabel`,descKey:`composer.addGoalDesc`,action:ar},{id:`plan`,icon:`file-edit`,nameKey:`status.planLabel`,descKey:`composer.addPlanDesc`,action:or},...i.towerAvailable?[{id:`tower`,icon:`git-fork`,nameKey:`status.towerLabel`,descKey:`composer.addTowerDesc`,action:sr}]:[],{id:`workflow`,icon:`sparkles`,nameKey:`status.dynamicWorkflowLabel`,descKey:`composer.addWorkflowDesc`,action:cr}),e});function Jn(){let e=Wn.value;if(!e||e.scrollHeight<=e.clientHeight+1){Gn.value=null;return}let t=getComputedStyle(e),n=Number.parseFloat(t.getPropertyValue(`--menu-scrollbar-track-inset`))||0,r=Number.parseFloat(t.getPropertyValue(`--menu-scrollbar-thumb-min`))||24,i=e.clientHeight-n*2,a=Math.max(r,e.clientHeight/e.scrollHeight*i),o=e.scrollHeight-e.clientHeight;Gn.value={top:e.offsetTop+n+e.scrollTop/o*(i-a),height:a}}s(Vn,async e=>{Kn?.disconnect(),Kn=null,Gn.value=null,e&&(await n(),Jn(),typeof ResizeObserver==`function`&&Wn.value&&(Kn=new ResizeObserver(Jn),Kn.observe(Wn.value)))});function Yn(){Vn.value=!1,en()}function Xn(e){e||Yn()}function Zn(){if(Vn.value){Yn();return}Zt(),Xt(),$t(),ue.value=!1,me.value=!1,Vn.value=!0,document.addEventListener(`click`,tn,!0),n(()=>{(f.value?Un.value:Hn.value)?.querySelector(`.am-row`)?.focus()})}function Qn(e){e.action(),f.value&&e.id===`files`||y.value?.focus()}function $n(e){if(e.key===`Escape`){e.preventDefault(),Yn(),y.value?.focus();return}if(e.key===`Tab`){Yn();return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let t=f.value?Un.value:Hn.value,n=Array.from(t?.querySelectorAll(`.am-row`)??[]);if(n.length===0)return;let r=n.indexOf(document.activeElement);n[e.key===`ArrowDown`?(r+1)%n.length:(r-1+n.length)%n.length]?.focus()}function er(){Yn(),Ue()}function tr(){Yn(),g.value=`/`,n(()=>{De(1),K()})}function nr(){Yn(),g.value=`@`,n(()=>{De(1),ye()})}function rr(){Yn(),Pn.value?.toggleOpen()}function ir(){Yn(),Fn.value?.activate()}function ar(){Yn(),i.goalMode||j()}function or(){Yn(),Sn.value&&o(`toggleTower`),bn.value||A()}function sr(){Yn(),bn.value&&o(`togglePlan`),Sn.value||o(`toggleTower`)}function cr(){Yn(),xn.value||o(`toggleWorkflow`)}let lr=[{mode:`manual`,icon:`fingerprint`,color:`var(--color-text)`,labelKey:`status.permissionManual`,descKey:`status.permissionManualDesc`},{mode:`yolo`,icon:`shield-question`,color:`var(--color-warning)`,labelKey:`status.permissionYolo`,descKey:`status.permissionYoloDesc`},{mode:`auto`,icon:`full-access`,color:`var(--color-danger)`,labelKey:`status.permissionAuto`,descKey:`status.permissionAutoDesc`}],ur=R(null),dr=R(``);function fr(e){let t={};return e&&(t[`--composer-menu-desc-width`]=e),t}let pr=L(()=>{let e=fr(dr.value);return Ut.value&&(e.left=Ut.value),e}),mr=L(()=>{let e={};return Wt.value&&(e.right=Wt.value),Kt.value&&(e.maxHeight=Kt.value),e}),hr=L(()=>{let e={};return Gt.value&&(e.right=Gt.value),e}),gr=null;function _r(e){let t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function vr(e){return`${e.fontStyle||`normal`} ${e.fontWeight||`400`} ${e.fontSize} ${e.fontFamily}`}function yr(e){return e.letterSpacing===`normal`?0:_r(e.letterSpacing)}function br(e,t){return e?vpe(gpe(e,vr(t),{letterSpacing:yr(t)})):0}function xr(){let e=ur.value?.querySelector(`.pd-desc`);if(!e)return;let t=getComputedStyle(e),n=Math.max(0,...lr.map(e=>br(u(e.descKey),t)));dr.value=n>0?`${Math.ceil(n)}px`:``}function Sr(){typeof window>`u`||(gr!==null&&window.cancelAnimationFrame(gr),n(()=>{gr=window.requestAnimationFrame(()=>{gr=null,xr()})}))}s(d,Sr,{immediate:!0}),p(()=>{Sr(),document.fonts?.ready.then(Sr)}),h(()=>{gr!==null&&(window.cancelAnimationFrame(gr),gr=null)});function Cr(e){o(`setPermission`,e),$t()}let wr=L(()=>lr.find(e=>e.mode===i.status?.permission)),Tr=L(()=>wr.value?u(wr.value.labelKey):``),Er=L(()=>wr.value?.icon??`fingerprint`),Dr=R(!1),Or=R(!1),kr=R(!1),Ar=R(!1),jr=0,Mr=0,Nr=0,Pr=0,Fr=R(null),Ir=null;function Lr(e,t,n){let r=e.getPropertyValue(t).trim(),i=Number.parseFloat(r);return Number.isFinite(i)?r.endsWith(`em`)?i*Number.parseFloat(e.fontSize):i:n}function Rr(e){return e.scrollWidth>e.clientWidth+1||e.clientWidth===0&&(e.textContent?.length??0)>0}function zr(e){let t=e.getBoundingClientRect().left;for(let n of e.querySelectorAll(`.compact-chip, .ctx-group, .model-pill, .stop, .send`)){let e=n.getBoundingClientRect();if(e.width>0&&e.leftPr+i&&(Ar.value=!1,n(Br));return}if(kr.value){if(a>Nr+i){kr.value=!1,n(Br);return}o&&zr(o)&&(Pr=a,Ar.value=!0,n(Br));return}if(Or.value){if(a>Mr+i){Or.value=!1,n(Br);return}o&&zr(o)&&(cn.value?(Nr=a,kr.value=!0):(Pr=a,Ar.value=!0),n(Br));return}if(Dr.value&&a>jr+i){Dr.value=!1,n(Br);return}let s=zt.value;!s||!Rr(s)||s.getBoundingClientRect().width>=r||(Dr.value?(Mr=a,Or.value=!0):(jr=a,Dr.value=!0),n(Br))}p(()=>{typeof ResizeObserver==`function`&&Ft.value&&(Ir=new ResizeObserver(Br),Ir.observe(Ft.value)),document.fonts?.ready.then(Br)}),s([Tr,xn,cn,hn,()=>i.status?.model,()=>i.working,d],()=>{Dr.value=!1,Or.value=!1,kr.value=!1,Ar.value=!1,n(Br)}),h(()=>{Ir?.disconnect(),Ir=null});let Vr=L(()=>ln.value?.provider??``),Hr=L(()=>!Vr.value||!i.models?.length?[]:i.models.filter(e=>e.provider===Vr.value)),Ur=L(()=>new Set(i.starredIds??[]));function Wr(e){return Ur.value.has(e)}let Gr=L(()=>i.models?.length?i.models.filter(e=>Wr(e.id)&&e.provider!==Vr.value):[]);function Kr(){let e=Bt.value,t=Ft.value;if(!e||!t)return;let n=getComputedStyle(e),r=_r(n.getPropertyValue(`--space-1`))||4,i=_r(n.getPropertyValue(`--space-2`))||8,a=window.visualViewport,o=a?.offsetTop??0,s=o+(a?.height??window.innerHeight),c=t.getBoundingClientRect(),l=c.top-o-r-i,u=s-c.bottom-r-i;e.offsetHeight>l&&u>l?(qt.value=!0,Kt.value=`${Math.max(Math.floor(u),0)}px`):(qt.value=!1,Kt.value=`${Math.max(Math.floor(l),0)}px`)}function qr(){Zt()}function Jr(){window.addEventListener(`resize`,qr),window.visualViewport?.addEventListener(`resize`,qr),window.visualViewport?.addEventListener(`scroll`,qr)}function Yr(){window.removeEventListener(`resize`,qr),window.visualViewport?.removeEventListener(`resize`,qr),window.visualViewport?.removeEventListener(`scroll`,qr)}s(Mt,async e=>{if(!e){Yr();return}Jr(),qt.value=!1,Kt.value=``,await n(),Kr(),(Bt.value?.querySelector(`.md-row.is-current`)??Bt.value?.querySelector(`.md-row`))?.focus()}),h(Yr);function Xr(e){if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;let t=Array.from(Bt.value?.querySelectorAll(`.md-row:not(:disabled)`)??[]);if(t.length===0)return;e.preventDefault();let n=t.indexOf(document.activeElement);t[e.key===`ArrowDown`?(n+1)%t.length:(n-1+t.length)%t.length]?.focus()}function Zr(e){o(`selectModel`,e),Zt()}return(t,n)=>(c(),W(`div`,{class:V([`composer`,{"drag-over":z(Le),expanded:N.value}]),onDragover:n[27]||=(...e)=>z(Ge)&&z(Ge)(...e),onDragleave:n[28]||=(...e)=>z(Ke)&&z(Ke)(...e),onDrop:n[29]||=(...e)=>z(qe)&&z(qe)(...e)},[z(Fe)?(c(),W(`div`,{key:0,class:`att-lightbox`,onClick:n[1]||=H((...e)=>z(He)&&z(He)(...e),[`self`])},[F(`div`,Nbe,[v(Sp,{text:z(u)(`model.close`)},{default:B(()=>[F(`button`,{type:`button`,class:`att-lightbox-close`,onClick:n[0]||=(...e)=>z(He)&&z(He)(...e)},`✕`)]),_:1},8,[`text`]),z(Fe).kind===`video`?(c(),W(`video`,{key:0,class:`att-lightbox-media`,src:z(Fe).previewUrl,controls:``,playsinline:``},null,8,Pbe)):(c(),W(`img`,{key:1,class:`att-lightbox-media`,src:z(Fe).previewUrl,alt:z(Fe).name},null,8,Fbe)),F(`div`,Ibe,U(z(Fe).name),1)])])):E(``,!0),F(`div`,{class:V([`composer-card`,{"labels-collapsed":Dr.value}])},[C.value.length>0?(c(),W(`div`,{key:0,class:`quote-strip`,"aria-label":z(u)(`selection.quoteLabel`)},[(c(!0),W(M,null,_(C.value,e=>(c(),W(`div`,{key:e.id,class:`quote-chip`},[F(`span`,Rbe,[e.source?(c(),W(`span`,zbe,U(e.source),1)):E(``,!0),F(`span`,Bbe,U(e.text),1),e.comment?(c(),W(`span`,Vbe,U(e.comment),1)):E(``,!0)]),v(Ca,{size:`sm`,label:z(u)(`composer.removeNamed`,{name:e.text}),onClick:t=>O(e.id)},{default:B(()=>[v(X,{name:`close`,size:`sm`})]),_:1},8,[`label`,`onClick`])]))),128))],8,Lbe)):E(``,!0),z(Pe).length>0?(c(),W(`div`,Hbe,[F(`div`,{ref_key:`attachmentScrollRef`,ref:ot,class:V([`att-scroll`,{"is-overflowing":ct.value}])},[F(`div`,Ube,[Ze.value.length>0?(c(),W(`div`,{key:0,ref_key:`attachmentMediaRowRef`,ref:st,class:`att-row att-row-media`,role:`list`,"aria-label":z(u)(`composer.mediaAttachments`)},[(c(!0),W(M,null,_(Ze.value,e=>(c(),P(F4,{key:e.localId,kind:e.kind,name:z(Be)(e),url:e.previewUrl,"file-id":e.fileId,"media-type":e.mediaType,size:e.size,ordinal:e.mediaOrdinal,uploading:e.uploading,error:e.error,mentionable:``,reorderable:``,dragging:tt.value===e.localId,removable:``,"mention-label":z(u)(`composer.mentionNamed`,{name:z(Be)(e)}),"remove-label":z(u)(`composer.removeNamed`,{name:z(Be)(e)}),onActivate:t=>_t(e),onMention:t=>$e(e),onReorderStep:t=>et(e,t),onDragStart:t=>nt(e,t),onDragOver:rt,onDrop:t=>it(e,t),onDragEnd:at,onRemove:t=>z(Re)(e.localId)},null,8,[`kind`,`name`,`url`,`file-id`,`media-type`,`size`,`ordinal`,`uploading`,`error`,`dragging`,`mention-label`,`remove-label`,`onActivate`,`onMention`,`onReorderStep`,`onDragStart`,`onDrop`,`onRemove`]))),128))],8,Wbe)):E(``,!0),Qe.value.length>0?(c(),W(`div`,Gbe,[(c(!0),W(M,null,_(Qe.value,e=>(c(),P(F4,{key:e.localId,kind:`file`,name:e.name,"media-type":e.mediaType,size:e.size,uploading:e.uploading,error:e.error,removable:``,"remove-label":z(u)(`composer.removeNamed`,{name:e.name}),onActivate:t=>_t(e),onRemove:t=>z(Re)(e.localId)},null,8,[`name`,`media-type`,`size`,`uploading`,`error`,`remove-label`,`onActivate`,`onRemove`]))),128))])):E(``,!0)])],2),ct.value?(c(),W(`span`,Kbe,U(z(u)(`composer.attachmentCount`,{n:z(Pe).length})),1)):E(``,!0),z(Pe).length>=2?(c(),P(Sp,{key:1,text:z(u)(`composer.clearAll`)},{default:B(()=>[v(Ca,{class:`att-clear`,size:`sm`,label:z(u)(`composer.clearAll`),onClick:Xe},{default:B(()=>[v(X,{name:`trash`})]),_:1},8,[`label`])]),_:1},8,[`text`])):E(``,!0)])):E(``,!0),F(`div`,qbe,[v(A7,{models:e.models,trigger:`widget`},null,8,[`models`])]),F(`div`,Jbe,[z(ue)&&!z(f)?(c(),P(G3,{key:0,id:`composer-slash-menu`,items:z(fe),"active-index":z(G),onSelect:z(pe),onHover:n[2]||=e=>G.value=e},null,8,[`items`,`active-index`,`onSelect`])):E(``,!0),z(me)&&!z(f)?(c(),P(K3,{key:1,id:`composer-mention-menu`,items:z(he),"active-index":z(ge),loading:z(_e),stale:z(ve),onSelect:z(be),onHover:n[3]||=e=>ge.value=e},null,8,[`items`,`active-index`,`loading`,`stale`,`onSelect`])):E(``,!0),v(oe,{name:`composer-menu-pop`},{default:B(()=>[Vn.value&&!z(f)?(c(),W(`div`,{key:0,ref_key:`modesMenuRef`,ref:Hn,class:`add-menu`,onClick:n[5]||=H(()=>{},[`stop`]),onKeydown:$n},[F(`div`,{ref_key:`addMenuScrollRef`,ref:Wn,class:`am-scroll`,role:`menu`,onScroll:Jn},[(c(!0),W(M,null,_(qn.value,e=>(c(),W(`button`,{key:e.id,type:`button`,class:`am-row`,role:`menuitem`,onMousedown:n[4]||=H(()=>{},[`prevent`]),onClick:t=>Qn(e)},[F(`span`,Xbe,[v(X,{name:e.icon,size:`sm`},null,8,[`name`])]),F(`span`,Zbe,U(z(u)(e.nameKey)),1),e.descKey?(c(),W(`span`,Qbe,U(z(u)(e.descKey)),1)):E(``,!0)],40,Ybe))),128))],544),Gn.value?(c(),W(`div`,{key:0,class:`scroll-thumb`,style:ae({top:`${Gn.value.top}px`,height:`${Gn.value.height}px`})},null,4)):E(``,!0)],544)):E(``,!0)]),_:1}),F(`div`,$be,[Tn.value?(c(),W(`span`,{key:0,ref_key:`workModePillRef`,ref:En,class:`wm-pill`},[v(X,{name:jn(Tn.value),size:`sm`},null,8,[`name`]),F(`span`,null,U(Mn(Tn.value)),1),v(Ca,{class:`wm-x`,size:`sm`,label:z(u)(`status.workModeDismiss`),onMousedown:n[6]||=H(()=>{},[`prevent`]),onClick:An},{default:B(()=>[v(X,{name:`close`,size:`sm`})]),_:1},8,[`label`])],512)):E(``,!0),l(F(`textarea`,{ref_key:`textareaRef`,ref:y,"onUpdate:modelValue":n[7]||=e=>T(g)?g.value=e:null,class:`ph`,style:ae(On.value),placeholder:a.value,disabled:e.starting,autocomplete:`off`,spellcheck:`false`,rows:`1`,role:`combobox`,"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-expanded":!!At.value,"aria-controls":At.value,"aria-activedescendant":jt.value,onKeydown:Et,onCompositionstart:Ct,onCompositionend:wt,onInput:Ne,onBlur:n[8]||=e=>{z(f)||(ue.value=!1,me.value=!1)}},null,44,exe),[[de,z(g)]]),v(Sp,{text:N.value?z(u)(`composer.collapseTitle`):z(u)(`composer.expandTitle`)},{default:B(()=>[N.value||re.value?(c(),W(`button`,{key:0,class:`expand-btn`,type:`button`,"aria-label":N.value?z(u)(`composer.collapseTitle`):z(u)(`composer.expandTitle`),onClick:I},[N.value?(c(),P(X,{key:0,name:`collapse`,size:`sm`})):(c(),P(X,{key:1,name:`expand`,size:`sm`}))],8,txe)):E(``,!0)]),_:1},8,[`text`])])]),Ot.value?(c(),W(`input`,{key:2,ref_key:`fileInputRef`,ref:Ie,type:`file`,multiple:``,class:`file-input-hidden`,onChange:n[9]||=(...e)=>z(We)&&z(We)(...e)},null,544)):E(``,!0),F(`div`,{ref_key:`toolbarRef`,ref:Ft,class:`toolbar`},[F(`div`,{ref_key:`menuMeasureRef`,ref:ur,class:`menu-measure`,"aria-hidden":`true`},[...n[30]||=[F(`span`,{class:`pd-desc`},null,-1)]],512),F(`div`,nxe,[v(Ca,{size:`md`,class:`composer-attach`,label:z(u)(`composer.addMenu`),"aria-haspopup":`menu`,"aria-expanded":Vn.value,onMousedown:n[10]||=H(()=>{},[`prevent`]),onClick:H(Zn,[`stop`])},{default:B(()=>[v(X,{name:`plus`})]),_:1},8,[`label`,`aria-expanded`]),v(zye,{ref_key:`capMenuRef`,ref:Pn,"session-id":e.sessionId,triggerless:``},null,8,[`session-id`]),v(A7,{ref_key:`expertTalkControlRef`,ref:Fn,models:e.models,onTake:z(x),onBuild:zn},null,8,[`models`,`onTake`]),e.status?(c(),W(`span`,{key:0,ref_key:`permissionPillRef`,ref:It,class:V([`perm-pill`,[`perm-`+e.status.permission,{open:Pt.value}]]),role:`button`,tabindex:`0`,"aria-label":Tr.value,onClick:H(Qt,[`stop`]),onKeydown:[ie(Qt,[`enter`]),ie(H(Qt,[`prevent`]),[`space`])]},[v(X,{class:`perm-pill-icon`,name:Er.value,size:`md`},null,8,[`name`]),F(`span`,ixe,U(Tr.value),1)],42,rxe)):E(``,!0),v(oe,{name:`composer-menu-pop`},{default:B(()=>[Pt.value&&e.status?(c(),W(`div`,{key:0,ref_key:`permDropdownRef`,ref:Ht,class:`perm-dropdown`,style:ae(pr.value),role:`menu`,onClick:n[11]||=H(()=>{},[`stop`])},[(c(),W(M,null,_(lr,t=>F(`button`,{key:t.mode,class:V([`pd-row`,{"is-current":t.mode===e.status.permission}]),role:`menuitem`,onClick:e=>Cr(t.mode)},[F(`span`,{class:`pd-icon`,style:ae({color:t.color})},[v(X,{name:t.icon,size:`md`},null,8,[`name`])],4),F(`span`,oxe,[F(`span`,{class:`pd-name`,style:ae({color:t.color})},U(z(u)(t.labelKey)),5),F(`span`,sxe,U(z(u)(t.descKey)),1)]),F(`span`,cxe,[t.mode===e.status.permission?(c(),P(X,{key:0,name:`check`,size:`sm`})):E(``,!0)])],10,axe)),64))],4)):E(``,!0)]),_:1}),xn.value?(c(),W(`span`,lxe,[v(X,{class:`workflow-ic`,name:`sparkles`,size:`md`}),F(`span`,uxe,U(z(u)(`status.dynamicWorkflowLabel`)),1),v(Ca,{class:`workflow-x`,size:`sm`,label:z(u)(`status.dynamicWorkflowDismiss`),onMousedown:n[12]||=H(()=>{},[`prevent`]),onClick:n[13]||=H(e=>o(`toggleWorkflow`),[`stop`])},{default:B(()=>[v(X,{name:`close`,size:`sm`})]),_:1},8,[`label`])])):E(``,!0)]),F(`div`,{ref_key:`toolbarRightRef`,ref:Fr,class:`toolbar-right`},[cn.value?(c(),W(`button`,{key:0,class:V([`compact-chip`,{gone:kr.value}]),onClick:n[14]||=H(e=>o(`compact`),[`stop`])},`/compact`,2)):E(``,!0),v(Sp,{text:sn.value},{default:B(()=>[e.status&&!e.hideContext?(c(),W(`span`,{key:0,class:`ctx-group`,role:`img`,tabindex:`0`,"aria-label":sn.value},[v(rme,{pct:on.value},null,8,[`pct`])],8,dxe)):E(``,!0)]),_:1},8,[`text`]),v(Sp,{text:Or.value?Rn.value:null},{default:B(()=>[e.status?(c(),W(`button`,{key:0,ref_key:`modelPillRef`,ref:Lt,type:`button`,class:V([`model-pill`,{open:Mt.value,"icon-only":Or.value,"model-gone":Ar.value&&!Ln.value,"is-discussion":Ln.value}]),"aria-haspopup":Ln.value?`dialog`:`menu`,"aria-expanded":Ln.value?void 0:Mt.value,"aria-label":Or.value?Rn.value:void 0,onClick:H(Bn,[`stop`])},[Or.value?(c(),P(X,{key:0,name:Ln.value?`sparkles`:`cute-bot`,size:`md`,live:e.running},null,8,[`name`,`live`])):(c(),W(M,{key:1},[Ln.value?(c(),P(X,{key:0,name:`sparkles`,size:`sm`})):E(``,!0),F(`span`,{ref_key:`modelNameRef`,ref:zt,class:`mp-name`},U(Rn.value),513),v(X,{class:`cv`,name:`chevron-down`,size:`sm`})],64))],10,fxe)):E(``,!0)]),_:1},8,[`text`]),e.status&&un.value!==`unsupported`?(c(),P(Sp,{key:1,text:gn.value},{default:B(()=>[F(`button`,{ref_key:`thinkingPillRef`,ref:Rt,type:`button`,class:V([`thinking-pill`,{open:Nt.value}]),disabled:mn.value,"aria-haspopup":`dialog`,"aria-expanded":Nt.value,"aria-label":gn.value,onClick:H(Yt,[`stop`]),onKeydown:ie(H(Xt,[`prevent`]),[`escape`])},[v(X,{name:`thinking`,size:`sm`}),F(`span`,mxe,U(hn.value),1),mn.value?E(``,!0):(c(),P(X,{key:0,class:`cv`,name:`chevron-down`,size:`sm`}))],42,pxe)]),_:1},8,[`text`])):E(``,!0),e.working?(c(),P(Sp,{key:2,text:z(u)(`composer.interruptTitle`)},{default:B(()=>[F(`button`,{class:`stop`,"aria-label":z(u)(`composer.interrupt`),onClick:n[15]||=e=>o(`interrupt`)},[...n[31]||=[F(`span`,{class:`stop-square`,"aria-hidden":`true`},null,-1)]],8,hxe)]),_:1},8,[`text`])):E(``,!0),F(`button`,{class:V([`send`,{"is-starting":e.starting}]),"aria-label":Dt.value,disabled:e.starting||!kt.value,onClick:n[16]||=e=>vt()},[e.starting?(c(),P(op,{key:0,size:`sm`})):(c(),P(X,{key:1,name:`send`,size:`sm`}))],10,gxe)],512),v(oe,{name:`composer-menu-pop`},{default:B(()=>[Mt.value&&e.status?(c(),W(`div`,{key:0,ref_key:`modelDropdownRef`,ref:Bt,class:V([`composer-dropdown model-dropdown`,{"flip-down":qt.value}]),style:ae(mr.value),role:`menu`,onClick:n[18]||=H(()=>{},[`stop`]),onKeydown:Xr},[F(`div`,_xe,[Gr.value.length>0?(c(),W(`div`,vxe,U(z(u)(`status.starredModels`)),1)):E(``,!0),(c(!0),W(M,null,_(Gr.value,t=>(c(),W(`button`,{key:t.id,class:V([`md-row`,{"is-current":t.id===e.status.modelId}]),role:`menuitem`,onClick:e=>Zr(t.id)},[F(`span`,bxe,[t.id===e.status.modelId?(c(),P(X,{key:0,name:`check`,size:`sm`})):E(``,!0)]),F(`span`,xxe,U(t.displayName??t.model),1),F(`span`,Sxe,U(t.provider),1),v(X,{class:`md-star`,name:`star`,size:`sm`})],10,yxe))),128)),Gr.value.length>0?(c(),W(`div`,Cxe)):E(``,!0),Hr.value.length>0?(c(),W(`div`,wxe,U(Vr.value),1)):E(``,!0),(c(!0),W(M,null,_(Hr.value,t=>(c(),W(`button`,{key:t.id,class:V([`md-row`,{"is-current":t.id===e.status.modelId}]),role:`menuitem`,onClick:e=>Zr(t.id)},[F(`span`,Exe,[t.id===e.status.modelId?(c(),P(X,{key:0,name:`check`,size:`sm`})):E(``,!0)]),F(`span`,Dxe,U(t.displayName??t.model),1),Wr(t.id)?(c(),P(X,{key:0,class:`md-star`,name:`star`,size:`sm`})):E(``,!0)],10,Txe))),128))]),Hr.value.length>0?(c(),W(`div`,Oxe)):E(``,!0),F(`button`,{class:`md-row md-row-more`,role:`menuitem`,onClick:n[17]||=e=>{Zt(),o(`pickModel`)}},[F(`span`,kxe,[v(X,{name:`list`,size:`sm`})]),F(`span`,Axe,U(z(u)(`status.moreModels`)),1),v(X,{class:`md-more-arrow`,name:`chevron-right`,size:`sm`})])],38)):E(``,!0)]),_:1}),v(oe,{name:`composer-menu-pop`},{default:B(()=>[Nt.value&&e.status?(c(),W(`div`,{key:0,ref_key:`thinkingDropdownRef`,ref:Vt,class:`composer-dropdown thinking-dropdown`,style:ae(hr.value),role:`dialog`,"aria-label":z(u)(`composer.thinkingMenuTitle`),onClick:n[19]||=H(()=>{},[`stop`]),onKeydown:ie(H(Xt,[`prevent`]),[`escape`])},[F(`div`,Mxe,[v(X,{name:`thinking`,size:`sm`}),F(`span`,null,U(z(u)(`composer.thinkingMenuTitle`)),1)]),v(o6,{"model-value":pn.value,options:yn.value,size:`sm`,"onUpdate:modelValue":_n},null,8,[`model-value`,`options`]),F(`div`,Nxe,U(z(u)(`status.cacheNote`)),1)],44,jxe)):E(``,!0)]),_:1})],512)],2),F(`div`,{class:V([`drop-overlay`,{show:z(Le)}]),"aria-hidden":`true`},[F(`div`,Pxe,[v(X,{name:`file-plus`,size:`lg`}),F(`span`,null,U(z(u)(`composer.dropToAttach`)),1)])],2),(c(),P(ee,{to:`body`},[v(oe,{name:`composer-warning`},{default:B(()=>[pt.value?(c(),W(`div`,Fxe,[v(F7,{variant:`warning`,title:pt.value,"dismiss-label":z(u)(`common.dismiss`),onDismiss:n[20]||=e=>pt.value=null},null,8,[`title`,`dismiss-label`])])):E(``,!0)]),_:1}),v(P7,{"model-value":z(f)&&z(ue),title:z(u)(`composer.slashSheetTitle`),"onUpdate:modelValue":je},{default:B(()=>[F(`div`,Ixe,[v(Fp,{ref_key:`slashSheetSearchRef`,ref:we,modelValue:Oe.value,"onUpdate:modelValue":n[21]||=e=>Oe.value=e,placeholder:z(u)(`composer.slashSearchPlaceholder`),autocomplete:`off`,spellcheck:`false`,onKeydown:Et},null,8,[`modelValue`,`placeholder`])]),v(G3,{id:`composer-slash-menu`,layout:`sheet`,items:z(fe),"active-index":z(G),query:Oe.value,onSelect:z(pe),onHover:n[22]||=e=>G.value=e},null,8,[`items`,`active-index`,`query`,`onSelect`])]),_:1},8,[`model-value`,`title`]),v(P7,{"model-value":z(f)&&z(me),title:z(u)(`composer.mentionSheetTitle`),"onUpdate:modelValue":q},{default:B(()=>[F(`div`,Lxe,[v(Fp,{ref_key:`mentionSheetSearchRef`,ref:Te,modelValue:ke.value,"onUpdate:modelValue":n[23]||=e=>ke.value=e,placeholder:z(u)(`composer.mentionSearchPlaceholder`),autocomplete:`off`,spellcheck:`false`,onKeydown:Et},null,8,[`modelValue`,`placeholder`])]),v(K3,{id:`composer-mention-menu`,layout:`sheet`,items:z(he),"active-index":z(ge),loading:z(_e),stale:z(ve),onSelect:z(be),onHover:n[24]||=e=>ge.value=e},null,8,[`items`,`active-index`,`loading`,`stale`,`onSelect`])]),_:1},8,[`model-value`,`title`]),v(P7,{"model-value":z(f)&&Vn.value,"onUpdate:modelValue":Xn},{default:B(()=>[F(`div`,{ref_key:`mobileModesMenuRef`,ref:Un,class:`msheet-add`,role:`menu`,onClick:n[26]||=H(()=>{},[`stop`]),onKeydown:$n},[(c(!0),W(M,null,_(qn.value,e=>(c(),W(`button`,{key:e.id,type:`button`,class:`am-row`,role:`menuitem`,onMousedown:n[25]||=H(()=>{},[`prevent`]),onClick:t=>Qn(e)},[F(`span`,zxe,[v(X,{name:e.icon,size:`sm`},null,8,[`name`])]),F(`span`,Bxe,U(z(u)(e.nameKey)),1),e.descKey?(c(),W(`span`,Vxe,U(z(u)(e.descKey)),1)):E(``,!0)],40,Rxe))),128))],544)]),_:1},8,[`model-value`])]))],34))}}),[[`__scopeId`,`data-v-0a01a109`]]),Hxe={class:`ah`},Uxe={class:`akind`},Wxe={class:`apath`},Gxe={class:`ah-path`},Kxe={class:`dg`},qxe={class:`dc`},Jxe={key:2,class:`body-shell`},Yxe={class:`shell-cmd`},Xxe={key:0,class:`shell-cwd`},Zxe={key:1,class:`shell-danger`},Qxe={class:`file-bar`},$xe={class:`file-lang`},eSe={class:`file-ln`},tSe={class:`file-text`},nSe={key:4,class:`body-chip`},rSe={class:`chip-label`},iSe={class:`chip-value`},aSe={key:0,class:`chip-detail`},oSe={key:5,class:`body-chip`},sSe={key:0,class:`chip-label`},cSe={class:`chip-value`},lSe={key:6,class:`body-chip`},uSe={class:`chip-label`},dSe={class:`chip-value`},fSe={key:0,class:`chip-detail`},pSe={key:7,class:`body-chip`},mSe={class:`chip-label`},hSe={class:`chip-value`},gSe={key:0,class:`chip-detail`},_Se={key:8,class:`body-todo`},vSe={class:`todo-glyph`},ySe={key:10,class:`body-generic`},bSe={class:`gen-text`},xSe={key:11,class:`feedback-wrap`},SSe=[`placeholder`],CSe={class:`feedback-hint`},wSe={key:0,class:`plan-actions`},TSe={key:1,class:`abtn`},ESe=.4,DSe=Y(G({__name:`ApprovalCard`,props:{block:{},agentName:{},busy:{type:Boolean}},emits:[`decide`],setup(e,{emit:t}){let r=e,i=t,{t:a}=J(),o=L(()=>{let e=r.block;return e.kind===`plan_review`?{plan:e.plan,path:e.path,options:e.options??[]}:null}),u=R(!1),d=R(!1),f=L(()=>[`plan_review`,`diff`,`file`].includes(r.block.kind)),m=R(null),g=R(null),y=R(null),b=R({top:!1,bottom:!1}),x=R({top:!1,bottom:!1}),S=R({top:!1,bottom:!1});function C(e){return t=>{let n=t.currentTarget;n instanceof HTMLElement&&(e.value={top:n.scrollTop>0,bottom:n.scrollTop+n.clientHeight{let{top:t,bottom:n}=e.value;if(!t&&!n)return;let r=`var(--menu-scroll-fade)`,i=t&&n?`linear-gradient(to bottom, transparent 0, black ${r}, black calc(100% - ${r}), transparent 100%)`:t?`linear-gradient(to bottom, transparent, black ${r})`:`linear-gradient(to top, transparent, black ${r})`;return{maskImage:i,WebkitMaskImage:i}})}let k=O(b),A=O(x),j=O(S);function N(){let e=[[m.value,b],[g.value,x],[y.value,S]];for(let[t,n]of e)t&&(n.value={top:t.scrollTop>0,bottom:t.scrollTop+t.clientHeightvoid n(N)),s(u,()=>void n(N)),s(()=>r.block,()=>void n(N));let ee=[`shell`,`diff`,`file`,`fileop`,`url`,`search`,`invocation`,`todo`,`plan_review`,`generic`];function I(){return a(`approval.title.${ee.includes(r.block.kind)?r.block.kind:`generic`}`)}let te=R(!1),ne=R(``),re=R(null);function ie(){let e=re.value;if(!e)return;e.style.height=`auto`;let t=(window.visualViewport?.height??window.innerHeight)*ESe,n=Math.min(e.scrollHeight,t);e.style.height=`${n}px`,e.style.overflowY=e.scrollHeight>t?`auto`:`hidden`}let oe=null,se=0;function ce(){if(oe?.disconnect(),oe=null,typeof ResizeObserver>`u`)return;let e=re.value;e&&(oe=new ResizeObserver(e=>{let t=e[0]?.contentRect.width??0;t!==se&&(se=t,ie())}),oe.observe(e))}s(ne,()=>void n(ie)),s(te,e=>{if(!e){oe?.disconnect(),oe=null;return}n(()=>{ie(),ce()})}),s(u,e=>{e||n(ie)});let{uiFontSize:le}=k6();s(le,()=>void n(ie));function ue(){r.busy||(te.value=!0,ne.value=``,setTimeout(()=>re.value?.focus(),0))}function fe(){if(r.busy)return;let e=ne.value.trim();o.value?he(`feedback`,{decision:`rejected`,selectedLabel:`Revise`,feedback:e||void 0}):he(`feedback`,{decision:`rejected`,feedback:e||void 0}),te.value=!1,ne.value=``}function H(){te.value=!1,ne.value=``}function G(e){e.key===`Enter`&&!e.shiftKey?(e.preventDefault(),fe()):e.key===`Escape`&&(e.preventDefault(),H())}let me=R(null);s(()=>r.busy,e=>{e||(me.value=null)});function he(e,t){r.busy||(me.value=e,i(`decide`,t))}function ge(){he(`approve`,{decision:`approved`})}function _e(){he(`approveSession`,{decision:`approved`,scope:`session`})}function ve(){he(`reject`,{decision:`rejected`})}function ye(){he(`approvePlan`,{decision:`approved`})}function be(e){he(`option:${e}`,{decision:`approved`,selectedLabel:e})}function xe(){r.busy||ue()}function Se(){he(`rejectAndExit`,{decision:`rejected`,selectedLabel:`Reject and Exit`})}function Ce(e){let t=(document.activeElement?.tagName??``).toLowerCase();if(t===`input`||t===`textarea`||r.busy||u.value)return;let n=o.value;if(n){if(n.options.length===0){e.key===`1`?(e.preventDefault(),ye()):e.key===`2`?(e.preventDefault(),xe()):e.key===`3`&&(e.preventDefault(),Se());return}e.key===`1`&&n.options[0]?(e.preventDefault(),be(n.options[0].label)):e.key===`2`&&n.options[1]?(e.preventDefault(),be(n.options[1].label)):e.key===`3`&&n.options[2]&&(e.preventDefault(),be(n.options[2].label));return}e.key===`1`?(e.preventDefault(),ge()):e.key===`2`?(e.preventDefault(),_e()):e.key===`3`?(e.preventDefault(),ve()):e.key===`4`&&(e.preventDefault(),ue())}return p(()=>{document.addEventListener(`keydown`,Ce),window.addEventListener(`resize`,ie),window.visualViewport?.addEventListener(`resize`,ie)}),h(()=>{document.removeEventListener(`keydown`,Ce),window.removeEventListener(`resize`,ie),window.visualViewport?.removeEventListener(`resize`,ie),oe?.disconnect(),oe=null}),(t,n)=>(c(),P(L4,{class:V([`appr`,{minimized:u.value}])},pe({head:B(()=>[F(`div`,Hxe,[n[6]||=F(`span`,{class:`ah-ic`},`!`,-1),F(`span`,Uxe,U(I()),1),F(`span`,Wxe,[e.block.kind===`diff`||e.block.kind===`file`||e.block.kind===`fileop`?(c(),W(M,{key:0},[K(U(e.block.path),1)],64)):e.block.kind===`shell`?(c(),W(M,{key:1},[K(U(e.block.command),1)],64)):e.block.kind===`url`?(c(),W(M,{key:2},[K(U(e.block.url),1)],64)):e.block.kind===`search`?(c(),W(M,{key:3},[K(U(e.block.query),1)],64)):e.block.kind===`invocation`?(c(),W(M,{key:4},[K(U(e.block.name),1)],64)):e.block.kind===`generic`?(c(),W(M,{key:5},[K(U(e.block.summary),1)],64)):E(``,!0)]),e.agentName&&!u.value?(c(),P(cp,{key:0,variant:`neutral`,size:`sm`},{default:B(()=>[K(U(z(a)(`approval.subagentBadge`,{name:e.agentName})),1)]),_:1})):E(``,!0),u.value?E(``,!0):(c(),P(cp,{key:1,variant:`warning`,size:`sm`,class:`aw`},{default:B(()=>[K(U(z(a)(`approval.required`)),1)]),_:1})),f.value&&!u.value?(c(),P(Ca,{key:2,class:`aexpand`,size:`sm`,label:d.value?z(a)(`approval.collapsePlan`):z(a)(`approval.expandPlan`),tooltip:d.value?z(a)(`approval.collapsePlan`):z(a)(`approval.expandPlan`),onClick:n[0]||=e=>d.value=!d.value},{default:B(()=>[v(X,{name:d.value?`collapse`:`expand`,size:`md`},null,8,[`name`])]),_:1},8,[`label`,`tooltip`])):E(``,!0),v(Ca,{class:`amin`,size:`sm`,label:u.value?z(a)(`question.expand`):z(a)(`question.minimize`),onClick:n[1]||=e=>u.value=!u.value},{default:B(()=>[u.value?(c(),P(X,{key:0,name:`chevron-up`,size:`md`})):(c(),P(X,{key:1,name:`minus`,size:`md`}))]),_:1},8,[`label`])])]),_:2},[u.value?void 0:{name:`default`,fn:B(()=>[e.block.kind===`plan_review`&&e.block.path?(c(),P(Sp,{key:0,text:e.block.path},{default:B(()=>[F(`div`,Gxe,U(e.block.path),1)]),_:1},8,[`text`])):E(``,!0),e.block.kind===`diff`?(c(),W(`div`,{key:1,ref_key:`diffBodyRef`,ref:m,class:V([`diff`,{expanded:d.value}]),style:ae(z(k)),onScroll:n[2]||=(...e)=>z(w)&&z(w)(...e)},[(c(!0),W(M,null,_(e.block.diff,(e,t)=>(c(),W(`div`,{key:t,class:V([`dl`,e.kind===`add`?`add`:e.kind===`rem`?`del`:``])},[F(`span`,Kxe,U(e.gutter),1),F(`span`,qxe,U(e.text),1)],2))),128))],38)):e.block.kind===`shell`?(c(),W(`div`,Jxe,[F(`div`,Yxe,[n[7]||=F(`span`,{class:`shell-dollar`},`$`,-1),K(` `+U(e.block.command),1)]),e.block.cwd?(c(),W(`div`,Xxe,`cwd: `+U(e.block.cwd),1)):E(``,!0),e.block.danger?(c(),W(`div`,Zxe,U(z(a)(`approval.danger`,{detail:e.block.danger})),1)):E(``,!0)])):e.block.kind===`file`?(c(),W(`div`,{key:3,class:V([`body-file`,{expanded:d.value}])},[F(`div`,Qxe,[F(`span`,$xe,U(e.block.language??``),1)]),F(`div`,{class:`file-content`,ref_key:`fileBodyRef`,ref:g,style:ae(z(A)),onScroll:n[3]||=(...e)=>z(T)&&z(T)(...e)},[(c(!0),W(M,null,_(e.block.content.split(` `),(e,t)=>(c(),W(`div`,{key:t,class:`file-line`},[F(`span`,eSe,U(t+1),1),F(`span`,tSe,U(e),1)]))),128))],36)],2)):e.block.kind===`fileop`?(c(),W(`div`,nSe,[F(`span`,rSe,U(e.block.op),1),F(`span`,iSe,U(e.block.path),1),e.block.detail?(c(),W(`span`,aSe,U(e.block.detail),1)):E(``,!0)])):e.block.kind===`url`?(c(),W(`div`,oSe,[e.block.method?(c(),W(`span`,sSe,U(e.block.method),1)):E(``,!0),F(`span`,cSe,U(e.block.url),1)])):e.block.kind===`search`?(c(),W(`div`,lSe,[F(`span`,uSe,U(z(a)(`approval.searchQueryLabel`)),1),F(`span`,dSe,U(e.block.query),1),e.block.scope?(c(),W(`span`,fSe,U(z(a)(`approval.searchScope`,{scope:e.block.scope})),1)):E(``,!0)])):e.block.kind===`invocation`?(c(),W(`div`,pSe,[F(`span`,mSe,U(e.block.kind2),1),F(`span`,hSe,U(e.block.name),1),e.block.description?(c(),W(`span`,gSe,U(e.block.description),1)):E(``,!0)])):e.block.kind===`todo`?(c(),W(`div`,_Se,[(c(!0),W(M,null,_(e.block.items,(e,t)=>(c(),W(`div`,{key:t,class:`todo-item`},[F(`span`,vSe,U(e.status===`done`||e.status===`completed`?`✓`:`○`),1),F(`span`,{class:V([`todo-title`,{"todo-done":e.status===`done`||e.status===`completed`}])},U(e.title),3)]))),128))])):e.block.kind===`plan_review`?(c(),W(`div`,{key:9,ref_key:`planBodyRef`,ref:y,class:V([`body-plan`,{expanded:d.value}]),style:ae(z(j)),onScroll:n[4]||=(...e)=>z(D)&&z(D)(...e)},[v(w4,{text:e.block.plan},null,8,[`text`])],38)):(c(),W(`div`,ySe,[F(`span`,bSe,U(e.block.summary),1)])),te.value?(c(),W(`div`,xSe,[l(F(`textarea`,{ref_key:`feedbackRef`,ref:re,"onUpdate:modelValue":n[5]||=e=>ne.value=e,class:`feedback-ta`,placeholder:z(a)(`approval.feedbackPlaceholder`),rows:`2`,onKeydown:G},null,40,SSe),[[de,ne.value]]),F(`div`,CSe,U(z(a)(`approval.feedbackHint`)),1)])):E(``,!0)]),key:`0`},u.value?void 0:{name:`foot`,fn:B(()=>[o.value?(c(),W(`div`,wSe,[o.value.options.length>0?(c(!0),W(M,{key:0},_(o.value.options,(t,n)=>(c(),P(Sp,{key:n,text:t.description},{default:B(()=>[v(pD,{class:`kbtn`,size:`sm`,variant:`primary`,loading:me.value===`option:${t.label}`,disabled:e.busy,onClick:e=>be(t.label)},{default:B(()=>[K(U(t.label),1),v(_D,{class:`k`,keys:[String(n+1)]},null,8,[`keys`])]),_:2},1032,[`loading`,`disabled`,`onClick`])]),_:2},1032,[`text`]))),128)):(c(),P(pD,{key:1,class:`kbtn`,size:`sm`,variant:`primary`,loading:me.value===`approvePlan`,disabled:e.busy,onClick:ye},{default:B(()=>[K(U(z(a)(`approval.approvePlan`)),1),v(_D,{class:`k`,keys:[`1`]})]),_:1},8,[`loading`,`disabled`])),v(pD,{class:`kbtn`,size:`sm`,variant:`secondary`,disabled:e.busy,onClick:xe},{default:B(()=>[K(U(z(a)(`approval.revise`)),1),o.value.options.length===0?(c(),P(_D,{key:0,class:`k`,keys:[`2`]})):E(``,!0)]),_:1},8,[`disabled`]),v(pD,{class:`kbtn`,size:`sm`,variant:`danger-soft`,loading:me.value===`rejectAndExit`,disabled:e.busy,onClick:Se},{default:B(()=>[K(U(z(a)(`approval.rejectAndExit`)),1),o.value.options.length===0?(c(),P(_D,{key:0,class:`k`,keys:[`3`]})):E(``,!0)]),_:1},8,[`loading`,`disabled`])])):(c(),W(`div`,TSe,[v(pD,{class:`kbtn`,size:`sm`,variant:`primary`,loading:me.value===`approve`,disabled:e.busy,onClick:ge},{default:B(()=>[K(U(z(a)(`approval.approve`)),1),v(_D,{class:`k`,keys:[`1`]})]),_:1},8,[`loading`,`disabled`]),v(pD,{class:`kbtn`,size:`sm`,variant:`secondary`,loading:me.value===`approveSession`,disabled:e.busy,onClick:_e},{default:B(()=>[K(U(z(a)(`approval.approveSession`)),1),v(_D,{class:`k`,keys:[`2`]})]),_:1},8,[`loading`,`disabled`]),v(pD,{class:`kbtn`,size:`sm`,variant:`secondary`,loading:me.value===`reject`,disabled:e.busy,onClick:ve},{default:B(()=>[K(U(z(a)(`approval.reject`)),1),v(_D,{class:`k`,keys:[`3`]})]),_:1},8,[`loading`,`disabled`]),v(pD,{class:`kbtn`,size:`sm`,variant:`secondary`,disabled:e.busy,onClick:ue},{default:B(()=>[K(U(z(a)(`approval.feedback`)),1),v(_D,{class:`k`,keys:[`4`]})]),_:1},8,[`disabled`])]))]),key:`1`}]),1032,[`class`]))}}),[[`__scopeId`,`data-v-f7485122`]]),OSe={class:`goal-panel`},kSe={key:0,class:`goal-criterion`},ASe={class:`goal-criterion-label`},jSe=Y(G({__name:`GoalPanel`,props:{goal:{},openFile:{type:Function}},setup(e){let{t}=J();return(n,r)=>(c(),W(`div`,OSe,[v(w4,{text:e.goal.objective,"open-file":e.openFile},null,8,[`text`,`open-file`]),e.goal.completionCriterion?(c(),W(`div`,kSe,[F(`div`,ASe,[v(X,{name:`check-list`,size:`md`}),F(`span`,null,U(z(t)(`status.goalDoneWhen`)),1)]),v(w4,{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,[`text`,`open-file`])])):E(``,!0)]))}}),[[`__scopeId`,`data-v-81a928ba`]]),MSe={class:`plan-panel`},NSe={key:0,class:`plan-review-row`},PSe={class:`plan-review-label`},FSe={key:1,class:`plan-review-row plan-review-feedback`},ISe={class:`plan-review-label`},LSe={key:3,class:`plan-path-only`},RSe={class:`plan-path-hint`},zSe={class:`plan-path`},BSe={key:4,class:`plan-empty`},VSe=Y(G({__name:`PlanPanel`,props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function},revealSavedPlan:{type:Function}},setup(e){let{t}=J();return(n,r)=>(c(),W(`div`,MSe,[e.plan?.selectedOption?(c(),W(`div`,NSe,[F(`span`,PSe,U(z(t)(`tools.plan.selectedOption`)),1),F(`span`,null,U(e.plan.selectedOption),1)])):E(``,!0),e.plan?.feedback?(c(),W(`div`,FSe,[F(`span`,ISe,U(z(t)(`tools.plan.feedback`)),1),F(`span`,null,U(e.plan.feedback),1)])):E(``,!0),e.plan?.plan?(c(),P(w4,{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,[`text`,`open-file`])):e.plan?.path?(c(),W(`div`,LSe,[F(`span`,RSe,U(z(t)(`tools.plan.pathOnlyHint`)),1),F(`span`,zSe,U(e.plan.path),1),e.revealSavedPlan?(c(),P(pD,{key:0,variant:`ghost`,size:`sm`,onClick:r[0]||=t=>void e.revealSavedPlan(e.plan.agentId,e.plan.toolCallId)},{default:B(()=>[v(X,{name:`external-link`,size:`sm`}),K(` `+U(z(t)(`tools.plan.revealInFileManager`)),1)]),_:1})):E(``,!0)])):(c(),W(`div`,BSe,[v(X,{class:`plan-empty-ico`,name:`file-edit`,size:`lg`}),F(`span`,null,U(z(t)(e.planModeOn?`status.planEmptyArmed`:`status.planEmptyIdle`)),1)]))]))}}),[[`__scopeId`,`data-v-2883948d`]]),HSe={class:`qh`},USe={class:`qtitle`},WSe={key:0,class:`qstep`},GSe={key:1,class:`qmin-peek`},KSe={class:`qbody`},qSe=[`aria-label`],JSe=[`aria-selected`,`aria-label`,`onClick`],YSe={class:`qstep-num`},XSe={key:1,class:`qheader-chip`},ZSe={class:`qtext`},QSe={class:`qopts`},$Se=[`onClick`],eCe={class:`qopt-key`},tCe={class:`qopt-glyph`},nCe={key:0,class:`chk`},rCe={key:1,class:`rad`},iCe={class:`qopt-text`},aCe={class:`qopt-label`},oCe={key:0,class:`qopt-desc`},sCe={class:`qopt-glyph`},cCe={key:0,class:`chk`},lCe={key:1,class:`rad`},uCe={class:`qopt-text qopt-text-other`},dCe={class:`qopt-label`},fCe={key:0,class:`qopt-desc`},pCe=[`placeholder`],mCe={class:`qfoot`},hCe=Y(G({__name:`QuestionCard`,props:{question:{},busyKind:{}},emits:[`answer`,`dismiss`],setup(e,{emit:t}){let r=e,{t:i}=J(),a=t,o=R(0),u=R(!1),d=L(()=>r.question.questions[o.value]),f=L(()=>r.question.questions.length);function m(){o.value>0&&o.value--}function g(){o.value=0&&e0:t.kind===`multiWithOther`?t.optionIds.length>0||t.otherText.trim().length>0:t.kind===`other`?t.text.trim().length>0:!0:!1}function x(){return b(d.value.id)}let S=R({});function C(e){return e.recommended===!0?!0:/\b(?:recommended|recommend)\b/.test(`${e.label} ${e.description??``}`.toLowerCase())}function w(){let e={...S.value},t=!1;for(let n of r.question.questions){if(e[n.id])continue;let r=n.options.filter(C);r.length!==0&&(e[n.id]=n.multiSelect?{kind:`multi`,optionIds:r.map(e=>e.id)}:{kind:`single`,optionId:r[0].id},t=!0)}t&&(S.value=e)}s(()=>r.question.questionId,()=>{o.value=0,u.value=!1,S.value={},O.value={}}),s(()=>r.question,()=>{o.value>=r.question.questions.length&&(o.value=0),w()},{immediate:!0,deep:!0});function T(e,t){let n=S.value[e];if(n&&n.kind===`single`&&n.optionId===t){let t={...S.value};delete t[e],S.value=t}else S.value={...S.value,[e]:{kind:`single`,optionId:t}}}function D(e,t){let n=S.value[e],r=n&&(n.kind===`multi`||n.kind===`multiWithOther`)?(n.kind,[...n.optionIds]):[],i=r.indexOf(t);i>=0?r.splice(i,1):r.push(t);let a=S.value[e],o=a&&a.kind===`multiWithOther`?a.otherText:``;o?S.value={...S.value,[e]:{kind:`multiWithOther`,optionIds:r,otherText:o}}:S.value={...S.value,[e]:{kind:`multi`,optionIds:r}}}let O=R({}),k=R(null);function A(e){let t=r.question.questions.find(t=>t.id===e),n=O.value[e]??``;if(t.multiSelect){let t=S.value[e],r=t&&(t.kind===`multi`||t.kind===`multiWithOther`)?(t.kind,[...t.optionIds]):[];S.value={...S.value,[e]:{kind:`multiWithOther`,optionIds:r,otherText:n}}}else S.value={...S.value,[e]:{kind:`other`,text:n}}}function j(e){A(e),n(()=>k.value?.focus())}function N(e,t){let n=S.value[e];return n?n.kind===`single`?n.optionId===t:n.kind===`multi`||n.kind===`multiWithOther`?n.optionIds.includes(t):!1:!1}function ee(e){let t=S.value[e];return!!(t&&(t.kind===`other`||t.kind===`multiWithOther`))}function I(){return r.question.questions.every(e=>b(e.id))}let te=L(()=>r.busyKind===`answer`),ne=L(()=>r.busyKind===`dismiss`),re=L(()=>!!r.busyKind);function ie(){if(re.value||!I())return;let e={answers:S.value,method:`click`};a(`answer`,r.question.questionId,e)}function ae(){re.value||a(`dismiss`,r.question.questionId)}function oe(e){let t=(document.activeElement?.tagName??``).toLowerCase(),n=t===`input`||t===`textarea`;if(re.value)return;if(e.key===`Enter`){if(e.preventDefault(),u.value)return;o.value=1&&r<=9){e.preventDefault();let t=d.value,n=r-1,i=t.options[n];i&&(t.multiSelect?D(t.id,i.id):T(t.id,i.id))}}return p(()=>document.addEventListener(`keydown`,oe)),h(()=>document.removeEventListener(`keydown`,oe)),(e,t)=>(c(),P(L4,{class:V([`qcard`,{minimized:u.value}])},pe({head:B(()=>[F(`div`,HSe,[t[5]||=F(`span`,{class:`qh-ic`},`?`,-1),F(`span`,USe,U(z(i)(`question.title`)),1),f.value>1&&!u.value?(c(),W(`span`,WSe,U(z(i)(`question.step`,{current:o.value+1,total:f.value})),1)):E(``,!0),u.value?(c(),W(`span`,GSe,U(d.value.question),1)):E(``,!0),v(Ca,{class:`qmin`,size:`sm`,label:u.value?z(i)(`question.expand`):z(i)(`question.minimize`),onClick:t[0]||=e=>u.value=!u.value},{default:B(()=>[u.value?(c(),P(X,{key:0,name:`chevron-up`,size:`md`})):(c(),P(X,{key:1,name:`minus`,size:`md`}))]),_:1},8,[`label`])])]),_:2},[u.value?void 0:{name:`default`,fn:B(()=>[F(`div`,KSe,[f.value>1?(c(),W(`div`,{key:0,class:`qsteps`,role:`tablist`,"aria-label":z(i)(`question.step`,{current:o.value+1,total:f.value})},[(c(!0),W(M,null,_(r.question.questions,(e,t)=>(c(),W(`button`,{key:e.id,type:`button`,class:V([`qstep-dot`,{active:t===o.value,answered:b(e.id)}]),"aria-selected":t===o.value,"aria-label":z(i)(`question.step`,{current:t+1,total:f.value}),onClick:e=>y(t)},[F(`span`,YSe,U(t+1),1)],10,JSe))),128))],8,qSe)):E(``,!0),d.value.header?(c(),W(`div`,XSe,[v(cp,{variant:`neutral`,size:`sm`},{default:B(()=>[K(U(d.value.header),1)]),_:1})])):E(``,!0),F(`div`,ZSe,U(d.value.question),1),d.value.body?(c(),P(w4,{key:2,text:d.value.body,class:`qmdbody`},null,8,[`text`])):E(``,!0),F(`div`,QSe,[(c(!0),W(M,null,_(d.value.options,(e,t)=>(c(),W(`label`,{key:e.id,class:V([`qopt`,{selected:N(d.value.id,e.id)}]),onClick:H(t=>d.value.multiSelect?D(d.value.id,e.id):T(d.value.id,e.id),[`prevent`])},[F(`span`,eCe,U(t+1),1),F(`span`,tCe,[d.value.multiSelect?(c(),W(`span`,nCe,U(N(d.value.id,e.id)?`■`:`□`),1)):(c(),W(`span`,rCe,U(N(d.value.id,e.id)?`●`:`○`),1))]),F(`span`,iCe,[F(`span`,aCe,U(e.label),1),e.description?(c(),W(`span`,oCe,U(e.description),1)):E(``,!0)])],10,$Se))),128)),d.value.allowOther?(c(),W(`label`,{key:0,class:V([`qopt`,{selected:ee(d.value.id)}]),onClick:t[4]||=H(e=>j(d.value.id),[`prevent`])},[t[6]||=F(`span`,{class:`qopt-key`},null,-1),F(`span`,sCe,[d.value.multiSelect?(c(),W(`span`,cCe,U(ee(d.value.id)?`■`:`□`),1)):(c(),W(`span`,lCe,U(ee(d.value.id)?`●`:`○`),1))]),F(`span`,uCe,[F(`span`,dCe,U(d.value.otherLabel??z(i)(`question.otherDefault`)),1),d.value.otherDescription?(c(),W(`span`,fCe,U(d.value.otherDescription),1)):E(``,!0)]),l(F(`input`,{ref_key:`otherInputEl`,ref:k,"onUpdate:modelValue":t[1]||=e=>O.value[d.value.id]=e,class:`other-input`,type:`text`,placeholder:d.value.otherLabel??z(i)(`question.otherDefault`),onInput:t[2]||=e=>A(d.value.id),onFocus:t[3]||=e=>A(d.value.id)},null,40,pCe),[[de,O.value[d.value.id]]])],2)):E(``,!0)])])]),key:`0`},u.value?void 0:{name:`foot`,fn:B(()=>[F(`div`,mCe,[o.value[K(U(z(i)(`question.nextQuestion`)),1)]),_:1},8,[`disabled`])):(c(),P(pD,{key:1,class:`qfoot-btn qfoot-main`,size:`sm`,variant:`primary`,disabled:!I(),loading:te.value,onClick:ie},{default:B(()=>[K(U(z(i)(`question.submit`)),1)]),_:1},8,[`disabled`,`loading`])),f.value>1?(c(),P(pD,{key:2,class:`qfoot-btn`,size:`sm`,variant:`secondary`,disabled:o.value===0||re.value,onClick:m},{default:B(()=>[K(U(z(i)(`question.back`)),1)]),_:1},8,[`disabled`])):E(``,!0),v(pD,{class:`qfoot-btn`,size:`sm`,variant:`ghost`,loading:ne.value,disabled:re.value,onClick:ae},{default:B(()=>[K(U(z(i)(`question.dismiss`)),1)]),_:1},8,[`loading`,`disabled`])])]),key:`1`}]),1032,[`class`]))}}),[[`__scopeId`,`data-v-ce0bd159`]]),R7=Y(G({__name:`StatusGlyph`,props:{status:{}},setup(e){let t=e,n={pending:`○`,run:`●`,done:`✓`,fail:`✗`};return(e,r)=>(c(),W(`span`,{class:V([`status-glyph`,`s-${t.status}`]),"aria-hidden":`true`},U(n[t.status]),3))}}),[[`__scopeId`,`data-v-f870866a`]]),gCe={key:0,class:`sg-empty`},_Ce={key:1,class:`sg-grid`},vCe=[`aria-label`,`onClick`],yCe={class:`sg-top`},bCe={class:`sg-num`},xCe={class:`sg-name`},SCe={key:1,class:`sg-desc`},CCe={class:`sg-foot`},wCe={key:0,class:`sg-model`},TCe={class:`sg-status`},ECe={class:`sg-state`},DCe={key:0,class:`sg-time`},OCe=Y(G({__name:`SubagentGrid`,props:{tasks:{},filter:{}},emits:[`cancel`,`open`],setup(e,{emit:t}){let n=t,{t:r}=J();function i(e){return e}function a(e){return e===`running`?`tasks.emptyRunning`:e===`done`?`tasks.emptyDone`:e===`active`?`tasks.emptyRecent`:`tasks.emptyTasks`}let o=m(`modelDisplay`),s=m(`subagentEffort`);function l(e){let{model:t,thinkingEffort:n}=i(e);return[o?.(t)??t,s?.(n)].filter(Boolean).join(` · `)||void 0}function u(e){let t=i(e).state;return r(t===`done`?`tasks.stateDone`:t===`fail`?`tasks.stateFail`:t===`cancelled`?`tasks.stateCancelled`:`tasks.running`)}function d(e,t){return String(e.dynamicWorkflowIndex??t+1).padStart(2,`0`)}function f(e){return!!(i(e).agentId||e.output?.length)}return(t,o)=>e.tasks.length===0?(c(),W(`div`,gCe,U(z(r)(a(e.filter))),1)):(c(),W(`div`,_Ce,[(c(!0),W(M,null,_(e.tasks,(e,t)=>(c(),W(`article`,{key:e.id,class:V([`sg-card`,[`s-${i(e).state}`,{openable:f(e)}]])},[f(e)?(c(),W(`button`,{key:0,class:`sg-open`,type:`button`,"aria-label":e.name,onClick:t=>n(`open`,i(e).agentId??e.id)},null,8,vCe)):E(``,!0),F(`div`,yCe,[F(`span`,bCe,U(d(e,t)),1),F(`span`,xCe,U(e.name),1)]),e.meta?(c(),W(`div`,SCe,U(e.meta),1)):E(``,!0),F(`div`,CCe,[l(e)?(c(),W(`div`,wCe,[F(`span`,null,U(l(e)),1)])):E(``,!0),F(`div`,TCe,[F(`span`,ECe,[i(e).state===`run`?(c(),P(R7,{key:0,status:`run`})):i(e).state===`done`?(c(),P(X,{key:1,class:`sg-ic-done`,name:`check`,size:`sm`})):(c(),P(X,{key:2,name:`close`,size:`sm`})),K(` `+U(u(e)),1)]),e.timing?(c(),W(`span`,DCe,[v(X,{name:`clock`,size:`sm`}),K(` `+U(e.timing),1)])):E(``,!0)])]),i(e).state===`run`?(c(),P(Ca,{key:2,class:`sg-cancel`,size:`sm`,label:z(r)(`tasks.stop`),onClick:H(t=>n(`cancel`,e.id),[`stop`])},{default:B(()=>[v(X,{name:`close`,size:`sm`})]),_:1},8,[`label`,`onClick`])):E(``,!0)],2))),128))]))}}),[[`__scopeId`,`data-v-5945b343`]]),kCe={class:`taskspane`},ACe={class:`tp-list`},jCe={key:0,class:`tp-empty`},MCe={class:`tp-main`},NCe=[`aria-label`,`onClick`],PCe=[`aria-label`],FCe={class:`tp-name`},ICe={key:1,class:`tp-meta`},LCe={key:2,class:`tp-model`},RCe={key:3,class:`tp-model`},zCe={key:4,class:`tp-time`},BCe=Y(G({__name:`TasksPane`,props:{tasks:{},filter:{}},emits:[`cancel`,`open`],setup(e,{emit:t}){let n=t,{t:r}=J();function i(e){return e}function a(e){return e===`running`?`tasks.emptyRunning`:e===`done`?`tasks.emptyDone`:e===`active`?`tasks.emptyRecent`:`tasks.emptyTasks`}function o(e){return e.kind===`subagent`||!!(e.output?.length||e.meta)}function s(e){o(e)&&n(`open`,i(e).agentId??e.id)}function l(e){let t=i(e).state;return r(t===`done`?`tasks.stateDone`:t===`fail`?`tasks.stateFail`:t===`cancelled`?`tasks.stateCancelled`:`tasks.running`)}let u=m(`modelDisplay`),d=m(`subagentEffort`);function f(e){if(e.kind!==`subagent`)return;let t=i(e).model;return u?.(t)??t}function p(e){if(e.kind===`subagent`)return d?.(i(e).thinkingEffort)}return(t,u)=>(c(),W(`div`,kCe,[F(`div`,ACe,[e.tasks.length===0?(c(),W(`div`,jCe,U(z(r)(a(e.filter))),1)):(c(!0),W(M,{key:1},_(e.tasks,e=>(c(),W(`div`,{key:e.id,class:V([`tp-row`,{fail:i(e).state===`fail`,expandable:o(e)}])},[F(`div`,MCe,[o(e)?(c(),W(`button`,{key:0,class:`tp-open`,type:`button`,"aria-label":e.name,onClick:t=>s(e)},null,8,NCe)):E(``,!0),F(`span`,{class:`tp-glyph`,role:`img`,"aria-label":l(e)},[i(e).state===`run`?(c(),P(R7,{key:0,status:`run`})):i(e).state===`done`?(c(),P(X,{key:1,class:`tp-done`,name:`check`,size:`sm`})):i(e).state===`cancelled`?(c(),P(X,{key:2,class:`tp-cancelled`,name:`close`,size:`sm`})):(c(),P(X,{key:3,class:`tp-fail`,name:`close`,size:`sm`}))],8,PCe),F(`span`,FCe,U(e.name),1),e.meta?(c(),W(`span`,ICe,U(e.meta),1)):E(``,!0),f(e)?(c(),W(`span`,LCe,U(f(e)),1)):E(``,!0),p(e)?(c(),W(`span`,RCe,U(p(e)),1)):E(``,!0),e.timing?(c(),W(`span`,zCe,U(e.timing),1)):E(``,!0),i(e).state===`run`?(c(),P(Ca,{key:5,class:`tp-stop`,size:`sm`,label:z(r)(`tasks.stop`),onClick:H(t=>n(`cancel`,e.id),[`stop`])},{default:B(()=>[v(X,{name:`close`,size:`sm`})]),_:1},8,[`label`,`onClick`])):E(``,!0),o(e)?(c(),P(X,{key:6,class:`tp-chevron`,name:`chevron-right`,size:`sm`})):E(``,!0)])],2))),128))])]))}}),[[`__scopeId`,`data-v-f4589f0b`]]),VCe={class:`todo-card`},HCe={key:0,class:`tc-empty`},UCe={class:`tc-name`},WCe=Y(G({__name:`TodoCard`,props:{todos:{}},setup(e){let{t}=J();return(n,r)=>(c(),W(`div`,VCe,[e.todos.length===0?(c(),W(`div`,HCe,[v(X,{class:`tc-empty-ico`,name:`list`,size:`lg`}),F(`span`,null,U(z(t)(`tasks.emptyTodo`)),1)])):(c(!0),W(M,{key:1},_(e.todos,(e,t)=>(c(),W(`div`,{key:t,class:V([`tc-row`,`s-${e.status}`])},[F(`span`,{class:V([`tc-glyph`,`g-${e.status}`])},[e.status===`done`?(c(),P(X,{key:0,name:`check`,size:`md`})):e.status===`in_progress`?(c(),P(op,{key:1,class:`tc-spin`,size:`sm`})):E(``,!0)],2),F(`span`,UCe,U(e.title),1)],2))),128))]))}}),[[`__scopeId`,`data-v-4e4d0054`]]),GCe={class:`fc-label`},z7=Y(G({__name:`FilterControl`,props:{modelValue:{},options:{}},emits:[`update:modelValue`],setup(e,{emit:t}){let r=e,i=t,a=L(()=>r.options.find(e=>e.value===r.modelValue)),o=typeof window<`u`&&window.matchMedia?.(`(hover: none)`).matches?`lg`:`md`,l=R(null),u=R(!1),d=0,f=null;async function m(){let e=l.value?.closest(`.dock-work-head`);if(!e)return;let t=e.querySelector(`.wp-head-tab`),r=getComputedStyle(e),i=(Number.parseFloat(r.columnGap)||0)*2,a=e.clientWidth-Number.parseFloat(r.paddingLeft)-Number.parseFloat(r.paddingRight)-i,o=t?.scrollWidth??0;if(!u.value){let e=l.value?.querySelector(`.ui-seg`);e&&e.offsetWidth>0&&(d=e.offsetWidth)}let s=o+d>a;if(u.value=s,!s){await n();let e=l.value?.querySelector(`.ui-seg`);e&&e.offsetWidth>0&&(d=e.offsetWidth),u.value=o+d>a}}let h=R(!1),g=R(null),y=R(null),b=R({left:`0px`,top:`0px`});function x(){return g.value?.$el??null}async function S(){if(h.value){C();return}h.value=!0,await n(),w(),T(),window.addEventListener(`mousedown`,k,!0),window.addEventListener(`keydown`,A,!0),window.addEventListener(`resize`,w),window.addEventListener(`scroll`,w,!0)}function C(e){h.value=!1,window.removeEventListener(`mousedown`,k,!0),window.removeEventListener(`keydown`,A,!0),window.removeEventListener(`resize`,w),window.removeEventListener(`scroll`,w,!0),e?.refocus&&x()?.focus()}function w(){let e=x();if(!e)return;let t=e.getBoundingClientRect(),n=y.value?.offsetHeight??0,r=getComputedStyle(document.documentElement),i=Number.parseFloat(r.getPropertyValue(`--space-2`))||0,a=Number.parseFloat(r.getPropertyValue(`--space-1`))||0,o=y.value?.offsetWidth??0,s=Math.min(t.left,Math.max(i,window.innerWidth-o-i));t.bottom+a+n<=window.innerHeight-i?b.value={left:`${s}px`,top:`${t.bottom+a}px`}:b.value={left:`${s}px`,bottom:`${window.innerHeight-t.top+a}px`}}function T(){let e=y.value;e&&(e.querySelector(`.ui-menu-item.is-active`)??e.querySelector(`.ui-menu-item`))?.focus()}function D(){h.value||S()}function O(e){let t=e.relatedTarget;t&&(y.value?.contains(t)||x()?.contains(t))||C()}function k(e){let t=e.target;if(t){if(y.value?.contains(t)){e.stopImmediatePropagation();return}x()?.contains(t)||C()}}function A(e){e.key===`Escape`&&(e.preventDefault(),e.stopImmediatePropagation(),C({refocus:!0}))}function j(e){if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let t=Array.from(y.value?.querySelectorAll(`.ui-menu-item`)??[]);if(t.length===0)return;let n=t.indexOf(document.activeElement);t[e.key===`ArrowDown`?(n+1)%t.length:(n-1+t.length)%t.length]?.focus()}function N(e){i(`update:modelValue`,e),C({refocus:!0})}return p(()=>{let e=l.value?.closest(`.dock-work-head`);!e||typeof ResizeObserver!=`function`||(f=new ResizeObserver(()=>void m()),f.observe(e),m())}),s(u,e=>{!e&&h.value&&C()}),s(()=>r.options,async()=>{d=0,await n(),await m()},{flush:`post`}),ne(()=>{f?.disconnect(),h.value&&C()}),(t,n)=>(c(),W(`span`,{ref_key:`root`,ref:l,class:`filter-control`},[u.value?(c(),W(M,{key:0},[v(yD,{ref_key:`triggerRef`,ref:g,class:`fc-trigger`,"aria-haspopup":`menu`,"aria-expanded":h.value,onClick:S,onKeydown:[ie(H(D,[`prevent`]),[`down`]),ie(H(D,[`prevent`]),[`up`])],onFocusout:O},{default:B(()=>[a.value?.icon?(c(),P(X,{key:0,name:a.value.icon,size:`sm`},null,8,[`name`])):E(``,!0),F(`span`,null,U(a.value?.label),1),v(X,{class:`fc-chevron`,name:`chevron-down`,size:`sm`})]),_:1},8,[`aria-expanded`,`onKeydown`]),(c(),P(ee,{to:`body`},[h.value?(c(),W(`div`,{key:0,ref_key:`menuBoxRef`,ref:y,class:`fc-menu`,style:ae(b.value),onKeydown:j,onFocusout:O},[v(hp,null,{default:B(()=>[(c(!0),W(M,null,_(e.options,t=>(c(),P(vp,{key:t.value,role:`menuitemradio`,active:t.value===e.modelValue,"aria-checked":t.value===e.modelValue,size:z(o),onClick:e=>N(t.value)},{default:B(()=>[t.icon?(c(),P(X,{key:0,name:t.icon,size:`sm`,"data-icon":t.icon},null,8,[`name`,`data-icon`])):E(``,!0),F(`span`,GCe,U(t.label),1),t.value===e.modelValue?(c(),P(X,{key:1,class:`fc-check`,name:`check`,size:`sm`})):E(``,!0)]),_:2},1032,[`active`,`aria-checked`,`size`,`onClick`]))),128))]),_:1})],36)):E(``,!0)]))],64)):(c(),P(o6,{key:1,"model-value":e.modelValue,options:e.options,size:`md`,"onUpdate:modelValue":n[0]||=e=>i(`update:modelValue`,e)},null,8,[`model-value`,`options`]))],512))}}),[[`__scopeId`,`data-v-658870b5`]]),KCe={class:`wp-head-tab`},qCe={key:0,class:`wp-head-meta`},JCe={key:0,class:`wp-head-actions`},B7=Y(G({__name:`WorkPanelHead`,props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(c(),W(M,null,[F(`span`,KCe,[v(X,{name:e.icon,size:`md`},null,8,[`name`]),F(`span`,null,U(e.title),1),e.meta?(c(),W(`span`,qCe,U(e.meta),1)):E(``,!0)]),t.$slots.actions?(c(),W(`span`,JCe,[me(t.$slots,`actions`,{},void 0,!0)])):E(``,!0)],64))}}),[[`__scopeId`,`data-v-408c4b07`]]),V7=G({__name:`WorkPill`,props:{icon:{},active:{type:Boolean},label:{}},emits:[`click`],setup(e){return(t,n)=>(c(),P(yD,{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:n[0]||=e=>t.$emit(`click`,e)},{default:B(()=>[v(X,{name:e.icon,size:`md`},null,8,[`name`]),F(`span`,null,[me(t.$slots,`default`)]),me(t.$slots,`meta`)]),_:3},8,[`active`,`aria-pressed`,`aria-label`]))}}),YCe={class:`dock-work-head`},XCe={key:0,class:`dock-workbar`},ZCe={class:`dw-running`},QCe={class:`dw-running`},$Ce={class:`dw-count`},ewe=Y(G({__name:`ChatDock`,props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},goalMode:{type:Boolean},towerMode:{type:Boolean},towerAvailable:{type:Boolean},dynamicWorkflowMode:{type:Boolean},activationBadges:{},models:{},starredIds:{},skills:{},goal:{},sessionPlans:{},dockPanel:{},overlayOpen:{type:Boolean},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},mobile:{type:Boolean},openFile:{type:Function},revealSavedPlan:{type:Function}},emits:[`submit`,`steer`,`command`,`interrupt`,`setPermission`,`setThinking`,`togglePlan`,`toggleWorkflow`,`toggleGoal`,`toggleTower`,`openBtw`,`createGoal`,`controlGoal`,`focusGoal`,`compact`,`pickModel`,`selectModel`,`answer`,`dismiss`,`approval`,`cancelTask`,`toggle-dock-panel`,`close-dock-panel`,`openAgent`],setup(e,{expose:t,emit:r}){let i=e,a=r,{t:o}=J(),{confirm:l,current:u}=G4(),d=R(null),f=R(null),m=R(null),g=R(null),_=R(!1),y=R(!1),b=R(`50% 100%`),x=R(`active`),S=R(`active`),C=L(()=>Object.values(i.sessionPlans??{}).at(-1)),w=L(()=>d.value?.anyPopupOpen??!1),T=L(()=>[{value:`active`,label:o(`tasks.filterRecent`),icon:`clock`},{value:`running`,label:o(`tasks.filterRunning`),icon:`play`},{value:`done`,label:o(`tasks.filterDone`),icon:`circle-check`},{value:`all`,label:o(`tasks.filterAll`),icon:`list`}]),D=L(()=>(i.todos?.length??0)>0&&i.todoDoneCount===(i.todos?.length??0)),O=L(()=>i.goal?o(`status.goalStatus${i.goal.status[0].toUpperCase()}${i.goal.status.slice(1)}`):``),k=L(()=>{let e=Math.max(0,Math.round((i.goal?.wallClockMs??0)/1e3)),t=Math.floor(e/3600),n=Math.floor(e%3600/60);return t?`${t}${o(`status.timeUnitHour`)} ${n}${o(`status.timeUnitMinute`)}`:n?`${n}${o(`status.timeUnitMinute`)} ${e%60}${o(`status.timeUnitSecond`)}`:`${e}${o(`status.timeUnitSecond`)}`}),A=L(()=>i.bashTasks.some(e=>e.kind===`tool`)?o(`tasks.dockTasks`):o(`tasks.dockBash`));function j(e,t){if(t===`all`)return e;if(t===`running`)return e.filter(e=>e.state===`run`);if(t===`done`)return e.filter(e=>e.state!==`run`);let n=e.filter(e=>e.state===`run`),r=e.filter(e=>e.state!==`run`).toSorted((e,t)=>Date.parse(t.completedAt??t.createdAt??``)-Date.parse(e.completedAt??e.createdAt??``)).slice(0,5);return[...n,...r]}let M=L(()=>j(i.bashTasks,x.value)),N=L(()=>j(i.subagentTasks,S.value));function ee(e,t){let n=t.currentTarget,r=f.value;if(n&&r){let e=n.getBoundingClientRect(),t=r.getBoundingClientRect();b.value=`${e.left+e.width/2-t.left}px 100%`}a(`toggle-dock-panel`,e)}function I(){y.value=(g.value?.scrollTop??0)>0}function te(e){if(!i.dockPanel)return;let t=e.target;!t||m.value?.contains(t)||t.closest(`.ui-pill`)||a(`close-dock-panel`)}function ne(e){i.dockPanel&&(e.key!==`Escape`||e.repeat||e.isComposing||e.defaultPrevented||w.value||u.value||i.overlayOpen||(e.preventDefault(),e.stopImmediatePropagation(),a(`close-dock-panel`)))}async function re(){await l({title:o(`status.goalCancel`),message:o(`status.goalCancelConfirm`),confirmLabel:o(`status.goalCancelConfirmYes`),cancelLabel:o(`status.goalCancelConfirmNo`),variant:`danger`})&&a(`controlGoal`,`cancel`)}function ie(){let e=f.value;if(!e)return;document.documentElement.style.setProperty(`--dock-h`,`${e.offsetHeight}px`);let t=Number.parseFloat(getComputedStyle(e).getPropertyValue(`--p-bp-sm`))||640;_.value=e.offsetWidth{document.addEventListener(`mousedown`,te,!0),document.addEventListener(`keydown`,ne,!0),typeof ResizeObserver==`function`&&f.value&&(se=new ResizeObserver(()=>{ie(),I()}),se.observe(f.value),ie())}),h(()=>{document.removeEventListener(`mousedown`,te,!0),document.removeEventListener(`keydown`,ne,!0),se?.disconnect()}),s(()=>i.dockPanel,()=>{y.value=!1,n(I)});function ce(e){return d.value?.loadForEdit(e)??!1}function le(e){d.value?.loadAttachmentsForEdit(e)}function ue(){d.value?.focus()}function de(e){d.value?.insertQuote(e)}return t({loadForEdit:ce,loadAttachmentsForEdit:le,insertQuote:de,focus:ue,anyPopupOpen:w,isEmpty:L(()=>d.value?.isEmpty??!0)}),(t,n)=>(c(),W(`div`,{ref_key:`dockRef`,ref:f,class:V([`chat-dock`,[e.mobile?`align-mobile`:`align-center`,{"has-popup":w.value||e.dockPanel,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":_.value}]]),onClick:n[37]||=H(()=>{},[`stop`])},[v(oe,{name:`dock-panel`},{default:B(()=>[e.dockPanel?(c(),W(`div`,{key:e.dockPanel,ref_key:`workPanelRef`,ref:m,class:V([`dock-work-panel`,[`panel-${e.dockPanel}`,{"body-scrolled-up":y.value}]]),style:ae({transformOrigin:b.value})},[F(`div`,YCe,[e.dockPanel===`bash`?(c(),P(B7,{key:0,icon:`terminal`,title:A.value,meta:`${e.bashRunning} ${z(o)(`tasks.running`)}`},{actions:B(()=>[v(z7,{modelValue:x.value,"onUpdate:modelValue":n[0]||=e=>x.value=e,options:T.value},null,8,[`modelValue`,`options`])]),_:1},8,[`title`,`meta`])):e.dockPanel===`subagent`?(c(),P(B7,{key:1,icon:`sparkles`,title:z(o)(`tasks.dockSubagent`),meta:`${e.subagentRunning} ${z(o)(`tasks.running`)}`},{actions:B(()=>[v(z7,{modelValue:S.value,"onUpdate:modelValue":n[1]||=e=>S.value=e,options:T.value},null,8,[`modelValue`,`options`])]),_:1},8,[`title`,`meta`])):e.dockPanel===`todos`?(c(),P(B7,{key:2,icon:D.value?`check-list`:`list`,title:z(o)(`tasks.todoProgressTitle`),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,[`icon`,`title`,`meta`])):e.dockPanel===`goal`?(c(),P(B7,{key:3,icon:`target`,title:z(o)(`status.goalLabel`),meta:k.value},{actions:B(()=>[e.goal?.status===`active`?(c(),P(Ca,{key:0,size:`sm`,label:z(o)(`status.goalPause`),onClick:n[2]||=e=>a(`controlGoal`,`pause`)},{default:B(()=>[v(X,{name:`pause`,size:`sm`})]),_:1},8,[`label`])):E(``,!0),e.goal?.status===`paused`||e.goal?.status===`blocked`?(c(),P(Ca,{key:1,size:`sm`,label:z(o)(`status.goalResume`),onClick:n[3]||=e=>a(`controlGoal`,`resume`)},{default:B(()=>[v(X,{name:`play`,size:`sm`})]),_:1},8,[`label`])):E(``,!0),v(Ca,{size:`sm`,label:z(o)(`status.goalCancel`),onClick:re},{default:B(()=>[v(X,{name:`power`,size:`sm`})]),_:1},8,[`label`]),v(Ca,{size:`sm`,label:z(o)(`tasks.closePanel`),onClick:n[4]||=e=>a(`close-dock-panel`)},{default:B(()=>[v(X,{name:`close`,size:`sm`})]),_:1},8,[`label`])]),_:1},8,[`title`,`meta`])):(c(),P(B7,{key:4,icon:`file-edit`,title:z(o)(`status.planLabel`),meta:C.value?.reviewState?z(o)(`tools.plan.review.${C.value.reviewState}`):``},{actions:B(()=>[C.value?.path?(c(),P(Ca,{key:0,size:`sm`,label:z(o)(`tools.plan.revealInFileManager`),onClick:n[5]||=t=>void e.revealSavedPlan?.(C.value.agentId,C.value.toolCallId)},{default:B(()=>[v(X,{name:`external-link`,size:`sm`})]),_:1},8,[`label`])):E(``,!0),e.planArmed||e.planMode?(c(),P(Ca,{key:1,size:`sm`,label:z(o)(`status.workModeDismiss`),onClick:n[6]||=e=>a(`togglePlan`)},{default:B(()=>[v(X,{name:`power`,size:`sm`})]),_:1},8,[`label`])):E(``,!0),v(Ca,{size:`sm`,label:z(o)(`tasks.closePanel`),onClick:n[7]||=e=>a(`close-dock-panel`)},{default:B(()=>[v(X,{name:`close`,size:`sm`})]),_:1},8,[`label`])]),_:1},8,[`title`,`meta`]))]),F(`div`,{ref_key:`workBodyRef`,ref:g,class:`dock-work-body`,onScroll:I},[e.dockPanel===`bash`?(c(),P(BCe,{key:0,tasks:M.value,filter:x.value,onCancel:n[8]||=e=>a(`cancelTask`,e),onOpen:n[9]||=e=>a(`openAgent`,e)},null,8,[`tasks`,`filter`])):e.dockPanel===`subagent`?(c(),P(OCe,{key:1,tasks:N.value,filter:S.value,onCancel:n[10]||=e=>a(`cancelTask`,e),onOpen:n[11]||=e=>a(`openAgent`,e)},null,8,[`tasks`,`filter`])):e.dockPanel===`todos`?(c(),P(WCe,{key:2,todos:e.todos??[]},null,8,[`todos`])):e.dockPanel===`goal`&&e.goal?(c(),P(jSe,{key:3,goal:e.goal,"open-file":e.openFile},null,8,[`goal`,`open-file`])):(c(),P(VSe,{key:4,plan:C.value,"plan-mode-on":e.planMode,"open-file":e.openFile,"reveal-saved-plan":e.revealSavedPlan},null,8,[`plan`,`plan-mode-on`,`open-file`,`reveal-saved-plan`]))],544)],6)):E(``,!0)]),_:1}),e.hasDockWork||e.planMode||C.value?(c(),W(`div`,XCe,[e.goal?(c(),P(V7,{key:0,icon:`target`,active:e.dockPanel===`goal`,label:`${z(o)(`status.goalLabel`)} ${O.value}`,onClick:n[12]||=e=>ee(`goal`,e)},{meta:B(()=>[F(`span`,{class:V([`dw-goal-status`,`dw-goal-status--${e.goal.status}`])},U(O.value),3)]),default:B(()=>[K(U(z(o)(`status.goalLabel`))+` `,1)]),_:1},8,[`active`,`label`])):E(``,!0),e.planMode||C.value?(c(),P(V7,{key:1,icon:`file-edit`,active:e.dockPanel===`plan`,label:z(o)(`status.planLabel`),onClick:n[13]||=e=>ee(`plan`,e)},{default:B(()=>[K(U(z(o)(`status.planLabel`)),1)]),_:1},8,[`active`,`label`])):E(``,!0),e.bashTasks.length?(c(),P(V7,{key:2,icon:`terminal`,active:e.dockPanel===`bash`,label:A.value,onClick:n[14]||=e=>ee(`bash`,e)},pe({default:B(()=>[K(U(A.value)+` `,1)]),_:2},[e.bashRunning?{name:`meta`,fn:B(()=>[F(`span`,ZCe,[v(R7,{status:`run`}),K(U(e.bashRunning),1)])]),key:`0`}:void 0]),1032,[`active`,`label`])):E(``,!0),e.subagentTasks.length?(c(),P(V7,{key:3,icon:`sparkles`,active:e.dockPanel===`subagent`,label:z(o)(`tasks.dockSubagent`),onClick:n[15]||=e=>ee(`subagent`,e)},pe({default:B(()=>[K(U(z(o)(`tasks.dockSubagent`))+` `,1)]),_:2},[e.subagentRunning?{name:`meta`,fn:B(()=>[F(`span`,QCe,[v(R7,{status:`run`}),K(U(e.subagentRunning),1)])]),key:`0`}:void 0]),1032,[`active`,`label`])):E(``,!0),e.todos?.length?(c(),P(V7,{key:4,icon:D.value?`check-list`:`list`,active:e.dockPanel===`todos`,label:z(o)(`tasks.todoProgressTitle`),onClick:n[16]||=e=>ee(`todos`,e)},{meta:B(()=>[F(`span`,$Ce,U(e.todoDoneCount)+`/`+U(e.todos?.length),1)]),default:B(()=>[K(U(z(o)(`tasks.todoProgressTitle`))+` `,1)]),_:1},8,[`icon`,`active`,`label`])):E(``,!0)])):E(``,!0),e.pendingQuestion?(c(),P(hCe,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:n[17]||=(e,t)=>a(`answer`,e,t),onDismiss:n[18]||=e=>a(`dismiss`,e)},null,8,[`question`,`busy-kind`])):e.pendingApproval?(c(),P(DSe,{key:e.pendingApproval.approvalId,class:`dock-approval`,block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,onDecide:n[19]||=t=>a(`approval`,e.pendingApproval.approvalId,t)},null,8,[`block`,`agent-name`,`busy`])):(c(),P(L7,{key:3,ref_key:`composerRef`,ref:d,"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"goal-mode":e.goalMode,"tower-mode":e.towerMode,"tower-available":e.towerAvailable,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,onSubmit:n[20]||=e=>a(`submit`,e),onSteer:n[21]||=e=>a(`steer`,e),onCommand:n[22]||=e=>a(`command`,e),onInterrupt:n[23]||=e=>a(`interrupt`),onSetPermission:n[24]||=e=>a(`setPermission`,e),onSetThinking:n[25]||=e=>a(`setThinking`,e),onTogglePlan:n[26]||=e=>a(`togglePlan`),onToggleWorkflow:n[27]||=e=>a(`toggleWorkflow`),onToggleGoal:n[28]||=e=>a(`toggleGoal`),onToggleTower:n[29]||=e=>a(`toggleTower`),onOpenBtw:n[30]||=e=>a(`openBtw`),onCreateGoal:n[31]||=e=>a(`createGoal`,e),onControlGoal:n[32]||=e=>a(`controlGoal`,e),onFocusGoal:n[33]||=e=>a(`focusGoal`),onCompact:n[34]||=e=>a(`compact`),onPickModel:n[35]||=e=>a(`pickModel`),onSelectModel:n[36]||=e=>a(`selectModel`,e)},null,8,[`session-id`,`running`,`working`,`starting`,`queued`,`search-files`,`upload-image`,`status`,`thinking`,`plan-mode`,`plan-armed`,`goal-mode`,`tower-mode`,`tower-available`,`workflow-active`,`goal`,`activation-badges`,`models`,`starred-ids`,`skills`]))],2))}}),[[`__scopeId`,`data-v-f219171e`]]),twe=[`aria-label`,`aria-hidden`],nwe=[`data-turn-id`,`tabindex`,`aria-current`,`aria-label`,`onMouseenter`,`onFocus`,`onKeydown`,`onClick`],rwe=[`aria-label`],iwe={class:`toc-preview__prompt`},awe={key:0,class:`toc-preview__response`},owe=80,swe=Y(G({__name:`ConversationToc`,props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:[`select`],setup(e,{emit:t}){let r=e,i=t,{t:a}=J(),o=R(null),l=R(null),u=R(null),d=R(!0),f=null;function p(){let e=o.value,t=e?.offsetParent;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();d.value=n.left>=r.left&&n.right<=r.right}let m=L(()=>!r.mobile&&!r.sessionLoading&&r.items.length>1),h=L(()=>l.value!==null&&r.items.some(e=>e.id===l.value)?l.value:r.activeTurnId!==null&&r.items.some(e=>e.id===r.activeTurnId)?r.activeTurnId:r.items[0]?.id??null),g=L(()=>u.value??l.value??r.activeTurnId),v=L(()=>{let e=u.value??l.value;return e===null?void 0:r.items.find(t=>t.id===e)}),y=R(0),b=null;function x(){b!==null&&clearTimeout(b),b=null}function S(){x(),b=setTimeout(()=>{u.value=null,b=null},owe)}function C(){return o.value===null?[]:Array.from(o.value.querySelectorAll(`.toc-row`))}function w(e,t){let n=e;if(t.key===`ArrowDown`)n=Math.min(r.items.length-1,e+1);else if(t.key===`ArrowUp`)n=Math.max(0,e-1);else if(t.key===`Home`)n=0;else if(t.key===`End`)n=r.items.length-1;else return;t.preventDefault(),C()[n]?.focus()}function T(e){let t=e??C().find(e=>e.dataset.turnId===v.value?.id),n=t?.parentElement;!t||!n||(y.value=t.offsetTop-n.scrollTop+t.offsetHeight/2)}function D(e,t){x(),u.value=e,T(t.currentTarget)}function O(e,t){x(),l.value=e,T(t.currentTarget)}function k(e){x();let t=document.activeElement;t instanceof HTMLElement&&o.value?.contains(t)&&t.blur(),u.value=null,l.value=null,i(`select`,e)}function A(e){let t=e.relatedTarget;(!(t instanceof Node)||!o.value?.contains(t))&&(l.value=null)}return s(m,e=>{f?.disconnect(),f=null,e&&n(()=>{let e=o.value,t=e?.offsetParent;!e||!t||(typeof ResizeObserver<`u`&&(f=new ResizeObserver(p),f.observe(t)),p())})},{immediate:!0}),s([()=>r.activeTurnId,m],([e,t])=>{!t||e===null||n(()=>{let t=C().find(t=>t.dataset.turnId===e);typeof t?.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})})},{immediate:!0}),ne(()=>{x(),f?.disconnect(),f=null}),(t,n)=>m.value?(c(),W(`nav`,{key:0,ref_key:`navRef`,ref:o,class:V([`conversation-toc`,{"toc-clipped":!d.value||e.occluded}]),"aria-label":z(a)(`conversation.toc`),"aria-hidden":d.value&&!e.occluded?void 0:!0,onMouseenter:x,onMouseleave:S,onFocusout:A},[F(`div`,{class:`toc-scroll`,onScroll:n[0]||=e=>T()},[(c(!0),W(M,null,_(e.items,(t,r)=>(c(),W(`button`,{key:t.id,type:`button`,class:V([`toc-row`,{active:e.activeTurnId===t.id,highlighted:g.value===t.id,previewing:u.value===t.id||l.value===t.id}]),"data-turn-id":t.id,tabindex:h.value===t.id?0:-1,"aria-current":e.activeTurnId===t.id?`location`:void 0,"aria-label":t.title,onMouseenter:e=>D(t.id,e),onFocus:e=>O(t.id,e),onKeydown:e=>w(r,e),onClick:e=>k(t.id)},[...n[2]||=[F(`span`,{class:`toc-marker`,"aria-hidden":`true`},null,-1)]],42,nwe))),128))],32),v.value?(c(),W(`button`,{key:0,type:`button`,class:`toc-preview`,style:ae({top:`${y.value}px`}),"aria-label":v.value.title,tabindex:`-1`,onMouseenter:x,onClick:n[1]||=e=>k(v.value.id)},[F(`span`,iwe,U(v.value.title),1),v.value.preview?(c(),W(`span`,awe,U(v.value.preview),1)):E(``,!0)],44,rwe)):E(``,!0)],42,twe)):E(``,!0)}}),[[`__scopeId`,`data-v-8a1c40d2`]]),H7=`script, style, noscript, template, [inert], .top-sentinel`,U7=`pythinker-transcript-search`,W7=`pythinker-transcript-search-current`,cwe=1e3;function lwe(e){return e===`pre`||e===`pre-wrap`||e===`break-spaces`?`preserve`:e===`pre-line`?`pre-line`:`collapse`}function uwe(e,t){if(t===`preserve`)return{text:e,map:Array.from({length:e.length},(e,t)=>t)};let n=t===`collapse`?/[\t\n\f\r ]/:/[\t ]/,r=``,i=[],a=!1;for(let t=0;tG7(e.text)),r=[],i=``;for(let t=0;t0&&e[t].gapBefore&&(i+=`\0`),r[t]=i.length,i+=n[t].folded;let a=fwe(G7(t).folded);if(a===null)return;let o=new RegExp(a,`g`);function s(e){let t=0,n=r.length-1,i=0;for(;t<=n;){let a=t+n>>1;r[a]<=e?(i=a,t=a+1):n=a-1}return i}let c;for(;;){let e=o.exec(i);if(e===null)return;let t=e.index,a=t+e[0].length-1,l=s(t),u=s(a),d=n[l].map[t-r[l]],f=n[u].map[a-r[u]],p={startSegment:l,startOffset:d.start,endSegment:u,endOffset:f.start+f.length};(c?.startSegment!==p.startSegment||c.startOffset!==p.startOffset||c.endSegment!==p.endSegment||c.endOffset!==p.endOffset)&&(c=p,yield p)}}var mwe=new Set(`ADDRESS.ARTICLE.ASIDE.BLOCKQUOTE.BR.DD.DIV.DL.DT.FIELDSET.FIGCAPTION.FIGURE.FOOTER.FORM.H1.H2.H3.H4.H5.H6.HEADER.HR.LI.MAIN.NAV.OL.P.PRE.SECTION.TABLE.TBODY.TD.TFOOT.TH.THEAD.TR.UL`.split(`.`)),hwe=new Set([`inline`,`inline-block`,`inline-flex`,`inline-grid`,`inline-table`,`contents`,`ruby`]);function gwe(e,t){let n=t.get(e);if(n!==void 0)return n;let r=mwe.has(e.tagName)||!hwe.has(getComputedStyle(e).display);return t.set(e,r),r}function _we(e,t,n){let r=e.parentElement;for(;r!==null&&r!==t&&!gwe(r,n);)r=r.parentElement;return r??t}function vwe(e){let t=e.ownerDocument,n=t.defaultView?.NodeFilter??NodeFilter,r=t.createTreeWalker(e,n.SHOW_ELEMENT|n.SHOW_TEXT,{acceptNode(e){if(e.nodeType!==Node.ELEMENT_NODE)return n.FILTER_ACCEPT;let t=e;return t.matches(H7)?n.FILTER_REJECT:t.matches(`br, hr, wbr`)&&!t.closest(H7)?n.FILTER_ACCEPT:n.FILTER_SKIP}}),i=new WeakMap,a=new WeakMap,o=[],s=!1;for(let t=r.nextNode();t!==null;t=r.nextNode()){if(t.nodeType===Node.ELEMENT_NODE){s=!0;continue}let n=t.nodeValue??``;if(n.length===0)continue;let r=t.parentElement;if(r===null)continue;let c=a.get(r);c===void 0&&(c=lwe(getComputedStyle(r).whiteSpace),a.set(r,c));let{text:l,map:u}=uwe(n,c);if(l.length===0)continue;let d=_we(t,e,i),f=o.at(-1),p=s||f===void 0||f.block!==d;!p&&f.text.endsWith(` `)&&l.startsWith(` `)&&(l=l.slice(1),u=u.slice(1),l.length===0)||(o.push({text:l,gapBefore:p,node:t,block:d,whitespaceMap:u}),s=!1)}return o}function ywe(e,t){if(t.length===0)return[];let n=vwe(e),r=[];for(let i of pwe(n,t)){let t=n[i.startSegment],a=n[i.endSegment],o=e.ownerDocument.createRange();o.setStart(t.node,t.whitespaceMap[i.startOffset]),o.setEnd(a.node,a.whitespaceMap[i.endOffset-1]+1),r.push(o)}return r}function bwe(e,t,n=e=>e.getClientRects().length!==0){let r=[];for(let i of ywe(e,t))if(n(i)){if(r.length>=cwe)return{ranges:r,truncated:!0};r.push(i)}return{ranges:r,truncated:!1}}function K7(){return globalThis.CSS?.highlights??null}function q7(e,t){let n=K7(),r=globalThis.Highlight;if(!n||!r)return;if(e.length===0){J7();return}let i=new r;for(let t of e)i.add(t);n.set(U7,i);let a=e[t];if(a){let e=new r;e.add(a),n.set(W7,e)}else n.delete(W7)}function J7(){let e=K7();e?.delete(U7),e?.delete(W7)}var xwe={class:`tsearch-main`},Swe=[`placeholder`],Cwe=[`inert`],wwe={class:`tsearch-foot`},Twe={class:`tsearch-count`,"aria-live":`polite`},Ewe={class:`tsearch-rings`},Dwe=Y(G({__name:`TranscriptSearch`,props:{pane:{},mobile:{type:Boolean}},emits:[`close`],setup(e,{emit:t}){let r=e,i=t,{t:a}=J(),o=S(`input`),s=ue(``),u=ue(!1),d=ue([]),f=ue(0),m=ue(!1),g=ue(!1),y=ue([]),b=L(()=>d.value.length),x=L(()=>s.value.trim()!==``),C=L(()=>{if(u.value)return a(`conversation.search.searching`);if(!x.value)return``;if(b.value===0)return a(`conversation.search.noResults`);let e={current:f.value+1,total:b.value};return m.value?a(`conversation.search.resultsCapped`,e):a(`conversation.search.results`,e)}),w=null,T=null,D=null,O=null,k=null;function A(){return r.pane.querySelector(`.chat`)}function j(){let e=d.value[f.value];if(!e){y.value=[];return}let t=r.pane.getBoundingClientRect();y.value=Array.from(e.getClientRects(),e=>({top:`${e.top-t.top+r.pane.scrollTop}px`,left:`${e.left-t.left}px`,width:`${e.width}px`,height:`${e.height}px`}))}function N(){y.value.length!==0&&(D!==null&&clearTimeout(D),D=setTimeout(()=>{D=null,j()},120))}function I(e){let t=r.pane.getBoundingClientRect().top,n=e.findIndex(e=>{let n=e.getClientRects(),r=n[n.length-1];return r!==void 0&&r.bottom>=t});return n===-1?0:n}function te(){let e=d.value[f.value];q7(d.value,f.value),(e?.startContainer instanceof Element?e.startContainer:e?.startContainer.parentElement)?.scrollIntoView({block:`center`}),j()}function ne(e=`first`){w!==null&&(clearTimeout(w),w=null),u.value=!1;let t=A(),n=s.value.trim();if(!t||n===``){d.value=[],m.value=!1,f.value=0,J7(),j();return}let r=d.value[f.value],i=r?.startContainer,a=r?.startOffset,o=bwe(t,n);if(d.value=o.ranges,m.value=o.truncated,o.ranges.length===0){f.value=0,J7(),j();return}if(e!==!1){let t=I(o.ranges);f.value=e===`backward`?(t-1+o.ranges.length)%o.ranges.length:t,te();return}let c=o.ranges.findIndex(e=>e.startContainer===i&&e.startOffset===a);f.value=c>=0?c:I(o.ranges),q7(o.ranges,f.value),j()}function re(){if(w!==null&&clearTimeout(w),s.value.trim()===``){u.value=!1,ne();return}u.value=!0,w=setTimeout(()=>ne(),150)}function ie(e){b.value!==0&&(f.value=(f.value+e+b.value)%b.value,te())}function oe(e){if(!(e.key!==`Enter`||g.value||e.isComposing)){if(e.preventDefault(),w!==null){ne(e.shiftKey?`backward`:`first`);return}ie(e.shiftKey?-1:1)}}function R(e){e.key!==`Escape`||g.value||e.isComposing||(e.preventDefault(),e.stopPropagation(),i(`close`))}function se(e){return e instanceof Element&&(e.classList.contains(`tsearch-rings`)||e.closest(`.tsearch-rings`)!==null)}function ce(e){if(e.type===`attributes`&&e.target===r.pane||se(e.target))return!0;if(e.type!==`childList`)return!1;let t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(se)}function le(e){s.value.trim()===``||e.every(ce)||w!==null||(T!==null&&clearTimeout(T),T=setTimeout(()=>{T=null,w===null&&ne(!1)},150))}return p(()=>{if(n(()=>o.value?.focus()),typeof MutationObserver==`function`&&(O=new MutationObserver(le),O.observe(r.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:[`inert`,`style`,`class`]})),r.pane.addEventListener(`scroll`,N,{passive:!0}),window.addEventListener(`resize`,N,{passive:!0}),typeof ResizeObserver==`function`){k=new ResizeObserver(j),k.observe(r.pane);let e=r.pane.querySelector(`.content-wrap`);e&&k.observe(e)}}),h(()=>{w!==null&&clearTimeout(w),T!==null&&clearTimeout(T),D!==null&&clearTimeout(D),O?.disconnect(),k?.disconnect(),r.pane.removeEventListener(`scroll`,N),window.removeEventListener(`resize`,N),J7()}),(t,n)=>(c(),W(`div`,{class:V([`tsearch`,{mobile:e.mobile}]),role:`search`,onKeydown:R},[F(`div`,xwe,[v(X,{class:`tsearch-icon`,name:`search`,size:`sm`,"aria-hidden":`true`}),l(F(`input`,{ref:`input`,"onUpdate:modelValue":n[0]||=e=>s.value=e,type:`text`,class:`tsearch-input`,placeholder:z(a)(`conversation.search.placeholder`),autocapitalize:`off`,autocomplete:`off`,spellcheck:`false`,onInput:re,onKeydown:oe,onCompositionstart:n[1]||=e=>g.value=!0,onCompositionend:n[2]||=e=>g.value=!1},null,40,Swe),[[de,s.value]]),u.value?(c(),P(op,{key:0,class:`tsearch-spin`,size:`sm`,label:z(a)(`conversation.search.searching`)},null,8,[`label`])):E(``,!0),n[6]||=F(`span`,{class:`tsearch-sep`,"aria-hidden":`true`},null,-1),v(Ca,{class:`tsearch-close`,size:`sm`,label:z(a)(`conversation.search.close`),onClick:n[3]||=e=>i(`close`)},{default:B(()=>[v(X,{name:`close`})]),_:1},8,[`label`])]),F(`div`,{class:V([`tsearch-foot-wrap`,{open:x.value}]),inert:!x.value},[F(`div`,wwe,[v(Ca,{size:`sm`,label:z(a)(`conversation.search.previous`),disabled:b.value===0,onClick:n[4]||=e=>ie(-1)},{default:B(()=>[v(X,{name:`arrow-up`})]),_:1},8,[`label`,`disabled`]),v(Ca,{size:`sm`,label:z(a)(`conversation.search.next`),disabled:b.value===0,onClick:n[5]||=e=>ie(1)},{default:B(()=>[v(X,{name:`arrow-down`})]),_:1},8,[`label`,`disabled`]),F(`span`,Twe,U(C.value),1)])],10,Cwe),(c(),P(ee,{to:e.pane},[F(`div`,Ewe,[(c(!0),W(M,null,_(y.value,(e,t)=>(c(),W(`div`,{key:t,class:`tsearch-ring`,style:ae(e)},null,4))),128))])],8,[`to`]))],34))}}),[[`__scopeId`,`data-v-d7187e08`]]),Owe={class:`ui-action-toast-host`},kwe={class:`ui-action-toast__body`},Y7=Y(G({__name:`ActionToast`,props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:[`dismiss`],setup(e,{emit:t}){let n=t,{t:r}=J(),i=null,a=0,o=e.duration;function s(t){if(t<=0){n(`dismiss`,e.dismissToken);return}i=setTimeout(()=>n(`dismiss`,e.dismissToken),t),a=Date.now()+t}function l(){i!==null&&(clearTimeout(i),i=null,o=Math.max(0,a-Date.now()))}function u(){i===null&&s(o)}return s(e.duration),h(()=>{i!==null&&clearTimeout(i)}),(t,i)=>(c(),W(`div`,Owe,[F(`div`,{class:`ui-action-toast`,role:`status`,onPointerenter:l,onPointerleave:u},[F(`span`,kwe,[me(t.$slots,`default`,{},void 0,!0)]),v(Ca,{class:`ui-action-toast__close`,size:`sm`,label:e.dismissLabel??z(r)(`common.dismiss`),tooltip:e.dismissLabel??z(r)(`common.dismiss`),onClick:i[0]||=t=>n(`dismiss`,e.dismissToken)},{default:B(()=>[v(X,{name:`close`,size:`sm`})]),_:1},8,[`label`,`tooltip`])],32)]))}}),[[`__scopeId`,`data-v-c5370888`]]),Awe={key:0,class:`ws-guide-arrow__label`},jwe=Y(G({__name:`WorkspaceGuideArrow`,props:{label:{default:``},direction:{default:`left`}},setup(e){return(t,n)=>(c(),W(`div`,{class:V([`ws-guide-arrow`,`dir-${e.direction}`]),"aria-hidden":`true`},[n[0]||=F(`svg`,{class:`ws-guide-arrow__svg`,viewBox:`0 0 40 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},[F(`path`,{d:`M 37 8 C 25 4, 13 8, 4 8`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`}),F(`path`,{d:`M 8 5 L 3 8 L 8 11`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1),e.label?(c(),W(`span`,Awe,U(e.label),1)):E(``,!0)],2))}}),[[`__scopeId`,`data-v-3c957040`]]);function Mwe(e,t=2e4){let n=R(`${e}?r=0`),r=0,i=setInterval(()=>{r+=1,n.value=`${e}?r=${r}`},t);return h(()=>clearInterval(i)),n}var Nwe=[`src`,`alt`,`role`],X7=Y(G({__name:`PythinkerLogo`,props:{size:{default:`sm`},animated:{type:Boolean,default:!0},label:{default:`Pythinker Code`},interactive:{type:Boolean,default:!1}},emits:[`click`],setup(e,{emit:t}){let n=Mwe(`/brand/mascot-waving.png`),r=e,i=t;function a(){r.interactive&&i(`click`)}return(t,r)=>(c(),W(`img`,{src:e.animated?z(n):`/brand/icon.svg`,class:V([`pythinker-logo`,[`size-${e.size}`,{interactive:e.interactive}]]),alt:e.label,role:e.interactive?`button`:`img`,onClick:a},null,10,Nwe))}}),[[`__scopeId`,`data-v-58c4fde0`]]);function Pwe(e,t,n,r=5){if(n||e.length<=r)return e;let i=e.slice(0,r);if(t&&!i.some(e=>e.id===t)){let n=e.find(e=>e.id===t);n&&(i[r-1]=n)}return i}var Fwe={key:0,class:`recent`},Iwe={class:`recent-caption`},Lwe=[`onClick`],Rwe={class:`recent-title`},zwe={class:`recent-time`},Bwe={class:`recent-foot`},Vwe=Y(G({__name:`WorkspaceRecentSessions`,props:{sessions:{}},emits:[`select`,`openSessionAdmin`],setup(e,{emit:t}){let n=t,{t:r}=J();return(t,i)=>e.sessions.length?(c(),W(`section`,Fwe,[F(`h2`,Iwe,U(z(r)(`sessions.recentSessions`)),1),(c(!0),W(M,null,_(e.sessions,e=>(c(),W(`button`,{key:e.id,type:`button`,class:`recent-row`,onClick:t=>n(`select`,e.id)},[F(`span`,{class:V([`recent-ico`,e.archived?`recent-ico--done`:`recent-ico--open`])},[v(X,{name:e.archived?`circle-check`:`circle-dashed`,size:`sm`},null,8,[`name`])],2),F(`span`,Rwe,U(e.title),1),F(`span`,zwe,U(e.time),1)],8,Lwe))),128)),F(`div`,Bwe,[v(Sp,{text:z(r)(`conversation.sessionAdminTooltip`)},{default:B(()=>[F(`button`,{type:`button`,class:`recent-more`,onClick:i[0]||=e=>n(`openSessionAdmin`)},[K(U(z(r)(`conversation.viewMoreSessions`))+` `,1),v(X,{name:`chevron-down`,size:`sm`})])]),_:1},8,[`text`])])])):E(``,!0)}}),[[`__scopeId`,`data-v-cd5a729d`]]),Hwe={class:`chat-layout`},Uwe={class:`empty-hint`},Wwe={key:0,class:`empty-hint-text`},Gwe={key:1,class:`ws-pick`},Kwe={class:`ws-pick-name`},qwe={key:2,class:`ws-pick-menu`},Jwe=[`onClick`],Ywe={class:`ws-pick-item-name`},Xwe={class:`ws-pick-item-path`},Zwe=[`aria-label`],Qwe=48,Z7=80,Q7=1e3,$we=420,eTe=3e3,tTe=Y(G({__name:`ConversationPane`,props:{turns:{},expertTalkRuns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},overlayOpen:{type:Boolean},goalMode:{type:Boolean},towerMode:{type:Boolean},towerAvailable:{type:Boolean},dynamicWorkflowMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},starting:{type:Boolean},fastMoon:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},sessionTitle:{},pr:{},conversationToc:{type:Boolean},turnFolding:{type:Boolean},activityRunFolding:{type:Boolean},lastTurnReason:{},turnErrorKind:{},turnErrorMessage:{},sessionDone:{type:Boolean},pinned:{type:Boolean},recentSessions:{},revealSavedPlan:{type:Function},panelVisible:{type:Boolean},panelExpanded:{type:Boolean},activePanelType:{},togglePanel:{type:Function}},emits:`submit.steer.approval.cancelTask.answer.dismiss.command.interrupt.unqueue.editQueued.reorderQueue.steerQueued.setPermission.setThinking.togglePlan.toggleWorkflow.toggleGoal.toggleTower.createGoal.controlGoal.compact.pickModel.selectModel.openFile.openMedia.takeExpertTalk.buildExpertTalk.openCompaction.openAgent.detachTask.openToolDiff.openTurnDiff.openChanges.refreshGitStatus.editMessage.selectWorkspace.addWorkspace.openPr.renameSession.forkSession.archiveSession.restoreSession.selectSession.exportSession.togglePin.openSessionAdmin`.split(`.`),setup(e,{expose:t,emit:i}){let{t:a}=J(),o=e,l=i,u=R(!1),f=R(!1),g=L(()=>o.workspaces?.find(e=>e.id===o.activeWorkspaceId)?.name??o.workspaceName??``),y=L(()=>(o.workspaces?.length??0)>0),b=L(()=>Pwe(o.workspaces??[],o.activeWorkspaceId,f.value)),x=L(()=>(o.workspaces?.length??0)-b.value.length);s(u,e=>{e||(f.value=!1)});function S(e){u.value=!1,e!==o.activeWorkspaceId&&l(`selectWorkspace`,e)}Zi(qi.contentAlign);let C=R(null),w=R(null),T=R(null),D=R(!1),O=null;function k(e,t){let n=T.value??w.value;return!n||n.loadForEdit(e)===!1?!1:(n.loadAttachmentsForEdit(t??[]),!0)}function A(){D.value=!0,O!==null&&clearTimeout(O),O=setTimeout(()=>{O=null,D.value=!1},2e3)}function j(){o.goal&&(fe.value=`goal`)}let N=L(()=>o.tasks.filter(e=>e.kind===`bash`||e.kind===`tool`&&!e.id.startsWith(`question-`))),I=L(()=>o.tasks.filter(e=>e.kind===`subagent`&&e.runInBackground)),te=L(()=>N.value.filter(e=>e.state===`run`).length),ne=L(()=>I.value.filter(e=>e.state===`run`).length);function re(e){let t=o.tasks,n=t.find(t=>t.id===e)??t.find(t=>t.parentToolCallId===e);if(n)return n.id;let r=t.filter(e=>e.kind===`subagent`&&!e.parentToolCallId);if(r.length===1)return r[0].id}d(`resolveAgentTaskId`,re);function ie(e){let t=o.tasks.filter(t=>t.id===e||t.parentToolCallId===e);if(t.length!==0)return t.some(e=>e.state===`run`&&e.runInBackground!==!0)}d(`resolveDetachableTask`,ie);let se=m(`modelDisplay`),ce=m(`subagentEffort`);function le(e){let t=re(e);if(t===void 0)return;let n=o.tasks.find(e=>e.id===t||e.agentId===t),r=se?.(n?.model),i=ce?.(n?.thinkingEffort);if(!(r===void 0&&i===void 0))return{display:r,effort:i}}d(`resolveAgentModel`,le),d(`resolvePlan`,e=>o.sessionPlans?.[e]),d(`revealSavedPlan`,(e,t)=>o.revealSavedPlan?.(e,t)??Promise.resolve(!1)),d(`pinScroll`,ft);let ue=L(()=>(o.todos??[]).filter(e=>e.status===`done`).length),de=L(()=>o.goal!==null&&o.goal!==void 0||N.value.length>0||I.value.length>0||(o.todos?.length??0)>0),fe=R(null),G=L(()=>o.gitInfo?o.changes?.length??0:0);function pe(e){fe.value=fe.value===e?null:e}function me(){fe.value=null}s([fe,()=>o.goal,N,I,()=>o.todos,()=>o.planMode,()=>o.sessionPlans],()=>{(fe.value===`goal`&&!o.goal||fe.value===`bash`&&N.value.length===0||fe.value===`subagent`&&I.value.length===0||fe.value===`todos`&&(o.todos?.length??0)===0||fe.value===`plan`&&!o.planMode&&Object.keys(o.sessionPlans??{}).length===0)&&me()});function he(e){if(e.role===`compaction`)return a(`conversation.compactedPlain`);if(e.role===`user`){if(e.skillActivation)return`/${e.skillActivation.name}`;if(e.pluginCommand)return`/${e.pluginCommand.pluginId}:${e.pluginCommand.commandName}`;let t=e.text.trim().replaceAll(/\s+/g,` `);return t.length>0?t:`user`}let t=(e.text||e.thinking||``).trim().replaceAll(/\s+/g,` `);return t.length>0?t:(e.tools?.length??0)>0?`${e.tools.length} tools`:`pythinker`}function ge(e){for(let t=e+1;t0)return n}return``}let _e=L(()=>{let e=0;return o.turns.flatMap((t,n)=>t.role===`user`?(e+=1,[{id:t.id,role:t.role,no:e,title:he(t),preview:ge(n)}]):[])}),ve=R(null);function ye(){let e=Oe.value;if(!e)return;let t=e.querySelectorAll(`.turn-anchor[data-turn-id]`);if(t.length===0)return;let n=_e.value;if(n.length===0)return;let r=new Set(n.map(e=>e.id));if(Re.value&&Be()<=Z7){ve.value=n[n.length-1].id;return}let i=e.getBoundingClientRect(),a=i.height/2,o=null;t.forEach(e=>{let t=e.dataset.turnId;!t||!r.has(t)||e.getBoundingClientRect().top-i.top<=a&&(o=t)}),ve.value=o??n[0].id}let be=R(!1),xe=0;function Se(){xe||=at(()=>{xe=0,Ce()})}function Ce(){let e=Oe.value,t=!o.mobile&&o.conversationToc&&e?e.closest(`.con`)?.querySelector(`.conversation-toc`):null,n=t?.querySelector(`.toc-marker`),r=!1;if(e&&t&&n){let i=n.getBoundingClientRect(),a=t.getBoundingClientRect(),o=i.left+i.width/2;r=Array.from(e.querySelectorAll(`.table-node-wrapper`)).some(e=>{let t=e.getBoundingClientRect();return t.left<=o&&o<=t.right&&t.topa.top})}be.value!==r&&(be.value=r)}let we=L(()=>o.questions&&o.questions.length>0?o.questions[0]:void 0),Te=L(()=>{let e=we.value;if(e)return o.pendingQuestionActions?.[e.questionId]}),Ee=L(()=>o.approvals&&o.approvals.length>0?o.approvals[0]:void 0),De=L(()=>{let e=Ee.value;return e?!!o.pendingApprovalActions?.[e.approvalId]:!1}),Oe=R(null),ke=R(!1),Ae=R(null),je=R(0),Me=R(0),q=L(()=>({"--panes-scrollbar-width":`${je.value}px`})),Ne=L(()=>({"--chat-dock-height":`${Me.value+Qwe}px`}));function Pe(e){return e instanceof HTMLElement?e:e&&`$el`in e&&e.$el instanceof HTMLElement?e.$el:null}function Fe(){let e=Oe.value;je.value=e?Math.max(0,e.offsetWidth-e.clientWidth):0,Me.value=Ae.value?.offsetHeight??0}function Ie(e){let t=Pe(e);Oe.value=t,t&&Gt()}function Le(e){Ae.value=Pe(e)??null,e&&`loadForEdit`in e&&typeof e.loadForEdit==`function`&&`focus`in e&&typeof e.focus==`function`?T.value={loadForEdit:e.loadForEdit.bind(e),loadAttachmentsForEdit:`loadAttachmentsForEdit`in e&&typeof e.loadAttachmentsForEdit==`function`?e.loadAttachmentsForEdit.bind(e):()=>{},insertQuote:`insertQuote`in e&&typeof e.insertQuote==`function`?e.insertQuote.bind(e):()=>{},focus:e.focus.bind(e)}:T.value=null,Wt()}let Re=R(!0),ze=R(!1);function Be(){let e=Oe.value;return e?e.scrollHeight-e.scrollTop-e.clientHeight:0}let Ve=0,He=0,Ue=0,We=0,Ge=0,Ke=0;function qe(){return Date.now()1?(Re.value=!1,ze.value=!0):n<=Z7&&t>Ve+1&&(Re.value=!0,ze.value=!1),Ve=t,ye()}function Ye(e=!1){let t=Oe.value;Re.value=!0,ze.value=!1,t&&(!e&&performance.now()({node:t,top:Xe(e,t)})),r=n.findIndex(e=>e.top>=t),i=r<0?Math.max(0,n.length-1):r;return n.slice(i,i+2).flatMap(e=>{let t=e.node.dataset.scrollAnchorId,n=t??e.node.dataset.turnId;return n?[{kind:t?`tool`:`turn`,id:n,top:e.top}]:[]})}let Qe=new Map;function $e(e,t){for(let n of t.anchors){let t=n.kind===`tool`?`data-scroll-anchor-id`:`data-turn-id`,r=e.querySelector(`[${t}="${nt(n.id)}"]`);if(r)return Xe(e,r)-n.top}return e.scrollHeight-t.oldHeight}function et(e,t,n=e.scrollTop){return e.scrollTop=n+$e(e,t),Ve=e.scrollTop,e.scrollTop}async function tt(){if(!o.sessionId||!o.loadOlderMessages||o.loadingMore||jt.value||!o.hasMoreMessages)return;let e=o.sessionId,t=Oe.value,r=t?.scrollTop??0,i={anchors:t?Ze(t,r):[],oldHeight:t?.scrollHeight??0};Mt(e,!0),Pt();try{if(await n(),await o.loadOlderMessages(e),await n(),o.sessionId!==e){Qe.set(e,i);return}let t=Oe.value;if(!t)return;et(t,i),Qe.delete(e)}finally{Mt(e,!1)}}function nt(e){return typeof CSS<`u`&&typeof CSS.escape==`function`?CSS.escape(e):e.replaceAll(/["\\]/g,`\\$&`)}function rt(e){let t=Oe.value;if(!t)return;let n=t.querySelector(`.turn-anchor[data-turn-id="${nt(e)}"]`);n&&(Ft(),Re.value=!1,ve.value=e,ze.value=Be()>Z7,n.scrollIntoView({behavior:`smooth`,block:`center`}))}function it(){let e=Oe.value;if(!e)return`none`;let t=e.firstElementChild,n=t instanceof HTMLElement?t.offsetHeight:0,r=Ae.value?.offsetHeight??0;return`${e.scrollHeight}:${e.clientHeight}:${n}:${r}`}function at(e){return typeof requestAnimationFrame==`function`?requestAnimationFrame(e):setTimeout(e,16)}function ot(e){typeof cancelAnimationFrame==`function`?cancelAnimationFrame(e):clearTimeout(e)}let st=0,ct=0,lt=null,ut=0;function dt(){return performance.now(){if(ct=0,performance.now()>=st||!lt){lt=null;return}let e=lt.getBoundingClientRect().top-ut;e&&(n.scrollTop+=e),ct=at(r)};ct=at(r)}function pt(e=36){if(!Re.value&&!qe())return;let t=++Ke,n=``,r=0,i=0;Ge&&=(ot(Ge),0);let a=()=>{if(Ge=0,t!==Ke||!Re.value&&!qe())return;Ye(!1);let o=it();r=o===n?r+1:0,n=o,i++,r<3&&i0&&t.length>=e.length&&e.firstId!==t.firstId&&e.lastId===t.lastId&&e.lastTextLen===t.lastTextLen&&e.lastThinkingLen===t.lastThinkingLen&&e.lastToolsLen===t.lastToolsLen&&e.approvalIds===t.approvalIds}s(L(()=>{let e=(o.approvals??[]).map(e=>e.approvalId).join(`,`),t=o.turns,n=t.at(-1),r=n?.thinking?.length??0,i=n?.tools?.reduce((e,t)=>e+t.name.length+(t.arg?.length??0)+(t.output?.join(``).length??0),0)??0;return{length:t.length,firstId:t[0]?.id??``,lastId:n?.id??``,lastTextLen:n?.text.length??0,lastThinkingLen:r,lastToolsLen:i,approvalIds:e}}),async(e,t)=>{if(jt.value&&mt(t,e)){ye();return}await n(),Re.value||qe()?Ye(e.length{Wt()}),s(()=>o.mobile,async()=>{await n(),Fe()});let ht=new Map;s(()=>o.fileReloadKey,async(e,t)=>{let r=Oe.value;t&&r&&ht.set(String(t),{top:r.scrollTop,following:Re.value}),Ft(),await n();let i=Oe.value,a=e?ht.get(String(e)):void 0;if(a&&i){let t=Qe.get(String(e)),n=t?et(i,t,a.top):a.top;t&&Qe.delete(String(e)),Re.value=a.following,i.scrollTop=n,Ve=i.scrollTop,ze.value=!a.following&&Be()>1,a.following&&pt()}else Re.value=!0,Ve=0,Ye(!1),pt();ye()}),s(()=>o.sessionLoading,async(e,t)=>{e||!t||(Re.value=!0,await n(),pt(),ye())}),s(()=>o.turnActive,async(e,t)=>{e||!t||!Re.value&&!qe()||(await n(),pt(48),ye())});function gt(){Re.value=!0,ze.value=!1,He=Date.now()+Q7,n(()=>{Ye(!0),pt(16)})}function _t(e){gt(),l(`submit`,e)}function vt(e){Re.value=!0,ze.value=!1,He=Date.now()+Q7,l(`editMessage`,e)}function yt(e){let t=o.queued?.[e];k(t?.text??``,t?.attachments)&&l(`editQueued`,e)}function bt(e){l(`reorderQueue`,e)}function xt(e,t){gt(),l(`answer`,e,t)}function St(e,t){!e||!t||l(`approval`,e,t)}let Ct=null,wt=null,Tt=null,Et=null,Dt=0,Ot=0,kt=0,At=R(new Set),jt=L(()=>!!o.sessionId&&At.value.has(o.sessionId));function Mt(e,t){let n=new Set(At.value);t?n.add(e):n.delete(e),At.value=n}function Nt(){jt.value||(kt||=at(()=>{kt=0,!jt.value&&(dt()||(Re.value||qe())&&Ye(!1))}))}function Pt(){Ke++,Ge&&=(ot(Ge),0),kt&&=(ot(kt),0)}function Ft(){let e=Oe.value;if(He=0,Pt(),st=0,lt=null,e){let t=e.scrollTop;typeof e.scrollTo==`function`?e.scrollTo({top:t,behavior:`auto`}):e.scrollTop=t}We=0,Ue=-1/0,e&&(Ve=e.scrollTop)}function It(){let e=Oe.value;!e||e.scrollHeight-e.clientHeight<=1&&!o.hasMoreMessages||(Re.value=!1,Ft(),e.scrollHeight-e.clientHeight>1&&(ze.value=!0))}function Lt(e){let t=Oe.value;if(!t)return!1;for(let n of e.composedPath()){if(n===t)return!1;if(n instanceof HTMLElement&&n.scrollHeight>n.clientHeight+1&&n.scrollTop>1)return!0}return!1}function Rt(e){e.defaultPrevented||e.ctrlKey||e.shiftKey||e.deltaY>=0||Lt(e)||It()}function zt(e){let t=Oe.value;if(!t||e.defaultPrevented||e.button!==0||e.pointerType===`touch`)return;let n=t.getBoundingClientRect(),r=t.offsetWidth-t.clientWidth,i=r>0?r:12;e.target===t&&e.clientX>=n.right-i&&It()}let Bt=null;function Vt(e){Bt=e.touches.length===1?e.touches[0].clientY:null}function Ht(e){let t=e.touches.length===1?e.touches[0].clientY:null;t!==null&&Bt!==null&&t>Bt+2&&!Lt(e)&&It(),Bt=t}function Ut(){if(!wt)return;let e=Oe.value?.firstElementChild??null;e!==Tt&&(Tt&&wt.unobserve(Tt),Tt=e,e&&wt.observe(e))}function Wt(){if(!wt)return;let e=Ae.value;e!==Et&&(Et&&wt.unobserve(Et),Et=e,e&&wt.observe(e))}function Gt(){let e=Oe.value;Fe(),Ct&&(Ct.disconnect(),e&&Ct.observe(e,{childList:!0,subtree:!0,characterData:!0})),wt&&(wt.disconnect(),Tt=null,Et=null,e&&wt.observe(e),Ut(),Wt()),Dt=e?.scrollHeight??0,Ot=e?.clientHeight??0,Se()}function Kt(){Ut(),Nt(),Se()}function qt(){typeof document>`u`||document.visibilityState===`visible`&&Re.value&&pt()}let Jt=R(!1),Yt=R(0);function Xt(){Yt.value+=1,Jt.value=!0}function Zt(){Xt(),l(`interrupt`)}function Qt(e){if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`f`){if(o.overlayOpen)return;e.preventDefault(),ke.value=!0,n(()=>{Oe.value?.closest(`.con`)?.querySelector(`.tsearch-input`)?.focus()});return}e.key===`Escape`&&(o.running||o.working)&&(e.preventDefault(),Zt())}function $t(){ke.value=!1,n(()=>Oe.value?.focus({preventScroll:!0}))}function en(){Re.value&&Nt()}p(()=>{n(()=>{typeof MutationObserver==`function`&&(Ct=new MutationObserver(Kt)),typeof ResizeObserver==`function`&&(wt=new ResizeObserver(()=>{Se(),Fe();let e=Oe.value;if(!e)return;let{scrollHeight:t,clientHeight:n}=e,r=t>Dt+1,i=n{Ct&&Ct.disconnect(),wt&&wt.disconnect(),kt&&ot(kt),Ge&&ot(Ge),ct&&ot(ct),xe&&ot(xe),O!==null&&(clearTimeout(O),O=null),typeof document<`u`&&(document.removeEventListener(`visibilitychange`,qt),document.removeEventListener(`keydown`,Qt)),window.visualViewport?.removeEventListener(`resize`,en)});function tn(){(T.value??w.value)?.focus()}function nn(e){(T.value??w.value)?.insertQuote(e)}return t({loadComposerForEdit:k,focusComposer:tn,insertComposerQuote:nn}),(t,n)=>{let i=r(`IconButton`);return c(),W(`section`,{class:V([`con`,{mobile:e.mobile,"toc-enabled":e.conversationToc}]),style:ae(Ne.value)},[ke.value&&Oe.value?(c(),P(Dwe,{key:0,pane:Oe.value,mobile:e.mobile,onClose:$t},null,8,[`pane`,`mobile`])):E(``,!0),!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(c(),P(Nde,{key:1,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":G.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:D.value,"session-done":e.sessionDone,pinned:e.pinned,"panel-visible":e.panelVisible,onOpenChanges:n[0]||=e=>l(`openChanges`),onCopyAll:n[1]||=e=>C.value?.copyConversation(),onCopyFinalSummary:n[2]||=e=>C.value?.copyFinalSummary(),onOpenPr:n[3]||=t=>e.pr&&l(`openPr`,e.pr.url),onRenameSession:n[4]||=(e,t)=>l(`renameSession`,e,t),onForkSession:n[5]||=e=>l(`forkSession`,e),onTogglePin:n[6]||=e=>l(`togglePin`,e),onArchiveSession:n[7]||=e=>l(`archiveSession`,e),onRestoreSession:n[8]||=e=>l(`restoreSession`,e),onExportSession:n[9]||=e=>l(`exportSession`,e),onTogglePanel:n[10]||=t=>e.togglePanel?.()},null,8,[`session-id`,`workspace-name`,`workspace-root`,`session-title`,`branch`,`ahead`,`behind`,`changes-count`,`git-diff-stats`,`is-git-repo`,`pr`,`copied`,`session-done`,`pinned`,`panel-visible`])):E(``,!0),!e.mobile&&!e.panelVisible&&e.turns.length===0&&!e.sessionLoading?(c(),P(i,{key:2,class:`empty-panel-btn`,label:z(a)(`panel.openPanel`),onClick:n[11]||=t=>e.togglePanel?.()},{default:B(()=>[v(X,{name:`panel-expand-right`})]),_:1},8,[`label`])):E(``,!0),e.conversationToc?(c(),P(swe,{key:3,items:_e.value,"active-turn-id":ve.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:be.value,onSelect:rt},null,8,[`items`,`active-turn-id`,`mobile`,`session-loading`,`occluded`])):E(``,!0),F(`div`,Hwe,[F(`div`,{ref:Ie,class:V([`panes chat-scroll`,{"is-following":Re.value,"history-prepending":jt.value}]),tabindex:`-1`,onScrollPassive:Je,onWheelPassive:Rt,onPointerdownPassive:zt,onTouchstartPassive:Vt,onTouchmovePassive:Ht},[F(`div`,{class:V([`content-wrap`,[e.mobile?`align-mobile`:`align-center`]])},[e.turns.length===0&&!e.sessionLoading?(c(),W(M,{key:0},[n[69]||=F(`div`,{class:`empty-spacer`},null,-1),F(`div`,Uwe,[F(`span`,{class:V([`empty-hint-title`,{"is-starting":e.starting}])},[e.starting?(c(),P(op,{key:0,size:`sm`})):(c(),P(X7,{key:1,size:`md`,label:``,"aria-hidden":`true`})),F(`span`,null,U(e.starting?z(a)(`conversation.starting`):z(a)(`composer.emptyConversationTitle`)),1)],2),e.starting?E(``,!0):(c(),W(`span`,Wwe,U(z(a)(`composer.emptyConversation`)),1)),y.value&&!e.starting?(c(),W(`div`,Gwe,[v(Sp,{text:z(a)(`conversation.switchWorkspace`)},{default:B(()=>[F(`button`,{type:`button`,class:`ws-pick-btn`,onClick:n[12]||=H(e=>u.value=!u.value,[`stop`])},[v(X,{name:`folder`,size:`sm`}),F(`span`,Kwe,U(g.value),1),v(X,{class:V([`ws-pick-chev`,{open:u.value}]),name:`chevron-down`,size:`sm`},null,8,[`class`])])]),_:1},8,[`text`]),u.value?E(``,!0):(c(),P(jwe,{key:0,class:`ws-pick-arrow`,label:z(a)(`conversation.workingDirectory`)},null,8,[`label`])),u.value?(c(),W(`div`,{key:1,class:`ws-pick-backdrop`,onClick:n[13]||=e=>u.value=!1})):E(``,!0),u.value?(c(),W(`div`,qwe,[(c(!0),W(M,null,_(b.value,t=>(c(),W(`button`,{key:t.id,type:`button`,class:V([`ws-pick-item`,{on:t.id===e.activeWorkspaceId}]),onClick:H(e=>S(t.id),[`stop`])},[F(`span`,Ywe,U(t.name),1),F(`span`,Xwe,U(t.shortPath),1)],10,Jwe))),128)),x.value>0?(c(),W(`button`,{key:0,type:`button`,class:`ws-pick-item ws-pick-more`,onClick:n[14]||=H(e=>f.value=!f.value,[`stop`])},[F(`span`,null,U(z(a)(`conversation.moreWorkspaces`,{count:x.value})),1)])):E(``,!0),n[68]||=F(`div`,{class:`ws-pick-divider`},null,-1),F(`button`,{type:`button`,class:`ws-pick-action`,onClick:n[15]||=H(e=>{u.value=!1,l(`addWorkspace`)},[`stop`])},[v(X,{name:`plus`,size:`sm`}),F(`span`,null,U(z(a)(`conversation.addWorkspace`)),1)])])):E(``,!0)])):e.starting?E(``,!0):(c(),W(`button`,{key:2,type:`button`,class:`empty-add-workspace`,onClick:n[16]||=e=>l(`addWorkspace`)},[v(X,{name:`folder-plus`,size:`sm`}),F(`span`,null,U(z(a)(`conversation.addWorkspace`)),1)]))]),e.sessionId?E(``,!0):(c(),P(Vwe,{key:0,sessions:e.recentSessions??[],onSelect:n[17]||=e=>l(`selectSession`,e),onOpenSessionAdmin:n[18]||=e=>l(`openSessionAdmin`)},null,8,[`sessions`])),v(L7,{ref_key:`emptyComposerRef`,ref:w,class:`empty-composer`,"session-id":e.sessionId,running:e.running,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"goal-mode":e.goalMode,"tower-mode":e.towerMode,"tower-available":e.towerAvailable,"workflow-active":e.dynamicWorkflowMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":``,onSubmit:_t,onSteer:n[19]||=e=>l(`steer`,e),onCommand:n[20]||=e=>l(`command`,e),onInterrupt:Zt,onUnqueue:n[21]||=e=>l(`unqueue`,e),onEditQueued:n[22]||=e=>l(`editQueued`,e),onSetPermission:n[23]||=e=>l(`setPermission`,e),onSetThinking:n[24]||=e=>l(`setThinking`,e),onTogglePlan:n[25]||=e=>l(`togglePlan`),onToggleWorkflow:n[26]||=e=>l(`toggleWorkflow`),onToggleGoal:n[27]||=e=>l(`toggleGoal`),onToggleTower:n[28]||=e=>l(`toggleTower`),onOpenBtw:n[29]||=e=>l(`command`,`/btw`),onCreateGoal:n[30]||=e=>l(`createGoal`,e),onControlGoal:n[31]||=e=>l(`controlGoal`,e),onFocusGoal:j,onCompact:n[32]||=e=>l(`compact`),onPickModel:n[33]||=e=>l(`pickModel`),onSelectModel:n[34]||=e=>l(`selectModel`,e)},null,8,[`session-id`,`running`,`queued`,`search-files`,`upload-image`,`status`,`thinking`,`plan-mode`,`goal-mode`,`tower-mode`,`tower-available`,`workflow-active`,`goal`,`activation-badges`,`models`,`starred-ids`,`skills`,`starting`]),n[70]||=F(`div`,{class:`empty-spacer`},null,-1)],64)):(c(),P(J4,{ref_key:`chatPaneRef`,ref:C,key:e.fileReloadKey??`no-session`,turns:e.turns,"expert-talk-runs":e.expertTalkRuns,"expert-talk-models":e.models,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"fast-moon":e.fastMoon,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":Re.value,"tool-diff-panel":!0,"turn-folding":e.turnFolding??!0,"activity-run-folding":e.activityRunFolding??!0,"last-turn-reason":e.lastTurnReason,"turn-error-kind":e.turnErrorKind,"turn-error-message":e.turnErrorMessage,cwd:e.workspaceRoot,queued:e.queued,onOpenFile:n[35]||=e=>l(`openFile`,e),onOpenMedia:n[36]||=e=>l(`openMedia`,e),onTakeExpertTalk:n[37]||=e=>l(`takeExpertTalk`,e),onBuildExpertTalk:n[38]||=e=>l(`buildExpertTalk`,e),onCopyConversationCopied:A,onOpenCompaction:n[39]||=e=>l(`openCompaction`,e),onOpenAgent:n[40]||=e=>l(`openAgent`,e),onDetachTask:n[41]||=e=>l(`detachTask`,e),onOpenToolDiff:n[42]||=e=>l(`openToolDiff`,e),onOpenTurnDiff:n[43]||=e=>l(`openTurnDiff`,e),onEditMessage:vt,onLoadOlderMessages:tt,onUnqueue:n[44]||=e=>l(`unqueue`,e),onEditQueued:yt,onReorderQueue:bt,onSteerQueued:n[45]||=e=>l(`steerQueued`,e),onContinueTurn:n[46]||=e=>_t({text:e,attachments:[]})},null,8,[`turns`,`expert-talk-runs`,`expert-talk-models`,`approvals`,`questions`,`turn-active`,`working`,`fast-moon`,`session-loading`,`compaction`,`has-more-messages`,`loading-more`,`loading-more-error`,`is-following`,`turn-folding`,`activity-run-folding`,`last-turn-reason`,`turn-error-kind`,`turn-error-message`,`cwd`,`queued`]))],2)],34),(c(),P(ee,{defer:``,to:`.pfc-host`,disabled:!e.panelExpanded||e.activePanelType===`btw`},[e.turns.length===0&&!e.sessionLoading?E(``,!0):(c(),P(ewe,{key:0,ref:Le,style:ae(q.value),"session-id":e.sessionId,running:e.running,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,working:e.working,"goal-mode":e.goalMode,"tower-mode":e.towerMode,"tower-available":e.towerAvailable,"dynamic-workflow-mode":e.dynamicWorkflowMode,"activation-badges":e.activationBadges,models:e.models,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"session-plans":e.sessionPlans,"overlay-open":e.overlayOpen,"open-file":e=>l(`openFile`,e),"reveal-saved-plan":e.revealSavedPlan,"dock-panel":fe.value,"bash-tasks":N.value,"subagent-tasks":I.value,"bash-running":te.value,"subagent-running":ne.value,"todo-done-count":ue.value,"has-dock-work":de.value,todos:e.todos,"pending-question":we.value,"question-busy-kind":Te.value,"pending-approval":Ee.value,"approval-busy":De.value,mobile:e.mobile,onToggleDockPanel:n[47]||=e=>pe(e),onCloseDockPanel:n[48]||=e=>me(),onOpenAgent:n[49]||=e=>l(`openAgent`,e),onAnswer:xt,onDismiss:n[50]||=e=>l(`dismiss`,e),onApproval:St,onCancelTask:n[51]||=e=>l(`cancelTask`,e),onControlGoal:n[52]||=e=>l(`controlGoal`,e),onSubmit:_t,onSteer:n[53]||=e=>l(`steer`,e),onCommand:n[54]||=e=>l(`command`,e),onInterrupt:Zt,onSetPermission:n[55]||=e=>l(`setPermission`,e),onSetThinking:n[56]||=e=>l(`setThinking`,e),onTogglePlan:n[57]||=e=>l(`togglePlan`),onToggleWorkflow:n[58]||=e=>l(`toggleWorkflow`),onToggleGoal:n[59]||=e=>l(`toggleGoal`),onToggleTower:n[60]||=e=>l(`toggleTower`),onOpenBtw:n[61]||=e=>l(`command`,`/btw`),onCreateGoal:n[62]||=e=>l(`createGoal`,e),onFocusGoal:j,onCompact:n[63]||=e=>l(`compact`),onPickModel:n[64]||=e=>l(`pickModel`),onSelectModel:n[65]||=e=>l(`selectModel`,e)},null,8,`style.session-id.running.starting.queued.search-files.upload-image.status.thinking.plan-mode.plan-armed.working.goal-mode.tower-mode.tower-available.dynamic-workflow-mode.activation-badges.models.starred-ids.skills.goal.session-plans.overlay-open.open-file.reveal-saved-plan.dock-panel.bash-tasks.subagent-tasks.bash-running.subagent-running.todo-done-count.has-dock-work.todos.pending-question.question-busy-kind.pending-approval.approval-busy.mobile`.split(`.`)))],8,[`disabled`]))]),v(oe,{name:`pill`},{default:B(()=>[ze.value?(c(),W(`button`,{key:0,class:`newmsg-pill`,style:ae({bottom:`${Me.value+12}px`}),"aria-label":z(a)(`conversation.jumpToLatestAria`),onClick:n[66]||=e=>Ye(!0)},[v(X,{class:`pill-chevron`,name:`chevron-down`,size:`md`}),K(` `+U(z(a)(`conversation.newMessages`)),1)],12,Zwe)):E(``,!0)]),_:1}),Jt.value?(c(),P(Y7,{key:Yt.value,duration:eTe,onDismiss:n[67]||=e=>Jt.value=!1},{default:B(()=>[K(U(z(a)(`conversation.manuallyAborted`)),1)]),_:1})):E(``,!0)],6)}}}),[[`__scopeId`,`data-v-52f9eb6f`]]),nTe=[`role`,`aria-label`],rTe={key:0,class:`sab-comment`},iTe=[`placeholder`],aTe=[`disabled`],oTe=Y(G({__name:`SelectionActionBar`,props:{enabled:{type:Boolean},panelSource:{}},emits:[`add`],setup(e,{emit:t}){let r=e,i=t,{t:a}=J(),o=R(!1),s=R(!1),u=R(``),d=R(``),f=R(),m=R({}),g=R(null),_=R(null),y=0;function b(){o.value=!1,s.value=!1,u.value=``}function x(e){let t=e.commonAncestorContainer;return t.nodeType===Node.ELEMENT_NODE?t:t.parentElement}function S(){if(y=0,!r.enabled||s.value&&g.value?.contains(document.activeElement))return;let e=window.getSelection();if(!e||e.rangeCount===0||e.isCollapsed){b();return}let t=e.getRangeAt(0),n=x(t),i=n?.closest(`.con, .pt-body`);if(!n||!i||n.closest(`.sab, input, textarea, button, [contenteditable="true"]`)){b();return}let a=e.toString().trim(),c=t.getBoundingClientRect();if(!a||c.width===0&&c.height===0){b();return}d.value=a,f.value=i.classList.contains(`pt-body`)?r.panelSource:void 0;let l=Math.min(window.innerWidth-220-8,Math.max(8,c.left+c.width/2-220/2)),u=c.bottom+8;m.value={left:`${Math.round(l)}px`,top:`${Math.round(u)}px`,width:`220px`},o.value=!0,s.value=!1}function C(){y&&cancelAnimationFrame(y),y=requestAnimationFrame(S)}function w(){window.getSelection()?.removeAllRanges()}function T(e){let t=d.value.trim();if(!t)return;let n=e?.trim();i(`add`,{quote:t,comment:n||void 0,source:f.value}),w(),b()}function D(){s.value=!0,n(()=>_.value?.focus())}function O(e){if(s.value||e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let t=Array.from(g.value?.querySelectorAll(`.sab-action`)??[]),n=t.indexOf(document.activeElement);t[e.key===`ArrowDown`?(n+1)%t.length:(n-1+t.length)%t.length]?.focus()}function k(e){!o.value||g.value?.contains(e.target)||b()}function A(e){e.key===`Escape`&&o.value&&(e.preventDefault(),e.stopImmediatePropagation(),b())}return p(()=>{document.addEventListener(`selectionchange`,C),document.addEventListener(`pointerdown`,k,!0),document.addEventListener(`keydown`,A,!0)}),h(()=>{y&&cancelAnimationFrame(y),document.removeEventListener(`selectionchange`,C),document.removeEventListener(`pointerdown`,k,!0),document.removeEventListener(`keydown`,A,!0)}),(e,t)=>(c(),P(ee,{to:`body`},[o.value?(c(),W(`div`,{key:0,ref_key:`barRef`,ref:g,class:`sab`,style:ae(m.value),role:s.value?`dialog`:`menu`,"aria-label":s.value?z(a)(`selection.comment`):void 0,onPointerdown:t[4]||=H(()=>{},[`prevent`]),onKeydown:O},[s.value?(c(),W(`div`,rTe,[l(F(`input`,{ref_key:`commentInputRef`,ref:_,"onUpdate:modelValue":t[0]||=e=>u.value=e,placeholder:z(a)(`selection.commentPlaceholder`),onKeydown:t[1]||=ie(H(e=>T(u.value),[`prevent`]),[`enter`])},null,40,iTe),[[de,u.value]]),F(`button`,{type:`button`,disabled:!u.value.trim(),onClick:t[2]||=e=>T(u.value)},U(z(a)(`selection.confirm`)),9,aTe)])):(c(),W(M,{key:1},[F(`button`,{type:`button`,class:`sab-action`,role:`menuitem`,onClick:D},[v(X,{name:`message`,size:`sm`}),F(`span`,null,U(z(a)(`selection.comment`)),1)]),F(`button`,{type:`button`,class:`sab-action`,role:`menuitem`,onClick:t[3]||=e=>T()},[v(X,{name:`plus`,size:`sm`}),F(`span`,null,U(z(a)(`selection.addToChat`)),1)])],64))],44,nTe)):E(``,!0)]))}}),[[`__scopeId`,`data-v-d37e8069`]]),sTe=[`aria-label`],cTe={class:`media-lightbox-card`},lTe=[`src`,`alt`],uTe=[`src`],dTe={key:0,class:`media-preview-caption`},fTe=Y(G({__name:`MediaLightbox`,props:{media:{},src:{},originImg:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=[`a[href]`,`area[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`,`),a=S(`overlay`),o=S(`close`),s=S(`image`),l=L(()=>n.media.kind===`image`),u=L(()=>n.media.path??(l.value?`Image preview`:`Video preview`)),d=ue(1),f=ue(0),m=ue(0),g=ue(!1),_=L(()=>({transform:`translate(${f.value}px, ${m.value}px) scale(${d.value})`,cursor:d.value>1?g.value?`grabbing`:`grab`:`zoom-in`})),y=null,b=null,x=0,C=0,w=0,T=0,{lock:D,unlock:O}=N7();function k(){d.value=1,f.value=0,m.value=0}function A(e){if(!l.value)return;e.preventDefault();let t=Math.min(8,Math.max(1,d.value*(e.deltaY<0?1.1:.9)));d.value=t,t===1&&(f.value=0,m.value=0)}function j(){if(d.value!==1){k();return}let e=s.value;e&&(d.value=Math.min(8,Math.max(1,e.naturalWidth/e.clientWidth)))}function M(e){d.value<=1||(b=e.pointerId,x=e.clientX,C=e.clientY,w=f.value,T=m.value,g.value=!0,s.value?.setPointerCapture(e.pointerId))}function N(e){b===e.pointerId&&(f.value=w+e.clientX-x,m.value=T+e.clientY-C)}function I(e){b===e.pointerId&&(s.value?.releasePointerCapture(e.pointerId),b=null,g.value=!1)}function te(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),r(`close`);return}if(e.key!==`Tab`||!a.value)return;let t=a.value.querySelectorAll(i),n=t[0],o=t[t.length-1];!n||!o||(a.value.contains(document.activeElement)?e.shiftKey&&document.activeElement===n?(e.preventDefault(),o.focus()):!e.shiftKey&&document.activeElement===o&&(e.preventDefault(),n.focus()):(e.preventDefault(),(e.shiftKey?o:n).focus()))}return p(()=>{D(),y=document.activeElement instanceof HTMLElement?document.activeElement:n.originImg??null,window.addEventListener(`keydown`,te),o.value?.focus()}),h(()=>{O(),window.removeEventListener(`keydown`,te),y?.focus()}),(t,n)=>(c(),P(ee,{to:`body`},[F(`div`,{ref:`overlay`,class:`media-lightbox`,role:`dialog`,"aria-modal":`true`,"aria-label":u.value,onMousedown:n[1]||=H(e=>r(`close`),[`self`])},[F(`button`,{ref:`close`,type:`button`,class:`media-lightbox-close`,"aria-label":`Close`,onClick:n[0]||=e=>r(`close`)},[v(X,{name:`close`,size:`sm`})],512),F(`div`,cTe,[F(`div`,{class:`media-lightbox-frame`,onWheel:A},[l.value?(c(),W(`img`,{key:0,ref:`image`,class:`media-lightbox-media`,src:e.src,alt:e.media.path??``,draggable:`false`,style:ae(_.value),onDblclick:j,onPointerdown:M,onPointermove:N,onPointerup:I,onPointercancel:I},null,44,lTe)):(c(),W(`video`,{key:1,class:`media-lightbox-media`,src:e.src,controls:``,autoplay:``},null,8,uTe))],32)]),e.media.path?(c(),W(`div`,dTe,U(e.media.path),1)):E(``,!0)],40,sTe)]))}}),[[`__scopeId`,`data-v-a5036dce`]]),pTe={class:`ui-panel-header__main`},mTe={class:`ui-panel-header__title`},hTe={key:0,class:`ui-panel-header__sub`},$7=Y(G({__name:`PanelHeader`,props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{default:`Close`},wrap:{type:Boolean}},emits:[`close`],setup(e){return(t,n)=>(c(),W(`div`,{class:V([`ui-panel-header`,{wrap:e.wrap}])},[F(`div`,pTe,[F(`span`,mTe,U(e.title),1),v(Sp,{text:e.subtitle},{default:B(()=>[e.subtitle?(c(),W(`span`,hTe,U(e.subtitle),1)):E(``,!0)]),_:1},8,[`text`]),me(t.$slots,`default`,{},void 0,!0)]),e.closable?(c(),P(Ca,{key:0,class:`ui-panel-header__close`,size:`sm`,label:e.closeLabel,onClick:n[0]||=e=>t.$emit(`close`)},{default:B(()=>[v(X,{name:`close`,size:`sm`})]),_:1},8,[`label`])):E(``,!0)],2))}}),[[`__scopeId`,`data-v-47211810`]]),gTe={key:0,class:`fp-empty fp-error`},_Te={key:1,class:`fp-empty`},vTe={key:2,class:`fp-loading`},yTe={class:`fp-path`},bTe={class:`fp-meta`},xTe={key:0,class:`fp-lines`},STe={class:`fp-size`},CTe={key:3,class:`fp-search`},wTe=[`placeholder`],TTe={key:0,class:`fp-search-count`},ETe={key:1,class:`fp-code`},DTe={class:`fp-line-table`},OTe=[`data-line`],kTe={class:`fp-gutter`},ATe=[`innerHTML`],jTe={key:1,class:`fp-body fp-code`},MTe={class:`fp-line-table`},NTe=[`data-line`],PTe={class:`fp-gutter`},FTe=[`innerHTML`],ITe={key:2,class:`fp-body`},LTe=[`srcdoc`,`title`],RTe={key:1,class:`fp-code`},zTe={class:`fp-line-table`},BTe=[`data-line`],VTe={class:`fp-gutter`},HTe=[`innerHTML`],UTe={key:3,class:`fp-body fp-pdf-wrap`},WTe=[`src`,`title`],GTe={key:1,class:`fp-binary-card`},KTe={class:`fp-binary-label`},qTe={key:4,class:`fp-body fp-table-wrap`},JTe={class:`fp-table`},YTe=[`data-line`],XTe={key:5,class:`fp-body fp-image-wrap`},ZTe=[`src`,`alt`],QTe={key:1,class:`fp-binary-card`},$Te={class:`fp-binary-icon`},eEe={class:`fp-binary-label`},tEe={key:6,class:`fp-body fp-image-wrap`},nEe=[`src`],rEe={key:1,class:`fp-binary-card`},iEe={class:`fp-binary-icon`},aEe={class:`fp-binary-label`},oEe={key:7,class:`fp-body fp-code`},sEe={class:`fp-line-table`},cEe=[`data-line`],lEe={class:`fp-gutter`},uEe=[`innerHTML`],dEe={key:8,class:`fp-body fp-binary-wrap`},fEe={class:`fp-binary-card`},pEe={class:`fp-binary-icon`},mEe={class:`fp-binary-label`},hEe=Y(G({__name:`FilePreview`,props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},stale:{type:Boolean},refreshing:{type:Boolean},editable:{type:Boolean},openFile:{type:Function}},emits:[`close`,`openExternal`,`reveal`,`openEditor`,`refresh`],setup(e,{emit:t}){let{t:r}=J();function i(e,t){let n=t?t.split(`/`).filter(Boolean):[];for(let t of e.split(`/`))t===``||t===`.`||(t===`..`?n.pop():n.push(t));return n.join(`/`)}let a=m(`resolveImage`,async e=>e),o=L(()=>{let e=h.file?.path??``,t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``});function u(e){if(/^(https?:|data:|blob:)/i.test(e)||e.startsWith(`/`))return e;let t=o.value;return t?i(e,t):e}async function f(e){let t=u(e);return a?a(t):t}d(`resolveImage`,f);function p(e){let t=e.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(t)||t.startsWith(`/`))return e;for(let e of[`#`,`?`]){let n=t.indexOf(e);n!==-1&&(t=t.slice(0,n))}let n=o.value;return{...e,path:i(t,n)}}let h=e,g=L(()=>{let e=h.file;return e!==null&&!e.isBinary}),y=t;function b(e){h.openFile?.(p(e))}let x=R(null),S=L(()=>{let e=h.file;if(!e)return`binary`;let t=e.mime??``,n=e.languageId??``,r=e.path.toLowerCase();return t===`text/markdown`||n===`markdown`||n===`md`||r.endsWith(`.mdx`)?`markdown`:t===`application/json`||n===`json`?`json`:t===`text/html`||n===`html`||r.endsWith(`.html`)||r.endsWith(`.htm`)?`html`:t===`application/pdf`||r.endsWith(`.pdf`)?`pdf`:t===`text/csv`||n===`csv`||r.endsWith(`.csv`)?`csv`:t.startsWith(`image/`)?`image`:t.startsWith(`video/`)?`video`:e.isBinary?`binary`:t.startsWith(`text/`)||n!==``?`text`:`binary`});function C(e){let t=atob(e),n=Uint8Array.from(t,e=>e.charCodeAt(0));return new TextDecoder().decode(n)}let w=L(()=>{let e=h.file;if(!e)return``;if(e.encoding===`base64`)try{return C(e.content)}catch{return e.content}return e.content}),T=L(()=>{if(S.value!==`json`||!h.file)return``;try{return JSON.stringify(JSON.parse(w.value),null,2)}catch{return w.value}}),D=L(()=>h.file?(S.value===`json`?T.value:w.value).split(` -`):[]),O=L(()=>h.file?S.value===`json`?T.value:w.value:``),k=R(``),A=R(0),j=L(()=>{let e=k.value.trim().toLowerCase();if(!e)return[];let t=[];return D.value.forEach((n,r)=>{n.toLowerCase().includes(e)&&t.push(r+1)}),t});s(k,()=>{A.value=0});function N(e,t=!1){e&&n(()=>{let n=x.value?.querySelector(`.fp-body`),r=n?.querySelector(`[data-line="${e}"]`);if(!n||!r)return;t&&(n.scrollTop=0);let i=n.getBoundingClientRect(),a=r.getBoundingClientRect();n.scrollTop=a.top-i.top+n.scrollTop-n.clientHeight/2+a.height/2})}s(()=>[h.file?.path,h.line],()=>N(h.line,!0),{immediate:!0});function ee(e){let t=j.value;t.length!==0&&(A.value=(A.value+e+t.length)%t.length,N(t[A.value]))}function I(e){let t=j.value;return{target:h.line===e,hit:t.includes(e),active:t[A.value]===e}}function te(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}let ne=R(!1),re=R(!1);function ie(){h.file&&Wi(O.value).then(e=>{e&&(ne.value=!0,setTimeout(()=>{ne.value=!1},1400))})}function oe(){h.file&&Wi(h.file.path).then(e=>{e&&(re.value=!0,setTimeout(()=>{re.value=!1},1400))})}let se=R(`preview`),ce=R(`preview`),le=R(`fit`);function ue(e){se.value=e}function fe(e){ce.value=e}function H(e){le.value=e}s(S,e=>{se.value=e===`html`?`preview`:`source`,ce.value=`preview`,le.value=`fit`});let G=L(()=>{let e=h.file;return!e||S.value!==`image`?null:e.sourceUrl?e.sourceUrl:e.encoding===`base64`?`data:${e.mime};base64,${e.content}`:e.mime===`image/svg+xml`?`data:${e.mime};charset=utf-8,${encodeURIComponent(e.content)}`:null}),pe=L(()=>{let e=h.file;return!e||S.value!==`video`?null:e.sourceUrl?e.sourceUrl:e.encoding===`base64`?`data:${e.mime};base64,${e.content}`:null}),me=L(()=>{let e=h.file;return!e||S.value!==`pdf`?null:h.downloadUrl?h.downloadUrl:e.encoding===`base64`?`data:${e.mime};base64,${e.content}`:null}),he=L(()=>h.file?[``,``,``,w.value].join(``):``);function ge(e){let t=[],n=``,r=!1;for(let i=0;iD.value.slice(0,200).map(ge));function ve(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`)}function ye(){let e=h.file;return e?e.languageId?.toLowerCase()||(e.path.split(`.`).pop()?.toLowerCase()??``):``}function be(e){let t=ye(),n=ve(e);return S.value===`json`||t===`json`||t===`jsonc`?(n=n.replace(/("[^&]*?")(\s*:)/g,`$1$2`),n=n.replace(/(:\s*)("[^&]*?")/g,`$1$2`),n=n.replace(/\b(true|false|null)\b/g,`$1`),n=n.replace(/(:\s*)(-?\d+(?:\.\d+)?)/g,`$1$2`),n):S.value===`html`||t===`html`||t===`xml`||t===`svg`?(n=n.replace(/\s([A-Za-z_:][-A-Za-z0-9_:.]*)(=)/g,` $1$2`),n=n.replace(/(".*?")/g,`$1`),n=n.replace(/(<\/?)([A-Za-z][\w:-]*)/g,`$1$2`),n):(n=n.replace(/\b(async|await|break|case|catch|class|const|continue|else|export|extends|finally|for|from|function|if|import|interface|let|new|return|switch|throw|try|type|while)\b/g,`$1`),n=n.replace(/(".*?"|'.*?')/g,`$1`),n=n.replace(/(\/\/.*)$/g,`$1`),n)}function xe(e,t=55){return!e||e.length<=t?e:`…`+e.slice(e.length-t+1)}return(t,n)=>(c(),W(`div`,{ref_key:`rootRef`,ref:x,class:`file-preview`},[e.error&&!e.loading?(c(),W(`div`,gTe,[F(`span`,null,U(e.error),1),e.closable?(c(),P(pD,{key:0,variant:`secondary`,size:`sm`,onClick:n[0]||=e=>y(`close`)},{default:B(()=>[K(U(z(r)(`filePreview.close`)),1)]),_:1})):E(``,!0)])):!e.file&&!e.loading?(c(),W(`div`,_Te,U(z(r)(`filePreview.empty`)),1)):e.loading?(c(),W(`div`,vTe,[n[9]||=F(`span`,{class:`spinner`},null,-1),F(`span`,null,U(z(r)(`filePreview.loading`)),1)])):e.file?(c(),W(M,{key:3},[v($7,{wrap:``,title:z(r)(`common.preview`),closable:e.closable,"close-label":z(r)(`filePreview.close`),class:V({"fp-refreshing":e.refreshing}),onClose:n[8]||=e=>y(`close`)},{default:B(()=>[v(Sp,{text:e.file.path},{default:B(()=>[F(`span`,yTe,U(xe(e.file.path)),1)]),_:1},8,[`text`]),F(`span`,bTe,[e.file.lineCount?(c(),W(`span`,xTe,U(z(r)(`filePreview.lineCount`,{count:e.file.lineCount})),1)):E(``,!0),F(`span`,STe,U(te(e.file.size)),1)]),v(pD,{variant:`secondary`,size:`sm`,class:`fp-refresh`,style:ae({visibility:e.stale?`visible`:`hidden`}),"aria-label":z(r)(`filePreview.refresh`),disabled:!e.stale||e.refreshing,onClick:n[1]||=e=>y(`refresh`)},{default:B(()=>[v(X,{name:`refresh`,size:`sm`}),K(` `+U(z(r)(`filePreview.refresh`)),1)]),_:1},8,[`style`,`aria-label`,`disabled`]),S.value===`html`?(c(),P(o6,{key:0,"model-value":se.value,size:`sm`,options:[{value:`preview`,label:z(r)(`filePreview.preview`)},{value:`source`,label:z(r)(`filePreview.source`)}],"onUpdate:modelValue":ue},null,8,[`model-value`,`options`])):E(``,!0),S.value===`markdown`?(c(),P(o6,{key:1,"model-value":ce.value,size:`sm`,options:[{value:`preview`,label:z(r)(`filePreview.preview`)},{value:`source`,label:z(r)(`filePreview.source`)}],"onUpdate:modelValue":fe},null,8,[`model-value`,`options`])):E(``,!0),S.value===`image`?(c(),P(o6,{key:2,"model-value":le.value,size:`sm`,options:[{value:`fit`,label:z(r)(`filePreview.fit`)},{value:`actual`,label:z(r)(`filePreview.actual`)}],"onUpdate:modelValue":H},null,8,[`model-value`,`options`])):E(``,!0),S.value===`text`||S.value===`json`||S.value===`html`||S.value===`csv`?(c(),W(`div`,CTe,[l(F(`input`,{"onUpdate:modelValue":n[2]||=e=>k.value=e,class:`fp-search-input`,type:`search`,placeholder:z(r)(`filePreview.search`)},null,8,wTe),[[de,k.value]]),k.value.trim()?(c(),W(`span`,TTe,U(j.value.length),1)):E(``,!0),v(Ca,{size:`sm`,disabled:j.value.length===0,label:z(r)(`filePreview.prevMatch`),onClick:n[3]||=e=>ee(-1)},{default:B(()=>[v(X,{name:`arrow-up`,size:`md`})]),_:1},8,[`disabled`,`label`]),v(Ca,{size:`sm`,disabled:j.value.length===0,label:z(r)(`filePreview.nextMatch`),onClick:n[4]||=e=>ee(1)},{default:B(()=>[v(X,{name:`arrow-down`,size:`md`})]),_:1},8,[`disabled`,`label`])])):E(``,!0),v(Ca,{size:`sm`,class:V({copied:re.value}),label:re.value?z(r)(`filePreview.copied`):z(r)(`filePreview.copyPath`),onClick:oe},{default:B(()=>[re.value?(c(),P(X,{key:1,class:`fp-check`,name:`check`,size:`md`})):(c(),P(X,{key:0,name:`link`,size:`md`}))]),_:1},8,[`class`,`label`]),e.editable&&g.value&&e.file!==null?(c(),P(Ca,{key:4,size:`sm`,label:z(r)(`editor.title`),onClick:n[5]||=t=>y(`openEditor`,e.file.path)},{default:B(()=>[v(X,{name:`pencil`,size:`md`})]),_:1},8,[`label`])):E(``,!0),e.externalActions?(c(),P(Ca,{key:5,size:`sm`,label:z(r)(`filePreview.openInEditor`),onClick:n[6]||=e=>y(`openExternal`)},{default:B(()=>[v(X,{name:`external-link`,size:`md`})]),_:1},8,[`label`])):E(``,!0),e.externalActions?(c(),P(Ca,{key:6,size:`sm`,label:z(r)(`filePreview.reveal`),onClick:n[7]||=e=>y(`reveal`)},{default:B(()=>[v(X,{name:`folder`,size:`md`})]),_:1},8,[`label`])):E(``,!0),!e.file.isBinary&&S.value!==`image`?(c(),P(Ca,{key:7,size:`sm`,class:V({copied:ne.value}),label:ne.value?z(r)(`filePreview.copied`):z(r)(`filePreview.copy`),onClick:ie},{default:B(()=>[ne.value?(c(),P(X,{key:1,class:`fp-check`,name:`check`,size:`md`})):(c(),P(X,{key:0,name:`copy`,size:`md`}))]),_:1},8,[`class`,`label`])):E(``,!0)]),_:1},8,[`title`,`closable`,`close-label`,`class`]),S.value===`markdown`?(c(),W(`div`,{key:0,class:V([`fp-body`,{"fp-markdown":ce.value===`preview`}])},[ce.value===`preview`?(c(),P(w4,{key:0,text:w.value,"open-file":h.openFile?b:void 0},null,8,[`text`,`open-file`])):(c(),W(`div`,ETe,[F(`div`,DTe,[(c(!0),W(M,null,_(D.value,(e,t)=>(c(),W(`div`,{key:t,class:V([`fp-line-row`,I(t+1)]),"data-line":t+1},[F(`span`,kTe,U(t+1),1),F(`span`,{class:`fp-line-text`,innerHTML:be(e)},null,8,ATe)],10,OTe))),128))])]))],2)):S.value===`json`?(c(),W(`div`,jTe,[F(`div`,MTe,[(c(!0),W(M,null,_(D.value,(e,t)=>(c(),W(`div`,{key:t,class:V([`fp-line-row`,I(t+1)]),"data-line":t+1},[F(`span`,PTe,U(t+1),1),F(`span`,{class:`fp-line-text`,innerHTML:be(e)},null,8,FTe)],10,NTe))),128))])])):S.value===`html`?(c(),W(`div`,ITe,[se.value===`preview`?(c(),W(`iframe`,{key:0,class:`fp-html-frame`,sandbox:``,srcdoc:he.value,title:e.file.path},null,8,LTe)):(c(),W(`div`,RTe,[F(`div`,zTe,[(c(!0),W(M,null,_(D.value,(e,t)=>(c(),W(`div`,{key:t,class:V([`fp-line-row`,I(t+1)]),"data-line":t+1},[F(`span`,VTe,U(t+1),1),F(`span`,{class:`fp-line-text`,innerHTML:be(e)},null,8,HTe)],10,BTe))),128))])]))])):S.value===`pdf`?(c(),W(`div`,UTe,[me.value?(c(),W(`iframe`,{key:0,class:`fp-pdf-frame`,src:me.value,title:e.file.path},null,8,WTe)):(c(),W(`div`,GTe,[F(`span`,KTe,U(z(r)(`filePreview.pdfNoPreview`)),1)]))])):S.value===`csv`?(c(),W(`div`,qTe,[F(`table`,JTe,[F(`tbody`,null,[(c(!0),W(M,null,_(_e.value,(e,t)=>(c(),W(`tr`,{key:t,class:V(I(t+1)),"data-line":t+1},[F(`th`,null,U(t+1),1),(c(!0),W(M,null,_(e,(e,t)=>(c(),W(`td`,{key:t},U(e),1))),128))],10,YTe))),128))])])])):S.value===`image`?(c(),W(`div`,XTe,[G.value?(c(),W(`img`,{key:0,src:G.value,alt:e.file.path,class:V([`fp-image`,{actual:le.value===`actual`}])},null,10,ZTe)):(c(),W(`div`,QTe,[F(`span`,$Te,[v(X,{name:`image-off`,size:`lg`})]),F(`span`,eEe,U(z(r)(`filePreview.imageNoPreview`,{mime:e.file.mime,size:te(e.file.size)})),1)]))])):S.value===`video`?(c(),W(`div`,tEe,[pe.value?(c(),W(`video`,{key:0,src:pe.value,class:`fp-image`,controls:``,playsinline:``,preload:`metadata`},null,8,nEe)):(c(),W(`div`,rEe,[F(`span`,iEe,[v(X,{name:`image-off`,size:`lg`})]),F(`span`,aEe,U(z(r)(`filePreview.videoNoPreview`,{mime:e.file.mime,size:te(e.file.size)})),1)]))])):S.value===`text`?(c(),W(`div`,oEe,[F(`div`,sEe,[(c(!0),W(M,null,_(D.value,(e,t)=>(c(),W(`div`,{key:t,class:V([`fp-line-row`,I(t+1)]),"data-line":t+1},[F(`span`,lEe,U(t+1),1),F(`span`,{class:`fp-line-text`,innerHTML:be(e)},null,8,uEe)],10,cEe))),128))])])):(c(),W(`div`,dEe,[F(`div`,fEe,[F(`span`,pEe,[v(X,{name:`file-off`,size:`lg`})]),F(`span`,mEe,U(z(r)(`filePreview.binaryNoPreview`,{mime:e.file.mime||z(r)(`filePreview.unknownType`),size:te(e.file.size)})),1)])]))],64)):E(``,!0)],512))}}),[[`__scopeId`,`data-v-92a41c83`]]),gEe={class:`ui-banner__icon`,"aria-hidden":`true`},_Ee={class:`ui-banner__text`},e9=Y(G({__name:`Banner`,props:{variant:{default:`info`}},setup(e){return(t,n)=>(c(),W(`div`,{class:V([`ui-banner`,`ui-banner--${e.variant}`]),role:`status`},[F(`span`,gEe,[me(t.$slots,`icon`,{},()=>[e.variant===`info`?(c(),P(X,{key:0,name:`info`,size:`md`})):(c(),P(X,{key:1,name:`alert-triangle`,size:`md`}))],!0)]),F(`span`,_Ee,[me(t.$slots,`default`,{},void 0,!0)])],2))}}),[[`__scopeId`,`data-v-566a0ac8`]]),t9=fC.global.t,vEe=40928,yEe=10485760,n9=N({open:!1,path:null,loading:!1,saving:!1,loadError:null,savingError:null,conflict:!1,dirty:!1,savedAt:null,languageId:void 0}),r9=null,i9=0,a9=null,o9={getContent:null};function s9(e){o9.getContent=e}function bEe(){return n9}function xEe(){i9+=1,n9.path=null,n9.loading=!1,n9.saving=!1,n9.loadError=null,n9.savingError=null,n9.conflict=!1,n9.dirty=!1,n9.savedAt=null,n9.languageId=void 0,r9=null,a9=null}async function c9(e){let t=EEe();if(!t){i9+=1,n9.open=!0,n9.path=e.path,n9.loading=!1,n9.loadError=t9(`editor.readOnlyWhileMissingSession`),n9.savingError=null,n9.conflict=!1,n9.dirty=!1,n9.savedAt=null,n9.languageId=void 0,n9.saving=!1,r9=null,a9=null;return}let n=++i9;n9.open=!0,n9.path=e.path,n9.loading=!0,n9.saving=!1,n9.loadError=null,n9.savingError=null,n9.conflict=!1,n9.dirty=!1,n9.savedAt=null,n9.languageId=void 0,r9=null,a9=t;try{let r=await Q().readFile(t,{path:e.path,length:yEe,encoding:`utf-8`});if(n!==i9)return;if(r.isBinary||r.encoding!==`utf-8`){n9.loadError=t9(`editor.binaryNotEditable`);return}r9=r.etag,n9.languageId=r.languageId,l9=r.content,u9=e.line,d9+=1}catch(e){if(n!==i9)return;r9=null,n9.loadError=e instanceof Error&&e.message.length>0?e.message:t9(`editor.loadFailed`)}finally{n===i9&&(n9.loading=!1)}}var l9,u9,d9=0;function SEe(){if(l9===void 0)return null;let e={content:l9,line:u9,revision:d9};return l9=void 0,u9=void 0,e}function CEe(){n9.dirty||(n9.dirty=!0,n9.savedAt=null),n9.savingError!==null&&(n9.savingError=null)}function f9(){xEe(),n9.open=!1}async function wEe(){n9.path!==null&&await c9({path:n9.path})}async function p9(e){let t=a9,n=n9.path;if(!t||!n||n9.saving||n9.loading||n9.conflict)return;let r=o9.getContent;if(!r)return;let i=++i9;n9.saving=!0,n9.savingError=null;try{let a=await Q().writeFile(t,{path:n,content:r(),...e?.force===!0||r9===null?{}:{baseEtag:r9}});if(i!==i9)return;r9=a.etag,n9.dirty=!1,n9.conflict=!1,n9.savedAt=Date.now()}catch(e){if(i!==i9)return;if(gT(e)&&e.code===vEe){n9.conflict=!0;return}n9.savingError=e instanceof Error&&e.message.length>0?e.message:t9(`editor.loadFailed`)}finally{n9.saving=!1}}async function TEe(){n9.conflict=!1,await p9({force:!0})}function EEe(){return m9?.()??null}var m9=null;function DEe(e){m9=e}var h9=`pythinker-light`,g9=`pythinker-dark`;function OEe(e,t){let n=e.trim();if(/^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(n))return n;if(/^#[0-9a-f]{3,4}$/i.test(n))return`#${Array.from(n.slice(1),e=>e+e).join(``)}`;let r=/^rgba?\(([^)]*)\)$/i.exec(n);if(r===null)return t;let i=r[1].split(/[\s,/]+/).filter(e=>e.length>0);if(i.length<3||i.length>4)return t;let a=i.slice(0,3).map(e=>_9(e,255)),o=i.length===4?_9(i[3],1):255;return a.some(e=>e===null)||o===null?t:`#${[...a,o===255?null:o].filter(e=>e!==null).map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function _9(e,t){let n=e.endsWith(`%`),r=Number(n?e.slice(0,-1):e);if(!Number.isFinite(r))return null;let i=n?r/100:r/t;return Math.max(0,Math.min(255,Math.round(i*255)))}function v9(e,t){let n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return OEe(n.length>0?n:t,t)}function kEe(){return{bg:v9(`--p-bg`,`#ffffff`),surface:v9(`--color-surface`,`#fafbfc`),text:v9(`--color-text`,`#14171c`),textMuted:v9(`--color-text-muted`,`#6b7280`),line:v9(`--color-line`,`#e7eaee`),accent:v9(`--color-accent`,`#1783ff`),accentSoft:v9(`--p-accent-soft`,`#1783ff24`),selection:v9(`--p-selection`,`#1783ff2e`),danger:v9(`--color-danger`,`#c0392b`),warning:v9(`--color-warning`,`#a9610a`),success:v9(`--color-success`,`#0e7a38`)}}function y9(e){return e.slice(1,7)}function AEe(e,t){let n=kEe();e.editor.defineTheme(t?g9:h9,{base:t?`vs-dark`:`vs`,inherit:!0,rules:[{token:`comment`,foreground:y9(n.textMuted),fontStyle:`italic`},{token:`string`,foreground:y9(n.success)},{token:`keyword`,foreground:y9(n.accent)},{token:`number`,foreground:y9(n.warning)},{token:`type`,foreground:y9(n.accent)}],colors:{"editor.background":n.bg,"editor.foreground":n.text,"editorLineNumber.foreground":n.textMuted,"editorLineNumber.activeForeground":n.text,"editor.selectionBackground":n.selection,"editor.lineHighlightBackground":n.surface,"editorCursor.foreground":n.accent,"editorIndentGuide.background1":n.line,"editorIndentGuide.activeBackground1":n.textMuted,"editorWidget.background":n.surface,"editorWidget.border":n.line,"editorError.foreground":n.danger,"editorWarning.foreground":n.warning,"scrollbarSlider.background":n.accentSoft,"scrollbarSlider.hoverBackground":n.accentSoft,"scrollbarSlider.activeBackground":n.accent}})}function b9(e,t){AEe(e,t),e.editor.setTheme(t?g9:h9)}var x9=Da(),S9=null;function jEe(){return S9??=he(()=>import(`./editor.main-cSwqhoaG.js`).then(e=>{b9(e,x9.value),s(x9,()=>b9(e,x9.value))}),__vite__mapDeps([41,2,7,42,12,43,44,45])),S9}function MEe(){return x9.value?g9:h9}function NEe(){return jEe()}var PEe={class:`monaco-pane`},FEe={key:0,class:`monaco-pane__boot`},IEe=Y(G({__name:`MonacoPane`,props:{path:{},languageId:{}},setup(e){let t=R(null),n=R(!0),r=null,i=null,a=null,o=null;function l(){window.MonacoEnvironment===void 0&&he(()=>import(`./editor.worker-Cs8mLnor.js`).then(e=>{window.MonacoEnvironment={getWorker:()=>new e.default}}),[])}function u(e){if(e!==void 0&&new Set([`typescript`,`javascript`,`json`,`css`,`html`,`markdown`,`python`,`rust`,`go`,`yaml`]).has(e))return e;if(e===`typescriptreact`||e===`javascriptreact`)return e.replace(`react`,``);if(e===`shellscript`)return`shell`}async function d(){if(r===null||i===null)return;let e=SEe(),t=f.path;if(t===null)return;let n=r.Uri.parse(`pythinker://session/${encodeURIComponent(t)}`),s=r.editor.getModel(n);if(o?.dispose(),o=null,a!==null&&a!==s&&a.dispose(),s===null)a=r.editor.createModel(e?.content??``,u(f.languageId),n);else{a=s,e!==null&&a.setValue(e.content);let t=u(f.languageId);t!==void 0&&r.editor.setModelLanguage(a,t)}o=a.onDidChangeContent(()=>CEe()),i.setModel(a),s9(()=>a?.getValue()??``),e?.line!==void 0&&e.line>0&&(i.revealLineInCenter(e.line),i.setPosition({lineNumber:e.line,column:1}))}p(async()=>{l(),await NEe(),t.value!==null&&(r=await he(()=>import(`./editor.main-cSwqhoaG.js`),__vite__mapDeps([41,2,7,42,12,43,44,45])),t.value!==null&&(i=r.editor.create(t.value,{model:null,theme:MEe(),automaticLayout:!0,fontSize:12.5,fontFamily:`"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace`,minimap:{enabled:!1},scrollBeyondLastLine:!1,renderLineHighlight:`line`,padding:{top:8}}),n.value=!1,await d()))}),h(()=>{s9(null),o?.dispose(),a?.dispose(),i?.dispose(),a=null,o=null,i=null,r=null});let f=e;return s(()=>[f.path,f.languageId],async()=>{i!==null&&await d()}),(e,r)=>(c(),W(`div`,PEe,[n.value?(c(),W(`div`,FEe,[v(op,{size:`sm`})])):E(``,!0),F(`div`,{ref_key:`rootRef`,ref:t,class:`monaco-pane__host`},null,512)]))}}),[[`__scopeId`,`data-v-cb5f64f3`]]),LEe={class:`editor-panel`},REe={class:`ed-path`},zEe={key:1,class:`ed-saved`},BEe={key:1,class:`ed-saving`},VEe={key:0,class:`editor-panel__empty`},HEe={class:`editor-panel__conflict-actions`},UEe={key:1,class:`editor-panel__save-error`},WEe=Y(G({__name:`EditorPanel`,emits:[`close`],setup(e,{emit:t}){let{t:n}=J(),r=bEe(),i=t;function a(){f9(),i(`close`)}function o(e){let t=e.split(`/`).at(-1)??e;return t.length>0?t:e}let l=L(()=>r.savedAt===null||r.dirty?!1:Date.now()-r.savedAt<2e3);function u(e){(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),p9())}return window.addEventListener(`keydown`,u),h(()=>window.removeEventListener(`keydown`,u)),s(()=>r.open,e=>{e||i(`close`)}),(e,t)=>(c(),W(`div`,LEe,[v($7,{wrap:``,title:z(n)(`editor.title`),closable:``,"close-label":z(n)(`editor.closeEditor`),onClose:a},{default:B(()=>[z(r).path===null?E(``,!0):(c(),W(M,{key:0},[v(Sp,{text:z(r).path},{default:B(()=>[F(`span`,REe,U(o(z(r).path)),1)]),_:1},8,[`text`]),z(r).dirty?(c(),P(Sp,{key:0,text:z(n)(`editor.unsavedDot`)},{default:B(()=>[...t[3]||=[F(`span`,{class:`ed-dirty`},null,-1)]]),_:1},8,[`text`])):E(``,!0),l.value?(c(),W(`span`,zEe,U(z(n)(`editor.saved`)),1)):E(``,!0)],64)),z(r).path!==null&&z(r).loadError===null?(c(),W(M,{key:1},[z(r).conflict?E(``,!0):(c(),P(Ca,{key:0,size:`sm`,label:z(n)(`editor.save`),disabled:!z(r).dirty||z(r).saving,onClick:t[0]||=e=>z(p9)()},{default:B(()=>[v(X,{name:`check`,size:`sm`})]),_:1},8,[`label`,`disabled`])),z(r).saving?(c(),W(`span`,BEe,[v(op,{size:`sm`})])):E(``,!0)],64)):E(``,!0)]),_:1},8,[`title`,`close-label`]),z(r).loadError===null?(c(),W(M,{key:1},[z(r).conflict?(c(),P(e9,{key:0,variant:`warning`,class:`editor-panel__conflict`},{default:B(()=>[F(`span`,null,U(z(n)(`editor.conflictText`)),1),F(`span`,HEe,[v(pD,{variant:`secondary`,size:`sm`,onClick:t[1]||=e=>z(wEe)()},{default:B(()=>[K(U(z(n)(`editor.conflictReload`)),1)]),_:1}),v(pD,{variant:`danger`,size:`sm`,disabled:z(r).saving,onClick:t[2]||=e=>z(TEe)()},{default:B(()=>[K(U(z(n)(`editor.conflictOverwrite`)),1)]),_:1},8,[`disabled`])])]),_:1})):E(``,!0),z(r).savingError===null?E(``,!0):(c(),W(`p`,UEe,U(z(r).savingError),1)),z(r).path===null?E(``,!0):(c(),P(IEe,{key:2,path:z(r).path,"language-id":z(r).languageId},null,8,[`path`,`language-id`]))],64)):(c(),W(`div`,VEe,[v(gE,null,{default:B(()=>[F(`span`,null,U(z(r).loadError),1),v(pD,{variant:`secondary`,size:`sm`,onClick:a},{default:B(()=>[K(U(z(n)(`filePreview.close`)),1)]),_:1})]),_:1})]))]))}}),[[`__scopeId`,`data-v-579cb4a1`]]),GEe={class:`tp`},KEe=Y(G({__name:`ThinkingPanel`,props:{text:{},subtitle:{}},emits:[`close`],setup(e,{emit:t}){let r=e,i=t,{t:a}=J(),o=R(null);return s(()=>r.text,()=>{let e=o.value;e&&e.scrollHeight-e.scrollTop-e.clientHeight<24&&n(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})},{immediate:!0}),(t,n)=>(c(),W(`div`,GEe,[v($7,{title:z(a)(`common.preview`),subtitle:e.subtitle??z(a)(`thinking.panelTitle`),"close-label":z(a)(`thinking.close`),onClose:n[0]||=e=>i(`close`)},null,8,[`title`,`subtitle`,`close-label`]),F(`pre`,{ref_key:`bodyEl`,ref:o,class:`tp-body`},U(e.text),513)]))}}),[[`__scopeId`,`data-v-e1ad626c`]]),qEe={class:`agent-panel`},JEe={key:0,class:`agent-meta`},YEe={class:`agent-meta-text`},XEe={key:1,class:`agent-prompt`},ZEe={class:`agent-prompt-bubble`},QEe=[`aria-expanded`],$Ee={class:`agent-transcript-inner`},eDe={key:0,class:`agent-fallback`},tDe={key:0,class:`agent-error`},nDe={key:1,class:`fallback-lines`},rDe=Y(G({__name:`AgentDetailPanel`,props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:[`close`,`loadOlderMessages`,`openAgent`,`openFile`,`openMedia`,`openTurnDiff`],setup(e,{emit:t}){let r=e,i=t,{t:a}=J(),o=i6(),l=L(()=>o.value?`lg`:`sm`),u=R(null),f=R(null),p=R(!0),g=R(!1),_=null,y=0,b=L(()=>{let e=new Set,t=[],n=r.member.prompt?.trim(),i=n?`$ ${n}`:void 0;for(let n of[r.member.prompt,r.member.suspendedReason,r.member.text,r.member.outputLines?.join(` +`):[]),O=L(()=>h.file?S.value===`json`?T.value:w.value:``),k=R(``),A=R(0),j=L(()=>{let e=k.value.trim().toLowerCase();if(!e)return[];let t=[];return D.value.forEach((n,r)=>{n.toLowerCase().includes(e)&&t.push(r+1)}),t});s(k,()=>{A.value=0});function N(e,t=!1){e&&n(()=>{let n=x.value?.querySelector(`.fp-body`),r=n?.querySelector(`[data-line="${e}"]`);if(!n||!r)return;t&&(n.scrollTop=0);let i=n.getBoundingClientRect(),a=r.getBoundingClientRect();n.scrollTop=a.top-i.top+n.scrollTop-n.clientHeight/2+a.height/2})}s(()=>[h.file?.path,h.line],()=>N(h.line,!0),{immediate:!0});function ee(e){let t=j.value;t.length!==0&&(A.value=(A.value+e+t.length)%t.length,N(t[A.value]))}function I(e){let t=j.value;return{target:h.line===e,hit:t.includes(e),active:t[A.value]===e}}function te(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}let ne=R(!1),re=R(!1);function ie(){h.file&&Wi(O.value).then(e=>{e&&(ne.value=!0,setTimeout(()=>{ne.value=!1},1400))})}function oe(){h.file&&Wi(h.file.path).then(e=>{e&&(re.value=!0,setTimeout(()=>{re.value=!1},1400))})}let se=R(`preview`),ce=R(`preview`),le=R(`fit`);function ue(e){se.value=e}function fe(e){ce.value=e}function H(e){le.value=e}s(S,e=>{se.value=e===`html`?`preview`:`source`,ce.value=`preview`,le.value=`fit`});let G=L(()=>{let e=h.file;return!e||S.value!==`image`?null:e.sourceUrl?e.sourceUrl:e.encoding===`base64`?`data:${e.mime};base64,${e.content}`:e.mime===`image/svg+xml`?`data:${e.mime};charset=utf-8,${encodeURIComponent(e.content)}`:null}),pe=L(()=>{let e=h.file;return!e||S.value!==`video`?null:e.sourceUrl?e.sourceUrl:e.encoding===`base64`?`data:${e.mime};base64,${e.content}`:null}),me=L(()=>{let e=h.file;return!e||S.value!==`pdf`?null:h.downloadUrl?h.downloadUrl:e.encoding===`base64`?`data:${e.mime};base64,${e.content}`:null}),he=L(()=>h.file?[``,``,``,w.value].join(``):``);function ge(e){let t=[],n=``,r=!1;for(let i=0;iD.value.slice(0,200).map(ge));function ve(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`)}function ye(){let e=h.file;return e?e.languageId?.toLowerCase()||(e.path.split(`.`).pop()?.toLowerCase()??``):``}function be(e){let t=ye(),n=ve(e);return S.value===`json`||t===`json`||t===`jsonc`?(n=n.replace(/("[^&]*?")(\s*:)/g,`$1$2`),n=n.replace(/(:\s*)("[^&]*?")/g,`$1$2`),n=n.replace(/\b(true|false|null)\b/g,`$1`),n=n.replace(/(:\s*)(-?\d+(?:\.\d+)?)/g,`$1$2`),n):S.value===`html`||t===`html`||t===`xml`||t===`svg`?(n=n.replace(/\s([A-Za-z_:][-A-Za-z0-9_:.]*)(=)/g,` $1$2`),n=n.replace(/(".*?")/g,`$1`),n=n.replace(/(<\/?)([A-Za-z][\w:-]*)/g,`$1$2`),n):(n=n.replace(/\b(async|await|break|case|catch|class|const|continue|else|export|extends|finally|for|from|function|if|import|interface|let|new|return|switch|throw|try|type|while)\b/g,`$1`),n=n.replace(/(".*?"|'.*?')/g,`$1`),n=n.replace(/(\/\/.*)$/g,`$1`),n)}function xe(e,t=55){return!e||e.length<=t?e:`…`+e.slice(e.length-t+1)}return(t,n)=>(c(),W(`div`,{ref_key:`rootRef`,ref:x,class:`file-preview`},[e.error&&!e.loading?(c(),W(`div`,gTe,[F(`span`,null,U(e.error),1),e.closable?(c(),P(pD,{key:0,variant:`secondary`,size:`sm`,onClick:n[0]||=e=>y(`close`)},{default:B(()=>[K(U(z(r)(`filePreview.close`)),1)]),_:1})):E(``,!0)])):!e.file&&!e.loading?(c(),W(`div`,_Te,U(z(r)(`filePreview.empty`)),1)):e.loading?(c(),W(`div`,vTe,[n[9]||=F(`span`,{class:`spinner`},null,-1),F(`span`,null,U(z(r)(`filePreview.loading`)),1)])):e.file?(c(),W(M,{key:3},[v($7,{wrap:``,title:z(r)(`common.preview`),closable:e.closable,"close-label":z(r)(`filePreview.close`),class:V({"fp-refreshing":e.refreshing}),onClose:n[8]||=e=>y(`close`)},{default:B(()=>[v(Sp,{text:e.file.path},{default:B(()=>[F(`span`,yTe,U(xe(e.file.path)),1)]),_:1},8,[`text`]),F(`span`,bTe,[e.file.lineCount?(c(),W(`span`,xTe,U(z(r)(`filePreview.lineCount`,{count:e.file.lineCount})),1)):E(``,!0),F(`span`,STe,U(te(e.file.size)),1)]),v(pD,{variant:`secondary`,size:`sm`,class:`fp-refresh`,style:ae({visibility:e.stale?`visible`:`hidden`}),"aria-label":z(r)(`filePreview.refresh`),disabled:!e.stale||e.refreshing,onClick:n[1]||=e=>y(`refresh`)},{default:B(()=>[v(X,{name:`refresh`,size:`sm`}),K(` `+U(z(r)(`filePreview.refresh`)),1)]),_:1},8,[`style`,`aria-label`,`disabled`]),S.value===`html`?(c(),P(o6,{key:0,"model-value":se.value,size:`sm`,options:[{value:`preview`,label:z(r)(`filePreview.preview`)},{value:`source`,label:z(r)(`filePreview.source`)}],"onUpdate:modelValue":ue},null,8,[`model-value`,`options`])):E(``,!0),S.value===`markdown`?(c(),P(o6,{key:1,"model-value":ce.value,size:`sm`,options:[{value:`preview`,label:z(r)(`filePreview.preview`)},{value:`source`,label:z(r)(`filePreview.source`)}],"onUpdate:modelValue":fe},null,8,[`model-value`,`options`])):E(``,!0),S.value===`image`?(c(),P(o6,{key:2,"model-value":le.value,size:`sm`,options:[{value:`fit`,label:z(r)(`filePreview.fit`)},{value:`actual`,label:z(r)(`filePreview.actual`)}],"onUpdate:modelValue":H},null,8,[`model-value`,`options`])):E(``,!0),S.value===`text`||S.value===`json`||S.value===`html`||S.value===`csv`?(c(),W(`div`,CTe,[l(F(`input`,{"onUpdate:modelValue":n[2]||=e=>k.value=e,class:`fp-search-input`,type:`search`,placeholder:z(r)(`filePreview.search`)},null,8,wTe),[[de,k.value]]),k.value.trim()?(c(),W(`span`,TTe,U(j.value.length),1)):E(``,!0),v(Ca,{size:`sm`,disabled:j.value.length===0,label:z(r)(`filePreview.prevMatch`),onClick:n[3]||=e=>ee(-1)},{default:B(()=>[v(X,{name:`arrow-up`,size:`md`})]),_:1},8,[`disabled`,`label`]),v(Ca,{size:`sm`,disabled:j.value.length===0,label:z(r)(`filePreview.nextMatch`),onClick:n[4]||=e=>ee(1)},{default:B(()=>[v(X,{name:`arrow-down`,size:`md`})]),_:1},8,[`disabled`,`label`])])):E(``,!0),v(Ca,{size:`sm`,class:V({copied:re.value}),label:re.value?z(r)(`filePreview.copied`):z(r)(`filePreview.copyPath`),onClick:oe},{default:B(()=>[re.value?(c(),P(X,{key:1,class:`fp-check`,name:`check`,size:`md`})):(c(),P(X,{key:0,name:`link`,size:`md`}))]),_:1},8,[`class`,`label`]),e.editable&&g.value&&e.file!==null?(c(),P(Ca,{key:4,size:`sm`,label:z(r)(`editor.title`),onClick:n[5]||=t=>y(`openEditor`,e.file.path)},{default:B(()=>[v(X,{name:`pencil`,size:`md`})]),_:1},8,[`label`])):E(``,!0),e.externalActions?(c(),P(Ca,{key:5,size:`sm`,label:z(r)(`filePreview.openInEditor`),onClick:n[6]||=e=>y(`openExternal`)},{default:B(()=>[v(X,{name:`external-link`,size:`md`})]),_:1},8,[`label`])):E(``,!0),e.externalActions?(c(),P(Ca,{key:6,size:`sm`,label:z(r)(`filePreview.reveal`),onClick:n[7]||=e=>y(`reveal`)},{default:B(()=>[v(X,{name:`folder`,size:`md`})]),_:1},8,[`label`])):E(``,!0),!e.file.isBinary&&S.value!==`image`?(c(),P(Ca,{key:7,size:`sm`,class:V({copied:ne.value}),label:ne.value?z(r)(`filePreview.copied`):z(r)(`filePreview.copy`),onClick:ie},{default:B(()=>[ne.value?(c(),P(X,{key:1,class:`fp-check`,name:`check`,size:`md`})):(c(),P(X,{key:0,name:`copy`,size:`md`}))]),_:1},8,[`class`,`label`])):E(``,!0)]),_:1},8,[`title`,`closable`,`close-label`,`class`]),S.value===`markdown`?(c(),W(`div`,{key:0,class:V([`fp-body`,{"fp-markdown":ce.value===`preview`}])},[ce.value===`preview`?(c(),P(w4,{key:0,text:w.value,"open-file":h.openFile?b:void 0},null,8,[`text`,`open-file`])):(c(),W(`div`,ETe,[F(`div`,DTe,[(c(!0),W(M,null,_(D.value,(e,t)=>(c(),W(`div`,{key:t,class:V([`fp-line-row`,I(t+1)]),"data-line":t+1},[F(`span`,kTe,U(t+1),1),F(`span`,{class:`fp-line-text`,innerHTML:be(e)},null,8,ATe)],10,OTe))),128))])]))],2)):S.value===`json`?(c(),W(`div`,jTe,[F(`div`,MTe,[(c(!0),W(M,null,_(D.value,(e,t)=>(c(),W(`div`,{key:t,class:V([`fp-line-row`,I(t+1)]),"data-line":t+1},[F(`span`,PTe,U(t+1),1),F(`span`,{class:`fp-line-text`,innerHTML:be(e)},null,8,FTe)],10,NTe))),128))])])):S.value===`html`?(c(),W(`div`,ITe,[se.value===`preview`?(c(),W(`iframe`,{key:0,class:`fp-html-frame`,sandbox:``,srcdoc:he.value,title:e.file.path},null,8,LTe)):(c(),W(`div`,RTe,[F(`div`,zTe,[(c(!0),W(M,null,_(D.value,(e,t)=>(c(),W(`div`,{key:t,class:V([`fp-line-row`,I(t+1)]),"data-line":t+1},[F(`span`,VTe,U(t+1),1),F(`span`,{class:`fp-line-text`,innerHTML:be(e)},null,8,HTe)],10,BTe))),128))])]))])):S.value===`pdf`?(c(),W(`div`,UTe,[me.value?(c(),W(`iframe`,{key:0,class:`fp-pdf-frame`,src:me.value,title:e.file.path},null,8,WTe)):(c(),W(`div`,GTe,[F(`span`,KTe,U(z(r)(`filePreview.pdfNoPreview`)),1)]))])):S.value===`csv`?(c(),W(`div`,qTe,[F(`table`,JTe,[F(`tbody`,null,[(c(!0),W(M,null,_(_e.value,(e,t)=>(c(),W(`tr`,{key:t,class:V(I(t+1)),"data-line":t+1},[F(`th`,null,U(t+1),1),(c(!0),W(M,null,_(e,(e,t)=>(c(),W(`td`,{key:t},U(e),1))),128))],10,YTe))),128))])])])):S.value===`image`?(c(),W(`div`,XTe,[G.value?(c(),W(`img`,{key:0,src:G.value,alt:e.file.path,class:V([`fp-image`,{actual:le.value===`actual`}])},null,10,ZTe)):(c(),W(`div`,QTe,[F(`span`,$Te,[v(X,{name:`image-off`,size:`lg`})]),F(`span`,eEe,U(z(r)(`filePreview.imageNoPreview`,{mime:e.file.mime,size:te(e.file.size)})),1)]))])):S.value===`video`?(c(),W(`div`,tEe,[pe.value?(c(),W(`video`,{key:0,src:pe.value,class:`fp-image`,controls:``,playsinline:``,preload:`metadata`},null,8,nEe)):(c(),W(`div`,rEe,[F(`span`,iEe,[v(X,{name:`image-off`,size:`lg`})]),F(`span`,aEe,U(z(r)(`filePreview.videoNoPreview`,{mime:e.file.mime,size:te(e.file.size)})),1)]))])):S.value===`text`?(c(),W(`div`,oEe,[F(`div`,sEe,[(c(!0),W(M,null,_(D.value,(e,t)=>(c(),W(`div`,{key:t,class:V([`fp-line-row`,I(t+1)]),"data-line":t+1},[F(`span`,lEe,U(t+1),1),F(`span`,{class:`fp-line-text`,innerHTML:be(e)},null,8,uEe)],10,cEe))),128))])])):(c(),W(`div`,dEe,[F(`div`,fEe,[F(`span`,pEe,[v(X,{name:`file-off`,size:`lg`})]),F(`span`,mEe,U(z(r)(`filePreview.binaryNoPreview`,{mime:e.file.mime||z(r)(`filePreview.unknownType`),size:te(e.file.size)})),1)])]))],64)):E(``,!0)],512))}}),[[`__scopeId`,`data-v-92a41c83`]]),gEe={class:`ui-banner__icon`,"aria-hidden":`true`},_Ee={class:`ui-banner__text`},e9=Y(G({__name:`Banner`,props:{variant:{default:`info`}},setup(e){return(t,n)=>(c(),W(`div`,{class:V([`ui-banner`,`ui-banner--${e.variant}`]),role:`status`},[F(`span`,gEe,[me(t.$slots,`icon`,{},()=>[e.variant===`info`?(c(),P(X,{key:0,name:`info`,size:`md`})):(c(),P(X,{key:1,name:`alert-triangle`,size:`md`}))],!0)]),F(`span`,_Ee,[me(t.$slots,`default`,{},void 0,!0)])],2))}}),[[`__scopeId`,`data-v-566a0ac8`]]),t9=fC.global.t,vEe=40928,yEe=10485760,n9=N({open:!1,path:null,loading:!1,saving:!1,loadError:null,savingError:null,conflict:!1,dirty:!1,savedAt:null,languageId:void 0}),r9=null,i9=0,a9=null,o9={getContent:null};function s9(e){o9.getContent=e}function bEe(){return n9}function xEe(){i9+=1,n9.path=null,n9.loading=!1,n9.saving=!1,n9.loadError=null,n9.savingError=null,n9.conflict=!1,n9.dirty=!1,n9.savedAt=null,n9.languageId=void 0,r9=null,a9=null}async function c9(e){let t=EEe();if(!t){i9+=1,n9.open=!0,n9.path=e.path,n9.loading=!1,n9.loadError=t9(`editor.readOnlyWhileMissingSession`),n9.savingError=null,n9.conflict=!1,n9.dirty=!1,n9.savedAt=null,n9.languageId=void 0,n9.saving=!1,r9=null,a9=null;return}let n=++i9;n9.open=!0,n9.path=e.path,n9.loading=!0,n9.saving=!1,n9.loadError=null,n9.savingError=null,n9.conflict=!1,n9.dirty=!1,n9.savedAt=null,n9.languageId=void 0,r9=null,a9=t;try{let r=await Q().readFile(t,{path:e.path,length:yEe,encoding:`utf-8`});if(n!==i9)return;if(r.isBinary||r.encoding!==`utf-8`){n9.loadError=t9(`editor.binaryNotEditable`);return}r9=r.etag,n9.languageId=r.languageId,l9=r.content,u9=e.line,d9+=1}catch(e){if(n!==i9)return;r9=null,n9.loadError=e instanceof Error&&e.message.length>0?e.message:t9(`editor.loadFailed`)}finally{n===i9&&(n9.loading=!1)}}var l9,u9,d9=0;function SEe(){if(l9===void 0)return null;let e={content:l9,line:u9,revision:d9};return l9=void 0,u9=void 0,e}function CEe(){n9.dirty||(n9.dirty=!0,n9.savedAt=null),n9.savingError!==null&&(n9.savingError=null)}function f9(){xEe(),n9.open=!1}async function wEe(){n9.path!==null&&await c9({path:n9.path})}async function p9(e){let t=a9,n=n9.path;if(!t||!n||n9.saving||n9.loading||n9.conflict)return;let r=o9.getContent;if(!r)return;let i=++i9;n9.saving=!0,n9.savingError=null;try{let a=await Q().writeFile(t,{path:n,content:r(),...e?.force===!0||r9===null?{}:{baseEtag:r9}});if(i!==i9)return;r9=a.etag,n9.dirty=!1,n9.conflict=!1,n9.savedAt=Date.now()}catch(e){if(i!==i9)return;if(gT(e)&&e.code===vEe){n9.conflict=!0;return}n9.savingError=e instanceof Error&&e.message.length>0?e.message:t9(`editor.loadFailed`)}finally{n9.saving=!1}}async function TEe(){n9.conflict=!1,await p9({force:!0})}function EEe(){return m9?.()??null}var m9=null;function DEe(e){m9=e}var h9=`pythinker-light`,g9=`pythinker-dark`;function OEe(e,t){let n=e.trim();if(/^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(n))return n;if(/^#[0-9a-f]{3,4}$/i.test(n))return`#${Array.from(n.slice(1),e=>e+e).join(``)}`;let r=/^rgba?\(([^)]*)\)$/i.exec(n);if(r===null)return t;let i=r[1].split(/[\s,/]+/).filter(e=>e.length>0);if(i.length<3||i.length>4)return t;let a=i.slice(0,3).map(e=>_9(e,255)),o=i.length===4?_9(i[3],1):255;return a.some(e=>e===null)||o===null?t:`#${[...a,o===255?null:o].filter(e=>e!==null).map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function _9(e,t){let n=e.endsWith(`%`),r=Number(n?e.slice(0,-1):e);if(!Number.isFinite(r))return null;let i=n?r/100:r/t;return Math.max(0,Math.min(255,Math.round(i*255)))}function v9(e,t){let n=getComputedStyle(document.documentElement).getPropertyValue(e).trim();return OEe(n.length>0?n:t,t)}function kEe(){return{bg:v9(`--p-bg`,`#ffffff`),surface:v9(`--color-surface`,`#fafbfc`),text:v9(`--color-text`,`#14171c`),textMuted:v9(`--color-text-muted`,`#6b7280`),line:v9(`--color-line`,`#e7eaee`),accent:v9(`--color-accent`,`#1783ff`),accentSoft:v9(`--p-accent-soft`,`#1783ff24`),selection:v9(`--p-selection`,`#1783ff2e`),danger:v9(`--color-danger`,`#c0392b`),warning:v9(`--color-warning`,`#a9610a`),success:v9(`--color-success`,`#0e7a38`)}}function y9(e){return e.slice(1,7)}function AEe(e,t){let n=kEe();e.editor.defineTheme(t?g9:h9,{base:t?`vs-dark`:`vs`,inherit:!0,rules:[{token:`comment`,foreground:y9(n.textMuted),fontStyle:`italic`},{token:`string`,foreground:y9(n.success)},{token:`keyword`,foreground:y9(n.accent)},{token:`number`,foreground:y9(n.warning)},{token:`type`,foreground:y9(n.accent)}],colors:{"editor.background":n.bg,"editor.foreground":n.text,"editorLineNumber.foreground":n.textMuted,"editorLineNumber.activeForeground":n.text,"editor.selectionBackground":n.selection,"editor.lineHighlightBackground":n.surface,"editorCursor.foreground":n.accent,"editorIndentGuide.background1":n.line,"editorIndentGuide.activeBackground1":n.textMuted,"editorWidget.background":n.surface,"editorWidget.border":n.line,"editorError.foreground":n.danger,"editorWarning.foreground":n.warning,"scrollbarSlider.background":n.accentSoft,"scrollbarSlider.hoverBackground":n.accentSoft,"scrollbarSlider.activeBackground":n.accent}})}function b9(e,t){AEe(e,t),e.editor.setTheme(t?g9:h9)}var x9=Da(),S9=null;function jEe(){return S9??=he(()=>import(`./editor.main-nZY5Vq00.js`).then(e=>{b9(e,x9.value),s(x9,()=>b9(e,x9.value))}),__vite__mapDeps([41,2,7,42,12,43,44,45])),S9}function MEe(){return x9.value?g9:h9}function NEe(){return jEe()}var PEe={class:`monaco-pane`},FEe={key:0,class:`monaco-pane__boot`},IEe=Y(G({__name:`MonacoPane`,props:{path:{},languageId:{}},setup(e){let t=R(null),n=R(!0),r=null,i=null,a=null,o=null;function l(){window.MonacoEnvironment===void 0&&he(()=>import(`./editor.worker-Cs8mLnor.js`).then(e=>{window.MonacoEnvironment={getWorker:()=>new e.default}}),[])}function u(e){if(e!==void 0&&new Set([`typescript`,`javascript`,`json`,`css`,`html`,`markdown`,`python`,`rust`,`go`,`yaml`]).has(e))return e;if(e===`typescriptreact`||e===`javascriptreact`)return e.replace(`react`,``);if(e===`shellscript`)return`shell`}async function d(){if(r===null||i===null)return;let e=SEe(),t=f.path;if(t===null)return;let n=r.Uri.parse(`pythinker://session/${encodeURIComponent(t)}`),s=r.editor.getModel(n);if(o?.dispose(),o=null,a!==null&&a!==s&&a.dispose(),s===null)a=r.editor.createModel(e?.content??``,u(f.languageId),n);else{a=s,e!==null&&a.setValue(e.content);let t=u(f.languageId);t!==void 0&&r.editor.setModelLanguage(a,t)}o=a.onDidChangeContent(()=>CEe()),i.setModel(a),s9(()=>a?.getValue()??``),e?.line!==void 0&&e.line>0&&(i.revealLineInCenter(e.line),i.setPosition({lineNumber:e.line,column:1}))}p(async()=>{l(),await NEe(),t.value!==null&&(r=await he(()=>import(`./editor.main-nZY5Vq00.js`),__vite__mapDeps([41,2,7,42,12,43,44,45])),t.value!==null&&(i=r.editor.create(t.value,{model:null,theme:MEe(),automaticLayout:!0,fontSize:12.5,fontFamily:`"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace`,minimap:{enabled:!1},scrollBeyondLastLine:!1,renderLineHighlight:`line`,padding:{top:8}}),n.value=!1,await d()))}),h(()=>{s9(null),o?.dispose(),a?.dispose(),i?.dispose(),a=null,o=null,i=null,r=null});let f=e;return s(()=>[f.path,f.languageId],async()=>{i!==null&&await d()}),(e,r)=>(c(),W(`div`,PEe,[n.value?(c(),W(`div`,FEe,[v(op,{size:`sm`})])):E(``,!0),F(`div`,{ref_key:`rootRef`,ref:t,class:`monaco-pane__host`},null,512)]))}}),[[`__scopeId`,`data-v-cb5f64f3`]]),LEe={class:`editor-panel`},REe={class:`ed-path`},zEe={key:1,class:`ed-saved`},BEe={key:1,class:`ed-saving`},VEe={key:0,class:`editor-panel__empty`},HEe={class:`editor-panel__conflict-actions`},UEe={key:1,class:`editor-panel__save-error`},WEe=Y(G({__name:`EditorPanel`,emits:[`close`],setup(e,{emit:t}){let{t:n}=J(),r=bEe(),i=t;function a(){f9(),i(`close`)}function o(e){let t=e.split(`/`).at(-1)??e;return t.length>0?t:e}let l=L(()=>r.savedAt===null||r.dirty?!1:Date.now()-r.savedAt<2e3);function u(e){(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),p9())}return window.addEventListener(`keydown`,u),h(()=>window.removeEventListener(`keydown`,u)),s(()=>r.open,e=>{e||i(`close`)}),(e,t)=>(c(),W(`div`,LEe,[v($7,{wrap:``,title:z(n)(`editor.title`),closable:``,"close-label":z(n)(`editor.closeEditor`),onClose:a},{default:B(()=>[z(r).path===null?E(``,!0):(c(),W(M,{key:0},[v(Sp,{text:z(r).path},{default:B(()=>[F(`span`,REe,U(o(z(r).path)),1)]),_:1},8,[`text`]),z(r).dirty?(c(),P(Sp,{key:0,text:z(n)(`editor.unsavedDot`)},{default:B(()=>[...t[3]||=[F(`span`,{class:`ed-dirty`},null,-1)]]),_:1},8,[`text`])):E(``,!0),l.value?(c(),W(`span`,zEe,U(z(n)(`editor.saved`)),1)):E(``,!0)],64)),z(r).path!==null&&z(r).loadError===null?(c(),W(M,{key:1},[z(r).conflict?E(``,!0):(c(),P(Ca,{key:0,size:`sm`,label:z(n)(`editor.save`),disabled:!z(r).dirty||z(r).saving,onClick:t[0]||=e=>z(p9)()},{default:B(()=>[v(X,{name:`check`,size:`sm`})]),_:1},8,[`label`,`disabled`])),z(r).saving?(c(),W(`span`,BEe,[v(op,{size:`sm`})])):E(``,!0)],64)):E(``,!0)]),_:1},8,[`title`,`close-label`]),z(r).loadError===null?(c(),W(M,{key:1},[z(r).conflict?(c(),P(e9,{key:0,variant:`warning`,class:`editor-panel__conflict`},{default:B(()=>[F(`span`,null,U(z(n)(`editor.conflictText`)),1),F(`span`,HEe,[v(pD,{variant:`secondary`,size:`sm`,onClick:t[1]||=e=>z(wEe)()},{default:B(()=>[K(U(z(n)(`editor.conflictReload`)),1)]),_:1}),v(pD,{variant:`danger`,size:`sm`,disabled:z(r).saving,onClick:t[2]||=e=>z(TEe)()},{default:B(()=>[K(U(z(n)(`editor.conflictOverwrite`)),1)]),_:1},8,[`disabled`])])]),_:1})):E(``,!0),z(r).savingError===null?E(``,!0):(c(),W(`p`,UEe,U(z(r).savingError),1)),z(r).path===null?E(``,!0):(c(),P(IEe,{key:2,path:z(r).path,"language-id":z(r).languageId},null,8,[`path`,`language-id`]))],64)):(c(),W(`div`,VEe,[v(gE,null,{default:B(()=>[F(`span`,null,U(z(r).loadError),1),v(pD,{variant:`secondary`,size:`sm`,onClick:a},{default:B(()=>[K(U(z(n)(`filePreview.close`)),1)]),_:1})]),_:1})]))]))}}),[[`__scopeId`,`data-v-579cb4a1`]]),GEe={class:`tp`},KEe=Y(G({__name:`ThinkingPanel`,props:{text:{},subtitle:{}},emits:[`close`],setup(e,{emit:t}){let r=e,i=t,{t:a}=J(),o=R(null);return s(()=>r.text,()=>{let e=o.value;e&&e.scrollHeight-e.scrollTop-e.clientHeight<24&&n(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})},{immediate:!0}),(t,n)=>(c(),W(`div`,GEe,[v($7,{title:z(a)(`common.preview`),subtitle:e.subtitle??z(a)(`thinking.panelTitle`),"close-label":z(a)(`thinking.close`),onClose:n[0]||=e=>i(`close`)},null,8,[`title`,`subtitle`,`close-label`]),F(`pre`,{ref_key:`bodyEl`,ref:o,class:`tp-body`},U(e.text),513)]))}}),[[`__scopeId`,`data-v-e1ad626c`]]),qEe={class:`agent-panel`},JEe={key:0,class:`agent-meta`},YEe={class:`agent-meta-text`},XEe={key:1,class:`agent-prompt`},ZEe={class:`agent-prompt-bubble`},QEe=[`aria-expanded`],$Ee={class:`agent-transcript-inner`},eDe={key:0,class:`agent-fallback`},tDe={key:0,class:`agent-error`},nDe={key:1,class:`fallback-lines`},rDe=Y(G({__name:`AgentDetailPanel`,props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:[`close`,`loadOlderMessages`,`openAgent`,`openFile`,`openMedia`,`openTurnDiff`],setup(e,{emit:t}){let r=e,i=t,{t:a}=J(),o=i6(),l=L(()=>o.value?`lg`:`sm`),u=R(null),f=R(null),p=R(!0),g=R(!1),_=null,y=0,b=L(()=>{let e=new Set,t=[],n=r.member.prompt?.trim(),i=n?`$ ${n}`:void 0;for(let n of[r.member.prompt,r.member.suspendedReason,r.member.text,r.member.outputLines?.join(` `),r.member.summary]){let r=n?.trim();!r||e.has(r)||r===i||(e.add(r),t.push(r))}return t}),x=L(()=>b.value.filter(e=>e!==r.member.prompt?.trim()).join(` `)),S=m(`modelDisplay`),C=m(`subagentEffort`),w=L(()=>[r.member.subagentType,S?.(r.member.model),C?.(r.member.thinkingEffort)].filter(Boolean).join(` · `)||void 0),T=L(()=>r.member.prompt?.trim()??``),D=L(()=>T.value.startsWith(`/`)&&!T.value.includes(` `)),O=L(()=>r.turns.length===0&&!r.loading&&(r.loadError||b.value.length>0)),k=R(null),A=R(!0),j=R(!1);function N(){let e=k.value;if(!e){j.value=!1;return}j.value=e.scrollHeight>e.clientHeight+1}function ee(){A.value=!A.value,n(N)}s(()=>[r.member.id,T.value],()=>{A.value=!0,n(N)},{immediate:!0});function I(){let e=u.value;e&&(p.value=e.scrollHeight-e.scrollTop-e.clientHeight<24)}function te(){n(()=>{let e=u.value;e&&(e.scrollTop=e.scrollHeight)})}function ne(){p.value=!0,te()}d(`pinScroll`,e=>{let t=u.value;if(!t)return;let n=e.getBoundingClientRect().top;requestAnimationFrame(()=>{t.scrollTop+=e.getBoundingClientRect().top-n})}),s(()=>{let e=r.turns.at(-1);return`${r.member.id}:${r.turns.length}:${e?.text.length??0}:${e?.tools?.length??0}`},()=>{p.value&&te()},{immediate:!0});function re(e){return a(`tools.dynamic_workflow.phase${e[0].toUpperCase()+e.slice(1)}`)}function ie(){_!==null&&clearTimeout(_),g.value=!0,_=setTimeout(()=>{_=null,g.value=!1},1400)}async function ae(){if(!O.value&&r.turns.length>0){f.value?.copyConversation();return}let e=[r.member.prompt?.trim(),x.value].filter(Boolean).join(` diff --git a/apps/pythinker-code/dist-web/assets/index10-cR1J5t3a.js b/apps/pythinker-code/dist-web/assets/index10-GMiYl4V4.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index10-cR1J5t3a.js rename to apps/pythinker-code/dist-web/assets/index10-GMiYl4V4.js index 017f6b271..bb35a6a79 100644 --- a/apps/pythinker-code/dist-web/assets/index10-cR1J5t3a.js +++ b/apps/pythinker-code/dist-web/assets/index10-GMiYl4V4.js @@ -1,2 +1,2 @@ -import{A as e,G as t,I as n,J as r,N as i,O as a,S as o,U as s,_ as c,c as ee,f as te,g as ne,h as l,j as re,lt as ie,m as u,n as ae,nt as d,ot as f,q as oe,st as p,u as se,ut as m,v as h,w as ce,z as le}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{B as ue,I as de,V as g,_ as fe,a as pe,d as me,et as he,h as ge,i as _e,l as ve,n as ye,p as be,v as xe,x as Se}from"./index-CJN6blp7.js";var _=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Ce=[`data-markstream-mode`],we={key:0,class:`infographic-block-header flex justify-between items-center border-b`},Te={key:0},Ee={key:1,class:`flex items-center gap-x-2 overflow-hidden`},De=[`innerHTML`],Oe={key:2},ke={key:3,class:`infographic-mode-toggle flex items-center gap-0.5`},Ae=[`disabled`],je={class:`flex items-center gap-x-1`},Me={class:`flex items-center gap-x-1`},Ne={key:4},Pe={key:5,class:`infographic-header-actions flex items-center`},Fe=[`aria-pressed`],Ie={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Le={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Re=[`disabled`],ze=[`disabled`],Be={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Ve={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},He={key:0,class:`infographic-source`},Ue={class:`infographic-source-code text-sm font-mono whitespace-pre-wrap`},We={key:1,class:`relative`},Ge={key:0,class:`absolute top-2 right-2 z-10 rounded-lg`},Ke={class:`flex items-center gap-2 backdrop-blur rounded-lg`},qe={key:0,class:`infographic-pending-source text-sm font-mono whitespace-pre-wrap`},Je={class:`dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden`},Ye={class:`absolute top-6 right-6 z-50 flex items-center gap-2`},v=`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,y=fe(ce({__name:`InfographicBlockNode`,props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:[`copy`,`export`,`openModal`],setup(ce,{emit:fe}){let y=ce,{t:b}=pe(),Xe=be(),Ze=Se(),Qe=xe(),x=d(!1),S=d(!1),C=d(),w=d(),T=d(!0),$e=d(!1),E=d(!1),D=d(),O=d(null),k=d(!1),A=d(!1),j=d(null),M=d(typeof window>`u`||!Qe.value),et=s(),N=a(he,null),P=``,tt=u(()=>me(y,et));typeof window<`u`&&t([()=>C.value,Qe],([e,t])=>{var n;if((n=j.value)==null||n.destroy(),j.value=null,!t||M.value)return void(M.value=!0);if(!e)return void(M.value=!1);let r=Xe(e,{rootMargin:Ze?.value.heavyBlockMargin??Ze?.value.rootMargin??`160px`,allowIdle:!1});j.value=r,M.value=r.isVisible.value,r.whenVisible.then(()=>{M.value=!0})},{immediate:!0});let F=u(()=>y.node.code),nt=u(()=>function(e){return y.maxHeight===`none`?ue(e,void 0,null):ue(e,void 0,g(y.maxHeight))}(g(y.estimatedPreviewHeightPx)??de(F.value))),rt=d(`${nt.value}px`),it=u(()=>g(y.estimatedPreviewHeightPx)!=null);function at(){if(!w.value||it.value)return;let e=w.value.scrollHeight;if(e>0){let t=g(function(e){if(y.maxHeight===`none`)return`${e}px`;if(y.maxHeight!=null){let t=Number.parseFloat(String(y.maxHeight));if(Number.isFinite(t))return`${Math.min(e,t)}px`}let t=w.value;if(t){let n=getComputedStyle(t).getPropertyValue(`--ms-size-code-max-height`).trim(),r=Number.parseFloat(n);if(Number.isFinite(r))return`${Math.min(e,r)}px`}return`${Math.min(e,500)}px`}(e))??e;rt.value=`${Math.max(t,nt.value)}px`}}let I=d(1),L=d(0),R=d(0),z=d(!1),B=d({x:0,y:0}),ot=u(()=>F.value);function st(e){return!e||e.disabled}function V(e,t,n=`top`){if(st(e.currentTarget))return;let r=e,i=r?.clientX!=null&&r?.clientY!=null?{x:r.clientX,y:r.clientY}:void 0;ge(e.currentTarget,t,n,!1,i,y.isDark)}function H(){ye()}function ct(e){if(st(e.currentTarget))return;let t=x.value?b(`common.copied`)||`Copied`:b(`common.copy`)||`Copy`,n=e,r=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;ge(e.currentTarget,t,`top`,!1,r,y.isDark)}function lt(){return _(this,null,function*(){try{let e=F.value;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),x.value=!0,setTimeout(()=>{x.value=!1},1e3)}catch(e){console.error(`Failed to copy:`,e)}})}function ut(e){(e!==`preview`||ve())&&($e.value=!0,T.value=e===`source`)}function dt(){let e=w.value?.querySelector(`svg`);e?function(e){_(this,null,function*(){try{let t=new XMLSerializer().serializeToString(e),n=new Blob([t],{type:`image/svg+xml;charset=utf-8`}),r=URL.createObjectURL(n);if(typeof document<`u`){let e=document.createElement(`a`);e.href=r,e.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch{}URL.revokeObjectURL(r)}}catch(e){console.error(`Failed to export SVG:`,e)}})}(e):console.error(`SVG element not found`)}function ft(e){e.key===`Escape`&&E.value&&pt()}function pt(){if(E.value=!1,D.value&&(D.value.innerHTML=``),O.value=null,typeof document<`u`)try{document.body.style.overflow=``}catch{}if(typeof window<`u`)try{window.removeEventListener(`keydown`,ft)}catch{}}function mt(){(function(){if(E.value=!0,typeof document<`u`)try{document.body.style.overflow=`hidden`}catch{}if(typeof window<`u`)try{window.addEventListener(`keydown`,ft)}catch{}e(()=>{if(w.value&&D.value){D.value.innerHTML=``;let e=document.createElement(`div`);e.style.transition=`transform 0.1s ease`,e.style.transformOrigin=`center center`,e.style.width=`100%`,e.style.height=`100%`,e.style.display=`flex`,e.style.alignItems=`center`,e.style.justifyContent=`center`;let t=w.value.cloneNode(!0);t.classList.add(`fullscreen`),t.style.height=`auto`,e.appendChild(t),D.value.appendChild(e),O.value=e,e.style.transform=`translate(${L.value}px, ${R.value}px) scale(${I.value})`}})})()}function ht(){I.value<3&&(I.value+=.1)}function gt(){I.value>.5&&(I.value-=.1)}function _t(){I.value=1,L.value=0,R.value=0}function U(e){z.value=!0,e instanceof MouseEvent?B.value={x:e.clientX-L.value,y:e.clientY-R.value}:B.value={x:e.touches[0].clientX-L.value,y:e.touches[0].clientY-R.value}}function W(e){if(!z.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),L.value=t-B.value.x,R.value=n-B.value.y}function G(){z.value=!1}let K=null,vt=!1,q=!1,J=!1,Y=``,X=!1,yt=0;function Z(e){return!X&&e===yt}function bt(t=!1){return _(this,null,function*(){var n,r;if(X||!M.value||!w.value)return;if(vt)return q=!0,void(J||=t);let i=ot.value;if(!t&&i===Y&&k.value)return;let a=!1===y.loading,o=++yt;vt=!0,function(){let e=tt.value;e&&P!==e&&(P&&N?.markSettled(P),P=e,N?.markPending(e))}();let s=w.value.innerHTML,c=k.value,ee=A.value;A.value=!1;try{let t=yield _e();if(!Z(o))return;if(!t)return void console.warn(`Infographic library failed to load.`);let a=w.value;if(!a)return;K&&=((n=K.destroy)==null||n.call(K),null),a.innerHTML=``,K=new t({container:a,width:`100%`,height:`100%`});let s=``;if((r=K.on)==null||r.call(K,`error`,e=>{s=(Array.isArray(e)?e:[e]).map(e=>e instanceof Error?e.message:typeof e==`string`?e:String(e&&typeof e==`object`&&`message`in e?e.message??``:e??``)).filter(Boolean).join(`; `)}),K.render(F.value),s)throw Error(s);if(!a.childNodes.length)throw Error(`Infographic render returned empty output.`);k.value=!0,A.value=!1,Y=i,e(()=>{Z(o)&&at()})}catch(e){if(!Z(o))return;a&&!1===y.loading&&i===ot.value?(console.error(`Failed to render infographic:`,e),k.value=!1,A.value=!0,Y=``,w.value&&(w.value.innerHTML=`
Failed to render infographic: ${e instanceof Error?e.message:`Unknown error`}
`)):(k.value=c,A.value=ee,c&&w.value&&(w.value.innerHTML=s))}finally{if(vt=!1,Z(o))if(q){let t=J;q=!1,J=!1,e(()=>{bt(t)})}else (function(){_(this,null,function*(){let t=P;t&&(P=``,yield e(),function(e=tt.value){e&&C.value&&N?.reportHeight(e,C.value.offsetHeight)}(t),N?.markSettled(t))})})()}})}function Q(t=!1){X||!M.value||T.value||S.value||e(()=>{X||bt(t)})}t(()=>F.value,()=>{Q(!0)}),t(()=>y.loading,(e,t)=>{t&&!e&&Q(!0)}),t(()=>T.value,e=>{e||Q(!0)}),t(()=>S.value,e=>{e||Q()}),t(()=>y.maxHeight,()=>{e(()=>{at()})}),t([()=>y.estimatedPreviewHeightPx,()=>F.value],()=>{k.value||T.value||(rt.value=`${nt.value}px`)}),t(()=>M.value,e=>{!e||T.value||S.value||Q()}),i(()=>{!$e.value&&ve()&&(T.value=!1),Q()}),re(()=>{var e,t;if(X=!0,yt+=1,q=!1,J=!1,(e=j.value)==null||e.destroy(),j.value=null,function(){let e=P;e&&(P=``,N?.markSettled(e))}(),K&&=((t=K.destroy)==null||t.call(K),null),Y=``,typeof window<`u`)try{window.removeEventListener(`keydown`,ft)}catch{}});let xt=u(()=>!ve()),$=u(()=>T.value||S.value),St=u(()=>T.value?`fallback`:A.value?`error`:k.value?`preview`:`pending`),Ct=u(()=>({transform:`translate(${L.value}px, ${R.value}px) scale(${I.value})`}));return t(Ct,e=>{E.value&&O.value&&(O.value.style.transform=e.transform)}),(e,t)=>(n(),h(`div`,{ref_key:`viewportTarget`,ref:C,class:p([`infographic-block-container rounded-lg border overflow-hidden`,[{"is-rendering":y.loading,dark:y.isDark}]]),"data-markstream-infographic":`1`,"data-markstream-mode":St.value},[y.showHeader?(n(),h(`div`,we,[e.$slots[`header-left`]?(n(),h(`div`,Te,[le(e.$slots,`header-left`,{},void 0,!0)])):(n(),h(`div`,Ee,[l(`span`,{class:`icon-slot action-icon shrink-0`,innerHTML:f(` +import{A as e,G as t,I as n,J as r,N as i,O as a,S as o,U as s,_ as c,c as ee,f as te,g as ne,h as l,j as re,lt as ie,m as u,n as ae,nt as d,ot as f,q as oe,st as p,u as se,ut as m,v as h,w as ce,z as le}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{B as ue,I as de,V as g,_ as fe,a as pe,d as me,et as he,h as ge,i as _e,l as ve,n as ye,p as be,v as xe,x as Se}from"./index-CIrZXSM-.js";var _=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Ce=[`data-markstream-mode`],we={key:0,class:`infographic-block-header flex justify-between items-center border-b`},Te={key:0},Ee={key:1,class:`flex items-center gap-x-2 overflow-hidden`},De=[`innerHTML`],Oe={key:2},ke={key:3,class:`infographic-mode-toggle flex items-center gap-0.5`},Ae=[`disabled`],je={class:`flex items-center gap-x-1`},Me={class:`flex items-center gap-x-1`},Ne={key:4},Pe={key:5,class:`infographic-header-actions flex items-center`},Fe=[`aria-pressed`],Ie={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Le={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Re=[`disabled`],ze=[`disabled`],Be={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},Ve={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},He={key:0,class:`infographic-source`},Ue={class:`infographic-source-code text-sm font-mono whitespace-pre-wrap`},We={key:1,class:`relative`},Ge={key:0,class:`absolute top-2 right-2 z-10 rounded-lg`},Ke={class:`flex items-center gap-2 backdrop-blur rounded-lg`},qe={key:0,class:`infographic-pending-source text-sm font-mono whitespace-pre-wrap`},Je={class:`dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden`},Ye={class:`absolute top-6 right-6 z-50 flex items-center gap-2`},v=`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,y=fe(ce({__name:`InfographicBlockNode`,props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:[`copy`,`export`,`openModal`],setup(ce,{emit:fe}){let y=ce,{t:b}=pe(),Xe=be(),Ze=Se(),Qe=xe(),x=d(!1),S=d(!1),C=d(),w=d(),T=d(!0),$e=d(!1),E=d(!1),D=d(),O=d(null),k=d(!1),A=d(!1),j=d(null),M=d(typeof window>`u`||!Qe.value),et=s(),N=a(he,null),P=``,tt=u(()=>me(y,et));typeof window<`u`&&t([()=>C.value,Qe],([e,t])=>{var n;if((n=j.value)==null||n.destroy(),j.value=null,!t||M.value)return void(M.value=!0);if(!e)return void(M.value=!1);let r=Xe(e,{rootMargin:Ze?.value.heavyBlockMargin??Ze?.value.rootMargin??`160px`,allowIdle:!1});j.value=r,M.value=r.isVisible.value,r.whenVisible.then(()=>{M.value=!0})},{immediate:!0});let F=u(()=>y.node.code),nt=u(()=>function(e){return y.maxHeight===`none`?ue(e,void 0,null):ue(e,void 0,g(y.maxHeight))}(g(y.estimatedPreviewHeightPx)??de(F.value))),rt=d(`${nt.value}px`),it=u(()=>g(y.estimatedPreviewHeightPx)!=null);function at(){if(!w.value||it.value)return;let e=w.value.scrollHeight;if(e>0){let t=g(function(e){if(y.maxHeight===`none`)return`${e}px`;if(y.maxHeight!=null){let t=Number.parseFloat(String(y.maxHeight));if(Number.isFinite(t))return`${Math.min(e,t)}px`}let t=w.value;if(t){let n=getComputedStyle(t).getPropertyValue(`--ms-size-code-max-height`).trim(),r=Number.parseFloat(n);if(Number.isFinite(r))return`${Math.min(e,r)}px`}return`${Math.min(e,500)}px`}(e))??e;rt.value=`${Math.max(t,nt.value)}px`}}let I=d(1),L=d(0),R=d(0),z=d(!1),B=d({x:0,y:0}),ot=u(()=>F.value);function st(e){return!e||e.disabled}function V(e,t,n=`top`){if(st(e.currentTarget))return;let r=e,i=r?.clientX!=null&&r?.clientY!=null?{x:r.clientX,y:r.clientY}:void 0;ge(e.currentTarget,t,n,!1,i,y.isDark)}function H(){ye()}function ct(e){if(st(e.currentTarget))return;let t=x.value?b(`common.copied`)||`Copied`:b(`common.copy`)||`Copy`,n=e,r=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;ge(e.currentTarget,t,`top`,!1,r,y.isDark)}function lt(){return _(this,null,function*(){try{let e=F.value;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),x.value=!0,setTimeout(()=>{x.value=!1},1e3)}catch(e){console.error(`Failed to copy:`,e)}})}function ut(e){(e!==`preview`||ve())&&($e.value=!0,T.value=e===`source`)}function dt(){let e=w.value?.querySelector(`svg`);e?function(e){_(this,null,function*(){try{let t=new XMLSerializer().serializeToString(e),n=new Blob([t],{type:`image/svg+xml;charset=utf-8`}),r=URL.createObjectURL(n);if(typeof document<`u`){let e=document.createElement(`a`);e.href=r,e.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch{}URL.revokeObjectURL(r)}}catch(e){console.error(`Failed to export SVG:`,e)}})}(e):console.error(`SVG element not found`)}function ft(e){e.key===`Escape`&&E.value&&pt()}function pt(){if(E.value=!1,D.value&&(D.value.innerHTML=``),O.value=null,typeof document<`u`)try{document.body.style.overflow=``}catch{}if(typeof window<`u`)try{window.removeEventListener(`keydown`,ft)}catch{}}function mt(){(function(){if(E.value=!0,typeof document<`u`)try{document.body.style.overflow=`hidden`}catch{}if(typeof window<`u`)try{window.addEventListener(`keydown`,ft)}catch{}e(()=>{if(w.value&&D.value){D.value.innerHTML=``;let e=document.createElement(`div`);e.style.transition=`transform 0.1s ease`,e.style.transformOrigin=`center center`,e.style.width=`100%`,e.style.height=`100%`,e.style.display=`flex`,e.style.alignItems=`center`,e.style.justifyContent=`center`;let t=w.value.cloneNode(!0);t.classList.add(`fullscreen`),t.style.height=`auto`,e.appendChild(t),D.value.appendChild(e),O.value=e,e.style.transform=`translate(${L.value}px, ${R.value}px) scale(${I.value})`}})})()}function ht(){I.value<3&&(I.value+=.1)}function gt(){I.value>.5&&(I.value-=.1)}function _t(){I.value=1,L.value=0,R.value=0}function U(e){z.value=!0,e instanceof MouseEvent?B.value={x:e.clientX-L.value,y:e.clientY-R.value}:B.value={x:e.touches[0].clientX-L.value,y:e.touches[0].clientY-R.value}}function W(e){if(!z.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),L.value=t-B.value.x,R.value=n-B.value.y}function G(){z.value=!1}let K=null,vt=!1,q=!1,J=!1,Y=``,X=!1,yt=0;function Z(e){return!X&&e===yt}function bt(t=!1){return _(this,null,function*(){var n,r;if(X||!M.value||!w.value)return;if(vt)return q=!0,void(J||=t);let i=ot.value;if(!t&&i===Y&&k.value)return;let a=!1===y.loading,o=++yt;vt=!0,function(){let e=tt.value;e&&P!==e&&(P&&N?.markSettled(P),P=e,N?.markPending(e))}();let s=w.value.innerHTML,c=k.value,ee=A.value;A.value=!1;try{let t=yield _e();if(!Z(o))return;if(!t)return void console.warn(`Infographic library failed to load.`);let a=w.value;if(!a)return;K&&=((n=K.destroy)==null||n.call(K),null),a.innerHTML=``,K=new t({container:a,width:`100%`,height:`100%`});let s=``;if((r=K.on)==null||r.call(K,`error`,e=>{s=(Array.isArray(e)?e:[e]).map(e=>e instanceof Error?e.message:typeof e==`string`?e:String(e&&typeof e==`object`&&`message`in e?e.message??``:e??``)).filter(Boolean).join(`; `)}),K.render(F.value),s)throw Error(s);if(!a.childNodes.length)throw Error(`Infographic render returned empty output.`);k.value=!0,A.value=!1,Y=i,e(()=>{Z(o)&&at()})}catch(e){if(!Z(o))return;a&&!1===y.loading&&i===ot.value?(console.error(`Failed to render infographic:`,e),k.value=!1,A.value=!0,Y=``,w.value&&(w.value.innerHTML=`
Failed to render infographic: ${e instanceof Error?e.message:`Unknown error`}
`)):(k.value=c,A.value=ee,c&&w.value&&(w.value.innerHTML=s))}finally{if(vt=!1,Z(o))if(q){let t=J;q=!1,J=!1,e(()=>{bt(t)})}else (function(){_(this,null,function*(){let t=P;t&&(P=``,yield e(),function(e=tt.value){e&&C.value&&N?.reportHeight(e,C.value.offsetHeight)}(t),N?.markSettled(t))})})()}})}function Q(t=!1){X||!M.value||T.value||S.value||e(()=>{X||bt(t)})}t(()=>F.value,()=>{Q(!0)}),t(()=>y.loading,(e,t)=>{t&&!e&&Q(!0)}),t(()=>T.value,e=>{e||Q(!0)}),t(()=>S.value,e=>{e||Q()}),t(()=>y.maxHeight,()=>{e(()=>{at()})}),t([()=>y.estimatedPreviewHeightPx,()=>F.value],()=>{k.value||T.value||(rt.value=`${nt.value}px`)}),t(()=>M.value,e=>{!e||T.value||S.value||Q()}),i(()=>{!$e.value&&ve()&&(T.value=!1),Q()}),re(()=>{var e,t;if(X=!0,yt+=1,q=!1,J=!1,(e=j.value)==null||e.destroy(),j.value=null,function(){let e=P;e&&(P=``,N?.markSettled(e))}(),K&&=((t=K.destroy)==null||t.call(K),null),Y=``,typeof window<`u`)try{window.removeEventListener(`keydown`,ft)}catch{}});let xt=u(()=>!ve()),$=u(()=>T.value||S.value),St=u(()=>T.value?`fallback`:A.value?`error`:k.value?`preview`:`pending`),Ct=u(()=>({transform:`translate(${L.value}px, ${R.value}px) scale(${I.value})`}));return t(Ct,e=>{E.value&&O.value&&(O.value.style.transform=e.transform)}),(e,t)=>(n(),h(`div`,{ref_key:`viewportTarget`,ref:C,class:p([`infographic-block-container rounded-lg border overflow-hidden`,[{"is-rendering":y.loading,dark:y.isDark}]]),"data-markstream-infographic":`1`,"data-markstream-mode":St.value},[y.showHeader?(n(),h(`div`,we,[e.$slots[`header-left`]?(n(),h(`div`,Te,[le(e.$slots,`header-left`,{},void 0,!0)])):(n(),h(`div`,Ee,[l(`span`,{class:`icon-slot action-icon shrink-0`,innerHTML:f(` `)},null,8,De),t[21]||=l(`span`,{class:`infographic-label font-medium font-mono truncate`},`Infographic`,-1)])),e.$slots[`header-center`]?(n(),h(`div`,Oe,[le(e.$slots,`header-center`,{},void 0,!0)])):y.showModeToggle?(n(),h(`div`,ke,[l(`button`,{class:p([`infographic-mode-btn px-2 py-0.5 rounded transition-colors`,[T.value?``:`is-active`,xt.value?`opacity-50 cursor-not-allowed`:``]]),disabled:xt.value,onClick:t[0]||=()=>ut(`preview`),onMouseenter:t[1]||=e=>V(e,f(b)(`common.preview`)||`Preview`),onFocus:t[2]||=e=>V(e,f(b)(`common.preview`)||`Preview`),onMouseleave:H,onBlur:H},[l(`div`,je,[t[22]||=l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[l(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[l(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),l(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),l(`span`,null,m(f(b)(`common.preview`)||`Preview`),1)])],42,Ae),l(`button`,{class:p([`infographic-mode-btn px-2 py-0.5 rounded transition-colors`,[T.value?`is-active`:``]]),onClick:t[3]||=()=>ut(`source`),onMouseenter:t[4]||=e=>V(e,f(b)(`common.source`)||`Source`),onFocus:t[5]||=e=>V(e,f(b)(`common.source`)||`Source`),onMouseleave:H,onBlur:H},[l(`div`,Me,[t[23]||=l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m16 18l6-6l-6-6M8 6l-6 6l6 6`})],-1),l(`span`,null,m(f(b)(`common.source`)||`Source`),1)])],34)])):c(``,!0),e.$slots[`header-right`]?(n(),h(`div`,Ne,[le(e.$slots,`header-right`,{},void 0,!0)])):(n(),h(`div`,Pe,[y.showCollapseButton?(n(),h(`button`,{key:0,class:p(v),"aria-pressed":S.value,onClick:t[6]||=e=>S.value=!S.value,onMouseenter:t[7]||=e=>V(e,S.value?f(b)(`common.expand`)||`Expand`:f(b)(`common.collapse`)||`Collapse`),onFocus:t[8]||=e=>V(e,S.value?f(b)(`common.expand`)||`Expand`:f(b)(`common.collapse`)||`Collapse`),onMouseleave:H,onBlur:H},[(n(),h(`svg`,{style:ie({rotate:S.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...t[24]||=[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,Fe)):c(``,!0),y.showCopyButton?(n(),h(`button`,{key:1,class:p(v),onClick:lt,onMouseenter:t[9]||=e=>ct(e),onFocus:t[10]||=e=>ct(e),onMouseleave:H,onBlur:H},[x.value?(n(),h(`svg`,Le,[...t[26]||=[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(n(),h(`svg`,Ie,[...t[25]||=[l(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[l(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),l(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],32)):c(``,!0),y.showExportButton?(n(),h(`button`,{key:2,class:p(`${v} ${$.value?`opacity-50 cursor-not-allowed`:``}`),disabled:$.value,onClick:dt,onMouseenter:t[11]||=e=>V(e,f(b)(`common.export`)||`Export`),onFocus:t[12]||=e=>V(e,f(b)(`common.export`)||`Export`),onMouseleave:H,onBlur:H},[...t[27]||=[l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[l(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[l(`path`,{d:`M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),l(`path`,{d:`m7 10l5 5l5-5`})])],-1)]],42,Re)):c(``,!0),y.showFullscreenButton?(n(),h(`button`,{key:3,class:p(`${v} ${$.value?`opacity-50 cursor-not-allowed`:``}`),disabled:$.value,onClick:mt,onMouseenter:t[13]||=e=>V(e,E.value?f(b)(`common.minimize`)||`Minimize`:f(b)(`common.open`)||`Open`),onFocus:t[14]||=e=>V(e,E.value?f(b)(`common.minimize`)||`Minimize`:f(b)(`common.open`)||`Open`),onMouseleave:H,onBlur:H},[E.value?(n(),h(`svg`,Ve,[...t[29]||=[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):(n(),h(`svg`,Be,[...t[28]||=[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]]))],42,ze)):c(``,!0)]))])):c(``,!0),r(l(`div`,null,[T.value?(n(),h(`div`,He,[l(`pre`,Ue,m(F.value),1)])):(n(),h(`div`,We,[y.showZoomControls?(n(),h(`div`,Ge,[l(`div`,Ke,[l(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:ht,onMouseenter:t[15]||=e=>V(e,f(b)(`common.zoomIn`)||`Zoom in`),onFocus:t[16]||=e=>V(e,f(b)(`common.zoomIn`)||`Zoom in`),onMouseleave:H,onBlur:H},[...t[30]||=[l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[l(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[l(`circle`,{cx:`11`,cy:`11`,r:`8`}),l(`path`,{d:`m21 21l-4.35-4.35M11 8v6m-3-3h6`})])],-1)]],32),l(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:gt,onMouseenter:t[17]||=e=>V(e,f(b)(`common.zoomOut`)||`Zoom out`),onFocus:t[18]||=e=>V(e,f(b)(`common.zoomOut`)||`Zoom out`),onMouseleave:H,onBlur:H},[...t[31]||=[l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[l(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[l(`circle`,{cx:`11`,cy:`11`,r:`8`}),l(`path`,{d:`m21 21l-4.35-4.35M8 11h6`})])],-1)]],32),l(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:_t,onMouseenter:t[19]||=e=>V(e,f(b)(`common.resetZoom`)||`Reset zoom`),onFocus:t[20]||=e=>V(e,f(b)(`common.resetZoom`)||`Reset zoom`),onMouseleave:H,onBlur:H},m(Math.round(100*I.value))+`% `,33)])])):c(``,!0),l(`div`,{class:`infographic-preview relative transition-all overflow-hidden block`,style:ie({height:rt.value}),onMousedown:U,onMousemove:W,onMouseup:G,onMouseleave:G,onTouchstartPassive:U,onTouchmovePassive:W,onTouchendPassive:G},[k.value||A.value?c(``,!0):(n(),h(`pre`,qe,m(F.value),1)),l(`div`,{class:p([`absolute inset-0 cursor-grab`,{"cursor-grabbing":z.value}]),style:ie(Ct.value)},[l(`div`,{ref_key:`infographicContainer`,ref:w,class:`w-full text-center flex items-center justify-center min-h-full`},null,512)],6)],36)]))],512),[[ee,!S.value]]),(n(),ne(te,{to:`body`},[l(`div`,{class:p([`markstream-vue`,{dark:y.isDark}])},[o(ae,{name:`infographic-dialog`,appear:``},{default:oe(()=>[E.value?(n(),h(`div`,{key:0,class:`infographic-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4`,onClick:se(pt,[`self`])},[l(`div`,Je,[l(`div`,Ye,[l(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:ht},[...t[32]||=[l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[l(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[l(`circle`,{cx:`11`,cy:`11`,r:`8`}),l(`path`,{d:`m21 21l-4.35-4.35M11 8v6m-3-3h6`})])],-1)]]),l(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:gt},[...t[33]||=[l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[l(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[l(`circle`,{cx:`11`,cy:`11`,r:`8`}),l(`path`,{d:`m21 21l-4.35-4.35M8 11h6`})])],-1)]]),l(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:_t},m(Math.round(100*I.value))+`% `,1),l(`button`,{class:`infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`,onClick:pt},[...t[34]||=[l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M18 6L6 18M6 6l12 12`})],-1)]])]),l(`div`,{ref_key:`modalContent`,ref:D,class:p([`w-full h-full flex items-center justify-center p-4 overflow-hidden`,{"cursor-grab":!z.value,"cursor-grabbing":z.value}]),onMousedown:U,onMousemove:W,onMouseup:G,onMouseleave:G,onTouchstartPassive:U,onTouchmovePassive:W,onTouchendPassive:G},null,34)])])):c(``,!0)]),_:1})],2)]))],10,Ce))}}),[[`__scopeId`,`data-v-de34ec4b`]]);y.install=e=>{e.component(y.__name,y)};export{y as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/index11-BLu1h3am.js b/apps/pythinker-code/dist-web/assets/index11-CUNXwyvL.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index11-BLu1h3am.js rename to apps/pythinker-code/dist-web/assets/index11-CUNXwyvL.js index 420d9abc2..921790708 100644 --- a/apps/pythinker-code/dist-web/assets/index11-BLu1h3am.js +++ b/apps/pythinker-code/dist-web/assets/index11-CUNXwyvL.js @@ -1,4 +1,4 @@ -import{A as e,G as t,H as n,I as r,J as i,N as a,O as o,P as s,S as c,U as l,_ as u,c as ee,f as te,g as ne,h as d,j as re,k as ie,lt as ae,m as f,n as oe,nt as p,ot as m,q as se,st as h,u as ce,ut as le,v as g,w as ue,z as de}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{F as fe,L as pe,N as me,P as he,R as ge,V as _e,_ as ve,a as ye,d as be,et as xe,h as Se,j as Ce,n as we,p as Te,rt as Ee,v as De,x as Oe,z as ke}from"./index-CJN6blp7.js";function _(e,t){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(e.slice(Math.max(0,t-12),t))}function Ae(e){return e.includes(`->`)||e.includes(`-->`)||e.includes(`->>`)||e.includes(`-->>`)||e.includes(`-x`)||e.includes(`--x`)||e.includes(`-)`)||e.includes(`--)`)||e.includes(`-+`)||e.includes(`--+`)}function je(e){let t=e.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(t)||function(e){let t=e.split(`;`,1)[0],n=t.indexOf(`:`);return n>0&&Ae(t.slice(0,n))}(t)}function v(e){if(!e.includes(`;`))return e;let t=e.indexOf(`:`);if(t===-1||!function(e,t){let n=e.slice(0,t);return/^\s*Note\b/i.test(n)||Ae(n)}(e,t))return e;let n=e.slice(0,t+1),r=e.slice(t+1),i=function(e){let t=``,n=!1;for(let r=0;rt in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ve=(e,t)=>{for(var n in t||={})Le.call(t,n)&&Be(e,n,t[n]);if(Ie)for(var n of Ie(t))Re.call(t,n)&&Be(e,n,t[n]);return e},y=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),He=[`data-markstream-mode`,`data-markstream-pending`],Ue={key:0,class:`mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]`},We={key:0},Ge={key:1,class:`flex items-center gap-x-2 overflow-hidden`},Ke=[`innerHTML`],qe={key:2},Je={key:3,class:`mermaid-mode-toggle-group flex items-center gap-0.5`},Ye={class:`flex items-center gap-x-1`},Xe={class:`flex items-center gap-x-1`},Ze={key:4},Qe={key:5,class:`mermaid-header-actions flex items-center`},$e=[`aria-pressed`],et={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},tt={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},nt=[`aria-label`,`disabled`],rt=[`aria-label`,`disabled`],it={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},at={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},ot={key:0,class:`mermaid-source-panel`},st={class:`mermaid-source-code text-sm font-mono whitespace-pre-wrap`},ct={key:1,class:`relative`},lt={key:0,class:`absolute top-2 right-2 z-10 rounded-lg`},ut={class:`flex items-center gap-2 backdrop-blur rounded-lg`},dt={class:`dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden`},ft={class:`absolute top-6 right-6 z-50 flex items-center gap-2`},pt=`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded`,b=ve(ue({__name:`MermaidBlockNode`,props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:[`copy`,`export`,`openModal`,`toggleMode`],setup(ue,{emit:ve}){let _=ue,Ae=ve,je={USE_PROFILES:{svg:!0},FORBID_TAGS:[`script`],FORBID_ATTR:[/^on/i],ADD_TAGS:[`style`],ADD_ATTR:[`style`],SAFE_FOR_TEMPLATES:!0},v=p(!1),Ne=p(typeof window>`u`),Ie=De(),Le=Oe(),Re=f(()=>_.isStrict?`strict`:`loose`),Be=f(()=>({startOnLoad:!1,securityLevel:Re.value,dompurifyConfig:Re.value===`strict`?je:void 0,flowchart:Re.value===`strict`?{htmlLabels:!1}:void 0}));function b(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=``}}function mt(e,t,n={}){if(!e)return null;let r=function(e,t){if(!e)return null;let n=Ee(t);if(!n)return null;let r=function(e,t){let n=Array.from(e.childNodes),r=document.createElement(`div`);return r.dataset.mermaidSvgLayer=`1`,r.style.zIndex=`1`,r.appendChild(t),e.insertBefore(r,e.firstChild),n.length>0&&function(e){let t=()=>{var t;for(let n of e)(t=n.parentNode)==null||t.removeChild(n)};typeof requestAnimationFrame==`function`?requestAnimationFrame(()=>{requestAnimationFrame(t)}):setTimeout(t,32)}(n),r}(e,n);return{svg:n.outerHTML,bindTarget:r}}(e,t);return r||n.keepPreviousOnFailure||b(e),r}let x=null;function ht(e){if(_.enableMermaidInteractions&&e?.querySelector(`svg`))try{x?.(e)}catch{}}let{t:S}=ye(),C=!1,gt=0;function _t(){return y(this,null,function*(){try{let e=yield fe();return C?null:(v.value=!!e,e)}catch(e){throw C||(v.value=!1),e}finally{C||(Ne.value=!0)}})}let vt=p(!1),w=p(!1),yt=p(),T=p(),E=p(),D=p(),bt=p(null),xt=Te(),St=p(null),Ct=p(typeof window>`u`||!Ie.value),wt=l(),Tt=o(xe,null),O=``,k=0,Et=0,Dt=f(()=>be(_,wt));function Ot(){let e=Dt.value;e&&(O&&O!==e&&(Tt?.markSettled(O),k=0),O=e,k+=1,Et+=1,k===1&&Tt?.markPending(e))}function kt(){return y(this,null,function*(){let t=O;if(!t||(k=Math.max(0,k-1),k>0))return;O=``;let n=++Et;yield e(),n===Et&&(function(e=Dt.value){e&&yt.value&&Tt?.reportHeight(e,yt.value.offsetHeight)}(t),Tt?.markSettled(t))})}function At(){let e=O;e&&(O=``,k=0,Et+=1,Tt?.markSettled(e))}let jt=p(),A=f(()=>_.node.code.replace(/\]::([^:])/g,`]:::$1`).replace(/:::subgraphNode$/gm,`::subgraphNode`));function Mt(e,t=A.value){let n=t,r={theme:e===`dark`?`dark`:`default`};Re.value===`strict`&&(r.flowchart={htmlLabels:!1});let i=`%%{init: ${JSON.stringify(r)}}%%\n`;return n.trim().startsWith(`%%{`)?n:i+n}function Nt(){return function(e){return pe(e,function(){return _e(T.value?getComputedStyle(T.value).getPropertyValue(`--ms-size-diagram-min-height`).trim():``)??360}(),Rn())}(_e(_.estimatedPreviewHeightPx)??ke(A.value))}function Pt(){return`${Nt()}px`}let Ft=p(null);function It(){return!!E.value?.querySelector(`svg`)}function Lt(){return!1!==_.loading&&(It()||!!Ft.value)}let j=p(1),M=p(0),N=p(0),Rt=p(!1),zt=p({x:0,y:0}),P=p(!0),Bt=p(!1),F=p(!1),I=p(null),Vt=``,Ht=!1,L=``,Ut=p(0),Wt=p(!1),Gt=f(()=>Math.max(0,_.renderDebounceMs??300)),Kt=f(()=>Math.max(0,_.contentStableDelayMs??500)),qt=f(()=>Math.max(120,_.previewPollDelayMs??800)),Jt=f(()=>Math.max(qt.value,_.previewPollMaxDelayMs??4e3)),Yt=f(()=>Math.max(1,Math.trunc(_.previewPollMaxAttempts??12))),R=f(()=>!1!==_.loading),Xt=null,Zt=null,Qt=null,$t=null,en=0,tn=globalThis.requestIdleCallback??((e,t)=>setTimeout(()=>e({didTimeout:!0}),16)),nn=globalThis.cancelIdleCallback??(e=>clearTimeout(e));function z(e=gt){return!C&&e===gt}function B(){return z()&&Ct.value&&!w.value}function rn(){Qt!=null&&(globalThis.clearTimeout(Qt),Qt=null),$t!=null&&(nn($t),$t=null)}function an(){C||Qt==null&&$t==null&&(Qt=globalThis.setTimeout(()=>{Qt=null,B()&&($t=tn(()=>{$t=null,B()&&or()},{timeout:500}))},Gt.value))}function on(){Zt!=null&&(globalThis.clearTimeout(Zt),Zt=null)}function sn(e=600){if(typeof globalThis>`u`||C)return;let t=Math.max(0,e);on(),Zt=globalThis.setTimeout(()=>{if(Zt=null,!C){if(_.loading||F.value||!B())return void sn(Math.min(1200,Math.max(300,1.2*t)));an()}},t)}let V=p(Pt()),cn=p(V.value),ln=null,H=p(!1),un=p(!1),U=p({}),W=p(0),G=null,dn=null,K=p(!1),fn=f(()=>!(w.value||P.value||Ne.value&&!F.value&&!I.value&&(H.value||K.value&&(E.value?.textContent)?.trim()))),pn=p({zoom:1,translateX:0,translateY:0,containerHeight:V.value}),mn=f(()=>_.enableWheelZoom?{wheel:Xn}:{}),q=f(()=>({worker:_.workerTimeoutMs??1400,parse:_.parseTimeoutMs??1800,render:_.renderTimeoutMs??2500,fullRender:_.fullRenderTimeoutMs??4e3})),hn=null,gn=null,_n=!1,vn=qt.value,J=null,yn=0,bn=!0,xn=0;function Sn(e,t){let n=t?.timeoutMs,r=t?.signal;if(r?.aborted)return Promise.reject(new DOMException(`Aborted`,`AbortError`));let i=null,a=!1,o=null;return new Promise((t,s)=>{let c=()=>{i!=null&&clearTimeout(i),o&&r&&r.removeEventListener(`abort`,o)};n&&n>0&&(i=globalThis.setTimeout(()=>{a||(a=!0,c(),s(Error(`Operation timed out`)))},n)),r&&(o=()=>{a||(a=!0,c(),s(new DOMException(`Aborted`,`AbortError`)))},r.addEventListener(`abort`,o)),e().then(e=>{a||(a=!0,c(),t(e))}).catch(e=>{a||(a=!0,c(),s(e))})})}function Cn(e){if(typeof document>`u`||!E.value)return;if(typeof _.onRenderError==`function`&&!0===_.onRenderError(e,A.value,E.value))return K.value=!0,void $();let t=document.createElement(`div`);t.style.padding=`var(--ms-inset-panel-body)`,t.style.color=`hsl(var(--ms-destructive))`,t.textContent=`Failed to render diagram: `;let n=document.createElement(`span`);n.textContent=e instanceof Error?e.message:`Unknown error`,t.appendChild(n),b(E.value),E.value.appendChild(t),V.value=(E.value?getComputedStyle(E.value).getPropertyValue(`--ms-size-diagram-min-height`).trim():``)||`360px`,cn.value=V.value,K.value=!0,$()}function wn(e){let t=typeof e==`string`?e:typeof e?.message==`string`?e.message:``;return typeof t==`string`&&/timed out/i.test(t)}function Tn(e){return e?.name===`AbortError`}function En(e){return!wn(e)&&!Tn(e)}typeof window<`u`&&t([()=>yt.value,Ie],([e,t])=>{var n;if((n=St.value)==null||n.destroy(),St.value=null,!t||Ct.value)return void(Ct.value=!0);if(!e)return void(Ct.value=!1);let r=xt(e,{rootMargin:Le?.value.heavyBlockMargin,allowIdle:!1});St.value=r,Ct.value=r.isVisible.value,r.whenVisible.then(()=>{Ct.value=!0})},{immediate:!0}),re(()=>{var e;C=!0,gt+=1,W.value+=1,(e=St.value)==null||e.destroy(),St.value=null,At(),rn()});let Dn=f(()=>!1!==_.showTooltips);function On(e){return!e||e.disabled}function Y(e,t,n=`top`){if(!Dn.value||On(e.currentTarget))return;let r=e,i=r?.clientX!=null&&r?.clientY!=null?{x:r.clientX,y:r.clientY}:void 0;Se(e.currentTarget,t,n,!1,i,_.isDark)}function X(){Dn.value&&we()}function kn(e){if(!Dn.value||On(e.currentTarget))return;let t=vt.value?S(`common.copied`)||`Copied`:S(`common.copy`)||`Copy`,n=e,r=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;Se(e.currentTarget,t,`top`,!1,r,_.isDark)}function An(e,t){let n={theme:t===`dark`?`dark`:`default`};Re.value===`strict`&&(n.flowchart={htmlLabels:!1});let r=`%%{init: ${JSON.stringify(n)}}%%\n`;return e.trimStart().startsWith(`%%{`)?e:r+e}function jn(){return bn&&!P.value&&!H.value&&!K.value}function Mn(e){let t=e.trim();return!(!t||t.startsWith(`%%`))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(`:`)}function Nn(e){if(ge(e)===`gantt`)return function(e){let t=e.split(/\r?\n/);for(!/\r?\n$/.test(e)&&t.length>0&&t.pop();t.length>0;){let e=t[t.length-1]?.trim();if(e&&!e.startsWith(`%%`)){if(Mn(e))break;t.pop()}else t.pop()}return t.some(Mn)?t.join(` +import{A as e,G as t,H as n,I as r,J as i,N as a,O as o,P as s,S as c,U as l,_ as u,c as ee,f as te,g as ne,h as d,j as re,k as ie,lt as ae,m as f,n as oe,nt as p,ot as m,q as se,st as h,u as ce,ut as le,v as g,w as ue,z as de}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{F as fe,L as pe,N as me,P as he,R as ge,V as _e,_ as ve,a as ye,d as be,et as xe,h as Se,j as Ce,n as we,p as Te,rt as Ee,v as De,x as Oe,z as ke}from"./index-CIrZXSM-.js";function _(e,t){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(e.slice(Math.max(0,t-12),t))}function Ae(e){return e.includes(`->`)||e.includes(`-->`)||e.includes(`->>`)||e.includes(`-->>`)||e.includes(`-x`)||e.includes(`--x`)||e.includes(`-)`)||e.includes(`--)`)||e.includes(`-+`)||e.includes(`--+`)}function je(e){let t=e.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(t)||function(e){let t=e.split(`;`,1)[0],n=t.indexOf(`:`);return n>0&&Ae(t.slice(0,n))}(t)}function v(e){if(!e.includes(`;`))return e;let t=e.indexOf(`:`);if(t===-1||!function(e,t){let n=e.slice(0,t);return/^\s*Note\b/i.test(n)||Ae(n)}(e,t))return e;let n=e.slice(0,t+1),r=e.slice(t+1),i=function(e){let t=``,n=!1;for(let r=0;rt in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ve=(e,t)=>{for(var n in t||={})Le.call(t,n)&&Be(e,n,t[n]);if(Ie)for(var n of Ie(t))Re.call(t,n)&&Be(e,n,t[n]);return e},y=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),He=[`data-markstream-mode`,`data-markstream-pending`],Ue={key:0,class:`mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]`},We={key:0},Ge={key:1,class:`flex items-center gap-x-2 overflow-hidden`},Ke=[`innerHTML`],qe={key:2},Je={key:3,class:`mermaid-mode-toggle-group flex items-center gap-0.5`},Ye={class:`flex items-center gap-x-1`},Xe={class:`flex items-center gap-x-1`},Ze={key:4},Qe={key:5,class:`mermaid-header-actions flex items-center`},$e=[`aria-pressed`],et={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},tt={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},nt=[`aria-label`,`disabled`],rt=[`aria-label`,`disabled`],it={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},at={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},ot={key:0,class:`mermaid-source-panel`},st={class:`mermaid-source-code text-sm font-mono whitespace-pre-wrap`},ct={key:1,class:`relative`},lt={key:0,class:`absolute top-2 right-2 z-10 rounded-lg`},ut={class:`flex items-center gap-2 backdrop-blur rounded-lg`},dt={class:`dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden`},ft={class:`absolute top-6 right-6 z-50 flex items-center gap-2`},pt=`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded`,b=ve(ue({__name:`MermaidBlockNode`,props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:[`copy`,`export`,`openModal`,`toggleMode`],setup(ue,{emit:ve}){let _=ue,Ae=ve,je={USE_PROFILES:{svg:!0},FORBID_TAGS:[`script`],FORBID_ATTR:[/^on/i],ADD_TAGS:[`style`],ADD_ATTR:[`style`],SAFE_FOR_TEMPLATES:!0},v=p(!1),Ne=p(typeof window>`u`),Ie=De(),Le=Oe(),Re=f(()=>_.isStrict?`strict`:`loose`),Be=f(()=>({startOnLoad:!1,securityLevel:Re.value,dompurifyConfig:Re.value===`strict`?je:void 0,flowchart:Re.value===`strict`?{htmlLabels:!1}:void 0}));function b(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=``}}function mt(e,t,n={}){if(!e)return null;let r=function(e,t){if(!e)return null;let n=Ee(t);if(!n)return null;let r=function(e,t){let n=Array.from(e.childNodes),r=document.createElement(`div`);return r.dataset.mermaidSvgLayer=`1`,r.style.zIndex=`1`,r.appendChild(t),e.insertBefore(r,e.firstChild),n.length>0&&function(e){let t=()=>{var t;for(let n of e)(t=n.parentNode)==null||t.removeChild(n)};typeof requestAnimationFrame==`function`?requestAnimationFrame(()=>{requestAnimationFrame(t)}):setTimeout(t,32)}(n),r}(e,n);return{svg:n.outerHTML,bindTarget:r}}(e,t);return r||n.keepPreviousOnFailure||b(e),r}let x=null;function ht(e){if(_.enableMermaidInteractions&&e?.querySelector(`svg`))try{x?.(e)}catch{}}let{t:S}=ye(),C=!1,gt=0;function _t(){return y(this,null,function*(){try{let e=yield fe();return C?null:(v.value=!!e,e)}catch(e){throw C||(v.value=!1),e}finally{C||(Ne.value=!0)}})}let vt=p(!1),w=p(!1),yt=p(),T=p(),E=p(),D=p(),bt=p(null),xt=Te(),St=p(null),Ct=p(typeof window>`u`||!Ie.value),wt=l(),Tt=o(xe,null),O=``,k=0,Et=0,Dt=f(()=>be(_,wt));function Ot(){let e=Dt.value;e&&(O&&O!==e&&(Tt?.markSettled(O),k=0),O=e,k+=1,Et+=1,k===1&&Tt?.markPending(e))}function kt(){return y(this,null,function*(){let t=O;if(!t||(k=Math.max(0,k-1),k>0))return;O=``;let n=++Et;yield e(),n===Et&&(function(e=Dt.value){e&&yt.value&&Tt?.reportHeight(e,yt.value.offsetHeight)}(t),Tt?.markSettled(t))})}function At(){let e=O;e&&(O=``,k=0,Et+=1,Tt?.markSettled(e))}let jt=p(),A=f(()=>_.node.code.replace(/\]::([^:])/g,`]:::$1`).replace(/:::subgraphNode$/gm,`::subgraphNode`));function Mt(e,t=A.value){let n=t,r={theme:e===`dark`?`dark`:`default`};Re.value===`strict`&&(r.flowchart={htmlLabels:!1});let i=`%%{init: ${JSON.stringify(r)}}%%\n`;return n.trim().startsWith(`%%{`)?n:i+n}function Nt(){return function(e){return pe(e,function(){return _e(T.value?getComputedStyle(T.value).getPropertyValue(`--ms-size-diagram-min-height`).trim():``)??360}(),Rn())}(_e(_.estimatedPreviewHeightPx)??ke(A.value))}function Pt(){return`${Nt()}px`}let Ft=p(null);function It(){return!!E.value?.querySelector(`svg`)}function Lt(){return!1!==_.loading&&(It()||!!Ft.value)}let j=p(1),M=p(0),N=p(0),Rt=p(!1),zt=p({x:0,y:0}),P=p(!0),Bt=p(!1),F=p(!1),I=p(null),Vt=``,Ht=!1,L=``,Ut=p(0),Wt=p(!1),Gt=f(()=>Math.max(0,_.renderDebounceMs??300)),Kt=f(()=>Math.max(0,_.contentStableDelayMs??500)),qt=f(()=>Math.max(120,_.previewPollDelayMs??800)),Jt=f(()=>Math.max(qt.value,_.previewPollMaxDelayMs??4e3)),Yt=f(()=>Math.max(1,Math.trunc(_.previewPollMaxAttempts??12))),R=f(()=>!1!==_.loading),Xt=null,Zt=null,Qt=null,$t=null,en=0,tn=globalThis.requestIdleCallback??((e,t)=>setTimeout(()=>e({didTimeout:!0}),16)),nn=globalThis.cancelIdleCallback??(e=>clearTimeout(e));function z(e=gt){return!C&&e===gt}function B(){return z()&&Ct.value&&!w.value}function rn(){Qt!=null&&(globalThis.clearTimeout(Qt),Qt=null),$t!=null&&(nn($t),$t=null)}function an(){C||Qt==null&&$t==null&&(Qt=globalThis.setTimeout(()=>{Qt=null,B()&&($t=tn(()=>{$t=null,B()&&or()},{timeout:500}))},Gt.value))}function on(){Zt!=null&&(globalThis.clearTimeout(Zt),Zt=null)}function sn(e=600){if(typeof globalThis>`u`||C)return;let t=Math.max(0,e);on(),Zt=globalThis.setTimeout(()=>{if(Zt=null,!C){if(_.loading||F.value||!B())return void sn(Math.min(1200,Math.max(300,1.2*t)));an()}},t)}let V=p(Pt()),cn=p(V.value),ln=null,H=p(!1),un=p(!1),U=p({}),W=p(0),G=null,dn=null,K=p(!1),fn=f(()=>!(w.value||P.value||Ne.value&&!F.value&&!I.value&&(H.value||K.value&&(E.value?.textContent)?.trim()))),pn=p({zoom:1,translateX:0,translateY:0,containerHeight:V.value}),mn=f(()=>_.enableWheelZoom?{wheel:Xn}:{}),q=f(()=>({worker:_.workerTimeoutMs??1400,parse:_.parseTimeoutMs??1800,render:_.renderTimeoutMs??2500,fullRender:_.fullRenderTimeoutMs??4e3})),hn=null,gn=null,_n=!1,vn=qt.value,J=null,yn=0,bn=!0,xn=0;function Sn(e,t){let n=t?.timeoutMs,r=t?.signal;if(r?.aborted)return Promise.reject(new DOMException(`Aborted`,`AbortError`));let i=null,a=!1,o=null;return new Promise((t,s)=>{let c=()=>{i!=null&&clearTimeout(i),o&&r&&r.removeEventListener(`abort`,o)};n&&n>0&&(i=globalThis.setTimeout(()=>{a||(a=!0,c(),s(Error(`Operation timed out`)))},n)),r&&(o=()=>{a||(a=!0,c(),s(new DOMException(`Aborted`,`AbortError`)))},r.addEventListener(`abort`,o)),e().then(e=>{a||(a=!0,c(),t(e))}).catch(e=>{a||(a=!0,c(),s(e))})})}function Cn(e){if(typeof document>`u`||!E.value)return;if(typeof _.onRenderError==`function`&&!0===_.onRenderError(e,A.value,E.value))return K.value=!0,void $();let t=document.createElement(`div`);t.style.padding=`var(--ms-inset-panel-body)`,t.style.color=`hsl(var(--ms-destructive))`,t.textContent=`Failed to render diagram: `;let n=document.createElement(`span`);n.textContent=e instanceof Error?e.message:`Unknown error`,t.appendChild(n),b(E.value),E.value.appendChild(t),V.value=(E.value?getComputedStyle(E.value).getPropertyValue(`--ms-size-diagram-min-height`).trim():``)||`360px`,cn.value=V.value,K.value=!0,$()}function wn(e){let t=typeof e==`string`?e:typeof e?.message==`string`?e.message:``;return typeof t==`string`&&/timed out/i.test(t)}function Tn(e){return e?.name===`AbortError`}function En(e){return!wn(e)&&!Tn(e)}typeof window<`u`&&t([()=>yt.value,Ie],([e,t])=>{var n;if((n=St.value)==null||n.destroy(),St.value=null,!t||Ct.value)return void(Ct.value=!0);if(!e)return void(Ct.value=!1);let r=xt(e,{rootMargin:Le?.value.heavyBlockMargin,allowIdle:!1});St.value=r,Ct.value=r.isVisible.value,r.whenVisible.then(()=>{Ct.value=!0})},{immediate:!0}),re(()=>{var e;C=!0,gt+=1,W.value+=1,(e=St.value)==null||e.destroy(),St.value=null,At(),rn()});let Dn=f(()=>!1!==_.showTooltips);function On(e){return!e||e.disabled}function Y(e,t,n=`top`){if(!Dn.value||On(e.currentTarget))return;let r=e,i=r?.clientX!=null&&r?.clientY!=null?{x:r.clientX,y:r.clientY}:void 0;Se(e.currentTarget,t,n,!1,i,_.isDark)}function X(){Dn.value&&we()}function kn(e){if(!Dn.value||On(e.currentTarget))return;let t=vt.value?S(`common.copied`)||`Copied`:S(`common.copy`)||`Copy`,n=e,r=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;Se(e.currentTarget,t,`top`,!1,r,_.isDark)}function An(e,t){let n={theme:t===`dark`?`dark`:`default`};Re.value===`strict`&&(n.flowchart={htmlLabels:!1});let r=`%%{init: ${JSON.stringify(n)}}%%\n`;return e.trimStart().startsWith(`%%{`)?e:r+e}function jn(){return bn&&!P.value&&!H.value&&!K.value}function Mn(e){let t=e.trim();return!(!t||t.startsWith(`%%`))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(`:`)}function Nn(e){if(ge(e)===`gantt`)return function(e){let t=e.split(/\r?\n/);for(!/\r?\n$/.test(e)&&t.length>0&&t.pop();t.length>0;){let e=t[t.length-1]?.trim();if(e&&!e.startsWith(`%%`)){if(Mn(e))break;t.pop()}else t.pop()}return t.some(Mn)?t.join(` `):``}(e);let t=e.split(/\r?\n/);for(;t.length>0;){let e=t[t.length-1].trimEnd();if(e!==``){if(!(/^[-=~>|<\s]+$/.test(e.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(e)||/[-|><]$/.test(e)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(e)))break;t.pop()}else t.pop()}return t.join(` `)}function Pn(e,t,n,r){return y(this,null,function*(){try{return yield Sn(()=>e.render(t,n),{timeoutMs:r})}catch(i){if(!En(i))throw i;let a=Me(n);if(a===n)throw i;try{return yield Sn(()=>e.render(`${t}-retry`,a),{timeoutMs:r})}catch{throw i}}})}function Fn(e,t,n){return y(this,null,function*(){try{return yield me(e,t,n?.timeoutMs??q.value.worker,n?.signal)}catch(r){if(r?.name===`AbortError`)throw r;let i=r?.code||r?.name;if(i!==`WORKER_BUSY`&&i!==`WORKER_TIMEOUT`&&i!==`WORKER_INIT_ERROR`&&i!==`MERMAID_DISABLED`&&i!==`WORKER_REPLACED`||r?.fallbackToRenderer)return yield function(e,t,n){return y(this,null,function*(){let r=yield _t();if(!r)return;let i=r,a=An(e,t);if(typeof i.parse==`function`){try{yield Sn(()=>i.parse(a),{timeoutMs:n?.timeoutMs??q.value.parse,signal:n?.signal})}catch(e){if(!En(e))throw e;let t=Me(a);if(t===a)throw e;try{yield Sn(()=>i.parse(t),{timeoutMs:n?.timeoutMs??q.value.parse,signal:n?.signal})}catch{throw e}}return!0}let o=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;try{yield Sn(()=>r.render(o,a),{timeoutMs:n?.timeoutMs??q.value.render,signal:n?.signal})}catch(e){if(!En(e))throw e;let t=Me(a);if(t===a)throw e;try{yield Sn(()=>r.render(`${o}-retry`,t),{timeoutMs:n?.timeoutMs??q.value.render,signal:n?.signal})}catch{throw e}}return!0})}(e,t,n);throw r}})}function In(e,t,n){return y(this,null,function*(){if(ge(e)===`gantt`){let r=Nn(e);if(!r.trim())return{fullOk:!1,prefixOk:!1};try{if(yield Fn(r,t,n))return r===e?{fullOk:!0,prefixOk:!1}:{fullOk:!1,prefixOk:!0,prefix:r}}catch(e){if(e?.name===`AbortError`)throw e}return{fullOk:!1,prefixOk:!1}}try{if(yield Fn(e,t,n))return{fullOk:!0,prefixOk:!1}}catch(e){if(e?.name===`AbortError`)throw e}let r=Nn(e);if(r&&r.trim()&&r!==e)try{try{let i=yield he(e,t,n?.timeoutMs??q.value.worker,n?.signal);i&&i.trim()&&(r=i)}catch{}if(yield Fn(r,t,n))return{fullOk:!1,prefixOk:!0,prefix:r}}catch(e){if(e?.name===`AbortError`)throw e}return{fullOk:!1,prefixOk:!1}})}let Ln=f(()=>P.value||F.value||w.value);function Rn(){if(_.maxHeight===`none`)return null;if(_.maxHeight!=null){let e=Number.parseFloat(String(_.maxHeight));if(Number.isFinite(e))return e}let e=T.value;if(e){let t=getComputedStyle(e).getPropertyValue(`--ms-size-code-max-height`).trim(),n=Number.parseFloat(t);if(Number.isFinite(n))return n}return 500}function zn(e,t){if(!T.value||!E.value)return;let n=!t?.force&&!1!==_.loading&&It(),r=E.value.querySelector(`svg`);if(!r)return;let i=0,a=0,o=r.getAttribute(`viewBox`),s=r.getAttribute(`width`),c=r.getAttribute(`height`);if(o){let e=o.split(` `);e.length===4&&(i=Number.parseFloat(e[2]),a=Number.parseFloat(e[3]))}if(i&&a||s&&c&&(i=Number.parseFloat(s),a=Number.parseFloat(c)),Number.isNaN(i)||Number.isNaN(a)||i<=0||a<=0)try{let e=r.getBBox();e&&e.width>0&&e.height>0&&(i=e.width,a=e.height)}catch(e){console.error(`Failed to get SVG BBox:`,e);return}if(i>0&&a>0){let t=a/i,o=e??T.value.clientWidth,s=r.getBoundingClientRect().width,c=s>0?s:o,l=Rn(),u=c*t,ee=Math.max(l==null?u:Math.min(u,l),Nt());cn.value=`${Math.max(u,ee)}px`,n||_e(_.estimatedPreviewHeightPx)!=null||(V.value=`${ee}px`)}}let Z=p(!1),Bn=f(()=>({transform:`translate(${M.value}px, ${N.value}px) scale(${j.value})`}));function Vn(e){e.key===`Escape`&&Z.value&&Un()}function Hn(){if(!T.value||!D.value)return!1;if(D.value.firstElementChild?.getAttribute(`data-mermaid-modal-clone`)===`1`)return!0;let e=T.value.cloneNode(!0);e.dataset.mermaidModalClone=`1`,e.classList.add(`fullscreen`),e.style.height=`100%`,e.style.maxHeight=`100%`;let t=e.querySelector(`._mermaid`);t&&(t.style.contain=`none`,t.style.contentVisibility=`visible`);let n=e.querySelector(`[data-mermaid-wrapper]`);return n&&(bt.value=n,n.style.transform=Bn.value.transform),b(D.value),D.value.appendChild(e),ht(e),!0}function Un(){if(Z.value=!1,D.value&&b(D.value),bt.value=null,typeof document<`u`)try{document.body.style.overflow=``}catch{}if(typeof window<`u`)try{window.removeEventListener(`keydown`,Vn)}catch{}}function Wn(){j.value<3&&(j.value+=.1)}function Gn(){j.value>.5&&(j.value-=.1)}function Kn(){j.value=1,M.value=0,N.value=0}function qn(e){Rt.value=!0,e instanceof MouseEvent?zt.value={x:e.clientX-M.value,y:e.clientY-N.value}:zt.value={x:e.touches[0].clientX-M.value,y:e.touches[0].clientY-N.value}}function Jn(e){if(!Rt.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),M.value=t-zt.value.x,N.value=n-zt.value.y}function Yn(){Rt.value=!1}function Xn(e){if(_.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!T.value)return;let t=T.value.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=n-t.width/2,a=r-t.height/2,o=(i-M.value)/j.value,s=(a-N.value)/j.value,c=-e.deltaY*.01,l=Math.min(Math.max(j.value+c,.5),3);l!==j.value&&(M.value=i-o*l,N.value=a-s*l,j.value=l)}}function Zn(){return y(this,null,function*(){try{let e=A.value,t={payload:{type:`copy`,text:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(Ae(`copy`,t),t.defaultPrevented)return;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),vt.value=!0,setTimeout(()=>{vt.value=!1},1e3)}catch(e){console.error(`Failed to copy:`,e)}})}function Qn(){let e=E.value?.querySelector(`svg`);if(!e)return void console.error(`SVG element not found`);let t=new XMLSerializer().serializeToString(e),n={payload:{type:`export`},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:e,svgString:t};Ae(`export`,n),n.defaultPrevented||function(e,t=null){y(this,null,function*(){try{let n=t??new XMLSerializer().serializeToString(e),r=new Blob([n],{type:`image/svg+xml;charset=utf-8`}),i=URL.createObjectURL(r);if(typeof document<`u`){let e=document.createElement(`a`);e.href=i,e.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch{}URL.revokeObjectURL(i)}}catch(e){console.error(`Failed to export SVG:`,e)}})}(e,t)}function $n(){let t=E.value?.querySelector(`svg`)??null,n={payload:{type:`open-modal`},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:t,svgString:t?new XMLSerializer().serializeToString(t):null};Ae(`openModal`,n),n.defaultPrevented||function(){if(Z.value=!0,typeof document<`u`)try{document.body.style.overflow=`hidden`}catch{}if(typeof window<`u`)try{window.addEventListener(`keydown`,Vn)}catch{}e(()=>{Hn()||e(Hn)})}()}function er(e){let t={payload:{type:`toggle-mode`,target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};Ae(`toggleMode`,e,t),t.defaultPrevented||tr(e)}function tr(t){return y(this,null,function*(){let n=jt.value;if(!n)return Bt.value=!0,void(P.value=t===`source`);let r=n.getBoundingClientRect().height;n.style.height=`${r}px`,n.style.overflow=`hidden`,Bt.value=!0,P.value=t===`source`,yield e();let i=n.scrollHeight;n.style.transition=`height var(--ms-duration-standard) var(--ms-ease-standard)`,n.offsetHeight,n.style.height=`${i}px`;let a=()=>{n.style.transition=``,n.style.height=``,n.style.overflow=``,n.removeEventListener(`transitionend`,o)};function o(){a()}n.addEventListener(`transitionend`,o),setTimeout(()=>a(),220)})}function Q(e=A.value,t=_.isDark?`dark`:`light`,n=!1===_.loading){return{code:e,codeWithTheme:Mt(t,e),final:n,signature:`${t}\0${e}`,theme:t}}function nr(e){return e.signature===Q().signature}function rr(){return y(this,arguments,function*(t=Q()){let n=gt;if(!z(n)||!nr(t))return!1;if(F.value){let e=I.value,r=Ht,i=Vt;if(!e)return!1;let a=yield e;return!(!z(n)||!nr(t))&&(i===t.signature?!(!a||L!==t.signature)||!(!t.final||!1!==_.loading||r)&&rr(t):rr(t))}if(!E.value){if(yield e(),!z(n))return!1;if(!E.value)return console.warn(`Mermaid container not ready`),!1}return!(!z(n)||!nr(t))&&(F.value=!0,Ht=t.final,Vt=t.signature,Ot(),I.value=y(null,null,function*(){var e,r,i;try{let a=yield _t();if(!z(n)||!a)return!1;let o=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;H.value||un.value||(e=a.initialize)==null||e.call(a,(r=Ve({},Be.value),i={dompurifyConfig:Ve({},je)},Pe(r,Fe(i))));let s=yield Pn(a,o,t.codeWithTheme,q.value.fullRender);if(!z(n)||!function(e){return nr(e)||!e.final&&!1!==_.loading&&A.value.startsWith(e.code)}(t))return un.value&&=!1,!1;if(!E.value)return!1;let c=mt(E.value,s?.svg,{keepPreviousOnFailure:!t.final||!1!==_.loading});if(!c)return un.value&&=!1,!1;let l=s?.bindFunctions??null;return x=l,ht(c.bindTarget),H.value||un.value||(Ce(()=>zn()),H.value=!0,pn.value={zoom:j.value,translateX:M.value,translateY:N.value,containerHeight:V.value}),U.value[t.theme]={svg:c.svg,bindFunctions:l},un.value&&=!1,L=t.signature,Ft.value=E.value.innerHTML,K.value=!1,en=0,on(),!0}catch(e){if(!z(n)||!nr(t))return un.value&&=!1,!1;let r=wn(e),i=en+1;return r&&i<=3?(en=i,sn(Math.min(1200,600*i))):(en=0,on(),t.final&&!1===_.loading&&console.error(`Failed to render mermaid diagram:`,e),t.final&&!1===_.loading&&Cn(e)),!1}finally{Ht=!1,Vt=``,F.value=!1,I.value=null,z(n)&&kt()}}),I.value)})}function ir(){return y(this,null,function*(){var e;let t=A.value;if(!t.trim()){if(Lt())return;E.value&&b(E.value),Ft.value=null,L=``,K.value=!1;return}if(!v.value||!B())return;let n=Q(t);H.value&&n.signature===L&&(e=E.value)!=null&&e.querySelector(`svg`)||(yield rr(n))&&(K.value=!1)})}function ar(t,n,r,i){return y(this,null,function*(){let a=gt;if(!z(a)||!jn()||!E.value&&(yield e(),!z(a)||!E.value)||F.value)return;F.value=!0,Ot();let o=Q(n,r),s=y(null,null,function*(){try{let e=yield _t();if(!z(a)||!e)return!1;let n=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,s=Nn(t),c=yield Pn(e,n,An(s&&s.trim()?s:t,r),q.value.render);if(!z(a)||W.value!==i||!1===_.loading||!jn()||!nr(o))return!1;let l=c?.svg;if(!E.value||!l)return!1;let u=mt(E.value,l,{keepPreviousOnFailure:!0});return!!u&&(x=c?.bindFunctions??null,ht(u.bindTarget),Ce(()=>zn()),!1)}catch{return!1}finally{I.value===s&&(F.value=!1,I.value=null),z(a)&&kt()}});return I.value=s,s})}function or(){return y(this,null,function*(){if(!B())return;let e=gt,t=Date.now(),n=++W.value;Ot();try{G&&G.abort(),G=new AbortController;let r=G.signal,i=_.isDark?`dark`:`light`,a=A.value;if(!a.trim()){if(Lt())return;E.value&&b(E.value),Ft.value=null,L=``,K.value=!1;return}if(Q(a,i).signature===L)return;try{let o=yield In(a,i,{signal:r,timeoutMs:q.value.worker});if(!z(e))return;if(o.fullOk){if(r.aborted||W.value!==n||!(yield rr(Q(a,i))))return;z(e)&&W.value===n&&(K.value=!1);return}let s=yn&&t<=yn;if(o.prefixOk&&o.prefix&&!r.aborted&&W.value===n&&jn()&&!s)return void(yield ar(o.prefix,a,i,n))}catch(e){if(e?.name===`AbortError`)return}if(!z(e)||W.value!==n||K.value)return;let o=U.value[i];if(o&&E.value){let e=mt(E.value,o.svg);e&&(x=o.bindFunctions??null,ht(e.bindTarget))}}finally{z(e)&&kt()}})}function $(){_n&&(_n=!1,vn=qt.value,bn=!1,J&&=(J.abort(),null),hn&&=(globalThis.clearTimeout(hn),null),gn&&=(nn(gn),null),yn=Date.now())}function sr(){if($(),rn(),G){try{G.abort()}catch{}G=null}if(J){try{J.abort()}catch{}J=null}on(),en=0}function cr(){dn?.abort(),dn=null}function lr(e=qt.value){_n&&(xn>=Yt.value?$():(hn&&globalThis.clearTimeout(hn),hn=globalThis.setTimeout(()=>{gn=tn(()=>y(null,null,function*(){if(!_n)return;if(!B()||P.value||H.value)return void $();let e=_.isDark?`dark`:`light`,t=A.value;if(!t.trim())return!1===_.loading?void $():void lr(vn);if(xn++,xn>Yt.value)$();else{J&&J.abort(),J=new AbortController;try{let n=yield In(t,e,{signal:J.signal,timeoutMs:q.value.worker});if(n.fullOk){if((yield rr(Q(t,e)))&&H.value)return void $()}else n.prefixOk&&n.prefix&&jn()&&(yield ar(n.prefix,t,e,W.value))}catch{}vn=Math.min(Math.floor(1.5*vn),Jt.value),lr(vn)}}),{timeout:500})},e)))}function ur(){_n||R.value&&v.value&&B()&&(P.value||H.value||(_n=!0,yn=0,bn=!0,xn=0,vn=qt.value,lr(vn)))}function dr(){return y(this,null,function*(){let t=gt;z(t)&&(yield _t().catch(e=>{z(t)&&(v.value=!1,console.warn(`[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.`,e))}),z(t)&&(yield e(),z(t)&&(Bt.value||(P.value=!v.value),B()&&(R.value?(an(),Ut.value=A.value.length):P.value||ir()))))})}return t(D,e=>{Z.value&&e&&Hn()}),t(Bn,e=>{Z.value&&bt.value&&(bt.value.style.transform=e.transform)},{immediate:!0}),t(Dn,e=>{e||we()}),t(()=>A.value,e=>{if((e.trim()||!1===_.loading)&&(H.value=!1,U.value={}),!R.value)return $(),void(B()&&!P.value&&ir());B()&&an(),!P.value&&v.value&&B()?ur():$(),function(){if(!R.value||!P.value||!v.value)return;let e=A.value.length;e!==Ut.value&&(Wt.value=!0,Ut.value=e,Xt&&clearTimeout(Xt),Xt=setTimeout(()=>{Wt.value&&P.value&&A.value.trim()&&(Wt.value=!1,tr(`preview`))},Kt.value))}()}),t(()=>_.isDark,()=>y(null,null,function*(){if(K.value)return;let t=_.isDark?`dark`:`light`,n=U.value[t];if(n){if(E.value){let e=mt(E.value,n.svg);e&&(x=n.bindFunctions??null,ht(e.bindTarget))}return}let r={zoom:j.value,translateX:M.value,translateY:N.value,containerHeight:V.value},i=j.value!==1||M.value!==0||N.value!==0;un.value=!0,i&&(j.value=1,M.value=0,N.value=0,yield e()),yield rr(),i&&(yield e(),j.value=r.zoom,M.value=r.translateX,N.value=r.translateY,V.value=r.containerHeight,pn.value=r)})),t(()=>P.value,t=>y(null,null,function*(){if(t)$(),H.value&&(pn.value={zoom:j.value,translateX:M.value,translateY:N.value,containerHeight:V.value});else{if(K.value)return;let t=_.isDark?`dark`:`light`;if(H.value&&U.value[t]){if(yield e(),E.value){let e=U.value[t],n=mt(E.value,e.svg);n&&(x=e.bindFunctions??null,ht(n.bindTarget))}j.value=pn.value.zoom,M.value=pn.value.translateX,N.value=pn.value.translateY,V.value=pn.value.containerHeight;return}if(yield e(),!v.value||!B())return;if(!R.value)return $(),void(yield ir());ur(),yield or()}})),t(()=>_.loading,(t,n)=>y(null,null,function*(){if(t)cr();else if(!0===n){cr();let t=A.value,n=t.trim();if(!n)return E.value&&b(E.value),Ft.value=null,L=``,K.value=!1,sr();if(!B())return void sr();let r=_.isDark?`dark`:`light`,i=Q(t,r);if(H.value&&i.signature===L){if(yield e(),E.value&&!E.value.querySelector(`svg`)&&U.value[r]){let e=U.value[r],t=mt(E.value,e.svg);t&&(x=e.bindFunctions??null,ht(t.bindTarget))}zn(void 0,{force:!0}),sr();return}let a=new AbortController;dn=a;try{let e=0;for(;;)try{yield Fn(n,r,{signal:a.signal,timeoutMs:q.value.worker});break}catch(t){let n=t?.code===`WORKER_BUSY`||t?.code===`WORKER_TIMEOUT`,r=t?.code===`WORKER_TIMEOUT`?2:8;if(!n||e>=r)throw t;let i=Math.min(50*ze(2,e),400);e++,yield Sn(()=>new Promise(e=>setTimeout(e,i)),{signal:a.signal})}if(!(yield rr(i)))return;K.value=!1,sr()}catch(e){if(Tn(e))return;sr(),Cn(e)}finally{dn===a&&(dn=null)}}})),t(T,e=>{ln&&ln.disconnect(),e&&(ln=new ResizeObserver(e=>{e&&e.length>0&&!P.value&&!w.value&&Ce(()=>{zn(e[0].contentRect.width)})}),ln.observe(e))},{immediate:!0}),a(()=>{Ie.value&&!B()||dr()}),t(()=>v.value,e=>{Bt.value||(P.value=!e)}),t(()=>_.maxHeight,()=>{e(()=>{zn()})}),t([()=>_.estimatedPreviewHeightPx,()=>A.value],()=>{H.value||It()||P.value||(V.value=Pt(),cn.value=V.value)}),t(()=>Ct.value,e=>y(null,null,function*(){e&&(Ne.value?(H.value||(R.value?(an(),Ut.value=A.value.length):ir()),_.loading||H.value||ir(),!P.value&&v.value&&R.value&&ur()):yield dr())}),{immediate:!1}),s(()=>{Xt&&clearTimeout(Xt),rn(),ln&&ln.disconnect(),G&&=(G.abort(),null),cr(),$(),on(),At()}),t(()=>w.value,t=>y(null,null,function*(){t?($(),G&&G.abort()):B()&&!H.value&&(yield e(),R.value?(an(),ur()):P.value||ir())}),{immediate:!1}),(e,t)=>(r(),g(`div`,{ref_key:`blockContainer`,ref:yt,class:h([`mermaid-block-container rounded-lg border overflow-hidden`,[{"is-rendering":_.loading,dark:_.isDark}]]),"data-markstream-mermaid":`1`,"data-markstream-mode":P.value?`fallback`:H.value?`preview`:`pending`,"data-markstream-pending":fn.value?`true`:void 0},[_.showHeader?(r(),g(`div`,Ue,[e.$slots[`header-left`]?(r(),g(`div`,We,[de(e.$slots,`header-left`,{},void 0,!0)])):(r(),g(`div`,Ge,[d(`span`,{class:`icon-slot action-icon shrink-0`,innerHTML:m(` diff --git a/apps/pythinker-code/dist-web/assets/index3-CeHHGRW3.js b/apps/pythinker-code/dist-web/assets/index3-CeHHGRW3.js new file mode 100644 index 000000000..126dbdef2 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/index3-CeHHGRW3.js @@ -0,0 +1 @@ +import e from"./CodeBlockNode-BscDteEG.js";e.install=t=>{t.component(e.__name,e)};export{e as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/index3-mVb7iXlv.js b/apps/pythinker-code/dist-web/assets/index3-mVb7iXlv.js deleted file mode 100644 index 2a85eb4e4..000000000 --- a/apps/pythinker-code/dist-web/assets/index3-mVb7iXlv.js +++ /dev/null @@ -1 +0,0 @@ -import e from"./CodeBlockNode-uERC4D15.js";e.install=t=>{t.component(e.__name,e)};export{e as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/index4-BTqbYikG.js b/apps/pythinker-code/dist-web/assets/index4-BTqbYikG.js deleted file mode 100644 index 25b91da84..000000000 --- a/apps/pythinker-code/dist-web/assets/index4-BTqbYikG.js +++ /dev/null @@ -1 +0,0 @@ -import e from"./Tooltip-CYPLmGXR.js";e.install=t=>{t.component(e.__name,e)};export{e as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/index4-Gxd-bmd4.js b/apps/pythinker-code/dist-web/assets/index4-Gxd-bmd4.js new file mode 100644 index 000000000..96e5783f5 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/index4-Gxd-bmd4.js @@ -0,0 +1 @@ +import e from"./Tooltip-DbjeYWS5.js";e.install=t=>{t.component(e.__name,e)};export{e as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/index5-DTEBXfOq.js b/apps/pythinker-code/dist-web/assets/index5-DnCMqCxw.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/index5-DTEBXfOq.js rename to apps/pythinker-code/dist-web/assets/index5-DnCMqCxw.js index a6251f459..1dda554e7 100644 --- a/apps/pythinker-code/dist-web/assets/index5-DTEBXfOq.js +++ b/apps/pythinker-code/dist-web/assets/index5-DnCMqCxw.js @@ -1 +1 @@ -import{E as e,I as t,U as n,ct as r,g as i,k as a,m as o,ot as s,q as c,w as l,y as u,z as d}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import f from"./CodeBlockNode-uERC4D15.js";var p=Object.defineProperty,m=Object.defineProperties,h=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b=l({__name:`MarkdownCodeBlockNode`,props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:`vitesse-dark`},lightTheme:{default:`vitesse-light`},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:[`previewCode`,`copy`],setup(l,{emit:p}){let b=l,x=p,S=f,C=n(),w=o(()=>{return e=((e,t)=>{for(var n in t||={})_.call(t,n)&&y(e,n,t[n]);if(g)for(var n of g(t))v.call(t,n)&&y(e,n,t[n]);return e})({},C),t={node:b.node,loading:b.loading,stream:b.stream,darkTheme:b.darkTheme,lightTheme:b.lightTheme,isDark:b.isDark,isShowPreview:b.isShowPreview,enableFontSizeControl:b.enableFontSizeControl,minWidth:b.minWidth,maxWidth:b.maxWidth,themes:b.themes,showHeader:b.showHeader,showCopyButton:b.showCopyButton,showExpandButton:b.showExpandButton,showPreviewButton:b.showPreviewButton,showCollapseButton:b.showCollapseButton,showFontSizeButtons:b.showFontSizeButtons,showTooltips:b.showTooltips,estimatedHeightPx:b.estimatedHeightPx,estimatedContentHeightPx:b.estimatedContentHeightPx},m(e,h(t));var e,t});function T(e){x(`previewCode`,{type:e.artifactType,content:b.node.code,title:e.artifactTitle})}return(n,o)=>(t(),i(s(S),a(w.value,{onPreviewCode:T,onCopy:o[0]||=e=>x(`copy`,e)}),u({_:2},[n.$slots[`header-left`]?{name:`header-left`,fn:c(()=>[d(n.$slots,`header-left`)]),key:`0`}:void 0,n.$slots[`header-right`]?{name:`header-right`,fn:c(()=>[d(n.$slots,`header-right`)]),key:`1`}:void 0,n.$slots.loading?{name:`loading`,fn:c(t=>[d(n.$slots,`loading`,r(e(t)))]),key:`2`}:void 0]),1040))}});b.install=e=>{e.component(b.__name,b)};export{b as default}; \ No newline at end of file +import{E as e,I as t,U as n,ct as r,g as i,k as a,m as o,ot as s,q as c,w as l,y as u,z as d}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import f from"./CodeBlockNode-BscDteEG.js";var p=Object.defineProperty,m=Object.defineProperties,h=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,y=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b=l({__name:`MarkdownCodeBlockNode`,props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:`vitesse-dark`},lightTheme:{default:`vitesse-light`},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:[`previewCode`,`copy`],setup(l,{emit:p}){let b=l,x=p,S=f,C=n(),w=o(()=>{return e=((e,t)=>{for(var n in t||={})_.call(t,n)&&y(e,n,t[n]);if(g)for(var n of g(t))v.call(t,n)&&y(e,n,t[n]);return e})({},C),t={node:b.node,loading:b.loading,stream:b.stream,darkTheme:b.darkTheme,lightTheme:b.lightTheme,isDark:b.isDark,isShowPreview:b.isShowPreview,enableFontSizeControl:b.enableFontSizeControl,minWidth:b.minWidth,maxWidth:b.maxWidth,themes:b.themes,showHeader:b.showHeader,showCopyButton:b.showCopyButton,showExpandButton:b.showExpandButton,showPreviewButton:b.showPreviewButton,showCollapseButton:b.showCollapseButton,showFontSizeButtons:b.showFontSizeButtons,showTooltips:b.showTooltips,estimatedHeightPx:b.estimatedHeightPx,estimatedContentHeightPx:b.estimatedContentHeightPx},m(e,h(t));var e,t});function T(e){x(`previewCode`,{type:e.artifactType,content:b.node.code,title:e.artifactTitle})}return(n,o)=>(t(),i(s(S),a(w.value,{onPreviewCode:T,onCopy:o[0]||=e=>x(`copy`,e)}),u({_:2},[n.$slots[`header-left`]?{name:`header-left`,fn:c(()=>[d(n.$slots,`header-left`)]),key:`0`}:void 0,n.$slots[`header-right`]?{name:`header-right`,fn:c(()=>[d(n.$slots,`header-right`)]),key:`1`}:void 0,n.$slots.loading?{name:`loading`,fn:c(t=>[d(n.$slots,`loading`,r(e(t)))]),key:`2`}:void 0]),1040))}});b.install=e=>{e.component(b.__name,b)};export{b as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/index6-KRBW8xCP.js b/apps/pythinker-code/dist-web/assets/index6-CmbcA3ap.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/index6-KRBW8xCP.js rename to apps/pythinker-code/dist-web/assets/index6-CmbcA3ap.js index 6c4f1ae6d..b6197c2e8 100644 --- a/apps/pythinker-code/dist-web/assets/index6-KRBW8xCP.js +++ b/apps/pythinker-code/dist-web/assets/index6-CmbcA3ap.js @@ -1 +1 @@ -import{A as e,G as t,I as n,N as r,O as i,S as a,T as o,_ as s,h as c,j as ee,lt as l,m as u,n as d,nt as f,q as p,st as m,ut as h,v as g,w as _}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{G as v,K as y,U as te,W as ne,_ as b,d as re,et as ie,q as x,w as ae}from"./index-CJN6blp7.js";var S=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),C=[`data-markstream-mode`,`data-markstream-pending`],w={key:0,class:`math-loading-overlay`},T=[`innerHTML`],E={key:1,class:`math-block__fallback text-left`},D=b(_({__name:`MathBlockNode`,props:{node:{},indexKey:{},cacheScope:{}},setup(_){let b=_,D=f(null),O=i(ie,null),k=u(()=>v(b.node.content)),A=o()?.vnode.el?.nodeType===1,j=u(()=>re(b,{})),M=function(){if(!b.node.content)return{html:``,text:b.node.raw,loading:!1};if(b.node.loading)return{html:``,text:``,loading:!0};let e=y();if(!e){let e=typeof window>`u`||A;return{html:``,text:e?b.node.raw:``,loading:!e}}try{let t=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return x(k.value,!0,t),{html:t,text:``,loading:!1}}catch{return{html:``,text:b.node.loading?``:b.node.raw,loading:b.node.loading}}}(),N=f(M.html),P=f(M.text),F=!1,I=0,L=!1,R=null,z=ae(),B=null,V=``,H=f(M.loading),U=f(!1),W=f(q());function G(e){e!=null&&e!==I||(U.value=!1)}function K(){if(b.indexKey==null)return``;let e=b.cacheScope??z?.scope;return`${e!=null&&String(e).length>0?`${String(e)}:`:``}math-block:${String(b.indexKey)}`}function q(){var e;let t=K();return t&&(e=z?.cache.get(t))!=null?e:0}function J(){if(W.value===0)return;W.value=0;let e=K();e&&z?.cache.set(e,0)}function Y(e){if(N.value)return void J();if(!Number.isFinite(e)||e<=0)return;let t=Math.max(W.value,e);if(t===W.value)return;W.value=t;let n=K();n&&z?.cache.set(n,t)}function X(){e(()=>{Y(D.value?.offsetHeight??0)})}function Z(){let e=V;O&&e&&(V=``,O.markSettled(e))}function Q(){return S(this,null,function*(){if(L)return Z(),void G();R&&=(R.abort(),null);let t=++I;if(!b.node.content)return Z(),G(),H.value=!1,N.value=``,P.value=b.node.raw,F=!1,void X();let n=new AbortController;R=n,U.value=!0,L||t!==I||n.signal.aborted?L||G(t):(function(){let e=j.value;O&&e&&V!==e&&(V&&O.markSettled(V),V=e,O.markPending(e))}(),ne(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(e=>{L||t!==I||(N.value=e,P.value=``,F=!0,H.value=!1,J(),X())}).catch(e=>S(null,null,function*(){if(L||t!==I)return;let n=e?.code||e?.name,r=n===`KATEX_DISABLED`;if(n===`WORKER_INIT_ERROR`||e?.fallbackToRenderer||(n===`WORKER_BUSY`||n===`WORKER_TIMEOUT`)&&!b.node.loading){let e=yield te();if(L||t!==I)return;if(e){try{let t=e.renderToString(k.value,{throwOnError:b.node.loading,displayMode:!0});N.value=t,P.value=``,F=!0,H.value=!1,J(),X(),x(k.value,!0,t)}catch{}return}}if(r||!b.node.loading)return H.value=!1,N.value=``,P.value=b.node.raw,void X();F||(H.value=!0)})).finally(()=>{L||t!==I||(G(t),function(){let t=V;O&&t&&(V=``,e(()=>{if(!L){let e=D.value?.offsetHeight??0;e>0&&O.reportHeight(t,e)}O.markSettled(t)}))}())}))})}M.html&&(F=!0),M.html&&J();let oe=[{family:`$$`,open:`$$`,close:`$$`},{family:`\\[]`,open:`\\[`,close:`\\]`},{family:`\\[]`,open:`\\[`,close:`]`},{family:`[]`,open:`[`,close:`\\]`},{family:`[]`,open:`[`,close:`]`},{family:`\\()`,open:`\\(`,close:`\\)`},{family:`$`,open:`$`,close:`$`}];function $(e,t){return function(e){let t=String(e??``);for(let{family:e,open:n,close:r}of oe)if((n!==`$`||!t.startsWith(`$$`)&&!t.endsWith(`$$`))&&t.length>=n.length+r.length&&t.startsWith(n)&&t.endsWith(r))return{family:e,inner:t.slice(n.length,t.length-r.length),trusted:!0};return null}(e)||{family:`content`,inner:String(t??``),trusted:!1}}return t(()=>[b.node.content,b.node.loading,b.node.raw],([e,,t],[n,,r])=>{var i,a;(i=$(r,n),a=$(t,e),i.inner===``||i.family===a.family&&(i.trusted&&a.trusted?a.inner.startsWith(i.inner):a.inner===i.inner))||J(),Q()},{flush:`post`}),t([()=>b.indexKey,()=>b.cacheScope],()=>{W.value=q(),X()}),r(()=>{typeof ResizeObserver<`u`&&D.value&&(B=new ResizeObserver(()=>{Y(D.value?.offsetHeight??0)}),B.observe(D.value)),X(),N.value||Q()}),ee(()=>{L=!0,Z(),R&&=(R.abort(),null),B?.disconnect(),B=null}),(e,t)=>(n(),g(`div`,{ref_key:`containerEl`,ref:D,class:`math-block text-center overflow-x-auto relative`,"data-markstream-math":`block`,"data-markstream-mode":N.value?`katex`:P.value?`fallback`:`loading`,"data-markstream-pending":U.value?`true`:void 0,style:l(W.value?{minHeight:`${W.value}px`}:void 0)},[a(d,{name:`math-fade`},{default:p(()=>[!H.value||N.value||P.value?s(``,!0):(n(),g(`div`,w,[...t[0]||=[c(`div`,{class:`math-loading-spinner`},null,-1)]]))]),_:1}),N.value?(n(),g(`div`,{key:0,class:m([`math-block__content`,{"math-rendering":H.value}]),innerHTML:N.value},null,10,T)):P.value?(n(),g(`pre`,E,h(P.value),1)):(n(),g(`div`,{key:2,class:m([`math-block__content`,{"math-rendering":H.value}])},null,2))],12,C))}}),[[`__scopeId`,`data-v-939191ad`]]);D.install=e=>{e.component(D.__name,D)};export{D as default}; \ No newline at end of file +import{A as e,G as t,I as n,N as r,O as i,S as a,T as o,_ as s,h as c,j as ee,lt as l,m as u,n as d,nt as f,q as p,st as m,ut as h,v as g,w as _}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{G as v,K as y,U as te,W as ne,_ as b,d as re,et as ie,q as x,w as ae}from"./index-CIrZXSM-.js";var S=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),C=[`data-markstream-mode`,`data-markstream-pending`],w={key:0,class:`math-loading-overlay`},T=[`innerHTML`],E={key:1,class:`math-block__fallback text-left`},D=b(_({__name:`MathBlockNode`,props:{node:{},indexKey:{},cacheScope:{}},setup(_){let b=_,D=f(null),O=i(ie,null),k=u(()=>v(b.node.content)),A=o()?.vnode.el?.nodeType===1,j=u(()=>re(b,{})),M=function(){if(!b.node.content)return{html:``,text:b.node.raw,loading:!1};if(b.node.loading)return{html:``,text:``,loading:!0};let e=y();if(!e){let e=typeof window>`u`||A;return{html:``,text:e?b.node.raw:``,loading:!e}}try{let t=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return x(k.value,!0,t),{html:t,text:``,loading:!1}}catch{return{html:``,text:b.node.loading?``:b.node.raw,loading:b.node.loading}}}(),N=f(M.html),P=f(M.text),F=!1,I=0,L=!1,R=null,z=ae(),B=null,V=``,H=f(M.loading),U=f(!1),W=f(q());function G(e){e!=null&&e!==I||(U.value=!1)}function K(){if(b.indexKey==null)return``;let e=b.cacheScope??z?.scope;return`${e!=null&&String(e).length>0?`${String(e)}:`:``}math-block:${String(b.indexKey)}`}function q(){var e;let t=K();return t&&(e=z?.cache.get(t))!=null?e:0}function J(){if(W.value===0)return;W.value=0;let e=K();e&&z?.cache.set(e,0)}function Y(e){if(N.value)return void J();if(!Number.isFinite(e)||e<=0)return;let t=Math.max(W.value,e);if(t===W.value)return;W.value=t;let n=K();n&&z?.cache.set(n,t)}function X(){e(()=>{Y(D.value?.offsetHeight??0)})}function Z(){let e=V;O&&e&&(V=``,O.markSettled(e))}function Q(){return S(this,null,function*(){if(L)return Z(),void G();R&&=(R.abort(),null);let t=++I;if(!b.node.content)return Z(),G(),H.value=!1,N.value=``,P.value=b.node.raw,F=!1,void X();let n=new AbortController;R=n,U.value=!0,L||t!==I||n.signal.aborted?L||G(t):(function(){let e=j.value;O&&e&&V!==e&&(V&&O.markSettled(V),V=e,O.markPending(e))}(),ne(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(e=>{L||t!==I||(N.value=e,P.value=``,F=!0,H.value=!1,J(),X())}).catch(e=>S(null,null,function*(){if(L||t!==I)return;let n=e?.code||e?.name,r=n===`KATEX_DISABLED`;if(n===`WORKER_INIT_ERROR`||e?.fallbackToRenderer||(n===`WORKER_BUSY`||n===`WORKER_TIMEOUT`)&&!b.node.loading){let e=yield te();if(L||t!==I)return;if(e){try{let t=e.renderToString(k.value,{throwOnError:b.node.loading,displayMode:!0});N.value=t,P.value=``,F=!0,H.value=!1,J(),X(),x(k.value,!0,t)}catch{}return}}if(r||!b.node.loading)return H.value=!1,N.value=``,P.value=b.node.raw,void X();F||(H.value=!0)})).finally(()=>{L||t!==I||(G(t),function(){let t=V;O&&t&&(V=``,e(()=>{if(!L){let e=D.value?.offsetHeight??0;e>0&&O.reportHeight(t,e)}O.markSettled(t)}))}())}))})}M.html&&(F=!0),M.html&&J();let oe=[{family:`$$`,open:`$$`,close:`$$`},{family:`\\[]`,open:`\\[`,close:`\\]`},{family:`\\[]`,open:`\\[`,close:`]`},{family:`[]`,open:`[`,close:`\\]`},{family:`[]`,open:`[`,close:`]`},{family:`\\()`,open:`\\(`,close:`\\)`},{family:`$`,open:`$`,close:`$`}];function $(e,t){return function(e){let t=String(e??``);for(let{family:e,open:n,close:r}of oe)if((n!==`$`||!t.startsWith(`$$`)&&!t.endsWith(`$$`))&&t.length>=n.length+r.length&&t.startsWith(n)&&t.endsWith(r))return{family:e,inner:t.slice(n.length,t.length-r.length),trusted:!0};return null}(e)||{family:`content`,inner:String(t??``),trusted:!1}}return t(()=>[b.node.content,b.node.loading,b.node.raw],([e,,t],[n,,r])=>{var i,a;(i=$(r,n),a=$(t,e),i.inner===``||i.family===a.family&&(i.trusted&&a.trusted?a.inner.startsWith(i.inner):a.inner===i.inner))||J(),Q()},{flush:`post`}),t([()=>b.indexKey,()=>b.cacheScope],()=>{W.value=q(),X()}),r(()=>{typeof ResizeObserver<`u`&&D.value&&(B=new ResizeObserver(()=>{Y(D.value?.offsetHeight??0)}),B.observe(D.value)),X(),N.value||Q()}),ee(()=>{L=!0,Z(),R&&=(R.abort(),null),B?.disconnect(),B=null}),(e,t)=>(n(),g(`div`,{ref_key:`containerEl`,ref:D,class:`math-block text-center overflow-x-auto relative`,"data-markstream-math":`block`,"data-markstream-mode":N.value?`katex`:P.value?`fallback`:`loading`,"data-markstream-pending":U.value?`true`:void 0,style:l(W.value?{minHeight:`${W.value}px`}:void 0)},[a(d,{name:`math-fade`},{default:p(()=>[!H.value||N.value||P.value?s(``,!0):(n(),g(`div`,w,[...t[0]||=[c(`div`,{class:`math-loading-spinner`},null,-1)]]))]),_:1}),N.value?(n(),g(`div`,{key:0,class:m([`math-block__content`,{"math-rendering":H.value}]),innerHTML:N.value},null,10,T)):P.value?(n(),g(`pre`,E,h(P.value),1)):(n(),g(`div`,{key:2,class:m([`math-block__content`,{"math-rendering":H.value}])},null,2))],12,C))}}),[[`__scopeId`,`data-v-939191ad`]]);D.install=e=>{e.component(D.__name,D)};export{D as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/index7-ClZ3JBPh.js b/apps/pythinker-code/dist-web/assets/index7-pWd8I70s.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/index7-ClZ3JBPh.js rename to apps/pythinker-code/dist-web/assets/index7-pWd8I70s.js index 0346caf23..3c54266ac 100644 --- a/apps/pythinker-code/dist-web/assets/index7-ClZ3JBPh.js +++ b/apps/pythinker-code/dist-web/assets/index7-pWd8I70s.js @@ -1 +1 @@ -import{G as e,I as t,N as n,T as r,_ as i,g as a,h as o,j as s,m as c,n as l,nt as u,q as d,ut as f,v as p,w as m,z as h}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{G as g,K as _,U as v,W as y,_ as b,q as x}from"./index-CJN6blp7.js";var S=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),C=[`data-markstream-mode`,`data-markstream-pending`],w=[`innerHTML`],T={key:1,class:`math-inline math-inline--fallback`},E={class:`math-inline__loading`,role:`status`,"aria-live":`polite`},D=b(m({__name:`MathInlineNode`,props:{node:{}},setup(m){let b=m,D=u(null),O=c(()=>b.node.markup===`$$`),k=c(()=>g(b.node.content)),A=r()?.vnode.el?.nodeType===1,j=function(){if(!b.node.content)return{html:``,text:b.node.loading?``:b.node.raw,loading:b.node.loading};if(b.node.loading)return{html:``,text:``,loading:!0};let e=_();if(!e){let e=typeof window>`u`||A;return{html:``,text:e?b.node.raw:``,loading:!e}}try{let t=e.renderToString(k.value,{throwOnError:!1,displayMode:O.value});return x(k.value,O.value,t),{html:t,text:``,loading:!1}}catch{return{html:``,text:b.node.loading?``:b.node.raw,loading:b.node.loading}}}(),M=u(j.html),N=u(j.text),P=!1,F=0,I=!1,L=null,R=u(j.loading),z=u(!1);function B(e){e!=null&&e!==F||(z.value=!1)}function V(){return S(this,null,function*(){if(I)return;L&&=(L.abort(),null);let e=++F;if(!b.node.content)return B(),M.value=``,N.value=b.node.loading?``:b.node.raw,R.value=b.node.loading,void(P=!1);let t=new AbortController;L=t,z.value=!0,I||e!==F||t.signal.aborted?B(e):y(k.value,O.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:t.signal}).then(t=>{I||e!==F||(M.value=t,N.value=``,R.value=!1,P=!0)}).catch(t=>S(null,null,function*(){if(I||e!==F)return;let n=t?.code||t?.name,r=n===`KATEX_DISABLED`;if(n===`WORKER_INIT_ERROR`||t?.fallbackToRenderer||(n===`WORKER_BUSY`||n===`WORKER_TIMEOUT`)&&!b.node.loading){let t=yield v();if(I||e!==F)return;if(t){try{let e=t.renderToString(k.value,{throwOnError:b.node.loading,displayMode:O.value});M.value=e,N.value=``,R.value=!1,P=!0,x(k.value,O.value,e)}catch{}return}}if(r||!b.node.loading)return R.value=!1,M.value=``,void(N.value=b.node.raw);P||(R.value=!0)})).finally(()=>{I||B(e)})})}return j.html&&(P=!0),e(()=>[b.node.content,b.node.loading,b.node.raw,b.node.markup],()=>{V()}),n(()=>{M.value||V()}),s(()=>{I=!0,L&&=(L.abort(),null)}),(e,n)=>(t(),p(`span`,{ref_key:`containerEl`,ref:D,class:`math-inline-wrapper`,"data-markstream-math":`inline`,"data-markstream-mode":M.value?`katex`:N.value?`fallback`:`loading`,"data-markstream-pending":z.value?`true`:void 0},[M.value?(t(),p(`span`,{key:0,class:`math-inline`,innerHTML:M.value},null,8,w)):N.value?(t(),p(`span`,T,f(N.value),1)):R.value?(t(),a(l,{key:2,name:`table-node-fade`},{default:d(()=>[o(`span`,E,[h(e.$slots,`loading`,{isLoading:R.value},()=>[n[0]||=o(`span`,{class:`math-inline__spinner animate-spin`,"aria-hidden":`true`},null,-1),n[1]||=o(`span`,{class:`sr-only`},`Loading`,-1)],!0)])]),_:3})):i(``,!0)],8,C))}}),[[`__scopeId`,`data-v-6c556261`]]);D.install=e=>{e.component(D.__name,D)};export{D as default}; \ No newline at end of file +import{G as e,I as t,N as n,T as r,_ as i,g as a,h as o,j as s,m as c,n as l,nt as u,q as d,ut as f,v as p,w as m,z as h}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{G as g,K as _,U as v,W as y,_ as b,q as x}from"./index-CIrZXSM-.js";var S=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),C=[`data-markstream-mode`,`data-markstream-pending`],w=[`innerHTML`],T={key:1,class:`math-inline math-inline--fallback`},E={class:`math-inline__loading`,role:`status`,"aria-live":`polite`},D=b(m({__name:`MathInlineNode`,props:{node:{}},setup(m){let b=m,D=u(null),O=c(()=>b.node.markup===`$$`),k=c(()=>g(b.node.content)),A=r()?.vnode.el?.nodeType===1,j=function(){if(!b.node.content)return{html:``,text:b.node.loading?``:b.node.raw,loading:b.node.loading};if(b.node.loading)return{html:``,text:``,loading:!0};let e=_();if(!e){let e=typeof window>`u`||A;return{html:``,text:e?b.node.raw:``,loading:!e}}try{let t=e.renderToString(k.value,{throwOnError:!1,displayMode:O.value});return x(k.value,O.value,t),{html:t,text:``,loading:!1}}catch{return{html:``,text:b.node.loading?``:b.node.raw,loading:b.node.loading}}}(),M=u(j.html),N=u(j.text),P=!1,F=0,I=!1,L=null,R=u(j.loading),z=u(!1);function B(e){e!=null&&e!==F||(z.value=!1)}function V(){return S(this,null,function*(){if(I)return;L&&=(L.abort(),null);let e=++F;if(!b.node.content)return B(),M.value=``,N.value=b.node.loading?``:b.node.raw,R.value=b.node.loading,void(P=!1);let t=new AbortController;L=t,z.value=!0,I||e!==F||t.signal.aborted?B(e):y(k.value,O.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:t.signal}).then(t=>{I||e!==F||(M.value=t,N.value=``,R.value=!1,P=!0)}).catch(t=>S(null,null,function*(){if(I||e!==F)return;let n=t?.code||t?.name,r=n===`KATEX_DISABLED`;if(n===`WORKER_INIT_ERROR`||t?.fallbackToRenderer||(n===`WORKER_BUSY`||n===`WORKER_TIMEOUT`)&&!b.node.loading){let t=yield v();if(I||e!==F)return;if(t){try{let e=t.renderToString(k.value,{throwOnError:b.node.loading,displayMode:O.value});M.value=e,N.value=``,R.value=!1,P=!0,x(k.value,O.value,e)}catch{}return}}if(r||!b.node.loading)return R.value=!1,M.value=``,void(N.value=b.node.raw);P||(R.value=!0)})).finally(()=>{I||B(e)})})}return j.html&&(P=!0),e(()=>[b.node.content,b.node.loading,b.node.raw,b.node.markup],()=>{V()}),n(()=>{M.value||V()}),s(()=>{I=!0,L&&=(L.abort(),null)}),(e,n)=>(t(),p(`span`,{ref_key:`containerEl`,ref:D,class:`math-inline-wrapper`,"data-markstream-math":`inline`,"data-markstream-mode":M.value?`katex`:N.value?`fallback`:`loading`,"data-markstream-pending":z.value?`true`:void 0},[M.value?(t(),p(`span`,{key:0,class:`math-inline`,innerHTML:M.value},null,8,w)):N.value?(t(),p(`span`,T,f(N.value),1)):R.value?(t(),a(l,{key:2,name:`table-node-fade`},{default:d(()=>[o(`span`,E,[h(e.$slots,`loading`,{isLoading:R.value},()=>[n[0]||=o(`span`,{class:`math-inline__spinner animate-spin`,"aria-hidden":`true`},null,-1),n[1]||=o(`span`,{class:`sr-only`},`Loading`,-1)],!0)])]),_:3})):i(``,!0)],8,C))}}),[[`__scopeId`,`data-v-6c556261`]]);D.install=e=>{e.component(D.__name,D)};export{D as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/index8-CkSxjxQO.js b/apps/pythinker-code/dist-web/assets/index8-wWmUQ9CO.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index8-CkSxjxQO.js rename to apps/pythinker-code/dist-web/assets/index8-wWmUQ9CO.js index ce441bf60..55f67e2a3 100644 --- a/apps/pythinker-code/dist-web/assets/index8-CkSxjxQO.js +++ b/apps/pythinker-code/dist-web/assets/index8-wWmUQ9CO.js @@ -1 +1 @@ -import{A as e,G as t,I as n,J as r,N as i,O as a,U as o,_ as s,c,h as l,j as ee,lt as u,m as d,nt as f,ot as p,st as m,ut as h,v as g,w as te}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{_,a as ne,d as re,et as ie,h as ae,n as oe,p as se,r as ce,v as le,x as ue}from"./index-CJN6blp7.js";var de=Object.defineProperty,v=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||={})y.call(t,n)&&x(e,n,t[n]);if(v)for(var n of v(t))b.call(t,n)&&x(e,n,t[n]);return e},C=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),fe=[`data-markstream-mode`,`data-markstream-pending`],pe={key:0,class:`d2-block-header flex justify-between items-center border-b`},me={class:`d2-header-actions flex items-center`},he={key:0,class:`d2-mode-toggle flex items-center gap-0.5`},ge=[`aria-label`],_e={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},ve={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},ye=[`aria-label`],be=[`aria-pressed`],xe={key:0,class:`d2-source`},Se={class:`d2-code`},Ce={key:0,class:`d2-error mt-2 text-xs`},we={key:1},Te={key:0,class:`d2-source`},Ee={class:`d2-code`},De={key:0,class:`d2-error mt-2 text-xs`},Oe=[`innerHTML`],ke={key:0,class:`d2-error px-4 pb-3 text-xs`},w=_(te({__name:`D2BlockNode`,props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(te){let _=te,de=o(),v=a(ie,null),{t:y}=ne(),b=f(!1),x=f(!1),w=f(!1),T=f(!1),E=f(null),D=f(!1),O=f(``),k=f(``),A=f(0),j=f(``),M=f(``),N=f(null),P=f(null),F=f(null),Ae=se(),je=ue(),Me=le(),I=f(null),Ne=typeof window<`u`,Pe=f(!1),L=f(typeof window>`u`||!Me.value),R=d(()=>_.node.code??``),Fe=d(()=>re(_,de)),z=d(()=>[_.isDark?`dark`:`light`,_.themeId??`auto`,_.darkThemeId??`auto`,R.value].join(`:`)),B=d(()=>!!O.value&&k.value===z.value),Ie=d(()=>{if(!Pe.value||!R.value||w.value)return!1;let e=z.value;return!!D.value||j.value!==e&&(!E.value||M.value!==e)}),Le=d(()=>B.value||!!O.value&&Ie.value),V=d(()=>w.value||!T.value||!Le.value),Re=d(()=>{if(V.value&&P.value)return{minHeight:`${P.value}px`}}),ze=d(()=>_.maxHeight===`none`?{maxHeight:`none`}:_.maxHeight==null?void 0:{maxHeight:typeof _.maxHeight==`number`?`${_.maxHeight}px`:String(_.maxHeight)}),H=null,U=!1,W=!1,Be=0,G=null,K=!1,q=null,J=``;typeof window<`u`&&t([()=>F.value,Me],([e,t])=>{var n;if((n=I.value)==null||n.destroy(),I.value=null,!t||L.value)return void(L.value=!0);if(!e)return void(L.value=!1);let r=Ae(e,{rootMargin:je?.value.heavyBlockMargin??je?.value.rootMargin??`160px`,allowIdle:!1});I.value=r,L.value=r.isVisible.value,r.whenVisible.then(()=>{L.value=!0})},{immediate:!0});let Ve={N1:`#E5E7EB`,N2:`#CBD5E1`,N3:`#94A3B8`,N4:`#64748B`,N5:`#475569`,N6:`#334155`,N7:`#0B1220`,B1:`#60A5FA`,B2:`#3B82F6`,B3:`#2563EB`,B4:`#1D4ED8`,B5:`#1E40AF`,B6:`#111827`,AA2:`#22D3EE`,AA4:`#0EA5E9`,AA5:`#0284C7`,AB4:`#FBBF24`,AB5:`#F59E0B`};function He(e){return!e||e.disabled}function Y(e,t,n=`top`){if(He(e.currentTarget))return;let r=e,i=r?.clientX!=null&&r?.clientY!=null?{x:r.clientX,y:r.clientY}:void 0;ae(e.currentTarget,t,n,!1,i,_.isDark)}function X(){oe()}function Ue(e){if(He(e.currentTarget))return;let t=b.value?y(`common.copied`)||`Copied`:y(`common.copy`)||`Copy`,n=e,r=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;ae(e.currentTarget,t,`top`,!1,r,_.isDark)}function We(){return C(this,null,function*(){try{let e=R.value;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),b.value=!0,setTimeout(()=>{b.value=!1},1e3)}catch(e){console.error(`Copy failed:`,e)}})}function Ge(){x.value=!x.value}function Ke(e){w.value=e===`source`}let qe=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],Je=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Ye(e){if(!e)return``;let t=e.trim();return Je.test(t)?t:``}function Xe(){O.value=``,k.value=``}function Z(e){return W||e!==A.value}function Ze(){return C(this,null,function*(){if(!Ne||W||!L.value||_.loading&&!_.progressiveRender)return;let t=z.value;if(t===j.value&&!E.value&&B.value)return T.value=!0,void(_.loading&&(w.value=!1));let n=R.value;if(!n)return Xe(),E.value=null,j.value=``,void(M.value=``);let r=++A.value;D.value=!0,E.value=null,M.value=``,function(){let e=Fe.value;v&&e&&J!==e&&(J&&v.markSettled(J),J=e,v.markPending(e))}();try{let e=yield function(){return C(this,null,function*(){if(H)return H;let e=yield ce();if(W||!e)return null;if(typeof e==`function`){let t=new e;return t&&typeof t.compile==`function`?H=t:typeof e.compile==`function`&&(H=e),H}return e?.D2&&typeof e.D2==`function`?(H=new e.D2,H):(typeof e.compile==`function`&&(H=e),H)})}();if(Z(r))return;if(!e)return T.value=!1,w.value=!0,Xe(),E.value=`D2 is not available.`,void(M.value=t);if(typeof e.compile!=`function`||typeof e.render!=`function`)throw TypeError(`D2 instance is missing compile/render methods.`);T.value=!0;let i=yield e.compile(n);if(Z(r))return;let a=i?.diagram??i,o=i?.renderOptions??i?.options??{},s=_.themeId??o.themeID,c=_.darkThemeId??o.darkThemeID,l=S({},o);if(l.themeID=_.isDark&&c!=null?c:s,l.darkThemeID=null,l.darkThemeOverrides=null,_.isDark){let e=o.themeOverrides&&typeof o.themeOverrides==`object`?o.themeOverrides:null;l.themeOverrides=S(S({},Ve),e||{})}let ee=yield e.render(a,l);if(Z(r))return;let u=function(e){return e?typeof e==`string`?e:typeof e.svg==`string`?e.svg:typeof e.data==`string`?e.data:``:``}(ee);if(!u)throw Error(`D2 render returned empty output.`);(function(e,t){let n=function(e){if(typeof window>`u`||typeof DOMParser>`u`||!e)return``;let t=e.replace(/["']\s*javascript:/gi,`#`).replace(/\bjavascript:/gi,`#`).replace(/["']\s*vbscript:/gi,`#`).replace(/\bvbscript:/gi,`#`).replace(/\bdata:text\/html/gi,`#`),n=new DOMParser().parseFromString(t,`image/svg+xml`).documentElement;if(!n||n.nodeName.toLowerCase()!==`svg`)return``;let r=n;return function(e){let t=new Set([`script`]),n=[e,...Array.from(e.querySelectorAll(`*`))];for(let e of n){if(t.has(e.tagName.toLowerCase())){e.remove();continue}let n=Array.from(e.attributes);for(let t of n){let n=t.name;if(/^on/i.test(n))e.removeAttribute(n);else{if(n===`style`&&t.value){let r=t.value;if(qe.some(e=>e.test(r))){e.removeAttribute(n);continue}}if((n===`href`||n===`xlink:href`)&&t.value){let r=Ye(t.value);if(!r){e.removeAttribute(n);continue}r!==t.value&&e.setAttribute(n,r)}}}}}(r),r.classList.add(`markstream-d2-root-svg`),r.outerHTML}(e);O.value=n||``,k.value=n?t:``})(u,t),j.value=t,M.value=``,_.loading&&(w.value=!1),E.value=null}catch(e){if(Z(r))return;let n=e?.message?String(e.message):`D2 render failed.`;_.loading||(E.value=n,M.value=t),j.value=``,n.includes(`@terrastruct/d2`)&&(T.value=!1,w.value=!0)}finally{Z(r)||(D.value=!1,K?(K=!1,Q()):function(){let t=J;v&&t&&(J=``,e(()=>{if(!W){let e=F.value?.offsetHeight??0;e>0&&v.reportHeight(t,e)}v.markSettled(t)}))}())}})}function Q(e=!1){if(U||!Ne||W)return;if(D.value)return void(K=!0);let t=Math.max(120,Number(_.progressiveIntervalMs)||0),n=Date.now()-Be;if(!e&&n{G=null,K&&(K=!1,Q(!0))},Math.max(0,t-n))));U=!0;let r=()=>{U=!1,Be=Date.now(),Ze()};typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(r):setTimeout(r,0)}function Qe(){if(B.value)try{let e=new Blob([O.value],{type:`image/svg+xml;charset=utf-8`}),t=URL.createObjectURL(e);if(typeof document<`u`){let e=document.createElement(`a`);e.href=t,e.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(e),e.click(),document.body.removeChild(e)}URL.revokeObjectURL(t)}catch(e){console.error(`Failed to export SVG:`,e)}}function $(){let e=N.value;if(!e)return;let t=e.getBoundingClientRect().height;t>0&&(P.value=t)}return t(()=>[_.node.code,_.loading,_.isDark,_.themeId,_.darkThemeId],()=>{Q()},{immediate:!0}),t(()=>_.loading,(e,t)=>{t&&!e&&Q(!0)}),t(()=>L.value,e=>{e&&Q(!0)}),t(()=>[V.value,O.value,R.value],()=>{e(()=>{$()})}),i(()=>{Pe.value=!0,e(()=>{$()}),typeof ResizeObserver<`u`&&(q=new ResizeObserver(()=>{$()}),N.value&&q.observe(N.value))}),ee(()=>{var e;W=!0,A.value+=1,K=!1,function(){let e=J;v&&e&&(J=``,v.markSettled(e))}(),j.value=``,(e=I.value)==null||e.destroy(),I.value=null,G!=null&&(clearTimeout(G),G=null),q?.disconnect(),q=null}),(e,t)=>(n(),g(`div`,{ref_key:`viewportTarget`,ref:F,class:m([`d2-block-container rounded-lg border overflow-hidden`,{dark:_.isDark}]),"data-markstream-d2":`1`,"data-markstream-mode":V.value?`fallback`:`preview`,"data-markstream-pending":Ie.value?`true`:void 0},[_.showHeader?(n(),g(`div`,pe,[t[16]||=l(`div`,{class:`flex items-center gap-x-2`},[l(`span`,{class:`d2-label font-medium font-mono`},`D2`)],-1),l(`div`,me,[_.showModeToggle?(n(),g(`div`,he,[l(`button`,{type:`button`,class:m([`mode-btn px-2 py-0.5 rounded`,w.value?``:`is-active`]),onClick:t[0]||=e=>Ke(`preview`),onMouseenter:t[1]||=e=>Y(e,p(y)(`common.preview`)||`Preview`),onFocus:t[2]||=e=>Y(e,p(y)(`common.preview`)||`Preview`),onMouseleave:X,onBlur:X},h(p(y)(`common.preview`)||`Preview`),35),l(`button`,{type:`button`,class:m([`mode-btn px-2 py-0.5 rounded`,w.value?`is-active`:``]),onClick:t[3]||=e=>Ke(`source`),onMouseenter:t[4]||=e=>Y(e,p(y)(`common.source`)||`Source`),onFocus:t[5]||=e=>Y(e,p(y)(`common.source`)||`Source`),onMouseleave:X,onBlur:X},h(p(y)(`common.source`)||`Source`),35)])):s(``,!0),_.showCopyButton?(n(),g(`button`,{key:1,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-label":b.value?p(y)(`common.copied`)||`Copied`:p(y)(`common.copy`)||`Copy`,onClick:We,onMouseenter:t[6]||=e=>Ue(e),onFocus:t[7]||=e=>Ue(e),onMouseleave:X,onBlur:X},[b.value?(n(),g(`svg`,ve,[...t[13]||=[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(n(),g(`svg`,_e,[...t[12]||=[l(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[l(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),l(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],40,ge)):s(``,!0),_.showExportButton&&B.value?(n(),g(`button`,{key:2,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-label":p(y)(`common.export`)||`Export`,onClick:Qe,onMouseenter:t[8]||=e=>Y(e,p(y)(`common.export`)||`Export`),onFocus:t[9]||=e=>Y(e,p(y)(`common.export`)||`Export`),onMouseleave:X,onBlur:X},[...t[14]||=[l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4`})],-1)]],40,ye)):s(``,!0),_.showCollapseButton?(n(),g(`button`,{key:3,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-pressed":x.value,onClick:Ge,onMouseenter:t[10]||=e=>Y(e,x.value?p(y)(`common.expand`)||`Expand`:p(y)(`common.collapse`)||`Collapse`),onFocus:t[11]||=e=>Y(e,x.value?p(y)(`common.expand`)||`Expand`:p(y)(`common.collapse`)||`Collapse`),onMouseleave:X,onBlur:X},[(n(),g(`svg`,{style:u({rotate:x.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...t[15]||=[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,be)):s(``,!0)])])):s(``,!0),r(l(`div`,{ref_key:`bodyRef`,ref:N,class:`d2-block-body`,style:u(Re.value)},[_.loading&&!Le.value?(n(),g(`div`,xe,[l(`pre`,Se,[l(`code`,null,h(R.value),1)]),E.value?(n(),g(`p`,Ce,h(E.value),1)):s(``,!0)])):(n(),g(`div`,we,[V.value?(n(),g(`div`,Te,[l(`pre`,Ee,[l(`code`,null,h(R.value),1)]),E.value?(n(),g(`p`,De,h(E.value),1)):s(``,!0)])):(n(),g(`div`,{key:1,class:`d2-render`,style:u(ze.value)},[l(`div`,{class:`d2-svg`,innerHTML:O.value},null,8,Oe),E.value?(n(),g(`p`,ke,h(E.value),1)):s(``,!0)],4))]))],4),[[c,!x.value]])],10,fe))}}),[[`__scopeId`,`data-v-3b434cf5`]]);w.install=e=>{e.component(w.__name,w)};export{w as default}; \ No newline at end of file +import{A as e,G as t,I as n,J as r,N as i,O as a,U as o,_ as s,c,h as l,j as ee,lt as u,m as d,nt as f,ot as p,st as m,ut as h,v as g,w as te}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{_,a as ne,d as re,et as ie,h as ae,n as oe,p as se,r as ce,v as le,x as ue}from"./index-CIrZXSM-.js";var de=Object.defineProperty,v=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||={})y.call(t,n)&&x(e,n,t[n]);if(v)for(var n of v(t))b.call(t,n)&&x(e,n,t[n]);return e},C=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),fe=[`data-markstream-mode`,`data-markstream-pending`],pe={key:0,class:`d2-block-header flex justify-between items-center border-b`},me={class:`d2-header-actions flex items-center`},he={key:0,class:`d2-mode-toggle flex items-center gap-0.5`},ge=[`aria-label`],_e={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},ve={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},ye=[`aria-label`],be=[`aria-pressed`],xe={key:0,class:`d2-source`},Se={class:`d2-code`},Ce={key:0,class:`d2-error mt-2 text-xs`},we={key:1},Te={key:0,class:`d2-source`},Ee={class:`d2-code`},De={key:0,class:`d2-error mt-2 text-xs`},Oe=[`innerHTML`],ke={key:0,class:`d2-error px-4 pb-3 text-xs`},w=_(te({__name:`D2BlockNode`,props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(te){let _=te,de=o(),v=a(ie,null),{t:y}=ne(),b=f(!1),x=f(!1),w=f(!1),T=f(!1),E=f(null),D=f(!1),O=f(``),k=f(``),A=f(0),j=f(``),M=f(``),N=f(null),P=f(null),F=f(null),Ae=se(),je=ue(),Me=le(),I=f(null),Ne=typeof window<`u`,Pe=f(!1),L=f(typeof window>`u`||!Me.value),R=d(()=>_.node.code??``),Fe=d(()=>re(_,de)),z=d(()=>[_.isDark?`dark`:`light`,_.themeId??`auto`,_.darkThemeId??`auto`,R.value].join(`:`)),B=d(()=>!!O.value&&k.value===z.value),Ie=d(()=>{if(!Pe.value||!R.value||w.value)return!1;let e=z.value;return!!D.value||j.value!==e&&(!E.value||M.value!==e)}),Le=d(()=>B.value||!!O.value&&Ie.value),V=d(()=>w.value||!T.value||!Le.value),Re=d(()=>{if(V.value&&P.value)return{minHeight:`${P.value}px`}}),ze=d(()=>_.maxHeight===`none`?{maxHeight:`none`}:_.maxHeight==null?void 0:{maxHeight:typeof _.maxHeight==`number`?`${_.maxHeight}px`:String(_.maxHeight)}),H=null,U=!1,W=!1,Be=0,G=null,K=!1,q=null,J=``;typeof window<`u`&&t([()=>F.value,Me],([e,t])=>{var n;if((n=I.value)==null||n.destroy(),I.value=null,!t||L.value)return void(L.value=!0);if(!e)return void(L.value=!1);let r=Ae(e,{rootMargin:je?.value.heavyBlockMargin??je?.value.rootMargin??`160px`,allowIdle:!1});I.value=r,L.value=r.isVisible.value,r.whenVisible.then(()=>{L.value=!0})},{immediate:!0});let Ve={N1:`#E5E7EB`,N2:`#CBD5E1`,N3:`#94A3B8`,N4:`#64748B`,N5:`#475569`,N6:`#334155`,N7:`#0B1220`,B1:`#60A5FA`,B2:`#3B82F6`,B3:`#2563EB`,B4:`#1D4ED8`,B5:`#1E40AF`,B6:`#111827`,AA2:`#22D3EE`,AA4:`#0EA5E9`,AA5:`#0284C7`,AB4:`#FBBF24`,AB5:`#F59E0B`};function He(e){return!e||e.disabled}function Y(e,t,n=`top`){if(He(e.currentTarget))return;let r=e,i=r?.clientX!=null&&r?.clientY!=null?{x:r.clientX,y:r.clientY}:void 0;ae(e.currentTarget,t,n,!1,i,_.isDark)}function X(){oe()}function Ue(e){if(He(e.currentTarget))return;let t=b.value?y(`common.copied`)||`Copied`:y(`common.copy`)||`Copy`,n=e,r=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;ae(e.currentTarget,t,`top`,!1,r,_.isDark)}function We(){return C(this,null,function*(){try{let e=R.value;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),b.value=!0,setTimeout(()=>{b.value=!1},1e3)}catch(e){console.error(`Copy failed:`,e)}})}function Ge(){x.value=!x.value}function Ke(e){w.value=e===`source`}let qe=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],Je=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Ye(e){if(!e)return``;let t=e.trim();return Je.test(t)?t:``}function Xe(){O.value=``,k.value=``}function Z(e){return W||e!==A.value}function Ze(){return C(this,null,function*(){if(!Ne||W||!L.value||_.loading&&!_.progressiveRender)return;let t=z.value;if(t===j.value&&!E.value&&B.value)return T.value=!0,void(_.loading&&(w.value=!1));let n=R.value;if(!n)return Xe(),E.value=null,j.value=``,void(M.value=``);let r=++A.value;D.value=!0,E.value=null,M.value=``,function(){let e=Fe.value;v&&e&&J!==e&&(J&&v.markSettled(J),J=e,v.markPending(e))}();try{let e=yield function(){return C(this,null,function*(){if(H)return H;let e=yield ce();if(W||!e)return null;if(typeof e==`function`){let t=new e;return t&&typeof t.compile==`function`?H=t:typeof e.compile==`function`&&(H=e),H}return e?.D2&&typeof e.D2==`function`?(H=new e.D2,H):(typeof e.compile==`function`&&(H=e),H)})}();if(Z(r))return;if(!e)return T.value=!1,w.value=!0,Xe(),E.value=`D2 is not available.`,void(M.value=t);if(typeof e.compile!=`function`||typeof e.render!=`function`)throw TypeError(`D2 instance is missing compile/render methods.`);T.value=!0;let i=yield e.compile(n);if(Z(r))return;let a=i?.diagram??i,o=i?.renderOptions??i?.options??{},s=_.themeId??o.themeID,c=_.darkThemeId??o.darkThemeID,l=S({},o);if(l.themeID=_.isDark&&c!=null?c:s,l.darkThemeID=null,l.darkThemeOverrides=null,_.isDark){let e=o.themeOverrides&&typeof o.themeOverrides==`object`?o.themeOverrides:null;l.themeOverrides=S(S({},Ve),e||{})}let ee=yield e.render(a,l);if(Z(r))return;let u=function(e){return e?typeof e==`string`?e:typeof e.svg==`string`?e.svg:typeof e.data==`string`?e.data:``:``}(ee);if(!u)throw Error(`D2 render returned empty output.`);(function(e,t){let n=function(e){if(typeof window>`u`||typeof DOMParser>`u`||!e)return``;let t=e.replace(/["']\s*javascript:/gi,`#`).replace(/\bjavascript:/gi,`#`).replace(/["']\s*vbscript:/gi,`#`).replace(/\bvbscript:/gi,`#`).replace(/\bdata:text\/html/gi,`#`),n=new DOMParser().parseFromString(t,`image/svg+xml`).documentElement;if(!n||n.nodeName.toLowerCase()!==`svg`)return``;let r=n;return function(e){let t=new Set([`script`]),n=[e,...Array.from(e.querySelectorAll(`*`))];for(let e of n){if(t.has(e.tagName.toLowerCase())){e.remove();continue}let n=Array.from(e.attributes);for(let t of n){let n=t.name;if(/^on/i.test(n))e.removeAttribute(n);else{if(n===`style`&&t.value){let r=t.value;if(qe.some(e=>e.test(r))){e.removeAttribute(n);continue}}if((n===`href`||n===`xlink:href`)&&t.value){let r=Ye(t.value);if(!r){e.removeAttribute(n);continue}r!==t.value&&e.setAttribute(n,r)}}}}}(r),r.classList.add(`markstream-d2-root-svg`),r.outerHTML}(e);O.value=n||``,k.value=n?t:``})(u,t),j.value=t,M.value=``,_.loading&&(w.value=!1),E.value=null}catch(e){if(Z(r))return;let n=e?.message?String(e.message):`D2 render failed.`;_.loading||(E.value=n,M.value=t),j.value=``,n.includes(`@terrastruct/d2`)&&(T.value=!1,w.value=!0)}finally{Z(r)||(D.value=!1,K?(K=!1,Q()):function(){let t=J;v&&t&&(J=``,e(()=>{if(!W){let e=F.value?.offsetHeight??0;e>0&&v.reportHeight(t,e)}v.markSettled(t)}))}())}})}function Q(e=!1){if(U||!Ne||W)return;if(D.value)return void(K=!0);let t=Math.max(120,Number(_.progressiveIntervalMs)||0),n=Date.now()-Be;if(!e&&n{G=null,K&&(K=!1,Q(!0))},Math.max(0,t-n))));U=!0;let r=()=>{U=!1,Be=Date.now(),Ze()};typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(r):setTimeout(r,0)}function Qe(){if(B.value)try{let e=new Blob([O.value],{type:`image/svg+xml;charset=utf-8`}),t=URL.createObjectURL(e);if(typeof document<`u`){let e=document.createElement(`a`);e.href=t,e.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(e),e.click(),document.body.removeChild(e)}URL.revokeObjectURL(t)}catch(e){console.error(`Failed to export SVG:`,e)}}function $(){let e=N.value;if(!e)return;let t=e.getBoundingClientRect().height;t>0&&(P.value=t)}return t(()=>[_.node.code,_.loading,_.isDark,_.themeId,_.darkThemeId],()=>{Q()},{immediate:!0}),t(()=>_.loading,(e,t)=>{t&&!e&&Q(!0)}),t(()=>L.value,e=>{e&&Q(!0)}),t(()=>[V.value,O.value,R.value],()=>{e(()=>{$()})}),i(()=>{Pe.value=!0,e(()=>{$()}),typeof ResizeObserver<`u`&&(q=new ResizeObserver(()=>{$()}),N.value&&q.observe(N.value))}),ee(()=>{var e;W=!0,A.value+=1,K=!1,function(){let e=J;v&&e&&(J=``,v.markSettled(e))}(),j.value=``,(e=I.value)==null||e.destroy(),I.value=null,G!=null&&(clearTimeout(G),G=null),q?.disconnect(),q=null}),(e,t)=>(n(),g(`div`,{ref_key:`viewportTarget`,ref:F,class:m([`d2-block-container rounded-lg border overflow-hidden`,{dark:_.isDark}]),"data-markstream-d2":`1`,"data-markstream-mode":V.value?`fallback`:`preview`,"data-markstream-pending":Ie.value?`true`:void 0},[_.showHeader?(n(),g(`div`,pe,[t[16]||=l(`div`,{class:`flex items-center gap-x-2`},[l(`span`,{class:`d2-label font-medium font-mono`},`D2`)],-1),l(`div`,me,[_.showModeToggle?(n(),g(`div`,he,[l(`button`,{type:`button`,class:m([`mode-btn px-2 py-0.5 rounded`,w.value?``:`is-active`]),onClick:t[0]||=e=>Ke(`preview`),onMouseenter:t[1]||=e=>Y(e,p(y)(`common.preview`)||`Preview`),onFocus:t[2]||=e=>Y(e,p(y)(`common.preview`)||`Preview`),onMouseleave:X,onBlur:X},h(p(y)(`common.preview`)||`Preview`),35),l(`button`,{type:`button`,class:m([`mode-btn px-2 py-0.5 rounded`,w.value?`is-active`:``]),onClick:t[3]||=e=>Ke(`source`),onMouseenter:t[4]||=e=>Y(e,p(y)(`common.source`)||`Source`),onFocus:t[5]||=e=>Y(e,p(y)(`common.source`)||`Source`),onMouseleave:X,onBlur:X},h(p(y)(`common.source`)||`Source`),35)])):s(``,!0),_.showCopyButton?(n(),g(`button`,{key:1,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-label":b.value?p(y)(`common.copied`)||`Copied`:p(y)(`common.copy`)||`Copy`,onClick:We,onMouseenter:t[6]||=e=>Ue(e),onFocus:t[7]||=e=>Ue(e),onMouseleave:X,onBlur:X},[b.value?(n(),g(`svg`,ve,[...t[13]||=[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(n(),g(`svg`,_e,[...t[12]||=[l(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[l(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),l(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],40,ge)):s(``,!0),_.showExportButton&&B.value?(n(),g(`button`,{key:2,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-label":p(y)(`common.export`)||`Export`,onClick:Qe,onMouseenter:t[8]||=e=>Y(e,p(y)(`common.export`)||`Export`),onFocus:t[9]||=e=>Y(e,p(y)(`common.export`)||`Export`),onMouseleave:X,onBlur:X},[...t[14]||=[l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4`})],-1)]],40,ye)):s(``,!0),_.showCollapseButton?(n(),g(`button`,{key:3,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-pressed":x.value,onClick:Ge,onMouseenter:t[10]||=e=>Y(e,x.value?p(y)(`common.expand`)||`Expand`:p(y)(`common.collapse`)||`Collapse`),onFocus:t[11]||=e=>Y(e,x.value?p(y)(`common.expand`)||`Expand`:p(y)(`common.collapse`)||`Collapse`),onMouseleave:X,onBlur:X},[(n(),g(`svg`,{style:u({rotate:x.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...t[15]||=[l(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,be)):s(``,!0)])])):s(``,!0),r(l(`div`,{ref_key:`bodyRef`,ref:N,class:`d2-block-body`,style:u(Re.value)},[_.loading&&!Le.value?(n(),g(`div`,xe,[l(`pre`,Se,[l(`code`,null,h(R.value),1)]),E.value?(n(),g(`p`,Ce,h(E.value),1)):s(``,!0)])):(n(),g(`div`,we,[V.value?(n(),g(`div`,Te,[l(`pre`,Ee,[l(`code`,null,h(R.value),1)]),E.value?(n(),g(`p`,De,h(E.value),1)):s(``,!0)])):(n(),g(`div`,{key:1,class:`d2-render`,style:u(ze.value)},[l(`div`,{class:`d2-svg`,innerHTML:O.value},null,8,Oe),E.value?(n(),g(`p`,ke,h(E.value),1)):s(``,!0)],4))]))],4),[[c,!x.value]])],10,fe))}}),[[`__scopeId`,`data-v-3b434cf5`]]);w.install=e=>{e.component(w.__name,w)};export{w as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/index9-C3TPz6s3.js b/apps/pythinker-code/dist-web/assets/index9-C8yZCmv2.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/index9-C3TPz6s3.js rename to apps/pythinker-code/dist-web/assets/index9-C8yZCmv2.js index 56f2b48aa..752120f16 100644 --- a/apps/pythinker-code/dist-web/assets/index9-C3TPz6s3.js +++ b/apps/pythinker-code/dist-web/assets/index9-C8yZCmv2.js @@ -1,2 +1,2 @@ -import{A as e,F as t,G as n,I as r,L as i,N as a,R as o,V as s,_ as c,d as l,et as u,g as d,h as f,j as ee,k as te,lt as ne,m as p,nt as m,ot as re,rt as ie,st as ae,ut as oe,v as h,w as se,x as ce,z as le}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{C as ue,E as de,S as g,_ as fe,b as pe,c as me,f as he,k as ge,m as _e,u as ve,y as ye}from"./index-CJN6blp7.js";var be=Object.defineProperty,_=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,v=(e,t,n)=>t in e?be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Te=(e,t)=>{for(var n in t||={})Ce.call(t,n)&&v(e,n,t[n]);if(Se)for(var n of Se(t))we.call(t,n)&&v(e,n,t[n]);return e},Ee=(e,t)=>_(e,xe(t)),De=(e,t,n)=>v(e,typeof t==`symbol`?t:t+``,n),Oe=[`data-markstream-item-key`,`data-markstream-item-kind`],ke={key:0,class:`markstream-virtual-timeline__status`},y=.5,Ae=fe(se(Ee(Te({},{name:`MarkstreamVirtualTimeline`}),{__name:`MarkstreamVirtualTimeline`,props:{items:{},threadKey:{},layoutRevision:{},getKey:{},getKind:{},getContent:{},getFinal:{},getRevision:{},estimateItemHeight:{},overscan:{default:4},overscanPx:{default:1200},stickToBottom:{type:[Boolean,String],default:`auto`},measurementKey:{},markdownMode:{default:`docs`},markdownCodeRenderer:{},initialThreadState:{},markdownFade:{type:Boolean,default:!1},restoreMaxLoadingMs:{type:[Number,Boolean],default:!1},debug:{type:Boolean}},emits:[`height-change`,`virtual-state-change`,`range-change`,`thread-state-change`],setup(se,{expose:fe,emit:be}){let _=se,xe=be;function Se(e){xe(`thread-state-change`,e)}function Ce(e){return e===`measured`||e===`final`}function we(e){return!0===e?.stable&&function(e){if(!e)return!1;let t=Number(e.nodeCount),n=Number(e.measuredCount),r=Math.max(0,Number(e.liveRange?.start??0)),i=Math.min(t,Math.max(r,Number(e.liveRange?.end??0))),a=Math.max(0,i-r);return!0===e.final&&e.confidence===`mixed`&&t>0&&n>0&&n=a)}(e)}let v=new Map;function Ae(e){!0===_.debug&&v.set(e,(v.get(e)??0)+1)}let b=m(null),x=m(0),S=m(0),C=m(0),w=m(!0),T=m(!0),E=u(new Map),D=new Map,O=new Map,k=new Map,A=new Map,j=new Set,M=u(new Map),je=u(new Map),Me=new Map,N=new Map,Ne=new Map,Pe=new Map,P=m(!1),F=m(!0);i(`markstreamHostScrollManaged`,m(!0));let Fe=[0,80,180,360,640],Ie,I,Le=null,L=null,Re=0,R=null,ze=[],z=null,B=null,Be=-1,V=0,H=null,Ve=!1,He=!1,Ue=null,We=0,Ge=0,Ke={top:0,bottom:0},qe=!1,U=p(()=>_.threadKey==null?void 0:String(_.threadKey)),Je=U.value;function Ye(e){return e===`chat`||e===`minimal`||e===`docs`?e:`docs`}let Xe=p(()=>Ye(_.markdownMode)),Ze=p(()=>function(e,t=Ye(_.markdownMode)){return e===`pre`||e===`shiki`||e===`monaco`?e:t===`docs`?`monaco`:`pre`}(_.markdownCodeRenderer,Xe.value)),Qe=p(()=>[_.measurementKey==null?``:String(_.measurementKey),C.value].join(`:`)),$e=p(()=>`${Qe.value}${Xe.value}${Ze.value}`);class et{constructor(e){De(this,`tree`),De(this,`total`),this.tree=Array.from({length:e.length+1},()=>0),this.total=0,e.forEach((e,t)=>this.add(t,e))}add(e,t){if(Number.isFinite(t)&&t!==0){this.total+=t;for(let n=e+1;n0;)n+=this.tree[t],t-=t&-t;return n}lowerBound(e,t=`gte`){let n=this.tree.length-1;if(n<=0||e<=0)return 0;if(e>=this.total)return n-1;let r=0,i=1;for(;i<<10;i>>=1){let n=r+i;if(n(rt.value,{records:tt.value,totalHeight:nt.value.total}));function at(){let e=[],t=[],n=function(){return U.value??`timeline`}();W.clear();for(let r=0;r<_.items.length;r++){let i=_.items[r],a=ft(i,r),o={item:i,index:r,key:a,kind:de(i,r,_),markdown:_e(i,r,_)},s=wt(o);s??=it[r]??he(i,r,_);let c=Ee(Te({},o),{renderKey:`${n}:${a}`,offset:0,size:s,component:i?.component});e.push(c),t.push(s),W.has(a)||W.set(a,c)}tt.value=e,nt.value=new et(t),it=[],rt.value+=1}function ot(e){return rt.value,nt.value.prefixSum(e.index)}function st(e){return Ee(Te({},e),{offset:ot(e)})}function ct(e,t){let n=W.get(e);if(!n)return;let r=Math.ceil(t),i=r-n.size;i!==0&&(n.size=r,nt.value.add(n.index,i),rt.value+=1)}function lt(e,t=`gte`){return rt.value,nt.value.lowerBound(e,t)}let ut=p(()=>Math.max(0,_.overscan??4)),dt=p(()=>{let e=Math.max(0,_.overscanPx??1200);return F.value?e:Math.min(e,160)}),K=p(()=>{let e=G.value.records;if(e.length===0)return{start:0,end:0,records:[],topSpacerHeight:0,bottomSpacerHeight:0};let t=ut.value,n=dt.value,r=Rt(),i=r+Math.max(1,S.value),a=lt(Math.max(0,r-n),`gt`),o=lt(Math.min(G.value.totalHeight,i+n))+1;a=Math.max(0,a-t),o=Math.min(e.length,Math.max(o+t,a+1));let s=e.slice(a,o).map(st),c=s[0],l=s[s.length-1],u=c?.offset??0,d=l?.offset??0;return{start:a,end:o,records:s,topSpacerHeight:u,bottomSpacerHeight:Math.max(0,G.value.totalHeight-(d+(l?.size??0)))}});function ft(e,t){return pe(e,t,_)}let pt=new WeakMap,mt=1;function q(e){if(typeof e!=`object`&&typeof e!=`function`||e===null)return String(e??``);let t=e,n=pt.get(t);return n||(n=mt++,pt.set(t,n)),String(n)}function ht(e,t,n){if(n)return``;let r=typeof e?.text==`string`?e.text:typeof e?.message==`string`?e.message:typeof e?.label==`string`?e.label:String(g(e,t,_)??``);return r?`${r.length}:${function(e){let t=2166136261;for(let n=0;n>>0).toString(36)}(r)}`:``}function gt(e,t){if(typeof _.estimateItemHeight!=`function`)return``;let n=_.estimateItemHeight(e,t);if(!Number.isFinite(n)||n<=0)return``;let r=Math.ceil(n);return it[t]=r,String(r)}function J(e){return _.items[e.index]??e.item}function _t(e){return e.item}function vt(e){return J(e)?.component??e.component}function yt(e,t=U.value){let n=ue(_t(e),e.index,_);return[t??`timeline`,e.key,n==null?``:String(n)].join(`:`)}function bt(e,t=U.value){if(e.markdown)return yt(e,t);let n=ue(_t(e),e.index,_);return[t??`timeline`,e.key,n==null?``:String(n)].join(`:`)}function xt(e){return{sourceKey:bt(e),measurementKey:e.markdown?$e.value:Qe.value,widthBucket:C.value}}function St(e,t){return(e?.sourceKey??``)===(t?.sourceKey??``)&&(e?.measurementKey??``)===(t?.measurementKey??``)&&(e?.widthBucket??0)===(t?.widthBucket??0)}function Ct(e,t,n=U.value){return!(!e||!t)&&t.sourceKey===bt(e,n)&&t.measurementKey===(e.markdown?$e.value:Qe.value)&&(t.widthBucket??0)===C.value}function wt(e,t=U.value){let n=E.get(e.key);return Ct(e,D.get(e.key),t)&&Number.isFinite(n)&&n>0?n:null}function Tt(e){return G.value,W.get(e)}function Et(e,t){return!!(e&&e.markdown&&t)&&t.sessionKey===yt(e)&&(t.threadKey??``)===(U.value??``)&&!!function(e){let t=$e.value,n=e??``;return n===t||n.startsWith(`${t}\0`)}(t.measurementKey)}function Dt(e,t){return Et(e,t)}function Ot(e,t,n){!Number.isFinite(t)||t<=0||(je.set(e,Math.ceil(t)),Me.set(e,n))}function kt(e,t=M.get(e)){let n=function(e,t=M.get(e)){if(!Dt(Tt(e),t))return 0;let n=Number(t?.metrics?.totalHeight);return Number.isFinite(n)&&n>0?Math.ceil(n):0}(e,t);return n>0&&Ot(e,n,t),n}function At(e){return Et(Tt(e),Me.get(e))?je.get(e)??0:kt(e)}function jt(e){return e===Re&&V===e&&!F.value}function Mt(){if(R!=null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(R),R=null,z!=null&&typeof window<`u`&&window.clearTimeout(z),z=null,typeof window<`u`)for(let e of ze)window.clearTimeout(e);ze=[]}function Nt(){return Math.max(0,S.value||b.value?.clientHeight||0)}function Pt(){let e=b.value;if(!e||typeof getComputedStyle!=`function`)return void(Ke={top:0,bottom:0});let t=getComputedStyle(e);Ke={top:Number.parseFloat(t.paddingTop)||0,bottom:Number.parseFloat(t.paddingBottom)||0}}function Ft(){return Ke.top}function It(){let e=Ke;return Math.max(0,G.value.totalHeight+e.top+e.bottom)}function Lt(){return Math.max(It(),b.value?.scrollHeight??0)}function Rt(){return Math.max(0,x.value-Ft())}function Y(){return Math.max(0,Lt()-Nt())}function zt(e){let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(t,Y())):0}function Bt(){return Math.max(0,Y()-x.value)}function Vt(){let e=Bt();T.value=e<=2,!0===_.stickToBottom?w.value=!0:!1===_.stickToBottom?w.value=!1:w.value=e<=48}function Ht(){let e=b.value?.clientWidth??0;C.value=Number.isFinite(e)&&e>0?32*Math.round(e/32):0}function X(e={}){let t=b.value;t&&(x.value=Math.max(0,t.scrollTop||0),S.value=t.clientHeight||0),Ht(),Vt(),(!0===e.remember||!1!==e.remember&&!P.value)&&Q()}function Ut(e,t={}){let n=zt(e),r=b.value;if(x.value=n,r&&(S.value=r.clientHeight||S.value||0,!1!==t.writeDom&&Math.abs((r.scrollTop||0)-n)>y)){let e={target:n,preserveBottomPin:!1!==_.stickToBottom&&Math.abs(Y()-n)<=2};L=F.value?e:null,r.scrollTop=n,e.target=Math.max(0,r.scrollTop||0)}Ht(),!1!==t.updatePinned&&Vt(),(!0===t.remember||!1!==t.remember&&!P.value)&&Q()}function Wt(){if(!F.value){L=null;let e=b.value,t=H;e&&t!=null&&Math.abs((e.scrollTop||0)-t)>y&&(e.scrollTop=t),$(V,I);return}let e=b.value,t=L,n=Math.max(0,e?.scrollTop||0);e&&t&&Math.abs(n-t.target)<=y&&t.preserveBottomPin&&!1!==_.stickToBottom||e&&T.value&&_.stickToBottom===`auto`&&(Math.abs(Y()-n)<=2||n>=x.value-y)||!0===_.stickToBottom?(w.value=!0,T.value=!0,Ut(Y(),{writeDom:!0,remember:!1})):(L=null,X())}function Gt(e){Ut(e,{writeDom:!0,remember:!0})}function Kt(){Gt(Y())}function qt(e,t){let n=O.get(e);if(!Number.isFinite(n)||n==null||n<=0)return 0;let r=k.get(e);return t&&r&&!Jt(r,t)?0:Math.ceil(n)}function Jt(e,t){return e.sourceKey===t.sourceKey&&((t.widthBucket??0)===0||(e.widthBucket??0)===0||(t.widthBucket??0)===(e.widthBucket??0))&&(Yt(t.measurementKey)||Yt(e.measurementKey)||t.measurementKey===e.measurementKey)}function Yt(e){return e===`:0`||!0===e?.startsWith(`:0`)}function Xt(e){O.delete(e),k.delete(e),A.delete(e),j.delete(e)}function Zt(t,n,r,i={}){if(!Number.isFinite(n)||n<=0)return;let a=E.get(t),o=r&&!St(D.get(t),r),s=!0===i.releaseRestoredFloor;(function(e,t){if(!t)return;let n=k.get(e);n&&!Jt(n,t)&&(O.delete(e),k.delete(e),A.delete(e),j.delete(e))})(t,r),s&&Xt(t);let c=qt(t,r),l=c>0?c:Math.ceil(n);if(a!=null&&Math.abs(a-l)<=1&&!o)return void(s&&(rt.value+=1));if(!1===i.updateLayout)return r&&D.set(t,r),E.set(t,l),void gn(i.rememberThreadKey);if(P.value)return r&&D.set(t,r),E.set(t,l),ct(t,l),void function(t=V,n=I){n&&e(()=>{$(t,n),R==null&&typeof requestAnimationFrame==`function`&&(R=requestAnimationFrame(()=>{R=null,$(t,n)}))})}();let u=(d=pn(),f=Bt(),!0===_.stickToBottom?{type:`bottom`,distanceFromBottomPx:0}:_.stickToBottom===`auto`&&w.value?{type:`bottom`,distanceFromBottomPx:T.value?0:Math.max(0,f)}:d);var d,f;r&&D.set(t,r),E.set(t,l),ct(t,l),gn(i.rememberThreadKey),function(e){if(!Z.scheduled)return Z.anchor=e,Z.scheduled=!0,void(Z.raf=tn(rn));!Z.anchor&&e&&(Z.anchor=e)}(u)}n([()=>function(){let e=_.layoutRevision;return e==null?_.items.map((e,t)=>{let n=ft(e,t),r=_e(e,t,_);return[n,de(e,t,_),+!!r,ue(e,t,_)??``,gt(e,t),ht(e,t,r),(i=e?.component,i?typeof i==`string`?`s:${i}`:`o:${q(i)}`:``)].join(``);var i}).join(`\0`):[`explicit`,String(e),_.items.length].join(``)}(),Qe,$e,U,()=>q(_.estimateItemHeight),()=>q(_.getKey),()=>q(_.getKind),()=>q(_.getContent),()=>q(_.getFinal),()=>q(_.getRevision)],()=>at(),{immediate:!0,flush:`sync`});let Z={scheduled:!1,raf:null,anchor:void 0},Qt=new Map,$t=!1,en=null;function tn(t){return typeof requestAnimationFrame==`function`?requestAnimationFrame(t):(e(t),null)}function nn(e){e!=null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(e)}function rn(){if(!Z.scheduled)return;Z.scheduled=!1,Z.raf=null;let e=Z.anchor;Z.anchor=void 0;let t=e?.type===`bottom`&&e.distanceFromBottomPx<=2&&T.value;e&&vn(e);let n=b.value,r=!n||Math.abs((n.scrollTop||0)-x.value)<=y;t&&!r||X({remember:!1})}function an(){if(!$t)return;$t=!1,en=null;let e=Array.from(Qt.entries());Qt.clear();for(let[t,n]of e){if(je.get(t)!==n.logicalHeight)continue;let e=W.get(t);if(!e)continue;let r=(n.threadKey??``)===(U.value??``);cn(e,{allowMarkdownShrink:n.allowMarkdownShrink,allowRestoredFloorShrink:n.allowRestoredFloorShrink,markdownLogicalHeight:n.logicalHeight,rememberThreadKey:n.threadKey,source:n.itemSizeSource,updateLayout:r})}rn()}function on(){an(),rn()}function sn(e){var t;(t=Ne.get(e))==null||t.disconnect(),Ne.delete(e),N.delete(e)}function cn(e,t={}){var n;let r=(i=e.key,ve(N.get(i),Ae));var i;let a=t.source??xt(e),o=!1,s=()=>{o||(o=!0,function(e,t){let n=function(){if(!0!==_.debug||v.size===0)return null;let e=0;for(let t of v.values())e+=t;let t={total:e,byLabel:Object.fromEntries(Array.from(v.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])))};return v.clear(),t}();n&&console.info(`[markstream-vue][timeline][perf] layout-reads`,{label:e,itemKey:t,layoutReads:n})}(`reconcileRecordSize`,e.key))};if(!e.markdown)return r>0&&Zt(e.key,r,a,t),void s();let c=St(D.get(e.key),a)&&(n=E.get(e.key))!=null?n:0,l=t.markdownLogicalHeight??At(e.key),u=function(e,t){return me(N.get(e),Ae,t)}(e.key,r);if(l>0){let n=Math.max(r,l+u);(!t.allowMarkdownShrink||P.value)&&c>0&&(n=Math.max(n,c));let i=qt(e.key,a),o=i>0&&n>i+1&&(!ye(J(e),e.index,_)||!0===t.allowRestoredFloorShrink);e.markdown&&i>0&&(!0===t.allowRestoredFloorShrink||o)?P.value?j.add(e.key):t=Ee(Te({},t),{releaseRestoredFloor:!0}):t.allowMarkdownShrink&&!P.value&&(i<=0||t.allowRestoredFloorShrink&&function(e,t,n){let r=A.get(e);return!Number.isFinite(r)||r==null||r<=0||t+Math.max(0,n-r)0&&Zt(e.key,n,a,t),s();return}String(g(J(e),e.index,_)).trim()?c>0?(r>c+1&&Zt(e.key,r,a,t),s()):(r>0&&Zt(e.key,r,a,t),s()):(r>0&&(Xt(e.key),Zt(e.key,r,a,t)),s())}function ln(e){return t=>{(function(e,t){let n=function(e){let t=e&&`$el`in e?e.$el:e;return t instanceof HTMLElement?t:null}(t),r=N.get(e.key);if(!n)return void sn(e.key);if(r===n)return void cn(e);if(sn(e.key),N.set(e.key,n),cn(e),typeof ResizeObserver>`u`)return;let i=new ResizeObserver(()=>{cn(e)});i.observe(n),Ne.set(e.key,i)})(e,t)}}function un(e){let t=J(e),n=ye(t,e.index,_),r=M.get(e.key),i=Xe.value,a=Ze.value,o={enabled:!0,sessionKey:yt(e),threadKey:U.value,scrollRoot:()=>b.value,restoreState:Dt(e,r)?r:null,restoreAnchor:!1,measurementKey:$e.value,settleMode:`manual`,settledToken:n,emitIntervalMs:96,heightDiffThresholdPx:4};return Ee(Te({content:g(t,e.index,_),final:n,mode:i,codeRenderer:a},n?{nodeVirtual:`auto`,maxLiveNodes:50,liveNodeBuffer:16}:{}),{fade:!0===_.markdownFade,indexKey:yt(e),virtualScroll:o,onHeightChange(t){if(t.sessionKey!==yt(e))return;Ot(e.key,t.totalHeight,{sessionKey:t.sessionKey,threadKey:U.value,measurementKey:$e.value});let n=function(e){return e.phase===`final`||!(!0!==e.final||!Ce(e.confidence))||!!e.stable&&(Ce(e.confidence)||we(e))}(t),r=function(e){return e.phase===`final`||!!e.stable&&(Ce(e.confidence)||we(e))}(t),i=Math.ceil(t.totalHeight);var a;(function(e,t){Qt.set(e.key,t),$t||($t=!0,en=tn(an))})(e,{allowMarkdownShrink:n,allowRestoredFloorShrink:r,itemSizeSource:xt(e),logicalHeight:i,threadKey:U.value}),a={itemKey:e.key,metrics:t},xe(`height-change`,a)},onVirtualStateChange(t){var n;t.sessionKey===yt(e)&&(M.set(e.key,t),kt(e.key,t),gn(),n={itemKey:e.key,state:t},xe(`virtual-state-change`,n))}})}function dn(e){return{item:J(e),index:e.index,itemKey:e.key,kind:e.kind,measureRef:ln(e),markdownProps:un(e)}}function fn(e){let t=J(e)??{};return typeof t.text==`string`?t.text:typeof t.message==`string`?t.message:typeof t.label==`string`?t.label:g(t,e.index,_)}function pn(){let e=Bt();if(e<=2)return{type:`bottom`,distanceFromBottomPx:Math.max(0,e)};let t=Rt(),n=lt(t,`gt`),r=G.value.records[n];if(r){let e=ot(r);if(t>=e&&t{B=null,hn()},80):hn()))}function _n(e){if(!e)return null;if(e.type===`bottom`)return(F.value?Lt():It())-Nt()-Math.max(0,e.distanceFromBottomPx);let t=Tt(e.itemKey);return t?Ft()+ot(t)+Math.max(0,e.offsetWithinItemPx):null}function vn(e,t={}){let n=_n(e);return n!=null&&(Ut(n,{writeDom:!0,remember:!0===t.remember}),!0)}function $(e,t){e===Re&&(t&&(H=vn(t,{remember:!1})?x.value:null),X({remember:!1}))}function yn(e,t){let n=e.getBoundingClientRect();return n.width>0&&n.height>0&&n.bottom>t.top&&n.topr.top&&n.top0&&n.height>0}function Sn(e){if(!e||e.classList.contains(`is-fading-out`))return!1;let t=window.getComputedStyle(e);if(t.display===`none`||Number.parseFloat(t.opacity||`1`)<=.01)return!1;let n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Cn(e){return Array.from(e.querySelectorAll([`[data-markstream-pending="true"]`,`[data-markstream-mermaid][data-markstream-mode="pending"]`,`.mermaid-block-container[data-markstream-mode="pending"]`,`[data-markstream-code-loading="1"]`].join(`,`))).some(e=>!e.matches(`[data-markstream-code-block="1"]`)||!Sn(e.querySelector(`pre.code-pre-fallback`)))}function wn(e){if(e.querySelector(`:scope > .node-placeholder`))return!1;let t=e.querySelector(`:scope > .node-content`);return!!t&&!Cn(t)&&!!function(e){let t=Array.from(e.querySelectorAll(`[data-markstream-math]`));return!t.length||t.every(e=>{let t=e.dataset.markstreamMode;return!(e.dataset.markstreamPending===`true`||t===`loading`||t!==`katex`&&t!==`fallback`)})}(t)&&((e.dataset.nodeType??``)===`code_block`?function(e){if(e.querySelector(`[data-markstream-code-loading="1"]`))return!1;let t=e.querySelector(`[data-markstream-code-block="1"]`);if(t){let e=t.dataset.markstreamEnhanced===`true`,r=Sn(t.querySelector(`pre.code-pre-fallback`));return e||r||(n=t,Array.from(n.querySelectorAll(`.monaco-editor, .monaco-diff-editor`)).some(xn))}var n;return function(e){let t=e.querySelector(`[data-markstream-mermaid], .mermaid-block-container`);if(t){if(t.dataset.markstreamPending===`true`)return!1;let e=t.dataset.markstreamMode;return e===`preview`?!!(t.querySelector(`svg`)||t.querySelector(`[data-mermaid-svg-layer="1"] svg`)):e===`fallback`&&!!(t.querySelector(`.mermaid-source-code`)?.textContent)?.trim()}let n=e.querySelector(`[data-markstream-infographic], .infographic-block-container`);if(n)return n.dataset.markstreamPending!==`true`;let r=e.querySelector(`[data-markstream-d2], .d2-block-container`);return r?r.dataset.markstreamPending!==`true`:!!e.querySelector(`pre[data-markstream-pre="1"]`)}(e)}(t):function(e){return(e.textContent??``).trim().length>0||!!e.querySelector([`hr`,`br`,`table`,`blockquote`,`img`,`svg`,`canvas`,`input`,`button`,`select`,`textarea`,`[role]`,`[aria-label]`,`[data-markstream-math]`,`[data-markstream-mermaid]`,`[data-markstream-infographic]`,`[data-markstream-d2]`,`[data-markstream-pre="1"]`].join(`,`))}(t))}function Tn(e,t){if(!e.markdown)return!0;let n=g(J(e),e.index,_);if(!String(n??``).trim()||t.querySelector(`[data-node-index]`))return!0;let r=t.querySelector(`.markdown-renderer`)??t;return!Cn(r)&&(!!(r.textContent??``).trim()||!!r.querySelector([`hr`,`br`,`table`,`blockquote`,`img`,`svg`,`canvas`,`input`,`button`,`[role]`,`[aria-label]`,`[data-markstream-math]`,`[data-markstream-mermaid]`,`[data-markstream-infographic]`,`[data-markstream-d2]`,`[data-markstream-pre="1"]`,`[data-markstream-code-block="1"]`].join(`,`)))}function En(e,t,n){if(!e.markdown)return!0;let r=g(J(e),e.index,_);if(!String(r??``).trim())return!0;let i=n.getBoundingClientRect(),a=Array.from(t.querySelectorAll(`[data-node-index]`)).filter(e=>yn(e,i));if(a.length>0)return a.every(e=>wn(e));let o=t.querySelector(`.markdown-renderer`)??t;return o.querySelector(`[data-node-index], .node-placeholder`)?!!function(e,t,n,r){if(!Dn(e))return!1;let i=n.getBoundingClientRect(),a=t.getBoundingClientRect();return i.width>0&&i.height>0&&i.bottom<=r.top+1&&a.bottom>r.top}(e,t,o,i)&&Tn(e,t):Tn(e,t)}function Dn(e){let t=D.get(e.key);return qt(e.key,t)>0}function On(e,t){if(!e.markdown||!Ve&&!He||Dn(e))return!0;let n=g(J(e),e.index,_);if(!String(n??``).trim())return!0;if(!t.querySelector(`.markdown-renderer`))return!1;let r=M.get(e.key);if(!Dt(e,r))return!1;let i=r?.metrics,a=Number(i?.totalHeight??0);if(!Number.isFinite(a)||a<=0)return!1;let o=Number(i?.measuredCount??0),s=Number(i?.estimatedCount??0),c=Number(i?.nodeCount??0),l=c<=0||o>=c&&s<=0,u=Ce(i?.confidence),d=we(i),f=!0===i?.stable||u||d;return He?!0===i?.final&&(l&&u||d):f||!0===i?.final}function kn(){let e=b.value;if(!e)return!1;let t=_n(I);if(t!=null&&Math.abs((e.scrollTop||0)-zt(t))>y)return!1;let n=K.value.records;if(!n.length)return G.value.records.length===0;let r=new Map(Array.from(e.querySelectorAll(`[data-markstream-item-key]`)).map(e=>[e.dataset.markstreamItemKey??``,e])),i=[];for(let t of n){let n=r.get(t.key);n&&bn(n,e)&&i.push({record:t,el:n})}if(!i.length)return!1;for(let{record:t,el:n}of i)if(n.offsetHeight+1!(!yn(e,a)||e.matches(`[data-markstream-code-block="1"]`)&&Sn(e.querySelector(`pre.code-pre-fallback`)))))return!1;let o=Array.from(e.querySelectorAll(`[data-node-index]`)).filter(e=>yn(e,a));for(let e of o)if(!wn(e))return!1;return!0}function An(){let e=b.value;if(!e)return``;let t=e.getBoundingClientRect(),n=new Map(Array.from(e.querySelectorAll(`[data-markstream-item-key]`)).map(e=>[e.dataset.markstreamItemKey??``,e])),r=K.value.records.map(e=>{let t=n.get(e.key),r=t?.querySelector(`.markdown-renderer`),i=M.get(e.key)?.metrics;return[e.key,e.size,t?.offsetHeight??0,t?.scrollHeight??0,r?.offsetHeight??0,r?.scrollHeight??0,i?Math.round(Number(i.totalHeight||0)):``,i?.measuredCount??``,i?.estimatedCount??``,i?.nodeCount??``,+(!0===i?.final),+(!0===i?.stable),i?.confidence??``].join(`:`)}).join(`|`),i=Array.from(e.querySelectorAll(`[data-node-index]`)).filter(e=>yn(e,t)).map(e=>{let t=e.getBoundingClientRect(),n=e.querySelector(`:scope > .node-content`),r=n?.querySelector(`[data-markstream-code-block="1"]`),i=n?.querySelector(`pre.code-pre-fallback`),a=n?.querySelector(`.monaco-editor, .monaco-diff-editor`);return[e.dataset.nodeIndex??``,e.dataset.nodeType??``,Math.round(t.height),n?.offsetHeight??0,n?.scrollHeight??0,r?.dataset.markstreamEnhanced??``,r?Math.round(r.getBoundingClientRect().height):0,i?Math.round(i.getBoundingClientRect().height):0,a?Math.round(a.getBoundingClientRect().height):0].join(`:`)}).join(`|`);return[Math.round(e.scrollTop||0),Math.round(e.scrollHeight||0),Math.round(G.value.totalHeight||0),r,i].join(` +import{A as e,F as t,G as n,I as r,L as i,N as a,R as o,V as s,_ as c,d as l,et as u,g as d,h as f,j as ee,k as te,lt as ne,m as p,nt as m,ot as re,rt as ie,st as ae,ut as oe,v as h,w as se,x as ce,z as le}from"./vue.runtime.esm-bundler-Cwbj1t-C.js";import{C as ue,E as de,S as g,_ as fe,b as pe,c as me,f as he,k as ge,m as _e,u as ve,y as ye}from"./index-CIrZXSM-.js";var be=Object.defineProperty,_=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,v=(e,t,n)=>t in e?be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Te=(e,t)=>{for(var n in t||={})Ce.call(t,n)&&v(e,n,t[n]);if(Se)for(var n of Se(t))we.call(t,n)&&v(e,n,t[n]);return e},Ee=(e,t)=>_(e,xe(t)),De=(e,t,n)=>v(e,typeof t==`symbol`?t:t+``,n),Oe=[`data-markstream-item-key`,`data-markstream-item-kind`],ke={key:0,class:`markstream-virtual-timeline__status`},y=.5,Ae=fe(se(Ee(Te({},{name:`MarkstreamVirtualTimeline`}),{__name:`MarkstreamVirtualTimeline`,props:{items:{},threadKey:{},layoutRevision:{},getKey:{},getKind:{},getContent:{},getFinal:{},getRevision:{},estimateItemHeight:{},overscan:{default:4},overscanPx:{default:1200},stickToBottom:{type:[Boolean,String],default:`auto`},measurementKey:{},markdownMode:{default:`docs`},markdownCodeRenderer:{},initialThreadState:{},markdownFade:{type:Boolean,default:!1},restoreMaxLoadingMs:{type:[Number,Boolean],default:!1},debug:{type:Boolean}},emits:[`height-change`,`virtual-state-change`,`range-change`,`thread-state-change`],setup(se,{expose:fe,emit:be}){let _=se,xe=be;function Se(e){xe(`thread-state-change`,e)}function Ce(e){return e===`measured`||e===`final`}function we(e){return!0===e?.stable&&function(e){if(!e)return!1;let t=Number(e.nodeCount),n=Number(e.measuredCount),r=Math.max(0,Number(e.liveRange?.start??0)),i=Math.min(t,Math.max(r,Number(e.liveRange?.end??0))),a=Math.max(0,i-r);return!0===e.final&&e.confidence===`mixed`&&t>0&&n>0&&n=a)}(e)}let v=new Map;function Ae(e){!0===_.debug&&v.set(e,(v.get(e)??0)+1)}let b=m(null),x=m(0),S=m(0),C=m(0),w=m(!0),T=m(!0),E=u(new Map),D=new Map,O=new Map,k=new Map,A=new Map,j=new Set,M=u(new Map),je=u(new Map),Me=new Map,N=new Map,Ne=new Map,Pe=new Map,P=m(!1),F=m(!0);i(`markstreamHostScrollManaged`,m(!0));let Fe=[0,80,180,360,640],Ie,I,Le=null,L=null,Re=0,R=null,ze=[],z=null,B=null,Be=-1,V=0,H=null,Ve=!1,He=!1,Ue=null,We=0,Ge=0,Ke={top:0,bottom:0},qe=!1,U=p(()=>_.threadKey==null?void 0:String(_.threadKey)),Je=U.value;function Ye(e){return e===`chat`||e===`minimal`||e===`docs`?e:`docs`}let Xe=p(()=>Ye(_.markdownMode)),Ze=p(()=>function(e,t=Ye(_.markdownMode)){return e===`pre`||e===`shiki`||e===`monaco`?e:t===`docs`?`monaco`:`pre`}(_.markdownCodeRenderer,Xe.value)),Qe=p(()=>[_.measurementKey==null?``:String(_.measurementKey),C.value].join(`:`)),$e=p(()=>`${Qe.value}${Xe.value}${Ze.value}`);class et{constructor(e){De(this,`tree`),De(this,`total`),this.tree=Array.from({length:e.length+1},()=>0),this.total=0,e.forEach((e,t)=>this.add(t,e))}add(e,t){if(Number.isFinite(t)&&t!==0){this.total+=t;for(let n=e+1;n0;)n+=this.tree[t],t-=t&-t;return n}lowerBound(e,t=`gte`){let n=this.tree.length-1;if(n<=0||e<=0)return 0;if(e>=this.total)return n-1;let r=0,i=1;for(;i<<10;i>>=1){let n=r+i;if(n(rt.value,{records:tt.value,totalHeight:nt.value.total}));function at(){let e=[],t=[],n=function(){return U.value??`timeline`}();W.clear();for(let r=0;r<_.items.length;r++){let i=_.items[r],a=ft(i,r),o={item:i,index:r,key:a,kind:de(i,r,_),markdown:_e(i,r,_)},s=wt(o);s??=it[r]??he(i,r,_);let c=Ee(Te({},o),{renderKey:`${n}:${a}`,offset:0,size:s,component:i?.component});e.push(c),t.push(s),W.has(a)||W.set(a,c)}tt.value=e,nt.value=new et(t),it=[],rt.value+=1}function ot(e){return rt.value,nt.value.prefixSum(e.index)}function st(e){return Ee(Te({},e),{offset:ot(e)})}function ct(e,t){let n=W.get(e);if(!n)return;let r=Math.ceil(t),i=r-n.size;i!==0&&(n.size=r,nt.value.add(n.index,i),rt.value+=1)}function lt(e,t=`gte`){return rt.value,nt.value.lowerBound(e,t)}let ut=p(()=>Math.max(0,_.overscan??4)),dt=p(()=>{let e=Math.max(0,_.overscanPx??1200);return F.value?e:Math.min(e,160)}),K=p(()=>{let e=G.value.records;if(e.length===0)return{start:0,end:0,records:[],topSpacerHeight:0,bottomSpacerHeight:0};let t=ut.value,n=dt.value,r=Rt(),i=r+Math.max(1,S.value),a=lt(Math.max(0,r-n),`gt`),o=lt(Math.min(G.value.totalHeight,i+n))+1;a=Math.max(0,a-t),o=Math.min(e.length,Math.max(o+t,a+1));let s=e.slice(a,o).map(st),c=s[0],l=s[s.length-1],u=c?.offset??0,d=l?.offset??0;return{start:a,end:o,records:s,topSpacerHeight:u,bottomSpacerHeight:Math.max(0,G.value.totalHeight-(d+(l?.size??0)))}});function ft(e,t){return pe(e,t,_)}let pt=new WeakMap,mt=1;function q(e){if(typeof e!=`object`&&typeof e!=`function`||e===null)return String(e??``);let t=e,n=pt.get(t);return n||(n=mt++,pt.set(t,n)),String(n)}function ht(e,t,n){if(n)return``;let r=typeof e?.text==`string`?e.text:typeof e?.message==`string`?e.message:typeof e?.label==`string`?e.label:String(g(e,t,_)??``);return r?`${r.length}:${function(e){let t=2166136261;for(let n=0;n>>0).toString(36)}(r)}`:``}function gt(e,t){if(typeof _.estimateItemHeight!=`function`)return``;let n=_.estimateItemHeight(e,t);if(!Number.isFinite(n)||n<=0)return``;let r=Math.ceil(n);return it[t]=r,String(r)}function J(e){return _.items[e.index]??e.item}function _t(e){return e.item}function vt(e){return J(e)?.component??e.component}function yt(e,t=U.value){let n=ue(_t(e),e.index,_);return[t??`timeline`,e.key,n==null?``:String(n)].join(`:`)}function bt(e,t=U.value){if(e.markdown)return yt(e,t);let n=ue(_t(e),e.index,_);return[t??`timeline`,e.key,n==null?``:String(n)].join(`:`)}function xt(e){return{sourceKey:bt(e),measurementKey:e.markdown?$e.value:Qe.value,widthBucket:C.value}}function St(e,t){return(e?.sourceKey??``)===(t?.sourceKey??``)&&(e?.measurementKey??``)===(t?.measurementKey??``)&&(e?.widthBucket??0)===(t?.widthBucket??0)}function Ct(e,t,n=U.value){return!(!e||!t)&&t.sourceKey===bt(e,n)&&t.measurementKey===(e.markdown?$e.value:Qe.value)&&(t.widthBucket??0)===C.value}function wt(e,t=U.value){let n=E.get(e.key);return Ct(e,D.get(e.key),t)&&Number.isFinite(n)&&n>0?n:null}function Tt(e){return G.value,W.get(e)}function Et(e,t){return!!(e&&e.markdown&&t)&&t.sessionKey===yt(e)&&(t.threadKey??``)===(U.value??``)&&!!function(e){let t=$e.value,n=e??``;return n===t||n.startsWith(`${t}\0`)}(t.measurementKey)}function Dt(e,t){return Et(e,t)}function Ot(e,t,n){!Number.isFinite(t)||t<=0||(je.set(e,Math.ceil(t)),Me.set(e,n))}function kt(e,t=M.get(e)){let n=function(e,t=M.get(e)){if(!Dt(Tt(e),t))return 0;let n=Number(t?.metrics?.totalHeight);return Number.isFinite(n)&&n>0?Math.ceil(n):0}(e,t);return n>0&&Ot(e,n,t),n}function At(e){return Et(Tt(e),Me.get(e))?je.get(e)??0:kt(e)}function jt(e){return e===Re&&V===e&&!F.value}function Mt(){if(R!=null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(R),R=null,z!=null&&typeof window<`u`&&window.clearTimeout(z),z=null,typeof window<`u`)for(let e of ze)window.clearTimeout(e);ze=[]}function Nt(){return Math.max(0,S.value||b.value?.clientHeight||0)}function Pt(){let e=b.value;if(!e||typeof getComputedStyle!=`function`)return void(Ke={top:0,bottom:0});let t=getComputedStyle(e);Ke={top:Number.parseFloat(t.paddingTop)||0,bottom:Number.parseFloat(t.paddingBottom)||0}}function Ft(){return Ke.top}function It(){let e=Ke;return Math.max(0,G.value.totalHeight+e.top+e.bottom)}function Lt(){return Math.max(It(),b.value?.scrollHeight??0)}function Rt(){return Math.max(0,x.value-Ft())}function Y(){return Math.max(0,Lt()-Nt())}function zt(e){let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(t,Y())):0}function Bt(){return Math.max(0,Y()-x.value)}function Vt(){let e=Bt();T.value=e<=2,!0===_.stickToBottom?w.value=!0:!1===_.stickToBottom?w.value=!1:w.value=e<=48}function Ht(){let e=b.value?.clientWidth??0;C.value=Number.isFinite(e)&&e>0?32*Math.round(e/32):0}function X(e={}){let t=b.value;t&&(x.value=Math.max(0,t.scrollTop||0),S.value=t.clientHeight||0),Ht(),Vt(),(!0===e.remember||!1!==e.remember&&!P.value)&&Q()}function Ut(e,t={}){let n=zt(e),r=b.value;if(x.value=n,r&&(S.value=r.clientHeight||S.value||0,!1!==t.writeDom&&Math.abs((r.scrollTop||0)-n)>y)){let e={target:n,preserveBottomPin:!1!==_.stickToBottom&&Math.abs(Y()-n)<=2};L=F.value?e:null,r.scrollTop=n,e.target=Math.max(0,r.scrollTop||0)}Ht(),!1!==t.updatePinned&&Vt(),(!0===t.remember||!1!==t.remember&&!P.value)&&Q()}function Wt(){if(!F.value){L=null;let e=b.value,t=H;e&&t!=null&&Math.abs((e.scrollTop||0)-t)>y&&(e.scrollTop=t),$(V,I);return}let e=b.value,t=L,n=Math.max(0,e?.scrollTop||0);e&&t&&Math.abs(n-t.target)<=y&&t.preserveBottomPin&&!1!==_.stickToBottom||e&&T.value&&_.stickToBottom===`auto`&&(Math.abs(Y()-n)<=2||n>=x.value-y)||!0===_.stickToBottom?(w.value=!0,T.value=!0,Ut(Y(),{writeDom:!0,remember:!1})):(L=null,X())}function Gt(e){Ut(e,{writeDom:!0,remember:!0})}function Kt(){Gt(Y())}function qt(e,t){let n=O.get(e);if(!Number.isFinite(n)||n==null||n<=0)return 0;let r=k.get(e);return t&&r&&!Jt(r,t)?0:Math.ceil(n)}function Jt(e,t){return e.sourceKey===t.sourceKey&&((t.widthBucket??0)===0||(e.widthBucket??0)===0||(t.widthBucket??0)===(e.widthBucket??0))&&(Yt(t.measurementKey)||Yt(e.measurementKey)||t.measurementKey===e.measurementKey)}function Yt(e){return e===`:0`||!0===e?.startsWith(`:0`)}function Xt(e){O.delete(e),k.delete(e),A.delete(e),j.delete(e)}function Zt(t,n,r,i={}){if(!Number.isFinite(n)||n<=0)return;let a=E.get(t),o=r&&!St(D.get(t),r),s=!0===i.releaseRestoredFloor;(function(e,t){if(!t)return;let n=k.get(e);n&&!Jt(n,t)&&(O.delete(e),k.delete(e),A.delete(e),j.delete(e))})(t,r),s&&Xt(t);let c=qt(t,r),l=c>0?c:Math.ceil(n);if(a!=null&&Math.abs(a-l)<=1&&!o)return void(s&&(rt.value+=1));if(!1===i.updateLayout)return r&&D.set(t,r),E.set(t,l),void gn(i.rememberThreadKey);if(P.value)return r&&D.set(t,r),E.set(t,l),ct(t,l),void function(t=V,n=I){n&&e(()=>{$(t,n),R==null&&typeof requestAnimationFrame==`function`&&(R=requestAnimationFrame(()=>{R=null,$(t,n)}))})}();let u=(d=pn(),f=Bt(),!0===_.stickToBottom?{type:`bottom`,distanceFromBottomPx:0}:_.stickToBottom===`auto`&&w.value?{type:`bottom`,distanceFromBottomPx:T.value?0:Math.max(0,f)}:d);var d,f;r&&D.set(t,r),E.set(t,l),ct(t,l),gn(i.rememberThreadKey),function(e){if(!Z.scheduled)return Z.anchor=e,Z.scheduled=!0,void(Z.raf=tn(rn));!Z.anchor&&e&&(Z.anchor=e)}(u)}n([()=>function(){let e=_.layoutRevision;return e==null?_.items.map((e,t)=>{let n=ft(e,t),r=_e(e,t,_);return[n,de(e,t,_),+!!r,ue(e,t,_)??``,gt(e,t),ht(e,t,r),(i=e?.component,i?typeof i==`string`?`s:${i}`:`o:${q(i)}`:``)].join(``);var i}).join(`\0`):[`explicit`,String(e),_.items.length].join(``)}(),Qe,$e,U,()=>q(_.estimateItemHeight),()=>q(_.getKey),()=>q(_.getKind),()=>q(_.getContent),()=>q(_.getFinal),()=>q(_.getRevision)],()=>at(),{immediate:!0,flush:`sync`});let Z={scheduled:!1,raf:null,anchor:void 0},Qt=new Map,$t=!1,en=null;function tn(t){return typeof requestAnimationFrame==`function`?requestAnimationFrame(t):(e(t),null)}function nn(e){e!=null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(e)}function rn(){if(!Z.scheduled)return;Z.scheduled=!1,Z.raf=null;let e=Z.anchor;Z.anchor=void 0;let t=e?.type===`bottom`&&e.distanceFromBottomPx<=2&&T.value;e&&vn(e);let n=b.value,r=!n||Math.abs((n.scrollTop||0)-x.value)<=y;t&&!r||X({remember:!1})}function an(){if(!$t)return;$t=!1,en=null;let e=Array.from(Qt.entries());Qt.clear();for(let[t,n]of e){if(je.get(t)!==n.logicalHeight)continue;let e=W.get(t);if(!e)continue;let r=(n.threadKey??``)===(U.value??``);cn(e,{allowMarkdownShrink:n.allowMarkdownShrink,allowRestoredFloorShrink:n.allowRestoredFloorShrink,markdownLogicalHeight:n.logicalHeight,rememberThreadKey:n.threadKey,source:n.itemSizeSource,updateLayout:r})}rn()}function on(){an(),rn()}function sn(e){var t;(t=Ne.get(e))==null||t.disconnect(),Ne.delete(e),N.delete(e)}function cn(e,t={}){var n;let r=(i=e.key,ve(N.get(i),Ae));var i;let a=t.source??xt(e),o=!1,s=()=>{o||(o=!0,function(e,t){let n=function(){if(!0!==_.debug||v.size===0)return null;let e=0;for(let t of v.values())e+=t;let t={total:e,byLabel:Object.fromEntries(Array.from(v.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])))};return v.clear(),t}();n&&console.info(`[markstream-vue][timeline][perf] layout-reads`,{label:e,itemKey:t,layoutReads:n})}(`reconcileRecordSize`,e.key))};if(!e.markdown)return r>0&&Zt(e.key,r,a,t),void s();let c=St(D.get(e.key),a)&&(n=E.get(e.key))!=null?n:0,l=t.markdownLogicalHeight??At(e.key),u=function(e,t){return me(N.get(e),Ae,t)}(e.key,r);if(l>0){let n=Math.max(r,l+u);(!t.allowMarkdownShrink||P.value)&&c>0&&(n=Math.max(n,c));let i=qt(e.key,a),o=i>0&&n>i+1&&(!ye(J(e),e.index,_)||!0===t.allowRestoredFloorShrink);e.markdown&&i>0&&(!0===t.allowRestoredFloorShrink||o)?P.value?j.add(e.key):t=Ee(Te({},t),{releaseRestoredFloor:!0}):t.allowMarkdownShrink&&!P.value&&(i<=0||t.allowRestoredFloorShrink&&function(e,t,n){let r=A.get(e);return!Number.isFinite(r)||r==null||r<=0||t+Math.max(0,n-r)0&&Zt(e.key,n,a,t),s();return}String(g(J(e),e.index,_)).trim()?c>0?(r>c+1&&Zt(e.key,r,a,t),s()):(r>0&&Zt(e.key,r,a,t),s()):(r>0&&(Xt(e.key),Zt(e.key,r,a,t)),s())}function ln(e){return t=>{(function(e,t){let n=function(e){let t=e&&`$el`in e?e.$el:e;return t instanceof HTMLElement?t:null}(t),r=N.get(e.key);if(!n)return void sn(e.key);if(r===n)return void cn(e);if(sn(e.key),N.set(e.key,n),cn(e),typeof ResizeObserver>`u`)return;let i=new ResizeObserver(()=>{cn(e)});i.observe(n),Ne.set(e.key,i)})(e,t)}}function un(e){let t=J(e),n=ye(t,e.index,_),r=M.get(e.key),i=Xe.value,a=Ze.value,o={enabled:!0,sessionKey:yt(e),threadKey:U.value,scrollRoot:()=>b.value,restoreState:Dt(e,r)?r:null,restoreAnchor:!1,measurementKey:$e.value,settleMode:`manual`,settledToken:n,emitIntervalMs:96,heightDiffThresholdPx:4};return Ee(Te({content:g(t,e.index,_),final:n,mode:i,codeRenderer:a},n?{nodeVirtual:`auto`,maxLiveNodes:50,liveNodeBuffer:16}:{}),{fade:!0===_.markdownFade,indexKey:yt(e),virtualScroll:o,onHeightChange(t){if(t.sessionKey!==yt(e))return;Ot(e.key,t.totalHeight,{sessionKey:t.sessionKey,threadKey:U.value,measurementKey:$e.value});let n=function(e){return e.phase===`final`||!(!0!==e.final||!Ce(e.confidence))||!!e.stable&&(Ce(e.confidence)||we(e))}(t),r=function(e){return e.phase===`final`||!!e.stable&&(Ce(e.confidence)||we(e))}(t),i=Math.ceil(t.totalHeight);var a;(function(e,t){Qt.set(e.key,t),$t||($t=!0,en=tn(an))})(e,{allowMarkdownShrink:n,allowRestoredFloorShrink:r,itemSizeSource:xt(e),logicalHeight:i,threadKey:U.value}),a={itemKey:e.key,metrics:t},xe(`height-change`,a)},onVirtualStateChange(t){var n;t.sessionKey===yt(e)&&(M.set(e.key,t),kt(e.key,t),gn(),n={itemKey:e.key,state:t},xe(`virtual-state-change`,n))}})}function dn(e){return{item:J(e),index:e.index,itemKey:e.key,kind:e.kind,measureRef:ln(e),markdownProps:un(e)}}function fn(e){let t=J(e)??{};return typeof t.text==`string`?t.text:typeof t.message==`string`?t.message:typeof t.label==`string`?t.label:g(t,e.index,_)}function pn(){let e=Bt();if(e<=2)return{type:`bottom`,distanceFromBottomPx:Math.max(0,e)};let t=Rt(),n=lt(t,`gt`),r=G.value.records[n];if(r){let e=ot(r);if(t>=e&&t{B=null,hn()},80):hn()))}function _n(e){if(!e)return null;if(e.type===`bottom`)return(F.value?Lt():It())-Nt()-Math.max(0,e.distanceFromBottomPx);let t=Tt(e.itemKey);return t?Ft()+ot(t)+Math.max(0,e.offsetWithinItemPx):null}function vn(e,t={}){let n=_n(e);return n!=null&&(Ut(n,{writeDom:!0,remember:!0===t.remember}),!0)}function $(e,t){e===Re&&(t&&(H=vn(t,{remember:!1})?x.value:null),X({remember:!1}))}function yn(e,t){let n=e.getBoundingClientRect();return n.width>0&&n.height>0&&n.bottom>t.top&&n.topr.top&&n.top0&&n.height>0}function Sn(e){if(!e||e.classList.contains(`is-fading-out`))return!1;let t=window.getComputedStyle(e);if(t.display===`none`||Number.parseFloat(t.opacity||`1`)<=.01)return!1;let n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Cn(e){return Array.from(e.querySelectorAll([`[data-markstream-pending="true"]`,`[data-markstream-mermaid][data-markstream-mode="pending"]`,`.mermaid-block-container[data-markstream-mode="pending"]`,`[data-markstream-code-loading="1"]`].join(`,`))).some(e=>!e.matches(`[data-markstream-code-block="1"]`)||!Sn(e.querySelector(`pre.code-pre-fallback`)))}function wn(e){if(e.querySelector(`:scope > .node-placeholder`))return!1;let t=e.querySelector(`:scope > .node-content`);return!!t&&!Cn(t)&&!!function(e){let t=Array.from(e.querySelectorAll(`[data-markstream-math]`));return!t.length||t.every(e=>{let t=e.dataset.markstreamMode;return!(e.dataset.markstreamPending===`true`||t===`loading`||t!==`katex`&&t!==`fallback`)})}(t)&&((e.dataset.nodeType??``)===`code_block`?function(e){if(e.querySelector(`[data-markstream-code-loading="1"]`))return!1;let t=e.querySelector(`[data-markstream-code-block="1"]`);if(t){let e=t.dataset.markstreamEnhanced===`true`,r=Sn(t.querySelector(`pre.code-pre-fallback`));return e||r||(n=t,Array.from(n.querySelectorAll(`.monaco-editor, .monaco-diff-editor`)).some(xn))}var n;return function(e){let t=e.querySelector(`[data-markstream-mermaid], .mermaid-block-container`);if(t){if(t.dataset.markstreamPending===`true`)return!1;let e=t.dataset.markstreamMode;return e===`preview`?!!(t.querySelector(`svg`)||t.querySelector(`[data-mermaid-svg-layer="1"] svg`)):e===`fallback`&&!!(t.querySelector(`.mermaid-source-code`)?.textContent)?.trim()}let n=e.querySelector(`[data-markstream-infographic], .infographic-block-container`);if(n)return n.dataset.markstreamPending!==`true`;let r=e.querySelector(`[data-markstream-d2], .d2-block-container`);return r?r.dataset.markstreamPending!==`true`:!!e.querySelector(`pre[data-markstream-pre="1"]`)}(e)}(t):function(e){return(e.textContent??``).trim().length>0||!!e.querySelector([`hr`,`br`,`table`,`blockquote`,`img`,`svg`,`canvas`,`input`,`button`,`select`,`textarea`,`[role]`,`[aria-label]`,`[data-markstream-math]`,`[data-markstream-mermaid]`,`[data-markstream-infographic]`,`[data-markstream-d2]`,`[data-markstream-pre="1"]`].join(`,`))}(t))}function Tn(e,t){if(!e.markdown)return!0;let n=g(J(e),e.index,_);if(!String(n??``).trim()||t.querySelector(`[data-node-index]`))return!0;let r=t.querySelector(`.markdown-renderer`)??t;return!Cn(r)&&(!!(r.textContent??``).trim()||!!r.querySelector([`hr`,`br`,`table`,`blockquote`,`img`,`svg`,`canvas`,`input`,`button`,`[role]`,`[aria-label]`,`[data-markstream-math]`,`[data-markstream-mermaid]`,`[data-markstream-infographic]`,`[data-markstream-d2]`,`[data-markstream-pre="1"]`,`[data-markstream-code-block="1"]`].join(`,`)))}function En(e,t,n){if(!e.markdown)return!0;let r=g(J(e),e.index,_);if(!String(r??``).trim())return!0;let i=n.getBoundingClientRect(),a=Array.from(t.querySelectorAll(`[data-node-index]`)).filter(e=>yn(e,i));if(a.length>0)return a.every(e=>wn(e));let o=t.querySelector(`.markdown-renderer`)??t;return o.querySelector(`[data-node-index], .node-placeholder`)?!!function(e,t,n,r){if(!Dn(e))return!1;let i=n.getBoundingClientRect(),a=t.getBoundingClientRect();return i.width>0&&i.height>0&&i.bottom<=r.top+1&&a.bottom>r.top}(e,t,o,i)&&Tn(e,t):Tn(e,t)}function Dn(e){let t=D.get(e.key);return qt(e.key,t)>0}function On(e,t){if(!e.markdown||!Ve&&!He||Dn(e))return!0;let n=g(J(e),e.index,_);if(!String(n??``).trim())return!0;if(!t.querySelector(`.markdown-renderer`))return!1;let r=M.get(e.key);if(!Dt(e,r))return!1;let i=r?.metrics,a=Number(i?.totalHeight??0);if(!Number.isFinite(a)||a<=0)return!1;let o=Number(i?.measuredCount??0),s=Number(i?.estimatedCount??0),c=Number(i?.nodeCount??0),l=c<=0||o>=c&&s<=0,u=Ce(i?.confidence),d=we(i),f=!0===i?.stable||u||d;return He?!0===i?.final&&(l&&u||d):f||!0===i?.final}function kn(){let e=b.value;if(!e)return!1;let t=_n(I);if(t!=null&&Math.abs((e.scrollTop||0)-zt(t))>y)return!1;let n=K.value.records;if(!n.length)return G.value.records.length===0;let r=new Map(Array.from(e.querySelectorAll(`[data-markstream-item-key]`)).map(e=>[e.dataset.markstreamItemKey??``,e])),i=[];for(let t of n){let n=r.get(t.key);n&&bn(n,e)&&i.push({record:t,el:n})}if(!i.length)return!1;for(let{record:t,el:n}of i)if(n.offsetHeight+1!(!yn(e,a)||e.matches(`[data-markstream-code-block="1"]`)&&Sn(e.querySelector(`pre.code-pre-fallback`)))))return!1;let o=Array.from(e.querySelectorAll(`[data-node-index]`)).filter(e=>yn(e,a));for(let e of o)if(!wn(e))return!1;return!0}function An(){let e=b.value;if(!e)return``;let t=e.getBoundingClientRect(),n=new Map(Array.from(e.querySelectorAll(`[data-markstream-item-key]`)).map(e=>[e.dataset.markstreamItemKey??``,e])),r=K.value.records.map(e=>{let t=n.get(e.key),r=t?.querySelector(`.markdown-renderer`),i=M.get(e.key)?.metrics;return[e.key,e.size,t?.offsetHeight??0,t?.scrollHeight??0,r?.offsetHeight??0,r?.scrollHeight??0,i?Math.round(Number(i.totalHeight||0)):``,i?.measuredCount??``,i?.estimatedCount??``,i?.nodeCount??``,+(!0===i?.final),+(!0===i?.stable),i?.confidence??``].join(`:`)}).join(`|`),i=Array.from(e.querySelectorAll(`[data-node-index]`)).filter(e=>yn(e,t)).map(e=>{let t=e.getBoundingClientRect(),n=e.querySelector(`:scope > .node-content`),r=n?.querySelector(`[data-markstream-code-block="1"]`),i=n?.querySelector(`pre.code-pre-fallback`),a=n?.querySelector(`.monaco-editor, .monaco-diff-editor`);return[e.dataset.nodeIndex??``,e.dataset.nodeType??``,Math.round(t.height),n?.offsetHeight??0,n?.scrollHeight??0,r?.dataset.markstreamEnhanced??``,r?Math.round(r.getBoundingClientRect().height):0,i?Math.round(i.getBoundingClientRect().height):0,a?Math.round(a.getBoundingClientRect().height):0].join(`:`)}).join(`|`);return[Math.round(e.scrollTop||0),Math.round(e.scrollHeight||0),Math.round(G.value.totalHeight||0),r,i].join(` `)}function jn(){return typeof performance<`u`?performance.now():Date.now()}function Mn(){return He?24:2}function Nn(t){jt(t)&&We!==t&&(We=t,function(t){return n=this,r=function*(){let n=jn(),r=0,i=``;for(let a=0;a<40;a++){if(yield e(),yield new Promise(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(()=>e()):e()}),!jt(t))return!1;$(t,I);let a=jn(),o=kn(),s=o?An():``;if(o&&s===i&&s){if(r+=1,r>=Mn()&&a-n>=96)return!0}else r=0,i=s}return!1},new Promise((e,t)=>{var i=e=>{try{o(r.next(e))}catch(e){t(e)}},a=e=>{try{o(r.throw(e))}catch(e){t(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,a);o((r=r.apply(n,null)).next())});var n,r}(t).then(e=>{if(We===t&&(We=0),jt(t))return e?void Rn(t):function(){if(Be<0)return!1;let e=function(){if(!1===_.restoreMaxLoadingMs)return 1/0;let e=Number(_.restoreMaxLoadingMs);return Number.isFinite(e)&&e>0?e:1/0}();return Number.isFinite(e)&&jn()-Be>=e}()?(_.debug,void Rn(t)):(function(e){Ge!==e&&(Ge=e,_.debug)}(t),void function(e){jt(e)&&typeof window<`u`&&(z!=null&&window.clearTimeout(z),z=window.setTimeout(()=>{z=null,jt(e)&&Nn(e)},120))}(t))}))}function Pn(){F.value=!0,Be=-1,We=0,Ge=0,Ve=!1,He=!1,z!=null&&typeof window<`u`&&window.clearTimeout(z),z=null}function Fn(){qe=!0}function In(e){let t=[];if(!function(e){return!!e&&(e.measurementKey??``)===Qe.value&&(e.widthBucket??0)===C.value}(e))return t;for(let[n,r]of Object.entries(e?.itemHeights??{})){if(!Number.isFinite(r)||r<=0)continue;let i=Tt(n),a=e?.itemSizeSources?.[n];Ct(i,a)&&t.push([n,Math.ceil(r),a])}return t}function Ln(e){for(let[t,n]of Object.entries(e?.markdownStates??{}))if(Dt(Tt(t),n))return!0;return!1}function Rn(e){if(e!==Re)return;an();let t=new Set(j);Mt(),$(e,I),P.value=!1,Be=-1,I=void 0,H=null,V=0;for(let e of G.value.records)e.markdown&&!t.has(e.key)||Xt(e.key);for(let e of t){let t=W.get(e);t?cn(t,{allowMarkdownShrink:!0,allowRestoredFloorShrink:!0,markdownLogicalHeight:At(t.key),source:xt(t),updateLayout:!0}):Xt(e)}j.clear(),rn(),X({remember:!1}),Pn(),Fn()}function zn(t,n={}){let r=++Re;L=null,t!=null&&t.widthBucket&&C.value===0&&(C.value=t.widthBucket);let i=t?.outerAnchor,a=function(e){return!!(e?.outerAnchor||In(e).length>0||Ln(e))}(t),o=Ln(t),s=!(!qe&&!0!==n.threadSwitch||a),c=a||s,l=i??(c?function(){if(!1!==_.stickToBottom)return{type:`bottom`,distanceFromBottomPx:0};let e=G.value.records[0];return e?{type:`item`,itemKey:e.key,offsetWithinItemPx:0}:void 0}():void 0);Mt(),We=0,Ge=0,F.value=!c,P.value=c&&!!l,V=r,I=l,Ve=c&&o,He=c&&s,Be=P.value?jn():-1,Bn(),E.clear(),D.clear(),O.clear(),k.clear(),A.clear(),j.clear(),M.clear(),je.clear(),Me.clear();for(let[e,n,r]of In(t)){let t=Math.ceil(n);D.set(e,r),E.set(e,t),O.set(e,t),k.set(e,r)}for(let[e,n]of Object.entries(t?.markdownStates??{})){M.set(e,n);let t=kt(e,n);t>0&&A.set(e,t)}at(),!0===_.stickToBottom?(w.value=!0,T.value=!0):!1===_.stickToBottom?(w.value=!1,T.value=!1):(w.value=l?.type===`bottom`,T.value=l?.type===`bottom`&&l.distanceFromBottomPx<=2);let u=_n(l);H=u==null?null:zt(u),u!=null&&Ut(u,{writeDom:!0,remember:!1,updatePinned:!1}),Ue=t?.threadKey===U.value?t:null,c?l?e(()=>{$(r,l),typeof window<`u`?(Fe.forEach(e=>{let t=window.setTimeout(()=>{$(r,l)},e);ze.push(t)}),Nn(r)):Rn(r)}):(P.value=!1,I=void 0,H=null,V=0,X({remember:!1}),Pn(),Fn()):(P.value=!1,I=void 0,H=null,V=0,X({remember:!1}),Pn(),Fn(),!1!==_.stickToBottom&&(w.value=!0,T.value=!0,e(()=>{P.value||Kt()})))}function Bn(){for(let e of Ne.values())e.disconnect();Ne.clear(),N.clear()}return n(U,(e,t)=>{let n=Je??t,r=!!(n&&n!==e);r&&function(e){on(),hn()?.threadKey!==e&&(Ue?.threadKey===e?(Pe.set(e,Ue),Se(Ue)):Pe.has(e)||Q(e))}(n),Je=e,zn(function(e){return(e?Pe.get(e):null)||function(e){let t=_.initialThreadState;return t&&(t.threadKey??``)===(e??``)?t:null}(e)}(e),{threadSwitch:r})},{immediate:!0,flush:`sync`}),n(()=>K.value.records.map(e=>e.key).join(`\0`),()=>{xe(`range-change`,{start:K.value.start,end:K.value.end})},{immediate:!0}),n(()=>[_.items.length,G.value.totalHeight],()=>{P.value||!1!==_.stickToBottom&&(_.stickToBottom!==`auto`||T.value)&&e(()=>{P.value||!1!==_.stickToBottom&&(_.stickToBottom!==`auto`||T.value)&&Kt()})},{flush:`post`}),a(()=>{Pt(),Ht(),I?($(V,I),X({remember:!1}),Q()):!1===_.stickToBottom?(X({remember:!1}),Q()):(w.value=!0,Ut(Y(),{writeDom:!0,remember:!1,updatePinned:!1}),X({remember:!1}),Q()),b.value&&typeof ResizeObserver<`u`&&(Le=new ResizeObserver(()=>{Pt(),X()}),Le.observe(b.value))}),t(()=>{F.value||Nn(V)}),ee(()=>{hn()||Q(),Mt(),L=null,B!=null&&typeof window<`u`&&window.clearTimeout(B),B=null,Ie=void 0,nn(Z.raf),Z.scheduled=!1,Z.raf=null,Z.anchor=void 0,nn(en),$t=!1,en=null,Qt.clear(),Bn(),D.clear(),O.clear(),k.clear(),A.clear(),j.clear(),je.clear(),Me.clear(),Le?.disconnect(),Le=null}),fe({captureThreadState:function(){return mn(U.value)},restoreThreadState:zn,scrollToBottom:Kt,scrollToIndex:function(e,t=`start`){let n=G.value.records[e];if(!n)return;let r=Ft()+ot(n);t===`center`?r-=(S.value-n.size)/2:t===`end`&&(r-=S.value-n.size),Gt(r)},scrollToOffset:Gt,getItemSize:e=>{var t;let n=Tt(e);return n&&(t=wt(n))!=null?t:void 0},getTotalHeight:()=>G.value.totalHeight,getVisibleRange:()=>({start:K.value.start,end:K.value.end})}),(e,t)=>(r(),h(`div`,{ref_key:`scrollRoot`,ref:b,class:ae([`markstream-virtual-timeline`,{"is-restoring-thread":!F.value}]),"data-markstream-virtual-timeline":`1`,"data-testid":`markstream-virtual-timeline`,onScroll:Wt},[f(`div`,{class:`markstream-virtual-timeline__spacer`,style:ne({height:`${K.value.topSpacerHeight}px`}),"aria-hidden":`true`},null,4),(r(!0),h(l,null,o(K.value.records,t=>(r(),h(`div`,{key:t.renderKey,class:ae([`markstream-virtual-timeline__item`,{"is-restored-height-floor":Dn(t)}]),"data-markstream-item-key":t.key,"data-markstream-item-kind":t.kind,style:ne({minHeight:`${t.size}px`,"--markstream-virtual-item-size":`${t.size}px`})},[le(e.$slots,`default`,te({ref_for:!0},dn(t)),()=>[t.markdown?(r(),d(re(ge),te({key:0,ref_for:!0},un(t)),null,16)):vt(t)?(r(),d(s(vt(t)),{key:1,ref_for:!0,ref:ln(t),item:J(t)},null,8,[`item`])):(r(),h(`div`,{key:2,ref_for:!0,ref:ln(t),class:ae([`markstream-virtual-timeline__default-item`,`markstream-virtual-timeline__default-item--${t.kind||`item`}`])},[t.kind===`tool-call`&&J(t)?.status?(r(),h(`span`,ke,oe(J(t)?.status),1)):c(``,!0),ce(` `+oe(fn(t)),1)],2))],!0)],14,Oe))),128)),f(`div`,{class:`markstream-virtual-timeline__spacer`,style:ne({height:`${K.value.bottomSpacerHeight}px`}),"aria-hidden":`true`},null,4),F.value?c(``,!0):(r(),h(`div`,{key:0,class:`markstream-virtual-timeline__restore-loading`,style:ne({height:`${Math.max(1,Nt())}px`,transform:`translateY(${x.value}px)`}),"aria-live":`polite`,"aria-busy":`true`},[le(e.$slots,`restore-loading`,{threadKey:U.value,visibleRecords:K.value.records},()=>[t[0]||=f(`div`,{class:`markstream-virtual-timeline__restore-loading-card`},[f(`span`,{class:`markstream-virtual-timeline__restore-spinner`,"aria-hidden":`true`}),f(`span`,null,`Loading thread…`)],-1)],!0)],4))],34))}})),[[`__scopeId`,`data-v-1303f06e`]]),b=Ae;b.install=e=>{let t=b.__name??b.name??`MarkstreamVirtualTimeline`;e.component(t,Ae)};export{b as default}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-Dm_5Ndt1.js b/apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-D9QkrsSU.js similarity index 80% rename from apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-Dm_5Ndt1.js rename to apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-D9QkrsSU.js index 6b4e83edd..f383a5c63 100644 --- a/apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-Dm_5Ndt1.js +++ b/apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-D9QkrsSU.js @@ -1,2 +1,2 @@ -import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{c as r}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as i}from"./chunk-CLGD4ZFX-D_luxf7b.js";var a={parse:t(async t=>{let r=await e(`info`,t);n.debug(r)},`parse`)},o={version:`11.17.2`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((e,t,a)=>{n.debug(`rendering info diagram +import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{c as r}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as i}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";var a={parse:t(async t=>{let r=await e(`info`,t);n.debug(r)},`parse`)},o={version:`11.17.2`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((e,t,a)=>{n.debug(`rendering info diagram `+e);let o=i(t);r(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-Cg0R21x_.js b/apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-YyOdaAX5.js similarity index 80% rename from apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-Cg0R21x_.js rename to apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-YyOdaAX5.js index e0060aa9d..71c58bebe 100644 --- a/apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-Cg0R21x_.js +++ b/apps/pythinker-code/dist-web/assets/infoDiagram-27XIBGKW-YyOdaAX5.js @@ -1,2 +1,2 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{c as n}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{St as r}from"./mermaidParser.worker-_pLIm6No.js";import{n as i}from"./mermaid-parser.core-87cmcdBo.js";var a={parse:t(async t=>{let n=await i(`info`,t);e.debug(n)},`parse`)},o={version:`11.17.2`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((t,i,a)=>{e.debug(`rendering info diagram +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{c as n}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{St as r}from"./mermaidParser.worker-CBWarbNh.js";import{n as i}from"./mermaid-parser.core-87cmcdBo.js";var a={parse:t(async t=>{let n=await i(`info`,t);e.debug(n)},`parse`)},o={version:`11.17.2`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((t,i,a)=>{e.debug(`rendering info diagram `+t);let o=r(i);n(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-Cflokjrr.js b/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-BuUErkxN.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-Cflokjrr.js rename to apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-BuUErkxN.js index f65c2c521..2d410be22 100644 --- a/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-Cflokjrr.js +++ b/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-BuUErkxN.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Cn6kALDM.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{p as d}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as f}from"./chunk-CLGD4ZFX-D_luxf7b.js";import{t as p}from"./rough.esm-CSKSodPl.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Cn6kALDM.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-B78kfBb6.js";import{p as d}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as f}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{t as p}from"./rough.esm-CSKSodPl.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-Dyf2kntZ.js b/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-CuC8c3n0.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-Dyf2kntZ.js rename to apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-CuC8c3n0.js index a7f458cd7..4a2b4afe9 100644 --- a/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-Dyf2kntZ.js +++ b/apps/pythinker-code/dist-web/assets/ishikawaDiagram-5VMMS53U-CuC8c3n0.js @@ -1,4 +1,4 @@ -import"./src-CDd1avoI.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{p as d}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{t as f}from"./rough.esm-BojvWvqL.js";import{St as p}from"./mermaidParser.worker-_pLIm6No.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import"./src-CDd1avoI.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{p as d}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{t as f}from"./rough.esm-BojvWvqL.js";import{St as p}from"./mermaidParser.worker-CBWarbNh.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/javascript-CKns3XZi.js b/apps/pythinker-code/dist-web/assets/javascript-0aPrR7xc.js similarity index 90% rename from apps/pythinker-code/dist-web/assets/javascript-CKns3XZi.js rename to apps/pythinker-code/dist-web/assets/javascript-0aPrR7xc.js index 0fa90414f..962f09048 100644 --- a/apps/pythinker-code/dist-web/assets/javascript-CKns3XZi.js +++ b/apps/pythinker-code/dist-web/assets/javascript-0aPrR7xc.js @@ -1 +1 @@ -import{conf as e,language as t}from"./typescript-DEieVXYx.js";var n=e,r={defaultToken:`invalid`,tokenPostfix:`.js`,keywords:`break.case.catch.class.continue.const.constructor.debugger.default.delete.do.else.export.extends.false.finally.for.from.function.get.if.import.in.instanceof.let.new.null.return.set.static.super.switch.symbol.this.throw.true.try.typeof.undefined.var.void.while.with.yield.async.await.of`.split(`.`),typeKeywords:[],operators:t.operators,symbols:t.symbols,escapes:t.escapes,digits:t.digits,octaldigits:t.octaldigits,binarydigits:t.binarydigits,hexdigits:t.hexdigits,regexpctl:t.regexpctl,regexpesc:t.regexpesc,tokenizer:t.tokenizer};export{n as conf,r as language}; \ No newline at end of file +import{conf as e,language as t}from"./typescript-Bz0Zph5S.js";var n=e,r={defaultToken:`invalid`,tokenPostfix:`.js`,keywords:`break.case.catch.class.continue.const.constructor.debugger.default.delete.do.else.export.extends.false.finally.for.from.function.get.if.import.in.instanceof.let.new.null.return.set.static.super.switch.symbol.this.throw.true.try.typeof.undefined.var.void.while.with.yield.async.await.of`.split(`.`),typeKeywords:[],operators:t.operators,symbols:t.symbols,escapes:t.escapes,digits:t.digits,octaldigits:t.octaldigits,binarydigits:t.binarydigits,hexdigits:t.hexdigits,regexpctl:t.regexpctl,regexpesc:t.regexpesc,tokenizer:t.tokenizer};export{n as conf,r as language}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-Ber0m8tP.js b/apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-B6rl_wMT.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-Ber0m8tP.js rename to apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-B6rl_wMT.js index 251c38129..d69af097a 100644 --- a/apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-Ber0m8tP.js +++ b/apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-B6rl_wMT.js @@ -1,4 +1,4 @@ -import{p as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as d}from"./arc-cbkNQeCY.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-F27PBJKO-BiUOMdWi.js";var _=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},e(n,[2,5]),e(n,[2,6]),e(n,[2,8]),{13:[1,16]},{15:[1,17]},e(n,[2,11]),e(n,[2,12]),{19:[1,18]},e(n,[2,4]),e(n,[2,9]),e(n,[2,10]),e(n,[2,13])],defaultActions:{},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{p as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as d}from"./arc-cbkNQeCY.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-F27PBJKO-DTzbeXt1.js";var _=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},e(n,[2,5]),e(n,[2,6]),e(n,[2,8]),{13:[1,16]},{15:[1,17]},e(n,[2,11]),e(n,[2,12]),{19:[1,18]},e(n,[2,4]),e(n,[2,9]),e(n,[2,10]),e(n,[2,13])],defaultActions:{},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-DgJZ3nMB.js b/apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-QqsDP0jw.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-DgJZ3nMB.js rename to apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-QqsDP0jw.js index 1df3df38e..11a71e3fd 100644 --- a/apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-DgJZ3nMB.js +++ b/apps/pythinker-code/dist-web/assets/journeyDiagram-3NMN7TZE-QqsDP0jw.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Cn6kALDM.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as d}from"./arc-CuHXSNPr.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-F27PBJKO-DeO1S11A.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Cn6kALDM.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as d}from"./arc-CuHXSNPr.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-F27PBJKO-Duq9tlNm.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/jsonMode-PNN9RAuU.js b/apps/pythinker-code/dist-web/assets/jsonMode-W7-PSTjz.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/jsonMode-PNN9RAuU.js rename to apps/pythinker-code/dist-web/assets/jsonMode-W7-PSTjz.js index 794820ddd..c408c0f52 100644 --- a/apps/pythinker-code/dist-web/assets/jsonMode-PNN9RAuU.js +++ b/apps/pythinker-code/dist-web/assets/jsonMode-W7-PSTjz.js @@ -1,4 +1,4 @@ -import{h as e,p as t}from"./editor.api2-BIJacb07.js";import{t as n}from"./workers-lk8skNfQ.js";import{_ as r,a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b}from"./lspLanguageFeatures-C5inBXDM.js";var x=120*1e3,S=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=n({moduleId:`vs/language/json/jsonWorker`,createWorker:()=>new Worker(new URL(`/assets/json.worker-D_wH1GAi.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function C(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=` +import{h as e,p as t}from"./editor.api2-DVs509bq.js";import{t as n}from"./workers-CzVdMsP_.js";import{_ as r,a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b}from"./lspLanguageFeatures-DXTWGW3J.js";var x=120*1e3,S=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=n({moduleId:`vs/language/json/jsonWorker`,createWorker:()=>new Worker(new URL(`/assets/json.worker-D_wH1GAi.js`,``+import.meta.url),{type:`module`}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}};function C(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=` `;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31)if(T(a)){t+=e.substring(i,r),d=2;break}else d=6;r++}return t}function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(w(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(w(t));return o=15}if(T(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=` `),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r=12&&e<=15);return e}return{setPosition:p,getPosition:()=>r,scan:t?v:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>c,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function w(e){return e===32||e===9}function T(e){return e===10||e===13}function E(e){return e>=48&&e<=57}var D;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(D||={}),Array(20).fill(0).map((e,t)=>` `.repeat(t));var O=200;Array(O).fill(0).map((e,t)=>` `+` `.repeat(t)),Array(O).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(O).fill(0).map((e,t)=>`\r diff --git a/apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-cWsMfsMK.js b/apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-D9FQqAnM.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-cWsMfsMK.js rename to apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-D9FQqAnM.js index feef4a93d..7330957a0 100644 --- a/apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-cWsMfsMK.js +++ b/apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-D9FQqAnM.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{J as n,et as r,f as i,rt as a,tt as o,x as s,z as c}from"./chunk-DU6HZSFF-CcF2nKWM.js";import"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import{i as l,r as u}from"./chunk-GVQU2GXP-aw9OR1ii.js";import{St as d,i as f,r as p,xt as m}from"./mermaidParser.worker-_pLIm6No.js";import{t as h}from"./chunk-5VM5RSS4-ZNzvKenW.js";var g=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),e(p,[2,19]),e(p,[2,21],{15:30,24:m}),e(p,[2,22]),e(p,[2,23]),e(h,[2,25]),e(h,[2,26]),e(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},e(g,[2,14],{7:_,11:v}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,16],{15:37,24:m}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:b}),e(h,[2,31]),{21:[1,39]},{22:[1,40]},e(g,[2,13],{7:_,11:v}),e(y,[2,11]),e(y,[2,12]),e(p,[2,15],{24:b}),e(h,[2,30]),{22:[1,41]},e(h,[2,27]),e(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{J as n,et as r,f as i,rt as a,tt as o,x as s,z as c}from"./chunk-DU6HZSFF-CbPIJzjs.js";import"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import{i as l,r as u}from"./chunk-GVQU2GXP-CCw5T6ST.js";import{St as d,i as f,r as p,xt as m}from"./mermaidParser.worker-CBWarbNh.js";import{t as h}from"./chunk-5VM5RSS4-ZNzvKenW.js";var g=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),e(p,[2,19]),e(p,[2,21],{15:30,24:m}),e(p,[2,22]),e(p,[2,23]),e(h,[2,25]),e(h,[2,26]),e(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},e(g,[2,14],{7:_,11:v}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,16],{15:37,24:m}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:b}),e(h,[2,31]),{21:[1,39]},{22:[1,40]},e(g,[2,13],{7:_,11:v}),e(y,[2,11]),e(y,[2,12]),e(p,[2,15],{24:b}),e(h,[2,30]),{22:[1,41]},e(h,[2,27]),e(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-D-Gjx2g3.js b/apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-eNZ99o2A.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-D-Gjx2g3.js rename to apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-eNZ99o2A.js index 191810eb2..1a5be5bf9 100644 --- a/apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-D-Gjx2g3.js +++ b/apps/pythinker-code/dist-web/assets/kanban-definition-UXKFOSKX-eNZ99o2A.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{$ as n,J as r,et as i,f as a,nt as o,x as s,z as c}from"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-75Z2AOVW-D2HolPjd.js";import{t as l}from"./chunk-CLGD4ZFX-D_luxf7b.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import{t as u}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import{i as d,r as f}from"./chunk-GVQU2GXP-BrOdU7Oy.js";import{n as p}from"./chunk-L3NEJ4N5-XwNqFvev.js";import{n as m,t as h}from"./chunk-LNGE3PJU-OosUmKKA.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{$ as n,J as r,et as i,f as a,nt as o,x as s,z as c}from"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-75Z2AOVW-CAoob5DH.js";import{t as l}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import{t as u}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import{i as d,r as f}from"./chunk-GVQU2GXP-Ddvf-Y11.js";import{n as p}from"./chunk-L3NEJ4N5-BKsN7TKH.js";import{n as m,t as h}from"./chunk-LNGE3PJU-OosUmKKA.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/line-WAwOiLk7.js b/apps/pythinker-code/dist-web/assets/line-BOKvdzzq.js similarity index 93% rename from apps/pythinker-code/dist-web/assets/line-WAwOiLk7.js rename to apps/pythinker-code/dist-web/assets/line-BOKvdzzq.js index da66fb78a..7d81c577c 100644 --- a/apps/pythinker-code/dist-web/assets/line-WAwOiLk7.js +++ b/apps/pythinker-code/dist-web/assets/line-BOKvdzzq.js @@ -1 +1 @@ -import{n as e,t}from"./path-BdVUuaW-.js";import{t as n}from"./array-BifhSqXX.js";import{rt as r}from"./chunk-75Z2AOVW-Djshm1Dl.js";function i(e){return e[0]}function a(e){return e[1]}function o(o,s){var c=e(!0),l=null,u=r,d=null,f=t(p);o=typeof o==`function`?o:o===void 0?i:e(o),s=typeof s==`function`?s:s===void 0?a:e(s);function p(e){var t,r=(e=n(e)).length,i,a=!1,p;for(l??(d=u(p=f())),t=0;t<=r;++t)!(t\/\s]+)/g,brackets:[[``],[`<`,`>`],[`{{`,`}}`],[`{%`,`%}`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`%`,close:`%`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`<`,close:`>`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,builtinTags:`if.else.elseif.endif.render.assign.capture.endcapture.case.endcase.comment.endcomment.cycle.decrement.for.endfor.include.increment.layout.raw.endraw.render.tablerow.endtablerow.unless.endunless`.split(`.`),builtinFilters:`abs.append.at_least.at_most.capitalize.ceil.compact.date.default.divided_by.downcase.escape.escape_once.first.floor.join.json.last.lstrip.map.minus.modulo.newline_to_br.plus.prepend.remove.remove_first.replace.replace_first.reverse.round.rstrip.size.slice.sort.sort_natural.split.strip.strip_html.strip_newlines.times.truncate.truncatewords.uniq.upcase.url_decode.url_encode.where`.split(`.`),constants:[`true`,`false`],operators:[`==`,`!=`,`>`,`<`,`>=`,`<=`],symbol:/[=>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)([:\w]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)([\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[//,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,`delimiter.output.liquid`],[/\}\}/,{token:`delimiter.output.liquid`,switchTo:`@$S2.$S3`}],[/\{\%/,`delimiter.tag.liquid`],[/raw\s*\%\}/,`delimiter.tag.liquid`,`@liquidRaw`],[/\%\}/,{token:`delimiter.tag.liquid`,switchTo:`@$S2.$S3`}],{include:`liquidRoot`}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,`delimiter.tag.liquid`],[/@identifier/],[/\%\}/,{token:`delimiter.tag.liquid`,next:`@root`}]],liquidRoot:[[/\d+(\.\d+)?/,`number.liquid`],[/"[^"]*"/,`string.liquid`],[/'[^']*'/,`string.liquid`],[/\s+/],[/@symbol/,{cases:{"@operators":`operator.liquid`,"@default":``}}],[/\./],[/@identifier/,{cases:{"@constants":`keyword.liquid`,"@builtinFilters":`predefined.liquid`,"@builtinTags":`predefined.liquid`,"@default":`variable.liquid`}}],[/[^}|%]/,`variable.liquid`]]}};export{n as conf,r as language}; \ No newline at end of file +import{h as e}from"./editor.api2-DVs509bq.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[``],[`<`,`>`],[`{{`,`}}`],[`{%`,`%}`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`%`,close:`%`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`<`,close:`>`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,builtinTags:`if.else.elseif.endif.render.assign.capture.endcapture.case.endcase.comment.endcomment.cycle.decrement.for.endfor.include.increment.layout.raw.endraw.render.tablerow.endtablerow.unless.endunless`.split(`.`),builtinFilters:`abs.append.at_least.at_most.capitalize.ceil.compact.date.default.divided_by.downcase.escape.escape_once.first.floor.join.json.last.lstrip.map.minus.modulo.newline_to_br.plus.prepend.remove.remove_first.replace.replace_first.reverse.round.rstrip.size.slice.sort.sort_natural.split.strip.strip_html.strip_newlines.times.truncate.truncatewords.uniq.upcase.url_decode.url_encode.where`.split(`.`),constants:[`true`,`false`],operators:[`==`,`!=`,`>`,`<`,`>=`,`<=`],symbol:/[=>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)([:\w]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)([\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[//,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,`delimiter.output.liquid`],[/\}\}/,{token:`delimiter.output.liquid`,switchTo:`@$S2.$S3`}],[/\{\%/,`delimiter.tag.liquid`],[/raw\s*\%\}/,`delimiter.tag.liquid`,`@liquidRaw`],[/\%\}/,{token:`delimiter.tag.liquid`,switchTo:`@$S2.$S3`}],{include:`liquidRoot`}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,`delimiter.tag.liquid`],[/@identifier/],[/\%\}/,{token:`delimiter.tag.liquid`,next:`@root`}]],liquidRoot:[[/\d+(\.\d+)?/,`number.liquid`],[/"[^"]*"/,`string.liquid`],[/'[^']*'/,`string.liquid`],[/\s+/],[/@symbol/,{cases:{"@operators":`operator.liquid`,"@default":``}}],[/\./],[/@identifier/,{cases:{"@constants":`keyword.liquid`,"@builtinFilters":`predefined.liquid`,"@builtinTags":`predefined.liquid`,"@default":`variable.liquid`}}],[/[^}|%]/,`variable.liquid`]]}};export{n as conf,r as language}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-C5inBXDM.js b/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-DXTWGW3J.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/lspLanguageFeatures-C5inBXDM.js rename to apps/pythinker-code/dist-web/assets/lspLanguageFeatures-DXTWGW3J.js index ec342c4af..f74503ad8 100644 --- a/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-C5inBXDM.js +++ b/apps/pythinker-code/dist-web/assets/lspLanguageFeatures-DXTWGW3J.js @@ -1,4 +1,4 @@ -import{a as e,c as t,f as n,h as r,p as i}from"./editor.api2-BIJacb07.js";var a;(function(e){function t(e){return typeof e==`string`}e.is=t})(a||={});var o;(function(e){function t(e){return typeof e==`string`}e.is=t})(o||={});var s;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(s||={});var c;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(c||={});var l;(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=c.MAX_VALUE),t===Number.MAX_VALUE&&(t=c.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.uinteger(t.line)&&U.uinteger(t.character)}e.is=n})(l||={});var u;(function(e){function t(e,t,n,r){if(U.uinteger(e)&&U.uinteger(t)&&U.uinteger(n)&&U.uinteger(r))return{start:l.create(e,t),end:l.create(n,r)};if(l.is(e)&&l.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&l.is(t.start)&&l.is(t.end)}e.is=n})(u||={});var d;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&u.is(t.range)&&(U.string(t.uri)||U.undefined(t.uri))}e.is=n})(d||={});var f;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&u.is(t.targetRange)&&U.string(t.targetUri)&&u.is(t.targetSelectionRange)&&(u.is(t.originSelectionRange)||U.undefined(t.originSelectionRange))}e.is=n})(f||={});var p;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.numberRange(t.red,0,1)&&U.numberRange(t.green,0,1)&&U.numberRange(t.blue,0,1)&&U.numberRange(t.alpha,0,1)}e.is=n})(p||={});var ee;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&u.is(t.range)&&p.is(t.color)}e.is=n})(ee||={});var te;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.string(t.label)&&(U.undefined(t.textEdit)||y.is(t))&&(U.undefined(t.additionalTextEdits)||U.typedArray(t.additionalTextEdits,y.is))}e.is=n})(te||={});var m;(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(m||={});var ne;(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return U.defined(n)&&(o.startCharacter=n),U.defined(r)&&(o.endCharacter=r),U.defined(i)&&(o.kind=i),U.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.uinteger(t.startLine)&&U.uinteger(t.startLine)&&(U.undefined(t.startCharacter)||U.uinteger(t.startCharacter))&&(U.undefined(t.endCharacter)||U.uinteger(t.endCharacter))&&(U.undefined(t.kind)||U.string(t.kind))}e.is=n})(ne||={});var h;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&d.is(t.location)&&U.string(t.message)}e.is=n})(h||={});var g;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(g||={});var re;(function(e){e.Unnecessary=1,e.Deprecated=2})(re||={});var ie;(function(e){function t(e){let t=e;return U.objectLiteral(t)&&U.string(t.href)}e.is=t})(ie||={});var _;(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return U.defined(n)&&(o.severity=n),U.defined(r)&&(o.code=r),U.defined(i)&&(o.source=i),U.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return U.defined(t)&&u.is(t.range)&&U.string(t.message)&&(U.number(t.severity)||U.undefined(t.severity))&&(U.integer(t.code)||U.string(t.code)||U.undefined(t.code))&&(U.undefined(t.codeDescription)||U.string(t.codeDescription?.href))&&(U.string(t.source)||U.undefined(t.source))&&(U.undefined(t.relatedInformation)||U.typedArray(t.relatedInformation,h.is))}e.is=n})(_||={});var v;(function(e){function t(e,t,...n){let r={title:e,command:t};return U.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.title)&&U.string(t.command)}e.is=n})(v||={});var y;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return U.objectLiteral(t)&&U.string(t.newText)&&u.is(t.range)}e.is=i})(y||={});var b;(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.string(t.label)&&(U.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(U.string(t.description)||t.description===void 0)}e.is=n})(b||={});var x;(function(e){function t(e){let t=e;return U.string(t)}e.is=t})(x||={});var ae;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return y.is(t)&&(b.is(t.annotationId)||x.is(t.annotationId))}e.is=i})(ae||={});var S;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&k.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(S||={});var C;(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&U.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||U.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||U.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||x.is(t.annotationId))}e.is=n})(C||={});var w;(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&U.string(t.oldUri)&&U.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||U.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||U.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||x.is(t.annotationId))}e.is=n})(w||={});var T;(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&U.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||U.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||U.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||x.is(t.annotationId))}e.is=n})(T||={});var E;(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>U.string(e.kind)?C.is(e)||w.is(e)||T.is(e):S.is(e)))}e.is=t})(E||={});var D;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)}e.is=n})(D||={});var O;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)&&U.integer(t.version)}e.is=n})(O||={});var k;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)&&(t.version===null||U.integer(t.version))}e.is=n})(k||={});var oe;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)&&U.string(t.languageId)&&U.integer(t.version)&&U.string(t.text)}e.is=n})(oe||={});var A;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(A||={});var j;(function(e){function t(e){let t=e;return U.objectLiteral(e)&&A.is(t.kind)&&U.string(t.value)}e.is=t})(j||={});var M;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(M||={});var N;(function(e){e.PlainText=1,e.Snippet=2})(N||={});var se;(function(e){e.Deprecated=1})(se||={});var ce;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&U.string(t.newText)&&u.is(t.insert)&&u.is(t.replace)}e.is=n})(ce||={});var le;(function(e){e.asIs=1,e.adjustIndentation=2})(le||={});var ue;(function(e){function t(e){let t=e;return t&&(U.string(t.detail)||t.detail===void 0)&&(U.string(t.description)||t.description===void 0)}e.is=t})(ue||={});var de;(function(e){function t(e){return{label:e}}e.create=t})(de||={});var fe;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(fe||={});var P;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return U.string(t)||U.objectLiteral(t)&&U.string(t.language)&&U.string(t.value)}e.is=n})(P||={});var pe;(function(e){function t(e){let t=e;return!!t&&U.objectLiteral(t)&&(j.is(t.contents)||P.is(t.contents)||U.typedArray(t.contents,P.is))&&(e.range===void 0||u.is(e.range))}e.is=t})(pe||={});var me;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(me||={});var F;(function(e){function t(e,t,...n){let r={label:e};return U.defined(t)&&(r.documentation=t),U.defined(n)?r.parameters=n:r.parameters=[],r}e.create=t})(F||={});var I;(function(e){e.Text=1,e.Read=2,e.Write=3})(I||={});var L;(function(e){function t(e,t){let n={range:e};return U.number(t)&&(n.kind=t),n}e.create=t})(L||={});var R;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(R||={});var z;(function(e){e.Deprecated=1})(z||={});var he;(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(he||={});var ge;(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(ge||={});var _e;(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&U.string(t.name)&&U.number(t.kind)&&u.is(t.range)&&u.is(t.selectionRange)&&(t.detail===void 0||U.string(t.detail))&&(t.deprecated===void 0||U.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(_e||={});var ve;(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(ve||={});var B;(function(e){e.Invoked=1,e.Automatic=2})(B||={});var ye;(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return U.defined(t)&&U.typedArray(t.diagnostics,_.is)&&(t.only===void 0||U.typedArray(t.only,U.string))&&(t.triggerKind===void 0||t.triggerKind===B.Invoked||t.triggerKind===B.Automatic)}e.is=n})(ye||={});var be;(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):v.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&U.string(t.title)&&(t.diagnostics===void 0||U.typedArray(t.diagnostics,_.is))&&(t.kind===void 0||U.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||v.is(t.command))&&(t.isPreferred===void 0||U.boolean(t.isPreferred))&&(t.edit===void 0||E.is(t.edit))}e.is=n})(be||={});var xe;(function(e){function t(e,t){let n={range:e};return U.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return U.defined(t)&&u.is(t.range)&&(U.undefined(t.command)||v.is(t.command))}e.is=n})(xe||={});var Se;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.uinteger(t.tabSize)&&U.boolean(t.insertSpaces)}e.is=n})(Se||={});var Ce;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return U.defined(t)&&u.is(t.range)&&(U.undefined(t.target)||U.string(t.target))}e.is=n})(Ce||={});var we;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return U.objectLiteral(n)&&u.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(we||={});var Te;(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(Te||={});var Ee;(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(Ee||={});var De;(function(e){function t(e){let t=e;return U.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(De||={});var Oe;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&u.is(t.range)&&U.string(t.text)}e.is=n})(Oe||={});var ke;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&u.is(t.range)&&U.boolean(t.caseSensitiveLookup)&&(U.string(t.variableName)||t.variableName===void 0)}e.is=n})(ke||={});var Ae;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&u.is(t.range)&&(U.string(t.expression)||t.expression===void 0)}e.is=n})(Ae||={});var je;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&u.is(e.stoppedLocation)}e.is=n})(je||={});var V;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(V||={});var H;(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&(t.tooltip===void 0||U.string(t.tooltip)||j.is(t.tooltip))&&(t.location===void 0||d.is(t.location))&&(t.command===void 0||v.is(t.command))}e.is=n})(H||={});var Me;(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&l.is(t.position)&&(U.string(t.label)||U.typedArray(t.label,H.is))&&(t.kind===void 0||V.is(t.kind))&&t.textEdits===void 0||U.typedArray(t.textEdits,y.is)&&(t.tooltip===void 0||U.string(t.tooltip)||j.is(t.tooltip))&&(t.paddingLeft===void 0||U.boolean(t.paddingLeft))&&(t.paddingRight===void 0||U.boolean(t.paddingRight))}e.is=n})(Me||={});var Ne;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(Ne||={});var Pe;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Pe||={});var Fe;(function(e){function t(e){return{items:e}}e.create=t})(Fe||={});var Ie;(function(e){e.Invoked=0,e.Automatic=1})(Ie||={});var Le;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(Le||={});var Re;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Re||={});var ze;(function(e){function t(e){let t=e;return U.objectLiteral(t)&&o.is(t.uri)&&U.string(t.name)}e.is=t})(ze||={});var Be;(function(e){function t(e,t,n,r){return new Ve(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(U.defined(t)&&U.string(t.uri)&&(U.undefined(t.languageId)||U.string(t.languageId))&&U.uinteger(t.lineCount)&&U.func(t.getText)&&U.func(t.positionAt)&&U.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.title)&&U.string(t.command)}e.is=n})(v||={});var y;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return U.objectLiteral(t)&&U.string(t.newText)&&u.is(t.range)}e.is=i})(y||={});var b;(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.string(t.label)&&(U.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(U.string(t.description)||t.description===void 0)}e.is=n})(b||={});var x;(function(e){function t(e){let t=e;return U.string(t)}e.is=t})(x||={});var ae;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return y.is(t)&&(b.is(t.annotationId)||x.is(t.annotationId))}e.is=i})(ae||={});var S;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&k.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(S||={});var C;(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&U.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||U.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||U.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||x.is(t.annotationId))}e.is=n})(C||={});var w;(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&U.string(t.oldUri)&&U.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||U.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||U.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||x.is(t.annotationId))}e.is=n})(w||={});var T;(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&U.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||U.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||U.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||x.is(t.annotationId))}e.is=n})(T||={});var E;(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>U.string(e.kind)?C.is(e)||w.is(e)||T.is(e):S.is(e)))}e.is=t})(E||={});var D;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)}e.is=n})(D||={});var O;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)&&U.integer(t.version)}e.is=n})(O||={});var k;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)&&(t.version===null||U.integer(t.version))}e.is=n})(k||={});var oe;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)&&U.string(t.languageId)&&U.integer(t.version)&&U.string(t.text)}e.is=n})(oe||={});var A;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(A||={});var j;(function(e){function t(e){let t=e;return U.objectLiteral(e)&&A.is(t.kind)&&U.string(t.value)}e.is=t})(j||={});var M;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(M||={});var N;(function(e){e.PlainText=1,e.Snippet=2})(N||={});var se;(function(e){e.Deprecated=1})(se||={});var ce;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&U.string(t.newText)&&u.is(t.insert)&&u.is(t.replace)}e.is=n})(ce||={});var le;(function(e){e.asIs=1,e.adjustIndentation=2})(le||={});var ue;(function(e){function t(e){let t=e;return t&&(U.string(t.detail)||t.detail===void 0)&&(U.string(t.description)||t.description===void 0)}e.is=t})(ue||={});var de;(function(e){function t(e){return{label:e}}e.create=t})(de||={});var fe;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(fe||={});var P;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return U.string(t)||U.objectLiteral(t)&&U.string(t.language)&&U.string(t.value)}e.is=n})(P||={});var pe;(function(e){function t(e){let t=e;return!!t&&U.objectLiteral(t)&&(j.is(t.contents)||P.is(t.contents)||U.typedArray(t.contents,P.is))&&(e.range===void 0||u.is(e.range))}e.is=t})(pe||={});var me;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(me||={});var F;(function(e){function t(e,t,...n){let r={label:e};return U.defined(t)&&(r.documentation=t),U.defined(n)?r.parameters=n:r.parameters=[],r}e.create=t})(F||={});var I;(function(e){e.Text=1,e.Read=2,e.Write=3})(I||={});var L;(function(e){function t(e,t){let n={range:e};return U.number(t)&&(n.kind=t),n}e.create=t})(L||={});var R;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(R||={});var z;(function(e){e.Deprecated=1})(z||={});var he;(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(he||={});var ge;(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(ge||={});var _e;(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&U.string(t.name)&&U.number(t.kind)&&u.is(t.range)&&u.is(t.selectionRange)&&(t.detail===void 0||U.string(t.detail))&&(t.deprecated===void 0||U.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(_e||={});var ve;(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(ve||={});var B;(function(e){e.Invoked=1,e.Automatic=2})(B||={});var ye;(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return U.defined(t)&&U.typedArray(t.diagnostics,_.is)&&(t.only===void 0||U.typedArray(t.only,U.string))&&(t.triggerKind===void 0||t.triggerKind===B.Invoked||t.triggerKind===B.Automatic)}e.is=n})(ye||={});var be;(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):v.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&U.string(t.title)&&(t.diagnostics===void 0||U.typedArray(t.diagnostics,_.is))&&(t.kind===void 0||U.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||v.is(t.command))&&(t.isPreferred===void 0||U.boolean(t.isPreferred))&&(t.edit===void 0||E.is(t.edit))}e.is=n})(be||={});var xe;(function(e){function t(e,t){let n={range:e};return U.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return U.defined(t)&&u.is(t.range)&&(U.undefined(t.command)||v.is(t.command))}e.is=n})(xe||={});var Se;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.uinteger(t.tabSize)&&U.boolean(t.insertSpaces)}e.is=n})(Se||={});var Ce;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return U.defined(t)&&u.is(t.range)&&(U.undefined(t.target)||U.string(t.target))}e.is=n})(Ce||={});var we;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return U.objectLiteral(n)&&u.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(we||={});var Te;(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(Te||={});var Ee;(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(Ee||={});var De;(function(e){function t(e){let t=e;return U.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(De||={});var Oe;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&u.is(t.range)&&U.string(t.text)}e.is=n})(Oe||={});var ke;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&u.is(t.range)&&U.boolean(t.caseSensitiveLookup)&&(U.string(t.variableName)||t.variableName===void 0)}e.is=n})(ke||={});var Ae;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&u.is(t.range)&&(U.string(t.expression)||t.expression===void 0)}e.is=n})(Ae||={});var je;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&u.is(e.stoppedLocation)}e.is=n})(je||={});var V;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(V||={});var H;(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&(t.tooltip===void 0||U.string(t.tooltip)||j.is(t.tooltip))&&(t.location===void 0||d.is(t.location))&&(t.command===void 0||v.is(t.command))}e.is=n})(H||={});var Me;(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&l.is(t.position)&&(U.string(t.label)||U.typedArray(t.label,H.is))&&(t.kind===void 0||V.is(t.kind))&&t.textEdits===void 0||U.typedArray(t.textEdits,y.is)&&(t.tooltip===void 0||U.string(t.tooltip)||j.is(t.tooltip))&&(t.paddingLeft===void 0||U.boolean(t.paddingLeft))&&(t.paddingRight===void 0||U.boolean(t.paddingRight))}e.is=n})(Me||={});var Ne;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(Ne||={});var Pe;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Pe||={});var Fe;(function(e){function t(e){return{items:e}}e.create=t})(Fe||={});var Ie;(function(e){e.Invoked=0,e.Automatic=1})(Ie||={});var Le;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(Le||={});var Re;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Re||={});var ze;(function(e){function t(e){let t=e;return U.objectLiteral(t)&&o.is(t.uri)&&U.string(t.name)}e.is=t})(ze||={});var Be;(function(e){function t(e,t,n,r){return new Ve(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(U.defined(t)&&U.string(t.uri)&&(U.undefined(t.languageId)||U.string(t.languageId))&&U.uinteger(t.lineCount)&&U.func(t.getText)&&U.func(t.positionAt)&&U.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return l.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return l.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1{let t=e.getLanguageId();if(t!==this._languageId)return;let n;this._listener[e.uri.toString()]=e.onDidChangeContent(()=>{window.clearTimeout(n),n=window.setTimeout(()=>this._doValidate(e.uri,t),500)}),this._doValidate(e.uri,t)},a=e=>{i.setModelMarkers(e,this._languageId,[]);let t=e.uri.toString(),n=this._listener[t];n&&(n.dispose(),delete this._listener[t])};this._disposables.push(i.onDidCreateModel(r)),this._disposables.push(i.onWillDisposeModel(a)),this._disposables.push(i.onDidChangeModelLanguage(e=>{a(e.model),r(e.model)})),this._disposables.push(n(e=>{i.getModels().forEach(e=>{e.getLanguageId()===this._languageId&&(a(e),r(e))})})),this._disposables.push({dispose:()=>{i.getModels().forEach(a);for(let e in this._listener)this._listener[e].dispose()}}),i.getModels().forEach(r)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,t){this._worker(e).then(t=>t.doValidation(e.toString())).then(n=>{let r=n.map(t=>We(e,t)),a=i.getModel(e);a&&a.getLanguageId()===t&&i.setModelMarkers(a,t,r)}).then(void 0,e=>{console.error(e)})}};function Ue(t){switch(t){case g.Error:return e.Error;case g.Warning:return e.Warning;case g.Information:return e.Info;case g.Hint:return e.Hint;default:return e.Info}}function We(e,t){let n=typeof t.code==`number`?String(t.code):t.code;return{severity:Ue(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:n,source:t.source}}var Ge=class{constructor(e,t){this._worker=e,this._triggerCharacters=t}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,n,i,a){let o=e.uri;return this._worker(o).then(e=>e.doComplete(o.toString(),W(n))).then(i=>{if(!i)return;let a=e.getWordUntilPosition(n),o=new t(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn),s=i.items.map(e=>{let t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,command:Je(e.command),range:o,kind:qe(e.kind)};return e.textEdit&&(Ke(e.textEdit)?t.range={insert:K(e.textEdit.insert),replace:K(e.textEdit.replace)}:t.range=K(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(q)),e.insertTextFormat===N.Snippet&&(t.insertTextRules=r.CompletionItemInsertTextRule.InsertAsSnippet),t});return{isIncomplete:i.isIncomplete,suggestions:s}})}};function W(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function G(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function K(e){if(e)return new t(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Ke(e){return e.insert!==void 0&&e.replace!==void 0}function qe(e){let t=r.CompletionItemKind;switch(e){case M.Text:return t.Text;case M.Method:return t.Method;case M.Function:return t.Function;case M.Constructor:return t.Constructor;case M.Field:return t.Field;case M.Variable:return t.Variable;case M.Class:return t.Class;case M.Interface:return t.Interface;case M.Module:return t.Module;case M.Property:return t.Property;case M.Unit:return t.Unit;case M.Value:return t.Value;case M.Enum:return t.Enum;case M.Keyword:return t.Keyword;case M.Snippet:return t.Snippet;case M.Color:return t.Color;case M.File:return t.File;case M.Reference:return t.Reference}return t.Property}function q(e){if(e)return{range:K(e.range),text:e.newText}}function Je(e){return e&&e.command===`editor.action.triggerSuggest`?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Ye=class{constructor(e){this._worker=e}provideHover(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.doHover(r.toString(),W(t))).then(e=>{if(e)return{range:K(e.range),contents:Ze(e.contents)}})}};function Xe(e){return e&&typeof e==`object`&&typeof e.kind==`string`}function J(e){return typeof e==`string`?{value:e}:Xe(e)?e.kind===`plaintext`?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}:{value:e.value}:{value:"```"+e.language+` `+e.value+"\n```\n"}}function Ze(e){if(e)return Array.isArray(e)?e.map(J):[J(e)]}var Qe=class{constructor(e){this._worker=e}provideDocumentHighlights(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.findDocumentHighlights(r.toString(),W(t))).then(e=>{if(e)return e.map(e=>({range:K(e.range),kind:$e(e.kind)}))})}};function $e(e){switch(e){case I.Read:return r.DocumentHighlightKind.Read;case I.Write:return r.DocumentHighlightKind.Write;case I.Text:return r.DocumentHighlightKind.Text}return r.DocumentHighlightKind.Text}var et=class{constructor(e){this._worker=e}provideDefinition(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.findDefinition(r.toString(),W(t))).then(e=>{if(e)return[Y(e)]})}};function Y(e){return{uri:n.parse(e.uri),range:K(e.range)}}var tt=class{constructor(e){this._worker=e}provideReferences(e,t,n,r){let i=e.uri;return this._worker(i).then(e=>e.findReferences(i.toString(),W(t))).then(e=>{if(e)return e.map(Y)})}},nt=class{constructor(e){this._worker=e}provideRenameEdits(e,t,n,r){let i=e.uri;return this._worker(i).then(e=>e.doRename(i.toString(),W(t),n)).then(e=>rt(e))}};function rt(e){if(!e||!e.changes)return;let t=[];for(let r in e.changes){let i=n.parse(r);for(let n of e.changes[r])t.push({resource:i,versionId:void 0,textEdit:{range:K(n.range),text:n.newText}})}return{edits:t}}var it=class{constructor(e){this._worker=e}provideDocumentSymbols(e,t){let n=e.uri;return this._worker(n).then(e=>e.findDocumentSymbols(n.toString())).then(e=>{if(e)return e.map(e=>X(e)?Z(e):{name:e.name,detail:``,containerName:e.containerName,kind:Q(e.kind),range:K(e.location.range),selectionRange:K(e.location.range),tags:[]})})}};function X(e){return`children`in e}function Z(e){return{name:e.name,detail:e.detail??``,kind:Q(e.kind),range:K(e.range),selectionRange:K(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(e=>Z(e))}}function Q(e){let t=r.SymbolKind;switch(e){case R.File:return t.File;case R.Module:return t.Module;case R.Namespace:return t.Namespace;case R.Package:return t.Package;case R.Class:return t.Class;case R.Method:return t.Method;case R.Property:return t.Property;case R.Field:return t.Field;case R.Constructor:return t.Constructor;case R.Enum:return t.Enum;case R.Interface:return t.Interface;case R.Function:return t.Function;case R.Variable:return t.Variable;case R.Constant:return t.Constant;case R.String:return t.String;case R.Number:return t.Number;case R.Boolean:return t.Boolean;case R.Array:return t.Array}return t.Function}var at=class{constructor(e){this._worker=e}provideLinks(e,t){let n=e.uri;return this._worker(n).then(e=>e.findDocumentLinks(n.toString())).then(e=>{if(e)return{links:e.map(e=>({range:K(e.range),url:e.target}))}})}},ot=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.format(r.toString(),null,$(t)).then(e=>{if(!(!e||e.length===0))return e.map(q)}))}},st=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,t,n,r){let i=e.uri;return this._worker(i).then(e=>e.format(i.toString(),G(t),$(n)).then(e=>{if(!(!e||e.length===0))return e.map(q)}))}};function $(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var ct=class{constructor(e){this._worker=e}provideDocumentColors(e,t){let n=e.uri;return this._worker(n).then(e=>e.findDocumentColors(n.toString())).then(e=>{if(e)return e.map(e=>({color:e.color,range:K(e.range)}))})}provideColorPresentations(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.getColorPresentations(r.toString(),t.color,G(t.range))).then(e=>{if(e)return e.map(e=>{let t={label:e.label};return e.textEdit&&(t.textEdit=q(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(q)),t})})}},lt=class{constructor(e){this._worker=e}provideFoldingRanges(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.getFoldingRanges(r.toString(),t)).then(e=>{if(e)return e.map(e=>{let t={start:e.startLine+1,end:e.endLine+1};return e.kind!==void 0&&(t.kind=ut(e.kind)),t})})}};function ut(e){switch(e){case m.Comment:return r.FoldingRangeKind.Comment;case m.Imports:return r.FoldingRangeKind.Imports;case m.Region:return r.FoldingRangeKind.Region}}var dt=class{constructor(e){this._worker=e}provideSelectionRanges(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.getSelectionRanges(r.toString(),t.map(W))).then(e=>{if(e)return e.map(e=>{let t=[];for(;e;)t.push({range:K(e.range)}),e=e.parent;return t})})}};export{K as _,ot as a,st as c,Ye as d,tt as f,G as g,W as h,ct as i,it as l,dt as m,et as n,Qe as o,nt as p,He as r,at as s,Ge as t,lt as u,q as v}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/mdx-CBrxVYq5.js b/apps/pythinker-code/dist-web/assets/mdx-Cs-NVxYA.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/mdx-CBrxVYq5.js rename to apps/pythinker-code/dist-web/assets/mdx-Cs-NVxYA.js index 0c9e3bf63..f9a223874 100644 --- a/apps/pythinker-code/dist-web/assets/mdx-CBrxVYq5.js +++ b/apps/pythinker-code/dist-web/assets/mdx-Cs-NVxYA.js @@ -1 +1 @@ -import{h as e}from"./editor.api2-BIJacb07.js";var t={comments:{blockComment:[`{/*`,`*/}`]},brackets:[[`{`,`}`]],autoClosingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`“`,close:`”`},{open:`‘`,close:`’`},{open:"`",close:"`"},{open:`{`,close:`}`},{open:`(`,close:`)`},{open:`_`,close:`_`},{open:`**`,close:`**`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:e.IndentAction.None,appendText:`- `}},{beforeText:/^\s*\+ .+/,action:{indentAction:e.IndentAction.None,appendText:`+ `}},{beforeText:/^\s*\* .+/,action:{indentAction:e.IndentAction.None,appendText:`* `}},{beforeText:/^> /,action:{indentAction:e.IndentAction.None,appendText:`> `}},{beforeText:/<\w+/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:e.IndentAction.Outdent}},...Array.from({length:100},(t,n)=>({beforeText:RegExp(`^${n}\\. .+`),action:{indentAction:e.IndentAction.None,appendText:`${n+1}. `}}))]},n={defaultToken:``,tokenPostfix:`.mdx`,control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:`meta.content`,next:`@frontmatter`,nextEmbedded:`yaml`}],[/^\s*import/,{token:`keyword`,next:`@import`,nextEmbedded:`js`}],[/^\s*export/,{token:`keyword`,next:`@export`,nextEmbedded:`js`}],[/<\w+/,{token:`type.identifier`,next:`@jsx`}],[/<\/?\w+>/,`type.identifier`],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:`white`},{token:`comment`},{token:`keyword`,next:`@header`}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,[`white`,`comment`,`keyword`,`white`]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,[`white`,`comment`,`number`,`white`]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,[`white`,`comment`,`number`,`white`]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,[`white`,`comment`,`keyword`]],[/`{3,}(\s.*)?$/,{token:`string`,next:`@codeblock_backtick`}],[/~{3,}(\s.*)?$/,{token:`string`,next:`@codeblock_tilde`}],[/`{3,}(\S+).*$/,{token:`string`,next:`@codeblock_highlight_backtick`,nextEmbedded:`$1`}],[/~{3,}(\S+).*$/,{token:`string`,next:`@codeblock_highlight_tilde`,nextEmbedded:`$1`}],[/^(\s*)(-{4,})$/,[`white`,`comment`]],[/^(\s*)(>+)/,[`white`,`comment`]],{include:`content`}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,[``,`string.link`,``,`type.identifier`,`string.link`,``]],[/(\[)(.+)(]\()(.+)(\))/,[``,`type.identifier`,``,`string.link`,``]],[/(\[)(.+)(]\[)(.+)(])/,[``,`type.identifier`,``,`type.identifier`,``]],[/(\[)(.+)(]:\s+)(\S*)/,[``,`type.identifier`,``,`string.link`]],[/(\[)(.+)(])/,[``,`type.identifier`,``]],[/`.*`/,`variable.source`],[/_/,{token:`emphasis`,next:`@emphasis_underscore`}],[/\*(?!\*)/,{token:`emphasis`,next:`@emphasis_asterisk`}],[/\*\*/,{token:`strong`,next:`@strong`}],[/{/,{token:`delimiter.bracket`,next:`@expression`,nextEmbedded:`js`}]],import:[[/'\s*(;|$)/,{token:`string`,next:`@pop`,nextEmbedded:`@pop`}]],expression:[[/{/,{token:`delimiter.bracket`,next:`@expression`}],[/}/,{token:`delimiter.bracket`,next:`@pop`,nextEmbedded:`@pop`}]],export:[[/^\s*$/,{token:`delimiter.bracket`,next:`@pop`,nextEmbedded:`@pop`}]],jsx:[[/\s+/,``],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,[`attribute.name`,`operator`,`string`]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,[`attribute.name`,`operator`,`string`]],[/(\w+(?=\s|>|={|$))/,[`attribute.name`]],[/={/,{token:`delimiter.bracket`,next:`@expression`,nextEmbedded:`js`}],[/>/,{token:`type.identifier`,next:`@pop`}]],header:[[/.$/,{token:`keyword`,next:`@pop`}],{include:`content`},[/./,{token:`keyword`}]],strong:[[/\*\*/,{token:`strong`,next:`@pop`}],{include:`content`},[/./,{token:`strong`}]],emphasis_underscore:[[/_/,{token:`emphasis`,next:`@pop`}],{include:`content`},[/./,{token:`emphasis`}]],emphasis_asterisk:[[/\*(?!\*)/,{token:`emphasis`,next:`@pop`}],{include:`content`},[/./,{token:`emphasis`}]],frontmatter:[[/^---$/,{token:`meta.content`,nextEmbedded:`@pop`,next:`@pop`}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:`string`,next:`@pop`,nextEmbedded:`@pop`}],[/.*$/,`variable.source`]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:`string`,next:`@pop`,nextEmbedded:`@pop`}],[/.*$/,`variable.source`]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:`string`,next:`@pop`}],[/.*$/,`variable.source`]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:`string`,next:`@pop`}],[/.*$/,`variable.source`]]}};export{t as conf,n as language}; \ No newline at end of file +import{h as e}from"./editor.api2-DVs509bq.js";var t={comments:{blockComment:[`{/*`,`*/}`]},brackets:[[`{`,`}`]],autoClosingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`“`,close:`”`},{open:`‘`,close:`’`},{open:"`",close:"`"},{open:`{`,close:`}`},{open:`(`,close:`)`},{open:`_`,close:`_`},{open:`**`,close:`**`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:e.IndentAction.None,appendText:`- `}},{beforeText:/^\s*\+ .+/,action:{indentAction:e.IndentAction.None,appendText:`+ `}},{beforeText:/^\s*\* .+/,action:{indentAction:e.IndentAction.None,appendText:`* `}},{beforeText:/^> /,action:{indentAction:e.IndentAction.None,appendText:`> `}},{beforeText:/<\w+/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:e.IndentAction.Outdent}},...Array.from({length:100},(t,n)=>({beforeText:RegExp(`^${n}\\. .+`),action:{indentAction:e.IndentAction.None,appendText:`${n+1}. `}}))]},n={defaultToken:``,tokenPostfix:`.mdx`,control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:`meta.content`,next:`@frontmatter`,nextEmbedded:`yaml`}],[/^\s*import/,{token:`keyword`,next:`@import`,nextEmbedded:`js`}],[/^\s*export/,{token:`keyword`,next:`@export`,nextEmbedded:`js`}],[/<\w+/,{token:`type.identifier`,next:`@jsx`}],[/<\/?\w+>/,`type.identifier`],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:`white`},{token:`comment`},{token:`keyword`,next:`@header`}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,[`white`,`comment`,`keyword`,`white`]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,[`white`,`comment`,`number`,`white`]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,[`white`,`comment`,`number`,`white`]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,[`white`,`comment`,`keyword`]],[/`{3,}(\s.*)?$/,{token:`string`,next:`@codeblock_backtick`}],[/~{3,}(\s.*)?$/,{token:`string`,next:`@codeblock_tilde`}],[/`{3,}(\S+).*$/,{token:`string`,next:`@codeblock_highlight_backtick`,nextEmbedded:`$1`}],[/~{3,}(\S+).*$/,{token:`string`,next:`@codeblock_highlight_tilde`,nextEmbedded:`$1`}],[/^(\s*)(-{4,})$/,[`white`,`comment`]],[/^(\s*)(>+)/,[`white`,`comment`]],{include:`content`}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,[``,`string.link`,``,`type.identifier`,`string.link`,``]],[/(\[)(.+)(]\()(.+)(\))/,[``,`type.identifier`,``,`string.link`,``]],[/(\[)(.+)(]\[)(.+)(])/,[``,`type.identifier`,``,`type.identifier`,``]],[/(\[)(.+)(]:\s+)(\S*)/,[``,`type.identifier`,``,`string.link`]],[/(\[)(.+)(])/,[``,`type.identifier`,``]],[/`.*`/,`variable.source`],[/_/,{token:`emphasis`,next:`@emphasis_underscore`}],[/\*(?!\*)/,{token:`emphasis`,next:`@emphasis_asterisk`}],[/\*\*/,{token:`strong`,next:`@strong`}],[/{/,{token:`delimiter.bracket`,next:`@expression`,nextEmbedded:`js`}]],import:[[/'\s*(;|$)/,{token:`string`,next:`@pop`,nextEmbedded:`@pop`}]],expression:[[/{/,{token:`delimiter.bracket`,next:`@expression`}],[/}/,{token:`delimiter.bracket`,next:`@pop`,nextEmbedded:`@pop`}]],export:[[/^\s*$/,{token:`delimiter.bracket`,next:`@pop`,nextEmbedded:`@pop`}]],jsx:[[/\s+/,``],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,[`attribute.name`,`operator`,`string`]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,[`attribute.name`,`operator`,`string`]],[/(\w+(?=\s|>|={|$))/,[`attribute.name`]],[/={/,{token:`delimiter.bracket`,next:`@expression`,nextEmbedded:`js`}],[/>/,{token:`type.identifier`,next:`@pop`}]],header:[[/.$/,{token:`keyword`,next:`@pop`}],{include:`content`},[/./,{token:`keyword`}]],strong:[[/\*\*/,{token:`strong`,next:`@pop`}],{include:`content`},[/./,{token:`strong`}]],emphasis_underscore:[[/_/,{token:`emphasis`,next:`@pop`}],{include:`content`},[/./,{token:`emphasis`}]],emphasis_asterisk:[[/\*(?!\*)/,{token:`emphasis`,next:`@pop`}],{include:`content`},[/./,{token:`emphasis`}]],frontmatter:[[/^---$/,{token:`meta.content`,nextEmbedded:`@pop`,next:`@pop`}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:`string`,next:`@pop`,nextEmbedded:`@pop`}],[/.*$/,`variable.source`]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:`string`,next:`@pop`,nextEmbedded:`@pop`}],[/.*$/,`variable.source`]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:`string`,next:`@pop`}],[/.*$/,`variable.source`]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:`string`,next:`@pop`}],[/.*$/,`variable.source`]]}};export{t as conf,n as language}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/mermaid.core-Ddyah3MZ.js b/apps/pythinker-code/dist-web/assets/mermaid.core-D-hNgJPv.js similarity index 83% rename from apps/pythinker-code/dist-web/assets/mermaid.core-Ddyah3MZ.js rename to apps/pythinker-code/dist-web/assets/mermaid.core-D-hNgJPv.js index 59d2d4bfc..3f7c65a21 100644 --- a/apps/pythinker-code/dist-web/assets/mermaid.core-Ddyah3MZ.js +++ b/apps/pythinker-code/dist-web/assets/mermaid.core-D-hNgJPv.js @@ -1,6 +1,6 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/c4Diagram-7LVT6UL2-DJuqA3c6.js","assets/chunk-PWAF6VOD-vmg_e0ho.js","assets/src-Cn6kALDM.js","assets/chunk-QTnfLwEv.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/chunk-DU6HZSFF-DfRjAqU1.js","assets/preload-helper-zJ_50EbN.js","assets/purify.es-CvIXgbbv.js","assets/chunk-75Z2AOVW-D2HolPjd.js","assets/dist-lRkD-JPF.js","assets/chunk-GMAD6QVW-xizYnG4f.js","assets/chunk-4HAMMTFA-B5soPjjq.js","assets/chunk-P2QGCYS3-CQc2NCc1.js","assets/rough.esm-CSKSodPl.js","assets/chunk-F27PBJKO-DeO1S11A.js","assets/flowDiagram-HODETNUW-BbWuZrop.js","assets/chunk-GVQU2GXP-BrOdU7Oy.js","assets/chunk-L3NEJ4N5-XwNqFvev.js","assets/chunk-LNGE3PJU-OosUmKKA.js","assets/chunk-OSK3NFVY-BT2Y-lqQ.js","assets/line-CleFFpQp.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-POPQ4Y6H-BCRCUUP_.js","assets/chunk-SHT3W25Y-BDvl1UFN.js","assets/channel-BAi54gt4.js","assets/chunk-5VM5RSS4-ZNzvKenW.js","assets/chunk-TLUHSLCS-DN2eHVWx.js","assets/chunk-XXDRQBXY-Y1lmGfHA.js","assets/swimlanesDiagram-VR7AAH4N-CyBcQgTZ.js","assets/erDiagram-RLTQ6QDP-DN2h_Wg7.js","assets/gitGraphDiagram-WWUBYQGX-CrtmeRwl.js","assets/mermaid-parser.core-BCOGZFb-.js","assets/chunk-FOHPRMQF-Crrb2Aik.js","assets/chunk-2Q5K7J3B-C1jixKkw.js","assets/chunk-JWPE2WC7-DVXcaiue.js","assets/ganttDiagram-EL5Y4UJY-CVJjzfHN.js","assets/linear-BVqbHFqZ.js","assets/defaultLocale-C8Fc0cco.js","assets/init-D6jRqBbL.js","assets/infoDiagram-27XIBGKW-Dm_5Ndt1.js","assets/chunk-CLGD4ZFX-D_luxf7b.js","assets/pieDiagram-E7YTZNPT-Cq0FcMpS.js","assets/ordinal-hYBb2elL.js","assets/arc-CuHXSNPr.js","assets/quadrantDiagram-AXDQQJYC-Bok4eu9T.js","assets/xychartDiagram-S5SC5T6Z-Bxfbsdng.js","assets/requirementDiagram-BXWQKSXE-D3_MdioG.js","assets/sequenceDiagram-WJ2MYXX4-CRPyYfSc.js","assets/classDiagram-ZZMXUADV-DgLfiy3d.js","assets/chunk-TICWLB2K-DA5H3teo.js","assets/classDiagram-v2-VYDZK3BY-DgLfiy3d.js","assets/stateDiagram-D77RDMKH-CMMwMfzr.js","assets/dagre-BJJUWK_n.js","assets/graphlib-B8gBHxth.js","assets/chunk-IMKFNOWR-DWwC1m5B.js","assets/stateDiagram-v2-MP3YSRHH-CluIMNDx.js","assets/journeyDiagram-3NMN7TZE-DgJZ3nMB.js","assets/timeline-definition-24CTP7MA-CLvi9syn.js","assets/mindmap-definition-YA3MSWOX-D4TvMM7a.js","assets/kanban-definition-UXKFOSKX-D-Gjx2g3.js","assets/sankeyDiagram-P5KCCOFB-DDpT1WQe.js","assets/diagram-Z3DM3KII-BWQvjWeh.js","assets/diagram-UQ7AKVKN-QjDev_qj.js","assets/blockDiagram-I7D4REHJ-Dn5fFHT9.js","assets/diagram-S7CK7UJ4-B6QAjDJA.js","assets/architectureDiagram-5GKGNRK7-VuwMdVnu.js","assets/cytoscape.esm-dytuJj4e.js","assets/diagram-VSXAHHWV-Dkofa1Pz.js","assets/ishikawaDiagram-5VMMS53U-Cflokjrr.js","assets/vennDiagram-4TSXK5OY-B8-by92M.js","assets/diagram-VX7I27RA-CqD89nOU.js","assets/wardleyDiagram-VM6X3IG4-6PjRECuz.js","assets/cynefinDiagram-5FMLGOSQ-C9_d3GMr.js","assets/railroadDiagram-O6MQD6OU-CcjyfvwI.js","assets/chunk-SVP7TREG-BnQxQiBZ.js","assets/ebnfDiagram-PWID7BFC-Df7YYj_B.js","assets/abnfDiagram-VCTEODGH-Dr0SnIEa.js","assets/pegDiagram-XKGWAZYB-BDYjmSRS.js"])))=>i.map(i=>d[i]); -import{t as e}from"./preload-helper-zJ_50EbN.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{h as n,m as r,p as i}from"./src-Cn6kALDM.js";import{C as a,E as o,I as s,L as c,N as l,P as u,Q as d,S as f,T as p,V as m,W as h,X as g,Z as _,_ as v,b as y,c as b,g as x,l as S,m as C,n as w,p as T,q as ee,r as te,t as ne,u as re}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as ie}from"./purify.es-CvIXgbbv.js";import{S as ae,a as oe,f as E,g as D,h as se,i as ce,o as le,v as ue,x as de,y as fe}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as pe}from"./chunk-CLGD4ZFX-D_luxf7b.js";import{r as me}from"./chunk-PWAF6VOD-vmg_e0ho.js";import{i as he}from"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import"./chunk-OSK3NFVY-BT2Y-lqQ.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import{n as ge}from"./chunk-TLUHSLCS-DN2eHVWx.js";import{i as _e,l as ve,n as ye,o as be}from"./chunk-2E4U76K2-CUuPs4AQ.js";import{n as xe,t as Se}from"./chunk-LNGE3PJU-OosUmKKA.js";function Ce(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function we(e){if(e==null)return!0;if(de(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!ae(e)&&!ue(e)&&!fe(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Ce(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var O=`comm`,Te=`rule`,Ee=`decl`,De=`@import`,Oe=`@namespace`,ke=`@keyframes`,Ae=`@layer`,je=Math.abs,k=String.fromCharCode;function Me(e){return e.trim()}function A(e,t,n){return e.replace(t,n)}function j(e,t){return e.charCodeAt(t)|0}function M(e,t,n){return e.slice(t,n)}function N(e){return e.length}function Ne(e){return e.length}function P(e,t){return t.push(e),e}var F=1,I=1,Pe=0,L=0,R=0,z=``;function B(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:F,column:I,length:o,return:``,siblings:s}}function Fe(){return R}function Ie(){return R=L>0?j(z,--L):0,I--,R===10&&(I=1,F--),R}function V(){return R=L2||G(R)>3?``:` `}function Be(e,t){for(;--t&&V()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return W(e,U()+(t<6&&H()==32&&V()==32))}function q(e){for(;V();)switch(R){case e:return L;case 34:case 39:e!==34&&e!==39&&q(R);break;case 40:e===41&&q(e);break;case 92:V();break}return L}function Ve(e,t){for(;V()&&e+R!==57&&!(e+R===84&&H()===47););return`/*`+W(t,L-1)+`*`+k(e===47?e:V())}function He(e){for(;!G(H());)V();return W(e,L)}function Ue(e){return Re(J(``,null,null,null,[``],e=Le(e),0,[0],e))}function J(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=V()){case 40:m!=108&&j(w,d-1)==58?(v++,w+=`(`):w+=K(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=K(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=k(y);break}w+=ze(m);break;case 92:w+=Be(U()-1,7);continue;case 47:switch(H()){case 42:case 47:P(Ge(Ve(V(),U()),t,n,c),c),(G(m||1)==5||G(H()||1)==5)&&N(w)&&M(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=N(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=k(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=A(w,/\f/g,``)),p>0&&(N(w)-d||h===0)&&P(p>32?Ke(w+`;`,r,n,d-1,c):Ke(A(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(P(C=We(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)J(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(j(w,3)===110)break;case 108:if(j(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?J(e,C,C,r&&P(We(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):J(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+N(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&Ie()==125)continue}switch(w+=k(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(N(w)-1)*_,_=1;break;case 64:H()===45&&(w+=K(V())),f=H(),u=d=N(b=w+=He(U())),y++;break;case 45:m===45&&N(w)==2&&(h=0)}}return a}function We(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=Ne(p),h=0,g=0,_=0;h0?p[v]+` `+y:A(y,/&\f/g,p[v])))&&(c[_++]=b);return B(e,t,n,i===0?Te:s,c,l,u,d)}function Ge(e,t,n,r){return B(e,t,n,O,k(Fe()),M(e,2,-2),0,r)}function Ke(e,t,n,r,i){return B(e,t,n,Ee,M(e,0,r),M(e,r+1,-1),r,i)}function Y(e,t){for(var n=``,r=0;r/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./c4Diagram-7LVT6UL2-DJuqA3c6.js`);return{diagram:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:Ye,diagram:t}},`loader`)},Ze=`flowchart`,Qe={id:Ze,detector:t((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-BbWuZrop.js`);return{diagram:e}},__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28]));return{id:Ze,diagram:t}},`loader`)},$e=`flowchart-v2`,et={id:$e,detector:t((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-BbWuZrop.js`);return{diagram:e}},__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28]));return{id:$e,diagram:t}},`loader`)},tt=`swimlane`,nt={id:tt,detector:t(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./swimlanesDiagram-VR7AAH4N-CyBcQgTZ.js`);return{diagram:e}},__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28]));return{id:tt,diagram:t}},`loader`)},rt=`er`,it={id:rt,detector:t(e=>/^\s*erDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./erDiagram-RLTQ6QDP-DN2h_Wg7.js`);return{diagram:e}},__vite__mapDeps([30,1,2,3,4,5,6,7,8,9,10,25,11,12,13,16,17,19,20,21,22,23,27,28]));return{id:rt,diagram:t}},`loader`)},at=`gitGraph`,ot={id:at,detector:t(e=>/^\s*gitGraph/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-WWUBYQGX-CrtmeRwl.js`);return{diagram:e}},__vite__mapDeps([31,32,6,33,2,3,4,8,9,5,7,34,35]));return{id:at,diagram:t}},`loader`)},st=`gantt`,ct={id:st,detector:t(e=>/^\s*gantt/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ganttDiagram-EL5Y4UJY-CVJjzfHN.js`);return{diagram:e}},__vite__mapDeps([36,3,9,37,2,4,38,39,8,5,6,7]));return{id:st,diagram:t}},`loader`)},lt=`info`,ut={id:lt,detector:t(e=>/^\s*info/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./infoDiagram-27XIBGKW-Dm_5Ndt1.js`);return{diagram:e}},__vite__mapDeps([40,32,6,33,2,3,4,5,7,41]));return{id:lt,diagram:t}},`loader`)},dt=`pie`,ft={id:dt,detector:t(e=>/^\s*pie/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./pieDiagram-E7YTZNPT-Cq0FcMpS.js`);return{diagram:e}},__vite__mapDeps([42,9,3,32,6,33,2,4,21,43,39,44,22,8,5,7,41,35]));return{id:dt,diagram:t}},`loader`)},pt=`quadrantChart`,mt={id:pt,detector:t(e=>/^\s*quadrantChart/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./quadrantDiagram-AXDQQJYC-Bok4eu9T.js`);return{diagram:e}},__vite__mapDeps([45,37,2,3,4,38,39,5,6,7]));return{id:pt,diagram:t}},`loader`)},ht=`xychart`,gt={id:ht,detector:t(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./xychartDiagram-S5SC5T6Z-Bxfbsdng.js`);return{diagram:e}},__vite__mapDeps([46,1,2,3,4,5,6,7,37,38,39,43,8,9,20,21,22,10,41]));return{id:ht,diagram:t}},`loader`)},_t=`requirement`,vt={id:_t,detector:t(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./requirementDiagram-BXWQKSXE-D3_MdioG.js`);return{diagram:e}},__vite__mapDeps([47,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,19,20,21,22,23,27,28]));return{id:_t,diagram:t}},`loader`)},yt=`sequence`,bt={id:yt,detector:t(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./sequenceDiagram-WJ2MYXX4-CRPyYfSc.js`);return{diagram:e}},__vite__mapDeps([48,9,3,2,4,8,5,6,7,34,14,18]));return{id:yt,diagram:t}},`loader`)},xt=`class`,St={id:xt,detector:t((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./classDiagram-ZZMXUADV-DgLfiy3d.js`);return{diagram:e}},__vite__mapDeps([49,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,19,20,21,22,23,50,26,27,28]));return{id:xt,diagram:t}},`loader`)},Ct=`classDiagram`,wt={id:Ct,detector:t((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./classDiagram-v2-VYDZK3BY-DgLfiy3d.js`);return{diagram:e}},__vite__mapDeps([51,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,19,20,21,22,23,50,26,27,28]));return{id:Ct,diagram:t}},`loader`)},Tt=`state`,Et={id:Tt,detector:t((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./stateDiagram-D77RDMKH-CMMwMfzr.js`);return{diagram:e}},__vite__mapDeps([52,1,2,3,4,5,6,7,8,9,20,21,22,53,54,10,11,12,13,14,16,55,23,27,17,19,28]));return{id:Tt,diagram:t}},`loader`)},Dt=`stateDiagram`,Ot={id:Dt,detector:t((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-MP3YSRHH-CluIMNDx.js`);return{diagram:e}},__vite__mapDeps([56,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,55,23,27,17,19,20,21,22,28]));return{id:Dt,diagram:t}},`loader`)},kt=`journey`,At={id:kt,detector:t(e=>/^\s*journey/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./journeyDiagram-3NMN7TZE-DgJZ3nMB.js`);return{diagram:e}},__vite__mapDeps([57,2,3,4,44,9,21,5,6,7,26,14]));return{id:kt,diagram:t}},`loader`)},jt={draw:t((e,t,n)=>{r.debug(`rendering svg for syntax error -`);let i=pe(t),a=i.append(`g`);i.attr(`viewBox`,`0 0 2412 512`),b(i,100,512,!0),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},Mt=jt,Nt={db:{},renderer:jt,parser:{parse:t(()=>{},`parse`)}},Pt=`flowchart-elk`,Ft={id:Pt,detector:t((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-BbWuZrop.js`);return{diagram:e}},__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28]));return{id:Pt,diagram:t}},`loader`)},It=`timeline`,Lt={id:It,detector:t(e=>/^\s*timeline/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./timeline-definition-24CTP7MA-CLvi9syn.js`);return{diagram:e}},__vite__mapDeps([58,2,3,4,44,9,21,8,5,6,7,41]));return{id:It,diagram:t}},`loader`)},Rt=`mindmap`,zt={id:Rt,detector:t(e=>/^\s*mindmap/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./mindmap-definition-YA3MSWOX-D4TvMM7a.js`);return{diagram:e}},__vite__mapDeps([59,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,19,20,21,22,23,27,28]));return{id:Rt,diagram:t}},`loader`)},Bt=`kanban`,Vt={id:Bt,detector:t(e=>/^\s*kanban/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./kanban-definition-UXKFOSKX-D-Gjx2g3.js`);return{diagram:e}},__vite__mapDeps([60,1,2,3,4,5,6,7,8,9,10,11,12,13,26,41,16,17,18]));return{id:Bt,diagram:t}},`loader`)},Ht=`sankey`,Ut={id:Ht,detector:t(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./sankeyDiagram-P5KCCOFB-DDpT1WQe.js`);return{diagram:e}},__vite__mapDeps([61,2,3,4,43,39,5,6,7]));return{id:Ht,diagram:t}},`loader`)},Wt=`packet`,Gt={id:Wt,detector:t(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-Z3DM3KII-BWQvjWeh.js`);return{diagram:e}},__vite__mapDeps([62,32,6,33,2,3,4,8,9,5,7,41,35]));return{id:Wt,diagram:t}},`loader`)},Kt=`radar`,qt={id:Kt,detector:t(e=>/^\s*radar-beta/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-UQ7AKVKN-QjDev_qj.js`);return{diagram:e}},__vite__mapDeps([63,32,6,33,2,3,4,8,9,5,7,41,35]));return{id:Kt,diagram:t}},`loader`)},Jt=`block`,Yt={id:Jt,detector:t(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./blockDiagram-I7D4REHJ-Dn5fFHT9.js`);return{diagram:e}},__vite__mapDeps([64,1,2,3,4,5,6,7,8,9,54,10,25,11,12,13,26,16,19,20,21,22]));return{id:Jt,diagram:t}},`loader`)},Xt=`treeView`,Zt={id:Xt,detector:t(e=>/^\s*treeView-beta/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-S7CK7UJ4-B6QAjDJA.js`);return{diagram:e}},__vite__mapDeps([65,1,2,3,4,5,6,7,32,33,8,9,34,41,35]));return{id:Xt,diagram:t}},`loader`)},Qt=`architecture`,$t={id:Qt,detector:t(e=>/^\s*architecture/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./architectureDiagram-5GKGNRK7-VuwMdVnu.js`);return{diagram:e}},__vite__mapDeps([66,3,1,2,4,5,6,7,32,33,67,8,9,10,41,35]));return{id:Qt,diagram:t}},`loader`)},en=`eventmodeling`,tn={id:en,detector:t(e=>/^\s*eventmodeling/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-VSXAHHWV-Dkofa1Pz.js`);return{diagram:e}},__vite__mapDeps([68,32,6,33,2,3,4,8,9,5,7,35]));return{id:en,diagram:t}},`loader`)},nn=`ishikawa`,rn={id:nn,detector:t(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-5VMMS53U-Cflokjrr.js`);return{diagram:e}},__vite__mapDeps([69,2,3,4,8,9,5,6,7,41,13]));return{id:nn,diagram:t}},`loader`)},an=`venn`,on={id:an,detector:t(e=>/^\s*venn-beta/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./vennDiagram-4TSXK5OY-B8-by92M.js`);return{diagram:e}},__vite__mapDeps([70,2,3,4,8,9,5,6,7,41,13]));return{id:an,diagram:t}},`loader`)},sn=`treemap`,cn={id:sn,detector:t(e=>/^\s*treemap/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-VX7I27RA-CqD89nOU.js`);return{diagram:e}},__vite__mapDeps([71,32,6,33,2,3,4,38,43,39,8,9,5,7,41,35,12,23]));return{id:sn,diagram:t}},`loader`)},ln=`wardley`,un={id:ln,detector:t(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./wardleyDiagram-VM6X3IG4-6PjRECuz.js`);return{diagram:e}},__vite__mapDeps([72,32,6,33,2,3,4,8,9,5,7,41,35]));return{id:ln,diagram:t}},`loader`)},dn=`cynefin`,fn={id:dn,detector:t(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./cynefinDiagram-5FMLGOSQ-C9_d3GMr.js`);return{diagram:e}},__vite__mapDeps([73,32,6,33,2,3,4,8,9,5,7,41,35]));return{id:dn,diagram:t}},`loader`)},pn=`railroad`,mn={id:pn,detector:t(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./railroadDiagram-O6MQD6OU-CcjyfvwI.js`);return{diagram:e}},__vite__mapDeps([74,32,6,33,2,3,4,5,7,41,35,75]));return{id:pn,diagram:t}},`loader`)},hn=`railroadEbnf`,gn={id:hn,detector:t(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ebnfDiagram-PWID7BFC-Df7YYj_B.js`);return{diagram:e}},__vite__mapDeps([76,32,6,33,2,3,4,5,7,41,35,75]));return{id:hn,diagram:t}},`loader`)},_n=`railroadAbnf`,vn={id:_n,detector:t(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./abnfDiagram-VCTEODGH-Dr0SnIEa.js`);return{diagram:e}},__vite__mapDeps([77,32,6,33,2,3,4,5,7,41,35,75]));return{id:_n,diagram:t}},`loader`)},yn=`railroadPeg`,bn={id:yn,detector:t(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./pegDiagram-XKGWAZYB-BDYjmSRS.js`);return{diagram:e}},__vite__mapDeps([78,32,6,33,2,3,4,5,7,41,35,75]));return{id:yn,diagram:t}},`loader`)},xn=!1,X=t(()=>{xn||(xn=!0,l(`error`,Nt,e=>e.toLowerCase().trim()===`error`),l(`---`,{db:{clear:t(()=>{},`clear`)},styles:{},renderer:{draw:t(()=>{},`draw`)},parser:{parse:t(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:t(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),u(Ft,zt,$t),u(Xe,Vt,wt,St,it,ct,ut,ft,vt,bt,nt,et,Qe,Lt,ot,Ot,Et,At,mt,Ut,Gt,gt,Yt,tn,Zt,qt,rn,cn,mn,gn,vn,bn,on,un,fn))},`addDiagrams`),Sn=t(async()=>{r.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(C).map(async([e,{detector:t,loader:n}])=>{if(n)try{f(e)}catch{try{let{diagram:e,id:r}=await n();l(r,e,t)}catch(t){throw r.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete C[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){r.error(`Failed to load ${e.length} external diagrams`);for(let t of e)r.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),Cn=`graphics-document document`;function wn(e,t){e.attr(`role`,Cn),t!==``&&e.attr(`aria-roledescription`,t)}t(wn,`setA11yDiagramInfo`);function Tn(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}t(Tn,`addSVGa11yTitleDescription`);var En=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{t(this,`Diagram`)}static async fromText(t,n={}){let r=y(),i=T(t,r);t=le(t)+` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/c4Diagram-7LVT6UL2-C1tFI83m.js","assets/chunk-PWAF6VOD-D9eOryqj.js","assets/src-Cn6kALDM.js","assets/chunk-QTnfLwEv.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/chunk-DU6HZSFF-B78kfBb6.js","assets/preload-helper-zJ_50EbN.js","assets/purify.es-F_7NWVtX.js","assets/chunk-75Z2AOVW-CAoob5DH.js","assets/dist-lRkD-JPF.js","assets/chunk-GMAD6QVW-dCDLGP3F.js","assets/chunk-4HAMMTFA-Dlc4jvjp.js","assets/chunk-P2QGCYS3-BTLpY7ks.js","assets/rough.esm-CSKSodPl.js","assets/chunk-F27PBJKO-Duq9tlNm.js","assets/flowDiagram-HODETNUW-CCg3XHcN.js","assets/chunk-GVQU2GXP-Ddvf-Y11.js","assets/chunk-L3NEJ4N5-BKsN7TKH.js","assets/chunk-LNGE3PJU-OosUmKKA.js","assets/chunk-OSK3NFVY-ZXiPE9OQ.js","assets/line-BbuATs2H.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-POPQ4Y6H-mwDJO2QS.js","assets/chunk-SHT3W25Y-DUVFz2b-.js","assets/channel-CZ7H-7IH.js","assets/chunk-5VM5RSS4-ZNzvKenW.js","assets/chunk-TLUHSLCS-B1Sp0tTt.js","assets/chunk-XXDRQBXY-Y1lmGfHA.js","assets/swimlanesDiagram-VR7AAH4N-BMzCY_ka.js","assets/erDiagram-RLTQ6QDP-CC5LgS7F.js","assets/gitGraphDiagram-WWUBYQGX-Zl3vpThU.js","assets/mermaid-parser.core-BCOGZFb-.js","assets/chunk-FOHPRMQF-Crrb2Aik.js","assets/chunk-2Q5K7J3B-C1jixKkw.js","assets/chunk-JWPE2WC7-DVXcaiue.js","assets/ganttDiagram-EL5Y4UJY-DaO73M38.js","assets/linear-BVqbHFqZ.js","assets/defaultLocale-C8Fc0cco.js","assets/init-D6jRqBbL.js","assets/infoDiagram-27XIBGKW-D9QkrsSU.js","assets/chunk-CLGD4ZFX-BVZ8CvLY.js","assets/pieDiagram-E7YTZNPT-BwwV0YYs.js","assets/ordinal-hYBb2elL.js","assets/arc-CuHXSNPr.js","assets/quadrantDiagram-AXDQQJYC-DWW_AiDb.js","assets/xychartDiagram-S5SC5T6Z-DsSBRJeg.js","assets/requirementDiagram-BXWQKSXE-C3a3rkEd.js","assets/sequenceDiagram-WJ2MYXX4-DQujfCGb.js","assets/classDiagram-ZZMXUADV-DzRD6r_-.js","assets/chunk-TICWLB2K-YysjZR-U.js","assets/classDiagram-v2-VYDZK3BY-DzRD6r_-.js","assets/stateDiagram-D77RDMKH-UR96LRlZ.js","assets/dagre-BJJUWK_n.js","assets/graphlib-B8gBHxth.js","assets/chunk-IMKFNOWR-6fpjZ3bW.js","assets/stateDiagram-v2-MP3YSRHH-2K7jeXwd.js","assets/journeyDiagram-3NMN7TZE-QqsDP0jw.js","assets/timeline-definition-24CTP7MA-CFEx1g79.js","assets/mindmap-definition-YA3MSWOX-C61H_kRd.js","assets/kanban-definition-UXKFOSKX-eNZ99o2A.js","assets/sankeyDiagram-P5KCCOFB-CtfL3_U4.js","assets/diagram-Z3DM3KII-DU-LXpTD.js","assets/diagram-UQ7AKVKN-Ck6iq-Qw.js","assets/blockDiagram-I7D4REHJ-DE8hF0ap.js","assets/diagram-S7CK7UJ4-IeYmPHWJ.js","assets/architectureDiagram-5GKGNRK7-DvETkgeM.js","assets/cytoscape.esm-dytuJj4e.js","assets/diagram-VSXAHHWV-Bxl-JB75.js","assets/ishikawaDiagram-5VMMS53U-BuUErkxN.js","assets/vennDiagram-4TSXK5OY-nruFoEvU.js","assets/diagram-VX7I27RA-BeqD-7Ny.js","assets/wardleyDiagram-VM6X3IG4-nLPFq2IV.js","assets/cynefinDiagram-5FMLGOSQ-CHJGzUZq.js","assets/railroadDiagram-O6MQD6OU-CgaJk4H0.js","assets/chunk-SVP7TREG-CWy3EboY.js","assets/ebnfDiagram-PWID7BFC-CbseMTWH.js","assets/abnfDiagram-VCTEODGH-H7tndj7h.js","assets/pegDiagram-XKGWAZYB-Df1irOt3.js"])))=>i.map(i=>d[i]); +import{t as e}from"./preload-helper-zJ_50EbN.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{h as n,m as r,p as i}from"./src-Cn6kALDM.js";import{C as a,E as o,I as s,L as c,N as l,P as u,Q as d,S as f,T as p,V as m,W as h,X as g,Z as _,_ as v,b as y,c as b,g as x,l as S,m as C,n as w,p as T,q as ee,r as te,t as ne,u as re}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as ie}from"./purify.es-F_7NWVtX.js";import{S as ae,a as oe,f as E,g as D,h as se,i as ce,o as le,v as ue,x as de,y as fe}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as pe}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{r as me}from"./chunk-PWAF6VOD-D9eOryqj.js";import{i as he}from"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import"./chunk-OSK3NFVY-ZXiPE9OQ.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import{n as ge}from"./chunk-TLUHSLCS-B1Sp0tTt.js";import{i as _e,l as ve,n as ye,o as be}from"./chunk-2E4U76K2-DSYv76d-.js";import{n as xe,t as Se}from"./chunk-LNGE3PJU-OosUmKKA.js";function Ce(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function we(e){if(e==null)return!0;if(de(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!ae(e)&&!ue(e)&&!fe(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Ce(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var O=`comm`,Te=`rule`,Ee=`decl`,De=`@import`,Oe=`@namespace`,ke=`@keyframes`,Ae=`@layer`,je=Math.abs,k=String.fromCharCode;function Me(e){return e.trim()}function A(e,t,n){return e.replace(t,n)}function j(e,t){return e.charCodeAt(t)|0}function M(e,t,n){return e.slice(t,n)}function N(e){return e.length}function Ne(e){return e.length}function P(e,t){return t.push(e),e}var F=1,I=1,Pe=0,L=0,R=0,z=``;function B(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:F,column:I,length:o,return:``,siblings:s}}function Fe(){return R}function Ie(){return R=L>0?j(z,--L):0,I--,R===10&&(I=1,F--),R}function V(){return R=L2||G(R)>3?``:` `}function Be(e,t){for(;--t&&V()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return W(e,U()+(t<6&&H()==32&&V()==32))}function q(e){for(;V();)switch(R){case e:return L;case 34:case 39:e!==34&&e!==39&&q(R);break;case 40:e===41&&q(e);break;case 92:V();break}return L}function Ve(e,t){for(;V()&&e+R!==57&&!(e+R===84&&H()===47););return`/*`+W(t,L-1)+`*`+k(e===47?e:V())}function He(e){for(;!G(H());)V();return W(e,L)}function Ue(e){return Re(J(``,null,null,null,[``],e=Le(e),0,[0],e))}function J(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=V()){case 40:m!=108&&j(w,d-1)==58?(v++,w+=`(`):w+=K(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=K(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=k(y);break}w+=ze(m);break;case 92:w+=Be(U()-1,7);continue;case 47:switch(H()){case 42:case 47:P(Ge(Ve(V(),U()),t,n,c),c),(G(m||1)==5||G(H()||1)==5)&&N(w)&&M(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=N(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=k(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=A(w,/\f/g,``)),p>0&&(N(w)-d||h===0)&&P(p>32?Ke(w+`;`,r,n,d-1,c):Ke(A(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(P(C=We(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)J(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(j(w,3)===110)break;case 108:if(j(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?J(e,C,C,r&&P(We(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):J(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+N(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&Ie()==125)continue}switch(w+=k(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(N(w)-1)*_,_=1;break;case 64:H()===45&&(w+=K(V())),f=H(),u=d=N(b=w+=He(U())),y++;break;case 45:m===45&&N(w)==2&&(h=0)}}return a}function We(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=Ne(p),h=0,g=0,_=0;h0?p[v]+` `+y:A(y,/&\f/g,p[v])))&&(c[_++]=b);return B(e,t,n,i===0?Te:s,c,l,u,d)}function Ge(e,t,n,r){return B(e,t,n,O,k(Fe()),M(e,2,-2),0,r)}function Ke(e,t,n,r,i){return B(e,t,n,Ee,M(e,0,r),M(e,r+1,-1),r,i)}function Y(e,t){for(var n=``,r=0;r/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./c4Diagram-7LVT6UL2-C1tFI83m.js`);return{diagram:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return{id:Ye,diagram:t}},`loader`)},Ze=`flowchart`,Qe={id:Ze,detector:t((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-CCg3XHcN.js`);return{diagram:e}},__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28]));return{id:Ze,diagram:t}},`loader`)},$e=`flowchart-v2`,et={id:$e,detector:t((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-CCg3XHcN.js`);return{diagram:e}},__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28]));return{id:$e,diagram:t}},`loader`)},tt=`swimlane`,nt={id:tt,detector:t(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./swimlanesDiagram-VR7AAH4N-BMzCY_ka.js`);return{diagram:e}},__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28]));return{id:tt,diagram:t}},`loader`)},rt=`er`,it={id:rt,detector:t(e=>/^\s*erDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./erDiagram-RLTQ6QDP-CC5LgS7F.js`);return{diagram:e}},__vite__mapDeps([30,1,2,3,4,5,6,7,8,9,10,25,11,12,13,16,17,19,20,21,22,23,27,28]));return{id:rt,diagram:t}},`loader`)},at=`gitGraph`,ot={id:at,detector:t(e=>/^\s*gitGraph/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-WWUBYQGX-Zl3vpThU.js`);return{diagram:e}},__vite__mapDeps([31,32,6,33,2,3,4,8,9,5,7,34,35]));return{id:at,diagram:t}},`loader`)},st=`gantt`,ct={id:st,detector:t(e=>/^\s*gantt/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ganttDiagram-EL5Y4UJY-DaO73M38.js`);return{diagram:e}},__vite__mapDeps([36,3,9,37,2,4,38,39,8,5,6,7]));return{id:st,diagram:t}},`loader`)},lt=`info`,ut={id:lt,detector:t(e=>/^\s*info/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./infoDiagram-27XIBGKW-D9QkrsSU.js`);return{diagram:e}},__vite__mapDeps([40,32,6,33,2,3,4,5,7,41]));return{id:lt,diagram:t}},`loader`)},dt=`pie`,ft={id:dt,detector:t(e=>/^\s*pie/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./pieDiagram-E7YTZNPT-BwwV0YYs.js`);return{diagram:e}},__vite__mapDeps([42,9,3,32,6,33,2,4,21,43,39,44,22,8,5,7,41,35]));return{id:dt,diagram:t}},`loader`)},pt=`quadrantChart`,mt={id:pt,detector:t(e=>/^\s*quadrantChart/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./quadrantDiagram-AXDQQJYC-DWW_AiDb.js`);return{diagram:e}},__vite__mapDeps([45,37,2,3,4,38,39,5,6,7]));return{id:pt,diagram:t}},`loader`)},ht=`xychart`,gt={id:ht,detector:t(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./xychartDiagram-S5SC5T6Z-DsSBRJeg.js`);return{diagram:e}},__vite__mapDeps([46,1,2,3,4,5,6,7,37,38,39,43,8,9,20,21,22,10,41]));return{id:ht,diagram:t}},`loader`)},_t=`requirement`,vt={id:_t,detector:t(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./requirementDiagram-BXWQKSXE-C3a3rkEd.js`);return{diagram:e}},__vite__mapDeps([47,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,19,20,21,22,23,27,28]));return{id:_t,diagram:t}},`loader`)},yt=`sequence`,bt={id:yt,detector:t(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./sequenceDiagram-WJ2MYXX4-DQujfCGb.js`);return{diagram:e}},__vite__mapDeps([48,9,3,2,4,8,5,6,7,34,14,18]));return{id:yt,diagram:t}},`loader`)},xt=`class`,St={id:xt,detector:t((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./classDiagram-ZZMXUADV-DzRD6r_-.js`);return{diagram:e}},__vite__mapDeps([49,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,19,20,21,22,23,50,26,27,28]));return{id:xt,diagram:t}},`loader`)},Ct=`classDiagram`,wt={id:Ct,detector:t((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./classDiagram-v2-VYDZK3BY-DzRD6r_-.js`);return{diagram:e}},__vite__mapDeps([51,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,19,20,21,22,23,50,26,27,28]));return{id:Ct,diagram:t}},`loader`)},Tt=`state`,Et={id:Tt,detector:t((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./stateDiagram-D77RDMKH-UR96LRlZ.js`);return{diagram:e}},__vite__mapDeps([52,1,2,3,4,5,6,7,8,9,20,21,22,53,54,10,11,12,13,14,16,55,23,27,17,19,28]));return{id:Tt,diagram:t}},`loader`)},Dt=`stateDiagram`,Ot={id:Dt,detector:t((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-MP3YSRHH-2K7jeXwd.js`);return{diagram:e}},__vite__mapDeps([56,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,55,23,27,17,19,20,21,22,28]));return{id:Dt,diagram:t}},`loader`)},kt=`journey`,At={id:kt,detector:t(e=>/^\s*journey/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./journeyDiagram-3NMN7TZE-QqsDP0jw.js`);return{diagram:e}},__vite__mapDeps([57,2,3,4,44,9,21,5,6,7,26,14]));return{id:kt,diagram:t}},`loader`)},jt={draw:t((e,t,n)=>{r.debug(`rendering svg for syntax error +`);let i=pe(t),a=i.append(`g`);i.attr(`viewBox`,`0 0 2412 512`),b(i,100,512,!0),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},Mt=jt,Nt={db:{},renderer:jt,parser:{parse:t(()=>{},`parse`)}},Pt=`flowchart-elk`,Ft={id:Pt,detector:t((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-CCg3XHcN.js`);return{diagram:e}},__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28]));return{id:Pt,diagram:t}},`loader`)},It=`timeline`,Lt={id:It,detector:t(e=>/^\s*timeline/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./timeline-definition-24CTP7MA-CFEx1g79.js`);return{diagram:e}},__vite__mapDeps([58,2,3,4,44,9,21,8,5,6,7,41]));return{id:It,diagram:t}},`loader`)},Rt=`mindmap`,zt={id:Rt,detector:t(e=>/^\s*mindmap/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./mindmap-definition-YA3MSWOX-C61H_kRd.js`);return{diagram:e}},__vite__mapDeps([59,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,19,20,21,22,23,27,28]));return{id:Rt,diagram:t}},`loader`)},Bt=`kanban`,Vt={id:Bt,detector:t(e=>/^\s*kanban/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./kanban-definition-UXKFOSKX-eNZ99o2A.js`);return{diagram:e}},__vite__mapDeps([60,1,2,3,4,5,6,7,8,9,10,11,12,13,26,41,16,17,18]));return{id:Bt,diagram:t}},`loader`)},Ht=`sankey`,Ut={id:Ht,detector:t(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./sankeyDiagram-P5KCCOFB-CtfL3_U4.js`);return{diagram:e}},__vite__mapDeps([61,2,3,4,43,39,5,6,7]));return{id:Ht,diagram:t}},`loader`)},Wt=`packet`,Gt={id:Wt,detector:t(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-Z3DM3KII-DU-LXpTD.js`);return{diagram:e}},__vite__mapDeps([62,32,6,33,2,3,4,8,9,5,7,41,35]));return{id:Wt,diagram:t}},`loader`)},Kt=`radar`,qt={id:Kt,detector:t(e=>/^\s*radar-beta/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-UQ7AKVKN-Ck6iq-Qw.js`);return{diagram:e}},__vite__mapDeps([63,32,6,33,2,3,4,8,9,5,7,41,35]));return{id:Kt,diagram:t}},`loader`)},Jt=`block`,Yt={id:Jt,detector:t(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./blockDiagram-I7D4REHJ-DE8hF0ap.js`);return{diagram:e}},__vite__mapDeps([64,1,2,3,4,5,6,7,8,9,54,10,25,11,12,13,26,16,19,20,21,22]));return{id:Jt,diagram:t}},`loader`)},Xt=`treeView`,Zt={id:Xt,detector:t(e=>/^\s*treeView-beta/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-S7CK7UJ4-IeYmPHWJ.js`);return{diagram:e}},__vite__mapDeps([65,1,2,3,4,5,6,7,32,33,8,9,34,41,35]));return{id:Xt,diagram:t}},`loader`)},Qt=`architecture`,$t={id:Qt,detector:t(e=>/^\s*architecture/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./architectureDiagram-5GKGNRK7-DvETkgeM.js`);return{diagram:e}},__vite__mapDeps([66,3,1,2,4,5,6,7,32,33,67,8,9,10,41,35]));return{id:Qt,diagram:t}},`loader`)},en=`eventmodeling`,tn={id:en,detector:t(e=>/^\s*eventmodeling/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-VSXAHHWV-Bxl-JB75.js`);return{diagram:e}},__vite__mapDeps([68,32,6,33,2,3,4,8,9,5,7,35]));return{id:en,diagram:t}},`loader`)},nn=`ishikawa`,rn={id:nn,detector:t(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-5VMMS53U-BuUErkxN.js`);return{diagram:e}},__vite__mapDeps([69,2,3,4,8,9,5,6,7,41,13]));return{id:nn,diagram:t}},`loader`)},an=`venn`,on={id:an,detector:t(e=>/^\s*venn-beta/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./vennDiagram-4TSXK5OY-nruFoEvU.js`);return{diagram:e}},__vite__mapDeps([70,2,3,4,8,9,5,6,7,41,13]));return{id:an,diagram:t}},`loader`)},sn=`treemap`,cn={id:sn,detector:t(e=>/^\s*treemap/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-VX7I27RA-BeqD-7Ny.js`);return{diagram:e}},__vite__mapDeps([71,32,6,33,2,3,4,38,43,39,8,9,5,7,41,35,12,23]));return{id:sn,diagram:t}},`loader`)},ln=`wardley`,un={id:ln,detector:t(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./wardleyDiagram-VM6X3IG4-nLPFq2IV.js`);return{diagram:e}},__vite__mapDeps([72,32,6,33,2,3,4,8,9,5,7,41,35]));return{id:ln,diagram:t}},`loader`)},dn=`cynefin`,fn={id:dn,detector:t(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./cynefinDiagram-5FMLGOSQ-CHJGzUZq.js`);return{diagram:e}},__vite__mapDeps([73,32,6,33,2,3,4,8,9,5,7,41,35]));return{id:dn,diagram:t}},`loader`)},pn=`railroad`,mn={id:pn,detector:t(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./railroadDiagram-O6MQD6OU-CgaJk4H0.js`);return{diagram:e}},__vite__mapDeps([74,32,6,33,2,3,4,5,7,41,35,75]));return{id:pn,diagram:t}},`loader`)},hn=`railroadEbnf`,gn={id:hn,detector:t(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ebnfDiagram-PWID7BFC-CbseMTWH.js`);return{diagram:e}},__vite__mapDeps([76,32,6,33,2,3,4,5,7,41,35,75]));return{id:hn,diagram:t}},`loader`)},_n=`railroadAbnf`,vn={id:_n,detector:t(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./abnfDiagram-VCTEODGH-H7tndj7h.js`);return{diagram:e}},__vite__mapDeps([77,32,6,33,2,3,4,5,7,41,35,75]));return{id:_n,diagram:t}},`loader`)},yn=`railroadPeg`,bn={id:yn,detector:t(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./pegDiagram-XKGWAZYB-Df1irOt3.js`);return{diagram:e}},__vite__mapDeps([78,32,6,33,2,3,4,5,7,41,35,75]));return{id:yn,diagram:t}},`loader`)},xn=!1,X=t(()=>{xn||(xn=!0,l(`error`,Nt,e=>e.toLowerCase().trim()===`error`),l(`---`,{db:{clear:t(()=>{},`clear`)},styles:{},renderer:{draw:t(()=>{},`draw`)},parser:{parse:t(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:t(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),u(Ft,zt,$t),u(Xe,Vt,wt,St,it,ct,ut,ft,vt,bt,nt,et,Qe,Lt,ot,Ot,Et,At,mt,Ut,Gt,gt,Yt,tn,Zt,qt,rn,cn,mn,gn,vn,bn,on,un,fn))},`addDiagrams`),Sn=t(async()=>{r.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(C).map(async([e,{detector:t,loader:n}])=>{if(n)try{f(e)}catch{try{let{diagram:e,id:r}=await n();l(r,e,t)}catch(t){throw r.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete C[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){r.error(`Failed to load ${e.length} external diagrams`);for(let t of e)r.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),Cn=`graphics-document document`;function wn(e,t){e.attr(`role`,Cn),t!==``&&e.attr(`aria-roledescription`,t)}t(wn,`setA11yDiagramInfo`);function Tn(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}t(Tn,`addSVGa11yTitleDescription`);var En=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{t(this,`Diagram`)}static async fromText(t,n={}){let r=y(),i=T(t,r);t=le(t)+` `;try{f(i)}catch{let e=a(i);if(!e)throw new ne(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();l(t,n)}let{db:o,parser:s,renderer:c,init:u}=f(i);return s.parser&&(s.parser.yy=o),o.clear?.(),u?.(r),n.title&&o.setDiagramTitle?.(n.title),await s.parse(t),new e(i,t,o,s,c)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},Dn=[],On=t(()=>{Dn.forEach(e=>{e()}),Dn=[]},`attachFunctions`),kn=t(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function An(e){let t=e.match(v);if(!t)return{text:e,metadata:{}};let n=t[1],r=xe(n?t[2].split(` `).map(e=>e.startsWith(n)?e.slice(n.length):e).join(` `):t[2],{schema:Se})??{};r=typeof r==`object`&&!Array.isArray(r)?r:{};let i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}t(An,`extractFrontMatter`);var jn=t(e=>e.replace(/\r\n?/g,` diff --git a/apps/pythinker-code/dist-web/assets/mermaidParser.worker-_pLIm6No.js b/apps/pythinker-code/dist-web/assets/mermaidParser.worker-CBWarbNh.js similarity index 97% rename from apps/pythinker-code/dist-web/assets/mermaidParser.worker-_pLIm6No.js rename to apps/pythinker-code/dist-web/assets/mermaidParser.worker-CBWarbNh.js index e8d28a144..a9b6fb4d8 100644 --- a/apps/pythinker-code/dist-web/assets/mermaidParser.worker-_pLIm6No.js +++ b/apps/pythinker-code/dist-web/assets/mermaidParser.worker-CBWarbNh.js @@ -1,4 +1,4 @@ -import{h as e,m as t,p as n}from"./src-CDd1avoI.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{$ as i,C as a,E as o,I as s,L as c,N as l,P as u,Q as d,S as f,T as p,V as m,W as h,X as g,Z as _,_ as v,b as y,c as b,g as x,l as S,m as C,n as w,p as T,q as E,r as D,s as O,t as k,u as A,x as j}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{$ as M,J as ee,K as te,Q as N,S as P,X as F,Y as ne,Z as I,a as re,d as ie,et as ae,f as oe,g as L,h as se,i as ce,nt as le,o as ue,q as de,rt as fe,tt as pe,u as me,v as he,x as ge,y as _e}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{t as ve}from"./line-WAwOiLk7.js";import{a as ye,i as be,n as xe}from"./chunk-P2QGCYS3-DOQphBqd.js";import{r as Se}from"./chunk-PWAF6VOD-DCTitH5S.js";import{i as Ce,n as we,r as Te}from"./chunk-GMAD6QVW-jIHtZ3sR.js";import{t as Ee}from"./rough.esm-BojvWvqL.js";import{a as De,n as Oe,r as ke,t as Ae}from"./chunk-4HAMMTFA-B0yXCELs.js";import{i as je,n as Me,r as Ne,t as Pe}from"./chunk-GVQU2GXP-aw9OR1ii.js";var Fe=r(e=>{let{securityLevel:t}=j(),r=n(`body`);return t===`sandbox`&&(r=n((n(`#i${e}`).node()?.contentDocument??document).body)),r.select(`#${e}`)},`selectSvgElement`);function Ie(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function Le(e){if(e==null)return!0;if(ge(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!P(e)&&!he(e)&&!_e(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Ie(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var Re=r(async(e,r)=>{let i=j(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:s,clusterBorder:c}=a,l=c,{labelStyles:u,nodeStyles:d,borderStyles:f,backgroundStyles:p}=be(r),m=e.insert(`g`).attr(`class`,`cluster swimlane `+(r.cssClasses||``)).attr(`id`,r.id).attr(`data-id`,r.id).attr(`data-et`,`cluster`).attr(`data-look`,r.look),h=x(i.flowchart.htmlLabels),g=r.direction===`LR`,_=m.insert(`g`).attr(`class`,`cluster-label swimlane-label`),v=await we(_,r.label,{style:r.labelStyle,useHtmlLabels:h,isNode:!0,width:r.width}),y=v.getBBox();if(h){let e=v.children[0],t=n(v);y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}let b=r.padding??0,S=r.width<=y.width+b?y.width+b:r.width;r.width<=y.width+b?r.diff=(S-r.width)/2-b:r.diff=-b;let C=r.height,w=r.y-C/2,T=r.y+C/2,E=r.x-S/2,D=r.swimlaneContentTop===void 0?w+C/3:r.swimlaneContentTop,O=g?4:0,k=y.height+2*O,A,M;if(g){let e=Math.max(k,y.height+2*O),t=E+e,n=Math.max(0,S-e);if(r.look===`handDrawn`){let i=Ee.svg(m),a=ye(r,{roughness:.7,fill:s,stroke:l,fillWeight:3,seed:o}),c=ye(r,{roughness:.7,fill:`none`,stroke:l,seed:o}),u=i.rectangle(E,w,e,C,a);A=m.insert(()=>u,`:first-child`);let d=i.rectangle(t,w,n,C,c);M=m.insert(()=>d,`:first-child`),A.select(`path:nth-child(2)`).attr(`style`,f.join(`;`)),A.select(`path`).attr(`style`,p.join(`;`).replace(`fill`,`stroke`))}else A=m.insert(`rect`,`:first-child`),M=m.insert(`rect`,`:first-child`),A.attr(`class`,`swimlane-title`).attr(`style`,d).attr(`x`,E).attr(`y`,w).attr(`width`,e).attr(`height`,C).attr(`fill`,s).attr(`stroke`,l),M.attr(`class`,`swimlane-body`).attr(`style`,d).attr(`x`,t).attr(`y`,w).attr(`width`,n).attr(`height`,C).attr(`fill`,`none`).attr(`stroke`,l);let i=E+e/2,a=r.y;_.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-y.width/2}, ${-y.height/2})`)}else{let e=Math.max(0,D-w),t=Math.min(k,e),n=w+t,i=Math.max(0,T-n),a=r.x-S/2;if(r.look===`handDrawn`){let e=Ee.svg(m),c=ye(r,{roughness:.7,fill:s,stroke:l,fillWeight:3,seed:o}),u=ye(r,{roughness:.7,fill:`none`,stroke:l,seed:o}),d=e.rectangle(a,w,S,t,c);A=m.insert(()=>d,`:first-child`);let h=e.rectangle(a,n,S,i,u);M=m.insert(()=>h,`:first-child`),A.select(`path:nth-child(2)`).attr(`style`,f.join(`;`)),A.select(`path`).attr(`style`,p.join(`;`).replace(`fill`,`stroke`))}else A=m.insert(`rect`,`:first-child`),M=m.insert(`rect`,`:first-child`),A.attr(`class`,`swimlane-title`).attr(`style`,d).attr(`x`,a).attr(`y`,w).attr(`width`,S).attr(`height`,t).attr(`fill`,s).attr(`stroke`,l),M.attr(`class`,`swimlane-body`).attr(`style`,d).attr(`x`,a).attr(`y`,n).attr(`width`,S).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,l);let c=r.x-y.width/2,u=w+(t-y.height)/2;_.attr(`transform`,`translate(${c}, ${u})`)}if(t.trace(`Swimlane data `,r,JSON.stringify(r)),u){let e=_.select(`span`);e&&e.attr(`style`,u)}return r.offsetX=0,r.width=S,r.height=C,r.offsetY=y.height-b/2,r.intersect=function(e){return ke(r,e)},{cluster:m,labelBBox:y}},`swimlane`),ze=r(async(e,r)=>{t.info(`Creating subgraph rect for `,r.id,r);let i=j(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:s,clusterBorder:c}=a,{labelStyles:l,nodeStyles:u,borderStyles:d,backgroundStyles:f}=be(r),m=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),h=p(i),g=m.insert(`g`).attr(`class`,`cluster-label `),_;_=r.labelType===`markdown`?await we(g,r.label,{style:r.labelStyle,useHtmlLabels:h,isNode:!0,width:r.width}):await Ae(g,r.label,r.labelStyle||``,!1,!0);let v=_.getBBox();if(p(i)){let e=_.children[0],t=n(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}let y=r.width<=v.width+r.padding?v.width+r.padding:r.width;r.width<=v.width+r.padding?r.diff=(y-r.width)/2-r.padding:r.diff=-r.padding;let b=r.height,x=r.x-y/2,S=r.y-b/2;t.trace(`Data `,r,JSON.stringify(r));let C;if(r.look===`handDrawn`){let e=Ee.svg(m),n=ye(r,{roughness:.7,fill:s,stroke:c,fillWeight:3,seed:o}),i=e.path(Oe(x,S,y,b,0),n);C=m.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),C.select(`path:nth-child(2)`).attr(`style`,d.join(`;`)),C.select(`path`).attr(`style`,f.join(`;`).replace(`fill`,`stroke`))}else C=m.insert(`rect`,`:first-child`),C.attr(`style`,u).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,x).attr(`y`,S).attr(`width`,y).attr(`height`,b);let{subGraphTitleTopMargin:w}=Me(i);if(g.attr(`transform`,`translate(${r.x-v.width/2}, ${r.y-r.height/2+w})`),l){let e=g.select(`span`);e&&e.attr(`style`,l)}let T=C.node().getBBox();return r.offsetX=0,r.width=T.width,r.height=T.height,r.offsetY=v.height-r.padding/2,r.intersect=function(e){return ke(r,e)},{cluster:m,labelBBox:v}},`rect`),Be={rect:ze,squareRect:ze,roundedWithTitle:r(async(e,t)=>{let r=j(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:o,compositeBackground:s,compositeTitleBackground:c,nodeBorder:l}=i,u=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),d=u.insert(`g`,`:first-child`),f=u.insert(`g`).attr(`class`,`cluster-label`),m=u.append(`rect`),h=await Ae(f,t.label,t.labelStyle,void 0,!0),g=h.getBBox();if(p(r)){let e=h.children[0],t=n(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=0*t.padding,v=_/2,y=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+_;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;let b=t.height+_,x=t.height+_-g.height-6,S=t.x-y/2,C=t.y-b/2;t.width=y;let w=t.y-t.height/2-v+g.height+2,T;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=Ee.svg(u),r=t.rx||t.ry?n.path(Oe(S,C,y,b,10),{roughness:.7,fill:c,fillStyle:`solid`,stroke:l,seed:a}):n.rectangle(S,C,y,b,{seed:a});T=u.insert(()=>r,`:first-child`);let i=n.rectangle(S,w,y,x,{fill:e?o:s,fillStyle:e?`hachure`:`solid`,stroke:l,seed:a});T=u.insert(()=>r,`:first-child`),m=u.insert(()=>i)}else T=d.insert(`rect`,`:first-child`),T.attr(`class`,`outer`).attr(`x`,S).attr(`y`,C).attr(`width`,y).attr(`height`,b).attr(`data-look`,t.look),m.attr(`class`,`inner`).attr(`x`,S).attr(`y`,w).attr(`width`,y).attr(`height`,x);return f.attr(`transform`,`translate(${t.x-g.width/2}, ${C+1-(p(r)?0:3)})`),t.height=T.node().getBBox().height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(e){return ke(t,e)},{cluster:u,labelBBox:g}},`roundedWithTitle`),noteGroup:r((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return ke(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:r((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=j(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,c=t.width+s;t.diff=-t.padding;let l=t.height+s,u=t.x-c/2,d=t.y-l/2;t.width=c;let f;if(t.look===`handDrawn`){let e=Ee.svg(a).rectangle(u,d,c,l,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});f=a.insert(()=>e,`:first-child`)}else{f=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),f.attr(`class`,e).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l).attr(`data-look`,t.look)}return t.height=f.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return ke(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:r(async(e,r)=>{t.info(`Creating subgraph rect for `,r.id,r);let i=j(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:s,clusterBorder:c}=a,{labelStyles:l,nodeStyles:u,borderStyles:d,backgroundStyles:f}=be(r),m=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),h=p(i),g=m.insert(`g`).attr(`class`,`cluster-label `),_=await we(g,r.label,{style:r.labelStyle,useHtmlLabels:h,isNode:!0,width:r.width}),v=_.getBBox();if(p(i)){let e=_.children[0],t=n(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}let y=r.width<=v.width+r.padding?v.width+r.padding:r.width;r.width<=v.width+r.padding?r.diff=(y-r.width)/2-r.padding:r.diff=-r.padding;let b=r.height,x=r.x-y/2,S=r.y-b/2;t.trace(`Data `,r,JSON.stringify(r));let C;if(r.look===`handDrawn`){let e=Ee.svg(m),n=ye(r,{roughness:.7,fill:s,stroke:c,fillWeight:4,seed:o}),i=e.path(Oe(x,S,y,b,r.rx),n);C=m.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),C.select(`path:nth-child(2)`).attr(`style`,d.join(`;`)),C.select(`path`).attr(`style`,f.join(`;`).replace(`fill`,`stroke`))}else C=m.insert(`rect`,`:first-child`),C.attr(`style`,u).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,x).attr(`y`,S).attr(`width`,y).attr(`height`,b);let{subGraphTitleTopMargin:w}=Me(i);if(g.attr(`transform`,`translate(${r.x-v.width/2}, ${r.y-r.height/2+w})`),l){let e=g.select(`span`);e&&e.attr(`style`,l)}let T=C.node().getBBox();return r.offsetX=0,r.width=T.width,r.height=T.height,r.offsetY=v.height-r.padding/2,r.intersect=function(e){return ke(r,e)},{cluster:m,labelBBox:v}},`kanbanSection`),swimlane:Re},Ve=new Map,He=r(async(e,t)=>{let n=await Be[t.shape||`rect`](e,t);return Ve.set(t.id,n),n},`insertCluster`),Ue=r(()=>{Ve=new Map},`clear`),We=r((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),R={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Ge={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Ke(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=z(e),t=z(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}r(Ke,`calculateDeltaAndAngle`);var z=r(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),qe=r(e=>({x:r(function(t,n,r){let i=0,a=z(r[0]).x=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(R,e.arrowTypeEnd)){let{angle:t,deltaX:n}=Ke(r[r.length-1],r[r.length-2]);i=R[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}let o=Math.abs(z(t).x-z(r[r.length-1]).x),s=Math.abs(z(t).y-z(r[r.length-1]).y),c=Math.abs(z(t).x-z(r[0]).x),l=Math.abs(z(t).y-z(r[0]).y),u=R[e.arrowTypeStart],d=R[e.arrowTypeEnd];if(o0&&s0&&l=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(R,e.arrowTypeEnd)){let{angle:t,deltaY:n}=Ke(r[r.length-1],r[r.length-2]);i=R[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}let o=Math.abs(z(t).y-z(r[r.length-1]).y),s=Math.abs(z(t).x-z(r[r.length-1]).x),c=Math.abs(z(t).y-z(r[0]).y),l=Math.abs(z(t).x-z(r[0]).x),u=R[e.arrowTypeStart],d=R[e.arrowTypeEnd];if(o0&&s0&&l{t.arrowTypeStart&&Ze(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&Ze(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),Ye={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},Xe=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],Ze=r((e,n,r,i,a,o,s=!1,c)=>{if(!r||r===`none`)return;let l=Ye[r],u=l&&Xe.includes(l.type);if(!l){t.warn(`Unknown arrow type: ${r}`);return}let d=`${a}_${o}-${l.type}${n===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let t=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(t)){let e=document.getElementById(d);if(e){let n=e.cloneNode(!0);n.id=t,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),e.parentNode?.appendChild(n)}}e.attr(`marker-${n}`,`url(${i}#${t})`)}else e.attr(`marker-${n}`,`url(${i}#${d})`)},`addEdgeMarker`),Qe=r(e=>typeof e==`string`?e:j()?.flowchart?.curve,`resolveEdgeCurveType`),$e=new Map,B=new Map,et=r(()=>{$e.clear(),B.clear()},`clear`),tt=r(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),nt=r(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),rt=r(async(e,r)=>{let i=j(),a=p(i),{labelStyles:o}=be(r);r.labelStyle=o;let s=e.insert(`g`).attr(`class`,`edgeLabel`),c=s.insert(`g`).attr(`class`,`label`).attr(`data-id`,r.id),l=r.labelType===`markdown`,u=await we(e,r.label,{style:nt(r.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:l,width:void 0},i);c.node().appendChild(u),t.info(`abc82`,r,r.labelType);let d,f;if(a){let e=u.children[0],t=n(u);d=await Te.measure(()=>e.getBoundingClientRect()),f=d,t.attr(`width`,d.width),t.attr(`height`,d.height)}else{let e=n(u).select(`text`).node();await Te.measure(()=>{d=u.getBBox(),f=e&&typeof e.getBBox==`function`?e.getBBox():d})}c.attr(`transform`,We(f,a)),$e.set(r.id,s),r.width=d.width,r.height=d.height;let m;if(r.startLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),o=await Ae(i,r.startLabelLeft,nt(r.labelStyle)||``,!1,!1);m=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,We(s,a)),B.get(r.id)||B.set(r.id,{}),B.get(r.id).startLeft=t,it(m,r.startLabelLeft)}if(r.startLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),o=await Ae(i,r.startLabelRight,nt(r.labelStyle)||``,!1,!1);m=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,We(s,a)),B.get(r.id)||B.set(r.id,{}),B.get(r.id).startRight=t,it(m,r.startLabelRight)}if(r.endLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),o=await Ae(t,r.endLabelLeft,nt(r.labelStyle)||``,!1,!1);m=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,We(s,a)),B.get(r.id)||B.set(r.id,{}),B.get(r.id).endLeft=t,it(m,r.endLabelLeft)}if(r.endLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),o=await Ae(t,r.endLabelRight,nt(r.labelStyle)||``,!1,!1);m=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,We(s,a)),B.get(r.id)||B.set(r.id,{}),B.get(r.id).endRight=t,it(m,r.endLabelRight)}return u},`insertEdgeLabel`);function it(e,t){p(j())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}r(it,`setTerminalWidth`);var at=r((e,n)=>{t.debug(`Moving label abc88 `,e.id,e.label,$e.get(e.id),n);let r=n.updatedPath?n.updatedPath:n.originalPath,{subGraphTitleTotalMargin:i}=Me(j());if(e.label){let a=$e.get(e.id),o=e.x,s=e.y;if(r){let i=L.calcLabelPosition(r);t.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(o=i.x,s=i.y)}a.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(e.startLabelLeft){let t=B.get(e.id).startLeft,n=e.x,i=e.y;if(r){let t=L.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=B.get(e.id).startRight,n=e.x,i=e.y;if(r){let t=L.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=B.get(e.id).endLeft,n=e.x,i=e.y;if(r){let t=L.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=B.get(e.id).endRight,n=e.x,i=e.y;if(r){let t=L.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),ot=r((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),st=r((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),ct=r((e,n,r)=>{t.debug(`intersection calc abc89: +import{h as e,m as t,p as n}from"./src-CDd1avoI.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{$ as i,C as a,E as o,I as s,L as c,N as l,P as u,Q as d,S as f,T as p,V as m,W as h,X as g,Z as _,_ as v,b as y,c as b,g as x,l as S,m as C,n as w,p as T,q as E,r as D,s as O,t as k,u as A,x as j}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{$ as M,J as ee,K as te,Q as N,S as P,X as F,Y as ne,Z as I,a as re,d as ie,et as ae,f as oe,g as L,h as se,i as ce,nt as le,o as ue,q as de,rt as fe,tt as pe,u as me,v as he,x as ge,y as _e}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{t as ve}from"./line-BOKvdzzq.js";import{a as ye,i as be,n as xe}from"./chunk-P2QGCYS3-DJwAvunU.js";import{r as Se}from"./chunk-PWAF6VOD-Dsc8rvy3.js";import{i as Ce,n as we,r as Te}from"./chunk-GMAD6QVW-DO6QncBh.js";import{t as Ee}from"./rough.esm-BojvWvqL.js";import{a as De,n as Oe,r as ke,t as Ae}from"./chunk-4HAMMTFA-X3JAMEe8.js";import{i as je,n as Me,r as Ne,t as Pe}from"./chunk-GVQU2GXP-CCw5T6ST.js";var Fe=r(e=>{let{securityLevel:t}=j(),r=n(`body`);return t===`sandbox`&&(r=n((n(`#i${e}`).node()?.contentDocument??document).body)),r.select(`#${e}`)},`selectSvgElement`);function Ie(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function Le(e){if(e==null)return!0;if(ge(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!P(e)&&!he(e)&&!_e(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Ie(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var Re=r(async(e,r)=>{let i=j(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:s,clusterBorder:c}=a,l=c,{labelStyles:u,nodeStyles:d,borderStyles:f,backgroundStyles:p}=be(r),m=e.insert(`g`).attr(`class`,`cluster swimlane `+(r.cssClasses||``)).attr(`id`,r.id).attr(`data-id`,r.id).attr(`data-et`,`cluster`).attr(`data-look`,r.look),h=x(i.flowchart.htmlLabels),g=r.direction===`LR`,_=m.insert(`g`).attr(`class`,`cluster-label swimlane-label`),v=await we(_,r.label,{style:r.labelStyle,useHtmlLabels:h,isNode:!0,width:r.width}),y=v.getBBox();if(h){let e=v.children[0],t=n(v);y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}let b=r.padding??0,S=r.width<=y.width+b?y.width+b:r.width;r.width<=y.width+b?r.diff=(S-r.width)/2-b:r.diff=-b;let C=r.height,w=r.y-C/2,T=r.y+C/2,E=r.x-S/2,D=r.swimlaneContentTop===void 0?w+C/3:r.swimlaneContentTop,O=g?4:0,k=y.height+2*O,A,M;if(g){let e=Math.max(k,y.height+2*O),t=E+e,n=Math.max(0,S-e);if(r.look===`handDrawn`){let i=Ee.svg(m),a=ye(r,{roughness:.7,fill:s,stroke:l,fillWeight:3,seed:o}),c=ye(r,{roughness:.7,fill:`none`,stroke:l,seed:o}),u=i.rectangle(E,w,e,C,a);A=m.insert(()=>u,`:first-child`);let d=i.rectangle(t,w,n,C,c);M=m.insert(()=>d,`:first-child`),A.select(`path:nth-child(2)`).attr(`style`,f.join(`;`)),A.select(`path`).attr(`style`,p.join(`;`).replace(`fill`,`stroke`))}else A=m.insert(`rect`,`:first-child`),M=m.insert(`rect`,`:first-child`),A.attr(`class`,`swimlane-title`).attr(`style`,d).attr(`x`,E).attr(`y`,w).attr(`width`,e).attr(`height`,C).attr(`fill`,s).attr(`stroke`,l),M.attr(`class`,`swimlane-body`).attr(`style`,d).attr(`x`,t).attr(`y`,w).attr(`width`,n).attr(`height`,C).attr(`fill`,`none`).attr(`stroke`,l);let i=E+e/2,a=r.y;_.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-y.width/2}, ${-y.height/2})`)}else{let e=Math.max(0,D-w),t=Math.min(k,e),n=w+t,i=Math.max(0,T-n),a=r.x-S/2;if(r.look===`handDrawn`){let e=Ee.svg(m),c=ye(r,{roughness:.7,fill:s,stroke:l,fillWeight:3,seed:o}),u=ye(r,{roughness:.7,fill:`none`,stroke:l,seed:o}),d=e.rectangle(a,w,S,t,c);A=m.insert(()=>d,`:first-child`);let h=e.rectangle(a,n,S,i,u);M=m.insert(()=>h,`:first-child`),A.select(`path:nth-child(2)`).attr(`style`,f.join(`;`)),A.select(`path`).attr(`style`,p.join(`;`).replace(`fill`,`stroke`))}else A=m.insert(`rect`,`:first-child`),M=m.insert(`rect`,`:first-child`),A.attr(`class`,`swimlane-title`).attr(`style`,d).attr(`x`,a).attr(`y`,w).attr(`width`,S).attr(`height`,t).attr(`fill`,s).attr(`stroke`,l),M.attr(`class`,`swimlane-body`).attr(`style`,d).attr(`x`,a).attr(`y`,n).attr(`width`,S).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,l);let c=r.x-y.width/2,u=w+(t-y.height)/2;_.attr(`transform`,`translate(${c}, ${u})`)}if(t.trace(`Swimlane data `,r,JSON.stringify(r)),u){let e=_.select(`span`);e&&e.attr(`style`,u)}return r.offsetX=0,r.width=S,r.height=C,r.offsetY=y.height-b/2,r.intersect=function(e){return ke(r,e)},{cluster:m,labelBBox:y}},`swimlane`),ze=r(async(e,r)=>{t.info(`Creating subgraph rect for `,r.id,r);let i=j(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:s,clusterBorder:c}=a,{labelStyles:l,nodeStyles:u,borderStyles:d,backgroundStyles:f}=be(r),m=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),h=p(i),g=m.insert(`g`).attr(`class`,`cluster-label `),_;_=r.labelType===`markdown`?await we(g,r.label,{style:r.labelStyle,useHtmlLabels:h,isNode:!0,width:r.width}):await Ae(g,r.label,r.labelStyle||``,!1,!0);let v=_.getBBox();if(p(i)){let e=_.children[0],t=n(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}let y=r.width<=v.width+r.padding?v.width+r.padding:r.width;r.width<=v.width+r.padding?r.diff=(y-r.width)/2-r.padding:r.diff=-r.padding;let b=r.height,x=r.x-y/2,S=r.y-b/2;t.trace(`Data `,r,JSON.stringify(r));let C;if(r.look===`handDrawn`){let e=Ee.svg(m),n=ye(r,{roughness:.7,fill:s,stroke:c,fillWeight:3,seed:o}),i=e.path(Oe(x,S,y,b,0),n);C=m.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),C.select(`path:nth-child(2)`).attr(`style`,d.join(`;`)),C.select(`path`).attr(`style`,f.join(`;`).replace(`fill`,`stroke`))}else C=m.insert(`rect`,`:first-child`),C.attr(`style`,u).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,x).attr(`y`,S).attr(`width`,y).attr(`height`,b);let{subGraphTitleTopMargin:w}=Me(i);if(g.attr(`transform`,`translate(${r.x-v.width/2}, ${r.y-r.height/2+w})`),l){let e=g.select(`span`);e&&e.attr(`style`,l)}let T=C.node().getBBox();return r.offsetX=0,r.width=T.width,r.height=T.height,r.offsetY=v.height-r.padding/2,r.intersect=function(e){return ke(r,e)},{cluster:m,labelBBox:v}},`rect`),Be={rect:ze,squareRect:ze,roundedWithTitle:r(async(e,t)=>{let r=j(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:o,compositeBackground:s,compositeTitleBackground:c,nodeBorder:l}=i,u=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),d=u.insert(`g`,`:first-child`),f=u.insert(`g`).attr(`class`,`cluster-label`),m=u.append(`rect`),h=await Ae(f,t.label,t.labelStyle,void 0,!0),g=h.getBBox();if(p(r)){let e=h.children[0],t=n(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=0*t.padding,v=_/2,y=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+_;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;let b=t.height+_,x=t.height+_-g.height-6,S=t.x-y/2,C=t.y-b/2;t.width=y;let w=t.y-t.height/2-v+g.height+2,T;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=Ee.svg(u),r=t.rx||t.ry?n.path(Oe(S,C,y,b,10),{roughness:.7,fill:c,fillStyle:`solid`,stroke:l,seed:a}):n.rectangle(S,C,y,b,{seed:a});T=u.insert(()=>r,`:first-child`);let i=n.rectangle(S,w,y,x,{fill:e?o:s,fillStyle:e?`hachure`:`solid`,stroke:l,seed:a});T=u.insert(()=>r,`:first-child`),m=u.insert(()=>i)}else T=d.insert(`rect`,`:first-child`),T.attr(`class`,`outer`).attr(`x`,S).attr(`y`,C).attr(`width`,y).attr(`height`,b).attr(`data-look`,t.look),m.attr(`class`,`inner`).attr(`x`,S).attr(`y`,w).attr(`width`,y).attr(`height`,x);return f.attr(`transform`,`translate(${t.x-g.width/2}, ${C+1-(p(r)?0:3)})`),t.height=T.node().getBBox().height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(e){return ke(t,e)},{cluster:u,labelBBox:g}},`roundedWithTitle`),noteGroup:r((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return ke(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:r((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=j(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,c=t.width+s;t.diff=-t.padding;let l=t.height+s,u=t.x-c/2,d=t.y-l/2;t.width=c;let f;if(t.look===`handDrawn`){let e=Ee.svg(a).rectangle(u,d,c,l,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});f=a.insert(()=>e,`:first-child`)}else{f=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),f.attr(`class`,e).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l).attr(`data-look`,t.look)}return t.height=f.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return ke(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:r(async(e,r)=>{t.info(`Creating subgraph rect for `,r.id,r);let i=j(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:s,clusterBorder:c}=a,{labelStyles:l,nodeStyles:u,borderStyles:d,backgroundStyles:f}=be(r),m=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),h=p(i),g=m.insert(`g`).attr(`class`,`cluster-label `),_=await we(g,r.label,{style:r.labelStyle,useHtmlLabels:h,isNode:!0,width:r.width}),v=_.getBBox();if(p(i)){let e=_.children[0],t=n(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}let y=r.width<=v.width+r.padding?v.width+r.padding:r.width;r.width<=v.width+r.padding?r.diff=(y-r.width)/2-r.padding:r.diff=-r.padding;let b=r.height,x=r.x-y/2,S=r.y-b/2;t.trace(`Data `,r,JSON.stringify(r));let C;if(r.look===`handDrawn`){let e=Ee.svg(m),n=ye(r,{roughness:.7,fill:s,stroke:c,fillWeight:4,seed:o}),i=e.path(Oe(x,S,y,b,r.rx),n);C=m.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),C.select(`path:nth-child(2)`).attr(`style`,d.join(`;`)),C.select(`path`).attr(`style`,f.join(`;`).replace(`fill`,`stroke`))}else C=m.insert(`rect`,`:first-child`),C.attr(`style`,u).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,x).attr(`y`,S).attr(`width`,y).attr(`height`,b);let{subGraphTitleTopMargin:w}=Me(i);if(g.attr(`transform`,`translate(${r.x-v.width/2}, ${r.y-r.height/2+w})`),l){let e=g.select(`span`);e&&e.attr(`style`,l)}let T=C.node().getBBox();return r.offsetX=0,r.width=T.width,r.height=T.height,r.offsetY=v.height-r.padding/2,r.intersect=function(e){return ke(r,e)},{cluster:m,labelBBox:v}},`kanbanSection`),swimlane:Re},Ve=new Map,He=r(async(e,t)=>{let n=await Be[t.shape||`rect`](e,t);return Ve.set(t.id,n),n},`insertCluster`),Ue=r(()=>{Ve=new Map},`clear`),We=r((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),R={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Ge={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Ke(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=z(e),t=z(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}r(Ke,`calculateDeltaAndAngle`);var z=r(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),qe=r(e=>({x:r(function(t,n,r){let i=0,a=z(r[0]).x=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(R,e.arrowTypeEnd)){let{angle:t,deltaX:n}=Ke(r[r.length-1],r[r.length-2]);i=R[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}let o=Math.abs(z(t).x-z(r[r.length-1]).x),s=Math.abs(z(t).y-z(r[r.length-1]).y),c=Math.abs(z(t).x-z(r[0]).x),l=Math.abs(z(t).y-z(r[0]).y),u=R[e.arrowTypeStart],d=R[e.arrowTypeEnd];if(o0&&s0&&l=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(R,e.arrowTypeEnd)){let{angle:t,deltaY:n}=Ke(r[r.length-1],r[r.length-2]);i=R[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}let o=Math.abs(z(t).y-z(r[r.length-1]).y),s=Math.abs(z(t).x-z(r[r.length-1]).x),c=Math.abs(z(t).y-z(r[0]).y),l=Math.abs(z(t).x-z(r[0]).x),u=R[e.arrowTypeStart],d=R[e.arrowTypeEnd];if(o0&&s0&&l{t.arrowTypeStart&&Ze(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&Ze(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),Ye={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},Xe=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],Ze=r((e,n,r,i,a,o,s=!1,c)=>{if(!r||r===`none`)return;let l=Ye[r],u=l&&Xe.includes(l.type);if(!l){t.warn(`Unknown arrow type: ${r}`);return}let d=`${a}_${o}-${l.type}${n===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let t=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(t)){let e=document.getElementById(d);if(e){let n=e.cloneNode(!0);n.id=t,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),e.parentNode?.appendChild(n)}}e.attr(`marker-${n}`,`url(${i}#${t})`)}else e.attr(`marker-${n}`,`url(${i}#${d})`)},`addEdgeMarker`),Qe=r(e=>typeof e==`string`?e:j()?.flowchart?.curve,`resolveEdgeCurveType`),$e=new Map,B=new Map,et=r(()=>{$e.clear(),B.clear()},`clear`),tt=r(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),nt=r(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),rt=r(async(e,r)=>{let i=j(),a=p(i),{labelStyles:o}=be(r);r.labelStyle=o;let s=e.insert(`g`).attr(`class`,`edgeLabel`),c=s.insert(`g`).attr(`class`,`label`).attr(`data-id`,r.id),l=r.labelType===`markdown`,u=await we(e,r.label,{style:nt(r.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:l,width:void 0},i);c.node().appendChild(u),t.info(`abc82`,r,r.labelType);let d,f;if(a){let e=u.children[0],t=n(u);d=await Te.measure(()=>e.getBoundingClientRect()),f=d,t.attr(`width`,d.width),t.attr(`height`,d.height)}else{let e=n(u).select(`text`).node();await Te.measure(()=>{d=u.getBBox(),f=e&&typeof e.getBBox==`function`?e.getBBox():d})}c.attr(`transform`,We(f,a)),$e.set(r.id,s),r.width=d.width,r.height=d.height;let m;if(r.startLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),o=await Ae(i,r.startLabelLeft,nt(r.labelStyle)||``,!1,!1);m=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,We(s,a)),B.get(r.id)||B.set(r.id,{}),B.get(r.id).startLeft=t,it(m,r.startLabelLeft)}if(r.startLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),o=await Ae(i,r.startLabelRight,nt(r.labelStyle)||``,!1,!1);m=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,We(s,a)),B.get(r.id)||B.set(r.id,{}),B.get(r.id).startRight=t,it(m,r.startLabelRight)}if(r.endLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),o=await Ae(t,r.endLabelLeft,nt(r.labelStyle)||``,!1,!1);m=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,We(s,a)),B.get(r.id)||B.set(r.id,{}),B.get(r.id).endLeft=t,it(m,r.endLabelLeft)}if(r.endLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),o=await Ae(t,r.endLabelRight,nt(r.labelStyle)||``,!1,!1);m=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,We(s,a)),B.get(r.id)||B.set(r.id,{}),B.get(r.id).endRight=t,it(m,r.endLabelRight)}return u},`insertEdgeLabel`);function it(e,t){p(j())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}r(it,`setTerminalWidth`);var at=r((e,n)=>{t.debug(`Moving label abc88 `,e.id,e.label,$e.get(e.id),n);let r=n.updatedPath?n.updatedPath:n.originalPath,{subGraphTitleTotalMargin:i}=Me(j());if(e.label){let a=$e.get(e.id),o=e.x,s=e.y;if(r){let i=L.calcLabelPosition(r);t.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(o=i.x,s=i.y)}a.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(e.startLabelLeft){let t=B.get(e.id).startLeft,n=e.x,i=e.y;if(r){let t=L.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=B.get(e.id).startRight,n=e.x,i=e.y;if(r){let t=L.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=B.get(e.id).endLeft,n=e.x,i=e.y;if(r){let t=L.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=B.get(e.id).endRight,n=e.x,i=e.y;if(r){let t=L.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),ot=r((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),st=r((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),ct=r((e,n,r)=>{t.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(n)} insidePoint : ${JSON.stringify(r)} node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2,c=r.xMath.abs(i-n.x)*l){let e=r.y{t.warn(`abc88 cutPathAtIntersect`,e,n);let r=[],i=e[0],a=!1;return e.forEach(e=>{if(t.info(`abc88 checking point`,e,n),!st(n,e)&&!a){let o=ct(n,i,e);t.debug(`abc88 inside`,e,i,o),t.debug(`abc88 intersection`,o,n);let s=!1;r.forEach(e=>{s||=e.x===o.x&&e.y===o.y}),r.some(e=>e.x===o.x&&e.y===o.y)?t.warn(`abc88 no intersect`,o,r):r.push(o),a=!0}else t.warn(`abc88 outside`,e,i),i=e,a||r.push(e)}),t.debug(`returning points`,r),r},`cutPathAtIntersect`);function ut(e){let t=[],n=[];for(let r=1;r5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}r(ut,`extractCornerPoints`);var dt=r(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),ft=r(function(e){let{cornerPointPositions:n}=ut(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10?(t.debug(`Corner point fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),f=o.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:u<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:u<0?s.y-5+d:s.y+5-d}):t.debug(`Corner point skipping fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),r.push(f,c)}else r.push(e[i]);return r},`fixCorners`),pt=r((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(Number.isFinite(i)?Math.max(0,i):0).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),mt=r(function(e,r,i,a,o,s,c,l=!1){if(!c)throw Error(`insertEdge: missing diagramId for edge "${r.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:u,layout:d}=j(),f=r.points,p=!1,m=o;var h=s;let g=[];for(let e in r.cssCompiledStyles)xe(e)||g.push(r.cssCompiledStyles[e]);if(d===`swimlane`){if(h.intersect&&m.intersect&&Array.isArray(f)&&f.length>=2)if(f.length===2)f=[m.intersect(f[0]),h.intersect(f[1])];else{let e=f.slice(1,-1),t=e[0],n=e[e.length-1],r=.5,i=Math.abs(f[f.length-1].x-n.x)!Number.isNaN(e.y)),y=Qe(r.curve);y!==`rounded`&&(v=ft(v));let b=fe;switch(y){case`linear`:b=fe;break;case`basis`:b=ae;break;case`cardinal`:b=M;break;case`bumpX`:b=pe;break;case`bumpY`:b=le;break;case`catmullRom`:b=N;break;case`monotoneX`:b=F;break;case`monotoneY`:b=I;break;case`natural`:b=ne;break;case`step`:b=ee;break;case`stepAfter`:b=te;break;case`stepBefore`:b=de;break;case`rounded`:b=fe;break;default:b=ae}let{x,y:S}=qe(r),C=ve().x(x).y(S).curve(b),w;switch(r.thickness){case`normal`:w=`edge-thickness-normal`;break;case`thick`:w=`edge-thickness-thick`;break;case`invisible`:w=`edge-thickness-invisible`;break;default:w=`edge-thickness-normal`}switch(r.pattern){case`solid`:w+=` edge-pattern-solid`;break;case`dotted`:w+=` edge-pattern-dotted`;break;case`dashed`:w+=` edge-pattern-dashed`;break;default:w+=` edge-pattern-solid`}let T,E=y===`rounded`?ht(_t(v,r),5):C(v),D=Array.isArray(r.style)?r.style:[r.style],O=D.find(e=>e?.startsWith(`stroke:`)),k=``;r.animate&&(k=`edge-animation-fast`),r.animation&&(k=`edge-animation-`+r.animation);let A=!1;if(r.look===`handDrawn`){let t=Ee.svg(e);Object.assign([],v);let i=t.path(E,{roughness:.3,seed:u});w+=` transition`,T=n(i).select(`path`).attr(`id`,`${c}-${r.id}`).attr(`class`,` `+w+(r.classes?` `+r.classes:``)+(k?` `+k:``)).attr(`style`,D?D.reduce((e,t)=>e+`;`+t,``):``);let a=T.attr(`d`);T.attr(`d`,a),e.node().appendChild(T.node())}else{let t=g.join(`;`),n=D?D.reduce((e,t)=>e+t+`;`,``):``,i=(t?t+`;`+n+`;`:n)+`;`+(D?D.reduce((e,t)=>e+`;`+t,``):``);T=e.append(`path`).attr(`d`,E).attr(`id`,`${c}-${r.id}`).attr(`class`,` `+w+(r.classes?` `+r.classes:``)+(k?` `+k:``)).attr(`style`,i),O=i.match(/stroke:([^;]+)/)?.[1],A=r.animate===!0||!!r.animation||t.includes(`animation`);let a=T.node(),o=typeof a.getTotalLength==`function`?a.getTotalLength():0,s=Ge[r.arrowTypeStart]||0,l=Ge[r.arrowTypeEnd]||0;if(r.look===`neo`&&!A){let e=`stroke-dasharray: ${r.pattern===`dotted`||r.pattern===`dashed`?pt(o,s,l):`0 ${s} ${o-s-l} ${l}`}; stroke-dashoffset: 0;`;T.attr(`style`,e+T.attr(`style`))}}T.attr(`data-edge`,!0),T.attr(`data-et`,`edge`),T.attr(`data-id`,r.id),T.attr(`data-points`,_),T.attr(`data-look`,me(r.look)),r.showPoints&&v.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let P=``;(j().flowchart.arrowMarkerAbsolute||j().state.arrowMarkerAbsolute)&&(P=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,P=P.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),t.info(`arrowTypeStart`,r.arrowTypeStart),t.info(`arrowTypeEnd`,r.arrowTypeEnd);let re=!A&&r?.look===`neo`;Je(T,r,P,c,a,re,O);let ie=Math.floor(f.length/2),oe=f[ie];L.isLabelCoordinateInPath(oe,T.attr(`d`))||(p=!0);let se={};return p&&(se.updatedPath=f),se.originalPath=r.points,se},`insertEdge`);function ht(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a({...e}));if(e.length>=2&&R[t.arrowTypeStart]){let r=R[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=gt(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&R[t.arrowTypeEnd]){let i=R[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=gt(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}r(_t,`applyMarkerOffsetsToPoints`);var vt=r((e,t,n,r)=>{t.forEach(t=>{yt[t](e,n,r)})},`insertMarkers`),yt={extension:r((e,n,r)=>{t.trace(`Making markers for `,r),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionStart`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd`).attr(`class`,`marker extension `+n).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,r+`_`+n+`-extensionStart-margin`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd-margin`).attr(`class`,`marker extension `+n).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:r((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:r((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:r((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:r((e,t,n)=>{let{themeVariables:r}=y(),{transitionColor:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${i}`)},`barbNeo`),only_one:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:r((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:r((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:r((e,t,n)=>{let{themeVariables:r}=y(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${i}`)},`only_one_neo`),zero_or_one_neo:r((e,t,n)=>{let{themeVariables:r}=y(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),o.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),s.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${i}`)},`zero_or_one_neo`),one_or_more_neo:r((e,t,n)=>{let{themeVariables:r}=y(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${i}`)},`one_or_more_neo`),zero_or_more_neo:r((e,t,n)=>{let{themeVariables:r}=y(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),o.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),s.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${i}`)},`zero_or_more_neo`),requirement_arrow:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0 @@ -40,8 +40,8 @@ import{h as e,m as t,p as n}from"./src-CDd1avoI.js";import{n as r}from"./chunk-Y `+e.slice(i,a),i=a+1),o=s;return c+=` `,e.length-i>t&&o>i?c+=e.slice(i,o)+` `+e.slice(o+1):c+=e.slice(i),c.slice(1)}r(k,`foldLine`);function A(e){let t=``,n=0;for(let r=0;r=65536?r+=2:r++){n=S(e,r);let i=s[n];!i&&_(n)?(t+=e[r],n>=65536&&(t+=e[r+1])):t+=i||d(n)}return t}r(A,`escapeString`);function j(e,t,n){let r=``,i=e.tag;for(let i=0,a=n.length;i1024&&(o+=`? `),o+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),P(e,t,c,!1,!1)&&(o+=e.dump,r+=o))}e.tag=i,e.dump=`{`+r+`}`}r(ee,`writeFlowMapping`);function te(e,n,r,i){let a=``,o=e.tag,s=Object.keys(r);if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys==`function`)s.sort(e.sortKeys);else if(e.sortKeys)throw new t(`sortKeys must be a boolean or a function`);for(let t=0,o=s.length;t1024;u&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`?`:o+=`? `),o+=e.dump,u&&(o+=m(e,n)),P(e,n+1,l,!0,u)&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`:`:o+=`: `,o+=e.dump,a+=o)}e.tag=o,e.dump=a||`{}`}r(te,`writeBlockMapping`);function N(e,n,r){let o=r?e.explicitTypes:e.implicitTypes;for(let s=0,c=o.length;s tag resolver accepts not "`+r+`" style`);e.dump=o}return!0}}return!1}r(N,`detectType`);function P(e,n,r,a,o,s,c){e.tag=null,e.dump=r,N(e,r,!1)||N(e,r,!0);let l=i.call(e.dump),u=a;a&&=e.flowLevel<0||e.flowLevel>n;let d=l===`[object Object]`||l===`[object Array]`,f,p;if(d&&(f=e.duplicates.indexOf(r),p=f!==-1),(e.tag!==null&&e.tag!==`?`||p||e.indent!==2&&n>0)&&(o=!1),p&&e.usedDuplicates[f])e.dump=`*ref_`+f;else{if(d&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),l===`[object Object]`)a&&Object.keys(e.dump).length!==0?(te(e,n,e.dump,o),p&&(e.dump=`&ref_`+f+e.dump)):(ee(e,n,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(l===`[object Array]`)a&&e.dump.length!==0?(e.noArrayIndent&&!c&&n>0?M(e,n-1,e.dump,o):M(e,n,e.dump,o),p&&(e.dump=`&ref_`+f+e.dump)):(j(e,n,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(l===`[object String]`)e.tag!==`?`&&T(e,e.dump,n,s,u);else if(l===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new t(`unacceptable kind of an object to dump `+l)}if(e.tag!==null&&e.tag!==`?`){let t=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`);t=e.tag[0]===`!`?`!`+t:t.slice(0,18)===`tag:yaml.org,2002:`?`!!`+t.slice(18):`!<`+t+`>`,e.dump=t+` `+e.dump}}return!0}r(P,`writeNode`);function F(e,t){let n=[],r=[];ne(e,n,r);let i=r.length;for(let e=0;e{for(let t of e)$c[t.name]=t},`registerLayoutLoaders`);r(()=>{el([{name:`dagre`,loader:r(async()=>await import(`./dagre-GXQ25YYZ-Ywu0a3TZ.js`),`loader`)},{name:`swimlane`,loader:r(async()=>await import(`./swimlanes-42K2YHIH-Bx-Gt6De.js`),`loader`)},{name:`cose-bilkent`,loader:r(async()=>await import(`./cose-bilkent-JH36ORCC-Cc_gtNtR.js`),`loader`)}])},`registerDefaultLayoutLoaders`)();var tl=r(async(e,t)=>{if(!(e.layoutAlgorithm in $c))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=$c[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,Qc,{algorithm:n.algorithm})},`render`),nl=r((e=``,{fallback:n=`dagre`}={})=>{if(e in $c)return e;if(n in $c)return t.warn(`Layout algorithm ${e} is not registered. Using ${n} as fallback.`),n;throw Error(`Both layout algorithms ${e} and ${n} are not registered.`)},`getRegisteredLayoutAlgorithm`),rl=`comm`,il=`rule`,al=`decl`,ol=`@import`,sl=`@namespace`,cl=`@keyframes`,ll=`@layer`,ul=Math.abs,dl=String.fromCharCode;function fl(e){return e.trim()}function pl(e,t,n){return e.replace(t,n)}function ml(e,t){return e.charCodeAt(t)|0}function hl(e,t,n){return e.slice(t,n)}function X(e){return e.length}function gl(e){return e.length}function _l(e,t){return t.push(e),e}var vl=1,yl=1,bl=0,Z=0,Q=0,xl=``;function Sl(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:vl,column:yl,length:o,return:``,siblings:s}}function Cl(){return Q}function wl(){return Q=Z>0?ml(xl,--Z):0,yl--,Q===10&&(yl=1,vl--),Q}function $(){return Q=Z2||Ol(Q)>3?``:` `}function Nl(e,t){for(;--t&&$()&&!(Q<48||Q>102||Q>57&&Q<65||Q>70&&Q<97););return Dl(e,El()+(t<6&&Tl()==32&&$()==32))}function Pl(e){for(;$();)switch(Q){case e:return Z;case 34:case 39:e!==34&&e!==39&&Pl(Q);break;case 40:e===41&&Pl(e);break;case 92:$();break}return Z}function Fl(e,t){for(;$()&&e+Q!==57&&!(e+Q===84&&Tl()===47););return`/*`+Dl(t,Z-1)+`*`+dl(e===47?e:$())}function Il(e){for(;!Ol(Tl());)$();return Dl(e,Z)}function Ll(e){return Al(Rl(``,null,null,null,[``],e=kl(e),0,[0],e))}function Rl(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=$()){case 40:m!=108&&ml(w,d-1)==58?(v++,w+=`(`):w+=jl(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=jl(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=dl(y);break}w+=Ml(m);break;case 92:w+=Nl(El()-1,7);continue;case 47:switch(Tl()){case 42:case 47:_l(Bl(Fl($(),El()),t,n,c),c),(Ol(m||1)==5||Ol(Tl()||1)==5)&&X(w)&&hl(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=X(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=dl(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=pl(w,/\f/g,``)),p>0&&(X(w)-d||h===0)&&_l(p>32?Vl(w+`;`,r,n,d-1,c):Vl(pl(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(_l(C=zl(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)Rl(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(ml(w,3)===110)break;case 108:if(ml(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Rl(e,C,C,r&&_l(zl(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):Rl(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+X(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&wl()==125)continue}switch(w+=dl(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(X(w)-1)*_,_=1;break;case 64:Tl()===45&&(w+=jl($())),f=Tl(),u=d=X(b=w+=Il(El())),y++;break;case 45:m===45&&X(w)==2&&(h=0)}}return a}function zl(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=gl(p),h=0,g=0,_=0;h0?p[v]+` `+y:pl(y,/&\f/g,p[v])))&&(c[_++]=b);return Sl(e,t,n,i===0?il:s,c,l,u,d)}function Bl(e,t,n,r){return Sl(e,t,n,rl,dl(Cl()),hl(e,2,-2),0,r)}function Vl(e,t,n,r,i){return Sl(e,t,n,al,hl(e,0,r),hl(e,r+1,-1),r,i)}function Hl(e,t){for(var n=``,r=0;r/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./c4Diagram-7LVT6UL2-CocaHB6t.js`);return{id:Gl,diagram:e}},`loader`)},ql=`flowchart`,Jl={id:ql,detector:r((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-CGfHnzBR.js`);return{id:ql,diagram:e}},`loader`)},Yl=`flowchart-v2`,Xl={id:Yl,detector:r((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-CGfHnzBR.js`);return{id:Yl,diagram:e}},`loader`)},Zl=`swimlane`,Ql={id:Zl,detector:r(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./swimlanesDiagram-VR7AAH4N-BaMCRHZX.js`);return{id:Zl,diagram:e}},`loader`)},$l=`er`,eu={id:$l,detector:r(e=>/^\s*erDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./erDiagram-RLTQ6QDP-6Oiy-o19.js`);return{id:$l,diagram:e}},`loader`)},tu=`gitGraph`,nu={id:tu,detector:r(e=>/^\s*gitGraph/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-WWUBYQGX-DECM8ouV.js`);return{id:tu,diagram:e}},`loader`)},ru=`gantt`,iu={id:ru,detector:r(e=>/^\s*gantt/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./ganttDiagram-EL5Y4UJY-Czj-N8IR.js`);return{id:ru,diagram:e}},`loader`)},au=`info`,ou={id:au,detector:r(e=>/^\s*info/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./infoDiagram-27XIBGKW-Cg0R21x_.js`);return{id:au,diagram:e}},`loader`)},su=`pie`,cu={id:su,detector:r(e=>/^\s*pie/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./pieDiagram-E7YTZNPT-mEnEE-pg.js`);return{id:su,diagram:e}},`loader`)},lu=`quadrantChart`,uu={id:lu,detector:r(e=>/^\s*quadrantChart/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./quadrantDiagram-AXDQQJYC-BNpfC5Ib.js`);return{id:lu,diagram:e}},`loader`)},du=`xychart`,fu={id:du,detector:r(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./xychartDiagram-S5SC5T6Z-Cxj95OsD.js`);return{id:du,diagram:e}},`loader`)},pu=`requirement`,mu={id:pu,detector:r(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./requirementDiagram-BXWQKSXE-CiJW760h.js`);return{id:pu,diagram:e}},`loader`)},hu=`sequence`,gu={id:hu,detector:r(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./sequenceDiagram-WJ2MYXX4-C7CGKcZw.js`);return{id:hu,diagram:e}},`loader`)},_u=`class`,vu={id:_u,detector:r((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./classDiagram-ZZMXUADV-B2T_XUZj.js`);return{id:_u,diagram:e}},`loader`)},yu=`classDiagram`,bu={id:yu,detector:r((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./classDiagram-v2-VYDZK3BY-B2T_XUZj.js`);return{id:yu,diagram:e}},`loader`)},xu=`state`,Su={id:xu,detector:r((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./stateDiagram-D77RDMKH-CoWHGQjI.js`);return{id:xu,diagram:e}},`loader`)},Cu=`stateDiagram`,wu={id:Cu,detector:r((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-MP3YSRHH-BvZufDE9.js`);return{id:Cu,diagram:e}},`loader`)},Tu=`journey`,Eu={id:Tu,detector:r(e=>/^\s*journey/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./journeyDiagram-3NMN7TZE-Ber0m8tP.js`);return{id:Tu,diagram:e}},`loader`)},Du={draw:r((e,n,r)=>{t.debug(`rendering svg for syntax error -`);let i=Fe(n),a=i.append(`g`);i.attr(`viewBox`,`0 0 2412 512`),b(i,100,512,!0),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${r}`)},`draw`)},Ou=Du,ku={db:{},renderer:Du,parser:{parse:r(()=>{},`parse`)}},Au=`flowchart-elk`,ju={id:Au,detector:r((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:r(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-CGfHnzBR.js`);return{id:Au,diagram:e}},`loader`)},Mu=`timeline`,Nu={id:Mu,detector:r(e=>/^\s*timeline/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./timeline-definition-24CTP7MA-CA2p-k2-.js`);return{id:Mu,diagram:e}},`loader`)},Pu=`mindmap`,Fu={id:Pu,detector:r(e=>/^\s*mindmap/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./mindmap-definition-YA3MSWOX-CNA5ONWH.js`);return{id:Pu,diagram:e}},`loader`)},Iu=`kanban`,Lu={id:Iu,detector:r(e=>/^\s*kanban/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./kanban-definition-UXKFOSKX-cWsMfsMK.js`);return{id:Iu,diagram:e}},`loader`)},Ru=`sankey`,zu={id:Ru,detector:r(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./sankeyDiagram-P5KCCOFB-N49noS8R.js`);return{id:Ru,diagram:e}},`loader`)},Bu=`packet`,Vu={id:Bu,detector:r(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./diagram-Z3DM3KII-DbX1HZ7c.js`);return{id:Bu,diagram:e}},`loader`)},Hu=`radar`,Uu={id:Hu,detector:r(e=>/^\s*radar-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./diagram-UQ7AKVKN-9p5-eMVt.js`);return{id:Hu,diagram:e}},`loader`)},Wu=`block`,Gu={id:Wu,detector:r(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./blockDiagram-I7D4REHJ-BFPMEfxe.js`);return{id:Wu,diagram:e}},`loader`)},Ku=`treeView`,qu={id:Ku,detector:r(e=>/^\s*treeView-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./diagram-S7CK7UJ4-DGGEwFK0.js`);return{id:Ku,diagram:e}},`loader`)},Ju=`architecture`,Yu={id:Ju,detector:r(e=>/^\s*architecture/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./architectureDiagram-5GKGNRK7-B4Rwpl9c.js`);return{id:Ju,diagram:e}},`loader`)},Xu=`eventmodeling`,Zu={id:Xu,detector:r(e=>/^\s*eventmodeling/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./diagram-VSXAHHWV-DPp46U4F.js`);return{id:Xu,diagram:e}},`loader`)},Qu=`ishikawa`,$u={id:Qu,detector:r(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-5VMMS53U-Dyf2kntZ.js`);return{id:Qu,diagram:e}},`loader`)},ed=`venn`,td={id:ed,detector:r(e=>/^\s*venn-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./vennDiagram-4TSXK5OY-d5wXmin-.js`);return{id:ed,diagram:e}},`loader`)},nd=`treemap`,rd={id:nd,detector:r(e=>/^\s*treemap/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./diagram-VX7I27RA-DcLkCice.js`);return{id:nd,diagram:e}},`loader`)},id=`wardley`,ad={id,detector:r(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./wardleyDiagram-VM6X3IG4-xB7MMyW9.js`);return{id,diagram:e}},`loader`)},od=`cynefin`,sd={id:od,detector:r(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./cynefinDiagram-5FMLGOSQ-BWXngb8a.js`);return{id:od,diagram:e}},`loader`)},cd=`railroad`,ld={id:cd,detector:r(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./railroadDiagram-O6MQD6OU-BfA_HV50.js`);return{id:cd,diagram:e}},`loader`)},ud=`railroadEbnf`,dd={id:ud,detector:r(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./ebnfDiagram-PWID7BFC-FbIICErP.js`);return{id:ud,diagram:e}},`loader`)},fd=`railroadAbnf`,pd={id:fd,detector:r(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./abnfDiagram-VCTEODGH-DHlAbv59.js`);return{id:fd,diagram:e}},`loader`)},md=`railroadPeg`,hd={id:md,detector:r(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./pegDiagram-XKGWAZYB-QqynCtwB.js`);return{id:md,diagram:e}},`loader`)},gd=!1,_d=r(()=>{gd||(gd=!0,l(`error`,ku,e=>e.toLowerCase().trim()===`error`),l(`---`,{db:{clear:r(()=>{},`clear`)},styles:{},renderer:{draw:r(()=>{},`draw`)},parser:{parse:r(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:r(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),u(ju,Fu,Yu),u(Kl,Lu,bu,vu,eu,iu,ou,cu,mu,gu,Ql,Xl,Jl,Nu,nu,wu,Su,Eu,uu,zu,Vu,fu,Gu,Zu,qu,Uu,$u,rd,ld,dd,pd,hd,td,ad,sd))},`addDiagrams`),vd=r(async()=>{t.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(C).map(async([e,{detector:n,loader:r}])=>{if(r)try{f(e)}catch{try{let{diagram:e,id:t}=await r();l(t,e,n)}catch(n){throw t.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete C[e],n}}}))).filter(e=>e.status===`rejected`);if(e.length>0){t.error(`Failed to load ${e.length} external diagrams`);for(let n of e)t.error(n);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),yd=`graphics-document document`;function bd(e,t){e.attr(`role`,yd),t!==``&&e.attr(`aria-roledescription`,t)}r(bd,`setA11yDiagramInfo`);function xd(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}r(xd,`addSVGa11yTitleDescription`);var Sd=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{r(this,`Diagram`)}static async fromText(t,n={}){let r=y(),i=T(t,r);t=ue(t)+` +`:``}return r(I,`dump2`),Nc.dump=I,Nc}r(Fc,`requireDumper`);var Ic;function Lc(){if(Ic)return J;Ic=1;let e=Mc(),t=Fc();function n(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}return r(n,`renamed`),J.Type=Y(),J.Schema=Ns(),J.FAILSAFE_SCHEMA=Gs(),J.JSON_SCHEMA=oc(),J.CORE_SCHEMA=lc(),J.DEFAULT_SCHEMA=Ac(),J.load=e.load,J.loadAll=e.loadAll,J.dump=t.dump,J.YAMLException=Ts(),J.types={binary:vc(),float:rc(),map:Hs(),null:Js(),pairs:wc(),set:Dc(),timestamp:fc(),bool:Zs(),int:ec(),merge:hc(),omap:xc(),seq:zs(),str:Is()},J.safeLoad=n(`safeLoad`,`load`),J.safeLoadAll=n(`safeLoadAll`,`loadAll`),J.safeDump=n(`safeDump`,`dump`),J}r(Lc,`requireJsYaml`);var{Type:Rc,Schema:zc,FAILSAFE_SCHEMA:Bc,JSON_SCHEMA:Vc,CORE_SCHEMA:Hc,DEFAULT_SCHEMA:Uc,load:Wc,loadAll:Gc,dump:Kc,YAMLException:qc,types:Jc,safeLoad:Yc,safeLoadAll:Xc,safeDump:Zc}=vs(Lc()),Qc={common:O,getConfig:y,insertCluster:He,insertEdge:mt,insertEdgeLabel:rt,insertMarkers:bt,insertNode:Ne,interpolateToCurve:ie,labelHelper:De,log:t,positionEdgeLabel:at},$c={},el=r(e=>{for(let t of e)$c[t.name]=t},`registerLayoutLoaders`);r(()=>{el([{name:`dagre`,loader:r(async()=>await import(`./dagre-GXQ25YYZ-Bmj8OigH.js`),`loader`)},{name:`swimlane`,loader:r(async()=>await import(`./swimlanes-42K2YHIH-COa5RBg1.js`),`loader`)},{name:`cose-bilkent`,loader:r(async()=>await import(`./cose-bilkent-JH36ORCC-Cc_gtNtR.js`),`loader`)}])},`registerDefaultLayoutLoaders`)();var tl=r(async(e,t)=>{if(!(e.layoutAlgorithm in $c))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=$c[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,Qc,{algorithm:n.algorithm})},`render`),nl=r((e=``,{fallback:n=`dagre`}={})=>{if(e in $c)return e;if(n in $c)return t.warn(`Layout algorithm ${e} is not registered. Using ${n} as fallback.`),n;throw Error(`Both layout algorithms ${e} and ${n} are not registered.`)},`getRegisteredLayoutAlgorithm`),rl=`comm`,il=`rule`,al=`decl`,ol=`@import`,sl=`@namespace`,cl=`@keyframes`,ll=`@layer`,ul=Math.abs,dl=String.fromCharCode;function fl(e){return e.trim()}function pl(e,t,n){return e.replace(t,n)}function ml(e,t){return e.charCodeAt(t)|0}function hl(e,t,n){return e.slice(t,n)}function X(e){return e.length}function gl(e){return e.length}function _l(e,t){return t.push(e),e}var vl=1,yl=1,bl=0,Z=0,Q=0,xl=``;function Sl(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:vl,column:yl,length:o,return:``,siblings:s}}function Cl(){return Q}function wl(){return Q=Z>0?ml(xl,--Z):0,yl--,Q===10&&(yl=1,vl--),Q}function $(){return Q=Z2||Ol(Q)>3?``:` `}function Nl(e,t){for(;--t&&$()&&!(Q<48||Q>102||Q>57&&Q<65||Q>70&&Q<97););return Dl(e,El()+(t<6&&Tl()==32&&$()==32))}function Pl(e){for(;$();)switch(Q){case e:return Z;case 34:case 39:e!==34&&e!==39&&Pl(Q);break;case 40:e===41&&Pl(e);break;case 92:$();break}return Z}function Fl(e,t){for(;$()&&e+Q!==57&&!(e+Q===84&&Tl()===47););return`/*`+Dl(t,Z-1)+`*`+dl(e===47?e:$())}function Il(e){for(;!Ol(Tl());)$();return Dl(e,Z)}function Ll(e){return Al(Rl(``,null,null,null,[``],e=kl(e),0,[0],e))}function Rl(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=$()){case 40:m!=108&&ml(w,d-1)==58?(v++,w+=`(`):w+=jl(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=jl(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=dl(y);break}w+=Ml(m);break;case 92:w+=Nl(El()-1,7);continue;case 47:switch(Tl()){case 42:case 47:_l(Bl(Fl($(),El()),t,n,c),c),(Ol(m||1)==5||Ol(Tl()||1)==5)&&X(w)&&hl(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=X(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=dl(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=pl(w,/\f/g,``)),p>0&&(X(w)-d||h===0)&&_l(p>32?Vl(w+`;`,r,n,d-1,c):Vl(pl(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(_l(C=zl(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)Rl(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(ml(w,3)===110)break;case 108:if(ml(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Rl(e,C,C,r&&_l(zl(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):Rl(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+X(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&wl()==125)continue}switch(w+=dl(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(X(w)-1)*_,_=1;break;case 64:Tl()===45&&(w+=jl($())),f=Tl(),u=d=X(b=w+=Il(El())),y++;break;case 45:m===45&&X(w)==2&&(h=0)}}return a}function zl(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=gl(p),h=0,g=0,_=0;h0?p[v]+` `+y:pl(y,/&\f/g,p[v])))&&(c[_++]=b);return Sl(e,t,n,i===0?il:s,c,l,u,d)}function Bl(e,t,n,r){return Sl(e,t,n,rl,dl(Cl()),hl(e,2,-2),0,r)}function Vl(e,t,n,r,i){return Sl(e,t,n,al,hl(e,0,r),hl(e,r+1,-1),r,i)}function Hl(e,t){for(var n=``,r=0;r/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./c4Diagram-7LVT6UL2-WuhtVnQN.js`);return{id:Gl,diagram:e}},`loader`)},ql=`flowchart`,Jl={id:ql,detector:r((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-DGMV3kO5.js`);return{id:ql,diagram:e}},`loader`)},Yl=`flowchart-v2`,Xl={id:Yl,detector:r((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-DGMV3kO5.js`);return{id:Yl,diagram:e}},`loader`)},Zl=`swimlane`,Ql={id:Zl,detector:r(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./swimlanesDiagram-VR7AAH4N-DHLXdf_D.js`);return{id:Zl,diagram:e}},`loader`)},$l=`er`,eu={id:$l,detector:r(e=>/^\s*erDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./erDiagram-RLTQ6QDP-Dn57ja8Z.js`);return{id:$l,diagram:e}},`loader`)},tu=`gitGraph`,nu={id:tu,detector:r(e=>/^\s*gitGraph/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-WWUBYQGX-BaBqnEaT.js`);return{id:tu,diagram:e}},`loader`)},ru=`gantt`,iu={id:ru,detector:r(e=>/^\s*gantt/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./ganttDiagram-EL5Y4UJY-DHPrHAMn.js`);return{id:ru,diagram:e}},`loader`)},au=`info`,ou={id:au,detector:r(e=>/^\s*info/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./infoDiagram-27XIBGKW-YyOdaAX5.js`);return{id:au,diagram:e}},`loader`)},su=`pie`,cu={id:su,detector:r(e=>/^\s*pie/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./pieDiagram-E7YTZNPT-DcEZTVvr.js`);return{id:su,diagram:e}},`loader`)},lu=`quadrantChart`,uu={id:lu,detector:r(e=>/^\s*quadrantChart/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./quadrantDiagram-AXDQQJYC-C64lfmec.js`);return{id:lu,diagram:e}},`loader`)},du=`xychart`,fu={id:du,detector:r(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./xychartDiagram-S5SC5T6Z-C6ipW_ze.js`);return{id:du,diagram:e}},`loader`)},pu=`requirement`,mu={id:pu,detector:r(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./requirementDiagram-BXWQKSXE-B40ldFpf.js`);return{id:pu,diagram:e}},`loader`)},hu=`sequence`,gu={id:hu,detector:r(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./sequenceDiagram-WJ2MYXX4-CTTNb2Uz.js`);return{id:hu,diagram:e}},`loader`)},_u=`class`,vu={id:_u,detector:r((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./classDiagram-ZZMXUADV-kikADBqU.js`);return{id:_u,diagram:e}},`loader`)},yu=`classDiagram`,bu={id:yu,detector:r((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./classDiagram-v2-VYDZK3BY-kikADBqU.js`);return{id:yu,diagram:e}},`loader`)},xu=`state`,Su={id:xu,detector:r((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./stateDiagram-D77RDMKH-BLD2sJL-.js`);return{id:xu,diagram:e}},`loader`)},Cu=`stateDiagram`,wu={id:Cu,detector:r((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-MP3YSRHH-LlowpFhm.js`);return{id:Cu,diagram:e}},`loader`)},Tu=`journey`,Eu={id:Tu,detector:r(e=>/^\s*journey/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./journeyDiagram-3NMN7TZE-B6rl_wMT.js`);return{id:Tu,diagram:e}},`loader`)},Du={draw:r((e,n,r)=>{t.debug(`rendering svg for syntax error +`);let i=Fe(n),a=i.append(`g`);i.attr(`viewBox`,`0 0 2412 512`),b(i,100,512,!0),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${r}`)},`draw`)},Ou=Du,ku={db:{},renderer:Du,parser:{parse:r(()=>{},`parse`)}},Au=`flowchart-elk`,ju={id:Au,detector:r((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:r(async()=>{let{diagram:e}=await import(`./flowDiagram-HODETNUW-DGMV3kO5.js`);return{id:Au,diagram:e}},`loader`)},Mu=`timeline`,Nu={id:Mu,detector:r(e=>/^\s*timeline/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./timeline-definition-24CTP7MA-e0MrEXOq.js`);return{id:Mu,diagram:e}},`loader`)},Pu=`mindmap`,Fu={id:Pu,detector:r(e=>/^\s*mindmap/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./mindmap-definition-YA3MSWOX-CBc8SICy.js`);return{id:Pu,diagram:e}},`loader`)},Iu=`kanban`,Lu={id:Iu,detector:r(e=>/^\s*kanban/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./kanban-definition-UXKFOSKX-D9FQqAnM.js`);return{id:Iu,diagram:e}},`loader`)},Ru=`sankey`,zu={id:Ru,detector:r(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./sankeyDiagram-P5KCCOFB-CpvMYqvB.js`);return{id:Ru,diagram:e}},`loader`)},Bu=`packet`,Vu={id:Bu,detector:r(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./diagram-Z3DM3KII-hYL7DRb_.js`);return{id:Bu,diagram:e}},`loader`)},Hu=`radar`,Uu={id:Hu,detector:r(e=>/^\s*radar-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./diagram-UQ7AKVKN-B659df5Q.js`);return{id:Hu,diagram:e}},`loader`)},Wu=`block`,Gu={id:Wu,detector:r(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./blockDiagram-I7D4REHJ-D8nN6IGa.js`);return{id:Wu,diagram:e}},`loader`)},Ku=`treeView`,qu={id:Ku,detector:r(e=>/^\s*treeView-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./diagram-S7CK7UJ4-D41hPypy.js`);return{id:Ku,diagram:e}},`loader`)},Ju=`architecture`,Yu={id:Ju,detector:r(e=>/^\s*architecture/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./architectureDiagram-5GKGNRK7-C4vRCjzD.js`);return{id:Ju,diagram:e}},`loader`)},Xu=`eventmodeling`,Zu={id:Xu,detector:r(e=>/^\s*eventmodeling/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./diagram-VSXAHHWV-b6j5abVC.js`);return{id:Xu,diagram:e}},`loader`)},Qu=`ishikawa`,$u={id:Qu,detector:r(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-5VMMS53U-CuC8c3n0.js`);return{id:Qu,diagram:e}},`loader`)},ed=`venn`,td={id:ed,detector:r(e=>/^\s*venn-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./vennDiagram-4TSXK5OY-CILDRbLA.js`);return{id:ed,diagram:e}},`loader`)},nd=`treemap`,rd={id:nd,detector:r(e=>/^\s*treemap/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./diagram-VX7I27RA-CIR5Ggda.js`);return{id:nd,diagram:e}},`loader`)},id=`wardley`,ad={id,detector:r(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./wardleyDiagram-VM6X3IG4-BBaRJhAr.js`);return{id,diagram:e}},`loader`)},od=`cynefin`,sd={id:od,detector:r(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./cynefinDiagram-5FMLGOSQ-DFe0zgJu.js`);return{id:od,diagram:e}},`loader`)},cd=`railroad`,ld={id:cd,detector:r(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./railroadDiagram-O6MQD6OU-Sz93ixk4.js`);return{id:cd,diagram:e}},`loader`)},ud=`railroadEbnf`,dd={id:ud,detector:r(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./ebnfDiagram-PWID7BFC-DIMDDDGC.js`);return{id:ud,diagram:e}},`loader`)},fd=`railroadAbnf`,pd={id:fd,detector:r(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./abnfDiagram-VCTEODGH-C5a22uRi.js`);return{id:fd,diagram:e}},`loader`)},md=`railroadPeg`,hd={id:md,detector:r(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await import(`./pegDiagram-XKGWAZYB-BnztQKlY.js`);return{id:md,diagram:e}},`loader`)},gd=!1,_d=r(()=>{gd||(gd=!0,l(`error`,ku,e=>e.toLowerCase().trim()===`error`),l(`---`,{db:{clear:r(()=>{},`clear`)},styles:{},renderer:{draw:r(()=>{},`draw`)},parser:{parse:r(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:r(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),u(ju,Fu,Yu),u(Kl,Lu,bu,vu,eu,iu,ou,cu,mu,gu,Ql,Xl,Jl,Nu,nu,wu,Su,Eu,uu,zu,Vu,fu,Gu,Zu,qu,Uu,$u,rd,ld,dd,pd,hd,td,ad,sd))},`addDiagrams`),vd=r(async()=>{t.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(C).map(async([e,{detector:n,loader:r}])=>{if(r)try{f(e)}catch{try{let{diagram:e,id:t}=await r();l(t,e,n)}catch(n){throw t.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete C[e],n}}}))).filter(e=>e.status===`rejected`);if(e.length>0){t.error(`Failed to load ${e.length} external diagrams`);for(let n of e)t.error(n);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),yd=`graphics-document document`;function bd(e,t){e.attr(`role`,yd),t!==``&&e.attr(`aria-roledescription`,t)}r(bd,`setA11yDiagramInfo`);function xd(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}r(xd,`addSVGa11yTitleDescription`);var Sd=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{r(this,`Diagram`)}static async fromText(t,n={}){let r=y(),i=T(t,r);t=ue(t)+` `;try{f(i)}catch{let e=a(i);if(!e)throw new k(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();l(t,n)}let{db:o,parser:s,renderer:c,init:u}=f(i);return s.parser&&(s.parser.yy=o),o.clear?.(),u?.(r),n.title&&o.setDiagramTitle?.(n.title),await s.parse(t),new e(i,t,o,s,c)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},Cd=[],wd=r(()=>{Cd.forEach(e=>{e()}),Cd=[]},`attachFunctions`),Td=r(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function Ed(e){let t=e.match(v);if(!t)return{text:e,metadata:{}};let n=t[1],r=Wc(n?t[2].split(` `).map(e=>e.startsWith(n)?e.slice(n.length):e).join(` `):t[2],{schema:Vc})??{};r=typeof r==`object`&&!Array.isArray(r)?r:{};let i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}r(Ed,`extractFrontMatter`);var Dd=r(e=>e.replace(/\r\n?/g,` diff --git a/apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-D4TvMM7a.js b/apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-C61H_kRd.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-D4TvMM7a.js rename to apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-C61H_kRd.js index e73321496..d1f15a341 100644 --- a/apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-D4TvMM7a.js +++ b/apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-C61H_kRd.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{$ as n,b as r,et as i,f as a,k as o,nt as s,x as c,z as l}from"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import"./chunk-OSK3NFVY-BT2Y-lqQ.js";import{t as u}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as d}from"./chunk-POPQ4Y6H-BCRCUUP_.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import{r as f,t as p}from"./chunk-TLUHSLCS-DN2eHVWx.js";var m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function h(e,t=0){return(m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+`-`+m[e[t+4]]+m[e[t+5]]+`-`+m[e[t+6]]+m[e[t+7]]+`-`+m[e[t+8]]+m[e[t+9]]+`-`+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]).toLowerCase()}var g=new Uint8Array(16);function _(){return crypto.getRandomValues(g)}function v(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():y(e,t,n)}function y(e,t,n){e||={};let r=e.random??e.rng?.()??_();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return h(r)}var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],h=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],v={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`MINDMAP`,11:`EOF`,13:`SPACELIST`,15:`ICON`,16:`CLASS`,19:`NODE_DSTART`,20:`NODE_DESCR`,21:`NODE_DEND`,22:`NODE_ID`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace(`SPACELIST`);break;case 19:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:r,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:u,7:d,10:23,11:f},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:c}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(m,[2,14],{7:h,11:g}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(m,[2,13],{7:h,11:g}),t(_,[2,11]),t(_,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import{$ as n,b as r,et as i,f as a,k as o,nt as s,x as c,z as l}from"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import"./chunk-OSK3NFVY-ZXiPE9OQ.js";import{t as u}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as d}from"./chunk-POPQ4Y6H-mwDJO2QS.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import{r as f,t as p}from"./chunk-TLUHSLCS-B1Sp0tTt.js";var m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function h(e,t=0){return(m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+`-`+m[e[t+4]]+m[e[t+5]]+`-`+m[e[t+6]]+m[e[t+7]]+`-`+m[e[t+8]]+m[e[t+9]]+`-`+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]).toLowerCase()}var g=new Uint8Array(16);function _(){return crypto.getRandomValues(g)}function v(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():y(e,t,n)}function y(e,t,n){e||={};let r=e.random??e.rng?.()??_();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return h(r)}var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],h=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],v={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`MINDMAP`,11:`EOF`,13:`SPACELIST`,15:`ICON`,16:`CLASS`,19:`NODE_DSTART`,20:`NODE_DESCR`,21:`NODE_DEND`,22:`NODE_ID`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace(`SPACELIST`);break;case 19:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:r,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:u,7:d,10:23,11:f},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:c}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(m,[2,14],{7:h,11:g}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(m,[2,13],{7:h,11:g}),t(_,[2,11]),t(_,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};v.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-CNA5ONWH.js b/apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-CBc8SICy.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-CNA5ONWH.js rename to apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-CBc8SICy.js index de26f145b..8bb798087 100644 --- a/apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-CNA5ONWH.js +++ b/apps/pythinker-code/dist-web/assets/mindmap-definition-YA3MSWOX-CBc8SICy.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{b as n,et as r,f as i,k as a,rt as o,tt as s,x as c,z as l}from"./chunk-DU6HZSFF-CcF2nKWM.js";import"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import"./chunk-GVQU2GXP-aw9OR1ii.js";import{n as u,t as d}from"./mermaidParser.worker-_pLIm6No.js";import{t as f}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as p}from"./chunk-POPQ4Y6H-BiMU0_kH.js";const m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function h(e,t=0){return(m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+`-`+m[e[t+4]]+m[e[t+5]]+`-`+m[e[t+6]]+m[e[t+7]]+`-`+m[e[t+8]]+m[e[t+9]]+`-`+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]).toLowerCase()}const g=new Uint8Array(16);function _(){return crypto.getRandomValues(g)}function v(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():y(e,t,n)}function y(e,t,n){e||={};let r=e.random??e.rng?.()??_();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return h(r)}var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],h=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],v={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`MINDMAP`,11:`EOF`,13:`SPACELIST`,15:`ICON`,16:`CLASS`,19:`NODE_DSTART`,20:`NODE_DESCR`,21:`NODE_DEND`,22:`NODE_ID`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace(`SPACELIST`);break;case 19:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:r,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:u,7:d,10:23,11:f},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:c}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},e(m,[2,14],{7:h,11:g}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(m,[2,13],{7:h,11:g}),e(_,[2,11]),e(_,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{b as n,et as r,f as i,k as a,rt as o,tt as s,x as c,z as l}from"./chunk-DU6HZSFF-CbPIJzjs.js";import"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import"./chunk-GVQU2GXP-CCw5T6ST.js";import{n as u,t as d}from"./mermaidParser.worker-CBWarbNh.js";import{t as f}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as p}from"./chunk-POPQ4Y6H-1k8n9Sa3.js";const m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function h(e,t=0){return(m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+`-`+m[e[t+4]]+m[e[t+5]]+`-`+m[e[t+6]]+m[e[t+7]]+`-`+m[e[t+8]]+m[e[t+9]]+`-`+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]).toLowerCase()}const g=new Uint8Array(16);function _(){return crypto.getRandomValues(g)}function v(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():y(e,t,n)}function y(e,t,n){e||={};let r=e.random??e.rng?.()??_();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return h(r)}var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],h=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],v={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`MINDMAP`,11:`EOF`,13:`SPACELIST`,15:`ICON`,16:`CLASS`,19:`NODE_DSTART`,20:`NODE_DESCR`,21:`NODE_DEND`,22:`NODE_ID`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace(`SPACELIST`);break;case 19:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:r,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:u,7:d,10:23,11:f},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:c}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},e(m,[2,14],{7:h,11:g}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(m,[2,13],{7:h,11:g}),e(_,[2,11]),e(_,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};v.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/monaco.contribution-DqkvvJIb.js b/apps/pythinker-code/dist-web/assets/monaco.contribution-C71ieqbT.js similarity index 91% rename from apps/pythinker-code/dist-web/assets/monaco.contribution-DqkvvJIb.js rename to apps/pythinker-code/dist-web/assets/monaco.contribution-C71ieqbT.js index f160a982d..0d3723ac5 100644 --- a/apps/pythinker-code/dist-web/assets/monaco.contribution-DqkvvJIb.js +++ b/apps/pythinker-code/dist-web/assets/monaco.contribution-C71ieqbT.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tsMode-CJEjHu_A.js","assets/editor.api2-BIJacb07.js","assets/chunk-QTnfLwEv.js","assets/purify.es-CvIXgbbv.js","assets/editor-D_FpifaX.css","assets/workers-lk8skNfQ.js"])))=>i.map(i=>d[i]); -import{n as e}from"./chunk-QTnfLwEv.js";import{t}from"./preload-helper-zJ_50EbN.js";import{h as n,n as r}from"./editor.api2-BIJacb07.js";var i=`5.9.3`,a=e({JsxEmit:()=>s,ModuleKind:()=>o,ModuleResolutionKind:()=>u,NewLineKind:()=>c,ScriptTarget:()=>l,getJavaScriptWorker:()=>_,getTypeScriptWorker:()=>g,javascriptDefaults:()=>h,typescriptDefaults:()=>m,typescriptVersion:()=>f}),o=(e=>(e[e.None=0]=`None`,e[e.CommonJS=1]=`CommonJS`,e[e.AMD=2]=`AMD`,e[e.UMD=3]=`UMD`,e[e.System=4]=`System`,e[e.ES2015=5]=`ES2015`,e[e.ESNext=99]=`ESNext`,e))(o||{}),s=(e=>(e[e.None=0]=`None`,e[e.Preserve=1]=`Preserve`,e[e.React=2]=`React`,e[e.ReactNative=3]=`ReactNative`,e[e.ReactJSX=4]=`ReactJSX`,e[e.ReactJSXDev=5]=`ReactJSXDev`,e))(s||{}),c=(e=>(e[e.CarriageReturnLineFeed=0]=`CarriageReturnLineFeed`,e[e.LineFeed=1]=`LineFeed`,e))(c||{}),l=(e=>(e[e.ES3=0]=`ES3`,e[e.ES5=1]=`ES5`,e[e.ES2015=2]=`ES2015`,e[e.ES2016=3]=`ES2016`,e[e.ES2017=4]=`ES2017`,e[e.ES2018=5]=`ES2018`,e[e.ES2019=6]=`ES2019`,e[e.ES2020=7]=`ES2020`,e[e.ESNext=99]=`ESNext`,e[e.JSON=100]=`JSON`,e[e.Latest=99]=`Latest`,e))(l||{}),u=(e=>(e[e.Classic=1]=`Classic`,e[e.NodeJs=2]=`NodeJs`,e))(u||{}),d=class{constructor(e,t,n,i,a){this._onDidChange=new r,this._onDidExtraLibsChange=new r,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(n),this.setInlayHintsOptions(i),this.setModeConfiguration(a),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let n;if(n=t===void 0?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[n]&&this._extraLibs[n].content===e)return{dispose:()=>{}};let r=1;return this._removedExtraLibs[n]&&(r=this._removedExtraLibs[n]+1),this._extraLibs[n]&&(r=this._extraLibs[n].version+1),this._extraLibs[n]={content:e,version:r},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[n];e&&e.version===r&&(delete this._extraLibs[n],this._removedExtraLibs[n]=r,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(let e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(let t of e){let e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=t.content,r=1;this._removedExtraLibs[e]&&(r=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:n,version:r}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},f=i,p={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},m=new d({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},p),h=new d({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},p),g=()=>v().then(e=>e.getTypeScriptWorker()),_=()=>v().then(e=>e.getJavaScriptWorker());function v(){return t(()=>import(`./tsMode-CJEjHu_A.js`),__vite__mapDeps([0,1,2,3,4,5]))}n.onLanguage(`typescript`,()=>v().then(e=>e.setupTypeScript(m))),n.onLanguage(`javascript`,()=>v().then(e=>e.setupJavaScript(h)));export{m as n,a as t}; \ No newline at end of file +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tsMode-lA__bS9d.js","assets/editor.api2-DVs509bq.js","assets/chunk-QTnfLwEv.js","assets/purify.es-F_7NWVtX.js","assets/editor-D_FpifaX.css","assets/workers-CzVdMsP_.js"])))=>i.map(i=>d[i]); +import{n as e}from"./chunk-QTnfLwEv.js";import{t}from"./preload-helper-zJ_50EbN.js";import{h as n,n as r}from"./editor.api2-DVs509bq.js";var i=`5.9.3`,a=e({JsxEmit:()=>s,ModuleKind:()=>o,ModuleResolutionKind:()=>u,NewLineKind:()=>c,ScriptTarget:()=>l,getJavaScriptWorker:()=>_,getTypeScriptWorker:()=>g,javascriptDefaults:()=>h,typescriptDefaults:()=>m,typescriptVersion:()=>f}),o=(e=>(e[e.None=0]=`None`,e[e.CommonJS=1]=`CommonJS`,e[e.AMD=2]=`AMD`,e[e.UMD=3]=`UMD`,e[e.System=4]=`System`,e[e.ES2015=5]=`ES2015`,e[e.ESNext=99]=`ESNext`,e))(o||{}),s=(e=>(e[e.None=0]=`None`,e[e.Preserve=1]=`Preserve`,e[e.React=2]=`React`,e[e.ReactNative=3]=`ReactNative`,e[e.ReactJSX=4]=`ReactJSX`,e[e.ReactJSXDev=5]=`ReactJSXDev`,e))(s||{}),c=(e=>(e[e.CarriageReturnLineFeed=0]=`CarriageReturnLineFeed`,e[e.LineFeed=1]=`LineFeed`,e))(c||{}),l=(e=>(e[e.ES3=0]=`ES3`,e[e.ES5=1]=`ES5`,e[e.ES2015=2]=`ES2015`,e[e.ES2016=3]=`ES2016`,e[e.ES2017=4]=`ES2017`,e[e.ES2018=5]=`ES2018`,e[e.ES2019=6]=`ES2019`,e[e.ES2020=7]=`ES2020`,e[e.ESNext=99]=`ESNext`,e[e.JSON=100]=`JSON`,e[e.Latest=99]=`Latest`,e))(l||{}),u=(e=>(e[e.Classic=1]=`Classic`,e[e.NodeJs=2]=`NodeJs`,e))(u||{}),d=class{constructor(e,t,n,i,a){this._onDidChange=new r,this._onDidExtraLibsChange=new r,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(n),this.setInlayHintsOptions(i),this.setModeConfiguration(a),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let n;if(n=t===void 0?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[n]&&this._extraLibs[n].content===e)return{dispose:()=>{}};let r=1;return this._removedExtraLibs[n]&&(r=this._removedExtraLibs[n]+1),this._extraLibs[n]&&(r=this._extraLibs[n].version+1),this._extraLibs[n]={content:e,version:r},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[n];e&&e.version===r&&(delete this._extraLibs[n],this._removedExtraLibs[n]=r,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(let e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(let t of e){let e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=t.content,r=1;this._removedExtraLibs[e]&&(r=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:n,version:r}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},f=i,p={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},m=new d({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},p),h=new d({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},p),g=()=>v().then(e=>e.getTypeScriptWorker()),_=()=>v().then(e=>e.getJavaScriptWorker());function v(){return t(()=>import(`./tsMode-lA__bS9d.js`),__vite__mapDeps([0,1,2,3,4,5]))}n.onLanguage(`typescript`,()=>v().then(e=>e.setupTypeScript(m))),n.onLanguage(`javascript`,()=>v().then(e=>e.setupJavaScript(h)));export{m as n,a as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-QqynCtwB.js b/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-BnztQKlY.js similarity index 90% rename from apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-QqynCtwB.js rename to apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-BnztQKlY.js index 9a5d69dd3..d05b40075 100644 --- a/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-QqynCtwB.js +++ b/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-BnztQKlY.js @@ -1 +1 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CcF2nKWM.js";import"./mermaidParser.worker-_pLIm6No.js";import{t as n,u as r}from"./mermaid-parser.core-87cmcdBo.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-uaDelfR2.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=r().RailroadPeg.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=t(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=t(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=t(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=t(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=t(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=t(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(h(e)))},`populateDb`),_={parser:{parse:t(t=>{o.clear(),e.debug(`[PEG Parser] Starting Langium parse`);let r=c.parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new n(r);let i=r.value;e.debug(`[PEG Parser] Parsed rules:`,i.rules.length),g(i),e.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{_ as diagram}; \ No newline at end of file +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CbPIJzjs.js";import"./mermaidParser.worker-CBWarbNh.js";import{t as n,u as r}from"./mermaid-parser.core-87cmcdBo.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-Cw2zjcPU.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=r().RailroadPeg.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=t(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=t(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=t(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=t(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=t(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=t(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(h(e)))},`populateDb`),_={parser:{parse:t(t=>{o.clear(),e.debug(`[PEG Parser] Starting Langium parse`);let r=c.parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new n(r);let i=r.value;e.debug(`[PEG Parser] Parsed rules:`,i.rules.length),g(i),e.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{_ as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-BDYjmSRS.js b/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-Df1irOt3.js similarity index 90% rename from apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-BDYjmSRS.js rename to apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-Df1irOt3.js index fc1103fd6..7e7940cd5 100644 --- a/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-BDYjmSRS.js +++ b/apps/pythinker-code/dist-web/assets/pegDiagram-XKGWAZYB-Df1irOt3.js @@ -1 +1 @@ -import{t as e,u as t}from"./mermaid-parser.core-BCOGZFb-.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-CLGD4ZFX-D_luxf7b.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-BnQxQiBZ.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=t().RailroadPeg.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=n(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=n(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=n(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=n(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(h(e)))},`populateDb`),_={parser:{parse:n(t=>{o.clear(),r.debug(`[PEG Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new e(n);let i=n.value;r.debug(`[PEG Parser] Parsed rules:`,i.rules.length),g(i),r.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{_ as diagram}; \ No newline at end of file +import{t as e,u as t}from"./mermaid-parser.core-BCOGZFb-.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-CWy3EboY.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=t().RailroadPeg.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=n(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=n(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=n(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=n(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(h(e)))},`populateDb`),_={parser:{parse:n(t=>{o.clear(),r.debug(`[PEG Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new e(n);let i=n.value;r.debug(`[PEG Parser] Parsed rules:`,i.rules.length),g(i),r.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{_ as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-Cq0FcMpS.js b/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-BwwV0YYs.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-Cq0FcMpS.js rename to apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-BwwV0YYs.js index 39ab7e15f..d73f20280 100644 --- a/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-Cq0FcMpS.js +++ b/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-BwwV0YYs.js @@ -1,4 +1,4 @@ -import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{H as r,K as i,U as a,a as o,c as s,f as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as p}from"./ordinal-hYBb2elL.js";import{n as m}from"./path-BWPyau1x.js";import{m as h}from"./dist-lRkD-JPF.js";import{t as g}from"./arc-CuHXSNPr.js";import{t as _}from"./array-BifhSqXX.js";import{i as v,p as y}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as b}from"./chunk-CLGD4ZFX-D_luxf7b.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";function S(e,t){return te?1:t>=e?0:NaN}function C(e){return e}function w(){var e=C,t=S,n=null,r=m(0),i=m(h),a=m(0);function o(o){var s,c=(o=_(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),g=Math.min(h,Math.max(-h,i.apply(this,arguments)-m)),v,y=Math.min(Math.abs(g)/c,a.apply(this,arguments)),b=y*(g<0?-1:1),x;for(s=0;s0&&(d+=x);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(g-c*b)/d:0;s0?x*u:0)+b,p[l]={data:o[l],index:s,value:x,startAngle:m,endAngle:v,padAngle:y};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:m(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:m(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:m(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:m(+e),o):a},o}var T=c.pie,E={sections:new Map,showData:!1,config:T},D=E.sections,O=E.showData,k=structuredClone(T),A={getConfig:t(()=>structuredClone(k),`getConfig`),clear:t(()=>{D=new Map,O=E.showData,o()},`clear`),setDiagramTitle:i,getDiagramTitle:u,setAccTitle:a,getAccTitle:f,setAccDescription:r,getAccDescription:l,addSection:t(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(e)||(D.set(e,t),n.debug(`added new section: ${e}, with value: ${t}`))},`addSection`),getSections:t(()=>D,`getSections`),setShowData:t(e=>{O=e},`setShowData`),getShowData:t(()=>O,`getShowData`)},j=t((e,t)=>{x(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),M={parse:t(async t=>{let r=await e(`pie`,t);n.debug(r),j(r,A)},`parse`)},N=t(e=>` +import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{H as r,K as i,U as a,a as o,c as s,f as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as p}from"./ordinal-hYBb2elL.js";import{n as m}from"./path-BWPyau1x.js";import{m as h}from"./dist-lRkD-JPF.js";import{t as g}from"./arc-CuHXSNPr.js";import{t as _}from"./array-BifhSqXX.js";import{i as v,p as y}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as b}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";function S(e,t){return te?1:t>=e?0:NaN}function C(e){return e}function w(){var e=C,t=S,n=null,r=m(0),i=m(h),a=m(0);function o(o){var s,c=(o=_(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),g=Math.min(h,Math.max(-h,i.apply(this,arguments)-m)),v,y=Math.min(Math.abs(g)/c,a.apply(this,arguments)),b=y*(g<0?-1:1),x;for(s=0;s0&&(d+=x);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(g-c*b)/d:0;s0?x*u:0)+b,p[l]={data:o[l],index:s,value:x,startAngle:m,endAngle:v,padAngle:y};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:m(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:m(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:m(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:m(+e),o):a},o}var T=c.pie,E={sections:new Map,showData:!1,config:T},D=E.sections,O=E.showData,k=structuredClone(T),A={getConfig:t(()=>structuredClone(k),`getConfig`),clear:t(()=>{D=new Map,O=E.showData,o()},`clear`),setDiagramTitle:i,getDiagramTitle:u,setAccTitle:a,getAccTitle:f,setAccDescription:r,getAccDescription:l,addSection:t(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(e)||(D.set(e,t),n.debug(`added new section: ${e}, with value: ${t}`))},`addSection`),getSections:t(()=>D,`getSections`),setShowData:t(e=>{O=e},`setShowData`),getShowData:t(()=>O,`getShowData`)},j=t((e,t)=>{x(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),M={parse:t(async t=>{let r=await e(`pie`,t);n.debug(r),j(r,A)},`parse`)},N=t(e=>` .pieCircle{ stroke: ${e.pieStrokeColor}; stroke-width : ${e.pieStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-mEnEE-pg.js b/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-DcEZTVvr.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-mEnEE-pg.js rename to apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-DcEZTVvr.js index c326697f7..36ee88080 100644 --- a/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-mEnEE-pg.js +++ b/apps/pythinker-code/dist-web/assets/pieDiagram-E7YTZNPT-DcEZTVvr.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,K as r,U as i,a,c as o,f as s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as f}from"./ordinal-C_XC5MEo.js";import{n as p}from"./path-BdVUuaW-.js";import{m}from"./dist-B9JEmVDW.js";import{t as h}from"./arc-cbkNQeCY.js";import{t as g}from"./array-BifhSqXX.js";import{i as _,p as v}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{St as y}from"./mermaidParser.worker-_pLIm6No.js";import{n as b}from"./mermaid-parser.core-87cmcdBo.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";function S(e,t){return te?1:t>=e?0:NaN}function C(e){return e}function w(){var e=C,t=S,n=null,r=p(0),i=p(m),a=p(0);function o(o){var s,c=(o=g(o)).length,l,u,d=0,f=Array(c),p=Array(c),h=+r.apply(this,arguments),_=Math.min(m,Math.max(-m,i.apply(this,arguments)-h)),v,y=Math.min(Math.abs(_)/c,a.apply(this,arguments)),b=y*(_<0?-1:1),x;for(s=0;s0&&(d+=x);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(_-c*b)/d:0;s0?x*u:0)+b,p[l]={data:o[l],index:s,value:x,startAngle:h,endAngle:v,padAngle:y};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:p(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:p(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:p(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:p(+e),o):a},o}var T=s.pie,E={sections:new Map,showData:!1,config:T},D=E.sections,O=E.showData,k=structuredClone(T),A={getConfig:t(()=>structuredClone(k),`getConfig`),clear:t(()=>{D=new Map,O=E.showData,a()},`clear`),setDiagramTitle:r,getDiagramTitle:l,setAccTitle:i,getAccTitle:d,setAccDescription:n,getAccDescription:c,addSection:t(({label:t,value:n})=>{if(n<0)throw Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(t)||(D.set(t,n),e.debug(`added new section: ${t}, with value: ${n}`))},`addSection`),getSections:t(()=>D,`getSections`),setShowData:t(e=>{O=e},`setShowData`),getShowData:t(()=>O,`getShowData`)},j=t((e,t)=>{x(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),M={parse:t(async t=>{let n=await b(`pie`,t);e.debug(n),j(n,A)},`parse`)},N=t(e=>` +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,K as r,U as i,a,c as o,f as s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as f}from"./ordinal-C_XC5MEo.js";import{n as p}from"./path-BdVUuaW-.js";import{m}from"./dist-B9JEmVDW.js";import{t as h}from"./arc-cbkNQeCY.js";import{t as g}from"./array-BifhSqXX.js";import{i as _,p as v}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{St as y}from"./mermaidParser.worker-CBWarbNh.js";import{n as b}from"./mermaid-parser.core-87cmcdBo.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";function S(e,t){return te?1:t>=e?0:NaN}function C(e){return e}function w(){var e=C,t=S,n=null,r=p(0),i=p(m),a=p(0);function o(o){var s,c=(o=g(o)).length,l,u,d=0,f=Array(c),p=Array(c),h=+r.apply(this,arguments),_=Math.min(m,Math.max(-m,i.apply(this,arguments)-h)),v,y=Math.min(Math.abs(_)/c,a.apply(this,arguments)),b=y*(_<0?-1:1),x;for(s=0;s0&&(d+=x);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(_-c*b)/d:0;s0?x*u:0)+b,p[l]={data:o[l],index:s,value:x,startAngle:h,endAngle:v,padAngle:y};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:p(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:p(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:p(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:p(+e),o):a},o}var T=s.pie,E={sections:new Map,showData:!1,config:T},D=E.sections,O=E.showData,k=structuredClone(T),A={getConfig:t(()=>structuredClone(k),`getConfig`),clear:t(()=>{D=new Map,O=E.showData,a()},`clear`),setDiagramTitle:r,getDiagramTitle:l,setAccTitle:i,getAccTitle:d,setAccDescription:n,getAccDescription:c,addSection:t(({label:t,value:n})=>{if(n<0)throw Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(t)||(D.set(t,n),e.debug(`added new section: ${t}, with value: ${n}`))},`addSection`),getSections:t(()=>D,`getSections`),setShowData:t(e=>{O=e},`setShowData`),getShowData:t(()=>O,`getShowData`)},j=t((e,t)=>{x(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),M={parse:t(async t=>{let n=await b(`pie`,t);e.debug(n),j(n,A)},`parse`)},N=t(e=>` .pieCircle{ stroke: ${e.pieStrokeColor}; stroke-width : ${e.pieStrokeWidth}; diff --git a/apps/pythinker-code/dist-web/assets/purify.es-CvIXgbbv.js b/apps/pythinker-code/dist-web/assets/purify.es-CvIXgbbv.js deleted file mode 100644 index bd3cb4bed..000000000 --- a/apps/pythinker-code/dist-web/assets/purify.es-CvIXgbbv.js +++ /dev/null @@ -1,3 +0,0 @@ -function e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n`u`?null:w(BigInt.prototype.toString),y=typeof Symbol>`u`?null:w(Symbol.prototype.toString),b=w(Object.prototype.hasOwnProperty),x=w(Object.prototype.toString),S=w(RegExp.prototype.test),C=T(TypeError);function w(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return h(e,t,n)}}function T(e){return function(){return ee(e,[...arguments])}}function E(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ae;if(s&&s(e,null),!_(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(c(t)||(t[r]=e),i=e)}e[i]=!0}return e}function D(e){for(let t=0;t/g),Oe=f(/\${[\w\W]*/g),ke=f(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ae=f(/^aria-[\-\w]+$/),je=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Me=f(/^(?:\w+script|data):/i),Ne=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Pe=f(/^html$/i),Fe=f(/^[a-z][.\w]*(-[.\w]+)+$/i),Ie=f(/<[/\w!]/g),Le=f(/<[/\w]/g),Re=f(/<\/no(script|embed|frames)/i),ze=f(/\/>/i),A={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},j=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],Be=d(E({},j)),Ve=function(){let e={};return g(j,t=>{e[t]=f(RegExp(`])`,`i`))}),d(e)}(),He=function(){return typeof window>`u`?null:window},Ue=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},We=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},M=function(e,t,n,r){return b(e,t)&&_(e[t])?E(r.base?O(r.base):{},e[t],r.transform):n},Ge=function(e,t,n){let r=b(e,t)?e[t]:void 0;return r&&typeof r==`object`?O(r):n()};function Ke(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:He(),t=e=>Ke(e);if(t.version=`3.4.14`,t.removed=[],!e||!e.document||e.document.nodeType!==A.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,s=e.Node,c=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,m=e.trustedTypes,h=c.prototype,ee=k(h,`cloneNode`),de=k(h,`remove`),fe=k(h,`nextSibling`),v=k(h,`childNodes`),y=k(h,`parentNode`),x=k(h,`shadowRoot`),w=k(h,`attributes`),T=s&&s.prototype?k(s.prototype,`nodeType`):null,D=s&&s.prototype?k(s.prototype,`nodeName`):null,j=s&&s.prototype?k(s.prototype,`ownerDocument`):null,qe=function(e){return T?T(e):e.nodeType},Je=function(e){return D?D(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let N,P=``,Ye,Xe=!1,Ze=0,Qe=function(){if(Ze>0)throw C(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},F=function(e){Qe(),Ze++;try{return N.createHTML(e)}finally{Ze--}},$e=function(e){Qe(),Ze++;try{return N.createScriptURL(e)}finally{Ze--}},et=function(){return Xe||=(Ye=Ue(m,i),!0),Ye},tt=n,nt=tt.implementation,rt=tt.createNodeIterator,it=tt.createDocumentFragment,at=tt.getElementsByTagName,ot=r.importNode,I=We();t.isSupported=typeof o==`function`&&typeof y==`function`&&nt&&nt.createHTMLDocument!==void 0;let st=Ee,ct=De,lt=Oe,ut=ke,dt=Ae,ft=Me,pt=Ne,mt=Fe,ht=je,L=null,gt=E({},[...he,...ge,..._e,...ye,...xe]),R=null,_t=E({},[...Se,...Ce,...we,...Te]),z=Object.seal(p(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),vt=null,yt=null,B=Object.seal(p(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),bt=!0,xt=!0,St=!1,Ct=!0,V=!1,H=!0,U=!1,wt=!1,Tt=null,Et=null,Dt=!1,W=!1,Ot=!1,kt=!1,At=!0,jt=!1,Mt=`user-content-`,Nt=!0,Pt=!1,G={},K=null,Ft=E({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),It=null,Lt=E({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Rt=null,zt=E({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Bt=`http://www.w3.org/1998/Math/MathML`,Vt=`http://www.w3.org/2000/svg`,q=`http://www.w3.org/1999/xhtml`,J=q,Ht=!1,Ut=null,Wt=E({},[Bt,Vt,q],oe),Gt=d([`mi`,`mo`,`mn`,`ms`,`mtext`]),Kt=E({},Gt),qt=d([`annotation-xml`]),Jt=E({},qt),Yt=E({},[`title`,`style`,`font`,`a`,`script`]),Xt=null,Zt=[`application/xhtml+xml`,`text/html`],Y=null,X=null,Qt=n.createElement(`form`),$t=function(e){return e instanceof RegExp||e instanceof Function},en=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(X&&X===e)return;(!e||typeof e!=`object`)&&(e={}),e=O(e),Xt=Zt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Y=Xt===`application/xhtml+xml`?oe:ae,L=M(e,`ALLOWED_TAGS`,gt,{transform:Y}),R=M(e,`ALLOWED_ATTR`,_t,{transform:Y}),Ut=M(e,`ALLOWED_NAMESPACES`,Wt,{transform:oe}),Rt=M(e,`ADD_URI_SAFE_ATTR`,zt,{transform:Y,base:zt}),It=M(e,`ADD_DATA_URI_TAGS`,Lt,{transform:Y,base:Lt}),K=M(e,`FORBID_CONTENTS`,Ft,{transform:Y}),vt=M(e,`FORBID_TAGS`,O({}),{transform:Y}),yt=M(e,`FORBID_ATTR`,O({}),{transform:Y}),G=b(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?O(e.USE_PROFILES):e.USE_PROFILES:!1,bt=e.ALLOW_ARIA_ATTR!==!1,xt=e.ALLOW_DATA_ATTR!==!1,St=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ct=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,V=e.SAFE_FOR_TEMPLATES||!1,H=e.SAFE_FOR_XML!==!1,U=e.WHOLE_DOCUMENT||!1,W=e.RETURN_DOM||!1,Ot=e.RETURN_DOM_FRAGMENT||!1,kt=e.RETURN_TRUSTED_TYPE||!1,Dt=e.FORCE_BODY||!1,At=e.SANITIZE_DOM!==!1,jt=e.SANITIZE_NAMED_PROPS||!1,Nt=e.KEEP_CONTENT!==!1,Pt=e.IN_PLACE||!1,ht=me(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:je,J=typeof e.NAMESPACE==`string`?e.NAMESPACE:q,Kt=Ge(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>E({},Gt)),Jt=Ge(e,`HTML_INTEGRATION_POINTS`,()=>E({},qt));let t=Ge(e,`CUSTOM_ELEMENT_HANDLING`,()=>p(null));if(z=p(null),b(t,`tagNameCheck`)&&$t(t.tagNameCheck)&&(z.tagNameCheck=t.tagNameCheck),b(t,`attributeNameCheck`)&&$t(t.attributeNameCheck)&&(z.attributeNameCheck=t.attributeNameCheck),b(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(z.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),f(z),V&&(xt=!1),Ot&&(W=!0),G&&(L=E({},xe),R=p(null),G.html===!0&&(E(L,he),E(R,Se)),G.svg===!0&&(E(L,ge),E(R,Ce),E(R,Te)),G.svgFilters===!0&&(E(L,_e),E(R,Ce),E(R,Te)),G.mathMl===!0&&(E(L,ye),E(R,we),E(R,Te))),B.tagCheck=null,B.attributeCheck=null,b(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?B.tagCheck=e.ADD_TAGS:_(e.ADD_TAGS)&&(L===gt&&(L=O(L)),E(L,e.ADD_TAGS,Y))),b(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?B.attributeCheck=e.ADD_ATTR:_(e.ADD_ATTR)&&(R===_t&&(R=O(R)),E(R,e.ADD_ATTR,Y))),b(e,`ADD_FORBID_CONTENTS`)&&_(e.ADD_FORBID_CONTENTS)&&(K===Ft&&(K=O(K)),E(K,e.ADD_FORBID_CONTENTS,Y)),Nt&&(L[`#text`]=!0),U&&E(L,[`html`,`head`,`body`]),L.table&&(E(L,[`tbody`]),delete vt.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw C(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw C(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=N;N=e.TRUSTED_TYPES_POLICY;try{P=F(``)}catch(e){throw N=t,e}}else e.TRUSTED_TYPES_POLICY===null?(N=void 0,P=``):(N===void 0&&(N=et()),N&&typeof P==`string`&&(P=F(``)));d&&d(e),X=e},tn=E({},[...ge,..._e,...ve]),nn=E({},[...ye,...be]),rn=function(e,t,n){return t.namespaceURI===q?e===`svg`:t.namespaceURI===Bt?e===`svg`&&(n===`annotation-xml`||Kt[n]):!!tn[e]},an=function(e,t,n){return t.namespaceURI===q?e===`math`:t.namespaceURI===Vt?e===`math`&&Jt[n]:!!nn[e]},on=function(e,t,n){return t.namespaceURI===Vt&&!Jt[n]||t.namespaceURI===Bt&&!Kt[n]?!1:!nn[e]&&(Yt[e]||!tn[e])},sn=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:J,tagName:`template`});let n=ae(e.tagName),r=ae(t.tagName);return Ut[e.namespaceURI]?e.namespaceURI===Vt?rn(n,t,r):e.namespaceURI===Bt?an(n,t,r):e.namespaceURI===q?on(n,t,r):!!(Xt===`application/xhtml+xml`&&Ut[e.namespaceURI]):!1},Z=function(e){re(t.removed,{element:e});try{y(e).removeChild(e)}catch{if(de(e),!y(e))throw C(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},cn=function(e,t,n){try{e.removeAttributeNode(t)}catch{try{e.removeAttribute(n)}catch{}}},ln=function(e){dn(e);let t=v(e);if(t){let e=[];g(t,t=>{re(e,t)}),g(e,e=>{try{de(e)}catch{}})}let n=w(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&cn(e,r,i)}},Q=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}re(t.removed,{attribute:r||null,from:n});try{r?n.removeAttributeNode(r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(W||Ot)try{Z(n)}catch{}else try{n.setAttribute(e,``)}catch{}},un=function(e){let t=w(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||R[Y(i)]||cn(e,r,i)}},dn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();qe(e)===A.element&&un(e);let n=v(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},fn=function(e,t){return H?e===`patchsrc`?!0:e===`for`&&t!==`label`&&t!==`output`:!1},pn=function(e){if(!H)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=qe(e);if(n===A.processingInstruction||n===A.comment&&S(Le,e.data)){try{de(e)}catch{}continue}if(n===A.element){let t=e,n=Y(Je(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&fn(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=v(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},mn=function(e){let t=null,r=null;if(Dt)e=``+e;else{let t=se(e,/^[\r\n\t ]+/);r=t&&t[0]}Xt===`application/xhtml+xml`&&J===q&&(e=``+e+``);let i=N?F(e):e;if(J===q)try{t=new u().parseFromString(i,Xt)}catch{}if(!t||!t.documentElement){t=nt.createDocument(J,`template`,null);try{t.documentElement.innerHTML=Ht?P:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),J===q?at.call(t,U?`html`:`body`)[0]:U?t.documentElement:a},hn=function(e){let t=j?j(e):e.ownerDocument;return rt.call(t||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},gn=function(e){return e=ce(e,st,` `),e=ce(e,ct,` `),e=ce(e,lt,` `),e},_n=function(e){e.normalize();let t=j?j(e):e.ownerDocument,n=rt.call(t||e,e,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=gn(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&g(i,e=>{yn(e.content)&&_n(e.content)})},vn=function(e){let t=D?D(e):null;return typeof t!=`string`||Y(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==w(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==T(e)||e.childNodes!==v(e)},yn=function(e){if(!T||typeof e!=`object`||!e)return!1;try{return T(e)===A.documentFragment}catch{return!1}},bn=function(e){if(!T||typeof e!=`object`||!e)return!1;try{return typeof T(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&g(e,e=>{e.call(t,n,r,X)})}let xn=function(e,t){return!!(H&&e.hasChildNodes()&&!bn(e.firstElementChild)&&S(Ie,e.textContent)&&S(Ie,e.innerHTML)||H&&e.namespaceURI===q&&Be[t]&&(bn(e.firstElementChild)||typeof e.textContent==`string`&&S(Ve[t],e.textContent))||e.nodeType===A.processingInstruction||H&&e.nodeType===A.comment&&S(Le,e.data))},Sn=function(e,t){return e instanceof RegExp?S(e,t):e instanceof Function?!!e(t,...[...arguments].slice(2)):!1},Cn=function(e,t,n){if(!vt[t]&&kn(t)&&Sn(z.tagNameCheck,t))return!1;if(Nt&&!K[t]){let t=y(e),r=v(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?ee(r[a],!0):r[a];t.insertBefore(i,fe(e))}}}return Z(e),!0},wn=function(e,t,n,r){return e.length===0?t:t===n||t===r?O(t):t},Tn=function(e,t){return e===t||y(e)!==null?!1:(Pt&&dn(e),!0)},En=function(e,n){if($(I.beforeSanitizeElements,e,null),Tn(e,n))return!0;if(vn(e))return Z(e),!0;let r=Y(Je(e));if(L=wn(I.uponSanitizeElement,L,gt,Tt),$(I.uponSanitizeElement,e,{tagName:r,allowedTags:L}),Tn(e,n))return!0;if(xn(e,r))return Z(e),!0;if(vt[r]||!(B.tagCheck instanceof Function&&B.tagCheck(r))&&!L[r]){let t=Cn(e,r,n);return t===!1&&$(I.afterSanitizeElements,e,null),t}if(qe(e)===A.element&&!sn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&S(Re,e.innerHTML))return Z(e),!0;if(V&&e.nodeType===A.text){let n=gn(e.textContent);e.textContent!==n&&(re(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(I.afterSanitizeElements,e,null),!1},Dn=function(e,t,r){if(yt[t]||fn(t,e)||At&&(t===`id`||t===`name`)&&(r in n||r in Qt))return!1;let i=R[t]||B.attributeCheck instanceof Function&&B.attributeCheck(t,e);return xt&&S(ut,t)||bt&&S(dt,t)?!0:i?Rt[t]||S(ht,ce(r,pt,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&le(r,`data:`)===0&&It[e]||St&&!S(ft,ce(r,pt,``))?!0:!r:kn(e)&&Sn(z.tagNameCheck,e)&&Sn(z.attributeNameCheck,t,e)||t===`is`&&z.allowCustomizedBuiltInElements&&Sn(z.tagNameCheck,r)},On=E({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),kn=function(e){return!On[ae(e)]&&S(mt,e)},An=function(e,t,n,r){if(N&&typeof m==`object`&&typeof m.getAttributeType==`function`&&!n)switch(m.getAttributeType(e,t)){case`TrustedHTML`:return F(r);case`TrustedScriptURL`:return $e(r)}return r},jn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),vn(e)?Z(e):ne(t.removed)}catch{Q(n,e)}},Mn=function(e){$(I.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||vn(e))return;R=wn(I.uponSanitizeAttribute,R,_t,Et);let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0},r=t.length,i=Y(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=Y(o),u=c,d=o===`value`?u:ue(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,$(I.uponSanitizeAttribute,e,n),d=n.attrValue,jt&&(l===`id`||l===`name`)&&le(d,Mt)!==0&&(Q(o,e,a),d=Mt+d),H&&S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Q(o,e,a);continue}if(l===`attributename`&&se(d,`href`)){Q(o,e,a);continue}if(!n.forceKeepAttr){if(!n.keepAttr){Q(o,e,a);continue}if(!Ct&&S(ze,d)){Q(o,e,a);continue}if(V&&(d=gn(d)),!Dn(i,l,d)){Q(o,e,a);continue}d=An(i,l,s,d),d!==u&&jn(e,o,s,d)}}$(I.afterSanitizeAttributes,e,null)},Nn=function(e){let t=null,n=hn(e);for($(I.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(I.uponSanitizeShadowNode,t,null),En(t,e),Mn(t),yn(t.content)&&Nn(t.content),qe(t)===A.element){let e=x(t);yn(e)&&(Pn(e),Nn(e))}$(I.afterSanitizeShadowDOM,e,null)},Pn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Nn(e.shadow);continue}let n=e.node,r=qe(n)===A.element,i=v(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=D?D(n):null;if(typeof e==`string`&&Y(e)===`template`){let e=n.content;yn(e)&&t.push({node:e,shadow:null})}}if(r){let e=x(n);yn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ht=!e,Ht&&(e=``),typeof e!=`string`&&!bn(e)&&(e=pe(e),typeof e!=`string`))throw C(`dirty is not a string, aborting`);if(!t.isSupported)return e;wt?(L=Tt,R=Et):en(n),(I.uponSanitizeElement.length>0||I.uponSanitizeAttribute.length>0)&&(L=O(L)),I.uponSanitizeAttribute.length>0&&(R=O(R)),t.removed=[];let c=Pt&&typeof e!=`string`&&bn(e);if(c){pn(e);let t=Je(e);if(typeof t==`string`){let n=Y(t);if(!L[n]||vt[n])throw ln(e),C(`root node is forbidden and cannot be sanitized in-place`)}if(vn(e))throw ln(e),C(`root node is clobbered and cannot be sanitized in-place`);try{Pn(e)}catch(t){throw ln(e),t}}else if(bn(e))i=mn(``),a=i.ownerDocument.importNode(e,!0),a.nodeType===A.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Pn(a);else{if(!W&&!V&&!U&&e.indexOf(`<`)===-1)return N&&kt?F(e):e;if(i=mn(e),!i)return W?null:kt?P:``}i&&Dt&&Z(i.firstChild);let l=c?e:i;try{let e=hn(l);for(;o=e.nextNode();)En(o,l),Mn(o),yn(o.content)&&Nn(o.content)}catch(n){throw c&&(ln(e),g(t.removed,e=>{e.element&&dn(e.element)})),n}if(c)return g(t.removed,e=>{e.element&&dn(e.element)}),V&&_n(e),e;if(W){if(V&&_n(i),Ot)for(s=it.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(R.shadowroot||R.shadowrootmode)&&(s=ot.call(r,s,!0)),s}let u=U?i.outerHTML:i.innerHTML;return U&&L[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&S(Pe,i.ownerDocument.doctype.name)&&(u=` -`+u),V&&(u=gn(u)),N&&kt?F(u):u},t.setConfig=function(){en(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),wt=!0,Tt=L,Et=R},t.clearConfig=function(){X=null,wt=!1,Tt=null,Et=null,N=Ye,P=``},t.isValidAttribute=function(e,t,n){return X||en({}),Dn(Y(e),Y(t),n)},t.addHook=function(e,t){typeof t==`function`&&b(I,e)&&re(I[e],t)},t.removeHook=function(e,t){if(b(I,e)){if(t!==void 0){let n=te(I[e],t);return n===-1?void 0:ie(I[e],n,1)[0]}return ne(I[e])}},t.removeHooks=function(e){b(I,e)&&(I[e]=[])},t.removeAllHooks=function(){I=We()},t}var qe=Ke();export{qe as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/purify.es-F_7NWVtX.js b/apps/pythinker-code/dist-web/assets/purify.es-F_7NWVtX.js new file mode 100644 index 000000000..b22c6e01c --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/purify.es-F_7NWVtX.js @@ -0,0 +1,3 @@ +function e(e,t){this.v=e,this.k=t}function t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n`u`?null:w(BigInt.prototype.toString),me=typeof Symbol>`u`?null:w(Symbol.prototype.toString),b=w(Object.prototype.hasOwnProperty),x=w(Object.prototype.toString),S=w(RegExp.prototype.test),C=T(TypeError);function w(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return te(e,t,n)}}function T(e){return function(){return ne(e,[...arguments])}}function E(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:se;if(l&&l(e,null),!_(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(u(t)||(t[r]=e),i=e)}e[i]=!0}return e}function he(e){for(let t=0;t/g),je=m(/\${[\w\W]*/g),Me=m(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ne=m(/^aria-[\-\w]+$/),Pe=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Fe=m(/^(?:\w+script|data):/i),Ie=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Le=m(/^html$/i),Re=m(/^[a-z][.\w]*(-[.\w]+)+$/i),ze=m(/<[/\w!]/g),Be=m(/<[/\w]/g),Ve=m(/<\/no(script|embed|frames)/i),He=m(/\/>/i),k={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},A=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],Ue=p(E({},A)),We=function(){let e={};return g(A,t=>{e[t]=m(RegExp(`])`,`i`))}),p(e)}(),Ge=function(){return typeof window>`u`?null:window},Ke=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},qe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},j=function(e,t,n,r){return b(e,t)&&_(e[t])?E(r.base?D(r.base):{},e[t],r.transform):n},Je=function(e,t,n){let r=b(e,t)?e[t]:void 0;return r&&typeof r==`object`?D(r):n()};function Ye(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ge(),t=e=>Ye(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==k.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,d=e.trustedTypes,f=s.prototype,ee=O(f,`cloneNode`),te=O(f,`remove`),ne=O(f,`removeAttributeNode`),pe=O(f,`nextSibling`),v=O(f,`childNodes`),y=O(f,`parentNode`),me=O(f,`shadowRoot`),x=O(f,`attributes`),w=o&&o.prototype?O(o.prototype,`nodeType`):null,T=o&&o.prototype?O(o.prototype,`nodeName`):null,he=o&&o.prototype?O(o.prototype,`ownerDocument`):null,A=function(e){return w?w(e):e.nodeType},Xe=function(e){return T?T(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let M,N=``,Ze,Qe=!1,$e=0,et=function(){if($e>0)throw C(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},P=function(e){et(),$e++;try{return M.createHTML(e)}finally{$e--}},tt=function(e){et(),$e++;try{return M.createScriptURL(e)}finally{$e--}},nt=function(){return Qe||=(Ze=Ke(d,i),!0),Ze},rt=n,it=rt.implementation,at=rt.createNodeIterator,ot=rt.createDocumentFragment,st=rt.getElementsByTagName,ct=r.importNode,F=qe();t.isSupported=typeof c==`function`&&typeof y==`function`&&it&&it.createHTMLDocument!==void 0;let lt=ke,ut=Ae,dt=je,ft=Me,pt=Ne,mt=Fe,ht=Ie,gt=Re,_t=Pe,I=null,vt=E({},[...ve,...ye,...be,...Se,...we]),L=null,yt=E({},[...Te,...Ee,...De,...Oe]),R=Object.seal(h(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),bt=null,xt=null,z=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),St=!0,Ct=!0,wt=!1,Tt=!0,B=!1,V=!0,H=!1,Et=!1,Dt=null,Ot=null,kt=!1,U=!1,At=!1,jt=!1,Mt=!0,Nt=!1,Pt=`user-content-`,Ft=!0,It=!1,W={},G=null,Lt=E({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Rt=null,zt=E({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Bt=null,Vt=E({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ht=`http://www.w3.org/1998/Math/MathML`,Ut=`http://www.w3.org/2000/svg`,K=`http://www.w3.org/1999/xhtml`,q=K,Wt=!1,Gt=null,Kt=E({},[Ht,Ut,K],ce),qt=p([`mi`,`mo`,`mn`,`ms`,`mtext`]),Jt=E({},qt),Yt=p([`annotation-xml`]),Xt=E({},Yt),Zt=E({},[`title`,`style`,`font`,`a`,`script`]),Qt=null,$t=[`application/xhtml+xml`,`text/html`],J=null,Y=null,en=n.createElement(`form`),tn=function(e){return e instanceof RegExp||e instanceof Function},nn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Y&&Y===e)return;(!e||typeof e!=`object`)&&(e={}),e=D(e),Qt=$t.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,J=Qt===`application/xhtml+xml`?ce:se,I=j(e,`ALLOWED_TAGS`,vt,{transform:J}),L=j(e,`ALLOWED_ATTR`,yt,{transform:J}),Gt=j(e,`ALLOWED_NAMESPACES`,Kt,{transform:ce}),Bt=j(e,`ADD_URI_SAFE_ATTR`,Vt,{transform:J,base:Vt}),Rt=j(e,`ADD_DATA_URI_TAGS`,zt,{transform:J,base:zt}),G=j(e,`FORBID_CONTENTS`,Lt,{transform:J}),bt=j(e,`FORBID_TAGS`,D({}),{transform:J}),xt=j(e,`FORBID_ATTR`,D({}),{transform:J}),W=b(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?D(e.USE_PROFILES):e.USE_PROFILES:!1,St=e.ALLOW_ARIA_ATTR!==!1,Ct=e.ALLOW_DATA_ATTR!==!1,wt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Tt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,B=e.SAFE_FOR_TEMPLATES||!1,V=e.SAFE_FOR_XML!==!1,H=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,At=e.RETURN_DOM_FRAGMENT||!1,jt=e.RETURN_TRUSTED_TYPE||!1,kt=e.FORCE_BODY||!1,Mt=e.SANITIZE_DOM!==!1,Nt=e.SANITIZE_NAMED_PROPS||!1,Ft=e.KEEP_CONTENT!==!1,It=e.IN_PLACE||!1,_t=_e(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Pe,q=typeof e.NAMESPACE==`string`?e.NAMESPACE:K,Jt=Je(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>E({},qt)),Xt=Je(e,`HTML_INTEGRATION_POINTS`,()=>E({},Yt));let t=Je(e,`CUSTOM_ELEMENT_HANDLING`,()=>h(null));if(R=h(null),b(t,`tagNameCheck`)&&tn(t.tagNameCheck)&&(R.tagNameCheck=t.tagNameCheck),b(t,`attributeNameCheck`)&&tn(t.attributeNameCheck)&&(R.attributeNameCheck=t.attributeNameCheck),b(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(R.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),m(R),B&&(Ct=!1),At&&(U=!0),W&&(I=E({},we),L=h(null),W.html===!0&&(E(I,ve),E(L,Te)),W.svg===!0&&(E(I,ye),E(L,Ee),E(L,Oe)),W.svgFilters===!0&&(E(I,be),E(L,Ee),E(L,Oe)),W.mathMl===!0&&(E(I,Se),E(L,De),E(L,Oe))),z.tagCheck=null,z.attributeCheck=null,b(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?z.tagCheck=e.ADD_TAGS:_(e.ADD_TAGS)&&(I===vt&&(I=D(I)),E(I,e.ADD_TAGS,J))),b(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?z.attributeCheck=e.ADD_ATTR:_(e.ADD_ATTR)&&(L===yt&&(L=D(L)),E(L,e.ADD_ATTR,J))),b(e,`ADD_FORBID_CONTENTS`)&&_(e.ADD_FORBID_CONTENTS)&&(G===Lt&&(G=D(G)),E(G,e.ADD_FORBID_CONTENTS,J)),Ft&&(I[`#text`]=!0),H&&E(I,[`html`,`head`,`body`]),I.table&&(E(I,[`tbody`]),delete bt.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw C(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw C(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=M;M=e.TRUSTED_TYPES_POLICY;try{N=P(``)}catch(e){throw M=t,e}}else e.TRUSTED_TYPES_POLICY===null?(M=void 0,N=``):(M===void 0&&(M=nt()),M&&typeof N==`string`&&(N=P(``)));p&&p(e),Y=e},rn=E({},[...ye,...be,...xe]),an=E({},[...Se,...Ce]),on=function(e,t,n){return t.namespaceURI===K?e===`svg`:t.namespaceURI===Ht?e===`svg`&&(n===`annotation-xml`||Jt[n]):!!rn[e]},sn=function(e,t,n){return t.namespaceURI===K?e===`math`:t.namespaceURI===Ut?e===`math`&&Xt[n]:!!an[e]},cn=function(e,t,n){return t.namespaceURI===Ut&&!Xt[n]||t.namespaceURI===Ht&&!Jt[n]?!1:!an[e]&&(Zt[e]||!rn[e])},ln=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:q,tagName:`template`});let n=se(e.tagName),r=se(t.tagName);return Gt[e.namespaceURI]?e.namespaceURI===Ut?on(n,t,r):e.namespaceURI===Ht?sn(n,t,r):e.namespaceURI===K?cn(n,t,r):!!(Qt===`application/xhtml+xml`&&Gt[e.namespaceURI]):!1},X=function(e){ae(t.removed,{element:e});try{y(e).removeChild(e)}catch{if(te(e),!y(e))throw C(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},un=function(e,t,n){try{ne(e,t)}catch{try{e.removeAttribute(n)}catch{}}},dn=function(e){pn(e);let t=v(e);if(t){let e=[];g(t,t=>{ae(e,t)}),g(e,e=>{try{te(e)}catch{}})}let n=x(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&un(e,r,i)}},Z=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}ae(t.removed,{attribute:r||null,from:n});try{r?ne(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(U||At)try{X(n)}catch{}else try{n.setAttribute(e,``)}catch{}},fn=function(e){let t=x(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||L[J(i)]||un(e,r,i)}},pn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();A(e)===k.element&&fn(e);let n=v(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},mn=function(e,t){return V?e===`patchsrc`?!0:e===`for`&&t!==`label`&&t!==`output`:!1},hn=function(e){if(!V)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=A(e);if(n===k.processingInstruction||n===k.comment&&S(Be,e.data)){try{te(e)}catch{}continue}if(n===k.element){let t=e,n=J(Xe(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&mn(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=v(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},gn=function(e){let t=null,r=null;if(kt)e=``+e;else{let t=le(e,/^[\r\n\t ]+/);r=t&&t[0]}Qt===`application/xhtml+xml`&&q===K&&(e=``+e+``);let i=M?P(e):e;if(q===K)try{t=new u().parseFromString(i,Qt)}catch{}if(!t||!t.documentElement){t=it.createDocument(q,`template`,null);try{t.documentElement.innerHTML=Wt?N:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),q===K?st.call(t,H?`html`:`body`)[0]:H?t.documentElement:a},_n=function(e){let t=he?he(e):e.ownerDocument;return at.call(t||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},vn=function(e){return e=ue(e,lt,` `),e=ue(e,ut,` `),e=ue(e,dt,` `),e},yn=function(e){e.normalize();let t=he?he(e):e.ownerDocument,n=at.call(t||e,e,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=vn(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&g(i,e=>{xn(e.content)&&yn(e.content)})},bn=function(e){let t=T?T(e):null;return typeof t!=`string`||J(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==x(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==w(e)||e.childNodes!==v(e)},xn=function(e){if(!w||typeof e!=`object`||!e)return!1;try{return w(e)===k.documentFragment}catch{return!1}},Sn=function(e){if(!w||typeof e!=`object`||!e)return!1;try{return typeof w(e)==`number`}catch{return!1}};function Q(e,n,r){e.length!==0&&g(e,e=>{e.call(t,n,r,Y)})}let Cn=function(e,t){return!!(V&&e.hasChildNodes()&&!Sn(e.firstElementChild)&&S(ze,e.textContent)&&S(ze,e.innerHTML)||V&&e.namespaceURI===K&&Ue[t]&&(Sn(e.firstElementChild)||typeof e.textContent==`string`&&S(We[t],e.textContent))||e.nodeType===k.processingInstruction||V&&e.nodeType===k.comment&&S(Be,e.data))},wn=function(e,t){return e instanceof RegExp?S(e,t):e instanceof Function?!!e(t,...[...arguments].slice(2)):!1},Tn=function(e,t,n){if(!bt[t]&&An(t)&&wn(R.tagNameCheck,t))return!1;if(Ft&&!G[t]){let t=y(e),r=v(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?ee(r[a],!0):r[a];t.insertBefore(i,pe(e))}}}return X(e),!0},En=function(e,t,n,r){return e.length===0?t:t===n||t===r?D(t):t},$=function(e,t){return e===t||y(e)!==null?!1:(It&&pn(e),!0)},Dn=function(e,n){if(Q(F.beforeSanitizeElements,e,null),$(e,n))return!0;if(bn(e))return X(e),!0;let r=J(Xe(e));if(I=En(F.uponSanitizeElement,I,vt,Dt),Q(F.uponSanitizeElement,e,{tagName:r,allowedTags:I}),$(e,n))return!0;if(Cn(e,r))return X(e),!0;if(bt[r]||!(z.tagCheck instanceof Function&&z.tagCheck(r))&&!I[r]){let t=Tn(e,r,n);return t===!1&&(Q(F.afterSanitizeElements,e,null),$(e,n))?!0:t}if(A(e)===k.element&&!ln(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&S(Ve,e.innerHTML))return X(e),!0;if(B&&e.nodeType===k.text){let n=vn(e.textContent);e.textContent!==n&&(ae(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Q(F.afterSanitizeElements,e,null),$(e,n)},On=function(e,t,r){if(xt[t]||mn(t,e)||Mt&&(t===`id`||t===`name`)&&(r in n||r in en))return!1;let i=L[t]||z.attributeCheck instanceof Function&&z.attributeCheck(t,e);return Ct&&S(ft,t)||St&&S(pt,t)?!0:i?Bt[t]||S(_t,ue(r,ht,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&de(r,`data:`)===0&&Rt[e]||wt&&!S(mt,ue(r,ht,``))?!0:!r:An(e)&&wn(R.tagNameCheck,e)&&wn(R.attributeNameCheck,t,e)||t===`is`&&R.allowCustomizedBuiltInElements&&wn(R.tagNameCheck,r)},kn=E({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),An=function(e){return!kn[se(e)]&&S(gt,e)},jn=function(e,t,n,r){if(M&&typeof d==`object`&&typeof d.getAttributeType==`function`&&!n)switch(d.getAttributeType(e,t)){case`TrustedHTML`:return P(r);case`TrustedScriptURL`:return tt(r)}return r},Mn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),bn(e)?(X(e),!1):!0}catch{return Z(t,e),!1}},Nn=function(e,n){if(Q(F.beforeSanitizeAttributes,e,null),$(e,n))return;let r=e.attributes;if(!r||bn(e))return;L=En(F.uponSanitizeAttribute,L,yt,Ot);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0},a=r.length,o=J(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=J(s),d=l,f=s===`value`?d:fe(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Q(F.uponSanitizeAttribute,e,i),f=i.attrValue,Nt&&(u===`id`||u===`name`)&&de(f,Pt)!==0&&(Z(s,e,n),f=Pt+f,p=!0),V&&S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Z(s,e,n);continue}if(u===`attributename`&&le(f,`href`)){Z(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){Z(s,e,n);continue}if(!Tt&&S(He,f)){Z(s,e,n);continue}if(B&&(f=vn(f)),!On(o,u,f)){Z(s,e,n);continue}f=jn(o,u,c,f),f!==d&&Mn(e,s,c,f)&&p&&ie(t.removed)}}Q(F.afterSanitizeAttributes,e,null),$(e,n)},Pn=function(e){let t=null,n=_n(e);for(Q(F.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Q(F.uponSanitizeShadowNode,t,null),Dn(t,e),Nn(t,e),xn(t.content)&&Pn(t.content),A(t)===k.element){let e=me(t);xn(e)&&(Fn(e),Pn(e))}Q(F.afterSanitizeShadowDOM,e,null)},Fn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Pn(e.shadow);continue}let n=e.node,r=A(n)===k.element,i=v(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=T?T(n):null;if(typeof e==`string`&&J(e)===`template`){let e=n.content;xn(e)&&t.push({node:e,shadow:null})}}if(r){let e=me(n);xn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Wt=!e,Wt&&(e=``),typeof e!=`string`&&!Sn(e)&&(e=ge(e),typeof e!=`string`))throw C(`dirty is not a string, aborting`);if(!t.isSupported)return e;Et?(I=Dt,L=Ot):nn(n),(F.uponSanitizeElement.length>0||F.uponSanitizeAttribute.length>0)&&(I=D(I)),F.uponSanitizeAttribute.length>0&&(L=D(L)),t.removed=[];let c=It&&typeof e!=`string`&&Sn(e);if(c){hn(e);let t=Xe(e);if(typeof t==`string`){let n=J(t);if(!I[n]||bt[n])throw dn(e),C(`root node is forbidden and cannot be sanitized in-place`)}if(bn(e))throw dn(e),C(`root node is clobbered and cannot be sanitized in-place`);try{Fn(e)}catch(t){throw dn(e),t}}else if(Sn(e))i=gn(``),a=i.ownerDocument.importNode(e,!0),a.nodeType===k.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Fn(i);else{if(!U&&!B&&!H&&e.indexOf(`<`)===-1)return M&&jt?P(e):e;if(i=gn(e),!i)return U?null:jt?N:``}i&&kt&&X(i.firstChild);let l=c?e:i;try{let e=_n(l);for(;o=e.nextNode();)Dn(o,l),Nn(o,l),xn(o.content)&&Pn(o.content)}catch(n){throw c&&(dn(e),g(t.removed,e=>{e.element&&pn(e.element)})),n}if(c){let n=!1;if(g(t.removed,t=>{t.element&&(t.element===e&&(n=!0),pn(t.element))}),n)throw C(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return B&&yn(e),e}if(U){if(B&&yn(i),At)for(s=ot.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(L.shadowroot||L.shadowrootmode)&&(s=ct.call(r,s,!0)),s}let u=H?i.outerHTML:i.innerHTML;return H&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&S(Le,i.ownerDocument.doctype.name)&&(u=` +`+u),B&&(u=vn(u)),M&&jt?P(u):u},t.setConfig=function(){nn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Et=!0,Dt=I,Ot=L},t.clearConfig=function(){Y=null,Et=!1,Dt=null,Ot=null,M=Ze,N=``},t.isValidAttribute=function(e,t,n){return Y||nn({}),On(J(e),J(t),n)},t.addHook=function(e,t){typeof t==`function`&&b(F,e)&&ae(F[e],t)},t.removeHook=function(e,t){if(b(F,e)){if(t!==void 0){let n=re(F[e],t);return n===-1?void 0:oe(F[e],n,1)[0]}return ie(F[e])}},t.removeHooks=function(e){b(F,e)&&(F[e]=[])},t.removeAllHooks=function(){F=qe()},t}var Xe=Ye();export{Xe as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/python-sbAT-96o.js b/apps/pythinker-code/dist-web/assets/python-LA0u3Sgx.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/python-sbAT-96o.js rename to apps/pythinker-code/dist-web/assets/python-LA0u3Sgx.js index 4588c6182..3d7ddda17 100644 --- a/apps/pythinker-code/dist-web/assets/python-sbAT-96o.js +++ b/apps/pythinker-code/dist-web/assets/python-LA0u3Sgx.js @@ -1 +1 @@ -import{h as e}from"./editor.api2-BIJacb07.js";var t={comments:{lineComment:`#`,blockComment:[`'''`,`'''`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$`),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:RegExp(`^\\s*#region\\b`),end:RegExp(`^\\s*#endregion\\b`)}}},n={defaultToken:``,tokenPostfix:`.python`,keywords:`False.None.True._.and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.exec.finally.for.from.global.if.import.in.is.lambda.match.nonlocal.not.or.pass.print.raise.return.try.type.while.with.yield.int.float.long.complex.hex.abs.all.any.apply.basestring.bin.bool.buffer.bytearray.callable.chr.classmethod.cmp.coerce.compile.complex.delattr.dict.dir.divmod.enumerate.eval.execfile.file.filter.format.frozenset.getattr.globals.hasattr.hash.help.id.input.intern.isinstance.issubclass.iter.len.locals.list.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.reversed.range.raw_input.reduce.reload.repr.reversed.round.self.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.unichr.unicode.vars.xrange.zip.__dict__.__methods__.__members__.__class__.__bases__.__name__.__mro__.__subclasses__.__init__.__import__`.split(`.`),brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.bracket`},{open:`(`,close:`)`,token:`delimiter.parenthesis`}],tokenizer:{root:[{include:`@whitespace`},{include:`@numbers`},{include:`@strings`},[/[,:;]/,`delimiter`],[/[{}\[\]()]/,`@brackets`],[/@[a-zA-Z_]\w*/,`tag`],[/[a-zA-Z_]\w*/,{cases:{"@keywords":`keyword`,"@default":`identifier`}}]],whitespace:[[/\s+/,`white`],[/(^#.*$)/,`comment`],[/'''/,`string`,`@endDocString`],[/"""/,`string`,`@endDblDocString`]],endDocString:[[/[^']+/,`string`],[/\\'/,`string`],[/'''/,`string`,`@popall`],[/'/,`string`]],endDblDocString:[[/[^"]+/,`string`],[/\\"/,`string`],[/"""/,`string`,`@popall`],[/"/,`string`]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,`number.hex`],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,`number`]],strings:[[/'$/,`string.escape`,`@popall`],[/f'{1,3}/,`string.escape`,`@fStringBody`],[/'/,`string.escape`,`@stringBody`],[/"$/,`string.escape`,`@popall`],[/f"{1,3}/,`string.escape`,`@fDblStringBody`],[/"/,`string.escape`,`@dblStringBody`]],fStringBody:[[/[^\\'\{\}]+$/,`string`,`@popall`],[/[^\\'\{\}]+/,`string`],[/\{[^\}':!=]+/,`identifier`,`@fStringDetail`],[/\\./,`string`],[/'/,`string.escape`,`@popall`],[/\\$/,`string`]],stringBody:[[/[^\\']+$/,`string`,`@popall`],[/[^\\']+/,`string`],[/\\./,`string`],[/'/,`string.escape`,`@popall`],[/\\$/,`string`]],fDblStringBody:[[/[^\\"\{\}]+$/,`string`,`@popall`],[/[^\\"\{\}]+/,`string`],[/\{[^\}':!=]+/,`identifier`,`@fStringDetail`],[/\\./,`string`],[/"/,`string.escape`,`@popall`],[/\\$/,`string`]],dblStringBody:[[/[^\\"]+$/,`string`,`@popall`],[/[^\\"]+/,`string`],[/\\./,`string`],[/"/,`string.escape`,`@popall`],[/\\$/,`string`]],fStringDetail:[[/[:][^}]+/,`string`],[/[!][ars]/,`string`],[/=/,`string`],[/\}/,`identifier`,`@pop`]]}};export{t as conf,n as language}; \ No newline at end of file +import{h as e}from"./editor.api2-DVs509bq.js";var t={comments:{lineComment:`#`,blockComment:[`'''`,`'''`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$`),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:RegExp(`^\\s*#region\\b`),end:RegExp(`^\\s*#endregion\\b`)}}},n={defaultToken:``,tokenPostfix:`.python`,keywords:`False.None.True._.and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.exec.finally.for.from.global.if.import.in.is.lambda.match.nonlocal.not.or.pass.print.raise.return.try.type.while.with.yield.int.float.long.complex.hex.abs.all.any.apply.basestring.bin.bool.buffer.bytearray.callable.chr.classmethod.cmp.coerce.compile.complex.delattr.dict.dir.divmod.enumerate.eval.execfile.file.filter.format.frozenset.getattr.globals.hasattr.hash.help.id.input.intern.isinstance.issubclass.iter.len.locals.list.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.reversed.range.raw_input.reduce.reload.repr.reversed.round.self.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.unichr.unicode.vars.xrange.zip.__dict__.__methods__.__members__.__class__.__bases__.__name__.__mro__.__subclasses__.__init__.__import__`.split(`.`),brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.bracket`},{open:`(`,close:`)`,token:`delimiter.parenthesis`}],tokenizer:{root:[{include:`@whitespace`},{include:`@numbers`},{include:`@strings`},[/[,:;]/,`delimiter`],[/[{}\[\]()]/,`@brackets`],[/@[a-zA-Z_]\w*/,`tag`],[/[a-zA-Z_]\w*/,{cases:{"@keywords":`keyword`,"@default":`identifier`}}]],whitespace:[[/\s+/,`white`],[/(^#.*$)/,`comment`],[/'''/,`string`,`@endDocString`],[/"""/,`string`,`@endDblDocString`]],endDocString:[[/[^']+/,`string`],[/\\'/,`string`],[/'''/,`string`,`@popall`],[/'/,`string`]],endDblDocString:[[/[^"]+/,`string`],[/\\"/,`string`],[/"""/,`string`,`@popall`],[/"/,`string`]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,`number.hex`],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,`number`]],strings:[[/'$/,`string.escape`,`@popall`],[/f'{1,3}/,`string.escape`,`@fStringBody`],[/'/,`string.escape`,`@stringBody`],[/"$/,`string.escape`,`@popall`],[/f"{1,3}/,`string.escape`,`@fDblStringBody`],[/"/,`string.escape`,`@dblStringBody`]],fStringBody:[[/[^\\'\{\}]+$/,`string`,`@popall`],[/[^\\'\{\}]+/,`string`],[/\{[^\}':!=]+/,`identifier`,`@fStringDetail`],[/\\./,`string`],[/'/,`string.escape`,`@popall`],[/\\$/,`string`]],stringBody:[[/[^\\']+$/,`string`,`@popall`],[/[^\\']+/,`string`],[/\\./,`string`],[/'/,`string.escape`,`@popall`],[/\\$/,`string`]],fDblStringBody:[[/[^\\"\{\}]+$/,`string`,`@popall`],[/[^\\"\{\}]+/,`string`],[/\{[^\}':!=]+/,`identifier`,`@fStringDetail`],[/\\./,`string`],[/"/,`string.escape`,`@popall`],[/\\$/,`string`]],dblStringBody:[[/[^\\"]+$/,`string`,`@popall`],[/[^\\"]+/,`string`],[/\\./,`string`],[/"/,`string.escape`,`@popall`],[/\\$/,`string`]],fStringDetail:[[/[:][^}]+/,`string`],[/[!][ars]/,`string`],[/=/,`string`],[/\}/,`identifier`,`@pop`]]}};export{t as conf,n as language}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-BNpfC5Ib.js b/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-C64lfmec.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-BNpfC5Ib.js rename to apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-C64lfmec.js index 186d3997b..3cb9bbf45 100644 --- a/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-BNpfC5Ib.js +++ b/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-C64lfmec.js @@ -1,4 +1,4 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as r,H as i,K as a,U as o,a as s,c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as h}from"./linear-BdNtkfoP.js";var g=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],de=[1,77],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,91],U=[1,92],W=[1,93],G=[1,100],K=[1,94],q=[1,97],J=[1,95],Y=[1,96],X=[1,98],Z=[1,99],fe=[1,103],pe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],me={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[{18:t,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:t,26:8,27:2,28:r,55:i,56:a,57:o},{18:t,26:9,27:2,28:r,55:i,56:a,57:o},e(s,[2,33],{29:10}),e(c,[2,61]),e(c,[2,62]),e(c,[2,63]),{1:[2,30]},{1:[2,31]},e(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(s,[2,34]),{27:46,55:i,56:a,57:o},e(l,[2,37]),e(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(l,[2,39]),e(l,[2,40]),e(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(l,[2,45]),e(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},e(B,[2,64]),e(B,[2,66]),e(B,[2,67]),e(B,[2,70]),e(B,[2,71]),e(B,[2,72]),e(B,[2,73]),e(B,[2,74]),e(B,[2,75]),e(B,[2,76]),e(B,[2,77]),e(B,[2,78]),e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),e(s,[2,35]),e(l,[2,38]),e(l,[2,42]),e(l,[2,43]),e(l,[2,44]),{3:65,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,21:64},e(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,78],63:N,64:P,65:F,66:I,67:L}),e(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,79],63:N,64:P,65:F,66:I,67:L}),e(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},e(B,[2,65]),e(B,[2,82]),e(B,[2,83]),e(B,[2,84]),{3:83,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,18:[1,82]},e(V,[2,23]),e(V,[2,1]),e(V,[2,2]),e(V,[2,3]),e(V,[2,4]),e(V,[2,5]),e(V,[2,6]),e(V,[2,7]),e(V,[2,8]),e(V,[2,9]),e(V,[2,10]),e(V,[2,11]),e(V,[2,12]),e(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:89,23:88},e(V,[2,24]),e(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,47],{22:89,16:90,23:101,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,102]},e(l,[2,29],{10:fe}),e(pe,[2,27],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),e(Q,[2,25]),e(Q,[2,13]),e(Q,[2,14]),e(Q,[2,15]),e(Q,[2,16]),e(Q,[2,17]),e(Q,[2,18]),e(Q,[2,19]),e(Q,[2,20]),e(Q,[2,21]),e(Q,[2,22]),e(l,[2,49],{10:fe}),e(l,[2,48],{22:89,16:90,23:105,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:106},e(Q,[2,26]),e(l,[2,50],{10:fe}),e(pe,[2,28],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as r,H as i,K as a,U as o,a as s,c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as h}from"./linear-BdNtkfoP.js";var g=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],de=[1,77],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,91],U=[1,92],W=[1,93],G=[1,100],K=[1,94],q=[1,97],J=[1,95],Y=[1,96],X=[1,98],Z=[1,99],fe=[1,103],pe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],me={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[{18:t,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:t,26:8,27:2,28:r,55:i,56:a,57:o},{18:t,26:9,27:2,28:r,55:i,56:a,57:o},e(s,[2,33],{29:10}),e(c,[2,61]),e(c,[2,62]),e(c,[2,63]),{1:[2,30]},{1:[2,31]},e(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(s,[2,34]),{27:46,55:i,56:a,57:o},e(l,[2,37]),e(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(l,[2,39]),e(l,[2,40]),e(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(l,[2,45]),e(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},e(B,[2,64]),e(B,[2,66]),e(B,[2,67]),e(B,[2,70]),e(B,[2,71]),e(B,[2,72]),e(B,[2,73]),e(B,[2,74]),e(B,[2,75]),e(B,[2,76]),e(B,[2,77]),e(B,[2,78]),e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),e(s,[2,35]),e(l,[2,38]),e(l,[2,42]),e(l,[2,43]),e(l,[2,44]),{3:65,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,21:64},e(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,78],63:N,64:P,65:F,66:I,67:L}),e(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,79],63:N,64:P,65:F,66:I,67:L}),e(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},e(B,[2,65]),e(B,[2,82]),e(B,[2,83]),e(B,[2,84]),{3:83,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,18:[1,82]},e(V,[2,23]),e(V,[2,1]),e(V,[2,2]),e(V,[2,3]),e(V,[2,4]),e(V,[2,5]),e(V,[2,6]),e(V,[2,7]),e(V,[2,8]),e(V,[2,9]),e(V,[2,10]),e(V,[2,11]),e(V,[2,12]),e(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:89,23:88},e(V,[2,24]),e(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,47],{22:89,16:90,23:101,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,102]},e(l,[2,29],{10:fe}),e(pe,[2,27],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),e(Q,[2,25]),e(Q,[2,13]),e(Q,[2,14]),e(Q,[2,15]),e(Q,[2,16]),e(Q,[2,17]),e(Q,[2,18]),e(Q,[2,19]),e(Q,[2,20]),e(Q,[2,21]),e(Q,[2,22]),e(l,[2,49],{10:fe}),e(l,[2,48],{22:89,16:90,23:105,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:106},e(Q,[2,26]),e(l,[2,50],{10:fe}),e(pe,[2,28],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};me.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-Bok4eu9T.js b/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DWW_AiDb.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-Bok4eu9T.js rename to apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DWW_AiDb.js index 75362fb6a..065d81097 100644 --- a/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-Bok4eu9T.js +++ b/apps/pythinker-code/dist-web/assets/quadrantDiagram-AXDQQJYC-DWW_AiDb.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{D as r,H as i,K as a,U as o,a as s,c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as h}from"./linear-BVqbHFqZ.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],de=[1,77],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,91],U=[1,92],W=[1,93],G=[1,100],K=[1,94],q=[1,97],J=[1,95],Y=[1,96],X=[1,98],Z=[1,99],fe=[1,103],pe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],me={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[{18:n,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:n,26:8,27:2,28:r,55:i,56:a,57:o},{18:n,26:9,27:2,28:r,55:i,56:a,57:o},t(s,[2,33],{29:10}),t(c,[2,61]),t(c,[2,62]),t(c,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(s,[2,34]),{27:46,55:i,56:a,57:o},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(l,[2,45]),t(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},t(B,[2,64]),t(B,[2,66]),t(B,[2,67]),t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),t(B,[2,78]),t(B,[2,79]),t(B,[2,80]),t(B,[2,81]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:65,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,21:64},t(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,78],63:N,64:P,65:F,66:I,67:L}),t(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,79],63:N,64:P,65:F,66:I,67:L}),t(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},t(B,[2,65]),t(B,[2,82]),t(B,[2,83]),t(B,[2,84]),{3:83,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,18:[1,82]},t(V,[2,23]),t(V,[2,1]),t(V,[2,2]),t(V,[2,3]),t(V,[2,4]),t(V,[2,5]),t(V,[2,6]),t(V,[2,7]),t(V,[2,8]),t(V,[2,9]),t(V,[2,10]),t(V,[2,11]),t(V,[2,12]),t(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:89,23:88},t(V,[2,24]),t(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,47],{22:89,16:90,23:101,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,102]},t(l,[2,29],{10:fe}),t(pe,[2,27],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),t(Q,[2,25]),t(Q,[2,13]),t(Q,[2,14]),t(Q,[2,15]),t(Q,[2,16]),t(Q,[2,17]),t(Q,[2,18]),t(Q,[2,19]),t(Q,[2,20]),t(Q,[2,21]),t(Q,[2,22]),t(l,[2,49],{10:fe}),t(l,[2,48],{22:89,16:90,23:105,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:106},t(Q,[2,26]),t(l,[2,50],{10:fe}),t(pe,[2,28],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{D as r,H as i,K as a,U as o,a as s,c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as h}from"./linear-BVqbHFqZ.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],de=[1,77],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,91],U=[1,92],W=[1,93],G=[1,100],K=[1,94],q=[1,97],J=[1,95],Y=[1,96],X=[1,98],Z=[1,99],fe=[1,103],pe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],me={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[{18:n,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:n,26:8,27:2,28:r,55:i,56:a,57:o},{18:n,26:9,27:2,28:r,55:i,56:a,57:o},t(s,[2,33],{29:10}),t(c,[2,61]),t(c,[2,62]),t(c,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(s,[2,34]),{27:46,55:i,56:a,57:o},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(l,[2,45]),t(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},t(B,[2,64]),t(B,[2,66]),t(B,[2,67]),t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),t(B,[2,78]),t(B,[2,79]),t(B,[2,80]),t(B,[2,81]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:65,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,21:64},t(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,78],63:N,64:P,65:F,66:I,67:L}),t(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,79],63:N,64:P,65:F,66:I,67:L}),t(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},t(B,[2,65]),t(B,[2,82]),t(B,[2,83]),t(B,[2,84]),{3:83,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,18:[1,82]},t(V,[2,23]),t(V,[2,1]),t(V,[2,2]),t(V,[2,3]),t(V,[2,4]),t(V,[2,5]),t(V,[2,6]),t(V,[2,7]),t(V,[2,8]),t(V,[2,9]),t(V,[2,10]),t(V,[2,11]),t(V,[2,12]),t(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:89,23:88},t(V,[2,24]),t(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,47],{22:89,16:90,23:101,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,102]},t(l,[2,29],{10:fe}),t(pe,[2,27],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),t(Q,[2,25]),t(Q,[2,13]),t(Q,[2,14]),t(Q,[2,15]),t(Q,[2,16]),t(Q,[2,17]),t(Q,[2,18]),t(Q,[2,19]),t(Q,[2,20]),t(Q,[2,21]),t(Q,[2,22]),t(l,[2,49],{10:fe}),t(l,[2,48],{22:89,16:90,23:105,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:106},t(Q,[2,26]),t(l,[2,50],{10:fe}),t(pe,[2,28],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};me.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-CcjyfvwI.js b/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-CgaJk4H0.js similarity index 88% rename from apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-CcjyfvwI.js rename to apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-CgaJk4H0.js index 3eed0fa3d..add4ebafa 100644 --- a/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-CcjyfvwI.js +++ b/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-CgaJk4H0.js @@ -1 +1 @@ -import{g as e,t}from"./mermaid-parser.core-BCOGZFb-.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-CLGD4ZFX-D_luxf7b.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-BnQxQiBZ.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=e().Railroad.parser.LangiumParser,l=n(e=>{switch(e.$type){case`RailroadTerminalExpr`:return{type:`terminal`,value:e.value};case`RailroadNonTerminalExpr`:return{type:`nonterminal`,name:e.name};case`RailroadSpecialExpr`:return{type:`special`,text:e.text};case`RailroadSequenceExpr`:{let t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(l);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:l(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),u=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),d=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(u(e)))},`populateDb`),f={parser:{parse:n(e=>{o.clear(),r.debug(`[Railroad Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[Railroad Parser] Parsed rules:`,i.rules.length),d(i),r.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{f as diagram}; \ No newline at end of file +import{g as e,t}from"./mermaid-parser.core-BCOGZFb-.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-CWy3EboY.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=e().Railroad.parser.LangiumParser,l=n(e=>{switch(e.$type){case`RailroadTerminalExpr`:return{type:`terminal`,value:e.value};case`RailroadNonTerminalExpr`:return{type:`nonterminal`,name:e.name};case`RailroadSpecialExpr`:return{type:`special`,text:e.text};case`RailroadSequenceExpr`:{let t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(l);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:l(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),u=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),d=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(u(e)))},`populateDb`),f={parser:{parse:n(e=>{o.clear(),r.debug(`[Railroad Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[Railroad Parser] Parsed rules:`,i.rules.length),d(i),r.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{f as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-BfA_HV50.js b/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-Sz93ixk4.js similarity index 88% rename from apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-BfA_HV50.js rename to apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-Sz93ixk4.js index 5868eb672..766aef2cd 100644 --- a/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-BfA_HV50.js +++ b/apps/pythinker-code/dist-web/assets/railroadDiagram-O6MQD6OU-Sz93ixk4.js @@ -1 +1 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CcF2nKWM.js";import"./mermaidParser.worker-_pLIm6No.js";import{g as n,t as r}from"./mermaid-parser.core-87cmcdBo.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-uaDelfR2.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=n().Railroad.parser.LangiumParser,l=t(e=>{switch(e.$type){case`RailroadTerminalExpr`:return{type:`terminal`,value:e.value};case`RailroadNonTerminalExpr`:return{type:`nonterminal`,name:e.name};case`RailroadSpecialExpr`:return{type:`special`,text:e.text};case`RailroadSequenceExpr`:{let t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(l);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:l(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),u=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),d=t(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(u(e)))},`populateDb`),f={parser:{parse:t(t=>{o.clear(),e.debug(`[Railroad Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new r(n);let i=n.value;e.debug(`[Railroad Parser] Parsed rules:`,i.rules.length),d(i),e.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{f as diagram}; \ No newline at end of file +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CbPIJzjs.js";import"./mermaidParser.worker-CBWarbNh.js";import{g as n,t as r}from"./mermaid-parser.core-87cmcdBo.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-Cw2zjcPU.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=n().Railroad.parser.LangiumParser,l=t(e=>{switch(e.$type){case`RailroadTerminalExpr`:return{type:`terminal`,value:e.value};case`RailroadNonTerminalExpr`:return{type:`nonterminal`,name:e.name};case`RailroadSpecialExpr`:return{type:`special`,text:e.text};case`RailroadSequenceExpr`:{let t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(l);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:l(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),u=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),d=t(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(u(e)))},`populateDb`),f={parser:{parse:t(t=>{o.clear(),e.debug(`[Railroad Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new r(n);let i=n.value;e.debug(`[Railroad Parser] Parsed rules:`,i.rules.length),d(i),e.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{f as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/razor-BTd1E-Za.js b/apps/pythinker-code/dist-web/assets/razor-D6HVEdoN.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/razor-BTd1E-Za.js rename to apps/pythinker-code/dist-web/assets/razor-D6HVEdoN.js index ffc7bd713..0cba8a0fb 100644 --- a/apps/pythinker-code/dist-web/assets/razor-BTd1E-Za.js +++ b/apps/pythinker-code/dist-web/assets/razor-D6HVEdoN.js @@ -1 +1 @@ -import{h as e}from"./editor.api2-BIJacb07.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[``]},brackets:[[``],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.root`}],[/)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)([:\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)([\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.comment`}],[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.script`}],[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.scriptAfterType`}],[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.scriptAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.scriptWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInEmbeddedState.scriptEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],style:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.style`}],[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.styleAfterType`}],[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.styleAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],razorInSimpleState:[[/@\*/,`comment.cs`,`@razorBlockCommentTopLevel`],[/@[{(]/,`metatag.cs`,`@razorRootTopLevel`],[/(@)(\s*[\w]+)/,[`metatag.cs`,{token:`identifier.cs`,switchTo:`@$S2.$S3`}]],[/[})]/,{token:`metatag.cs`,switchTo:`@$S2.$S3`}],[/\*@/,{token:`comment.cs`,switchTo:`@$S2.$S3`}]],razorInEmbeddedState:[[/@\*/,`comment.cs`,`@razorBlockCommentTopLevel`],[/@[{(]/,`metatag.cs`,`@razorRootTopLevel`],[/(@)(\s*[\w]+)/,[`metatag.cs`,{token:`identifier.cs`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}]],[/[})]/,{token:`metatag.cs`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],[/\*@/,{token:`comment.cs`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}]],razorBlockCommentTopLevel:[[/\*@/,`@rematch`,`@pop`],[/[^*]+/,`comment.cs`],[/./,`comment.cs`]],razorBlockComment:[[/\*@/,`comment.cs`,`@pop`],[/[^*]+/,`comment.cs`],[/./,`comment.cs`]],razorRootTopLevel:[[/\{/,`delimiter.bracket.cs`,`@razorRoot`],[/\(/,`delimiter.parenthesis.cs`,`@razorRoot`],[/[})]/,`@rematch`,`@pop`],{include:`razorCommon`}],razorRoot:[[/\{/,`delimiter.bracket.cs`,`@razorRoot`],[/\(/,`delimiter.parenthesis.cs`,`@razorRoot`],[/\}/,`delimiter.bracket.cs`,`@pop`],[/\)/,`delimiter.parenthesis.cs`,`@pop`],{include:`razorCommon`}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:`keyword.cs`},"@default":`identifier.cs`}}],[/[\[\]]/,`delimiter.array.cs`],[/[ \t\r\n]+/],[/\/\/.*$/,`comment.cs`],[/@\*/,`comment.cs`,`@razorBlockComment`],[/"([^"]*)"/,`string.cs`],[/'([^']*)'/,`string.cs`],[/(<)([\w\-]+)(\/>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)([\w\-]+)(>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<\/)([\w\-]+)(>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,`delimiter.cs`],[/\d*\d+[eE]([\-+]?\d+)?/,`number.float.cs`],[/\d*\.\d+([eE][\-+]?\d+)?/,`number.float.cs`],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,`number.hex.cs`],[/0[0-7']*[0-7]/,`number.octal.cs`],[/0[bB][0-1']*[0-1]/,`number.binary.cs`],[/\d[\d']*/,`number.cs`],[/\d/,`number.cs`]]},razorKeywords:`abstract.as.async.await.base.bool.break.by.byte.case.catch.char.checked.class.const.continue.decimal.default.delegate.do.double.descending.explicit.event.extern.else.enum.false.finally.fixed.float.for.foreach.from.goto.group.if.implicit.in.int.interface.internal.into.is.lock.long.nameof.new.null.namespace.object.operator.out.override.orderby.params.private.protected.public.readonly.ref.return.switch.struct.sbyte.sealed.short.sizeof.stackalloc.static.string.select.this.throw.true.try.typeof.uint.ulong.unchecked.unsafe.ushort.using.var.virtual.volatile.void.when.while.where.yield.model.inject`.split(`.`),escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{n as conf,r as language}; \ No newline at end of file +import{h as e}from"./editor.api2-DVs509bq.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[``]},brackets:[[``],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.root`}],[/)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)([:\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)([\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.comment`}],[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.script`}],[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.scriptAfterType`}],[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.scriptAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.scriptWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInEmbeddedState.scriptEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],style:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.style`}],[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.styleAfterType`}],[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.styleAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],razorInSimpleState:[[/@\*/,`comment.cs`,`@razorBlockCommentTopLevel`],[/@[{(]/,`metatag.cs`,`@razorRootTopLevel`],[/(@)(\s*[\w]+)/,[`metatag.cs`,{token:`identifier.cs`,switchTo:`@$S2.$S3`}]],[/[})]/,{token:`metatag.cs`,switchTo:`@$S2.$S3`}],[/\*@/,{token:`comment.cs`,switchTo:`@$S2.$S3`}]],razorInEmbeddedState:[[/@\*/,`comment.cs`,`@razorBlockCommentTopLevel`],[/@[{(]/,`metatag.cs`,`@razorRootTopLevel`],[/(@)(\s*[\w]+)/,[`metatag.cs`,{token:`identifier.cs`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}]],[/[})]/,{token:`metatag.cs`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],[/\*@/,{token:`comment.cs`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}]],razorBlockCommentTopLevel:[[/\*@/,`@rematch`,`@pop`],[/[^*]+/,`comment.cs`],[/./,`comment.cs`]],razorBlockComment:[[/\*@/,`comment.cs`,`@pop`],[/[^*]+/,`comment.cs`],[/./,`comment.cs`]],razorRootTopLevel:[[/\{/,`delimiter.bracket.cs`,`@razorRoot`],[/\(/,`delimiter.parenthesis.cs`,`@razorRoot`],[/[})]/,`@rematch`,`@pop`],{include:`razorCommon`}],razorRoot:[[/\{/,`delimiter.bracket.cs`,`@razorRoot`],[/\(/,`delimiter.parenthesis.cs`,`@razorRoot`],[/\}/,`delimiter.bracket.cs`,`@pop`],[/\)/,`delimiter.parenthesis.cs`,`@pop`],{include:`razorCommon`}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:`keyword.cs`},"@default":`identifier.cs`}}],[/[\[\]]/,`delimiter.array.cs`],[/[ \t\r\n]+/],[/\/\/.*$/,`comment.cs`],[/@\*/,`comment.cs`,`@razorBlockComment`],[/"([^"]*)"/,`string.cs`],[/'([^']*)'/,`string.cs`],[/(<)([\w\-]+)(\/>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)([\w\-]+)(>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<\/)([\w\-]+)(>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,`delimiter.cs`],[/\d*\d+[eE]([\-+]?\d+)?/,`number.float.cs`],[/\d*\.\d+([eE][\-+]?\d+)?/,`number.float.cs`],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,`number.hex.cs`],[/0[0-7']*[0-7]/,`number.octal.cs`],[/0[bB][0-1']*[0-1]/,`number.binary.cs`],[/\d[\d']*/,`number.cs`],[/\d/,`number.cs`]]},razorKeywords:`abstract.as.async.await.base.bool.break.by.byte.case.catch.char.checked.class.const.continue.decimal.default.delegate.do.double.descending.explicit.event.extern.else.enum.false.finally.fixed.float.for.foreach.from.goto.group.if.implicit.in.int.interface.internal.into.is.lock.long.nameof.new.null.namespace.object.operator.out.override.orderby.params.private.protected.public.readonly.ref.return.switch.struct.sbyte.sealed.short.sizeof.stackalloc.static.string.select.this.throw.true.try.typeof.uint.ulong.unchecked.unsafe.ushort.using.var.virtual.volatile.void.when.while.where.yield.model.inject`.split(`.`),escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{n as conf,r as language}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-CiJW760h.js b/apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-B40ldFpf.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-CiJW760h.js rename to apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-B40ldFpf.js index 9fcbcd8fe..53b04c038 100644 --- a/apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-CiJW760h.js +++ b/apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-B40ldFpf.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t,t as n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as r,K as i,U as a,a as o,b as s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{g as f}from"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import"./chunk-GVQU2GXP-aw9OR1ii.js";import{n as p,t as m}from"./mermaidParser.worker-_pLIm6No.js";import{t as h}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as g}from"./chunk-POPQ4Y6H-BiMU0_kH.js";var _=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},e(o,[2,4]),e(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(T,[2,17]),e(T,[2,18]),e(T,[2,19]),e(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},e(D,[2,29]),e(D,[2,30]),e(D,[2,31]),e(D,[2,32]),e(D,[2,33]),e(D,[2,34]),e(O,[2,81]),e(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(k,[2,79]),e(k,[2,80]),{27:[1,67],29:[1,68]},e(k,[2,85]),e(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,60]),e(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},e(H,[2,50]),e(H,[2,51]),e(H,[2,52]),e(H,[2,53]),e(H,[2,54]),e(H,[2,55]),e(H,[2,56]),{64:[1,100]},e(T,[2,59],{76:M}),e(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},e(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),e(U,[2,67]),e(U,[2,69]),e(U,[2,70]),e(U,[2,71]),e(U,[2,72]),e(U,[2,73]),e(U,[2,74]),e(U,[2,75]),e(U,[2,76]),e(U,[2,77]),e(U,[2,78]),e(T,[2,57],{76:se}),e(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,61]),e(oe,[2,63]),e(U,[2,68]),e(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},e(T,[2,28]),{5:[1,127]},e(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},e(T,[2,47]),{5:[1,131]},e(T,[2,48]),e(T,[2,49]),e(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},e(T,[2,23]),e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,44]),e(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: +import{m as e}from"./src-CDd1avoI.js";import{n as t,t as n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as r,K as i,U as a,a as o,b as s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{g as f}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import"./chunk-GVQU2GXP-CCw5T6ST.js";import{n as p,t as m}from"./mermaidParser.worker-CBWarbNh.js";import{t as h}from"./chunk-XXDRQBXY-DHvxiZS2.js";import{t as g}from"./chunk-POPQ4Y6H-1k8n9Sa3.js";var _=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},e(o,[2,4]),e(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(T,[2,17]),e(T,[2,18]),e(T,[2,19]),e(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},e(D,[2,29]),e(D,[2,30]),e(D,[2,31]),e(D,[2,32]),e(D,[2,33]),e(D,[2,34]),e(O,[2,81]),e(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(k,[2,79]),e(k,[2,80]),{27:[1,67],29:[1,68]},e(k,[2,85]),e(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,60]),e(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},e(H,[2,50]),e(H,[2,51]),e(H,[2,52]),e(H,[2,53]),e(H,[2,54]),e(H,[2,55]),e(H,[2,56]),{64:[1,100]},e(T,[2,59],{76:M}),e(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},e(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),e(U,[2,67]),e(U,[2,69]),e(U,[2,70]),e(U,[2,71]),e(U,[2,72]),e(U,[2,73]),e(U,[2,74]),e(U,[2,75]),e(U,[2,76]),e(U,[2,77]),e(U,[2,78]),e(T,[2,57],{76:se}),e(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},e(oe,[2,61]),e(oe,[2,63]),e(U,[2,68]),e(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},e(T,[2,28]),{5:[1,127]},e(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},e(T,[2,47]),{5:[1,131]},e(T,[2,48]),e(T,[2,49]),e(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},e(T,[2,23]),e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,44]),e(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};le.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-D3_MdioG.js b/apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-C3a3rkEd.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-D3_MdioG.js rename to apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-C3a3rkEd.js index 389408523..0eff82b5f 100644 --- a/apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-D3_MdioG.js +++ b/apps/pythinker-code/dist-web/assets/requirementDiagram-BXWQKSXE-C3a3rkEd.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{H as r,K as i,U as a,a as o,b as s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{g as f}from"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import"./chunk-OSK3NFVY-BT2Y-lqQ.js";import{t as p}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as m}from"./chunk-POPQ4Y6H-BCRCUUP_.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import{r as h,t as g}from"./chunk-TLUHSLCS-DN2eHVWx.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},t(o,[2,4]),t(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(D,[2,32]),t(D,[2,33]),t(D,[2,34]),t(O,[2,81]),t(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,60]),t(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(T,[2,59],{76:M}),t(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},t(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),t(U,[2,67]),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(T,[2,57],{76:se}),t(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,61]),t(oe,[2,63]),t(U,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{H as r,K as i,U as a,a as o,b as s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-B78kfBb6.js";import{g as f}from"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import"./chunk-OSK3NFVY-ZXiPE9OQ.js";import{t as p}from"./chunk-XXDRQBXY-Y1lmGfHA.js";import{t as m}from"./chunk-POPQ4Y6H-mwDJO2QS.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import{r as h,t as g}from"./chunk-TLUHSLCS-B1Sp0tTt.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},t(o,[2,4]),t(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(D,[2,32]),t(D,[2,33]),t(D,[2,34]),t(O,[2,81]),t(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,60]),t(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(T,[2,59],{76:M}),t(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},t(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),t(U,[2,67]),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(T,[2,57],{76:se}),t(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,61]),t(oe,[2,63]),t(U,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};le.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-N49noS8R.js b/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-CpvMYqvB.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-N49noS8R.js rename to apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-CpvMYqvB.js index 6c1e9d56f..e75a5996d 100644 --- a/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-N49noS8R.js +++ b/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-CpvMYqvB.js @@ -1,4 +1,4 @@ -import{p as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,J as r,K as i,U as a,a as o,d as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as p}from"./ordinal-C_XC5MEo.js";function m(e){for(var t=e.length/6|0,n=Array(t),r=0;r=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function _(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function v(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function y(e){return e.target.depth}function b(e){return e.depth}function x(e,t){return t-1-e.height}function S(e,t){return e.sourceLinks.length?e.depth:t-1}function C(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?_(e.sourceLinks,y)-1:0}function w(e){return function(){return e}}function T(e,t){return D(e.source,t.source)||e.index-t.index}function E(e,t){return D(e.target,t.target)||e.index-t.index}function D(e,t){return e.y0-t.y0}function O(e){return e.value}function k(e){return e.index}function A(e){return e.nodes}function j(e){return e.links}function M(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function N({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function P(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=k,c=S,l,u,d=A,f=j,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),y(e),b(e),x(e),F(e),N(e),e}m.update=function(e){return N(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:w(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:w(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:w(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:w(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=M(n,t)),typeof i!=`object`&&(i=r.target=M(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function y({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(v(t.sourceLinks,O),v(t.targetLinks,O)):t.fixedValue}function b({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function x({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function C({nodes:t}){let r=g(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function P(e){let n=_(e,e=>(r-t-(e.length-1)*o)/v(e,O));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;te.length)-1)),P(n);for(let e=0;e0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function L(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=W(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function R(e,n){let i=e.length>>1,a=e[i];B(e,a.y0-o,i-1,n),z(e,a.y1+o,i+1,n),B(e,r,e.length-1,n),z(e,t,0,n)}function z(e,t,n,r){for(;n1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function B(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function V({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(E);for(let{target:{targetLinks:t}}of e)t.sort(T)}}function H(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(E),n.sort(T)}function U(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function W(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var F=Math.PI,I=2*F,L=1e-6,R=I-L;function z(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function B(){return new z}z.prototype=B.prototype={constructor:z,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>L)if(!(Math.abs(u*s-c*l)>L)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((F-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>L&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>L||Math.abs(this._y1-l)>L)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%I+I),d>R?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>L&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=F)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function V(e){return function(){return e}}function H(e){return e[0]}function U(e){return e[1]}var W=Array.prototype.slice;function G(e){return e.source}function ee(e){return e.target}function te(e){var t=G,n=ee,r=H,i=U,a=null;function o(){var o,s=W.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=B(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:V(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:V(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function ne(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function re(){return te(ne)}function ie(e){return[e.source.x1,e.y0]}function ae(e){return[e.target.x0,e.y1]}function K(){return re().source(ie).target(ae)}var q=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,9],r=[1,10],i=[1,5,10,12],a={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:`error`,4:`SANKEY`,5:`NEWLINE`,10:`EOF`,11:`field[source]`,12:`COMMA`,13:`field[target]`,14:`field[value]`,18:`DQUOTE`,19:`ESCAPED_TEXT`,20:`NON_ESCAPED_TEXT`},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 7:let e=r.findOrCreateNode(a[s-4].trim().replaceAll(`""`,`"`)),t=r.findOrCreateNode(a[s-2].trim().replaceAll(`""`,`"`)),n=parseFloat(a[s].trim());r.addLink(e,t,n);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:r},{1:[2,6],7:11,10:[1,12]},e(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(i,[2,8]),e(i,[2,9]),{19:[1,16]},e(i,[2,11]),{1:[2,1]},{1:[2,5]},e(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:r},{15:18,16:7,17:8,18:n,20:r},{18:[1,19]},e(r,[2,3]),{12:[1,20]},e(i,[2,10]),{15:21,16:7,17:8,18:n,20:r},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{p as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,J as r,K as i,U as a,a as o,d as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as p}from"./ordinal-C_XC5MEo.js";function m(e){for(var t=e.length/6|0,n=Array(t),r=0;r=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function _(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function v(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function y(e){return e.target.depth}function b(e){return e.depth}function x(e,t){return t-1-e.height}function S(e,t){return e.sourceLinks.length?e.depth:t-1}function C(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?_(e.sourceLinks,y)-1:0}function w(e){return function(){return e}}function T(e,t){return D(e.source,t.source)||e.index-t.index}function E(e,t){return D(e.target,t.target)||e.index-t.index}function D(e,t){return e.y0-t.y0}function O(e){return e.value}function k(e){return e.index}function A(e){return e.nodes}function j(e){return e.links}function M(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function N({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function P(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=k,c=S,l,u,d=A,f=j,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),y(e),b(e),x(e),F(e),N(e),e}m.update=function(e){return N(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:w(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:w(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:w(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:w(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=M(n,t)),typeof i!=`object`&&(i=r.target=M(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function y({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(v(t.sourceLinks,O),v(t.targetLinks,O)):t.fixedValue}function b({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function x({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function C({nodes:t}){let r=g(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function P(e){let n=_(e,e=>(r-t-(e.length-1)*o)/v(e,O));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;te.length)-1)),P(n);for(let e=0;e0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function L(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=W(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function R(e,n){let i=e.length>>1,a=e[i];B(e,a.y0-o,i-1,n),z(e,a.y1+o,i+1,n),B(e,r,e.length-1,n),z(e,t,0,n)}function z(e,t,n,r){for(;n1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function B(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function V({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(E);for(let{target:{targetLinks:t}}of e)t.sort(T)}}function H(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(E),n.sort(T)}function U(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function W(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var F=Math.PI,I=2*F,L=1e-6,R=I-L;function z(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function B(){return new z}z.prototype=B.prototype={constructor:z,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>L)if(!(Math.abs(u*s-c*l)>L)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((F-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>L&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>L||Math.abs(this._y1-l)>L)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%I+I),d>R?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>L&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=F)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function V(e){return function(){return e}}function H(e){return e[0]}function U(e){return e[1]}var W=Array.prototype.slice;function G(e){return e.source}function ee(e){return e.target}function te(e){var t=G,n=ee,r=H,i=U,a=null;function o(){var o,s=W.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=B(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:V(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:V(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function ne(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function re(){return te(ne)}function ie(e){return[e.source.x1,e.y0]}function ae(e){return[e.target.x0,e.y1]}function K(){return re().source(ie).target(ae)}var q=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,9],r=[1,10],i=[1,5,10,12],a={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:`error`,4:`SANKEY`,5:`NEWLINE`,10:`EOF`,11:`field[source]`,12:`COMMA`,13:`field[target]`,14:`field[value]`,18:`DQUOTE`,19:`ESCAPED_TEXT`,20:`NON_ESCAPED_TEXT`},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 7:let e=r.findOrCreateNode(a[s-4].trim().replaceAll(`""`,`"`)),t=r.findOrCreateNode(a[s-2].trim().replaceAll(`""`,`"`)),n=parseFloat(a[s].trim());r.addLink(e,t,n);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:r},{1:[2,6],7:11,10:[1,12]},e(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(i,[2,8]),e(i,[2,9]),{19:[1,16]},e(i,[2,11]),{1:[2,1]},{1:[2,5]},e(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:r},{15:18,16:7,17:8,18:n,20:r},{18:[1,19]},e(r,[2,3]),{12:[1,20]},e(i,[2,10]),{15:21,16:7,17:8,18:n,20:r},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};a.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-DDpT1WQe.js b/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-CtfL3_U4.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-DDpT1WQe.js rename to apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-CtfL3_U4.js index 8d5a56b6e..1c12fed9a 100644 --- a/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-DDpT1WQe.js +++ b/apps/pythinker-code/dist-web/assets/sankeyDiagram-P5KCCOFB-CtfL3_U4.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Cn6kALDM.js";import{H as n,J as r,K as i,U as a,a as o,d as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as p}from"./ordinal-hYBb2elL.js";function m(e){for(var t=e.length/6|0,n=Array(t),r=0;r=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function _(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function v(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function y(e){return e.target.depth}function b(e){return e.depth}function x(e,t){return t-1-e.height}function S(e,t){return e.sourceLinks.length?e.depth:t-1}function C(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?_(e.sourceLinks,y)-1:0}function w(e){return function(){return e}}function T(e,t){return D(e.source,t.source)||e.index-t.index}function E(e,t){return D(e.target,t.target)||e.index-t.index}function D(e,t){return e.y0-t.y0}function O(e){return e.value}function k(e){return e.index}function A(e){return e.nodes}function j(e){return e.links}function M(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function N({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function P(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=k,c=S,l,u,d=A,f=j,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),y(e),b(e),x(e),F(e),N(e),e}m.update=function(e){return N(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:w(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:w(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:w(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:w(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=M(n,t)),typeof i!=`object`&&(i=r.target=M(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function y({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(v(t.sourceLinks,O),v(t.targetLinks,O)):t.fixedValue}function b({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function x({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function C({nodes:t}){let r=g(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function P(e){let n=_(e,e=>(r-t-(e.length-1)*o)/v(e,O));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;te.length)-1)),P(n);for(let e=0;e0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function L(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=W(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function R(e,n){let i=e.length>>1,a=e[i];B(e,a.y0-o,i-1,n),z(e,a.y1+o,i+1,n),B(e,r,e.length-1,n),z(e,t,0,n)}function z(e,t,n,r){for(;n1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function B(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function V({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(E);for(let{target:{targetLinks:t}}of e)t.sort(T)}}function H(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(E),n.sort(T)}function U(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function W(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var F=Math.PI,I=2*F,L=1e-6,R=I-L;function z(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function B(){return new z}z.prototype=B.prototype={constructor:z,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>L)if(!(Math.abs(u*s-c*l)>L)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((F-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>L&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>L||Math.abs(this._y1-l)>L)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%I+I),d>R?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>L&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=F)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function V(e){return function(){return e}}function H(e){return e[0]}function U(e){return e[1]}var W=Array.prototype.slice;function G(e){return e.source}function ee(e){return e.target}function te(e){var t=G,n=ee,r=H,i=U,a=null;function o(){var o,s=W.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=B(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:V(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:V(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function ne(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function re(){return te(ne)}function ie(e){return[e.source.x1,e.y0]}function ae(e){return[e.target.x0,e.y1]}function K(){return re().source(ie).target(ae)}var q=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,9],r=[1,10],i=[1,5,10,12],a={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:`error`,4:`SANKEY`,5:`NEWLINE`,10:`EOF`,11:`field[source]`,12:`COMMA`,13:`field[target]`,14:`field[value]`,18:`DQUOTE`,19:`ESCAPED_TEXT`,20:`NON_ESCAPED_TEXT`},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 7:let e=r.findOrCreateNode(a[s-4].trim().replaceAll(`""`,`"`)),t=r.findOrCreateNode(a[s-2].trim().replaceAll(`""`,`"`)),n=parseFloat(a[s].trim());r.addLink(e,t,n);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:r},{15:18,16:7,17:8,18:n,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Cn6kALDM.js";import{H as n,J as r,K as i,U as a,a as o,d as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as p}from"./ordinal-hYBb2elL.js";function m(e){for(var t=e.length/6|0,n=Array(t),r=0;r=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function _(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function v(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function y(e){return e.target.depth}function b(e){return e.depth}function x(e,t){return t-1-e.height}function S(e,t){return e.sourceLinks.length?e.depth:t-1}function C(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?_(e.sourceLinks,y)-1:0}function w(e){return function(){return e}}function T(e,t){return D(e.source,t.source)||e.index-t.index}function E(e,t){return D(e.target,t.target)||e.index-t.index}function D(e,t){return e.y0-t.y0}function O(e){return e.value}function k(e){return e.index}function A(e){return e.nodes}function j(e){return e.links}function M(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function N({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function P(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=k,c=S,l,u,d=A,f=j,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),y(e),b(e),x(e),F(e),N(e),e}m.update=function(e){return N(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:w(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:w(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:w(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:w(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=M(n,t)),typeof i!=`object`&&(i=r.target=M(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function y({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(v(t.sourceLinks,O),v(t.targetLinks,O)):t.fixedValue}function b({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function x({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function C({nodes:t}){let r=g(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function P(e){let n=_(e,e=>(r-t-(e.length-1)*o)/v(e,O));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;te.length)-1)),P(n);for(let e=0;e0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function L(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=W(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function R(e,n){let i=e.length>>1,a=e[i];B(e,a.y0-o,i-1,n),z(e,a.y1+o,i+1,n),B(e,r,e.length-1,n),z(e,t,0,n)}function z(e,t,n,r){for(;n1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function B(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function V({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(E);for(let{target:{targetLinks:t}}of e)t.sort(T)}}function H(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(E),n.sort(T)}function U(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function W(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var F=Math.PI,I=2*F,L=1e-6,R=I-L;function z(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function B(){return new z}z.prototype=B.prototype={constructor:z,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>L)if(!(Math.abs(u*s-c*l)>L)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((F-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>L&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>L||Math.abs(this._y1-l)>L)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%I+I),d>R?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>L&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=F)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function V(e){return function(){return e}}function H(e){return e[0]}function U(e){return e[1]}var W=Array.prototype.slice;function G(e){return e.source}function ee(e){return e.target}function te(e){var t=G,n=ee,r=H,i=U,a=null;function o(){var o,s=W.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=B(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:V(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:V(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function ne(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function re(){return te(ne)}function ie(e){return[e.source.x1,e.y0]}function ae(e){return[e.target.x0,e.y1]}function K(){return re().source(ie).target(ae)}var q=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,9],r=[1,10],i=[1,5,10,12],a={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:`error`,4:`SANKEY`,5:`NEWLINE`,10:`EOF`,11:`field[source]`,12:`COMMA`,13:`field[target]`,14:`field[value]`,18:`DQUOTE`,19:`ESCAPED_TEXT`,20:`NON_ESCAPED_TEXT`},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 7:let e=r.findOrCreateNode(a[s-4].trim().replaceAll(`""`,`"`)),t=r.findOrCreateNode(a[s-2].trim().replaceAll(`""`,`"`)),n=parseFloat(a[s].trim());r.addLink(e,t,n);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:r},{15:18,16:7,17:8,18:n,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};a.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-C7CGKcZw.js b/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-CTTNb2Uz.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-C7CGKcZw.js rename to apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-CTTNb2Uz.js index d28e2e5bb..f96186446 100644 --- a/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-C7CGKcZw.js +++ b/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-CTTNb2Uz.js @@ -1,4 +1,4 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{A as r,F as i,G as a,H as o,K as s,O as c,U as l,a as u,b as d,c as f,i as p,r as m,s as h,v as g,w as _,x as v,y,z as b}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as x}from"./dist-B9JEmVDW.js";import{g as S,p as C}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{i as w,r as T}from"./mermaidParser.worker-_pLIm6No.js";import{a as E,c as D,i as O,n as k,r as A,s as j}from"./chunk-F27PBJKO-BiUOMdWi.js";import{t as M}from"./chunk-2Q5K7J3B-C1jixKkw.js";var N=x(),P=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),e(I,[2,6]),e(I,[2,16]),e(ve,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(ye,a,{7:120}),e(ye,a,{7:121}),e(ye,a,{7:122}),e(be,a,{41:123,7:124}),e(xe,a,{43:125,7:126}),e(xe,a,{7:126,43:127}),e(Se,a,{46:128,7:129}),e(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Ce,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(ve,[2,11]),{13:186,51:D,53:O,54:k},e(ve,[2,13]),e(ve,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(ve,[2,12]),e(be,a,{7:124,41:201}),e(xe,a,{7:126,43:202}),e(Se,a,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Ce,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{A as r,F as i,G as a,H as o,K as s,O as c,U as l,a as u,b as d,c as f,i as p,r as m,s as h,v as g,w as _,x as v,y,z as b}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as x}from"./dist-B9JEmVDW.js";import{g as S,p as C}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{i as w,r as T}from"./mermaidParser.worker-CBWarbNh.js";import{a as E,c as D,i as O,n as k,r as A,s as j}from"./chunk-F27PBJKO-DTzbeXt1.js";import{t as M}from"./chunk-2Q5K7J3B-C1jixKkw.js";var N=x(),P=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),e(I,[2,6]),e(I,[2,16]),e(ve,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(ye,a,{7:120}),e(ye,a,{7:121}),e(ye,a,{7:122}),e(be,a,{41:123,7:124}),e(xe,a,{43:125,7:126}),e(xe,a,{7:126,43:127}),e(Se,a,{46:128,7:129}),e(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Ce,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(ve,[2,11]),{13:186,51:D,53:O,54:k},e(ve,[2,13]),e(ve,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(ve,[2,12]),e(be,a,{7:124,41:201}),e(xe,a,{7:126,43:202}),e(Se,a,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Ce,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};we.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-CRPyYfSc.js b/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-DQujfCGb.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-CRPyYfSc.js rename to apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-DQujfCGb.js index 1d9b80176..0ec7b34b2 100644 --- a/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-CRPyYfSc.js +++ b/apps/pythinker-code/dist-web/assets/sequenceDiagram-WJ2MYXX4-DQujfCGb.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{A as r,F as i,G as a,H as o,K as s,O as c,U as l,a as u,b as d,c as f,i as p,r as m,s as h,v as g,w as _,x as v,y,z as b}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as x}from"./dist-lRkD-JPF.js";import{g as S,p as C}from"./chunk-75Z2AOVW-D2HolPjd.js";import{a as w,c as T,i as E,n as D,r as O,s as k}from"./chunk-F27PBJKO-DeO1S11A.js";import{t as A}from"./chunk-2Q5K7J3B-C1jixKkw.js";import{n as j,t as M}from"./chunk-LNGE3PJU-OosUmKKA.js";var N=x(),P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(I,[2,30]),t(I,[2,31]),{33:[1,62]},{35:[1,63]},t(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),t(I,[2,6]),t(I,[2,16]),t(ve,[2,10],{11:114}),t(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(I,[2,22]),{5:[1,118]},{5:[1,119]},t(I,[2,25]),t(I,[2,26]),t(I,[2,27]),t(I,[2,28]),t(I,[2,29]),t(I,[2,32]),t(I,[2,33]),t(ye,a,{7:120}),t(ye,a,{7:121}),t(ye,a,{7:122}),t(be,a,{41:123,7:124}),t(xe,a,{43:125,7:126}),t(xe,a,{7:126,43:127}),t(Se,a,{46:128,7:129}),t(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},t(q,[2,79]),t(q,[2,80]),t(q,[2,81]),t(q,[2,82]),t(q,[2,83]),t(q,[2,84]),t(q,[2,85]),t(q,[2,86]),t(q,[2,87]),t(q,[2,88]),t(q,[2,89]),t(q,[2,90]),t(q,[2,91]),t(q,[2,92]),t(q,[2,93]),t(q,[2,94]),t(q,[2,95]),t(q,[2,96]),t(q,[2,97]),t(q,[2,98]),t(q,[2,99]),t(q,[2,100]),t(q,[2,101]),t(q,[2,102]),t(q,[2,103]),t(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},t(I,[2,20]),t(I,[2,21]),t(I,[2,23]),t(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},t(I,[2,50]),{16:[1,173]},t(I,[2,55]),t(Ce,[2,76]),{76:[1,174]},{16:[1,175]},t(I,[2,52]),{16:[1,176]},t(I,[2,57]),t(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(I,[2,17]),t(ve,[2,11]),{13:186,51:D,53:O,54:k},t(ve,[2,13]),t(ve,[2,14]),t(I,[2,19]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),{16:[1,187]},t(I,[2,39]),{16:[1,188]},t(I,[2,40]),t(I,[2,41]),{16:[1,189]},t(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},t(ve,[2,12]),t(be,a,{7:124,41:201}),t(xe,a,{7:126,43:202}),t(Se,a,{7:129,46:203}),t(I,[2,49]),t(I,[2,54]),t(Ce,[2,77]),t(I,[2,51]),t(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{A as r,F as i,G as a,H as o,K as s,O as c,U as l,a as u,b as d,c as f,i as p,r as m,s as h,v as g,w as _,x as v,y,z as b}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as x}from"./dist-lRkD-JPF.js";import{g as S,p as C}from"./chunk-75Z2AOVW-CAoob5DH.js";import{a as w,c as T,i as E,n as D,r as O,s as k}from"./chunk-F27PBJKO-Duq9tlNm.js";import{t as A}from"./chunk-2Q5K7J3B-C1jixKkw.js";import{n as j,t as M}from"./chunk-LNGE3PJU-OosUmKKA.js";var N=x(),P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(I,[2,30]),t(I,[2,31]),{33:[1,62]},{35:[1,63]},t(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),t(I,[2,6]),t(I,[2,16]),t(ve,[2,10],{11:114}),t(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(I,[2,22]),{5:[1,118]},{5:[1,119]},t(I,[2,25]),t(I,[2,26]),t(I,[2,27]),t(I,[2,28]),t(I,[2,29]),t(I,[2,32]),t(I,[2,33]),t(ye,a,{7:120}),t(ye,a,{7:121}),t(ye,a,{7:122}),t(be,a,{41:123,7:124}),t(xe,a,{43:125,7:126}),t(xe,a,{7:126,43:127}),t(Se,a,{46:128,7:129}),t(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},t(q,[2,79]),t(q,[2,80]),t(q,[2,81]),t(q,[2,82]),t(q,[2,83]),t(q,[2,84]),t(q,[2,85]),t(q,[2,86]),t(q,[2,87]),t(q,[2,88]),t(q,[2,89]),t(q,[2,90]),t(q,[2,91]),t(q,[2,92]),t(q,[2,93]),t(q,[2,94]),t(q,[2,95]),t(q,[2,96]),t(q,[2,97]),t(q,[2,98]),t(q,[2,99]),t(q,[2,100]),t(q,[2,101]),t(q,[2,102]),t(q,[2,103]),t(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},t(I,[2,20]),t(I,[2,21]),t(I,[2,23]),t(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},t(I,[2,50]),{16:[1,173]},t(I,[2,55]),t(Ce,[2,76]),{76:[1,174]},{16:[1,175]},t(I,[2,52]),{16:[1,176]},t(I,[2,57]),t(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(I,[2,17]),t(ve,[2,11]),{13:186,51:D,53:O,54:k},t(ve,[2,13]),t(ve,[2,14]),t(I,[2,19]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),{16:[1,187]},t(I,[2,39]),{16:[1,188]},t(I,[2,40]),t(I,[2,41]),{16:[1,189]},t(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},t(ve,[2,12]),t(be,a,{7:124,41:201}),t(xe,a,{7:126,43:202}),t(Se,a,{7:129,46:203}),t(I,[2,49]),t(I,[2,54]),t(Ce,[2,77]),t(I,[2,51]),t(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};we.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-CoWHGQjI.js b/apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-BLD2sJL-.js similarity index 94% rename from apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-CoWHGQjI.js rename to apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-BLD2sJL-.js index 87e4b7015..b3ce1cf26 100644 --- a/apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-CoWHGQjI.js +++ b/apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-BLD2sJL-.js @@ -1 +1 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{O as r,c as i,s as a,x as o}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{et as s,g as c}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{t as l}from"./line-WAwOiLk7.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import"./chunk-GVQU2GXP-aw9OR1ii.js";import{t as u}from"./dagre-BP-EatEF.js";import{f as d}from"./mermaidParser.worker-_pLIm6No.js";import"./chunk-F27PBJKO-BiUOMdWi.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-BiMU0_kH.js";import{i as f,n as p,t as m}from"./chunk-IMKFNOWR-Dc-ZKopU.js";var h=n(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=n(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=n((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=n((e,t)=>{let r=n(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.descriptions[0]).node().getBBox(),a=i.height,s=e.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;t.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=e.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),e},`drawDescrState`),y=n((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=n(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=n((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=n((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`
`);c=c.replace(/\n/g,`
`);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=n((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=n(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=n(function(t,i,u){let d=n(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=t.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let n=t.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let t=0;t<=l.length;t++){let i=n.append(`text`).attr(`text-anchor`,`middle`).text(l[t]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),e.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,e.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=n.node().getBBox();n.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),e.info(g)}T++},`drawEdge`),D,O={},k=n(function(){},`setConf`),A=n(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=n(function(n,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=t(`#i`+r));let u=t(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;e.debug(`Rendering diagram `+n);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;i(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=n(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=n((t,n,r,i,o,s,c)=>{let l=new d({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):e.debug(`No Node `+t+`: `+JSON.stringify(l.node(t)))});let b=v.getBBox();l.edges().forEach(function(t){t!==void 0&&l.edge(t)!==void 0&&(e.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(l.edge(t))),E(n,l.edge(t),l.edge(t).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,e.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:n(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram}; \ No newline at end of file +import{m as e,p as t}from"./src-CDd1avoI.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{O as r,c as i,s as a,x as o}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{et as s,g as c}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{t as l}from"./line-BOKvdzzq.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import"./chunk-GVQU2GXP-CCw5T6ST.js";import{t as u}from"./dagre-DvNxCnfe.js";import{f as d}from"./mermaidParser.worker-CBWarbNh.js";import"./chunk-F27PBJKO-DTzbeXt1.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-1k8n9Sa3.js";import{i as f,n as p,t as m}from"./chunk-IMKFNOWR-BY2CmrFo.js";var h=n(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=n(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=n((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=n((e,t)=>{let r=n(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.descriptions[0]).node().getBBox(),a=i.height,s=e.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;t.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=e.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),e},`drawDescrState`),y=n((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=n(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=n((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=n((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`
`);c=c.replace(/\n/g,`
`);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=n((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=n(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=n(function(t,i,u){let d=n(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=t.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let n=t.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let t=0;t<=l.length;t++){let i=n.append(`text`).attr(`text-anchor`,`middle`).text(l[t]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),e.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,e.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=n.node().getBBox();n.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),e.info(g)}T++},`drawEdge`),D,O={},k=n(function(){},`setConf`),A=n(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=n(function(n,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=t(`#i`+r));let u=t(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;e.debug(`Rendering diagram `+n);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;i(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=n(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=n((t,n,r,i,o,s,c)=>{let l=new d({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):e.debug(`No Node `+t+`: `+JSON.stringify(l.node(t)))});let b=v.getBBox();l.edges().forEach(function(t){t!==void 0&&l.edge(t)!==void 0&&(e.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(l.edge(t))),E(n,l.edge(t),l.edge(t).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,e.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:n(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-CMMwMfzr.js b/apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-UR96LRlZ.js similarity index 93% rename from apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-CMMwMfzr.js rename to apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-UR96LRlZ.js index f79d587bb..33c0ee153 100644 --- a/apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-CMMwMfzr.js +++ b/apps/pythinker-code/dist-web/assets/stateDiagram-D77RDMKH-UR96LRlZ.js @@ -1 +1 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{O as r,c as i,s as a,x as o}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{et as s,g as c}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as l}from"./line-CleFFpQp.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import"./chunk-OSK3NFVY-BT2Y-lqQ.js";import{t as u}from"./graphlib-B8gBHxth.js";import{t as d}from"./dagre-BJJUWK_n.js";import"./chunk-F27PBJKO-DeO1S11A.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-BCRCUUP_.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import"./chunk-TLUHSLCS-DN2eHVWx.js";import{i as f,n as p,t as m}from"./chunk-IMKFNOWR-DWwC1m5B.js";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=t.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`
`);c=c.replace(/\n/g,`
`);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=e(function(n,i,u){let d=e(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=n.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=n.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let n=0;n<=l.length;n++){let i=e.append(`text`).attr(`text-anchor`,`middle`).text(l[n]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),t.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,t.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),t.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=e(function(e,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=n(`#i`+r));let u=n(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;t.debug(`Rendering diagram `+e);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;i(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,n,r,i,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):t.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(t.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(n,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,t.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram}; \ No newline at end of file +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cn6kALDM.js";import{O as r,c as i,s as a,x as o}from"./chunk-DU6HZSFF-B78kfBb6.js";import{et as s,g as c}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as l}from"./line-BbuATs2H.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import"./chunk-OSK3NFVY-ZXiPE9OQ.js";import{t as u}from"./graphlib-B8gBHxth.js";import{t as d}from"./dagre-BJJUWK_n.js";import"./chunk-F27PBJKO-Duq9tlNm.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-mwDJO2QS.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import"./chunk-TLUHSLCS-B1Sp0tTt.js";import{i as f,n as p,t as m}from"./chunk-IMKFNOWR-6fpjZ3bW.js";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=t.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`
`);c=c.replace(/\n/g,`
`);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=e(function(n,i,u){let d=e(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=n.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=n.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let n=0;n<=l.length;n++){let i=e.append(`text`).attr(`text-anchor`,`middle`).text(l[n]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),t.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,t.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),t.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=e(function(e,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=n(`#i`+r));let u=n(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;t.debug(`Rendering diagram `+e);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;i(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,n,r,i,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):t.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(t.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(n,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,t.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-2K7jeXwd.js b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-2K7jeXwd.js new file mode 100644 index 000000000..5de02f682 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-2K7jeXwd.js @@ -0,0 +1 @@ +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import"./chunk-OSK3NFVY-ZXiPE9OQ.js";import"./chunk-F27PBJKO-Duq9tlNm.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-mwDJO2QS.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import"./chunk-TLUHSLCS-B1Sp0tTt.js";import{i as t,n,r,t as i}from"./chunk-IMKFNOWR-6fpjZ3bW.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-BvZufDE9.js b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-BvZufDE9.js deleted file mode 100644 index 7c3fd72dd..000000000 --- a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-BvZufDE9.js +++ /dev/null @@ -1 +0,0 @@ -import"./src-CDd1avoI.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CcF2nKWM.js";import"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import"./chunk-GVQU2GXP-aw9OR1ii.js";import"./mermaidParser.worker-_pLIm6No.js";import"./chunk-F27PBJKO-BiUOMdWi.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-BiMU0_kH.js";import{i as t,n,r,t as i}from"./chunk-IMKFNOWR-Dc-ZKopU.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-CluIMNDx.js b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-CluIMNDx.js deleted file mode 100644 index c355d65f1..000000000 --- a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-CluIMNDx.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import"./chunk-OSK3NFVY-BT2Y-lqQ.js";import"./chunk-F27PBJKO-DeO1S11A.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-BCRCUUP_.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import"./chunk-TLUHSLCS-DN2eHVWx.js";import{i as t,n,r,t as i}from"./chunk-IMKFNOWR-DWwC1m5B.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-LlowpFhm.js b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-LlowpFhm.js new file mode 100644 index 000000000..2ad6ff602 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/stateDiagram-v2-MP3YSRHH-LlowpFhm.js @@ -0,0 +1 @@ +import"./src-CDd1avoI.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CbPIJzjs.js";import"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import"./chunk-GVQU2GXP-CCw5T6ST.js";import"./mermaidParser.worker-CBWarbNh.js";import"./chunk-F27PBJKO-DTzbeXt1.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-1k8n9Sa3.js";import{i as t,n,r,t as i}from"./chunk-IMKFNOWR-BY2CmrFo.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-Bx-Gt6De.js b/apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-COa5RBg1.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-Bx-Gt6De.js rename to apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-COa5RBg1.js index fb0ba597e..77713048e 100644 --- a/apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-Bx-Gt6De.js +++ b/apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-COa5RBg1.js @@ -1 +1 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CcF2nKWM.js";import"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import"./chunk-GVQU2GXP-aw9OR1ii.js";import{s as n,vt as r}from"./mermaidParser.worker-_pLIm6No.js";var i=5,a=1e-5,o=1e-6;function s(e){let t=[];for(let n=0;n=1-o||p<=o||p>=1-o?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}t(c,`segmentIntersection`);function l(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}t(l,`isHorizontalSeg`);function u(e){let t=[];for(let n=0;n=Math.abs(n)?+(t>=0):+(n>=0)}t(p,`getArcSweepFlag`);var m=.001;function h(e,t){if(e.length<2)return e.map(e=>({...e}));let n=e.map(e=>({...e})),i=t.arrowTypeStart&&r[t.arrowTypeStart];if(i){let t=e[0],r=e[1],a=Math.atan2(r.y-t.y,r.x-t.x);n[0].x=t.x+i*Math.cos(a),n[0].y=t.y+i*Math.sin(a)}let a=t.arrowTypeEnd&&r[t.arrowTypeEnd];if(a){let t=e.length,r=e[t-2],i=e[t-1],o=Math.atan2(i.y-r.y,i.x-r.x);n[t-1].x=i.x-a*Math.cos(o),n[t-1].y=i.y-a*Math.sin(o)}return n}t(h,`applyMarkerOffsets`);function g(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${f(s)}`];return i===`arc`?l.push(`A${d(e.r)},${d(e.r)} 0 0 ${r} ${f(c)}`):l.push(`M${f(c)}`),l}t(g,`emitJump`);function _(e,t,n,r){let i=t.x-e.x,o=t.y-e.y,s=n.x-t.x,c=n.y-t.y,l=Math.hypot(i,o),u=Math.hypot(s,c);if(l0){let t=_(a[e-1],a[e],a[e+1]??a[e],i);t&&(y=t.cutLen)}let b=r,x=null;o&&ee.t-t.t);for(let e of S)e.r=Math.min(e.r,e.d-y,b-e.d);for(let e=0;et){let n=t/2;S[e].r=Math.min(S[e].r,n),S[e+1].r=Math.min(S[e+1].r,n)}}for(let e of S)e.r=2?r:null}catch{return null}}t(x,`decodeDataPoints`);function S(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=[],o=new Map;for(let e of t){let t=typeof CSS<`u`&&CSS.escape?CSS.escape(e.id):e.id,n=r.querySelector(`path[data-id="${t}"]`);if(!n)continue;o.set(e.id,n);let i=x(n.getAttribute(`data-points`))??e.points;a.push({...e,points:i})}let s=u(a);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of a){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!b(r))continue;let a=o.get(e.id);if(!a||r===void 0&&!y(a.getAttribute(`d`)??``))continue;let s=a.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=v(e,t,n);if(a.setAttribute(`d`,f),u!==null&&d!==null&&typeof a.getTotalLength==`function`){let e=a.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);a.setAttribute(`style`,n)}}}t(S,`applyLineJumpsToSvg`);function C(e,{measure:t}){let n=e.config?.swimlane?.lineHops;if(n===!1)return;let r=n===`gap`?`gap`:`arc`,i=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));S(t.groups.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:r})}t(C,`applySwimlaneLineJumps`);var w=`__swimlane_default__`,T=21,E=20;function D(e){return Math.max(e.padding??E,E)}t(D,`topLaneHorizontalPadding`);function O(e){let{x:t,y:n,width:r,height:i}=e,a=e.swimlaneContentTop;if(typeof t!=`number`||typeof n!=`number`||typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||r<=0||i<=0){delete e.groupTitleRect;return}let o=n-i/2,s=Math.min(a,n+i/2),c=o+Math.min(T,Math.max(0,s-o));if(c<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:o,bottom:c}}t(O,`assignTopLaneTitleRect`);function k(e){let t=e.direction,n=e.nodes??=[];for(let n of e.nodes??[])n.isGroup&&!n.parentId&&(n.shape=`swimlane`,t&&(n.direction=t));let r=n.filter(e=>!e.isGroup&&!e.parentId);if(r.length===0)return;let i=n.find(e=>e.id===w);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:w,label:``,isGroup:!0,shape:`swimlane`,padding:20,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=w}t(k,`prepareLayoutForSwimlanes`);function A(e){let t=new Map;for(let n of e.nodes??[])t.set(n.id,n);let n=[];for(let t of e.edges??[]){let e=typeof t.start==`string`?t.start:void 0,r=typeof t.end==`string`?t.end:void 0;!e||!r||t.labelNodeId||n.push({id:t.id,src:e,dst:r,ref:t})}let r=e.nodes??[],i=r.filter(e=>e.isGroup),a=r.filter(e=>!e.isGroup);return{nodes:[...[...i].reverse(),...a].map(e=>e.id),edges:n,layout:e,nodeById:t}}t(A,`toGraphView`);function j(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,c=0;for(let e of t.layers){let t=0;for(let r of e){let e=a.get(r);if(!e){t++;continue}e.layer=c,e.order=t;let i=n.x[r]??t*s,l=n.y[r]??c*o;e.x=i,e.y=l,t++}c++}let l=i.nodes??[],u=new Map,d=[];for(let e of l){if(!e?.isGroup)continue;e.parentId||d.push(e);let t=l.filter(t=>t.parentId===e.id),r=1/0,i=-1/0,a=1/0,o=-1/0;for(let e of t){let t=e.x??n.x[e.id],s=e.y??n.y[e.id],c=e.width??0,l=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-c/2),i=Math.max(i,t+c/2),a=Math.min(a,s-l/2),o=Math.max(o,s+l/2))}if(r===1/0||a===1/0)e.x=e.x??0,e.y=e.y??0,e.width=e.width??0,e.height=e.height??0;else{let t=e.padding??20,n=e.parentId?t:2*D(e),s=t,c=Math.max(0,i-r)+n,l=Math.max(0,o-a)+s,d=(r+i)/2,f=(a+o)/2;e.x=d,e.y=f,e.width=c,e.height=l,u.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(d.length>0&&u.size>0){let e=1/0,t=-1/0,n=0;for(let r of d){let i=r.padding??20;i>n&&(n=i);let a=u.get(r.id);a&&(e=Math.min(e,a.minY),t=Math.max(t,a.maxY))}if(e!==1/0&&t!==-1/0){let r=Math.max(0,t-e)+2*Math.max(n,36),i=(e+t)/2;for(let t of d)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...d].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],c=[];for(let e of a){let t=u.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*D(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),c.push(n)}let l=o.length;if(l>0){let e=new Map;if(l===1)e.set(o[0],c[0]);else{let t=[];for(let e=0;e0&&i>0?{cx:t,cy:n,rect:se(t,n,r,i)}:void 0}t(ne,`measuredNodeRect`);function N(e){if(e.isGroup)return;let t=ne(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}t(N,`nodeBoundsInfoFor`);function P(e,t,n=M){return Math.abs(e.x-t.x)n}t(L,`isHorizontalSegment`);function R(e,t,n=M){return F(e,t,n)&&Math.abs(e.y-t.y)>n}t(R,`isVerticalSegment`);function z(e,t,n,r){return Math.max(0,Math.min(Math.max(e,t),Math.max(n,r))-Math.max(Math.min(e,t),Math.min(n,r)))}t(z,`overlapLength`);function B(e,t,n=M){return e.horizontal&&t.horizontal&&I(e.a,t.a,n)?z(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&F(e.a,t.a,n)?z(e.a.y,e.b.y,t.a.y,t.b.y):0}t(B,`sameAxisSegmentOverlapLength`);function re(e,t=M){let n=[];for(let r=0;r0?n[n.length-1]:void 0;(!e||!P(e,r,t))&&n.push({x:r.x,y:r.y})}return n}t(H,`dedupeConsecutivePoints`);function ie(e,t=M){if(!e||e.length!==4)return;let[n,r,i,a]=e;return L(n,r,t)&&R(r,i,t)&&L(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:R(n,r,t)&&L(r,i,t)&&R(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}t(ie,`classifyThreeSegmentRoute`);function ae(e,t,n,r=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return a>n.left-r&&in.top-r&&ot.left+n&&e.xt.top+n&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}t(W,`rectContainsRect`);function G(e,t){return e.leftt.left&&e.topt.top}t(G,`rectsOverlap`);function oe(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}t(oe,`inflateRect`);function se(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}t(se,`rectFromCenterSize`);function K(e){return ne(e)?.rect}t(K,`rectOfNodeBounds`);function ce(e,t){switch(t){case`top`:return{x:e.cx,y:e.rect.top};case`bottom`:return{x:e.cx,y:e.rect.bottom};case`left`:return{x:e.rect.left,y:e.cy};case`right`:return{x:e.rect.right,y:e.cy}}}t(ce,`portForRectSide`);function le(e,t,n,r,i,a=M){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.xn.x){if(I(e,n,a))return[e,n];let t=(e.x+n.x)/2;return[e,{x:t,y:e.y},{x:t,y:n.y},n]}if(t===r){if(I(e,n,a))return;let r=t===`left`?Math.min(e.x,n.x)-i:Math.max(e.x,n.x)+i;return[e,{x:r,y:e.y},{x:r,y:n.y},n]}return}if(!o&&!s){if(t===r){if(F(e,n,a))return;let r=t===`top`?Math.min(e.y,n.y)-i:Math.max(e.y,n.y)+i;return[e,{x:e.x,y:r},{x:n.x,y:r},n]}if(!(t===`bottom`&&r===`top`&&e.yn.y))return;if(F(e,n,a))return[e,n];let o=(e.y+n.y)/2;return[e,{x:e.x,y:o},{x:n.x,y:o},n]}if(o&&!s){let i=t===`right`&&n.x>e.x||t===`left`&&n.xn.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let c=t===`bottom`&&n.y>e.y||t===`top`&&n.yn.x;return c&&l?[e,{x:e.x,y:n.y},n]:void 0}t(le,`buildOrthogonalPortPath`);function ue(e,t,n,r){return t===`left`||t===`right`?[e,{x:r,y:e.y},{x:r,y:n.y},n]:[e,{x:e.x,y:r},{x:n.x,y:r},n]}t(ue,`buildSameSideTrackPath`);function de(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=N(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}t(de,`collectRealNodeBounds`);function q(e){let t=[],n=[];for(let r of e){let e=N(r);if(!e)continue;let i={id:e.id,rect:e.rect};r.isEdgeLabel?n.push(i):t.push(i)}return{realNodeRects:t,labelNodeRects:n}}t(q,`collectNodeRectEntries`);function fe(e,{includeEdgeLabels:t=!0}={}){let n=[];for(let r of e){if(r.isGroup||!t&&r.isEdgeLabel)continue;let e=r.x??0,i=r.y??0,a=r.width??0,o=r.height??0;n.push({nodeId:r.id,...se(e,i,a,o)})}return n}t(fe,`collectLayoutNodeRects`);function pe(e,t,n=M){let r=e.start,i=e.end;if(!r||!i)return;let a=t.get(r),o=t.get(i);if(!(!a||!o))return{srcId:r,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)m||f_)return!1;let v=Math.abs(h-u.a.x)i:a&&s&&I(e,n,i)?z(e.x,t.x,n.x,r.x)>i:!1}t(he,`sameAxisSegmentsOverlap`);function ge(e,t,n,r,{epsilon:i=M,skipDegenerateOther:a=!1}={}){for(let o of n){if(o===r||o.isLayoutOnly)continue;let n=o.points;if(!(!n||n.length<2))for(let r=0;rf+i&&mh+i&&dr+M&&e=2?t[t.length-2]:void 0,n=e&&F(e,r)?{x:r.x,y:i.y}:{x:i.x,y:r.y};t.push(n)}t.push(i)}let n=[];for(let e of t){let t=n[n.length-1];(!t||!P(t,e))&&n.push(e)}return n}t(xe,`orthogonalizePolyline`);function Se(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=be(t);if(t=e.points,!e.changed)break}return t}t(Se,`simplifyPolyline`);var Y=.001,Ce=.5,we=4;function Te(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length=0&&i=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=Ee(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}t(De,`clipEndpoint`);function Oe(e,t){for(let n of e){let e=Te(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=De(r,e.srcRect,!0)),e.dstRect&&(r=De(r,e.dstRect,!1)),r=Se(xe(r)),r=ze(r,e.srcRect,e.dstRect),e.edge.points=Se(xe(r))}}t(Oe,`clipEdgeEndpointsToNodeBoundaries`);function ke(e,t,n,r=!1){if(I(e,t,Y)){if(t.yn.bottom+Y)return t;if(r){if(e.xn.right+Y)return{x:n.right,y:e.y}}return{x:Math.abs(t.x-n.left)<=Math.abs(t.x-n.right)?n.left:n.right,y:e.y}}if(F(e,t,Y)){if(t.xn.right+Y)return t;if(r){if(e.yn.bottom+Y)return{x:e.x,y:n.bottom}}let i=Math.abs(t.y-n.top)<=Math.abs(t.y-n.bottom);return{x:e.x,y:i?n.top:n.bottom}}return t}t(ke,`snapEndpointToBoundary`);function Ae(e,t,n){let r=e[t];for(let i=t+n;i>=0&&ie.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}t(Ne,`intersectRanges`);function Pe(e,t){return t===`left`||t===`right`?je(e.top,e.bottom):je(e.left,e.right)}t(Pe,`clearanceRangeForSide`);function Fe(e,t,n){let r=e.y>=n.top-Y&&e.y<=n.bottom+Y,i=e.x>=n.left-Y&&e.x<=n.right+Y;if(I(e,t,Y)&&r){if(Math.abs(e.x-n.left)0?Ne(a):void 0}t(Le,`straightClearanceRange`);function Re(e,t,n,r,i){let a=Le(e,t,n,r,i);if(!a)return;let o=i?e.y:e.x,s=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(s-o)({...e}));for(let s=t;s>=0&&s=n.left-Y&&Math.max(e.x,t.x)<=n.right+Y,i=Math.min(e.y,t.y)>=n.top-Y&&Math.max(e.y,t.y)<=n.bottom+Y;if(Math.abs(e.y-n.top)r.bottom+Y;case`left`:return I(t,n,Y)&&n.xr.right+Y}}t(We,`leavesOutward`);function Ge(e,t,n){if(e.length<3)return e;if(n){let n=Ue(e[0],e[1],t);return n&&We(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=Ue(e[r-1],e[r],t);return i&&We(i,e[r-1],e[r-2],t)?e.slice(0,r):e}t(Ge,`collapseOwnBorderStub`);function Ke(e,t,n){let r=e;if(t){let e=Ae(r,0,1);if(e){let n=ke(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=Ge(r,t,!0)}if(n){let e=r.length-1,t=Ae(r,e,-1);if(t){let i=ke(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=Ge(r,n,!1)}let i=ze(r,t,n);return i!==r||r.length===2?i:(t&&(r=He(r,t,!0)),n&&(r=He(r,n,!1)),r)}t(Ke,`snapAndCollapseEndpoints`);function qe(e,t){for(let n of e){let e=Te(n,t,2);if(!e)continue;let r=Ke(H(e.points,Y),e.srcRect,e.dstRect);if(r.length<3){e.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];e.edge.points=i}}t(qe,`prepareEdgeEndpointsForRenderer`);function Je(e){return new Map(e.map(e=>[e.id,e]))}t(Je,`buildNodeMap`);function Ye(e,t){let n=e.parentId,r=null;for(;n;){let e=t.get(n);if(!e?.isGroup)break;r=e.id,n=e.parentId}return r}t(Ye,`resolveTopLevelGroupId`);function Xe(e,t){let n=0,r=e.parentId;for(;r;){let e=t.get(r);if(!e?.isGroup)break;n++,r=e.parentId}return n}t(Xe,`groupDepth`);function Ze(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a of e){let e=a.x,o=a.y;if(typeof e!=`number`||typeof o!=`number`)continue;let s=a.width??0,c=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}t(Ze,`boundsForChildren`);function Qe(e,t){let n=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+n,e.height=Math.max(0,t.maxY-t.minY)+n}t(Qe,`applyGroupBounds`);function $e(e){let t=Je(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>Xe(n,t)-Xe(e,t));for(let t of n){let n=Ze(e.filter(e=>e.parentId===t.id));n&&Qe(t,n)}}t($e,`recomputeNestedGroupBounds`);function et(e,n){let r=e.nodes??[],i=e.edges??[],a=r.filter(e=>!e.isGroup),o=1/0,s=-1/0;for(let e of a){let t=e[n];typeof t==`number`&&(o=Math.min(o,t),s=Math.max(s,t))}if(!Number.isFinite(o)||!Number.isFinite(s))return!1;let c=t(e=>o+s-e,`mirror`);for(let e of r){let t=e[n];typeof t==`number`&&(e[n]=c(t));let r=e.groupTitleRect;r&&(e.groupTitleRect=n===`x`?{...r,left:c(r.right),right:c(r.left)}:{...r,top:c(r.bottom),bottom:c(r.top)})}for(let e of i)for(let t of e.points??[])t[n]=c(t[n]);return!0}t(et,`mirrorAxis`);function tt(e){return(e.nodes??[]).some(e=>!e.isGroup)?et(e,`y`):!0}t(tt,`applyBtDirectionTransform`);function nt(e,t=`LR`){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=1/0;for(let e of i){let t=e.x??0,n=e.y??0;t0?Math.max(1,l/u):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*d+36,r=t-a;e.x=n,e.y=r}for(let e of r)if(e.points)for(let t of e.points){let e=t.x,n=(t.y-o)*d+36,r=e-a;t.x=n,t.y=r}$e(n);let f=n.filter(e=>e.isGroup&&!e.parentId);if(f.length===0)return t===`RL`&&et(e,`x`),!0;let p=Je(n),m=new Map;for(let e of n){if(e.isGroup)continue;let t=Ye(e,p);if(!t)continue;let n=m.get(t)??[];n.push(e),m.set(t,n)}let h=0;for(let e of f){let t=e.padding??0;t>h&&(h=t)}let g=[],_=1/0,v=-1/0;for(let e of f){let t=Ze(m.get(e.id)??[]);t&&(_=Math.min(_,t.minX),v=Math.max(v,t.maxX),g.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(_===1/0||v===-1/0)return!0;let y=Math.max(0,v-_)+2*Math.max(h,10),b=36+y,x=(_+v)/2-y/2-36,S=x+b/2,C=Math.max(h,36);g.sort((e,t)=>e.centerY-t.centerY);for(let e=0;ed.cy?g.bottom:g.top,t=d.cx+n;if(t<=g.left+rt||t>=g.right-rt)continue;i={x:t,y:e},a={x:t,y:o.y},c={x:o.x,y:o.y}}else{let e=f.cx>d.cx?g.right:g.left,t=d.cy+n;if(t<=g.top+rt||t>=g.bottom-rt)continue;i={x:e,y:t},a={x:o.x,y:t},c={x:o.x,y:o.y}}let p=P(i,a,rt),m=P(a,c,rt);if(p&&m||!p&&J(i,a,r,[l],1)||!m&&J(a,c,r,[u],1))continue;let _=!p&&ge(i,a,e,t,{epsilon:rt,skipDegenerateOther:!0}),v=!m&&ge(a,c,e,t,{epsilon:rt,skipDegenerateOther:!0});if(!(_||v)){h=p?[a,c]:m?[i,a]:[i,a,c];break}}h&&(t.points=h)}}t(ot,`portSwapToLShape`);function st(e,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=q(n.values());for(let o of e){if(o.isLayoutOnly)continue;let s=o.points;if(!s||s.length<4)continue;let c=H(s,r);if(c.length<4)continue;let l=c.length-1,u=c[l],d=c[l-1],f=c[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h0;O={x:f.x,y:E},k={x:e?D.right:D.left,y:E}}if(J(O,k,i,S?[S]:[],-2)||J(O,k,a,[],-2))continue;if(C){let e=n.get(C),t=e?K(e):void 0;if(t&&U(O,t,2))continue}let A=t((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),j=new Set;for(let e=0;e{for(let i of e){if(i===o||i.isLayoutOnly)continue;let e=i.points;if(!(!e||e.length<2))for(let i=0;i=0){let e=c[l-3],t=[C,S].filter(e=>!!e);if(J(e,O,i,t,-2)||ee(e,O))continue}let te=[...c.slice(0,l-2),O,k];o.points=te;let M=o.labelNodeId;if(M){let e=n.get(M);if(e){let t=e.width??0,n=e.height??0;if(t>0&&n>0){let i,a,o=-1;for(let e=0;e=t+2||d&&l>=n+2)&&l>o&&(o=l,i=(s.x+c.x)/2,a=(s.y+c.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}t(st,`collapseShortTerminalStub`);var X=.001,Z=8,Q=re,ct=t((e,t)=>F(e,t,X)||I(e,t,X),`orthogonallyAligned`);function lt(e,n){let r=t((e,t)=>{let n=e.x??0,r=e.y??0,i=t.x-n,a=t.y-r,o=(e.width??0)/2,s=(e.height??0)/2;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),{x:n+(a===0?0:s*i/a),y:r+s}):(i<0&&(o=-o),{x:n+o,y:r+(i===0?0:o*a/i)})},`rectIntersect`),i=t((e,t)=>{let i=H(e.points??[]);if(i.length<2)return;let a=t?e.start:e.end,o=a?n.get(a):void 0,s=o?K(o):void 0;if(!o||!a||!s)return;let c=t?i[0]:i[i.length-1],l=t?i[1]:i[i.length-2],u=r(o,c),d=c;if(ct(l,u)&&(d=l),F(u,d,X))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`V`,coord:u.x,min:Math.min(u.y,d.y),max:Math.max(u.y,d.y),boundary:u,railEnd:d,rect:s};if(I(u,d,X))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`H`,coord:u.y,min:Math.min(u.x,d.x),max:Math.max(u.x,d.x),boundary:u,railEnd:d,rect:s}},`terminalLaneFor`),a=t((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),o=t((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:e.orientation===`H`?(Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1)&&F(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&I(e.boundary,t.boundary,1),`sameTerminalFace`),s=t((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:a(e,t)>=Z&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),c=t((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=a(e,t);if(n2*r?!1:o(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=t((e,n)=>{let r=H(e.edge.points??[]);if(r.length<2)return;let i=e.orientation===`V`?{x:e.boundary.x+n,y:e.boundary.y}:{x:e.boundary.x,y:e.boundary.y+n},a=e.orientation===`V`?{x:e.railEnd.x+n,y:e.railEnd.y}:{x:e.railEnd.x,y:e.railEnd.y+n};if(!t(()=>Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1?I(i,e.boundary,X)&&i.x>=e.rect.left+1&&i.x<=e.rect.right-1:Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1?F(i,e.boundary,X)&&i.y>=e.rect.top+1&&i.y<=e.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(e.atStart){let t=r.length>1&&P(r[1],e.railEnd,X),n=r.slice(t?2:1),o=n[0];return o&&!ct(o,a)?void 0:[i,a,...n]}let o=r.length>1&&P(r[r.length-2],e.railEnd,X),s=r.slice(0,o?-2:-1),c=s[s.length-1];if(!(c&&!ct(c,a)))return[...s,a,i]},`shiftedCandidate`),u=t(e=>{let t=e.edge,r=H(t.points??[]);if(r.length!==2)return!1;let i=t.start,a=t.end,o=i?n.get(i):void 0,s=a?n.get(a):void 0;if(!o||!s)return!1;let c=o.x??0,l=o.y??0,u=s.x??0,d=s.y??0,[f,p]=r;return I(f,p,X)&&Math.abs(l-d)<1&&Math.abs(c-u)>1||F(f,p,X)&&Math.abs(c-u)<1&&Math.abs(l-d)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let t=0;t<8;t++){let t=e.filter(e=>!e.isLayoutOnly).flatMap(e=>[i(e,!0),i(e,!1)]).filter(e=>!!e),n=!1;for(let e=0;e{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let e of p){for(let r of d){let a=l(e,r);if(!a)continue;let o=i({...e.edge,points:a},e.atStart);if(!(!o||t.some(t=>t.edge!==e.edge&&(s(o,t)||f&&c(o,t))))){e.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}t(lt,`separateSharedRenderedTerminalLanes`);function ut(e,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=t((t,n)=>{let a=t.start,o=t.end,s=Q(n);if(s.length!==n.length-1)return!1;let c=[a,o].filter(e=>!!e);for(let e of s)if(J(e.a,e.b,r,c,-2)||J(e.a,e.b,i,[],-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of s)for(let n of Q(H(e)))if(B(t,n,.5)>=Z||_e(t.a,t.b,n.a,n.b,X))return!1}}return!0},`candidateIsSafe`),o=t((e,t)=>{if(t+4>=e.length)return;let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=L(n,r)&&R(r,i)&&L(i,a)&&R(a,o)&&F(n,a,X)&&F(n,o,X)&&F(r,i,X)&&(r.x-n.x)*(a.x-i.x)<0,c=R(n,r)&&L(r,i)&&R(i,a)&&L(a,o)&&I(n,a,X)&&I(n,o,X)&&I(r,i,X)&&(r.y-n.y)*(a.y-i.y)<0;if(s||c)return H([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let l=e[t+5],u=R(n,r)&&L(r,i)&&R(i,a)&&L(a,o)&&R(o,l)&&F(n,o,X)&&F(n,l,X)&&F(i,a,X)&&(i.x-r.x)*(o.x-a.x)<0,d=L(n,r)&&R(r,i)&&L(i,a)&&R(a,o)&&L(o,l)&&I(n,o,X)&&I(n,l,X)&&I(i,a,X)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!u&&!d))return H([...e.slice(0,t+1),l,...e.slice(t+6)])},`withoutDogleg`);for(let t=0;t<8;t++){let t=!1;for(let n of e){if(n.isLayoutOnly)continue;let e=H(n.points??[]);for(let r=0;r<=e.length-5;r++){let i=o(e,r);if(!(!i||!a(n,i))){n.points=i,t=!0;break}}if(t)break}if(!t)return}}t(ut,`collapseRedundantRectangularDoglegs`);function dt(e,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t,n)=>H(e===t?n??[]:e.points??[]),`pointsFor`),s=t((e,t)=>{let n=0;for(let r=0;r{let t=Q(e);if(t.length!==3)return;let n=t[1];if(!(t[0].horizontal===n.horizontal||t[2].horizontal===n.horizontal))return{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}},`middleRail`),l=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);return r.filter(e=>{if(n.includes(e.id))return!1;let r=e.rect;return t.horizontal?z(t.a.x,t.b.x,r.left,r.right)>=Z&&t.a.y>=r.top-2&&t.a.y<=r.bottom+2:z(t.a.y,t.b.y,r.top,r.bottom)>=Z&&t.a.x>=r.left-2&&t.a.x<=r.right+2})},`blockingRectsFor`),u=t((e,t,n)=>{let r=e.map(e=>({...e}));if(t.horizontal)r[t.index].y=n,r[t.index+1].y=n;else if(t.vertical)r[t.index].x=n,r[t.index+1].x=n;else return;let i=Se(H(r));return Q(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=t((e,t,n)=>{let c=[e.start,e.end].filter(e=>!!e),l=Q(t);if(l.length!==t.length-1)return!1;for(let e of l)if(J(e.a,e.b,r,c,-2)||J(e.a,e.b,i,[],-2))return!1;for(let t of a)if(t!==e){for(let e of l)for(let n of Q(o(t)))if(B(e,n,.5)>=Z)return!1}return s(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t=!1;for(let n of a){let r=o(n),i=c(r);if(!i)continue;let a=l(n,i.segment);if(a.length===0)continue;let s=i.horizontal?[Math.min(...a.map(e=>e.rect.top))-20,Math.max(...a.map(e=>e.rect.bottom))+20]:[Math.min(...a.map(e=>e.rect.left))-20,Math.max(...a.map(e=>e.rect.right))+20];for(let a of s){let o=u(r,i.segment,a);if(!(!o||!d(n,o,e))){n.points=o,t=!0;break}}if(t)break}if(!t)return}}t(dt,`liftObstacleHuggingSameSideRails`);function ft(e,n){let r=t(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=t(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,n=typeof t==`string`?t.toUpperCase():``;if(n===`LR`||n===`RL`||n===`BT`)return;let i=r(e),a=e.y,o=e.height;if(!i||typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return;let s=i.right-i.left,c=i.bottom-i.top;if(!(c<=0||s{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+X||n>=t.bottom-X?!1:z(e.a.x,e.b.x,t.left,t.right)>=Z},`horizontalSegmentIntersectsTitle`),o=[...n.values()].map(i).filter(e=>!!e);if(o.length===0)return;let s=0;for(let t of e){if(t.isLayoutOnly)continue;let e=H(t.points??[]);for(let t of Q(e))for(let e of o)a(t,e.rect)&&(s=Math.max(s,e.rect.bottom-t.a.y+4))}if(!(s<=X))for(let e of o){let t=e.node.y,n=e.node.height;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.y=t-s/2,e.node.height=n+s,e.node.groupTitleRect={...e.rect,top:e.rect.top-s,bottom:e.rect.bottom-s})}}t(ft,`liftTopLaneTitleBandsAboveRails`);function pt(e,n){let r=t(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=t(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=r(e),n=e.x,i=e.width;if(!t||typeof n!=`number`||typeof i!=`number`||!Number.isFinite(n)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+X||n>=t.right-X?!1:z(e.a.y,e.b.y,t.top,t.bottom)>=Z},`verticalSegmentIntersectsTitle`),o=t((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+X||n>=t.bottom-X?!1:z(e.a.x,e.b.x,t.left,t.right)>=Z},`horizontalSegmentIntersectsTitle`),s=[...n.values()].map(i).filter(e=>!!e);if(s.length===0)return;let c=0;for(let t of e){if(t.isLayoutOnly)continue;let e=H(t.points??[]);for(let t of Q(e))for(let e of s)if(a(t,e.rect))c=Math.max(c,e.rect.right-t.a.x+4);else if(o(t,e.rect)){let n=Math.min(t.a.x,t.b.x);c=Math.max(c,e.rect.right-n+4)}}if(!(c<=X))for(let e of s){let t=e.node.x,n=e.node.width;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.x=t-c/2,e.node.width=n+c,e.node.groupTitleRect={...e.rect,left:e.rect.left-c,right:e.rect.right-c})}}t(pt,`shiftLeftLaneTitleBandsLeftOfRails`);function mt(e,n){let{realNodeRects:r}=q(n.values()),i=e.filter(e=>!e.isLayoutOnly),a=t((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),o=t((e=new Map)=>{let t=0;for(let n=0;ni.reduce((t,n)=>t+V(a(n,e)),0),`totalBends`),c=t(e=>{let t=a(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!L(n,r,X)&&!R(n,r,X)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=t((e,t)=>{let n=a(e);if(n.length<3)return;let r=n[0],i=n[1],o;if(L(r,i,X))o={x:i.x,y:t.tailStart.y};else if(R(r,i,X))o={x:t.tailStart.x,y:i.y};else return;let s=Se(H([r,i,o,t.tailStart,t.terminal]));return Q(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Q(t))if(J(e.a,e.b,r,n,-2))return!0;return!1},`pathHasNodeHit`),d=t((e,t,n)=>{for(let r of i)if(r!==e){for(let e of Q(t))for(let t of Q(a(r,n)))if(B(e,t,.5)>=Z)return!0}return!1},`pathHasSharedTrack`),f=t((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=t(()=>{let e=new Map;for(let t of i){let r=t.end;if(!r||!n.has(r)||a(t).length<4)continue;let i=e.get(r)??[];i.push(t),e.set(r,i)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t=s(),n,r=e,i=t;for(let t of p().values())for(let a=0;a=e||y>r||y===r&&b>=i||(n=v,r=y,i=b)}if(!n)return;for(let[e,t]of n)e.points=t}}t(mt,`swapDestinationTerminalTailsToReduceCrossings`);function ht(e,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),s=t((e=new Map)=>{let t=0;for(let n=0;na.reduce((t,n)=>t+V(o(n,e)),0),`totalBends`),l=t(e=>{let t=e.start,r=e.end,i=t?n.get(t):void 0,a=r?n.get(r):void 0,o=i?K(i):void 0,s=a?K(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=t((e,t,n)=>{if(n.index<=0||n.index+1>=t.length-1)return;let r=l(e);if(r){if(n.vertical){let i=n.a.x,a=Math.min(r.src.left,r.dst.left),o=Math.max(r.src.right,r.dst.right),s=io+X?`right`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`vertical`,side:s,coord:i,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}:void 0}if(n.horizontal){let i=n.a.y,a=Math.min(r.src.top,r.dst.top),o=Math.max(r.src.bottom,r.dst.bottom),s=io+X?`bottom`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`horizontal`,side:s,coord:i,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}:void 0}}},`externalRailForSegment`),d=t(()=>{let e=[];for(let t of a){let n=o(t);for(let r of Q(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=t((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&z(e.min,e.max,t.min,t.max)>=Z,`railsInteract`),p=t(e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;let i=[r],a=[];for(n.add(r);i.length>0;){let t=i.pop();a.push(t);for(let r of e)!n.has(r)&&f(t,r)&&(n.add(r),i.push(r))}a.length>1&&t.push(a)}return t},`connectedComponents`),m=t(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord){let n=e.map(e=>e.coord),r=m(e),i=[];if(e.length<=6){let a=Array(r.length).fill(!1),o=[],s=t(()=>{if(o.length===e.length){o.some((e,t)=>Math.abs(e-n[t])>=X)&&i.push([...o]);return}for(let[e,t]of r.entries())a[e]||(a[e]=!0,o.push(t),s(),o.pop(),a[e]=!1)},`visit`);return s(),i}for(let e=0;e{let n=new Map;for(let[r,i]of e.entries()){let e=t[r],a=n.get(i.edge)??i.points.map(e=>({x:e.x,y:e.y}));i.axis===`vertical`?(a[i.segmentIndex].x=e,a[i.segmentIndex+1].x=e):(a[i.segmentIndex].y=e,a[i.segmentIndex+1].y=e),n.set(i.edge,a)}let r=new Map;for(let[e,t]of n){let n=Se(H(t));if(Q(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=t(e=>{for(let[t,n]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Q(n))if(J(t.a,t.b,r,e,-2)||J(t.a,t.b,i,[],-2))return!1}for(let t=0;t=Z)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=s();if(e===0)return;let t,n=e,r=c(),i=1/0;for(let a of p(d()))for(let o of h(a)){let l=g(a,o);if(!l||!_(l))continue;let u=s(l);if(u>=e)continue;let d=c(l),f=a.reduce((e,t,n)=>e+Math.abs(o[n]-t.coord),0);u>n||u===n&&(d>r||d===r&&f>=i)||(t=l,n=u,r=d,i=f)}if(!t)return;for(let[e,n]of t)e.points=n}}t(ht,`reassignCrossingExternalRailChannels`);function gt(e,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t,n)=>H(e===t?n??[]:e.points??[]),`pointsFor`),s=t(e=>Q(e).reduce((e,t)=>{let n=t.a.x-t.b.x,r=t.a.y-t.b.y;return e+Math.hypot(n,r)},0),`pathLength`),c=t((e,t)=>{let n=0;for(let r=0;r{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&z(e.a.x,e.b.x,t.left,t.right)>=Z}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&z(e.a.y,e.b.y,t.top,t.bottom)>=Z}return!1},`segmentRunsAlongRectBorder`),u=t(e=>{let t=[e.start,e.end].filter(e=>!!e),r=[];for(let e of t){let t=n.get(e),i=t?K(t):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=t((e,t)=>{if(t+3>=e.length)return[];let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=L(n,r,X)&&R(r,i,X)&&L(i,a,X),s=R(n,r,X)&&L(r,i,X)&&R(i,a,X);if(!o&&!s||!(o?Math.sign(r.x-n.x)!==Math.sign(a.x-i.x):Math.sign(r.y-n.y)!==Math.sign(a.y-i.y)))return[];let c=F(n,a,X)||I(n,a,X)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],l=c.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:c.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),u=new Set;return l.map(e=>Se(H(e))).filter(e=>{if(Q(e).length!==e.length-1||!e.some(e=>P(e,a,X)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return u.has(t)?!1:(u.add(t),!0)})},`shortcutCandidatesAt`),f=t((e,t,n)=>{let s=[e.start,e.end].filter(e=>!!e),d=u(e);for(let e of Q(t))if(J(e.a,e.b,r,s,-2)||J(e.a,e.b,i,[],-2)||d.some(t=>l(e,t)))return!1;for(let n of a)if(n!==e){for(let e of Q(t))for(let t of Q(o(n)))if(B(e,t,.5)>=Z)return!1}return c(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=c(),t,n,r=e,i=1/0,l=1/0;for(let u of a){let a=o(u),p=V(a,X),m=s(a);for(let o=0;o<=a.length-4;o++)for(let h of d(a,o)){let a=V(h,X),o=s(h);if(!(ar||d===r&&(a>i||a===i&&o>=l)||(t=u,n=h,r=d,i=a,l=o)}}if(!t||!n)return;t.points=n}}t(gt,`shortcutRedundantOrthogonalJogs`);function _t(e,n){let r=[];for(let e of n.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,n=e.y??0,i=K(e);i&&r.push({id:String(e.id??``),cx:t,cy:n,rect:i})}if(r.length===0)return;let i=new Map(r.map(e=>[e.id,e])),a=r.map(e=>({id:e.id,rect:e.rect})),o=[`top`,`bottom`,`left`,`right`],s={top:Math.min(...r.map(e=>e.rect.top))-20,bottom:Math.max(...r.map(e=>e.rect.bottom))+20,left:Math.min(...r.map(e=>e.rect.left))-20,right:Math.max(...r.map(e=>e.rect.right))+20},c=e.filter(e=>!e.isLayoutOnly),l=new Map(c.map((e,t)=>[e,t])),u=t(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(s[e]+t*20*r);return n},`outwardTracksForSide`),d=t((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),f=t((e,t)=>{let n=0;for(let r of e)for(let e of t)_e(r.a,r.b,e.a,e.b,X)&&n++;return n},`crossingCountBetweenSegments`),p=t((e,t)=>f(Q(e),Q(t)),`crossingCountBetweenPaths`),m=t((e=new Map)=>{let n=0,r=[],i=new Set,a=[],o=t(e=>{i.has(e)||(i.add(e),a.push(e))},`addEdge`);for(let t=0;t0&&(n+=l,r.push({first:i,second:t,count:l}),o(i),o(t))}}return a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:n,pairs:r,edgeSet:i,edges:a}},`crossingSnapshot`),h=t((e,t)=>{let n=new Set(t.keys());if(n.size===0)return e.count;let r=0;for(let t of e.pairs)(n.has(t.first)||n.has(t.second))&&(r+=t.count);let i=0;for(let e=0;e{let t=new Map;for(let n of e.pairs){let e=t.get(n.first)??new Set;e.add(n.second),t.set(n.first,e);let r=t.get(n.second)??new Set;r.add(n.first),t.set(n.second,r)}let n=[],r=new Set;for(let i of e.edges){if(r.has(i))continue;let e=[i],a=[];for(r.add(i);e.length>0;){let n=e.pop();a.push(n);for(let i of t.get(n)??[])r.has(i)||(r.add(i),e.push(i))}a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),a.length>1&&n.push(a)}return n},`crossingComponents`),_=t(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=t(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of c)e.has(t)||_(t).some(e=>r.has(e))&&i.push(t);i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),t.push(i)}return t},`pairSearchGroups`),y=t((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=t(e=>{let t=new Map;for(let n of e.pairs)t.set(n.first,(t.get(n.first)??0)+n.count),t.set(n.second,(t.get(n.second)??0)+n.count);return t},`currentCrossingsByEdge`),x=t(e=>e.slice(1).reduce((t,n,r)=>{let i=e[r];return t+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),`pathLength`),S=t((e=new Map)=>c.reduce((t,n)=>t+V(d(n,e)),0),`totalBends`),C=t((e=new Map)=>c.reduce((t,n)=>t+x(d(n,e)),0),`totalLength`),w=t((e,t,n=new Map)=>{let r=Q(t);for(let t of c)if(t!==e){for(let e of r)for(let r of Q(d(t,n)))if(B(e,r,.5)>=Z)return!0}return!1},`pathHasSegmentConflict`),T=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Q(t))if(J(e.a,e.b,a,n,-2))return!0;return!1},`pathHitsNode`),E=t((e,t)=>{let n=Se(H(t));Q(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),D=t(e=>e===`left`||e===`right`,`sideIsHorizontal`),O=t((e,t,n)=>{switch(t){case`left`:return Math.min(e.x,n.x)-20;case`right`:return Math.max(e.x,n.x)+20;case`top`:return Math.min(e.y,n.y)-20;case`bottom`:return Math.max(e.y,n.y)+20}},`localTrackForSameSide`),k=t((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[O(t,n,r),s[n]];for(let o of a)for(let a=0;a<=2;a++)E(e,ue(t,n,r,o+i*20*a))},`addSameSideCandidates`),A=t((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),j=t((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),ee=t((e,t,n,r,i)=>{let a=[...u(`top`),...u(`bottom`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),te=t((e,t,n,r,i)=>{let a=[...u(`left`),...u(`right`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),M=t(e=>{let t=new Set;return e.map(e=>H(e)).filter(e=>{let n=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return t.has(n)||e.length<2?!1:(t.add(n),!0)})},`dedupeCandidatePaths`),ne=t((e,t,n,r)=>{let i=[],a=le(e,t,n,r,20,X);a&&E(i,a),t===r&&k(i,e,t,n);let o=D(t),s=D(r);return o&&!s?A(i,e,t,n,r):!o&&s?j(i,e,t,n,r):o?ee(i,e,t,n,r):te(i,e,t,n,r),M(i)},`buildCandidatesForSides`),N=t((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=ce(r,s),c=s===`top`||s===`bottom`?u(s):a;for(let r of i){E(e,[t,n,{x:r,y:n.y},{x:r,y:o.y},o]);for(let i of c)E(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:o.x,y:i},o])}}},`addVerticalDepartureOuterTrackCandidates`),P=t((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=ce(r,s),c=s===`left`||s===`right`?u(s):i;for(let r of a){E(e,[t,n,{x:n.x,y:r},{x:o.x,y:r},o]);for(let i of c)E(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:o.y},o])}}},`addHorizontalDepartureOuterTrackCandidates`),F=t(e=>{let t=e.start,n=e.end,r=n?i.get(n):void 0;if(!t||!r)return[];let a=H(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],c=[];return R(o,s,X)?N(c,o,s,r):L(o,s,X)&&P(c,o,s,r),c},`terminalPreservingOuterTrackCandidates`),I=t(e=>{let t=e.start,n=e.end,r=t?i.get(t):void 0,a=n?i.get(n):void 0;if(!r||!a)return[];let s=[];for(let e of o){let t=ce(r,e);for(let n of o)s.push(...ne(t,e,ce(a,n),n))}return s.push(...F(e)),s},`candidatePathsFor`),z=t(()=>new Map(c.map(e=>[e,Q(d(e))])),`currentSegmentsByEdge`),re=t((e,t,n)=>{let r=new Set;for(let i of c){if(i===e)continue;let a=n.get(i)??Q(d(i));t.some(e=>a.some(t=>B(e,t,.5)>=Z))&&r.add(i)}return r},`sharedTrackConflictsFor`),ie=t((e,t,n,r)=>{let i=new Set;return I(e).map(e=>Se(H(e))).filter(t=>{if(T(e,t))return!1;let n=t.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return i.has(n)||t.length<2?!1:(i.add(n),!0)}).map(i=>{let a=Q(i),o=0;for(let t of c)t!==e&&(o+=f(a,n.get(t)??Q(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:V(i,X),totalBends:V(i),length:x(i)}}).filter(({crossings:e})=>e<=t.count).sort((e,t)=>e.crossings-t.crossings||e.bends-t.bends||e.length-t.length).slice(0,48).map(t=>({path:t.candidate,segments:t.candidateSegments,sharedTrackConflicts:re(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),ae=t((e,t,n,r,i,a)=>{let o=0;for(let n of e.pairs)(n.first===t||n.second===t||n.first===r||n.second===r)&&(o+=n.count);let s=f(n.segments,i.segments);for(let e of c){if(e===t||e===r)continue;let o=a.get(e)??Q(d(e));s+=f(n.segments,o)+f(i.segments,o)}return e.count-o+s},`pairCrossingCount`),U=t((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),W=t((e,t)=>e.segments.some(e=>t.segments.some(t=>B(e,t,.5)>=Z)),`candidatesShareTrack`),G=t((e,t,n,r)=>U(t,n.edge)&&U(r,e.edge)&&!W(t,r),`pairCandidatesAreCompatible`),oe=t((e,t,n,r,i)=>{let a=ae(e.current,t.edge,n,r.edge,i,e.baseSegments);if(!(a>=e.current.count))return{replacements:new Map([[t.edge,n.path],[r.edge,i.path]]),crossings:a,bends:e.currentBends-(e.baseBendsByEdge.get(t.edge)??0)-(e.baseBendsByEdge.get(r.edge)??0)+n.totalBends+i.totalBends,length:e.currentLength-(e.baseLengthByEdge.get(t.edge)??0)-(e.baseLengthByEdge.get(r.edge)??0)+n.length+i.length}},`scorePairReplacement`),se=t((e,t)=>e.crossings{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!G(t,r,n,a))continue;let o=oe(e,t,r,n,a);o&&se(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),q=t(e=>{let t=S(),n=C(),r=z(),i=b(e),a=new Map(c.map(e=>[e,V(d(e))])),o=new Map(c.map(e=>[e,x(d(e))])),s=new Map,l=v(e);for(let t of l)for(let n of t){if(s.has(n))continue;let t=ie(n,e,r,i);t.length>0&&s.set(n,{edge:n,candidates:t})}let u={replacements:new Map,crossings:e.count,bends:t,length:n},f={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of l){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>s.get(e)).filter(e=>!!e);for(let e=0;e0?u.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=V(d(o),X);for(let c of I(o)){let l=T(o,c),u=!l&&w(o,c),d=y(e,o,c),f=V(c,X);l||u||(di||d===i&&f>=a||(n=o,r=c,i=d,a=f))}}if(n&&r){n.points=r;continue}let o=q(e);if(!o)return;for(let[e,t]of o)e.points=t}}t(_t,`resolveRenderedOrthogonalCrossings`);var vt=.001,yt=8;function bt(e,n){let{nodeInfoById:r,realNodeRects:i}=de(n),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...i.map(e=>e.rect.top))-20,bottom:Math.max(...i.map(e=>e.rect.bottom))+20,left:Math.min(...i.map(e=>e.rect.left))-20,right:Math.max(...i.map(e=>e.rect.right))+20},s=t((e,t,n,r)=>{let i=[],a=le(e,t,n,r,20,vt);return a&&i.push(a),t===r&&i.push(ue(e,t,n,o[t])),i},`buildOrthogonalPathCandidates`),c=t((e,t)=>{for(let n=0;n{let i=0,a=re(t,vt),o=n.start,s=n.end;for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,c=t.end;if(!r&&o&&s&&(e===o||e===s||c===o||c===s))continue;let l=t.points;if(!(!l||l.length<2))for(let e of a)for(let t of re(l,vt)){if(me(e.a,e.b,t.a,t.b,vt,vt)){i++;continue}B(e,t,vt)>=yt&&i++}}return i},`pathConflictCount`),u=t((e,t)=>{let n=Math.abs(e.y-t.rect.top),r=Math.abs(e.y-t.rect.bottom),i=Math.abs(e.x-t.rect.left),a=Math.abs(e.x-t.rect.right),o=`top`,s=n;return r{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points??[];if(e.length<1)continue;let n=t.id??``,i=t.start,a=t.end;if(i){let t=r.get(i);t&&f(i,u(e[0],t),n)}if(a){let t=r.get(a);t&&f(a,u(e[e.length-1],t),n)}}let p=t((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!e||e.length<2)continue;let n=V(e,vt);if(n<4)continue;let i=t.start,o=t.end;if(!i||!o)continue;let m=r.get(i),h=r.get(o);if(!m||!h)continue;let g=t.id??``,_=l(e,t,!0),v=l(e,t),y,b=_,x=n;for(let e of a){if(p(i,e,g))continue;let n=ce(m,e);for(let r of a){if(p(o,r,g))continue;let a=ce(h,r);for(let u of s(n,e,a,r)){if(c(u,[i,o]))continue;let e=V(u,vt);if(_>0){let n=l(u,t,!0);if(n>b||n===b&&e>=x)continue;b=n,x=e,y=u;continue}l(u,t)>v||ee.edgeId!==g));let n=d.get(o);n&&d.set(o,n.filter(e=>e.edgeId!==g)),f(i,u(y[0],m),g),f(o,u(y[y.length-1],h),g)}}}t(bt,`simplifyDetouredEdges`);var xt=.001,St=10,Ct=7;function wt(e,t){let n=t?0:e.length-1,r=t?1:-1,i=e[n],a=e[n+r];if(!i||!a)return;let o=a.x-i.x,s=a.y-i.y;if(!(Math.abs(o)+Math.abs(s)t&&G(e,Tt(t)))}t(Et,`labelOverlapsOwnMarker`);function Dt(e,n){let r=[];for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!(!e||e.length<2))for(let n=0;n{let n=oe(t,3);for(let{nodeId:t,rect:r}of i)if(t!==e&&G(n,r))return!0;return!1},`labelOverlapsForeignNode`),s=t((e,t)=>{let n=oe(t,3);for(let t of r)if(t.edgeId!==e&&ae(t.p1,t.p2,n))return!0;return!1},`labelOverlapsForeignEdge`),c=t((e,t,n)=>o(e,n)||s(t,n),`labelOverlapsAnything`),l=[],u=t(e=>{for(let{id:t,rect:n}of a)if(W(n,e))return t},`findContainingLane`),d=t((e,t)=>l.some(n=>n.labelId!==e&&G(t,n.rect)),`overlapsPlacedLabel`);for(let r of e){if(r.isLayoutOnly)continue;let e=r.labelNodeId;if(!e)continue;let i=n.get(e);if(!i)continue;let f=r.points;if(!f||f.length<2)continue;let p=i.width??0,m=i.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e=xt&&i>=xt||h.push({idx:e,length:r+i,orientation:r>=xt?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx0?g:h,v=p>=m?`horizontal`:`vertical`,y=t(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=t((e,t)=>{let n=f[e.idx],r=f[e.idx+1];return{midX:n.x+(r.x-n.x)*t,midY:n.y+(r.y-n.y)*t}},`anchorAtT`),w=t((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=t((e,t)=>e.midX>=t.left-xt&&e.midX<=t.right+xt&&e.midY>=t.top-xt&&e.midY<=t.bottom+xt,`pointInsideRectInclusive`),E=t(e=>{let t=se(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=a.find(({rect:t})=>T(e,t));if(!r)return;let i=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,c=r.rect.bottom-m/2-1;if(i>o||s>c)return;let l={midX:w(e.midX,i,o),midY:w(e.midY,s,c)},d=se(l.midX,l.midY,p,m);return T(e,d)?{laneId:r.id,anchor:l,rect:d}:void 0},`placementForAnchor`),D=t((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=t((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+xt{let n=y(t);for(let t of n)for(let n of S){let i=C(t,n);if(!O(t,i))continue;let a=E(i);if(a&&!Et(a.rect,f)&&!d(e,a.rect)&&!c(e,r.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=t((t,n,i=!1)=>{let a=y(t);for(let t of a){let a={midX:t.midX,midY:t.midY};if(n&&!O(t,a))continue;let c=E(a);if(c&&!Et(c.rect,f)&&!d(e,c.rect)&&!o(e,c.rect)&&(i||!s(r.id,c.rect)))return{laneId:c.laneId,anchor:c.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.lengtht.labelId===e);n>=0?l[n]={labelId:e,rect:t}:l.push({labelId:e,rect:t})}}}t(Dt,`anchorLabelsToPolyline`);var Ot=1e-6,kt=8/2,At=3;function jt(e,t){return e{let s=jt(r,i),c=0,l=t(e=>{if(!e)return;let t=a.get(e);if(!t)return;let n=o===`x`?t.w/2:t.h/2;n>c&&(c=n)},`consider`);l(n.labelNodeId);for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,r=t.end;!e||!r||jt(e,r)===s&&l(t.labelNodeId)}return c>0?c+At:0},`labelClearanceFor`);for(let t of e){if(t.isLayoutOnly)continue;let n=t.points;if(!ie(n,Ot))continue;let a=pe(t,r,Ot);if(!a)continue;let{srcId:s,dstId:c,srcInfo:l,dstInfo:u,collinearX:d,collinearY:f}=a;if(d===f)continue;let p,m;if(d){let e=u.cy>l.cy;p={x:l.cx,y:e?l.rect.bottom:l.rect.top},m={x:u.cx,y:e?u.rect.top:u.rect.bottom}}else{let e=u.cx>l.cx;p={x:e?l.rect.right:l.rect.left,y:l.cy},m={x:e?u.rect.left:u.rect.right,y:u.cy}}if(J(p,m,i,[s,c],1))continue;let h=o(t,s,c,d?`x`:`y`),g=h>kt?h:kt,_=[0,g,-g];for(let n of _){let r={...p},a={...m};if(d){if(r.x+=n,a.x+=n,r.x<=l.rect.left||r.x>=l.rect.right||a.x<=u.rect.left||a.x>=u.rect.right)continue}else if(r.y+=n,a.y+=n,r.y<=l.rect.top||r.y>=l.rect.bottom||a.y<=u.rect.top||a.y>=u.rect.bottom)continue;if(!J(r,a,i,[s,c],1)&&!ge(r,a,e,t,{epsilon:Ot})){t.points=[r,a];break}}}}t(Mt,`straightenCollinearSiblingDetours`);function Nt(e,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=q(n.values()),o=t((e,t)=>re(t,r).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),s=t(()=>{let t=[];for(let n of e){if(n.isLayoutOnly)continue;let e=n.points;!e||e.length<2||t.push(...o(n,H(e)))}return t},`allSegments`),c=t((e,t)=>e.horizontal&&t.horizontal?z(e.a.x,e.b.x,t.a.x,t.b.x)>=8&&Math.abs(e.a.y-t.a.y)<7:e.vertical&&t.vertical?z(e.a.y,e.b.y,t.a.y,t.b.y)>=8&&Math.abs(e.a.x-t.a.x)<7:!1,`hasCrowdedParallelTrack`),l=t((t,n)=>{let s=t.start,l=t.end,u=o(t,n);if(u.length!==n.length-1)return!1;let d=[s,l].filter(e=>!!e),f=t.labelNodeId?[t.labelNodeId]:[];for(let e of u)if(J(e.a,e.b,i,d,-2)||J(e.a,e.b,a,f,-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of u)for(let i of o(n,H(e)))if(c(t,i)||_e(t.a,t.b,i.a,i.b,r))return!1}}return!0},`candidateIsSafe`),u=t((e,t)=>{let n=H(e.edge.points??[]);if(n.length<4||e.index>=n.length-1)return;let r=n.map(e=>({...e}));if(e.horizontal)r[e.index].y+=t,r[e.index+1].y+=t;else if(e.vertical)r[e.index].x+=t,r[e.index+1].x+=t;else return;return o(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=t((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=t(e=>{let t=e.edge,r=H(t.points??[]);if(r.length!==4||e.index!==1)return;let i=t.start?n.get(t.start):void 0,a=t.end?n.get(t.end):void 0,o=i?K(i):void 0,s=a?K(a):void 0,c=r.slice(e.index+2);if(!(!i||!a||!o||!s||c.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:c}},`sourceDetourContextFor`),p=t((e,t,n,i,a,o)=>{let s=i.y>=n.y,c=s?a.bottom:a.top,l=c+(s?20:-20);if(s&&e.b.y<=l+r||!s&&e.b.y>=l-r)return;let u=e.a.x+t;return H([{x:n.x,y:c},{x:n.x,y:l},{x:u,y:l},{x:u,y:e.b.y},...o],r)},`verticalSourceDetour`),m=t((e,t,n,i,a,o)=>{let s=i.x>=n.x,c=s?a.right:a.left,l=c+(s?20:-20);if(s&&e.b.x<=l+r||!s&&e.b.x>=l-r)return;let u=e.a.y+t;return H([{x:c,y:n.y},{x:l,y:n.y},{x:l,y:u},{x:e.b.x,y:u},...o],r)},`horizontalSourceDetour`),h=t((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=s(),t=!1;for(let n=0;ne.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}t(Nt,`nudgeSharedInteriorSubpaths`);function Pt(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(Math.abs(c)<1e-10)return!1;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c,p=.01;return d>p&&d<1-p&&f>p&&f<1-p}t(Pt,`segmentsIntersect`);function Ft(t){let n=t.nodes??[],r=t.edges??[],i=[];if(!r.length||!n.length)return i;let a=fe(n),o=[];for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,s=e.labelNodeId,c=e.id??`${n}->${r}`;for(let e of a)if(!(e.nodeId===n||e.nodeId===r)&&!(s&&e.nodeId===s)){for(let n=0;n0){let t=i.filter(e=>e.type===`edge-node-overlap`).length,n=i.filter(e=>e.type===`edge-edge-crossing`).length;e.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${t} edge-node overlap(s), ${n} edge crossing(s)`);for(let t of i)e.warn(`[SWIMLANE_VALIDATE] ${t.type}: ${t.detail}`)}return i}t(Ft,`validateSwimlanesLayout`);function It(e,n){let r=e.nodes??[],i=e.edges??[],a=r.filter(e=>!e.isGroup);if((n===`LR`||n===`RL`)&&a.length>0&&!nt(e,n)||n===`BT`&&a.length>0&&!tt(e))return;for(let e of i){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=Se(xe(t)))}bt(i,r),Mt(i,r),ot(i,r);let o=new Map;for(let e of r)o.set(String(e.id),e);Dt(i,o),Oe(i,o),st(i,o),Nt(i,o),lt(i,o),ut(i,o),dt(i,o),mt(i,o);let s=t(()=>{_t(i,o),ht(i,o),gt(i,o),Dt(i,o),qe(i,o),dt(i,o),Dt(i,o),qe(i,o)},`finalizeRenderedEdges`);s(),Nt(i,o),s(),ft(i,o),pt(i,o),ft(i,o),pt(i,o)}t(It,`postProcessSwimlaneLayout`);function Lt(e){let t=new Map(e.nodeById),n=new Set,r=[];for(let i of e.edges){if(!t.has(i.src)||!t.has(i.dst))continue;let e=`${i.id}:${i.src}->${i.dst}`;n.has(e)||(n.add(e),r.push(i))}return{nodes:[...t.keys()],edges:r,layout:e.layout,nodeById:t}}t(Lt,`normalizeGraph`);function Rt(e,t){return e.edges.filter(e=>e.dst===t)}t(Rt,`incoming`);function zt(e){let t=new Map;for(let n of e.nodes)t.set(n,[]);for(let n of e.edges)t.get(n.src).push(n.dst);return t}t(zt,`buildSuccessorMap`);function Bt(e){let t=zt(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}t(Bt,`buildSortedSuccessorMap`);function Vt(e){let t=new Map;for(let n of e.nodes)t.set(n,0);for(let n of e.edges)t.set(n.dst,(t.get(n.dst)??0)+1);return t}t(Vt,`buildInDegreeMap`);function Ht(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}t(Ht,`sortedZeroInDegreeNodes`);function Ut(e,t=()=>!0){let n=new Map,r=new Map;for(let t of e.nodes)n.set(t,[]),r.set(t,[]);for(let i of e.edges)t(i)&&(r.get(i.src).push(i.dst),n.get(i.dst).push(i.src));return{preds:n,succs:r}}t(Ut,`buildPredecessorSuccessorMaps`);function Wt(e,t,n,r){let i=0;for(let t of e.nodes)r?.skipGroups&&e.nodeById.get(t)?.isGroup||(i=Math.max(i,n[t]??0));let a=Array.from({length:i+1},()=>[]);for(let i of t)r?.skipGroups&&e.nodeById.get(i)?.isGroup||a[Math.max(0,n[i]??0)].push(i);return a}t(Wt,`buildLayersFromRanks`);function Gt(e){let t=Vt(e),n=Ht(t),r=[],i=Bt(e);for(;n.length;){let e=n.shift();r.push(e);for(let r of i.get(e)??[])if(t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0){let e=0;for(;e{if(i-t<=1)return 0;let a=t+i>>1,o=r(t,a)+r(a,i),s=t,c=a,l=t;for(;s=i||se.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let i=Object.create(null);for(let e of n.nodes)i[e]=0;let a=[],o=t(e=>{i[e]=1;for(let t of r.get(e)??[]){let e=t.dst;i[e]===0?o(e):i[e]===1&&a.push(t)}i[e]=2},`dfs`),s=[...n.nodes].sort((e,t)=>e.localeCompare(t));for(let e of s)i[e]===0&&o(e);let c=new Set(a.map(e=>`${e.id}:${e.src}->${e.dst}`)),l=n.edges.map(e=>c.has(`${e.id}:${e.src}->${e.dst}`)?{id:e.id,src:e.dst,dst:e.src,weight:e.weight,ref:e.ref}:e);return{acyclic:{nodes:[...n.nodes],edges:l,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:a}}t(Jt,`removeCycles_DFS`);function Yt(e){let n=new Map,r=t(t=>{if(n.has(t))return n.get(t);let i=e.nodeById.get(t);if(!i)return n.set(t,null),null;let a=i.parentId;if(!a)return n.set(t,null),null;let o=r(a)??a;return n.set(t,o),o},`resolve`);for(let t of e.nodes)r(t);return n}t(Yt,`buildTopLaneMap`);function Xt(e){let t=Yt(e);return e=>t.get(e)??null}t(Xt,`createTopLaneResolver`);function Zt(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}t(Zt,`buildTopLaneOrder`);function Qt(e,t){let n=Zt(e);if(!t||t.length===0)return n;let r=new Set(n),i=new Set,a=[];for(let e of t)!r.has(e)||i.has(e)||(i.add(e),a.push(e));for(let e of n)i.has(e)||a.push(e);return a}t(Qt,`resolveTopLaneOrder`);var $t={EPSILON:1e-6},en={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},tn={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function nn(e,n){let r=Lt(e),i=n?.laneOf??(()=>null),a=n?.rankHint,{preds:o}=Ut(r);for(let e of o.values())e.sort((e,t)=>e.localeCompare(t));let s=Gt(r)??[...r.nodes].sort((e,t)=>e.localeCompare(t)),c=new Map;for(let[e,t]of s.entries())c.set(t,e);let l=new Map,u=new Map;for(let e of r.nodes)u.set(e,[]);for(let e of s){let t=(o.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=rn(e,t,{laneOf:i,rankHint:a,topoIndex:c});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of r.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of r.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=c.get(e)??0,r=c.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=an(r),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=on(m),g=sn(m),_=new Map;for(let e of r.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=t(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of s)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:s}}t(nn,`buildDrivingTree`);function rn(e,t,n){let r=n.laneOf(e);return[...t].sort((e,t)=>{let i=n.laneOf(e),a=n.laneOf(t),o=i!=null&&i===r;if(o!==(a!=null&&a===r))return o?-1:1;let s=n.rankHint?.[e],c=n.rankHint?.[t];if(s!=null&&c!=null&&s!==c)return c-s;let l=n.topoIndex.get(e)??0,u=n.topoIndex.get(t)??0;return l===u?e.localeCompare(t):l-u})[0]}t(rn,`chooseParent`);function an(e){let t=new Map;for(let n of e.nodes)t.set(n,new Set);for(let n of e.edges)t.get(n.src).add(n.dst),t.get(n.dst).add(n.src);return t}t(an,`buildAdjacency`);function on(e){let t=new Map,n=0;for(let r of e.keys()){if(t.has(r))continue;let i=[r];for(;i.length>0;){let r=i.pop();if(!t.has(r)){t.set(r,n);for(let n of e.get(r)??[])t.has(n)||i.push(n)}}n++}return t}t(on,`assignComponents`);function sn(e){let n=new Map,r=new Map,i=[],a=[],o=0,s=t((t,c)=>{n.set(t,++o),r.set(t,o);for(let l of e.get(t)??[])l!==c&&(n.has(l)?(n.get(l)??0)<(n.get(t)??0)&&(i.push([t,l]),r.set(t,Math.min(r.get(t)??o,n.get(l)??o))):(i.push([t,l]),s(l,t),r.set(t,Math.min(r.get(t)??o,r.get(l)??o)),(r.get(l)??0)>=(n.get(t)??0)&&a.push(cn(t,l,i,a.length))))},`visit`);for(let t of e.keys())n.has(t)||s(t,null);return a}t(sn,`computeBlocks`);function cn(e,t,n,r){let i=[],a=new Set;for(;n.length>0;){let r=n.pop();if(i.push(r),a.add(r[0]),a.add(r[1]),r[0]===e&&r[1]===t||r[0]===t&&r[1]===e)break}return{id:r,edges:i,nodes:[...a]}}t(cn,`popBlock`);function ln(e,n,r){let i=[...e.nodes],a=new Map;for(let[e,t]of i.entries())a.set(t,e);let o=i.length,s=Array(o).fill(-1),c=Array(o).fill(0),l=[],u=new Set;for(let e of i){let t=r.parent.get(e)??null,n=a.get(e);n!=null&&(t??(s[n]=-1,c[n]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=a.get(e);if(t==null)continue;let n=r.children.get(e)??[];for(let e of n){if(u.has(e))continue;let n=a.get(e);n!=null&&(s[n]=t,c[n]=c[t]+1,u.add(e),l.push(e))}}for(let e of i){if(u.has(e))continue;let t=a.get(e);t!=null&&(s[t]=-1,c[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,o)))+1),f=Array.from({length:d},()=>Array(o).fill(-1));for(let e=0;e{if(e===-1||t===-1)return-1;c[e]>t&1&&(e=f[t][e],e===-1))return-1;if(e===t)return e;for(let n=d-1;n>=0;n--){let r=f[n][e],i=f[n][t];r===-1||i===-1||r!==i&&(e=r,t=i)}return f[0][e]},`lcaIndex`),m=Array.from({length:o},()=>new Map);for(let t of e.edges){let e=t.src,r=t.dst,i=n[e],o=n[r];if(i==null||o==null||(i>o&&([e,r]=[r,e],[i,o]=[o,i]),i==null||o==null||i===o))continue;let s=a.get(e),c=a.get(r);if(s==null||c==null)continue;let l=p(s,c);if(l===-1)continue;let u=m[l];for(let e=i;e{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=t(e=>{let t=a.get(e);_.add(e);let i=t==null?void 0:m[t],o=i?new Map(i):new Map,s=r.children.get(e)??[];for(let t of s){let r=v(t),i=n[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=n[t];s!=null&&s>i&&(o+=1),a.set(t,o)}g(o,r)}return o},`dfs`);for(let e of r.roots)_.has(e)||v(e);for(let e of i)_.has(e)||v(e);return h}t(ln,`computeSubtreeCrossCounts`);function un(e,n,r){let i=new Map,a=t(e=>{let t=r[e]??0,o=[...n.get(e)??[]];o.sort(dn(r));for(let e of o){a(e);let n=i.get(e);n!=null&&(t=Math.min(t,n))}i.set(e,t)},`annotate`);for(let t of e)a(t);return i}t(un,`annotateMinimumLayers`);function dn(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}t(dn,`compareByRankThenId`);function fn(e,n,r,i){let a=0;for(let e of n){let t=r[e]??0;t>a&&(a=t)}let o=Array.from({length:a+1},()=>[]),s=new Set,c=t(e=>{if(s.has(e))return;s.add(e);let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e);for(let t of i(e))c(t)},`emit`);for(let t of e)c(t);for(let e of n)if(!s.has(e)){let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e),s.add(e)}return o}t(fn,`emitNodesInTreeOrder`);function pn(e){let t=[];for(let n of e){let e=new Set,r=[];for(let t of n)e.has(t)||(e.add(t),r.push(t));t.push(r)}return t}t(pn,`deduplicateLayers`);function mn(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],c=[],l=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):c.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),c.sort((e,t)=>{let n=l?.get(e)??0,i=l?.get(t)??0;if(n!==i)return n-i;let a=r.get(e)??o,s=r.get(t)??o;return a===s?e.localeCompare(t):a-s}),[...s.map(e=>e.child),...c]}}t(mn,`createChildOrderer`);function hn(e,t,n){let r=nn(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=ln(e,t,r),s=[...a].sort(dn(t)),c=mn(i,t,o,un(s,i,t)),l=fn(s,e.nodes,t,c);return l=pn(l),l}t(hn,`buildMultitreeLayerOrder`);function gn(e,t,n){let r=new Set(e),i=new Set(t),a=Kt(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return qt(o)}t(gn,`countCrossingsBetweenAdjacent`);function _n(e,t,n){let r=[];for(let e of t){let t=n[e.src],i=n[e.dst];if(t==null||i==null||t===i)continue;let a=e.src,o=e.dst,s=t,c=i;t>i&&(a=e.dst,o=e.src,s=i,c=t);for(let t=s;t(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let c=0;for(let e of r.get(s)??[])c=Math.max(c,(n[e]??0)+1);if(c>=o)continue;let l=o;n[s]=c;let u=_n(hn(e,n,i),e.edges,n);u(t[e]??0)-(t[n]??0)||e.localeCompare(n));for(let i of r){let r=n(i);if(!r)continue;let a=e.edges.filter(e=>e.src===i);if(a.length===0)continue;let o=!1,s=0;for(let e of a){let t=n(e.dst);t==null||t===r?o=!0:s++}if(s===0||o)continue;let c=0,l=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?l=!0:c++)}if(c>0||!l)continue;let u=t[i]??0,d=u+s,f=0;for(let n of e.edges)n.dst===i&&(f=Math.max(f,(t[n.src]??0)+1));let p=Math.max(u,f,d);p!==u&&(t[i]=p)}}t(yn,`adjustCrossLaneSources`);function bn(e,t){let n=Lt(e),r=Gt(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=Xt(n),o=Object.create(null);for(let e of r){let r=Rt(n,e),s=t?.ignoreCrossLaneEdges?r.filter(t=>{let n=a(t.src),r=a(e);return!n||!r?!0:n===r}):r;if(s.length===0)o[e]=0;else if(i&&s.length===1){let t=s[0].src;a(t)===a(e)?o[e]=(o[t]??0)+1:o[e]=o[t]??0}else{let t=-1/0;for(let e of s)t=Math.max(t,(o[e.src]??0)+1);o[e]=t===-1/0?0:t}}return(t?.optimizeRanksByCrossings??!1)&&(o=vn(n,o)),t?.ignoreCrossLaneEdges&&yn(n,o),{layers:hn(n,o,a),rankOf:o,dummy:new Set}}t(bn,`assignLayers_LongestPath`);function xn(e,n){let r=Lt(e),i={...bn(r,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},a=Xt(r),{preds:o,succs:s}=Ut(r,e=>{if(n?.ignoreCrossLaneEdges){let t=a(e.src),n=a(e.dst);if(t&&n&&t!==n)return!1}return!0}),c=Gt(r)??[...r.nodes],l=[...c].reverse(),u=t((e,t)=>{let n=0;for(let t of o.get(e)??[])n=Math.max(n,(i[t]??0)+1);let r=1/0,a=s.get(e)??[];return a.length>0&&(r=Math.min(...a.map(e=>(i[e]??0)-1))),Number.isFinite(r)||(r=Math.max(n,t)),Math.min(Math.max(t,n),r)},`clampFeasible`),d=en.GRAVITY_ITERATIONS,f=t(e=>{let t=!1;for(let n of e){let e=o.get(n)??[],r=s.get(n)??[];if(e.length===0&&r.length===0)continue;let a=e.length>0?e.reduce((e,t)=>e+(i[t]??0)+1,0)/e.length:i[n]??0,c=r.length>0?r.reduce((e,t)=>e+(i[t]??0)-1,0)/r.length:i[n]??0,l=u(n,Math.round((a+c)/2));l!==i[n]&&(i[n]=l,t=!0)}return t},`relaxOrder`);for(let e=0;e0){let n=Math.min(...t.map(e=>(i[e]??0)-1));(i[e]??0)>n&&(i[e]=n)}}return{layers:Wt(r,c,i),rankOf:i,dummy:new Set}}t(xn,`assignLayers_Gravity`);function Sn(e){let t=Vt(e),n=Bt(e),r=Ht(t),i=[];for(;r.length>0;){let e=[];for(let a of r){i.push(a);for(let r of n.get(a)??[])t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0&&e.push(r)}r=e.sort((e,t)=>e.localeCompare(t))}return i.length===e.nodes.length?i:null}t(Sn,`topoSortByGenerationIfAcyclic`);function Cn(e,n){let r=Lt(e),i=n?.direction===`LR`?Sn(r)??[...r.nodes].sort():Gt(r)??[...r.nodes].sort(),a=Xt(r),o=t(e=>a(e)??e,`laneOf`),s=Object.create(null),c=new Map,l=t((e,t)=>n?.ignoreCrossLaneEdges??!0?+(o(e)===o(t)):1,`edgeWeight`);for(let e of i){if(r.nodeById.get(e)?.isGroup)continue;let t=Rt(r,e),n=0;if(t.length>0)for(let r of t){let t=r.src,i=s[t]??0;n=Math.max(n,i+l(t,e))}let i=o(e),a=c.get(i)??0,u=Math.max(n,a);s[e]=u,c.set(i,u+1)}return{layers:Wt(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}t(Cn,`assignLayers_LaneAwareCompact`);function wn(e,n){let r=Lt(n),{rankOf:i}=e,a=e.layers.map(e=>[...e]),o=new Set(e.dummy?[...e.dummy]:[]),s=0,c=new Map(r.nodeById),l=t(e=>{let t=`placeholder-${s++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(t,n),o.add(t);a.length<=e;)a.push([]);return a[e].push(t),i[t]=e,t},`addDummyAt`),u=[...r.edges].sort((e,t)=>e.id===t.id?e.src===t.src?e.dst.localeCompare(t.dst):e.src.localeCompare(t.src):e.id.localeCompare(t.id)),d=[];for(let e of u){let t=i[e.src]??0,n=i[e.dst]??0;if(n-t<=1){d.push(e);continue}let r=e.src;for(let i=t+1,a=0;i!r.nodes.includes(e))],edges:d,layout:r.layout,nodeById:c};return{layering:{layers:a,rankOf:i,dummy:o},graphWithDummies:f}}t(wn,`makeProperLayering`);function Tn(e){let t=e.length;if(t===0)return 1/0;let n=[...e].sort((e,t)=>e-t);return t%2==1?n[(t-1)/2]:.5*(n[t/2-1]+n[t/2])}t(Tn,`median`);function En(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}t(En,`barycenter`);function Dn(e,t,n,r){let i=new Map;for(let t of e)i.set(t,[]);for(let e of n)r===`down`?t.has(e.src)&&i.has(e.dst)&&i.get(e.dst).push(t.get(e.src)):t.has(e.dst)&&i.has(e.src)&&i.get(e.src).push(t.get(e.dst));return i}t(Dn,`neighborPositionsFor`);function On(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}t(On,`currentOrderTieBreak`);function kn(e,t,n){let r=new Set(e),i=new Set(t),a=Kt(e),o=Kt(t),s=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&s.push({u:a.get(e.src),v:o.get(e.dst)});return s.sort((e,t)=>e.u===t.u?e.v-t.v:e.u-t.u),qt(s.map(e=>e.v))}t(kn,`countCrossingsBetweenAdjacent`);function An(e,t,n){return[...e].sort((e,r)=>{let i=Tn(t.get(e)??[]),a=Tn(t.get(r)??[]);return i===a?On(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}t(An,`sortByHeuristic`);function jn(e,t,n,r,i,a){let o=Kt(e),s=Kt(t),c=Dn(t,o,n,r);if(!i||!a||a.length===0)return An(t,c,s);let l=new Map;for(let e of t){let t=i(e),n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[];for(let e of a){let t=l.get(e);if(!t||t.length===0)continue;let n=An(t,c,s);u.push(...n)}let d=l.get(null);if(d&&d.length>0){let e=An(d,c,s);for(let t of e){let e=En(c.get(t)??[]),n=u.length;if(isFinite(e)){for(let[t,r]of u.entries())if(es.has(e.src)&&c.has(e.dst)),d=l?r.filter(e=>c.has(e.src)&&l.has(e.dst)):void 0,f=t(t=>{let n=kn(e,t,u);return d&&i&&(n+=kn(t,i,d)),n},`crossingScore`),p=a?new Map:null;if(a&&p)for(let e of n)p.set(e,a(e));let m=!0,h=f(o);for(;m;){m=!1;for(let e=0;e+1[...e]),i=t.edges,a=Xt(t),o=Qt(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e=0;e--)r[e]=jn(r[e+1],r[e],i,`up`,a,o),r[e]=Mn(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}t(Nn,`orderLayers`);function Pn(e,n,r){let i=r?.layerGap??tn.DEFAULT_LAYER_GAP,a=r?.nodeGap??tn.DEFAULT_NODE_GAP,o=r?.laneGap??a*2,s=r?.direction??`TB`,c=s===`LR`||s===`RL`,l=e.layers,u=Object.create(null),d=Object.create(null),f=t(e=>n.nodeById.get(e),`getNode`),p=t(e=>f(e)?.width??0,`getWidth`),m=t(e=>f(e)?.height??0,`getHeight`),h=Xt(n),g=Qt(n,r?.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(c)for(let e=0;e+1Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),r=_[e],a=_[e+1],o=r/2+a/2,s=(t+n)/2,c=Math.max(0,s-o-i);v.push(c)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(r);e===null?n.push(r):(t[e]||=[]).push(r)}for(let[e,n]of Object.entries(t)){let t=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+o*Math.max(0,S.length-1))/2;for(let n=0;np(e)),r=i-(e.reduce((e,t)=>e+t,0)+a*(t.length-1))/2;for(let[i,o]of t.entries()){let t=e[i];u[o]=r+t/2,d[o]=T+n/2,r+=t+a}}}let o=v[e]??0;T+=n+i+o}let E=new Map;for(let e of n.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let t=e[0].ref,r=t.start,i=t.end;if(r==null||i==null)continue;let a=Math.round(((u[r]??0)+(u[i]??0))/2),o=new Set;for(let t of e)o.add(t.src),o.add(t.dst);for(let e of o)e===r||e===i||n.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}t(Pn,`assignCoordinates`);var Fn=8;function In(e){let t=2166136261;for(let n=0;n>>0}t(In,`hashString`);function Ln(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}t(Ln,`mulberry32`);function Rn(e,t){let n=[...e],r=Ln(t);for(let e=n.length-1;e>0;e--){let t=Math.floor(r()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n}t(Rn,`deterministicShuffle`);function zn(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}t(zn,`sourceDistance`);function Bn(e,t){let n=new Map;for(let[t,r]of e.entries())n.set(r,t);let r=0;for(let{a:e,b:i,weight:a}of t){let t=n.get(e),o=n.get(i);t==null||o==null||(r+=a*Math.abs(t-o))}return r}t(Bn,`laneArrangementCost`);function Vn(e){let t=Zt(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=Xt(e),i=new Map;for(let t of e.layout.edges??[]){if(t.isLayoutOnly)continue;let a=typeof t.start==`string`?t.start:void 0,o=typeof t.end==`string`?t.end:void 0;if(!a||!o||!e.nodeById.has(a)||!e.nodeById.has(o))continue;let s=r(a),c=r(o);if(!s||!c||s===c)continue;let l=n.get(s),u=n.get(c);if(l==null||u==null)continue;let[d,f]=l<=u?[s,c]:[c,s],p=`${d}\0${f}`,m=i.get(p);m?m.weight++:i.set(p,{a:d,b:f,weight:1})}return[...i.values()]}t(Vn,`buildWeightedLaneEdges`);function Hn(e,t,n){let r=[...e],i=Bn(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&oe.a===t.a?e.b.localeCompare(t.b):e.a.localeCompare(t.a)).map(({a:e,b:t,weight:n})=>`${e}:${t}:${n}`).join(`|`);return In(`${e.join(`|`)}#${r}#${n}`)}t(Wn,`seedForRestart`);function Gn(e,t={}){let n=Zt(e);if(n.length<2)return n;let r=Vn(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=Hn(n,r,i),o=Math.max(0,t.restarts??Fn);for(let e=0;e$&&c*3>=s?o>0?`bottom`:`top`:s>$?a>0?`right`:`left`:n}t($n,`chooseOrthogonalSide`);function er(e,t){return Math.abs(e.to-t.from)<$||Math.abs(e.to-t.to)<$?e.to:e.from}t(er,`sharedLineEndpointCoord`);function tr(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}t(tr,`pointOnLine`);function nr(e,n){let r=e.nodes??[],i=e.edges??[],a=[];for(let e of i)e.isLayoutOnly||a.push({...e,__originalEdge:e});let o=new Map,s=new Map,c=[],l=n===`LR`;for(let e of r)o.set(e.id,e);let u=r.filter(e=>e.isGroup&&!e.parentId);for(let e of u){let n={id:e.id},i=t(e=>{s.set(e.id,n),r.filter(t=>t.parentId===e.id).forEach(i)},`assignLane`);i(e)}let d=r.filter(e=>!e.isGroup&&!e.isEdgeLabel).map(e=>{let t=e.width??10,n=e.height??10,r=e.x??0,i=e.y??0,a=qn;return{nodeId:e.id,minX:r-t/2-a,maxX:r+t/2+a,minY:i-n/2-a,maxY:i+n/2+a,visualXHalfExtent:l?n/2+a:t/2+a}}),f=t((e,t,n,r)=>{let i=c.find(n=>n.orientation===e&&Math.abs(n.coord-t)<1);return i||(i={id:`pipe-${e}-${t.toFixed(0)}`,orientation:e,coord:t,spanMin:n,spanMax:r,tracks:[]},c.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=t((e,t)=>{let n=e.width??10,r=e.height??10,i=e.x??0,a=e.y??0;switch(t){case`top`:return{x:i,y:a-r/2};case`bottom`:return{x:i,y:a+r/2};case`left`:return{x:i-n/2,y:a};case`right`:return{x:i+n/2,y:a}}},`portForSide`),m=t((e,t,n)=>p(e,$n(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=t((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)<$,i=Math.abs(t.x-n.x)<$;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-$,o=Math.max(t.x,n.x)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`vertical`||t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v)}else if(i){let r=t.x,i=Math.min(t.y,n.y)-$,o=Math.max(t.y,n.y)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`horizontal`||t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v)}return a},`crossingPenalty`),b=a.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=o.get(e.start),r=o.get(e.end),i=s.get(e.start),a=s.get(e.end);return{idx:t,crossLane:i&&a&&i.id!==a.id?1:0,dx:n&&r?Math.abs((r.x??0)-(n.x??0)):0,dy:n&&r?Math.abs((r.y??0)-(n.y??0)):0}}).sort((e,t)=>{if(e.crossLane!==t.crossLane)return t.crossLane-e.crossLane;let n=e.dx+e.dy,r=t.dx+t.dy;return Math.abs(n-r)>1?n-r:e.idx-t.idx}).map(e=>e.idx),x=t((e,t,n,r)=>{let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return!!d.find(c=>n&&c.nodeId===n||r&&c.nodeId===r?!1:Math.abs(e.x-t.x)>$?c.minYe.y&&c.maxX>i&&c.minXe.x&&c.maxY>o&&c.minY$n(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of a.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),a=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(a),dxSign:Math.sign(i),dySign:Math.sign(a)})}let E=t(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.absDx===0?1/0:e.absDy/e.absDx:e.absDy===0?1/0:e.absDx/e.absDy,`preferenceStrength`),D=t(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=t((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=t(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),ee=new Map;for(let e of T.values())ee.has(e.dstId)||ee.set(e.dstId,new Set),ee.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(o.get(e.srcId)))continue;let t=ee.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:a}=e,s=o.get(n),c=o.get(r),l=`${n}:${i}:src`,u=i===`top`||i===`bottom`?c.x??0:c.y??0;S.has(l)||S.set(l,[]),S.get(l).push({edgeIdx:t,oppositeCoord:u});let d=`${r}:${a}:dst`,f=a===`top`||a===`bottom`?s.x??0:s.y??0;S.has(d)||S.set(d,[]),S.get(d).push({edgeIdx:t,oppositeCoord:f})}let te=new Map;for(let[e,t]of S){if(t.length<2)continue;t.sort((e,t)=>e.oppositeCoord-t.oppositeCoord);let n=e.split(`:`),r=n.slice(0,-2).join(`:`),i=n[n.length-2],a=n[n.length-1],s=o.get(r);if(!s)continue;let c=i===`left`||i===`right`?s.height??10:s.width??10,l=s.shape,u=l===`question`||l===`diamond`?c*.3:c,d=Math.min(20,Math.max(8,u/(t.length+1))),f=-(d*(t.length-1))/2;for(let[e,n]of t.entries()){let t=f+e*d,r=`${n.edgeIdx}:${a}`;te.set(r,t)}}let M=t(e=>!!a[e]?.labelNodeId,`edgeHasLabelNode`),ne=t((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>M(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>M(e)):!1,`faceHasLabelNode`),N=t((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),P=t((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??w(t,i),s=r?.dstSide??w(n,a),c=r?p(t,r.srcSide):m(t,i,!0),l=r?p(n,r.dstSide):m(n,a,!1),u=te.get(`${e}:src`),d=te.get(`${e}:dst`);return u!==void 0&&(c=N(c,o,u)),d!==void 0&&(l=N(l,s,d)),{pSrcPort:c,pDstPort:l,srcSide:o,dstSide:s}},`portsForEdge`);for(let e of b){let n=a[e];if(g[e]=[],!n.start||!n.end||n.points&&n.points.length>0||n.start===n.end)continue;let r=o.get(n.start),i=o.get(n.end);if(!r||!i)continue;let{pSrcPort:s,pDstPort:u,srcSide:p,dstSide:m}=P(e,r,i),v={...s},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=s.y>(r.y??0)?s.y+Zn:s.y-Zn:v.x=s.x>(r.x??0)?s.x+Zn:s.x-Zn,T?b.y=u.y>(i.y??0)?u.y+Zn:u.y-Zn:b.x=u.x>(i.x??0)?u.x+Zn:u.x-Zn;let E=t((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.xn.minY&&e.y{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+Jn:r.minX-Jn,y:i?r.maxY+Yn:r.minY-Yn,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+Jn:r.minX-Jn,y:o?r.maxY+Yn:r.minY-Yn,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[n.start,n.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(s,r,i,e,!0);v.x=t.x,v.y=t.y;let n=t.leavesPositiveSide?Math.min(e.minY-2,s.y+Zn):Math.max(e.maxY+2,s.y-Zn);O=[{x:s.x,y:n},{x:t.x,y:n},{x:t.x,y:t.y}]}else{let t=D(s,r,i,e,!1),n=t.leavesPositiveSide?Math.min(e.minX-2,s.x+Zn):Math.max(e.maxX+2,s.x-Zn);v.x=t.x,v.y=t.y,O=[{x:n,y:s.y},{x:n,y:t.y},{x:t.x,y:t.y}]}}let j=[],ee=E(b,k);if(ee.inside&&ee.obstacle){let e=ee.obstacle;if(T){let t=D(u,i,r,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,i,r,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){let t=Jn,r=Math.abs(v.x-b.x)1||c>1,d=C.get(n.start??``)??0,f=C.get(n.end??``)??0,g=o>1&&ne(n.start,p)||c>1&&ne(n.end,m);if((r||i)&&!a&&(!l||l&&!g&&(o<=1||d<=2)&&(c<=1||f<=2))&&!x(s,u,n.start,n.end)){n.points=[{...s},{...v},{...b},{...u}],_.add(e);let t=i?`horizontal`:`vertical`,r=i?s.y:s.x,a=i?Math.min(s.x,u.x):Math.min(s.y,u.y),o=i?Math.max(s.x,u.x):Math.max(s.y,u.y),c={id:`fast-path-${t}-${r.toFixed(0)}-${e}`,orientation:t,coord:r,spanMin:a,spanMax:o,tracks:[]};h.push({edgeIndex:e,segmentIndex:0,orientation:t,pipe:c,trackIndex:0,from:a,to:o});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let M=Math.min(v.x,b.x)-50,N=Math.max(v.x,b.x)+50,F=Math.min(v.y,b.y)-50,I=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minXt&&e.minYr&&(M=Math.min(M,e.minX-Xn),N=Math.max(N,e.maxX+Xn),F=Math.min(F,e.minY-Xn),I=Math.max(I,e.maxY+Xn))}for(let e of d){if(e.maxXN||e.maxYI)continue;let t=Jn;f(`horizontal`,e.minY-t,M,N),f(`horizontal`,e.maxY+t,M,N);let n=Yn;f(`vertical`,e.minX-n,F,I),f(`vertical`,e.maxX+n,F,I)}f(`horizontal`,v.y,M,N),f(`horizontal`,b.y,M,N);let L=c.filter(e=>e.orientation===`horizontal`&&e.coord>=F&&e.coord<=I),R=c.filter(e=>e.orientation===`vertical`&&e.coord>=M&&e.coord<=N),z=t((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),B=z(v.x,v.y),re=z(b.x,b.y),V=new Map,H=new Map,ie=new Map,ae=new Set,U=[];V.set(B,0),ie.set(B,`n`),U.push({key:B,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),ae.add(B);let W=[],G=t((e,t)=>x(e,t,n.start,n.end),`checkSegmentBlocked`),oe={x:b.x,y:v.y},se=G(v,oe),K=G(oe,b),ce=se||K,le={x:v.x,y:b.y},ue=G(v,le),de=G(le,b);if(ce?ue||de||(W=Math.abs(v.x-b.x)<$?[v,b]:[v,le,b]):W=Math.abs(v.y-b.y)<$||Math.abs(v.x-b.x)<$?[v,b]:[v,oe,b],W.length===0)for(;U.length>0;){U.sort((e,t)=>e.f-t.f);let t=U.shift();if(ae.delete(t.key),t.key===re){let e=re,t=b;for(W=[t];H.has(e);){let n=H.get(e);W.unshift(n),t=n,e=z(n.x,n.y)}break}let r=t.pt.x,i=t.pt.y,a=R.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=L.sort((e,t)=>e.coord-t.coord),c=s.findIndex(e=>Math.abs(e.coord-i)<1),l=[];o>0&&l.push({x:a[o-1].coord,y:i}),o>=0&&o0&&l.push({x:r,y:s[c-1].coord}),c>=0&&ce.nodeId===n.start||e.nodeId===n.end?!1:o===s?e.minXr&&e.maxY>c&&e.minYi&&e.maxX>o&&e.minX10&&x<-5||g<-10&&x>5)&&(m=Math.abs(x)*100),(h>10&&_<-5||h<-10&&_>5)&&(m+=Math.abs(_)*50);let S=0,C=ie.get(t.key)??`n`,w=Math.abs(_)>$?`h`:`v`;C!==`n`&&C!==w&&(S=50);let T=f+p+m+S,E=(V.get(t.key)??1/0)+T,D=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(E<(V.get(u)??1/0))if(H.set(u,t.pt),V.set(u,E),ie.set(u,w),!ae.has(u))U.push({key:u,f:E+D,pt:a}),ae.add(u);else{let e=U.findIndex(e=>e.key===u);e!==-1&&(U[e].f=E+D)}}}if(W.length===0&&(W=[v,{x:v.x,y:b.y},b]),W.length>4){let e=W[0],n=W[W.length-1],r=Math.min(e.x,n.x),i=Math.max(e.x,n.x),a=Math.min(e.y,n.y),o=Math.max(e.y,n.y);for(let e of W)r=Math.min(r,e.x),i=Math.max(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.y);let s=i>Math.max(e.x,n.x),c=re.minXr&&e.minYa);if(s.length>0){let r=Math.max(e.x,n.x);for(let e of s){let n=(e.minX+e.maxX)/2;if(e.visualXHalfExtent===void 0||isNaN(e.visualXHalfExtent))continue;let i=n+e.visualXHalfExtent+t;r=Math.max(r,i)}isNaN(r)||(i=r)}}if(c){let i=d.filter(r=>r.minXMath.min(e.y,n.y));if(i.length>0){let a=Math.min(e.x,n.x);for(let e of i){let n=(e.minX+e.maxX)/2-e.visualXHalfExtent-t;a=Math.min(a,n)}r=a}}}let u=t(t=>{let r=n.y>e.y,i=d.filter(t=>{let r=Math.min(e.x,n.x)t.minX,i=Math.min(e.y,n.y)t.minY;return r&&i}),a=i;if(l&&i.length>0){let e=i.filter(e=>e.minXt);e.length>0&&(a=e)}if(a.length===0)return n.y;let o=Jn;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(ee.minY))-o;if(e>n.y+$)return e}return n.y},`findBestReturnY`),f=t(t=>{let r=u(t),i={x:t,y:e.y},a={x:t,y:r},o={x:n.x,y:r},s=G(e,i),c=G(i,a),l=G(a,o),d=r===n.y?!1:G(o,n);return!s&&!c&&!l&&!d?Math.abs(r-n.y)<$?[e,i,a,n]:[e,i,a,o,n]:null},`trySimplifyWithDetourX`),p=s&&!c?f(i):c&&!s?f(r):null;p&&(W=p)}let q=[s,...O,...W,...j.reverse(),u];if(q.length>=3){let e=q[q.length-1],t=q[q.length-2],n=q[q.length-3],r=Math.abs(n.y-t.y)<$&&Math.abs(t.y-e.y)<$,i=Math.abs(n.x-t.x)<$&&Math.abs(t.x-e.x)<$;if(r){let r=Math.sign(t.x-n.x),i=Math.sign(e.x-n.x);r!==0&&r===i&&Math.abs(t.x-n.x)>Math.abs(e.x-n.x)&&q.splice(-2,1)}else if(i){let r=Math.sign(t.y-n.y),i=Math.sign(e.y-n.y);r!==0&&r===i&&Math.abs(t.y-n.y)>Math.abs(e.y-n.y)&&q.splice(-2,1)}}let fe=[q[0]];for(let e=1;et.x!=r.x>n.x){fe.push(n);continue}continue}if(Math.abs(t.x-n.x)<$&&Math.abs(n.x-r.x)<$){if(n.y>t.y!=r.y>n.y){fe.push(n);continue}continue}fe.push(n)}fe.push(q[q.length-1]);for(let t=0;te.from{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&F(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&F(n,t));return i&&a?(e.trackIndex=r.index,t.trackIndex=n.index,n.segments=[...n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],r.segments=[...r.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],!0):!1},`trySwapSegmentsAcrossTracks`),L=t(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),R=t((e,t)=>{let n=e.pipe.tracks[e.trackIndex];n.segments=n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),e.trackIndex=t,e.pipe.tracks[t].segments.push({edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to})},`moveSegmentToTrack`),z=t((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&R(n,t)}},`moveSegmentChainToTrack`),B=t(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n{if(e.orientation===t.orientation)return!1;let n=e.orientation===`horizontal`?e:t,r=e.orientation===`horizontal`?t:e;return r.pipe.coord>n.from&&r.pipe.coordr.from&&n.pipe.coord{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&F(e,t)))return n.index;return-1},`findAvailableTrack`),H=t((e,t)=>{if(e.trackIndex===t.trackIndex)return F(e,t);let n=B(e),r=B(t);return n.some(e=>r.some(t=>re(e,t)))},`segmentsConflict`),ie=t((e,t,n)=>{if(I(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=V(e.pipe,t);n(t,r===-1?L(e.pipe):r)},`resolveTrackConflict`),ae=t(e=>{let t=0;for(let n=0;n{if(U.has(e))return U.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return U.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;eMath.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return U.set(e,a),a},`getDestInfo`),G=t(()=>{let e=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.start&&(n.has(t.start)||n.set(t.start,[]),n.get(t.start).push(e));let r=t(e=>{let t=a[e];if(!t.start||!t.end)return 0;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)return 0;let i=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(i)+Math.abs(s)},`getEdgeDistance`);for(let t of n.values()){t.sort((e,t)=>{let n=W(e),i=W(t);if(Math.abs(n.deviation-i.deviation)>1)return n.deviation-i.deviation;if(Math.abs(n.dest-i.dest)>1)return n.dest-i.dest;let a=r(e),o=r(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,c=g[t].length;if(s!==c)return s-c;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[r],i=Math.abs(e.to-e.from),a=Math.abs(t.to-t.from);if(Math.abs(i-a)>1)return i-a}}return 0});let n=t.map(e=>h[g[e][0]]);e+=ae(n)}return e},`fixSourceHandleCrossings`),oe=t(()=>{let e=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.end&&(n.has(t.end)||n.set(t.end,[]),n.get(t.end).push(e));for(let r of n.values()){r.sort((e,n)=>{let r=t(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),i=r(e),a=r(n);return Math.abs(i-a)>.1?i-a:e-n});let n=r.map(e=>h[g[e][g[e].length-1]]);e+=ae(n)}return e},`fixTargetHandleCrossings`),se=t(()=>{let e=0;for(let t of c){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t{e.segments.forEach(t=>{n.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,trackIndex:e.index,from:t.from,to:t.to})})}),n.sort((e,t)=>e.from-t.from);let r=[];if(n.length>0){let e=[n[0]],t=n[0].to;for(let i=1;ir.add(e.trackIndex));let i=new Map;n.forEach(e=>{let t=W(e.edgeIndex);i.set(e.trackIndex,(i.get(e.trackIndex)??0)+t.delta)});let a=[...r].filter(e=>(i.get(e)??0)<-1),o=[...r].filter(e=>(i.get(e)??0)>1),s=[...r].filter(e=>Math.abs(i.get(e)??0)<=1);a.sort((e,t)=>(i.get(t)??0)-(i.get(e)??0)),o.sort((e,t)=>(i.get(e)??0)-(i.get(t)??0));let c=t((t,r)=>{n.filter(e=>e.trackIndex===t).forEach(t=>{let n=_.has(t.edgeIndex)?e.coord:r;ce.set(`${t.edgeIndex}-${t.segmentIndex}`,n)})},`assignCoord`),l=0;for(let t of a)l++,c(t,e.coord-l*Qn);if(s.length===0&&r.size>0){let e=[...r].sort((e,t)=>Math.abs(i.get(e)??0)-Math.abs(i.get(t)??0))[0],t=a.indexOf(e);t!==-1&&a.splice(t,1);let n=o.indexOf(e);n!==-1&&o.splice(n,1),s.push(e)}let u=0;for(let t of s){if(u===0)c(t,e.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);c(t,e.coord+n*r*Qn*.5)}u++}let d=0;for(let t of o)d++,c(t,e.coord+d*Qn)}}for(let[e,t]of a.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:a}=P(e,o.get(t.start),o.get(t.end)),s=n.map(e=>{let t=h[e],n=ce.get(`${t.edgeIndex}-${t.segmentIndex}`)??t.pipe.coord;return{orient:t.orientation,coord:n,from:t.from,to:t.to}});r.push(i);for(let e=0;e$&&r.push(tr(t,i)),c&&o.orient===t.orient)if(Math.abs(t.coord-o.coord)>$){let e=t.orient===`vertical`?(i+o.from)/2:er(t,o);r.push(tr(t,e),tr(o,e))}else (e===0||e===s.length-2)&&r.push(tr(t,er(t,o)));else if(c)r.push(tr(t,o.coord));else{let e=Math.abs(t.from-i)$||Math.abs(c.y-a.y)>$)&&r.push(a);let l=[];r.length>0&&l.push(r[0]);for(let e=1;e$||Math.abs(t.y-n.y)>$)&&l.push(t)}t.points=l}for(let e of a){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}e.edges=(e.edges??[]).filter(e=>!e.isLayoutOnly);let le=t((e,t)=>{let n=t.x??0,r=t.y??0,i=t.width??0,a=t.height??0;if(i<=0||a<=0)return e;let o=n-i/2,s=n+i/2,c=r-a/2,l=r+a/2;if(e.xs||e.yl)return e;let u=e.x-o,d=s-e.x,f=e.y-c,p=l-e.y,m=Math.min(u,d,f,p);return m===u?{x:o,y:e.y}:m===d?{x:s,y:e.y}:m===f?{x:e.x,y:c}:{x:e.x,y:l}},`nodeBoundaryClamp`);for(let t of e.edges){let e=t.points;if(!e||e.length<2)continue;let n=t.start,r=t.end,i=n?o.get(n):void 0,a=r?o.get(r):void 0;i&&(e[0]=le(e[0],i)),a&&(e[e.length-1]=le(e[e.length-1],a))}return e}t(nr,`routeEdgesOrthogonal`);function rr(e){return e.direction??`TB`}t(rr,`getSwimlaneDirection`);function ir(e){let t=A(e),n=e.config.flowchart?.nodeSpacing??40,r=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,s=rr(e),{ordered:c,coordinates:l}=Kn(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});j(t,c,l,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;nr(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return It(e,s),Ft(e),s}t(ir,`runSwimlaneLayoutCore`);function ar(e){k(e);let t=te(e);e.nodes=t.nodes,e.edges=t.edges}t(ar,`prepareSwimlaneLayout`);var or=n({prepareLayout:ar,runLayoutCore:ir,afterPaint:C});export{or as render}; \ No newline at end of file +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CbPIJzjs.js";import"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import"./chunk-GVQU2GXP-CCw5T6ST.js";import{s as n,vt as r}from"./mermaidParser.worker-CBWarbNh.js";var i=5,a=1e-5,o=1e-6;function s(e){let t=[];for(let n=0;n=1-o||p<=o||p>=1-o?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}t(c,`segmentIntersection`);function l(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}t(l,`isHorizontalSeg`);function u(e){let t=[];for(let n=0;n=Math.abs(n)?+(t>=0):+(n>=0)}t(p,`getArcSweepFlag`);var m=.001;function h(e,t){if(e.length<2)return e.map(e=>({...e}));let n=e.map(e=>({...e})),i=t.arrowTypeStart&&r[t.arrowTypeStart];if(i){let t=e[0],r=e[1],a=Math.atan2(r.y-t.y,r.x-t.x);n[0].x=t.x+i*Math.cos(a),n[0].y=t.y+i*Math.sin(a)}let a=t.arrowTypeEnd&&r[t.arrowTypeEnd];if(a){let t=e.length,r=e[t-2],i=e[t-1],o=Math.atan2(i.y-r.y,i.x-r.x);n[t-1].x=i.x-a*Math.cos(o),n[t-1].y=i.y-a*Math.sin(o)}return n}t(h,`applyMarkerOffsets`);function g(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${f(s)}`];return i===`arc`?l.push(`A${d(e.r)},${d(e.r)} 0 0 ${r} ${f(c)}`):l.push(`M${f(c)}`),l}t(g,`emitJump`);function _(e,t,n,r){let i=t.x-e.x,o=t.y-e.y,s=n.x-t.x,c=n.y-t.y,l=Math.hypot(i,o),u=Math.hypot(s,c);if(l0){let t=_(a[e-1],a[e],a[e+1]??a[e],i);t&&(y=t.cutLen)}let b=r,x=null;o&&ee.t-t.t);for(let e of S)e.r=Math.min(e.r,e.d-y,b-e.d);for(let e=0;et){let n=t/2;S[e].r=Math.min(S[e].r,n),S[e+1].r=Math.min(S[e+1].r,n)}}for(let e of S)e.r=2?r:null}catch{return null}}t(x,`decodeDataPoints`);function S(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=[],o=new Map;for(let e of t){let t=typeof CSS<`u`&&CSS.escape?CSS.escape(e.id):e.id,n=r.querySelector(`path[data-id="${t}"]`);if(!n)continue;o.set(e.id,n);let i=x(n.getAttribute(`data-points`))??e.points;a.push({...e,points:i})}let s=u(a);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of a){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!b(r))continue;let a=o.get(e.id);if(!a||r===void 0&&!y(a.getAttribute(`d`)??``))continue;let s=a.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=v(e,t,n);if(a.setAttribute(`d`,f),u!==null&&d!==null&&typeof a.getTotalLength==`function`){let e=a.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);a.setAttribute(`style`,n)}}}t(S,`applyLineJumpsToSvg`);function C(e,{measure:t}){let n=e.config?.swimlane?.lineHops;if(n===!1)return;let r=n===`gap`?`gap`:`arc`,i=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));S(t.groups.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:r})}t(C,`applySwimlaneLineJumps`);var w=`__swimlane_default__`,T=21,E=20;function D(e){return Math.max(e.padding??E,E)}t(D,`topLaneHorizontalPadding`);function O(e){let{x:t,y:n,width:r,height:i}=e,a=e.swimlaneContentTop;if(typeof t!=`number`||typeof n!=`number`||typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||r<=0||i<=0){delete e.groupTitleRect;return}let o=n-i/2,s=Math.min(a,n+i/2),c=o+Math.min(T,Math.max(0,s-o));if(c<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:o,bottom:c}}t(O,`assignTopLaneTitleRect`);function k(e){let t=e.direction,n=e.nodes??=[];for(let n of e.nodes??[])n.isGroup&&!n.parentId&&(n.shape=`swimlane`,t&&(n.direction=t));let r=n.filter(e=>!e.isGroup&&!e.parentId);if(r.length===0)return;let i=n.find(e=>e.id===w);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:w,label:``,isGroup:!0,shape:`swimlane`,padding:20,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=w}t(k,`prepareLayoutForSwimlanes`);function A(e){let t=new Map;for(let n of e.nodes??[])t.set(n.id,n);let n=[];for(let t of e.edges??[]){let e=typeof t.start==`string`?t.start:void 0,r=typeof t.end==`string`?t.end:void 0;!e||!r||t.labelNodeId||n.push({id:t.id,src:e,dst:r,ref:t})}let r=e.nodes??[],i=r.filter(e=>e.isGroup),a=r.filter(e=>!e.isGroup);return{nodes:[...[...i].reverse(),...a].map(e=>e.id),edges:n,layout:e,nodeById:t}}t(A,`toGraphView`);function j(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,c=0;for(let e of t.layers){let t=0;for(let r of e){let e=a.get(r);if(!e){t++;continue}e.layer=c,e.order=t;let i=n.x[r]??t*s,l=n.y[r]??c*o;e.x=i,e.y=l,t++}c++}let l=i.nodes??[],u=new Map,d=[];for(let e of l){if(!e?.isGroup)continue;e.parentId||d.push(e);let t=l.filter(t=>t.parentId===e.id),r=1/0,i=-1/0,a=1/0,o=-1/0;for(let e of t){let t=e.x??n.x[e.id],s=e.y??n.y[e.id],c=e.width??0,l=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-c/2),i=Math.max(i,t+c/2),a=Math.min(a,s-l/2),o=Math.max(o,s+l/2))}if(r===1/0||a===1/0)e.x=e.x??0,e.y=e.y??0,e.width=e.width??0,e.height=e.height??0;else{let t=e.padding??20,n=e.parentId?t:2*D(e),s=t,c=Math.max(0,i-r)+n,l=Math.max(0,o-a)+s,d=(r+i)/2,f=(a+o)/2;e.x=d,e.y=f,e.width=c,e.height=l,u.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(d.length>0&&u.size>0){let e=1/0,t=-1/0,n=0;for(let r of d){let i=r.padding??20;i>n&&(n=i);let a=u.get(r.id);a&&(e=Math.min(e,a.minY),t=Math.max(t,a.maxY))}if(e!==1/0&&t!==-1/0){let r=Math.max(0,t-e)+2*Math.max(n,36),i=(e+t)/2;for(let t of d)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...d].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],c=[];for(let e of a){let t=u.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*D(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),c.push(n)}let l=o.length;if(l>0){let e=new Map;if(l===1)e.set(o[0],c[0]);else{let t=[];for(let e=0;e0&&i>0?{cx:t,cy:n,rect:se(t,n,r,i)}:void 0}t(ne,`measuredNodeRect`);function N(e){if(e.isGroup)return;let t=ne(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}t(N,`nodeBoundsInfoFor`);function P(e,t,n=M){return Math.abs(e.x-t.x)n}t(L,`isHorizontalSegment`);function R(e,t,n=M){return F(e,t,n)&&Math.abs(e.y-t.y)>n}t(R,`isVerticalSegment`);function z(e,t,n,r){return Math.max(0,Math.min(Math.max(e,t),Math.max(n,r))-Math.max(Math.min(e,t),Math.min(n,r)))}t(z,`overlapLength`);function B(e,t,n=M){return e.horizontal&&t.horizontal&&I(e.a,t.a,n)?z(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&F(e.a,t.a,n)?z(e.a.y,e.b.y,t.a.y,t.b.y):0}t(B,`sameAxisSegmentOverlapLength`);function re(e,t=M){let n=[];for(let r=0;r0?n[n.length-1]:void 0;(!e||!P(e,r,t))&&n.push({x:r.x,y:r.y})}return n}t(H,`dedupeConsecutivePoints`);function ie(e,t=M){if(!e||e.length!==4)return;let[n,r,i,a]=e;return L(n,r,t)&&R(r,i,t)&&L(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:R(n,r,t)&&L(r,i,t)&&R(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}t(ie,`classifyThreeSegmentRoute`);function ae(e,t,n,r=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return a>n.left-r&&in.top-r&&ot.left+n&&e.xt.top+n&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}t(W,`rectContainsRect`);function G(e,t){return e.leftt.left&&e.topt.top}t(G,`rectsOverlap`);function oe(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}t(oe,`inflateRect`);function se(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}t(se,`rectFromCenterSize`);function K(e){return ne(e)?.rect}t(K,`rectOfNodeBounds`);function ce(e,t){switch(t){case`top`:return{x:e.cx,y:e.rect.top};case`bottom`:return{x:e.cx,y:e.rect.bottom};case`left`:return{x:e.rect.left,y:e.cy};case`right`:return{x:e.rect.right,y:e.cy}}}t(ce,`portForRectSide`);function le(e,t,n,r,i,a=M){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.xn.x){if(I(e,n,a))return[e,n];let t=(e.x+n.x)/2;return[e,{x:t,y:e.y},{x:t,y:n.y},n]}if(t===r){if(I(e,n,a))return;let r=t===`left`?Math.min(e.x,n.x)-i:Math.max(e.x,n.x)+i;return[e,{x:r,y:e.y},{x:r,y:n.y},n]}return}if(!o&&!s){if(t===r){if(F(e,n,a))return;let r=t===`top`?Math.min(e.y,n.y)-i:Math.max(e.y,n.y)+i;return[e,{x:e.x,y:r},{x:n.x,y:r},n]}if(!(t===`bottom`&&r===`top`&&e.yn.y))return;if(F(e,n,a))return[e,n];let o=(e.y+n.y)/2;return[e,{x:e.x,y:o},{x:n.x,y:o},n]}if(o&&!s){let i=t===`right`&&n.x>e.x||t===`left`&&n.xn.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let c=t===`bottom`&&n.y>e.y||t===`top`&&n.yn.x;return c&&l?[e,{x:e.x,y:n.y},n]:void 0}t(le,`buildOrthogonalPortPath`);function ue(e,t,n,r){return t===`left`||t===`right`?[e,{x:r,y:e.y},{x:r,y:n.y},n]:[e,{x:e.x,y:r},{x:n.x,y:r},n]}t(ue,`buildSameSideTrackPath`);function de(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=N(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}t(de,`collectRealNodeBounds`);function q(e){let t=[],n=[];for(let r of e){let e=N(r);if(!e)continue;let i={id:e.id,rect:e.rect};r.isEdgeLabel?n.push(i):t.push(i)}return{realNodeRects:t,labelNodeRects:n}}t(q,`collectNodeRectEntries`);function fe(e,{includeEdgeLabels:t=!0}={}){let n=[];for(let r of e){if(r.isGroup||!t&&r.isEdgeLabel)continue;let e=r.x??0,i=r.y??0,a=r.width??0,o=r.height??0;n.push({nodeId:r.id,...se(e,i,a,o)})}return n}t(fe,`collectLayoutNodeRects`);function pe(e,t,n=M){let r=e.start,i=e.end;if(!r||!i)return;let a=t.get(r),o=t.get(i);if(!(!a||!o))return{srcId:r,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)m||f_)return!1;let v=Math.abs(h-u.a.x)i:a&&s&&I(e,n,i)?z(e.x,t.x,n.x,r.x)>i:!1}t(he,`sameAxisSegmentsOverlap`);function ge(e,t,n,r,{epsilon:i=M,skipDegenerateOther:a=!1}={}){for(let o of n){if(o===r||o.isLayoutOnly)continue;let n=o.points;if(!(!n||n.length<2))for(let r=0;rf+i&&mh+i&&dr+M&&e=2?t[t.length-2]:void 0,n=e&&F(e,r)?{x:r.x,y:i.y}:{x:i.x,y:r.y};t.push(n)}t.push(i)}let n=[];for(let e of t){let t=n[n.length-1];(!t||!P(t,e))&&n.push(e)}return n}t(xe,`orthogonalizePolyline`);function Se(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=be(t);if(t=e.points,!e.changed)break}return t}t(Se,`simplifyPolyline`);var Y=.001,Ce=.5,we=4;function Te(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length=0&&i=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=Ee(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}t(De,`clipEndpoint`);function Oe(e,t){for(let n of e){let e=Te(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=De(r,e.srcRect,!0)),e.dstRect&&(r=De(r,e.dstRect,!1)),r=Se(xe(r)),r=ze(r,e.srcRect,e.dstRect),e.edge.points=Se(xe(r))}}t(Oe,`clipEdgeEndpointsToNodeBoundaries`);function ke(e,t,n,r=!1){if(I(e,t,Y)){if(t.yn.bottom+Y)return t;if(r){if(e.xn.right+Y)return{x:n.right,y:e.y}}return{x:Math.abs(t.x-n.left)<=Math.abs(t.x-n.right)?n.left:n.right,y:e.y}}if(F(e,t,Y)){if(t.xn.right+Y)return t;if(r){if(e.yn.bottom+Y)return{x:e.x,y:n.bottom}}let i=Math.abs(t.y-n.top)<=Math.abs(t.y-n.bottom);return{x:e.x,y:i?n.top:n.bottom}}return t}t(ke,`snapEndpointToBoundary`);function Ae(e,t,n){let r=e[t];for(let i=t+n;i>=0&&ie.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}t(Ne,`intersectRanges`);function Pe(e,t){return t===`left`||t===`right`?je(e.top,e.bottom):je(e.left,e.right)}t(Pe,`clearanceRangeForSide`);function Fe(e,t,n){let r=e.y>=n.top-Y&&e.y<=n.bottom+Y,i=e.x>=n.left-Y&&e.x<=n.right+Y;if(I(e,t,Y)&&r){if(Math.abs(e.x-n.left)0?Ne(a):void 0}t(Le,`straightClearanceRange`);function Re(e,t,n,r,i){let a=Le(e,t,n,r,i);if(!a)return;let o=i?e.y:e.x,s=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(s-o)({...e}));for(let s=t;s>=0&&s=n.left-Y&&Math.max(e.x,t.x)<=n.right+Y,i=Math.min(e.y,t.y)>=n.top-Y&&Math.max(e.y,t.y)<=n.bottom+Y;if(Math.abs(e.y-n.top)r.bottom+Y;case`left`:return I(t,n,Y)&&n.xr.right+Y}}t(We,`leavesOutward`);function Ge(e,t,n){if(e.length<3)return e;if(n){let n=Ue(e[0],e[1],t);return n&&We(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=Ue(e[r-1],e[r],t);return i&&We(i,e[r-1],e[r-2],t)?e.slice(0,r):e}t(Ge,`collapseOwnBorderStub`);function Ke(e,t,n){let r=e;if(t){let e=Ae(r,0,1);if(e){let n=ke(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=Ge(r,t,!0)}if(n){let e=r.length-1,t=Ae(r,e,-1);if(t){let i=ke(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=Ge(r,n,!1)}let i=ze(r,t,n);return i!==r||r.length===2?i:(t&&(r=He(r,t,!0)),n&&(r=He(r,n,!1)),r)}t(Ke,`snapAndCollapseEndpoints`);function qe(e,t){for(let n of e){let e=Te(n,t,2);if(!e)continue;let r=Ke(H(e.points,Y),e.srcRect,e.dstRect);if(r.length<3){e.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];e.edge.points=i}}t(qe,`prepareEdgeEndpointsForRenderer`);function Je(e){return new Map(e.map(e=>[e.id,e]))}t(Je,`buildNodeMap`);function Ye(e,t){let n=e.parentId,r=null;for(;n;){let e=t.get(n);if(!e?.isGroup)break;r=e.id,n=e.parentId}return r}t(Ye,`resolveTopLevelGroupId`);function Xe(e,t){let n=0,r=e.parentId;for(;r;){let e=t.get(r);if(!e?.isGroup)break;n++,r=e.parentId}return n}t(Xe,`groupDepth`);function Ze(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a of e){let e=a.x,o=a.y;if(typeof e!=`number`||typeof o!=`number`)continue;let s=a.width??0,c=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}t(Ze,`boundsForChildren`);function Qe(e,t){let n=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+n,e.height=Math.max(0,t.maxY-t.minY)+n}t(Qe,`applyGroupBounds`);function $e(e){let t=Je(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>Xe(n,t)-Xe(e,t));for(let t of n){let n=Ze(e.filter(e=>e.parentId===t.id));n&&Qe(t,n)}}t($e,`recomputeNestedGroupBounds`);function et(e,n){let r=e.nodes??[],i=e.edges??[],a=r.filter(e=>!e.isGroup),o=1/0,s=-1/0;for(let e of a){let t=e[n];typeof t==`number`&&(o=Math.min(o,t),s=Math.max(s,t))}if(!Number.isFinite(o)||!Number.isFinite(s))return!1;let c=t(e=>o+s-e,`mirror`);for(let e of r){let t=e[n];typeof t==`number`&&(e[n]=c(t));let r=e.groupTitleRect;r&&(e.groupTitleRect=n===`x`?{...r,left:c(r.right),right:c(r.left)}:{...r,top:c(r.bottom),bottom:c(r.top)})}for(let e of i)for(let t of e.points??[])t[n]=c(t[n]);return!0}t(et,`mirrorAxis`);function tt(e){return(e.nodes??[]).some(e=>!e.isGroup)?et(e,`y`):!0}t(tt,`applyBtDirectionTransform`);function nt(e,t=`LR`){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=1/0;for(let e of i){let t=e.x??0,n=e.y??0;t0?Math.max(1,l/u):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*d+36,r=t-a;e.x=n,e.y=r}for(let e of r)if(e.points)for(let t of e.points){let e=t.x,n=(t.y-o)*d+36,r=e-a;t.x=n,t.y=r}$e(n);let f=n.filter(e=>e.isGroup&&!e.parentId);if(f.length===0)return t===`RL`&&et(e,`x`),!0;let p=Je(n),m=new Map;for(let e of n){if(e.isGroup)continue;let t=Ye(e,p);if(!t)continue;let n=m.get(t)??[];n.push(e),m.set(t,n)}let h=0;for(let e of f){let t=e.padding??0;t>h&&(h=t)}let g=[],_=1/0,v=-1/0;for(let e of f){let t=Ze(m.get(e.id)??[]);t&&(_=Math.min(_,t.minX),v=Math.max(v,t.maxX),g.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(_===1/0||v===-1/0)return!0;let y=Math.max(0,v-_)+2*Math.max(h,10),b=36+y,x=(_+v)/2-y/2-36,S=x+b/2,C=Math.max(h,36);g.sort((e,t)=>e.centerY-t.centerY);for(let e=0;ed.cy?g.bottom:g.top,t=d.cx+n;if(t<=g.left+rt||t>=g.right-rt)continue;i={x:t,y:e},a={x:t,y:o.y},c={x:o.x,y:o.y}}else{let e=f.cx>d.cx?g.right:g.left,t=d.cy+n;if(t<=g.top+rt||t>=g.bottom-rt)continue;i={x:e,y:t},a={x:o.x,y:t},c={x:o.x,y:o.y}}let p=P(i,a,rt),m=P(a,c,rt);if(p&&m||!p&&J(i,a,r,[l],1)||!m&&J(a,c,r,[u],1))continue;let _=!p&&ge(i,a,e,t,{epsilon:rt,skipDegenerateOther:!0}),v=!m&&ge(a,c,e,t,{epsilon:rt,skipDegenerateOther:!0});if(!(_||v)){h=p?[a,c]:m?[i,a]:[i,a,c];break}}h&&(t.points=h)}}t(ot,`portSwapToLShape`);function st(e,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=q(n.values());for(let o of e){if(o.isLayoutOnly)continue;let s=o.points;if(!s||s.length<4)continue;let c=H(s,r);if(c.length<4)continue;let l=c.length-1,u=c[l],d=c[l-1],f=c[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h0;O={x:f.x,y:E},k={x:e?D.right:D.left,y:E}}if(J(O,k,i,S?[S]:[],-2)||J(O,k,a,[],-2))continue;if(C){let e=n.get(C),t=e?K(e):void 0;if(t&&U(O,t,2))continue}let A=t((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),j=new Set;for(let e=0;e{for(let i of e){if(i===o||i.isLayoutOnly)continue;let e=i.points;if(!(!e||e.length<2))for(let i=0;i=0){let e=c[l-3],t=[C,S].filter(e=>!!e);if(J(e,O,i,t,-2)||ee(e,O))continue}let te=[...c.slice(0,l-2),O,k];o.points=te;let M=o.labelNodeId;if(M){let e=n.get(M);if(e){let t=e.width??0,n=e.height??0;if(t>0&&n>0){let i,a,o=-1;for(let e=0;e=t+2||d&&l>=n+2)&&l>o&&(o=l,i=(s.x+c.x)/2,a=(s.y+c.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}t(st,`collapseShortTerminalStub`);var X=.001,Z=8,Q=re,ct=t((e,t)=>F(e,t,X)||I(e,t,X),`orthogonallyAligned`);function lt(e,n){let r=t((e,t)=>{let n=e.x??0,r=e.y??0,i=t.x-n,a=t.y-r,o=(e.width??0)/2,s=(e.height??0)/2;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),{x:n+(a===0?0:s*i/a),y:r+s}):(i<0&&(o=-o),{x:n+o,y:r+(i===0?0:o*a/i)})},`rectIntersect`),i=t((e,t)=>{let i=H(e.points??[]);if(i.length<2)return;let a=t?e.start:e.end,o=a?n.get(a):void 0,s=o?K(o):void 0;if(!o||!a||!s)return;let c=t?i[0]:i[i.length-1],l=t?i[1]:i[i.length-2],u=r(o,c),d=c;if(ct(l,u)&&(d=l),F(u,d,X))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`V`,coord:u.x,min:Math.min(u.y,d.y),max:Math.max(u.y,d.y),boundary:u,railEnd:d,rect:s};if(I(u,d,X))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`H`,coord:u.y,min:Math.min(u.x,d.x),max:Math.max(u.x,d.x),boundary:u,railEnd:d,rect:s}},`terminalLaneFor`),a=t((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),o=t((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:e.orientation===`H`?(Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1)&&F(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&I(e.boundary,t.boundary,1),`sameTerminalFace`),s=t((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:a(e,t)>=Z&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),c=t((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=a(e,t);if(n2*r?!1:o(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=t((e,n)=>{let r=H(e.edge.points??[]);if(r.length<2)return;let i=e.orientation===`V`?{x:e.boundary.x+n,y:e.boundary.y}:{x:e.boundary.x,y:e.boundary.y+n},a=e.orientation===`V`?{x:e.railEnd.x+n,y:e.railEnd.y}:{x:e.railEnd.x,y:e.railEnd.y+n};if(!t(()=>Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1?I(i,e.boundary,X)&&i.x>=e.rect.left+1&&i.x<=e.rect.right-1:Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1?F(i,e.boundary,X)&&i.y>=e.rect.top+1&&i.y<=e.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(e.atStart){let t=r.length>1&&P(r[1],e.railEnd,X),n=r.slice(t?2:1),o=n[0];return o&&!ct(o,a)?void 0:[i,a,...n]}let o=r.length>1&&P(r[r.length-2],e.railEnd,X),s=r.slice(0,o?-2:-1),c=s[s.length-1];if(!(c&&!ct(c,a)))return[...s,a,i]},`shiftedCandidate`),u=t(e=>{let t=e.edge,r=H(t.points??[]);if(r.length!==2)return!1;let i=t.start,a=t.end,o=i?n.get(i):void 0,s=a?n.get(a):void 0;if(!o||!s)return!1;let c=o.x??0,l=o.y??0,u=s.x??0,d=s.y??0,[f,p]=r;return I(f,p,X)&&Math.abs(l-d)<1&&Math.abs(c-u)>1||F(f,p,X)&&Math.abs(c-u)<1&&Math.abs(l-d)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let t=0;t<8;t++){let t=e.filter(e=>!e.isLayoutOnly).flatMap(e=>[i(e,!0),i(e,!1)]).filter(e=>!!e),n=!1;for(let e=0;e{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let e of p){for(let r of d){let a=l(e,r);if(!a)continue;let o=i({...e.edge,points:a},e.atStart);if(!(!o||t.some(t=>t.edge!==e.edge&&(s(o,t)||f&&c(o,t))))){e.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}t(lt,`separateSharedRenderedTerminalLanes`);function ut(e,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=t((t,n)=>{let a=t.start,o=t.end,s=Q(n);if(s.length!==n.length-1)return!1;let c=[a,o].filter(e=>!!e);for(let e of s)if(J(e.a,e.b,r,c,-2)||J(e.a,e.b,i,[],-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of s)for(let n of Q(H(e)))if(B(t,n,.5)>=Z||_e(t.a,t.b,n.a,n.b,X))return!1}}return!0},`candidateIsSafe`),o=t((e,t)=>{if(t+4>=e.length)return;let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=L(n,r)&&R(r,i)&&L(i,a)&&R(a,o)&&F(n,a,X)&&F(n,o,X)&&F(r,i,X)&&(r.x-n.x)*(a.x-i.x)<0,c=R(n,r)&&L(r,i)&&R(i,a)&&L(a,o)&&I(n,a,X)&&I(n,o,X)&&I(r,i,X)&&(r.y-n.y)*(a.y-i.y)<0;if(s||c)return H([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let l=e[t+5],u=R(n,r)&&L(r,i)&&R(i,a)&&L(a,o)&&R(o,l)&&F(n,o,X)&&F(n,l,X)&&F(i,a,X)&&(i.x-r.x)*(o.x-a.x)<0,d=L(n,r)&&R(r,i)&&L(i,a)&&R(a,o)&&L(o,l)&&I(n,o,X)&&I(n,l,X)&&I(i,a,X)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!u&&!d))return H([...e.slice(0,t+1),l,...e.slice(t+6)])},`withoutDogleg`);for(let t=0;t<8;t++){let t=!1;for(let n of e){if(n.isLayoutOnly)continue;let e=H(n.points??[]);for(let r=0;r<=e.length-5;r++){let i=o(e,r);if(!(!i||!a(n,i))){n.points=i,t=!0;break}}if(t)break}if(!t)return}}t(ut,`collapseRedundantRectangularDoglegs`);function dt(e,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t,n)=>H(e===t?n??[]:e.points??[]),`pointsFor`),s=t((e,t)=>{let n=0;for(let r=0;r{let t=Q(e);if(t.length!==3)return;let n=t[1];if(!(t[0].horizontal===n.horizontal||t[2].horizontal===n.horizontal))return{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}},`middleRail`),l=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);return r.filter(e=>{if(n.includes(e.id))return!1;let r=e.rect;return t.horizontal?z(t.a.x,t.b.x,r.left,r.right)>=Z&&t.a.y>=r.top-2&&t.a.y<=r.bottom+2:z(t.a.y,t.b.y,r.top,r.bottom)>=Z&&t.a.x>=r.left-2&&t.a.x<=r.right+2})},`blockingRectsFor`),u=t((e,t,n)=>{let r=e.map(e=>({...e}));if(t.horizontal)r[t.index].y=n,r[t.index+1].y=n;else if(t.vertical)r[t.index].x=n,r[t.index+1].x=n;else return;let i=Se(H(r));return Q(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=t((e,t,n)=>{let c=[e.start,e.end].filter(e=>!!e),l=Q(t);if(l.length!==t.length-1)return!1;for(let e of l)if(J(e.a,e.b,r,c,-2)||J(e.a,e.b,i,[],-2))return!1;for(let t of a)if(t!==e){for(let e of l)for(let n of Q(o(t)))if(B(e,n,.5)>=Z)return!1}return s(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t=!1;for(let n of a){let r=o(n),i=c(r);if(!i)continue;let a=l(n,i.segment);if(a.length===0)continue;let s=i.horizontal?[Math.min(...a.map(e=>e.rect.top))-20,Math.max(...a.map(e=>e.rect.bottom))+20]:[Math.min(...a.map(e=>e.rect.left))-20,Math.max(...a.map(e=>e.rect.right))+20];for(let a of s){let o=u(r,i.segment,a);if(!(!o||!d(n,o,e))){n.points=o,t=!0;break}}if(t)break}if(!t)return}}t(dt,`liftObstacleHuggingSameSideRails`);function ft(e,n){let r=t(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=t(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,n=typeof t==`string`?t.toUpperCase():``;if(n===`LR`||n===`RL`||n===`BT`)return;let i=r(e),a=e.y,o=e.height;if(!i||typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return;let s=i.right-i.left,c=i.bottom-i.top;if(!(c<=0||s{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+X||n>=t.bottom-X?!1:z(e.a.x,e.b.x,t.left,t.right)>=Z},`horizontalSegmentIntersectsTitle`),o=[...n.values()].map(i).filter(e=>!!e);if(o.length===0)return;let s=0;for(let t of e){if(t.isLayoutOnly)continue;let e=H(t.points??[]);for(let t of Q(e))for(let e of o)a(t,e.rect)&&(s=Math.max(s,e.rect.bottom-t.a.y+4))}if(!(s<=X))for(let e of o){let t=e.node.y,n=e.node.height;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.y=t-s/2,e.node.height=n+s,e.node.groupTitleRect={...e.rect,top:e.rect.top-s,bottom:e.rect.bottom-s})}}t(ft,`liftTopLaneTitleBandsAboveRails`);function pt(e,n){let r=t(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=t(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=r(e),n=e.x,i=e.width;if(!t||typeof n!=`number`||typeof i!=`number`||!Number.isFinite(n)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+X||n>=t.right-X?!1:z(e.a.y,e.b.y,t.top,t.bottom)>=Z},`verticalSegmentIntersectsTitle`),o=t((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+X||n>=t.bottom-X?!1:z(e.a.x,e.b.x,t.left,t.right)>=Z},`horizontalSegmentIntersectsTitle`),s=[...n.values()].map(i).filter(e=>!!e);if(s.length===0)return;let c=0;for(let t of e){if(t.isLayoutOnly)continue;let e=H(t.points??[]);for(let t of Q(e))for(let e of s)if(a(t,e.rect))c=Math.max(c,e.rect.right-t.a.x+4);else if(o(t,e.rect)){let n=Math.min(t.a.x,t.b.x);c=Math.max(c,e.rect.right-n+4)}}if(!(c<=X))for(let e of s){let t=e.node.x,n=e.node.width;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.x=t-c/2,e.node.width=n+c,e.node.groupTitleRect={...e.rect,left:e.rect.left-c,right:e.rect.right-c})}}t(pt,`shiftLeftLaneTitleBandsLeftOfRails`);function mt(e,n){let{realNodeRects:r}=q(n.values()),i=e.filter(e=>!e.isLayoutOnly),a=t((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),o=t((e=new Map)=>{let t=0;for(let n=0;ni.reduce((t,n)=>t+V(a(n,e)),0),`totalBends`),c=t(e=>{let t=a(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!L(n,r,X)&&!R(n,r,X)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=t((e,t)=>{let n=a(e);if(n.length<3)return;let r=n[0],i=n[1],o;if(L(r,i,X))o={x:i.x,y:t.tailStart.y};else if(R(r,i,X))o={x:t.tailStart.x,y:i.y};else return;let s=Se(H([r,i,o,t.tailStart,t.terminal]));return Q(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Q(t))if(J(e.a,e.b,r,n,-2))return!0;return!1},`pathHasNodeHit`),d=t((e,t,n)=>{for(let r of i)if(r!==e){for(let e of Q(t))for(let t of Q(a(r,n)))if(B(e,t,.5)>=Z)return!0}return!1},`pathHasSharedTrack`),f=t((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=t(()=>{let e=new Map;for(let t of i){let r=t.end;if(!r||!n.has(r)||a(t).length<4)continue;let i=e.get(r)??[];i.push(t),e.set(r,i)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t=s(),n,r=e,i=t;for(let t of p().values())for(let a=0;a=e||y>r||y===r&&b>=i||(n=v,r=y,i=b)}if(!n)return;for(let[e,t]of n)e.points=t}}t(mt,`swapDestinationTerminalTailsToReduceCrossings`);function ht(e,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),s=t((e=new Map)=>{let t=0;for(let n=0;na.reduce((t,n)=>t+V(o(n,e)),0),`totalBends`),l=t(e=>{let t=e.start,r=e.end,i=t?n.get(t):void 0,a=r?n.get(r):void 0,o=i?K(i):void 0,s=a?K(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=t((e,t,n)=>{if(n.index<=0||n.index+1>=t.length-1)return;let r=l(e);if(r){if(n.vertical){let i=n.a.x,a=Math.min(r.src.left,r.dst.left),o=Math.max(r.src.right,r.dst.right),s=io+X?`right`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`vertical`,side:s,coord:i,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}:void 0}if(n.horizontal){let i=n.a.y,a=Math.min(r.src.top,r.dst.top),o=Math.max(r.src.bottom,r.dst.bottom),s=io+X?`bottom`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`horizontal`,side:s,coord:i,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}:void 0}}},`externalRailForSegment`),d=t(()=>{let e=[];for(let t of a){let n=o(t);for(let r of Q(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=t((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&z(e.min,e.max,t.min,t.max)>=Z,`railsInteract`),p=t(e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;let i=[r],a=[];for(n.add(r);i.length>0;){let t=i.pop();a.push(t);for(let r of e)!n.has(r)&&f(t,r)&&(n.add(r),i.push(r))}a.length>1&&t.push(a)}return t},`connectedComponents`),m=t(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord){let n=e.map(e=>e.coord),r=m(e),i=[];if(e.length<=6){let a=Array(r.length).fill(!1),o=[],s=t(()=>{if(o.length===e.length){o.some((e,t)=>Math.abs(e-n[t])>=X)&&i.push([...o]);return}for(let[e,t]of r.entries())a[e]||(a[e]=!0,o.push(t),s(),o.pop(),a[e]=!1)},`visit`);return s(),i}for(let e=0;e{let n=new Map;for(let[r,i]of e.entries()){let e=t[r],a=n.get(i.edge)??i.points.map(e=>({x:e.x,y:e.y}));i.axis===`vertical`?(a[i.segmentIndex].x=e,a[i.segmentIndex+1].x=e):(a[i.segmentIndex].y=e,a[i.segmentIndex+1].y=e),n.set(i.edge,a)}let r=new Map;for(let[e,t]of n){let n=Se(H(t));if(Q(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=t(e=>{for(let[t,n]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Q(n))if(J(t.a,t.b,r,e,-2)||J(t.a,t.b,i,[],-2))return!1}for(let t=0;t=Z)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=s();if(e===0)return;let t,n=e,r=c(),i=1/0;for(let a of p(d()))for(let o of h(a)){let l=g(a,o);if(!l||!_(l))continue;let u=s(l);if(u>=e)continue;let d=c(l),f=a.reduce((e,t,n)=>e+Math.abs(o[n]-t.coord),0);u>n||u===n&&(d>r||d===r&&f>=i)||(t=l,n=u,r=d,i=f)}if(!t)return;for(let[e,n]of t)e.points=n}}t(ht,`reassignCrossingExternalRailChannels`);function gt(e,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t,n)=>H(e===t?n??[]:e.points??[]),`pointsFor`),s=t(e=>Q(e).reduce((e,t)=>{let n=t.a.x-t.b.x,r=t.a.y-t.b.y;return e+Math.hypot(n,r)},0),`pathLength`),c=t((e,t)=>{let n=0;for(let r=0;r{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&z(e.a.x,e.b.x,t.left,t.right)>=Z}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&z(e.a.y,e.b.y,t.top,t.bottom)>=Z}return!1},`segmentRunsAlongRectBorder`),u=t(e=>{let t=[e.start,e.end].filter(e=>!!e),r=[];for(let e of t){let t=n.get(e),i=t?K(t):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=t((e,t)=>{if(t+3>=e.length)return[];let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=L(n,r,X)&&R(r,i,X)&&L(i,a,X),s=R(n,r,X)&&L(r,i,X)&&R(i,a,X);if(!o&&!s||!(o?Math.sign(r.x-n.x)!==Math.sign(a.x-i.x):Math.sign(r.y-n.y)!==Math.sign(a.y-i.y)))return[];let c=F(n,a,X)||I(n,a,X)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],l=c.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:c.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),u=new Set;return l.map(e=>Se(H(e))).filter(e=>{if(Q(e).length!==e.length-1||!e.some(e=>P(e,a,X)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return u.has(t)?!1:(u.add(t),!0)})},`shortcutCandidatesAt`),f=t((e,t,n)=>{let s=[e.start,e.end].filter(e=>!!e),d=u(e);for(let e of Q(t))if(J(e.a,e.b,r,s,-2)||J(e.a,e.b,i,[],-2)||d.some(t=>l(e,t)))return!1;for(let n of a)if(n!==e){for(let e of Q(t))for(let t of Q(o(n)))if(B(e,t,.5)>=Z)return!1}return c(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=c(),t,n,r=e,i=1/0,l=1/0;for(let u of a){let a=o(u),p=V(a,X),m=s(a);for(let o=0;o<=a.length-4;o++)for(let h of d(a,o)){let a=V(h,X),o=s(h);if(!(ar||d===r&&(a>i||a===i&&o>=l)||(t=u,n=h,r=d,i=a,l=o)}}if(!t||!n)return;t.points=n}}t(gt,`shortcutRedundantOrthogonalJogs`);function _t(e,n){let r=[];for(let e of n.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,n=e.y??0,i=K(e);i&&r.push({id:String(e.id??``),cx:t,cy:n,rect:i})}if(r.length===0)return;let i=new Map(r.map(e=>[e.id,e])),a=r.map(e=>({id:e.id,rect:e.rect})),o=[`top`,`bottom`,`left`,`right`],s={top:Math.min(...r.map(e=>e.rect.top))-20,bottom:Math.max(...r.map(e=>e.rect.bottom))+20,left:Math.min(...r.map(e=>e.rect.left))-20,right:Math.max(...r.map(e=>e.rect.right))+20},c=e.filter(e=>!e.isLayoutOnly),l=new Map(c.map((e,t)=>[e,t])),u=t(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(s[e]+t*20*r);return n},`outwardTracksForSide`),d=t((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),f=t((e,t)=>{let n=0;for(let r of e)for(let e of t)_e(r.a,r.b,e.a,e.b,X)&&n++;return n},`crossingCountBetweenSegments`),p=t((e,t)=>f(Q(e),Q(t)),`crossingCountBetweenPaths`),m=t((e=new Map)=>{let n=0,r=[],i=new Set,a=[],o=t(e=>{i.has(e)||(i.add(e),a.push(e))},`addEdge`);for(let t=0;t0&&(n+=l,r.push({first:i,second:t,count:l}),o(i),o(t))}}return a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:n,pairs:r,edgeSet:i,edges:a}},`crossingSnapshot`),h=t((e,t)=>{let n=new Set(t.keys());if(n.size===0)return e.count;let r=0;for(let t of e.pairs)(n.has(t.first)||n.has(t.second))&&(r+=t.count);let i=0;for(let e=0;e{let t=new Map;for(let n of e.pairs){let e=t.get(n.first)??new Set;e.add(n.second),t.set(n.first,e);let r=t.get(n.second)??new Set;r.add(n.first),t.set(n.second,r)}let n=[],r=new Set;for(let i of e.edges){if(r.has(i))continue;let e=[i],a=[];for(r.add(i);e.length>0;){let n=e.pop();a.push(n);for(let i of t.get(n)??[])r.has(i)||(r.add(i),e.push(i))}a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),a.length>1&&n.push(a)}return n},`crossingComponents`),_=t(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=t(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of c)e.has(t)||_(t).some(e=>r.has(e))&&i.push(t);i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),t.push(i)}return t},`pairSearchGroups`),y=t((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=t(e=>{let t=new Map;for(let n of e.pairs)t.set(n.first,(t.get(n.first)??0)+n.count),t.set(n.second,(t.get(n.second)??0)+n.count);return t},`currentCrossingsByEdge`),x=t(e=>e.slice(1).reduce((t,n,r)=>{let i=e[r];return t+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),`pathLength`),S=t((e=new Map)=>c.reduce((t,n)=>t+V(d(n,e)),0),`totalBends`),C=t((e=new Map)=>c.reduce((t,n)=>t+x(d(n,e)),0),`totalLength`),w=t((e,t,n=new Map)=>{let r=Q(t);for(let t of c)if(t!==e){for(let e of r)for(let r of Q(d(t,n)))if(B(e,r,.5)>=Z)return!0}return!1},`pathHasSegmentConflict`),T=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Q(t))if(J(e.a,e.b,a,n,-2))return!0;return!1},`pathHitsNode`),E=t((e,t)=>{let n=Se(H(t));Q(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),D=t(e=>e===`left`||e===`right`,`sideIsHorizontal`),O=t((e,t,n)=>{switch(t){case`left`:return Math.min(e.x,n.x)-20;case`right`:return Math.max(e.x,n.x)+20;case`top`:return Math.min(e.y,n.y)-20;case`bottom`:return Math.max(e.y,n.y)+20}},`localTrackForSameSide`),k=t((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[O(t,n,r),s[n]];for(let o of a)for(let a=0;a<=2;a++)E(e,ue(t,n,r,o+i*20*a))},`addSameSideCandidates`),A=t((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),j=t((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),ee=t((e,t,n,r,i)=>{let a=[...u(`top`),...u(`bottom`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),te=t((e,t,n,r,i)=>{let a=[...u(`left`),...u(`right`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),M=t(e=>{let t=new Set;return e.map(e=>H(e)).filter(e=>{let n=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return t.has(n)||e.length<2?!1:(t.add(n),!0)})},`dedupeCandidatePaths`),ne=t((e,t,n,r)=>{let i=[],a=le(e,t,n,r,20,X);a&&E(i,a),t===r&&k(i,e,t,n);let o=D(t),s=D(r);return o&&!s?A(i,e,t,n,r):!o&&s?j(i,e,t,n,r):o?ee(i,e,t,n,r):te(i,e,t,n,r),M(i)},`buildCandidatesForSides`),N=t((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=ce(r,s),c=s===`top`||s===`bottom`?u(s):a;for(let r of i){E(e,[t,n,{x:r,y:n.y},{x:r,y:o.y},o]);for(let i of c)E(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:o.x,y:i},o])}}},`addVerticalDepartureOuterTrackCandidates`),P=t((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=ce(r,s),c=s===`left`||s===`right`?u(s):i;for(let r of a){E(e,[t,n,{x:n.x,y:r},{x:o.x,y:r},o]);for(let i of c)E(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:o.y},o])}}},`addHorizontalDepartureOuterTrackCandidates`),F=t(e=>{let t=e.start,n=e.end,r=n?i.get(n):void 0;if(!t||!r)return[];let a=H(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],c=[];return R(o,s,X)?N(c,o,s,r):L(o,s,X)&&P(c,o,s,r),c},`terminalPreservingOuterTrackCandidates`),I=t(e=>{let t=e.start,n=e.end,r=t?i.get(t):void 0,a=n?i.get(n):void 0;if(!r||!a)return[];let s=[];for(let e of o){let t=ce(r,e);for(let n of o)s.push(...ne(t,e,ce(a,n),n))}return s.push(...F(e)),s},`candidatePathsFor`),z=t(()=>new Map(c.map(e=>[e,Q(d(e))])),`currentSegmentsByEdge`),re=t((e,t,n)=>{let r=new Set;for(let i of c){if(i===e)continue;let a=n.get(i)??Q(d(i));t.some(e=>a.some(t=>B(e,t,.5)>=Z))&&r.add(i)}return r},`sharedTrackConflictsFor`),ie=t((e,t,n,r)=>{let i=new Set;return I(e).map(e=>Se(H(e))).filter(t=>{if(T(e,t))return!1;let n=t.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return i.has(n)||t.length<2?!1:(i.add(n),!0)}).map(i=>{let a=Q(i),o=0;for(let t of c)t!==e&&(o+=f(a,n.get(t)??Q(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:V(i,X),totalBends:V(i),length:x(i)}}).filter(({crossings:e})=>e<=t.count).sort((e,t)=>e.crossings-t.crossings||e.bends-t.bends||e.length-t.length).slice(0,48).map(t=>({path:t.candidate,segments:t.candidateSegments,sharedTrackConflicts:re(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),ae=t((e,t,n,r,i,a)=>{let o=0;for(let n of e.pairs)(n.first===t||n.second===t||n.first===r||n.second===r)&&(o+=n.count);let s=f(n.segments,i.segments);for(let e of c){if(e===t||e===r)continue;let o=a.get(e)??Q(d(e));s+=f(n.segments,o)+f(i.segments,o)}return e.count-o+s},`pairCrossingCount`),U=t((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),W=t((e,t)=>e.segments.some(e=>t.segments.some(t=>B(e,t,.5)>=Z)),`candidatesShareTrack`),G=t((e,t,n,r)=>U(t,n.edge)&&U(r,e.edge)&&!W(t,r),`pairCandidatesAreCompatible`),oe=t((e,t,n,r,i)=>{let a=ae(e.current,t.edge,n,r.edge,i,e.baseSegments);if(!(a>=e.current.count))return{replacements:new Map([[t.edge,n.path],[r.edge,i.path]]),crossings:a,bends:e.currentBends-(e.baseBendsByEdge.get(t.edge)??0)-(e.baseBendsByEdge.get(r.edge)??0)+n.totalBends+i.totalBends,length:e.currentLength-(e.baseLengthByEdge.get(t.edge)??0)-(e.baseLengthByEdge.get(r.edge)??0)+n.length+i.length}},`scorePairReplacement`),se=t((e,t)=>e.crossings{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!G(t,r,n,a))continue;let o=oe(e,t,r,n,a);o&&se(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),q=t(e=>{let t=S(),n=C(),r=z(),i=b(e),a=new Map(c.map(e=>[e,V(d(e))])),o=new Map(c.map(e=>[e,x(d(e))])),s=new Map,l=v(e);for(let t of l)for(let n of t){if(s.has(n))continue;let t=ie(n,e,r,i);t.length>0&&s.set(n,{edge:n,candidates:t})}let u={replacements:new Map,crossings:e.count,bends:t,length:n},f={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of l){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>s.get(e)).filter(e=>!!e);for(let e=0;e0?u.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=V(d(o),X);for(let c of I(o)){let l=T(o,c),u=!l&&w(o,c),d=y(e,o,c),f=V(c,X);l||u||(di||d===i&&f>=a||(n=o,r=c,i=d,a=f))}}if(n&&r){n.points=r;continue}let o=q(e);if(!o)return;for(let[e,t]of o)e.points=t}}t(_t,`resolveRenderedOrthogonalCrossings`);var vt=.001,yt=8;function bt(e,n){let{nodeInfoById:r,realNodeRects:i}=de(n),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...i.map(e=>e.rect.top))-20,bottom:Math.max(...i.map(e=>e.rect.bottom))+20,left:Math.min(...i.map(e=>e.rect.left))-20,right:Math.max(...i.map(e=>e.rect.right))+20},s=t((e,t,n,r)=>{let i=[],a=le(e,t,n,r,20,vt);return a&&i.push(a),t===r&&i.push(ue(e,t,n,o[t])),i},`buildOrthogonalPathCandidates`),c=t((e,t)=>{for(let n=0;n{let i=0,a=re(t,vt),o=n.start,s=n.end;for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,c=t.end;if(!r&&o&&s&&(e===o||e===s||c===o||c===s))continue;let l=t.points;if(!(!l||l.length<2))for(let e of a)for(let t of re(l,vt)){if(me(e.a,e.b,t.a,t.b,vt,vt)){i++;continue}B(e,t,vt)>=yt&&i++}}return i},`pathConflictCount`),u=t((e,t)=>{let n=Math.abs(e.y-t.rect.top),r=Math.abs(e.y-t.rect.bottom),i=Math.abs(e.x-t.rect.left),a=Math.abs(e.x-t.rect.right),o=`top`,s=n;return r{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points??[];if(e.length<1)continue;let n=t.id??``,i=t.start,a=t.end;if(i){let t=r.get(i);t&&f(i,u(e[0],t),n)}if(a){let t=r.get(a);t&&f(a,u(e[e.length-1],t),n)}}let p=t((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!e||e.length<2)continue;let n=V(e,vt);if(n<4)continue;let i=t.start,o=t.end;if(!i||!o)continue;let m=r.get(i),h=r.get(o);if(!m||!h)continue;let g=t.id??``,_=l(e,t,!0),v=l(e,t),y,b=_,x=n;for(let e of a){if(p(i,e,g))continue;let n=ce(m,e);for(let r of a){if(p(o,r,g))continue;let a=ce(h,r);for(let u of s(n,e,a,r)){if(c(u,[i,o]))continue;let e=V(u,vt);if(_>0){let n=l(u,t,!0);if(n>b||n===b&&e>=x)continue;b=n,x=e,y=u;continue}l(u,t)>v||ee.edgeId!==g));let n=d.get(o);n&&d.set(o,n.filter(e=>e.edgeId!==g)),f(i,u(y[0],m),g),f(o,u(y[y.length-1],h),g)}}}t(bt,`simplifyDetouredEdges`);var xt=.001,St=10,Ct=7;function wt(e,t){let n=t?0:e.length-1,r=t?1:-1,i=e[n],a=e[n+r];if(!i||!a)return;let o=a.x-i.x,s=a.y-i.y;if(!(Math.abs(o)+Math.abs(s)t&&G(e,Tt(t)))}t(Et,`labelOverlapsOwnMarker`);function Dt(e,n){let r=[];for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!(!e||e.length<2))for(let n=0;n{let n=oe(t,3);for(let{nodeId:t,rect:r}of i)if(t!==e&&G(n,r))return!0;return!1},`labelOverlapsForeignNode`),s=t((e,t)=>{let n=oe(t,3);for(let t of r)if(t.edgeId!==e&&ae(t.p1,t.p2,n))return!0;return!1},`labelOverlapsForeignEdge`),c=t((e,t,n)=>o(e,n)||s(t,n),`labelOverlapsAnything`),l=[],u=t(e=>{for(let{id:t,rect:n}of a)if(W(n,e))return t},`findContainingLane`),d=t((e,t)=>l.some(n=>n.labelId!==e&&G(t,n.rect)),`overlapsPlacedLabel`);for(let r of e){if(r.isLayoutOnly)continue;let e=r.labelNodeId;if(!e)continue;let i=n.get(e);if(!i)continue;let f=r.points;if(!f||f.length<2)continue;let p=i.width??0,m=i.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e=xt&&i>=xt||h.push({idx:e,length:r+i,orientation:r>=xt?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx0?g:h,v=p>=m?`horizontal`:`vertical`,y=t(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=t((e,t)=>{let n=f[e.idx],r=f[e.idx+1];return{midX:n.x+(r.x-n.x)*t,midY:n.y+(r.y-n.y)*t}},`anchorAtT`),w=t((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=t((e,t)=>e.midX>=t.left-xt&&e.midX<=t.right+xt&&e.midY>=t.top-xt&&e.midY<=t.bottom+xt,`pointInsideRectInclusive`),E=t(e=>{let t=se(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=a.find(({rect:t})=>T(e,t));if(!r)return;let i=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,c=r.rect.bottom-m/2-1;if(i>o||s>c)return;let l={midX:w(e.midX,i,o),midY:w(e.midY,s,c)},d=se(l.midX,l.midY,p,m);return T(e,d)?{laneId:r.id,anchor:l,rect:d}:void 0},`placementForAnchor`),D=t((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=t((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+xt{let n=y(t);for(let t of n)for(let n of S){let i=C(t,n);if(!O(t,i))continue;let a=E(i);if(a&&!Et(a.rect,f)&&!d(e,a.rect)&&!c(e,r.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=t((t,n,i=!1)=>{let a=y(t);for(let t of a){let a={midX:t.midX,midY:t.midY};if(n&&!O(t,a))continue;let c=E(a);if(c&&!Et(c.rect,f)&&!d(e,c.rect)&&!o(e,c.rect)&&(i||!s(r.id,c.rect)))return{laneId:c.laneId,anchor:c.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.lengtht.labelId===e);n>=0?l[n]={labelId:e,rect:t}:l.push({labelId:e,rect:t})}}}t(Dt,`anchorLabelsToPolyline`);var Ot=1e-6,kt=8/2,At=3;function jt(e,t){return e{let s=jt(r,i),c=0,l=t(e=>{if(!e)return;let t=a.get(e);if(!t)return;let n=o===`x`?t.w/2:t.h/2;n>c&&(c=n)},`consider`);l(n.labelNodeId);for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,r=t.end;!e||!r||jt(e,r)===s&&l(t.labelNodeId)}return c>0?c+At:0},`labelClearanceFor`);for(let t of e){if(t.isLayoutOnly)continue;let n=t.points;if(!ie(n,Ot))continue;let a=pe(t,r,Ot);if(!a)continue;let{srcId:s,dstId:c,srcInfo:l,dstInfo:u,collinearX:d,collinearY:f}=a;if(d===f)continue;let p,m;if(d){let e=u.cy>l.cy;p={x:l.cx,y:e?l.rect.bottom:l.rect.top},m={x:u.cx,y:e?u.rect.top:u.rect.bottom}}else{let e=u.cx>l.cx;p={x:e?l.rect.right:l.rect.left,y:l.cy},m={x:e?u.rect.left:u.rect.right,y:u.cy}}if(J(p,m,i,[s,c],1))continue;let h=o(t,s,c,d?`x`:`y`),g=h>kt?h:kt,_=[0,g,-g];for(let n of _){let r={...p},a={...m};if(d){if(r.x+=n,a.x+=n,r.x<=l.rect.left||r.x>=l.rect.right||a.x<=u.rect.left||a.x>=u.rect.right)continue}else if(r.y+=n,a.y+=n,r.y<=l.rect.top||r.y>=l.rect.bottom||a.y<=u.rect.top||a.y>=u.rect.bottom)continue;if(!J(r,a,i,[s,c],1)&&!ge(r,a,e,t,{epsilon:Ot})){t.points=[r,a];break}}}}t(Mt,`straightenCollinearSiblingDetours`);function Nt(e,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=q(n.values()),o=t((e,t)=>re(t,r).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),s=t(()=>{let t=[];for(let n of e){if(n.isLayoutOnly)continue;let e=n.points;!e||e.length<2||t.push(...o(n,H(e)))}return t},`allSegments`),c=t((e,t)=>e.horizontal&&t.horizontal?z(e.a.x,e.b.x,t.a.x,t.b.x)>=8&&Math.abs(e.a.y-t.a.y)<7:e.vertical&&t.vertical?z(e.a.y,e.b.y,t.a.y,t.b.y)>=8&&Math.abs(e.a.x-t.a.x)<7:!1,`hasCrowdedParallelTrack`),l=t((t,n)=>{let s=t.start,l=t.end,u=o(t,n);if(u.length!==n.length-1)return!1;let d=[s,l].filter(e=>!!e),f=t.labelNodeId?[t.labelNodeId]:[];for(let e of u)if(J(e.a,e.b,i,d,-2)||J(e.a,e.b,a,f,-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of u)for(let i of o(n,H(e)))if(c(t,i)||_e(t.a,t.b,i.a,i.b,r))return!1}}return!0},`candidateIsSafe`),u=t((e,t)=>{let n=H(e.edge.points??[]);if(n.length<4||e.index>=n.length-1)return;let r=n.map(e=>({...e}));if(e.horizontal)r[e.index].y+=t,r[e.index+1].y+=t;else if(e.vertical)r[e.index].x+=t,r[e.index+1].x+=t;else return;return o(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=t((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=t(e=>{let t=e.edge,r=H(t.points??[]);if(r.length!==4||e.index!==1)return;let i=t.start?n.get(t.start):void 0,a=t.end?n.get(t.end):void 0,o=i?K(i):void 0,s=a?K(a):void 0,c=r.slice(e.index+2);if(!(!i||!a||!o||!s||c.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:c}},`sourceDetourContextFor`),p=t((e,t,n,i,a,o)=>{let s=i.y>=n.y,c=s?a.bottom:a.top,l=c+(s?20:-20);if(s&&e.b.y<=l+r||!s&&e.b.y>=l-r)return;let u=e.a.x+t;return H([{x:n.x,y:c},{x:n.x,y:l},{x:u,y:l},{x:u,y:e.b.y},...o],r)},`verticalSourceDetour`),m=t((e,t,n,i,a,o)=>{let s=i.x>=n.x,c=s?a.right:a.left,l=c+(s?20:-20);if(s&&e.b.x<=l+r||!s&&e.b.x>=l-r)return;let u=e.a.y+t;return H([{x:c,y:n.y},{x:l,y:n.y},{x:l,y:u},{x:e.b.x,y:u},...o],r)},`horizontalSourceDetour`),h=t((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=s(),t=!1;for(let n=0;ne.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}t(Nt,`nudgeSharedInteriorSubpaths`);function Pt(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(Math.abs(c)<1e-10)return!1;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c,p=.01;return d>p&&d<1-p&&f>p&&f<1-p}t(Pt,`segmentsIntersect`);function Ft(t){let n=t.nodes??[],r=t.edges??[],i=[];if(!r.length||!n.length)return i;let a=fe(n),o=[];for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,s=e.labelNodeId,c=e.id??`${n}->${r}`;for(let e of a)if(!(e.nodeId===n||e.nodeId===r)&&!(s&&e.nodeId===s)){for(let n=0;n0){let t=i.filter(e=>e.type===`edge-node-overlap`).length,n=i.filter(e=>e.type===`edge-edge-crossing`).length;e.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${t} edge-node overlap(s), ${n} edge crossing(s)`);for(let t of i)e.warn(`[SWIMLANE_VALIDATE] ${t.type}: ${t.detail}`)}return i}t(Ft,`validateSwimlanesLayout`);function It(e,n){let r=e.nodes??[],i=e.edges??[],a=r.filter(e=>!e.isGroup);if((n===`LR`||n===`RL`)&&a.length>0&&!nt(e,n)||n===`BT`&&a.length>0&&!tt(e))return;for(let e of i){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=Se(xe(t)))}bt(i,r),Mt(i,r),ot(i,r);let o=new Map;for(let e of r)o.set(String(e.id),e);Dt(i,o),Oe(i,o),st(i,o),Nt(i,o),lt(i,o),ut(i,o),dt(i,o),mt(i,o);let s=t(()=>{_t(i,o),ht(i,o),gt(i,o),Dt(i,o),qe(i,o),dt(i,o),Dt(i,o),qe(i,o)},`finalizeRenderedEdges`);s(),Nt(i,o),s(),ft(i,o),pt(i,o),ft(i,o),pt(i,o)}t(It,`postProcessSwimlaneLayout`);function Lt(e){let t=new Map(e.nodeById),n=new Set,r=[];for(let i of e.edges){if(!t.has(i.src)||!t.has(i.dst))continue;let e=`${i.id}:${i.src}->${i.dst}`;n.has(e)||(n.add(e),r.push(i))}return{nodes:[...t.keys()],edges:r,layout:e.layout,nodeById:t}}t(Lt,`normalizeGraph`);function Rt(e,t){return e.edges.filter(e=>e.dst===t)}t(Rt,`incoming`);function zt(e){let t=new Map;for(let n of e.nodes)t.set(n,[]);for(let n of e.edges)t.get(n.src).push(n.dst);return t}t(zt,`buildSuccessorMap`);function Bt(e){let t=zt(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}t(Bt,`buildSortedSuccessorMap`);function Vt(e){let t=new Map;for(let n of e.nodes)t.set(n,0);for(let n of e.edges)t.set(n.dst,(t.get(n.dst)??0)+1);return t}t(Vt,`buildInDegreeMap`);function Ht(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}t(Ht,`sortedZeroInDegreeNodes`);function Ut(e,t=()=>!0){let n=new Map,r=new Map;for(let t of e.nodes)n.set(t,[]),r.set(t,[]);for(let i of e.edges)t(i)&&(r.get(i.src).push(i.dst),n.get(i.dst).push(i.src));return{preds:n,succs:r}}t(Ut,`buildPredecessorSuccessorMaps`);function Wt(e,t,n,r){let i=0;for(let t of e.nodes)r?.skipGroups&&e.nodeById.get(t)?.isGroup||(i=Math.max(i,n[t]??0));let a=Array.from({length:i+1},()=>[]);for(let i of t)r?.skipGroups&&e.nodeById.get(i)?.isGroup||a[Math.max(0,n[i]??0)].push(i);return a}t(Wt,`buildLayersFromRanks`);function Gt(e){let t=Vt(e),n=Ht(t),r=[],i=Bt(e);for(;n.length;){let e=n.shift();r.push(e);for(let r of i.get(e)??[])if(t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0){let e=0;for(;e{if(i-t<=1)return 0;let a=t+i>>1,o=r(t,a)+r(a,i),s=t,c=a,l=t;for(;s=i||se.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let i=Object.create(null);for(let e of n.nodes)i[e]=0;let a=[],o=t(e=>{i[e]=1;for(let t of r.get(e)??[]){let e=t.dst;i[e]===0?o(e):i[e]===1&&a.push(t)}i[e]=2},`dfs`),s=[...n.nodes].sort((e,t)=>e.localeCompare(t));for(let e of s)i[e]===0&&o(e);let c=new Set(a.map(e=>`${e.id}:${e.src}->${e.dst}`)),l=n.edges.map(e=>c.has(`${e.id}:${e.src}->${e.dst}`)?{id:e.id,src:e.dst,dst:e.src,weight:e.weight,ref:e.ref}:e);return{acyclic:{nodes:[...n.nodes],edges:l,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:a}}t(Jt,`removeCycles_DFS`);function Yt(e){let n=new Map,r=t(t=>{if(n.has(t))return n.get(t);let i=e.nodeById.get(t);if(!i)return n.set(t,null),null;let a=i.parentId;if(!a)return n.set(t,null),null;let o=r(a)??a;return n.set(t,o),o},`resolve`);for(let t of e.nodes)r(t);return n}t(Yt,`buildTopLaneMap`);function Xt(e){let t=Yt(e);return e=>t.get(e)??null}t(Xt,`createTopLaneResolver`);function Zt(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}t(Zt,`buildTopLaneOrder`);function Qt(e,t){let n=Zt(e);if(!t||t.length===0)return n;let r=new Set(n),i=new Set,a=[];for(let e of t)!r.has(e)||i.has(e)||(i.add(e),a.push(e));for(let e of n)i.has(e)||a.push(e);return a}t(Qt,`resolveTopLaneOrder`);var $t={EPSILON:1e-6},en={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},tn={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function nn(e,n){let r=Lt(e),i=n?.laneOf??(()=>null),a=n?.rankHint,{preds:o}=Ut(r);for(let e of o.values())e.sort((e,t)=>e.localeCompare(t));let s=Gt(r)??[...r.nodes].sort((e,t)=>e.localeCompare(t)),c=new Map;for(let[e,t]of s.entries())c.set(t,e);let l=new Map,u=new Map;for(let e of r.nodes)u.set(e,[]);for(let e of s){let t=(o.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=rn(e,t,{laneOf:i,rankHint:a,topoIndex:c});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of r.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of r.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=c.get(e)??0,r=c.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=an(r),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=on(m),g=sn(m),_=new Map;for(let e of r.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=t(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of s)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:s}}t(nn,`buildDrivingTree`);function rn(e,t,n){let r=n.laneOf(e);return[...t].sort((e,t)=>{let i=n.laneOf(e),a=n.laneOf(t),o=i!=null&&i===r;if(o!==(a!=null&&a===r))return o?-1:1;let s=n.rankHint?.[e],c=n.rankHint?.[t];if(s!=null&&c!=null&&s!==c)return c-s;let l=n.topoIndex.get(e)??0,u=n.topoIndex.get(t)??0;return l===u?e.localeCompare(t):l-u})[0]}t(rn,`chooseParent`);function an(e){let t=new Map;for(let n of e.nodes)t.set(n,new Set);for(let n of e.edges)t.get(n.src).add(n.dst),t.get(n.dst).add(n.src);return t}t(an,`buildAdjacency`);function on(e){let t=new Map,n=0;for(let r of e.keys()){if(t.has(r))continue;let i=[r];for(;i.length>0;){let r=i.pop();if(!t.has(r)){t.set(r,n);for(let n of e.get(r)??[])t.has(n)||i.push(n)}}n++}return t}t(on,`assignComponents`);function sn(e){let n=new Map,r=new Map,i=[],a=[],o=0,s=t((t,c)=>{n.set(t,++o),r.set(t,o);for(let l of e.get(t)??[])l!==c&&(n.has(l)?(n.get(l)??0)<(n.get(t)??0)&&(i.push([t,l]),r.set(t,Math.min(r.get(t)??o,n.get(l)??o))):(i.push([t,l]),s(l,t),r.set(t,Math.min(r.get(t)??o,r.get(l)??o)),(r.get(l)??0)>=(n.get(t)??0)&&a.push(cn(t,l,i,a.length))))},`visit`);for(let t of e.keys())n.has(t)||s(t,null);return a}t(sn,`computeBlocks`);function cn(e,t,n,r){let i=[],a=new Set;for(;n.length>0;){let r=n.pop();if(i.push(r),a.add(r[0]),a.add(r[1]),r[0]===e&&r[1]===t||r[0]===t&&r[1]===e)break}return{id:r,edges:i,nodes:[...a]}}t(cn,`popBlock`);function ln(e,n,r){let i=[...e.nodes],a=new Map;for(let[e,t]of i.entries())a.set(t,e);let o=i.length,s=Array(o).fill(-1),c=Array(o).fill(0),l=[],u=new Set;for(let e of i){let t=r.parent.get(e)??null,n=a.get(e);n!=null&&(t??(s[n]=-1,c[n]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=a.get(e);if(t==null)continue;let n=r.children.get(e)??[];for(let e of n){if(u.has(e))continue;let n=a.get(e);n!=null&&(s[n]=t,c[n]=c[t]+1,u.add(e),l.push(e))}}for(let e of i){if(u.has(e))continue;let t=a.get(e);t!=null&&(s[t]=-1,c[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,o)))+1),f=Array.from({length:d},()=>Array(o).fill(-1));for(let e=0;e{if(e===-1||t===-1)return-1;c[e]>t&1&&(e=f[t][e],e===-1))return-1;if(e===t)return e;for(let n=d-1;n>=0;n--){let r=f[n][e],i=f[n][t];r===-1||i===-1||r!==i&&(e=r,t=i)}return f[0][e]},`lcaIndex`),m=Array.from({length:o},()=>new Map);for(let t of e.edges){let e=t.src,r=t.dst,i=n[e],o=n[r];if(i==null||o==null||(i>o&&([e,r]=[r,e],[i,o]=[o,i]),i==null||o==null||i===o))continue;let s=a.get(e),c=a.get(r);if(s==null||c==null)continue;let l=p(s,c);if(l===-1)continue;let u=m[l];for(let e=i;e{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=t(e=>{let t=a.get(e);_.add(e);let i=t==null?void 0:m[t],o=i?new Map(i):new Map,s=r.children.get(e)??[];for(let t of s){let r=v(t),i=n[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=n[t];s!=null&&s>i&&(o+=1),a.set(t,o)}g(o,r)}return o},`dfs`);for(let e of r.roots)_.has(e)||v(e);for(let e of i)_.has(e)||v(e);return h}t(ln,`computeSubtreeCrossCounts`);function un(e,n,r){let i=new Map,a=t(e=>{let t=r[e]??0,o=[...n.get(e)??[]];o.sort(dn(r));for(let e of o){a(e);let n=i.get(e);n!=null&&(t=Math.min(t,n))}i.set(e,t)},`annotate`);for(let t of e)a(t);return i}t(un,`annotateMinimumLayers`);function dn(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}t(dn,`compareByRankThenId`);function fn(e,n,r,i){let a=0;for(let e of n){let t=r[e]??0;t>a&&(a=t)}let o=Array.from({length:a+1},()=>[]),s=new Set,c=t(e=>{if(s.has(e))return;s.add(e);let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e);for(let t of i(e))c(t)},`emit`);for(let t of e)c(t);for(let e of n)if(!s.has(e)){let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e),s.add(e)}return o}t(fn,`emitNodesInTreeOrder`);function pn(e){let t=[];for(let n of e){let e=new Set,r=[];for(let t of n)e.has(t)||(e.add(t),r.push(t));t.push(r)}return t}t(pn,`deduplicateLayers`);function mn(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],c=[],l=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):c.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),c.sort((e,t)=>{let n=l?.get(e)??0,i=l?.get(t)??0;if(n!==i)return n-i;let a=r.get(e)??o,s=r.get(t)??o;return a===s?e.localeCompare(t):a-s}),[...s.map(e=>e.child),...c]}}t(mn,`createChildOrderer`);function hn(e,t,n){let r=nn(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=ln(e,t,r),s=[...a].sort(dn(t)),c=mn(i,t,o,un(s,i,t)),l=fn(s,e.nodes,t,c);return l=pn(l),l}t(hn,`buildMultitreeLayerOrder`);function gn(e,t,n){let r=new Set(e),i=new Set(t),a=Kt(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return qt(o)}t(gn,`countCrossingsBetweenAdjacent`);function _n(e,t,n){let r=[];for(let e of t){let t=n[e.src],i=n[e.dst];if(t==null||i==null||t===i)continue;let a=e.src,o=e.dst,s=t,c=i;t>i&&(a=e.dst,o=e.src,s=i,c=t);for(let t=s;t(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let c=0;for(let e of r.get(s)??[])c=Math.max(c,(n[e]??0)+1);if(c>=o)continue;let l=o;n[s]=c;let u=_n(hn(e,n,i),e.edges,n);u(t[e]??0)-(t[n]??0)||e.localeCompare(n));for(let i of r){let r=n(i);if(!r)continue;let a=e.edges.filter(e=>e.src===i);if(a.length===0)continue;let o=!1,s=0;for(let e of a){let t=n(e.dst);t==null||t===r?o=!0:s++}if(s===0||o)continue;let c=0,l=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?l=!0:c++)}if(c>0||!l)continue;let u=t[i]??0,d=u+s,f=0;for(let n of e.edges)n.dst===i&&(f=Math.max(f,(t[n.src]??0)+1));let p=Math.max(u,f,d);p!==u&&(t[i]=p)}}t(yn,`adjustCrossLaneSources`);function bn(e,t){let n=Lt(e),r=Gt(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=Xt(n),o=Object.create(null);for(let e of r){let r=Rt(n,e),s=t?.ignoreCrossLaneEdges?r.filter(t=>{let n=a(t.src),r=a(e);return!n||!r?!0:n===r}):r;if(s.length===0)o[e]=0;else if(i&&s.length===1){let t=s[0].src;a(t)===a(e)?o[e]=(o[t]??0)+1:o[e]=o[t]??0}else{let t=-1/0;for(let e of s)t=Math.max(t,(o[e.src]??0)+1);o[e]=t===-1/0?0:t}}return(t?.optimizeRanksByCrossings??!1)&&(o=vn(n,o)),t?.ignoreCrossLaneEdges&&yn(n,o),{layers:hn(n,o,a),rankOf:o,dummy:new Set}}t(bn,`assignLayers_LongestPath`);function xn(e,n){let r=Lt(e),i={...bn(r,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},a=Xt(r),{preds:o,succs:s}=Ut(r,e=>{if(n?.ignoreCrossLaneEdges){let t=a(e.src),n=a(e.dst);if(t&&n&&t!==n)return!1}return!0}),c=Gt(r)??[...r.nodes],l=[...c].reverse(),u=t((e,t)=>{let n=0;for(let t of o.get(e)??[])n=Math.max(n,(i[t]??0)+1);let r=1/0,a=s.get(e)??[];return a.length>0&&(r=Math.min(...a.map(e=>(i[e]??0)-1))),Number.isFinite(r)||(r=Math.max(n,t)),Math.min(Math.max(t,n),r)},`clampFeasible`),d=en.GRAVITY_ITERATIONS,f=t(e=>{let t=!1;for(let n of e){let e=o.get(n)??[],r=s.get(n)??[];if(e.length===0&&r.length===0)continue;let a=e.length>0?e.reduce((e,t)=>e+(i[t]??0)+1,0)/e.length:i[n]??0,c=r.length>0?r.reduce((e,t)=>e+(i[t]??0)-1,0)/r.length:i[n]??0,l=u(n,Math.round((a+c)/2));l!==i[n]&&(i[n]=l,t=!0)}return t},`relaxOrder`);for(let e=0;e0){let n=Math.min(...t.map(e=>(i[e]??0)-1));(i[e]??0)>n&&(i[e]=n)}}return{layers:Wt(r,c,i),rankOf:i,dummy:new Set}}t(xn,`assignLayers_Gravity`);function Sn(e){let t=Vt(e),n=Bt(e),r=Ht(t),i=[];for(;r.length>0;){let e=[];for(let a of r){i.push(a);for(let r of n.get(a)??[])t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0&&e.push(r)}r=e.sort((e,t)=>e.localeCompare(t))}return i.length===e.nodes.length?i:null}t(Sn,`topoSortByGenerationIfAcyclic`);function Cn(e,n){let r=Lt(e),i=n?.direction===`LR`?Sn(r)??[...r.nodes].sort():Gt(r)??[...r.nodes].sort(),a=Xt(r),o=t(e=>a(e)??e,`laneOf`),s=Object.create(null),c=new Map,l=t((e,t)=>n?.ignoreCrossLaneEdges??!0?+(o(e)===o(t)):1,`edgeWeight`);for(let e of i){if(r.nodeById.get(e)?.isGroup)continue;let t=Rt(r,e),n=0;if(t.length>0)for(let r of t){let t=r.src,i=s[t]??0;n=Math.max(n,i+l(t,e))}let i=o(e),a=c.get(i)??0,u=Math.max(n,a);s[e]=u,c.set(i,u+1)}return{layers:Wt(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}t(Cn,`assignLayers_LaneAwareCompact`);function wn(e,n){let r=Lt(n),{rankOf:i}=e,a=e.layers.map(e=>[...e]),o=new Set(e.dummy?[...e.dummy]:[]),s=0,c=new Map(r.nodeById),l=t(e=>{let t=`placeholder-${s++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(t,n),o.add(t);a.length<=e;)a.push([]);return a[e].push(t),i[t]=e,t},`addDummyAt`),u=[...r.edges].sort((e,t)=>e.id===t.id?e.src===t.src?e.dst.localeCompare(t.dst):e.src.localeCompare(t.src):e.id.localeCompare(t.id)),d=[];for(let e of u){let t=i[e.src]??0,n=i[e.dst]??0;if(n-t<=1){d.push(e);continue}let r=e.src;for(let i=t+1,a=0;i!r.nodes.includes(e))],edges:d,layout:r.layout,nodeById:c};return{layering:{layers:a,rankOf:i,dummy:o},graphWithDummies:f}}t(wn,`makeProperLayering`);function Tn(e){let t=e.length;if(t===0)return 1/0;let n=[...e].sort((e,t)=>e-t);return t%2==1?n[(t-1)/2]:.5*(n[t/2-1]+n[t/2])}t(Tn,`median`);function En(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}t(En,`barycenter`);function Dn(e,t,n,r){let i=new Map;for(let t of e)i.set(t,[]);for(let e of n)r===`down`?t.has(e.src)&&i.has(e.dst)&&i.get(e.dst).push(t.get(e.src)):t.has(e.dst)&&i.has(e.src)&&i.get(e.src).push(t.get(e.dst));return i}t(Dn,`neighborPositionsFor`);function On(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}t(On,`currentOrderTieBreak`);function kn(e,t,n){let r=new Set(e),i=new Set(t),a=Kt(e),o=Kt(t),s=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&s.push({u:a.get(e.src),v:o.get(e.dst)});return s.sort((e,t)=>e.u===t.u?e.v-t.v:e.u-t.u),qt(s.map(e=>e.v))}t(kn,`countCrossingsBetweenAdjacent`);function An(e,t,n){return[...e].sort((e,r)=>{let i=Tn(t.get(e)??[]),a=Tn(t.get(r)??[]);return i===a?On(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}t(An,`sortByHeuristic`);function jn(e,t,n,r,i,a){let o=Kt(e),s=Kt(t),c=Dn(t,o,n,r);if(!i||!a||a.length===0)return An(t,c,s);let l=new Map;for(let e of t){let t=i(e),n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[];for(let e of a){let t=l.get(e);if(!t||t.length===0)continue;let n=An(t,c,s);u.push(...n)}let d=l.get(null);if(d&&d.length>0){let e=An(d,c,s);for(let t of e){let e=En(c.get(t)??[]),n=u.length;if(isFinite(e)){for(let[t,r]of u.entries())if(es.has(e.src)&&c.has(e.dst)),d=l?r.filter(e=>c.has(e.src)&&l.has(e.dst)):void 0,f=t(t=>{let n=kn(e,t,u);return d&&i&&(n+=kn(t,i,d)),n},`crossingScore`),p=a?new Map:null;if(a&&p)for(let e of n)p.set(e,a(e));let m=!0,h=f(o);for(;m;){m=!1;for(let e=0;e+1[...e]),i=t.edges,a=Xt(t),o=Qt(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e=0;e--)r[e]=jn(r[e+1],r[e],i,`up`,a,o),r[e]=Mn(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}t(Nn,`orderLayers`);function Pn(e,n,r){let i=r?.layerGap??tn.DEFAULT_LAYER_GAP,a=r?.nodeGap??tn.DEFAULT_NODE_GAP,o=r?.laneGap??a*2,s=r?.direction??`TB`,c=s===`LR`||s===`RL`,l=e.layers,u=Object.create(null),d=Object.create(null),f=t(e=>n.nodeById.get(e),`getNode`),p=t(e=>f(e)?.width??0,`getWidth`),m=t(e=>f(e)?.height??0,`getHeight`),h=Xt(n),g=Qt(n,r?.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(c)for(let e=0;e+1Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),r=_[e],a=_[e+1],o=r/2+a/2,s=(t+n)/2,c=Math.max(0,s-o-i);v.push(c)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(r);e===null?n.push(r):(t[e]||=[]).push(r)}for(let[e,n]of Object.entries(t)){let t=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+o*Math.max(0,S.length-1))/2;for(let n=0;np(e)),r=i-(e.reduce((e,t)=>e+t,0)+a*(t.length-1))/2;for(let[i,o]of t.entries()){let t=e[i];u[o]=r+t/2,d[o]=T+n/2,r+=t+a}}}let o=v[e]??0;T+=n+i+o}let E=new Map;for(let e of n.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let t=e[0].ref,r=t.start,i=t.end;if(r==null||i==null)continue;let a=Math.round(((u[r]??0)+(u[i]??0))/2),o=new Set;for(let t of e)o.add(t.src),o.add(t.dst);for(let e of o)e===r||e===i||n.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}t(Pn,`assignCoordinates`);var Fn=8;function In(e){let t=2166136261;for(let n=0;n>>0}t(In,`hashString`);function Ln(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}t(Ln,`mulberry32`);function Rn(e,t){let n=[...e],r=Ln(t);for(let e=n.length-1;e>0;e--){let t=Math.floor(r()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n}t(Rn,`deterministicShuffle`);function zn(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}t(zn,`sourceDistance`);function Bn(e,t){let n=new Map;for(let[t,r]of e.entries())n.set(r,t);let r=0;for(let{a:e,b:i,weight:a}of t){let t=n.get(e),o=n.get(i);t==null||o==null||(r+=a*Math.abs(t-o))}return r}t(Bn,`laneArrangementCost`);function Vn(e){let t=Zt(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=Xt(e),i=new Map;for(let t of e.layout.edges??[]){if(t.isLayoutOnly)continue;let a=typeof t.start==`string`?t.start:void 0,o=typeof t.end==`string`?t.end:void 0;if(!a||!o||!e.nodeById.has(a)||!e.nodeById.has(o))continue;let s=r(a),c=r(o);if(!s||!c||s===c)continue;let l=n.get(s),u=n.get(c);if(l==null||u==null)continue;let[d,f]=l<=u?[s,c]:[c,s],p=`${d}\0${f}`,m=i.get(p);m?m.weight++:i.set(p,{a:d,b:f,weight:1})}return[...i.values()]}t(Vn,`buildWeightedLaneEdges`);function Hn(e,t,n){let r=[...e],i=Bn(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&oe.a===t.a?e.b.localeCompare(t.b):e.a.localeCompare(t.a)).map(({a:e,b:t,weight:n})=>`${e}:${t}:${n}`).join(`|`);return In(`${e.join(`|`)}#${r}#${n}`)}t(Wn,`seedForRestart`);function Gn(e,t={}){let n=Zt(e);if(n.length<2)return n;let r=Vn(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=Hn(n,r,i),o=Math.max(0,t.restarts??Fn);for(let e=0;e$&&c*3>=s?o>0?`bottom`:`top`:s>$?a>0?`right`:`left`:n}t($n,`chooseOrthogonalSide`);function er(e,t){return Math.abs(e.to-t.from)<$||Math.abs(e.to-t.to)<$?e.to:e.from}t(er,`sharedLineEndpointCoord`);function tr(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}t(tr,`pointOnLine`);function nr(e,n){let r=e.nodes??[],i=e.edges??[],a=[];for(let e of i)e.isLayoutOnly||a.push({...e,__originalEdge:e});let o=new Map,s=new Map,c=[],l=n===`LR`;for(let e of r)o.set(e.id,e);let u=r.filter(e=>e.isGroup&&!e.parentId);for(let e of u){let n={id:e.id},i=t(e=>{s.set(e.id,n),r.filter(t=>t.parentId===e.id).forEach(i)},`assignLane`);i(e)}let d=r.filter(e=>!e.isGroup&&!e.isEdgeLabel).map(e=>{let t=e.width??10,n=e.height??10,r=e.x??0,i=e.y??0,a=qn;return{nodeId:e.id,minX:r-t/2-a,maxX:r+t/2+a,minY:i-n/2-a,maxY:i+n/2+a,visualXHalfExtent:l?n/2+a:t/2+a}}),f=t((e,t,n,r)=>{let i=c.find(n=>n.orientation===e&&Math.abs(n.coord-t)<1);return i||(i={id:`pipe-${e}-${t.toFixed(0)}`,orientation:e,coord:t,spanMin:n,spanMax:r,tracks:[]},c.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=t((e,t)=>{let n=e.width??10,r=e.height??10,i=e.x??0,a=e.y??0;switch(t){case`top`:return{x:i,y:a-r/2};case`bottom`:return{x:i,y:a+r/2};case`left`:return{x:i-n/2,y:a};case`right`:return{x:i+n/2,y:a}}},`portForSide`),m=t((e,t,n)=>p(e,$n(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=t((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)<$,i=Math.abs(t.x-n.x)<$;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-$,o=Math.max(t.x,n.x)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`vertical`||t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v)}else if(i){let r=t.x,i=Math.min(t.y,n.y)-$,o=Math.max(t.y,n.y)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`horizontal`||t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v)}return a},`crossingPenalty`),b=a.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=o.get(e.start),r=o.get(e.end),i=s.get(e.start),a=s.get(e.end);return{idx:t,crossLane:i&&a&&i.id!==a.id?1:0,dx:n&&r?Math.abs((r.x??0)-(n.x??0)):0,dy:n&&r?Math.abs((r.y??0)-(n.y??0)):0}}).sort((e,t)=>{if(e.crossLane!==t.crossLane)return t.crossLane-e.crossLane;let n=e.dx+e.dy,r=t.dx+t.dy;return Math.abs(n-r)>1?n-r:e.idx-t.idx}).map(e=>e.idx),x=t((e,t,n,r)=>{let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return!!d.find(c=>n&&c.nodeId===n||r&&c.nodeId===r?!1:Math.abs(e.x-t.x)>$?c.minYe.y&&c.maxX>i&&c.minXe.x&&c.maxY>o&&c.minY$n(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of a.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),a=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(a),dxSign:Math.sign(i),dySign:Math.sign(a)})}let E=t(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.absDx===0?1/0:e.absDy/e.absDx:e.absDy===0?1/0:e.absDx/e.absDy,`preferenceStrength`),D=t(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=t((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=t(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),ee=new Map;for(let e of T.values())ee.has(e.dstId)||ee.set(e.dstId,new Set),ee.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(o.get(e.srcId)))continue;let t=ee.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:a}=e,s=o.get(n),c=o.get(r),l=`${n}:${i}:src`,u=i===`top`||i===`bottom`?c.x??0:c.y??0;S.has(l)||S.set(l,[]),S.get(l).push({edgeIdx:t,oppositeCoord:u});let d=`${r}:${a}:dst`,f=a===`top`||a===`bottom`?s.x??0:s.y??0;S.has(d)||S.set(d,[]),S.get(d).push({edgeIdx:t,oppositeCoord:f})}let te=new Map;for(let[e,t]of S){if(t.length<2)continue;t.sort((e,t)=>e.oppositeCoord-t.oppositeCoord);let n=e.split(`:`),r=n.slice(0,-2).join(`:`),i=n[n.length-2],a=n[n.length-1],s=o.get(r);if(!s)continue;let c=i===`left`||i===`right`?s.height??10:s.width??10,l=s.shape,u=l===`question`||l===`diamond`?c*.3:c,d=Math.min(20,Math.max(8,u/(t.length+1))),f=-(d*(t.length-1))/2;for(let[e,n]of t.entries()){let t=f+e*d,r=`${n.edgeIdx}:${a}`;te.set(r,t)}}let M=t(e=>!!a[e]?.labelNodeId,`edgeHasLabelNode`),ne=t((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>M(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>M(e)):!1,`faceHasLabelNode`),N=t((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),P=t((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??w(t,i),s=r?.dstSide??w(n,a),c=r?p(t,r.srcSide):m(t,i,!0),l=r?p(n,r.dstSide):m(n,a,!1),u=te.get(`${e}:src`),d=te.get(`${e}:dst`);return u!==void 0&&(c=N(c,o,u)),d!==void 0&&(l=N(l,s,d)),{pSrcPort:c,pDstPort:l,srcSide:o,dstSide:s}},`portsForEdge`);for(let e of b){let n=a[e];if(g[e]=[],!n.start||!n.end||n.points&&n.points.length>0||n.start===n.end)continue;let r=o.get(n.start),i=o.get(n.end);if(!r||!i)continue;let{pSrcPort:s,pDstPort:u,srcSide:p,dstSide:m}=P(e,r,i),v={...s},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=s.y>(r.y??0)?s.y+Zn:s.y-Zn:v.x=s.x>(r.x??0)?s.x+Zn:s.x-Zn,T?b.y=u.y>(i.y??0)?u.y+Zn:u.y-Zn:b.x=u.x>(i.x??0)?u.x+Zn:u.x-Zn;let E=t((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.xn.minY&&e.y{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+Jn:r.minX-Jn,y:i?r.maxY+Yn:r.minY-Yn,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+Jn:r.minX-Jn,y:o?r.maxY+Yn:r.minY-Yn,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[n.start,n.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(s,r,i,e,!0);v.x=t.x,v.y=t.y;let n=t.leavesPositiveSide?Math.min(e.minY-2,s.y+Zn):Math.max(e.maxY+2,s.y-Zn);O=[{x:s.x,y:n},{x:t.x,y:n},{x:t.x,y:t.y}]}else{let t=D(s,r,i,e,!1),n=t.leavesPositiveSide?Math.min(e.minX-2,s.x+Zn):Math.max(e.maxX+2,s.x-Zn);v.x=t.x,v.y=t.y,O=[{x:n,y:s.y},{x:n,y:t.y},{x:t.x,y:t.y}]}}let j=[],ee=E(b,k);if(ee.inside&&ee.obstacle){let e=ee.obstacle;if(T){let t=D(u,i,r,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,i,r,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){let t=Jn,r=Math.abs(v.x-b.x)1||c>1,d=C.get(n.start??``)??0,f=C.get(n.end??``)??0,g=o>1&&ne(n.start,p)||c>1&&ne(n.end,m);if((r||i)&&!a&&(!l||l&&!g&&(o<=1||d<=2)&&(c<=1||f<=2))&&!x(s,u,n.start,n.end)){n.points=[{...s},{...v},{...b},{...u}],_.add(e);let t=i?`horizontal`:`vertical`,r=i?s.y:s.x,a=i?Math.min(s.x,u.x):Math.min(s.y,u.y),o=i?Math.max(s.x,u.x):Math.max(s.y,u.y),c={id:`fast-path-${t}-${r.toFixed(0)}-${e}`,orientation:t,coord:r,spanMin:a,spanMax:o,tracks:[]};h.push({edgeIndex:e,segmentIndex:0,orientation:t,pipe:c,trackIndex:0,from:a,to:o});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let M=Math.min(v.x,b.x)-50,N=Math.max(v.x,b.x)+50,F=Math.min(v.y,b.y)-50,I=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minXt&&e.minYr&&(M=Math.min(M,e.minX-Xn),N=Math.max(N,e.maxX+Xn),F=Math.min(F,e.minY-Xn),I=Math.max(I,e.maxY+Xn))}for(let e of d){if(e.maxXN||e.maxYI)continue;let t=Jn;f(`horizontal`,e.minY-t,M,N),f(`horizontal`,e.maxY+t,M,N);let n=Yn;f(`vertical`,e.minX-n,F,I),f(`vertical`,e.maxX+n,F,I)}f(`horizontal`,v.y,M,N),f(`horizontal`,b.y,M,N);let L=c.filter(e=>e.orientation===`horizontal`&&e.coord>=F&&e.coord<=I),R=c.filter(e=>e.orientation===`vertical`&&e.coord>=M&&e.coord<=N),z=t((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),B=z(v.x,v.y),re=z(b.x,b.y),V=new Map,H=new Map,ie=new Map,ae=new Set,U=[];V.set(B,0),ie.set(B,`n`),U.push({key:B,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),ae.add(B);let W=[],G=t((e,t)=>x(e,t,n.start,n.end),`checkSegmentBlocked`),oe={x:b.x,y:v.y},se=G(v,oe),K=G(oe,b),ce=se||K,le={x:v.x,y:b.y},ue=G(v,le),de=G(le,b);if(ce?ue||de||(W=Math.abs(v.x-b.x)<$?[v,b]:[v,le,b]):W=Math.abs(v.y-b.y)<$||Math.abs(v.x-b.x)<$?[v,b]:[v,oe,b],W.length===0)for(;U.length>0;){U.sort((e,t)=>e.f-t.f);let t=U.shift();if(ae.delete(t.key),t.key===re){let e=re,t=b;for(W=[t];H.has(e);){let n=H.get(e);W.unshift(n),t=n,e=z(n.x,n.y)}break}let r=t.pt.x,i=t.pt.y,a=R.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=L.sort((e,t)=>e.coord-t.coord),c=s.findIndex(e=>Math.abs(e.coord-i)<1),l=[];o>0&&l.push({x:a[o-1].coord,y:i}),o>=0&&o0&&l.push({x:r,y:s[c-1].coord}),c>=0&&ce.nodeId===n.start||e.nodeId===n.end?!1:o===s?e.minXr&&e.maxY>c&&e.minYi&&e.maxX>o&&e.minX10&&x<-5||g<-10&&x>5)&&(m=Math.abs(x)*100),(h>10&&_<-5||h<-10&&_>5)&&(m+=Math.abs(_)*50);let S=0,C=ie.get(t.key)??`n`,w=Math.abs(_)>$?`h`:`v`;C!==`n`&&C!==w&&(S=50);let T=f+p+m+S,E=(V.get(t.key)??1/0)+T,D=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(E<(V.get(u)??1/0))if(H.set(u,t.pt),V.set(u,E),ie.set(u,w),!ae.has(u))U.push({key:u,f:E+D,pt:a}),ae.add(u);else{let e=U.findIndex(e=>e.key===u);e!==-1&&(U[e].f=E+D)}}}if(W.length===0&&(W=[v,{x:v.x,y:b.y},b]),W.length>4){let e=W[0],n=W[W.length-1],r=Math.min(e.x,n.x),i=Math.max(e.x,n.x),a=Math.min(e.y,n.y),o=Math.max(e.y,n.y);for(let e of W)r=Math.min(r,e.x),i=Math.max(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.y);let s=i>Math.max(e.x,n.x),c=re.minXr&&e.minYa);if(s.length>0){let r=Math.max(e.x,n.x);for(let e of s){let n=(e.minX+e.maxX)/2;if(e.visualXHalfExtent===void 0||isNaN(e.visualXHalfExtent))continue;let i=n+e.visualXHalfExtent+t;r=Math.max(r,i)}isNaN(r)||(i=r)}}if(c){let i=d.filter(r=>r.minXMath.min(e.y,n.y));if(i.length>0){let a=Math.min(e.x,n.x);for(let e of i){let n=(e.minX+e.maxX)/2-e.visualXHalfExtent-t;a=Math.min(a,n)}r=a}}}let u=t(t=>{let r=n.y>e.y,i=d.filter(t=>{let r=Math.min(e.x,n.x)t.minX,i=Math.min(e.y,n.y)t.minY;return r&&i}),a=i;if(l&&i.length>0){let e=i.filter(e=>e.minXt);e.length>0&&(a=e)}if(a.length===0)return n.y;let o=Jn;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(ee.minY))-o;if(e>n.y+$)return e}return n.y},`findBestReturnY`),f=t(t=>{let r=u(t),i={x:t,y:e.y},a={x:t,y:r},o={x:n.x,y:r},s=G(e,i),c=G(i,a),l=G(a,o),d=r===n.y?!1:G(o,n);return!s&&!c&&!l&&!d?Math.abs(r-n.y)<$?[e,i,a,n]:[e,i,a,o,n]:null},`trySimplifyWithDetourX`),p=s&&!c?f(i):c&&!s?f(r):null;p&&(W=p)}let q=[s,...O,...W,...j.reverse(),u];if(q.length>=3){let e=q[q.length-1],t=q[q.length-2],n=q[q.length-3],r=Math.abs(n.y-t.y)<$&&Math.abs(t.y-e.y)<$,i=Math.abs(n.x-t.x)<$&&Math.abs(t.x-e.x)<$;if(r){let r=Math.sign(t.x-n.x),i=Math.sign(e.x-n.x);r!==0&&r===i&&Math.abs(t.x-n.x)>Math.abs(e.x-n.x)&&q.splice(-2,1)}else if(i){let r=Math.sign(t.y-n.y),i=Math.sign(e.y-n.y);r!==0&&r===i&&Math.abs(t.y-n.y)>Math.abs(e.y-n.y)&&q.splice(-2,1)}}let fe=[q[0]];for(let e=1;et.x!=r.x>n.x){fe.push(n);continue}continue}if(Math.abs(t.x-n.x)<$&&Math.abs(n.x-r.x)<$){if(n.y>t.y!=r.y>n.y){fe.push(n);continue}continue}fe.push(n)}fe.push(q[q.length-1]);for(let t=0;te.from{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&F(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&F(n,t));return i&&a?(e.trackIndex=r.index,t.trackIndex=n.index,n.segments=[...n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],r.segments=[...r.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],!0):!1},`trySwapSegmentsAcrossTracks`),L=t(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),R=t((e,t)=>{let n=e.pipe.tracks[e.trackIndex];n.segments=n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),e.trackIndex=t,e.pipe.tracks[t].segments.push({edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to})},`moveSegmentToTrack`),z=t((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&R(n,t)}},`moveSegmentChainToTrack`),B=t(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n{if(e.orientation===t.orientation)return!1;let n=e.orientation===`horizontal`?e:t,r=e.orientation===`horizontal`?t:e;return r.pipe.coord>n.from&&r.pipe.coordr.from&&n.pipe.coord{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&F(e,t)))return n.index;return-1},`findAvailableTrack`),H=t((e,t)=>{if(e.trackIndex===t.trackIndex)return F(e,t);let n=B(e),r=B(t);return n.some(e=>r.some(t=>re(e,t)))},`segmentsConflict`),ie=t((e,t,n)=>{if(I(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=V(e.pipe,t);n(t,r===-1?L(e.pipe):r)},`resolveTrackConflict`),ae=t(e=>{let t=0;for(let n=0;n{if(U.has(e))return U.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return U.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;eMath.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return U.set(e,a),a},`getDestInfo`),G=t(()=>{let e=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.start&&(n.has(t.start)||n.set(t.start,[]),n.get(t.start).push(e));let r=t(e=>{let t=a[e];if(!t.start||!t.end)return 0;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)return 0;let i=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(i)+Math.abs(s)},`getEdgeDistance`);for(let t of n.values()){t.sort((e,t)=>{let n=W(e),i=W(t);if(Math.abs(n.deviation-i.deviation)>1)return n.deviation-i.deviation;if(Math.abs(n.dest-i.dest)>1)return n.dest-i.dest;let a=r(e),o=r(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,c=g[t].length;if(s!==c)return s-c;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[r],i=Math.abs(e.to-e.from),a=Math.abs(t.to-t.from);if(Math.abs(i-a)>1)return i-a}}return 0});let n=t.map(e=>h[g[e][0]]);e+=ae(n)}return e},`fixSourceHandleCrossings`),oe=t(()=>{let e=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.end&&(n.has(t.end)||n.set(t.end,[]),n.get(t.end).push(e));for(let r of n.values()){r.sort((e,n)=>{let r=t(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),i=r(e),a=r(n);return Math.abs(i-a)>.1?i-a:e-n});let n=r.map(e=>h[g[e][g[e].length-1]]);e+=ae(n)}return e},`fixTargetHandleCrossings`),se=t(()=>{let e=0;for(let t of c){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t{e.segments.forEach(t=>{n.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,trackIndex:e.index,from:t.from,to:t.to})})}),n.sort((e,t)=>e.from-t.from);let r=[];if(n.length>0){let e=[n[0]],t=n[0].to;for(let i=1;ir.add(e.trackIndex));let i=new Map;n.forEach(e=>{let t=W(e.edgeIndex);i.set(e.trackIndex,(i.get(e.trackIndex)??0)+t.delta)});let a=[...r].filter(e=>(i.get(e)??0)<-1),o=[...r].filter(e=>(i.get(e)??0)>1),s=[...r].filter(e=>Math.abs(i.get(e)??0)<=1);a.sort((e,t)=>(i.get(t)??0)-(i.get(e)??0)),o.sort((e,t)=>(i.get(e)??0)-(i.get(t)??0));let c=t((t,r)=>{n.filter(e=>e.trackIndex===t).forEach(t=>{let n=_.has(t.edgeIndex)?e.coord:r;ce.set(`${t.edgeIndex}-${t.segmentIndex}`,n)})},`assignCoord`),l=0;for(let t of a)l++,c(t,e.coord-l*Qn);if(s.length===0&&r.size>0){let e=[...r].sort((e,t)=>Math.abs(i.get(e)??0)-Math.abs(i.get(t)??0))[0],t=a.indexOf(e);t!==-1&&a.splice(t,1);let n=o.indexOf(e);n!==-1&&o.splice(n,1),s.push(e)}let u=0;for(let t of s){if(u===0)c(t,e.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);c(t,e.coord+n*r*Qn*.5)}u++}let d=0;for(let t of o)d++,c(t,e.coord+d*Qn)}}for(let[e,t]of a.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:a}=P(e,o.get(t.start),o.get(t.end)),s=n.map(e=>{let t=h[e],n=ce.get(`${t.edgeIndex}-${t.segmentIndex}`)??t.pipe.coord;return{orient:t.orientation,coord:n,from:t.from,to:t.to}});r.push(i);for(let e=0;e$&&r.push(tr(t,i)),c&&o.orient===t.orient)if(Math.abs(t.coord-o.coord)>$){let e=t.orient===`vertical`?(i+o.from)/2:er(t,o);r.push(tr(t,e),tr(o,e))}else (e===0||e===s.length-2)&&r.push(tr(t,er(t,o)));else if(c)r.push(tr(t,o.coord));else{let e=Math.abs(t.from-i)$||Math.abs(c.y-a.y)>$)&&r.push(a);let l=[];r.length>0&&l.push(r[0]);for(let e=1;e$||Math.abs(t.y-n.y)>$)&&l.push(t)}t.points=l}for(let e of a){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}e.edges=(e.edges??[]).filter(e=>!e.isLayoutOnly);let le=t((e,t)=>{let n=t.x??0,r=t.y??0,i=t.width??0,a=t.height??0;if(i<=0||a<=0)return e;let o=n-i/2,s=n+i/2,c=r-a/2,l=r+a/2;if(e.xs||e.yl)return e;let u=e.x-o,d=s-e.x,f=e.y-c,p=l-e.y,m=Math.min(u,d,f,p);return m===u?{x:o,y:e.y}:m===d?{x:s,y:e.y}:m===f?{x:e.x,y:c}:{x:e.x,y:l}},`nodeBoundaryClamp`);for(let t of e.edges){let e=t.points;if(!e||e.length<2)continue;let n=t.start,r=t.end,i=n?o.get(n):void 0,a=r?o.get(r):void 0;i&&(e[0]=le(e[0],i)),a&&(e[e.length-1]=le(e[e.length-1],a))}return e}t(nr,`routeEdgesOrthogonal`);function rr(e){return e.direction??`TB`}t(rr,`getSwimlaneDirection`);function ir(e){let t=A(e),n=e.config.flowchart?.nodeSpacing??40,r=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,s=rr(e),{ordered:c,coordinates:l}=Kn(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});j(t,c,l,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;nr(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return It(e,s),Ft(e),s}t(ir,`runSwimlaneLayoutCore`);function ar(e){k(e);let t=te(e);e.nodes=t.nodes,e.edges=t.edges}t(ar,`prepareSwimlaneLayout`);var or=n({prepareLayout:ar,runLayoutCore:ir,afterPaint:C});export{or as render}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-DfN0uS4x.js b/apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-DxGEneRG.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-DfN0uS4x.js rename to apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-DxGEneRG.js index 4dad3b9c9..7d6545194 100644 --- a/apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-DfN0uS4x.js +++ b/apps/pythinker-code/dist-web/assets/swimlanes-42K2YHIH-DxGEneRG.js @@ -1 +1 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import{o as n}from"./chunk-OSK3NFVY-BT2Y-lqQ.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import{i as r}from"./chunk-2E4U76K2-CUuPs4AQ.js";var i=5,a=1e-5,o=1e-6;function s(e){let t=[];for(let n=0;n=1-o||p<=o||p>=1-o?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}e(c,`segmentIntersection`);function l(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}e(l,`isHorizontalSeg`);function u(e){let t=[];for(let n=0;n=Math.abs(n)?+(t>=0):+(n>=0)}e(p,`getArcSweepFlag`);var m=.001;function h(e,t){if(e.length<2)return e.map(e=>({...e}));let r=e.map(e=>({...e})),i=t.arrowTypeStart&&n[t.arrowTypeStart];if(i){let t=e[0],n=e[1],a=Math.atan2(n.y-t.y,n.x-t.x);r[0].x=t.x+i*Math.cos(a),r[0].y=t.y+i*Math.sin(a)}let a=t.arrowTypeEnd&&n[t.arrowTypeEnd];if(a){let t=e.length,n=e[t-2],i=e[t-1],o=Math.atan2(i.y-n.y,i.x-n.x);r[t-1].x=i.x-a*Math.cos(o),r[t-1].y=i.y-a*Math.sin(o)}return r}e(h,`applyMarkerOffsets`);function g(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${f(s)}`];return i===`arc`?l.push(`A${d(e.r)},${d(e.r)} 0 0 ${r} ${f(c)}`):l.push(`M${f(c)}`),l}e(g,`emitJump`);function _(e,t,n,r){let i=t.x-e.x,o=t.y-e.y,s=n.x-t.x,c=n.y-t.y,l=Math.hypot(i,o),u=Math.hypot(s,c);if(l0){let t=_(a[e-1],a[e],a[e+1]??a[e],i);t&&(y=t.cutLen)}let b=r,x=null;o&&ee.t-t.t);for(let e of S)e.r=Math.min(e.r,e.d-y,b-e.d);for(let e=0;et){let n=t/2;S[e].r=Math.min(S[e].r,n),S[e+1].r=Math.min(S[e+1].r,n)}}for(let e of S)e.r=2?r:null}catch{return null}}e(x,`decodeDataPoints`);function S(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=[],o=new Map;for(let e of t){let t=typeof CSS<`u`&&CSS.escape?CSS.escape(e.id):e.id,n=r.querySelector(`path[data-id="${t}"]`);if(!n)continue;o.set(e.id,n);let i=x(n.getAttribute(`data-points`))??e.points;a.push({...e,points:i})}let s=u(a);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of a){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!b(r))continue;let a=o.get(e.id);if(!a||r===void 0&&!y(a.getAttribute(`d`)??``))continue;let s=a.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=v(e,t,n);if(a.setAttribute(`d`,f),u!==null&&d!==null&&typeof a.getTotalLength==`function`){let e=a.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);a.setAttribute(`style`,n)}}}e(S,`applyLineJumpsToSvg`);function C(e,{measure:t}){let n=e.config?.swimlane?.lineHops;if(n===!1)return;let r=n===`gap`?`gap`:`arc`,i=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));S(t.groups.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:r})}e(C,`applySwimlaneLineJumps`);var w=`__swimlane_default__`,T=21,E=20;function D(e){return Math.max(e.padding??E,E)}e(D,`topLaneHorizontalPadding`);function O(e){let{x:t,y:n,width:r,height:i}=e,a=e.swimlaneContentTop;if(typeof t!=`number`||typeof n!=`number`||typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||r<=0||i<=0){delete e.groupTitleRect;return}let o=n-i/2,s=Math.min(a,n+i/2),c=o+Math.min(T,Math.max(0,s-o));if(c<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:o,bottom:c}}e(O,`assignTopLaneTitleRect`);function k(e){let t=e.direction,n=e.nodes??=[];for(let n of e.nodes??[])n.isGroup&&!n.parentId&&(n.shape=`swimlane`,t&&(n.direction=t));let r=n.filter(e=>!e.isGroup&&!e.parentId);if(r.length===0)return;let i=n.find(e=>e.id===w);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:w,label:``,isGroup:!0,shape:`swimlane`,padding:20,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=w}e(k,`prepareLayoutForSwimlanes`);function A(e){let t=new Map;for(let n of e.nodes??[])t.set(n.id,n);let n=[];for(let t of e.edges??[]){let e=typeof t.start==`string`?t.start:void 0,r=typeof t.end==`string`?t.end:void 0;!e||!r||t.labelNodeId||n.push({id:t.id,src:e,dst:r,ref:t})}let r=e.nodes??[],i=r.filter(e=>e.isGroup),a=r.filter(e=>!e.isGroup);return{nodes:[...[...i].reverse(),...a].map(e=>e.id),edges:n,layout:e,nodeById:t}}e(A,`toGraphView`);function j(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,c=0;for(let e of t.layers){let t=0;for(let r of e){let e=a.get(r);if(!e){t++;continue}e.layer=c,e.order=t;let i=n.x[r]??t*s,l=n.y[r]??c*o;e.x=i,e.y=l,t++}c++}let l=i.nodes??[],u=new Map,d=[];for(let e of l){if(!e?.isGroup)continue;e.parentId||d.push(e);let t=l.filter(t=>t.parentId===e.id),r=1/0,i=-1/0,a=1/0,o=-1/0;for(let e of t){let t=e.x??n.x[e.id],s=e.y??n.y[e.id],c=e.width??0,l=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-c/2),i=Math.max(i,t+c/2),a=Math.min(a,s-l/2),o=Math.max(o,s+l/2))}if(r===1/0||a===1/0)e.x=e.x??0,e.y=e.y??0,e.width=e.width??0,e.height=e.height??0;else{let t=e.padding??20,n=e.parentId?t:2*D(e),s=t,c=Math.max(0,i-r)+n,l=Math.max(0,o-a)+s,d=(r+i)/2,f=(a+o)/2;e.x=d,e.y=f,e.width=c,e.height=l,u.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(d.length>0&&u.size>0){let e=1/0,t=-1/0,n=0;for(let r of d){let i=r.padding??20;i>n&&(n=i);let a=u.get(r.id);a&&(e=Math.min(e,a.minY),t=Math.max(t,a.maxY))}if(e!==1/0&&t!==-1/0){let r=Math.max(0,t-e)+2*Math.max(n,36),i=(e+t)/2;for(let t of d)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...d].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],c=[];for(let e of a){let t=u.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*D(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),c.push(n)}let l=o.length;if(l>0){let e=new Map;if(l===1)e.set(o[0],c[0]);else{let t=[];for(let e=0;e0&&i>0?{cx:t,cy:n,rect:se(t,n,r,i)}:void 0}e(ne,`measuredNodeRect`);function N(e){if(e.isGroup)return;let t=ne(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}e(N,`nodeBoundsInfoFor`);function P(e,t,n=M){return Math.abs(e.x-t.x)n}e(L,`isHorizontalSegment`);function R(e,t,n=M){return F(e,t,n)&&Math.abs(e.y-t.y)>n}e(R,`isVerticalSegment`);function z(e,t,n,r){return Math.max(0,Math.min(Math.max(e,t),Math.max(n,r))-Math.max(Math.min(e,t),Math.min(n,r)))}e(z,`overlapLength`);function B(e,t,n=M){return e.horizontal&&t.horizontal&&I(e.a,t.a,n)?z(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&F(e.a,t.a,n)?z(e.a.y,e.b.y,t.a.y,t.b.y):0}e(B,`sameAxisSegmentOverlapLength`);function re(e,t=M){let n=[];for(let r=0;r0?n[n.length-1]:void 0;(!e||!P(e,r,t))&&n.push({x:r.x,y:r.y})}return n}e(H,`dedupeConsecutivePoints`);function ie(e,t=M){if(!e||e.length!==4)return;let[n,r,i,a]=e;return L(n,r,t)&&R(r,i,t)&&L(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:R(n,r,t)&&L(r,i,t)&&R(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}e(ie,`classifyThreeSegmentRoute`);function ae(e,t,n,r=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return a>n.left-r&&in.top-r&&ot.left+n&&e.xt.top+n&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}e(W,`rectContainsRect`);function G(e,t){return e.leftt.left&&e.topt.top}e(G,`rectsOverlap`);function oe(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}e(oe,`inflateRect`);function se(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}e(se,`rectFromCenterSize`);function K(e){return ne(e)?.rect}e(K,`rectOfNodeBounds`);function ce(e,t){switch(t){case`top`:return{x:e.cx,y:e.rect.top};case`bottom`:return{x:e.cx,y:e.rect.bottom};case`left`:return{x:e.rect.left,y:e.cy};case`right`:return{x:e.rect.right,y:e.cy}}}e(ce,`portForRectSide`);function le(e,t,n,r,i,a=M){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.xn.x){if(I(e,n,a))return[e,n];let t=(e.x+n.x)/2;return[e,{x:t,y:e.y},{x:t,y:n.y},n]}if(t===r){if(I(e,n,a))return;let r=t===`left`?Math.min(e.x,n.x)-i:Math.max(e.x,n.x)+i;return[e,{x:r,y:e.y},{x:r,y:n.y},n]}return}if(!o&&!s){if(t===r){if(F(e,n,a))return;let r=t===`top`?Math.min(e.y,n.y)-i:Math.max(e.y,n.y)+i;return[e,{x:e.x,y:r},{x:n.x,y:r},n]}if(!(t===`bottom`&&r===`top`&&e.yn.y))return;if(F(e,n,a))return[e,n];let o=(e.y+n.y)/2;return[e,{x:e.x,y:o},{x:n.x,y:o},n]}if(o&&!s){let i=t===`right`&&n.x>e.x||t===`left`&&n.xn.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let c=t===`bottom`&&n.y>e.y||t===`top`&&n.yn.x;return c&&l?[e,{x:e.x,y:n.y},n]:void 0}e(le,`buildOrthogonalPortPath`);function ue(e,t,n,r){return t===`left`||t===`right`?[e,{x:r,y:e.y},{x:r,y:n.y},n]:[e,{x:e.x,y:r},{x:n.x,y:r},n]}e(ue,`buildSameSideTrackPath`);function de(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=N(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}e(de,`collectRealNodeBounds`);function q(e){let t=[],n=[];for(let r of e){let e=N(r);if(!e)continue;let i={id:e.id,rect:e.rect};r.isEdgeLabel?n.push(i):t.push(i)}return{realNodeRects:t,labelNodeRects:n}}e(q,`collectNodeRectEntries`);function fe(e,{includeEdgeLabels:t=!0}={}){let n=[];for(let r of e){if(r.isGroup||!t&&r.isEdgeLabel)continue;let e=r.x??0,i=r.y??0,a=r.width??0,o=r.height??0;n.push({nodeId:r.id,...se(e,i,a,o)})}return n}e(fe,`collectLayoutNodeRects`);function pe(e,t,n=M){let r=e.start,i=e.end;if(!r||!i)return;let a=t.get(r),o=t.get(i);if(!(!a||!o))return{srcId:r,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)m||f_)return!1;let v=Math.abs(h-u.a.x)i:a&&s&&I(e,n,i)?z(e.x,t.x,n.x,r.x)>i:!1}e(he,`sameAxisSegmentsOverlap`);function ge(e,t,n,r,{epsilon:i=M,skipDegenerateOther:a=!1}={}){for(let o of n){if(o===r||o.isLayoutOnly)continue;let n=o.points;if(!(!n||n.length<2))for(let r=0;rf+i&&mh+i&&dr+M&&e=2?t[t.length-2]:void 0,n=e&&F(e,r)?{x:r.x,y:i.y}:{x:i.x,y:r.y};t.push(n)}t.push(i)}let n=[];for(let e of t){let t=n[n.length-1];(!t||!P(t,e))&&n.push(e)}return n}e(xe,`orthogonalizePolyline`);function Se(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=be(t);if(t=e.points,!e.changed)break}return t}e(Se,`simplifyPolyline`);var Y=.001,Ce=.5,we=4;function Te(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length=0&&i=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=Ee(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}e(De,`clipEndpoint`);function Oe(e,t){for(let n of e){let e=Te(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=De(r,e.srcRect,!0)),e.dstRect&&(r=De(r,e.dstRect,!1)),r=Se(xe(r)),r=ze(r,e.srcRect,e.dstRect),e.edge.points=Se(xe(r))}}e(Oe,`clipEdgeEndpointsToNodeBoundaries`);function ke(e,t,n,r=!1){if(I(e,t,Y)){if(t.yn.bottom+Y)return t;if(r){if(e.xn.right+Y)return{x:n.right,y:e.y}}return{x:Math.abs(t.x-n.left)<=Math.abs(t.x-n.right)?n.left:n.right,y:e.y}}if(F(e,t,Y)){if(t.xn.right+Y)return t;if(r){if(e.yn.bottom+Y)return{x:e.x,y:n.bottom}}let i=Math.abs(t.y-n.top)<=Math.abs(t.y-n.bottom);return{x:e.x,y:i?n.top:n.bottom}}return t}e(ke,`snapEndpointToBoundary`);function Ae(e,t,n){let r=e[t];for(let i=t+n;i>=0&&ie.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}e(Ne,`intersectRanges`);function Pe(e,t){return t===`left`||t===`right`?je(e.top,e.bottom):je(e.left,e.right)}e(Pe,`clearanceRangeForSide`);function Fe(e,t,n){let r=e.y>=n.top-Y&&e.y<=n.bottom+Y,i=e.x>=n.left-Y&&e.x<=n.right+Y;if(I(e,t,Y)&&r){if(Math.abs(e.x-n.left)0?Ne(a):void 0}e(Le,`straightClearanceRange`);function Re(e,t,n,r,i){let a=Le(e,t,n,r,i);if(!a)return;let o=i?e.y:e.x,s=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(s-o)({...e}));for(let s=t;s>=0&&s=n.left-Y&&Math.max(e.x,t.x)<=n.right+Y,i=Math.min(e.y,t.y)>=n.top-Y&&Math.max(e.y,t.y)<=n.bottom+Y;if(Math.abs(e.y-n.top)r.bottom+Y;case`left`:return I(t,n,Y)&&n.xr.right+Y}}e(We,`leavesOutward`);function Ge(e,t,n){if(e.length<3)return e;if(n){let n=Ue(e[0],e[1],t);return n&&We(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=Ue(e[r-1],e[r],t);return i&&We(i,e[r-1],e[r-2],t)?e.slice(0,r):e}e(Ge,`collapseOwnBorderStub`);function Ke(e,t,n){let r=e;if(t){let e=Ae(r,0,1);if(e){let n=ke(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=Ge(r,t,!0)}if(n){let e=r.length-1,t=Ae(r,e,-1);if(t){let i=ke(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=Ge(r,n,!1)}let i=ze(r,t,n);return i!==r||r.length===2?i:(t&&(r=He(r,t,!0)),n&&(r=He(r,n,!1)),r)}e(Ke,`snapAndCollapseEndpoints`);function qe(e,t){for(let n of e){let e=Te(n,t,2);if(!e)continue;let r=Ke(H(e.points,Y),e.srcRect,e.dstRect);if(r.length<3){e.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];e.edge.points=i}}e(qe,`prepareEdgeEndpointsForRenderer`);function Je(e){return new Map(e.map(e=>[e.id,e]))}e(Je,`buildNodeMap`);function Ye(e,t){let n=e.parentId,r=null;for(;n;){let e=t.get(n);if(!e?.isGroup)break;r=e.id,n=e.parentId}return r}e(Ye,`resolveTopLevelGroupId`);function Xe(e,t){let n=0,r=e.parentId;for(;r;){let e=t.get(r);if(!e?.isGroup)break;n++,r=e.parentId}return n}e(Xe,`groupDepth`);function Ze(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a of e){let e=a.x,o=a.y;if(typeof e!=`number`||typeof o!=`number`)continue;let s=a.width??0,c=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}e(Ze,`boundsForChildren`);function Qe(e,t){let n=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+n,e.height=Math.max(0,t.maxY-t.minY)+n}e(Qe,`applyGroupBounds`);function $e(e){let t=Je(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>Xe(n,t)-Xe(e,t));for(let t of n){let n=Ze(e.filter(e=>e.parentId===t.id));n&&Qe(t,n)}}e($e,`recomputeNestedGroupBounds`);function et(t,n){let r=t.nodes??[],i=t.edges??[],a=r.filter(e=>!e.isGroup),o=1/0,s=-1/0;for(let e of a){let t=e[n];typeof t==`number`&&(o=Math.min(o,t),s=Math.max(s,t))}if(!Number.isFinite(o)||!Number.isFinite(s))return!1;let c=e(e=>o+s-e,`mirror`);for(let e of r){let t=e[n];typeof t==`number`&&(e[n]=c(t));let r=e.groupTitleRect;r&&(e.groupTitleRect=n===`x`?{...r,left:c(r.right),right:c(r.left)}:{...r,top:c(r.bottom),bottom:c(r.top)})}for(let e of i)for(let t of e.points??[])t[n]=c(t[n]);return!0}e(et,`mirrorAxis`);function tt(e){return(e.nodes??[]).some(e=>!e.isGroup)?et(e,`y`):!0}e(tt,`applyBtDirectionTransform`);function nt(e,t=`LR`){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=1/0;for(let e of i){let t=e.x??0,n=e.y??0;t0?Math.max(1,l/u):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*d+36,r=t-a;e.x=n,e.y=r}for(let e of r)if(e.points)for(let t of e.points){let e=t.x,n=(t.y-o)*d+36,r=e-a;t.x=n,t.y=r}$e(n);let f=n.filter(e=>e.isGroup&&!e.parentId);if(f.length===0)return t===`RL`&&et(e,`x`),!0;let p=Je(n),m=new Map;for(let e of n){if(e.isGroup)continue;let t=Ye(e,p);if(!t)continue;let n=m.get(t)??[];n.push(e),m.set(t,n)}let h=0;for(let e of f){let t=e.padding??0;t>h&&(h=t)}let g=[],_=1/0,v=-1/0;for(let e of f){let t=Ze(m.get(e.id)??[]);t&&(_=Math.min(_,t.minX),v=Math.max(v,t.maxX),g.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(_===1/0||v===-1/0)return!0;let y=Math.max(0,v-_)+2*Math.max(h,10),b=36+y,x=(_+v)/2-y/2-36,S=x+b/2,C=Math.max(h,36);g.sort((e,t)=>e.centerY-t.centerY);for(let e=0;ed.cy?g.bottom:g.top,t=d.cx+n;if(t<=g.left+rt||t>=g.right-rt)continue;i={x:t,y:e},a={x:t,y:o.y},c={x:o.x,y:o.y}}else{let e=f.cx>d.cx?g.right:g.left,t=d.cy+n;if(t<=g.top+rt||t>=g.bottom-rt)continue;i={x:e,y:t},a={x:o.x,y:t},c={x:o.x,y:o.y}}let p=P(i,a,rt),m=P(a,c,rt);if(p&&m||!p&&J(i,a,r,[l],1)||!m&&J(a,c,r,[u],1))continue;let _=!p&&ge(i,a,e,t,{epsilon:rt,skipDegenerateOther:!0}),v=!m&&ge(a,c,e,t,{epsilon:rt,skipDegenerateOther:!0});if(!(_||v)){h=p?[a,c]:m?[i,a]:[i,a,c];break}}h&&(t.points=h)}}e(ot,`portSwapToLShape`);function st(t,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=q(n.values());for(let o of t){if(o.isLayoutOnly)continue;let s=o.points;if(!s||s.length<4)continue;let c=H(s,r);if(c.length<4)continue;let l=c.length-1,u=c[l],d=c[l-1],f=c[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h0;O={x:f.x,y:E},k={x:e?D.right:D.left,y:E}}if(J(O,k,i,S?[S]:[],-2)||J(O,k,a,[],-2))continue;if(C){let e=n.get(C),t=e?K(e):void 0;if(t&&U(O,t,2))continue}let A=e((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),j=new Set;for(let e=0;e{for(let i of t){if(i===o||i.isLayoutOnly)continue;let t=i.points;if(!(!t||t.length<2))for(let i=0;i=0){let e=c[l-3],t=[C,S].filter(e=>!!e);if(J(e,O,i,t,-2)||ee(e,O))continue}let te=[...c.slice(0,l-2),O,k];o.points=te;let M=o.labelNodeId;if(M){let e=n.get(M);if(e){let t=e.width??0,n=e.height??0;if(t>0&&n>0){let i,a,o=-1;for(let e=0;e=t+2||d&&l>=n+2)&&l>o&&(o=l,i=(s.x+c.x)/2,a=(s.y+c.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}e(st,`collapseShortTerminalStub`);var X=.001,Z=8,Q=re,ct=e((e,t)=>F(e,t,X)||I(e,t,X),`orthogonallyAligned`);function lt(t,n){let r=e((e,t)=>{let n=e.x??0,r=e.y??0,i=t.x-n,a=t.y-r,o=(e.width??0)/2,s=(e.height??0)/2;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),{x:n+(a===0?0:s*i/a),y:r+s}):(i<0&&(o=-o),{x:n+o,y:r+(i===0?0:o*a/i)})},`rectIntersect`),i=e((e,t)=>{let i=H(e.points??[]);if(i.length<2)return;let a=t?e.start:e.end,o=a?n.get(a):void 0,s=o?K(o):void 0;if(!o||!a||!s)return;let c=t?i[0]:i[i.length-1],l=t?i[1]:i[i.length-2],u=r(o,c),d=c;if(ct(l,u)&&(d=l),F(u,d,X))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`V`,coord:u.x,min:Math.min(u.y,d.y),max:Math.max(u.y,d.y),boundary:u,railEnd:d,rect:s};if(I(u,d,X))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`H`,coord:u.y,min:Math.min(u.x,d.x),max:Math.max(u.x,d.x),boundary:u,railEnd:d,rect:s}},`terminalLaneFor`),a=e((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),o=e((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:e.orientation===`H`?(Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1)&&F(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&I(e.boundary,t.boundary,1),`sameTerminalFace`),s=e((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:a(e,t)>=Z&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),c=e((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=a(e,t);if(n2*r?!1:o(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=e((t,n)=>{let r=H(t.edge.points??[]);if(r.length<2)return;let i=t.orientation===`V`?{x:t.boundary.x+n,y:t.boundary.y}:{x:t.boundary.x,y:t.boundary.y+n},a=t.orientation===`V`?{x:t.railEnd.x+n,y:t.railEnd.y}:{x:t.railEnd.x,y:t.railEnd.y+n};if(!e(()=>Math.abs(t.boundary.y-t.rect.top)<1||Math.abs(t.boundary.y-t.rect.bottom)<1?I(i,t.boundary,X)&&i.x>=t.rect.left+1&&i.x<=t.rect.right-1:Math.abs(t.boundary.x-t.rect.left)<1||Math.abs(t.boundary.x-t.rect.right)<1?F(i,t.boundary,X)&&i.y>=t.rect.top+1&&i.y<=t.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(t.atStart){let e=r.length>1&&P(r[1],t.railEnd,X),n=r.slice(e?2:1),o=n[0];return o&&!ct(o,a)?void 0:[i,a,...n]}let o=r.length>1&&P(r[r.length-2],t.railEnd,X),s=r.slice(0,o?-2:-1),c=s[s.length-1];if(!(c&&!ct(c,a)))return[...s,a,i]},`shiftedCandidate`),u=e(e=>{let t=e.edge,r=H(t.points??[]);if(r.length!==2)return!1;let i=t.start,a=t.end,o=i?n.get(i):void 0,s=a?n.get(a):void 0;if(!o||!s)return!1;let c=o.x??0,l=o.y??0,u=s.x??0,d=s.y??0,[f,p]=r;return I(f,p,X)&&Math.abs(l-d)<1&&Math.abs(c-u)>1||F(f,p,X)&&Math.abs(c-u)<1&&Math.abs(l-d)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let e=0;e<8;e++){let e=t.filter(e=>!e.isLayoutOnly).flatMap(e=>[i(e,!0),i(e,!1)]).filter(e=>!!e),n=!1;for(let t=0;t{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let t of p){for(let r of d){let a=l(t,r);if(!a)continue;let o=i({...t.edge,points:a},t.atStart);if(!(!o||e.some(e=>e.edge!==t.edge&&(s(o,e)||f&&c(o,e))))){t.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}e(lt,`separateSharedRenderedTerminalLanes`);function ut(t,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=e((e,n)=>{let a=e.start,o=e.end,s=Q(n);if(s.length!==n.length-1)return!1;let c=[a,o].filter(e=>!!e);for(let e of s)if(J(e.a,e.b,r,c,-2)||J(e.a,e.b,i,[],-2))return!1;for(let n of t){if(n===e||n.isLayoutOnly)continue;let t=n.points;if(!(!t||t.length<2)){for(let e of s)for(let n of Q(H(t)))if(B(e,n,.5)>=Z||_e(e.a,e.b,n.a,n.b,X))return!1}}return!0},`candidateIsSafe`),o=e((e,t)=>{if(t+4>=e.length)return;let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=L(n,r)&&R(r,i)&&L(i,a)&&R(a,o)&&F(n,a,X)&&F(n,o,X)&&F(r,i,X)&&(r.x-n.x)*(a.x-i.x)<0,c=R(n,r)&&L(r,i)&&R(i,a)&&L(a,o)&&I(n,a,X)&&I(n,o,X)&&I(r,i,X)&&(r.y-n.y)*(a.y-i.y)<0;if(s||c)return H([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let l=e[t+5],u=R(n,r)&&L(r,i)&&R(i,a)&&L(a,o)&&R(o,l)&&F(n,o,X)&&F(n,l,X)&&F(i,a,X)&&(i.x-r.x)*(o.x-a.x)<0,d=L(n,r)&&R(r,i)&&L(i,a)&&R(a,o)&&L(o,l)&&I(n,o,X)&&I(n,l,X)&&I(i,a,X)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!u&&!d))return H([...e.slice(0,t+1),l,...e.slice(t+6)])},`withoutDogleg`);for(let e=0;e<8;e++){let e=!1;for(let n of t){if(n.isLayoutOnly)continue;let t=H(n.points??[]);for(let r=0;r<=t.length-5;r++){let i=o(t,r);if(!(!i||!a(n,i))){n.points=i,e=!0;break}}if(e)break}if(!e)return}}e(ut,`collapseRedundantRectangularDoglegs`);function dt(t,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t,n)=>H(e===t?n??[]:e.points??[]),`pointsFor`),s=e((e,t)=>{let n=0;for(let r=0;r{let t=Q(e);if(t.length!==3)return;let n=t[1];if(!(t[0].horizontal===n.horizontal||t[2].horizontal===n.horizontal))return{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}},`middleRail`),l=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);return r.filter(e=>{if(n.includes(e.id))return!1;let r=e.rect;return t.horizontal?z(t.a.x,t.b.x,r.left,r.right)>=Z&&t.a.y>=r.top-2&&t.a.y<=r.bottom+2:z(t.a.y,t.b.y,r.top,r.bottom)>=Z&&t.a.x>=r.left-2&&t.a.x<=r.right+2})},`blockingRectsFor`),u=e((e,t,n)=>{let r=e.map(e=>({...e}));if(t.horizontal)r[t.index].y=n,r[t.index+1].y=n;else if(t.vertical)r[t.index].x=n,r[t.index+1].x=n;else return;let i=Se(H(r));return Q(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=e((e,t,n)=>{let c=[e.start,e.end].filter(e=>!!e),l=Q(t);if(l.length!==t.length-1)return!1;for(let e of l)if(J(e.a,e.b,r,c,-2)||J(e.a,e.b,i,[],-2))return!1;for(let t of a)if(t!==e){for(let e of l)for(let n of Q(o(t)))if(B(e,n,.5)>=Z)return!1}return s(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t=!1;for(let n of a){let r=o(n),i=c(r);if(!i)continue;let a=l(n,i.segment);if(a.length===0)continue;let s=i.horizontal?[Math.min(...a.map(e=>e.rect.top))-20,Math.max(...a.map(e=>e.rect.bottom))+20]:[Math.min(...a.map(e=>e.rect.left))-20,Math.max(...a.map(e=>e.rect.right))+20];for(let a of s){let o=u(r,i.segment,a);if(!(!o||!d(n,o,e))){n.points=o,t=!0;break}}if(t)break}if(!t)return}}e(dt,`liftObstacleHuggingSameSideRails`);function ft(t,n){let r=e(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=e(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,n=typeof t==`string`?t.toUpperCase():``;if(n===`LR`||n===`RL`||n===`BT`)return;let i=r(e),a=e.y,o=e.height;if(!i||typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return;let s=i.right-i.left,c=i.bottom-i.top;if(!(c<=0||s{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+X||n>=t.bottom-X?!1:z(e.a.x,e.b.x,t.left,t.right)>=Z},`horizontalSegmentIntersectsTitle`),o=[...n.values()].map(i).filter(e=>!!e);if(o.length===0)return;let s=0;for(let e of t){if(e.isLayoutOnly)continue;let t=H(e.points??[]);for(let e of Q(t))for(let t of o)a(e,t.rect)&&(s=Math.max(s,t.rect.bottom-e.a.y+4))}if(!(s<=X))for(let e of o){let t=e.node.y,n=e.node.height;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.y=t-s/2,e.node.height=n+s,e.node.groupTitleRect={...e.rect,top:e.rect.top-s,bottom:e.rect.bottom-s})}}e(ft,`liftTopLaneTitleBandsAboveRails`);function pt(t,n){let r=e(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=e(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=r(e),n=e.x,i=e.width;if(!t||typeof n!=`number`||typeof i!=`number`||!Number.isFinite(n)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+X||n>=t.right-X?!1:z(e.a.y,e.b.y,t.top,t.bottom)>=Z},`verticalSegmentIntersectsTitle`),o=e((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+X||n>=t.bottom-X?!1:z(e.a.x,e.b.x,t.left,t.right)>=Z},`horizontalSegmentIntersectsTitle`),s=[...n.values()].map(i).filter(e=>!!e);if(s.length===0)return;let c=0;for(let e of t){if(e.isLayoutOnly)continue;let t=H(e.points??[]);for(let e of Q(t))for(let t of s)if(a(e,t.rect))c=Math.max(c,t.rect.right-e.a.x+4);else if(o(e,t.rect)){let n=Math.min(e.a.x,e.b.x);c=Math.max(c,t.rect.right-n+4)}}if(!(c<=X))for(let e of s){let t=e.node.x,n=e.node.width;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.x=t-c/2,e.node.width=n+c,e.node.groupTitleRect={...e.rect,left:e.rect.left-c,right:e.rect.right-c})}}e(pt,`shiftLeftLaneTitleBandsLeftOfRails`);function mt(t,n){let{realNodeRects:r}=q(n.values()),i=t.filter(e=>!e.isLayoutOnly),a=e((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),o=e((e=new Map)=>{let t=0;for(let n=0;ni.reduce((t,n)=>t+V(a(n,e)),0),`totalBends`),c=e(e=>{let t=a(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!L(n,r,X)&&!R(n,r,X)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=e((e,t)=>{let n=a(e);if(n.length<3)return;let r=n[0],i=n[1],o;if(L(r,i,X))o={x:i.x,y:t.tailStart.y};else if(R(r,i,X))o={x:t.tailStart.x,y:i.y};else return;let s=Se(H([r,i,o,t.tailStart,t.terminal]));return Q(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Q(t))if(J(e.a,e.b,r,n,-2))return!0;return!1},`pathHasNodeHit`),d=e((e,t,n)=>{for(let r of i)if(r!==e){for(let e of Q(t))for(let t of Q(a(r,n)))if(B(e,t,.5)>=Z)return!0}return!1},`pathHasSharedTrack`),f=e((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=e(()=>{let e=new Map;for(let t of i){let r=t.end;if(!r||!n.has(r)||a(t).length<4)continue;let i=e.get(r)??[];i.push(t),e.set(r,i)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t=s(),n,r=e,i=t;for(let t of p().values())for(let a=0;a=e||y>r||y===r&&b>=i||(n=v,r=y,i=b)}if(!n)return;for(let[e,t]of n)e.points=t}}e(mt,`swapDestinationTerminalTailsToReduceCrossings`);function ht(t,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),s=e((e=new Map)=>{let t=0;for(let n=0;na.reduce((t,n)=>t+V(o(n,e)),0),`totalBends`),l=e(e=>{let t=e.start,r=e.end,i=t?n.get(t):void 0,a=r?n.get(r):void 0,o=i?K(i):void 0,s=a?K(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=e((e,t,n)=>{if(n.index<=0||n.index+1>=t.length-1)return;let r=l(e);if(r){if(n.vertical){let i=n.a.x,a=Math.min(r.src.left,r.dst.left),o=Math.max(r.src.right,r.dst.right),s=io+X?`right`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`vertical`,side:s,coord:i,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}:void 0}if(n.horizontal){let i=n.a.y,a=Math.min(r.src.top,r.dst.top),o=Math.max(r.src.bottom,r.dst.bottom),s=io+X?`bottom`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`horizontal`,side:s,coord:i,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}:void 0}}},`externalRailForSegment`),d=e(()=>{let e=[];for(let t of a){let n=o(t);for(let r of Q(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=e((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&z(e.min,e.max,t.min,t.max)>=Z,`railsInteract`),p=e(e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;let i=[r],a=[];for(n.add(r);i.length>0;){let t=i.pop();a.push(t);for(let r of e)!n.has(r)&&f(t,r)&&(n.add(r),i.push(r))}a.length>1&&t.push(a)}return t},`connectedComponents`),m=e(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord){let n=t.map(e=>e.coord),r=m(t),i=[];if(t.length<=6){let a=Array(r.length).fill(!1),o=[],s=e(()=>{if(o.length===t.length){o.some((e,t)=>Math.abs(e-n[t])>=X)&&i.push([...o]);return}for(let[e,t]of r.entries())a[e]||(a[e]=!0,o.push(t),s(),o.pop(),a[e]=!1)},`visit`);return s(),i}for(let e=0;e{let n=new Map;for(let[r,i]of e.entries()){let e=t[r],a=n.get(i.edge)??i.points.map(e=>({x:e.x,y:e.y}));i.axis===`vertical`?(a[i.segmentIndex].x=e,a[i.segmentIndex+1].x=e):(a[i.segmentIndex].y=e,a[i.segmentIndex+1].y=e),n.set(i.edge,a)}let r=new Map;for(let[e,t]of n){let n=Se(H(t));if(Q(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=e(e=>{for(let[t,n]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Q(n))if(J(t.a,t.b,r,e,-2)||J(t.a,t.b,i,[],-2))return!1}for(let t=0;t=Z)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=s();if(e===0)return;let t,n=e,r=c(),i=1/0;for(let a of p(d()))for(let o of h(a)){let l=g(a,o);if(!l||!_(l))continue;let u=s(l);if(u>=e)continue;let d=c(l),f=a.reduce((e,t,n)=>e+Math.abs(o[n]-t.coord),0);u>n||u===n&&(d>r||d===r&&f>=i)||(t=l,n=u,r=d,i=f)}if(!t)return;for(let[e,n]of t)e.points=n}}e(ht,`reassignCrossingExternalRailChannels`);function gt(t,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t,n)=>H(e===t?n??[]:e.points??[]),`pointsFor`),s=e(e=>Q(e).reduce((e,t)=>{let n=t.a.x-t.b.x,r=t.a.y-t.b.y;return e+Math.hypot(n,r)},0),`pathLength`),c=e((e,t)=>{let n=0;for(let r=0;r{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&z(e.a.x,e.b.x,t.left,t.right)>=Z}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&z(e.a.y,e.b.y,t.top,t.bottom)>=Z}return!1},`segmentRunsAlongRectBorder`),u=e(e=>{let t=[e.start,e.end].filter(e=>!!e),r=[];for(let e of t){let t=n.get(e),i=t?K(t):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=e((e,t)=>{if(t+3>=e.length)return[];let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=L(n,r,X)&&R(r,i,X)&&L(i,a,X),s=R(n,r,X)&&L(r,i,X)&&R(i,a,X);if(!o&&!s||!(o?Math.sign(r.x-n.x)!==Math.sign(a.x-i.x):Math.sign(r.y-n.y)!==Math.sign(a.y-i.y)))return[];let c=F(n,a,X)||I(n,a,X)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],l=c.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:c.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),u=new Set;return l.map(e=>Se(H(e))).filter(e=>{if(Q(e).length!==e.length-1||!e.some(e=>P(e,a,X)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return u.has(t)?!1:(u.add(t),!0)})},`shortcutCandidatesAt`),f=e((e,t,n)=>{let s=[e.start,e.end].filter(e=>!!e),d=u(e);for(let e of Q(t))if(J(e.a,e.b,r,s,-2)||J(e.a,e.b,i,[],-2)||d.some(t=>l(e,t)))return!1;for(let n of a)if(n!==e){for(let e of Q(t))for(let t of Q(o(n)))if(B(e,t,.5)>=Z)return!1}return c(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=c(),t,n,r=e,i=1/0,l=1/0;for(let u of a){let a=o(u),p=V(a,X),m=s(a);for(let o=0;o<=a.length-4;o++)for(let h of d(a,o)){let a=V(h,X),o=s(h);if(!(ar||d===r&&(a>i||a===i&&o>=l)||(t=u,n=h,r=d,i=a,l=o)}}if(!t||!n)return;t.points=n}}e(gt,`shortcutRedundantOrthogonalJogs`);function _t(t,n){let r=[];for(let e of n.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,n=e.y??0,i=K(e);i&&r.push({id:String(e.id??``),cx:t,cy:n,rect:i})}if(r.length===0)return;let i=new Map(r.map(e=>[e.id,e])),a=r.map(e=>({id:e.id,rect:e.rect})),o=[`top`,`bottom`,`left`,`right`],s={top:Math.min(...r.map(e=>e.rect.top))-20,bottom:Math.max(...r.map(e=>e.rect.bottom))+20,left:Math.min(...r.map(e=>e.rect.left))-20,right:Math.max(...r.map(e=>e.rect.right))+20},c=t.filter(e=>!e.isLayoutOnly),l=new Map(c.map((e,t)=>[e,t])),u=e(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(s[e]+t*20*r);return n},`outwardTracksForSide`),d=e((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),f=e((e,t)=>{let n=0;for(let r of e)for(let e of t)_e(r.a,r.b,e.a,e.b,X)&&n++;return n},`crossingCountBetweenSegments`),p=e((e,t)=>f(Q(e),Q(t)),`crossingCountBetweenPaths`),m=e((t=new Map)=>{let n=0,r=[],i=new Set,a=[],o=e(e=>{i.has(e)||(i.add(e),a.push(e))},`addEdge`);for(let e=0;e0&&(n+=l,r.push({first:i,second:e,count:l}),o(i),o(e))}}return a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:n,pairs:r,edgeSet:i,edges:a}},`crossingSnapshot`),h=e((e,t)=>{let n=new Set(t.keys());if(n.size===0)return e.count;let r=0;for(let t of e.pairs)(n.has(t.first)||n.has(t.second))&&(r+=t.count);let i=0;for(let e=0;e{let t=new Map;for(let n of e.pairs){let e=t.get(n.first)??new Set;e.add(n.second),t.set(n.first,e);let r=t.get(n.second)??new Set;r.add(n.first),t.set(n.second,r)}let n=[],r=new Set;for(let i of e.edges){if(r.has(i))continue;let e=[i],a=[];for(r.add(i);e.length>0;){let n=e.pop();a.push(n);for(let i of t.get(n)??[])r.has(i)||(r.add(i),e.push(i))}a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),a.length>1&&n.push(a)}return n},`crossingComponents`),_=e(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=e(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of c)e.has(t)||_(t).some(e=>r.has(e))&&i.push(t);i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),t.push(i)}return t},`pairSearchGroups`),y=e((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=e(e=>{let t=new Map;for(let n of e.pairs)t.set(n.first,(t.get(n.first)??0)+n.count),t.set(n.second,(t.get(n.second)??0)+n.count);return t},`currentCrossingsByEdge`),x=e(e=>e.slice(1).reduce((t,n,r)=>{let i=e[r];return t+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),`pathLength`),S=e((e=new Map)=>c.reduce((t,n)=>t+V(d(n,e)),0),`totalBends`),C=e((e=new Map)=>c.reduce((t,n)=>t+x(d(n,e)),0),`totalLength`),w=e((e,t,n=new Map)=>{let r=Q(t);for(let t of c)if(t!==e){for(let e of r)for(let r of Q(d(t,n)))if(B(e,r,.5)>=Z)return!0}return!1},`pathHasSegmentConflict`),T=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Q(t))if(J(e.a,e.b,a,n,-2))return!0;return!1},`pathHitsNode`),E=e((e,t)=>{let n=Se(H(t));Q(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),D=e(e=>e===`left`||e===`right`,`sideIsHorizontal`),O=e((e,t,n)=>{switch(t){case`left`:return Math.min(e.x,n.x)-20;case`right`:return Math.max(e.x,n.x)+20;case`top`:return Math.min(e.y,n.y)-20;case`bottom`:return Math.max(e.y,n.y)+20}},`localTrackForSameSide`),k=e((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[O(t,n,r),s[n]];for(let o of a)for(let a=0;a<=2;a++)E(e,ue(t,n,r,o+i*20*a))},`addSameSideCandidates`),A=e((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),j=e((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),ee=e((e,t,n,r,i)=>{let a=[...u(`top`),...u(`bottom`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),te=e((e,t,n,r,i)=>{let a=[...u(`left`),...u(`right`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),M=e(e=>{let t=new Set;return e.map(e=>H(e)).filter(e=>{let n=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return t.has(n)||e.length<2?!1:(t.add(n),!0)})},`dedupeCandidatePaths`),ne=e((e,t,n,r)=>{let i=[],a=le(e,t,n,r,20,X);a&&E(i,a),t===r&&k(i,e,t,n);let o=D(t),s=D(r);return o&&!s?A(i,e,t,n,r):!o&&s?j(i,e,t,n,r):o?ee(i,e,t,n,r):te(i,e,t,n,r),M(i)},`buildCandidatesForSides`),N=e((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=ce(r,s),c=s===`top`||s===`bottom`?u(s):a;for(let r of i){E(e,[t,n,{x:r,y:n.y},{x:r,y:o.y},o]);for(let i of c)E(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:o.x,y:i},o])}}},`addVerticalDepartureOuterTrackCandidates`),P=e((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=ce(r,s),c=s===`left`||s===`right`?u(s):i;for(let r of a){E(e,[t,n,{x:n.x,y:r},{x:o.x,y:r},o]);for(let i of c)E(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:o.y},o])}}},`addHorizontalDepartureOuterTrackCandidates`),F=e(e=>{let t=e.start,n=e.end,r=n?i.get(n):void 0;if(!t||!r)return[];let a=H(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],c=[];return R(o,s,X)?N(c,o,s,r):L(o,s,X)&&P(c,o,s,r),c},`terminalPreservingOuterTrackCandidates`),I=e(e=>{let t=e.start,n=e.end,r=t?i.get(t):void 0,a=n?i.get(n):void 0;if(!r||!a)return[];let s=[];for(let e of o){let t=ce(r,e);for(let n of o)s.push(...ne(t,e,ce(a,n),n))}return s.push(...F(e)),s},`candidatePathsFor`),z=e(()=>new Map(c.map(e=>[e,Q(d(e))])),`currentSegmentsByEdge`),re=e((e,t,n)=>{let r=new Set;for(let i of c){if(i===e)continue;let a=n.get(i)??Q(d(i));t.some(e=>a.some(t=>B(e,t,.5)>=Z))&&r.add(i)}return r},`sharedTrackConflictsFor`),ie=e((e,t,n,r)=>{let i=new Set;return I(e).map(e=>Se(H(e))).filter(t=>{if(T(e,t))return!1;let n=t.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return i.has(n)||t.length<2?!1:(i.add(n),!0)}).map(i=>{let a=Q(i),o=0;for(let t of c)t!==e&&(o+=f(a,n.get(t)??Q(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:V(i,X),totalBends:V(i),length:x(i)}}).filter(({crossings:e})=>e<=t.count).sort((e,t)=>e.crossings-t.crossings||e.bends-t.bends||e.length-t.length).slice(0,48).map(t=>({path:t.candidate,segments:t.candidateSegments,sharedTrackConflicts:re(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),ae=e((e,t,n,r,i,a)=>{let o=0;for(let n of e.pairs)(n.first===t||n.second===t||n.first===r||n.second===r)&&(o+=n.count);let s=f(n.segments,i.segments);for(let e of c){if(e===t||e===r)continue;let o=a.get(e)??Q(d(e));s+=f(n.segments,o)+f(i.segments,o)}return e.count-o+s},`pairCrossingCount`),U=e((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),W=e((e,t)=>e.segments.some(e=>t.segments.some(t=>B(e,t,.5)>=Z)),`candidatesShareTrack`),G=e((e,t,n,r)=>U(t,n.edge)&&U(r,e.edge)&&!W(t,r),`pairCandidatesAreCompatible`),oe=e((e,t,n,r,i)=>{let a=ae(e.current,t.edge,n,r.edge,i,e.baseSegments);if(!(a>=e.current.count))return{replacements:new Map([[t.edge,n.path],[r.edge,i.path]]),crossings:a,bends:e.currentBends-(e.baseBendsByEdge.get(t.edge)??0)-(e.baseBendsByEdge.get(r.edge)??0)+n.totalBends+i.totalBends,length:e.currentLength-(e.baseLengthByEdge.get(t.edge)??0)-(e.baseLengthByEdge.get(r.edge)??0)+n.length+i.length}},`scorePairReplacement`),se=e((e,t)=>e.crossings{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!G(t,r,n,a))continue;let o=oe(e,t,r,n,a);o&&se(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),q=e(e=>{let t=S(),n=C(),r=z(),i=b(e),a=new Map(c.map(e=>[e,V(d(e))])),o=new Map(c.map(e=>[e,x(d(e))])),s=new Map,l=v(e);for(let t of l)for(let n of t){if(s.has(n))continue;let t=ie(n,e,r,i);t.length>0&&s.set(n,{edge:n,candidates:t})}let u={replacements:new Map,crossings:e.count,bends:t,length:n},f={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of l){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>s.get(e)).filter(e=>!!e);for(let e=0;e0?u.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=V(d(o),X);for(let c of I(o)){let l=T(o,c),u=!l&&w(o,c),d=y(e,o,c),f=V(c,X);l||u||(di||d===i&&f>=a||(n=o,r=c,i=d,a=f))}}if(n&&r){n.points=r;continue}let o=q(e);if(!o)return;for(let[e,t]of o)e.points=t}}e(_t,`resolveRenderedOrthogonalCrossings`);var vt=.001,yt=8;function bt(t,n){let{nodeInfoById:r,realNodeRects:i}=de(n),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...i.map(e=>e.rect.top))-20,bottom:Math.max(...i.map(e=>e.rect.bottom))+20,left:Math.min(...i.map(e=>e.rect.left))-20,right:Math.max(...i.map(e=>e.rect.right))+20},s=e((e,t,n,r)=>{let i=[],a=le(e,t,n,r,20,vt);return a&&i.push(a),t===r&&i.push(ue(e,t,n,o[t])),i},`buildOrthogonalPathCandidates`),c=e((e,t)=>{for(let n=0;n{let i=0,a=re(e,vt),o=n.start,s=n.end;for(let e of t){if(e===n||e.isLayoutOnly)continue;let t=e.start,c=e.end;if(!r&&o&&s&&(t===o||t===s||c===o||c===s))continue;let l=e.points;if(!(!l||l.length<2))for(let e of a)for(let t of re(l,vt)){if(me(e.a,e.b,t.a,t.b,vt,vt)){i++;continue}B(e,t,vt)>=yt&&i++}}return i},`pathConflictCount`),u=e((e,t)=>{let n=Math.abs(e.y-t.rect.top),r=Math.abs(e.y-t.rect.bottom),i=Math.abs(e.x-t.rect.left),a=Math.abs(e.x-t.rect.right),o=`top`,s=n;return r{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let e of t){if(e.isLayoutOnly)continue;let t=e.points??[];if(t.length<1)continue;let n=e.id??``,i=e.start,a=e.end;if(i){let e=r.get(i);e&&f(i,u(t[0],e),n)}if(a){let e=r.get(a);e&&f(a,u(t[t.length-1],e),n)}}let p=e((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let e of t){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=V(t,vt);if(n<4)continue;let i=e.start,o=e.end;if(!i||!o)continue;let m=r.get(i),h=r.get(o);if(!m||!h)continue;let g=e.id??``,_=l(t,e,!0),v=l(t,e),y,b=_,x=n;for(let t of a){if(p(i,t,g))continue;let n=ce(m,t);for(let r of a){if(p(o,r,g))continue;let a=ce(h,r);for(let u of s(n,t,a,r)){if(c(u,[i,o]))continue;let t=V(u,vt);if(_>0){let n=l(u,e,!0);if(n>b||n===b&&t>=x)continue;b=n,x=t,y=u;continue}l(u,e)>v||te.edgeId!==g));let n=d.get(o);n&&d.set(o,n.filter(e=>e.edgeId!==g)),f(i,u(y[0],m),g),f(o,u(y[y.length-1],h),g)}}}e(bt,`simplifyDetouredEdges`);var xt=.001,St=10,Ct=7;function wt(e,t){let n=t?0:e.length-1,r=t?1:-1,i=e[n],a=e[n+r];if(!i||!a)return;let o=a.x-i.x,s=a.y-i.y;if(!(Math.abs(o)+Math.abs(s)t&&G(e,Tt(t)))}e(Et,`labelOverlapsOwnMarker`);function Dt(t,n){let r=[];for(let e of t){if(e.isLayoutOnly)continue;let t=e.points;if(!(!t||t.length<2))for(let n=0;n{let n=oe(t,3);for(let{nodeId:t,rect:r}of i)if(t!==e&&G(n,r))return!0;return!1},`labelOverlapsForeignNode`),s=e((e,t)=>{let n=oe(t,3);for(let t of r)if(t.edgeId!==e&&ae(t.p1,t.p2,n))return!0;return!1},`labelOverlapsForeignEdge`),c=e((e,t,n)=>o(e,n)||s(t,n),`labelOverlapsAnything`),l=[],u=e(e=>{for(let{id:t,rect:n}of a)if(W(n,e))return t},`findContainingLane`),d=e((e,t)=>l.some(n=>n.labelId!==e&&G(t,n.rect)),`overlapsPlacedLabel`);for(let r of t){if(r.isLayoutOnly)continue;let t=r.labelNodeId;if(!t)continue;let i=n.get(t);if(!i)continue;let f=r.points;if(!f||f.length<2)continue;let p=i.width??0,m=i.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e=xt&&i>=xt||h.push({idx:e,length:r+i,orientation:r>=xt?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx0?g:h,v=p>=m?`horizontal`:`vertical`,y=e(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=e((e,t)=>{let n=f[e.idx],r=f[e.idx+1];return{midX:n.x+(r.x-n.x)*t,midY:n.y+(r.y-n.y)*t}},`anchorAtT`),w=e((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=e((e,t)=>e.midX>=t.left-xt&&e.midX<=t.right+xt&&e.midY>=t.top-xt&&e.midY<=t.bottom+xt,`pointInsideRectInclusive`),E=e(e=>{let t=se(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=a.find(({rect:t})=>T(e,t));if(!r)return;let i=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,c=r.rect.bottom-m/2-1;if(i>o||s>c)return;let l={midX:w(e.midX,i,o),midY:w(e.midY,s,c)},d=se(l.midX,l.midY,p,m);return T(e,d)?{laneId:r.id,anchor:l,rect:d}:void 0},`placementForAnchor`),D=e((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=e((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+xt{let n=y(e);for(let e of n)for(let n of S){let i=C(e,n);if(!O(e,i))continue;let a=E(i);if(a&&!Et(a.rect,f)&&!d(t,a.rect)&&!c(t,r.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=e((e,n,i=!1)=>{let a=y(e);for(let e of a){let a={midX:e.midX,midY:e.midY};if(n&&!O(e,a))continue;let c=E(a);if(c&&!Et(c.rect,f)&&!d(t,c.rect)&&!o(t,c.rect)&&(i||!s(r.id,c.rect)))return{laneId:c.laneId,anchor:c.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.lengthe.labelId===t);n>=0?l[n]={labelId:t,rect:e}:l.push({labelId:t,rect:e})}}}e(Dt,`anchorLabelsToPolyline`);var Ot=1e-6,kt=8/2,At=3;function jt(e,t){return e{let s=jt(r,i),c=0,l=e(e=>{if(!e)return;let t=a.get(e);if(!t)return;let n=o===`x`?t.w/2:t.h/2;n>c&&(c=n)},`consider`);l(n.labelNodeId);for(let e of t){if(e===n||e.isLayoutOnly)continue;let t=e.start,r=e.end;!t||!r||jt(t,r)===s&&l(e.labelNodeId)}return c>0?c+At:0},`labelClearanceFor`);for(let e of t){if(e.isLayoutOnly)continue;let n=e.points;if(!ie(n,Ot))continue;let a=pe(e,r,Ot);if(!a)continue;let{srcId:s,dstId:c,srcInfo:l,dstInfo:u,collinearX:d,collinearY:f}=a;if(d===f)continue;let p,m;if(d){let e=u.cy>l.cy;p={x:l.cx,y:e?l.rect.bottom:l.rect.top},m={x:u.cx,y:e?u.rect.top:u.rect.bottom}}else{let e=u.cx>l.cx;p={x:e?l.rect.right:l.rect.left,y:l.cy},m={x:e?u.rect.left:u.rect.right,y:u.cy}}if(J(p,m,i,[s,c],1))continue;let h=o(e,s,c,d?`x`:`y`),g=h>kt?h:kt,_=[0,g,-g];for(let n of _){let r={...p},a={...m};if(d){if(r.x+=n,a.x+=n,r.x<=l.rect.left||r.x>=l.rect.right||a.x<=u.rect.left||a.x>=u.rect.right)continue}else if(r.y+=n,a.y+=n,r.y<=l.rect.top||r.y>=l.rect.bottom||a.y<=u.rect.top||a.y>=u.rect.bottom)continue;if(!J(r,a,i,[s,c],1)&&!ge(r,a,t,e,{epsilon:Ot})){e.points=[r,a];break}}}}e(Mt,`straightenCollinearSiblingDetours`);function Nt(t,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=q(n.values()),o=e((e,t)=>re(t,r).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),s=e(()=>{let e=[];for(let n of t){if(n.isLayoutOnly)continue;let t=n.points;!t||t.length<2||e.push(...o(n,H(t)))}return e},`allSegments`),c=e((e,t)=>e.horizontal&&t.horizontal?z(e.a.x,e.b.x,t.a.x,t.b.x)>=8&&Math.abs(e.a.y-t.a.y)<7:e.vertical&&t.vertical?z(e.a.y,e.b.y,t.a.y,t.b.y)>=8&&Math.abs(e.a.x-t.a.x)<7:!1,`hasCrowdedParallelTrack`),l=e((e,n)=>{let s=e.start,l=e.end,u=o(e,n);if(u.length!==n.length-1)return!1;let d=[s,l].filter(e=>!!e),f=e.labelNodeId?[e.labelNodeId]:[];for(let e of u)if(J(e.a,e.b,i,d,-2)||J(e.a,e.b,a,f,-2))return!1;for(let n of t){if(n===e||n.isLayoutOnly)continue;let t=n.points;if(!(!t||t.length<2)){for(let e of u)for(let i of o(n,H(t)))if(c(e,i)||_e(e.a,e.b,i.a,i.b,r))return!1}}return!0},`candidateIsSafe`),u=e((e,t)=>{let n=H(e.edge.points??[]);if(n.length<4||e.index>=n.length-1)return;let r=n.map(e=>({...e}));if(e.horizontal)r[e.index].y+=t,r[e.index+1].y+=t;else if(e.vertical)r[e.index].x+=t,r[e.index+1].x+=t;else return;return o(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=e((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=e(e=>{let t=e.edge,r=H(t.points??[]);if(r.length!==4||e.index!==1)return;let i=t.start?n.get(t.start):void 0,a=t.end?n.get(t.end):void 0,o=i?K(i):void 0,s=a?K(a):void 0,c=r.slice(e.index+2);if(!(!i||!a||!o||!s||c.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:c}},`sourceDetourContextFor`),p=e((e,t,n,i,a,o)=>{let s=i.y>=n.y,c=s?a.bottom:a.top,l=c+(s?20:-20);if(s&&e.b.y<=l+r||!s&&e.b.y>=l-r)return;let u=e.a.x+t;return H([{x:n.x,y:c},{x:n.x,y:l},{x:u,y:l},{x:u,y:e.b.y},...o],r)},`verticalSourceDetour`),m=e((e,t,n,i,a,o)=>{let s=i.x>=n.x,c=s?a.right:a.left,l=c+(s?20:-20);if(s&&e.b.x<=l+r||!s&&e.b.x>=l-r)return;let u=e.a.y+t;return H([{x:c,y:n.y},{x:l,y:n.y},{x:l,y:u},{x:e.b.x,y:u},...o],r)},`horizontalSourceDetour`),h=e((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=s(),t=!1;for(let n=0;ne.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}e(Nt,`nudgeSharedInteriorSubpaths`);function Pt(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(Math.abs(c)<1e-10)return!1;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c,p=.01;return d>p&&d<1-p&&f>p&&f<1-p}e(Pt,`segmentsIntersect`);function Ft(e){let n=e.nodes??[],r=e.edges??[],i=[];if(!r.length||!n.length)return i;let a=fe(n),o=[];for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,s=e.labelNodeId,c=e.id??`${n}->${r}`;for(let e of a)if(!(e.nodeId===n||e.nodeId===r)&&!(s&&e.nodeId===s)){for(let n=0;n0){let e=i.filter(e=>e.type===`edge-node-overlap`).length,n=i.filter(e=>e.type===`edge-edge-crossing`).length;t.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${e} edge-node overlap(s), ${n} edge crossing(s)`);for(let e of i)t.warn(`[SWIMLANE_VALIDATE] ${e.type}: ${e.detail}`)}return i}e(Ft,`validateSwimlanesLayout`);function It(t,n){let r=t.nodes??[],i=t.edges??[],a=r.filter(e=>!e.isGroup);if((n===`LR`||n===`RL`)&&a.length>0&&!nt(t,n)||n===`BT`&&a.length>0&&!tt(t))return;for(let e of i){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=Se(xe(t)))}bt(i,r),Mt(i,r),ot(i,r);let o=new Map;for(let e of r)o.set(String(e.id),e);Dt(i,o),Oe(i,o),st(i,o),Nt(i,o),lt(i,o),ut(i,o),dt(i,o),mt(i,o);let s=e(()=>{_t(i,o),ht(i,o),gt(i,o),Dt(i,o),qe(i,o),dt(i,o),Dt(i,o),qe(i,o)},`finalizeRenderedEdges`);s(),Nt(i,o),s(),ft(i,o),pt(i,o),ft(i,o),pt(i,o)}e(It,`postProcessSwimlaneLayout`);function Lt(e){let t=new Map(e.nodeById),n=new Set,r=[];for(let i of e.edges){if(!t.has(i.src)||!t.has(i.dst))continue;let e=`${i.id}:${i.src}->${i.dst}`;n.has(e)||(n.add(e),r.push(i))}return{nodes:[...t.keys()],edges:r,layout:e.layout,nodeById:t}}e(Lt,`normalizeGraph`);function Rt(e,t){return e.edges.filter(e=>e.dst===t)}e(Rt,`incoming`);function zt(e){let t=new Map;for(let n of e.nodes)t.set(n,[]);for(let n of e.edges)t.get(n.src).push(n.dst);return t}e(zt,`buildSuccessorMap`);function Bt(e){let t=zt(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}e(Bt,`buildSortedSuccessorMap`);function Vt(e){let t=new Map;for(let n of e.nodes)t.set(n,0);for(let n of e.edges)t.set(n.dst,(t.get(n.dst)??0)+1);return t}e(Vt,`buildInDegreeMap`);function Ht(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}e(Ht,`sortedZeroInDegreeNodes`);function Ut(e,t=()=>!0){let n=new Map,r=new Map;for(let t of e.nodes)n.set(t,[]),r.set(t,[]);for(let i of e.edges)t(i)&&(r.get(i.src).push(i.dst),n.get(i.dst).push(i.src));return{preds:n,succs:r}}e(Ut,`buildPredecessorSuccessorMaps`);function Wt(e,t,n,r){let i=0;for(let t of e.nodes)r?.skipGroups&&e.nodeById.get(t)?.isGroup||(i=Math.max(i,n[t]??0));let a=Array.from({length:i+1},()=>[]);for(let i of t)r?.skipGroups&&e.nodeById.get(i)?.isGroup||a[Math.max(0,n[i]??0)].push(i);return a}e(Wt,`buildLayersFromRanks`);function Gt(e){let t=Vt(e),n=Ht(t),r=[],i=Bt(e);for(;n.length;){let e=n.shift();r.push(e);for(let r of i.get(e)??[])if(t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0){let e=0;for(;e{if(i-e<=1)return 0;let a=e+i>>1,o=r(e,a)+r(a,i),s=e,c=a,l=e;for(;s=i||se.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let i=Object.create(null);for(let e of n.nodes)i[e]=0;let a=[],o=e(e=>{i[e]=1;for(let t of r.get(e)??[]){let e=t.dst;i[e]===0?o(e):i[e]===1&&a.push(t)}i[e]=2},`dfs`),s=[...n.nodes].sort((e,t)=>e.localeCompare(t));for(let e of s)i[e]===0&&o(e);let c=new Set(a.map(e=>`${e.id}:${e.src}->${e.dst}`)),l=n.edges.map(e=>c.has(`${e.id}:${e.src}->${e.dst}`)?{id:e.id,src:e.dst,dst:e.src,weight:e.weight,ref:e.ref}:e);return{acyclic:{nodes:[...n.nodes],edges:l,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:a}}e(Jt,`removeCycles_DFS`);function Yt(t){let n=new Map,r=e(e=>{if(n.has(e))return n.get(e);let i=t.nodeById.get(e);if(!i)return n.set(e,null),null;let a=i.parentId;if(!a)return n.set(e,null),null;let o=r(a)??a;return n.set(e,o),o},`resolve`);for(let e of t.nodes)r(e);return n}e(Yt,`buildTopLaneMap`);function Xt(e){let t=Yt(e);return e=>t.get(e)??null}e(Xt,`createTopLaneResolver`);function Zt(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}e(Zt,`buildTopLaneOrder`);function Qt(e,t){let n=Zt(e);if(!t||t.length===0)return n;let r=new Set(n),i=new Set,a=[];for(let e of t)!r.has(e)||i.has(e)||(i.add(e),a.push(e));for(let e of n)i.has(e)||a.push(e);return a}e(Qt,`resolveTopLaneOrder`);var $t={EPSILON:1e-6},en={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},tn={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function nn(t,n){let r=Lt(t),i=n?.laneOf??(()=>null),a=n?.rankHint,{preds:o}=Ut(r);for(let e of o.values())e.sort((e,t)=>e.localeCompare(t));let s=Gt(r)??[...r.nodes].sort((e,t)=>e.localeCompare(t)),c=new Map;for(let[e,t]of s.entries())c.set(t,e);let l=new Map,u=new Map;for(let e of r.nodes)u.set(e,[]);for(let e of s){let t=(o.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=rn(e,t,{laneOf:i,rankHint:a,topoIndex:c});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of r.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of r.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=c.get(e)??0,r=c.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=an(r),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=on(m),g=sn(m),_=new Map;for(let e of r.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=e(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of s)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:s}}e(nn,`buildDrivingTree`);function rn(e,t,n){let r=n.laneOf(e);return[...t].sort((e,t)=>{let i=n.laneOf(e),a=n.laneOf(t),o=i!=null&&i===r;if(o!==(a!=null&&a===r))return o?-1:1;let s=n.rankHint?.[e],c=n.rankHint?.[t];if(s!=null&&c!=null&&s!==c)return c-s;let l=n.topoIndex.get(e)??0,u=n.topoIndex.get(t)??0;return l===u?e.localeCompare(t):l-u})[0]}e(rn,`chooseParent`);function an(e){let t=new Map;for(let n of e.nodes)t.set(n,new Set);for(let n of e.edges)t.get(n.src).add(n.dst),t.get(n.dst).add(n.src);return t}e(an,`buildAdjacency`);function on(e){let t=new Map,n=0;for(let r of e.keys()){if(t.has(r))continue;let i=[r];for(;i.length>0;){let r=i.pop();if(!t.has(r)){t.set(r,n);for(let n of e.get(r)??[])t.has(n)||i.push(n)}}n++}return t}e(on,`assignComponents`);function sn(t){let n=new Map,r=new Map,i=[],a=[],o=0,s=e((e,c)=>{n.set(e,++o),r.set(e,o);for(let l of t.get(e)??[])l!==c&&(n.has(l)?(n.get(l)??0)<(n.get(e)??0)&&(i.push([e,l]),r.set(e,Math.min(r.get(e)??o,n.get(l)??o))):(i.push([e,l]),s(l,e),r.set(e,Math.min(r.get(e)??o,r.get(l)??o)),(r.get(l)??0)>=(n.get(e)??0)&&a.push(cn(e,l,i,a.length))))},`visit`);for(let e of t.keys())n.has(e)||s(e,null);return a}e(sn,`computeBlocks`);function cn(e,t,n,r){let i=[],a=new Set;for(;n.length>0;){let r=n.pop();if(i.push(r),a.add(r[0]),a.add(r[1]),r[0]===e&&r[1]===t||r[0]===t&&r[1]===e)break}return{id:r,edges:i,nodes:[...a]}}e(cn,`popBlock`);function ln(t,n,r){let i=[...t.nodes],a=new Map;for(let[e,t]of i.entries())a.set(t,e);let o=i.length,s=Array(o).fill(-1),c=Array(o).fill(0),l=[],u=new Set;for(let e of i){let t=r.parent.get(e)??null,n=a.get(e);n!=null&&(t??(s[n]=-1,c[n]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=a.get(e);if(t==null)continue;let n=r.children.get(e)??[];for(let e of n){if(u.has(e))continue;let n=a.get(e);n!=null&&(s[n]=t,c[n]=c[t]+1,u.add(e),l.push(e))}}for(let e of i){if(u.has(e))continue;let t=a.get(e);t!=null&&(s[t]=-1,c[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,o)))+1),f=Array.from({length:d},()=>Array(o).fill(-1));for(let e=0;e{if(e===-1||t===-1)return-1;c[e]>t&1&&(e=f[t][e],e===-1))return-1;if(e===t)return e;for(let n=d-1;n>=0;n--){let r=f[n][e],i=f[n][t];r===-1||i===-1||r!==i&&(e=r,t=i)}return f[0][e]},`lcaIndex`),m=Array.from({length:o},()=>new Map);for(let e of t.edges){let t=e.src,r=e.dst,i=n[t],o=n[r];if(i==null||o==null||(i>o&&([t,r]=[r,t],[i,o]=[o,i]),i==null||o==null||i===o))continue;let s=a.get(t),c=a.get(r);if(s==null||c==null)continue;let l=p(s,c);if(l===-1)continue;let u=m[l];for(let e=i;e{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=e(e=>{let t=a.get(e);_.add(e);let i=t==null?void 0:m[t],o=i?new Map(i):new Map,s=r.children.get(e)??[];for(let t of s){let r=v(t),i=n[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=n[t];s!=null&&s>i&&(o+=1),a.set(t,o)}g(o,r)}return o},`dfs`);for(let e of r.roots)_.has(e)||v(e);for(let e of i)_.has(e)||v(e);return h}e(ln,`computeSubtreeCrossCounts`);function un(t,n,r){let i=new Map,a=e(e=>{let t=r[e]??0,o=[...n.get(e)??[]];o.sort(dn(r));for(let e of o){a(e);let n=i.get(e);n!=null&&(t=Math.min(t,n))}i.set(e,t)},`annotate`);for(let e of t)a(e);return i}e(un,`annotateMinimumLayers`);function dn(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}e(dn,`compareByRankThenId`);function fn(t,n,r,i){let a=0;for(let e of n){let t=r[e]??0;t>a&&(a=t)}let o=Array.from({length:a+1},()=>[]),s=new Set,c=e(e=>{if(s.has(e))return;s.add(e);let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e);for(let t of i(e))c(t)},`emit`);for(let e of t)c(e);for(let e of n)if(!s.has(e)){let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e),s.add(e)}return o}e(fn,`emitNodesInTreeOrder`);function pn(e){let t=[];for(let n of e){let e=new Set,r=[];for(let t of n)e.has(t)||(e.add(t),r.push(t));t.push(r)}return t}e(pn,`deduplicateLayers`);function mn(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],c=[],l=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):c.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),c.sort((e,t)=>{let n=l?.get(e)??0,i=l?.get(t)??0;if(n!==i)return n-i;let a=r.get(e)??o,s=r.get(t)??o;return a===s?e.localeCompare(t):a-s}),[...s.map(e=>e.child),...c]}}e(mn,`createChildOrderer`);function hn(e,t,n){let r=nn(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=ln(e,t,r),s=[...a].sort(dn(t)),c=mn(i,t,o,un(s,i,t)),l=fn(s,e.nodes,t,c);return l=pn(l),l}e(hn,`buildMultitreeLayerOrder`);function gn(e,t,n){let r=new Set(e),i=new Set(t),a=Kt(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return qt(o)}e(gn,`countCrossingsBetweenAdjacent`);function _n(e,t,n){let r=[];for(let e of t){let t=n[e.src],i=n[e.dst];if(t==null||i==null||t===i)continue;let a=e.src,o=e.dst,s=t,c=i;t>i&&(a=e.dst,o=e.src,s=i,c=t);for(let t=s;t(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let c=0;for(let e of r.get(s)??[])c=Math.max(c,(n[e]??0)+1);if(c>=o)continue;let l=o;n[s]=c;let u=_n(hn(e,n,i),e.edges,n);u(t[e]??0)-(t[n]??0)||e.localeCompare(n));for(let i of r){let r=n(i);if(!r)continue;let a=e.edges.filter(e=>e.src===i);if(a.length===0)continue;let o=!1,s=0;for(let e of a){let t=n(e.dst);t==null||t===r?o=!0:s++}if(s===0||o)continue;let c=0,l=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?l=!0:c++)}if(c>0||!l)continue;let u=t[i]??0,d=u+s,f=0;for(let n of e.edges)n.dst===i&&(f=Math.max(f,(t[n.src]??0)+1));let p=Math.max(u,f,d);p!==u&&(t[i]=p)}}e(yn,`adjustCrossLaneSources`);function bn(e,t){let n=Lt(e),r=Gt(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=Xt(n),o=Object.create(null);for(let e of r){let r=Rt(n,e),s=t?.ignoreCrossLaneEdges?r.filter(t=>{let n=a(t.src),r=a(e);return!n||!r?!0:n===r}):r;if(s.length===0)o[e]=0;else if(i&&s.length===1){let t=s[0].src;a(t)===a(e)?o[e]=(o[t]??0)+1:o[e]=o[t]??0}else{let t=-1/0;for(let e of s)t=Math.max(t,(o[e.src]??0)+1);o[e]=t===-1/0?0:t}}return(t?.optimizeRanksByCrossings??!1)&&(o=vn(n,o)),t?.ignoreCrossLaneEdges&&yn(n,o),{layers:hn(n,o,a),rankOf:o,dummy:new Set}}e(bn,`assignLayers_LongestPath`);function xn(t,n){let r=Lt(t),i={...bn(r,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},a=Xt(r),{preds:o,succs:s}=Ut(r,e=>{if(n?.ignoreCrossLaneEdges){let t=a(e.src),n=a(e.dst);if(t&&n&&t!==n)return!1}return!0}),c=Gt(r)??[...r.nodes],l=[...c].reverse(),u=e((e,t)=>{let n=0;for(let t of o.get(e)??[])n=Math.max(n,(i[t]??0)+1);let r=1/0,a=s.get(e)??[];return a.length>0&&(r=Math.min(...a.map(e=>(i[e]??0)-1))),Number.isFinite(r)||(r=Math.max(n,t)),Math.min(Math.max(t,n),r)},`clampFeasible`),d=en.GRAVITY_ITERATIONS,f=e(e=>{let t=!1;for(let n of e){let e=o.get(n)??[],r=s.get(n)??[];if(e.length===0&&r.length===0)continue;let a=e.length>0?e.reduce((e,t)=>e+(i[t]??0)+1,0)/e.length:i[n]??0,c=r.length>0?r.reduce((e,t)=>e+(i[t]??0)-1,0)/r.length:i[n]??0,l=u(n,Math.round((a+c)/2));l!==i[n]&&(i[n]=l,t=!0)}return t},`relaxOrder`);for(let e=0;e0){let n=Math.min(...t.map(e=>(i[e]??0)-1));(i[e]??0)>n&&(i[e]=n)}}return{layers:Wt(r,c,i),rankOf:i,dummy:new Set}}e(xn,`assignLayers_Gravity`);function Sn(e){let t=Vt(e),n=Bt(e),r=Ht(t),i=[];for(;r.length>0;){let e=[];for(let a of r){i.push(a);for(let r of n.get(a)??[])t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0&&e.push(r)}r=e.sort((e,t)=>e.localeCompare(t))}return i.length===e.nodes.length?i:null}e(Sn,`topoSortByGenerationIfAcyclic`);function Cn(t,n){let r=Lt(t),i=n?.direction===`LR`?Sn(r)??[...r.nodes].sort():Gt(r)??[...r.nodes].sort(),a=Xt(r),o=e(e=>a(e)??e,`laneOf`),s=Object.create(null),c=new Map,l=e((e,t)=>n?.ignoreCrossLaneEdges??!0?+(o(e)===o(t)):1,`edgeWeight`);for(let e of i){if(r.nodeById.get(e)?.isGroup)continue;let t=Rt(r,e),n=0;if(t.length>0)for(let r of t){let t=r.src,i=s[t]??0;n=Math.max(n,i+l(t,e))}let i=o(e),a=c.get(i)??0,u=Math.max(n,a);s[e]=u,c.set(i,u+1)}return{layers:Wt(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}e(Cn,`assignLayers_LaneAwareCompact`);function wn(t,n){let r=Lt(n),{rankOf:i}=t,a=t.layers.map(e=>[...e]),o=new Set(t.dummy?[...t.dummy]:[]),s=0,c=new Map(r.nodeById),l=e(e=>{let t=`placeholder-${s++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(t,n),o.add(t);a.length<=e;)a.push([]);return a[e].push(t),i[t]=e,t},`addDummyAt`),u=[...r.edges].sort((e,t)=>e.id===t.id?e.src===t.src?e.dst.localeCompare(t.dst):e.src.localeCompare(t.src):e.id.localeCompare(t.id)),d=[];for(let e of u){let t=i[e.src]??0,n=i[e.dst]??0;if(n-t<=1){d.push(e);continue}let r=e.src;for(let i=t+1,a=0;i!r.nodes.includes(e))],edges:d,layout:r.layout,nodeById:c};return{layering:{layers:a,rankOf:i,dummy:o},graphWithDummies:f}}e(wn,`makeProperLayering`);function Tn(e){let t=e.length;if(t===0)return 1/0;let n=[...e].sort((e,t)=>e-t);return t%2==1?n[(t-1)/2]:.5*(n[t/2-1]+n[t/2])}e(Tn,`median`);function En(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}e(En,`barycenter`);function Dn(e,t,n,r){let i=new Map;for(let t of e)i.set(t,[]);for(let e of n)r===`down`?t.has(e.src)&&i.has(e.dst)&&i.get(e.dst).push(t.get(e.src)):t.has(e.dst)&&i.has(e.src)&&i.get(e.src).push(t.get(e.dst));return i}e(Dn,`neighborPositionsFor`);function On(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}e(On,`currentOrderTieBreak`);function kn(e,t,n){let r=new Set(e),i=new Set(t),a=Kt(e),o=Kt(t),s=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&s.push({u:a.get(e.src),v:o.get(e.dst)});return s.sort((e,t)=>e.u===t.u?e.v-t.v:e.u-t.u),qt(s.map(e=>e.v))}e(kn,`countCrossingsBetweenAdjacent`);function An(e,t,n){return[...e].sort((e,r)=>{let i=Tn(t.get(e)??[]),a=Tn(t.get(r)??[]);return i===a?On(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}e(An,`sortByHeuristic`);function jn(e,t,n,r,i,a){let o=Kt(e),s=Kt(t),c=Dn(t,o,n,r);if(!i||!a||a.length===0)return An(t,c,s);let l=new Map;for(let e of t){let t=i(e),n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[];for(let e of a){let t=l.get(e);if(!t||t.length===0)continue;let n=An(t,c,s);u.push(...n)}let d=l.get(null);if(d&&d.length>0){let e=An(d,c,s);for(let t of e){let e=En(c.get(t)??[]),n=u.length;if(isFinite(e)){for(let[t,r]of u.entries())if(es.has(e.src)&&c.has(e.dst)),d=l?r.filter(e=>c.has(e.src)&&l.has(e.dst)):void 0,f=e(e=>{let n=kn(t,e,u);return d&&i&&(n+=kn(e,i,d)),n},`crossingScore`),p=a?new Map:null;if(a&&p)for(let e of n)p.set(e,a(e));let m=!0,h=f(o);for(;m;){m=!1;for(let e=0;e+1[...e]),i=t.edges,a=Xt(t),o=Qt(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e=0;e--)r[e]=jn(r[e+1],r[e],i,`up`,a,o),r[e]=Mn(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}e(Nn,`orderLayers`);function Pn(t,n,r){let i=r?.layerGap??tn.DEFAULT_LAYER_GAP,a=r?.nodeGap??tn.DEFAULT_NODE_GAP,o=r?.laneGap??a*2,s=r?.direction??`TB`,c=s===`LR`||s===`RL`,l=t.layers,u=Object.create(null),d=Object.create(null),f=e(e=>n.nodeById.get(e),`getNode`),p=e(e=>f(e)?.width??0,`getWidth`),m=e(e=>f(e)?.height??0,`getHeight`),h=Xt(n),g=Qt(n,r?.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(c)for(let e=0;e+1Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),r=_[e],a=_[e+1],o=r/2+a/2,s=(t+n)/2,c=Math.max(0,s-o-i);v.push(c)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(r);e===null?n.push(r):(t[e]||=[]).push(r)}for(let[e,n]of Object.entries(t)){let t=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+o*Math.max(0,S.length-1))/2;for(let n=0;np(e)),r=i-(e.reduce((e,t)=>e+t,0)+a*(t.length-1))/2;for(let[i,o]of t.entries()){let t=e[i];u[o]=r+t/2,d[o]=T+n/2,r+=t+a}}}let o=v[e]??0;T+=n+i+o}let E=new Map;for(let e of n.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let t=e[0].ref,r=t.start,i=t.end;if(r==null||i==null)continue;let a=Math.round(((u[r]??0)+(u[i]??0))/2),o=new Set;for(let t of e)o.add(t.src),o.add(t.dst);for(let e of o)e===r||e===i||n.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}e(Pn,`assignCoordinates`);var Fn=8;function In(e){let t=2166136261;for(let n=0;n>>0}e(In,`hashString`);function Ln(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}e(Ln,`mulberry32`);function Rn(e,t){let n=[...e],r=Ln(t);for(let e=n.length-1;e>0;e--){let t=Math.floor(r()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n}e(Rn,`deterministicShuffle`);function zn(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}e(zn,`sourceDistance`);function Bn(e,t){let n=new Map;for(let[t,r]of e.entries())n.set(r,t);let r=0;for(let{a:e,b:i,weight:a}of t){let t=n.get(e),o=n.get(i);t==null||o==null||(r+=a*Math.abs(t-o))}return r}e(Bn,`laneArrangementCost`);function Vn(e){let t=Zt(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=Xt(e),i=new Map;for(let t of e.layout.edges??[]){if(t.isLayoutOnly)continue;let a=typeof t.start==`string`?t.start:void 0,o=typeof t.end==`string`?t.end:void 0;if(!a||!o||!e.nodeById.has(a)||!e.nodeById.has(o))continue;let s=r(a),c=r(o);if(!s||!c||s===c)continue;let l=n.get(s),u=n.get(c);if(l==null||u==null)continue;let[d,f]=l<=u?[s,c]:[c,s],p=`${d}\0${f}`,m=i.get(p);m?m.weight++:i.set(p,{a:d,b:f,weight:1})}return[...i.values()]}e(Vn,`buildWeightedLaneEdges`);function Hn(e,t,n){let r=[...e],i=Bn(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&oe.a===t.a?e.b.localeCompare(t.b):e.a.localeCompare(t.a)).map(({a:e,b:t,weight:n})=>`${e}:${t}:${n}`).join(`|`);return In(`${e.join(`|`)}#${r}#${n}`)}e(Wn,`seedForRestart`);function Gn(e,t={}){let n=Zt(e);if(n.length<2)return n;let r=Vn(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=Hn(n,r,i),o=Math.max(0,t.restarts??Fn);for(let e=0;e$&&c*3>=s?o>0?`bottom`:`top`:s>$?a>0?`right`:`left`:n}e($n,`chooseOrthogonalSide`);function er(e,t){return Math.abs(e.to-t.from)<$||Math.abs(e.to-t.to)<$?e.to:e.from}e(er,`sharedLineEndpointCoord`);function tr(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}e(tr,`pointOnLine`);function nr(t,n){let r=t.nodes??[],i=t.edges??[],a=[];for(let e of i)e.isLayoutOnly||a.push({...e,__originalEdge:e});let o=new Map,s=new Map,c=[],l=n===`LR`;for(let e of r)o.set(e.id,e);let u=r.filter(e=>e.isGroup&&!e.parentId);for(let t of u){let n={id:t.id},i=e(e=>{s.set(e.id,n),r.filter(t=>t.parentId===e.id).forEach(i)},`assignLane`);i(t)}let d=r.filter(e=>!e.isGroup&&!e.isEdgeLabel).map(e=>{let t=e.width??10,n=e.height??10,r=e.x??0,i=e.y??0,a=qn;return{nodeId:e.id,minX:r-t/2-a,maxX:r+t/2+a,minY:i-n/2-a,maxY:i+n/2+a,visualXHalfExtent:l?n/2+a:t/2+a}}),f=e((e,t,n,r)=>{let i=c.find(n=>n.orientation===e&&Math.abs(n.coord-t)<1);return i||(i={id:`pipe-${e}-${t.toFixed(0)}`,orientation:e,coord:t,spanMin:n,spanMax:r,tracks:[]},c.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=e((e,t)=>{let n=e.width??10,r=e.height??10,i=e.x??0,a=e.y??0;switch(t){case`top`:return{x:i,y:a-r/2};case`bottom`:return{x:i,y:a+r/2};case`left`:return{x:i-n/2,y:a};case`right`:return{x:i+n/2,y:a}}},`portForSide`),m=e((e,t,n)=>p(e,$n(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=e((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)<$,i=Math.abs(t.x-n.x)<$;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-$,o=Math.max(t.x,n.x)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`vertical`||t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v)}else if(i){let r=t.x,i=Math.min(t.y,n.y)-$,o=Math.max(t.y,n.y)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`horizontal`||t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v)}return a},`crossingPenalty`),b=a.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=o.get(e.start),r=o.get(e.end),i=s.get(e.start),a=s.get(e.end);return{idx:t,crossLane:i&&a&&i.id!==a.id?1:0,dx:n&&r?Math.abs((r.x??0)-(n.x??0)):0,dy:n&&r?Math.abs((r.y??0)-(n.y??0)):0}}).sort((e,t)=>{if(e.crossLane!==t.crossLane)return t.crossLane-e.crossLane;let n=e.dx+e.dy,r=t.dx+t.dy;return Math.abs(n-r)>1?n-r:e.idx-t.idx}).map(e=>e.idx),x=e((e,t,n,r)=>{let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return!!d.find(c=>n&&c.nodeId===n||r&&c.nodeId===r?!1:Math.abs(e.x-t.x)>$?c.minYe.y&&c.maxX>i&&c.minXe.x&&c.maxY>o&&c.minY$n(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of a.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),a=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(a),dxSign:Math.sign(i),dySign:Math.sign(a)})}let E=e(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.absDx===0?1/0:e.absDy/e.absDx:e.absDy===0?1/0:e.absDx/e.absDy,`preferenceStrength`),D=e(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=e((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=e(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),ee=new Map;for(let e of T.values())ee.has(e.dstId)||ee.set(e.dstId,new Set),ee.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(o.get(e.srcId)))continue;let t=ee.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:a}=e,s=o.get(n),c=o.get(r),l=`${n}:${i}:src`,u=i===`top`||i===`bottom`?c.x??0:c.y??0;S.has(l)||S.set(l,[]),S.get(l).push({edgeIdx:t,oppositeCoord:u});let d=`${r}:${a}:dst`,f=a===`top`||a===`bottom`?s.x??0:s.y??0;S.has(d)||S.set(d,[]),S.get(d).push({edgeIdx:t,oppositeCoord:f})}let te=new Map;for(let[e,t]of S){if(t.length<2)continue;t.sort((e,t)=>e.oppositeCoord-t.oppositeCoord);let n=e.split(`:`),r=n.slice(0,-2).join(`:`),i=n[n.length-2],a=n[n.length-1],s=o.get(r);if(!s)continue;let c=i===`left`||i===`right`?s.height??10:s.width??10,l=s.shape,u=l===`question`||l===`diamond`?c*.3:c,d=Math.min(20,Math.max(8,u/(t.length+1))),f=-(d*(t.length-1))/2;for(let[e,n]of t.entries()){let t=f+e*d,r=`${n.edgeIdx}:${a}`;te.set(r,t)}}let M=e(e=>!!a[e]?.labelNodeId,`edgeHasLabelNode`),ne=e((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>M(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>M(e)):!1,`faceHasLabelNode`),N=e((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),P=e((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??w(t,i),s=r?.dstSide??w(n,a),c=r?p(t,r.srcSide):m(t,i,!0),l=r?p(n,r.dstSide):m(n,a,!1),u=te.get(`${e}:src`),d=te.get(`${e}:dst`);return u!==void 0&&(c=N(c,o,u)),d!==void 0&&(l=N(l,s,d)),{pSrcPort:c,pDstPort:l,srcSide:o,dstSide:s}},`portsForEdge`);for(let t of b){let n=a[t];if(g[t]=[],!n.start||!n.end||n.points&&n.points.length>0||n.start===n.end)continue;let r=o.get(n.start),i=o.get(n.end);if(!r||!i)continue;let{pSrcPort:s,pDstPort:u,srcSide:p,dstSide:m}=P(t,r,i),v={...s},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=s.y>(r.y??0)?s.y+Zn:s.y-Zn:v.x=s.x>(r.x??0)?s.x+Zn:s.x-Zn,T?b.y=u.y>(i.y??0)?u.y+Zn:u.y-Zn:b.x=u.x>(i.x??0)?u.x+Zn:u.x-Zn;let E=e((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.xn.minY&&e.y{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+Jn:r.minX-Jn,y:i?r.maxY+Yn:r.minY-Yn,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+Jn:r.minX-Jn,y:o?r.maxY+Yn:r.minY-Yn,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[n.start,n.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(s,r,i,e,!0);v.x=t.x,v.y=t.y;let n=t.leavesPositiveSide?Math.min(e.minY-2,s.y+Zn):Math.max(e.maxY+2,s.y-Zn);O=[{x:s.x,y:n},{x:t.x,y:n},{x:t.x,y:t.y}]}else{let t=D(s,r,i,e,!1),n=t.leavesPositiveSide?Math.min(e.minX-2,s.x+Zn):Math.max(e.maxX+2,s.x-Zn);v.x=t.x,v.y=t.y,O=[{x:n,y:s.y},{x:n,y:t.y},{x:t.x,y:t.y}]}}let j=[],ee=E(b,k);if(ee.inside&&ee.obstacle){let e=ee.obstacle;if(T){let t=D(u,i,r,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,i,r,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){let e=Jn,r=Math.abs(v.x-b.x)1||c>1,d=C.get(n.start??``)??0,f=C.get(n.end??``)??0,g=o>1&&ne(n.start,p)||c>1&&ne(n.end,m);if((r||i)&&!a&&(!l||l&&!g&&(o<=1||d<=2)&&(c<=1||f<=2))&&!x(s,u,n.start,n.end)){n.points=[{...s},{...v},{...b},{...u}],_.add(t);let e=i?`horizontal`:`vertical`,r=i?s.y:s.x,a=i?Math.min(s.x,u.x):Math.min(s.y,u.y),o=i?Math.max(s.x,u.x):Math.max(s.y,u.y),c={id:`fast-path-${e}-${r.toFixed(0)}-${t}`,orientation:e,coord:r,spanMin:a,spanMax:o,tracks:[]};h.push({edgeIndex:t,segmentIndex:0,orientation:e,pipe:c,trackIndex:0,from:a,to:o});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let M=Math.min(v.x,b.x)-50,N=Math.max(v.x,b.x)+50,F=Math.min(v.y,b.y)-50,I=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minXt&&e.minYr&&(M=Math.min(M,e.minX-Xn),N=Math.max(N,e.maxX+Xn),F=Math.min(F,e.minY-Xn),I=Math.max(I,e.maxY+Xn))}for(let e of d){if(e.maxXN||e.maxYI)continue;let t=Jn;f(`horizontal`,e.minY-t,M,N),f(`horizontal`,e.maxY+t,M,N);let n=Yn;f(`vertical`,e.minX-n,F,I),f(`vertical`,e.maxX+n,F,I)}f(`horizontal`,v.y,M,N),f(`horizontal`,b.y,M,N);let L=c.filter(e=>e.orientation===`horizontal`&&e.coord>=F&&e.coord<=I),R=c.filter(e=>e.orientation===`vertical`&&e.coord>=M&&e.coord<=N),z=e((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),B=z(v.x,v.y),re=z(b.x,b.y),V=new Map,H=new Map,ie=new Map,ae=new Set,U=[];V.set(B,0),ie.set(B,`n`),U.push({key:B,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),ae.add(B);let W=[],G=e((e,t)=>x(e,t,n.start,n.end),`checkSegmentBlocked`),oe={x:b.x,y:v.y},se=G(v,oe),K=G(oe,b),ce=se||K,le={x:v.x,y:b.y},ue=G(v,le),de=G(le,b);if(ce?ue||de||(W=Math.abs(v.x-b.x)<$?[v,b]:[v,le,b]):W=Math.abs(v.y-b.y)<$||Math.abs(v.x-b.x)<$?[v,b]:[v,oe,b],W.length===0)for(;U.length>0;){U.sort((e,t)=>e.f-t.f);let e=U.shift();if(ae.delete(e.key),e.key===re){let e=re,t=b;for(W=[t];H.has(e);){let n=H.get(e);W.unshift(n),t=n,e=z(n.x,n.y)}break}let r=e.pt.x,i=e.pt.y,a=R.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=L.sort((e,t)=>e.coord-t.coord),c=s.findIndex(e=>Math.abs(e.coord-i)<1),l=[];o>0&&l.push({x:a[o-1].coord,y:i}),o>=0&&o0&&l.push({x:r,y:s[c-1].coord}),c>=0&&ce.nodeId===n.start||e.nodeId===n.end?!1:o===s?e.minXr&&e.maxY>c&&e.minYi&&e.maxX>o&&e.minX10&&x<-5||g<-10&&x>5)&&(m=Math.abs(x)*100),(h>10&&_<-5||h<-10&&_>5)&&(m+=Math.abs(_)*50);let S=0,C=ie.get(e.key)??`n`,w=Math.abs(_)>$?`h`:`v`;C!==`n`&&C!==w&&(S=50);let T=f+p+m+S,E=(V.get(e.key)??1/0)+T,D=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(E<(V.get(u)??1/0))if(H.set(u,e.pt),V.set(u,E),ie.set(u,w),!ae.has(u))U.push({key:u,f:E+D,pt:a}),ae.add(u);else{let e=U.findIndex(e=>e.key===u);e!==-1&&(U[e].f=E+D)}}}if(W.length===0&&(W=[v,{x:v.x,y:b.y},b]),W.length>4){let t=W[0],n=W[W.length-1],r=Math.min(t.x,n.x),i=Math.max(t.x,n.x),a=Math.min(t.y,n.y),o=Math.max(t.y,n.y);for(let e of W)r=Math.min(r,e.x),i=Math.max(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.y);let s=i>Math.max(t.x,n.x),c=re.minXr&&e.minYa);if(s.length>0){let r=Math.max(t.x,n.x);for(let t of s){let n=(t.minX+t.maxX)/2;if(t.visualXHalfExtent===void 0||isNaN(t.visualXHalfExtent))continue;let i=n+t.visualXHalfExtent+e;r=Math.max(r,i)}isNaN(r)||(i=r)}}if(c){let i=d.filter(r=>r.minXMath.min(t.y,n.y));if(i.length>0){let a=Math.min(t.x,n.x);for(let t of i){let n=(t.minX+t.maxX)/2-t.visualXHalfExtent-e;a=Math.min(a,n)}r=a}}}let u=e(e=>{let r=n.y>t.y,i=d.filter(e=>{let r=Math.min(t.x,n.x)e.minX,i=Math.min(t.y,n.y)e.minY;return r&&i}),a=i;if(l&&i.length>0){let t=i.filter(t=>t.minXe);t.length>0&&(a=t)}if(a.length===0)return n.y;let o=Jn;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(ee.minY))-o;if(e>n.y+$)return e}return n.y},`findBestReturnY`),f=e(e=>{let r=u(e),i={x:e,y:t.y},a={x:e,y:r},o={x:n.x,y:r},s=G(t,i),c=G(i,a),l=G(a,o),d=r===n.y?!1:G(o,n);return!s&&!c&&!l&&!d?Math.abs(r-n.y)<$?[t,i,a,n]:[t,i,a,o,n]:null},`trySimplifyWithDetourX`),p=s&&!c?f(i):c&&!s?f(r):null;p&&(W=p)}let q=[s,...O,...W,...j.reverse(),u];if(q.length>=3){let e=q[q.length-1],t=q[q.length-2],n=q[q.length-3],r=Math.abs(n.y-t.y)<$&&Math.abs(t.y-e.y)<$,i=Math.abs(n.x-t.x)<$&&Math.abs(t.x-e.x)<$;if(r){let r=Math.sign(t.x-n.x),i=Math.sign(e.x-n.x);r!==0&&r===i&&Math.abs(t.x-n.x)>Math.abs(e.x-n.x)&&q.splice(-2,1)}else if(i){let r=Math.sign(t.y-n.y),i=Math.sign(e.y-n.y);r!==0&&r===i&&Math.abs(t.y-n.y)>Math.abs(e.y-n.y)&&q.splice(-2,1)}}let fe=[q[0]];for(let e=1;et.x!=r.x>n.x){fe.push(n);continue}continue}if(Math.abs(t.x-n.x)<$&&Math.abs(n.x-r.x)<$){if(n.y>t.y!=r.y>n.y){fe.push(n);continue}continue}fe.push(n)}fe.push(q[q.length-1]);for(let e=0;ee.from{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&F(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&F(n,t));return i&&a?(e.trackIndex=r.index,t.trackIndex=n.index,n.segments=[...n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],r.segments=[...r.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],!0):!1},`trySwapSegmentsAcrossTracks`),L=e(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),R=e((e,t)=>{let n=e.pipe.tracks[e.trackIndex];n.segments=n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),e.trackIndex=t,e.pipe.tracks[t].segments.push({edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to})},`moveSegmentToTrack`),z=e((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&R(n,t)}},`moveSegmentChainToTrack`),B=e(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n{if(e.orientation===t.orientation)return!1;let n=e.orientation===`horizontal`?e:t,r=e.orientation===`horizontal`?t:e;return r.pipe.coord>n.from&&r.pipe.coordr.from&&n.pipe.coord{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&F(e,t)))return n.index;return-1},`findAvailableTrack`),H=e((e,t)=>{if(e.trackIndex===t.trackIndex)return F(e,t);let n=B(e),r=B(t);return n.some(e=>r.some(t=>re(e,t)))},`segmentsConflict`),ie=e((e,t,n)=>{if(I(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=V(e.pipe,t);n(t,r===-1?L(e.pipe):r)},`resolveTrackConflict`),ae=e(e=>{let t=0;for(let n=0;n{if(U.has(e))return U.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return U.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;eMath.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return U.set(e,a),a},`getDestInfo`),G=e(()=>{let t=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.start&&(n.has(t.start)||n.set(t.start,[]),n.get(t.start).push(e));let r=e(e=>{let t=a[e];if(!t.start||!t.end)return 0;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)return 0;let i=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(i)+Math.abs(s)},`getEdgeDistance`);for(let e of n.values()){e.sort((e,t)=>{let n=W(e),i=W(t);if(Math.abs(n.deviation-i.deviation)>1)return n.deviation-i.deviation;if(Math.abs(n.dest-i.dest)>1)return n.dest-i.dest;let a=r(e),o=r(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,c=g[t].length;if(s!==c)return s-c;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[r],i=Math.abs(e.to-e.from),a=Math.abs(t.to-t.from);if(Math.abs(i-a)>1)return i-a}}return 0});let n=e.map(e=>h[g[e][0]]);t+=ae(n)}return t},`fixSourceHandleCrossings`),oe=e(()=>{let t=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.end&&(n.has(t.end)||n.set(t.end,[]),n.get(t.end).push(e));for(let r of n.values()){r.sort((t,n)=>{let r=e(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),i=r(t),a=r(n);return Math.abs(i-a)>.1?i-a:t-n});let n=r.map(e=>h[g[e][g[e].length-1]]);t+=ae(n)}return t},`fixTargetHandleCrossings`),se=e(()=>{let e=0;for(let t of c){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t{e.segments.forEach(t=>{n.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,trackIndex:e.index,from:t.from,to:t.to})})}),n.sort((e,t)=>e.from-t.from);let r=[];if(n.length>0){let e=[n[0]],t=n[0].to;for(let i=1;ir.add(e.trackIndex));let i=new Map;n.forEach(e=>{let t=W(e.edgeIndex);i.set(e.trackIndex,(i.get(e.trackIndex)??0)+t.delta)});let a=[...r].filter(e=>(i.get(e)??0)<-1),o=[...r].filter(e=>(i.get(e)??0)>1),s=[...r].filter(e=>Math.abs(i.get(e)??0)<=1);a.sort((e,t)=>(i.get(t)??0)-(i.get(e)??0)),o.sort((e,t)=>(i.get(e)??0)-(i.get(t)??0));let c=e((e,r)=>{n.filter(t=>t.trackIndex===e).forEach(e=>{let n=_.has(e.edgeIndex)?t.coord:r;ce.set(`${e.edgeIndex}-${e.segmentIndex}`,n)})},`assignCoord`),l=0;for(let e of a)l++,c(e,t.coord-l*Qn);if(s.length===0&&r.size>0){let e=[...r].sort((e,t)=>Math.abs(i.get(e)??0)-Math.abs(i.get(t)??0))[0],t=a.indexOf(e);t!==-1&&a.splice(t,1);let n=o.indexOf(e);n!==-1&&o.splice(n,1),s.push(e)}let u=0;for(let e of s){if(u===0)c(e,t.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);c(e,t.coord+n*r*Qn*.5)}u++}let d=0;for(let e of o)d++,c(e,t.coord+d*Qn)}}for(let[e,t]of a.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:a}=P(e,o.get(t.start),o.get(t.end)),s=n.map(e=>{let t=h[e],n=ce.get(`${t.edgeIndex}-${t.segmentIndex}`)??t.pipe.coord;return{orient:t.orientation,coord:n,from:t.from,to:t.to}});r.push(i);for(let e=0;e$&&r.push(tr(t,i)),c&&o.orient===t.orient)if(Math.abs(t.coord-o.coord)>$){let e=t.orient===`vertical`?(i+o.from)/2:er(t,o);r.push(tr(t,e),tr(o,e))}else (e===0||e===s.length-2)&&r.push(tr(t,er(t,o)));else if(c)r.push(tr(t,o.coord));else{let e=Math.abs(t.from-i)$||Math.abs(c.y-a.y)>$)&&r.push(a);let l=[];r.length>0&&l.push(r[0]);for(let e=1;e$||Math.abs(t.y-n.y)>$)&&l.push(t)}t.points=l}for(let e of a){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}t.edges=(t.edges??[]).filter(e=>!e.isLayoutOnly);let le=e((e,t)=>{let n=t.x??0,r=t.y??0,i=t.width??0,a=t.height??0;if(i<=0||a<=0)return e;let o=n-i/2,s=n+i/2,c=r-a/2,l=r+a/2;if(e.xs||e.yl)return e;let u=e.x-o,d=s-e.x,f=e.y-c,p=l-e.y,m=Math.min(u,d,f,p);return m===u?{x:o,y:e.y}:m===d?{x:s,y:e.y}:m===f?{x:e.x,y:c}:{x:e.x,y:l}},`nodeBoundaryClamp`);for(let e of t.edges){let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,i=n?o.get(n):void 0,a=r?o.get(r):void 0;i&&(t[0]=le(t[0],i)),a&&(t[t.length-1]=le(t[t.length-1],a))}return t}e(nr,`routeEdgesOrthogonal`);function rr(e){return e.direction??`TB`}e(rr,`getSwimlaneDirection`);function ir(e){let t=A(e),n=e.config.flowchart?.nodeSpacing??40,r=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,s=rr(e),{ordered:c,coordinates:l}=Kn(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});j(t,c,l,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;nr(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return It(e,s),Ft(e),s}e(ir,`runSwimlaneLayoutCore`);function ar(e){k(e);let t=te(e);e.nodes=t.nodes,e.edges=t.edges}e(ar,`prepareSwimlaneLayout`);var or=r({prepareLayout:ar,runLayoutCore:ir,afterPaint:C});export{or as render}; \ No newline at end of file +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import{o as n}from"./chunk-OSK3NFVY-ZXiPE9OQ.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import{i as r}from"./chunk-2E4U76K2-DSYv76d-.js";var i=5,a=1e-5,o=1e-6;function s(e){let t=[];for(let n=0;n=1-o||p<=o||p>=1-o?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}e(c,`segmentIntersection`);function l(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}e(l,`isHorizontalSeg`);function u(e){let t=[];for(let n=0;n=Math.abs(n)?+(t>=0):+(n>=0)}e(p,`getArcSweepFlag`);var m=.001;function h(e,t){if(e.length<2)return e.map(e=>({...e}));let r=e.map(e=>({...e})),i=t.arrowTypeStart&&n[t.arrowTypeStart];if(i){let t=e[0],n=e[1],a=Math.atan2(n.y-t.y,n.x-t.x);r[0].x=t.x+i*Math.cos(a),r[0].y=t.y+i*Math.sin(a)}let a=t.arrowTypeEnd&&n[t.arrowTypeEnd];if(a){let t=e.length,n=e[t-2],i=e[t-1],o=Math.atan2(i.y-n.y,i.x-n.x);r[t-1].x=i.x-a*Math.cos(o),r[t-1].y=i.y-a*Math.sin(o)}return r}e(h,`applyMarkerOffsets`);function g(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${f(s)}`];return i===`arc`?l.push(`A${d(e.r)},${d(e.r)} 0 0 ${r} ${f(c)}`):l.push(`M${f(c)}`),l}e(g,`emitJump`);function _(e,t,n,r){let i=t.x-e.x,o=t.y-e.y,s=n.x-t.x,c=n.y-t.y,l=Math.hypot(i,o),u=Math.hypot(s,c);if(l0){let t=_(a[e-1],a[e],a[e+1]??a[e],i);t&&(y=t.cutLen)}let b=r,x=null;o&&ee.t-t.t);for(let e of S)e.r=Math.min(e.r,e.d-y,b-e.d);for(let e=0;et){let n=t/2;S[e].r=Math.min(S[e].r,n),S[e+1].r=Math.min(S[e+1].r,n)}}for(let e of S)e.r=2?r:null}catch{return null}}e(x,`decodeDataPoints`);function S(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=[],o=new Map;for(let e of t){let t=typeof CSS<`u`&&CSS.escape?CSS.escape(e.id):e.id,n=r.querySelector(`path[data-id="${t}"]`);if(!n)continue;o.set(e.id,n);let i=x(n.getAttribute(`data-points`))??e.points;a.push({...e,points:i})}let s=u(a);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of a){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!b(r))continue;let a=o.get(e.id);if(!a||r===void 0&&!y(a.getAttribute(`d`)??``))continue;let s=a.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=v(e,t,n);if(a.setAttribute(`d`,f),u!==null&&d!==null&&typeof a.getTotalLength==`function`){let e=a.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);a.setAttribute(`style`,n)}}}e(S,`applyLineJumpsToSvg`);function C(e,{measure:t}){let n=e.config?.swimlane?.lineHops;if(n===!1)return;let r=n===`gap`?`gap`:`arc`,i=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));S(t.groups.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:r})}e(C,`applySwimlaneLineJumps`);var w=`__swimlane_default__`,T=21,E=20;function D(e){return Math.max(e.padding??E,E)}e(D,`topLaneHorizontalPadding`);function O(e){let{x:t,y:n,width:r,height:i}=e,a=e.swimlaneContentTop;if(typeof t!=`number`||typeof n!=`number`||typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||r<=0||i<=0){delete e.groupTitleRect;return}let o=n-i/2,s=Math.min(a,n+i/2),c=o+Math.min(T,Math.max(0,s-o));if(c<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:o,bottom:c}}e(O,`assignTopLaneTitleRect`);function k(e){let t=e.direction,n=e.nodes??=[];for(let n of e.nodes??[])n.isGroup&&!n.parentId&&(n.shape=`swimlane`,t&&(n.direction=t));let r=n.filter(e=>!e.isGroup&&!e.parentId);if(r.length===0)return;let i=n.find(e=>e.id===w);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:w,label:``,isGroup:!0,shape:`swimlane`,padding:20,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=w}e(k,`prepareLayoutForSwimlanes`);function A(e){let t=new Map;for(let n of e.nodes??[])t.set(n.id,n);let n=[];for(let t of e.edges??[]){let e=typeof t.start==`string`?t.start:void 0,r=typeof t.end==`string`?t.end:void 0;!e||!r||t.labelNodeId||n.push({id:t.id,src:e,dst:r,ref:t})}let r=e.nodes??[],i=r.filter(e=>e.isGroup),a=r.filter(e=>!e.isGroup);return{nodes:[...[...i].reverse(),...a].map(e=>e.id),edges:n,layout:e,nodeById:t}}e(A,`toGraphView`);function j(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,c=0;for(let e of t.layers){let t=0;for(let r of e){let e=a.get(r);if(!e){t++;continue}e.layer=c,e.order=t;let i=n.x[r]??t*s,l=n.y[r]??c*o;e.x=i,e.y=l,t++}c++}let l=i.nodes??[],u=new Map,d=[];for(let e of l){if(!e?.isGroup)continue;e.parentId||d.push(e);let t=l.filter(t=>t.parentId===e.id),r=1/0,i=-1/0,a=1/0,o=-1/0;for(let e of t){let t=e.x??n.x[e.id],s=e.y??n.y[e.id],c=e.width??0,l=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-c/2),i=Math.max(i,t+c/2),a=Math.min(a,s-l/2),o=Math.max(o,s+l/2))}if(r===1/0||a===1/0)e.x=e.x??0,e.y=e.y??0,e.width=e.width??0,e.height=e.height??0;else{let t=e.padding??20,n=e.parentId?t:2*D(e),s=t,c=Math.max(0,i-r)+n,l=Math.max(0,o-a)+s,d=(r+i)/2,f=(a+o)/2;e.x=d,e.y=f,e.width=c,e.height=l,u.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(d.length>0&&u.size>0){let e=1/0,t=-1/0,n=0;for(let r of d){let i=r.padding??20;i>n&&(n=i);let a=u.get(r.id);a&&(e=Math.min(e,a.minY),t=Math.max(t,a.maxY))}if(e!==1/0&&t!==-1/0){let r=Math.max(0,t-e)+2*Math.max(n,36),i=(e+t)/2;for(let t of d)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...d].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],c=[];for(let e of a){let t=u.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*D(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),c.push(n)}let l=o.length;if(l>0){let e=new Map;if(l===1)e.set(o[0],c[0]);else{let t=[];for(let e=0;e0&&i>0?{cx:t,cy:n,rect:se(t,n,r,i)}:void 0}e(ne,`measuredNodeRect`);function N(e){if(e.isGroup)return;let t=ne(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}e(N,`nodeBoundsInfoFor`);function P(e,t,n=M){return Math.abs(e.x-t.x)n}e(L,`isHorizontalSegment`);function R(e,t,n=M){return F(e,t,n)&&Math.abs(e.y-t.y)>n}e(R,`isVerticalSegment`);function z(e,t,n,r){return Math.max(0,Math.min(Math.max(e,t),Math.max(n,r))-Math.max(Math.min(e,t),Math.min(n,r)))}e(z,`overlapLength`);function B(e,t,n=M){return e.horizontal&&t.horizontal&&I(e.a,t.a,n)?z(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&F(e.a,t.a,n)?z(e.a.y,e.b.y,t.a.y,t.b.y):0}e(B,`sameAxisSegmentOverlapLength`);function re(e,t=M){let n=[];for(let r=0;r0?n[n.length-1]:void 0;(!e||!P(e,r,t))&&n.push({x:r.x,y:r.y})}return n}e(H,`dedupeConsecutivePoints`);function ie(e,t=M){if(!e||e.length!==4)return;let[n,r,i,a]=e;return L(n,r,t)&&R(r,i,t)&&L(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:R(n,r,t)&&L(r,i,t)&&R(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}e(ie,`classifyThreeSegmentRoute`);function ae(e,t,n,r=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return a>n.left-r&&in.top-r&&ot.left+n&&e.xt.top+n&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}e(W,`rectContainsRect`);function G(e,t){return e.leftt.left&&e.topt.top}e(G,`rectsOverlap`);function oe(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}e(oe,`inflateRect`);function se(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}e(se,`rectFromCenterSize`);function K(e){return ne(e)?.rect}e(K,`rectOfNodeBounds`);function ce(e,t){switch(t){case`top`:return{x:e.cx,y:e.rect.top};case`bottom`:return{x:e.cx,y:e.rect.bottom};case`left`:return{x:e.rect.left,y:e.cy};case`right`:return{x:e.rect.right,y:e.cy}}}e(ce,`portForRectSide`);function le(e,t,n,r,i,a=M){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.xn.x){if(I(e,n,a))return[e,n];let t=(e.x+n.x)/2;return[e,{x:t,y:e.y},{x:t,y:n.y},n]}if(t===r){if(I(e,n,a))return;let r=t===`left`?Math.min(e.x,n.x)-i:Math.max(e.x,n.x)+i;return[e,{x:r,y:e.y},{x:r,y:n.y},n]}return}if(!o&&!s){if(t===r){if(F(e,n,a))return;let r=t===`top`?Math.min(e.y,n.y)-i:Math.max(e.y,n.y)+i;return[e,{x:e.x,y:r},{x:n.x,y:r},n]}if(!(t===`bottom`&&r===`top`&&e.yn.y))return;if(F(e,n,a))return[e,n];let o=(e.y+n.y)/2;return[e,{x:e.x,y:o},{x:n.x,y:o},n]}if(o&&!s){let i=t===`right`&&n.x>e.x||t===`left`&&n.xn.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let c=t===`bottom`&&n.y>e.y||t===`top`&&n.yn.x;return c&&l?[e,{x:e.x,y:n.y},n]:void 0}e(le,`buildOrthogonalPortPath`);function ue(e,t,n,r){return t===`left`||t===`right`?[e,{x:r,y:e.y},{x:r,y:n.y},n]:[e,{x:e.x,y:r},{x:n.x,y:r},n]}e(ue,`buildSameSideTrackPath`);function de(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=N(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}e(de,`collectRealNodeBounds`);function q(e){let t=[],n=[];for(let r of e){let e=N(r);if(!e)continue;let i={id:e.id,rect:e.rect};r.isEdgeLabel?n.push(i):t.push(i)}return{realNodeRects:t,labelNodeRects:n}}e(q,`collectNodeRectEntries`);function fe(e,{includeEdgeLabels:t=!0}={}){let n=[];for(let r of e){if(r.isGroup||!t&&r.isEdgeLabel)continue;let e=r.x??0,i=r.y??0,a=r.width??0,o=r.height??0;n.push({nodeId:r.id,...se(e,i,a,o)})}return n}e(fe,`collectLayoutNodeRects`);function pe(e,t,n=M){let r=e.start,i=e.end;if(!r||!i)return;let a=t.get(r),o=t.get(i);if(!(!a||!o))return{srcId:r,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)m||f_)return!1;let v=Math.abs(h-u.a.x)i:a&&s&&I(e,n,i)?z(e.x,t.x,n.x,r.x)>i:!1}e(he,`sameAxisSegmentsOverlap`);function ge(e,t,n,r,{epsilon:i=M,skipDegenerateOther:a=!1}={}){for(let o of n){if(o===r||o.isLayoutOnly)continue;let n=o.points;if(!(!n||n.length<2))for(let r=0;rf+i&&mh+i&&dr+M&&e=2?t[t.length-2]:void 0,n=e&&F(e,r)?{x:r.x,y:i.y}:{x:i.x,y:r.y};t.push(n)}t.push(i)}let n=[];for(let e of t){let t=n[n.length-1];(!t||!P(t,e))&&n.push(e)}return n}e(xe,`orthogonalizePolyline`);function Se(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=be(t);if(t=e.points,!e.changed)break}return t}e(Se,`simplifyPolyline`);var Y=.001,Ce=.5,we=4;function Te(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length=0&&i=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=Ee(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}e(De,`clipEndpoint`);function Oe(e,t){for(let n of e){let e=Te(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=De(r,e.srcRect,!0)),e.dstRect&&(r=De(r,e.dstRect,!1)),r=Se(xe(r)),r=ze(r,e.srcRect,e.dstRect),e.edge.points=Se(xe(r))}}e(Oe,`clipEdgeEndpointsToNodeBoundaries`);function ke(e,t,n,r=!1){if(I(e,t,Y)){if(t.yn.bottom+Y)return t;if(r){if(e.xn.right+Y)return{x:n.right,y:e.y}}return{x:Math.abs(t.x-n.left)<=Math.abs(t.x-n.right)?n.left:n.right,y:e.y}}if(F(e,t,Y)){if(t.xn.right+Y)return t;if(r){if(e.yn.bottom+Y)return{x:e.x,y:n.bottom}}let i=Math.abs(t.y-n.top)<=Math.abs(t.y-n.bottom);return{x:e.x,y:i?n.top:n.bottom}}return t}e(ke,`snapEndpointToBoundary`);function Ae(e,t,n){let r=e[t];for(let i=t+n;i>=0&&ie.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}e(Ne,`intersectRanges`);function Pe(e,t){return t===`left`||t===`right`?je(e.top,e.bottom):je(e.left,e.right)}e(Pe,`clearanceRangeForSide`);function Fe(e,t,n){let r=e.y>=n.top-Y&&e.y<=n.bottom+Y,i=e.x>=n.left-Y&&e.x<=n.right+Y;if(I(e,t,Y)&&r){if(Math.abs(e.x-n.left)0?Ne(a):void 0}e(Le,`straightClearanceRange`);function Re(e,t,n,r,i){let a=Le(e,t,n,r,i);if(!a)return;let o=i?e.y:e.x,s=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(s-o)({...e}));for(let s=t;s>=0&&s=n.left-Y&&Math.max(e.x,t.x)<=n.right+Y,i=Math.min(e.y,t.y)>=n.top-Y&&Math.max(e.y,t.y)<=n.bottom+Y;if(Math.abs(e.y-n.top)r.bottom+Y;case`left`:return I(t,n,Y)&&n.xr.right+Y}}e(We,`leavesOutward`);function Ge(e,t,n){if(e.length<3)return e;if(n){let n=Ue(e[0],e[1],t);return n&&We(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=Ue(e[r-1],e[r],t);return i&&We(i,e[r-1],e[r-2],t)?e.slice(0,r):e}e(Ge,`collapseOwnBorderStub`);function Ke(e,t,n){let r=e;if(t){let e=Ae(r,0,1);if(e){let n=ke(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=Ge(r,t,!0)}if(n){let e=r.length-1,t=Ae(r,e,-1);if(t){let i=ke(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=Ge(r,n,!1)}let i=ze(r,t,n);return i!==r||r.length===2?i:(t&&(r=He(r,t,!0)),n&&(r=He(r,n,!1)),r)}e(Ke,`snapAndCollapseEndpoints`);function qe(e,t){for(let n of e){let e=Te(n,t,2);if(!e)continue;let r=Ke(H(e.points,Y),e.srcRect,e.dstRect);if(r.length<3){e.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];e.edge.points=i}}e(qe,`prepareEdgeEndpointsForRenderer`);function Je(e){return new Map(e.map(e=>[e.id,e]))}e(Je,`buildNodeMap`);function Ye(e,t){let n=e.parentId,r=null;for(;n;){let e=t.get(n);if(!e?.isGroup)break;r=e.id,n=e.parentId}return r}e(Ye,`resolveTopLevelGroupId`);function Xe(e,t){let n=0,r=e.parentId;for(;r;){let e=t.get(r);if(!e?.isGroup)break;n++,r=e.parentId}return n}e(Xe,`groupDepth`);function Ze(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a of e){let e=a.x,o=a.y;if(typeof e!=`number`||typeof o!=`number`)continue;let s=a.width??0,c=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}e(Ze,`boundsForChildren`);function Qe(e,t){let n=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+n,e.height=Math.max(0,t.maxY-t.minY)+n}e(Qe,`applyGroupBounds`);function $e(e){let t=Je(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>Xe(n,t)-Xe(e,t));for(let t of n){let n=Ze(e.filter(e=>e.parentId===t.id));n&&Qe(t,n)}}e($e,`recomputeNestedGroupBounds`);function et(t,n){let r=t.nodes??[],i=t.edges??[],a=r.filter(e=>!e.isGroup),o=1/0,s=-1/0;for(let e of a){let t=e[n];typeof t==`number`&&(o=Math.min(o,t),s=Math.max(s,t))}if(!Number.isFinite(o)||!Number.isFinite(s))return!1;let c=e(e=>o+s-e,`mirror`);for(let e of r){let t=e[n];typeof t==`number`&&(e[n]=c(t));let r=e.groupTitleRect;r&&(e.groupTitleRect=n===`x`?{...r,left:c(r.right),right:c(r.left)}:{...r,top:c(r.bottom),bottom:c(r.top)})}for(let e of i)for(let t of e.points??[])t[n]=c(t[n]);return!0}e(et,`mirrorAxis`);function tt(e){return(e.nodes??[]).some(e=>!e.isGroup)?et(e,`y`):!0}e(tt,`applyBtDirectionTransform`);function nt(e,t=`LR`){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=1/0;for(let e of i){let t=e.x??0,n=e.y??0;t0?Math.max(1,l/u):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*d+36,r=t-a;e.x=n,e.y=r}for(let e of r)if(e.points)for(let t of e.points){let e=t.x,n=(t.y-o)*d+36,r=e-a;t.x=n,t.y=r}$e(n);let f=n.filter(e=>e.isGroup&&!e.parentId);if(f.length===0)return t===`RL`&&et(e,`x`),!0;let p=Je(n),m=new Map;for(let e of n){if(e.isGroup)continue;let t=Ye(e,p);if(!t)continue;let n=m.get(t)??[];n.push(e),m.set(t,n)}let h=0;for(let e of f){let t=e.padding??0;t>h&&(h=t)}let g=[],_=1/0,v=-1/0;for(let e of f){let t=Ze(m.get(e.id)??[]);t&&(_=Math.min(_,t.minX),v=Math.max(v,t.maxX),g.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(_===1/0||v===-1/0)return!0;let y=Math.max(0,v-_)+2*Math.max(h,10),b=36+y,x=(_+v)/2-y/2-36,S=x+b/2,C=Math.max(h,36);g.sort((e,t)=>e.centerY-t.centerY);for(let e=0;ed.cy?g.bottom:g.top,t=d.cx+n;if(t<=g.left+rt||t>=g.right-rt)continue;i={x:t,y:e},a={x:t,y:o.y},c={x:o.x,y:o.y}}else{let e=f.cx>d.cx?g.right:g.left,t=d.cy+n;if(t<=g.top+rt||t>=g.bottom-rt)continue;i={x:e,y:t},a={x:o.x,y:t},c={x:o.x,y:o.y}}let p=P(i,a,rt),m=P(a,c,rt);if(p&&m||!p&&J(i,a,r,[l],1)||!m&&J(a,c,r,[u],1))continue;let _=!p&&ge(i,a,e,t,{epsilon:rt,skipDegenerateOther:!0}),v=!m&&ge(a,c,e,t,{epsilon:rt,skipDegenerateOther:!0});if(!(_||v)){h=p?[a,c]:m?[i,a]:[i,a,c];break}}h&&(t.points=h)}}e(ot,`portSwapToLShape`);function st(t,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=q(n.values());for(let o of t){if(o.isLayoutOnly)continue;let s=o.points;if(!s||s.length<4)continue;let c=H(s,r);if(c.length<4)continue;let l=c.length-1,u=c[l],d=c[l-1],f=c[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h0;O={x:f.x,y:E},k={x:e?D.right:D.left,y:E}}if(J(O,k,i,S?[S]:[],-2)||J(O,k,a,[],-2))continue;if(C){let e=n.get(C),t=e?K(e):void 0;if(t&&U(O,t,2))continue}let A=e((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),j=new Set;for(let e=0;e{for(let i of t){if(i===o||i.isLayoutOnly)continue;let t=i.points;if(!(!t||t.length<2))for(let i=0;i=0){let e=c[l-3],t=[C,S].filter(e=>!!e);if(J(e,O,i,t,-2)||ee(e,O))continue}let te=[...c.slice(0,l-2),O,k];o.points=te;let M=o.labelNodeId;if(M){let e=n.get(M);if(e){let t=e.width??0,n=e.height??0;if(t>0&&n>0){let i,a,o=-1;for(let e=0;e=t+2||d&&l>=n+2)&&l>o&&(o=l,i=(s.x+c.x)/2,a=(s.y+c.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}e(st,`collapseShortTerminalStub`);var X=.001,Z=8,Q=re,ct=e((e,t)=>F(e,t,X)||I(e,t,X),`orthogonallyAligned`);function lt(t,n){let r=e((e,t)=>{let n=e.x??0,r=e.y??0,i=t.x-n,a=t.y-r,o=(e.width??0)/2,s=(e.height??0)/2;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),{x:n+(a===0?0:s*i/a),y:r+s}):(i<0&&(o=-o),{x:n+o,y:r+(i===0?0:o*a/i)})},`rectIntersect`),i=e((e,t)=>{let i=H(e.points??[]);if(i.length<2)return;let a=t?e.start:e.end,o=a?n.get(a):void 0,s=o?K(o):void 0;if(!o||!a||!s)return;let c=t?i[0]:i[i.length-1],l=t?i[1]:i[i.length-2],u=r(o,c),d=c;if(ct(l,u)&&(d=l),F(u,d,X))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`V`,coord:u.x,min:Math.min(u.y,d.y),max:Math.max(u.y,d.y),boundary:u,railEnd:d,rect:s};if(I(u,d,X))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`H`,coord:u.y,min:Math.min(u.x,d.x),max:Math.max(u.x,d.x),boundary:u,railEnd:d,rect:s}},`terminalLaneFor`),a=e((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),o=e((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:e.orientation===`H`?(Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1)&&F(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&I(e.boundary,t.boundary,1),`sameTerminalFace`),s=e((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:a(e,t)>=Z&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),c=e((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=a(e,t);if(n2*r?!1:o(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=e((t,n)=>{let r=H(t.edge.points??[]);if(r.length<2)return;let i=t.orientation===`V`?{x:t.boundary.x+n,y:t.boundary.y}:{x:t.boundary.x,y:t.boundary.y+n},a=t.orientation===`V`?{x:t.railEnd.x+n,y:t.railEnd.y}:{x:t.railEnd.x,y:t.railEnd.y+n};if(!e(()=>Math.abs(t.boundary.y-t.rect.top)<1||Math.abs(t.boundary.y-t.rect.bottom)<1?I(i,t.boundary,X)&&i.x>=t.rect.left+1&&i.x<=t.rect.right-1:Math.abs(t.boundary.x-t.rect.left)<1||Math.abs(t.boundary.x-t.rect.right)<1?F(i,t.boundary,X)&&i.y>=t.rect.top+1&&i.y<=t.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(t.atStart){let e=r.length>1&&P(r[1],t.railEnd,X),n=r.slice(e?2:1),o=n[0];return o&&!ct(o,a)?void 0:[i,a,...n]}let o=r.length>1&&P(r[r.length-2],t.railEnd,X),s=r.slice(0,o?-2:-1),c=s[s.length-1];if(!(c&&!ct(c,a)))return[...s,a,i]},`shiftedCandidate`),u=e(e=>{let t=e.edge,r=H(t.points??[]);if(r.length!==2)return!1;let i=t.start,a=t.end,o=i?n.get(i):void 0,s=a?n.get(a):void 0;if(!o||!s)return!1;let c=o.x??0,l=o.y??0,u=s.x??0,d=s.y??0,[f,p]=r;return I(f,p,X)&&Math.abs(l-d)<1&&Math.abs(c-u)>1||F(f,p,X)&&Math.abs(c-u)<1&&Math.abs(l-d)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let e=0;e<8;e++){let e=t.filter(e=>!e.isLayoutOnly).flatMap(e=>[i(e,!0),i(e,!1)]).filter(e=>!!e),n=!1;for(let t=0;t{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let t of p){for(let r of d){let a=l(t,r);if(!a)continue;let o=i({...t.edge,points:a},t.atStart);if(!(!o||e.some(e=>e.edge!==t.edge&&(s(o,e)||f&&c(o,e))))){t.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}e(lt,`separateSharedRenderedTerminalLanes`);function ut(t,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=e((e,n)=>{let a=e.start,o=e.end,s=Q(n);if(s.length!==n.length-1)return!1;let c=[a,o].filter(e=>!!e);for(let e of s)if(J(e.a,e.b,r,c,-2)||J(e.a,e.b,i,[],-2))return!1;for(let n of t){if(n===e||n.isLayoutOnly)continue;let t=n.points;if(!(!t||t.length<2)){for(let e of s)for(let n of Q(H(t)))if(B(e,n,.5)>=Z||_e(e.a,e.b,n.a,n.b,X))return!1}}return!0},`candidateIsSafe`),o=e((e,t)=>{if(t+4>=e.length)return;let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=L(n,r)&&R(r,i)&&L(i,a)&&R(a,o)&&F(n,a,X)&&F(n,o,X)&&F(r,i,X)&&(r.x-n.x)*(a.x-i.x)<0,c=R(n,r)&&L(r,i)&&R(i,a)&&L(a,o)&&I(n,a,X)&&I(n,o,X)&&I(r,i,X)&&(r.y-n.y)*(a.y-i.y)<0;if(s||c)return H([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let l=e[t+5],u=R(n,r)&&L(r,i)&&R(i,a)&&L(a,o)&&R(o,l)&&F(n,o,X)&&F(n,l,X)&&F(i,a,X)&&(i.x-r.x)*(o.x-a.x)<0,d=L(n,r)&&R(r,i)&&L(i,a)&&R(a,o)&&L(o,l)&&I(n,o,X)&&I(n,l,X)&&I(i,a,X)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!u&&!d))return H([...e.slice(0,t+1),l,...e.slice(t+6)])},`withoutDogleg`);for(let e=0;e<8;e++){let e=!1;for(let n of t){if(n.isLayoutOnly)continue;let t=H(n.points??[]);for(let r=0;r<=t.length-5;r++){let i=o(t,r);if(!(!i||!a(n,i))){n.points=i,e=!0;break}}if(e)break}if(!e)return}}e(ut,`collapseRedundantRectangularDoglegs`);function dt(t,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t,n)=>H(e===t?n??[]:e.points??[]),`pointsFor`),s=e((e,t)=>{let n=0;for(let r=0;r{let t=Q(e);if(t.length!==3)return;let n=t[1];if(!(t[0].horizontal===n.horizontal||t[2].horizontal===n.horizontal))return{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}},`middleRail`),l=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);return r.filter(e=>{if(n.includes(e.id))return!1;let r=e.rect;return t.horizontal?z(t.a.x,t.b.x,r.left,r.right)>=Z&&t.a.y>=r.top-2&&t.a.y<=r.bottom+2:z(t.a.y,t.b.y,r.top,r.bottom)>=Z&&t.a.x>=r.left-2&&t.a.x<=r.right+2})},`blockingRectsFor`),u=e((e,t,n)=>{let r=e.map(e=>({...e}));if(t.horizontal)r[t.index].y=n,r[t.index+1].y=n;else if(t.vertical)r[t.index].x=n,r[t.index+1].x=n;else return;let i=Se(H(r));return Q(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=e((e,t,n)=>{let c=[e.start,e.end].filter(e=>!!e),l=Q(t);if(l.length!==t.length-1)return!1;for(let e of l)if(J(e.a,e.b,r,c,-2)||J(e.a,e.b,i,[],-2))return!1;for(let t of a)if(t!==e){for(let e of l)for(let n of Q(o(t)))if(B(e,n,.5)>=Z)return!1}return s(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t=!1;for(let n of a){let r=o(n),i=c(r);if(!i)continue;let a=l(n,i.segment);if(a.length===0)continue;let s=i.horizontal?[Math.min(...a.map(e=>e.rect.top))-20,Math.max(...a.map(e=>e.rect.bottom))+20]:[Math.min(...a.map(e=>e.rect.left))-20,Math.max(...a.map(e=>e.rect.right))+20];for(let a of s){let o=u(r,i.segment,a);if(!(!o||!d(n,o,e))){n.points=o,t=!0;break}}if(t)break}if(!t)return}}e(dt,`liftObstacleHuggingSameSideRails`);function ft(t,n){let r=e(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=e(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,n=typeof t==`string`?t.toUpperCase():``;if(n===`LR`||n===`RL`||n===`BT`)return;let i=r(e),a=e.y,o=e.height;if(!i||typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return;let s=i.right-i.left,c=i.bottom-i.top;if(!(c<=0||s{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+X||n>=t.bottom-X?!1:z(e.a.x,e.b.x,t.left,t.right)>=Z},`horizontalSegmentIntersectsTitle`),o=[...n.values()].map(i).filter(e=>!!e);if(o.length===0)return;let s=0;for(let e of t){if(e.isLayoutOnly)continue;let t=H(e.points??[]);for(let e of Q(t))for(let t of o)a(e,t.rect)&&(s=Math.max(s,t.rect.bottom-e.a.y+4))}if(!(s<=X))for(let e of o){let t=e.node.y,n=e.node.height;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.y=t-s/2,e.node.height=n+s,e.node.groupTitleRect={...e.rect,top:e.rect.top-s,bottom:e.rect.bottom-s})}}e(ft,`liftTopLaneTitleBandsAboveRails`);function pt(t,n){let r=e(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=e(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=r(e),n=e.x,i=e.width;if(!t||typeof n!=`number`||typeof i!=`number`||!Number.isFinite(n)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+X||n>=t.right-X?!1:z(e.a.y,e.b.y,t.top,t.bottom)>=Z},`verticalSegmentIntersectsTitle`),o=e((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+X||n>=t.bottom-X?!1:z(e.a.x,e.b.x,t.left,t.right)>=Z},`horizontalSegmentIntersectsTitle`),s=[...n.values()].map(i).filter(e=>!!e);if(s.length===0)return;let c=0;for(let e of t){if(e.isLayoutOnly)continue;let t=H(e.points??[]);for(let e of Q(t))for(let t of s)if(a(e,t.rect))c=Math.max(c,t.rect.right-e.a.x+4);else if(o(e,t.rect)){let n=Math.min(e.a.x,e.b.x);c=Math.max(c,t.rect.right-n+4)}}if(!(c<=X))for(let e of s){let t=e.node.x,n=e.node.width;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.x=t-c/2,e.node.width=n+c,e.node.groupTitleRect={...e.rect,left:e.rect.left-c,right:e.rect.right-c})}}e(pt,`shiftLeftLaneTitleBandsLeftOfRails`);function mt(t,n){let{realNodeRects:r}=q(n.values()),i=t.filter(e=>!e.isLayoutOnly),a=e((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),o=e((e=new Map)=>{let t=0;for(let n=0;ni.reduce((t,n)=>t+V(a(n,e)),0),`totalBends`),c=e(e=>{let t=a(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!L(n,r,X)&&!R(n,r,X)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=e((e,t)=>{let n=a(e);if(n.length<3)return;let r=n[0],i=n[1],o;if(L(r,i,X))o={x:i.x,y:t.tailStart.y};else if(R(r,i,X))o={x:t.tailStart.x,y:i.y};else return;let s=Se(H([r,i,o,t.tailStart,t.terminal]));return Q(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Q(t))if(J(e.a,e.b,r,n,-2))return!0;return!1},`pathHasNodeHit`),d=e((e,t,n)=>{for(let r of i)if(r!==e){for(let e of Q(t))for(let t of Q(a(r,n)))if(B(e,t,.5)>=Z)return!0}return!1},`pathHasSharedTrack`),f=e((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=e(()=>{let e=new Map;for(let t of i){let r=t.end;if(!r||!n.has(r)||a(t).length<4)continue;let i=e.get(r)??[];i.push(t),e.set(r,i)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t=s(),n,r=e,i=t;for(let t of p().values())for(let a=0;a=e||y>r||y===r&&b>=i||(n=v,r=y,i=b)}if(!n)return;for(let[e,t]of n)e.points=t}}e(mt,`swapDestinationTerminalTailsToReduceCrossings`);function ht(t,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),s=e((e=new Map)=>{let t=0;for(let n=0;na.reduce((t,n)=>t+V(o(n,e)),0),`totalBends`),l=e(e=>{let t=e.start,r=e.end,i=t?n.get(t):void 0,a=r?n.get(r):void 0,o=i?K(i):void 0,s=a?K(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=e((e,t,n)=>{if(n.index<=0||n.index+1>=t.length-1)return;let r=l(e);if(r){if(n.vertical){let i=n.a.x,a=Math.min(r.src.left,r.dst.left),o=Math.max(r.src.right,r.dst.right),s=io+X?`right`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`vertical`,side:s,coord:i,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}:void 0}if(n.horizontal){let i=n.a.y,a=Math.min(r.src.top,r.dst.top),o=Math.max(r.src.bottom,r.dst.bottom),s=io+X?`bottom`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`horizontal`,side:s,coord:i,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}:void 0}}},`externalRailForSegment`),d=e(()=>{let e=[];for(let t of a){let n=o(t);for(let r of Q(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=e((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&z(e.min,e.max,t.min,t.max)>=Z,`railsInteract`),p=e(e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;let i=[r],a=[];for(n.add(r);i.length>0;){let t=i.pop();a.push(t);for(let r of e)!n.has(r)&&f(t,r)&&(n.add(r),i.push(r))}a.length>1&&t.push(a)}return t},`connectedComponents`),m=e(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord){let n=t.map(e=>e.coord),r=m(t),i=[];if(t.length<=6){let a=Array(r.length).fill(!1),o=[],s=e(()=>{if(o.length===t.length){o.some((e,t)=>Math.abs(e-n[t])>=X)&&i.push([...o]);return}for(let[e,t]of r.entries())a[e]||(a[e]=!0,o.push(t),s(),o.pop(),a[e]=!1)},`visit`);return s(),i}for(let e=0;e{let n=new Map;for(let[r,i]of e.entries()){let e=t[r],a=n.get(i.edge)??i.points.map(e=>({x:e.x,y:e.y}));i.axis===`vertical`?(a[i.segmentIndex].x=e,a[i.segmentIndex+1].x=e):(a[i.segmentIndex].y=e,a[i.segmentIndex+1].y=e),n.set(i.edge,a)}let r=new Map;for(let[e,t]of n){let n=Se(H(t));if(Q(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=e(e=>{for(let[t,n]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Q(n))if(J(t.a,t.b,r,e,-2)||J(t.a,t.b,i,[],-2))return!1}for(let t=0;t=Z)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=s();if(e===0)return;let t,n=e,r=c(),i=1/0;for(let a of p(d()))for(let o of h(a)){let l=g(a,o);if(!l||!_(l))continue;let u=s(l);if(u>=e)continue;let d=c(l),f=a.reduce((e,t,n)=>e+Math.abs(o[n]-t.coord),0);u>n||u===n&&(d>r||d===r&&f>=i)||(t=l,n=u,r=d,i=f)}if(!t)return;for(let[e,n]of t)e.points=n}}e(ht,`reassignCrossingExternalRailChannels`);function gt(t,n){let{realNodeRects:r,labelNodeRects:i}=q(n.values()),a=t.filter(e=>!e.isLayoutOnly),o=e((e,t,n)=>H(e===t?n??[]:e.points??[]),`pointsFor`),s=e(e=>Q(e).reduce((e,t)=>{let n=t.a.x-t.b.x,r=t.a.y-t.b.y;return e+Math.hypot(n,r)},0),`pathLength`),c=e((e,t)=>{let n=0;for(let r=0;r{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&z(e.a.x,e.b.x,t.left,t.right)>=Z}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&z(e.a.y,e.b.y,t.top,t.bottom)>=Z}return!1},`segmentRunsAlongRectBorder`),u=e(e=>{let t=[e.start,e.end].filter(e=>!!e),r=[];for(let e of t){let t=n.get(e),i=t?K(t):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=e((e,t)=>{if(t+3>=e.length)return[];let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=L(n,r,X)&&R(r,i,X)&&L(i,a,X),s=R(n,r,X)&&L(r,i,X)&&R(i,a,X);if(!o&&!s||!(o?Math.sign(r.x-n.x)!==Math.sign(a.x-i.x):Math.sign(r.y-n.y)!==Math.sign(a.y-i.y)))return[];let c=F(n,a,X)||I(n,a,X)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],l=c.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:c.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),u=new Set;return l.map(e=>Se(H(e))).filter(e=>{if(Q(e).length!==e.length-1||!e.some(e=>P(e,a,X)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return u.has(t)?!1:(u.add(t),!0)})},`shortcutCandidatesAt`),f=e((e,t,n)=>{let s=[e.start,e.end].filter(e=>!!e),d=u(e);for(let e of Q(t))if(J(e.a,e.b,r,s,-2)||J(e.a,e.b,i,[],-2)||d.some(t=>l(e,t)))return!1;for(let n of a)if(n!==e){for(let e of Q(t))for(let t of Q(o(n)))if(B(e,t,.5)>=Z)return!1}return c(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=c(),t,n,r=e,i=1/0,l=1/0;for(let u of a){let a=o(u),p=V(a,X),m=s(a);for(let o=0;o<=a.length-4;o++)for(let h of d(a,o)){let a=V(h,X),o=s(h);if(!(ar||d===r&&(a>i||a===i&&o>=l)||(t=u,n=h,r=d,i=a,l=o)}}if(!t||!n)return;t.points=n}}e(gt,`shortcutRedundantOrthogonalJogs`);function _t(t,n){let r=[];for(let e of n.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,n=e.y??0,i=K(e);i&&r.push({id:String(e.id??``),cx:t,cy:n,rect:i})}if(r.length===0)return;let i=new Map(r.map(e=>[e.id,e])),a=r.map(e=>({id:e.id,rect:e.rect})),o=[`top`,`bottom`,`left`,`right`],s={top:Math.min(...r.map(e=>e.rect.top))-20,bottom:Math.max(...r.map(e=>e.rect.bottom))+20,left:Math.min(...r.map(e=>e.rect.left))-20,right:Math.max(...r.map(e=>e.rect.right))+20},c=t.filter(e=>!e.isLayoutOnly),l=new Map(c.map((e,t)=>[e,t])),u=e(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(s[e]+t*20*r);return n},`outwardTracksForSide`),d=e((e,t=new Map)=>H(t.get(e)??e.points??[]),`replacementPointsFor`),f=e((e,t)=>{let n=0;for(let r of e)for(let e of t)_e(r.a,r.b,e.a,e.b,X)&&n++;return n},`crossingCountBetweenSegments`),p=e((e,t)=>f(Q(e),Q(t)),`crossingCountBetweenPaths`),m=e((t=new Map)=>{let n=0,r=[],i=new Set,a=[],o=e(e=>{i.has(e)||(i.add(e),a.push(e))},`addEdge`);for(let e=0;e0&&(n+=l,r.push({first:i,second:e,count:l}),o(i),o(e))}}return a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:n,pairs:r,edgeSet:i,edges:a}},`crossingSnapshot`),h=e((e,t)=>{let n=new Set(t.keys());if(n.size===0)return e.count;let r=0;for(let t of e.pairs)(n.has(t.first)||n.has(t.second))&&(r+=t.count);let i=0;for(let e=0;e{let t=new Map;for(let n of e.pairs){let e=t.get(n.first)??new Set;e.add(n.second),t.set(n.first,e);let r=t.get(n.second)??new Set;r.add(n.first),t.set(n.second,r)}let n=[],r=new Set;for(let i of e.edges){if(r.has(i))continue;let e=[i],a=[];for(r.add(i);e.length>0;){let n=e.pop();a.push(n);for(let i of t.get(n)??[])r.has(i)||(r.add(i),e.push(i))}a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),a.length>1&&n.push(a)}return n},`crossingComponents`),_=e(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=e(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of c)e.has(t)||_(t).some(e=>r.has(e))&&i.push(t);i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),t.push(i)}return t},`pairSearchGroups`),y=e((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=e(e=>{let t=new Map;for(let n of e.pairs)t.set(n.first,(t.get(n.first)??0)+n.count),t.set(n.second,(t.get(n.second)??0)+n.count);return t},`currentCrossingsByEdge`),x=e(e=>e.slice(1).reduce((t,n,r)=>{let i=e[r];return t+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),`pathLength`),S=e((e=new Map)=>c.reduce((t,n)=>t+V(d(n,e)),0),`totalBends`),C=e((e=new Map)=>c.reduce((t,n)=>t+x(d(n,e)),0),`totalLength`),w=e((e,t,n=new Map)=>{let r=Q(t);for(let t of c)if(t!==e){for(let e of r)for(let r of Q(d(t,n)))if(B(e,r,.5)>=Z)return!0}return!1},`pathHasSegmentConflict`),T=e((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Q(t))if(J(e.a,e.b,a,n,-2))return!0;return!1},`pathHitsNode`),E=e((e,t)=>{let n=Se(H(t));Q(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),D=e(e=>e===`left`||e===`right`,`sideIsHorizontal`),O=e((e,t,n)=>{switch(t){case`left`:return Math.min(e.x,n.x)-20;case`right`:return Math.max(e.x,n.x)+20;case`top`:return Math.min(e.y,n.y)-20;case`bottom`:return Math.max(e.y,n.y)+20}},`localTrackForSameSide`),k=e((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[O(t,n,r),s[n]];for(let o of a)for(let a=0;a<=2;a++)E(e,ue(t,n,r,o+i*20*a))},`addSameSideCandidates`),A=e((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),j=e((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),ee=e((e,t,n,r,i)=>{let a=[...u(`top`),...u(`bottom`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),te=e((e,t,n,r,i)=>{let a=[...u(`left`),...u(`right`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),M=e(e=>{let t=new Set;return e.map(e=>H(e)).filter(e=>{let n=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return t.has(n)||e.length<2?!1:(t.add(n),!0)})},`dedupeCandidatePaths`),ne=e((e,t,n,r)=>{let i=[],a=le(e,t,n,r,20,X);a&&E(i,a),t===r&&k(i,e,t,n);let o=D(t),s=D(r);return o&&!s?A(i,e,t,n,r):!o&&s?j(i,e,t,n,r):o?ee(i,e,t,n,r):te(i,e,t,n,r),M(i)},`buildCandidatesForSides`),N=e((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=ce(r,s),c=s===`top`||s===`bottom`?u(s):a;for(let r of i){E(e,[t,n,{x:r,y:n.y},{x:r,y:o.y},o]);for(let i of c)E(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:o.x,y:i},o])}}},`addVerticalDepartureOuterTrackCandidates`),P=e((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=ce(r,s),c=s===`left`||s===`right`?u(s):i;for(let r of a){E(e,[t,n,{x:n.x,y:r},{x:o.x,y:r},o]);for(let i of c)E(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:o.y},o])}}},`addHorizontalDepartureOuterTrackCandidates`),F=e(e=>{let t=e.start,n=e.end,r=n?i.get(n):void 0;if(!t||!r)return[];let a=H(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],c=[];return R(o,s,X)?N(c,o,s,r):L(o,s,X)&&P(c,o,s,r),c},`terminalPreservingOuterTrackCandidates`),I=e(e=>{let t=e.start,n=e.end,r=t?i.get(t):void 0,a=n?i.get(n):void 0;if(!r||!a)return[];let s=[];for(let e of o){let t=ce(r,e);for(let n of o)s.push(...ne(t,e,ce(a,n),n))}return s.push(...F(e)),s},`candidatePathsFor`),z=e(()=>new Map(c.map(e=>[e,Q(d(e))])),`currentSegmentsByEdge`),re=e((e,t,n)=>{let r=new Set;for(let i of c){if(i===e)continue;let a=n.get(i)??Q(d(i));t.some(e=>a.some(t=>B(e,t,.5)>=Z))&&r.add(i)}return r},`sharedTrackConflictsFor`),ie=e((e,t,n,r)=>{let i=new Set;return I(e).map(e=>Se(H(e))).filter(t=>{if(T(e,t))return!1;let n=t.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return i.has(n)||t.length<2?!1:(i.add(n),!0)}).map(i=>{let a=Q(i),o=0;for(let t of c)t!==e&&(o+=f(a,n.get(t)??Q(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:V(i,X),totalBends:V(i),length:x(i)}}).filter(({crossings:e})=>e<=t.count).sort((e,t)=>e.crossings-t.crossings||e.bends-t.bends||e.length-t.length).slice(0,48).map(t=>({path:t.candidate,segments:t.candidateSegments,sharedTrackConflicts:re(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),ae=e((e,t,n,r,i,a)=>{let o=0;for(let n of e.pairs)(n.first===t||n.second===t||n.first===r||n.second===r)&&(o+=n.count);let s=f(n.segments,i.segments);for(let e of c){if(e===t||e===r)continue;let o=a.get(e)??Q(d(e));s+=f(n.segments,o)+f(i.segments,o)}return e.count-o+s},`pairCrossingCount`),U=e((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),W=e((e,t)=>e.segments.some(e=>t.segments.some(t=>B(e,t,.5)>=Z)),`candidatesShareTrack`),G=e((e,t,n,r)=>U(t,n.edge)&&U(r,e.edge)&&!W(t,r),`pairCandidatesAreCompatible`),oe=e((e,t,n,r,i)=>{let a=ae(e.current,t.edge,n,r.edge,i,e.baseSegments);if(!(a>=e.current.count))return{replacements:new Map([[t.edge,n.path],[r.edge,i.path]]),crossings:a,bends:e.currentBends-(e.baseBendsByEdge.get(t.edge)??0)-(e.baseBendsByEdge.get(r.edge)??0)+n.totalBends+i.totalBends,length:e.currentLength-(e.baseLengthByEdge.get(t.edge)??0)-(e.baseLengthByEdge.get(r.edge)??0)+n.length+i.length}},`scorePairReplacement`),se=e((e,t)=>e.crossings{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!G(t,r,n,a))continue;let o=oe(e,t,r,n,a);o&&se(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),q=e(e=>{let t=S(),n=C(),r=z(),i=b(e),a=new Map(c.map(e=>[e,V(d(e))])),o=new Map(c.map(e=>[e,x(d(e))])),s=new Map,l=v(e);for(let t of l)for(let n of t){if(s.has(n))continue;let t=ie(n,e,r,i);t.length>0&&s.set(n,{edge:n,candidates:t})}let u={replacements:new Map,crossings:e.count,bends:t,length:n},f={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of l){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>s.get(e)).filter(e=>!!e);for(let e=0;e0?u.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=V(d(o),X);for(let c of I(o)){let l=T(o,c),u=!l&&w(o,c),d=y(e,o,c),f=V(c,X);l||u||(di||d===i&&f>=a||(n=o,r=c,i=d,a=f))}}if(n&&r){n.points=r;continue}let o=q(e);if(!o)return;for(let[e,t]of o)e.points=t}}e(_t,`resolveRenderedOrthogonalCrossings`);var vt=.001,yt=8;function bt(t,n){let{nodeInfoById:r,realNodeRects:i}=de(n),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...i.map(e=>e.rect.top))-20,bottom:Math.max(...i.map(e=>e.rect.bottom))+20,left:Math.min(...i.map(e=>e.rect.left))-20,right:Math.max(...i.map(e=>e.rect.right))+20},s=e((e,t,n,r)=>{let i=[],a=le(e,t,n,r,20,vt);return a&&i.push(a),t===r&&i.push(ue(e,t,n,o[t])),i},`buildOrthogonalPathCandidates`),c=e((e,t)=>{for(let n=0;n{let i=0,a=re(e,vt),o=n.start,s=n.end;for(let e of t){if(e===n||e.isLayoutOnly)continue;let t=e.start,c=e.end;if(!r&&o&&s&&(t===o||t===s||c===o||c===s))continue;let l=e.points;if(!(!l||l.length<2))for(let e of a)for(let t of re(l,vt)){if(me(e.a,e.b,t.a,t.b,vt,vt)){i++;continue}B(e,t,vt)>=yt&&i++}}return i},`pathConflictCount`),u=e((e,t)=>{let n=Math.abs(e.y-t.rect.top),r=Math.abs(e.y-t.rect.bottom),i=Math.abs(e.x-t.rect.left),a=Math.abs(e.x-t.rect.right),o=`top`,s=n;return r{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let e of t){if(e.isLayoutOnly)continue;let t=e.points??[];if(t.length<1)continue;let n=e.id??``,i=e.start,a=e.end;if(i){let e=r.get(i);e&&f(i,u(t[0],e),n)}if(a){let e=r.get(a);e&&f(a,u(t[t.length-1],e),n)}}let p=e((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let e of t){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=V(t,vt);if(n<4)continue;let i=e.start,o=e.end;if(!i||!o)continue;let m=r.get(i),h=r.get(o);if(!m||!h)continue;let g=e.id??``,_=l(t,e,!0),v=l(t,e),y,b=_,x=n;for(let t of a){if(p(i,t,g))continue;let n=ce(m,t);for(let r of a){if(p(o,r,g))continue;let a=ce(h,r);for(let u of s(n,t,a,r)){if(c(u,[i,o]))continue;let t=V(u,vt);if(_>0){let n=l(u,e,!0);if(n>b||n===b&&t>=x)continue;b=n,x=t,y=u;continue}l(u,e)>v||te.edgeId!==g));let n=d.get(o);n&&d.set(o,n.filter(e=>e.edgeId!==g)),f(i,u(y[0],m),g),f(o,u(y[y.length-1],h),g)}}}e(bt,`simplifyDetouredEdges`);var xt=.001,St=10,Ct=7;function wt(e,t){let n=t?0:e.length-1,r=t?1:-1,i=e[n],a=e[n+r];if(!i||!a)return;let o=a.x-i.x,s=a.y-i.y;if(!(Math.abs(o)+Math.abs(s)t&&G(e,Tt(t)))}e(Et,`labelOverlapsOwnMarker`);function Dt(t,n){let r=[];for(let e of t){if(e.isLayoutOnly)continue;let t=e.points;if(!(!t||t.length<2))for(let n=0;n{let n=oe(t,3);for(let{nodeId:t,rect:r}of i)if(t!==e&&G(n,r))return!0;return!1},`labelOverlapsForeignNode`),s=e((e,t)=>{let n=oe(t,3);for(let t of r)if(t.edgeId!==e&&ae(t.p1,t.p2,n))return!0;return!1},`labelOverlapsForeignEdge`),c=e((e,t,n)=>o(e,n)||s(t,n),`labelOverlapsAnything`),l=[],u=e(e=>{for(let{id:t,rect:n}of a)if(W(n,e))return t},`findContainingLane`),d=e((e,t)=>l.some(n=>n.labelId!==e&&G(t,n.rect)),`overlapsPlacedLabel`);for(let r of t){if(r.isLayoutOnly)continue;let t=r.labelNodeId;if(!t)continue;let i=n.get(t);if(!i)continue;let f=r.points;if(!f||f.length<2)continue;let p=i.width??0,m=i.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e=xt&&i>=xt||h.push({idx:e,length:r+i,orientation:r>=xt?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx0?g:h,v=p>=m?`horizontal`:`vertical`,y=e(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=e((e,t)=>{let n=f[e.idx],r=f[e.idx+1];return{midX:n.x+(r.x-n.x)*t,midY:n.y+(r.y-n.y)*t}},`anchorAtT`),w=e((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=e((e,t)=>e.midX>=t.left-xt&&e.midX<=t.right+xt&&e.midY>=t.top-xt&&e.midY<=t.bottom+xt,`pointInsideRectInclusive`),E=e(e=>{let t=se(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=a.find(({rect:t})=>T(e,t));if(!r)return;let i=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,c=r.rect.bottom-m/2-1;if(i>o||s>c)return;let l={midX:w(e.midX,i,o),midY:w(e.midY,s,c)},d=se(l.midX,l.midY,p,m);return T(e,d)?{laneId:r.id,anchor:l,rect:d}:void 0},`placementForAnchor`),D=e((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=e((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+xt{let n=y(e);for(let e of n)for(let n of S){let i=C(e,n);if(!O(e,i))continue;let a=E(i);if(a&&!Et(a.rect,f)&&!d(t,a.rect)&&!c(t,r.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=e((e,n,i=!1)=>{let a=y(e);for(let e of a){let a={midX:e.midX,midY:e.midY};if(n&&!O(e,a))continue;let c=E(a);if(c&&!Et(c.rect,f)&&!d(t,c.rect)&&!o(t,c.rect)&&(i||!s(r.id,c.rect)))return{laneId:c.laneId,anchor:c.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.lengthe.labelId===t);n>=0?l[n]={labelId:t,rect:e}:l.push({labelId:t,rect:e})}}}e(Dt,`anchorLabelsToPolyline`);var Ot=1e-6,kt=8/2,At=3;function jt(e,t){return e{let s=jt(r,i),c=0,l=e(e=>{if(!e)return;let t=a.get(e);if(!t)return;let n=o===`x`?t.w/2:t.h/2;n>c&&(c=n)},`consider`);l(n.labelNodeId);for(let e of t){if(e===n||e.isLayoutOnly)continue;let t=e.start,r=e.end;!t||!r||jt(t,r)===s&&l(e.labelNodeId)}return c>0?c+At:0},`labelClearanceFor`);for(let e of t){if(e.isLayoutOnly)continue;let n=e.points;if(!ie(n,Ot))continue;let a=pe(e,r,Ot);if(!a)continue;let{srcId:s,dstId:c,srcInfo:l,dstInfo:u,collinearX:d,collinearY:f}=a;if(d===f)continue;let p,m;if(d){let e=u.cy>l.cy;p={x:l.cx,y:e?l.rect.bottom:l.rect.top},m={x:u.cx,y:e?u.rect.top:u.rect.bottom}}else{let e=u.cx>l.cx;p={x:e?l.rect.right:l.rect.left,y:l.cy},m={x:e?u.rect.left:u.rect.right,y:u.cy}}if(J(p,m,i,[s,c],1))continue;let h=o(e,s,c,d?`x`:`y`),g=h>kt?h:kt,_=[0,g,-g];for(let n of _){let r={...p},a={...m};if(d){if(r.x+=n,a.x+=n,r.x<=l.rect.left||r.x>=l.rect.right||a.x<=u.rect.left||a.x>=u.rect.right)continue}else if(r.y+=n,a.y+=n,r.y<=l.rect.top||r.y>=l.rect.bottom||a.y<=u.rect.top||a.y>=u.rect.bottom)continue;if(!J(r,a,i,[s,c],1)&&!ge(r,a,t,e,{epsilon:Ot})){e.points=[r,a];break}}}}e(Mt,`straightenCollinearSiblingDetours`);function Nt(t,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=q(n.values()),o=e((e,t)=>re(t,r).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),s=e(()=>{let e=[];for(let n of t){if(n.isLayoutOnly)continue;let t=n.points;!t||t.length<2||e.push(...o(n,H(t)))}return e},`allSegments`),c=e((e,t)=>e.horizontal&&t.horizontal?z(e.a.x,e.b.x,t.a.x,t.b.x)>=8&&Math.abs(e.a.y-t.a.y)<7:e.vertical&&t.vertical?z(e.a.y,e.b.y,t.a.y,t.b.y)>=8&&Math.abs(e.a.x-t.a.x)<7:!1,`hasCrowdedParallelTrack`),l=e((e,n)=>{let s=e.start,l=e.end,u=o(e,n);if(u.length!==n.length-1)return!1;let d=[s,l].filter(e=>!!e),f=e.labelNodeId?[e.labelNodeId]:[];for(let e of u)if(J(e.a,e.b,i,d,-2)||J(e.a,e.b,a,f,-2))return!1;for(let n of t){if(n===e||n.isLayoutOnly)continue;let t=n.points;if(!(!t||t.length<2)){for(let e of u)for(let i of o(n,H(t)))if(c(e,i)||_e(e.a,e.b,i.a,i.b,r))return!1}}return!0},`candidateIsSafe`),u=e((e,t)=>{let n=H(e.edge.points??[]);if(n.length<4||e.index>=n.length-1)return;let r=n.map(e=>({...e}));if(e.horizontal)r[e.index].y+=t,r[e.index+1].y+=t;else if(e.vertical)r[e.index].x+=t,r[e.index+1].x+=t;else return;return o(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=e((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=e(e=>{let t=e.edge,r=H(t.points??[]);if(r.length!==4||e.index!==1)return;let i=t.start?n.get(t.start):void 0,a=t.end?n.get(t.end):void 0,o=i?K(i):void 0,s=a?K(a):void 0,c=r.slice(e.index+2);if(!(!i||!a||!o||!s||c.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:c}},`sourceDetourContextFor`),p=e((e,t,n,i,a,o)=>{let s=i.y>=n.y,c=s?a.bottom:a.top,l=c+(s?20:-20);if(s&&e.b.y<=l+r||!s&&e.b.y>=l-r)return;let u=e.a.x+t;return H([{x:n.x,y:c},{x:n.x,y:l},{x:u,y:l},{x:u,y:e.b.y},...o],r)},`verticalSourceDetour`),m=e((e,t,n,i,a,o)=>{let s=i.x>=n.x,c=s?a.right:a.left,l=c+(s?20:-20);if(s&&e.b.x<=l+r||!s&&e.b.x>=l-r)return;let u=e.a.y+t;return H([{x:c,y:n.y},{x:l,y:n.y},{x:l,y:u},{x:e.b.x,y:u},...o],r)},`horizontalSourceDetour`),h=e((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=s(),t=!1;for(let n=0;ne.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}e(Nt,`nudgeSharedInteriorSubpaths`);function Pt(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(Math.abs(c)<1e-10)return!1;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c,p=.01;return d>p&&d<1-p&&f>p&&f<1-p}e(Pt,`segmentsIntersect`);function Ft(e){let n=e.nodes??[],r=e.edges??[],i=[];if(!r.length||!n.length)return i;let a=fe(n),o=[];for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,s=e.labelNodeId,c=e.id??`${n}->${r}`;for(let e of a)if(!(e.nodeId===n||e.nodeId===r)&&!(s&&e.nodeId===s)){for(let n=0;n0){let e=i.filter(e=>e.type===`edge-node-overlap`).length,n=i.filter(e=>e.type===`edge-edge-crossing`).length;t.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${e} edge-node overlap(s), ${n} edge crossing(s)`);for(let e of i)t.warn(`[SWIMLANE_VALIDATE] ${e.type}: ${e.detail}`)}return i}e(Ft,`validateSwimlanesLayout`);function It(t,n){let r=t.nodes??[],i=t.edges??[],a=r.filter(e=>!e.isGroup);if((n===`LR`||n===`RL`)&&a.length>0&&!nt(t,n)||n===`BT`&&a.length>0&&!tt(t))return;for(let e of i){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=Se(xe(t)))}bt(i,r),Mt(i,r),ot(i,r);let o=new Map;for(let e of r)o.set(String(e.id),e);Dt(i,o),Oe(i,o),st(i,o),Nt(i,o),lt(i,o),ut(i,o),dt(i,o),mt(i,o);let s=e(()=>{_t(i,o),ht(i,o),gt(i,o),Dt(i,o),qe(i,o),dt(i,o),Dt(i,o),qe(i,o)},`finalizeRenderedEdges`);s(),Nt(i,o),s(),ft(i,o),pt(i,o),ft(i,o),pt(i,o)}e(It,`postProcessSwimlaneLayout`);function Lt(e){let t=new Map(e.nodeById),n=new Set,r=[];for(let i of e.edges){if(!t.has(i.src)||!t.has(i.dst))continue;let e=`${i.id}:${i.src}->${i.dst}`;n.has(e)||(n.add(e),r.push(i))}return{nodes:[...t.keys()],edges:r,layout:e.layout,nodeById:t}}e(Lt,`normalizeGraph`);function Rt(e,t){return e.edges.filter(e=>e.dst===t)}e(Rt,`incoming`);function zt(e){let t=new Map;for(let n of e.nodes)t.set(n,[]);for(let n of e.edges)t.get(n.src).push(n.dst);return t}e(zt,`buildSuccessorMap`);function Bt(e){let t=zt(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}e(Bt,`buildSortedSuccessorMap`);function Vt(e){let t=new Map;for(let n of e.nodes)t.set(n,0);for(let n of e.edges)t.set(n.dst,(t.get(n.dst)??0)+1);return t}e(Vt,`buildInDegreeMap`);function Ht(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}e(Ht,`sortedZeroInDegreeNodes`);function Ut(e,t=()=>!0){let n=new Map,r=new Map;for(let t of e.nodes)n.set(t,[]),r.set(t,[]);for(let i of e.edges)t(i)&&(r.get(i.src).push(i.dst),n.get(i.dst).push(i.src));return{preds:n,succs:r}}e(Ut,`buildPredecessorSuccessorMaps`);function Wt(e,t,n,r){let i=0;for(let t of e.nodes)r?.skipGroups&&e.nodeById.get(t)?.isGroup||(i=Math.max(i,n[t]??0));let a=Array.from({length:i+1},()=>[]);for(let i of t)r?.skipGroups&&e.nodeById.get(i)?.isGroup||a[Math.max(0,n[i]??0)].push(i);return a}e(Wt,`buildLayersFromRanks`);function Gt(e){let t=Vt(e),n=Ht(t),r=[],i=Bt(e);for(;n.length;){let e=n.shift();r.push(e);for(let r of i.get(e)??[])if(t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0){let e=0;for(;e{if(i-e<=1)return 0;let a=e+i>>1,o=r(e,a)+r(a,i),s=e,c=a,l=e;for(;s=i||se.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let i=Object.create(null);for(let e of n.nodes)i[e]=0;let a=[],o=e(e=>{i[e]=1;for(let t of r.get(e)??[]){let e=t.dst;i[e]===0?o(e):i[e]===1&&a.push(t)}i[e]=2},`dfs`),s=[...n.nodes].sort((e,t)=>e.localeCompare(t));for(let e of s)i[e]===0&&o(e);let c=new Set(a.map(e=>`${e.id}:${e.src}->${e.dst}`)),l=n.edges.map(e=>c.has(`${e.id}:${e.src}->${e.dst}`)?{id:e.id,src:e.dst,dst:e.src,weight:e.weight,ref:e.ref}:e);return{acyclic:{nodes:[...n.nodes],edges:l,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:a}}e(Jt,`removeCycles_DFS`);function Yt(t){let n=new Map,r=e(e=>{if(n.has(e))return n.get(e);let i=t.nodeById.get(e);if(!i)return n.set(e,null),null;let a=i.parentId;if(!a)return n.set(e,null),null;let o=r(a)??a;return n.set(e,o),o},`resolve`);for(let e of t.nodes)r(e);return n}e(Yt,`buildTopLaneMap`);function Xt(e){let t=Yt(e);return e=>t.get(e)??null}e(Xt,`createTopLaneResolver`);function Zt(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}e(Zt,`buildTopLaneOrder`);function Qt(e,t){let n=Zt(e);if(!t||t.length===0)return n;let r=new Set(n),i=new Set,a=[];for(let e of t)!r.has(e)||i.has(e)||(i.add(e),a.push(e));for(let e of n)i.has(e)||a.push(e);return a}e(Qt,`resolveTopLaneOrder`);var $t={EPSILON:1e-6},en={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},tn={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function nn(t,n){let r=Lt(t),i=n?.laneOf??(()=>null),a=n?.rankHint,{preds:o}=Ut(r);for(let e of o.values())e.sort((e,t)=>e.localeCompare(t));let s=Gt(r)??[...r.nodes].sort((e,t)=>e.localeCompare(t)),c=new Map;for(let[e,t]of s.entries())c.set(t,e);let l=new Map,u=new Map;for(let e of r.nodes)u.set(e,[]);for(let e of s){let t=(o.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=rn(e,t,{laneOf:i,rankHint:a,topoIndex:c});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of r.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of r.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=c.get(e)??0,r=c.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=an(r),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=on(m),g=sn(m),_=new Map;for(let e of r.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=e(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of s)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:s}}e(nn,`buildDrivingTree`);function rn(e,t,n){let r=n.laneOf(e);return[...t].sort((e,t)=>{let i=n.laneOf(e),a=n.laneOf(t),o=i!=null&&i===r;if(o!==(a!=null&&a===r))return o?-1:1;let s=n.rankHint?.[e],c=n.rankHint?.[t];if(s!=null&&c!=null&&s!==c)return c-s;let l=n.topoIndex.get(e)??0,u=n.topoIndex.get(t)??0;return l===u?e.localeCompare(t):l-u})[0]}e(rn,`chooseParent`);function an(e){let t=new Map;for(let n of e.nodes)t.set(n,new Set);for(let n of e.edges)t.get(n.src).add(n.dst),t.get(n.dst).add(n.src);return t}e(an,`buildAdjacency`);function on(e){let t=new Map,n=0;for(let r of e.keys()){if(t.has(r))continue;let i=[r];for(;i.length>0;){let r=i.pop();if(!t.has(r)){t.set(r,n);for(let n of e.get(r)??[])t.has(n)||i.push(n)}}n++}return t}e(on,`assignComponents`);function sn(t){let n=new Map,r=new Map,i=[],a=[],o=0,s=e((e,c)=>{n.set(e,++o),r.set(e,o);for(let l of t.get(e)??[])l!==c&&(n.has(l)?(n.get(l)??0)<(n.get(e)??0)&&(i.push([e,l]),r.set(e,Math.min(r.get(e)??o,n.get(l)??o))):(i.push([e,l]),s(l,e),r.set(e,Math.min(r.get(e)??o,r.get(l)??o)),(r.get(l)??0)>=(n.get(e)??0)&&a.push(cn(e,l,i,a.length))))},`visit`);for(let e of t.keys())n.has(e)||s(e,null);return a}e(sn,`computeBlocks`);function cn(e,t,n,r){let i=[],a=new Set;for(;n.length>0;){let r=n.pop();if(i.push(r),a.add(r[0]),a.add(r[1]),r[0]===e&&r[1]===t||r[0]===t&&r[1]===e)break}return{id:r,edges:i,nodes:[...a]}}e(cn,`popBlock`);function ln(t,n,r){let i=[...t.nodes],a=new Map;for(let[e,t]of i.entries())a.set(t,e);let o=i.length,s=Array(o).fill(-1),c=Array(o).fill(0),l=[],u=new Set;for(let e of i){let t=r.parent.get(e)??null,n=a.get(e);n!=null&&(t??(s[n]=-1,c[n]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=a.get(e);if(t==null)continue;let n=r.children.get(e)??[];for(let e of n){if(u.has(e))continue;let n=a.get(e);n!=null&&(s[n]=t,c[n]=c[t]+1,u.add(e),l.push(e))}}for(let e of i){if(u.has(e))continue;let t=a.get(e);t!=null&&(s[t]=-1,c[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,o)))+1),f=Array.from({length:d},()=>Array(o).fill(-1));for(let e=0;e{if(e===-1||t===-1)return-1;c[e]>t&1&&(e=f[t][e],e===-1))return-1;if(e===t)return e;for(let n=d-1;n>=0;n--){let r=f[n][e],i=f[n][t];r===-1||i===-1||r!==i&&(e=r,t=i)}return f[0][e]},`lcaIndex`),m=Array.from({length:o},()=>new Map);for(let e of t.edges){let t=e.src,r=e.dst,i=n[t],o=n[r];if(i==null||o==null||(i>o&&([t,r]=[r,t],[i,o]=[o,i]),i==null||o==null||i===o))continue;let s=a.get(t),c=a.get(r);if(s==null||c==null)continue;let l=p(s,c);if(l===-1)continue;let u=m[l];for(let e=i;e{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=e(e=>{let t=a.get(e);_.add(e);let i=t==null?void 0:m[t],o=i?new Map(i):new Map,s=r.children.get(e)??[];for(let t of s){let r=v(t),i=n[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=n[t];s!=null&&s>i&&(o+=1),a.set(t,o)}g(o,r)}return o},`dfs`);for(let e of r.roots)_.has(e)||v(e);for(let e of i)_.has(e)||v(e);return h}e(ln,`computeSubtreeCrossCounts`);function un(t,n,r){let i=new Map,a=e(e=>{let t=r[e]??0,o=[...n.get(e)??[]];o.sort(dn(r));for(let e of o){a(e);let n=i.get(e);n!=null&&(t=Math.min(t,n))}i.set(e,t)},`annotate`);for(let e of t)a(e);return i}e(un,`annotateMinimumLayers`);function dn(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}e(dn,`compareByRankThenId`);function fn(t,n,r,i){let a=0;for(let e of n){let t=r[e]??0;t>a&&(a=t)}let o=Array.from({length:a+1},()=>[]),s=new Set,c=e(e=>{if(s.has(e))return;s.add(e);let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e);for(let t of i(e))c(t)},`emit`);for(let e of t)c(e);for(let e of n)if(!s.has(e)){let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e),s.add(e)}return o}e(fn,`emitNodesInTreeOrder`);function pn(e){let t=[];for(let n of e){let e=new Set,r=[];for(let t of n)e.has(t)||(e.add(t),r.push(t));t.push(r)}return t}e(pn,`deduplicateLayers`);function mn(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],c=[],l=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):c.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),c.sort((e,t)=>{let n=l?.get(e)??0,i=l?.get(t)??0;if(n!==i)return n-i;let a=r.get(e)??o,s=r.get(t)??o;return a===s?e.localeCompare(t):a-s}),[...s.map(e=>e.child),...c]}}e(mn,`createChildOrderer`);function hn(e,t,n){let r=nn(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=ln(e,t,r),s=[...a].sort(dn(t)),c=mn(i,t,o,un(s,i,t)),l=fn(s,e.nodes,t,c);return l=pn(l),l}e(hn,`buildMultitreeLayerOrder`);function gn(e,t,n){let r=new Set(e),i=new Set(t),a=Kt(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return qt(o)}e(gn,`countCrossingsBetweenAdjacent`);function _n(e,t,n){let r=[];for(let e of t){let t=n[e.src],i=n[e.dst];if(t==null||i==null||t===i)continue;let a=e.src,o=e.dst,s=t,c=i;t>i&&(a=e.dst,o=e.src,s=i,c=t);for(let t=s;t(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let c=0;for(let e of r.get(s)??[])c=Math.max(c,(n[e]??0)+1);if(c>=o)continue;let l=o;n[s]=c;let u=_n(hn(e,n,i),e.edges,n);u(t[e]??0)-(t[n]??0)||e.localeCompare(n));for(let i of r){let r=n(i);if(!r)continue;let a=e.edges.filter(e=>e.src===i);if(a.length===0)continue;let o=!1,s=0;for(let e of a){let t=n(e.dst);t==null||t===r?o=!0:s++}if(s===0||o)continue;let c=0,l=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?l=!0:c++)}if(c>0||!l)continue;let u=t[i]??0,d=u+s,f=0;for(let n of e.edges)n.dst===i&&(f=Math.max(f,(t[n.src]??0)+1));let p=Math.max(u,f,d);p!==u&&(t[i]=p)}}e(yn,`adjustCrossLaneSources`);function bn(e,t){let n=Lt(e),r=Gt(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=Xt(n),o=Object.create(null);for(let e of r){let r=Rt(n,e),s=t?.ignoreCrossLaneEdges?r.filter(t=>{let n=a(t.src),r=a(e);return!n||!r?!0:n===r}):r;if(s.length===0)o[e]=0;else if(i&&s.length===1){let t=s[0].src;a(t)===a(e)?o[e]=(o[t]??0)+1:o[e]=o[t]??0}else{let t=-1/0;for(let e of s)t=Math.max(t,(o[e.src]??0)+1);o[e]=t===-1/0?0:t}}return(t?.optimizeRanksByCrossings??!1)&&(o=vn(n,o)),t?.ignoreCrossLaneEdges&&yn(n,o),{layers:hn(n,o,a),rankOf:o,dummy:new Set}}e(bn,`assignLayers_LongestPath`);function xn(t,n){let r=Lt(t),i={...bn(r,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},a=Xt(r),{preds:o,succs:s}=Ut(r,e=>{if(n?.ignoreCrossLaneEdges){let t=a(e.src),n=a(e.dst);if(t&&n&&t!==n)return!1}return!0}),c=Gt(r)??[...r.nodes],l=[...c].reverse(),u=e((e,t)=>{let n=0;for(let t of o.get(e)??[])n=Math.max(n,(i[t]??0)+1);let r=1/0,a=s.get(e)??[];return a.length>0&&(r=Math.min(...a.map(e=>(i[e]??0)-1))),Number.isFinite(r)||(r=Math.max(n,t)),Math.min(Math.max(t,n),r)},`clampFeasible`),d=en.GRAVITY_ITERATIONS,f=e(e=>{let t=!1;for(let n of e){let e=o.get(n)??[],r=s.get(n)??[];if(e.length===0&&r.length===0)continue;let a=e.length>0?e.reduce((e,t)=>e+(i[t]??0)+1,0)/e.length:i[n]??0,c=r.length>0?r.reduce((e,t)=>e+(i[t]??0)-1,0)/r.length:i[n]??0,l=u(n,Math.round((a+c)/2));l!==i[n]&&(i[n]=l,t=!0)}return t},`relaxOrder`);for(let e=0;e0){let n=Math.min(...t.map(e=>(i[e]??0)-1));(i[e]??0)>n&&(i[e]=n)}}return{layers:Wt(r,c,i),rankOf:i,dummy:new Set}}e(xn,`assignLayers_Gravity`);function Sn(e){let t=Vt(e),n=Bt(e),r=Ht(t),i=[];for(;r.length>0;){let e=[];for(let a of r){i.push(a);for(let r of n.get(a)??[])t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0&&e.push(r)}r=e.sort((e,t)=>e.localeCompare(t))}return i.length===e.nodes.length?i:null}e(Sn,`topoSortByGenerationIfAcyclic`);function Cn(t,n){let r=Lt(t),i=n?.direction===`LR`?Sn(r)??[...r.nodes].sort():Gt(r)??[...r.nodes].sort(),a=Xt(r),o=e(e=>a(e)??e,`laneOf`),s=Object.create(null),c=new Map,l=e((e,t)=>n?.ignoreCrossLaneEdges??!0?+(o(e)===o(t)):1,`edgeWeight`);for(let e of i){if(r.nodeById.get(e)?.isGroup)continue;let t=Rt(r,e),n=0;if(t.length>0)for(let r of t){let t=r.src,i=s[t]??0;n=Math.max(n,i+l(t,e))}let i=o(e),a=c.get(i)??0,u=Math.max(n,a);s[e]=u,c.set(i,u+1)}return{layers:Wt(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}e(Cn,`assignLayers_LaneAwareCompact`);function wn(t,n){let r=Lt(n),{rankOf:i}=t,a=t.layers.map(e=>[...e]),o=new Set(t.dummy?[...t.dummy]:[]),s=0,c=new Map(r.nodeById),l=e(e=>{let t=`placeholder-${s++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(t,n),o.add(t);a.length<=e;)a.push([]);return a[e].push(t),i[t]=e,t},`addDummyAt`),u=[...r.edges].sort((e,t)=>e.id===t.id?e.src===t.src?e.dst.localeCompare(t.dst):e.src.localeCompare(t.src):e.id.localeCompare(t.id)),d=[];for(let e of u){let t=i[e.src]??0,n=i[e.dst]??0;if(n-t<=1){d.push(e);continue}let r=e.src;for(let i=t+1,a=0;i!r.nodes.includes(e))],edges:d,layout:r.layout,nodeById:c};return{layering:{layers:a,rankOf:i,dummy:o},graphWithDummies:f}}e(wn,`makeProperLayering`);function Tn(e){let t=e.length;if(t===0)return 1/0;let n=[...e].sort((e,t)=>e-t);return t%2==1?n[(t-1)/2]:.5*(n[t/2-1]+n[t/2])}e(Tn,`median`);function En(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}e(En,`barycenter`);function Dn(e,t,n,r){let i=new Map;for(let t of e)i.set(t,[]);for(let e of n)r===`down`?t.has(e.src)&&i.has(e.dst)&&i.get(e.dst).push(t.get(e.src)):t.has(e.dst)&&i.has(e.src)&&i.get(e.src).push(t.get(e.dst));return i}e(Dn,`neighborPositionsFor`);function On(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}e(On,`currentOrderTieBreak`);function kn(e,t,n){let r=new Set(e),i=new Set(t),a=Kt(e),o=Kt(t),s=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&s.push({u:a.get(e.src),v:o.get(e.dst)});return s.sort((e,t)=>e.u===t.u?e.v-t.v:e.u-t.u),qt(s.map(e=>e.v))}e(kn,`countCrossingsBetweenAdjacent`);function An(e,t,n){return[...e].sort((e,r)=>{let i=Tn(t.get(e)??[]),a=Tn(t.get(r)??[]);return i===a?On(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}e(An,`sortByHeuristic`);function jn(e,t,n,r,i,a){let o=Kt(e),s=Kt(t),c=Dn(t,o,n,r);if(!i||!a||a.length===0)return An(t,c,s);let l=new Map;for(let e of t){let t=i(e),n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[];for(let e of a){let t=l.get(e);if(!t||t.length===0)continue;let n=An(t,c,s);u.push(...n)}let d=l.get(null);if(d&&d.length>0){let e=An(d,c,s);for(let t of e){let e=En(c.get(t)??[]),n=u.length;if(isFinite(e)){for(let[t,r]of u.entries())if(es.has(e.src)&&c.has(e.dst)),d=l?r.filter(e=>c.has(e.src)&&l.has(e.dst)):void 0,f=e(e=>{let n=kn(t,e,u);return d&&i&&(n+=kn(e,i,d)),n},`crossingScore`),p=a?new Map:null;if(a&&p)for(let e of n)p.set(e,a(e));let m=!0,h=f(o);for(;m;){m=!1;for(let e=0;e+1[...e]),i=t.edges,a=Xt(t),o=Qt(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e=0;e--)r[e]=jn(r[e+1],r[e],i,`up`,a,o),r[e]=Mn(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}e(Nn,`orderLayers`);function Pn(t,n,r){let i=r?.layerGap??tn.DEFAULT_LAYER_GAP,a=r?.nodeGap??tn.DEFAULT_NODE_GAP,o=r?.laneGap??a*2,s=r?.direction??`TB`,c=s===`LR`||s===`RL`,l=t.layers,u=Object.create(null),d=Object.create(null),f=e(e=>n.nodeById.get(e),`getNode`),p=e(e=>f(e)?.width??0,`getWidth`),m=e(e=>f(e)?.height??0,`getHeight`),h=Xt(n),g=Qt(n,r?.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(c)for(let e=0;e+1Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),r=_[e],a=_[e+1],o=r/2+a/2,s=(t+n)/2,c=Math.max(0,s-o-i);v.push(c)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(r);e===null?n.push(r):(t[e]||=[]).push(r)}for(let[e,n]of Object.entries(t)){let t=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+o*Math.max(0,S.length-1))/2;for(let n=0;np(e)),r=i-(e.reduce((e,t)=>e+t,0)+a*(t.length-1))/2;for(let[i,o]of t.entries()){let t=e[i];u[o]=r+t/2,d[o]=T+n/2,r+=t+a}}}let o=v[e]??0;T+=n+i+o}let E=new Map;for(let e of n.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let t=e[0].ref,r=t.start,i=t.end;if(r==null||i==null)continue;let a=Math.round(((u[r]??0)+(u[i]??0))/2),o=new Set;for(let t of e)o.add(t.src),o.add(t.dst);for(let e of o)e===r||e===i||n.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}e(Pn,`assignCoordinates`);var Fn=8;function In(e){let t=2166136261;for(let n=0;n>>0}e(In,`hashString`);function Ln(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}e(Ln,`mulberry32`);function Rn(e,t){let n=[...e],r=Ln(t);for(let e=n.length-1;e>0;e--){let t=Math.floor(r()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n}e(Rn,`deterministicShuffle`);function zn(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}e(zn,`sourceDistance`);function Bn(e,t){let n=new Map;for(let[t,r]of e.entries())n.set(r,t);let r=0;for(let{a:e,b:i,weight:a}of t){let t=n.get(e),o=n.get(i);t==null||o==null||(r+=a*Math.abs(t-o))}return r}e(Bn,`laneArrangementCost`);function Vn(e){let t=Zt(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=Xt(e),i=new Map;for(let t of e.layout.edges??[]){if(t.isLayoutOnly)continue;let a=typeof t.start==`string`?t.start:void 0,o=typeof t.end==`string`?t.end:void 0;if(!a||!o||!e.nodeById.has(a)||!e.nodeById.has(o))continue;let s=r(a),c=r(o);if(!s||!c||s===c)continue;let l=n.get(s),u=n.get(c);if(l==null||u==null)continue;let[d,f]=l<=u?[s,c]:[c,s],p=`${d}\0${f}`,m=i.get(p);m?m.weight++:i.set(p,{a:d,b:f,weight:1})}return[...i.values()]}e(Vn,`buildWeightedLaneEdges`);function Hn(e,t,n){let r=[...e],i=Bn(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&oe.a===t.a?e.b.localeCompare(t.b):e.a.localeCompare(t.a)).map(({a:e,b:t,weight:n})=>`${e}:${t}:${n}`).join(`|`);return In(`${e.join(`|`)}#${r}#${n}`)}e(Wn,`seedForRestart`);function Gn(e,t={}){let n=Zt(e);if(n.length<2)return n;let r=Vn(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=Hn(n,r,i),o=Math.max(0,t.restarts??Fn);for(let e=0;e$&&c*3>=s?o>0?`bottom`:`top`:s>$?a>0?`right`:`left`:n}e($n,`chooseOrthogonalSide`);function er(e,t){return Math.abs(e.to-t.from)<$||Math.abs(e.to-t.to)<$?e.to:e.from}e(er,`sharedLineEndpointCoord`);function tr(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}e(tr,`pointOnLine`);function nr(t,n){let r=t.nodes??[],i=t.edges??[],a=[];for(let e of i)e.isLayoutOnly||a.push({...e,__originalEdge:e});let o=new Map,s=new Map,c=[],l=n===`LR`;for(let e of r)o.set(e.id,e);let u=r.filter(e=>e.isGroup&&!e.parentId);for(let t of u){let n={id:t.id},i=e(e=>{s.set(e.id,n),r.filter(t=>t.parentId===e.id).forEach(i)},`assignLane`);i(t)}let d=r.filter(e=>!e.isGroup&&!e.isEdgeLabel).map(e=>{let t=e.width??10,n=e.height??10,r=e.x??0,i=e.y??0,a=qn;return{nodeId:e.id,minX:r-t/2-a,maxX:r+t/2+a,minY:i-n/2-a,maxY:i+n/2+a,visualXHalfExtent:l?n/2+a:t/2+a}}),f=e((e,t,n,r)=>{let i=c.find(n=>n.orientation===e&&Math.abs(n.coord-t)<1);return i||(i={id:`pipe-${e}-${t.toFixed(0)}`,orientation:e,coord:t,spanMin:n,spanMax:r,tracks:[]},c.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=e((e,t)=>{let n=e.width??10,r=e.height??10,i=e.x??0,a=e.y??0;switch(t){case`top`:return{x:i,y:a-r/2};case`bottom`:return{x:i,y:a+r/2};case`left`:return{x:i-n/2,y:a};case`right`:return{x:i+n/2,y:a}}},`portForSide`),m=e((e,t,n)=>p(e,$n(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=e((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)<$,i=Math.abs(t.x-n.x)<$;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-$,o=Math.max(t.x,n.x)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`vertical`||t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v)}else if(i){let r=t.x,i=Math.min(t.y,n.y)-$,o=Math.max(t.y,n.y)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`horizontal`||t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v)}return a},`crossingPenalty`),b=a.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=o.get(e.start),r=o.get(e.end),i=s.get(e.start),a=s.get(e.end);return{idx:t,crossLane:i&&a&&i.id!==a.id?1:0,dx:n&&r?Math.abs((r.x??0)-(n.x??0)):0,dy:n&&r?Math.abs((r.y??0)-(n.y??0)):0}}).sort((e,t)=>{if(e.crossLane!==t.crossLane)return t.crossLane-e.crossLane;let n=e.dx+e.dy,r=t.dx+t.dy;return Math.abs(n-r)>1?n-r:e.idx-t.idx}).map(e=>e.idx),x=e((e,t,n,r)=>{let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return!!d.find(c=>n&&c.nodeId===n||r&&c.nodeId===r?!1:Math.abs(e.x-t.x)>$?c.minYe.y&&c.maxX>i&&c.minXe.x&&c.maxY>o&&c.minY$n(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of a.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),a=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(a),dxSign:Math.sign(i),dySign:Math.sign(a)})}let E=e(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.absDx===0?1/0:e.absDy/e.absDx:e.absDy===0?1/0:e.absDx/e.absDy,`preferenceStrength`),D=e(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=e((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=e(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),ee=new Map;for(let e of T.values())ee.has(e.dstId)||ee.set(e.dstId,new Set),ee.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(o.get(e.srcId)))continue;let t=ee.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:a}=e,s=o.get(n),c=o.get(r),l=`${n}:${i}:src`,u=i===`top`||i===`bottom`?c.x??0:c.y??0;S.has(l)||S.set(l,[]),S.get(l).push({edgeIdx:t,oppositeCoord:u});let d=`${r}:${a}:dst`,f=a===`top`||a===`bottom`?s.x??0:s.y??0;S.has(d)||S.set(d,[]),S.get(d).push({edgeIdx:t,oppositeCoord:f})}let te=new Map;for(let[e,t]of S){if(t.length<2)continue;t.sort((e,t)=>e.oppositeCoord-t.oppositeCoord);let n=e.split(`:`),r=n.slice(0,-2).join(`:`),i=n[n.length-2],a=n[n.length-1],s=o.get(r);if(!s)continue;let c=i===`left`||i===`right`?s.height??10:s.width??10,l=s.shape,u=l===`question`||l===`diamond`?c*.3:c,d=Math.min(20,Math.max(8,u/(t.length+1))),f=-(d*(t.length-1))/2;for(let[e,n]of t.entries()){let t=f+e*d,r=`${n.edgeIdx}:${a}`;te.set(r,t)}}let M=e(e=>!!a[e]?.labelNodeId,`edgeHasLabelNode`),ne=e((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>M(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>M(e)):!1,`faceHasLabelNode`),N=e((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),P=e((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??w(t,i),s=r?.dstSide??w(n,a),c=r?p(t,r.srcSide):m(t,i,!0),l=r?p(n,r.dstSide):m(n,a,!1),u=te.get(`${e}:src`),d=te.get(`${e}:dst`);return u!==void 0&&(c=N(c,o,u)),d!==void 0&&(l=N(l,s,d)),{pSrcPort:c,pDstPort:l,srcSide:o,dstSide:s}},`portsForEdge`);for(let t of b){let n=a[t];if(g[t]=[],!n.start||!n.end||n.points&&n.points.length>0||n.start===n.end)continue;let r=o.get(n.start),i=o.get(n.end);if(!r||!i)continue;let{pSrcPort:s,pDstPort:u,srcSide:p,dstSide:m}=P(t,r,i),v={...s},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=s.y>(r.y??0)?s.y+Zn:s.y-Zn:v.x=s.x>(r.x??0)?s.x+Zn:s.x-Zn,T?b.y=u.y>(i.y??0)?u.y+Zn:u.y-Zn:b.x=u.x>(i.x??0)?u.x+Zn:u.x-Zn;let E=e((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.xn.minY&&e.y{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+Jn:r.minX-Jn,y:i?r.maxY+Yn:r.minY-Yn,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+Jn:r.minX-Jn,y:o?r.maxY+Yn:r.minY-Yn,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[n.start,n.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(s,r,i,e,!0);v.x=t.x,v.y=t.y;let n=t.leavesPositiveSide?Math.min(e.minY-2,s.y+Zn):Math.max(e.maxY+2,s.y-Zn);O=[{x:s.x,y:n},{x:t.x,y:n},{x:t.x,y:t.y}]}else{let t=D(s,r,i,e,!1),n=t.leavesPositiveSide?Math.min(e.minX-2,s.x+Zn):Math.max(e.maxX+2,s.x-Zn);v.x=t.x,v.y=t.y,O=[{x:n,y:s.y},{x:n,y:t.y},{x:t.x,y:t.y}]}}let j=[],ee=E(b,k);if(ee.inside&&ee.obstacle){let e=ee.obstacle;if(T){let t=D(u,i,r,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,i,r,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){let e=Jn,r=Math.abs(v.x-b.x)1||c>1,d=C.get(n.start??``)??0,f=C.get(n.end??``)??0,g=o>1&&ne(n.start,p)||c>1&&ne(n.end,m);if((r||i)&&!a&&(!l||l&&!g&&(o<=1||d<=2)&&(c<=1||f<=2))&&!x(s,u,n.start,n.end)){n.points=[{...s},{...v},{...b},{...u}],_.add(t);let e=i?`horizontal`:`vertical`,r=i?s.y:s.x,a=i?Math.min(s.x,u.x):Math.min(s.y,u.y),o=i?Math.max(s.x,u.x):Math.max(s.y,u.y),c={id:`fast-path-${e}-${r.toFixed(0)}-${t}`,orientation:e,coord:r,spanMin:a,spanMax:o,tracks:[]};h.push({edgeIndex:t,segmentIndex:0,orientation:e,pipe:c,trackIndex:0,from:a,to:o});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let M=Math.min(v.x,b.x)-50,N=Math.max(v.x,b.x)+50,F=Math.min(v.y,b.y)-50,I=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minXt&&e.minYr&&(M=Math.min(M,e.minX-Xn),N=Math.max(N,e.maxX+Xn),F=Math.min(F,e.minY-Xn),I=Math.max(I,e.maxY+Xn))}for(let e of d){if(e.maxXN||e.maxYI)continue;let t=Jn;f(`horizontal`,e.minY-t,M,N),f(`horizontal`,e.maxY+t,M,N);let n=Yn;f(`vertical`,e.minX-n,F,I),f(`vertical`,e.maxX+n,F,I)}f(`horizontal`,v.y,M,N),f(`horizontal`,b.y,M,N);let L=c.filter(e=>e.orientation===`horizontal`&&e.coord>=F&&e.coord<=I),R=c.filter(e=>e.orientation===`vertical`&&e.coord>=M&&e.coord<=N),z=e((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),B=z(v.x,v.y),re=z(b.x,b.y),V=new Map,H=new Map,ie=new Map,ae=new Set,U=[];V.set(B,0),ie.set(B,`n`),U.push({key:B,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),ae.add(B);let W=[],G=e((e,t)=>x(e,t,n.start,n.end),`checkSegmentBlocked`),oe={x:b.x,y:v.y},se=G(v,oe),K=G(oe,b),ce=se||K,le={x:v.x,y:b.y},ue=G(v,le),de=G(le,b);if(ce?ue||de||(W=Math.abs(v.x-b.x)<$?[v,b]:[v,le,b]):W=Math.abs(v.y-b.y)<$||Math.abs(v.x-b.x)<$?[v,b]:[v,oe,b],W.length===0)for(;U.length>0;){U.sort((e,t)=>e.f-t.f);let e=U.shift();if(ae.delete(e.key),e.key===re){let e=re,t=b;for(W=[t];H.has(e);){let n=H.get(e);W.unshift(n),t=n,e=z(n.x,n.y)}break}let r=e.pt.x,i=e.pt.y,a=R.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=L.sort((e,t)=>e.coord-t.coord),c=s.findIndex(e=>Math.abs(e.coord-i)<1),l=[];o>0&&l.push({x:a[o-1].coord,y:i}),o>=0&&o0&&l.push({x:r,y:s[c-1].coord}),c>=0&&ce.nodeId===n.start||e.nodeId===n.end?!1:o===s?e.minXr&&e.maxY>c&&e.minYi&&e.maxX>o&&e.minX10&&x<-5||g<-10&&x>5)&&(m=Math.abs(x)*100),(h>10&&_<-5||h<-10&&_>5)&&(m+=Math.abs(_)*50);let S=0,C=ie.get(e.key)??`n`,w=Math.abs(_)>$?`h`:`v`;C!==`n`&&C!==w&&(S=50);let T=f+p+m+S,E=(V.get(e.key)??1/0)+T,D=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(E<(V.get(u)??1/0))if(H.set(u,e.pt),V.set(u,E),ie.set(u,w),!ae.has(u))U.push({key:u,f:E+D,pt:a}),ae.add(u);else{let e=U.findIndex(e=>e.key===u);e!==-1&&(U[e].f=E+D)}}}if(W.length===0&&(W=[v,{x:v.x,y:b.y},b]),W.length>4){let t=W[0],n=W[W.length-1],r=Math.min(t.x,n.x),i=Math.max(t.x,n.x),a=Math.min(t.y,n.y),o=Math.max(t.y,n.y);for(let e of W)r=Math.min(r,e.x),i=Math.max(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.y);let s=i>Math.max(t.x,n.x),c=re.minXr&&e.minYa);if(s.length>0){let r=Math.max(t.x,n.x);for(let t of s){let n=(t.minX+t.maxX)/2;if(t.visualXHalfExtent===void 0||isNaN(t.visualXHalfExtent))continue;let i=n+t.visualXHalfExtent+e;r=Math.max(r,i)}isNaN(r)||(i=r)}}if(c){let i=d.filter(r=>r.minXMath.min(t.y,n.y));if(i.length>0){let a=Math.min(t.x,n.x);for(let t of i){let n=(t.minX+t.maxX)/2-t.visualXHalfExtent-e;a=Math.min(a,n)}r=a}}}let u=e(e=>{let r=n.y>t.y,i=d.filter(e=>{let r=Math.min(t.x,n.x)e.minX,i=Math.min(t.y,n.y)e.minY;return r&&i}),a=i;if(l&&i.length>0){let t=i.filter(t=>t.minXe);t.length>0&&(a=t)}if(a.length===0)return n.y;let o=Jn;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(ee.minY))-o;if(e>n.y+$)return e}return n.y},`findBestReturnY`),f=e(e=>{let r=u(e),i={x:e,y:t.y},a={x:e,y:r},o={x:n.x,y:r},s=G(t,i),c=G(i,a),l=G(a,o),d=r===n.y?!1:G(o,n);return!s&&!c&&!l&&!d?Math.abs(r-n.y)<$?[t,i,a,n]:[t,i,a,o,n]:null},`trySimplifyWithDetourX`),p=s&&!c?f(i):c&&!s?f(r):null;p&&(W=p)}let q=[s,...O,...W,...j.reverse(),u];if(q.length>=3){let e=q[q.length-1],t=q[q.length-2],n=q[q.length-3],r=Math.abs(n.y-t.y)<$&&Math.abs(t.y-e.y)<$,i=Math.abs(n.x-t.x)<$&&Math.abs(t.x-e.x)<$;if(r){let r=Math.sign(t.x-n.x),i=Math.sign(e.x-n.x);r!==0&&r===i&&Math.abs(t.x-n.x)>Math.abs(e.x-n.x)&&q.splice(-2,1)}else if(i){let r=Math.sign(t.y-n.y),i=Math.sign(e.y-n.y);r!==0&&r===i&&Math.abs(t.y-n.y)>Math.abs(e.y-n.y)&&q.splice(-2,1)}}let fe=[q[0]];for(let e=1;et.x!=r.x>n.x){fe.push(n);continue}continue}if(Math.abs(t.x-n.x)<$&&Math.abs(n.x-r.x)<$){if(n.y>t.y!=r.y>n.y){fe.push(n);continue}continue}fe.push(n)}fe.push(q[q.length-1]);for(let e=0;ee.from{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&F(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&F(n,t));return i&&a?(e.trackIndex=r.index,t.trackIndex=n.index,n.segments=[...n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],r.segments=[...r.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],!0):!1},`trySwapSegmentsAcrossTracks`),L=e(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),R=e((e,t)=>{let n=e.pipe.tracks[e.trackIndex];n.segments=n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),e.trackIndex=t,e.pipe.tracks[t].segments.push({edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to})},`moveSegmentToTrack`),z=e((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&R(n,t)}},`moveSegmentChainToTrack`),B=e(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n{if(e.orientation===t.orientation)return!1;let n=e.orientation===`horizontal`?e:t,r=e.orientation===`horizontal`?t:e;return r.pipe.coord>n.from&&r.pipe.coordr.from&&n.pipe.coord{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&F(e,t)))return n.index;return-1},`findAvailableTrack`),H=e((e,t)=>{if(e.trackIndex===t.trackIndex)return F(e,t);let n=B(e),r=B(t);return n.some(e=>r.some(t=>re(e,t)))},`segmentsConflict`),ie=e((e,t,n)=>{if(I(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=V(e.pipe,t);n(t,r===-1?L(e.pipe):r)},`resolveTrackConflict`),ae=e(e=>{let t=0;for(let n=0;n{if(U.has(e))return U.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return U.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;eMath.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return U.set(e,a),a},`getDestInfo`),G=e(()=>{let t=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.start&&(n.has(t.start)||n.set(t.start,[]),n.get(t.start).push(e));let r=e(e=>{let t=a[e];if(!t.start||!t.end)return 0;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)return 0;let i=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(i)+Math.abs(s)},`getEdgeDistance`);for(let e of n.values()){e.sort((e,t)=>{let n=W(e),i=W(t);if(Math.abs(n.deviation-i.deviation)>1)return n.deviation-i.deviation;if(Math.abs(n.dest-i.dest)>1)return n.dest-i.dest;let a=r(e),o=r(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,c=g[t].length;if(s!==c)return s-c;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[r],i=Math.abs(e.to-e.from),a=Math.abs(t.to-t.from);if(Math.abs(i-a)>1)return i-a}}return 0});let n=e.map(e=>h[g[e][0]]);t+=ae(n)}return t},`fixSourceHandleCrossings`),oe=e(()=>{let t=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.end&&(n.has(t.end)||n.set(t.end,[]),n.get(t.end).push(e));for(let r of n.values()){r.sort((t,n)=>{let r=e(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),i=r(t),a=r(n);return Math.abs(i-a)>.1?i-a:t-n});let n=r.map(e=>h[g[e][g[e].length-1]]);t+=ae(n)}return t},`fixTargetHandleCrossings`),se=e(()=>{let e=0;for(let t of c){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t{e.segments.forEach(t=>{n.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,trackIndex:e.index,from:t.from,to:t.to})})}),n.sort((e,t)=>e.from-t.from);let r=[];if(n.length>0){let e=[n[0]],t=n[0].to;for(let i=1;ir.add(e.trackIndex));let i=new Map;n.forEach(e=>{let t=W(e.edgeIndex);i.set(e.trackIndex,(i.get(e.trackIndex)??0)+t.delta)});let a=[...r].filter(e=>(i.get(e)??0)<-1),o=[...r].filter(e=>(i.get(e)??0)>1),s=[...r].filter(e=>Math.abs(i.get(e)??0)<=1);a.sort((e,t)=>(i.get(t)??0)-(i.get(e)??0)),o.sort((e,t)=>(i.get(e)??0)-(i.get(t)??0));let c=e((e,r)=>{n.filter(t=>t.trackIndex===e).forEach(e=>{let n=_.has(e.edgeIndex)?t.coord:r;ce.set(`${e.edgeIndex}-${e.segmentIndex}`,n)})},`assignCoord`),l=0;for(let e of a)l++,c(e,t.coord-l*Qn);if(s.length===0&&r.size>0){let e=[...r].sort((e,t)=>Math.abs(i.get(e)??0)-Math.abs(i.get(t)??0))[0],t=a.indexOf(e);t!==-1&&a.splice(t,1);let n=o.indexOf(e);n!==-1&&o.splice(n,1),s.push(e)}let u=0;for(let e of s){if(u===0)c(e,t.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);c(e,t.coord+n*r*Qn*.5)}u++}let d=0;for(let e of o)d++,c(e,t.coord+d*Qn)}}for(let[e,t]of a.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:a}=P(e,o.get(t.start),o.get(t.end)),s=n.map(e=>{let t=h[e],n=ce.get(`${t.edgeIndex}-${t.segmentIndex}`)??t.pipe.coord;return{orient:t.orientation,coord:n,from:t.from,to:t.to}});r.push(i);for(let e=0;e$&&r.push(tr(t,i)),c&&o.orient===t.orient)if(Math.abs(t.coord-o.coord)>$){let e=t.orient===`vertical`?(i+o.from)/2:er(t,o);r.push(tr(t,e),tr(o,e))}else (e===0||e===s.length-2)&&r.push(tr(t,er(t,o)));else if(c)r.push(tr(t,o.coord));else{let e=Math.abs(t.from-i)$||Math.abs(c.y-a.y)>$)&&r.push(a);let l=[];r.length>0&&l.push(r[0]);for(let e=1;e$||Math.abs(t.y-n.y)>$)&&l.push(t)}t.points=l}for(let e of a){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}t.edges=(t.edges??[]).filter(e=>!e.isLayoutOnly);let le=e((e,t)=>{let n=t.x??0,r=t.y??0,i=t.width??0,a=t.height??0;if(i<=0||a<=0)return e;let o=n-i/2,s=n+i/2,c=r-a/2,l=r+a/2;if(e.xs||e.yl)return e;let u=e.x-o,d=s-e.x,f=e.y-c,p=l-e.y,m=Math.min(u,d,f,p);return m===u?{x:o,y:e.y}:m===d?{x:s,y:e.y}:m===f?{x:e.x,y:c}:{x:e.x,y:l}},`nodeBoundaryClamp`);for(let e of t.edges){let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,i=n?o.get(n):void 0,a=r?o.get(r):void 0;i&&(t[0]=le(t[0],i)),a&&(t[t.length-1]=le(t[t.length-1],a))}return t}e(nr,`routeEdgesOrthogonal`);function rr(e){return e.direction??`TB`}e(rr,`getSwimlaneDirection`);function ir(e){let t=A(e),n=e.config.flowchart?.nodeSpacing??40,r=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,s=rr(e),{ordered:c,coordinates:l}=Kn(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});j(t,c,l,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;nr(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return It(e,s),Ft(e),s}e(ir,`runSwimlaneLayoutCore`);function ar(e){k(e);let t=te(e);e.nodes=t.nodes,e.edges=t.edges}e(ar,`prepareSwimlaneLayout`);var or=r({prepareLayout:ar,runLayoutCore:ir,afterPaint:C});export{or as render}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-BMzCY_ka.js b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-BMzCY_ka.js new file mode 100644 index 000000000..760b85223 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-BMzCY_ka.js @@ -0,0 +1,8 @@ +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-B78kfBb6.js";import"./chunk-75Z2AOVW-CAoob5DH.js";import"./chunk-PWAF6VOD-D9eOryqj.js";import"./chunk-GMAD6QVW-dCDLGP3F.js";import"./chunk-P2QGCYS3-BTLpY7ks.js";import"./chunk-4HAMMTFA-Dlc4jvjp.js";import"./chunk-GVQU2GXP-Ddvf-Y11.js";import"./chunk-OSK3NFVY-ZXiPE9OQ.js";import"./chunk-F27PBJKO-Duq9tlNm.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-mwDJO2QS.js";import"./chunk-L3NEJ4N5-BKsN7TKH.js";import"./chunk-TLUHSLCS-B1Sp0tTt.js";import"./chunk-LNGE3PJU-OosUmKKA.js";import{r as t,t as n}from"./chunk-SHT3W25Y-DUVFz2b-.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)} + .swimlane.cluster rect { + stroke: ${e.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,`getStyles`)});export{r as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-BaMCRHZX.js b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-BaMCRHZX.js deleted file mode 100644 index 113578072..000000000 --- a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-BaMCRHZX.js +++ /dev/null @@ -1,8 +0,0 @@ -import"./src-CDd1avoI.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CcF2nKWM.js";import"./chunk-75Z2AOVW-Djshm1Dl.js";import"./chunk-P2QGCYS3-DOQphBqd.js";import"./chunk-PWAF6VOD-DCTitH5S.js";import"./chunk-GMAD6QVW-jIHtZ3sR.js";import"./chunk-4HAMMTFA-B0yXCELs.js";import"./chunk-GVQU2GXP-aw9OR1ii.js";import"./mermaidParser.worker-_pLIm6No.js";import"./chunk-F27PBJKO-BiUOMdWi.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-BiMU0_kH.js";import{r as t,t as n}from"./chunk-SHT3W25Y-DDD40i3c.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)} - .swimlane.cluster rect { - stroke: ${e.clusterBorder} !important; - } - [data-look="neo"].cluster rect { - filter: none; - } -`,`getStyles`)});export{r as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-CyBcQgTZ.js b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-CyBcQgTZ.js deleted file mode 100644 index 1b10fc917..000000000 --- a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-CyBcQgTZ.js +++ /dev/null @@ -1,8 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-Cn6kALDM.js";import"./chunk-DU6HZSFF-DfRjAqU1.js";import"./chunk-75Z2AOVW-D2HolPjd.js";import"./chunk-PWAF6VOD-vmg_e0ho.js";import"./chunk-GMAD6QVW-xizYnG4f.js";import"./chunk-P2QGCYS3-CQc2NCc1.js";import"./chunk-4HAMMTFA-B5soPjjq.js";import"./chunk-GVQU2GXP-BrOdU7Oy.js";import"./chunk-OSK3NFVY-BT2Y-lqQ.js";import"./chunk-F27PBJKO-DeO1S11A.js";import"./chunk-XXDRQBXY-Y1lmGfHA.js";import"./chunk-POPQ4Y6H-BCRCUUP_.js";import"./chunk-L3NEJ4N5-XwNqFvev.js";import"./chunk-TLUHSLCS-DN2eHVWx.js";import"./chunk-LNGE3PJU-OosUmKKA.js";import{r as t,t as n}from"./chunk-SHT3W25Y-BDvl1UFN.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)} - .swimlane.cluster rect { - stroke: ${e.clusterBorder} !important; - } - [data-look="neo"].cluster rect { - filter: none; - } -`,`getStyles`)});export{r as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-DHLXdf_D.js b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-DHLXdf_D.js new file mode 100644 index 000000000..10f017e67 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/swimlanesDiagram-VR7AAH4N-DHLXdf_D.js @@ -0,0 +1,8 @@ +import"./src-CDd1avoI.js";import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./chunk-DU6HZSFF-CbPIJzjs.js";import"./chunk-75Z2AOVW-3pIWy7Vc.js";import"./chunk-P2QGCYS3-DJwAvunU.js";import"./chunk-PWAF6VOD-Dsc8rvy3.js";import"./chunk-GMAD6QVW-DO6QncBh.js";import"./chunk-4HAMMTFA-X3JAMEe8.js";import"./chunk-GVQU2GXP-CCw5T6ST.js";import"./mermaidParser.worker-CBWarbNh.js";import"./chunk-F27PBJKO-DTzbeXt1.js";import"./chunk-XXDRQBXY-DHvxiZS2.js";import"./chunk-POPQ4Y6H-1k8n9Sa3.js";import{r as t,t as n}from"./chunk-SHT3W25Y-CC_ZJJY0.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)} + .swimlane.cluster rect { + stroke: ${e.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,`getStyles`)});export{r as diagram}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CLvi9syn.js b/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CFEx1g79.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CLvi9syn.js rename to apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CFEx1g79.js index 8dabc4356..3045835f9 100644 --- a/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CLvi9syn.js +++ b/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CFEx1g79.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-Cn6kALDM.js";import{$ as i,J as a,a as o,b as s,et as c,nt as l,o as u,x as d}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{t as f}from"./arc-CuHXSNPr.js";import{p}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as m}from"./chunk-CLGD4ZFX-D_luxf7b.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-Cn6kALDM.js";import{$ as i,J as a,a as o,b as s,et as c,nt as l,o as u,x as d}from"./chunk-DU6HZSFF-B78kfBb6.js";import{t as f}from"./arc-CuHXSNPr.js";import{p}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as m}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CA2p-k2-.js b/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-e0MrEXOq.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CA2p-k2-.js rename to apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-e0MrEXOq.js index fa79adc24..865202279 100644 --- a/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-CA2p-k2-.js +++ b/apps/pythinker-code/dist-web/assets/timeline-definition-24CTP7MA-e0MrEXOq.js @@ -1,4 +1,4 @@ -import{m as e,p as t}from"./src-CDd1avoI.js";import{n,t as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{J as i,a,b as o,et as s,o as c,rt as l,tt as u,x as d}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{t as f}from"./arc-cbkNQeCY.js";import{p}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{St as m}from"./mermaidParser.worker-_pLIm6No.js";var h=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: +import{m as e,p as t}from"./src-CDd1avoI.js";import{n,t as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{J as i,a,b as o,et as s,o as c,rt as l,tt as u,x as d}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{t as f}from"./arc-cbkNQeCY.js";import{p}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{St as m}from"./mermaidParser.worker-CBWarbNh.js";var h=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: `+h.showPosition()+` Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/tsMode-CJEjHu_A.js b/apps/pythinker-code/dist-web/assets/tsMode-lA__bS9d.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/tsMode-CJEjHu_A.js rename to apps/pythinker-code/dist-web/assets/tsMode-lA__bS9d.js index 93f47b685..9a9c5357d 100644 --- a/apps/pythinker-code/dist-web/assets/tsMode-CJEjHu_A.js +++ b/apps/pythinker-code/dist-web/assets/tsMode-lA__bS9d.js @@ -1,4 +1,4 @@ -import{a as e,c as t,f as n,h as r,o as i,p as a}from"./editor.api2-BIJacb07.js";import{n as o}from"./monaco.contribution-DqkvvJIb.js";import{t as s}from"./workers-lk8skNfQ.js";var c=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||=(async()=>(this._worker=s({moduleId:`vs/language/typescript/tsWorker`,createWorker:()=>new Worker(new URL(`/assets/ts.worker-DmlNd5GY.js`,``+import.meta.url),{type:`module`}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(a.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))(),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},l={};l[`lib.d.ts`]=!0,l[`lib.decorators.d.ts`]=!0,l[`lib.decorators.legacy.d.ts`]=!0,l[`lib.dom.asynciterable.d.ts`]=!0,l[`lib.dom.d.ts`]=!0,l[`lib.dom.iterable.d.ts`]=!0,l[`lib.es2015.collection.d.ts`]=!0,l[`lib.es2015.core.d.ts`]=!0,l[`lib.es2015.d.ts`]=!0,l[`lib.es2015.generator.d.ts`]=!0,l[`lib.es2015.iterable.d.ts`]=!0,l[`lib.es2015.promise.d.ts`]=!0,l[`lib.es2015.proxy.d.ts`]=!0,l[`lib.es2015.reflect.d.ts`]=!0,l[`lib.es2015.symbol.d.ts`]=!0,l[`lib.es2015.symbol.wellknown.d.ts`]=!0,l[`lib.es2016.array.include.d.ts`]=!0,l[`lib.es2016.d.ts`]=!0,l[`lib.es2016.full.d.ts`]=!0,l[`lib.es2016.intl.d.ts`]=!0,l[`lib.es2017.arraybuffer.d.ts`]=!0,l[`lib.es2017.d.ts`]=!0,l[`lib.es2017.date.d.ts`]=!0,l[`lib.es2017.full.d.ts`]=!0,l[`lib.es2017.intl.d.ts`]=!0,l[`lib.es2017.object.d.ts`]=!0,l[`lib.es2017.sharedmemory.d.ts`]=!0,l[`lib.es2017.string.d.ts`]=!0,l[`lib.es2017.typedarrays.d.ts`]=!0,l[`lib.es2018.asyncgenerator.d.ts`]=!0,l[`lib.es2018.asynciterable.d.ts`]=!0,l[`lib.es2018.d.ts`]=!0,l[`lib.es2018.full.d.ts`]=!0,l[`lib.es2018.intl.d.ts`]=!0,l[`lib.es2018.promise.d.ts`]=!0,l[`lib.es2018.regexp.d.ts`]=!0,l[`lib.es2019.array.d.ts`]=!0,l[`lib.es2019.d.ts`]=!0,l[`lib.es2019.full.d.ts`]=!0,l[`lib.es2019.intl.d.ts`]=!0,l[`lib.es2019.object.d.ts`]=!0,l[`lib.es2019.string.d.ts`]=!0,l[`lib.es2019.symbol.d.ts`]=!0,l[`lib.es2020.bigint.d.ts`]=!0,l[`lib.es2020.d.ts`]=!0,l[`lib.es2020.date.d.ts`]=!0,l[`lib.es2020.full.d.ts`]=!0,l[`lib.es2020.intl.d.ts`]=!0,l[`lib.es2020.number.d.ts`]=!0,l[`lib.es2020.promise.d.ts`]=!0,l[`lib.es2020.sharedmemory.d.ts`]=!0,l[`lib.es2020.string.d.ts`]=!0,l[`lib.es2020.symbol.wellknown.d.ts`]=!0,l[`lib.es2021.d.ts`]=!0,l[`lib.es2021.full.d.ts`]=!0,l[`lib.es2021.intl.d.ts`]=!0,l[`lib.es2021.promise.d.ts`]=!0,l[`lib.es2021.string.d.ts`]=!0,l[`lib.es2021.weakref.d.ts`]=!0,l[`lib.es2022.array.d.ts`]=!0,l[`lib.es2022.d.ts`]=!0,l[`lib.es2022.error.d.ts`]=!0,l[`lib.es2022.full.d.ts`]=!0,l[`lib.es2022.intl.d.ts`]=!0,l[`lib.es2022.object.d.ts`]=!0,l[`lib.es2022.regexp.d.ts`]=!0,l[`lib.es2022.string.d.ts`]=!0,l[`lib.es2023.array.d.ts`]=!0,l[`lib.es2023.collection.d.ts`]=!0,l[`lib.es2023.d.ts`]=!0,l[`lib.es2023.full.d.ts`]=!0,l[`lib.es2023.intl.d.ts`]=!0,l[`lib.es2024.arraybuffer.d.ts`]=!0,l[`lib.es2024.collection.d.ts`]=!0,l[`lib.es2024.d.ts`]=!0,l[`lib.es2024.full.d.ts`]=!0,l[`lib.es2024.object.d.ts`]=!0,l[`lib.es2024.promise.d.ts`]=!0,l[`lib.es2024.regexp.d.ts`]=!0,l[`lib.es2024.sharedmemory.d.ts`]=!0,l[`lib.es2024.string.d.ts`]=!0,l[`lib.es5.d.ts`]=!0,l[`lib.es6.d.ts`]=!0,l[`lib.esnext.array.d.ts`]=!0,l[`lib.esnext.collection.d.ts`]=!0,l[`lib.esnext.d.ts`]=!0,l[`lib.esnext.decorators.d.ts`]=!0,l[`lib.esnext.disposable.d.ts`]=!0,l[`lib.esnext.error.d.ts`]=!0,l[`lib.esnext.float16.d.ts`]=!0,l[`lib.esnext.full.d.ts`]=!0,l[`lib.esnext.intl.d.ts`]=!0,l[`lib.esnext.iterator.d.ts`]=!0,l[`lib.esnext.promise.d.ts`]=!0,l[`lib.esnext.sharedmemory.d.ts`]=!0,l[`lib.scripthost.d.ts`]=!0,l[`lib.webworker.asynciterable.d.ts`]=!0,l[`lib.webworker.d.ts`]=!0,l[`lib.webworker.importscripts.d.ts`]=!0,l[`lib.webworker.iterable.d.ts`]=!0;function u(e,t,n=0){if(typeof e==`string`)return e;if(e===void 0)return``;let r=``;if(n){r+=t;for(let e=0;ee.text).join(``):``}var f=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:i,column:a}=n,{lineNumber:o,column:s}=r;return{startLineNumber:i,startColumn:a,endLineNumber:o,endColumn:s}}},p=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf(`/lib.`)===0?!!l[e.path.slice(1)]:!1}getOrCreateModel(e){let t=n.parse(e),r=a.getModel(t);if(r)return r;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return a.createModel(this._libFiles[t.path.slice(1)],`typescript`,t);let i=o.getExtraLibs()[e];return i?a.createModel(i.content,`typescript`,t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}),this._fetchLibFilesPromise}},m=class extends f{constructor(e,t,n,r){super(r),this._libFiles=e,this._defaults=t,this._selector=n,this._disposables=[],this._listener=Object.create(null);let i=e=>{if(e.getLanguageId()!==n)return;let t=()=>{let{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)},r,i=e.onDidChangeContent(()=>{clearTimeout(r),r=window.setTimeout(t,500)}),o=e.onDidChangeAttached(()=>{let{onlyVisible:n}=this._defaults.getDiagnosticsOptions();n&&(e.isAttachedToEditor()?t():a.setModelMarkers(e,this._selector,[]))});this._listener[e.uri.toString()]={dispose(){i.dispose(),o.dispose(),clearTimeout(r)}},t()},o=e=>{a.setModelMarkers(e,this._selector,[]);let t=e.uri.toString();this._listener[t]&&(this._listener[t].dispose(),delete this._listener[t])};this._disposables.push(a.onDidCreateModel(e=>i(e))),this._disposables.push(a.onWillDisposeModel(o)),this._disposables.push(a.onDidChangeModelLanguage(e=>{o(e.model),i(e.model)})),this._disposables.push({dispose(){for(let e of a.getModels())o(e)}});let s=()=>{for(let e of a.getModels())o(e),i(e)};this._disposables.push(this._defaults.onDidChange(s)),this._disposables.push(this._defaults.onDidExtraLibsChange(s)),a.getModels().forEach(e=>i(e))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let t=await this._worker(e.uri);if(e.isDisposed())return;let r=[],{noSyntaxValidation:i,noSemanticValidation:o,noSuggestionDiagnostics:s}=this._defaults.getDiagnosticsOptions();i||r.push(t.getSyntacticDiagnostics(e.uri.toString())),o||r.push(t.getSemanticDiagnostics(e.uri.toString())),s||r.push(t.getSuggestionDiagnostics(e.uri.toString()));let c=await Promise.all(r);if(!c||e.isDisposed())return;let l=c.reduce((e,t)=>t.concat(e),[]).filter(e=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)===-1),u=l.map(e=>e.relatedInformation||[]).reduce((e,t)=>t.concat(e),[]).map(e=>e.file?n.parse(e.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&a.setModelMarkers(e,this._selector,l.map(t=>this._convertDiagnostics(e,t)))}_convertDiagnostics(e,t){let n=t.start||0,r=t.length||1,{lineNumber:a,column:o}=e.getPositionAt(n),{lineNumber:s,column:c}=e.getPositionAt(n+r),l=[];return t.reportsUnnecessary&&l.push(i.Unnecessary),t.reportsDeprecated&&l.push(i.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:a,startColumn:o,endLineNumber:s,endColumn:c,message:u(t.messageText,` +import{a as e,c as t,f as n,h as r,o as i,p as a}from"./editor.api2-DVs509bq.js";import{n as o}from"./monaco.contribution-C71ieqbT.js";import{t as s}from"./workers-CzVdMsP_.js";var c=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||=(async()=>(this._worker=s({moduleId:`vs/language/typescript/tsWorker`,createWorker:()=>new Worker(new URL(`/assets/ts.worker-DmlNd5GY.js`,``+import.meta.url),{type:`module`}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(a.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))(),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},l={};l[`lib.d.ts`]=!0,l[`lib.decorators.d.ts`]=!0,l[`lib.decorators.legacy.d.ts`]=!0,l[`lib.dom.asynciterable.d.ts`]=!0,l[`lib.dom.d.ts`]=!0,l[`lib.dom.iterable.d.ts`]=!0,l[`lib.es2015.collection.d.ts`]=!0,l[`lib.es2015.core.d.ts`]=!0,l[`lib.es2015.d.ts`]=!0,l[`lib.es2015.generator.d.ts`]=!0,l[`lib.es2015.iterable.d.ts`]=!0,l[`lib.es2015.promise.d.ts`]=!0,l[`lib.es2015.proxy.d.ts`]=!0,l[`lib.es2015.reflect.d.ts`]=!0,l[`lib.es2015.symbol.d.ts`]=!0,l[`lib.es2015.symbol.wellknown.d.ts`]=!0,l[`lib.es2016.array.include.d.ts`]=!0,l[`lib.es2016.d.ts`]=!0,l[`lib.es2016.full.d.ts`]=!0,l[`lib.es2016.intl.d.ts`]=!0,l[`lib.es2017.arraybuffer.d.ts`]=!0,l[`lib.es2017.d.ts`]=!0,l[`lib.es2017.date.d.ts`]=!0,l[`lib.es2017.full.d.ts`]=!0,l[`lib.es2017.intl.d.ts`]=!0,l[`lib.es2017.object.d.ts`]=!0,l[`lib.es2017.sharedmemory.d.ts`]=!0,l[`lib.es2017.string.d.ts`]=!0,l[`lib.es2017.typedarrays.d.ts`]=!0,l[`lib.es2018.asyncgenerator.d.ts`]=!0,l[`lib.es2018.asynciterable.d.ts`]=!0,l[`lib.es2018.d.ts`]=!0,l[`lib.es2018.full.d.ts`]=!0,l[`lib.es2018.intl.d.ts`]=!0,l[`lib.es2018.promise.d.ts`]=!0,l[`lib.es2018.regexp.d.ts`]=!0,l[`lib.es2019.array.d.ts`]=!0,l[`lib.es2019.d.ts`]=!0,l[`lib.es2019.full.d.ts`]=!0,l[`lib.es2019.intl.d.ts`]=!0,l[`lib.es2019.object.d.ts`]=!0,l[`lib.es2019.string.d.ts`]=!0,l[`lib.es2019.symbol.d.ts`]=!0,l[`lib.es2020.bigint.d.ts`]=!0,l[`lib.es2020.d.ts`]=!0,l[`lib.es2020.date.d.ts`]=!0,l[`lib.es2020.full.d.ts`]=!0,l[`lib.es2020.intl.d.ts`]=!0,l[`lib.es2020.number.d.ts`]=!0,l[`lib.es2020.promise.d.ts`]=!0,l[`lib.es2020.sharedmemory.d.ts`]=!0,l[`lib.es2020.string.d.ts`]=!0,l[`lib.es2020.symbol.wellknown.d.ts`]=!0,l[`lib.es2021.d.ts`]=!0,l[`lib.es2021.full.d.ts`]=!0,l[`lib.es2021.intl.d.ts`]=!0,l[`lib.es2021.promise.d.ts`]=!0,l[`lib.es2021.string.d.ts`]=!0,l[`lib.es2021.weakref.d.ts`]=!0,l[`lib.es2022.array.d.ts`]=!0,l[`lib.es2022.d.ts`]=!0,l[`lib.es2022.error.d.ts`]=!0,l[`lib.es2022.full.d.ts`]=!0,l[`lib.es2022.intl.d.ts`]=!0,l[`lib.es2022.object.d.ts`]=!0,l[`lib.es2022.regexp.d.ts`]=!0,l[`lib.es2022.string.d.ts`]=!0,l[`lib.es2023.array.d.ts`]=!0,l[`lib.es2023.collection.d.ts`]=!0,l[`lib.es2023.d.ts`]=!0,l[`lib.es2023.full.d.ts`]=!0,l[`lib.es2023.intl.d.ts`]=!0,l[`lib.es2024.arraybuffer.d.ts`]=!0,l[`lib.es2024.collection.d.ts`]=!0,l[`lib.es2024.d.ts`]=!0,l[`lib.es2024.full.d.ts`]=!0,l[`lib.es2024.object.d.ts`]=!0,l[`lib.es2024.promise.d.ts`]=!0,l[`lib.es2024.regexp.d.ts`]=!0,l[`lib.es2024.sharedmemory.d.ts`]=!0,l[`lib.es2024.string.d.ts`]=!0,l[`lib.es5.d.ts`]=!0,l[`lib.es6.d.ts`]=!0,l[`lib.esnext.array.d.ts`]=!0,l[`lib.esnext.collection.d.ts`]=!0,l[`lib.esnext.d.ts`]=!0,l[`lib.esnext.decorators.d.ts`]=!0,l[`lib.esnext.disposable.d.ts`]=!0,l[`lib.esnext.error.d.ts`]=!0,l[`lib.esnext.float16.d.ts`]=!0,l[`lib.esnext.full.d.ts`]=!0,l[`lib.esnext.intl.d.ts`]=!0,l[`lib.esnext.iterator.d.ts`]=!0,l[`lib.esnext.promise.d.ts`]=!0,l[`lib.esnext.sharedmemory.d.ts`]=!0,l[`lib.scripthost.d.ts`]=!0,l[`lib.webworker.asynciterable.d.ts`]=!0,l[`lib.webworker.d.ts`]=!0,l[`lib.webworker.importscripts.d.ts`]=!0,l[`lib.webworker.iterable.d.ts`]=!0;function u(e,t,n=0){if(typeof e==`string`)return e;if(e===void 0)return``;let r=``;if(n){r+=t;for(let e=0;ee.text).join(``):``}var f=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:i,column:a}=n,{lineNumber:o,column:s}=r;return{startLineNumber:i,startColumn:a,endLineNumber:o,endColumn:s}}},p=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf(`/lib.`)===0?!!l[e.path.slice(1)]:!1}getOrCreateModel(e){let t=n.parse(e),r=a.getModel(t);if(r)return r;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return a.createModel(this._libFiles[t.path.slice(1)],`typescript`,t);let i=o.getExtraLibs()[e];return i?a.createModel(i.content,`typescript`,t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}),this._fetchLibFilesPromise}},m=class extends f{constructor(e,t,n,r){super(r),this._libFiles=e,this._defaults=t,this._selector=n,this._disposables=[],this._listener=Object.create(null);let i=e=>{if(e.getLanguageId()!==n)return;let t=()=>{let{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)},r,i=e.onDidChangeContent(()=>{clearTimeout(r),r=window.setTimeout(t,500)}),o=e.onDidChangeAttached(()=>{let{onlyVisible:n}=this._defaults.getDiagnosticsOptions();n&&(e.isAttachedToEditor()?t():a.setModelMarkers(e,this._selector,[]))});this._listener[e.uri.toString()]={dispose(){i.dispose(),o.dispose(),clearTimeout(r)}},t()},o=e=>{a.setModelMarkers(e,this._selector,[]);let t=e.uri.toString();this._listener[t]&&(this._listener[t].dispose(),delete this._listener[t])};this._disposables.push(a.onDidCreateModel(e=>i(e))),this._disposables.push(a.onWillDisposeModel(o)),this._disposables.push(a.onDidChangeModelLanguage(e=>{o(e.model),i(e.model)})),this._disposables.push({dispose(){for(let e of a.getModels())o(e)}});let s=()=>{for(let e of a.getModels())o(e),i(e)};this._disposables.push(this._defaults.onDidChange(s)),this._disposables.push(this._defaults.onDidExtraLibsChange(s)),a.getModels().forEach(e=>i(e))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let t=await this._worker(e.uri);if(e.isDisposed())return;let r=[],{noSyntaxValidation:i,noSemanticValidation:o,noSuggestionDiagnostics:s}=this._defaults.getDiagnosticsOptions();i||r.push(t.getSyntacticDiagnostics(e.uri.toString())),o||r.push(t.getSemanticDiagnostics(e.uri.toString())),s||r.push(t.getSuggestionDiagnostics(e.uri.toString()));let c=await Promise.all(r);if(!c||e.isDisposed())return;let l=c.reduce((e,t)=>t.concat(e),[]).filter(e=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)===-1),u=l.map(e=>e.relatedInformation||[]).reduce((e,t)=>t.concat(e),[]).map(e=>e.file?n.parse(e.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&a.setModelMarkers(e,this._selector,l.map(t=>this._convertDiagnostics(e,t)))}_convertDiagnostics(e,t){let n=t.start||0,r=t.length||1,{lineNumber:a,column:o}=e.getPositionAt(n),{lineNumber:s,column:c}=e.getPositionAt(n+r),l=[];return t.reportsUnnecessary&&l.push(i.Unnecessary),t.reportsDeprecated&&l.push(i.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:a,startColumn:o,endLineNumber:s,endColumn:c,message:u(t.messageText,` `),code:t.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];let n=[];return t.forEach(t=>{let r=e;if(t.file&&(r=this._libFiles.getOrCreateModel(t.file.fileName)),!r)return;let i=t.start||0,a=t.length||1,{lineNumber:o,column:s}=r.getPositionAt(i),{lineNumber:c,column:l}=r.getPositionAt(i+a);n.push({resource:r.uri,startLineNumber:o,startColumn:s,endLineNumber:c,endColumn:l,message:u(t.messageText,` `)})}),n}_tsDiagnosticCategoryToMarkerSeverity(t){switch(t){case 1:return e.Error;case 3:return e.Info;case 0:return e.Warning;case 2:return e.Hint}return e.Info}},h=class e extends f{get triggerCharacters(){return[`.`]}async provideCompletionItems(n,i,a,o){let s=n.getWordUntilPosition(i),c=new t(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=n.uri,u=n.getOffsetAt(i),d=await this._worker(l);if(n.isDisposed())return;let f=await d.getCompletionsAtPosition(l.toString(),u);if(!(!f||n.isDisposed()))return{suggestions:f.entries.map(a=>{let o=c;if(a.replacementSpan){let e=n.getPositionAt(a.replacementSpan.start),r=n.getPositionAt(a.replacementSpan.start+a.replacementSpan.length);o=new t(e.lineNumber,e.column,r.lineNumber,r.column)}let s=[];return a.kindModifiers!==void 0&&a.kindModifiers.indexOf(`deprecated`)!==-1&&s.push(r.CompletionItemTag.Deprecated),{uri:l,position:i,offset:u,range:o,label:a.name,insertText:a.name,sortText:a.sortText,kind:e.convertKind(a.kind),tags:s}})}}async resolveCompletionItem(t,n){let r=t,i=r.uri,a=r.position,o=r.offset,s=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),o,r.label);return s?{uri:i,position:a,label:s.name,kind:e.convertKind(s.kind),detail:d(s.displayParts),documentation:{value:e.createDocumentationString(s)}}:r}static convertKind(e){switch(e){case C.primitiveType:case C.keyword:return r.CompletionItemKind.Keyword;case C.variable:case C.localVariable:return r.CompletionItemKind.Variable;case C.memberVariable:case C.memberGetAccessor:case C.memberSetAccessor:return r.CompletionItemKind.Field;case C.function:case C.memberFunction:case C.constructSignature:case C.callSignature:case C.indexSignature:return r.CompletionItemKind.Function;case C.enum:return r.CompletionItemKind.Enum;case C.module:return r.CompletionItemKind.Module;case C.class:return r.CompletionItemKind.Class;case C.interface:return r.CompletionItemKind.Interface;case C.warning:return r.CompletionItemKind.File}return r.CompletionItemKind.Property}static createDocumentationString(e){let t=d(e.documentation);if(e.tags)for(let n of e.tags)t+=` diff --git a/apps/pythinker-code/dist-web/assets/typescript-DEieVXYx.js b/apps/pythinker-code/dist-web/assets/typescript-Bz0Zph5S.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/typescript-DEieVXYx.js rename to apps/pythinker-code/dist-web/assets/typescript-Bz0Zph5S.js index 0d94e9f06..036087439 100644 --- a/apps/pythinker-code/dist-web/assets/typescript-DEieVXYx.js +++ b/apps/pythinker-code/dist-web/assets/typescript-Bz0Zph5S.js @@ -1 +1 @@ -import{h as e}from"./editor.api2-BIJacb07.js";var t={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:` * `}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:` * `}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:`* `}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]},{open:"`",close:"`",notIn:[`string`,`comment`]},{open:`/**`,close:` */`,notIn:[`string`]}],folding:{markers:{start:RegExp(`^\\s*//\\s*#?region\\b`),end:RegExp(`^\\s*//\\s*#?endregion\\b`)}}},n={defaultToken:`invalid`,tokenPostfix:`.ts`,keywords:`abstract.any.as.asserts.bigint.boolean.break.case.catch.class.continue.const.constructor.debugger.declare.default.delete.do.else.enum.export.extends.false.finally.for.from.function.get.if.implements.import.in.infer.instanceof.interface.is.keyof.let.module.namespace.never.new.null.number.object.out.package.private.protected.public.override.readonly.require.global.return.satisfies.set.static.string.super.switch.symbol.this.throw.true.try.type.typeof.undefined.unique.unknown.var.void.while.with.yield.async.await.of`.split(`.`),operators:`<=.>=.==.!=.===.!==.=>.+.-.**.*./.%.++.--.<<.>.>>>.&.|.^.!.~.&&.||.??.?.:.=.+=.-=.*=.**=./=.%=.<<=.>>=.>>>=.&=.|=.^=.@`.split(`.`),symbols:/[=>](?!@symbols)/,`@brackets`],[/!(?=([^=]|$))/,`delimiter`],[/@symbols/,{cases:{"@operators":`delimiter`,"@default":``}}],[/(@digits)[eE]([\-+]?(@digits))?/,`number.float`],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,`number.float`],[/0[xX](@hexdigits)n?/,`number.hex`],[/0[oO]?(@octaldigits)n?/,`number.octal`],[/0[bB](@binarydigits)n?/,`number.binary`],[/(@digits)n?/,`number`],[/[;,.]/,`delimiter`],[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/"/,`string`,`@string_double`],[/'/,`string`,`@string_single`],[/`/,`string`,`@string_backtick`]],whitespace:[[/[ \t\r\n]+/,``],[/\/\*\*(?!\/)/,`comment.doc`,`@jsdoc`],[/\/\*/,`comment`,`@comment`],[/\/\/.*$/,`comment`]],comment:[[/[^\/*]+/,`comment`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],jsdoc:[[/[^\/*]+/,`comment.doc`],[/\*\//,`comment.doc`,`@pop`],[/[\/*]/,`comment.doc`]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,[`regexp.escape.control`,`regexp.escape.control`,`regexp.escape.control`]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,[`regexp.escape.control`,{token:`regexp.escape.control`,next:`@regexrange`}]],[/(\()(\?:|\?=|\?!)/,[`regexp.escape.control`,`regexp.escape.control`]],[/[()]/,`regexp.escape.control`],[/@regexpctl/,`regexp.escape.control`],[/[^\\\/]/,`regexp`],[/@regexpesc/,`regexp.escape`],[/\\\./,`regexp.invalid`],[/(\/)([dgimsuy]*)/,[{token:`regexp`,bracket:`@close`,next:`@pop`},`keyword.other`]]],regexrange:[[/-/,`regexp.escape.control`],[/\^/,`regexp.invalid`],[/@regexpesc/,`regexp.escape`],[/[^\]]/,`regexp`],[/\]/,{token:`regexp.escape.control`,next:`@pop`,bracket:`@close`}]],string_double:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],string_single:[[/[^\\']+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/'/,`string`,`@pop`]],string_backtick:[[/\$\{/,{token:`delimiter.bracket`,next:`@bracketCounting`}],[/[^\\`$]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/`/,`string`,`@pop`]],bracketCounting:[[/\{/,`delimiter.bracket`,`@bracketCounting`],[/\}/,`delimiter.bracket`,`@pop`],{include:`common`}]}};export{t as conf,n as language}; \ No newline at end of file +import{h as e}from"./editor.api2-DVs509bq.js";var t={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:` * `}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:` * `}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:`* `}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]},{open:"`",close:"`",notIn:[`string`,`comment`]},{open:`/**`,close:` */`,notIn:[`string`]}],folding:{markers:{start:RegExp(`^\\s*//\\s*#?region\\b`),end:RegExp(`^\\s*//\\s*#?endregion\\b`)}}},n={defaultToken:`invalid`,tokenPostfix:`.ts`,keywords:`abstract.any.as.asserts.bigint.boolean.break.case.catch.class.continue.const.constructor.debugger.declare.default.delete.do.else.enum.export.extends.false.finally.for.from.function.get.if.implements.import.in.infer.instanceof.interface.is.keyof.let.module.namespace.never.new.null.number.object.out.package.private.protected.public.override.readonly.require.global.return.satisfies.set.static.string.super.switch.symbol.this.throw.true.try.type.typeof.undefined.unique.unknown.var.void.while.with.yield.async.await.of`.split(`.`),operators:`<=.>=.==.!=.===.!==.=>.+.-.**.*./.%.++.--.<<.>.>>>.&.|.^.!.~.&&.||.??.?.:.=.+=.-=.*=.**=./=.%=.<<=.>>=.>>>=.&=.|=.^=.@`.split(`.`),symbols:/[=>](?!@symbols)/,`@brackets`],[/!(?=([^=]|$))/,`delimiter`],[/@symbols/,{cases:{"@operators":`delimiter`,"@default":``}}],[/(@digits)[eE]([\-+]?(@digits))?/,`number.float`],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,`number.float`],[/0[xX](@hexdigits)n?/,`number.hex`],[/0[oO]?(@octaldigits)n?/,`number.octal`],[/0[bB](@binarydigits)n?/,`number.binary`],[/(@digits)n?/,`number`],[/[;,.]/,`delimiter`],[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/"/,`string`,`@string_double`],[/'/,`string`,`@string_single`],[/`/,`string`,`@string_backtick`]],whitespace:[[/[ \t\r\n]+/,``],[/\/\*\*(?!\/)/,`comment.doc`,`@jsdoc`],[/\/\*/,`comment`,`@comment`],[/\/\/.*$/,`comment`]],comment:[[/[^\/*]+/,`comment`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],jsdoc:[[/[^\/*]+/,`comment.doc`],[/\*\//,`comment.doc`,`@pop`],[/[\/*]/,`comment.doc`]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,[`regexp.escape.control`,`regexp.escape.control`,`regexp.escape.control`]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,[`regexp.escape.control`,{token:`regexp.escape.control`,next:`@regexrange`}]],[/(\()(\?:|\?=|\?!)/,[`regexp.escape.control`,`regexp.escape.control`]],[/[()]/,`regexp.escape.control`],[/@regexpctl/,`regexp.escape.control`],[/[^\\\/]/,`regexp`],[/@regexpesc/,`regexp.escape`],[/\\\./,`regexp.invalid`],[/(\/)([dgimsuy]*)/,[{token:`regexp`,bracket:`@close`,next:`@pop`},`keyword.other`]]],regexrange:[[/-/,`regexp.escape.control`],[/\^/,`regexp.invalid`],[/@regexpesc/,`regexp.escape`],[/[^\]]/,`regexp`],[/\]/,{token:`regexp.escape.control`,next:`@pop`,bracket:`@close`}]],string_double:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],string_single:[[/[^\\']+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/'/,`string`,`@pop`]],string_backtick:[[/\$\{/,{token:`delimiter.bracket`,next:`@bracketCounting`}],[/[^\\`$]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/`/,`string`,`@pop`]],bracketCounting:[[/\{/,`delimiter.bracket`,`@bracketCounting`],[/\}/,`delimiter.bracket`,`@pop`],{include:`common`}]}};export{t as conf,n as language}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-d5wXmin-.js b/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-CILDRbLA.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-d5wXmin-.js rename to apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-CILDRbLA.js index 4603438ea..47cdb911d 100644 --- a/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-d5wXmin-.js +++ b/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-CILDRbLA.js @@ -1,4 +1,4 @@ -import{p as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,K as r,U as i,a,b as o,c as s,et as c,f as l,nt as u,rt as d,tt as f,v as p,w as m,y as h}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{i as g}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{t as _}from"./rough.esm-BojvWvqL.js";import{St as v}from"./mermaidParser.worker-_pLIm6No.js";const y=(e,t)=>u(e,`a`,-t),b=1e-10;function x(e,t){let n=C(e),r=n.filter(t=>S(t,e)),i=0,a=0,o=[];if(r.length>1){let t=O(r);for(let e=0;et.angle-e.angle);let n=r[r.length-1];for(let t=0;tr.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=w(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;nMath.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-b,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function S(e,t){return t.every(t=>T(e,t)=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return w(e,r)+w(t,i)}function D(e,t){let n=T(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function O(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}function k(e,t,n,r){r||={};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),c=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n=0&&(t=n),Math.abs(c)A(t))}function M(e,t){let n=0;for(let r=0;re.fx-t.fx,_=t.slice(),v=t.slice(),y=t.slice(),b=t.slice();for(let t=0;t{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:m[0].slice(),fx:m[0].fx,simplex:e})}f=0;for(let e=0;e=m[p-1].fx){let n=!1;if(v.fx>t.fx?(F(y,1+u,_,-u,t),y.fx=e(y),y.fx=1)break;for(let t=1;ts+a*i*c||l>=p)f=i;else{if(Math.abs(d)<=-o*c)return i;d*(f-u)>=0&&(f=u),u=i,p=l}return 0}for(let m=0;m<10;++m){if(F(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=M(r.fxprime,t),l>s+a*i*c||m&&l>=u)return p(f,i,u);if(Math.abs(d)<=-o*c)return i;if(d>=0)return p(i,f,l);u=l,f=i,i*=2}return i}function R(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,c=1,l;n||={},l=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),P(o,r.fxprime,-1);for(let t=0;t{let t={};for(let n=0;nE(e,t,r)-n,0,e+t)}function ne(e,t={}){let n=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(`;`)}if(n){let e=new Map;for(let t of r)for(let n=0;ne===t?0:ee.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=z(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let c=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?c=1:e.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c}),{distances:r,constraints:i}}function ie(e,t,n,r){for(let e=0;e0&&m<=d||f<0&&m>=d||(i+=2*h*h,t[2*a]+=4*h*(o-l),t[2*a+1]+=4*h*(s-u),t[2*c]+=4*h*(l-o),t[2*c+1]+=4*h*(u-s))}}return i}function ae(e,t={}){let n=se(e,t),r=t.lossFunction||B;if(e.length>=8){let i=oe(e,t),a=r(i,e),o=r(n,e);a+1e-8e.map(e=>e/s));let c=(e,t)=>ie(e,t,a,o),l=null;for(let e=0;ee.sets.length===2);for(let t of e){let e=t.weight==null?1:t.weight,n=t.sets[0],a=t.sets[1];t.size+te>=Math.min(r[n].size,r[a].size)&&(e=0),i[n].push({set:a,size:t.size,weight:e}),i[a].push({set:n,size:t.size,weight:e})}let a=[];Object.keys(i).forEach(e=>{let t=0;for(let n=0;ne[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function ce(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=E(n.radius,i.radius,T(n,i))}else t=x(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function le(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&T(e[0],e[1])1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}function ue(e){e.forEach(e=>{e.parent=e});function t(e){return e.parent!==e&&(e.parent=t(e.parent)),e.parent}function n(e,n){let r=t(e);r.parent=t(n)}for(let t=0;t{delete e.parent}),Array.from(r.values())}function V(e){let t=t=>({max:e.reduce((e,n)=>Math.max(e,n[t]+n.radius),-1/0),min:e.reduce((e,n)=>Math.min(e,n[t]-n.radius),1/0)});return{xRange:t(`x`),yRange:t(`y`)}}function de(e,t,n){t??=Math.PI/2;let r=me(e).map(e=>Object.assign({},e)),i=ue(r);for(let e of i){le(e,t,n);let r=V(e);e.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),e.bounds=r}i.sort((e,t)=>t.size-e.size),r=i[0];let a=r.bounds,o=(a.xRange.max-a.xRange.min)/50;function s(e,t,n){if(!e)return;let i=e.bounds,s,c;if(t)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;let e=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;e<0&&(s+=e)}if(n)c=a.yRange.max-i.yRange.min+o;else{c=a.yRange.max-i.yRange.max;let e=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;e<0&&(c+=e)}for(let t of e)t.x+=s,t.y+=c,r.push(t)}let c=1;for(;c({radius:u*e.radius,x:r+d+(e.x-o.min)*u,y:r+f+(e.y-s.min)*u,setid:e.setid})))}function pe(e){let t={};for(let n of e)t[n.setid]=n;return t}function me(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function he(e={}){let t=!1,n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,c=null,l=!0,u=!0,d=null,f=null,p=!1,m=null,h=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,g={},_=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],v=0,y=function(e){if(e in g)return g[e];var t=g[e]=_[v];return v+=1,v>=_.length&&(v=0),t},b=ee,x=B;function S(g){let _=g.datum(),v=new Set;_.forEach(e=>{e.size==0&&e.sets.length==1&&v.add(e.sets[0])}),_=_.filter(e=>!e.sets.some(e=>v.has(e)));let S={},C={};if(_.length>0){let e=b(_,{lossFunction:x,distinct:p});s&&(e=de(e,o,f)),S=fe(e,n,r,i,c),C=ve(S,_,h)}let w={};_.forEach(e=>{e.label&&(w[e.sets]=e.label)});function T(e){if(e.sets in w)return w[e.sets];if(e.sets.length==1)return``+e.sets[0]}g.selectAll(`svg`).data([S]).enter().append(`svg`);let E=g.select(`svg`);t?E.attr(`viewBox`,`0 0 ${n} ${r}`):E.attr(`width`,n).attr(`height`,r);let D={},O=!1;E.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!p&&(O=!0,D[e.sets[0]]=be(t))});function k(e){return t=>Ce(e.sets.map(e=>{let i=D[e],a=S[e];return i||={x:n/2,y:r/2,radius:1},a||={x:n/2,y:r/2,radius:1},{x:i.x*(1-t)+a.x*t,y:i.y*(1-t)+a.y*t,radius:i.radius*(1-t)+a.radius*t}}),m)}let A=E.selectAll(`.venn-area`).data(_,e=>e.sets),j=A.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),M=j.append(`path`),N=j.append(`text`).attr(`class`,`label`).text(e=>T(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,n/2).attr(`y`,r/2);u&&(M.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:y(e.sets)).style(`fill-opacity`,`.25`),N.style(`fill`,t=>t.colour||t.color?`#FFF`:e.textFill?e.textFill:t.sets.length==1?y(t.sets):`#444`));function P(e){return typeof e.transition==`function`?e.transition(`venn`).duration(a):e}let F=g;O&&typeof F.transition==`function`?(F=P(g),F.selectAll(`path`).attrTween(`d`,k)):F.selectAll(`path`).attr(`d`,e=>Ce(e.sets.map(e=>S[e])),m);let I=F.selectAll(`text`).filter(e=>e.sets in C).text(e=>T(e)).attr(`x`,e=>Math.floor(C[e.sets].x)).attr(`y`,e=>Math.floor(C[e.sets].y));l&&(O?`on`in I?I.on(`end`,H(S,T)):I.each(`end`,H(S,T)):I.each(H(S,T)));let L=P(A.exit()).remove();typeof A.transition==`function`&&L.selectAll(`path`).attrTween(`d`,k);let R=L.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),I.style(`font-size`,d),R.style(`font-size`,`0px`)),{circles:S,textCentres:C,nodes:A,enter:j,update:F,exit:L}}return S.wrap=function(e){return arguments.length?(l=e,S):l},S.useViewBox=function(){return t=!0,S},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.padding=function(e){return arguments.length?(i=e,S):i},S.distinct=function(e){return arguments.length?(p=e,S):p},S.colours=function(e){return arguments.length?(y=e,S):y},S.colors=function(e){return arguments.length?(y=e,S):y},S.fontSize=function(e){return arguments.length?(d=e,S):d},S.round=function(e){return arguments.length?(m=e,S):m},S.duration=function(e){return arguments.length?(a=e,S):a},S.layoutFunction=function(e){return arguments.length?(b=e,S):b},S.normalize=function(e){return arguments.length?(s=e,S):s},S.scaleToFit=function(e){return arguments.length?(c=e,S):c},S.styled=function(e){return arguments.length?(u=e,S):u},S.orientation=function(e){return arguments.length?(o=e,S):o},S.orientationOrder=function(e){return arguments.length?(f=e,S):f},S.lossFunction=function(e){return arguments.length?(x=e==="default"?B:e===`logRatio`?ce:e,S):x},S}function H(e,t){return function(n){let r=this,i=e[n.sets[0]].radius||50,a=t(n)||``,o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3,c=o.pop(),l=[c],u=0,d=1.1;r.textContent=null;let f=[];function p(e){let t=r.ownerDocument.createElementNS(r.namespaceURI,`tspan`);return t.textContent=e,f.push(t),r.append(t),t}let m=p(c);for(;c=o.pop(),c;){l.push(c);let e=l.join(` `);m.textContent=e,e.length>s&&m.getComputedTextLength()>i&&(l.pop(),m.textContent=l.join(` `),l=[c],m=p(c),u++)}let h=.35-u*d/2,g=r.getAttribute(`x`),_=r.getAttribute(`y`);f.forEach((e,t)=>{e.setAttribute(`x`,g),e.setAttribute(`y`,_),e.setAttribute(`dy`,`${h+t*d}em`)})}}function U(e,t,n){let r=t[0].radius-T(t[0],e);for(let n=1;n=a&&(i=r[n],a=o)}let o=I(n=>-1*U({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(T(s,t)>t.radius){c=!1;break}for(let e of t)if(T(s,e)e.p1))}function _e(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function ye(e,t,n){let r=[];return r.push(` +import{p as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{H as n,K as r,U as i,a,b as o,c as s,et as c,f as l,nt as u,rt as d,tt as f,v as p,w as m,y as h}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{i as g}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{t as _}from"./rough.esm-BojvWvqL.js";import{St as v}from"./mermaidParser.worker-CBWarbNh.js";const y=(e,t)=>u(e,`a`,-t),b=1e-10;function x(e,t){let n=C(e),r=n.filter(t=>S(t,e)),i=0,a=0,o=[];if(r.length>1){let t=O(r);for(let e=0;et.angle-e.angle);let n=r[r.length-1];for(let t=0;tr.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=w(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;nMath.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-b,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function S(e,t){return t.every(t=>T(e,t)=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return w(e,r)+w(t,i)}function D(e,t){let n=T(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function O(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}function k(e,t,n,r){r||={};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),c=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n=0&&(t=n),Math.abs(c)A(t))}function M(e,t){let n=0;for(let r=0;re.fx-t.fx,_=t.slice(),v=t.slice(),y=t.slice(),b=t.slice();for(let t=0;t{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:m[0].slice(),fx:m[0].fx,simplex:e})}f=0;for(let e=0;e=m[p-1].fx){let n=!1;if(v.fx>t.fx?(F(y,1+u,_,-u,t),y.fx=e(y),y.fx=1)break;for(let t=1;ts+a*i*c||l>=p)f=i;else{if(Math.abs(d)<=-o*c)return i;d*(f-u)>=0&&(f=u),u=i,p=l}return 0}for(let m=0;m<10;++m){if(F(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=M(r.fxprime,t),l>s+a*i*c||m&&l>=u)return p(f,i,u);if(Math.abs(d)<=-o*c)return i;if(d>=0)return p(i,f,l);u=l,f=i,i*=2}return i}function R(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,c=1,l;n||={},l=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),P(o,r.fxprime,-1);for(let t=0;t{let t={};for(let n=0;nE(e,t,r)-n,0,e+t)}function ne(e,t={}){let n=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(`;`)}if(n){let e=new Map;for(let t of r)for(let n=0;ne===t?0:ee.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=z(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let c=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?c=1:e.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c}),{distances:r,constraints:i}}function ie(e,t,n,r){for(let e=0;e0&&m<=d||f<0&&m>=d||(i+=2*h*h,t[2*a]+=4*h*(o-l),t[2*a+1]+=4*h*(s-u),t[2*c]+=4*h*(l-o),t[2*c+1]+=4*h*(u-s))}}return i}function ae(e,t={}){let n=se(e,t),r=t.lossFunction||B;if(e.length>=8){let i=oe(e,t),a=r(i,e),o=r(n,e);a+1e-8e.map(e=>e/s));let c=(e,t)=>ie(e,t,a,o),l=null;for(let e=0;ee.sets.length===2);for(let t of e){let e=t.weight==null?1:t.weight,n=t.sets[0],a=t.sets[1];t.size+te>=Math.min(r[n].size,r[a].size)&&(e=0),i[n].push({set:a,size:t.size,weight:e}),i[a].push({set:n,size:t.size,weight:e})}let a=[];Object.keys(i).forEach(e=>{let t=0;for(let n=0;ne[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function ce(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=E(n.radius,i.radius,T(n,i))}else t=x(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function le(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&T(e[0],e[1])1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}function ue(e){e.forEach(e=>{e.parent=e});function t(e){return e.parent!==e&&(e.parent=t(e.parent)),e.parent}function n(e,n){let r=t(e);r.parent=t(n)}for(let t=0;t{delete e.parent}),Array.from(r.values())}function V(e){let t=t=>({max:e.reduce((e,n)=>Math.max(e,n[t]+n.radius),-1/0),min:e.reduce((e,n)=>Math.min(e,n[t]-n.radius),1/0)});return{xRange:t(`x`),yRange:t(`y`)}}function de(e,t,n){t??=Math.PI/2;let r=me(e).map(e=>Object.assign({},e)),i=ue(r);for(let e of i){le(e,t,n);let r=V(e);e.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),e.bounds=r}i.sort((e,t)=>t.size-e.size),r=i[0];let a=r.bounds,o=(a.xRange.max-a.xRange.min)/50;function s(e,t,n){if(!e)return;let i=e.bounds,s,c;if(t)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;let e=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;e<0&&(s+=e)}if(n)c=a.yRange.max-i.yRange.min+o;else{c=a.yRange.max-i.yRange.max;let e=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;e<0&&(c+=e)}for(let t of e)t.x+=s,t.y+=c,r.push(t)}let c=1;for(;c({radius:u*e.radius,x:r+d+(e.x-o.min)*u,y:r+f+(e.y-s.min)*u,setid:e.setid})))}function pe(e){let t={};for(let n of e)t[n.setid]=n;return t}function me(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function he(e={}){let t=!1,n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,c=null,l=!0,u=!0,d=null,f=null,p=!1,m=null,h=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,g={},_=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],v=0,y=function(e){if(e in g)return g[e];var t=g[e]=_[v];return v+=1,v>=_.length&&(v=0),t},b=ee,x=B;function S(g){let _=g.datum(),v=new Set;_.forEach(e=>{e.size==0&&e.sets.length==1&&v.add(e.sets[0])}),_=_.filter(e=>!e.sets.some(e=>v.has(e)));let S={},C={};if(_.length>0){let e=b(_,{lossFunction:x,distinct:p});s&&(e=de(e,o,f)),S=fe(e,n,r,i,c),C=ve(S,_,h)}let w={};_.forEach(e=>{e.label&&(w[e.sets]=e.label)});function T(e){if(e.sets in w)return w[e.sets];if(e.sets.length==1)return``+e.sets[0]}g.selectAll(`svg`).data([S]).enter().append(`svg`);let E=g.select(`svg`);t?E.attr(`viewBox`,`0 0 ${n} ${r}`):E.attr(`width`,n).attr(`height`,r);let D={},O=!1;E.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!p&&(O=!0,D[e.sets[0]]=be(t))});function k(e){return t=>Ce(e.sets.map(e=>{let i=D[e],a=S[e];return i||={x:n/2,y:r/2,radius:1},a||={x:n/2,y:r/2,radius:1},{x:i.x*(1-t)+a.x*t,y:i.y*(1-t)+a.y*t,radius:i.radius*(1-t)+a.radius*t}}),m)}let A=E.selectAll(`.venn-area`).data(_,e=>e.sets),j=A.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),M=j.append(`path`),N=j.append(`text`).attr(`class`,`label`).text(e=>T(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,n/2).attr(`y`,r/2);u&&(M.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:y(e.sets)).style(`fill-opacity`,`.25`),N.style(`fill`,t=>t.colour||t.color?`#FFF`:e.textFill?e.textFill:t.sets.length==1?y(t.sets):`#444`));function P(e){return typeof e.transition==`function`?e.transition(`venn`).duration(a):e}let F=g;O&&typeof F.transition==`function`?(F=P(g),F.selectAll(`path`).attrTween(`d`,k)):F.selectAll(`path`).attr(`d`,e=>Ce(e.sets.map(e=>S[e])),m);let I=F.selectAll(`text`).filter(e=>e.sets in C).text(e=>T(e)).attr(`x`,e=>Math.floor(C[e.sets].x)).attr(`y`,e=>Math.floor(C[e.sets].y));l&&(O?`on`in I?I.on(`end`,H(S,T)):I.each(`end`,H(S,T)):I.each(H(S,T)));let L=P(A.exit()).remove();typeof A.transition==`function`&&L.selectAll(`path`).attrTween(`d`,k);let R=L.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),I.style(`font-size`,d),R.style(`font-size`,`0px`)),{circles:S,textCentres:C,nodes:A,enter:j,update:F,exit:L}}return S.wrap=function(e){return arguments.length?(l=e,S):l},S.useViewBox=function(){return t=!0,S},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.padding=function(e){return arguments.length?(i=e,S):i},S.distinct=function(e){return arguments.length?(p=e,S):p},S.colours=function(e){return arguments.length?(y=e,S):y},S.colors=function(e){return arguments.length?(y=e,S):y},S.fontSize=function(e){return arguments.length?(d=e,S):d},S.round=function(e){return arguments.length?(m=e,S):m},S.duration=function(e){return arguments.length?(a=e,S):a},S.layoutFunction=function(e){return arguments.length?(b=e,S):b},S.normalize=function(e){return arguments.length?(s=e,S):s},S.scaleToFit=function(e){return arguments.length?(c=e,S):c},S.styled=function(e){return arguments.length?(u=e,S):u},S.orientation=function(e){return arguments.length?(o=e,S):o},S.orientationOrder=function(e){return arguments.length?(f=e,S):f},S.lossFunction=function(e){return arguments.length?(x=e==="default"?B:e===`logRatio`?ce:e,S):x},S}function H(e,t){return function(n){let r=this,i=e[n.sets[0]].radius||50,a=t(n)||``,o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3,c=o.pop(),l=[c],u=0,d=1.1;r.textContent=null;let f=[];function p(e){let t=r.ownerDocument.createElementNS(r.namespaceURI,`tspan`);return t.textContent=e,f.push(t),r.append(t),t}let m=p(c);for(;c=o.pop(),c;){l.push(c);let e=l.join(` `);m.textContent=e,e.length>s&&m.getComputedTextLength()>i&&(l.pop(),m.textContent=l.join(` `),l=[c],m=p(c),u++)}let h=.35-u*d/2,g=r.getAttribute(`x`),_=r.getAttribute(`y`);f.forEach((e,t)=>{e.setAttribute(`x`,g),e.setAttribute(`y`,_),e.setAttribute(`dy`,`${h+t*d}em`)})}}function U(e,t,n){let r=t[0].radius-T(t[0],e);for(let n=1;n=a&&(i=r[n],a=o)}let o=I(n=>-1*U({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(T(s,t)>t.radius){c=!1;break}for(let e of t)if(T(s,e)e.p1))}function _e(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function ye(e,t,n){let r=[];return r.push(` M`,e,t),r.push(` m`,-n,0),r.push(` a`,n,n,0,1,0,n*2,0),r.push(` diff --git a/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-B8-by92M.js b/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-nruFoEvU.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-B8-by92M.js rename to apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-nruFoEvU.js index 79f476b39..cea42386a 100644 --- a/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-B8-by92M.js +++ b/apps/pythinker-code/dist-web/assets/vennDiagram-4TSXK5OY-nruFoEvU.js @@ -1,4 +1,4 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Cn6kALDM.js";import{$ as n,H as r,K as i,U as a,a as o,b as s,c,et as l,f as u,nt as d,tt as f,v as p,w as m,y as h}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{i as g}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as _}from"./chunk-CLGD4ZFX-D_luxf7b.js";import{t as v}from"./rough.esm-CSKSodPl.js";var y=(e,t)=>f(e,`a`,-t),b=1e-10;function x(e,t){let n=C(e),r=n.filter(t=>S(t,e)),i=0,a=0,o=[];if(r.length>1){let t=O(r);for(let e=0;et.angle-e.angle);let n=r[r.length-1];for(let t=0;tr.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=w(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;nMath.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-b,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function S(e,t){return t.every(t=>T(e,t)=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return w(e,r)+w(t,i)}function D(e,t){let n=T(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function O(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}function k(e,t,n,r){r||={};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),c=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n=0&&(t=n),Math.abs(c)A(t))}function M(e,t){let n=0;for(let r=0;re.fx-t.fx,_=t.slice(),v=t.slice(),y=t.slice(),b=t.slice();for(let t=0;t{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:m[0].slice(),fx:m[0].fx,simplex:e})}f=0;for(let e=0;e=m[p-1].fx){let n=!1;if(v.fx>t.fx?(F(y,1+u,_,-u,t),y.fx=e(y),y.fx=1)break;for(let t=1;ts+a*i*c||l>=p)f=i;else{if(Math.abs(d)<=-o*c)return i;d*(f-u)>=0&&(f=u),u=i,p=l}return 0}for(let m=0;m<10;++m){if(F(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=M(r.fxprime,t),l>s+a*i*c||m&&l>=u)return p(f,i,u);if(Math.abs(d)<=-o*c)return i;if(d>=0)return p(i,f,l);u=l,f=i,i*=2}return i}function R(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,c=1,l;n||={},l=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),P(o,r.fxprime,-1);for(let t=0;t{let t={};for(let n=0;nE(e,t,r)-n,0,e+t)}function ne(e,t={}){let n=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(`;`)}if(n){let e=new Map;for(let t of r)for(let n=0;ne===t?0:ee.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=z(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let c=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?c=1:e.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c}),{distances:r,constraints:i}}function ie(e,t,n,r){for(let e=0;e0&&m<=d||f<0&&m>=d||(i+=2*h*h,t[2*a]+=4*h*(o-l),t[2*a+1]+=4*h*(s-u),t[2*c]+=4*h*(l-o),t[2*c+1]+=4*h*(u-s))}}return i}function ae(e,t={}){let n=se(e,t),r=t.lossFunction||B;if(e.length>=8){let i=oe(e,t),a=r(i,e),o=r(n,e);a+1e-8e.map(e=>e/s));let c=(e,t)=>ie(e,t,a,o),l=null;for(let e=0;ee.sets.length===2);for(let t of e){let e=t.weight==null?1:t.weight,n=t.sets[0],a=t.sets[1];t.size+te>=Math.min(r[n].size,r[a].size)&&(e=0),i[n].push({set:a,size:t.size,weight:e}),i[a].push({set:n,size:t.size,weight:e})}let a=[];Object.keys(i).forEach(e=>{let t=0;for(let n=0;ne[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function ce(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=E(n.radius,i.radius,T(n,i))}else t=x(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function le(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&T(e[0],e[1])1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}function ue(e){e.forEach(e=>{e.parent=e});function t(e){return e.parent!==e&&(e.parent=t(e.parent)),e.parent}function n(e,n){let r=t(e);r.parent=t(n)}for(let t=0;t{delete e.parent}),Array.from(r.values())}function V(e){let t=t=>({max:e.reduce((e,n)=>Math.max(e,n[t]+n.radius),-1/0),min:e.reduce((e,n)=>Math.min(e,n[t]-n.radius),1/0)});return{xRange:t(`x`),yRange:t(`y`)}}function de(e,t,n){t??=Math.PI/2;let r=me(e).map(e=>Object.assign({},e)),i=ue(r);for(let e of i){le(e,t,n);let r=V(e);e.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),e.bounds=r}i.sort((e,t)=>t.size-e.size),r=i[0];let a=r.bounds,o=(a.xRange.max-a.xRange.min)/50;function s(e,t,n){if(!e)return;let i=e.bounds,s,c;if(t)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;let e=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;e<0&&(s+=e)}if(n)c=a.yRange.max-i.yRange.min+o;else{c=a.yRange.max-i.yRange.max;let e=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;e<0&&(c+=e)}for(let t of e)t.x+=s,t.y+=c,r.push(t)}let c=1;for(;c({radius:u*e.radius,x:r+d+(e.x-o.min)*u,y:r+f+(e.y-s.min)*u,setid:e.setid})))}function pe(e){let t={};for(let n of e)t[n.setid]=n;return t}function me(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function he(e={}){let t=!1,n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,c=null,l=!0,u=!0,d=null,f=null,p=!1,m=null,h=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,g={},_=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],v=0,y=function(e){if(e in g)return g[e];var t=g[e]=_[v];return v+=1,v>=_.length&&(v=0),t},b=ee,x=B;function S(g){let _=g.datum(),v=new Set;_.forEach(e=>{e.size==0&&e.sets.length==1&&v.add(e.sets[0])}),_=_.filter(e=>!e.sets.some(e=>v.has(e)));let S={},C={};if(_.length>0){let e=b(_,{lossFunction:x,distinct:p});s&&(e=de(e,o,f)),S=fe(e,n,r,i,c),C=ve(S,_,h)}let w={};_.forEach(e=>{e.label&&(w[e.sets]=e.label)});function T(e){if(e.sets in w)return w[e.sets];if(e.sets.length==1)return``+e.sets[0]}g.selectAll(`svg`).data([S]).enter().append(`svg`);let E=g.select(`svg`);t?E.attr(`viewBox`,`0 0 ${n} ${r}`):E.attr(`width`,n).attr(`height`,r);let D={},O=!1;E.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!p&&(O=!0,D[e.sets[0]]=be(t))});function k(e){return t=>Ce(e.sets.map(e=>{let i=D[e],a=S[e];return i||={x:n/2,y:r/2,radius:1},a||={x:n/2,y:r/2,radius:1},{x:i.x*(1-t)+a.x*t,y:i.y*(1-t)+a.y*t,radius:i.radius*(1-t)+a.radius*t}}),m)}let A=E.selectAll(`.venn-area`).data(_,e=>e.sets),j=A.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),M=j.append(`path`),N=j.append(`text`).attr(`class`,`label`).text(e=>T(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,n/2).attr(`y`,r/2);u&&(M.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:y(e.sets)).style(`fill-opacity`,`.25`),N.style(`fill`,t=>t.colour||t.color?`#FFF`:e.textFill?e.textFill:t.sets.length==1?y(t.sets):`#444`));function P(e){return typeof e.transition==`function`?e.transition(`venn`).duration(a):e}let F=g;O&&typeof F.transition==`function`?(F=P(g),F.selectAll(`path`).attrTween(`d`,k)):F.selectAll(`path`).attr(`d`,e=>Ce(e.sets.map(e=>S[e])),m);let I=F.selectAll(`text`).filter(e=>e.sets in C).text(e=>T(e)).attr(`x`,e=>Math.floor(C[e.sets].x)).attr(`y`,e=>Math.floor(C[e.sets].y));l&&(O?`on`in I?I.on(`end`,H(S,T)):I.each(`end`,H(S,T)):I.each(H(S,T)));let L=P(A.exit()).remove();typeof A.transition==`function`&&L.selectAll(`path`).attrTween(`d`,k);let R=L.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),I.style(`font-size`,d),R.style(`font-size`,`0px`)),{circles:S,textCentres:C,nodes:A,enter:j,update:F,exit:L}}return S.wrap=function(e){return arguments.length?(l=e,S):l},S.useViewBox=function(){return t=!0,S},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.padding=function(e){return arguments.length?(i=e,S):i},S.distinct=function(e){return arguments.length?(p=e,S):p},S.colours=function(e){return arguments.length?(y=e,S):y},S.colors=function(e){return arguments.length?(y=e,S):y},S.fontSize=function(e){return arguments.length?(d=e,S):d},S.round=function(e){return arguments.length?(m=e,S):m},S.duration=function(e){return arguments.length?(a=e,S):a},S.layoutFunction=function(e){return arguments.length?(b=e,S):b},S.normalize=function(e){return arguments.length?(s=e,S):s},S.scaleToFit=function(e){return arguments.length?(c=e,S):c},S.styled=function(e){return arguments.length?(u=e,S):u},S.orientation=function(e){return arguments.length?(o=e,S):o},S.orientationOrder=function(e){return arguments.length?(f=e,S):f},S.lossFunction=function(e){return arguments.length?(x=e==="default"?B:e===`logRatio`?ce:e,S):x},S}function H(e,t){return function(n){let r=this,i=e[n.sets[0]].radius||50,a=t(n)||``,o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3,c=o.pop(),l=[c],u=0,d=1.1;r.textContent=null;let f=[];function p(e){let t=r.ownerDocument.createElementNS(r.namespaceURI,`tspan`);return t.textContent=e,f.push(t),r.append(t),t}let m=p(c);for(;c=o.pop(),c;){l.push(c);let e=l.join(` `);m.textContent=e,e.length>s&&m.getComputedTextLength()>i&&(l.pop(),m.textContent=l.join(` `),l=[c],m=p(c),u++)}let h=.35-u*d/2,g=r.getAttribute(`x`),_=r.getAttribute(`y`);f.forEach((e,t)=>{e.setAttribute(`x`,g),e.setAttribute(`y`,_),e.setAttribute(`dy`,`${h+t*d}em`)})}}function U(e,t,n){let r=t[0].radius-T(t[0],e);for(let n=1;n=a&&(i=r[n],a=o)}let o=I(n=>-1*U({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(T(s,t)>t.radius){c=!1;break}for(let e of t)if(T(s,e)e.p1))}function _e(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function ye(e,t,n){let r=[];return r.push(` +import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-Cn6kALDM.js";import{$ as n,H as r,K as i,U as a,a as o,b as s,c,et as l,f as u,nt as d,tt as f,v as p,w as m,y as h}from"./chunk-DU6HZSFF-B78kfBb6.js";import{i as g}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as _}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{t as v}from"./rough.esm-CSKSodPl.js";var y=(e,t)=>f(e,`a`,-t),b=1e-10;function x(e,t){let n=C(e),r=n.filter(t=>S(t,e)),i=0,a=0,o=[];if(r.length>1){let t=O(r);for(let e=0;et.angle-e.angle);let n=r[r.length-1];for(let t=0;tr.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=w(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;nMath.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-b,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function S(e,t){return t.every(t=>T(e,t)=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return w(e,r)+w(t,i)}function D(e,t){let n=T(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function O(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}function k(e,t,n,r){r||={};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),c=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n=0&&(t=n),Math.abs(c)A(t))}function M(e,t){let n=0;for(let r=0;re.fx-t.fx,_=t.slice(),v=t.slice(),y=t.slice(),b=t.slice();for(let t=0;t{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:m[0].slice(),fx:m[0].fx,simplex:e})}f=0;for(let e=0;e=m[p-1].fx){let n=!1;if(v.fx>t.fx?(F(y,1+u,_,-u,t),y.fx=e(y),y.fx=1)break;for(let t=1;ts+a*i*c||l>=p)f=i;else{if(Math.abs(d)<=-o*c)return i;d*(f-u)>=0&&(f=u),u=i,p=l}return 0}for(let m=0;m<10;++m){if(F(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=M(r.fxprime,t),l>s+a*i*c||m&&l>=u)return p(f,i,u);if(Math.abs(d)<=-o*c)return i;if(d>=0)return p(i,f,l);u=l,f=i,i*=2}return i}function R(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,c=1,l;n||={},l=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),P(o,r.fxprime,-1);for(let t=0;t{let t={};for(let n=0;nE(e,t,r)-n,0,e+t)}function ne(e,t={}){let n=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(`;`)}if(n){let e=new Map;for(let t of r)for(let n=0;ne===t?0:ee.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=z(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let c=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?c=1:e.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c}),{distances:r,constraints:i}}function ie(e,t,n,r){for(let e=0;e0&&m<=d||f<0&&m>=d||(i+=2*h*h,t[2*a]+=4*h*(o-l),t[2*a+1]+=4*h*(s-u),t[2*c]+=4*h*(l-o),t[2*c+1]+=4*h*(u-s))}}return i}function ae(e,t={}){let n=se(e,t),r=t.lossFunction||B;if(e.length>=8){let i=oe(e,t),a=r(i,e),o=r(n,e);a+1e-8e.map(e=>e/s));let c=(e,t)=>ie(e,t,a,o),l=null;for(let e=0;ee.sets.length===2);for(let t of e){let e=t.weight==null?1:t.weight,n=t.sets[0],a=t.sets[1];t.size+te>=Math.min(r[n].size,r[a].size)&&(e=0),i[n].push({set:a,size:t.size,weight:e}),i[a].push({set:n,size:t.size,weight:e})}let a=[];Object.keys(i).forEach(e=>{let t=0;for(let n=0;ne[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function ce(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=E(n.radius,i.radius,T(n,i))}else t=x(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function le(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&T(e[0],e[1])1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}function ue(e){e.forEach(e=>{e.parent=e});function t(e){return e.parent!==e&&(e.parent=t(e.parent)),e.parent}function n(e,n){let r=t(e);r.parent=t(n)}for(let t=0;t{delete e.parent}),Array.from(r.values())}function V(e){let t=t=>({max:e.reduce((e,n)=>Math.max(e,n[t]+n.radius),-1/0),min:e.reduce((e,n)=>Math.min(e,n[t]-n.radius),1/0)});return{xRange:t(`x`),yRange:t(`y`)}}function de(e,t,n){t??=Math.PI/2;let r=me(e).map(e=>Object.assign({},e)),i=ue(r);for(let e of i){le(e,t,n);let r=V(e);e.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),e.bounds=r}i.sort((e,t)=>t.size-e.size),r=i[0];let a=r.bounds,o=(a.xRange.max-a.xRange.min)/50;function s(e,t,n){if(!e)return;let i=e.bounds,s,c;if(t)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;let e=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;e<0&&(s+=e)}if(n)c=a.yRange.max-i.yRange.min+o;else{c=a.yRange.max-i.yRange.max;let e=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;e<0&&(c+=e)}for(let t of e)t.x+=s,t.y+=c,r.push(t)}let c=1;for(;c({radius:u*e.radius,x:r+d+(e.x-o.min)*u,y:r+f+(e.y-s.min)*u,setid:e.setid})))}function pe(e){let t={};for(let n of e)t[n.setid]=n;return t}function me(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function he(e={}){let t=!1,n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,c=null,l=!0,u=!0,d=null,f=null,p=!1,m=null,h=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,g={},_=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],v=0,y=function(e){if(e in g)return g[e];var t=g[e]=_[v];return v+=1,v>=_.length&&(v=0),t},b=ee,x=B;function S(g){let _=g.datum(),v=new Set;_.forEach(e=>{e.size==0&&e.sets.length==1&&v.add(e.sets[0])}),_=_.filter(e=>!e.sets.some(e=>v.has(e)));let S={},C={};if(_.length>0){let e=b(_,{lossFunction:x,distinct:p});s&&(e=de(e,o,f)),S=fe(e,n,r,i,c),C=ve(S,_,h)}let w={};_.forEach(e=>{e.label&&(w[e.sets]=e.label)});function T(e){if(e.sets in w)return w[e.sets];if(e.sets.length==1)return``+e.sets[0]}g.selectAll(`svg`).data([S]).enter().append(`svg`);let E=g.select(`svg`);t?E.attr(`viewBox`,`0 0 ${n} ${r}`):E.attr(`width`,n).attr(`height`,r);let D={},O=!1;E.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!p&&(O=!0,D[e.sets[0]]=be(t))});function k(e){return t=>Ce(e.sets.map(e=>{let i=D[e],a=S[e];return i||={x:n/2,y:r/2,radius:1},a||={x:n/2,y:r/2,radius:1},{x:i.x*(1-t)+a.x*t,y:i.y*(1-t)+a.y*t,radius:i.radius*(1-t)+a.radius*t}}),m)}let A=E.selectAll(`.venn-area`).data(_,e=>e.sets),j=A.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),M=j.append(`path`),N=j.append(`text`).attr(`class`,`label`).text(e=>T(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,n/2).attr(`y`,r/2);u&&(M.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:y(e.sets)).style(`fill-opacity`,`.25`),N.style(`fill`,t=>t.colour||t.color?`#FFF`:e.textFill?e.textFill:t.sets.length==1?y(t.sets):`#444`));function P(e){return typeof e.transition==`function`?e.transition(`venn`).duration(a):e}let F=g;O&&typeof F.transition==`function`?(F=P(g),F.selectAll(`path`).attrTween(`d`,k)):F.selectAll(`path`).attr(`d`,e=>Ce(e.sets.map(e=>S[e])),m);let I=F.selectAll(`text`).filter(e=>e.sets in C).text(e=>T(e)).attr(`x`,e=>Math.floor(C[e.sets].x)).attr(`y`,e=>Math.floor(C[e.sets].y));l&&(O?`on`in I?I.on(`end`,H(S,T)):I.each(`end`,H(S,T)):I.each(H(S,T)));let L=P(A.exit()).remove();typeof A.transition==`function`&&L.selectAll(`path`).attrTween(`d`,k);let R=L.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),I.style(`font-size`,d),R.style(`font-size`,`0px`)),{circles:S,textCentres:C,nodes:A,enter:j,update:F,exit:L}}return S.wrap=function(e){return arguments.length?(l=e,S):l},S.useViewBox=function(){return t=!0,S},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.padding=function(e){return arguments.length?(i=e,S):i},S.distinct=function(e){return arguments.length?(p=e,S):p},S.colours=function(e){return arguments.length?(y=e,S):y},S.colors=function(e){return arguments.length?(y=e,S):y},S.fontSize=function(e){return arguments.length?(d=e,S):d},S.round=function(e){return arguments.length?(m=e,S):m},S.duration=function(e){return arguments.length?(a=e,S):a},S.layoutFunction=function(e){return arguments.length?(b=e,S):b},S.normalize=function(e){return arguments.length?(s=e,S):s},S.scaleToFit=function(e){return arguments.length?(c=e,S):c},S.styled=function(e){return arguments.length?(u=e,S):u},S.orientation=function(e){return arguments.length?(o=e,S):o},S.orientationOrder=function(e){return arguments.length?(f=e,S):f},S.lossFunction=function(e){return arguments.length?(x=e==="default"?B:e===`logRatio`?ce:e,S):x},S}function H(e,t){return function(n){let r=this,i=e[n.sets[0]].radius||50,a=t(n)||``,o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3,c=o.pop(),l=[c],u=0,d=1.1;r.textContent=null;let f=[];function p(e){let t=r.ownerDocument.createElementNS(r.namespaceURI,`tspan`);return t.textContent=e,f.push(t),r.append(t),t}let m=p(c);for(;c=o.pop(),c;){l.push(c);let e=l.join(` `);m.textContent=e,e.length>s&&m.getComputedTextLength()>i&&(l.pop(),m.textContent=l.join(` `),l=[c],m=p(c),u++)}let h=.35-u*d/2,g=r.getAttribute(`x`),_=r.getAttribute(`y`);f.forEach((e,t)=>{e.setAttribute(`x`,g),e.setAttribute(`y`,_),e.setAttribute(`dy`,`${h+t*d}em`)})}}function U(e,t,n){let r=t[0].radius-T(t[0],e);for(let n=1;n=a&&(i=r[n],a=o)}let o=I(n=>-1*U({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(T(s,t)>t.radius){c=!1;break}for(let e of t)if(T(s,e)e.p1))}function _e(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function ye(e,t,n){let r=[];return r.push(` M`,e,t),r.push(` m`,-n,0),r.push(` a`,n,n,0,1,0,n*2,0),r.push(` diff --git a/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-xB7MMyW9.js b/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-BBaRJhAr.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-xB7MMyW9.js rename to apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-BBaRJhAr.js index 533870d22..925888160 100644 --- a/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-xB7MMyW9.js +++ b/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-BBaRJhAr.js @@ -1,4 +1,4 @@ -import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-CcF2nKWM.js";import{i as p}from"./chunk-75Z2AOVW-Djshm1Dl.js";import{St as m}from"./mermaidParser.worker-_pLIm6No.js";import{n as h}from"./mermaid-parser.core-87cmcdBo.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";var _=t((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=t((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=t(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=t(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=t((e,t)=>{if(g(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:t(async t=>{let n=await h(`wardley`,t);e.debug(n);let r=S.parser?.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(n,r)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return d()[`wardley-beta`]}t(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}t(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}t(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}t(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}t(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}t(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}t(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}t(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}t(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}t(N,`setSize`);function P(e){C.startPipeline(e)}t(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}t(F,`addPipelineComponent`);function I(e){C.setAxes(e)}t(I,`updateAxes`);function L(e){return C.getNode(e)}t(L,`getNode`);function R(e){return C.resolveNodeId(e)}t(R,`resolveNodeId`);function z(){return C.build()}t(z,`getWardleyData`);function B(){C.clear(),o()}t(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:u,getAccDescription:l,setAccDescription:r},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=t(()=>{let{themeVariables:e}=d();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=t(()=>{let e=d()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:t((n,r,i,a)=>{e.debug(`Rendering Wardley map +import{m as e}from"./src-CDd1avoI.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-CbPIJzjs.js";import{i as p}from"./chunk-75Z2AOVW-3pIWy7Vc.js";import{St as m}from"./mermaidParser.worker-CBWarbNh.js";import{n as h}from"./mermaid-parser.core-87cmcdBo.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";var _=t((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=t((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=t(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=t(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=t((e,t)=>{if(g(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:t(async t=>{let n=await h(`wardley`,t);e.debug(n);let r=S.parser?.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(n,r)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return d()[`wardley-beta`]}t(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}t(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}t(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}t(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}t(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}t(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}t(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}t(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}t(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}t(N,`setSize`);function P(e){C.startPipeline(e)}t(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}t(F,`addPipelineComponent`);function I(e){C.setAxes(e)}t(I,`updateAxes`);function L(e){return C.getNode(e)}t(L,`getNode`);function R(e){return C.resolveNodeId(e)}t(R,`resolveNodeId`);function z(){return C.build()}t(z,`getWardleyData`);function B(){C.clear(),o()}t(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:u,getAccDescription:l,setAccDescription:r},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=t(()=>{let{themeVariables:e}=d();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=t(()=>{let e=d()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:t((n,r,i,a)=>{e.debug(`Rendering Wardley map `+n);let o=W(),s=U(),l=o.nodeRadius*1.6,u=a.db,d=u.getWardleyData(),f=u.getDiagramTitle(),p=d.size?.width??o.width,h=d.size?.height??o.height,g=m(r);g.selectAll(`*`).remove(),c(g,h,p,o.useMaxWidth),g.attr(`viewBox`,`0 0 ${p} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,p).attr(`height`,h).attr(`fill`,s.backgroundColor);let y=p-o.padding*2,b=h-o.padding*2;f&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,p/2).attr(`y`,o.padding/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let x=t(e=>o.padding+e/100*y,`projectX`),S=t(e=>h-o.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1);let w=d.axes.xLabel??`Evolution`,T=d.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+y/2).attr(`y`,h-o.padding/4).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(w),C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+b/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+b/2})`).text(T);let E=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===E.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/E.length;E.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}E.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*y,c=(a+(o.padding+i.end*y))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,c).attr(`y`,h-o.padding/1.5).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding-b*n).attr(`y2`,h-o.padding-b*n).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(d.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),d.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e{let t=D.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),c=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=c-t/2,u=D.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-l/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;d.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=d.links.filter(e=>!(!D.has(e.source)||!D.has(e.target)||k.get(e.target)?.has(e.source)));O.selectAll(`line`).data(A).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${r})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${r})`:null),O.selectAll(`text`).data(A.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,s.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let j=_.append(`g`).attr(`class`,`wardley-trends`),M=d.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),c=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-i/s*c:n,adjustedY2:s>c?r-a/s*c:r}}).filter(e=>e!==null);j.selectAll(`line`).data(M).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,s.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${r})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));N.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let P=N.filter(e=>e.sourceStrategy===`market`);P.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1);let F=o.nodeRadius*.7,I=o.nodeRadius*1.2;if(P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x).attr(`y1`,e=>D.get(e.id).y-I).attr(`x2`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x).attr(`y2`,e=>D.get(e.id).y-I).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y-I).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-l/2).attr(`y`,e=>D.get(e.id).y-l/2).attr(`width`,l).attr(`height`,l).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,s.componentStroke).attr(`stroke-width`,6),N.append(`text`).attr(`x`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?s.evolutionStroke:e.className===`anchor`?`#000`:s.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:x(e.x),y:S(e.y)}));if(n.length>1)for(let t=0;t{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=x(d.annotationsBox.x),n=S(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,c=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();c=Math.max(c,i.height)});let l=e+20+105,u=i.length*16+20+c/2,d=o.padding,f=p-o.padding-l,m=o.padding,g=h-o.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(m,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=x(t.x),r=S(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=` M ${n} ${r-30/2} L ${n+60-20} ${r-30/2} diff --git a/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-6PjRECuz.js b/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-nLPFq2IV.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-6PjRECuz.js rename to apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-nLPFq2IV.js index b71556a10..9ba9717ca 100644 --- a/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-6PjRECuz.js +++ b/apps/pythinker-code/dist-web/assets/wardleyDiagram-VM6X3IG4-nLPFq2IV.js @@ -1,4 +1,4 @@ -import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,v as u,w as d,x as f,y as p}from"./chunk-DU6HZSFF-DfRjAqU1.js";import{i as m}from"./chunk-75Z2AOVW-D2HolPjd.js";import{t as h}from"./chunk-CLGD4ZFX-D_luxf7b.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";var _=t((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=t((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=t(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=t(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=t((e,t)=>{if(g(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:t(async t=>{let r=await e(`wardley`,t);n.debug(r);let i=S.parser?.yy;if(!i||typeof i.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(r,i)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return f()[`wardley-beta`]}t(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}t(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}t(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}t(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}t(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}t(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}t(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}t(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}t(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}t(N,`setSize`);function P(e){C.startPipeline(e)}t(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}t(F,`addPipelineComponent`);function I(e){C.setAxes(e)}t(I,`updateAxes`);function L(e){return C.getNode(e)}t(L,`getNode`);function R(e){return C.resolveNodeId(e)}t(R,`resolveNodeId`);function z(){return C.build()}t(z,`getWardleyData`);function B(){C.clear(),s()}t(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:d,getAccDescription:u,setAccDescription:i},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=t(()=>{let{themeVariables:e}=f();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=t(()=>{let e=f()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:t((e,r,i,a)=>{n.debug(`Rendering Wardley map +import{n as e}from"./mermaid-parser.core-BCOGZFb-.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-Cn6kALDM.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,v as u,w as d,x as f,y as p}from"./chunk-DU6HZSFF-B78kfBb6.js";import{i as m}from"./chunk-75Z2AOVW-CAoob5DH.js";import{t as h}from"./chunk-CLGD4ZFX-BVZ8CvLY.js";import{t as g}from"./chunk-JWPE2WC7-DVXcaiue.js";var _=t((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=t((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=t(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=t(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=t((e,t)=>{if(g(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:t(async t=>{let r=await e(`wardley`,t);n.debug(r);let i=S.parser?.yy;if(!i||typeof i.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(r,i)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return f()[`wardley-beta`]}t(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}t(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}t(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}t(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}t(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}t(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}t(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}t(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}t(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}t(N,`setSize`);function P(e){C.startPipeline(e)}t(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}t(F,`addPipelineComponent`);function I(e){C.setAxes(e)}t(I,`updateAxes`);function L(e){return C.getNode(e)}t(L,`getNode`);function R(e){return C.resolveNodeId(e)}t(R,`resolveNodeId`);function z(){return C.build()}t(z,`getWardleyData`);function B(){C.clear(),s()}t(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:d,getAccDescription:u,setAccDescription:i},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=t(()=>{let{themeVariables:e}=f();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=t(()=>{let e=f()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:t((e,r,i,a)=>{n.debug(`Rendering Wardley map `+e);let o=W(),s=U(),c=o.nodeRadius*1.6,u=a.db,d=u.getWardleyData(),f=u.getDiagramTitle(),p=d.size?.width??o.width,m=d.size?.height??o.height,g=h(r);g.selectAll(`*`).remove(),l(g,m,p,o.useMaxWidth),g.attr(`viewBox`,`0 0 ${p} ${m}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,p).attr(`height`,m).attr(`fill`,s.backgroundColor);let y=p-o.padding*2,b=m-o.padding*2;f&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,p/2).attr(`y`,o.padding/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let x=t(e=>o.padding+e/100*y,`projectX`),S=t(e=>m-o.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,m-o.padding).attr(`y2`,m-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,m-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1);let w=d.axes.xLabel??`Evolution`,T=d.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+y/2).attr(`y`,m-o.padding/4).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(w),C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+b/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+b/2})`).text(T);let E=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===E.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/E.length;E.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}E.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*y,c=(a+(o.padding+i.end*y))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,m-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,c).attr(`y`,m-o.padding/1.5).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,m-o.padding).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,m-o.padding-b*n).attr(`y2`,m-o.padding-b*n).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(d.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),d.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e{let t=D.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),l=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=l-t/2,u=D.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-c/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;d.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=d.links.filter(e=>!(!D.has(e.source)||!D.has(e.target)||k.get(e.target)?.has(e.source)));O.selectAll(`line`).data(A).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${r})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${r})`:null),O.selectAll(`text`).data(A.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,s.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let j=_.append(`g`).attr(`class`,`wardley-trends`),M=d.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),c=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-i/s*c:n,adjustedY2:s>c?r-a/s*c:r}}).filter(e=>e!==null);j.selectAll(`line`).data(M).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,s.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${r})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));N.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let P=N.filter(e=>e.sourceStrategy===`market`);P.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1);let F=o.nodeRadius*.7,I=o.nodeRadius*1.2;if(P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x).attr(`y1`,e=>D.get(e.id).y-I).attr(`x2`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x).attr(`y2`,e=>D.get(e.id).y-I).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y-I).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-c/2).attr(`y`,e=>D.get(e.id).y-c/2).attr(`width`,c).attr(`height`,c).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,s.componentStroke).attr(`stroke-width`,6),N.append(`text`).attr(`x`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?s.evolutionStroke:e.className===`anchor`?`#000`:s.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:x(e.x),y:S(e.y)}));if(n.length>1)for(let t=0;t{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=x(d.annotationsBox.x),n=S(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,c=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();c=Math.max(c,i.height)});let l=e+20+105,u=i.length*16+20+c/2,d=o.padding,f=p-o.padding-l,h=o.padding,g=m-o.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(h,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=x(t.x),r=S(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=` M ${n} ${r-30/2} L ${n+60-20} ${r-30/2} diff --git a/apps/pythinker-code/dist-web/assets/workers-lk8skNfQ.js b/apps/pythinker-code/dist-web/assets/workers-CzVdMsP_.js similarity index 94% rename from apps/pythinker-code/dist-web/assets/workers-lk8skNfQ.js rename to apps/pythinker-code/dist-web/assets/workers-CzVdMsP_.js index 84eb00174..9284b9617 100644 --- a/apps/pythinker-code/dist-web/assets/workers-lk8skNfQ.js +++ b/apps/pythinker-code/dist-web/assets/workers-CzVdMsP_.js @@ -1 +1 @@ -import{p as e}from"./editor.api2-BIJacb07.js";function t(e,t){let n=globalThis.MonacoEnvironment;if(n?.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}var n=typeof self==`object`&&self.constructor&&self.constructor.name===`DedicatedWorkerGlobalScope`&&globalThis.workerttPolicy!==void 0?globalThis.workerttPolicy:t(`defaultWorkerFactory`,{createScriptURL:e=>e});function r(e){let t=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker==`function`)return r.getWorker(`workerMain.js`,t);if(typeof r.getWorkerUrl==`function`){let e=r.getWorkerUrl(`workerMain.js`,t);return new Worker(n?n.createScriptURL(e):e,{name:t,type:`module`})}}if(e.createWorker)return e.createWorker();throw Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`)}function i(t){let n=Promise.resolve(r({label:t.label??`monaco-editor-worker`,moduleId:t.moduleId,createWorker:t.createWorker})).then(e=>(e.postMessage(`ignore`),e.postMessage(t.createData),e));return e.createWebWorker({worker:n,host:t.host,keepIdleModels:t.keepIdleModels})}export{i as t}; \ No newline at end of file +import{p as e}from"./editor.api2-DVs509bq.js";function t(e,t){let n=globalThis.MonacoEnvironment;if(n?.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}var n=typeof self==`object`&&self.constructor&&self.constructor.name===`DedicatedWorkerGlobalScope`&&globalThis.workerttPolicy!==void 0?globalThis.workerttPolicy:t(`defaultWorkerFactory`,{createScriptURL:e=>e});function r(e){let t=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker==`function`)return r.getWorker(`workerMain.js`,t);if(typeof r.getWorkerUrl==`function`){let e=r.getWorkerUrl(`workerMain.js`,t);return new Worker(n?n.createScriptURL(e):e,{name:t,type:`module`})}}if(e.createWorker)return e.createWorker();throw Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`)}function i(t){let n=Promise.resolve(r({label:t.label??`monaco-editor-worker`,moduleId:t.moduleId,createWorker:t.createWorker})).then(e=>(e.postMessage(`ignore`),e.postMessage(t.createData),e));return e.createWebWorker({worker:n,host:t.host,keepIdleModels:t.keepIdleModels})}export{i as t}; \ No newline at end of file diff --git a/apps/pythinker-code/dist-web/assets/xml-BURColbr.js b/apps/pythinker-code/dist-web/assets/xml-BHQnAkaS.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/xml-BURColbr.js rename to apps/pythinker-code/dist-web/assets/xml-BHQnAkaS.js index 4614648e3..c23af7359 100644 --- a/apps/pythinker-code/dist-web/assets/xml-BURColbr.js +++ b/apps/pythinker-code/dist-web/assets/xml-BHQnAkaS.js @@ -1 +1 @@ -import{h as e}from"./editor.api2-BIJacb07.js";var t={comments:{blockComment:[``]},brackets:[[`<`,`>`]],autoClosingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],surroundingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],onEnterRules:[{beforeText:RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},n={defaultToken:``,tokenPostfix:`.xml`,ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,``],{include:`@whitespace`},[/(<)(@qualifiedName)/,[{token:`delimiter`},{token:`tag`,next:`@tag`}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:`delimiter`},{token:`tag`},``,{token:`delimiter`}]],[/(<\?)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/(<\!)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/<\!\[CDATA\[/,{token:`delimiter.cdata`,next:`@cdata`}],[/&\w+;/,`string.escape`]],cdata:[[/[^\]]+/,``],[/\]\]>/,{token:`delimiter.cdata`,next:`@pop`}],[/\]/,``]],tag:[[/[ \t\r\n]+/,``],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,[`attribute.name`,``,`attribute.value`]],[/@qualifiedName/,`attribute.name`],[/\?>/,{token:`delimiter`,next:`@pop`}],[/(\/)(>)/,[{token:`tag`},{token:`delimiter`,next:`@pop`}]],[/>/,{token:`delimiter`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[//,{token:`comment`,next:`@pop`}],[/`]},brackets:[[`<`,`>`]],autoClosingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],surroundingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],onEnterRules:[{beforeText:RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},n={defaultToken:``,tokenPostfix:`.xml`,ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,``],{include:`@whitespace`},[/(<)(@qualifiedName)/,[{token:`delimiter`},{token:`tag`,next:`@tag`}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:`delimiter`},{token:`tag`},``,{token:`delimiter`}]],[/(<\?)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/(<\!)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/<\!\[CDATA\[/,{token:`delimiter.cdata`,next:`@cdata`}],[/&\w+;/,`string.escape`]],cdata:[[/[^\]]+/,``],[/\]\]>/,{token:`delimiter.cdata`,next:`@pop`}],[/\]/,``]],tag:[[/[ \t\r\n]+/,``],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,[`attribute.name`,``,`attribute.value`]],[/@qualifiedName/,`attribute.name`],[/\?>/,{token:`delimiter`,next:`@pop`}],[/(\/)(>)/,[{token:`tag`},{token:`delimiter`,next:`@pop`}]],[/>/,{token:`delimiter`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[//,{token:`comment`,next:`@pop`}],[/ Pythinker Code Web - + diff --git a/apps/pythinker-code/src/cli/v2/run-v2-print.ts b/apps/pythinker-code/src/cli/v2/run-v2-print.ts index b606f37f4..a5047507d 100644 --- a/apps/pythinker-code/src/cli/v2/run-v2-print.ts +++ b/apps/pythinker-code/src/cli/v2/run-v2-print.ts @@ -519,7 +519,7 @@ export function formatTrustGatedMcpWarning(servers: readonly TrustGatedMcpServer const list = servers.map((server) => `${server.name} (${server.target})`).join(', '); return ( `Warning: this folder is not trusted; skipped ${servers.length} project-level MCP ${noun}: ${list}.\n` + - ' Run `pythinker` here and choose "Trust this folder" to enable them.\n\n' + ' Run `pythinker` here and choose "Trust this folder", or set PYTHINKER_CODE_TRUST_WORKSPACE=1, to enable them.\n\n' ); } diff --git a/apps/pythinker-code/src/tui/components/dialogs/trust-prompt.ts b/apps/pythinker-code/src/tui/components/dialogs/trust-prompt.ts index d5de1d5f2..eb8de59a4 100644 --- a/apps/pythinker-code/src/tui/components/dialogs/trust-prompt.ts +++ b/apps/pythinker-code/src/tui/components/dialogs/trust-prompt.ts @@ -6,44 +6,32 @@ import { type Component, type Focusable, } from '@pymodel/pi-tui'; - -import type { WorkspaceTrustMcpServerInfo } from '@pymodel/pythinker-code-sdk'; +import type { WorkspaceTrustInfo } from '@pymodel/pythinker-code-sdk'; import { SELECT_POINTER } from '#/tui/constant/symbols'; -import { currentTheme } from '#/tui/theme'; +import { currentTheme, type ColorToken } from '#/tui/theme'; +import { pageView } from '#/tui/utils/paging'; export type TrustPromptChoice = 'trust' | 'distrust'; export interface TrustPromptOptions { readonly workDir: string; - /** Project-level MCP servers that trusting would enable; may be empty. */ - readonly gatedMcpServers: readonly WorkspaceTrustMcpServerInfo[]; - /** Esc resolves to 'distrust' as well. */ + readonly info: WorkspaceTrustInfo; + readonly getAvailableRows?: () => number; readonly onSelect: (choice: TrustPromptChoice) => void; } -interface TrustPromptOption { - readonly value: TrustPromptChoice; - readonly label: string; - readonly description: string; -} - -const OPTIONS: readonly TrustPromptOption[] = [ - { - value: 'trust', - label: 'Trust this folder', - description: 'Enable project MCP servers. Remembered for this folder.', - }, - { - value: 'distrust', - label: "Don't trust", - description: 'Exit Pythinker Code. Asked again next launch.', - }, +const OPTIONS: readonly { value: TrustPromptChoice; label: string }[] = [ + { value: 'trust', label: 'Trust and continue' }, + { value: 'distrust', label: 'Exit' }, ]; export class TrustPromptComponent implements Component, Focusable { focused = false; private selectedIndex = 0; + private disclosureIndex = 0; + private disclosurePageSize = 1; + private canConfirm = true; constructor(private readonly opts: TrustPromptOptions) {} @@ -62,73 +50,171 @@ export class TrustPromptComponent implements Component, Focusable { this.selectedIndex = Math.min(OPTIONS.length - 1, this.selectedIndex + 1); return; } - if (matchesKey(data, Key.enter)) { + const previousPage = matchesKey(data, Key.left) || matchesKey(data, Key.pageUp); + const nextPage = matchesKey(data, Key.right) || matchesKey(data, Key.pageDown); + if (previousPage || nextPage) { + this.disclosureIndex = Math.max( + 0, + this.disclosureIndex + (previousPage ? -1 : 1) * this.disclosurePageSize, + ); + return; + } + if (this.canConfirm && (matchesKey(data, Key.enter) || matchesKey(data, Key.space))) { this.opts.onSelect(OPTIONS[this.selectedIndex]!.value); } } render(width: number): string[] { const rule = currentTheme.fg('primary', '─'.repeat(width)); - const lines = [ + const availableRows = Math.max(0, Math.floor(this.opts.getAvailableRows?.() ?? Infinity)); + const header = [ rule, currentTheme.boldFg('primary', ' Trust this folder?'), currentTheme.fg('textMuted', ' ↑↓ navigate · Enter select · Esc exit'), '', - ...wrapTextWithAnsi(this.opts.workDir, Math.max(20, width - 2)).map( - (line) => ` ${currentTheme.fg('textStrong', line)}`, + ]; + const body = [ + ...wrap(this.opts.workDir, 1, width, 'textStrong'), + '', + ...this.renderDisclosure(width), + ]; + const footer = [ + ...wrap( + 'Trust is remembered for this folder, including future project config changes.', + 1, + width, + 'textMuted', ), + ...wrap('Tool approvals follow your permission settings.', 1, width, 'textMuted'), '', + ...OPTIONS.map((option, i) => { + const selected = i === this.selectedIndex; + const pointer = selected ? SELECT_POINTER : ' '; + const label = selected + ? currentTheme.boldFg('primary', option.label) + : currentTheme.fg('text', option.label); + return currentTheme.fg(selected ? 'primary' : 'textDim', ` ${pointer} `) + label; + }), + rule, ]; - - const notice = - 'Project-level MCP servers are disabled until you explicitly choose Trust. Trust starts the listed project MCP targets and remembers this folder.'; - for (const line of wrapTextWithAnsi(notice, Math.max(20, width - 2))) { - lines.push(` ${currentTheme.fg('textMuted', line)}`); + this.canConfirm = header.length + footer.length + 2 <= availableRows; + if (!this.canConfirm) { + return [header[1]!, ' Enlarge terminal to review sources. Esc exit.'] + .slice(0, availableRows) + .map((line) => truncateToWidth(line, width)); } - if (this.opts.gatedMcpServers.length > 0) { - lines.push(` ${currentTheme.fg('warning', 'Project MCP targets:')}`); - for (const server of this.opts.gatedMcpServers) { - const details = formatMcpTarget(server); - for (const line of wrapTextWithAnsi(details, Math.max(20, width - 4))) { - lines.push(` ${currentTheme.fg('warning', line)}`); - } - } - } - lines.push(''); + const needsPaging = header.length + body.length + footer.length > availableRows; + this.disclosurePageSize = needsPaging + ? availableRows - header.length - footer.length - 1 + : body.length; + const page = pageView(body.length, this.disclosureIndex, this.disclosurePageSize); + this.disclosureIndex = page.start; + const lines = [...header, ...body.slice(page.start, page.end)]; + while (lines.length < header.length + this.disclosurePageSize) lines.push(''); + if (page.pageCount > 1) + lines.push(currentTheme.fg('textMuted', ` ←→ page · ${page.page + 1} / ${page.pageCount}`)); + lines.push(...footer); + return lines.map((line) => truncateToWidth(line, width)); + } - for (let i = 0; i < OPTIONS.length; i += 1) { - const option = OPTIONS[i]!; - const selected = i === this.selectedIndex; - const pointer = selected ? SELECT_POINTER : ' '; - const label = selected - ? currentTheme.boldFg('primary', option.label) - : currentTheme.fg('text', option.label); - lines.push(currentTheme.fg(selected ? 'primary' : 'textDim', ` ${pointer} `) + label); - for (const line of wrapTextWithAnsi(option.description, Math.max(20, width - 4))) { - lines.push(` ${currentTheme.fg('textMuted', line)}`); + private renderDisclosure(width: number): string[] { + const { + gatedMcpServers, + gatedAdditionalDirs, + additionalDirSources, + instructionSources, + warnings, + } = this.opts.info; + const lines: string[] = []; + if (gatedMcpServers.length > 0) { + lines.push( + ...wrap( + `Start ${gatedMcpServers.length} MCP ${ + gatedMcpServers.length === 1 ? 'server' : 'servers' + } automatically`, + 1, + width, + 'warning', + ), + ); + const origins = [...new Set(gatedMcpServers.map((server) => server.origin))]; + lines.push( + ...wrap( + `Config: ${origins.map((path) => relativize(this.opts.workDir, path)).join(', ')}`, + 3, + width, + 'textMuted', + ), + '', + ); + } + if (gatedAdditionalDirs.length > 0) { + lines.push( + ...wrap( + `Access ${gatedAdditionalDirs.length} ${ + gatedAdditionalDirs.length === 1 ? 'folder' : 'folders' + } outside this project`, + 1, + width, + 'warning', + ), + ); + if (additionalDirSources.length > 0) { + lines.push( + ...wrap( + `Config: ${additionalDirSources + .map((path) => relativize(this.opts.workDir, path)) + .join(', ')}`, + 3, + width, + 'textMuted', + ), + ); } lines.push(''); } - - lines.push(rule); - return lines.map((line) => truncateToWidth(line, width)); + if (instructionSources.paths.length > 0) { + const hasInstructions = + instructionSources.agentsMdPaths.length > 0 || instructionSources.skills.length > 0; + const subject = hasInstructions + ? instructionSources.agentProfiles.length > 0 + ? 'instructions and agent profiles' + : 'instructions' + : 'agent profiles'; + lines.push(...wrap(`Load project ${subject}`, 1, width, 'text')); + lines.push( + ...wrap( + `Check: ${instructionSources.paths.map((path) => relativize(this.opts.workDir, path)).join(' · ')}`, + 3, + width, + 'textMuted', + ), + '', + ); + } + for (const warning of warnings) lines.push(...wrap(warning, 1, width, 'warning')); + if (lines.length === 0) + lines.push( + ...wrap('No project integrations or instructions to activate.', 1, width, 'textMuted'), + '', + ); + return lines; } } -function formatMcpTarget(server: WorkspaceTrustMcpServerInfo): string { - if (server.transport === 'stdio') { - const args = server.args === undefined ? '' : ` args=${JSON.stringify(server.args)}`; - const cwd = server.cwd === undefined ? '' : ` cwd=${server.cwd}`; - return sanitizeForDisplay(`${server.name} (stdio): command=${server.command ?? ''}${args}${cwd}`); - } - return sanitizeForDisplay(`${server.name} (${server.transport}): url=${server.url ?? ''}`); +function wrap(text: string, indent: number, width: number, color: ColorToken): string[] { + return wrapTextWithAnsi(sanitizeForDisplay(text), Math.max(1, width - indent)).map( + (line) => `${' '.repeat(indent)}${currentTheme.fg(color, line)}`, + ); +} + +function relativize(workDir: string, path: string): string { + const normalizedDir = workDir.replaceAll('\\', '/'); + const normalizedPath = path.replaceAll('\\', '/'); + const prefix = normalizedDir.endsWith('/') ? normalizedDir : `${normalizedDir}/`; + return normalizedPath.startsWith(prefix) ? normalizedPath.slice(prefix.length) : normalizedPath; } -/** - * Drops C0/C1 control characters (including ESC) from workspace-supplied text: - * the trust prompt renders before the workspace is trusted, so a planted - * `.mcp.json` must not inject terminal control sequences into it. - */ function sanitizeForDisplay(value: string): string { let result = ''; for (const char of value) { diff --git a/apps/pythinker-code/src/tui/pythinker-tui.ts b/apps/pythinker-code/src/tui/pythinker-tui.ts index a2f44c533..62b5ada8a 100644 --- a/apps/pythinker-code/src/tui/pythinker-tui.ts +++ b/apps/pythinker-code/src/tui/pythinker-tui.ts @@ -3878,7 +3878,14 @@ export class PythinkerTUI { try { info = await this.harness.getWorkspaceTrustInfo(workDir); } catch { - info = { trusted: false, gatedMcpServers: [] }; + info = { + trusted: false, + gatedMcpServers: [], + gatedAdditionalDirs: [], + additionalDirSources: [], + warnings: ['Could not inspect project settings.'], + instructionSources: { agentsMdPaths: [], skills: [], agentProfiles: [], paths: [] }, + }; } if (info.trusted) { return false; @@ -3889,7 +3896,9 @@ export class PythinkerTUI { this.mountEditorReplacement( new TrustPromptComponent({ workDir, - gatedMcpServers: info.gatedMcpServers, + info, + getAvailableRows: () => + this.state.terminal.rows - (this.state.ui instanceof TuiAltScreen ? 1 : 0), onSelect: (c) => { resolve(c); }, diff --git a/apps/pythinker-code/test/tui/components/dialogs/trust-prompt.test.ts b/apps/pythinker-code/test/tui/components/dialogs/trust-prompt.test.ts index d975bdcd2..5d4169055 100644 --- a/apps/pythinker-code/test/tui/components/dialogs/trust-prompt.test.ts +++ b/apps/pythinker-code/test/tui/components/dialogs/trust-prompt.test.ts @@ -1,116 +1,193 @@ import { describe, expect, it, vi } from 'vitest'; - -import type { WorkspaceTrustMcpServerInfo } from '@pymodel/pythinker-code-sdk'; - +import type { WorkspaceTrustInfo } from '@pymodel/pythinker-code-sdk'; import { TrustPromptComponent } from '#/tui/components/dialogs/trust-prompt'; -const ANSI_SGR = /\[[0-9;]*m/g; - -function strip(text: string): string { - return text.replaceAll(ANSI_SGR, ''); +function info(overrides: Partial = {}): WorkspaceTrustInfo { + return { + trusted: false, + gatedMcpServers: [], + gatedAdditionalDirs: [], + additionalDirSources: [], + instructionSources: { agentsMdPaths: [], skills: [], agentProfiles: [], paths: [] }, + warnings: [], + ...overrides, + }; } - -function renderLines(gatedMcpServers: readonly WorkspaceTrustMcpServerInfo[] = []): string[] { - const prompt = new TrustPromptComponent({ - workDir: '/tmp/demo-workspace', - gatedMcpServers, - onSelect: vi.fn(), +function render(prompt: TrustPromptComponent, width = 80): string[] { + return prompt.render(width).map((line) => line.replaceAll(/\u001B\[[0-9;]*m/g, '')); +} +const workDir = '/tmp/example-project'; +function mixedInfo(): WorkspaceTrustInfo { + return info({ + gatedMcpServers: [ + { + name: 'github', + transport: 'stdio', + command: 'npx', + args: ['--private-argument'], + origin: `${workDir}/.mcp.json`, + }, + { + name: 'docs', + transport: 'http', + url: 'https://example.test/private', + origin: `${workDir}/.pythinker-code/mcp.json`, + }, + ], + gatedAdditionalDirs: ['/tmp/shared-assets', '/Users/example/Documents'], + additionalDirSources: [`${workDir}/.pythinker-code/local.toml`], + instructionSources: { + agentsMdPaths: [`${workDir}/AGENTS.md`], + skills: ['lint-fix', 'deploy'], + agentProfiles: ['reviewer'], + paths: [ + `${workDir}/AGENTS.md`, + `${workDir}/.pythinker-code/skills/`, + `${workDir}/.pythinker-code/agents/`, + ], + }, }); - return prompt.render(100).map(strip); } describe('TrustPromptComponent', () => { - it('renders the header vocabulary and the workspace path', () => { - const lines = renderLines(); - const titleIdx = lines.findIndex((l) => l.includes('Trust this folder?')); - expect(titleIdx).toBeGreaterThanOrEqual(0); - const hint = lines[titleIdx + 1]; - expect(hint).toContain('↑↓ navigate'); - expect(hint).toContain('Enter select'); - expect(hint).toContain('Esc exit'); - expect(lines.some((l) => l.includes('/tmp/demo-workspace'))).toBe(true); - }); - - it('lists the gated project MCP servers when present', () => { - const lines = renderLines([ - { name: 'nested-server', transport: 'stdio', command: 'nested-cmd', args: ['--safe'], cwd: '/tmp' }, - { name: 'root-server', transport: 'http', url: 'https://example.test/mcp' }, - ]); - expect(lines.some((l) => l.includes('Project MCP targets'))).toBe(true); - expect(lines.some((l) => l.includes('nested-server (stdio): command=nested-cmd'))).toBe(true); - expect(lines.some((l) => l.includes('args=["--safe"] cwd=/tmp'))).toBe(true); - expect(lines.some((l) => l.includes('root-server (http): url=https://example.test/mcp'))).toBe(true); - expect(renderLines().some((l) => l.includes('This folder defines'))).toBe(false); - }); - - it('strips terminal control characters from workspace-supplied MCP targets', () => { - const lines = renderLines([ - { name: 'evil', transport: 'stdio', command: 'cmd\u001B[2J\u0007evil' }, - { name: 'multi\nline', transport: 'http', url: 'https://example.test/\u001B]8;;https://evil.test\u0007' }, - ]); + it('fits typical consequences and actual source paths on an 80x24 terminal', () => { + const prompt = new TrustPromptComponent({ + workDir, + info: mixedInfo(), + getAvailableRows: () => 23, + onSelect: vi.fn(), + }); + const lines = render(prompt); const text = lines.join('\n'); - // ESC and BEL are dropped, defusing the sequences into harmless literal text. - expect(text).toContain('evil (stdio): command=cmd[2Jevil'); - expect(text).toContain('multiline (http): url=https://example.test/]8;;https://evil.test'); - expect(text).not.toContain('\u001B]8;;https://evil.test'); + expect(lines.length).toBeLessThanOrEqual(23); + for (const label of [ + 'Start 2 MCP servers automatically', + 'Config: .mcp.json, .pythinker-code/mcp.json', + 'Access 2 folders outside this project', + 'Config: .pythinker-code/local.toml', + 'AGENTS.md', + '.pythinker-code/skills', + '.pythinker-code/agents/', + 'Check:', + 'future project config changes', + 'Trust and continue', + ]) + expect(text).toContain(label); + for (const hidden of [ + 'page', + '--private-argument', + 'PRIVATE_KEY', + 'https://example.test/private', + 'subagents', + ]) + expect(text).not.toContain(hidden); }); - - it('defaults to Trust this folder', () => { - const onSelect = vi.fn(); - const prompt = new TrustPromptComponent({ - workDir: '/tmp/demo-workspace', - gatedMcpServers: [], - onSelect, + it('distinguishes empty activation from unreadable configuration', () => { + const empty = new TrustPromptComponent({ workDir, info: info(), onSelect: vi.fn() }); + expect(render(empty).join('\n')).toContain( + 'No project integrations or instructions to activate.', + ); + const failed = new TrustPromptComponent({ + workDir, + info: info({ warnings: ['Could not inspect MCP configuration.'] }), + onSelect: vi.fn(), }); - prompt.handleInput('\r'); - expect(onSelect).toHaveBeenCalledWith('trust'); + const text = render(failed).join('\n'); + expect(text).toContain('Could not inspect MCP configuration.'); + expect(text).not.toContain('No project integrations'); + expect(text).not.toContain('No project-level config'); + expect(text).toContain('future project config changes'); }); - - it('stays on trust when moving up past the top', () => { - const onSelect = vi.fn(); + it('pages through MCP sources with fixed choices and persistent trust copy', () => { + const paths = Array.from({ length: 8 }, (_, i) => `/outside/directory-${i}`); + const origins = Array.from({ length: 12 }, (_, i) => `/outside/source-${i}/mcp.json`); + let rows = 23; const prompt = new TrustPromptComponent({ - workDir: '/tmp/demo-workspace', - gatedMcpServers: [], - onSelect, + workDir, + info: info({ + gatedMcpServers: origins.map((origin, i) => ({ + name: `server-${i}`, + transport: 'stdio', + origin, + })), + gatedAdditionalDirs: paths, + additionalDirSources: [`${workDir}/.pythinker-code/local.toml`], + }), + getAvailableRows: () => rows, + onSelect: vi.fn(), }); - prompt.handleInput('\u001B[A'); - prompt.handleInput('\r'); - expect(onSelect).toHaveBeenCalledWith('trust'); + const pages: string[] = []; + for (let i = 0; i < 30; i += 1) { + const lines = render(prompt, 60); + const text = lines.join('\n'); + if (pages.includes(text)) break; + expect(lines.length).toBeLessThanOrEqual(rows); + expect(text).toContain('Trust and continue'); + expect(text).toContain('Exit'); + expect(text.replaceAll(/\s+/g, ' ')).toContain('future project config'); + pages.push(text); + prompt.handleInput('\u001B[C'); + } + expect(pages.length).toBeGreaterThan(1); + for (const path of origins) expect(pages.join('\n')).toContain(path); + expect(pages.join('\n')).not.toContain('/outside/directory-'); + expect(pages.join('\n')).not.toContain('more'); + prompt.handleInput('\u001B[D'); + expect(render(prompt, 60).join('\n')).toBe(pages.at(-2)); + prompt.handleInput('\u001B[6~'); + expect(render(prompt, 60).join('\n')).toBe(pages.at(-1)); + rows = 60; + expect(render(prompt, 60).join('\n')).not.toContain('page'); }); - - it('selects distrust after moving the cursor down', () => { - const onSelect = vi.fn(); + it('cleans control characters and retains full long source paths across wrapping', () => { + const longPath = `/outside/${'x'.repeat(100)}/mcp.json`; const prompt = new TrustPromptComponent({ - workDir: '/tmp/demo-workspace', - gatedMcpServers: [], - onSelect, + workDir: '/tmp/\u001B[2Jproject', + info: info({ + gatedMcpServers: [{ name: 'ignored', transport: 'http', origin: longPath }], + gatedAdditionalDirs: ['/outside/\u001B[2Jdirectory\u0007'], + additionalDirSources: ['/outside/\u001B[2Jconfig\u0007'], + }), + onSelect: vi.fn(), }); - prompt.handleInput('\u001B[B'); - prompt.handleInput('\r'); - expect(onSelect).toHaveBeenCalledWith('distrust'); + const text = render(prompt).join('\n'); + expect(text).not.toContain('\u001B'); + expect(text).not.toContain('\u0007'); + expect(text).toContain('/outside/[2Jconfig'); + expect(text.replaceAll(/\s/g, '')).toContain(longPath); }); - - it('requires Enter to confirm trust and ignores Space', () => { + it('pauses confirmation in a tiny terminal and restores it after resizing', () => { + let rows = 4; const onSelect = vi.fn(); const prompt = new TrustPromptComponent({ - workDir: '/tmp/demo-workspace', - gatedMcpServers: [], + workDir, + info: mixedInfo(), + getAvailableRows: () => rows, onSelect, }); - prompt.handleInput(' '); + expect(render(prompt).join('\n')).toContain('Enlarge terminal'); + prompt.handleInput('\r'); expect(onSelect).not.toHaveBeenCalled(); + prompt.handleInput('\u001B'); + expect(onSelect).toHaveBeenCalledWith('distrust'); + onSelect.mockClear(); + rows = 23; + render(prompt); prompt.handleInput('\r'); expect(onSelect).toHaveBeenCalledWith('trust'); }); - - it('treats Esc as distrust', () => { - const onSelect = vi.fn(); - const prompt = new TrustPromptComponent({ - workDir: '/tmp/demo-workspace', - gatedMcpServers: [], - onSelect, - }); - prompt.handleInput('\u001B'); - expect(onSelect).toHaveBeenCalledWith('distrust'); + it('preserves default trust, selection, and escape behavior', () => { + for (const { keys, expected } of [ + { keys: ['\r'], expected: 'trust' }, + { keys: ['\u001B[A', '\r'], expected: 'trust' }, + { keys: ['\u001B[B', '\r'], expected: 'distrust' }, + { keys: ['\u001B'], expected: 'distrust' }, + ]) { + const onSelect = vi.fn(); + const prompt = new TrustPromptComponent({ workDir, info: info(), onSelect }); + render(prompt); + for (const key of keys) prompt.handleInput(key); + expect(onSelect).toHaveBeenCalledWith(expected); + } }); }); diff --git a/apps/pythinker-code/test/tui/pythinker-tui-startup.test.ts b/apps/pythinker-code/test/tui/pythinker-tui-startup.test.ts index 7f1df042b..977c14742 100644 --- a/apps/pythinker-code/test/tui/pythinker-tui-startup.test.ts +++ b/apps/pythinker-code/test/tui/pythinker-tui-startup.test.ts @@ -211,7 +211,7 @@ function makeHarness(session = makeSession(), overrides: Record track: vi.fn(), setTelemetryContext: vi.fn(), getExperimentalFeatures: vi.fn(async () => []), - getWorkspaceTrustInfo: vi.fn(async () => ({ trusted: true, gatedMcpServers: [] })), + getWorkspaceTrustInfo: vi.fn(async () => ({ trusted: true, gatedMcpServers: [], gatedAdditionalDirs: [], additionalDirSources: [], warnings: [], instructionSources: { agentsMdPaths: [], skills: [], agentProfiles: [], paths: [] } })), supportsAtomicSectionReplace: vi.fn(() => false), auth: { status: vi.fn(async () => ({ providers: [] })), @@ -2435,6 +2435,8 @@ describe('PythinkerTUI startup', () => { const getWorkspaceTrustInfo = vi.fn(async () => ({ trusted: true, gatedMcpServers: [], + gatedAdditionalDirs: [], additionalDirSources: [], warnings: [], + instructionSources: { agentsMdPaths: [], skills: [], agentProfiles: [], paths: [] }, })); const harness = makeHarness(makeSession(), { getWorkspaceTrustInfo }); const driver = makeDriver(harness, { @@ -2464,6 +2466,8 @@ describe('PythinkerTUI startup', () => { const getWorkspaceTrustInfo = vi.fn(async () => ({ trusted: false, gatedMcpServers: [], + gatedAdditionalDirs: [], additionalDirSources: [], warnings: [], + instructionSources: { agentsMdPaths: [], skills: [], agentProfiles: [], paths: [] }, })); const trustWorkspace = vi.fn(async () => {}); const harness = makeHarness(makeSession(), { getWorkspaceTrustInfo, trustWorkspace }); @@ -2536,6 +2540,8 @@ describe('PythinkerTUI startup', () => { const getWorkspaceTrustInfo = vi.fn(async () => ({ trusted: false, gatedMcpServers: [], + gatedAdditionalDirs: [], additionalDirSources: [], warnings: [], + instructionSources: { agentsMdPaths: [], skills: [], agentProfiles: [], paths: [] }, })); const trustWorkspace = vi.fn(async (): Promise => { throw new Error('disk full'); diff --git a/apps/pythinker-code/test/tui/signal-handlers.test.ts b/apps/pythinker-code/test/tui/signal-handlers.test.ts index bcf65e0d2..583bdb93e 100644 --- a/apps/pythinker-code/test/tui/signal-handlers.test.ts +++ b/apps/pythinker-code/test/tui/signal-handlers.test.ts @@ -47,7 +47,12 @@ function makeHarness() { close: vi.fn(async () => {}), track: vi.fn(), setTelemetryContext: vi.fn(), - getWorkspaceTrustInfo: vi.fn(async () => ({ trusted: true, gatedMcpServers: [] })), + getWorkspaceTrustInfo: vi.fn(async () => ({ + trusted: true, + gatedMcpServers: [], + gatedAdditionalDirs: [], additionalDirSources: [], warnings: [], + instructionSources: { agentsMdPaths: [], skills: [], agentProfiles: [], paths: [] }, + })), }; } diff --git a/apps/vis/server/src/lib/agent-record-types.ts b/apps/vis/server/src/lib/agent-record-types.ts index d01de9b87..658169e99 100644 --- a/apps/vis/server/src/lib/agent-record-types.ts +++ b/apps/vis/server/src/lib/agent-record-types.ts @@ -1,7 +1,7 @@ // @ts-nocheck // apps/vis/server/src/lib/agent-record-types.ts // Single source of truth: engine shapes come from agent-core-v2 directly. -// Do NOT add local interfaces that duplicate upstream shapes — the only +// Do NOT add local interfaces that duplicate engine shapes — the only // exceptions are the legacy records below, which v2 never writes but old // (v1-written / pre-migration) wires still contain on disk. @@ -20,26 +20,25 @@ export { WIRE_PROTOCOL_VERSION } from '@pymodel/agent-core-v2/wire/migration/mig export type { AgentTaskInfo as BackgroundTaskInfo, AgentTaskStatus as BackgroundTaskStatus, -} from '@pymodel/agent-core-v2'; +} from '@pymodel/agent-core-v2/agent/task/types'; export type { SubagentTaskInfo as AgentBackgroundTaskInfo } from '@pymodel/agent-core-v2'; export type { ProcessTaskInfo as ProcessBackgroundTaskInfo } from '@pymodel/agent-core-v2/agent/tools/os/bash/process-task'; export type { QuestionTaskInfo as QuestionBackgroundTaskInfo } from '@pymodel/agent-core-v2/agent/tools/ask-user-question/question-background-task'; +import type { AgentTaskInfo as BackgroundTaskInfo } from '@pymodel/agent-core-v2/agent/task/types'; import type { - AgentTaskInfo as BackgroundTaskInfo, CronAddPayload, + CronTask, CronCursorPayload, CronDeletePayload, - CronTask, - ExportSessionManifest, - FileHistoryCheckpointed, - FileHistoryTracked, - Forked, FullCompactionBegin, FullCompactionCancel, FullCompactionComplete, + FileHistoryCheckpointed, + FileHistoryTracked, GoalClear, GoalCreate, + Forked, GoalUpdate, InteractionRequestEvent, InteractionResolvedEvent, @@ -79,7 +78,7 @@ import type { } from '@pymodel/agent-core-v2/agent/contextMemory/contextEvents'; import type { TurnCancel, TurnEnded, TurnPrompt, TurnSteer } from '@pymodel/agent-core-v2/agent/loop/turnOps'; import type { TurnStepInterrupted } from '@pymodel/agent-core-v2/agent/loop/turnEvents'; -import type { TurnStepRetrying } from '@pymodel/agent-core-v2/agent/loop/turnEvents'; +import type { TurnStepRetrying } from '@pymodel/agent-core-v2/agent/stepRetry/stepRetryService'; import type { UsageRecord } from '@pymodel/agent-core-v2/agent/usage/usageOps'; import type { ConfigUpdate, @@ -90,7 +89,10 @@ import type { import type { PermissionSetMode } from '@pymodel/agent-core-v2/agent/permissionMode/permissionModeOps'; import type { PermissionRecordApprovalResult } from '@pymodel/agent-core-v2/agent/permissionRules/permissionRulesOps'; import type { RuntimeSetBinding } from '@pymodel/agent-core-v2/agent/runtimeBinding/runtimeBindingOps'; -import type { SwarmModeEnter, SwarmModeExit } from '@pymodel/agent-core-v2/features/swarm/swarmOps'; +import type { + DynamicWorkflowModeEnter, + DynamicWorkflowModeExit, +} from '@pymodel/agent-core-v2/features/dynamic_workflow/dynamicWorkflowOps'; import type { TowerModeEnter, TowerModeExit } from '@pymodel/agent-core-v2/features/tower/towerOps'; import type { ToolsUpdateStore } from '@pymodel/agent-core-v2/features/todo/todoOps'; @@ -134,19 +136,9 @@ export interface StaleGuardClearedRecord { readonly time?: number; } -/** v2-dropped durable record: removed with the loop-side prompt admission - * facility, but old wires still contain it. */ -export interface PromptAcceptedRecord { - readonly type: 'prompt.accepted'; - readonly agentId: string; - readonly promptId: string; - readonly content?: unknown; - readonly time?: number; -} - /** The wire file header record. Declared locally (rather than via v2's * `WireMetadataRecord`) so the union member keeps concrete field types — - * the upstream interface carries an index signature that would widen + * the engine interface carries an index signature that would widen * `protocol_version` / `created_at` to `unknown`. */ export interface WireMetadataHeader { readonly type: 'metadata'; @@ -173,6 +165,8 @@ export type AgentRecord = | WireRecordOf<'cron.add', CronAddPayload> | WireRecordOf<'cron.cursor', CronCursorPayload> | WireRecordOf<'cron.delete', CronDeletePayload> + | WireRecordOf<'dynamic_workflow_mode.enter', DynamicWorkflowModeEnter> + | WireRecordOf<'dynamic_workflow_mode.exit', DynamicWorkflowModeExit> | WireRecordOf<'file_history.checkpoint', FileHistoryCheckpointed> | WireRecordOf<'file_history.tracked', FileHistoryTracked> | WireRecordOf<'forked', Forked> @@ -197,7 +191,7 @@ export type AgentRecord = | WireRecordOf<'plugin.session_start', PluginSessionStartEvent> | WireRecordOf<'profile.bind', ProfileBind> | WireRecordOf<'prompt.aborted', PromptAborted> - | PromptAcceptedRecord + | WireRecordOf<'prompt.accepted', PromptAcceptedRecord> | WireRecordOf<'prompt.completed', PromptCompleted> | WireRecordOf<'prompt.steered', PromptSteered> | WireRecordOf<'runtime.set_binding', RuntimeSetBinding> @@ -206,8 +200,6 @@ export type AgentRecord = | WireRecordOf<'subagent.failed', SubagentFailed> | WireRecordOf<'subagent.spawned', SubagentSpawned> | WireRecordOf<'subagent.started', SubagentStarted> - | WireRecordOf<'swarm_mode.enter', SwarmModeEnter> - | WireRecordOf<'swarm_mode.exit', SwarmModeExit> | WireRecordOf<'task.started', TaskStarted> | WireRecordOf<'task.terminated', TaskTerminated> | WireRecordOf<'task.waitDelivered', TaskWaitDelivered> @@ -242,10 +234,35 @@ export type AgentRecordOf = Extract< /** * `manifest.json` shape inside a `/export-debug-zip` bundle. Structural - * current engine manifest with every field optional because the bundle may - * come from another machine or an older pythinker-code version. + * mirror of the engine's `ExportSessionManifest`, which is not re-exported + * from the package entry. All fields optional-tolerant because the manifest + * comes from another machine / pythinker-code version. */ -export type ImportManifest = Partial; +export interface ImportManifest { + sessionId?: string; + exportedAt?: string; + pythinkerCodeVersion?: string; + wireProtocolVersion?: string; + os?: string; + nodejsVersion?: string; + sessionFirstActivity?: string; + sessionLastActivity?: string; + title?: string; + workspaceDir?: string; + sessionLogPath?: string; + globalLogPath?: string; + desktopLogPath?: string; + webLogPath?: string; + desktopVersion?: string; + installSource?: string; + shellEnv?: { + term?: string; + termProgram?: string; + termProgramVersion?: string; + multiplexer?: string; + shell?: string; + }; +} /** vis-side bookkeeping for one imported bundle, written to * `imported//import-meta.json`. */ @@ -308,12 +325,13 @@ export interface AgentInfo { wireExists: boolean; wireRecordCount: number; wireProtocolVersion: string | null; - /** Per-item swarm work label persisted by the engine for swarm-spawned - * sub-agents (`AgentMeta.swarmItem`, or `AgentMeta.labels.swarmItem` on - * v2-written sessions). `null` when the agent is not a swarm item or when - * the value cannot be recovered (e.g. disk-only inventory of a session - * with a corrupt `state.json`). */ - swarmItem: string | null; + /** Per-item dynamic_workflow work label persisted by the engine for + * dynamic-workflow-spawned sub-agents (`AgentMeta.dynamicWorkflowItem`, or + * `AgentMeta.labels.dynamicWorkflowItem` on v2-written sessions). `null` + * when the agent is not a dynamic_workflow item or when the value cannot + * be recovered (e.g. disk-only inventory of a session with a corrupt + * `state.json`). */ + dynamicWorkflowItem: string | null; } export interface SessionDetail { @@ -323,7 +341,7 @@ export interface SessionDetail { * which can drift after fork/rename. */ sessionDir: string; workDir: string; - state: unknown; // 原样透传,前端按 state.json 真实形状渲染 + state: unknown; // Preserve the source shape; the UI renders the actual state.json form. agents: AgentInfo[]; /** True for sessions imported from a debug zip. */ imported: boolean; diff --git a/docs/configuration/env-vars.md b/docs/configuration/env-vars.md index 80fb8e139..3294304d6 100644 --- a/docs/configuration/env-vars.md +++ b/docs/configuration/env-vars.md @@ -153,6 +153,7 @@ Switches that control the behavior of subsystems such as telemetry, background t | `PYTHINKER_MCP_TOOL_TIMEOUT_MS` | Global default single tool-call timeout (ms) for all MCP servers; takes higher priority than `[mcp] tool_timeout_ms` in `config.toml`, but a per-server `toolTimeoutMs` in `mcp.json` still wins (default `60000`) | Integer from `1` to `2147483647`; invalid values are ignored | | `PYTHINKER_LOOP_MAX_STEPS_PER_TURN` | Maximum Agent steps per turn; takes higher priority than `[loop_control] max_steps_per_turn` in `config.toml` (unset or `0` means unlimited) | Non-negative integer; invalid values are ignored | | `PYTHINKER_LOOP_MAX_ATTEMPTS_PER_STEP` | Maximum total attempts for a failing step (including the initial attempt); takes higher priority than `[loop_control] max_attempts_per_step` in `config.toml` (default `10`). The deprecated `PYTHINKER_LOOP_MAX_RETRIES_PER_STEP` is still honored with a warning when this variable is unset | Non-negative integer; invalid values are ignored | +| `PYTHINKER_CODE_TRUST_WORKSPACE` | Mark the current workspace as trusted, equivalent to choosing "Trust this folder" at the interactive trust prompt; takes effect per process and does not write a persistent trust record | Truthy: `1`/`true`/`yes`/`on`; falsy: `0`/`false`/`no`/`off` | | `PYTHINKER_CODE_INFINITE_RETRY` | Retry every failed LLM request indefinitely — turn steps and background operations such as compaction alike — instead of failing the task; waits use exponential backoff (capped at 32 s) and honor the server's `Retry-After` header, and aborting still cancels immediately. Intended for long-running unattended evaluations against endpoints that may fail temporarily | Truthy: `1`/`true`/`yes`/`on`; falsy: `0`/`false`/`no`/`off` | | `PYTHINKER_TOKEN_COUNTING_STRATEGY` | Which context token count is reported externally (the context-size display); takes higher priority than `[token_counting] strategy` in `config.toml` (default `measured+estimated`) | `measured+estimated`, `measured`, `estimated` (case-insensitive); invalid values are ignored | | `PYTHINKER_WEB_SEARCH_BASE_URL` | API URL of the web search (`WebSearch`) service; takes higher priority than `[services.pymodel_search] base_url` in `config.toml`, and enables the service without that config section. Persisted credentials and custom headers are not forwarded to an env-selected endpoint | Non-blank string; blank values are ignored | diff --git a/docs/customization/mcp.md b/docs/customization/mcp.md index a1c326003..4c15e5891 100644 --- a/docs/customization/mcp.md +++ b/docs/customization/mcp.md @@ -31,6 +31,8 @@ Deleting a server from the configuration does not interrupt open sessions: the s When Pythinker Code finds project-level MCP servers in an untrusted folder, it shows each server's transport and launch target in the workspace trust prompt. The prompt defaults to `Trust this folder`; review the listed command and arguments or remote URL before confirming. Trusting the folder enables the project-level MCP servers for that workspace. +Headless runs (for example `pythinker -p` in CI) cannot show the trust prompt, so project-level MCP servers stay disabled there unless the workspace is already trusted. Set [`PYTHINKER_CODE_TRUST_WORKSPACE`](../configuration/env-vars.md#runtime-switches) to `1` to trust the workspace for that process. + Structure of `mcp.json`: ```json diff --git a/flake.nix b/flake.nix index edef25a48..09308a936 100644 --- a/flake.nix +++ b/flake.nix @@ -165,7 +165,7 @@ inherit (finalAttrs) pname version src pnpmWorkspaces; inherit pnpm; fetcherVersion = 3; - hash = "sha256-rCIilrxF8ys9ijp89rJwRULX3vurOSzGwPDum0N6Ut8="; + hash = "sha256-hSNyk78iehCbiSl7iRr9Tt7ivEyRHQSJxUDFaZQ69FU="; }; nativeBuildInputs = [ diff --git a/package.json b/package.json index 08df25a92..3838d7806 100644 --- a/package.json +++ b/package.json @@ -79,18 +79,23 @@ }, "pnpm": { "overrides": { - "undici": ">=7.28.0", + "undici": ">=8.10.2", "shell-quote": ">=1.9.0", - "serialize-javascript": ">=7.0.3", + "serialize-javascript": ">=7.1.2", "vite": ">=6.4.3", - "dompurify": ">=3.4.8", - "ip-address": ">=10.3.1", + "dompurify": ">=3.4.16", + "ip-address": ">=10.7.1", "smol-toml": ">=1.7.1", "esbuild": ">=0.28.1", "fastify": ">=5.12.1", "vitest": ">=4.1.11", "@vitest/mocker": ">=4.1.11", - "diff": ">=8.0.3" + "diff": ">=8.0.3", + "fast-uri@^3.0.0": "^3.1.8", + "markdown-it": ">=14.3.1 <15", + "brace-expansion@1.x": "^1.1.21", + "brace-expansion@2.x": "^2.1.7", + "brace-expansion@5.x": "^5.0.12" } } } diff --git a/packages/agent-core-v2/src/app/mcpRegistry/mcpRegistryService.ts b/packages/agent-core-v2/src/app/mcpRegistry/mcpRegistryService.ts index 2398c1904..2ec9b25c2 100644 --- a/packages/agent-core-v2/src/app/mcpRegistry/mcpRegistryService.ts +++ b/packages/agent-core-v2/src/app/mcpRegistry/mcpRegistryService.ts @@ -10,6 +10,7 @@ import { IPluginService } from '#/app/plugin/plugin'; import { IHostFileSystem } from '#/os/interface/hostFileSystem'; import { IAtomicDocumentStore } from '#/persistence/interface/atomicDocumentStore'; import { readWorkspaceTrust } from '#/workspace/workspaceTrust/trustRecord'; +import { trustWorkspaceEnvTrusted } from '#/workspace/workspaceTrust/workspaceTrustService'; import { IMcpRegistryService, @@ -45,7 +46,10 @@ export class McpRegistryService implements IMcpRegistryService { } } else { const cwd = canonicalWorkspaceRoot(query.cwd); - if (!(await readWorkspaceTrust(this.docs, cwd))) { + const trusted = + (await readWorkspaceTrust(this.docs, cwd)) || + trustWorkspaceEnvTrusted((name) => this.bootstrap.getEnv(name)); + if (!trusted) { const userEntries = await this.store.list(); for (const server of userEntries) { const { name, ...config } = server; diff --git a/packages/agent-core-v2/src/program/program.ts b/packages/agent-core-v2/src/program/program.ts index d8339e779..4ae001b5a 100644 --- a/packages/agent-core-v2/src/program/program.ts +++ b/packages/agent-core-v2/src/program/program.ts @@ -20,6 +20,8 @@ import type { IWorkspaceMcpConfigService } from '#/workspace/workspaceMcpConfig/ import { WorkspaceMcpConfigService } from '#/workspace/workspaceMcpConfig/workspaceMcpConfigService'; import type { IWorkspaceTrust } from '#/workspace/workspaceTrust/workspaceTrust'; import { WorkspaceTrustService } from '#/workspace/workspaceTrust/workspaceTrustService'; +import type { IWorkspaceTrustDisclosure } from '#/workspace/workspaceTrust/trustDisclosure'; +import { WorkspaceTrustDisclosureService } from '#/workspace/workspaceTrust/trustDisclosureService'; import type { IExtraAgentProfileLoader } from '#/workspace/workspaceAgentProfileLoader/extraAgentProfileLoader'; import { ExtraAgentProfileLoaderService } from '#/workspace/workspaceAgentProfileLoader/extraAgentProfileLoaderService'; import type { IExplicitAgentProfileLoader } from '#/workspace/workspaceAgentProfileLoader/explicitAgentProfileLoader'; @@ -91,6 +93,7 @@ interface ProgramGeneration { readonly mcpConfig: IWorkspaceMcpConfigService; readonly mcp: IWorkspaceMcpService; readonly trust: IWorkspaceTrust; + readonly trustDisclosure: IWorkspaceTrustDisclosure; readonly skills: IWorkspaceSkillCatalog; readonly agentProfiles: IWorkspaceAgentProfileLoader; readonly userAgentProfiles: IUserAgentProfileLoader; @@ -144,6 +147,7 @@ export class Program { get mcpConfig(): IWorkspaceMcpConfigService { return this.requireGeneration().mcpConfig; } get mcp(): IWorkspaceMcpService { return this.requireGeneration().mcp; } get trust(): IWorkspaceTrust { return this.requireGeneration().trust; } + get trustDisclosure(): IWorkspaceTrustDisclosure { return this.requireGeneration().trustDisclosure; } get skills(): IWorkspaceSkillCatalog { return this.requireGeneration().skills; } get agentProfiles(): IWorkspaceAgentProfileLoader { return this.requireGeneration().agentProfiles; } get sessionControllerGeneration(): string { return this.requireGeneration().id; } @@ -283,7 +287,7 @@ export class Program { const git = new WorkspaceGitService(this.context, this.dependencies.git); const fs = new WorkspaceFsService(this.context, dirs, runtime.fs!, this.resolver, this.dependencies.telemetry, git); const instructions = own(new WorkspaceInstructionsService(this.context, runtime.fs!, runtime.environment, this.dependencies.bootstrap, this.dependencies.log, state)); - const trust = own(new WorkspaceTrustService(this.context, this.dependencies.docs, state, this.dependencies.telemetry)); + const trust = own(new WorkspaceTrustService(this.context, this.dependencies.docs, state, this.dependencies.telemetry, this.dependencies.bootstrap)); const mcpConfig = own(new WorkspaceMcpConfigService(this.context, this.dependencies.bootstrap, this.dependencies.plugins, this.dependencies.log, this.dependencies.config, runtime.fs!, trust, this.dependencies.configStore)); const mcp = own(new WorkspaceMcpService(this.context, this.resolver, mcpConfig, this.dependencies.oauth, this.dependencies.log, this.dependencies.telemetry, this.dependencies.identity, this.dependencies.sessionManager)); const userAgentProfiles = own(new UserAgentProfileLoaderService(this.dependencies.bootstrap, runtime.fs!, this.dependencies.log, this.dependencies.builtinAgentProfiles, this.context, this.dependencies.agentProfiles)); @@ -298,6 +302,7 @@ export class Program { const workspaceSkills = own(new WorkspaceRootSkillSource(skillDiscovery, this.context, this.dependencies.config, this.dependencies.bootstrap)); const pluginSkills = new PluginSkillSource(skillDiscovery, this.dependencies.plugins); const skills = own(new WorkspaceSkillCatalogService(this.dependencies.builtinSkills, userSkills, explicitSkills, extraSkills, workspaceSkills, pluginSkills, state)); + const trustDisclosure = new WorkspaceTrustDisclosureService(this.context, runtime.fs!, this.dependencies.bootstrap, this.dependencies.config, localConfig, trust, skills, agentProfiles, this.dependencies.agentProfiles, instructions, this.dependencies.log); return { id: runtime.identity.generation, lease, @@ -309,6 +314,7 @@ export class Program { mcpConfig, mcp, trust, + trustDisclosure, skills, agentProfiles, userAgentProfiles, diff --git a/packages/agent-core-v2/src/workspace/workspaceTrust/trustDisclosure.ts b/packages/agent-core-v2/src/workspace/workspaceTrust/trustDisclosure.ts new file mode 100644 index 000000000..bbbe0bc9a --- /dev/null +++ b/packages/agent-core-v2/src/workspace/workspaceTrust/trustDisclosure.ts @@ -0,0 +1,35 @@ +import { createDecorator, type ServiceIdentifier } from '#/_base/di/instantiation'; + +export interface TrustGatedMcpServer { + readonly name: string; + readonly transport: 'stdio' | 'http' | 'sse'; + readonly command?: string; + readonly args?: readonly string[]; + readonly cwd?: string; + readonly url?: string; + readonly origin: string; +} + +export interface TrustGatedInstructionSources { + readonly agentsMdPaths: readonly string[]; + readonly skills: readonly string[]; + readonly agentProfiles: readonly string[]; + readonly paths: readonly string[]; +} + +export interface TrustGatedActivation { + readonly mcpServers: readonly TrustGatedMcpServer[]; + readonly additionalDirs: readonly string[]; + readonly additionalDirSources: readonly string[]; + readonly warnings: readonly string[]; + readonly instructionSources: TrustGatedInstructionSources; +} + +export interface IWorkspaceTrustDisclosure { + readonly _serviceBrand: undefined; + + describeGatedActivation(): Promise; +} + +export const IWorkspaceTrustDisclosure: ServiceIdentifier = + createDecorator('workspaceTrustDisclosure'); diff --git a/packages/agent-core-v2/src/workspace/workspaceTrust/trustDisclosureService.ts b/packages/agent-core-v2/src/workspace/workspaceTrust/trustDisclosureService.ts new file mode 100644 index 000000000..7e7f2adfb --- /dev/null +++ b/packages/agent-core-v2/src/workspace/workspaceTrust/trustDisclosureService.ts @@ -0,0 +1,312 @@ +import { isAbsolute, relative } from 'pathe'; + +import type { ILogService } from '#/_base/log/log'; +import type { IAgentProfileRegistry } from '#/app/agentProfileCatalog/agentProfileRegistry'; +import { BUILTIN_AGENT_PROFILE_SOURCE_ID } from '#/app/agentProfileCatalog/builtinAgentProfileLoader'; +import type { IBootstrapService } from '#/app/bootstrap/bootstrap'; +import type { IConfigService } from '#/app/config/config'; +import { findGitWorkTree } from '#/app/git/workTree'; +import { loadMcpServersDetailed, resolveMcpJsonPaths } from '#/app/mcpConfig/configLoader'; +import type { IProjectLocalConfigService } from '#/app/projectLocalConfig/projectLocalConfig'; +import { + MERGE_ALL_AVAILABLE_SKILLS_SECTION, + type MergeAllAvailableSkillsConfig, +} from '#/features/skill/catalog/configSection'; +import { projectRoots } from '#/features/skill/catalog/skillRoots'; +import type { IWorkspaceSkillCatalog } from '#/features/skill/workspace/workspaceSkillCatalog'; +import type { McpServerConfig } from '#/mcpCore/config-schema'; +import type { IHostFileSystem } from '#/os/interface/hostFileSystem'; +import type { IWorkspaceAgentProfileLoader } from '#/workspace/workspaceAgentProfileLoader/workspaceAgentProfileLoader'; +import type { IWorkspaceContext } from '#/workspace/workspaceContext/workspaceContext'; +import type { IWorkspaceInstructionsService } from '#/workspace/workspaceInstructions/workspaceInstructions'; + +import type { + IWorkspaceTrustDisclosure, + TrustGatedActivation, + TrustGatedInstructionSources, + TrustGatedMcpServer, +} from './trustDisclosure'; +import type { IWorkspaceTrust } from './workspaceTrust'; + +const EMPTY_INSTRUCTION_SOURCES: TrustGatedInstructionSources = { + agentsMdPaths: [], + skills: [], + agentProfiles: [], + paths: [], +}; + +const EMPTY_ACTIVATION: TrustGatedActivation = { + mcpServers: [], + additionalDirs: [], + additionalDirSources: [], + warnings: [], + instructionSources: EMPTY_INSTRUCTION_SOURCES, +}; + +const SKILL_DISCLOSURE_TIMEOUT_MS = 1000; + +export class WorkspaceTrustDisclosureService implements IWorkspaceTrustDisclosure { + declare readonly _serviceBrand: undefined; + + constructor( + private readonly context: IWorkspaceContext, + private readonly fs: IHostFileSystem, + private readonly bootstrap: IBootstrapService, + private readonly config: IConfigService, + private readonly localConfig: IProjectLocalConfigService, + private readonly trust: IWorkspaceTrust, + private readonly skills: IWorkspaceSkillCatalog, + private readonly agentProfilesLoader: IWorkspaceAgentProfileLoader, + private readonly agentProfilesRegistry: IAgentProfileRegistry, + private readonly instructions: IWorkspaceInstructionsService, + private readonly log: ILogService, + ) {} + + async describeGatedActivation(): Promise { + await this.trust.ready; + if (this.trust.isTrusted()) return EMPTY_ACTIVATION; + const warnings: string[] = []; + const [mcpServers, configuredDirs, skillRoots, instructionSources] = await Promise.all([ + this.describeGatedMcpServers().catch((error: unknown) => { + this.log.warn(`trust disclosure: MCP scan failed: ${String(error)}`); + warnings.push('Could not inspect MCP configuration.'); + return []; + }), + this.readGatedAdditionalDirs().catch((error: unknown) => { + this.log.warn(`trust disclosure: additional dirs scan failed: ${String(error)}`); + warnings.push('Could not inspect additional directory configuration.'); + return { dirs: [], sources: [] }; + }), + this.readGatedSkillRoots().catch((error: unknown) => { + this.log.warn(`trust disclosure: skill roots scan failed: ${String(error)}`); + warnings.push('Could not inspect project skill directories.'); + return []; + }), + this.describeInstructionSources(warnings).catch((error: unknown) => { + this.log.warn(`trust disclosure: instruction sources scan failed: ${String(error)}`); + warnings.push('Could not inspect project instructions.'); + return EMPTY_INSTRUCTION_SOURCES; + }), + ]); + const additionalDirs = [...configuredDirs.dirs, ...skillRoots].filter( + (dir, index, all) => all.indexOf(dir) === index, + ); + const additionalDirSources = [...new Set([...configuredDirs.sources, ...skillRoots])]; + return { mcpServers, additionalDirs, additionalDirSources, instructionSources, warnings }; + } + + private async describeGatedMcpServers(): Promise { + const cwd = this.context.cwd; + const homeDir = this.bootstrap.homeDir; + const [paths, loaded] = await Promise.all([ + resolveMcpJsonPaths({ fs: this.fs, cwd, homeDir }), + loadMcpServersDetailed({ fs: this.fs, cwd, homeDir, includeProject: true }), + ]); + const projectPaths = new Set([paths.projectRoot, paths.project]); + const servers = Object.entries(loaded.servers) + .filter(([name]) => projectPaths.has(loaded.origins[name] ?? '')) + .filter(([, config]) => config.enabled !== false) + .map(([name, config]) => describeMcpServer(name, config, loaded.origins[name] ?? '')) + .toSorted((a, b) => a.name.localeCompare(b.name)); + return Promise.all( + servers.map(async (server) => ({ + ...server, + origin: await realpathOrSelf(this.fs, server.origin), + })), + ); + } + + private async readGatedAdditionalDirs(): Promise<{ + dirs: readonly string[]; + sources: readonly string[]; + }> { + const result = await this.localConfig.readAdditionalDirs(this.context.cwd); + const realRoot = await realpathOrSelf(this.fs, result.projectRoot); + const dirs: string[] = []; + for (const dir of result.additionalDirs) { + const realPath = await realpathOrSelf(this.fs, dir); + if (isInsideOrEqualDir(realPath, realRoot)) continue; + dirs.push(realPath); + } + return { + dirs, + sources: dirs.length > 0 ? [await realpathOrSelf(this.fs, result.configPath)] : [], + }; + } + + private async readGatedSkillRoots(): Promise { + if ((this.bootstrap.args.skillDirs?.length ?? 0) > 0) return []; + const mergeAllAvailableSkills = + this.config.get(MERGE_ALL_AVAILABLE_SKILLS_SECTION) ?? true; + const projectRoot = + (await findGitWorkTree(this.fs, this.context.cwd))?.root ?? this.context.cwd; + const [roots, realRoot] = await Promise.all([ + projectRoots(this.context.cwd, { mergeAllAvailableSkills }), + realpathOrSelf(this.fs, projectRoot), + ]); + return roots + .filter((root) => !isInsideOrEqualDir(root.path, realRoot)) + .map((root) => root.path); + } + + private async describeInstructionSources( + warnings: string[], + ): Promise { + const [skillsReady] = await Promise.all([ + waitForReady(this.skills.ready, SKILL_DISCLOSURE_TIMEOUT_MS), + this.agentProfilesLoader.ready, + this.instructions.ready, + ]); + if (!skillsReady) { + warnings.push('Project skills are still loading; inspect the project skill directories.'); + } + const projectRoot = + (await findGitWorkTree(this.fs, this.context.cwd))?.root ?? this.context.cwd; + if (this.instructions.snapshot.agentsMdWarning !== undefined) { + warnings.push(this.instructions.snapshot.agentsMdWarning); + } + const skills = this.skills.catalog.listSkills().filter((skill) => skill.source === 'project'); + const profiles = this.effectiveWorkspaceProfiles(); + const agentsMdPaths: string[] = []; + for (const path of this.instructions.snapshot.agentsMdPaths ?? []) { + if (!isInsideOrEqualDir(path, projectRoot)) continue; + agentsMdPaths.push(await realpathOrSelf(this.fs, path)); + } + agentsMdPaths.sort(); + const workspaceProfiles = this.agentProfilesRegistry + .entries() + .find( + (entry) => + entry.sourceId === 'workspace' && entry.workspaceKey === this.context.workspaceId, + ); + const [skillPaths, profilePaths] = await Promise.all([ + skillsReady + ? this.sourceLocations( + skills.map((skill) => skill.path), + this.skills.catalog.getSkillRoots(), + ) + : this.projectSkillRootPaths(), + Promise.all( + (profiles.length > 0 ? workspaceProfiles?.contribution.scannedRoots ?? [] : []) + .map(async (root) => `${await realpathOrSelf(this.fs, root)}/`), + ), + ]); + return { + agentsMdPaths, + skills: skills.map((skill) => skill.name).toSorted(), + agentProfiles: profiles, + paths: [...new Set([...agentsMdPaths, ...skillPaths, ...profilePaths])], + }; + } + + private async sourceLocations( + paths: readonly string[], + roots: readonly string[], + ): Promise { + const realRoots = await Promise.all(roots.map((root) => realpathOrSelf(this.fs, root))); + realRoots.sort((a, b) => b.length - a.length); + const locations = await Promise.all( + paths.map(async (path) => { + const realPath = await realpathOrSelf(this.fs, path); + const root = realRoots.find((root) => isInsideOrEqualDir(realPath, root)); + return root === undefined ? realPath : `${root}/`; + }), + ); + return [...new Set(locations)].toSorted(); + } + + private async projectSkillRootPaths(): Promise { + const mergeAllAvailableSkills = + this.config.get(MERGE_ALL_AVAILABLE_SKILLS_SECTION) ?? true; + return (await projectRoots(this.context.cwd, { mergeAllAvailableSkills })) + .map((root) => root.path) + .toSorted(); + } + + private effectiveWorkspaceProfiles(): readonly string[] { + const entries = this.agentProfilesRegistry + .entries() + .filter( + (entry) => + entry.workspaceKey === undefined || entry.workspaceKey === this.context.workspaceId, + ); + const builtinNames = new Set( + entries + .find((entry) => entry.sourceId === BUILTIN_AGENT_PROFILE_SOURCE_ID) + ?.contribution.profiles.map((profile) => profile.name) ?? [], + ); + const winners = new Map(); + const ordered = entries + .filter((entry) => entry.sourceId !== BUILTIN_AGENT_PROFILE_SOURCE_ID) + .toSorted((a, b) => b.priority - a.priority); + for (const entry of ordered) { + const seen = new Set(); + for (const profile of entry.contribution.profiles) { + if (seen.has(profile.name)) continue; + seen.add(profile.name); + if (winners.has(profile.name)) continue; + if (builtinNames.has(profile.name) && profile.override !== true) continue; + winners.set(profile.name, entry.sourceId); + } + } + return [...winners] + .filter(([, sourceId]) => sourceId === 'workspace') + .map(([name]) => name) + .toSorted(); + } +} + +function describeMcpServer( + name: string, + config: McpServerConfig, + origin: string, +): TrustGatedMcpServer { + if (config.transport === 'stdio') { + return { + name, + transport: config.transport, + command: config.command, + args: config.args, + cwd: config.cwd, + origin, + }; + } + return { + name, + transport: config.transport, + url: config.url, + origin, + }; +} + +async function realpathOrSelf(fs: IHostFileSystem, dir: string): Promise { + try { + return await fs.realpath(dir); + } catch { + return dir; + } +} + +function isInsideOrEqualDir(child: string, parent: string): boolean { + const rel = relative(parent, child); + return rel === '' || (rel !== '..' && !rel.startsWith('../') && !isAbsolute(rel)); +} + +async function waitForReady(ready: Promise, timeoutMs: number): Promise { + let timer: ReturnType | undefined; + try { + return await Promise.race([ + ready.then( + () => true, + () => false, + ), + new Promise((resolve) => { + timer = setTimeout(() => { + resolve(false); + }, timeoutMs); + }), + ]); + } finally { + if (timer !== undefined) clearTimeout(timer); + } +} diff --git a/packages/agent-core-v2/src/workspace/workspaceTrust/workspaceTrustService.ts b/packages/agent-core-v2/src/workspace/workspaceTrust/workspaceTrustService.ts index 041323112..e8dafb1c4 100644 --- a/packages/agent-core-v2/src/workspace/workspaceTrust/workspaceTrustService.ts +++ b/packages/agent-core-v2/src/workspace/workspaceTrust/workspaceTrustService.ts @@ -1,6 +1,8 @@ import { Disposable } from '#/_base/di/lifecycle'; import { Emitter } from '#/_base/event'; +import { parseBooleanEnv } from '#/_base/utils/env'; import { defineState } from '#/state/state'; +import { IBootstrapService } from '#/app/bootstrap/bootstrap'; import { ITelemetryService } from '#/app/telemetry/telemetry'; import { IAtomicDocumentStore } from '#/persistence/interface/atomicDocumentStore'; import { IWorkspaceStateService } from '#/workspace/state/workspaceState'; @@ -9,6 +11,14 @@ import { IWorkspaceContext } from '#/workspace/workspaceContext/workspaceContext import { IWorkspaceTrust, type WorkspaceTrustChange } from './workspaceTrust'; import { deleteWorkspaceTrust, readWorkspaceTrust, writeWorkspaceTrust } from './trustRecord'; +export const TRUST_WORKSPACE_ENV = 'PYTHINKER_CODE_TRUST_WORKSPACE'; + +export function trustWorkspaceEnvTrusted( + getEnv: (name: string) => string | undefined, +): boolean { + return parseBooleanEnv(getEnv(TRUST_WORKSPACE_ENV)) === true; +} + export const workspaceTrustTrustedKey = defineState( 'workspaceTrust.trusted', () => false, @@ -19,6 +29,7 @@ export class WorkspaceTrustService extends Disposable implements IWorkspaceTrust readonly ready: Promise; private readonly root: string; + private readonly envTrusted: boolean; private readonly changeEmitter = this._register(new Emitter()); readonly onDidChange = this.changeEmitter.event; @@ -27,10 +38,12 @@ export class WorkspaceTrustService extends Disposable implements IWorkspaceTrust @IAtomicDocumentStore private readonly docs: IAtomicDocumentStore, @IWorkspaceStateService private readonly states: IWorkspaceStateService, @ITelemetryService private readonly telemetry: ITelemetryService, + @IBootstrapService bootstrap: IBootstrapService, ) { super(); this.states.contributeState(workspaceTrustTrustedKey); this.root = workspace.cwd; + this.envTrusted = trustWorkspaceEnvTrusted((name) => bootstrap.getEnv(name)); this.ready = this.initialize(); } @@ -43,12 +56,12 @@ export class WorkspaceTrustService extends Disposable implements IWorkspaceTrust } isTrusted(): boolean { - return this.trusted; + return this.envTrusted || this.trusted; } async get(): Promise { await this.ready; - return this.trusted; + return this.isTrusted(); } async trust(): Promise { diff --git a/packages/agent-core-v2/test/app/mcpManagement/mcpManagement.test.ts b/packages/agent-core-v2/test/app/mcpManagement/mcpManagement.test.ts index 5eaa52cbf..ce0cb0fc3 100644 --- a/packages/agent-core-v2/test/app/mcpManagement/mcpManagement.test.ts +++ b/packages/agent-core-v2/test/app/mcpManagement/mcpManagement.test.ts @@ -111,7 +111,10 @@ describe('McpManagementService', () => { const ix = createServices(disposables, { additionalServices: (reg) => { reg.defineInstance(IFileSystemStorageService, storage); - reg.definePartialInstance(IBootstrapService, { homeDir: home }); + reg.definePartialInstance(IBootstrapService, { + homeDir: home, + getEnv: () => undefined, + }); reg.define(IMcpConfigStore, McpConfigStore); reg.definePartialInstance(IPluginService, { mcpServerEntries: async () => { diff --git a/packages/agent-core-v2/test/app/mcpRegistry/mcpRegistry.test.ts b/packages/agent-core-v2/test/app/mcpRegistry/mcpRegistry.test.ts index d26a8a2b2..ae12513ee 100644 --- a/packages/agent-core-v2/test/app/mcpRegistry/mcpRegistry.test.ts +++ b/packages/agent-core-v2/test/app/mcpRegistry/mcpRegistry.test.ts @@ -24,6 +24,7 @@ import { IHostFileSystem } from '#/os/interface/hostFileSystem'; import { InMemoryStorageService } from '#/persistence/backends/memory/inMemoryStorageService'; import { IAtomicDocumentStore } from '#/persistence/interface/atomicDocumentStore'; import { IFileSystemStorageService } from '#/persistence/interface/storage'; +import { TRUST_WORKSPACE_ENV } from '#/workspace/workspaceTrust/workspaceTrustService'; function stdioServer(name: string, command = 'npx'): GlobalMcpServerConfig { return { name, transport: 'stdio', command }; @@ -51,21 +52,26 @@ describe('McpRegistryService', () => { let pluginError: Error | undefined; let trusted: boolean; let trustedKey: string | undefined; + let env: NodeJS.ProcessEnv; let registry: IMcpRegistryService; beforeEach(() => { home = mkdtempSync(join(tmpdir(), 'pythinker-mcp-registry-home-')); - vi.stubEnv('PYTHINKER_CODE_HOME', home); + vi.stubEnv('KIMI_CODE_HOME', home); disposables = new DisposableStore(); tempDirs = [home]; pluginEntries = []; pluginError = undefined; trusted = true; trustedKey = undefined; + env = {}; const ix = createServices(disposables, { additionalServices: (reg) => { reg.defineInstance(IFileSystemStorageService, new InMemoryStorageService()); - reg.definePartialInstance(IBootstrapService, { homeDir: home }); + reg.definePartialInstance(IBootstrapService, { + homeDir: home, + getEnv: (name: string) => env[name], + }); reg.define(IMcpConfigStore, McpConfigStore); reg.definePartialInstance(IPluginService, { mcpServerEntries: async () => { @@ -206,6 +212,29 @@ describe('McpRegistryService', () => { ]); }); + it('loads project layers for an untrusted workspace when PYTHINKER_CODE_TRUST_WORKSPACE is set', async () => { + await writeJson(join(home, 'mcp.json'), { + mcpServers: { userOnly: { command: 'user-only' } }, + }); + const { project, sub } = await makeProject(); + await writeJson(join(project, '.mcp.json'), { + mcpServers: { repoOnly: { command: 'repo-only' } }, + }); + await writeJson(join(sub, '.pythinker-code', 'mcp.json'), { + mcpServers: { localOnly: { command: 'local-only' } }, + }); + trusted = false; + env = { [TRUST_WORKSPACE_ENV]: '1' }; + + const entries = await registry.list({ cwd: sub }); + + expect(entries.map((entry) => entry.name).toSorted()).toEqual([ + 'localOnly', + 'repoOnly', + 'userOnly', + ]); + }); + it('checks trust at the queried cwd rather than the canonical git root', async () => { const { project, sub } = await makeProject(); await writeJson(join(project, '.mcp.json'), { diff --git a/packages/agent-core-v2/test/workspace/workspaceTrust/workspaceTrust.test.ts b/packages/agent-core-v2/test/workspace/workspaceTrust/workspaceTrust.test.ts index 2f026d64b..5bd92d3d2 100644 --- a/packages/agent-core-v2/test/workspace/workspaceTrust/workspaceTrust.test.ts +++ b/packages/agent-core-v2/test/workspace/workspaceTrust/workspaceTrust.test.ts @@ -11,6 +11,7 @@ import { createServices } from '#/_base/di/test'; import { JsonAtomicDocumentStore } from '#/persistence/backends/node-fs/atomicDocumentStore'; import { FileStorageService } from '#/persistence/backends/node-fs/fileStorageService'; import { IAtomicDocumentStore } from '#/persistence/interface/atomicDocumentStore'; +import { IBootstrapService } from '#/app/bootstrap/bootstrap'; import { ITelemetryService, noopTelemetryService } from '#/app/telemetry/telemetry'; import { IWorkspaceStateService } from '#/workspace/state/workspaceState'; import { IWorkspaceContext } from '#/workspace/workspaceContext/workspaceContext'; @@ -19,6 +20,7 @@ import { type WorkspaceTrustChange, } from '#/workspace/workspaceTrust/workspaceTrust'; import { + TRUST_WORKSPACE_ENV, WorkspaceTrustService, workspaceTrustTrustedKey, } from '#/workspace/workspaceTrust/workspaceTrustService'; @@ -28,6 +30,7 @@ import { writeWorkspaceTrust, } from '#/workspace/workspaceTrust/trustRecord'; +import { stubBootstrap } from '../../app/bootstrap/stubs'; import { registerStateServices } from '../../state/stubs'; describe('WorkspaceTrustService', () => { @@ -52,12 +55,14 @@ describe('WorkspaceTrustService', () => { function createService( root: string, events?: WorkspaceTrustChange[], + env: NodeJS.ProcessEnv = {}, ): { service: IWorkspaceTrust; states: IWorkspaceStateService } { const ix = createServices(disposables, { strict: true, additionalServices: (reg) => { registerStateServices(reg); reg.definePartialInstance(IWorkspaceContext, { cwd: root }); + reg.defineInstance(IBootstrapService, stubBootstrap(homeDir, env)); reg.defineInstance( IAtomicDocumentStore, new JsonAtomicDocumentStore(new FileStorageService(homeDir)), @@ -81,6 +86,42 @@ describe('WorkspaceTrustService', () => { expect(await service.get()).toBe(false); }); + it('trusts the workspace when PYTHINKER_CODE_TRUST_WORKSPACE is set', async () => { + const { service } = createService(cwd, undefined, { + [TRUST_WORKSPACE_ENV]: '1', + }); + await service.ready; + + expect(service.isTrusted()).toBe(true); + expect(await service.get()).toBe(true); + }); + + it('ignores PYTHINKER_CODE_TRUST_WORKSPACE values that do not parse as true', async () => { + const { service } = createService(cwd, undefined, { + [TRUST_WORKSPACE_ENV]: '0', + }); + await service.ready; + + expect(service.isTrusted()).toBe(false); + expect(await service.get()).toBe(false); + }); + + it('keeps persistence semantics under PYTHINKER_CODE_TRUST_WORKSPACE', async () => { + const events: WorkspaceTrustChange[] = []; + const { service, states } = createService(cwd, events, { + [TRUST_WORKSPACE_ENV]: '1', + }); + await service.ready; + + await service.trust(); + expect(states.get(workspaceTrustTrustedKey)).toBe(true); + + await service.untrust(); + expect(states.get(workspaceTrustTrustedKey)).toBe(false); + expect(service.isTrusted()).toBe(true); + expect(events).toEqual([{ trusted: true }, { trusted: false }]); + }); + it('trust() flips the state, fires once, and stays idempotent', async () => { const events: WorkspaceTrustChange[] = []; const { service } = createService(cwd, events); diff --git a/packages/agent-gateway/src/routes/workspaces.ts b/packages/agent-gateway/src/routes/workspaces.ts index 986a20d89..e04fc57d7 100644 --- a/packages/agent-gateway/src/routes/workspaces.ts +++ b/packages/agent-gateway/src/routes/workspaces.ts @@ -264,7 +264,7 @@ export function registerWorkspacesRoutes(app: WorkspaceRouteHost, core: Scope): const trust = await resolveTrust(core, req.params.workspace_id, req.id, reply); if (trust === undefined) return; await trust.untrust(); - reply.send(okEnvelope({ trusted: false }, req.id)); + reply.send(okEnvelope({ trusted: await trust.get() }, req.id)); }, ); app.post( diff --git a/packages/agent-gateway/test/workspaces.test.ts b/packages/agent-gateway/test/workspaces.test.ts index b33cee386..52df18885 100644 --- a/packages/agent-gateway/test/workspaces.test.ts +++ b/packages/agent-gateway/test/workspaces.test.ts @@ -448,4 +448,25 @@ describe('server-v2 /api/v1/workspaces', () => { const { body } = await postJson(`/api/v1/workspaces/${id}/add-dir`, {}); expect(body.code).toBe(40001); }); + + it('reports the effective trust state after untrust while PYTHINKER_CODE_TRUST_WORKSPACE is set', async () => { + vi.stubEnv('PYTHINKER_CODE_TRUST_WORKSPACE', '1'); + const root = await mkdtemp(join(tmpdir(), 'pythinker-server-v2-workspaces-trust-env-')); + try { + const created = await postJson('/api/v1/workspaces', { root }); + expect(created.body.code).toBe(0); + const id = created.body.data.id; + + const revoked = await postJson<{ trusted: boolean }>(`/api/v1/workspaces/${id}/untrust`); + expect(revoked.body.code).toBe(0); + expect(revoked.body.data.trusted).toBe(true); + + const read = await getJson<{ trusted: boolean }>(`/api/v1/workspaces/${id}/trust`); + expect(read.body.code).toBe(0); + expect(read.body.data.trusted).toBe(true); + } finally { + vi.unstubAllEnvs(); + await rm(root, { recursive: true, force: true }); + } + }); }); diff --git a/packages/node-sdk/src/sdk-rpc-client-v2.ts b/packages/node-sdk/src/sdk-rpc-client-v2.ts index f6d6b45e8..10c16c9b4 100644 --- a/packages/node-sdk/src/sdk-rpc-client-v2.ts +++ b/packages/node-sdk/src/sdk-rpc-client-v2.ts @@ -132,14 +132,9 @@ import { join } from 'node:path'; import { encodeWorkDirKey } from '@pymodel/agent-core-v2/_base/utils/workdir-slug'; import { McpConnectionManager } from '@pymodel/agent-core-v2/mcpCore/connection-manager'; -import { - loadMcpServers, - loadMcpServersDetailed, - resolveMcpJsonPaths, -} from '@pymodel/agent-core-v2/app/mcpConfig/configLoader'; +import { loadMcpServers } from '@pymodel/agent-core-v2/app/mcpConfig/configLoader'; import { fsSuggestRequestSchema } from '@pymodel/agent-core-v2/workspace/workspaceFs/fs'; import { IAppendLogStore } from '@pymodel/agent-core-v2/persistence/interface/appendLogStore'; -import type { McpServerConfig as WorkspaceMcpServerConfig } from '@pymodel/agent-core-v2/mcpCore/config-schema'; import { bootstrap, DEFAULT_AGENT_PROFILE_NAME, @@ -317,6 +312,7 @@ import type { TelemetryClient, UploadFileOptions, WorkspaceTrustInfo, + WorkspaceTrustInstructionSources, } from '#/types'; import { diagnosticsToConfigDiagnostics, @@ -680,39 +676,33 @@ export class SDKRpcClientV2 extends SDKRpcClientBase { /** * klient has no workspace-trust facade; composed directly from the engine * via {@link engineAccessor} — the same `handlerFor({ root })` path - * `createSession` takes (materializing the workspace handler is a no-op - * cost here: session creation does it anyway). The gated-server list is - * the final merged config entries whose origins are project files (the - * workspaceTrust gate inside the engine's `workspaceMcpConfig`), - * computed best-effort: an unreadable/invalid project file degrades to an - * empty list rather than failing the caller. + * `createSession` takes. The disclosure of what trusting would activate is + * computed inside the engine by `WorkspaceTrustDisclosureService`. */ override async getWorkspaceTrustInfo(workDir: string): Promise { const handler = await this.engineAccessor .get(IWorkspaceInstanceManager) .getOrCreate({ root: workDir }); const trusted = await handler.program.trust.get(); - if (trusted) return { trusted: true, gatedMcpServers: [] }; - try { - const fs = this.engineAccessor.get(IHostFileSystem); - const [paths, loaded] = await Promise.all([ - resolveMcpJsonPaths({ fs, cwd: workDir, homeDir: this.homeDir }), - loadMcpServersDetailed({ - fs, - cwd: workDir, - homeDir: this.homeDir, - includeProject: true, - }), - ]); - const projectPaths = new Set([paths.projectRoot, paths.project]); - const gatedMcpServers = Object.entries(loaded.servers) - .filter(([name]) => projectPaths.has(loaded.origins[name] ?? '')) - .map(([name, config]) => describeWorkspaceMcpServer(name, config)) - .toSorted((a, b) => a.name.localeCompare(b.name)); - return { trusted: false, gatedMcpServers }; - } catch { - return { trusted: false, gatedMcpServers: [] }; + if (trusted) { + return { + trusted: true, + gatedMcpServers: [], + gatedAdditionalDirs: [], + additionalDirSources: [], + warnings: [], + instructionSources: EMPTY_INSTRUCTION_SOURCES, + }; } + const activation = await handler.program.trustDisclosure.describeGatedActivation(); + return { + trusted: false, + gatedMcpServers: activation.mcpServers, + gatedAdditionalDirs: activation.additionalDirs, + additionalDirSources: activation.additionalDirSources, + warnings: activation.warnings, + instructionSources: activation.instructionSources, + }; } /** @@ -2849,18 +2839,9 @@ function toManagedServerInfo(server: McpManagedServer): McpManagedServerInfo { } as McpManagedServerInfo; } -function describeWorkspaceMcpServer( - name: string, - config: WorkspaceMcpServerConfig, -): WorkspaceTrustInfo['gatedMcpServers'][number] { - if (config.transport === 'stdio') { - return { - name, - transport: config.transport, - command: config.command, - args: config.args, - cwd: config.cwd, - }; - } - return { name, transport: config.transport, url: config.url }; -} +const EMPTY_INSTRUCTION_SOURCES: WorkspaceTrustInstructionSources = { + agentsMdPaths: [], + skills: [], + agentProfiles: [], + paths: [], +}; diff --git a/packages/node-sdk/src/types.ts b/packages/node-sdk/src/types.ts index d0aa514a1..909c9e638 100644 --- a/packages/node-sdk/src/types.ts +++ b/packages/node-sdk/src/types.ts @@ -130,6 +130,7 @@ export type { PermissionMode }; * engine; the v1 engine has no workspace-trust concept and reports * `{ trusted: true, gatedMcpServers: [] }`. */ +/** One project-level MCP server that trusting would start. */ export interface WorkspaceTrustMcpServerInfo { readonly name: string; readonly transport: 'stdio' | 'http' | 'sse'; @@ -137,12 +138,32 @@ export interface WorkspaceTrustMcpServerInfo { readonly args?: readonly string[]; readonly cwd?: string; readonly url?: string; + /** Absolute path of the config file declaring this server. */ + readonly origin: string; } +/** Project-sourced instruction inputs that steer the agent once trusted (prompt-level, no code execution). */ +export interface WorkspaceTrustInstructionSources { + /** AGENTS.md files inside the project that will be injected into context (symlink-resolved). */ + readonly agentsMdPaths: readonly string[]; + /** Names of project-level skills that will load. */ + readonly skills: readonly string[]; + /** Names of project-level agent profiles that will load. */ + readonly agentProfiles: readonly string[]; + /** Files and configuration directories to inspect; directories end in a slash. */ + readonly paths: readonly string[]; +} + +/** Trust state of a workspace directory, plus everything trusting it would activate. */ export interface WorkspaceTrustInfo { readonly trusted: boolean; - /** Safe descriptions of project-level MCP servers that trusting would enable. */ + /** Project-level MCP servers that trusting would start. */ readonly gatedMcpServers: readonly WorkspaceTrustMcpServerInfo[]; + /** Directories outside the project that trusting grants access to (symlink-resolved). */ + readonly gatedAdditionalDirs: readonly string[]; + readonly additionalDirSources: readonly string[]; + readonly warnings: readonly string[]; + readonly instructionSources: WorkspaceTrustInstructionSources; } /** diff --git a/packages/node-sdk/test/sdk-rpc-client-v2.test.ts b/packages/node-sdk/test/sdk-rpc-client-v2.test.ts index 57dac1e62..53465f865 100644 --- a/packages/node-sdk/test/sdk-rpc-client-v2.test.ts +++ b/packages/node-sdk/test/sdk-rpc-client-v2.test.ts @@ -8,7 +8,7 @@ * Wiring: real v2 engine bootstrapped on a temp PYTHINKER_CODE_HOME; remote provider calls are stubbed. * Run: pnpm exec vitest run test/sdk-rpc-client-v2.test.ts */ -import { mkdir, mkdtemp, readdir, readFile, rm, writeFile } from 'node:fs/promises'; +import { mkdir, mkdtemp, readdir, readFile, realpath, rm, symlink, writeFile } from 'node:fs/promises'; import { tmpdir } from 'node:os'; import { join } from 'node:path'; @@ -1239,6 +1239,10 @@ describe('SDKRpcClientV2 workspace trust', () => { cwd: '/tmp/root', env: { SECRET: 'hidden' }, }, + 'disabled-server': { + command: 'never-runs', + enabled: false, + }, 'http-server': { transport: 'http', url: 'https://example.test/mcp', @@ -1259,14 +1263,34 @@ describe('SDKRpcClientV2 workspace trust', () => { const info = await harness.getWorkspaceTrustInfo(workDir); expect(info.trusted).toBe(false); expect(info.gatedMcpServers).toEqual([ - { name: 'http-server', transport: 'http', url: 'https://example.test/mcp' }, - { name: 'nested-server', transport: 'stdio', command: 'nested-cmd' }, - { name: 'root-server', transport: 'stdio', command: 'root-cmd', args: ['--safe'], cwd: '/tmp/root' }, + { + name: 'http-server', + transport: 'http', + url: 'https://example.test/mcp', + origin: await realpath(join(workDir, '.mcp.json')), + }, + { + name: 'nested-server', + transport: 'stdio', + command: 'nested-cmd', + origin: await realpath(join(workDir, '.pythinker-code', 'mcp.json')), + }, + { + name: 'root-server', + transport: 'stdio', + command: 'root-cmd', + args: ['--safe'], + cwd: '/tmp/root', + origin: await realpath(join(workDir, '.mcp.json')), + }, ]); const serialized = JSON.stringify(info); + // Environment variables and headers stay in the source configuration. expect(serialized).not.toContain('hidden'); expect(serialized).not.toContain('SECRET'); expect(serialized).not.toContain('TOKEN'); + // Disabled servers never connect, so they are not part of the disclosure. + expect(serialized).not.toContain('disabled-server'); } finally { await harness.close(); } @@ -1289,8 +1313,8 @@ describe('SDKRpcClientV2 workspace trust', () => { join(workDir, '.mcp.json'), JSON.stringify({ mcpServers: { - github: { command: 'project-github', enabled: false }, - toString: { transport: 'http', url: 'https://example.test/mcp', enabled: false }, + github: { command: 'project-github' }, + toString: { transport: 'http', url: 'https://example.test/mcp' }, }, }), 'utf-8', @@ -1305,22 +1329,44 @@ describe('SDKRpcClientV2 workspace trust', () => { command: 'project-github', args: undefined, cwd: workDir, + origin: await realpath(join(workDir, '.mcp.json')), + }, + { + name: 'toString', + transport: 'http', + url: 'https://example.test/mcp', + origin: await realpath(join(workDir, '.mcp.json')), }, - { name: 'toString', transport: 'http', url: 'https://example.test/mcp' }, ]); } finally { await harness.close(); } }); - it('degrades the gated-server list to empty on an invalid project mcp.json', async () => { + it('reports failed configuration and instruction sources while retaining readable instructions', async () => { const { harness } = await makeHarness(); const workDir = await mkdtemp(join(tmpdir(), 'pythinker-sdk-v2-work-')); tempDirs.push(workDir); await writeFile(join(workDir, '.mcp.json'), '{not json', 'utf-8'); + await writeFile(join(workDir, 'AGENTS.md'), '# Project instructions\n', 'utf-8'); + await mkdir(join(workDir, '.pythinker-code')); + await symlink(join(workDir, 'missing.md'), join(workDir, '.pythinker-code', 'AGENTS.md')); try { const info = await harness.getWorkspaceTrustInfo(workDir); - expect(info).toEqual({ trusted: false, gatedMcpServers: [] }); + expect(info).toEqual({ + trusted: false, + gatedMcpServers: [], + gatedAdditionalDirs: [], + additionalDirSources: [], + warnings: expect.arrayContaining([ + 'Could not inspect MCP configuration.', + expect.stringContaining(join(workDir, '.pythinker-code', 'AGENTS.md')), + ]), + instructionSources: { + agentsMdPaths: [await realpath(join(workDir, 'AGENTS.md'))], + skills: [], agentProfiles: [], paths: [await realpath(join(workDir, 'AGENTS.md'))], + }, + }); } finally { await harness.close(); } @@ -1335,6 +1381,10 @@ describe('SDKRpcClientV2 workspace trust', () => { expect(await harness.getWorkspaceTrustInfo(workDir)).toEqual({ trusted: true, gatedMcpServers: [], + gatedAdditionalDirs: [], + additionalDirSources: [], + warnings: [], + instructionSources: { agentsMdPaths: [], skills: [], agentProfiles: [], paths: [] }, }); // The trust marker lives in the pythinker home, never in the checkout. const markers = await readdir(join(homeDir, 'workspace-trust')); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d75de6e2..1a8e7d508 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,18 +11,23 @@ catalogs: version: 4.4.3 overrides: - undici: '>=7.28.0' + undici: '>=8.10.2' shell-quote: '>=1.9.0' - serialize-javascript: '>=7.0.3' + serialize-javascript: '>=7.1.2' vite: '>=6.4.3' - dompurify: '>=3.4.8' - ip-address: '>=10.3.1' + dompurify: '>=3.4.16' + ip-address: '>=10.7.1' smol-toml: '>=1.7.1' esbuild: '>=0.28.1' fastify: '>=5.12.1' vitest: '>=4.1.11' '@vitest/mocker': '>=4.1.11' diff: '>=8.0.3' + fast-uri@^3.0.0: ^3.1.8 + markdown-it: '>=14.3.1 <15' + brace-expansion@1.x: ^1.1.21 + brace-expansion@2.x: ^2.1.7 + brace-expansion@5.x: ^5.0.12 patchedDependencies: monaco-editor@0.55.1: @@ -109,8 +114,8 @@ importers: specifier: 9.7.0 version: 9.7.0 electron: - specifier: 43.4.0 - version: 43.4.0 + specifier: 43.5.0 + version: 43.5.0 electron-builder: specifier: 26.15.3 version: 26.15.3(electron-builder-squirrel-windows@26.15.3) @@ -734,8 +739,8 @@ importers: specifier: ^3.0.1 version: 3.0.2 undici: - specifier: '>=7.28.0' - version: 8.10.1 + specifier: '>=8.10.2' + version: 8.11.2 xstate: specifier: ^5.32.5 version: 5.32.5 @@ -5118,14 +5123,14 @@ packages: boundary@2.0.0: resolution: {integrity: sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==} - brace-expansion@1.1.18: - resolution: {integrity: sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==} + brace-expansion@1.1.21: + resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} - brace-expansion@2.1.4: - resolution: {integrity: sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==} + brace-expansion@2.1.7: + resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} - brace-expansion@5.0.9: - resolution: {integrity: sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==} + brace-expansion@5.0.12: + resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} engines: {node: 20 || >=22} braces@3.0.3: @@ -5861,8 +5866,8 @@ packages: resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} engines: {node: '>= 4'} - dompurify@3.4.14: - resolution: {integrity: sha512-dVoH9z+MY+C9IilgGCk3YfFqjLi3fChm2OiKJMzh6axrJ5qwxqWaZamgmHrpv22CN/KdbZJuGEGgfQoL00LTdg==} + dompurify@3.4.16: + resolution: {integrity: sha512-sqo+pNp3qRhCIpbgRi1y8Tgk27Bo2Ry7w0dC1NBeNTdZChWjz9Xb/KOoZbRP/R6pQZ80Qw8YhXw13hWWBbMRnQ==} domutils@3.2.2: resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} @@ -5947,8 +5952,8 @@ packages: resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==} engines: {node: '>=8.0.0'} - electron@43.4.0: - resolution: {integrity: sha512-3qxGF0CeQbiox5oWV1JlbWGQ1VerbmDhTFqW4sJ8h7uqTHniFYPObXJcDna0DMh32et0fFyKzz0YY8lJv3t5jg==} + electron@43.5.0: + resolution: {integrity: sha512-nV2aWuKatmUrxrAWP2pNIynNX7dy83TCAz+6KnsbK7hDVLE+6fa2iouOtir41AboZTa+J5w2UgicWHAqUaaUJw==} engines: {node: '>= 22.12.0'} hasBin: true @@ -6173,8 +6178,8 @@ packages: fast-string-width@3.0.2: resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} - fast-uri@3.1.6: - resolution: {integrity: sha512-7Ical1vFEMr0onbVzEDIreM22I4khW+fzyQPwvAFWBp1iwdshSZRsL4jjRvPG9JP1uiqMHRto+YU6R2/CzDz5Q==} + fast-uri@3.1.8: + resolution: {integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==} fast-uri@4.2.1: resolution: {integrity: sha512-TmHQgewjHtMq1E5QKA0tOE0yeYGQs25KZC/ziJpubRtWI15W92e6vPFydWOeZBVROSHBYw/QhD9d5OefdD6LDg==} @@ -6674,8 +6679,8 @@ packages: resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} engines: {node: '>=12'} - ip-address@10.5.0: - resolution: {integrity: sha512-R5SnVLJmgYYvf2F2ZgwSBnelz5G4q5AxIC277GDfUaNbrZKNANcBC7RHqYYePlszf4kBolVkJauG0ZjHHFh55g==} + ip-address@10.7.2: + resolution: {integrity: sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==} engines: {node: '>= 12'} ipaddr.js@1.9.1: @@ -7379,8 +7384,8 @@ packages: resolution: {integrity: sha512-17qO3LQLK+JXom5Zt6Z9l7OGWWv9eYquTxdj3xIPGe1OBHdYXrzNYA3xCgCyIj1uItv4jkqbQf6FkaqifKkySw==} engines: {node: '>=20.19'} - markdown-it@14.2.0: - resolution: {integrity: sha512-1TGiQiJVRQ3NPmZH6sx5Cfnmg6GQm9jvC1ch4TK511NjSJvjzKLzn5pPfZRNZkRPZP0HqCioSndqH8v2nRaWVQ==} + markdown-it@14.3.2: + resolution: {integrity: sha512-sHHjZ5fJKlgrG4qns2YwVcdNep35h5fERrfkD2YNsb9UFk0UIHarbiTaHKVMlPuWAoiilyK8Fv/jAm11slsY7Q==} hasBin: true markdown-table@3.0.4: @@ -7518,9 +7523,6 @@ packages: mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} - mdurl@2.0.0: - resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} - mdurl@2.1.0: resolution: {integrity: sha512-1+HBaOx0zi/dQWht8rNv9MYf9qqpqL/kxI0hXImU6Y547zM6Sni8BQibt7ifgMcYtQg41ao3Ivd6cnSM86inpg==} @@ -8828,8 +8830,8 @@ packages: resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} engines: {node: '>=10'} - serialize-javascript@7.1.1: - resolution: {integrity: sha512-k3CMsaIvvdSwm8oLB4MXSl0wH2/cwlH7xGcnRd2DaeRmBkbzYmyT8j0tsX60DwD1eRwHTpNpH8ljKu9oUT1MeQ==} + serialize-javascript@7.1.2: + resolution: {integrity: sha512-GL2BWwVa6JydKO6l/ljVgjAZF4QJ3S7dWDWi53s5GZT8PJzD2fNxi67HANQGKAqPrwEpL5ba7gUBGi0Ls/sEoQ==} engines: {node: '>=20.0.0'} serve-static@2.2.1: @@ -9604,8 +9606,8 @@ packages: undici-types@8.9.0: resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==} - undici@8.10.1: - resolution: {integrity: sha512-YQ3WlbqjYMmNpdvDH64jAgLjxuAR9+649calDWhbshYaeQGO2bR4nI94ORJmwI3J9YhoKQnpyGOK+0zlWS5N5Q==} + undici@8.11.2: + resolution: {integrity: sha512-u4UB2/IrKdU6lFxumHmmo1a3fCQO5tzQllRorfoRS63txhrB7xTpSn1PftwC4qEHkOaqP95fCWW4lJzwErwzhQ==} engines: {node: '>=22.19.0'} unicode-emoji-modifier-base@1.0.0: @@ -10996,7 +10998,7 @@ snapshots: open: 8.4.2 picomatch: 4.0.4 systeminformation: 5.31.17 - undici: 8.10.1 + undici: 8.11.2 which: 4.0.0 yocto-spinner: 1.2.1 @@ -11036,10 +11038,10 @@ snapshots: env-paths: 3.0.0 graceful-fs: 4.2.11 progress: 2.0.3 - semver: 7.7.4 + semver: 7.8.5 sumchecker: 3.0.1 optionalDependencies: - undici: 8.10.1 + undici: 8.11.2 transitivePeerDependencies: - supports-color @@ -11270,7 +11272,7 @@ snapshots: dependencies: ajv: 8.18.0 ajv-formats: 3.0.1(ajv@8.18.0) - fast-uri: 3.1.6 + fast-uri: 3.1.8 '@fastify/busboy@3.2.0': {} @@ -14221,7 +14223,7 @@ snapshots: hosted-git-info: 4.1.0 jsonc-parser: 3.3.1 leven: 3.1.0 - markdown-it: 14.2.0 + markdown-it: 14.3.2 mime: 1.6.0 minimatch: 10.2.5 parse-semver: 1.1.1 @@ -14399,7 +14401,7 @@ snapshots: ajv@8.18.0: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.1.6 + fast-uri: 3.1.8 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -14649,16 +14651,16 @@ snapshots: boundary@2.0.0: {} - brace-expansion@1.1.18: + brace-expansion@1.1.21: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 - brace-expansion@2.1.4: + brace-expansion@2.1.7: dependencies: balanced-match: 1.0.2 - brace-expansion@5.0.9: + brace-expansion@5.0.12: dependencies: balanced-match: 4.0.4 @@ -14816,7 +14818,7 @@ snapshots: parse5: 7.3.0 parse5-htmlparser2-tree-adapter: 7.1.0 parse5-parser-stream: 7.1.2 - undici: 8.10.1 + undici: 8.11.2 whatwg-mimetype: 4.0.0 chokidar@3.6.0: @@ -15429,7 +15431,7 @@ snapshots: dependencies: domelementtype: 2.3.0 - dompurify@3.4.14: + dompurify@3.4.16: optionalDependencies: '@types/trusted-types': 2.0.7 @@ -15554,7 +15556,7 @@ snapshots: transitivePeerDependencies: - supports-color - electron@43.4.0: + electron@43.5.0: dependencies: '@electron-internal/extract-zip': 1.0.5 '@electron/get': 5.1.0 @@ -15738,7 +15740,7 @@ snapshots: express-rate-limit@8.3.2(express@5.2.1): dependencies: express: 5.2.1 - ip-address: 10.5.0 + ip-address: 10.7.2 express@5.2.1: dependencies: @@ -15800,7 +15802,7 @@ snapshots: '@fastify/merge-json-schemas': 0.2.1 ajv: 8.18.0 ajv-formats: 3.0.1(ajv@8.18.0) - fast-uri: 3.1.6 + fast-uri: 3.1.8 json-schema-ref-resolver: 3.0.0 rfdc: 1.4.1 @@ -15825,7 +15827,7 @@ snapshots: dependencies: fast-string-truncated-width: 3.0.3 - fast-uri@3.1.6: {} + fast-uri@3.1.8: {} fast-uri@4.2.1: {} @@ -16439,7 +16441,7 @@ snapshots: internmap@2.0.3: {} - ip-address@10.5.0: {} + ip-address@10.7.2: {} ipaddr.js@1.9.1: {} @@ -16697,7 +16699,7 @@ snapshots: saxes: 6.0.0 symbol-tree: 3.2.4 tough-cookie: 6.0.2 - undici: 8.10.1 + undici: 8.11.2 w3c-xmlserializer: 5.0.0 webidl-conversions: 8.0.1 whatwg-mimetype: 5.0.0 @@ -16723,7 +16725,7 @@ snapshots: json-schema-resolver@3.0.0: dependencies: debug: 4.4.3(supports-color@8.1.1) - fast-uri: 3.1.6 + fast-uri: 3.1.8 rfdc: 1.4.1 transitivePeerDependencies: - supports-color @@ -17100,12 +17102,12 @@ snapshots: mdurl: 2.1.0 punycode.js: 2.3.1 - markdown-it@14.2.0: + markdown-it@14.3.2: dependencies: argparse: 2.0.1 entities: 4.5.0 linkify-it: 5.0.2 - mdurl: 2.0.0 + mdurl: 2.1.0 punycode.js: 2.3.1 uc.micro: 2.1.0 @@ -17340,8 +17342,6 @@ snapshots: mdn-data@2.27.1: {} - mdurl@2.0.0: {} - mdurl@2.1.0: {} media-typer@1.1.0: {} @@ -17366,7 +17366,7 @@ snapshots: d3-sankey: 0.12.3 dagre-d3-es: 7.0.14 dayjs: 1.11.21 - dompurify: 3.4.14 + dompurify: 3.4.16 es-toolkit: 1.47.0 fastdom: 1.0.12 katex: 0.16.47 @@ -17624,23 +17624,23 @@ snapshots: minimatch@10.2.3: dependencies: - brace-expansion: 5.0.9 + brace-expansion: 5.0.12 minimatch@10.2.5: dependencies: - brace-expansion: 5.0.9 + brace-expansion: 5.0.12 minimatch@3.1.5: dependencies: - brace-expansion: 1.1.18 + brace-expansion: 1.1.21 minimatch@5.1.9: dependencies: - brace-expansion: 2.1.4 + brace-expansion: 2.1.7 minimatch@9.0.9: dependencies: - brace-expansion: 2.1.4 + brace-expansion: 2.1.7 minimist@1.2.8: {} @@ -17684,7 +17684,7 @@ snapshots: minimatch: 9.0.9 ms: 2.1.3 picocolors: 1.1.1 - serialize-javascript: 7.1.1 + serialize-javascript: 7.1.2 strip-json-comments: 3.1.1 supports-color: 8.1.1 workerpool: 9.3.4 @@ -17694,7 +17694,7 @@ snapshots: monaco-editor@0.55.1(patch_hash=dfc69cf7c849c515519c92ac86f89725f35d7404160274a973e65baa06bdc3a4): dependencies: - dompurify: 3.4.14 + dompurify: 3.4.16 marked: 14.0.0 mri@1.2.0: {} @@ -17832,7 +17832,7 @@ snapshots: semver: 7.8.5 tar: 7.5.22 tinyglobby: 0.2.17 - undici: 8.10.1 + undici: 8.11.2 which: 6.0.1 node-int64@0.4.0: {} @@ -19072,7 +19072,7 @@ snapshots: type-fest: 0.13.1 optional: true - serialize-javascript@7.1.1: {} + serialize-javascript@7.1.2: {} serve-static@2.2.1: dependencies: @@ -19315,7 +19315,7 @@ snapshots: socks@2.8.9: dependencies: - ip-address: 10.5.0 + ip-address: 10.7.2 smart-buffer: 4.2.0 sonic-boom@4.2.1: @@ -19893,7 +19893,7 @@ snapshots: undici-types@8.9.0: {} - undici@8.10.1: {} + undici@8.11.2: {} unicode-emoji-modifier-base@1.0.0: {} @@ -20114,7 +20114,7 @@ snapshots: vitepress-plugin-llms@1.13.1: dependencies: gray-matter: 4.0.3 - markdown-it: 14.2.0 + markdown-it: 14.3.2 markdown-title: 1.0.2 mdast-util-from-markdown: 2.0.3 millify: 6.1.0 diff --git a/scripts/security/check-artifacts.mjs b/scripts/security/check-artifacts.mjs index 5cbd4776f..13aad30bd 100644 --- a/scripts/security/check-artifacts.mjs +++ b/scripts/security/check-artifacts.mjs @@ -17,7 +17,7 @@ const vulnerableCode = [ /\.version\s*=\s*["']3\.2\.7["']/, /\.version\s*=\s*["']3\.4\.7["']/, ]; -const safeCode = [/@license DOMPurify 3\.4\.14\b/, /\.version\s*=\s*["'`]3\.4\.14["'`]/]; +const safeCode = [/@license DOMPurify 3\.4\.16\b/, /\.version\s*=\s*["'`]3\.4\.16["'`]/]; function compareVersions(left, right) { const parse = (value) => value.split('-')[0].split('.').map((part) => Number.parseInt(part, 10) || 0); @@ -60,10 +60,10 @@ async function assertTextArtifactsSafe(label, root, requireSafeDomPurify = false if (safeCode.some((pattern) => pattern.test(content))) safeDomPurify += 1; } if (requireSafeDomPurify && safeDomPurify === 0) { - throw new Error(`${label} does not contain the required DOMPurify 3.4.14 implementation.`); + throw new Error(`${label} does not contain the required DOMPurify 3.4.16 implementation.`); } process.stdout.write( - `${label}: vulnerable code absent${requireSafeDomPurify ? '; DOMPurify 3.4.14 present' : ''}.\n`, + `${label}: vulnerable code absent${requireSafeDomPurify ? '; DOMPurify 3.4.16 present' : ''}.\n`, ); } @@ -116,17 +116,17 @@ async function assertDependencyProof() { ['ws', floor('8.21.3'), '>=8.21.3'], ['protobufjs', floor('7.6.5'), '>=7.6.5'], ['@protobufjs/utf8', floor('1.1.2'), '>=1.1.2'], - ['dompurify', floor('3.4.14'), '>=3.4.14'], + ['dompurify', floor('3.4.16'), '>=3.4.16'], ['mermaid', floor('11.17.0'), '>=11.17.0'], ['react-router', floor('7.18.2'), '>=7.18.2'], ['find-my-way', floor('9.9.0'), '>=9.9.0'], - ['ip-address', floor('10.5.0'), '>=10.5.0'], - ['fast-uri', floor('3.1.5'), '>=3.1.5'], + ['ip-address', floor('10.7.1'), '>=10.7.1'], + ['fast-uri', floor('3.1.8'), '>=3.1.8'], ['brace-expansion', (version) => { - if (major(version) === 1) return compareVersions(version, '1.1.18') >= 0; - if (major(version) === 2) return compareVersions(version, '2.1.4') >= 0; - return major(version) >= 5 && compareVersions(version, '5.0.9') >= 0; - }, '1.1.18, 2.1.4, or >=5.0.9'], + if (major(version) === 1) return compareVersions(version, '1.1.21') >= 0; + if (major(version) === 2) return compareVersions(version, '2.1.7') >= 0; + return major(version) >= 5 && compareVersions(version, '5.0.12') >= 0; + }, '1.1.21, 2.1.7, or >=5.0.12'], ['js-yaml', (version) => major(version) === 3 ? compareVersions(version, '3.15.1') >= 0 : major(version) >= 4 && compareVersions(version, '4.3.1') >= 0, '3.15.1 or >=4.3.1'], @@ -165,8 +165,8 @@ async function assertDependencyProof() { const domPurifyPackage = JSON.parse( await readFile(resolve(dirname(domPurifyEntry), '../package.json'), 'utf8'), ); - if (domPurifyPackage.version !== '3.4.14') { - throw new Error(`Monaco resolves DOMPurify ${domPurifyPackage.version}, expected 3.4.14.`); + if (compareVersions(domPurifyPackage.version, '3.4.16') < 0) { + throw new Error(`Monaco resolves DOMPurify ${domPurifyPackage.version}, expected >=3.4.16.`); } for (const distribution of ['dev', 'min']) { try {