dimcode 0.0.6-beta.3 → 0.0.6-beta.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +5 -0
  2. package/assets/gui/200.html +12 -0
  3. package/assets/gui/404.html +12 -0
  4. package/assets/gui/_nuxt/0b551Iup.js +1 -0
  5. package/assets/gui/_nuxt/4plqNI3E.js +1 -0
  6. package/assets/gui/_nuxt/5J0xJHOV.js +321 -0
  7. package/assets/gui/_nuxt/B2yiF0dP.js +139 -0
  8. package/assets/gui/_nuxt/B8sXOwue.js +162 -0
  9. package/assets/gui/_nuxt/BAAwCcKi.js +1 -0
  10. package/assets/gui/_nuxt/BB51-bYG.js +1 -0
  11. package/assets/gui/_nuxt/BE4JB3YQ.js +24 -0
  12. package/assets/gui/_nuxt/BGp_FwD9.js +1 -0
  13. package/assets/gui/_nuxt/BIM4RUHw.js +10 -0
  14. package/assets/gui/_nuxt/BJmxWypQ.js +2 -0
  15. package/assets/gui/_nuxt/BKMTnum7.js +61 -0
  16. package/assets/gui/_nuxt/BPM3vi7L.js +1 -0
  17. package/assets/gui/_nuxt/BloQGtiP.js +1 -0
  18. package/assets/gui/_nuxt/BnC2hR_I.js +1 -0
  19. package/assets/gui/_nuxt/BojRNRsE.js +1 -0
  20. package/assets/gui/_nuxt/BtMqZKeb.js +1 -0
  21. package/assets/gui/_nuxt/BtYWoTeV.js +1 -0
  22. package/assets/gui/_nuxt/Bu7UbN50.js +165 -0
  23. package/assets/gui/_nuxt/C11b51Ac.js +1 -0
  24. package/assets/gui/_nuxt/C1yhW14G.js +65 -0
  25. package/assets/gui/_nuxt/C5cXMF-A.js +122 -0
  26. package/assets/gui/_nuxt/C6Po8woU.js +1 -0
  27. package/assets/gui/_nuxt/C6lP39IU.js +4 -0
  28. package/assets/gui/_nuxt/C8BqVsjE.js +24 -0
  29. package/assets/gui/_nuxt/C8FO969Z.js +350 -0
  30. package/assets/gui/_nuxt/C8tOkigv.js +1 -0
  31. package/assets/gui/_nuxt/CILJ3eP4.js +145 -0
  32. package/assets/gui/_nuxt/CJeKOH-v.js +7 -0
  33. package/assets/gui/_nuxt/CKgPEzpl.js +1 -0
  34. package/assets/gui/_nuxt/CNpnPA49.js +17 -0
  35. package/assets/gui/_nuxt/CSea6CJ5.js +1 -0
  36. package/assets/gui/_nuxt/CU5WgS48.js +1 -0
  37. package/assets/gui/_nuxt/CZ1LJRt8.js +1 -0
  38. package/assets/gui/_nuxt/CfQJsi7e.js +68 -0
  39. package/assets/gui/_nuxt/Cgg1My-l.js +10 -0
  40. package/assets/gui/_nuxt/ChaLjQbU.js +1 -0
  41. package/assets/gui/_nuxt/CmKTTxBW.js +1 -0
  42. package/assets/gui/_nuxt/Conicgba.js +36 -0
  43. package/assets/gui/_nuxt/CupMKq6u.js +4 -0
  44. package/assets/gui/_nuxt/D0ya9d-G.js +1 -0
  45. package/assets/gui/_nuxt/D2lZokPL.js +1 -0
  46. package/assets/gui/_nuxt/D5KI-6FL.js +7 -0
  47. package/assets/gui/_nuxt/DCxOw3GV.js +22 -0
  48. package/assets/gui/_nuxt/DCyR-K5m.js +89 -0
  49. package/assets/gui/_nuxt/DLnSW1IF.js +1 -0
  50. package/assets/gui/_nuxt/DUsPre0P.js +1 -0
  51. package/assets/gui/_nuxt/DX6XiGOO.js +1 -0
  52. package/assets/gui/_nuxt/DXsty2qm.js +128 -0
  53. package/assets/gui/_nuxt/DZ0NWvbi.js +43 -0
  54. package/assets/gui/_nuxt/DaWfUpsD.js +250 -0
  55. package/assets/gui/_nuxt/DlAUqK2U.js +1 -0
  56. package/assets/gui/_nuxt/DlL1-BJh.js +1 -0
  57. package/assets/gui/_nuxt/Dn4y6C2r.js +1 -0
  58. package/assets/gui/_nuxt/DoSvhc5U.js +1 -0
  59. package/assets/gui/_nuxt/DpTvXhMN.js +220 -0
  60. package/assets/gui/_nuxt/DvJDa2y1.js +1 -0
  61. package/assets/gui/_nuxt/DzzoB_Be.js +267 -0
  62. package/assets/gui/_nuxt/Gi6I4Gst.js +1 -0
  63. package/assets/gui/_nuxt/GsNec5dh.js +60 -0
  64. package/assets/gui/_nuxt/XbL3y5x-.js +261 -0
  65. package/assets/gui/_nuxt/_RKv1NgS.js +64 -0
  66. package/assets/gui/_nuxt/_mPeMGlT.js +1 -0
  67. package/assets/gui/_nuxt/builds/latest.json +1 -0
  68. package/assets/gui/_nuxt/builds/meta/383e1b0a-c089-4c71-afa9-ad2344597756.json +1 -0
  69. package/assets/gui/_nuxt/entry.PbPm020F.css +1 -0
  70. package/assets/gui/_nuxt/error-404.DF6r4GP7.css +1 -0
  71. package/assets/gui/_nuxt/error-500.Bo5pzFPU.css +1 -0
  72. package/assets/gui/_nuxt/gpkmuIcl.js +15 -0
  73. package/assets/gui/_nuxt/index.CeD9Flb2.css +1 -0
  74. package/assets/gui/_nuxt/kTUG9xEK.js +1 -0
  75. package/assets/gui/_nuxt/nJjJxbsW.js +30 -0
  76. package/assets/gui/_nuxt/yG4UzpsV.js +1 -0
  77. package/assets/gui/favicon.ico +0 -0
  78. package/assets/gui/index.html +12 -0
  79. package/assets/gui/robots.txt +2 -0
  80. package/assets/native/build.zig +16 -0
  81. package/assets/native/src/lib.zig +23 -0
  82. package/dist/aihubmix.json +1 -0
  83. package/dist/anthropic.json +1 -0
  84. package/dist/ark-code.json +1 -0
  85. package/dist/cli.mjs +1308 -976
  86. package/dist/deepseek.json +1 -0
  87. package/dist/google.json +1 -0
  88. package/dist/kimi-for-coding.json +1 -0
  89. package/dist/lm-studio.json +1 -0
  90. package/dist/minimax-cn-coding-plan.json +1 -0
  91. package/dist/minimax-cn.json +1 -0
  92. package/dist/minimax-coding-plan.json +1 -0
  93. package/dist/minimax.json +1 -0
  94. package/dist/models/aihubmix.json +1 -0
  95. package/dist/models/openrouter.json +1 -0
  96. package/dist/models/siliconflow-com.json +1 -0
  97. package/dist/models/siliconflow.json +1 -0
  98. package/dist/models/zenmux.json +1 -0
  99. package/dist/moonshot-ai.json +1 -0
  100. package/dist/moonshot.json +1 -0
  101. package/dist/ollama.json +1 -0
  102. package/dist/openai.json +1 -0
  103. package/dist/openrouter.json +1 -0
  104. package/dist/ppinfra.json +1 -0
  105. package/dist/siliconflow-com.json +1 -0
  106. package/dist/siliconflow.json +1 -0
  107. package/dist/xai.json +1 -0
  108. package/dist/zai-coding-plan.json +1 -0
  109. package/dist/zai.json +1 -0
  110. package/dist/zenmux.json +1 -0
  111. package/dist/zhipuai-coding-plan.json +1 -0
  112. package/dist/zhipuai.json +1 -0
  113. package/package.json +12 -7
  114. package/scripts/postinstall.mjs +3 -1
