@moonshot-ai/kimi-code 0.19.0 → 0.19.2
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.
- package/dist/main.mjs +1478 -791
- package/dist-web/assets/CodeBlockNode-DWqdMrZf.js +22 -0
- package/dist-web/assets/{CodeBlockShell.vue_vue_type_style_index_0_lang-DCpGDnBA.js → CodeBlockShell.vue_vue_type_style_index_0_lang-CP8vJ_jY.js} +1 -1
- package/dist-web/assets/{Tooltip-LgIwf1MF.js → Tooltip-DnT9F5O4.js} +1 -1
- package/dist-web/assets/arc-BTqlVy62.js +1 -0
- package/dist-web/assets/{architectureDiagram-3BPJPVTR-04vShicj.js → architectureDiagram-3BPJPVTR-DOs258PA.js} +1 -1
- package/dist-web/assets/{blockDiagram-GPEHLZMM-ZXXjkQDj.js → blockDiagram-GPEHLZMM-YpbL-evQ.js} +1 -1
- package/dist-web/assets/{c4Diagram-AAUBKEIU-jwIjAMhy.js → c4Diagram-AAUBKEIU-BQ0g7h08.js} +1 -1
- package/dist-web/assets/channel-C9wJxpza.js +1 -0
- package/dist-web/assets/{chunk-2J33WTMH-B9WYpP0t.js → chunk-2J33WTMH-nYkFiTji.js} +1 -1
- package/dist-web/assets/{chunk-4BX2VUAB-CsLa1hKW.js → chunk-4BX2VUAB-CsmhqO62.js} +1 -1
- package/dist-web/assets/{chunk-55IACEB6-lg2y1z6m.js → chunk-55IACEB6-CUzTYEsP.js} +1 -1
- package/dist-web/assets/{chunk-727SXJPM-kSXB7Ee2.js → chunk-727SXJPM-BnqEbbXJ.js} +2 -2
- package/dist-web/assets/{chunk-AQP2D5EJ-OzWWS2zu.js → chunk-AQP2D5EJ-DtZARgEl.js} +1 -1
- package/dist-web/assets/{chunk-FMBD7UC4-BnloGzDy.js → chunk-FMBD7UC4-R7lWfBOs.js} +1 -1
- package/dist-web/assets/{chunk-ND2GUHAM-DQ96qEVb.js → chunk-ND2GUHAM-CZaX1ZXe.js} +1 -1
- package/dist-web/assets/{chunk-QZHKN3VN-CnmjyYEF.js → chunk-QZHKN3VN-5MXrqfJe.js} +1 -1
- package/dist-web/assets/classDiagram-4FO5ZUOK-DqgKlhvP.js +1 -0
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-DqgKlhvP.js +1 -0
- package/dist-web/assets/{cose-bilkent-S5V4N54A-Ca5pGblJ.js → cose-bilkent-S5V4N54A-4f-2zAe6.js} +1 -1
- package/dist-web/assets/{dagre-BM42HDAG-Uh1RPvzw.js → dagre-BM42HDAG-B29IUQLO.js} +1 -1
- package/dist-web/assets/{diagram-2AECGRRQ-BGLdrxMz.js → diagram-2AECGRRQ-BLG8l-kW.js} +1 -1
- package/dist-web/assets/{diagram-5GNKFQAL-dJHq2s9o.js → diagram-5GNKFQAL-D49xpQ0V.js} +1 -1
- package/dist-web/assets/{diagram-KO2AKTUF-Dx74xqL0.js → diagram-KO2AKTUF-CWBzbQ3X.js} +1 -1
- package/dist-web/assets/{diagram-LMA3HP47-D70lxzjc.js → diagram-LMA3HP47-CAcmX_XH.js} +1 -1
- package/dist-web/assets/{diagram-OG6HWLK6-BTNo7COP.js → diagram-OG6HWLK6-BInwpJw8.js} +1 -1
- package/dist-web/assets/{erDiagram-TEJ5UH35-B_7lnLw9.js → erDiagram-TEJ5UH35-Dckcr1cP.js} +1 -1
- package/dist-web/assets/{flowDiagram-I6XJVG4X-CwfNwpue.js → flowDiagram-I6XJVG4X-CjWyYa_0.js} +1 -1
- package/dist-web/assets/{ganttDiagram-6RSMTGT7-BAQE1PPR.js → ganttDiagram-6RSMTGT7-B8-b8RY7.js} +1 -1
- package/dist-web/assets/{gitGraphDiagram-PVQCEYII-DjP3_pYV.js → gitGraphDiagram-PVQCEYII-DF8nQ36i.js} +1 -1
- package/dist-web/assets/index-CKGltB1b.js +9 -0
- package/dist-web/assets/index-Cm9Q4xVi.js +3 -0
- package/dist-web/assets/index-DSjuug95.js +272 -0
- package/dist-web/assets/{index-Cny4-3BH.js → index-Zbw78XRh.js} +1 -1
- package/dist-web/assets/index-sXB6HLvC.css +1 -0
- package/dist-web/assets/{index10-ba-WIDTg.js → index10-Dh4SYXXK.js} +2 -2
- package/dist-web/assets/index11-BIywvtHR.js +9 -0
- package/dist-web/assets/{index5-Bm0FC7PH.js → index5-C_80WRqf.js} +1 -1
- package/dist-web/assets/{index6-CvXSHsNA.js → index6-kJ6dO27T.js} +1 -1
- package/dist-web/assets/{index7-wMYBQdIV.js → index7-Zg1vvU3j.js} +1 -1
- package/dist-web/assets/index8-Bqtk0wsj.js +2 -0
- package/dist-web/assets/{infoDiagram-5YYISTIA-GLnQZOdj.js → infoDiagram-5YYISTIA-m1Ft7ptD.js} +1 -1
- package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-BTzUsMXy.js → ishikawaDiagram-YF4QCWOH-Cqe15rN3.js} +1 -1
- package/dist-web/assets/{journeyDiagram-JHISSGLW-DftCk-C3.js → journeyDiagram-JHISSGLW-2vdQK870.js} +1 -1
- package/dist-web/assets/{kanban-definition-UN3LZRKU-bJiUlhIE.js → kanban-definition-UN3LZRKU-DWcbYK3Y.js} +1 -1
- package/dist-web/assets/{linear-BhksDCJ0.js → linear-DEB4_JxQ.js} +1 -1
- package/dist-web/assets/{mermaid.core-DiVTz3xq.js → mermaid.core-Bo4PXwhd.js} +5 -5
- package/dist-web/assets/{mindmap-definition-RKZ34NQL-3nTQ_Edv.js → mindmap-definition-RKZ34NQL-xhnv3DGe.js} +1 -1
- package/dist-web/assets/{pieDiagram-4H26LBE5-CzfXAqfK.js → pieDiagram-4H26LBE5-Kf-4wCvB.js} +2 -2
- package/dist-web/assets/{quadrantDiagram-W4KKPZXB-Be7SO8y7.js → quadrantDiagram-W4KKPZXB-CoEDvyN3.js} +1 -1
- package/dist-web/assets/{requirementDiagram-4Y6WPE33-BBr4uS0C.js → requirementDiagram-4Y6WPE33-C02xoAKl.js} +1 -1
- package/dist-web/assets/{sankeyDiagram-5OEKKPKP-Bp5HEQ3a.js → sankeyDiagram-5OEKKPKP-Cta2--lY.js} +1 -1
- package/dist-web/assets/{sequenceDiagram-3UESZ5HK-d5x9oqBR.js → sequenceDiagram-3UESZ5HK-BGHuv-fJ.js} +1 -1
- package/dist-web/assets/{stateDiagram-AJRCARHV-Hpws1aXz.js → stateDiagram-AJRCARHV-CvYSand1.js} +1 -1
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-CvSckOje.js +1 -0
- package/dist-web/assets/{timeline-definition-PNZ67QCA-CatOuZH5.js → timeline-definition-PNZ67QCA-Puu2_su-.js} +1 -1
- package/dist-web/assets/{vennDiagram-CIIHVFJN-Dmka7FWx.js → vennDiagram-CIIHVFJN-C5KnFfg1.js} +1 -1
- package/dist-web/assets/{vue.runtime.esm-bundler-z5b-tezL.js → vue.runtime.esm-bundler-Cqjpm82Q.js} +1 -1
- package/dist-web/assets/{wardley-L42UT6IY-B-DhFMCA.js → wardley-L42UT6IY-B56jdDEk.js} +1 -1
- package/dist-web/assets/{wardleyDiagram-YWT4CUSO-Dn3fIGpK.js → wardleyDiagram-YWT4CUSO-C5uByZfn.js} +1 -1
- package/dist-web/assets/{xychartDiagram-2RQKCTM6-BKssF4ms.js → xychartDiagram-2RQKCTM6-NW-h6Ru2.js} +1 -1
- package/dist-web/index.html +2 -2
- package/package.json +5 -5
- package/dist-web/assets/CodeBlockNode-B26hAEdG.js +0 -22
- package/dist-web/assets/arc-DZyzZen-.js +0 -1
- package/dist-web/assets/channel-CR6L61dF.js +0 -1
- package/dist-web/assets/classDiagram-4FO5ZUOK-BMLEGIwT.js +0 -1
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-BMLEGIwT.js +0 -1
- package/dist-web/assets/index-BiWo3nMo.css +0 -1
- package/dist-web/assets/index-CXZzzXGH.js +0 -9
- package/dist-web/assets/index-KEPtQokk.js +0 -268
- package/dist-web/assets/index11-zgOWkVRq.js +0 -9
- package/dist-web/assets/index8-RFRS9KOv.js +0 -2
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-CHpe74LW.js +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-DiVTz3xq.js","assets/index-KEPtQokk.js","assets/index-BiWo3nMo.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{bR as Bn,bQ as On,M as En,c0 as Sn,bT as Dn,bl as $n,af as zn,bZ as jn,aU as p,bE as R,az as Fn,c2 as Kt,aD as An,as as H,aI as Ln,aL as M,u as T,aY as kt,v as i,bk as k,bb as Le,au as te,t as ie,aw as bt,bL as Rn,bB as Hn,ar as Qt,bd as en,s as In,I as _n,bJ as Nn,bO as Xn,g as Yn,T as qn,q as $,c6 as tn,c9 as xt,ch as Vn,ci as Wn,cj as nn,ck as Zn,b$ as Un}from"./index-KEPtQokk.js";import{i as Mt}from"./safeRaf-DGuzXxDK.js";var Gn=Object.defineProperty,Jn=Object.defineProperties,Kn=Object.getOwnPropertyDescriptors,ln=Object.getOwnPropertySymbols,Qn=Object.prototype.hasOwnProperty,el=Object.prototype.propertyIsEnumerable,rn=(s,u,c)=>u in s?Gn(s,u,{enumerable:!0,configurable:!0,writable:!0,value:c}):s[u]=c,dn=(s,u)=>{for(var c in u||(u={}))Qn.call(u,c)&&rn(s,c,u[c]);if(ln)for(var c of ln(u))el.call(u,c)&&rn(s,c,u[c]);return s},Pt=(s,u,c)=>new Promise((y,a)=>{var V=E=>{try{x(c.next(E))}catch(I){a(I)}},he=E=>{try{x(c.throw(E))}catch(I){a(I)}},x=E=>E.done?y(E.value):Promise.resolve(E.value).then(V,he);x((c=c.apply(s,u)).next())});const vn=()=>Bn(()=>import("./mermaid.core-DiVTz3xq.js").then(s=>s.bn),__vite__mapDeps([0,1,2]));let ue=null,mn=vn;function tl(){return typeof mn=="function"}function on(s){if(!s)return s;const u=s&&s.default?s.default:s;if(u&&(typeof u.render=="function"||typeof u.parse=="function"||typeof u.initialize=="function"))return u;if(u&&u.mermaidAPI&&(typeof u.mermaidAPI.render=="function"||typeof u.mermaidAPI.parse=="function")){const a=u.mermaidAPI;return c=dn({},u),y={render:a.render.bind(a),parse:a.parse?a.parse.bind(a):void 0,initialize:V=>typeof u.initialize=="function"?u.initialize(V):a.initialize?a.initialize(V):void 0},Jn(c,Kn(y))}var c,y;return s.mermaid&&typeof s.mermaid.render=="function"?s.mermaid:u}function an(s){if(s)try{const u=s?.initialize;s.initialize=c=>{const y=dn({suppressErrorRendering:!0},c||{});return typeof u=="function"?u.call(s,y):s?.mermaidAPI&&typeof s.mermaidAPI.initialize=="function"?s.mermaidAPI.initialize(y):void 0}}catch{}}function nl(){return Pt(this,null,function*(){if(ue)return ue;const s=(function(){try{const y=globalThis;return on(y?.mermaid)}catch{return null}})();if(s)return ue=s,an(ue),ue;const u=mn;if(!u)return null;let c;try{c=yield u()}catch(y){throw u===vn?new Error('Optional dependency "mermaid" is not installed. Please install it to enable mermaid diagrams.'):y}return c?(ue=on(c),an(ue),ue):null})}let Te=null;const ll="MERMAID_DISABLED";function fn(s,u,c=1400){if(!tl()){const y=new Error("Mermaid rendering disabled");return y.name="MermaidDisabled",y.code=ll,Promise.reject(y)}return Te||(Te=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Te.name="WorkerInitError",Te.code="WORKER_INIT_ERROR"),Promise.reject(Te)}function rl(s,u,c=1400){return Pt(this,null,function*(){try{return yield fn("canParse",{code:s,theme:u},c)}catch(y){return Promise.reject(y)}})}function ol(s,u,c=1400){return Pt(this,null,function*(){try{return yield fn("findPrefix",{code:s,theme:u},c)}catch(y){return Promise.reject(y)}})}var al=Object.defineProperty,il=Object.defineProperties,ul=Object.getOwnPropertyDescriptors,un=Object.getOwnPropertySymbols,sl=Object.prototype.hasOwnProperty,cl=Object.prototype.propertyIsEnumerable,sn=(s,u,c)=>u in s?al(s,u,{enumerable:!0,configurable:!0,writable:!0,value:c}):s[u]=c,cn=(s,u)=>{for(var c in u||(u={}))sl.call(u,c)&&sn(s,c,u[c]);if(un)for(var c of un(u))cl.call(u,c)&&sn(s,c,u[c]);return s},O=(s,u,c)=>new Promise((y,a)=>{var V=E=>{try{x(c.next(E))}catch(I){a(I)}},he=E=>{try{x(c.throw(E))}catch(I){a(I)}},x=E=>E.done?y(E.value):Promise.resolve(E.value).then(V,he);x((c=c.apply(s,u)).next())});const dl=["data-markstream-mode","data-markstream-pending"],vl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},ml={key:0},fl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},hl=["innerHTML"],pl={key:2},gl={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},wl={class:"flex items-center gap-x-1"},yl={class:"flex items-center gap-x-1"},kl={key:4},bl={key:5,class:"mermaid-header-actions flex items-center"},xl=["aria-pressed"],Ml={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Pl=["aria-label","disabled"],Cl=["aria-label","disabled"],Bl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Ol={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},El={key:0,class:"mermaid-source-panel"},Sl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Dl={key:1,class:"relative"},$l={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},zl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},jl={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Fl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},at="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",Tt=On(En({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(s,{emit:u}){var c,y;const a=s,V=u,he={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},x=p(!1),E=p(typeof window>"u"),I=$(()=>a.isStrict?"strict":"loose"),hn=$(()=>({startOnLoad:!1,securityLevel:I.value,dompurifyConfig:I.value==="strict"?he:void 0,flowchart:I.value==="strict"?{htmlLabels:!1}:void 0}));function se(t){if(t)try{t.replaceChildren()}catch{t.innerHTML=""}}function pe(t,e,n={}){if(!t)return null;const l=(function(r,o){if(!r)return null;const f=Zn(o);if(!f)return null;const v=(function(g,d){const h=Array.from(g.childNodes),B=document.createElement("div");return B.dataset.mermaidSvgLayer="1",B.style.zIndex="1",B.appendChild(d),g.insertBefore(B,g.firstChild),h.length>0&&(function(Q){const ee=()=>{var Me;for(const ot of Q)(Me=ot.parentNode)==null||Me.removeChild(ot)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(ee)}):setTimeout(ee,32)})(h),B})(r,f);return{svg:f.outerHTML,bindTarget:v}})(t,e);return l||n.keepPreviousOnFailure||se(t),l}let ne=null;function ce(t){if(a.enableMermaidInteractions&&t?.querySelector("svg"))try{ne?.(t)}catch{}}const{t:w}=Sn();function Re(){return O(this,null,function*(){try{const t=yield nl();return x.value=!!t,t}catch(t){throw x.value=!1,t}finally{E.value=!0}})}const He=p(!1),N=p(!1),it=p(),X=p(),m=p(),le=p(),Ie=p(null),pn=Dn(),Pe=p(null),Ce=p(typeof window>"u"),gn=$n(),W=zn(jn,null);let re="",de=0,_e=0;const Ct=$(()=>Un(a,gn));function ut(){const t=Ct.value;t&&(re&&re!==t&&(W?.markSettled(re),de=0),re=t,de+=1,_e+=1,de===1&&W?.markPending(t))}function st(){return O(this,null,function*(){const t=re;if(!t||(de=Math.max(0,de-1),de>0))return;re="";const e=++_e;yield H(),e===_e&&((function(n=Ct.value){n&&it.value&&W?.reportHeight(n,it.value.offsetHeight)})(t),W?.markSettled(t))})}function Bt(){const t=re;t&&(re="",de=0,_e+=1,W?.markSettled(t))}const Ot=p(),z=$(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Et(){var t;return(function(e){const n=(function(){var r;const o=X.value?getComputedStyle(X.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return(r=xt(o))!=null?r:360})(),l=Nt();return Vn(e,n,l)})((t=xt(a.estimatedPreviewHeightPx))!=null?t:Wn(z.value))}function St(){return`${Et()}px`}const ge=p(null);function ct(){var t;return!!((t=m.value)!=null&&t.querySelector("svg"))}function Dt(){return a.loading!==!1&&(ct()||!!ge.value)}const P=p(1),F=p(0),A=p(0),Ne=p(!1),Xe=p({x:0,y:0}),b=p(!0),Ye=p(!1),G=p(!1),Be=p(null),qe=p(0),dt=p(!1),wn=$(()=>{var t;return Math.max(0,(t=a.renderDebounceMs)!=null?t:300)}),yn=$(()=>{var t;return Math.max(0,(t=a.contentStableDelayMs)!=null?t:500)}),Oe=$(()=>{var t;return Math.max(120,(t=a.previewPollDelayMs)!=null?t:800)}),kn=$(()=>{var t;return Math.max(Oe.value,(t=a.previewPollMaxDelayMs)!=null?t:4e3)}),$t=$(()=>{var t;return Math.max(1,Math.trunc((t=a.previewPollMaxAttempts)!=null?t:12))}),oe=$(()=>a.loading!==!1);let Ee=null,Se=null,De=null,$e=0;const zt=(c=globalThis.requestIdleCallback)!=null?c:(t,e)=>setTimeout(()=>t({didTimeout:!0}),16);function Y(){return Ce.value&&!N.value}function Ve(){De!=null&&(globalThis.clearTimeout(De),De=null)}function ze(){Ve(),De=globalThis.setTimeout(()=>{De=null,Y()&&zt(()=>{Y()&&Gt()},{timeout:500})},wn.value)}function je(){Se!=null&&(globalThis.clearTimeout(Se),Se=null)}function jt(t=600){if(typeof globalThis>"u")return;const e=Math.max(0,t);je(),Se=globalThis.setTimeout(()=>{Se=null,a.loading||G.value||!Y()?jt(Math.min(1200,Math.max(300,1.2*e))):ze()},e)}const _=p(St()),We=p(_.value);let we=null;const C=p(!1),ve=p(!1),ae=p({}),J=p(""),vt=p(0);let q=null;const L=p(!1),bn=$(()=>{var t,e;return!(N.value||E.value&&(b.value||!G.value&&!Be.value&&(C.value||L.value&&((e=(t=m.value)==null?void 0:t.textContent)!=null&&e.trim()))))}),me=p({zoom:1,translateX:0,translateY:0,containerHeight:_.value}),Ft=$(()=>a.enableWheelZoom?{wheel:Mn}:{}),K=$(()=>{var t,e,n,l;return{worker:(t=a.workerTimeoutMs)!=null?t:1400,parse:(e=a.parseTimeoutMs)!=null?e:1800,render:(n=a.renderTimeoutMs)!=null?n:2500,fullRender:(l=a.fullRenderTimeoutMs)!=null?l:4e3}}),xn=(y=globalThis.cancelIdleCallback)!=null?y:t=>clearTimeout(t);let ye=null,Ze=null,ke=!1,fe=Oe.value,Z=null,Ue=0,mt=!0,Ge=0;function Je(t,e){const n=e?.timeoutMs,l=e?.signal;if(l?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,o=!1,f=null;return new Promise((v,g)=>{const d=()=>{r!=null&&clearTimeout(r),f&&l&&l.removeEventListener("abort",f)};n&&n>0&&(r=globalThis.setTimeout(()=>{o||(o=!0,d(),g(new Error("Operation timed out")))},n)),l&&(f=()=>{o||(o=!0,d(),g(new DOMException("Aborted","AbortError")))},l.addEventListener("abort",f)),t().then(h=>{o||(o=!0,d(),v(h))}).catch(h=>{o||(o=!0,d(),g(h))})})}function At(t){if(typeof document>"u"||!m.value)return;if(typeof a.onRenderError=="function"&&a.onRenderError(t,z.value,m.value)===!0)return L.value=!0,void j();const e=document.createElement("div");e.style.padding="var(--ms-inset-panel-body)",e.style.color="hsl(var(--ms-destructive))",e.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=t instanceof Error?t.message:"Unknown error",e.appendChild(n),se(m.value),m.value.appendChild(e);const l=m.value?getComputedStyle(m.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";_.value=l||"360px",We.value=_.value,L.value=!0,j()}typeof window<"u"&&R(()=>X.value,t=>{var e;if((e=Pe.value)==null||e.destroy(),Pe.value=null,!t)return void(Ce.value=!1);const n=pn(t,{rootMargin:"400px"});Pe.value=n,Ce.value=n.isVisible.value,n.whenVisible.then(()=>{Ce.value=!0})},{immediate:!0}),Fn(()=>{var t;(t=Pe.value)==null||t.destroy(),Pe.value=null,Bt(),Ve()});const Ke=$(()=>a.showTooltips!==!1);function Lt(t){return!t||t.disabled}function D(t,e,n="top"){if(!Ke.value||Lt(t.currentTarget))return;const l=t,r=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;tn(t.currentTarget,e,n,!1,r,a.isDark)}function S(){Ke.value&&Kt()}function Rt(t){if(!Ke.value||Lt(t.currentTarget))return;const e=He.value?w("common.copied")||"Copied":w("common.copy")||"Copy",n=t,l=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;tn(t.currentTarget,e,"top",!1,l,a.isDark)}function Ht(t,e){const n={theme:e==="dark"?"dark":"default"};I.value==="strict"&&(n.flowchart={htmlLabels:!1});const l=`%%{init: ${JSON.stringify(n)}}%%
|
|
3
|
-
`;return t.trimStart().startsWith("%%{")?t:l+t}function ft(){return mt&&!b.value&&!C.value&&!L.value}function It(t){const e=t.trim();return!(!e||e.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(e)&&e.includes(":")}function ht(t){if(nn(t)==="gantt")return(function(n){var l;const r=n.split(/\r?\n/);for(!/\r?\n$/.test(n)&&r.length>0&&r.pop();r.length>0;){const o=(l=r[r.length-1])==null?void 0:l.trim();if(o&&!o.startsWith("%%")){if(It(o))break;r.pop()}else r.pop()}return r.some(It)?r.join(`
|
|
4
|
-
`):""})(t);const e=t.split(/\r?\n/);for(;e.length>0;){const n=e[e.length-1].trimEnd();if(n!==""){if(!(/^[-=~>|<\s]+$/.test(n.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(n)||/[-|><]$/.test(n)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(n)))break;e.pop()}else e.pop()}return e.join(`
|
|
5
|
-
`)}function Qe(t,e,n){return O(this,null,function*(){var l;try{return yield rl(t,e,(l=n?.timeoutMs)!=null?l:K.value.worker)}catch{return yield(function(o,f,v){return O(this,null,function*(){var g,d;const h=yield Re();if(!h)return;const B=h,Q=Ht(o,f);if(typeof B.parse=="function")return yield Je(()=>B.parse(Q),{timeoutMs:(g=v?.timeoutMs)!=null?g:K.value.parse,signal:v?.signal}),!0;const ee=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return yield Je(()=>h.render(ee,Q),{timeoutMs:(d=v?.timeoutMs)!=null?d:K.value.render,signal:v?.signal}),!0})})(t,e,n)}})}function _t(t,e,n){return O(this,null,function*(){var l;if(nn(t)==="gantt"){const o=ht(t);if(!o.trim())return{fullOk:!1,prefixOk:!1};try{if(yield Qe(o,e,n))return o===t?{fullOk:!0,prefixOk:!1}:{fullOk:!1,prefixOk:!0,prefix:o}}catch(f){if(f?.name==="AbortError")throw f}return{fullOk:!1,prefixOk:!1}}try{if(yield Qe(t,e,n))return{fullOk:!0,prefixOk:!1}}catch(o){if(o?.name==="AbortError")throw o}let r=ht(t);if(r&&r.trim()&&r!==t)try{try{const o=yield ol(t,e,(l=n?.timeoutMs)!=null?l:K.value.worker);o&&o.trim()&&(r=o)}catch{}if(yield Qe(r,e,n))return{fullOk:!1,prefixOk:!0,prefix:r}}catch(o){if(o?.name==="AbortError")throw o}return{fullOk:!1,prefixOk:!1}})}const et=$(()=>b.value||G.value||N.value);function Nt(){if(a.maxHeight==="none")return null;if(a.maxHeight!=null){const e=Number.parseFloat(String(a.maxHeight));if(Number.isFinite(e))return e}const t=X.value;if(t){const e=getComputedStyle(t).getPropertyValue("--ms-size-code-max-height").trim(),n=Number.parseFloat(e);if(Number.isFinite(n))return n}return 500}function Fe(t,e){if(!X.value||!m.value)return;const n=!e?.force&&a.loading!==!1&&ct(),l=m.value.querySelector("svg");if(!l)return;let r=0,o=0;const f=l.getAttribute("viewBox"),v=l.getAttribute("width"),g=l.getAttribute("height");if(f){const d=f.split(" ");d.length===4&&(r=Number.parseFloat(d[2]),o=Number.parseFloat(d[3]))}if(r&&o||v&&g&&(r=Number.parseFloat(v),o=Number.parseFloat(g)),Number.isNaN(r)||Number.isNaN(o)||r<=0||o<=0)try{const d=l.getBBox();d&&d.width>0&&d.height>0&&(r=d.width,o=d.height)}catch(d){return void console.error("Failed to get SVG BBox:",d)}if(r>0&&o>0){const d=o/r,h=t??X.value.clientWidth,B=l.getBoundingClientRect().width,Q=B>0?B:h,ee=Nt(),Me=Q*d,ot=ee==null?Me:Math.min(Me,ee),Jt=Math.max(ot,Et());We.value=`${Math.max(Me,Jt)}px`,n||xt(a.estimatedPreviewHeightPx)!=null||(_.value=`${Jt}px`)}}const U=p(!1),pt=$(()=>({transform:`translate(${F.value}px, ${A.value}px) scale(${P.value})`}));function Xt(t){t.key==="Escape"&&U.value&&wt()}function gt(){var t;if(!X.value||!le.value)return!1;if(((t=le.value.firstElementChild)==null?void 0:t.getAttribute("data-mermaid-modal-clone"))==="1")return!0;const e=X.value.cloneNode(!0);e.dataset.mermaidModalClone="1",e.classList.add("fullscreen"),e.style.height="100%",e.style.maxHeight="100%";const n=e.querySelector("[data-mermaid-wrapper]");return n&&(Ie.value=n,n.style.transform=pt.value.transform),se(le.value),le.value.appendChild(e),ce(e),!0}function wt(){if(U.value=!1,le.value&&se(le.value),Ie.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",Xt)}catch{}}function Yt(){P.value<3&&(P.value+=.1)}function qt(){P.value>.5&&(P.value-=.1)}function Vt(){P.value=1,F.value=0,A.value=0}function tt(t){Ne.value=!0,t instanceof MouseEvent?Xe.value={x:t.clientX-F.value,y:t.clientY-A.value}:Xe.value={x:t.touches[0].clientX-F.value,y:t.touches[0].clientY-A.value}}function nt(t){if(!Ne.value)return;let e,n;t instanceof MouseEvent?(e=t.clientX,n=t.clientY):(e=t.touches[0].clientX,n=t.touches[0].clientY),F.value=e-Xe.value.x,A.value=n-Xe.value.y}function be(){Ne.value=!1}function Mn(t){if(a.enableWheelZoom&&(t.ctrlKey||t.metaKey)){if(t.preventDefault(),!X.value)return;const e=X.value.getBoundingClientRect(),n=t.clientX-e.left,l=t.clientY-e.top,r=n-e.width/2,o=l-e.height/2,f=(r-F.value)/P.value,v=(o-A.value)/P.value,g=.01,d=-t.deltaY*g,h=Math.min(Math.max(P.value+d,.5),3);h!==P.value&&(F.value=r-f*h,A.value=o-v*h,P.value=h)}}function Tn(){return O(this,null,function*(){try{const t=z.value,e={payload:{type:"copy",text:t},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(V("copy",e),e.defaultPrevented)return;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),He.value=!0,setTimeout(()=>{He.value=!1},1e3)}catch(t){console.error("Failed to copy:",t)}})}function Pn(){var t;const e=(t=m.value)==null?void 0:t.querySelector("svg");if(!e)return void console.error("SVG element not found");const n=new XMLSerializer().serializeToString(e),l={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:e,svgString:n};V("export",l),l.defaultPrevented||(function(r,o=null){O(this,null,function*(){try{const f=o??new XMLSerializer().serializeToString(r),v=new Blob([f],{type:"image/svg+xml;charset=utf-8"}),g=URL.createObjectURL(v);if(typeof document<"u"){const d=document.createElement("a");d.href=g,d.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(d),d.click(),document.body.removeChild(d)}catch{}URL.revokeObjectURL(g)}}catch(f){console.error("Failed to export SVG:",f)}})})(e,n)}function Cn(){var t,e;const n=(e=(t=m.value)==null?void 0:t.querySelector("svg"))!=null?e:null,l=n?new XMLSerializer().serializeToString(n):null,r={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:n,svgString:l};V("openModal",r),r.defaultPrevented||(function(){if(U.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",Xt)}catch{}H(()=>{gt()||H(gt)})})()}function Wt(t){const e={payload:{type:"toggle-mode",target:t},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};V("toggleMode",t,e),e.defaultPrevented||Zt(t)}function Zt(t){return O(this,null,function*(){const e=Ot.value;if(!e)return Ye.value=!0,void(b.value=t==="source");const n=e.getBoundingClientRect().height;e.style.height=`${n}px`,e.style.overflow="hidden",Ye.value=!0,b.value=t==="source",yield H();const l=e.scrollHeight;e.style.transition="height var(--ms-duration-standard) var(--ms-ease-standard)",e.offsetHeight,e.style.height=`${l}px`;const r=()=>{e.style.transition="",e.style.height="",e.style.overflow="",e.removeEventListener("transitionend",o)};function o(){r()}e.addEventListener("transitionend",o),setTimeout(()=>r(),220)})}function Ae(){return O(this,null,function*(){return G.value?Be.value:m.value||(yield H(),m.value)?(G.value=!0,ut(),Be.value=O(null,null,function*(){var t,e,n,l;try{const r=yield Re();if(!r)return;const o=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;C.value||ve.value||(t=r.initialize)==null||t.call(r,(n=cn({},hn.value),l={dompurifyConfig:cn({},he)},il(n,ul(l))));const f=(function(d,h=z.value){const B=h,Q={theme:d==="dark"?"dark":"default"};I.value==="strict"&&(Q.flowchart={htmlLabels:!1});const ee=`%%{init: ${JSON.stringify(Q)}}%%
|
|
6
|
-
`;return B.trim().startsWith("%%{")?B:ee+B})(a.isDark?"dark":"light"),v=yield Je(()=>r.render(o,f),{timeoutMs:K.value.fullRender}),g=v?.svg;if(m.value){const d=pe(m.value,g,{keepPreviousOnFailure:a.loading!==!1});if(!d)return ve.value&&(ve.value=!1),!1;const h=(e=v?.bindFunctions)!=null?e:null;ne=h,ce(d.bindTarget),C.value||ve.value||(Mt(()=>Fe()),C.value=!0,me.value={zoom:P.value,translateX:F.value,translateY:A.value,containerHeight:_.value});const B=a.isDark?"dark":"light";d&&(ae.value[B]={svg:d.svg,bindFunctions:h}),ve.value&&(ve.value=!1),L.value=!1,$e=0,je()}return!0}catch(r){const o=(function(v){const g=typeof v=="string"?v:typeof v?.message=="string"?v.message:"";return typeof g=="string"&&/timed out/i.test(g)})(r),f=$e+1;return o&&f<=3?($e=f,jt(Math.min(1200,600*f))):($e=0,je(),a.loading===!1&&console.error("Failed to render mermaid diagram:",r),a.loading===!1&&At(r)),!1}finally{G.value=!1,Be.value=null,st()}}),Be.value):void console.warn("Mermaid container not ready")})}function xe(){return O(this,null,function*(){var t,e,n;const l=z.value;if(!l.trim())return Dt()?void 0:(m.value&&se(m.value),ge.value=null,J.value="",void(L.value=!1));if(!x.value||!Y())return;const r=l.replace(/\s+/g,"");C.value&&r===J.value&&((t=m.value)!=null&&t.querySelector("svg"))||(yield Ae())&&(J.value=r,ge.value=(n=(e=m.value)==null?void 0:e.innerHTML)!=null?n:null,L.value=!1)})}function Ut(t){return O(this,null,function*(){var e;if(ft()&&(m.value||(yield H(),m.value))&&!G.value){G.value=!0,ut();try{const n=yield Re();if(!n)return;const l=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,r=a.isDark?"dark":"light",o=ht(t),f=Ht(o&&o.trim()?o:t,r),v=yield Je(()=>n.render(l,f),{timeoutMs:K.value.render}),g=v?.svg;if(m.value&&g){const d=pe(m.value,g,{keepPreviousOnFailure:!0});d&&(ne=(e=v?.bindFunctions)!=null?e:null,ce(d.bindTarget),Mt(()=>Fe()))}}catch{}finally{G.value=!1,st()}}})}function Gt(){return O(this,null,function*(){var t,e,n;const l=Date.now(),r=++vt.value;ut();try{q&&q.abort(),q=new AbortController;const o=q.signal,f=a.isDark?"dark":"light",v=z.value,g=v.replace(/\s+/g,"");if(!v.trim())return Dt()?void 0:(m.value&&se(m.value),ge.value=null,J.value="",void(L.value=!1));if(g===J.value)return;try{const h=yield _t(v,f,{signal:o,timeoutMs:K.value.worker});if(h.fullOk)return(yield Ae())?void(vt.value===r&&(ge.value=(e=(t=m.value)==null?void 0:t.innerHTML)!=null?e:null,J.value=g,L.value=!1)):void 0;const B=Ue&&l<=Ue;if(h.prefixOk&&h.prefix&&ft()&&!B)return void(yield Ut(h.prefix))}catch(h){if(h?.name==="AbortError")return}if(vt.value!==r||L.value)return;const d=ae.value[f];if(d&&m.value){const h=pe(m.value,d.svg);h&&(ne=(n=d.bindFunctions)!=null?n:null,ce(h.bindTarget))}}finally{st()}})}function j(){ke&&(ke=!1,fe=Oe.value,mt=!1,Z&&(Z.abort(),Z=null),ye&&(globalThis.clearTimeout(ye),ye=null),Ze&&(xn(Ze),Ze=null),Ue=Date.now())}function lt(){if(j(),Ve(),q){try{q.abort()}catch{}q=null}if(Z){try{Z.abort()}catch{}Z=null}je(),$e=0}function yt(t=Oe.value){ke&&(Ge>=$t.value?j():(ye&&globalThis.clearTimeout(ye),ye=globalThis.setTimeout(()=>{Ze=zt(()=>O(null,null,function*(){if(!ke)return;if(!Y()||b.value||C.value)return void j();const e=a.isDark?"dark":"light",n=z.value;if(!n.trim())return a.loading===!1?void j():void yt(fe);if(Ge++,Ge>$t.value)j();else{Z&&Z.abort(),Z=new AbortController;try{const l=yield _t(n,e,{signal:Z.signal,timeoutMs:K.value.worker});if(l.fullOk){if((yield Ae())&&C.value)return void j()}else l.prefixOk&&l.prefix&&ft()&&(yield Ut(l.prefix))}catch{}fe=Math.min(Math.floor(1.5*fe),kn.value),yt(fe)}}),{timeout:500})},t)))}function rt(){ke||oe.value&&x.value&&Y()&&(b.value||C.value||(ke=!0,Ue=0,mt=!0,Ge=0,fe=Oe.value,yt(fe)))}return R(le,t=>{U.value&&t&>()}),R(pt,t=>{U.value&&Ie.value&&(Ie.value.style.transform=t.transform)},{immediate:!0}),R(Ke,t=>{t||Kt()}),R(()=>z.value,t=>{if((t.trim()||a.loading===!1)&&(C.value=!1,ae.value={}),!oe.value)return j(),void(Y()&&!b.value&&xe());Y()&&ze(),!b.value&&x.value&&Y()?rt():j(),(function(){if(!oe.value||!b.value||!x.value)return;const e=z.value.length;e!==qe.value&&(dt.value=!0,qe.value=e,Ee&&clearTimeout(Ee),Ee=setTimeout(()=>{dt.value&&b.value&&z.value.trim()&&(dt.value=!1,Zt("preview"))},yn.value))})()}),R(()=>a.isDark,()=>O(null,null,function*(){var t;if(!C.value||L.value)return;const e=a.isDark?"dark":"light",n=ae.value[e];if(n){if(m.value){const o=pe(m.value,n.svg);o&&(ne=(t=n.bindFunctions)!=null?t:null,ce(o.bindTarget))}return}const l={zoom:P.value,translateX:F.value,translateY:A.value,containerHeight:_.value},r=P.value!==1||F.value!==0||A.value!==0;ve.value=!0,r&&(P.value=1,F.value=0,A.value=0,yield H()),yield Ae(),r&&(yield H(),P.value=l.zoom,F.value=l.translateX,A.value=l.translateY,_.value=l.containerHeight,me.value=l)})),R(()=>b.value,t=>O(null,null,function*(){var e;if(t)j(),C.value&&(me.value={zoom:P.value,translateX:F.value,translateY:A.value,containerHeight:_.value});else{if(L.value)return;const n=a.isDark?"dark":"light";if(C.value&&ae.value[n]){if(yield H(),m.value){const l=ae.value[n],r=pe(m.value,l.svg);r&&(ne=(e=l.bindFunctions)!=null?e:null,ce(r.bindTarget))}return P.value=me.value.zoom,F.value=me.value.translateX,A.value=me.value.translateY,void(_.value=me.value.containerHeight)}if(yield H(),!x.value||!Y())return;if(!oe.value)return j(),void(yield xe());rt(),yield Gt()}})),R(()=>a.loading,(t,e)=>O(null,null,function*(){var n;if(e===!0&&t===!1){const l=z.value.trim();if(!l)return m.value&&se(m.value),ge.value=null,J.value="",L.value=!1,lt();const r=a.isDark?"dark":"light",o=l.replace(/\s+/g,"");if(C.value&&o===J.value){if(yield H(),m.value&&!m.value.querySelector("svg")&&ae.value[r]){const f=ae.value[r],v=pe(m.value,f.svg);v&&(ne=(n=f.bindFunctions)!=null?n:null,ce(v.bindTarget))}return Fe(void 0,{force:!0}),void lt()}try{if(yield Qe(l,r,{timeoutMs:K.value.worker}),!(yield Ae()))return;J.value=o,L.value=!1,lt()}catch(f){lt(),At(f)}}})),R(X,t=>{we&&we.disconnect(),t&&(we=new ResizeObserver(e=>{e&&e.length>0&&!b.value&&!N.value&&Mt(()=>{Fe(e[0].contentRect.width)})}),we.observe(t))},{immediate:!0}),An(()=>O(null,null,function*(){Re().catch(t=>{x.value=!1,console.warn("[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",t)}),yield H(),Ye.value||(b.value=!x.value),Y()&&(oe.value?(ze(),qe.value=z.value.length):b.value||xe())})),R(()=>x.value,t=>{Ye.value||(b.value=!t)}),R(()=>a.maxHeight,()=>{H(()=>{Fe()})}),R([()=>a.estimatedPreviewHeightPx,()=>z.value],()=>{C.value||ct()||b.value||(_.value=St(),We.value=_.value)}),R(()=>Ce.value,t=>{t&&(C.value||(oe.value?(ze(),qe.value=z.value.length):xe()),a.loading||C.value||xe(),!b.value&&x.value&&oe.value&&rt())},{immediate:!1}),Ln(()=>{Ee&&clearTimeout(Ee),Ve(),we&&we.disconnect(),q&&(q.abort(),q=null),j(),je(),Bt()}),R(()=>N.value,t=>O(null,null,function*(){t?(j(),q&&q.abort()):Y()&&!C.value&&(yield H(),oe.value?(ze(),rt()):b.value||xe())}),{immediate:!1}),(t,e)=>(M(),T("div",{ref_key:"blockContainer",ref:it,class:te(["mermaid-block-container rounded-lg border overflow-hidden",[{"is-rendering":a.loading,dark:a.isDark}]]),"data-markstream-mermaid":"1","data-markstream-mode":b.value?"fallback":C.value?"preview":"pending","data-markstream-pending":bn.value?"true":void 0},[a.showHeader?(M(),T("div",vl,[t.$slots["header-left"]?(M(),T("div",ml,[kt(t.$slots,"header-left",{},void 0,!0)])):(M(),T("div",fl,[i("span",{class:"icon-slot action-icon shrink-0",innerHTML:k(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
|
|
7
|
-
<path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M1.5 2.5c0 6 2.25 5.75 4 7 .83.67 1.17 2 1 4h3c-.17-2 .17-3.33 1-4 1.75-1.25 4-1 4-7C12 2.5 10 3 8 7 6 3 4 2.5 1.5 2.5" />
|
|
8
|
-
</svg>
|
|
9
|
-
`)},null,8,hl),e[21]||(e[21]=i("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate"},"Mermaid",-1))])),t.$slots["header-center"]?(M(),T("div",pl,[kt(t.$slots,"header-center",{},void 0,!0)])):a.showModeToggle&&x.value?(M(),T("div",gl,[i("button",{class:te(["mermaid-mode-btn px-2 py-0.5 rounded transition-colors",[b.value?"":"is-active"]]),onClick:e[0]||(e[0]=()=>Wt("preview")),onMouseenter:e[1]||(e[1]=n=>D(n,k(w)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=n=>D(n,k(w)("common.preview")||"Preview")),onMouseleave:S,onBlur:S},[i("div",wl,[e[22]||(e[22]=i("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[i("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i("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"}),i("circle",{cx:"12",cy:"12",r:"3"})])],-1)),i("span",null,Le(k(w)("common.preview")||"Preview"),1)])],34),i("button",{class:te(["mermaid-mode-btn px-2 py-0.5 rounded transition-colors",[b.value?"is-active":""]]),onClick:e[3]||(e[3]=()=>Wt("source")),onMouseenter:e[4]||(e[4]=n=>D(n,k(w)("common.source")||"Source")),onFocus:e[5]||(e[5]=n=>D(n,k(w)("common.source")||"Source")),onMouseleave:S,onBlur:S},[i("div",yl,[e[23]||(e[23]=i("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[i("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)),i("span",null,Le(k(w)("common.source")||"Source"),1)])],34)])):ie("",!0),t.$slots["header-right"]?(M(),T("div",kl,[kt(t.$slots,"header-right",{},void 0,!0)])):(M(),T("div",bl,[a.showCollapseButton?(M(),T("button",{key:0,class:te(at),"aria-pressed":N.value,onClick:e[6]||(e[6]=n=>N.value=!N.value),onMouseenter:e[7]||(e[7]=n=>D(n,N.value?k(w)("common.expand")||"Expand":k(w)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=n=>D(n,N.value?k(w)("common.expand")||"Expand":k(w)("common.collapse")||"Collapse")),onMouseleave:S,onBlur:S},[(M(),T("svg",{style:bt({rotate:N.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[24]||(e[24]=[i("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,xl)):ie("",!0),a.showCopyButton?(M(),T("button",{key:1,class:te(at),onClick:Tn,onMouseenter:e[9]||(e[9]=n=>Rt(n)),onFocus:e[10]||(e[10]=n=>Rt(n)),onMouseleave:S,onBlur:S},[He.value?(M(),T("svg",Tl,[...e[26]||(e[26]=[i("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(M(),T("svg",Ml,[...e[25]||(e[25]=[i("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),i("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):ie("",!0),a.showExportButton&&x.value?(M(),T("button",{key:2,class:te(`${at} ${et.value?"opacity-50 cursor-not-allowed":""}`),"aria-label":k(w)("common.export")||"Export",disabled:et.value,onClick:Pn,onMouseenter:e[11]||(e[11]=n=>D(n,k(w)("common.export")||"Export")),onFocus:e[12]||(e[12]=n=>D(n,k(w)("common.export")||"Export")),onMouseleave:S,onBlur:S},[...e[27]||(e[27]=[i("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[i("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),i("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,Pl)):ie("",!0),a.showFullscreenButton&&x.value?(M(),T("button",{key:3,class:te(`${at} ${et.value?"opacity-50 cursor-not-allowed":""}`),"aria-label":U.value?k(w)("common.minimize")||"Minimize":k(w)("common.open")||"Open",disabled:et.value,onClick:Cn,onMouseenter:e[13]||(e[13]=n=>D(n,U.value?k(w)("common.minimize")||"Minimize":k(w)("common.open")||"Open")),onFocus:e[14]||(e[14]=n=>D(n,U.value?k(w)("common.minimize")||"Minimize":k(w)("common.open")||"Open")),onMouseleave:S,onBlur:S},[U.value?(M(),T("svg",Ol,[...e[29]||(e[29]=[i("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)])])):(M(),T("svg",Bl,[...e[28]||(e[28]=[i("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,Cl)):ie("",!0)]))])):ie("",!0),Rn(i("div",{ref_key:"modeContainerRef",ref:Ot},[b.value?(M(),T("div",El,[i("pre",Sl,Le(z.value),1)])):(M(),T("div",Dl,[a.showZoomControls?(M(),T("div",$l,[i("div",zl,[i("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:Yt,onMouseenter:e[15]||(e[15]=n=>D(n,k(w)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=n=>D(n,k(w)("common.zoomIn")||"Zoom in")),onMouseleave:S,onBlur:S},[...e[30]||(e[30]=[i("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[i("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i("circle",{cx:"11",cy:"11",r:"8"}),i("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),i("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:qt,onMouseenter:e[17]||(e[17]=n=>D(n,k(w)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=n=>D(n,k(w)("common.zoomOut")||"Zoom out")),onMouseleave:S,onBlur:S},[...e[31]||(e[31]=[i("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[i("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i("circle",{cx:"11",cy:"11",r:"8"}),i("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),i("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors",onClick:Vt,onMouseenter:e[19]||(e[19]=n=>D(n,k(w)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=n=>D(n,k(w)("common.resetZoom")||"Reset zoom")),onMouseleave:S,onBlur:S},Le(Math.round(100*P.value))+"% ",33)])])):ie("",!0),i("div",Qt({ref_key:"mermaidContainer",ref:X,class:"mermaid-preview-area relative overflow-hidden block transition-[height] ease-out",style:{height:_.value}},en(Ft.value,!0),{onMousedown:tt,onMousemove:nt,onMouseup:be,onMouseleave:be,onTouchstartPassive:tt,onTouchmovePassive:nt,onTouchendPassive:be}),[i("div",{"data-mermaid-wrapper":"",class:te(["absolute inset-0 cursor-grab",{"cursor-grabbing":Ne.value}]),style:bt(pt.value)},[i("div",{ref_key:"mermaidContent",ref:m,class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:bt({height:We.value})},null,4)],6)],16),(M(),In(qn,{to:"body"},[i("div",{class:te(["markstream-vue",{dark:a.isDark}])},[_n(Yn,{name:"mermaid-dialog",appear:""},{default:Nn(()=>[U.value?(M(),T("div",{key:0,class:"mermaid-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:Xn(wt,["self"])},[i("div",jl,[i("div",Fl,[i("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:Yt},[...e[32]||(e[32]=[i("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[i("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i("circle",{cx:"11",cy:"11",r:"8"}),i("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),i("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:qt},[...e[33]||(e[33]=[i("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[i("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i("circle",{cx:"11",cy:"11",r:"8"}),i("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),i("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors",onClick:Vt},Le(Math.round(100*P.value))+"% ",1),i("button",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:wt},[...e[34]||(e[34]=[i("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[i("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),i("div",Qt({ref_key:"modalContent",ref:le,class:"w-full h-full flex items-center justify-center p-4 overflow-hidden"},en(Ft.value,!0),{onMousedown:tt,onMousemove:nt,onMouseup:be,onMouseleave:be,onTouchstartPassive:tt,onTouchmovePassive:nt,onTouchendPassive:be}),null,16)])])):ie("",!0)]),_:1})],2)]))]))],512),[[Hn,!N.value]])],10,dl))}}),[["__scopeId","data-v-e9775fad"]]);Tt.install=s=>{s.component(Tt.__name,Tt)};export{Tt as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CXZzzXGH.js","assets/index-KEPtQokk.js","assets/index-BiWo3nMo.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{bQ as Se,M as He,c0 as Le,aU as a,c1 as ae,bT as _e,bE as w,aD as Me,az as Pe,c2 as ze,aL as re,u as ie,I as Ne,A as Fe,bJ as D,aY as j,v as f,aw as se,t as $e,bb as De,au as Oe,q as p,c3 as Ee,c4 as Ie,c5 as Ve,c6 as Ae,as as W,bR as je}from"./index-KEPtQokk.js";import{V as We}from"./CodeBlockShell.vue_vue_type_style_index_0_lang-DCpGDnBA.js";var Ue=Object.defineProperty,ue=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,de=(i,b,t)=>b in i?Ue(i,b,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[b]=t,h=(i,b,t)=>new Promise((P,S)=>{var m=u=>{try{s(t.next(u))}catch(B){S(B)}},H=u=>{try{s(t.throw(u))}catch(B){S(B)}},s=u=>u.done?P(u.value):Promise.resolve(u.value).then(m,H);s((t=t.apply(i,b)).next())});const Ge={class:"code-header-main"},Je=["innerHTML"],Qe={class:"code-header-copy"},Ye={class:"code-header-title"},Ke=["innerHTML"],U=Se(He({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean,default:!0},autoScrollInitial:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{}},emits:["previewCode","copy"],setup(i,{emit:b}){const t=i,P=b,{t:S}=Le(),m=a(ae(t.node.language)),H=a(!1),s=a(!1),u=a(!1),B=a(null),k=a(null),x=a(null),z=a(""),C=a(!1);let r;const ce=_e(),L=a(null),y=a(typeof window>"u");typeof window<"u"&&w(()=>B.value,e=>{var o;if((o=L.value)==null||o.destroy(),L.value=null,!e)return void(y.value=!1);const l=ce(e,{rootMargin:"400px"});L.value=l,y.value=l.isVisible.value,l.whenVisible.then(()=>{y.value=!0})},{immediate:!0});const _=a(t.autoScrollInitial!==!1),R=a(0),O=p(()=>t.autoScrollOnUpdate!==!1),N=a(14),g=a(N.value),ve=p(()=>{const e=N.value,o=g.value;return typeof e=="number"&&Number.isFinite(e)&&e>0&&typeof o=="number"&&Number.isFinite(o)&&o>0}),fe=p(()=>{const e=m.value.trim().toLowerCase();return Ee[e]||e.charAt(0).toUpperCase()+e.slice(1)}),pe=p(()=>{Ie.value;const e=m.value.trim().toLowerCase();return Ve(e.split(":")[0])}),q=p(()=>{const e=m.value.trim().toLowerCase();return t.isShowPreview&&(e==="html"||e==="svg")}),he=p(()=>{const e={},o=v=>{if(v!=null)return typeof v=="number"?`${v}px`:String(v)},l=o(t.minWidth),n=o(t.maxWidth);return l&&(e.minWidth=l),n&&(e.maxWidth=n),e}),G=p(()=>{const e=t.estimatedContentHeightPx;return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.round(e):null}),me=p(()=>G.value!=null&&!C.value),ye=p(()=>((e,o)=>{for(var l in o||(o={}))Re.call(o,l)&&de(e,l,o[l]);if(ue)for(var l of ue(o))qe.call(o,l)&&de(e,l,o[l]);return e})({fontSize:`${g.value}px`},me.value?{minHeight:`${G.value}px`}:{})),J=p(()=>t.showTooltips!==!1);function Q(){return t.isDark?t.darkTheme:t.lightTheme}function c(e){if(r?.disconnect(),r=void 0,!e)return z.value="",void(C.value=!1);var o;z.value=`<pre class="shiki shiki-fallback"><code>${o=e,o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}</code></pre>`,C.value=!1}function Y(){z.value="",C.value=!0}function K(){var e;const o=x.value;return!!o&&(o.childNodes.length>0||!!((e=o.textContent)!=null&&e.trim().length))}function X(){return h(this,null,function*(){if(yield W(),K())return void Y();const e=x.value;e&&(r?.disconnect(),r=new MutationObserver(()=>{K()&&(Y(),r?.disconnect(),r=void 0)}),r.observe(e,{childList:!0,subtree:!0}))})}let d,F,E,I,Z=null;const ee=new Set,te=new Set,V=import.meta!==void 0&&!1;let $=null;function oe(e,o){return h(this,null,function*(){if(!d)return;const l=(function(n,v=!1){var le;const[ne]=String(n??"").split(":"),T=(le=ne?.trim().toLowerCase())!=null?le:"";return T?!I||I.has(T)?T:(v&&V&&!ee.has(T)&&(ee.add(T),console.warn(`[MarkdownCodeBlockNode] Language "${T}" not preloaded in stream-markdown; falling back to plaintext.`)),"plaintext"):"plaintext"})(o,!!(e&&e.length));try{yield d.updateCode(e,l)}catch(n){l!=="plaintext"?(V&&!te.has(l)&&(te.add(l),console.warn(`[MarkdownCodeBlockNode] Failed to render language "${l}", retrying as plaintext.`,n)),yield d.updateCode(e,"plaintext")):V&&console.warn("[MarkdownCodeBlockNode] Failed to render code block even as plaintext.",n)}})}function A(e){if(!E)return;const o=Array.isArray(e)?e.join("\0"):"";Z!==o&&(E({themes:e}),Z=o)}function M(){return h(this,null,function*(){y.value?(yield(function(){return h(this,null,function*(){if(!F)return $||($=h(null,null,function*(){try{const e=yield je(()=>import("./index-CXZzzXGH.js"),__vite__mapDeps([0,1,2]));F=e.createShikiStreamRenderer,E=e.registerHighlight;const o=Array.isArray(e.defaultLanguages)?e.defaultLanguages:void 0;I=o?new Set(o.map(l=>l.toLowerCase())):void 0,A(t.themes)}catch(e){console.warn("[MarkdownCodeBlockNode] stream-markdown not available:",e)}finally{$=null}}),$)})})(),k.value&&x.value?(A(t.themes),!d&&F&&(d=F(x.value,{theme:Q()}),C.value=!0),d?t.stream===!1&&t.loading?c(t.node.code):(c(t.node.code),yield oe(t.node.code,m.value),yield X()):c(t.node.code)):c(t.node.code)):c(t.node.code)})}function we(){const e=k.value;if(!e||s.value||!O.value)return;const o=e.scrollTop;o<R.value?_.value=!1:(function(l,n=50){return l.scrollHeight-l.scrollTop-l.clientHeight<=n})(e)&&(_.value=!0),R.value=o}function ge(){return h(this,null,function*(){try{typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t.node.code)),H.value=!0,P("copy",t.node.code),setTimeout(()=>{H.value=!1},1e3)}catch(e){console.error("Copy failed:",e)}})}function be(e){if(s.value=!s.value,e&&J.value){const l=(function(n){const v=n.currentTarget||n.target;return!v||v.disabled?null:v})(e);if(l){const n=s.value?S("common.collapse")||"Collapse":S("common.expand")||"Expand";Ae(l,n,"top",!1,void 0,t.isDark)}}const o=k.value;o&&(s.value?(o.style.maxHeight="none",o.style["overflow-y"]="visible",o.style["overflow-x"]="auto"):(o.style.maxHeight="",o.style.overflow="auto",O.value&&(_.value=!0,W(()=>{o.scrollHeight>o.clientHeight&&(o.scrollTop=o.scrollHeight)}))))}function ke(){u.value=!u.value}function xe(){const e=Math.min(36,g.value+1);g.value=e}function Be(){const e=Math.max(10,g.value-1);g.value=e}function Ce(){g.value=N.value}function Te(){if(!q.value)return;const e=(m.value||t.node.language).toLowerCase(),o=e==="html"?"HTML Preview":"SVG Preview";P("previewCode",{type:e==="html"?"text/html":"image/svg+xml",content:t.node.code,title:o})}return Me(()=>{y.value?M():c(t.node.code)}),Pe(()=>{var e;(e=L.value)==null||e.destroy(),L.value=null,r?.disconnect(),r=void 0}),w(()=>t.themes,()=>h(null,null,function*(){A(t.themes)})),w(()=>t.loading,e=>{e||(y.value?M():c(t.node.code))}),w(()=>y.value,e=>{e&&M()}),w(J,e=>{e||ze()}),w(()=>t.autoScrollInitial,e=>{_.value=e!==!1}),w(()=>[t.node.code,t.node.language],e=>h(null,[e],function*([o,l]){const n=ae(l);n!==m.value&&(m.value=n),y.value&&k.value&&x.value?(d||(c(o),yield M()),d&&o&&(t.stream===!1&&t.loading||(c(o),yield oe(o,l),yield X()))):c(o)})),w(()=>[t.darkTheme,t.lightTheme,t.isDark],()=>h(null,null,function*(){y.value&&k.value&&x.value&&(d||(yield M()),d?.setTheme(Q()))})),w(()=>t.node.code,()=>h(null,null,function*(){if(s.value||!O.value||!_.value)return;yield W();const e=k.value;e&&e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})),(e,o)=>(re(),ie("div",{ref_key:"container",ref:B,style:se(he.value),class:Oe(["code-block-container rounded-lg border overflow-hidden",{dark:t.isDark}])},[Ne(We,{"show-header":t.showHeader,"show-collapse-button":t.showCollapseButton,"show-font-size-buttons":t.showFontSizeButtons,"enable-font-size-control":t.enableFontSizeControl,"show-copy-button":t.showCopyButton,"show-expand-button":t.showExpandButton,"show-preview-button":t.showPreviewButton,"show-tooltips":t.showTooltips,"is-dark":t.isDark,loading:t.loading,stream:t.stream,"is-collapsed":u.value,"is-expanded":s.value,"copy-text":H.value,"is-previewable":q.value,"code-font-size":g.value,"code-font-min":10,"code-font-max":36,"default-code-font-size":N.value,"font-baseline-ready":ve.value,onToggleCollapse:ke,onDecreaseFont:Be,onResetFont:Ce,onIncreaseFont:xe,onCopy:ge,onToggleExpand:be,onPreview:Te},Fe({"header-left":D(()=>[j(e.$slots,"header-left",{},()=>[f("div",Ge,[f("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:pe.value},null,8,Je),f("div",Qe,[f("div",Ye,De(fe.value),1)])])],!0)]),loading:D(()=>[j(e.$slots,"loading",{loading:i.loading,stream:i.stream},()=>[o[0]||(o[0]=f("div",{class:"loading-skeleton"},[f("div",{class:"skeleton-line"}),f("div",{class:"skeleton-line"}),f("div",{class:"skeleton-line short"})],-1))],!0)]),default:D(()=>[f("div",{ref_key:"codeBlockContent",ref:k,class:"code-block-content",style:se(ye.value),onScroll:we},[f("div",{ref_key:"rendererTarget",ref:x,class:"code-block-render"},null,512),C.value?$e("",!0):(re(),ie("div",{key:0,class:"code-fallback-plain",innerHTML:z.value},null,8,Ke))],36)]),_:2},[e.$slots["header-right"]?{name:"header-right",fn:D(()=>[j(e.$slots,"header-right",{},void 0,!0)]),key:"0"}:void 0]),1032,["show-header","show-collapse-button","show-font-size-buttons","enable-font-size-control","show-copy-button","show-expand-button","show-preview-button","show-tooltips","is-dark","loading","stream","is-collapsed","is-expanded","copy-text","is-previewable","code-font-size","default-code-font-size","font-baseline-ready"])],6))}}),[["__scopeId","data-v-e84c7641"]]);U.install=i=>{i.component(U.__name,U)};export{U as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e,b as r,a,S as s}from"./chunk-AQP2D5EJ-OzWWS2zu.js";import{_ as i}from"./mermaid.core-DiVTz3xq.js";import"./chunk-55IACEB6-lg2y1z6m.js";import"./chunk-2J33WTMH-B9WYpP0t.js";import"./index-KEPtQokk.js";var p={parser:a,get db(){return new s(2)},renderer:r,styles:e,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{p as diagram};
|