@@ -0,0 +1,22 @@
1
+ import{e as rt,d as ut,A as st,r as M,G as Ee,c as Et,w as W,g as Nt,C as B,l as ke,f as H,D as ct,j as F,E as g,F as Ke,m as U,k as Qe,n as u,q as Ne,H as Ye,I as ze,J as zt,v as et,z as oe,K as Tt,L as tt,Y as $t,M as nt,N as Ht,o as Dt,O as Lt,P as jt,Q as Yt,R as ye,Z as Vt}from"./C8FO969Z.js";import{e as ae}from"./DvJDa2y1.js";var Wt=Object.defineProperty,It=Object.defineProperties,qt=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,lt=(p,m,k)=>m in p?Wt(p,m,{enumerable:!0,configurable:!0,writable:!0,value:k}):p[m]=k,Te=(p,m)=>{for(var k in m||(m={}))Rt.call(m,k)&&lt(p,k,m[k]);if(ot)for(var k of ot(m))At.call(m,k)&&lt(p,k,m[k]);return p},it=(p,m)=>It(p,qt(m)),Y=(p,m,k)=>new Promise((l,I)=>{var N=d=>{try{f(k.next(d))}catch(X){I(X)}},b=d=>{try{f(k.throw(d))}catch(X){I(X)}},f=d=>d.done?l(d.value):Promise.resolve(d.value).then(N,b);f((k=k.apply(p,m)).next())});const Xt={class:"markstream-vue"},Gt={class:"html-preview-frame__header"},Jt={class:"html-preview-frame__title"},Ut={class:"html-preview-frame__label"},Zt=["srcdoc"],Kt=rt(ut({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},onClose:{type:Function},title:{}},setup(p){const m=p,{t:k}=st(),l=B(()=>{const N=m.code||"",b=N.trim().toLowerCase();return b.startsWith("<!doctype")||b.startsWith("<html")||b.startsWith("<body")?N:`<!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <style>
7
+ html, body {
8
+ margin: 0;
9
+ padding: 0;
10
+ height: 100%;
11
+ background-color: ${m.isDark?"#020617":"#ffffff"};
12
+ color: ${m.isDark?"#e5e7eb":"#020617"};
13
+ }
14
+ body {
15
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;
16
+ }
17
+ </style>
18
+ </head>
19
+ <body>
20
+ ${N}
21
+ </body>
22
+ </html>`});function I(N){var b;N.key!=="Escape"&&N.key!=="Esc"||(b=m.onClose)==null||b.call(m)}return Dt(()=>{typeof window<"u"&&window.addEventListener("keydown",I)}),ct(()=>{typeof window<"u"&&window.removeEventListener("keydown",I)}),(N,b)=>(F(),ke(jt,{to:"body"},[u("div",Xt,[u("div",{class:oe(["html-preview-frame__backdrop",{"html-preview-frame__backdrop--dark":m.isDark}]),onClick:b[2]||(b[2]=f=>{var d;return(d=m.onClose)==null?void 0:d.call(m)})},[u("div",{class:oe(["html-preview-frame",{"html-preview-frame--dark":m.isDark}]),onClick:b[1]||(b[1]=Lt(()=>{},["stop"]))},[u("div",Gt,[u("div",Jt,[b[3]||(b[3]=u("span",{class:"html-preview-frame__dot"},null,-1)),u("span",Ut,Ye(m.title||g(k)("common.preview")||"Preview"),1)]),u("button",{type:"button",class:oe(["html-preview-frame__close",{"html-preview-frame__close--dark":m.isDark}]),onClick:b[0]||(b[0]=f=>{var d;return(d=m.onClose)==null?void 0:d.call(m)})}," × ",2)]),u("iframe",{class:"html-preview-frame__iframe",sandbox:"allow-scripts allow-same-origin",srcdoc:l.value},null,8,Zt)],2)],2)])]))}}),[["__scopeId","data-v-296dd89d"]]);let te=null,$e=null,re=null,ne=null,He=null,De=null;const Le=new WeakMap;let Qt=0;const en={key:0,class:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",style:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))","background-color":"var(--vscode-editor-background, var(--markstream-code-fallback-bg))"}},tn={class:"flex items-center gap-x-2 flex-1 overflow-hidden"},nn=["innerHTML"],on={class:"text-sm font-medium font-mono truncate"},ln={class:"flex items-center gap-x-2"},an=["aria-pressed"],rn=["disabled"],un=["disabled"],sn=["disabled"],cn=["aria-label"],dn={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:"w-3 h-3"},vn={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:"w-3 h-3"},mn=["aria-pressed"],fn={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:"w-3 h-3"},pn={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:"w-3 h-3"},hn=["aria-label"],wn={class:"code-editor-layer"},gn={class:"code-loading-placeholder"},yn={class:"sr-only","aria-live":"polite",role:"status"},at="__markstreamMonacoPassiveTouch__",je=rt(ut({__name:"CodeBlockNode",props:{node:{},isDark:{type:Boolean},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:void 0},lightTheme:{default:void 0},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},customId:{}},emits:["previewCode","copy"],setup(p,{emit:m}){var k;const l=p,I=m;typeof window<"u"&&(function(){var t;try{const e=window;if(e[at])return;const n=(t=window.Element)==null?void 0:t.prototype,o=n?.addEventListener;if(!n||!o)return;n.addEventListener=function(i,a,c){return i==="touchstart"&&(function(r,y){if(!r)return!1;const s=r;return!(typeof s.closest!="function"||!s.closest(".monaco-editor, .monaco-diff-editor")||y&&typeof y=="object"&&"passive"in y)})(this,c)?o.call(this,i,a,(function(r){return r==null?{passive:!0}:typeof r=="boolean"?{capture:r,passive:!0}:typeof r=="object"?"passive"in r?r:it(Te({},r),{passive:!0}):{passive:!0}})(c)):o.call(this,i,a,c)},e[at]=!0}catch{}})();const N=Tt(),b=B(()=>{const t=N?.vnode.props;return!(!t||!t.onPreviewCode&&!t.onPreviewCode)}),{t:f}=st(),d=M(null),X=M(null),Z=M(!1),D=M(Ee(l.node.language)),le=B(()=>Vt(D.value)),S=M(!1),O=M(!1),ue=M(!1),K=M(!1),se=M(!1),G=M(null);let be=0;const dt=Et(),ie=M(null),q=M(typeof window>"u");typeof window<"u"&&W(()=>X.value,t=>{var e;if((e=ie.value)==null||e.destroy(),ie.value=null,!t)return void(q.value=!1);const n=dt(t,{rootMargin:"400px"});ie.value=n,q.value=n.isVisible.value,n.whenVisible.then(()=>{q.value=!0})},{immediate:!0}),Nt(()=>{var t;(t=ie.value)==null||t.destroy(),ie.value=null});let L=null,ce=null,xe=()=>{},Me=()=>{},de=()=>null,j=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),$=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Ce=()=>{},ve=()=>{},Q=null,Ve=()=>{var t;return String((t=l.node.language)!=null?t:"plaintext")},Be=()=>Y(null,null,function*(){});const P=B(()=>l.node.diff),We=B(()=>P.value?"diff":"single"),vt=M(We.value),me=M(!1),mt=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.wordWrap;return e==null||String(e)!=="off"}),Ie=B(()=>typeof window<"u"&&!me.value&&!K.value),fe=M(!1);typeof window<"u"&&Y(null,null,function*(){try{const t=yield Yt();if(!t)return void(me.value=!0);const e=t.useMonaco,n=t.detectLanguage;if(typeof n=="function"&&(Ve=n),typeof e=="function"){const o=Je();if(o&&l.themes&&Array.isArray(l.themes)&&!l.themes.includes(o))throw new Error("Preferred theme not in provided themes array");const i=e(it(Te({wordWrap:"on",wrappingIndent:"same",themes:l.themes,theme:o},l.monacoOptions||{}),{onThemeChange(){Fe()}}));L=i.createEditor||L,ce=i.createDiffEditor||ce,xe=i.updateCode||xe,Me=i.updateDiff||Me,de=i.getEditor||de,j=i.getEditorView||j,$=i.getDiffEditorView||$,Ce=i.cleanupEditor||Ce,ve=i.safeClean||i.cleanupEditor||ve,Be=i.setTheme||Be,se.value=!0,d.value&&(yield he(d.value))}}catch{me.value=!0}});const z=M(typeof((k=l.monacoOptions)==null?void 0:k.fontSize)=="number"?l.monacoOptions.fontSize:Number.NaN),h=M(z.value),ft=B(()=>{const t=z.value,e=h.value;return typeof t=="number"&&Number.isFinite(t)&&t>0&&typeof e=="number"&&Number.isFinite(e)&&e>0}),qe=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.fontSize;if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;const n=h.value;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:12}),pt=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.lineHeight;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:Math.round(1.5*qe.value)}),ht=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.tabSize;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:4}),wt=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.fontFamily;return Te({fontSize:`${qe.value}px`,lineHeight:`${pt.value}px`,tabSize:ht.value},typeof e=="string"&&e.trim()?{"--markstream-code-font-family":e.trim()}:{})});function Re(){var t,e,n,o,i;try{const a=P.value?(n=(e=(t=$())==null?void 0:t.getModifiedEditor)==null?void 0:e.call(t))!=null?n:$():j(),c=de(),r=(o=c?.EditorOption)==null?void 0:o.fontInfo;if(a&&r!=null){const y=(i=a.getOption)==null?void 0:i.call(a,r),s=y?.fontSize;if(typeof s=="number"&&Number.isFinite(s)&&s>0)return s}}catch{}try{const a=d.value;if(a){const c=a.querySelector(".view-lines .view-line");if(c)try{if(typeof window<"u"&&typeof window.getComputedStyle=="function"){const r=window.getComputedStyle(c).fontSize,y=r&&r.match(/^(\d+(?:\.\d+)?)/);if(y)return Number.parseFloat(y[1])}}catch{}}}catch{}return null}function Se(t){var e,n;try{const a=de(),c=(e=a?.EditorOption)==null?void 0:e.lineHeight;if(c!=null){const r=(n=t?.getOption)==null?void 0:n.call(t,c);if(typeof r=="number"&&r>0)return r}}catch{}const o=(function(){try{const a=d.value;if(!a)return null;const c=a.querySelector(".view-lines .view-line");if(c){const r=Math.ceil(c.getBoundingClientRect().height);if(r>0)return r}}catch{}return null})();if(o&&o>0)return o;const i=Number.isFinite(h.value)&&h.value>0?h.value:12;return Math.max(12,Math.round(1.35*i))}function Oe(){var t;if(Number.isFinite(h.value)&&h.value>0&&Number.isFinite(z.value))return h.value;const e=Re();return typeof((t=l.monacoOptions)==null?void 0:t.fontSize)=="number"?(z.value=l.monacoOptions.fontSize,h.value=l.monacoOptions.fontSize,h.value):e&&e>0?(z.value=e,h.value=e,e):(z.value=12,h.value=12,12)}function Ae(){var t,e,n,o,i,a,c,r,y,s,v,V,R,x;try{const w=P.value?$():j();if(!w)return null;if(P.value&&w?.getOriginalEditor&&w?.getModifiedEditor){const C=(t=w.getOriginalEditor)==null?void 0:t.call(w),E=(e=w.getModifiedEditor)==null?void 0:e.call(w);(n=C?.layout)==null||n.call(C),(o=E?.layout)==null||o.call(E);const ge=((i=C?.getContentHeight)==null?void 0:i.call(C))||0,Ue=((a=E?.getContentHeight)==null?void 0:a.call(E))||0,Ze=Math.max(ge,Ue);if(Ze>0)return Math.ceil(Ze+1);const Ot=((y=(r=(c=C?.getModel)==null?void 0:c.call(C))==null?void 0:r.getLineCount)==null?void 0:y.call(r))||1,Ft=((V=(v=(s=E?.getModel)==null?void 0:s.call(E))==null?void 0:v.getLineCount)==null?void 0:V.call(v))||1,_t=Math.max(Ot,Ft),Pt=Math.max(Se(C),Se(E));return Math.ceil(_t*(Pt+1.5)+0+1)}if(w?.getContentHeight){(R=w?.layout)==null||R.call(w);const C=w.getContentHeight();if(C>0)return Math.ceil(C+1)}const A=(x=w?.getModel)==null?void 0:x.call(w);let we=1;A&&typeof A.getLineCount=="function"&&(we=A.getLineCount());const Pe=Se(w);return Math.ceil(we*(Pe+1.5)+0+1)}catch{return null}}function Fe(){var t,e,n,o,i,a,c,r;const y=d.value,s=X.value;if(!y||!s)return;const v=y.querySelector(".monaco-editor")||y,V=v.querySelector(".monaco-editor-background")||v,R=v.querySelector(".view-lines")||v;let x=null,w=null,A=null;try{typeof window<"u"&&typeof window.getComputedStyle=="function"&&(x=window.getComputedStyle(v),w=V===v?x:window.getComputedStyle(V),A=R===v?x:window.getComputedStyle(R))}catch{x=null,w=null,A=null}const we=String((t=x?.getPropertyValue("--vscode-editor-foreground"))!=null?t:"").trim(),Pe=String((e=x?.getPropertyValue("--vscode-editor-background"))!=null?e:"").trim(),C=String((o=(n=x?.getPropertyValue("--vscode-editor-selectionBackground"))!=null?n:x?.getPropertyValue("--vscode-editor-hoverHighlightBackground"))!=null?o:"").trim(),E=we||String((a=(i=A?.color)!=null?i:x?.color)!=null?a:"").trim(),ge=Pe||String((r=(c=w?.backgroundColor)!=null?c:x?.backgroundColor)!=null?r:"").trim();E&&s.style.setProperty("--vscode-editor-foreground",E),ge&&s.style.setProperty("--vscode-editor-background",ge),C&&s.style.setProperty("--vscode-editor-selectionBackground",C)}function J(){try{const t=d.value;if(!t)return;const e=t.getBoundingClientRect(),n=window.scrollY+e.top,o=Ae();if(o!=null&&o>0){const i=e.height;t.style.height=`${Math.ceil(o)}px`,t.style.maxHeight="none";const a=Math.ceil(o)-i;a!==0&&n<window.scrollY&&window.scrollBy(0,a)}}catch{}}function ee(){var t;try{const e=d.value;if(!e)return;const n=e.getBoundingClientRect(),o=window.scrollY+n.top,i=n.height,a=(function(){var s,v;const V=(v=(s=l.monacoOptions)==null?void 0:s.MAX_HEIGHT)!=null?v:500;if(typeof V=="number")return V;const R=String(V).match(/^(\d+(?:\.\d+)?)/);return R?Number.parseFloat(R[1]):500})();if(be>0&&(be--,G.value!=null)){const s=Math.min(G.value,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}const c=Ae();if(c!=null&&c>0){const s=Math.min(c,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}if(G.value!=null){const s=Math.min(G.value,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}const r=Math.ceil(((t=e.getBoundingClientRect)==null?void 0:t.call(e).height)||0);if(r>0){const s=Math.min(r,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}const y=Number.parseFloat(e.style.height);if(!Number.isNaN(y)&&y>0){const s=Math.ceil(Math.min(y,a));e.style.height=`${s}px`;const v=s-i;v!==0&&o<window.scrollY&&window.scrollBy(0,v)}else{const s=Math.ceil(a);e.style.height=`${s}px`;const v=s-i;v!==0&&o<window.scrollY&&window.scrollBy(0,v)}e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto"}catch{}}const _e=B(()=>l.isShowPreview&&(D.value==="html"||D.value==="svg"));W(()=>l.node.language,t=>{D.value=Ee(t)}),W(()=>l.node.code,t=>Y(null,null,function*(){var e,n;if(l.stream!==!1){if(D.value||(D.value=Ee(Ve(t))),L&&!ue.value&&d.value)try{yield he(d.value)}catch{}P.value?Me(String((e=l.node.originalCode)!=null?e:""),String((n=l.node.updatedCode)!=null?n:""),le.value):xe(t,le.value),S.value&&ae(()=>J())}}));const gt=B(()=>{const t=D.value;return t?tt[t]||t.charAt(0).toUpperCase()+t.slice(1):tt[""]}),yt=B(()=>$t(D.value||"")),kt=B(()=>{const t={},e=i=>{if(i!=null)return typeof i=="number"?`${i}px`:String(i)},n=e(l.minWidth),o=e(l.maxWidth);return n&&(t.minWidth=n),o&&(t.maxWidth=o),t});function bt(){return Y(this,null,function*(){try{typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(l.node.code)),Z.value=!0,I("copy",l.node.code),setTimeout(()=>{Z.value=!1},1e3)}catch(t){console.error("复制失败:",t)}})}function Xe(t){return!t||t.disabled}function T(t,e,n="top"){if(Xe(t.currentTarget))return;const o=t,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;nt(t.currentTarget,e,n,!1,i,l.isDark)}function _(){Ht()}function Ge(t){if(Xe(t.currentTarget))return;const e=Z.value?f("common.copied")||"Copied":f("common.copy")||"Copy",n=t,o=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;nt(t.currentTarget,e,"top",!1,o,l.isDark)}function xt(){S.value=!S.value;const t=P.value?$():j(),e=d.value;t&&e&&(S.value?(pe(!0),e.style.maxHeight="none",e.style.overflow="visible",J()):(pe(!1),e.style.overflow="auto",ee()))}function Mt(){var t,e,n;if(O.value=!O.value,O.value){if(d.value){const o=Math.ceil(((e=(t=d.value).getBoundingClientRect)==null?void 0:e.call(t).height)||0);o>0&&(G.value=o)}pe(!1)}else{S.value&&pe(!0),d.value&&G.value!=null&&(d.value.style.height=`${G.value}px`);const o=P.value?$():j();try{(n=o?.layout)==null||n.call(o)}catch{}be=2,ae(()=>{S.value?J():ee()})}}function Ct(){if(!_e.value)return;const t=D.value;if(b.value){const e=t==="html"?"text/html":"image/svg+xml",n=t==="html"?f("artifacts.htmlPreviewTitle")||"HTML Preview":f("artifacts.svgPreviewTitle")||"SVG Preview";return void I("previewCode",{node:l.node,artifactType:e,artifactTitle:n,id:`temp-${t}-${Date.now()}`})}t==="html"&&(fe.value=!fe.value)}function pe(t){var e,n;try{if(P.value){const o=$();(e=o?.updateOptions)==null||e.call(o,{automaticLayout:t})}else{const o=j();(n=o?.updateOptions)==null||n.call(o,{automaticLayout:t})}}catch{}}function he(t){return L?Q||(ue.value=!0,Q=Y(null,null,function*(){yield(function(n){return Y(this,null,function*(){var o,i,a;if(!L)return;P.value?(ve(),ce?yield ce(n,String((o=l.node.originalCode)!=null?o:""),String((i=l.node.updatedCode)!=null?i:""),le.value):yield L(n,l.node.code,le.value)):yield L(n,l.node.code,le.value);const c=P.value?$():j();if(typeof((a=l.monacoOptions)==null?void 0:a.fontSize)=="number")c?.updateOptions({fontSize:l.monacoOptions.fontSize,automaticLayout:!1}),z.value=l.monacoOptions.fontSize,h.value=l.monacoOptions.fontSize;else{const r=Re();r&&r>0?(z.value=r,h.value=r):(z.value=12,h.value=12)}S.value||O.value||ee(),l.loading===!1&&(yield ye(),ae(()=>{S.value&&!O.value?J():O.value||ee()})),yield ye(),K.value=!0,Fe()})})(t)}).finally(()=>{Q=null}),Q):null}W(()=>h.value,(t,e)=>{const n=P.value?$():j();n&&typeof t=="number"&&Number.isFinite(t)&&t>0&&(n.updateOptions({fontSize:t}),S.value&&!O.value&&J())},{flush:"post",immediate:!1});const Bt=W(()=>[d.value,P.value,l.stream,l.loading,se.value,q.value],t=>Y(null,[t],function*([e,n,o,i,a,c]){if(!e||!L||!c||o===!1&&i!==!1)return;const r=he(e);if(r){try{yield r}catch{K.value=!1}Bt()}}));function Je(){return l.isDark?l.darkTheme:l.lightTheme}W(We,(t,e)=>Y(null,null,function*(){if(t!==e&&(vt.value=t,L&&d.value&&ue.value&&(l.stream!==!1||l.loading===!1)&&q.value))try{K.value=!1,ue.value=!1,Q=null,ve(),yield ye(),yield he(d.value)}catch{K.value=!1}})),W(()=>[l.isDark,l.darkTheme,l.lightTheme,se.value],()=>{se.value&&(function(){const t=Je();t&&(function(e,n){const o=(function(i){if(i==null)return null;if(typeof i=="string")return i;if(typeof i=="object"&&i&&"name"in i)return String(i.name);if(typeof i=="object"){const a=Le.get(i);if(a)return a;try{const r=JSON.stringify(i);if(r)return Le.set(i,r),r}catch{}const c="__theme_"+ ++Qt;return Le.set(i,c),c}return String(i)})(n);return o?(De=e,te||He!==o?te?(ne===o||$e===o||(re=n,ne=o),te):(re=n,ne=o,te=Y(null,null,function*(){for(;ne&&re!=null;){const i=re,a=ne;if(re=null,ne=null,He!==a)try{$e=a,yield(De??e)(i),He=a}catch{}}}).finally(()=>{te=null,$e=null}),te):Promise.resolve()):Promise.resolve()})(Be,t).then(()=>{K.value&&ae(()=>Fe())})})()}),W(()=>[l.monacoOptions,q.value],()=>{var t,e;if(!L||!q.value)return;const n=P.value?$():j(),o=typeof((t=l.monacoOptions)==null?void 0:t.fontSize)=="number"?l.monacoOptions.fontSize:Number.isFinite(h.value)?h.value:void 0;typeof o=="number"&&Number.isFinite(o)&&o>0&&((e=n?.updateOptions)==null||e.call(n,{fontSize:o})),S.value&&!O.value?J():O.value||ee()},{deep:!0});const St=W(()=>[l.loading,q.value],t=>Y(null,[t],function*([e,n]){n&&(e||(yield ye(),ae(()=>{O.value||(S.value?J():ee()),St()})))}),{immediate:!0,flush:"post"});return ct(()=>{Ce()}),(t,e)=>me.value?(F(),ke(g(Ke),{key:0,node:p.node,loading:l.loading},null,8,["node","loading"])):(F(),H("div",{key:1,ref_key:"container",ref:X,style:ze(kt.value),class:oe(["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",[l.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",{"is-rendering":l.loading,"is-dark":l.isDark}]])},[l.showHeader?(F(),H("div",en,[Ne(t.$slots,"header-left",{},()=>[u("div",tn,[u("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:yt.value},null,8,nn),u("span",on,Ye(gt.value),1)])],!0),Ne(t.$slots,"header-right",{},()=>[u("div",ln,[u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":O.value,onClick:Mt,onMouseenter:e[0]||(e[0]=n=>T(n,O.value?g(f)("common.expand")||"Expand":g(f)("common.collapse")||"Collapse")),onFocus:e[1]||(e[1]=n=>T(n,O.value?g(f)("common.expand")||"Expand":g(f)("common.collapse")||"Collapse")),onMouseleave:_,onBlur:_},[(F(),H("svg",{style:ze({rotate:O.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:"w-3 h-3"},[...e[17]||(e[17]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,an),l.showFontSizeButtons&&l.enableFontSizeControl?(F(),H(zt,{key:0},[u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(h.value)&&h.value<=10,onClick:e[2]||(e[2]=n=>(function(){const o=Oe(),i=Math.max(10,o-1);h.value=i})()),onMouseenter:e[3]||(e[3]=n=>T(n,g(f)("common.decrease")||"Decrease")),onFocus:e[4]||(e[4]=n=>T(n,g(f)("common.decrease")||"Decrease")),onMouseleave:_,onBlur:_},[...e[18]||(e[18]=[u("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:"w-3 h-3"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)])],40,rn),u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!ft.value||h.value===z.value,onClick:e[5]||(e[5]=n=>(Oe(),void(Number.isFinite(z.value)&&(h.value=z.value)))),onMouseenter:e[6]||(e[6]=n=>T(n,g(f)("common.reset")||"Reset")),onFocus:e[7]||(e[7]=n=>T(n,g(f)("common.reset")||"Reset")),onMouseleave:_,onBlur:_},[...e[19]||(e[19]=[u("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:"w-3 h-3"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),u("path",{d:"M3 3v5h5"})])],-1)])],40,un),u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(h.value)&&h.value>=36,onClick:e[8]||(e[8]=n=>(function(){const o=Oe(),i=Math.min(36,o+1);h.value=i})()),onMouseenter:e[9]||(e[9]=n=>T(n,g(f)("common.increase")||"Increase")),onFocus:e[10]||(e[10]=n=>T(n,g(f)("common.increase")||"Increase")),onMouseleave:_,onBlur:_},[...e[20]||(e[20]=[u("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:"w-3 h-3"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)])],40,sn)],64)):U("",!0),l.showCopyButton?(F(),H("button",{key:1,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":Z.value?g(f)("common.copied")||"Copied":g(f)("common.copy")||"Copy",onClick:bt,onMouseenter:e[11]||(e[11]=n=>Ge(n)),onFocus:e[12]||(e[12]=n=>Ge(n)),onMouseleave:_,onBlur:_},[Z.value?(F(),H("svg",vn,[...e[22]||(e[22]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(F(),H("svg",dn,[...e[21]||(e[21]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("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,cn)):U("",!0),l.showExpandButton?(F(),H("button",{key:2,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":S.value,onClick:xt,onMouseenter:e[13]||(e[13]=n=>T(n,S.value?g(f)("common.collapse")||"Collapse":g(f)("common.expand")||"Expand")),onFocus:e[14]||(e[14]=n=>T(n,S.value?g(f)("common.collapse")||"Collapse":g(f)("common.expand")||"Expand")),onMouseleave:_,onBlur:_},[S.value?(F(),H("svg",fn,[...e[23]||(e[23]=[u("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)])])):(F(),H("svg",pn,[...e[24]||(e[24]=[u("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)])]))],40,mn)):U("",!0),_e.value&&l.showPreviewButton?(F(),H("button",{key:3,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":g(f)("common.preview")||"Preview",onClick:Ct,onMouseenter:e[15]||(e[15]=n=>T(n,g(f)("common.preview")||"Preview")),onFocus:e[16]||(e[16]=n=>T(n,g(f)("common.preview")||"Preview")),onMouseleave:_,onBlur:_},[...e[25]||(e[25]=[u("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24"},[u("g",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},[u("path",{d:"M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496"}),u("path",{d:"M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23"})])],-1)])],40,hn)):U("",!0)])],!0)])):U("",!0),Qe(u("div",wn,[u("div",{ref_key:"codeEditor",ref:d,class:oe(["code-editor-container",[p.stream?"":"code-height-placeholder",{"is-hidden":Ie.value}]])},null,2),Ie.value?(F(),ke(g(Ke),{key:0,class:oe(["code-pre-fallback",{"is-wrap":mt.value}]),style:ze(wt.value),node:p.node},null,8,["class","style","node"])):U("",!0)],512),[[et,!(O.value||!p.stream&&p.loading)]]),fe.value&&!b.value&&_e.value&&D.value==="html"?(F(),ke(Kt,{key:1,code:p.node.code,"is-dark":l.isDark,"on-close":()=>fe.value=!1},null,8,["code","is-dark","on-close"])):U("",!0),Qe(u("div",gn,[Ne(t.$slots,"loading",{loading:p.loading,stream:p.stream},()=>[e[26]||(e[26]=u("div",{class:"loading-skeleton"},[u("div",{class:"skeleton-line"}),u("div",{class:"skeleton-line"}),u("div",{class:"skeleton-line short"})],-1))],!0)],512),[[et,!p.stream&&p.loading]]),u("span",yn,Ye(Z.value?g(f)("common.copied")||"Copied":""),1)],6))}}),[["__scopeId","data-v-bf41db7f"]]);je.install=p=>{p.component(je.__name,je)};export{je as default};
@@ -0,0 +1,89 @@
1
+ import{_ as o,l as te,c as U,H as fe,ah as ye,ai as be,aj as me,ac as _e,F as K,i as F,t as Ee,J as ke,ad as Se,ae as ce,af as le}from"./DaWfUpsD.js";import{g as Ne}from"./gpkmuIcl.js";import"./C8FO969Z.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),u=[1,4],p=[1,13],s=[1,12],d=[1,15],E=[1,16],b=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],_=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],m=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],H=[1,38],T={trace:o(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:o(function(i,n,r,a,h,t,M){var c=t.length-1;switch(h){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:u},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:u},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:b,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:b,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:b,23:l},{6:I,7:g,10:23,11:w},e(_,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:b,23:l}),e(_,[2,19]),e(_,[2,21],{15:30,24:G}),e(_,[2,22]),e(_,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:b,23:l},e(V,[2,14],{7:m,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(_,[2,16],{15:37,24:G}),e(_,[2,17]),e(_,[2,18]),e(_,[2,20],{24:H}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:m,11:A}),e(L,[2,11]),e(L,[2,12]),e(_,[2,15],{24:H}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],h=[null],t=[],M=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),y=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);y.setInput(i,R.yy),R.yy.lexer=y,R.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var q=y.yylloc;t.push(q);var de=y.options&&y.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,h.length=h.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||y.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var k,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((k===null||typeof k>"u")&&(k=ae()),x=M[P]&&M[P][k]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in M[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");y.showPosition?Z="Parse error on line "+(W+1)+`:
2
+ `+y.showPosition()+`
3
+ Expecting `+X.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:q,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+k);switch(x[0]){case 1:r.push(k),h.push(y.yytext),t.push(y.yylloc),r.push(x[1]),k=null,se=y.yyleng,c=y.yytext,W=y.yylineno,q=y.yylloc;break;case 2:if(C=this.productions_[x[1]][1],j.$=h[h.length-C],j._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(j._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[c,se,W,R.yy,x[1],h,t].concat(ge)),typeof Q<"u")return Q;C&&(r=r.slice(0,-1*C*2),h=h.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),h.push(j.$),t.push(j._$),oe=M[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(i,n){return this.yy=n||this.yy||{},this._input=i,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:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var n=i.length,r=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=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),r.length-1&&(this.yylineno-=r.length-1);var h=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+n+"^"},"showPosition"),test_match:o(function(i,n){var r,a,h;if(this.options.backtrack_lexer&&(h={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(h.yylloc.range=this.yylloc.range.slice(0))),a=i[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],r=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var t in h)this[t]=h[t];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,r,a;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),t=0;t<h.length;t++)if(r=this._input.match(this.rules[h[t]]),r&&(!n||r[0].length>n[0].length)){if(n=r,a=t,this.options.backtrack_lexer){if(i=this.test_match(r,h[t]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,h[a]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var n=this.next();return n||this.lex()},"lex"),begin:o(function(n){this.conditionStack.push(n)},"begin"),popState:o(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:o(function(n){this.begin(n)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(n,r,a,h){switch(a){case 0:return this.pushState("shapeData"),r.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const t=/\n\s*/g;return r.yytext=r.yytext.replace(t,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",r.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",r.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),n.getLogger().trace("node end ...",r.yytext),"NODE_DEND";case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 41:return n.getLogger().trace("Long description:",r.yytext),21;case 42:return n.getLogger().trace("Long description:",r.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return O})();T.lexer=Y;function B(){this.yy={}}return o(B,"Parser"),B.prototype=T,T.Parser=B,new B})();$.parser=$;var xe=$,v=[],ne=[],ee=0,ie={},ve=o(()=>{v=[],ne=[],ee=0,ie={}},"clear"),De=o(e=>{if(v.length===0)return null;const u=v[0].level;let p=null;for(let s=v.length-1;s>=0;s--)if(v[s].level===u&&!p&&(p=v[s]),v[s].level<u)throw new Error('Items without section detected, found section ("'+v[s].label+'")');return e===p?.level?null:p},"getSection"),he=o(function(){return ne},"getSections"),Le=o(function(){const e=[],u=[],p=he(),s=U();for(const d of p){const E={id:d.id,label:F(d.label??"",s),isGroup:!0,ticket:d.ticket,shape:"kanbanSection",level:d.level,look:s.look};u.push(E);const b=v.filter(l=>l.parentId===d.id);for(const l of b){const D={id:l.id,parentId:d.id,label:F(l.label??"",s),isGroup:!1,ticket:l?.ticket,priority:l?.priority,assigned:l?.assigned,icon:l?.icon,shape:"kanbanItem",level:l.level,rx:5,ry:5,cssStyles:["text-align: left"]};u.push(D)}}return{nodes:u,edges:e,other:{},config:U()}},"getData"),Oe=o((e,u,p,s,d)=>{const E=U();let b=E.mindmap?.padding??K.mindmap.padding;switch(s){case f.ROUNDED_RECT:case f.RECT:case f.HEXAGON:b*=2}const l={id:F(u,E)||"kbn"+ee++,level:e,label:F(p,E),width:E.mindmap?.maxNodeWidth??K.mindmap.maxNodeWidth,padding:b,isGroup:!1};if(d!==void 0){let I;d.includes(`
7
+ `)?I=d+`
8
+ `:I=`{
9
+ `+d+`
10
+ }`;const g=Ee(I,{schema:ke});if(g.shape&&(g.shape!==g.shape.toLowerCase()||g.shape.includes("_")))throw new Error(`No such shape: ${g.shape}. Shape names should be lowercase.`);g?.shape&&g.shape==="kanbanItem"&&(l.shape=g?.shape),g?.label&&(l.label=g?.label),g?.icon&&(l.icon=g?.icon.toString()),g?.assigned&&(l.assigned=g?.assigned.toString()),g?.ticket&&(l.ticket=g?.ticket.toString()),g?.priority&&(l.priority=g?.priority)}const D=De(e);D?l.parentId=D.id||"kbn"+ee++:ne.push(l),v.push(l)},"addNode"),f={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Ie=o((e,u)=>{switch(te.debug("In get type",e,u),e){case"[":return f.RECT;case"(":return u===")"?f.ROUNDED_RECT:f.CLOUD;case"((":return f.CIRCLE;case")":return f.CLOUD;case"))":return f.BANG;case"{{":return f.HEXAGON;default:return f.DEFAULT}},"getType"),Ce=o((e,u)=>{ie[e]=u},"setElementForId"),we=o(e=>{if(!e)return;const u=U(),p=v[v.length-1];e.icon&&(p.icon=F(e.icon,u)),e.class&&(p.cssClasses=F(e.class,u))},"decorateNode"),Ae=o(e=>{switch(e){case f.DEFAULT:return"no-border";case f.RECT:return"rect";case f.ROUNDED_RECT:return"rounded-rect";case f.CIRCLE:return"circle";case f.CLOUD:return"cloud";case f.BANG:return"bang";case f.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Te=o(()=>te,"getLogger"),Re=o(e=>ie[e],"getElementById"),Pe={clear:ve,addNode:Oe,getSections:he,getData:Le,nodeType:f,getType:Ie,setElementForId:Ce,decorateNode:we,type2Str:Ae,getLogger:Te,getElementById:Re},Ve=Pe,Be=o(async(e,u,p,s)=>{te.debug(`Rendering kanban diagram
11
+ `+e);const E=s.db.getData(),b=U();b.htmlLabels=!1;const l=fe(u),D=l.append("g");D.attr("class","sections");const I=l.append("g");I.attr("class","items");const g=E.nodes.filter(m=>m.isGroup);let w=0;const _=10,G=[];let N=25;for(const m of g){const A=b?.kanban?.sectionWidth||200;w=w+1,m.x=A*w+(w-1)*_/2,m.width=A,m.y=0,m.height=A*3,m.rx=5,m.ry=5,m.cssClasses=m.cssClasses+" section-"+w;const L=await ye(D,m);N=Math.max(N,L?.labelBBox?.height),G.push(L)}let V=0;for(const m of g){const A=G[V];V=V+1;const L=b?.kanban?.sectionWidth||200,H=-L*3/2+N;let T=H;const Y=E.nodes.filter(i=>i.parentId===m.id);for(const i of Y){if(i.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");i.x=m.x,i.width=L-1.5*_;const r=(await be(I,i,{config:b})).node().getBBox();i.y=T+r.height/2,await me(i),T=i.y+r.height/2+_/2}const B=A.cluster.select("rect"),O=Math.max(T-H+3*_,50)+(N-25);B.attr("height",O)}_e(void 0,l,b.mindmap?.padding??K.kanban.padding,b.mindmap?.useMaxWidth??K.kanban.useMaxWidth)},"draw"),je={draw:Be},Fe=o(e=>{let u="";for(let s=0;s<e.THEME_COLOR_LIMIT;s++)e["lineColor"+s]=e["lineColor"+s]||e["cScaleInv"+s],Se(e["lineColor"+s])?e["lineColor"+s]=ce(e["lineColor"+s],20):e["lineColor"+s]=le(e["lineColor"+s],20);const p=o((s,d)=>e.darkMode?le(s,d):ce(s,d),"adjuster");for(let s=0;s<e.THEME_COLOR_LIMIT;s++){const d=""+(17-3*s);u+=`
12
+ .section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
13
+ fill: ${p(e["cScale"+s],10)};
14
+ stroke: ${p(e["cScale"+s],10)};
15
+
16
+ }
17
+ .section-${s-1} text {
18
+ fill: ${e["cScaleLabel"+s]};
19
+ }
20
+ .node-icon-${s-1} {
21
+ font-size: 40px;
22
+ color: ${e["cScaleLabel"+s]};
23
+ }
24
+ .section-edge-${s-1}{
25
+ stroke: ${e["cScale"+s]};
26
+ }
27
+ .edge-depth-${s-1}{
28
+ stroke-width: ${d};
29
+ }
30
+ .section-${s-1} line {
31
+ stroke: ${e["cScaleInv"+s]} ;
32
+ stroke-width: 3;
33
+ }
34
+
35
+ .disabled, .disabled circle, .disabled text {
36
+ fill: lightgray;
37
+ }
38
+ .disabled text {
39
+ fill: #efefef;
40
+ }
41
+
42
+ .node rect,
43
+ .node circle,
44
+ .node ellipse,
45
+ .node polygon,
46
+ .node path {
47
+ fill: ${e.background};
48
+ stroke: ${e.nodeBorder};
49
+ stroke-width: 1px;
50
+ }
51
+
52
+ .kanban-ticket-link {
53
+ fill: ${e.background};
54
+ stroke: ${e.nodeBorder};
55
+ text-decoration: underline;
56
+ }
57
+ `}return u},"genSections"),Ge=o(e=>`
58
+ .edge {
59
+ stroke-width: 3;
60
+ }
61
+ ${Fe(e)}
62
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
63
+ fill: ${e.git0};
64
+ }
65
+ .section-root text {
66
+ fill: ${e.gitBranchLabel0};
67
+ }
68
+ .icon-container {
69
+ height:100%;
70
+ display: flex;
71
+ justify-content: center;
72
+ align-items: center;
73
+ }
74
+ .edge {
75
+ fill: none;
76
+ }
77
+ .cluster-label, .label {
78
+ color: ${e.textColor};
79
+ fill: ${e.textColor};
80
+ }
81
+ .kanban-label {
82
+ dy: 1em;
83
+ alignment-baseline: middle;
84
+ text-anchor: middle;
85
+ dominant-baseline: middle;
86
+ text-align: center;
87
+ }
88
+ ${Ne()}
89
+ `,"getStyles"),He=Ge,ze={db:Ve,renderer:je,parser:xe,styles:He};export{ze as diagram};
@@ -0,0 +1 @@
1
+ import{e as c2,d as d2,A as h2,w as X,r as m,R as j,C as R,o as v2,g as g2,f as c,j as s,m as k,k as w2,l as m2,z as a,q,n as o,E as i,H as z,I as G,v as p2,y as x2,p as y2,O as C2,T as f2,P as k2,M as l2,N as b2,_ as M2}from"./C8FO969Z.js";var Y=(E,J,r)=>new Promise((l,b)=>{var v=y=>{try{w(r.next(y))}catch(p){b(p)}},g=y=>{try{w(r.throw(y))}catch(p){b(p)}},w=y=>y.done?l(y.value):Promise.resolve(y.value).then(v,g);w((r=r.apply(E,J)).next())});const a2=()=>M2(()=>import("./yG4UzpsV.js"),[],import.meta.url);let N=null,B2=a2;const D2={key:0},F2={key:1,class:"flex items-center gap-x-2 overflow-hidden"},T2=["src"],j2={key:2},E2={class:"flex items-center gap-x-1"},$2={class:"flex items-center gap-x-1"},z2={key:4},L2={key:5,class:"flex items-center gap-x-1"},_2=["aria-pressed"],P2={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:"w-3 h-3"},Z2={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:"w-3 h-3"},I2=["disabled"],H2=["disabled"],S2={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"},V2={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"},O2={key:1,class:"relative"},X2={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},R2={class:"flex items-center gap-2 backdrop-blur rounded-lg"},Y2={class:"markstream-vue"},N2={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},Q=c2(d2({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:"500px"},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(E,{emit:J}){const r=E,{t:l}=h2(),b=m(!1),v=m(!1),g=m(),w=m(!1),y=m("360px"),p=m(!1),M=m(),L=m(null),f=m(1),B=m(0),D=m(0),F=m(!1),_=m({x:0,y:0}),P=R(()=>r.node.code);function K(t){return!t||t.disabled}function h(t,e,n="top"){if(K(t.currentTarget))return;const u=t,x=u?.clientX!=null&&u?.clientY!=null?{x:u.clientX,y:u.clientY}:void 0;l2(t.currentTarget,e,n,!1,x,r.isDark)}function d(){b2()}function W(t){if(K(t.currentTarget))return;const e=b.value?l("common.copied")||"Copied":l("common.copy")||"Copy",n=t,u=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;l2(t.currentTarget,e,"top",!1,u,r.isDark)}function i2(){return Y(this,null,function*(){try{const t=P.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),b.value=!0,setTimeout(()=>{b.value=!1},1e3)}catch(t){console.error("Failed to copy:",t)}})}function e2(t){w.value=t==="source"}function s2(){var t;const e=(t=g.value)==null?void 0:t.querySelector("svg");e?(function(n){Y(this,null,function*(){try{const u=new XMLSerializer().serializeToString(n),x=new Blob([u],{type:"image/svg+xml;charset=utf-8"}),O=URL.createObjectURL(x);if(typeof document<"u"){const $=document.createElement("a");$.href=O,$.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild($),$.click(),document.body.removeChild($)}catch{}URL.revokeObjectURL(O)}}catch(u){console.error("Failed to export SVG:",u)}})})(e):console.error("SVG element not found")}function U(t){t.key==="Escape"&&p.value&&A()}function A(){if(p.value=!1,M.value&&(M.value.innerHTML=""),L.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",U)}catch{}}function u2(){(function(){if(p.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",U)}catch{}j(()=>{if(g.value&&M.value){M.value.innerHTML="";const t=document.createElement("div");t.style.transition="transform 0.1s ease",t.style.transformOrigin="center center",t.style.width="100%",t.style.height="100%",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center";const e=g.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",t.appendChild(e),M.value.appendChild(t),L.value=t,t.style.transform=`translate(${B.value}px, ${D.value}px) scale(${f.value})`}})})()}function t2(){f.value<3&&(f.value+=.1)}function o2(){f.value>.5&&(f.value-=.1)}function n2(){f.value=1,B.value=0,D.value=0}function Z(t){F.value=!0,t instanceof MouseEvent?_.value={x:t.clientX-B.value,y:t.clientY-D.value}:_.value={x:t.touches[0].clientX-B.value,y:t.touches[0].clientY-D.value}}function I(t){if(!F.value)return;let e,n;t instanceof MouseEvent?(e=t.clientX,n=t.clientY):(e=t.touches[0].clientX,n=t.touches[0].clientY),B.value=e-_.value.x,D.value=n-_.value.y}function T(){F.value=!1}let C=null;function H(){return Y(this,null,function*(){var t;if(g.value)try{const e=yield(function(){return Y(this,null,function*(){if(N)return N;const n=B2;if(!n)return null;let u;try{u=yield n()}catch(O){throw n===a2?new Error('Optional dependency "@antv/infographic" is not installed. Please install it to enable infographic diagrams.'):O}if(!u)return null;const x=u&&u.default?u.default:u;return N=typeof x=="function"&&x.prototype&&x.prototype.render?x:u.Infographic?u.Infographic:x&&x.Infographic?x.Infographic:x,N})})();if(!e)return void console.warn("Infographic library failed to load.");C&&((t=C.destroy)==null||t.call(C),C=null),g.value.innerHTML="",C=new e({container:g.value,width:"100%",height:"100%"}),C.render(P.value),j(()=>{if(g.value){const n=g.value.scrollHeight;n>0&&(y.value=`${Math.min(n,800)}px`)}})}catch(e){console.error("Failed to render infographic:",e),g.value&&(g.value.innerHTML=`<div class="text-red-500 p-4">Failed to render infographic: ${e instanceof Error?e.message:"Unknown error"}</div>`)}})}X(()=>P.value,()=>{w.value||v.value||j(()=>{H()})}),X(()=>w.value,t=>{t||v.value||j(()=>{H()})}),X(()=>v.value,t=>{t||w.value||j(()=>{H()})}),v2(()=>{w.value||v.value||j(()=>{H()})}),g2(()=>{var t;if(C&&((t=C.destroy)==null||t.call(C),C=null),typeof window<"u")try{window.removeEventListener("keydown",U)}catch{}});const S=R(()=>r.isDark?"infographic-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"infographic-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700"),V=R(()=>w.value||v.value),r2=R(()=>({transform:`translate(${B.value}px, ${D.value}px) scale(${f.value})`}));return X(r2,t=>{p.value&&L.value&&(L.value.style.transform=t.transform)}),(t,e)=>(s(),c("div",{class:a(["my-4 rounded-lg border overflow-hidden shadow-sm",[r.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":r.loading}]])},[r.showHeader?(s(),c("div",{key:0,class:a(["infographic-block-header flex justify-between items-center px-4 py-2.5 border-b",r.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"])},[t.$slots["header-left"]?(s(),c("div",D2,[q(t.$slots,"header-left",{},void 0,!0)])):(s(),c("div",F2,[o("img",{src:i("data:image/svg+xml,%3csvg%20width='15.52'%20height='16'%20viewBox='0%200%20291%20300'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20d='M140.904%20239.376C128.83%20239.683%20119.675%20239.299%20115.448%20243.843C110.902%20248.07%20111.288%20257.227%20110.979%20269.302C111.118%20274.675%20111.118%20279.478%20111.472%20283.52C111.662%20285.638%20111.95%20287.547%20112.406%20289.224C112.411%20289.243%20112.416%20289.259%20112.422%20289.28C112.462%20289.419%20112.496%20289.558%20112.539%20289.691C113.168%20291.787%20114.088%20293.491%20115.446%20294.758C116.662%20296.064%20118.283%20296.963%20120.264%20297.59C120.36%20297.614%20120.464%20297.646%20120.555%20297.675C120.56%20297.68%20120.56%20297.68%20120.566%20297.68C120.848%20297.768%20121.142%20297.846%20121.443%20297.923C121.454%20297.923%20121.464%20297.928%20121.478%20297.934C122.875%20298.272%20124.424%20298.507%20126.11%20298.678C126.326%20298.696%20126.542%20298.718%20126.763%20298.739C130.79%20299.086%20135.558%20299.088%20140.904%20299.222C152.974%20298.912%20162.128%20299.302%20166.36%20294.758C170.904%20290.526%20170.515%20281.371%20170.824%20269.302C170.515%20257.227%20170.907%20248.07%20166.36%20243.843C162.131%20239.299%20152.974%20239.683%20140.904%20239.376Z'%20fill='%23FF6376'%3e%3c/path%3e%3cpath%20d='M21.2155%20128.398C12.6555%20128.616%206.16484%20128.339%203.16751%20131.56C-0.0538222%20134.56%200.218178%20141.054%20-0.000488281%20149.608C0.218178%20158.168%20-0.0538222%20164.659%203.16751%20167.656C6.16484%20170.878%2012.6555%20170.606%2021.2155%20170.824C25.0262%20170.726%2028.4288%20170.726%2031.2955%20170.475C32.7968%20170.342%2034.1488%20170.136%2035.3382%20169.814C35.3542%20169.811%2035.3648%20169.806%2035.3782%20169.803C35.4768%20169.774%2035.5755%20169.747%2035.6688%20169.718C37.1568%20169.272%2038.3648%20168.622%2039.2635%20167.656C40.1915%20166.795%2040.8262%20165.646%2041.2715%20164.243C41.2875%20164.174%2041.3115%20164.102%2041.3328%20164.035C41.3328%20164.035%2041.3355%20164.032%2041.3355%20164.027C41.3968%20163.827%2041.4529%20163.622%2041.5062%20163.406C41.5062%20163.398%2041.5115%20163.392%2041.5142%20163.382C41.7542%20162.392%2041.9222%20161.294%2042.0422%20160.096C42.0555%20159.944%2042.0715%20159.792%2042.0848%20159.635C42.3328%20156.779%2042.3328%20153.398%2042.4262%20149.608C42.2075%20141.054%2042.4848%20134.56%2039.2635%20131.56C36.2635%20128.339%2029.7728%20128.616%2021.2155%20128.398Z'%20fill='%23FFCCCC'%3e%3c/path%3e%3cpath%20d='M81.0595%20184.171C70.8568%20184.433%2063.1208%20184.102%2059.5475%20187.942C55.7075%20191.518%2056.0328%20199.254%2055.7742%20209.454C56.0328%20219.657%2055.7075%20227.393%2059.5475%20230.963C63.1208%20234.803%2070.8568%20234.478%2081.0595%20234.739C85.6008%20234.622%2089.6595%20234.622%2093.0728%20234.323C94.8648%20234.163%2096.4755%20233.921%2097.8942%20233.534C97.9102%20233.529%2097.9235%20233.526%2097.9422%20233.521C98.0568%20233.486%2098.1742%20233.457%2098.2888%20233.422C100.06%20232.889%20101.5%20232.113%20102.569%20230.963C103.676%20229.937%20104.433%20228.566%20104.964%20226.894C104.985%20226.811%20105.012%20226.726%20105.036%20226.646C105.041%20226.643%20105.041%20226.643%20105.041%20226.638C105.116%20226.401%20105.18%20226.153%20105.244%20225.897C105.244%20225.889%20105.249%20225.881%20105.254%20225.867C105.54%20224.689%20105.74%20223.379%20105.881%20221.953C105.9%20221.771%20105.916%20221.59%20105.934%20221.403C106.228%20218.001%20106.228%20213.969%20106.342%20209.454C106.081%20199.254%20106.412%20191.518%20102.572%20187.942C98.9955%20184.102%2091.2568%20184.433%2081.0595%20184.171Z'%20fill='%23FF939F'%3e%3c/path%3e%3cpath%20d='M260.591%20151.87C215.652%20151.87%20203.02%20164.523%20203.02%20209.462H198.476C198.476%20164.523%20185.836%20151.881%20140.895%20151.881V147.337C185.836%20147.337%20198.487%20134.705%20198.487%2089.7659H203.02C203.02%20134.705%20215.652%20147.337%20260.591%20147.337V151.87ZM286.052%20124.158C281.82%20119.614%20272.66%20120.001%20260.591%20119.689C248.521%20119.385%20239.361%20119.771%20235.129%20115.227C230.585%20110.995%20230.983%20101.846%20230.671%2089.7659C230.513%2083.7312%20230.535%2078.4272%20230.023%2074.1019C229.513%2069.7659%20228.481%2066.4219%20226.209%2064.3046C221.967%2059.7606%20212.817%2060.1472%20200.748%2059.8459C188.681%2060.1472%20179.519%2059.7606%20175.287%2064.3046C170.753%2068.5366%20171.129%2077.6966%20170.828%2089.7659C170.516%20101.835%20170.9%20110.995%20166.356%20115.227C162.124%20119.771%20152.985%20119.374%20140.905%20119.689C138.873%20119.739%20136.924%20119.771%20135.071%20119.811C119.313%20118.697%20106.337%20112.318%20106.337%2089.7659C106.212%2084.6699%20106.233%2080.1792%20105.807%2076.5206C105.367%2072.8726%20104.492%2070.0379%20102.575%2068.2566C99.0013%2064.4112%2091.2573%2064.7446%2081.0653%2064.4832C70.86%2064.7446%2063.1186%2064.4112%2059.5533%2068.2566C55.708%2071.8299%2056.0306%2079.5632%2055.7693%2089.7659C56.0306%2099.9686%2055.708%20107.702%2059.5533%20111.278C63.1186%20115.113%2070.86%20114.79%2081.0653%20115.049C103.617%20115.049%20109.996%20128.035%20111.1%20143.803C111.068%20145.659%20111.028%20147.587%20110.975%20149.619C111.121%20154.987%20111.121%20159.79%20111.476%20163.835C111.663%20165.95%20111.945%20167.857%20112.404%20169.534C112.412%20169.555%20112.412%20169.566%20112.423%20169.598C112.465%20169.734%20112.497%20169.867%20112.537%20170.003C113.164%20172.099%20114.092%20173.809%20115.447%20175.07C116.665%20176.371%20118.281%20177.278%20120.271%20177.905C120.364%20177.934%20120.46%20177.955%20120.564%20177.987C120.855%20178.081%20121.145%20178.153%20121.439%20178.238C121.46%20178.238%20121.471%20178.238%20121.479%20178.249C122.876%20178.582%20124.42%20178.822%20126.108%20178.987C126.327%20179.009%20126.545%20179.03%20126.764%20179.051C130.788%20179.395%20135.559%20179.395%20140.905%20179.529C152.975%20179.843%20162.124%20179.457%20166.356%20184.001C170.9%20188.233%20170.516%20197.371%20170.828%20209.451C171.129%20221.529%20170.743%20230.681%20175.287%20234.91C179.519%20239.454%20188.681%20239.07%20200.748%20239.371C206.127%20239.235%20210.921%20239.235%20214.975%20238.881C217.079%20238.694%20218.985%20238.403%20220.676%20237.955C220.695%20237.945%20220.705%20237.934%20220.727%20237.934C220.873%20237.891%20220.999%20237.859%20221.135%20237.819C223.228%20237.193%20224.937%20236.265%20226.209%20234.91C227.511%20233.691%20228.409%20232.065%20229.044%20230.097C229.065%20230.003%20229.095%20229.899%20229.127%20229.803V229.793C229.22%20229.513%20229.295%20229.222%20229.367%20228.918C229.367%20228.897%20229.377%20228.897%20229.377%20228.878C229.721%20227.481%20229.951%20225.937%20230.127%20224.249C230.137%20224.03%20230.169%20223.811%20230.191%20223.593C230.535%20219.571%20230.535%20214.798%20230.671%20209.451C230.972%20197.371%20230.585%20188.233%20235.129%20184.001C239.361%20179.457%20248.511%20179.843%20260.591%20179.529C272.66%20179.227%20281.82%20179.614%20286.052%20175.07C290.596%20170.838%20290.209%20161.689%20290.511%20149.619C290.209%20137.539%20290.596%20128.379%20286.052%20124.158Z'%20fill='%23FF356A'%3e%3c/path%3e%3cpath%20d='M112.405%2049.848C112.411%2049.8694%20112.416%2049.8827%20112.421%2049.904C112.461%2050.0427%20112.499%2050.1814%20112.539%2050.3147C113.171%2052.4134%20114.088%2054.1147%20115.448%2055.384C116.661%2056.6907%20118.283%2057.5894%20120.264%2058.2134C120.36%2058.24%20120.464%2058.2694%20120.555%2058.3014C120.56%2058.3067%20120.56%2058.3067%20120.565%2058.3067C120.848%2058.3947%20121.141%2058.4694%20121.443%2058.5467C121.453%2058.5467%20121.464%2058.552%20121.48%2058.5574C122.875%2058.896%20124.424%2059.1334%20126.112%2059.3014C126.325%2059.3227%20126.541%2059.3414%20126.763%2059.3627C130.789%2059.712%20135.56%2059.712%20140.904%2059.8454C152.973%2059.5387%20162.128%2059.928%20166.36%2055.384C170.907%2051.152%20170.515%2041.9947%20170.824%2029.9254C170.517%2017.8507%20170.907%208.69602%20166.363%204.46935C162.131%20-0.0746511%20152.973%200.309349%20140.904%201.52588e-05C128.829%200.309349%20119.675%20-0.0746511%20115.448%204.46935C110.904%208.69602%20111.288%2017.8507%20110.979%2029.9254C111.117%2035.3014%20111.117%2040.1014%20111.472%2044.144C111.661%2046.2614%20111.949%2048.1707%20112.405%2049.848Z'%20fill='%23FF6376'%3e%3c/path%3e%3c/g%3e%3c/svg%3e"),class:"w-4 h-4 my-0",alt:"Infographic"},null,8,T2),o("span",{class:a(["text-sm font-medium font-mono truncate",r.isDark?"text-gray-400":"text-gray-600"])},"Infographic",2)])),t.$slots["header-center"]?(s(),c("div",j2,[q(t.$slots,"header-center",{},void 0,!0)])):r.showModeToggle?(s(),c("div",{key:3,class:a(["flex items-center gap-x-1 rounded-md p-0.5",r.isDark?"bg-gray-700":"bg-gray-100"])},[o("button",{class:a(["px-2.5 py-1 text-xs rounded transition-colors",[w.value?r.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":r.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"]]),onClick:e[0]||(e[0]=()=>e2("preview")),onMouseenter:e[1]||(e[1]=n=>h(n,i(l)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=n=>h(n,i(l)("common.preview")||"Preview")),onMouseleave:d,onBlur:d},[o("div",E2,[e[21]||(e[21]=o("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:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("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"}),o("circle",{cx:"12",cy:"12",r:"3"})])],-1)),o("span",null,z(i(l)("common.preview")||"Preview"),1)])],34),o("button",{class:a(["px-2.5 py-1 text-xs rounded transition-colors",[w.value?r.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":r.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"]]),onClick:e[3]||(e[3]=()=>e2("source")),onMouseenter:e[4]||(e[4]=n=>h(n,i(l)("common.source")||"Source")),onFocus:e[5]||(e[5]=n=>h(n,i(l)("common.source")||"Source")),onMouseleave:d,onBlur:d},[o("div",$2,[e[22]||(e[22]=o("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:"w-3 h-3"},[o("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)),o("span",null,z(i(l)("common.source")||"Source"),1)])],34)],2)):k("",!0),t.$slots["header-right"]?(s(),c("div",z2,[q(t.$slots,"header-right",{},void 0,!0)])):(s(),c("div",L2,[r.showCollapseButton?(s(),c("button",{key:0,class:a(S.value),"aria-pressed":v.value,onClick:e[6]||(e[6]=n=>v.value=!v.value),onMouseenter:e[7]||(e[7]=n=>h(n,v.value?i(l)("common.expand")||"Expand":i(l)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=n=>h(n,v.value?i(l)("common.expand")||"Expand":i(l)("common.collapse")||"Collapse")),onMouseleave:d,onBlur:d},[(s(),c("svg",{style:G({rotate:v.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:"w-3 h-3"},[...e[23]||(e[23]=[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],42,_2)):k("",!0),r.showCopyButton?(s(),c("button",{key:1,class:a(S.value),onClick:i2,onMouseenter:e[9]||(e[9]=n=>W(n)),onFocus:e[10]||(e[10]=n=>W(n)),onMouseleave:d,onBlur:d},[b.value?(s(),c("svg",Z2,[...e[25]||(e[25]=[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(s(),c("svg",P2,[...e[24]||(e[24]=[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),o("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],34)):k("",!0),r.showExportButton?(s(),c("button",{key:2,class:a(`${S.value} ${V.value?"opacity-50 cursor-not-allowed":""}`),disabled:V.value,onClick:s2,onMouseenter:e[11]||(e[11]=n=>h(n,i(l)("common.export")||"Export")),onFocus:e[12]||(e[12]=n=>h(n,i(l)("common.export")||"Export")),onMouseleave:d,onBlur:d},[...e[26]||(e[26]=[o("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:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,I2)):k("",!0),r.showFullscreenButton?(s(),c("button",{key:3,class:a(`${S.value} ${V.value?"opacity-50 cursor-not-allowed":""}`),disabled:V.value,onClick:u2,onMouseenter:e[13]||(e[13]=n=>h(n,p.value?i(l)("common.minimize")||"Minimize":i(l)("common.open")||"Open")),onFocus:e[14]||(e[14]=n=>h(n,p.value?i(l)("common.minimize")||"Minimize":i(l)("common.open")||"Open")),onMouseleave:d,onBlur:d},[p.value?(s(),c("svg",V2,[...e[28]||(e[28]=[o("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)])])):(s(),c("svg",S2,[...e[27]||(e[27]=[o("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,H2)):k("",!0)]))],2)):k("",!0),w2(o("div",null,[w.value?(s(),c("div",{key:0,class:a(["p-4",r.isDark?"bg-gray-900":"bg-gray-50"])},[o("pre",{class:a(["text-sm font-mono whitespace-pre-wrap",r.isDark?"text-gray-300":"text-gray-700"])},z(P.value),3)],2)):(s(),c("div",O2,[r.showZoomControls?(s(),c("div",X2,[o("div",R2,[o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:t2,onMouseenter:e[15]||(e[15]=n=>h(n,i(l)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=n=>h(n,i(l)("common.zoomIn")||"Zoom in")),onMouseleave:d,onBlur:d},[...e[29]||(e[29]=[o("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:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("circle",{cx:"11",cy:"11",r:"8"}),o("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],34),o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:o2,onMouseenter:e[17]||(e[17]=n=>h(n,i(l)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=n=>h(n,i(l)("common.zoomOut")||"Zoom out")),onMouseleave:d,onBlur:d},[...e[30]||(e[30]=[o("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:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("circle",{cx:"11",cy:"11",r:"8"}),o("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],34),o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:n2,onMouseenter:e[19]||(e[19]=n=>h(n,i(l)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=n=>h(n,i(l)("common.resetZoom")||"Reset zoom")),onMouseleave:d,onBlur:d},z(Math.round(100*f.value))+"% ",35)])])):k("",!0),o("div",{class:a(["min-h-[360px] relative transition-all duration-100 overflow-hidden block",r.isDark?"bg-gray-900":"bg-gray-50"]),style:G({height:y.value}),onMousedown:Z,onMousemove:I,onMouseup:T,onMouseleave:T,onTouchstartPassive:Z,onTouchmovePassive:I,onTouchendPassive:T},[o("div",{class:a(["absolute inset-0 cursor-grab",{"cursor-grabbing":F.value}]),style:G(r2.value)},[o("div",{ref_key:"infographicContainer",ref:g,class:"w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],38)]))],512),[[p2,!v.value]]),(s(),m2(k2,{to:"body"},[o("div",Y2,[x2(f2,{name:"infographic-dialog",appear:""},{default:y2(()=>[p.value?(s(),c("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:C2(A,["self"])},[o("div",{class:a(["dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",r.isDark?"bg-gray-900":"bg-white"])},[o("div",N2,[o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:t2},[...e[31]||(e[31]=[o("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:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("circle",{cx:"11",cy:"11",r:"8"}),o("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],2),o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:o2},[...e[32]||(e[32]=[o("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:"w-3 h-3"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("circle",{cx:"11",cy:"11",r:"8"}),o("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],2),o("button",{class:a(["p-2 text-xs rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:n2},z(Math.round(100*f.value))+"% ",3),o("button",{class:a(["inline-flex items-center justify-center p-2 rounded transition-colors",[r.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:A},[...e[33]||(e[33]=[o("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:"w-3 h-3"},[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])],2)]),o("div",{ref_key:"modalContent",ref:M,class:a(["w-full h-full flex items-center justify-center p-4 overflow-hidden",{"cursor-grab":!F.value,"cursor-grabbing":F.value}]),onMousedown:Z,onMousemove:I,onMouseup:T,onMouseleave:T,onTouchstartPassive:Z,onTouchmovePassive:I,onTouchendPassive:T},null,34)],2)])):k("",!0)]),_:1})])]))],2))}}),[["__scopeId","data-v-811a9bef"]]);Q.install=E=>{E.component(Q.__name,Q)};export{Q as default};
@@ -0,0 +1 @@
1
+ import{aP as T,aQ as C,aR as z,aS as R,aT as S,aU as k,aV as V,aW as L,aX as K,aY as j,aZ as ee,a_ as te,a$ as re,b0 as se,b1 as ne,b2 as ie,aE as ae,b3 as oe,b4 as ue,b5 as he,b6 as y,b7 as $,b8 as v}from"./DaWfUpsD.js";import{k as d,g as Y,s as de,e as ce,f as fe,h as ge,j as le,c as be,l as _e,b as pe,m,n as g,r as ye}from"./D0ya9d-G.js";function me(t,e){return t&&T(e,d(e),t)}function je(t,e){return t&&T(e,C(e),t)}function Te(t,e){return T(t,Y(t),e)}var Oe=Object.getOwnPropertySymbols,W=Oe?function(t){for(var e=[];t;)ce(e,Y(t)),t=z(t);return e}:de;function Ee(t,e){return T(t,W(t),e)}function Ae(t){return fe(t,C,W)}var Ce=Object.prototype,Le=Ce.hasOwnProperty;function we(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Le.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Ne(t,e){var r=e?R(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Pe=/\w*$/;function Fe(t){var e=new t.constructor(t.source,Pe.exec(t));return e.lastIndex=t.lastIndex,e}var I=S?S.prototype:void 0,D=I?I.valueOf:void 0;function Se(t){return D?Object(D.call(t)):{}}var $e="[object Boolean]",ve="[object Date]",Ie="[object Map]",De="[object Number]",Me="[object RegExp]",Ue="[object Set]",Ge="[object String]",xe="[object Symbol]",Be="[object ArrayBuffer]",Re="[object DataView]",Ve="[object Float32Array]",Ke="[object Float64Array]",Ye="[object Int8Array]",We="[object Int16Array]",qe="[object Int32Array]",He="[object Uint8Array]",Qe="[object Uint8ClampedArray]",Xe="[object Uint16Array]",Ze="[object Uint32Array]";function Je(t,e,r){var s=t.constructor;switch(e){case Be:return R(t);case $e:case ve:return new s(+t);case Re:return Ne(t,r);case Ve:case Ke:case Ye:case We:case qe:case He:case Qe:case Xe:case Ze:return k(t,r);case Ie:return new s;case De:case Ge:return new s(t);case Me:return Fe(t);case Ue:return new s;case xe:return Se(t)}}var ze="[object Map]";function ke(t){return V(t)&&L(t)==ze}var M=j&&j.isMap,et=M?K(M):ke,tt="[object Set]";function rt(t){return V(t)&&L(t)==tt}var U=j&&j.isSet,st=U?K(U):rt,nt=1,it=2,at=4,q="[object Arguments]",ot="[object Array]",ut="[object Boolean]",ht="[object Date]",dt="[object Error]",H="[object Function]",ct="[object GeneratorFunction]",ft="[object Map]",gt="[object Number]",Q="[object Object]",lt="[object RegExp]",bt="[object Set]",_t="[object String]",pt="[object Symbol]",yt="[object WeakMap]",mt="[object ArrayBuffer]",jt="[object DataView]",Tt="[object Float32Array]",Ot="[object Float64Array]",Et="[object Int8Array]",At="[object Int16Array]",Ct="[object Int32Array]",Lt="[object Uint8Array]",wt="[object Uint8ClampedArray]",Nt="[object Uint16Array]",Pt="[object Uint32Array]",o={};o[q]=o[ot]=o[mt]=o[jt]=o[ut]=o[ht]=o[Tt]=o[Ot]=o[Et]=o[At]=o[Ct]=o[ft]=o[gt]=o[Q]=o[lt]=o[bt]=o[_t]=o[pt]=o[Lt]=o[wt]=o[Nt]=o[Pt]=!0;o[dt]=o[H]=o[yt]=!1;function O(t,e,r,s,n,a){var i,u=e&nt,h=e&it,Z=e&at;if(i!==void 0)return i;if(!ee(t))return t;var w=ae(t);if(w){if(i=we(t),!u)return te(t,i)}else{var b=L(t),N=b==H||b==ct;if(re(t))return se(t,u);if(b==Q||b==q||N&&!n){if(i=h||N?{}:ne(t),!u)return h?Ee(t,je(i,t)):Te(t,me(i,t))}else{if(!o[b])return n?t:{};i=Je(t,b,u)}}a||(a=new ie);var P=a.get(t);if(P)return P;a.set(t,i),st(t)?t.forEach(function(c){i.add(O(c,e,r,c,t,a))}):et(t)&&t.forEach(function(c,f){i.set(f,O(c,e,r,f,t,a))});var J=Z?h?Ae:ge:h?C:d,F=w?void 0:J(t);return le(F||t,function(c,f){F&&(f=c,c=t[f]),oe(i,f,O(c,e,r,f,t,a))}),i}function Ft(t,e){return be(e,function(r){return t[r]})}function E(t){return t==null?[]:Ft(t,d(t))}function _(t){return t===void 0}var St=ue(function(t){return _e(pe(t,1,he,!0))}),$t="\0",l="\0",G="";class X{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=y(void 0),this._defaultEdgeLabelFn=y(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[l]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return $(e)||(e=y(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return d(this._nodes)}sources(){var e=this;return m(this.nodes(),function(r){return v(e._in[r])})}sinks(){var e=this;return m(this.nodes(),function(r){return v(e._out[r])})}setNodes(e,r){var s=arguments,n=this;return g(e,function(a){s.length>1?n.setNode(a,r):n.setNode(a)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=l,this._children[e]={},this._children[l][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],g(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),g(d(this._in[e]),r),delete this._in[e],delete this._preds[e],g(d(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(_(r))r=l;else{r+="";for(var s=r;!_(s);s=this.parent(s))if(s===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==l)return r}}children(e){if(_(e)&&(e=l),this._isCompound){var r=this._children[e];if(r)return d(r)}else{if(e===l)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return d(r)}successors(e){var r=this._sucs[e];if(r)return d(r)}neighbors(e){var r=this.predecessors(e);if(r)return St(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var s=this;g(this._nodes,function(i,u){e(u)&&r.setNode(u,i)}),g(this._edgeObjs,function(i){r.hasNode(i.v)&&r.hasNode(i.w)&&r.setEdge(i,s.edge(i))});var n={};function a(i){var u=s.parent(i);return u===void 0||r.hasNode(u)?(n[i]=u,u):u in n?n[u]:a(u)}return this._isCompound&&g(r.nodes(),function(i){r.setParent(i,a(i))}),r}setDefaultEdgeLabel(e){return $(e)||(e=y(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return E(this._edgeObjs)}setPath(e,r){var s=this,n=arguments;return ye(e,function(a,i){return n.length>1?s.setEdge(a,i,r):s.setEdge(a,i),i}),this}setEdge(){var e,r,s,n,a=!1,i=arguments[0];typeof i=="object"&&i!==null&&"v"in i?(e=i.v,r=i.w,s=i.name,arguments.length===2&&(n=arguments[1],a=!0)):(e=i,r=arguments[1],s=arguments[3],arguments.length>2&&(n=arguments[2],a=!0)),e=""+e,r=""+r,_(s)||(s=""+s);var u=p(this._isDirected,e,r,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,u))return a&&(this._edgeLabels[u]=n),this;if(!_(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[u]=a?n:this._defaultEdgeLabelFn(e,r,s);var h=vt(this._isDirected,e,r,s);return e=h.v,r=h.w,Object.freeze(h),this._edgeObjs[u]=h,x(this._preds[r],e),x(this._sucs[e],r),this._in[r][u]=h,this._out[e][u]=h,this._edgeCount++,this}edge(e,r,s){var n=arguments.length===1?A(this._isDirected,arguments[0]):p(this._isDirected,e,r,s);return this._edgeLabels[n]}hasEdge(e,r,s){var n=arguments.length===1?A(this._isDirected,arguments[0]):p(this._isDirected,e,r,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(e,r,s){var n=arguments.length===1?A(this._isDirected,arguments[0]):p(this._isDirected,e,r,s),a=this._edgeObjs[n];return a&&(e=a.v,r=a.w,delete this._edgeLabels[n],delete this._edgeObjs[n],B(this._preds[r],e),B(this._sucs[e],r),delete this._in[r][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,r){var s=this._in[e];if(s){var n=E(s);return r?m(n,function(a){return a.v===r}):n}}outEdges(e,r){var s=this._out[e];if(s){var n=E(s);return r?m(n,function(a){return a.w===r}):n}}nodeEdges(e,r){var s=this.inEdges(e,r);if(s)return s.concat(this.outEdges(e,r))}}X.prototype._nodeCount=0;X.prototype._edgeCount=0;function x(t,e){t[e]?t[e]++:t[e]=1}function B(t,e){--t[e]||delete t[e]}function p(t,e,r,s){var n=""+e,a=""+r;if(!t&&n>a){var i=n;n=a,a=i}return n+G+a+G+(_(s)?$t:s)}function vt(t,e,r,s){var n=""+e,a=""+r;if(!t&&n>a){var i=n;n=a,a=i}var u={v:n,w:a};return s&&(u.name=s),u}function A(t,e){return p(t,e.v,e.w,e.name)}export{X as G,O as b,_ as i,E as v};
@@ -0,0 +1 @@
1
+ function J(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function j(n,t){if(!isFinite(n)||n===0)return null;var e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"),i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function K(n){return n=j(Math.abs(n)),n?n[1]:NaN}function Q(n,t){return function(e,i){for(var o=e.length,a=[],c=0,h=n[0],M=0;o>0&&h>0&&(M+h+1>i&&(h=Math.max(1,i-M)),a.push(e.substring(o-=h,o+h)),!((M+=h+1)>i));)h=n[c=(c+1)%n.length];return a.reverse().join(t)}}function V(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var W=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $(n){if(!(t=W.exec(n)))throw new Error("invalid format: "+n);var t;return new L({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}$.prototype=L.prototype;function L(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}L.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _(n){n:for(var t=n.length,e=1,i=-1,o;e<t;++e)switch(n[e]){case".":i=o=e;break;case"0":i===0&&(i=e),o=e;break;default:if(!+n[e])break n;i>0&&(i=0);break}return i>0?n.slice(0,i)+n.slice(o+1):n}var N;function v(n,t){var e=j(n,t);if(!e)return N=void 0,n.toPrecision(t);var i=e[0],o=e[1],a=o-(N=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,c=i.length;return a===c?i:a>c?i+new Array(a-c+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+j(n,Math.max(0,t+a-1))[0]}function X(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const O={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:J,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>X(n*100,t),r:X,s:v,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function R(n){return n}var U=Array.prototype.map,Y=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nn(n){var t=n.grouping===void 0||n.thousands===void 0?R:Q(U.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",i=n.currency===void 0?"":n.currency[1]+"",o=n.decimal===void 0?".":n.decimal+"",a=n.numerals===void 0?R:V(U.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",h=n.minus===void 0?"−":n.minus+"",M=n.nan===void 0?"NaN":n.nan+"";function T(f,g){f=$(f);var b=f.fill,p=f.align,m=f.sign,w=f.symbol,S=f.zero,E=f.width,F=f.comma,y=f.precision,C=f.trim,d=f.type;d==="n"?(F=!0,d="g"):O[d]||(y===void 0&&(y=12),C=!0,d="g"),(S||b==="0"&&p==="=")&&(S=!0,b="0",p="=");var q=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?e:w==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():""),B=(w==="$"?i:/[%p]/.test(d)?c:"")+(g&&g.suffix!==void 0?g.suffix:""),D=O[d],H=/[defgprs%]/.test(d);y=y===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function G(r){var l=q,u=B,x,I,k;if(d==="c")u=D(r)+u,r="";else{r=+r;var P=r<0||1/r<0;if(r=isNaN(r)?M:D(Math.abs(r),y),C&&(r=_(r)),P&&+r==0&&m!=="+"&&(P=!1),l=(P?m==="("?m:h:m==="-"||m==="("?"":m)+l,u=(d==="s"&&!isNaN(r)&&N!==void 0?Y[8+N/3]:"")+u+(P&&m==="("?")":""),H){for(x=-1,I=r.length;++x<I;)if(k=r.charCodeAt(x),48>k||k>57){u=(k===46?o+r.slice(x+1):r.slice(x))+u,r=r.slice(0,x);break}}}F&&!S&&(r=t(r,1/0));var z=l.length+r.length+u.length,s=z<E?new Array(E-z+1).join(b):"";switch(F&&S&&(r=t(s+r,s.length?E-u.length:1/0),s=""),p){case"<":r=l+r+u+s;break;case"=":r=l+s+r+u;break;case"^":r=s.slice(0,z=s.length>>1)+l+r+u+s.slice(z);break;default:r=s+l+r+u;break}return a(r)}return G.toString=function(){return f+""},G}function Z(f,g){var b=Math.max(-8,Math.min(8,Math.floor(K(g)/3)))*3,p=Math.pow(10,-b),m=T((f=$(f),f.type="f",f),{suffix:Y[8+b/3]});return function(w){return m(p*w)}}return{format:T,formatPrefix:Z}}var A,tn,rn;en({thousands:",",grouping:[3],currency:["$",""]});function en(n){return A=nn(n),tn=A.format,rn=A.formatPrefix,A}export{rn as a,tn as b,K as e,$ as f};