markstream-vue2 0.0.5 → 0.0.7
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/exports.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +148 -61
- package/dist/index.tailwind.css +1 -1
- package/dist/index5.js +1 -6
- package/dist/index6.js +6 -0
- package/dist/tailwind.ts +1 -1
- package/package.json +3 -3
package/dist/exports.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.create;var e,t=Object.defineProperty,n=Object.defineProperties,o=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),r=(Object.getOwnPropertyNames,Object.getOwnPropertySymbols),l=(Object.getPrototypeOf,Object.prototype.hasOwnProperty),i=Object.prototype.propertyIsEnumerable,a=(e,n,o)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,s=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&a(e,n,t[n]);if(r)for(var n of r(t))i.call(t,n)&&a(e,n,t[n]);return e},u=(e,t)=>n(e,o(t)),c=(e,t,n)=>new Promise((o,r)=>{var l=e=>{try{a(n.next(e))}catch(t){r(t)}},i=e=>{try{a(n.throw(e))}catch(t){r(t)}},a=e=>e.done?o(e.value):Promise.resolve(e.value).then(l,i);a((n=n.apply(e,t)).next())});const d=require("stream-markdown-parser"),p=require("vue");var m="undefined"!=typeof document?document.currentScript:null;function h(e,t,n,o,r,l,i,a){var s,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),l&&(u._scopeId="data-v-"+l),i?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},u._ssrRegister=s):r&&(s=a?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),s)if(u.functional){u._injectStyles=s;var c=u.render;u.render=function(e,t){return s.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,s):[s]}return{exports:e,options:u}}const v=h(p.defineComponent({__name:"BlockquoteNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},setup:e=>({__sfc:!0,props:e,NodeRenderer:We})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("blockquote",{staticClass:"blockquote",attrs:{dir:"auto",cite:e.node.cite}},[t(n.NodeRenderer,{attrs:{"index-key":`blockquote-${n.props.indexKey}`,nodes:n.props.node.children||[],"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)},[],!1,null,"6d8bbd17",null,null).exports,f=h(p.defineComponent({__name:"CheckboxNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"checkbox-node"},[t("input",{staticClass:"checkbox-input",attrs:{type:"checkbox",disabled:""},domProps:{checked:e.node.checked}})])},[],!1,null,"8dc6c46f",null,null).exports,g=h(p.defineComponent({__name:"DefinitionListNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},emits:["copy"],setup:e=>({__sfc:!0,props:e,NodeRenderer:We})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("dl",{staticClass:"definition-list"},[e._l(n.props.node.items,function(o,r){return[t("dt",{key:`definition-term-${n.props.indexKey}-${r}`,staticClass:"definition-term"},[t(n.NodeRenderer,{attrs:{"index-key":`definition-term-${n.props.indexKey}-${r}`,nodes:o.term,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1),t("dd",{key:`definition-desc-${n.props.indexKey}-${r}`,staticClass:"definition-desc"},[t(n.NodeRenderer,{attrs:{"index-key":`definition-desc-${n.props.indexKey}-${r}`,nodes:o.definition,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)]})],2)},[],!1,null,"b5d9dc8e",null,null).exports,w=h(p.defineComponent({__name:"EmojiNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"emoji-node"},[e._v(e._s(e.node.name))])},[],!1,null,"de55dc97",null,null).exports,y="__global__",x={};function k(e){return e?x[e]||x[y]||{}:x[y]||{}}const b=h(p.defineComponent({__name:"FootnoteReferenceNode",props:{node:null},setup(e){const t=e,n=`#footnote-${t.node.id}`;return{__sfc:!0,props:t,href:n,handleScroll:function(){if("undefined"==typeof document)return;const e=document.querySelector(n);e?e.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${n} not found`)}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sup",{staticClass:"footnote-reference",attrs:{id:`fnref-${e.node.id}`},on:{click:n.handleScroll}},[t("span",{staticClass:"footnote-link cursor-pointer",attrs:{href:n.href,title:`查看脚注 ${e.node.id}`}},[e._v("["+e._s(e.node.id)+"]")])])},[],!1,null,"01af0fee",null,null).exports,C=new Set(["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onreset","onsearch","onsubmit"]),_=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),M=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),B=new Set(["script"]),T=new Set(["href","src","srcset","xlink:href","formaction"]),S=(()=>{var e;try{return Boolean(null==(e={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:e.DEV)}catch(t){}return!1})();function L(e){S&&console.warn(e)}function E(e){const t=function(e){let t="";for(const n of e){const e=n.charCodeAt(0);e<=31||127===e||/\s/u.test(n)||(t+=n)}return t}(e).toLowerCase();return!(!t.startsWith("javascript:")&&!t.startsWith("vbscript:"))||!!t.startsWith("data:")&&!(t.startsWith("data:image/")||t.startsWith("data:video/")||t.startsWith("data:audio/"))}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function N(e,t){const n=e.toLowerCase();return!M.has(n)&&(R(t,n)||R(t,e))}function I(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return"true"===e||""===e||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const t=Number(e);if(""!==e&&!Number.isNaN(t))return t}return e}function P(e){return e.trim().length>0}function H(e,t,n,o){if(B.has(e.toLowerCase()))return null;const a=function(e){const t={};for(const[n,o]of Object.entries(e)){const e=n.toLowerCase();C.has(e)||T.has(e)&&o&&E(o)||(t[n]=o)}return t}(t);if(N(e,o)){const t=o[e]||o[e.toLowerCase()],r=function(e){const t={};for(const[n,o]of Object.entries(e))t[n]=I(o,n);return t}(a);return p.h(t,r,n.length>0?n:void 0)}{const t=a,{innerHTML:o}=t,s=((e,t)=>{var n={};for(var o in e)l.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&r)for(var o of r(e))t.indexOf(o)<0&&i.call(e,o)&&(n[o]=e[o]);return n})(t,["innerHTML"]);return p.h(e,s,n.length>0?n:void 0)}}function D(e,t){const n=/<([a-z][a-z0-9-]*)\b[^>]*>/gi;let o;for(;null!==(o=n.exec(e));)if(N(o[1],t))return!0;return!1}function j(e,t){if(!e)return[];try{const n=function(e,t){const n=[],o=[];for(const r of e)if("text"===r.type)(n.length>0?n[n.length-1].children:o).push(r.content);else if("self_closing"===r.type){const e=H(r.tagName,r.attrs||{},[],t),l=n.length>0?n[n.length-1].children:o;null!=e&&l.push(e)}else if("tag_open"===r.type)n.push({tagName:r.tagName,children:[],attrs:r.attrs});else if("tag_close"===r.type){const e=r.tagName.toLowerCase();let l=-1;for(let t=n.length-1;t>=0;t--)if(n[t].tagName.toLowerCase()===e){l=t;break}if(-1!==l)for(;n.length>l;){const r=n.pop(),i=H(r.tagName,r.attrs||{},r.children,t);n.length>0?null!=i&&n[n.length-1].children.push(i):null!=i&&o.push(i),r.tagName.toLowerCase()!==e&&n.length>l&&L(`Auto-closing unclosed tag: <${r.tagName}>`)}else L(`Ignoring closing tag with no matching opening tag: </${r.tagName}>`)}for(;n.length>0;){const e=n.pop(),r=H(e.tagName,e.attrs||{},e.children,t);null!=r&&o.push(r),L(`Auto-closing unclosed tag: <${e.tagName}>`)}return o}(function(e){var t,n,o;const r=[];let l=0;for(;l<e.length;){if(e.startsWith("\x3c!--",l)){const t=e.indexOf("--\x3e",l);if(-1!==t){l=t+3;continue}break}const i=e.indexOf("<",l);if(-1===i){if(l<e.length){const t=e.slice(l);P(t)&&r.push({type:"text",content:t})}break}if(i>l){const t=e.slice(l,i);P(t)&&r.push({type:"text",content:t})}if(e.startsWith("![CDATA[",i+1)){const t=e.indexOf("]]>",i);if(-1!==t){r.push({type:"text",content:e.slice(i,t+3)}),l=t+3;continue}break}if(e.startsWith("!",i+1)){const t=e.indexOf(">",i);if(-1!==t){l=t+1;continue}break}const a=e.indexOf(">",i);if(-1===a)break;const s=e.slice(i+1,a).trim(),u=s.startsWith("/"),c=s.endsWith("/");if(u){const e=s.slice(1).trim();r.push({type:"tag_close",tagName:e})}else{const e=s.indexOf(" ");let l,i="";-1===e?l=c?s.slice(0,-1).trim():s.trim():(l=s.slice(0,e).trim(),i=s.slice(e+1));const a={};if(i){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let r;for(;null!==(r=e.exec(i));){const e=r[1],l=null!=(o=null!=(n=null!=(t=r[2])?t:r[3])?n:r[4])?o:"";e&&!e.endsWith("/")&&(a[e]=l)}}r.push({type:c||_.has(l.toLowerCase())?"self_closing":"tag_open",tagName:l,attrs:a})}l=a+1}return r}(e),t);return n}catch(o){return n=o,S&&console.error("Failed to parse HTML to VNodes:",n),null}var n}const O=h(p.defineComponent({__name:"HtmlInlineNode",props:{node:null,customId:null},setup(e){const t=e,n=p.computed(()=>k(t.customId)),o=p.defineComponent({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=p.computed(()=>{const e=t.node.content;if(!e)return{mode:"html",content:""};if(!D(e,n.value))return{mode:"html",content:e};const o=j(e,n.value);return null===o?{mode:"html",content:e}:{mode:"dynamic",nodes:o}}),l=p.ref(null),i="undefined"!=typeof window;function a(){if(!i||!l.value)return;const e=l.value;e.innerHTML="";const n=document.createElement("template");n.innerHTML=t.node.content,e.appendChild(n.content.cloneNode(!0))}function s(){if(!l.value)return;const e=l.value;e.innerHTML="",e.textContent=t.node.content}return p.onMounted(()=>{"html"===r.value.mode&&(t.node.loading&&!t.node.autoClosed?s():a())}),p.watch(()=>[t.node.content,t.node.loading,t.node.autoClosed],()=>{"html"===r.value.mode&&(t.node.loading&&!t.node.autoClosed?s():a())}),p.onBeforeUnmount(()=>{l.value&&(l.value.innerHTML="")}),{__sfc:!0,props:t,customComponents:n,DynamicRenderer:o,renderMode:r,containerRef:l,isClient:i,renderHtmlContent:a,renderLoadingContent:s}}}),function(){var e=this._self._c,t=this._self._setupProxy;return"dynamic"===t.renderMode.mode?e("span",{staticClass:"html-inline-node",class:{"html-inline-node--loading":t.props.node.loading}},[e(t.DynamicRenderer,{attrs:{nodes:t.renderMode.nodes}})],1):e("span",{ref:"containerRef",staticClass:"html-inline-node",class:{"html-inline-node--loading":t.props.node.loading}})},[],!1,null,"1e6c55b0",null,null).exports,$=h(p.defineComponent({__name:"InlineCodeNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("code",{staticClass:"inline text-[85%] px-1 py-0.5 rounded font-mono bg-secondary whitespace-normal break-words max-w-full before:content-[''] after:content-['']"},[e._v(e._s(e.node.code))])},[],!1,null,null,null,null).exports,A=p.ref(!1),z=p.ref(""),F=p.ref("top"),V=p.ref(null),W=p.ref(null),K=p.ref(null),U=p.ref(null),X=p.ref(null);let q=null,Y=null;function Z(){q&&(clearTimeout(q),q=null),Y&&(clearTimeout(Y),Y=null)}let G=!1,J=null;function Q(e,t,n="top",o=!1,r,l){if(!e)return;G||"undefined"!=typeof document&&(J||(J=Promise.resolve().then(()=>require("./Tooltip.js")).then(({default:e})=>{G=!0;const t=document.createElement("div");t.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(t),(new(p.extend({render(t){var n;return t(e,{props:{visible:A.value,anchorEl:V.value,content:z.value,placement:F.value,id:W.value,originX:K.value,originY:U.value,isDark:null!=(n=X.value)?n:void 0}})}}))).$mount(t)}).catch(e=>{J=null,G=!1,console.warn("[markstream-vue2] Failed to load Tooltip component. Tooltips will be disabled.",e)}))),Z();const i=()=>{var o,i;W.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,V.value=e,z.value=t,F.value=n,K.value=null!=(o=null==r?void 0:r.x)?o:null,U.value=null!=(i=null==r?void 0:r.y)?i:null,X.value="boolean"==typeof l?l:null,A.value=!0;try{e.setAttribute("aria-describedby",W.value)}catch(a){}};o?i():q=setTimeout(i,80)}function ee(e=!1){Z();const t=()=>{if(V.value&&W.value)try{V.value.removeAttribute("aria-describedby")}catch(e){}A.value=!1,V.value=null,W.value=null,K.value=null,U.value=null};e?t():Y=setTimeout(t,120)}const te={"common.copy":"Copy","common.copySuccess":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."};function ne(){try{const t=globalThis.$vueI18nUse||null;if(t&&"function"==typeof t)try{const e=t();if(e&&"function"==typeof e.t)return{t:e.t.bind(e)}}catch(e){}}catch(e){}return{t:e=>{var t;return null!=(t=te[e])?t:function(e){return(e.split(".").pop()||e).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()}(e)}}}const oe=Symbol("ViewportPriority");function re(){const e=p.inject(oe,void 0);if(e)return e;const t=new WeakMap;let n=null;return e=>{const o=p.ref(!1);let r,l=!1;const i=new Promise(e=>{r=()=>{l||(l=!0,e())}}),a=()=>{try{null==n||n.unobserve(e)}catch(o){}t.delete(e)},s=n||("undefined"==typeof window||"undefined"==typeof IntersectionObserver?null:(n=new IntersectionObserver(e=>{for(const r of e){const e=t.get(r.target);if(e&&(r.isIntersecting||r.intersectionRatio>0)){if(!e.visible.value){e.visible.value=!0;try{e.resolve()}catch(o){}}null==n||n.unobserve(r.target),t.delete(r.target)}}},{root:null,rootMargin:"300px",threshold:0}),n));return s?(t.set(e,{resolve:r,visible:o}),s.observe(e),{isVisible:o,whenVisible:i,destroy:a}):(o.value=!0,r(),{isVisible:o,whenVisible:i,destroy:a})}}const le=h(p.defineComponent({__name:"ImageNode",props:{node:null,fallbackSrc:{default:""},showCaption:{type:Boolean,default:!1},lazy:{type:Boolean,default:!0},svgMinHeight:{default:"12rem"},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){const n=e,o=p.ref(!1),r=p.ref(!1),l=p.ref(!1),i=p.ref(null),a=re();let s=null;const u=p.ref("undefined"==typeof window);"undefined"!=typeof window&&p.watch(()=>i.value,e=>{if(null==s||s.destroy(),s=null,!e)return void(u.value=!1);const t=a(e,{rootMargin:"400px"});s=t,u.value=t.isVisible.value,t.whenVisible.then(()=>{u.value=!0})},{immediate:!0}),p.onBeforeUnmount(()=>{null==s||s.destroy(),s=null});const c=p.computed(()=>r.value&&n.fallbackSrc?n.fallbackSrc:n.node.src),d=p.computed(()=>!n.lazy||u.value),m=p.computed(()=>/\.svg(?:\?|$)/i.test(c.value)),{t:h}=ne();return p.watch(c,()=>{o.value=!1,r.value=!1}),{__sfc:!0,props:n,emit:t,imageLoaded:o,hasError:r,fallbackTried:l,figureRef:i,registerVisibility:a,visibilityHandle:s,isVisible:u,displaySrc:c,canRenderImage:d,isSvg:m,handleImageError:function(){n.fallbackSrc&&!l.value?(l.value=!0,r.value=!0):(r.value=!0,t("error",n.node.src))},handleImageLoad:function(){o.value=!0,r.value=!1,t("load",c.value)},handleClick:function(e){e.preventDefault(),o.value&&!r.value&&t("click",[e,c.value])},t:h}}}),function(){var e,t,n,o,r,l=this,i=l._self._c,a=l._self._setupProxy;return i("figure",{ref:"figureRef",staticClass:"text-center my-8"},[i("div",{staticClass:"relative inline-block"},[i("transition",{attrs:{name:"img-switch",mode:"out-in"}},[l.node.loading||a.hasError||!a.canRenderImage?a.hasError?l.node.loading||a.props.fallbackSrc?l._e():i("div",{key:"error",staticClass:"px-4 py-2 bg-gray-100 flex items-center justify-center rounded-lg gap-2 text-red-500"},[l._t("error",function(){return[i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"}},[i("path",{attrs:{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"}})]),i("span",{staticClass:"text-sm whitespace-nowrap"},[l._v(l._s(a.t("image.loadError")))])]},{node:a.props.node,displaySrc:a.displaySrc,imageLoaded:a.imageLoaded,hasError:a.hasError,fallbackSrc:a.props.fallbackSrc,lazy:a.props.lazy,isSvg:a.isSvg})],2):i("div",{key:"placeholder",staticClass:"placeholder-layer max-w-96 inline-flex items-center justify-center gap-2",style:a.isSvg?{minHeight:a.props.svgMinHeight,width:"100%"}:{minHeight:"6rem"}},[a.props.usePlaceholder?[l._t("placeholder",function(){return[i("div",{staticClass:"w-4 h-4 rounded-full border-2 border-solid border-current border-t-transparent animate-spin",attrs:{"aria-hidden":"true"}}),i("span",{staticClass:"text-sm whitespace-nowrap"},[l._v(l._s(a.t("image.loading")))])]},{node:a.props.node,displaySrc:a.displaySrc,imageLoaded:a.imageLoaded,hasError:a.hasError,fallbackSrc:a.props.fallbackSrc,lazy:a.props.lazy,isSvg:a.isSvg})]:[i("span",{staticClass:"text-sm text-gray-500"},[l._v(l._s(l.node.raw))])]],2):i("img",{key:"image",staticClass:"max-w-96 h-auto rounded-lg transition-opacity duration-200 ease-in-out",class:{"opacity-0":!a.imageLoaded,"opacity-100":a.imageLoaded,"cursor-pointer":a.imageLoaded},style:a.isSvg?{minHeight:a.props.svgMinHeight,width:"100%",height:"auto",objectFit:"contain"}:void 0,attrs:{src:a.displaySrc,alt:String(null!=(t=null!=(e=a.props.node.alt)?e:a.props.node.title)?t:""),title:String(null!=(o=null!=(n=a.props.node.title)?n:a.props.node.alt)?o:""),loading:a.props.lazy?"lazy":"eager",decoding:"async",tabindex:a.imageLoaded?0:-1,"aria-label":null!=(r=a.props.node.alt)?r:a.t("image.preview")},on:{error:a.handleImageError,load:a.handleImageLoad,click:a.handleClick}})])],1),a.props.showCaption&&a.props.node.alt?i("figcaption",{staticClass:"mt-2 text-sm text-gray-500 italic"},[l._v(" "+l._s(a.props.node.alt)+" ")]):l._e()])},[],!1,null,"a5977223",null,null).exports;let ie=null,ae=!1,se=de;function ue(e){var t;const n=null!=(t=null==e?void 0:e.default)?t:e;return n&&"function"==typeof n.renderToString?n:null}function ce(){try{const e=globalThis;return ue(null==e?void 0:e.katex)}catch(e){return null}}function de(){return(()=>c(this,null,function*(){const e=ce();if(e)return e;const t=yield import("katex");try{yield import("katex/contrib/mhchem")}catch(n){}return ue(t)}))()}function pe(e){se=e,ie=null,ae=!1}function me(){return"function"==typeof se}function he(){return c(this,null,function*(){var e;const t=ce();if(t)return ie=t,ie;if(ie)return ie;if(ae)return null;const n=se;if(!n)return ae=!0,null;try{const t=yield n();if(t)return ie=null!=(e=ue(t))?e:t,ie}catch(o){}return ae=!0,null})}const ve=p.shallowRef(!1);let fe=null;function ge(){return fe||(fe=he().then(e=>{ve.value=!!e}).catch(()=>{ve.value=!1})),p.readonly(ve)}const we=h(p.defineComponent({__name:"TextNode",props:{node:null},emits:["copy"],setup:e=>({__sfc:!0,katexReady:ge()})}),function(){var e=this;return(0,e._self._c)("span",{staticClass:"whitespace-pre-wrap break-words text-node",class:[e._self._setupProxy.katexReady&&e.node.center?"text-node-center":""]},[e._v(" "+e._s(e.node.content)+" ")])},[],!1,null,"56f30838",null,null).exports;function ye(e){return t=>{var n,o;return p.h(we,u(s({},t),{node:u(s({},t.node),{content:null!=(o=t.node.raw)?o:e(String(null!=(n=t.node.content)?n:""))})}))}}function xe(){return c(this,null,function*(){var e,t;if("undefined"!=typeof globalThis&&void 0!==globalThis.process&&"test"===(null==(t=null==(e=globalThis.process)?void 0:e.env)?void 0:t.NODE_ENV))return ye(e=>`$${e}$`);try{if(yield he())return(yield Promise.resolve().then(()=>require("./index.js"))).default}catch(n){console.warn('[markstream-vue2] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',n)}return ye(e=>`$${e}$`)})}function ke(){return c(this,null,function*(){try{if(yield he())return(yield Promise.resolve().then(()=>require("./index2.js"))).default}catch(e){console.warn('[markstream-vue2] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return ye(e=>`$$${e}$$`)})}const be=h(p.defineComponent({__name:"ReferenceNode",props:{node:null,messageId:null,threadId:null},emits:["click","mouseEnter","mouseLeave"],setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"reference-node cursor-pointer bg-accent text-xs rounded-md px-1.5 mx-0.5 hover:bg-secondary",attrs:{role:"button",tabindex:"0"},on:{click:function(t){return e.$emit("click",t,e.node.id,e.messageId,e.threadId)},mouseenter:function(t){return e.$emit("mouseEnter",t,e.node.id,e.messageId,e.threadId)},mouseleave:function(t){return e.$emit("mouseLeave",t,e.node.id,e.messageId,e.threadId)}}},[e._v(" "+e._s(e.node.id)+" ")])},[],!1,null,"b436f945",null,null).exports,Ce=h(p.defineComponent({__name:"SuperscriptNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=k(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:$,link:Te,html_inline:O,strong:Me,emphasis:Ee,footnote_reference:b,strikethrough:Be,highlight:Le,insert:Se,subscript:_e,emoji:w,math_inline:xe,reference:be},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sup",{staticClass:"superscript-node"},[e._l(e.node.children,function(o,r){return[n.nodeComponents[o.type]?t(n.nodeComponents[o.type],{key:`${e.indexKey||"superscript"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"superscript"}-${r}`}}):t("span",{key:`${e.indexKey||"superscript"}-${r}`},[e._v(" "+e._s(o.content||o.raw)+" ")])]})],2)},[],!1,null,"3cc2c5de",null,null).exports,_e=h(p.defineComponent({__name:"SubscriptNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=k(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:$,link:Te,html_inline:O,strong:Me,emphasis:Ee,footnote_reference:b,strikethrough:Be,highlight:Le,insert:Se,superscript:Ce,emoji:w,math_inline:xe,reference:be},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sub",{staticClass:"subscript-node"},[e._l(e.node.children,function(o,r){return[n.nodeComponents[o.type]?t(n.nodeComponents[o.type],{key:`${e.indexKey||"subscript"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"subscript"}-${r}`}}):t("span",{key:`${e.indexKey||"subscript"}-${r}`},[e._v(" "+e._s(o.content||o.raw)+" ")])]})],2)},[],!1,null,"a2b068c3",null,null).exports,Me=h(p.defineComponent({__name:"StrongNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=k(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:$,link:Te,html_inline:O,emphasis:Ee,strikethrough:Be,highlight:Le,insert:Se,subscript:_e,superscript:Ce,emoji:w,footnote_reference:b,math_inline:xe,reference:be},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("strong",{staticClass:"strong-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"strong"}-${r}`,tag:"component",attrs:{"index-key":`${e.indexKey||"strong"}-${r}`,node:o,"custom-id":n.props.customId}})}),1)},[],!1,null,"af3ce037",null,null).exports,Be=h(p.defineComponent({__name:"StrikethroughNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=k(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:$,link:Te,html_inline:O,strong:Me,emphasis:Ee,highlight:Le,insert:Se,subscript:_e,superscript:Ce,emoji:w,footnote_reference:b,math_inline:xe,reference:be},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("del",{staticClass:"strikethrough-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"strikethrough"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"strikethrough"}-${r}`}})}),1)},[],!1,null,"904d5bd1",null,null).exports,Te=h(p.defineComponent({__name:"LinkNode",props:{node:null,indexKey:null,customId:null,showTooltip:{type:Boolean,default:!0},color:null,underlineHeight:null,underlineBottom:null,animationDuration:null,animationOpacity:null,animationTiming:null,animationIteration:null},setup(e){const t=e,n=p.computed(()=>{var e,n,o,r,l,i;const a=void 0!==t.underlineBottom?"number"==typeof t.underlineBottom?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px";return{"--link-color":null!=(e=t.color)?e:"#0366d6","--underline-height":`${null!=(n=t.underlineHeight)?n:2}px`,"--underline-bottom":a,"--underline-opacity":String(null!=(o=t.animationOpacity)?o:.9),"--underline-duration":`${null!=(r=t.animationDuration)?r:.8}s`,"--underline-timing":null!=(l=t.animationTiming)?l:"linear","--underline-iteration":"number"==typeof t.animationIteration?String(t.animationIteration):null!=(i=t.animationIteration)?i:"infinite"}}),o={text:we,strong:Me,strikethrough:Be,emphasis:Ee,image:le,html_inline:O},r=p.useAttrs(),l=p.computed(()=>{var e,n;return String(null!=(n=null!=(e=t.node.title)?e:t.node.href)?n:"")});return{__sfc:!0,props:t,cssVars:n,nodeComponents:o,attrs:r,onAnchorEnter:function(e){var n,o,r;if(!t.showTooltip)return;const l=e,i=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0,a=(null==(n=t.node)?void 0:n.title)||(null==(o=t.node)?void 0:o.href)||(null==(r=t.node)?void 0:r.text)||"";Q(e.currentTarget,a,"top",!1,i)},onAnchorLeave:function(){t.showTooltip&&ee()},title:l}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return e.node.loading?t("span",e._b({staticClass:"link-loading inline-flex items-baseline gap-1.5",style:n.cssVars,attrs:{"aria-hidden":e.node.loading?"false":"true"}},"span",n.attrs,!1),[t("span",{staticClass:"link-text-wrapper relative inline-flex"},[t("span",{staticClass:"leading-[normal] link-text"},[t("span",{staticClass:"leading-[normal] link-text"},[e._v(e._s(e.node.text))])]),t("span",{staticClass:"underline-anim",attrs:{"aria-hidden":"true"}})])]):t("a",e._b({staticClass:"link-node",style:n.cssVars,attrs:{href:e.node.href,title:e.showTooltip?"":n.title,"aria-label":`Link: ${n.title}`,"aria-hidden":e.node.loading?"true":"false",target:"_blank",rel:"noopener noreferrer"},on:{mouseenter:e=>n.onAnchorEnter(e),mouseleave:n.onAnchorLeave}},"a",n.attrs,!1),e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"emphasis"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"link-text"}-${r}`}})}),1)},[],!1,null,"c6e041bc",null,null).exports,Se=h(p.defineComponent({__name:"InsertNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=k(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:$,link:Te,html_inline:O,strong:Me,emphasis:Ee,strikethrough:Be,highlight:Le,subscript:_e,superscript:Ce,emoji:w,footnote_reference:b,math_inline:xe,reference:be},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("ins",{staticClass:"insert-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"insert"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"insert"}-${r}`}})}),1)},[],!1,null,"ab1ec9bc",null,null).exports,Le=h(p.defineComponent({__name:"HighlightNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=k(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:$,link:Te,html_inline:O,strong:Me,emphasis:Ee,strikethrough:Be,insert:Se,subscript:_e,superscript:Ce,emoji:w,footnote_reference:b,math_inline:xe,reference:be},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("mark",{staticClass:"highlight-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"highlight"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"highlight"}-${r}`}})}),1)},[],!1,null,"38e31bf6",null,null).exports,Ee=h(p.defineComponent({__name:"EmphasisNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=k(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:$,link:Te,html_inline:O,strong:Me,strikethrough:Be,highlight:Le,insert:Se,subscript:_e,superscript:Ce,emoji:w,footnote_reference:b,math_inline:xe,reference:be},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("em",{staticClass:"emphasis-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"emphasis"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"emphasis"}-${r}`}})}),1)},[],!1,null,"8264674d",null,null).exports,Re=h(p.defineComponent({__name:"FootnoteAnchorNode",props:{node:null},setup(e){const t=e;return{__sfc:!0,props:t,scrollToReference:function(e){var n;if(e.preventDefault(),"undefined"==typeof document)return;const o=`fnref-${String(null!=(n=t.node.id)?n:"")}`,r=document.getElementById(o);r&&r.scrollIntoView({behavior:"smooth"})}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("a",{staticClass:"footnote-anchor text-sm text-[#0366d6] hover:underline cursor-pointer",attrs:{href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`},on:{click:n.scrollToReference}},[e._v(" ↩︎ ")])},[],!1,null,"4756ce0d",null,null).exports,Ne=h(p.defineComponent({__name:"FootnoteNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},emits:["copy"],setup:e=>({__sfc:!0,props:e,NodeRenderer:We})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2",attrs:{id:`fnref--${e.node.id}`}},[t("div",{staticClass:"flex-1"},[t(n.NodeRenderer,{attrs:{"index-key":`footnote-${n.props.indexKey}`,nodes:n.props.node.children,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)])},[],!1,null,null,null,null).exports,Ie=h(p.defineComponent({__name:"HardBreakNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this._self._c;return this._self._setupProxy,e("br",{staticClass:"hard-break"})},[],!1,null,"50c58f70",null,null).exports,Pe=h(p.defineComponent({__name:"HeadingNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=k(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:$,link:Te,image:le,strong:Me,emphasis:Ee,strikethrough:Be,highlight:Le,insert:Se,subscript:_e,superscript:Ce,emoji:w,checkbox:f,checkbox_input:f,footnote_reference:b,hardbreak:Ie,math_inline:xe,reference:be},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(`h${e.node.level}`,{tag:"component",staticClass:"heading-node",class:[`heading-${e.node.level}`],attrs:{dir:"auto"}},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"heading"}-${r}`,tag:"component",attrs:{"custom-id":n.props.customId,node:o,"index-key":`${e.indexKey||"heading"}-${r}`}})}),1)},[],!1,null,"ac93e8bf",null,null).exports,He=h(p.defineComponent({__name:"ListItemNode",props:{item:null,indexKey:null,value:null,customId:null,typewriter:{type:Boolean}},setup(e){const t=e,n=p.computed(()=>null==t.value?{}:{value:t.value});return{__sfc:!0,props:t,liValueAttr:n,NodeRenderer:We}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("li",e._b({staticClass:"list-item pl-1.5 my-2",attrs:{dir:"auto"}},"li",n.liValueAttr,!1),[t(n.NodeRenderer,{attrs:{"index-key":`list-item-${n.props.indexKey}`,nodes:n.props.item.children,"custom-id":n.props.customId,typewriter:n.props.typewriter,"batch-rendering":!1},on:{copy:function(t){return e.$emit("copy",t)}}})],1)},[],!1,null,"a690b83a",null,null).exports,De=h(p.defineComponent({__name:"ListNode",props:{node:null,customId:null,indexKey:null,typewriter:{type:Boolean}},emits:["copy"],setup:e=>({__sfc:!0,ListItemNode:He})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(e.node.ordered?"ol":"ul",{tag:"component",staticClass:"list-node",class:{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}},e._l(e.node.items,function(o,r){var l;return t(n.ListItemNode,{key:`${e.indexKey||"list"}-${r}`,attrs:{item:o,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,value:e.node.ordered?(null!=(l=e.node.start)?l:1)+r:void 0},on:{copy:function(t){return e.$emit("copy",t)}}})}),1)},[],!1,null,"d4344dd3",null,null).exports,je=h(p.defineComponent({__name:"ParagraphNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=k(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({inline_code:$,image:le,link:Te,hardbreak:Ie,emphasis:Ee,strong:Me,strikethrough:Be,highlight:Le,insert:Se,subscript:_e,superscript:Ce,html_inline:O,emoji:w,checkbox:f,math_inline:xe,checkbox_input:f,reference:be,footnote_anchor:Re,footnote_reference:b},n),katexReady:ge()}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("p",{staticClass:"paragraph-node",attrs:{dir:"auto"}},[e._l(e.node.children,function(o,r){return["text"!==o.type?t(n.nodeComponents[o.type],{key:`${e.indexKey||"paragraph"}-${r}`,tag:"component",attrs:{node:o,"index-key":`${e.indexKey}-${r}`,"custom-id":n.props.customId}}):t("span",{key:`${e.indexKey||"paragraph"}-${r}`,staticClass:"whitespace-pre-wrap break-words text-node",class:[n.katexReady&&o.center?"text-node-center":""]},[e._v(" "+e._s(o.content)+" ")])]})],2)},[],!1,null,"ab961ef3",null,null).exports,Oe=h(p.defineComponent({__name:"PreCodeNode",props:{node:null},setup(e){const t=e,n=p.computed(()=>{var e,n,o;const r=String(null!=(n=null==(e=t.node)?void 0:e.language)?n:"");return String(null!=(o=String(r).split(/\s+/g)[0])?o:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),o=p.computed(()=>`language-${n.value}`),r=p.computed(()=>{const e=n.value;return e?`Code block: ${e}`:"Code block"});return{__sfc:!0,props:t,normalizedLanguage:n,languageClass:o,ariaLabel:r}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("pre",{class:[n.languageClass],attrs:{"aria-busy":!0===e.node.loading,"aria-label":n.ariaLabel,"data-language":n.normalizedLanguage,tabindex:"0"}},[t("code",{attrs:{translate:"no"},domProps:{textContent:e._s(e.node.code)}})])},[],!1,null,null,null,null).exports,$e=h(p.defineComponent({__name:"TableNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},emits:["copy"],setup(e){const t=e,n=p.computed(()=>{var e;return null!=(e=t.node.loading)&&e}),o=p.computed(()=>{var e;return null!=(e=t.node.rows)?e:[]});return{__sfc:!0,props:t,isLoading:n,bodyRows:o,NodeRenderer:We}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"table-node-wrapper"},[t("table",{staticClass:"my-8 text-sm table-node",class:{"table-node--loading":n.isLoading},attrs:{"aria-busy":n.isLoading}},[t("thead",{staticClass:"border-[var(--table-border,#cbd5e1)] border-solid"},[t("tr",{staticClass:"border-b border-solid"},e._l(e.node.header.cells,function(o,r){return t("th",{key:`header-${r}`,staticClass:"font-semibold p-[calc(4/7*1em)]",class:["right"===o.align?"text-right":"center"===o.align?"text-center":"text-left"],attrs:{dir:"auto"}},[t(n.NodeRenderer,{attrs:{nodes:o.children,"index-key":`table-th-${n.props.indexKey}`,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)}),0)]),t("tbody",e._l(n.bodyRows,function(o,r){return t("tr",{key:`row-${r}`,staticClass:"border-[var(--table-border,#cbd5e1)] border-solid",class:[r<n.bodyRows.length-1?"border-b":""]},e._l(o.cells,function(o,l){return t("td",{key:`cell-${r}-${l}`,staticClass:"p-[calc(4/7*1em)]",class:["right"===o.align?"text-right":"center"===o.align?"text-center":"text-left"],attrs:{dir:"auto"}},[t(n.NodeRenderer,{attrs:{nodes:o.children,"index-key":`table-td-${n.props.indexKey}`,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)}),0)}),0)]),t("transition",{attrs:{name:"table-node-fade"}},[n.isLoading?t("div",{staticClass:"table-node__loading",attrs:{role:"status","aria-live":"polite"}},[e._t("loading",function(){return[t("span",{staticClass:"table-node__spinner animate-spin",attrs:{"aria-hidden":"true"}}),t("span",{staticClass:"sr-only"},[e._v("Loading")])]},{isLoading:n.isLoading})],2):e._e()])],1)},[],!1,null,"2b3c2be6",null,null).exports,Ae=h(p.defineComponent({__name:"ThematicBreakNode",setup:e=>({__sfc:!0})}),function(){var e=this._self._c;return this._self._setupProxy,e("hr",{staticClass:"hr-node"})},[],!1,null,"639cbad9",null,null).exports,ze=h(p.defineComponent({__name:"FallbackComponent",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"unknown-node"},[e._v(" "+e._s(e.node.raw)+" ")])},[],!1,null,"89aff01f",null,null).exports,Fe=h(p.defineComponent({__name:"VmrContainerNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},setup(e){const t=e,n=p.computed(()=>`vmr-container vmr-container-${t.node.name}`),o=k(t.customId),r=s({text:we,paragraph:je,heading:Pe,inline_code:$,link:Te,image:le,strong:Me,emphasis:Ee,strikethrough:Be,insert:Se,subscript:_e,superscript:Ce,checkbox:f,checkbox_input:f,hardbreak:Ie,math_inline:xe,reference:be,list:De,math_block:ke,table:$e},o);return{__sfc:!0,props:t,containerClass:n,overrides:o,nodeComponents:r,getNodeComponent:function(e){return r[e]||ze}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",e._b({class:n.containerClass},"div",e.node.attrs,!1),e._l(e.node.children,function(o,r){return t(n.getNodeComponent(o.type),{key:`${e.indexKey||"vmr-container"}-${r}`,tag:"component",attrs:{"custom-id":n.props.customId,node:o,"index-key":`${e.indexKey||"vmr-container"}-${r}`}})}),1)},[],!1,null,"841500ff",null,null).exports,Ve=h(p.defineComponent({__name:"HtmlBlockNode",props:{node:null,customId:null},setup(e){const t=e,n=p.computed(()=>{const e=t.node.attrs;if(e){if(Array.isArray(e)){const t={};for(const n of e){if(!n||n.length<2)continue;const[e,o]=n;null!=e&&(t[String(e)]=null==o?"":String(o))}return t}return e}}),o=p.computed(()=>k(t.customId)),r=p.defineComponent({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),l=p.computed(()=>{const e=t.node.content;if(!e)return{mode:"html",content:""};if(!D(e,o.value))return{mode:"html",content:e};const n=j(e,o.value);return null===n?{mode:"html",content:e}:{mode:"dynamic",nodes:n}}),i=p.ref(null),a=p.ref("undefined"==typeof window),s=p.ref(t.node.content),u=re();let c=null;const d=!!t.node.loading;return"undefined"!=typeof window?(p.watch(i,e=>{var n;if(null==(n=null==c?void 0:c.destroy)||n.call(c),c=null,!d)return a.value=!0,void(s.value=t.node.content);if(!e)return void(a.value=!1);const o=u(e,{rootMargin:"400px"});c=o,a.value=o.isVisible.value,o.whenVisible.then(()=>{a.value=!0})},{immediate:!0}),p.watch(()=>t.node.content,e=>{d&&!a.value||(s.value=e)})):a.value=!0,p.onBeforeUnmount(()=>{var e;null==(e=null==c?void 0:c.destroy)||e.call(c),c=null}),{__sfc:!0,props:t,boundAttrs:n,customComponents:o,DynamicRenderer:r,renderMode:l,htmlRef:i,shouldRender:a,renderContent:s,registerVisibility:u,visibilityHandle:c,isDeferred:d}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",e._b({ref:"htmlRef",staticClass:"html-block-node"},"div",n.boundAttrs,!1),[n.shouldRender?["dynamic"===n.renderMode.mode?t(n.DynamicRenderer,{attrs:{nodes:n.renderMode.nodes}}):t("div",{domProps:{innerHTML:e._s(n.renderContent)}})]:t("div",{staticClass:"html-block-node__placeholder"},[e._t("placeholder",function(){return[t("span",{staticClass:"html-block-node__placeholder-bar"}),t("span",{staticClass:"html-block-node__placeholder-bar w-4/5"}),t("span",{staticClass:"html-block-node__placeholder-bar w-2/3"})]},{node:e.node})],2)],2)},[],!1,null,"5f3e95bd",null,null).exports,We=h(p.defineComponent({__name:"NodeRenderer",props:{content:null,nodes:null,final:{type:Boolean},parseOptions:null,customMarkdownIt:null,debugPerformance:{type:Boolean,default:!1},customHtmlTags:null,viewportPriority:{type:Boolean},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:null,codeBlockLightTheme:null,codeBlockMonacoOptions:null,renderCodeBlocksAsPre:{type:Boolean},codeBlockMinWidth:null,codeBlockMaxWidth:null,codeBlockProps:null,themes:null,isDark:{type:Boolean},customId:null,indexKey:null,typewriter:{type:Boolean,default:!0},batchRendering:{type:Boolean,default:!0},initialRenderBatchSize:{default:40},renderBatchSize:{default:80},renderBatchDelay:{default:16},renderBatchBudgetMs:{default:6},renderBatchIdleTimeoutMs:{default:120},deferNodesUntilVisible:{type:Boolean,default:!0},maxLiveNodes:{default:320},liveNodeBuffer:{default:60}},emits:["copy","handleArtifactClick","click","mouseover","mouseout"],setup(e,{emit:t}){var n,o,r;const l=e,i=p.ref(),a=p.ref(!1),h=/auto|scroll|overlay/i,y="undefined"!=typeof window,x=p.computed(()=>l.debugPerformance&&y&&"undefined"!=typeof console);function C(e,t){x.value&&console.info(`[markstream-vue2][perf] ${e}`,t)}function _(e){if("undefined"==typeof window)return null;const t=null!=e?e:i.value;if(!t)return null;const n=t.ownerDocument||document,o=n.scrollingElement||n.documentElement;let r=t;for(;r&&r!==n.body&&r!==o;){const e=window.getComputedStyle(r),t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();if(h.test(t)||h.test(n))return r;r=r.parentElement}return null}const M=l.customId?`renderer-${l.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,B=d.getMarkdown(M),T=p.computed(()=>{const e=l.customHtmlTags;return e&&0!==e.length?d.getMarkdown(M,{customHtmlTags:e}):B}),S=p.computed(()=>{const e=T.value;return l.customMarkdownIt?l.customMarkdownIt(e):e});function L(e){const t=String(null!=e?e:"").trim();if(!t)return"";const n=t.match(/^[<\s/]*([A-Z][\w-]*)/i);return n?n[1].toLowerCase():""}const E=p.computed(()=>{var e,t,n,o;const r=null!=(e=l.parseOptions)?e:{},i=null!=(t=l.final)?t:r.final,a=[...null!=(n=l.customHtmlTags)?n:[],...null!=(o=r.customHtmlTags)?o:[]].map(L).filter(Boolean);return a.length?u(s({},r),{final:i,customHtmlTags:Array.from(new Set(a))}):null==i?r:u(s({},r),{final:i})}),R=p.computed(()=>{var e;if(null==(e=l.nodes)?void 0:e.length)return p.markRaw(l.nodes.slice());if(l.content){const e=x.value?performance.now():0,t=d.parseMarkdownToStructure(l.content,S.value,E.value);return x.value&&C("parse(sync)",{ms:Math.round(performance.now()-e),nodes:t.length,contentLength:l.content.length}),p.markRaw(t)}return[]}),N=p.computed(()=>{var e;return Math.max(1,null!=(e=l.maxLiveNodes)?e:320)}),I=p.computed(()=>{var e;return!((null!=(e=l.maxLiveNodes)?e:0)<=0)&&R.value.length>N.value}),P=p.computed(()=>!1!==l.viewportPriority&&!a.value),H=function(e,t){const n="undefined"!=typeof window&&"undefined"!=typeof document,o="boolean"==typeof t?p.ref(t):t;let r=null,l=null;const i=new WeakMap,a=(t,a)=>{const u=p.ref(!1);let c,d=!1;const m=new Promise(e=>{c=()=>{d||(d=!0,e())}}),h=()=>{try{null==r||r.unobserve(t)}catch(e){}i.delete(t)};if(!n||!o.value)return u.value=!0,c(),{isVisible:u,whenVisible:m,destroy:h};!l&&a&&(l=s({},a));const v=function(t){var o,a,s;if(r||!n)return r;if("undefined"==typeof IntersectionObserver)return null;const u=null!=(o=null==e?void 0:e(null!=t?t:null))?o:null,c=l||{};return r=new IntersectionObserver(e=>{for(const n of e){const e=i.get(n.target);if(e&&(n.isIntersecting||n.intersectionRatio>0)){if(!e.visible.value){e.visible.value=!0;try{e.resolve()}catch(t){}}null==r||r.unobserve(n.target),i.delete(n.target)}}},{root:u,rootMargin:null!=(a=c.rootMargin)?a:"300px",threshold:null!=(s=c.threshold)?s:0}),r}(t);return v?(i.set(t,{resolve:c,visible:u}),v.observe(t),{isVisible:u,whenVisible:m,destroy:h}):(u.value=!0,c(),{isVisible:u,whenVisible:m,destroy:h})};return p.provide(oe,a),a}(e=>{var t;return _(null!=(t=null!=e?e:i.value)?t:null)},P),D=y&&"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame.bind(window):null,j=y&&"function"==typeof window.cancelAnimationFrame?window.cancelAnimationFrame.bind(window):null,A="undefined"!=typeof globalThis&&void 0!==globalThis.process&&"test"===(null==(o=null==(n=globalThis.process)?void 0:n.env)?void 0:o.NODE_ENV),z=y&&"function"==typeof window.requestIdleCallback,F=p.computed(()=>{var e;const t=Math.trunc(null!=(e=l.renderBatchSize)?e:80);return Number.isFinite(t)?Math.max(0,t):0}),V=p.computed(()=>{var e;const t=Math.trunc(null!=(e=l.initialRenderBatchSize)?e:F.value);return Number.isFinite(t)?Math.max(0,t):F.value}),W=p.computed(()=>!1!==l.batchRendering&&F.value>0&&y&&!A),K=p.ref(0),U=p.ref({key:l.indexKey,total:0}),X=p.ref(Math.max(1,F.value||1)),q=p.reactive({}),Y=new Map,Z=new Map,G=new Map,J=p.ref(null);let Q=null,ee=null;const te=p.reactive({start:0,end:0}),ne=p.computed(()=>{if(!I.value)return R.value.map((e,t)=>({node:e,index:t}));const e=R.value.length,t=Ye(te.start,0,e),n=Ye(te.end,t,e);return R.value.slice(t,n).map((e,n)=>({node:e,index:t+n}))}),re=p.computed(()=>{var e;return!1!==l.deferNodesUntilVisible&&!((null!=(e=l.maxLiveNodes)?e:0)<=0)&&!I.value&&!(R.value.length>900)&&P.value}),ie=p.computed(()=>{var e;return W.value&&(null!=(e=l.maxLiveNodes)?e:0)<=0}),ae=p.ref({batchSize:F.value,initial:V.value,delay:null!=(r=l.renderBatchDelay)?r:16,enabled:ie.value}),se=p.computed(()=>!!H&&(re.value||I.value)),ue=p.computed(()=>{var e;return Math.max(0,null!=(e=l.liveNodeBuffer)?e:60)}),ce=p.ref(0),de=new Map,pe=p.getCurrentInstance();function me(){var e,t,n,o;const r=null==pe?void 0:pe.proxy;if(!r||!r.$refs)return;const l=r.$refs,i=new Set;for(const a of ne.value){const r=null!=(e=l[`node-slot-${a.index}`])?e:null,s=null!=(t=l[`node-content-${a.index}`])?t:null;(null!=(n=G.get(a.index))?n:null)!==r&&ut(a.index,r),(null!=(o=de.get(a.index))?o:null)!==s&&ct(a.index,s),i.add(a.index)}for(const a of Array.from(G.keys()))i.has(a)||ut(a,null);for(const a of Array.from(de.keys()))i.has(a)||ct(a,null)}const he=p.computed(()=>{if(!I.value)return R.value.length;const e=ue.value,t=Math.max(te.end+e,V.value),n=Math.min(R.value.length,t);return Math.max(K.value,n)});function ve(e){var t,n,o,r;const l=_(null!=(t=null!=e?e:i.value)?t:null);if(l)return l;const a=null!=(r=null!=(o=null==e?void 0:e.ownerDocument)?o:null==(n=i.value)?void 0:n.ownerDocument)?r:"undefined"!=typeof document?document:null;return(null==a?void 0:a.scrollingElement)||(null==a?void 0:a.documentElement)||null}function fe(e){if(!y)return!1;try{const t=window.getComputedStyle(e);return!!(t.display||"").toLowerCase().includes("flex")&&(t.flexDirection||"").toLowerCase().endsWith("reverse")}catch(t){return!1}}function ge(e,t,n){var o,r,l,i,a,s;if(n)return null!=(i=null!=(l=null==(o=null==t?void 0:t.documentElement)?void 0:o.scrollTop)?l:null==(r=null==t?void 0:t.body)?void 0:r.scrollTop)?i:0;const u=e.scrollTop;if(!fe(e))return u;const c=u<0?-u:u;return Math.max(0,(null!=(a=e.scrollHeight)?a:0)-(null!=(s=e.clientHeight)?s:0))-c}function ye(e,t){let n=e,o=0,r=0;for(;n&&n!==t&&r++<64;)o+=n.offsetTop||0,n=n.offsetParent;return o}function He(){Q&&(Q(),Q=null),J.value=null}function We(){if(!y||!I.value)return;const e=ve();if(!e||J.value===e)return;He();const t=()=>Xe();e.addEventListener("scroll",t,{passive:!0}),J.value=e,Q=()=>{e.removeEventListener("scroll",t)}}function Ue(){var e,t,n;if(!ee)return;const o=null!=(n=null==(t=null==(e=i.value)?void 0:e.ownerDocument)?void 0:t.defaultView)?n:"undefined"!=typeof window?window:null;ee.viaTimeout?o?o.clearTimeout(ee.id):clearTimeout(ee.id):null==j||j(ee.id),ee=null}function Xe(e={}){var t,n,o;if(!I.value)return;if(!y)return void qe(!0);if(e.immediate)return Ue(),void qe(!0);if(ee)return;const r=()=>{ee=null,qe()};if(D)ee={id:D(r),viaTimeout:!1};else{const e=null!=(o=null==(n=null==(t=i.value)?void 0:t.ownerDocument)?void 0:n.defaultView)?o:"undefined"!=typeof window?window:null,l=e?e.setTimeout(r,16):setTimeout(r,16);ee={id:l,viaTimeout:!0}}}function qe(e=!1){var t,n,o,r,l,a,s;if(!I.value)return;const u=J.value||ve();if(!u)return;const c=u.ownerDocument||(null==(t=i.value)?void 0:t.ownerDocument)||document,d=(null==c?void 0:c.defaultView)||("undefined"!=typeof window?window:null),p=u===(null==c?void 0:c.documentElement)||u===(null==c?void 0:c.body),m=R.value.length;if(!p&&m>0&&fe(u)){const t=u.clientHeight||0,n=u.scrollTop,o=n<0?-n:n,r=Ye(lt(Math.max(0,o)+.5*Math.max(0,t)),0,Math.max(0,m-1));return void((e||Math.abs(r-ce.value)>1)&&(ce.value=r))}const h=p?null:u.getBoundingClientRect(),v=p?0:h.top,f=p?null!=(o=null!=(n=null==d?void 0:d.innerHeight)?n:u.clientHeight)?o:0:h.bottom,g=Array.from(G.entries()).sort((e,t)=>e[0]-t[0]);let w=null,y=null;for(const[i,k]of g){if(!k)continue;const e=k.getBoundingClientRect();e.bottom<=v||e.top>=f||(null==w&&(w=i),y=i)}if(null==w||null==y){const e=i.value;if(!e)return;const t=p?{top:0}:u.getBoundingClientRect(),n=ge(u,c,p),o=p?(()=>{const n=e.getBoundingClientRect(),o=(p?0:t.top)-n.top;return Math.max(0,o)})():(()=>{const t=ye(e,u);return Math.max(0,n-t)})(),m=p?null!=(s=null!=(a=null!=(l=null==d?void 0:d.innerHeight)?l:null==(r=null==c?void 0:c.documentElement)?void 0:r.clientHeight)?a:u.clientHeight)?s:0:u.clientHeight,h=rt(o+.5*Math.max(0,m));return void(ce.value=Ye(h,0,Math.max(0,R.value.length-1)))}const x=Math.round((w+y)/2);!e&&Math.abs(x-ce.value)<=1||(ce.value=Ye(x,0,Math.max(0,R.value.length-1)))}function Ye(e,t,n){return Math.min(Math.max(e,t),n)}function Ze(){const e=R.value.length;if(!I.value||0===e)return te.start=0,void(te.end=e);const t=Math.min(N.value,e),n=ue.value,o=Ye(ce.value-n,0,Math.max(0,e-t));te.start=o,te.end=Math.min(e,o+t)}const Ge=p.reactive({}),Je=p.reactive({total:0,count:0});function Qe(e,t){if(!Number.isFinite(t)||t<=0)return;const n=Ge[e];Ge[e]=t,n?Je.total+=t-n:(Je.total+=t,Je.count++)}const et=p.computed(()=>Je.count>0?Math.max(12,Je.total/Je.count):32);function tt(e,t){var n;if(e>=t)return 0;let o=0;for(let r=e;r<t;r++)o+=null!=(n=Ge[r])?n:et.value;return o}const nt=p.computed(()=>I.value?tt(0,Math.min(te.start,R.value.length)):0),ot=p.computed(()=>{if(!I.value)return 0;const e=R.value.length;return tt(Math.min(te.end,e),e)});function rt(e){var t;if(e<=0)return 0;let n=e;const o=R.value;for(let r=0;r<o.length;r++){const e=null!=(t=Ge[r])?t:et.value;if(n<=e)return r;n-=e}return Math.max(0,o.length-1)}function lt(e){var t;const n=R.value;if(!n.length)return 0;if(e<=0)return Math.max(0,n.length-1);let o=e;for(let r=n.length-1;r>=0;r--){const e=null!=(t=Ge[r])?t:et.value;if(o<=e)return r;o-=e}return 0}function it(e){if(Y.size&&I.value)for(const[t,n]of Y)t>=e&&(n.destroy(),Y.delete(t),re.value&&delete q[t],gt(t),G.delete(t))}function at(e,t){re.value&&(q[e]=t),t&&(I.value?Xe():ce.value=Ye(e,0,Math.max(0,R.value.length-1)))}function st(e){const t=Y.get(e);t&&(t.destroy(),Y.delete(e)),gt(e)}function ut(e,t){if(t?G.set(e,t):G.delete(e),t||gt(e),!se.value||!H)return st(e),void(t?at(e,!0):re.value&&delete q[e]);if(!I.value&&re.value&&!a.value&&Y.size>=640&&(yt("too-many-targets"),!se.value||!H))return st(e),void(t?at(e,!0):re.value&&delete q[e]);if(e<V.value&&!I.value)return st(e),void at(e,!0);if(!t)return st(e),void(re.value&&delete q[e]);st(e);const n=H(t,{rootMargin:"400px"});n&&(Y.set(e,n),at(e,n.isVisible.value),re.value&&wt(e),n.whenVisible.then(()=>{gt(e),at(e,!0)}).catch(()=>{}).finally(()=>{Y.get(e)===n&&Y.delete(e);try{n.destroy()}catch(t){}}),I.value&&Xe())}function ct(e,t){t?(de.set(e,t),queueMicrotask(()=>{Qe(e,t.offsetHeight)})):de.delete(e)}p.onMounted(()=>{y&&p.nextTick(me)}),p.watch(ne,()=>{y&&p.nextTick(me)}),p.watch(K,()=>{y&&p.nextTick(me)}),p.watch(I,()=>{y&&p.nextTick(me)});let dt=null,pt=null,mt=!1,ht=null,vt=null;function ft(){y&&(null!=dt&&(null==j||j(dt),dt=null),null!=pt&&(window.clearTimeout(pt),pt=null),null!=vt&&"function"==typeof window.cancelIdleCallback&&(window.cancelIdleCallback(vt),vt=null),mt=!1,ht=null)}function gt(e){if(!y)return;const t=Z.get(e);null!=t&&(window.clearTimeout(t),Z.delete(e))}function wt(e){if(!y||!re.value)return;gt(e);const t=e%17*23,n=window.setTimeout(()=>{var t,n;if(Z.delete(e),!re.value)return;if(!0===q[e])return;const o=G.get(e);if(!o)return void delete q[e];const r=ve(o),l=o.ownerDocument||document,i=l.defaultView||window,a=!r||r===l.documentElement||r===l.body,s=!a&&r?r.getBoundingClientRect():null,u=a?0:s.top,c=a?null!=(n=null!=(t=i.innerHeight)?t:null==r?void 0:r.clientHeight)?n:0:s.bottom,d=o.getBoundingClientRect();d.bottom>=u-500&&d.top<=c+500&&at(e,!0)},1800+t);Z.set(e,n)}function yt(e){var t;if(!a.value){a.value=!0,void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("exports.js",document.baseURI).href}&&(null==(t={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:t.DEV)&&"undefined"!=typeof console&&console.warn("[markstream-vue2] viewportPriority auto-disabled:",e);for(const e of Y.values())e.destroy();if(Y.clear(),y)for(const e of Z.values())window.clearTimeout(e);Z.clear();for(const e of Object.keys(q))delete q[e]}}function xt(e,t={}){var n,o;if(!ie.value)return;const r=he.value;if(K.value>=r)return;const i=Math.max(1,e),a=e=>{var t;dt=null,pt=null,vt=null,mt=!1;const n=null!=ht?ht:i;ht=null;const o=Math.max(2,null!=(t=l.renderBatchBudgetMs)?t:6),a=e=>{const t="undefined"!=typeof performance?performance.now():Date.now();K.value=Math.min(r,K.value+Math.max(1,e)),it(K.value);const n=("undefined"!=typeof performance?performance.now():Date.now())-t;return bt(n),n};let s=n;for(;(a(s),!(K.value>=r)&&e)&&!(("function"==typeof e.timeRemaining?e.timeRemaining():0)<=.5*o);)s=Math.max(1,Math.round(X.value));K.value<r&&kt()};if(!y||t.immediate)return void a();const s=Math.max(0,null!=(n=l.renderBatchDelay)?n:16);if(ht=null!=ht?Math.max(ht,i):i,!mt){if(mt=!0,!A&&z&&window.requestIdleCallback){const e=Math.max(0,null!=(o=l.renderBatchIdleTimeoutMs)?o:120);return void(vt=window.requestIdleCallback(e=>{a(e)},{timeout:e}))}D&&!A?dt=D(()=>{0!==s?pt=window.setTimeout(()=>a(),s):a()}):pt=window.setTimeout(()=>a(),s)}}function kt(){ie.value&&xt(W.value?Math.max(1,Math.round(X.value)):Math.max(1,F.value))}function bt(e){var t;if(!ie.value)return;const n=Math.max(2,null!=(t=l.renderBatchBudgetMs)?t:6),o=Math.max(1,F.value||1),r=Math.max(1,Math.floor(o/4));e>1.2*n?X.value=Math.max(r,Math.floor(.7*X.value)):e<.5*n&&X.value<o&&(X.value=Math.min(o,Math.ceil(1.2*X.value)))}function Ct(){return c(this,null,function*(){try{return(yield Promise.resolve().then(()=>require("./index3.js"))).default}catch(e){return console.warn('[markstream-vue2] Optional peer dependencies for CodeBlockNode are missing. Falling back to inline-code rendering (no Monaco). To enable full code block features, please install "stream-monaco".',e),Oe}})}function _t(){return c(this,null,function*(){try{return(yield Promise.resolve().then(()=>require("./index4.js"))).default}catch(e){return console.warn('[markstream-vue2] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',e),Oe}})}p.watch([()=>R.value,()=>R.value.length,()=>ie.value,()=>F.value,()=>V.value,()=>l.renderBatchDelay,()=>l.indexKey],()=>{var e;const t=R.value.length,n=U.value,o=l.indexKey,r=void 0!==o&&o!==n.key,i=t!==n.total,a=r||i;U.value={key:o,total:t};const s=ae.value,u=null!=(e=l.renderBatchDelay)?e:16,c=s.batchSize!==F.value||s.initial!==V.value||s.delay!==u||s.enabled!==ie.value;ae.value={batchSize:F.value,initial:V.value,delay:u,enabled:ie.value},(a||c||!ie.value)&&ft(),(a||c)&&(X.value=Math.max(1,F.value||1)),a&&I.value&&Xe({immediate:!0});const d=he.value;if(!t)return K.value=0,void it(0);if(!ie.value)return K.value=d,void it(K.value);const p=r||0===n.total;K.value=p||c?Math.min(d,V.value):Math.min(K.value,d);const m=Math.max(1,V.value||F.value||t);K.value<d?xt(m,{immediate:!y}):it(K.value)},{immediate:!0}),p.watch(()=>I.value,e=>{if(!e)return He(),void Ue();We(),Xe({immediate:!0})},{immediate:!0}),p.watch([()=>R.value.length,()=>I.value],e=>c(this,[e],function*([e,t]){t&&e&&y&&(yield p.nextTick(),Xe({immediate:!0}))}),{flush:"post"}),p.watch(()=>i.value,()=>{I.value&&(We(),Xe({immediate:!0}))}),p.watch(()=>R.value.length,()=>{I.value&&Xe({immediate:!0})}),p.watch(()=>re.value,e=>{if(e)for(const[t,n]of G)ut(t,n);else{for(const e of Y.values())e.destroy();Y.clear();for(const e of Array.from(Z.keys()))gt(e);for(const e of Object.keys(q))delete q[e];for(const[e,t]of G)t&&at(e,!0)}},{immediate:!1}),p.watch([()=>l.viewportPriority,()=>R.value.length],([e,t])=>{!1!==e?a.value&&t<=200&&(a.value=!1):a.value=!1}),p.watch(()=>K.value,()=>{I.value&&Xe({immediate:!0})}),p.watch([ce,N,ue,()=>R.value.length,I],()=>{Ze()},{immediate:!0}),p.watch([()=>R.value.length,I,N,ue,()=>te.start,()=>te.end],([e,t,n,o,r,l])=>{x.value&&C("virtualization",{nodes:e,virtualization:t,maxLiveNodes:n,buffer:o,focusIndex:ce.value,scroll:t?(()=>{const e=J.value||ve();return e?{reverse:fe(e),scrollTop:Math.round(e.scrollTop),scrollTopAbs:Math.round(Math.abs(e.scrollTop)),scrollHeight:Math.round(e.scrollHeight),clientHeight:Math.round(e.clientHeight)}:null})():null,liveRange:{start:r,end:l},rendered:K.value})}),p.watch(()=>he.value,(e,t)=>{ie.value&&("number"==typeof t&&e<=t||e>K.value&&kt())}),p.onBeforeUnmount(()=>{ft();for(const e of Y.values())e.destroy();Y.clear();for(const e of Array.from(Z.keys()))gt(e);He(),Ue()});const Mt=p.computed(()=>l.renderCodeBlocksAsPre?Oe:Ct),Bt={text:we,paragraph:je,heading:Pe,code_block:Ct,list:De,blockquote:v,table:$e,definition_list:g,footnote:Ne,footnote_reference:b,footnote_anchor:Re,admonition:Ke,vmr_container:Fe,hardbreak:Ie,link:Te,image:le,thematic_break:Ae,math_inline:xe,math_block:ke,strong:Me,emphasis:Ee,strikethrough:Be,highlight:Le,insert:Se,subscript:_e,superscript:Ce,emoji:w,checkbox:f,checkbox_input:f,inline_code:$,html_inline:O,reference:be,html_block:Ve};return{__sfc:!0,props:l,emit:t,MAX_DEFERRED_NODE_COUNT:900,MAX_VIEWPORT_OBSERVER_TARGETS:640,VIEWPORT_PRIORITY_RECOVERY_COUNT:200,containerRef:i,viewportPriorityAutoDisabled:a,SCROLL_PARENT_OVERFLOW_RE:h,isClient:y,debugPerformanceEnabled:x,logPerf:C,resolveViewportRoot:_,instanceMsgId:M,defaultMd:B,mdBase:T,mdInstance:S,normalizeCustomTag:L,mergedParseOptions:E,parsedNodes:R,maxLiveNodesResolved:N,virtualizationEnabled:I,viewportPriorityEnabled:P,registerNodeVisibility:H,requestFrame:D,cancelFrame:j,isTestEnv:A,hasIdleCallback:z,resolvedBatchSize:F,resolvedInitialBatch:V,batchingEnabled:W,renderedCount:K,previousRenderContext:U,adaptiveBatchSize:X,nodeVisibilityState:q,nodeVisibilityHandles:Y,nodeVisibilityFallbackTimers:Z,nodeSlotElements:G,scrollRootElement:J,detachScrollHandler:Q,pendingFocusSync:ee,liveRange:te,visibleNodes:ne,deferNodes:re,incrementalRenderingActive:ie,previousBatchConfig:ae,shouldObserveSlots:se,liveNodeBufferResolved:ue,focusIndex:ce,nodeContentElements:de,instance:pe,syncNodeRefs:me,desiredRenderedCount:he,resolveScrollContainer:ve,isReverseFlexScrollRoot:fe,getNormalizedScrollTop:ge,getOffsetTopWithinRoot:ye,cleanupScrollListener:He,setupScrollListener:We,cancelScheduledFocusSync:Ue,scheduleFocusSync:Xe,syncFocusToScroll:qe,clamp:Ye,updateLiveRange:Ze,nodeHeights:Ge,heightStats:Je,recordNodeHeight:Qe,averageNodeHeight:et,estimateHeightRange:tt,topSpacerHeight:nt,bottomSpacerHeight:ot,estimateIndexForOffset:rt,estimateIndexForOffsetFromEnd:lt,cleanupNodeVisibility:it,markNodeVisible:at,shouldRenderNode:function(e){return!(ie.value&&e>=K.value)&&(!re.value||e<V.value||!0===q[e])},destroyNodeHandle:st,setNodeSlotElement:ut,setNodeContentRef:ct,batchRaf:dt,batchTimeout:pt,batchPending:mt,pendingIncrement:ht,batchIdle:vt,VIEWPORT_FALLBACK_DELAY:1800,VIEWPORT_FALLBACK_MARGIN_PX:500,cancelBatchTimers:ft,clearVisibilityFallback:gt,scheduleVisibilityFallback:wt,autoDisableViewportPriority:yt,scheduleBatch:xt,queueNextBatch:kt,adjustAdaptiveBatchSize:bt,CodeBlockNodeAsync:Ct,MermaidBlockNodeAsync:_t,codeBlockComponent:Mt,nodeComponents:Bt,getNodeComponent:function(e){var t;if(!e)return ze;const n=k(l.customId),o=n[String(e.type)];if("code_block"===e.type){if("mermaid"===String(null!=(t=e.language)?t:"").trim().toLowerCase())return n.mermaid||_t;if(o)return o;return n.code_block||Mt.value}return o||Bt[String(e.type)]||ze},getBindingsFor:function(e){var t;return"code_block"===(null==e?void 0:e.type)&&"mermaid"===String(null!=(t=e.language)?t:"").trim().toLowerCase()?{}:"code_block"===e.type?s({stream:l.codeBlockStream,darkTheme:l.codeBlockDarkTheme,lightTheme:l.codeBlockLightTheme,monacoOptions:l.codeBlockMonacoOptions,themes:l.themes,minWidth:l.codeBlockMinWidth,maxWidth:l.codeBlockMaxWidth},l.codeBlockProps||{}):{typewriter:l.typewriter}},handleContainerClick:function(e){t("click",e)},handleContainerMouseover:function(e){var n;(null==(n=e.target)?void 0:n.closest("[data-node-index]"))&&t("mouseover",e)},handleContainerMouseout:function(e){var n;(null==(n=e.target)?void 0:n.closest("[data-node-index]"))&&t("mouseout",e)}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{ref:"containerRef",staticClass:"markstream-vue2 markdown-renderer",class:[{dark:n.props.isDark},{virtualized:n.virtualizationEnabled}],on:{click:n.handleContainerClick,mouseover:n.handleContainerMouseover,mouseout:n.handleContainerMouseout}},[n.virtualizationEnabled?t("div",{staticClass:"node-spacer",style:{height:`${n.topSpacerHeight}px`},attrs:{"aria-hidden":"true"}}):e._e(),e._l(n.visibleNodes,function(o){var r;return t("div",{key:o.index,ref:`node-slot-${o.index}`,refInFor:!0,staticClass:"node-slot",attrs:{"data-node-index":o.index,"data-node-type":o.node.type}},[n.shouldRenderNode(o.index)?t("div",{ref:`node-content-${o.index}`,refInFor:!0,staticClass:"node-content"},["code_block"!==o.node.type&&!1!==n.props.typewriter?t("transition",{attrs:{name:"typewriter",appear:""}},[t(n.getNodeComponent(o.node),e._b({tag:"component",attrs:{node:o.node,loading:o.node.loading,"index-key":`${e.indexKey||"markdown-renderer"}-${o.index}`,"custom-id":n.props.customId,"is-dark":n.props.isDark},on:{copy:function(e){return n.emit("copy",e)},"handle-artifact-click":function(e){return n.emit("handleArtifactClick",e)}}},"component",n.getBindingsFor(o.node),!1))],1):t(n.getNodeComponent(o.node),e._b({tag:"component",attrs:{node:o.node,loading:o.node.loading,"index-key":`${e.indexKey||"markdown-renderer"}-${o.index}`,"custom-id":n.props.customId,"is-dark":n.props.isDark},on:{copy:function(e){return n.emit("copy",e)},"handle-artifact-click":function(e){return n.emit("handleArtifactClick",e)}}},"component",n.getBindingsFor(o.node),!1))],1):t("div",{staticClass:"node-placeholder",style:{height:`${null!=(r=n.nodeHeights[o.index])?r:n.averageNodeHeight}px`}})])}),n.virtualizationEnabled?t("div",{staticClass:"node-spacer",style:{height:`${n.bottomSpacerHeight}px`},attrs:{"aria-hidden":"true"}}):e._e()],2)},[],!1,null,"0a66c8fa",null,null).exports,Ke=h(p.defineComponent({__name:"AdmonitionNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},emits:["copy"],setup(e,{emit:t}){var n;const o=e,r=p.computed(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const e=o.node.kind||"note";return e.charAt(0).toUpperCase()+e.slice(1)}),l=p.ref(!!o.node.collapsible&&!(null==(n=o.node.open)||n)),i=`admonition-${Math.random().toString(36).slice(2,9)}`;return{__sfc:!0,props:o,emit:t,iconMap:{note:"ℹ️",info:"ℹ️",tip:"💡",warning:"⚠️",danger:"❗",error:"⛔",caution:"⚠️"},displayTitle:r,collapsed:l,toggleCollapse:function(){o.node.collapsible&&(l.value=!l.value)},headerId:i,NodeRenderer:We}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"admonition",class:[`admonition-${n.props.node.kind}`,n.props.isDark?"is-dark":""]},[t("div",{staticClass:"admonition-header",attrs:{id:n.headerId}},[n.iconMap[n.props.node.kind]?t("span",{staticClass:"admonition-icon"},[e._v(e._s(n.iconMap[n.props.node.kind]))]):e._e(),t("span",{staticClass:"admonition-title"},[e._v(e._s(n.displayTitle))]),n.props.node.collapsible?t("button",{staticClass:"admonition-toggle",attrs:{"aria-expanded":!n.collapsed,"aria-controls":`${n.headerId}-content`,title:n.collapsed?"Expand":"Collapse"},on:{click:n.toggleCollapse}},[n.collapsed?t("span",[e._v("▶")]):t("span",[e._v("▼")])]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.collapsed,expression:"!collapsed"}],staticClass:"admonition-content",attrs:{id:`${n.headerId}-content`,"aria-labelledby":n.headerId}},[t(n.NodeRenderer,{attrs:{"index-key":`admonition-${e.indexKey}`,nodes:n.props.node.children,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(e){return n.emit("copy",e)}}})],1)])},[],!1,null,"ee240a2a",null,null).exports;let Ue=!1,Xe=null,qe=!1;function Ye(){return c(this,null,function*(){if(Xe)return Xe;if(qe)return null;try{return Xe=yield import("stream-monaco"),yield function(e){return c(this,null,function*(){if(!Ue)return Ue=!0,e.preloadMonacoWorkers()})}(Xe),Xe}catch(e){return qe=!0,null}})}let Ze=null;function Ge(e){Ze=null!=e?e:null}const Je={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain","c++":"cpp","c#":"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function Qe(e){var t;const n=function(e){if(!e)return"";const t=e.trim();if(!t)return"";const[n]=t.split(/\s+/),[o]=n.split(":");return o.toLowerCase()}(e);return null!=(t=Je[n])?t:n}function et(e){const t=Qe(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";default:return t}}function tt(e){if(Ze){const t=Ze(e);if(null!=t&&""!==t)return t}switch(Qe(e)){case"javascript":case"js":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4.5 11c0 .828427.6715729 1.5 1.5 1.5.8284271 0 1.5-.671573 1.5-1.5V7.5M12.5 8.75C12.5 8.05964406 11.9627417 7.5 11.3 7.5L10.7 7.5C10.0372583 7.5 9.5 8.05964406 9.5 8.75 9.5 9.44035594 10.0372583 10 10.7 10L11.3 10C11.9627417 10 12.5 10.5596441 12.5 11.25 12.5 11.9403559 11.9627417 12.5 11.3 12.5L10.7 12.5C10.0372583 12.5 9.5 11.9403559 9.5 11.25" />\n <path d="m 4,1.5 h 8 c 1.385,0 2.5,1.115 2.5,2.5 v 8 c 0,1.385 -1.115,2.5 -2.5,2.5 H 4 C 2.615,14.5 1.5,13.385 1.5,12 V 4 C 1.5,2.615 2.615,1.5 4,1.5 Z" />\n </g>\n</svg>\n';case"typescript":case"ts":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4 1.5h8A2.5 2.5 0 0114.5 4v8a2.5 2.5 0 01-2.5 2.5H4A2.5 2.5 0 011.5 12V4A2.5 2.5 0 014 1.5" />\n <path d="M12.5 8.75c0-.69-.54-1.25-1.2-1.25h-.6c-.66 0-1.2.56-1.2 1.25S10.04 10 10.7 10h.6c.66 0 1.2.56 1.2 1.25s-.54 1.25-1.2 1.25h-.6c-.66 0-1.2-.56-1.2-1.25m-3-3.75v5M5 7.5h3" />\n </g>\n</svg>\n';case"jsx":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#99d1db" stroke-linecap="round" stroke-linejoin="round">\n <path d="M8 10.8c4.14 0 7.5-1.25 7.5-2.8S12.14 5.2 8 5.2.5 6.45.5 8s3.36 2.8 7.5 2.8" />\n <path d="M5.52 9.4c2.07 3.5 4.86 5.72 6.23 4.95 1.37-.78.8-4.24-1.27-7.75C8.41 3.1 5.62.88 4.25 1.65c-1.37.78-.8 4.24 1.27 7.75" />\n <path d="M5.52 6.6c-2.07 3.5-2.64 6.97-1.27 7.75 1.37.77 4.16-1.45 6.23-4.95s2.64-6.97 1.27-7.75C10.38.88 7.59 3.1 5.52 6.6" />\n <path d="M8.5 8a.5.5 0 01-.5.5.5.5 0 01-.5-.5.5.5 0 01.5-.5.5.5 0 01.5.5" />\n </g>\n</svg>\n';case"tsx":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M8 11.3c4.14 0 7.5-1.28 7.5-2.86S12.14 5.58 8 5.58.5 6.86.5 8.44s3.36 2.87 7.5 2.87Z" />\n <path d="M5.52 9.87c2.07 3.6 4.86 5.86 6.23 5.07 1.37-.8.8-4.34-1.27-7.93S5.62 1.16 4.25 1.95s-.8 4.34 1.27 7.92" />\n <path d="M5.52 7.01c-2.07 3.59-2.64 7.14-1.27 7.93s4.16-1.48 6.23-5.07c2.07-3.58 2.64-7.13 1.27-7.92-1.37-.8-4.16 1.47-6.23 5.06" />\n <path d="M8.5 8.44a.5.5 0 01-.5.5.5.5 0 01-.5-.5.5.5 0 01.5-.5.5.5 0 01.5.5" />\n </g>\n</svg>\n';case"html":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#ef9f76" d="M1.5 1.5h13L13 13l-5 2-5-2z" />\n <path stroke="#c6d0f5" d="M11 4.5H5l.25 3h5.5l-.25 3-2.5 1-2.5-1-.08-1" />\n </g>\n</svg>\n';case"css":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round">\n <path d="m4 1.5h8c1.38 0 2.5 1.12 2.5 2.5v8c0 1.38-1.12 2.5-2.5 2.5h-8c-1.38 0-2.5-1.12-2.5-2.5v-8c0-1.38 1.12-2.5 2.5-2.5z" />\n <path stroke-width=".814" d="m 10.240861,11.529149 c 0,0.58011 0.437448,1.039154 0.96002,1.035371 l 0.451635,-0.0032 c 0.522572,-0.0036 0.949379,-0.451477 0.949379,-1.032848 0,-0.581372 -0.426807,-1.065638 -0.949379,-1.065638 l -0.451635,3.4e-5 c -0.522572,3.9e-5 -0.949379,-0.4855273 -0.949379,-1.0656374 0,-0.5801104 0.426807,-1.0378931 0.949379,-1.0378931 l 0.451635,2.825e-4 c 0.522572,3.267e-4 0.951743,0.4577827 0.951743,1.0378931 M 6.8003972,11.529149 c 0,0.58011 0.4374474,1.039154 0.9600196,1.035371 l 0.46464,-0.0032 c 0.5225722,-0.0035 0.9363738,-0.451477 0.9363738,-1.031587 0,-0.580111 -0.4090724,-1.065638 -0.9316446,-1.065638 l -0.4693692,3.4e-5 c -0.5225722,3.8e-5 -0.949379,-0.4855272 -0.949379,-1.0656373 0,-0.5801104 0.4268068,-1.0378931 0.949379,-1.0378931 h 0.4516348 c 0.5225722,0 0.9635665,0.4577827 0.9635665,1.0378931 M 3.4072246,11.529149 c 0,0.58011 0.4374474,1.051765 0.9600196,1.051765 H 4.818879 c 0.5225722,0 0.949379,-0.456521 0.949379,-1.037893 m 0.01129,-2.1312747 c 0,-0.5801103 -0.4374474,-1.037893 -0.9600196,-1.037893 L 4.3678939,8.3741358 C 3.8453217,8.3744624 3.4078743,8.8420074 3.4078743,9.4233788 v 2.1186642" />\n </g>\n</svg>\n';case"scss":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#f4b8e4" stroke-linecap="round" stroke-linejoin="round" d="M6.75 6.38c1.85 1.07 3.35.74 4.83-.2 1.5-.95 2.7-2.78 1.3-4.15-.7-.68-3.25-.8-5.62.19-2.36.99-4.59 3.02-4.74 4.11-.31 2.19 3.15 2.88 3.64 4.23s.28 1.98-.2 2.83c-.5.85-1.96 1.62-2.8.68-.83-.95 1.67-2.75 2.98-3.25 1.3-.5 3.1-.4 3.69.25.58.64-.07 1.79-.03 1.79" />\n</svg>\n';case"json":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M4.5 2.5H4c-.75 0-1.5.75-1.5 1.5v2c0 1.1-1 2-1.83 2 .83 0 1.83.9 1.83 2v2c0 .75.75 1.5 1.5 1.5h.5m7-11h.5c.75 0 1.5.75 1.5 1.5v2c0 1.1 1 2 1.83 2-.83 0-1.83.9-1.83 2v2c0 .74-.75 1.5-1.5 1.5h-.5m-6.5-3a.5.5 0 100-1 .5.5 0 000 1m3 0a.5.5 0 100-1 .5.5 0 000 1m3 0a.5.5 0 100-1 .5.5 0 000 1" />\n</svg>\n';case"python":case"py":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#8caaee" d="M8.5 5.5h-3m6 0V3c0-.8-.7-1.5-1.5-1.5H7c-.8 0-1.5.7-1.5 1.5v2.5H3c-.8 0-1.5.7-1.5 1.5v2c0 .8.7 1.5 1.48 1.5" />\n <path stroke="#e5c890" d="M10.5 10.5h-3m-3 0V13c0 .8.7 1.5 1.5 1.5h3c.8 0 1.5-.7 1.5-1.5v-2.5H13c.8 0 1.5-.7 1.5-1.5V7c0-.8-.7-1.5-1.48-1.5H11.5c0 1.5 0 2-1 2h-2" />\n <path stroke="#8caaee" d="M2.98 10.5H4.5c0-1.5 0-2 1-2h2M7.5 3.5v0" />\n <path stroke="#e5c890" d="m 8.5,12.5 v 0" />\n </g>\n</svg>\n';case"ruby":case"rb":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="M1.5 9.06v2.5c.02.86.36 1.61.9 2.15 1.76 1.76 5.71.65 8.84-2.47 3.12-3.13 4.23-7.08 2.47-8.84a3.1 3.1 0 00-2.15-.9h-2.5M14.5 4l-.25 10.25L4 14.5m4.39-6.11c2.34-2.35 3.29-5.2 2.12-6.37S6.49 1.8 4.14 4.14C1.8 6.5.85 9.34 2.02 10.51s4.02.22 6.37-2.12M5.5 14.5l.25-3.75L11 11l-.25-5.25 3.75-.25" />\n</svg>\n';case"go":case"golang":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round" d="m15.48 8.06-4.85.48m4.85-.48a4.98 4.98 0 01-4.54 5.42 5 5 0 112.95-8.66l-1.7 1.84a2.5 2.5 0 00-4.18 2.06c.05.57.3 1.1.69 1.51.25.27 1 .83 1.78.82.8-.02 1.58-.25 2.07-.81 0 0 .8-.96.68-1.88M2.5 8.5l-2 .01m1.5 2h1.5m-2-3.99 2-.02" />\n</svg>\n';case"r":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#838ba7" d="M13.5 9.5c.63-.7 1-1.54 1-2.43 0-2.52-2.91-4.57-6.5-4.57S1.5 4.55 1.5 7.07c0 1.9 1.65 3.53 4 4.22" />\n <path stroke="#8caaee" d="M10.5 9.5c.4 0 .86.34 1 .7l1 3.3m-5 0v-8h3.05c.95 0 1.95 1 1.95 2s-1 2-1.95 2H7.5Z" />\n </g>\n</svg>\n';case"java":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#c6d0f5" d="M10.73 8.41c.57 3 1.59 5.83 2.77 7.09-6.63-3.45-9.76-1.75-10.5 0-.66-3.4-.54-5.74.09-7.78" />\n <path stroke="#e78284" d="M8.5 7c.63.34 1.82 1.07 2.24 1.41-.54-2.9-.64-5.96-.74-7.91-2.13.58-5.73 1.98-6.9 7.22.52-.69 1.72-1.05 2.4-1.22" />\n <path stroke="#e78284" d="M5.5 7A1.5 1.5 0 007 8.5 1.5 1.5 0 008.5 7 1.5 1.5 0 007 5.5 1.5 1.5 0 005.5 7" />\n </g>\n</svg>\n';case"kotlin":case"kt":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#ca9ee6" d="M2.5 13.5h11L8 8" />\n <path stroke="#ef9f76" d="M8.03 2.5h5.47l-8 8" />\n <path stroke="#e78284" d="M2.5 13.5V8" />\n <path stroke="#85c1dc" d="M8 2.5H2.5V8l3-2.5" />\n </g>\n</svg>\n';case"c":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="m 4.0559072,12.951629 c 2.7459832,2.734744 7.1981158,2.734744 9.9441188,0 l -1.789955,-1.782586 c -1.75742,1.750224 -4.6067879,1.750224 -6.3642294,0 -1.7574416,-1.7502236 -1.7574416,-4.587893 0,-6.338097 1.7574415,-1.750224 4.6068094,-1.750224 6.3642294,0 l 0.894977,-0.8912929 0.894978,-0.891293 c -2.746003,-2.73472867 -7.1981359,-2.73472867 -9.944119,0 -2.7459858,2.7347089 -2.7459858,7.1685599 2e-7,9.9032689 z" clip-rule="evenodd" />\n</svg>\n';case"cpp":case"c++":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="m 2.5559121,12.951629 c 2.7459832,2.734744 7.1981158,2.734744 9.9441189,0 l -1.789955,-1.782586 c -1.7574201,1.750224 -4.606788,1.750224 -6.3642295,0 -1.7574416,-1.7502236 -1.7574416,-4.587893 0,-6.338097 1.7574415,-1.750224 4.6068094,-1.750224 6.3642295,0 l 0.894977,-0.8912929 0.894978,-0.891293 c -2.7460031,-2.73472867 -7.198136,-2.73472867 -9.9441191,0 -2.74598585,2.7347089 -2.74598585,7.1685599 2e-7,9.9032689 z" clip-rule="evenodd" />\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M7.5 6v4M5.513524 7.9999996H9.51304M13.486476 5.9999996v4M11.5 7.9999992h3.999516" />\n</svg>\n';case"cs":case"csharp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" d="m 6.665625,1.0107144 c 0.54375,0.090628 0.9125,0.6062693 0.821875,1.1500367 L 7.18125,3.9983098 h 2.971875 L 10.5125,1.8326156 c 0.09063,-0.5437673 0.60625,-0.9125291 1.15,-0.8219012 0.54375,0.090628 0.9125,0.6062693 0.821875,1.1500367 L 12.18125,3.9983098 H 14 c 0.553125,0 1,0.4468892 1,1.0000319 0,0.5531426 -0.446875,1.0000319 -1,1.0000319 H 11.846875 L 11.18125,9.9985013 H 13 c 0.553125,0 1,0.4468897 1,1.0000317 0,0.553143 -0.446875,1.000032 -1,1.000032 H 10.846875 L 10.4875,14.164259 c -0.09063,0.543768 -0.60625,0.912529 -1.15,0.821902 -0.54375,-0.09063 -0.9125,-0.60627 -0.821875,-1.150037 l 0.30625,-1.834434 h -2.975 L 5.4875,14.167384 c -0.090625,0.543768 -0.60625,0.91253 -1.15,0.821902 C 3.79375,14.898658 3.425,14.383016 3.515625,13.839249 L 3.81875,11.998565 H 2 c -0.553125,0 -1,-0.446889 -1,-1.000032 C 1,10.445391 1.446875,9.9985013 2,9.9985013 H 4.153125 L 4.81875,5.9983736 H 3 c -0.553125,0 -1,-0.4468893 -1,-1.0000319 C 2,4.445199 2.446875,3.9983098 3,3.9983098 H 5.153125 L 5.5125,1.8326156 C 5.603125,1.2888483 6.11875,0.9200865 6.6625,1.0107144 Z M 6.846875,5.9983736 6.18125,9.9985013 H 9.153125 L 9.81875,5.9983736 Z" />\n</svg>\n';case"php":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M0.5,12.5 L0.5,13.24 C0.5,14 1.27360724,14.5 2,14.5 C2.9375516,14.5 3.5,14 3.5,13.2445661 L3.5,6.00089968 C3.5,4.28551107 4.99401107,2.52263547 7.14960413,2.5 C9.49387886,2.5 11,4.0579782 11,5.5 C11.1657296,8.48962302 9.57820404,9.63684469 7.49621582,10.5 L7.49621582,14.5 L15.4979764,14.5 L15.4979764,9 C15.5394484,8.36478228 14.9387379,7.15595371 14.1308258,6.5 C13.1942239,5.80827275 12.0584852,5.50253264 11,5.5 M11.5,14.5 L11.5,11.5 M6,6.5 C6.27614237,6.5 6.5,6.27614237 6.5,6 C6.5,5.72385763 6.27614237,5.5 6,5.5 C5.72385763,5.5 5.5,5.72385763 5.5,6 C5.5,6.27614237 5.72385763,6.5 6,6.5 Z" />\n</svg>\n';case"scala":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="m2.5 2.48 11-.98v3.04l-11 1zm0 5 11-.98v3.04l-11 1zm0 5 11-.98v3.04l-11 1z" />\n</svg>\n';case"shell":case"sh":case"bash":case"zsh":case"powershell":case"ps1":case"bat":case"batch":case"shellscript":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M2 15.5c-.7 0-1.5-.8-1.5-1.5V5c0-.7.8-1.5 1.5-1.5h9c.7 0 1.5.8 1.5 1.5v9c0 .7-.8 1.5-1.5 1.5z" />\n <path d="m1.2 3.8 3.04-2.5S5.17.5 5.7.5h8.4c.66 0 1.4.73 1.4 1.4v7.73a2.7 2.7 0 01-.7 1.75l-2.68 3.51M3 8.5l3 2-3 2m4 0h2" />\n </g>\n</svg>\n';case"sql":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M8 6.5c3.59 0 6.5-1.4 6.5-2.68S11.59 1.5 8 1.5 1.5 2.54 1.5 3.82 4.41 6.5 8 6.5M14.5 8c0 .83-1.24 1.79-3.25 2.2s-4.49.41-6.5 0S1.5 8.83 1.5 8m13 4.18c0 .83-1.24 1.6-3.25 2-2.01.42-4.49.42-6.5 0-2.01-.4-3.25-1.17-3.25-2m0-8.3v8.3m13-8.3v8.3" />\n</svg>\n';case"yaml":case"yml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="M2.5 1.5h3l3 4 3-4h3l-9 13h-3L7 8z" />\n</svg>\n';case"markdown":case"md":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round" d="m9.25 8.25 2.25 2.25 2.25-2.25M3.5 11V5.5l2.04 3 1.96-3V11m4-.5V5M1.65 2.5h12.7c.59 0 1.15.49 1.15 1v9c0 .51-.56 1-1.15 1H1.65c-.59 0-1.15-.49-1.15-1V3.58c0-.5.56-1.08 1.15-1.08" />\n</svg>\n';case"xml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M4.5 4.5 1 8 4.5 11.5M11.5 4.5 15 8 11.5 11.5M9.5 2 6.5 14" />\n</svg>\n';case"rust":case"rs":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round">\n <path d="M15.5 9.5Q8 13.505.5 9.5l1-1-1-2 2-.5V4.5h2l.5-2 1.5 1 1.5-2 1.5 2 1.5-1 .5 2h2V6l2 .5-1 2z" />\n <path d="M6.5 7.5a1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1 1 1 0 011 1m5 0a1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1 1 1 0 011 1M4 11.02c-.67.37-1.5.98-1.5 2.23s1.22 1.22 2 1.25v-2M12 11c.67.37 1.5 1 1.5 2.25s-1.22 1.22-2 1.25v-2" />\n </g>\n</svg>\n';case"swift":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M14.34 10.2c.34-1.08 1.1-5.07-4.45-8.62a.48.48 0 00-.6.07.44.44 0 00-.02.6c.03.02 2.07 2.5 1.34 5.34-1.26-.86-6.24-4.81-6.24-4.81L7.25 7.5 1.9 4.05S5.68 8.7 8 10.45c-1.12.4-3.56.82-6.78-1.18a.48.48 0 00-.58.06.44.44 0 00-.08.56c.11.18 2.7 4.36 8.14 4.36 1.5 0 2.37-.42 3.08-.77.43-.2.77-.37 1.14-.37.93 0 1.54.92 1.54.93.1.14.27.22.44.21a.46.46 0 00.4-.28c.67-1.55-.49-3.2-.96-3.78h0Z" />\n</svg>\n';case"perl":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M12.5 14.5v-3.34c-1-.66-1-1.35-1-2.66m-3 1 .02 2.53.98 2.47m-4-5v5m9 0V9.23s.17-1.73-1-1.73c0-1.5-.5-6-2.5-6S8.75 4.25 8.75 4.25A3.67 3.67 0 006.5 7.12v-3.5c0-.63-.85-1.32-1.5-1.32-.92 0-1.33.59-1.5 1.2H2.25c-.42.11-.75.59-.75 1 0 .5.28 1 .75 1h1.22l.02 3c.01.75.51 1 1.51 1h4.5" />\n</svg>\n';case"lua":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#c6d0f5" d="M10.5 7A1.5 1.5 0 019 8.5 1.5 1.5 0 017.5 7 1.5 1.5 0 019 5.5 1.5 1.5 0 0110.5 7" />\n <path stroke="#8caaee" d="M7 2.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13m7-2a1.5 1.5 0 100 3 1.5 1.5 0 000-3" />\n </g>\n</svg>\n';case"haskell":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M12.5 4.5h3m-1.5 3h1.5m-10 6 2.5-5-2.5-5H8l5.6 10h-2.53l-1.52-2.92L8 13.5zm-5 0 2.5-5-2.5-5H3l2.5 5-2.5 5z" />\n</svg>\n';case"erlang":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round">\n <path d="M6.5 5.5c0-1.25 1-2 2-2s2 .75 2 2z" />\n <path d="M13.5 13c.47-.57 1.12-1.24 1.5-2l-2.25-1.25c-.74 1.36-1.76 2.75-3.25 2.75-2.1 0-3-2.3-3-5h8c.05-1.61-.31-3.45-1-4.5M3 13c-1.08-1.3-1.5-3-1.5-5S2.1 4.24 3 3" />\n </g>\n</svg>\n';case"clojure":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#a6d189" d="M14.17 10.03A6.5 6.5 0 011.81 6.02" />\n <path stroke="#8caaee" d="M1.87 5.85A6.5 6.5 0 0114.22 9.9" />\n <path stroke="#a6d189" d="M6.36 4.9a3.5 3.5 0 103.41 6.12" />\n <path stroke="#8caaee" d="M9.77 11.02a3.5 3.5 0 00-3.03-6.29" />\n <path stroke="#c6d0f5" d="M8 7.5s-1.66 2.48-1.5 3.65" />\n <path stroke="#c6d0f5" d="M1.81 6.02C2.47 5 3.83 4.49 5 4.46c4.06 0 3 5.56 5.03 6.86 1.21.52 3.5-.21 4.15-1.32" />\n </g>\n</svg>\n';case"vue":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#a6d189" stroke-linecap="round" stroke-linejoin="round">\n <path d="M1 1.5h5.44L8 4.56 9.56 1.5H15l-6.99 13z" />\n <path d="M12.05 1.73 8 9.28 3.95 1.73" />\n </g>\n</svg>\n';case"svg":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="m4.54 10 6.92-4m-6.92 4a1.5 1.5 0 10-2.6 1.5 1.5 1.5 0 002.6-1.5M8 4v8m0-8a1.5 1.5 0 100-3 1.5 1.5 0 000 3M4.54 6l6.92 4M4.54 6a1.5 1.5 0 10-2.6-1.5A1.5 1.5 0 004.54 6M8 12a1.5 1.5 0 100 3 1.5 1.5 0 000-3m3.46-2a1.5 1.5 0 102.6 1.5 1.5 1.5 0 00-2.6-1.5m0-4a1.5 1.5 0 102.6-1.5 1.5 1.5 0 00-2.6 1.5" />\n</svg>\n';case"mermaid":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <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" />\n</svg>\n';case"dart":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round">\n <path d="M7 14.5h4.5v-3h3V7L9.17 1.64c-.28-.29-.8-.47-1.17-.29L3.5 3.5 1.35 8c-.18.37 0 .88.3 1.17z" />\n <path d="M3.5 11V3.5H11m-7.5 0 8 8" />\n </g>\n</svg>\n';case"assembly":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <rect width="8" height="13.001" x="4" y="1.499" fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" rx="2.286" ry="2.286" />\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="M 4,4.500025 H 1.5 M 4,7.9999993 H 1.5 M 4,11.499973 H 1.5 m 13,-6.999948 H 12 m 2.5,3.4999743 H 12 m 2.5,3.4999737 H 12" />\n</svg>\n';case"dockerfile":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M.5 8.5H11l.75-.5a5.35 5.35 0 010-3.5c1 .6 1 1.88 1.74 2 .77-.09 1.23.01 2 .52 0 0-.97 1.77-2.5 1.98-1.93 3.65-4.5 5.5-6.98 5.5C0 14.5.5 8.5.5 8.5m1 0v-2m0 0h8m-6 2v-4m0 0h4m-2-2h2m-2 6v-6m2 6v-6m2 6v-2" />\n</svg>\n';case"fortran":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M7.5 14.5v-1l-1-1v-3h2l1 2h1v-6h-1l-1 2h-2v-4h5l1 3h1v-5h-11v1l1 1v9l-1 1.25v.75z" />\n</svg>\n';case"lisp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round">\n <path d="M.5 5.06v6.07C.5 12.41.82 13 2.27 13h5.6c1.04 0 1.63-.51 1.63-1.62 0-.85-.2-1.88-1.5-1.88h-.36C6.4 9.5 6 8.77 6 7.75 6 6.81 6.8 6 7.49 6h2.68" />\n <path d="M3.5 10.5V4.99C3.5 3.89 3.62 3 5 3h9c.97 0 1.5.99 1.5 1.63.12 1.55-.98 1.62-2.1 2.16-.58.26-1.4.52-1.4.98V11" />\n </g>\n</svg>\n';case"ocaml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round">\n <path d="M1.5 8V3c0-.83.67-1.5 1.5-1.5h10c.83 0 1.5.67 1.5 1.5v10c0 .83-.67 1.5-1.5 1.5H9" />\n <path d="m1.5 8 1.14-2.3q.09-.21.36-.24a.8.8 0 01.44.13c.18.12.23.53.28.64.06.1.64 1.23.85 1.23.2 0 .71-1.47.71-1.47s.37-.49.72-.49.55.32.67.49c.12.16.24 1.76.46 2.01s1.32.87 1.67.73c.34-.13.53-.4.63-.73.1-.34-.14-.75 0-1a1.1 1.1 0 011.02-.55c.56.03 2.05.56 2.05 1.05q0 .75-1.5.75c-.48 1.33.28 2.22-3 2.25l1 4" />\n <path d="m4.5 14.5 1.5-4 1 4zm-2 0 1.5-4-1.5-.5-1 1.54V14l1 .49Z" />\n </g>\n</svg>\n';case"prolog":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M4.5 13.5c-.33.33-.5.67-.5 1s.17.67.5 1c.17-.67.5-1 1-1s.83.33 1 1c.33-.33.5-.83.5-1.5h2c0 .67.17 1.17.5 1.5.17-.67.5-1 1-1s.83.33 1 1c.33-.33.5-.67.5-1s-.17-.67-.5-1l1-1 1.25 1.25c0-2.75 1-2.75 1-5.75a7.1 7.1 0 00-2-5.25A3.64 3.64 0 0113 .5c-1.17 0-2 .42-2.5 1.25A3.08 3.08 0 008 .5c-1 0-1.83.42-2.5 1.25C5 .92 4.17.5 3 .5c.5.83.58 1.58.25 2.25a7.1 7.1 0 00-2 5.25c0 3 1 3 1 5.75L3.5 12.5zm6-5a2 2 0 100-4 2 2 0 000 4m-5 0a2 2 0 100-4 2 2 0 000 4M7 8l1 2.5L9 8m1.5-1.5" />\n</svg>\n';case"groovy":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round">\n <path d="M11.68 5.38c.4.19.54.68 1.53 3.25 1 2.57-.92 4.07-.92 4.07s-6.73 2.47-6.73 1.63c-.18-.92-1.92-2.08-1.92-2.08s-.52-.63.06-.75c5.89-1.27 6.96-.61 7.3-2" />\n <path d="M7.38 10.63C2.62 10.88 2.48 8.08 2.5 8 3.6 4.6 9.24.91 10.8 1.58 14.07 3.04 9.2 8.96 7 8.5c-4.02-.83 1.5-4 1.5-4" />\n </g>\n</svg>\n';case"matlab":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#85c1dc" d="M4 11 .5 8.5 5 7q.78-1.77 1.89-1.89c.74-.07 1.94-1.28 3.61-3.61M5 7l1.5 1.5" />\n <path stroke="#ef9f76" d="m15.5 12.5-5-11C8.5 6.83 6.33 10 4 11c1.67-.33 2.67.83 3 3.5 3.5-1.5 3.5-3.5 5-4s1.5 1.5 3.5 2" />\n </g>\n</svg>\n';case"cobol":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M6.74 2.24c.32-1.32 2.2-1.32 2.52 0a1.3 1.3 0 001.93.8c1.15-.7 2.48.62 1.77 1.77a1.3 1.3 0 00.8 1.93c1.32.32 1.32 2.2 0 2.52a1.3 1.3 0 00-.8 1.93c.7 1.15-.62 2.48-1.77 1.77a1.3 1.3 0 00-1.93.8c-.32 1.32-2.2 1.32-2.52 0a1.3 1.3 0 00-1.93-.8c-1.15.7-2.48-.62-1.77-1.77a1.3 1.3 0 00-.8-1.93c-1.32-.32-1.32-2.2 0-2.52a1.3 1.3 0 00.8-1.93c-.7-1.15.62-2.48 1.77-1.77a1.3 1.3 0 001.93-.8M10 6.5a2.5 2.5 0 100 3" />\n</svg>\n';case"ada":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#0f23c3" d="M24.554 20.075c.209.27 1.356.961 1.37 1.246a7 7 0 0 0-1.4-.324a17 17 0 0 1-1.412-.48a9.2 9.2 0 0 1-2.375-1.3A3.15 3.15 0 0 1 19.3 16.75a1.72 1.72 0 0 1 1.767-1.822a3.6 3.6 0 0 1 1.593.321c.146.066 1.31.606 1.256.809a5.5 5.5 0 0 0-1.41-.112c-.649.244-.4.828-.168 1.311a8 8 0 0 0 1.078 1.554c.164.194.884 1.271 1.138 1.264"/><path fill="#1a1978" d="M24.141 16.276c.128-.59.819-1.384 1.344-.773a4.2 4.2 0 0 1 .578 1.918c.12.656.2 1.327.261 1.982c.038.379.34 1.794.123 2.075a23 23 0 0 1-2.922-2.838a3.76 3.76 0 0 1-.925-1.7c-.1-1.073.879-.73 1.541-.664"/><path fill="#0f23c3" d="M26.3 17.781c.141-.732-.406-2.592-1.067-2.949a.06.06 0 0 0 .044-.007c-.156-.444-1.359 1.116-1.228 1.174c-.316-.138.774-1.984.988-2.16c.7-.578 1.372-.086 1.845.543a6.04 6.04 0 0 1 .733 4.434a4.5 4.5 0 0 1-.421 1.312c-.1.22-.45 1.1-.682 1.174a14.8 14.8 0 0 0-.212-3.521"/><path fill="#d2d2d2" d="M3.687 8.4c.179-.188-.041-1.527.324-1.548c.262-.015.553 1.741.627 1.968a9.2 9.2 0 0 0 1.127 2.329a7.53 7.53 0 0 0 4.016 2.978a4.55 4.55 0 0 0 2.366.2c.931-.208 1.82-.577 2.757-.765c1.35-.27 3.342-.352 4.438.647c.7.641.376.76.043 1.421a2.44 2.44 0 0 0 .178 2.562c.235.342 1.033.827.675 1.094c-.567.424-1.277-.452-1.636-.776c-1.4-1.264-2.711-1.313-4.492-1.074a9 9 0 0 1-4.883-.708A9.47 9.47 0 0 1 3.687 8.4M19.941 30a3.6 3.6 0 0 1-2.325-.817c.469-.092 1.021.025 1.508-.044a9.7 9.7 0 0 0 1.754-.43a10.5 10.5 0 0 0 3.022-1.554a6.55 6.55 0 0 0 2.757-5.214c.149-.088.316 1.034.319 1.091a5.8 5.8 0 0 1-.19 1.727a6.9 6.9 0 0 1-1.423 2.774A7.3 7.3 0 0 1 19.941 30"/><path fill="#d2d2d2" d="M18.962 19.109a5.8 5.8 0 0 1-2.05.859a13.4 13.4 0 0 1-2.224.549a8.86 8.86 0 0 1-4.435-.51a9.94 9.94 0 0 1-3.849-2.4c-.352-.367-2.104-2.417-1.548-3.05c.248-.282.875.846 1 .992a5 5 0 0 0 1.357 1.11a10.9 10.9 0 0 0 4.035 1.456a6.7 6.7 0 0 0 2.34-.094a13 13 0 0 1 1.694-.485a4 4 0 0 1 2.113.457c.344.17 1.523.743 1.567 1.116m9.351-4.031a19.3 19.3 0 0 1-.453 3.774c-.176-.242.016-1.47 0-1.792a6 6 0 0 0-.384-2.087a4.9 4.9 0 0 0-1.376-1.661a15 15 0 0 1-1.27-1.536c-1.837-2.382-3.245-5.211-2.9-8.3c.034-.308.069-1.448.411-1.445c.152 0 .266 1.561.29 1.718a12.5 12.5 0 0 0 1.224 4.116c.67 1.222 1.947 2.023 2.825 3.1a6.58 6.58 0 0 1 1.633 4.113M15.7 26.935a10.85 10.85 0 0 0 6.436-.687a6.94 6.94 0 0 0 4.278-4.418c.319.2-.048 1.529-.128 1.781a5.7 5.7 0 0 1-1.01 1.813a8.9 8.9 0 0 1-3.257 2.514c-1.703.772-5.662 1.652-6.319-1.003"/><path fill="#d2d2d2" d="M19.151 19.376c.367 2.107-2.957 3.124-4.478 3.213c-1.859.11-4.929-.292-6.06-2.031c-.673-1.035.781-.09 1.188.058a8.7 8.7 0 0 0 3.06.5a11.6 11.6 0 0 0 3.305-.5a14 14 0 0 0 1.533-.576c.301-.132 1.124-.691 1.452-.664m4.991 4.084c.4-.945-1.883-1.578-2.445-1.858a4.9 4.9 0 0 1-1.315-.867c-.181-.181-.872-.92-.807-1.219a5 5 0 0 1 1.087-.175a6 6 0 0 1 .855.588a10 10 0 0 0 .964.5a16 16 0 0 0 2.119.771c.308.09 1.549.208 1.727.428c-.04.296-1.97 2.021-2.185 1.832"/><path fill="#d2d2d2" d="M26.1 22.172c.265.43-1.08 1.831-1.363 2.105a9.3 9.3 0 0 1-2.566 1.728a7.8 7.8 0 0 1-2.56.753c-.679.058-1.966-.124-2.141-.979a7 7 0 0 1 1.177-.086c.462-.059.921-.149 1.376-.246a13 13 0 0 0 2.184-.645a11.5 11.5 0 0 0 2.084-1.11a11 11 0 0 0 1.078-.822c.105-.089.617-.702.731-.698m-7.342-10.207c-.1-1.308 2.612-1.3 3.271-1.092a5.98 5.98 0 0 1 2.982 2.475c-1.082.8-2.449.094-3.3-.654a4.3 4.3 0 0 0-1.481-1.029c-.809-.265-.818.094-1.472.3"/><path fill="#d2d2d2" d="M25.783 13.341c-.444-.029-.316.071-.647-.212c-.358-.307-.614-.795-.945-1.141c-.534-.558-1.242-.895-1.723-1.485a7.27 7.27 0 0 1-1.624-4.848c.018-1.489.407.187.551.675a12.3 12.3 0 0 0 1.126 2.708a46 46 0 0 0 3.4 4.321c-.039.002-.097-.021-.138-.018m-5.715 1.415c.033-.625-.911-.792-1.211-1.42c-.164-.343-.211-.569.029-.7c.082-.045.383.012.5-.02c.271-.076.335-.273.581-.4a1.193 1.193 0 0 1 1.633 1.021a1.82 1.82 0 0 1-1.532 1.519"/><path fill="#d2d2d2" d="M20.5 14.745a1.93 1.93 0 0 0 1.323-1.7c.524.139.928.658 1.521.771a2.6 2.6 0 0 0 1.029-.017c.207-.045.54-.274.721-.259c-.033.163-.464.546-.565.717a4.2 4.2 0 0 0-.388.9c-.229.741-.061.739-.709.311a4.3 4.3 0 0 0-1.957-.72c-.266-.026-.881.019-.975-.003m-.595 5.989a2.01 2.01 0 0 1-1.4 1.712c-.205.091-2.018.733-2.032.348c-.007-.2 1.624-.954 1.809-1.11a3.4 3.4 0 0 0 .867-1.071c.055-.112.232-.925.271-.943c.224-.106.488.93.485 1.064m-8.532-8.202a10.6 10.6 0 0 1 3.71-.914a10.3 10.3 0 0 1 1.865.024c.366.039 1.469.054 1.74.343a.255.255 0 0 1-.273.173c-.037.077.251.371.3.425c-.034.034-1.445-.4-1.572-.424a10.6 10.6 0 0 0-2.282-.134a16 16 0 0 0-1.841.194a6.2 6.2 0 0 1-1.647.313m11.139-1.801a1.89 1.89 0 0 1-1.517-.6c-.247-.349-.737-1.692-.385-2.021c.209-.2.384.662.484.846a11 11 0 0 0 1.418 1.775m5.276 8.469a19 19 0 0 1-.749 3.313c-.173-.077-.275-.778-.562-.95a4.1 4.1 0 0 0 .76-1.154c.152-.302.303-1.046.551-1.209m-7.807-7.357c-.132.268-.932 1.1-1.118.481c-.107-.356.876-.841 1.118-.481m-.747.45c.228.006.012-.248.012-.266c-.001-.043-.368.266-.012.266"/></svg>';case"julia":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#a6d189" d="M10.5 5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n <path stroke="#e78284" d="M6.5 11a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n <path stroke="#ca9ee6" d="M14.5 11a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n </g>\n</svg>\n';case"elixir":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M8.03 14.5C5 14.5 3.5 12.49 3.5 10.01c0-2.82 2.25-7.02 4.62-8.48a.24.24 0 01.24 0c.08.04.12.12.11.2-.13 1.25.22 2.5.98 3.54.3.43.63.8 1.02 1.27.54.66.94 1.03 1.52 2.08l.01.02c.33.56.5 1.2.5 1.84 0 2.03-1.69 4.02-4.47 4.02" />\n</svg>\n';case"vb.net":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#00519a" d="M6.67 7.836L9 18.915l2.336-11.079H16l-4.664 16.328H6.672L2 7.836Zm11.661 0h7.6a4.08 4.08 0 0 1 2.9 1.749a3.8 3.8 0 0 1 .571 2.04a4 4 0 0 1-.571 2.034a4.1 4.1 0 0 1-2.341 1.763a4.1 4.1 0 0 1 2.929 1.756a3.8 3.8 0 0 1 .58 2.1a4.66 4.66 0 0 1-.579 2.546a5.05 5.05 0 0 1-3.5 2.338h-7.589ZM23 14.252h1.166a1.754 1.754 0 0 0 0-3.5H23Zm0 7h1.39a2.047 2.047 0 0 0 0-4.089H23Z"/></svg>';case"nim":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M1 7 .5 4.5l1.01.67c.28-.27.47-.48 1.18-.85l.56-1.82L4.5 3.84c.77-.18 1.53-.36 2.4-.33L8 1.5l1.1 2.01c.87-.03 1.63.15 2.4.33l1.25-1.34.56 1.82c.7.37.9.58 1.18.85l1.01-.67L15 7m-1.5 1C13 6.5 11 5.5 8 5.5S3 6.5 2.5 8m11.5.75L13.5 8l-1 1.5-1.5.5-3-1.5L5 10l-1.5-.5-1-1.5-.5.75L1 7l1.25 3.75C3 12.75 6 13.5 8 13.5s5-.75 5.75-2.75L15 7z" />\n</svg>\n';case"crystal":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="m 15.4712,10.050637 -5.433601,5.433968 c -0.015,0.01505 -0.04554,0.01505 -0.09055,0.01505 L 2.536327,13.517264 c -0.015,0 -0.04501,-0.01505 -0.06055,-0.06072 L 0.50026325,6.0396501 a 0.21432208,0.21495127 0 0 1 0.015,-0.090817 L 5.9483283,0.5154023 c 0.015,-0.0150465 0.04501,-0.0150465 0.09055,-0.0150465 l 7.4101857,1.997972 c 0.015,0 0.04501,0.015046 0.06055,0.060724 l 1.977121,7.4158186 c 0.03001,0.03063 0.01608,0.060724 -0.01554,0.07577 M 8.2121063,4.1480782 0.93801425,6.1154197 q -0.0225,0 0,0.04514 L 6.2655263,11.50371 c 0.015,0.01505 0.015,0 0.04501,0 l 1.962119,-7.2803988 c -0.03054,-0.075233 -0.06055,-0.075233 -0.06055,-0.075233" />\n</svg>\n';case"d":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<defs><linearGradient id="SVGMV3iTbAN" x1="185.455" x2="181.955" y1="1601.641" y2="1630.224" gradientTransform="translate(-62.523 -666.646)scale(.427)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient id="SVGniw2Mvsa" x1="176.136" x2="172.636" y1="1600.5" y2="1629.083" href="#SVGMV3iTbAN"/></defs><path fill="#b03931" d="m3.978 15.462l-.009-6.953a.59.59 0 0 1 .531-.562h.076l6.074-.009a15.7 15.7 0 0 1 6.067.95a8.9 8.9 0 0 1 2.244 1.359a4.47 4.47 0 0 1 2.946-1.083a4.11 4.11 0 0 1 4.276 3.92A4.11 4.11 0 0 1 21.907 17c-.089 0-.177-.008-.265-.012a7 7 0 0 1-.232.953a85 85 0 0 1 8.59 2.6V2H2v13.4q.992.02 1.978.062m22.8-7.944a1.32 1.32 0 0 1 1.374 1.259a1.379 1.379 0 0 1-2.747 0a1.32 1.32 0 0 1 1.375-1.26Z"/><path fill="#b03931" d="M17.861 15.787a4.11 4.11 0 0 0-1.748-3.458a5.8 5.8 0 0 0-1.508-.822a7.4 7.4 0 0 0-1.629-.438a22 22 0 0 0-2.588-.1H7.769l.006 4.737a89 89 0 0 1 9.91 1.408a5 5 0 0 0 .176-1.327m3.132 3.192a7.9 7.9 0 0 1-2.128 2.582a9.7 9.7 0 0 1-3.256 1.71a11.6 11.6 0 0 1-1.971.472h-.015a32 32 0 0 1-3.326.111l-5.625.022a.616.616 0 0 1-.686-.681l-.01-7.734Q2.992 15.42 2 15.4V30h28v-9.456a85 85 0 0 0-8.59-2.6a7 7 0 0 1-.417 1.035"/><path fill="url(#SVGMV3iTbAN)" d="M20.993 18.979a7.9 7.9 0 0 1-2.128 2.582a9.7 9.7 0 0 1-3.256 1.71a11.6 11.6 0 0 1-1.971.472h-.015a32 32 0 0 1-3.326.111l-5.625.022a.616.616 0 0 1-.686-.681l-.01-7.734Q2.992 15.42 2 15.4V30h28v-9.456a85 85 0 0 0-8.59-2.6a7 7 0 0 1-.417 1.035" opacity=".3"/><path fill="#b03931" d="M10.477 20.835a16 16 0 0 0 2.877-.2a7.6 7.6 0 0 0 1.628-.5a5.6 5.6 0 0 0 1.187-.748a4.46 4.46 0 0 0 1.518-2.271a89 89 0 0 0-9.91-1.408l.006 5.133Z"/><path fill="url(#SVGniw2Mvsa)" d="M10.477 20.835a16 16 0 0 0 2.877-.2a7.6 7.6 0 0 0 1.628-.5a5.6 5.6 0 0 0 1.187-.748a4.46 4.46 0 0 0 1.518-2.271a89 89 0 0 0-9.91-1.408l.006 5.133Z" opacity=".3"/><path fill="#fff" d="M20.383 11.746a7 7 0 0 1 1.36 4.148a6.6 6.6 0 0 1-.1 1.1c.088 0 .176.012.265.012a4.11 4.11 0 0 0 4.276-3.92a4.11 4.11 0 0 0-4.276-3.92a4.47 4.47 0 0 0-2.946 1.083a8 8 0 0 1 1.421 1.497"/><ellipse cx="26.78" cy="8.777" fill="#fff" rx="1.374" ry="1.259"/><path fill="#fff" d="m4.673 23.877l5.625-.022a32 32 0 0 0 3.326-.111h.015a11.5 11.5 0 0 0 1.971-.472a9.7 9.7 0 0 0 3.256-1.71a7.9 7.9 0 0 0 2.128-2.582a7 7 0 0 0 .417-1.034a7 7 0 0 0 .332-2.051a7 7 0 0 0-1.36-4.148a8 8 0 0 0-1.421-1.5a8.9 8.9 0 0 0-2.244-1.359a15.7 15.7 0 0 0-6.067-.95l-6.074.009h-.076a.59.59 0 0 0-.532.562l.009 6.952l.01 7.734a.616.616 0 0 0 .685.682m3.1-12.908h2.619a22 22 0 0 1 2.588.1a7.4 7.4 0 0 1 1.629.438a5.8 5.8 0 0 1 1.508.822a4.12 4.12 0 0 1 1.748 3.458a5 5 0 0 1-.175 1.327a4.46 4.46 0 0 1-1.518 2.271a5.6 5.6 0 0 1-1.187.748a7.7 7.7 0 0 1-1.628.5a16 16 0 0 1-2.877.2H7.786L7.78 15.7Z"/></svg>';case"applescript":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="M14.4561802 11.3673353C13.0276218 14.1261537 11.8858593 15.5 10.8437759 15.5 10.3588459 15.5 9.88231005 15.3491298 9.41749082 15.0543006 8.74000639 14.6241577 7.8668418 14.6059458 7.17068967 15.0074382 6.60881451 15.3319356 6.07177167 15.5 5.56305868 15.5 4.02887542 15.5 1.5 10.9491129 1.5 8.45090396 1.5 5.78581061 2.95006811 3.551507 5.15647301 3.551507 6.19383481 3.551507 7.09007204 4.20001691 7.84308619 4.497206 8.16210316 4.62512517 8.52255587 4.61592787 8.83410596 4.47192 9.44477141 4.18872223 10.2497236 3.551507 11.2503615 3.551507 12.4715175 3.551507 13.5338865 4.33779342 14.4184071 5.47479877 14.5532906 5.64778615 14.5172013 5.89341518 14.3377895 6.02349446 13.3500923 6.736546 12.8746057 7.53893969 12.8746057 8.45090396 12.8746057 9.36404821 13.3502672 10.1652619 14.3377895 10.8793249 14.4946576 10.992887 14.5445377 11.1984946 14.4561802 11.3673353ZM8.5 3C8.5 3 8.3468635 1.3936039 10 1" />\n</svg>\n';case"solidity":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="m3 11.5 2.5 4 2.5-4 2.5 4 2.5-4-2.5-4-2.5 4m2.5 4h-5m7.5-4H3m10-7-2.5-4-2.5 4-2.5-4-2.5 4 2.5 4 2.5-4M5.5.5h5M3 4.5h10" />\n</svg>\n';case"objectivec":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#c2c2c2" d="M11.29 15.976a8.9 8.9 0 0 0 1.039 4.557a4.82 4.82 0 0 0 5.579 2.13a3.79 3.79 0 0 0 2.734-3.181c.095-.535.1-.54.1-.54c1.537.222 4.014.582 5.55.8l-.1.389A9.96 9.96 0 0 1 23.8 24.9a8.35 8.35 0 0 1-4.747 2.378a12.93 12.93 0 0 1-7.322-.725a8.98 8.98 0 0 1-5.106-5.524A14.35 14.35 0 0 1 6.642 10.9a9.32 9.32 0 0 1 7.929-6.24a11.8 11.8 0 0 1 5.9.491a8.47 8.47 0 0 1 5.456 6.1c.083.311.1.369.1.369c-1.709.311-3.821.705-5.518 1.075c-.323-1.695-1.122-3.029-2.831-3.445a4.656 4.656 0 0 0-5.853 3.158a9 9 0 0 0-.341 1.273a11 11 0 0 0-.194 2.295"/><path fill="#c2c2c2" d="M2.033 30V2h5.934v2.227H4.723v23.546h3.244V30zm27.934-.001h-5.934v-2.228h3.244V4.226h-3.244V1.999h5.934z"/></svg>';case"objectivecpp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#c2c2c2" d="M19.5 24.833a11.24 11.24 0 0 1-5.13 1.009a8.37 8.37 0 0 1-6.492-2.576A9.75 9.75 0 0 1 5.512 16.4a10.4 10.4 0 0 1 2.659-7.406a9.02 9.02 0 0 1 6.9-2.841a12.2 12.2 0 0 1 4.43.7v4.129a7.5 7.5 0 0 0-4.108-1.142a5.28 5.28 0 0 0-4.075 1.685A6.48 6.48 0 0 0 9.766 16.1a6.37 6.37 0 0 0 1.464 4.4a5.02 5.02 0 0 0 3.941 1.639a8.03 8.03 0 0 0 4.329-1.223Z"/><path fill="#c2c2c2" d="M16.572 15.081V13.24h1.841v1.841h1.84v1.84h-1.84v1.841h-1.841v-1.841h-1.839V15.08zm6.44 0V13.24h1.841v1.841h1.84v1.84h-1.84v1.841h-1.841v-1.841h-1.839V15.08zM2.035 30V2.001h5.933v2.227H4.725v23.545h3.243V30z"/><path fill="#c2c2c2" d="M29.965 29.999h-5.933v-2.228h3.243V4.227h-3.243V2h5.933z"/></svg>';case"terraform":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="m1.5 6 8 4.25 4-2.25m-12-2V1.5l8 4.25 4-2.25V8m-4-2.25v8.75M5.53 3.82 5.5 12.5l4 2" />\n</svg>\n';case"plain":case"text":case"":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round">\n <path d="M13.5 6.5v6a2 2 0 01-2 2h-7a2 2 0 01-2-2v-9c0-1.1.9-2 2-2h4.01" />\n <path d="m8.5 1.5 5 5h-4a1 1 0 01-1-1zm-3 10h5m-5-3h5m-5-3h1" />\n </g>\n</svg>\n';default:return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">\x3c!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE --\x3e<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m10 9l-3 3l3 3m4 0l3-3l-3-3"/><rect width="18" height="18" x="3" y="3" rx="2"/></g></svg>'}}const nt={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown","":"Plain Text",plain:"Plain Text"};function ot(e){try{if("undefined"!=typeof globalThis&&"function"==typeof globalThis.requestAnimationFrame)return globalThis.requestAnimationFrame(e)}catch(t){}return globalThis.setTimeout(e,0)}const rt=h(p.defineComponent({__name:"Portal",props:{to:null},setup(e){const t=e,n=p.ref(null);function o(){return"undefined"==typeof document?null:t.to&&"body"!==t.to?document.querySelector(t.to):document.body}function r(){const e=n.value;if(!e)return;const t=o();t&&e.parentElement!==t&&t.appendChild(e)}return p.onMounted(()=>{r()}),p.watch(()=>t.to,()=>{r()}),p.onBeforeUnmount(()=>{}),{__sfc:!0,props:t,rootRef:n,resolveTarget:o,moveToTarget:r}}}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{ref:"rootRef",staticClass:"portal-root"},[e._t("default")],2)},[],!1,null,"26355139",null,null).exports,lt=h(p.defineComponent({__name:"HtmlPreviewFrame",props:{code:null,isDark:{type:Boolean},onClose:null,title:null},setup(e){const t=e,{t:n}=ne(),o=p.computed(()=>{const e=t.code||"",n=e.trim().toLowerCase();return n.startsWith("<!doctype")||n.startsWith("<html")||n.startsWith("<body")?e:`<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background-color: ${t.isDark?"#020617":"#ffffff"};\n color: ${t.isDark?"#e5e7eb":"#020617"};\n }\n body {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;\n }\n </style>\n </head>\n <body>\n ${e}\n </body>\n</html>`});function r(e){var n;"Escape"!==e.key&&"Esc"!==e.key||null==(n=t.onClose)||n.call(t)}return p.onMounted(()=>{"undefined"!=typeof window&&window.addEventListener("keydown",r)}),p.onUnmounted(()=>{"undefined"!=typeof window&&window.removeEventListener("keydown",r)}),{__sfc:!0,props:t,t:n,srcdoc:o,handleKeydown:r,Portal:rt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue2"},[t("div",{staticClass:"html-preview-frame__backdrop",class:{"html-preview-frame__backdrop--dark":n.props.isDark},on:{click:function(e){var t,o;null==(o=(t=n.props).onClose)||o.call(t)}}},[t("div",{staticClass:"html-preview-frame",class:{"html-preview-frame--dark":n.props.isDark},on:{click:function(e){e.stopPropagation()}}},[t("div",{staticClass:"html-preview-frame__header"},[t("div",{staticClass:"html-preview-frame__title"},[t("span",{staticClass:"html-preview-frame__dot"}),t("span",{staticClass:"html-preview-frame__label"},[e._v(e._s(n.props.title||n.t("common.preview")||"Preview"))])]),t("button",{staticClass:"html-preview-frame__close",class:{"html-preview-frame__close--dark":n.props.isDark},attrs:{type:"button"},on:{click:function(e){var t,o;null==(o=(t=n.props).onClose)||o.call(t)}}},[e._v(" × ")])]),t("iframe",{staticClass:"html-preview-frame__iframe",attrs:{sandbox:"allow-scripts allow-same-origin",srcdoc:n.srcdoc}})])])])])},[],!1,null,"7157861b",null,null).exports,it=h(p.defineComponent({__name:"CodeBlockNode",props:{node:{type:Object,required:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{type:[Object,String],default:void 0},lightTheme:{type:[Object,String],default:void 0},isShowPreview:{type:Boolean,default:!0},monacoOptions:{type:Object,default:void 0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{type:[String,Number],default:void 0},maxWidth:{type:[String,Number],default:void 0},themes:{type:Array,default:void 0},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:{type:String,default:void 0}},emits:["previewCode","copy"],setup(e,{emit:t}){var n,o;const r=e,l="__markstreamMonacoPassiveTouch__";function i(){var e;try{const t=window;if(t[l])return;const n=null==(e=window.Element)?void 0:e.prototype,o=null==n?void 0:n.addEventListener;if(!n||!o)return;n.addEventListener=function(e,t,n){return"touchstart"===e&&a(this,n)?o.call(this,e,t,d(n)):o.call(this,e,t,n)},t[l]=!0}catch(t){}}function a(e,t){if(!e)return!1;const n=e;return!("function"!=typeof n.closest||!n.closest(".monaco-editor, .monaco-diff-editor")||t&&"object"==typeof t&&"passive"in t)}function d(e){return null==e?{passive:!0}:"boolean"==typeof e?{capture:e,passive:!0}:"object"==typeof e?"passive"in e?e:u(s({},e),{passive:!0}):{passive:!0}}"undefined"!=typeof window&&i();const h=p.getCurrentInstance(),v=p.computed(()=>{var e,t,n,o,r,l,i,a,s,u;const c=null==h?void 0:h.proxy,d=null!=(e=null==c?void 0:c.$listeners)?e:{};if(d.previewCode||d["preview-code"])return!0;const p=null!=(i=null!=(l=null==(n=null==(t=null==c?void 0:c.$vnode)?void 0:t.data)?void 0:n.on)?l:null==(r=null==(o=null==c?void 0:c.$vnode)?void 0:o.componentOptions)?void 0:r.listeners)?i:{};if(p.previewCode||p["preview-code"])return!0;const m=null!=(u=null==(a=null==c?void 0:c.$vnode)?void 0:a.props)?u:null==(s=null==h?void 0:h.vnode)?void 0:s.props;return!(!m||!m.onPreviewCode&&!m.onPreviewcode)}),{t:f}=ne(),g=p.ref(null),w=p.ref(null),y=p.ref(!1),x=p.ref(Qe(r.node.language)),k=p.computed(()=>et(x.value)),b=p.ref(!1),C=p.ref(!1),_=p.ref(!1),M=p.ref(!1),B=p.ref(null);let T=0;const S=re();let L=null;const E=p.ref("undefined"==typeof window);"undefined"!=typeof window&&p.watch(()=>w.value,e=>{if(null==L||L.destroy(),L=null,!e)return void(E.value=!1);const t=S(e,{rootMargin:"400px"});L=t,E.value=t.isVisible.value,t.whenVisible.then(()=>{E.value=!0})},{immediate:!0}),p.onBeforeUnmount(()=>{null==L||L.destroy(),L=null});let R=null,N=null,I=()=>{},P=()=>{},H=()=>null,D=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),j=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),O=()=>{},$=()=>{},A=null,z=()=>{var e;return String(null!=(e=r.node.language)?e:"plaintext")},F=()=>c(this,null,function*(){}),V=null,W=null,K=null,U=null,X=null;function q(e){if(null==e)return null;if("string"==typeof e)return e;if("object"==typeof e&&"name"in e)return String(e.name);try{return JSON.stringify(e)}catch(t){return String(e)}}function Y(e){const t=q(e);return t&&(V||X!==t)?V?(U===t||W===t||(K=e,U=t),V):(K=e,U=t,V=(()=>c(this,null,function*(){for(;U&&null!=K;){const t=K,n=U;if(K=null,U=null,X!==n)try{W=n,yield F(t),X=n}catch(e){}}}))().finally(()=>{V=null,W=null}),V):Promise.resolve()}const Z=p.computed(()=>r.node.diff),G=p.ref(!1),J=p.ref(!1),te=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("exports.js",document.baseURI).href}&&Boolean(null==(n={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:n.DEV);"undefined"!=typeof window&&(()=>{c(this,null,function*(){try{const e=yield Ye();if(!e)return te&&console.warn("[markstream-vue2] stream-monaco is not installed. Code blocks will use basic rendering. Install stream-monaco for enhanced code editor features."),void(G.value=!0);const t=e.useMonaco,n=e.detectLanguage;if("function"==typeof n&&(z=n),"function"==typeof t){const e=Me();if(e&&r.themes&&Array.isArray(r.themes)&&!r.themes.includes(e))throw new Error("Preferred theme not in provided themes array");const n=t(u(s({wordWrap:"on",wrappingIndent:"same",themes:r.themes,theme:e},r.monacoOptions||{}),{onThemeChange(){pe()}}));R=n.createEditor||R,N=n.createDiffEditor||N,I=n.updateCode||I,P=n.updateDiff||P,H=n.getEditor||H,D=n.getEditorView||D,j=n.getDiffEditorView||j,O=n.cleanupEditor||O,$=n.safeClean||n.cleanupEditor||$,F=n.setTheme||F,M.value=!0,g.value&&(yield Ce(g.value))}}catch(e){te&&console.warn("[markstream-vue2] Failed to initialize Monaco editor:",e),G.value=!0}})})();const oe=p.ref("number"==typeof(null==(o=r.monacoOptions)?void 0:o.fontSize)?r.monacoOptions.fontSize:Number.NaN),le=p.ref(oe.value),ie=p.computed(()=>{const e=oe.value,t=le.value;return"number"==typeof e&&Number.isFinite(e)&&e>0&&"number"==typeof t&&Number.isFinite(t)&&t>0});function ae(){try{const e=g.value;if(!e)return null;const t=e.querySelector(".view-lines .view-line");if(t){const e=Math.ceil(t.getBoundingClientRect().height);if(e>0)return e}}catch(e){}return null}function se(){var e,t,n,o,r;try{const l=Z.value?null!=(n=null==(t=null==(e=j())?void 0:e.getModifiedEditor)?void 0:t.call(e))?n:j():D(),i=H(),a=null==(o=null==i?void 0:i.EditorOption)?void 0:o.fontInfo;if(l&&null!=a){const e=null==(r=l.getOption)?void 0:r.call(l,a),t=null==e?void 0:e.fontSize;if("number"==typeof t&&Number.isFinite(t)&&t>0)return t}}catch(l){}try{const e=g.value;if(e){const t=e.querySelector(".view-lines .view-line");if(t)try{if("undefined"!=typeof window&&"function"==typeof window.getComputedStyle){const e=window.getComputedStyle(t).fontSize,n=e&&e.match(/^(\d+(?:\.\d+)?)/);if(n)return Number.parseFloat(n[1])}}catch(l){}}}catch(l){}return null}function ue(e){var t,n;try{const o=H(),r=null==(t=null==o?void 0:o.EditorOption)?void 0:t.lineHeight;if(null!=r){const t=null==(n=null==e?void 0:e.getOption)?void 0:n.call(e,r);if("number"==typeof t&&t>0)return t}}catch(l){}const o=ae();if(o&&o>0)return o;const r=Number.isFinite(le.value)&&le.value>0?le.value:12;return Math.max(12,Math.round(1.35*r))}function ce(){var e;if(Number.isFinite(le.value)&&le.value>0&&Number.isFinite(oe.value))return le.value;const t=se();return"number"==typeof(null==(e=r.monacoOptions)?void 0:e.fontSize)?(oe.value=r.monacoOptions.fontSize,le.value=r.monacoOptions.fontSize,le.value):t&&t>0?(oe.value=t,le.value=t,t):(oe.value=12,le.value=12,12)}function de(){var e,t,n,o,r,l,i,a,s,u,c,d,p,m;try{const h=Z.value?j():D();if(!h)return null;if(Z.value&&(null==h?void 0:h.getOriginalEditor)&&(null==h?void 0:h.getModifiedEditor)){const p=null==(e=h.getOriginalEditor)?void 0:e.call(h),m=null==(t=h.getModifiedEditor)?void 0:t.call(h);null==(n=null==p?void 0:p.layout)||n.call(p),null==(o=null==m?void 0:m.layout)||o.call(m);const v=(null==(r=null==p?void 0:p.getContentHeight)?void 0:r.call(p))||0,f=(null==(l=null==m?void 0:m.getContentHeight)?void 0:l.call(m))||0,g=Math.max(v,f);if(g>0)return Math.ceil(g+1);const w=(null==(s=null==(a=null==(i=null==p?void 0:p.getModel)?void 0:i.call(p))?void 0:a.getLineCount)?void 0:s.call(a))||1,y=(null==(d=null==(c=null==(u=null==m?void 0:m.getModel)?void 0:u.call(m))?void 0:c.getLineCount)?void 0:d.call(c))||1,x=Math.max(w,y),k=Math.max(ue(p),ue(m));return Math.ceil(x*(k+1.5)+0+1)}if(null==h?void 0:h.getContentHeight){null==(p=null==h?void 0:h.layout)||p.call(h);const e=h.getContentHeight();if(e>0)return Math.ceil(e+1)}const v=null==(m=null==h?void 0:h.getModel)?void 0:m.call(h);let f=1;v&&"function"==typeof v.getLineCount&&(f=v.getLineCount());const g=ue(h);return Math.ceil(f*(g+1.5)+0+1)}catch(h){return null}}function pe(){var e,t,n;const o=g.value,r=w.value;if(!o||!r)return;const l=o.querySelector(".monaco-editor")||o;let i=null;try{"undefined"!=typeof window&&"function"==typeof window.getComputedStyle&&(i=window.getComputedStyle(l))}catch(c){i=null}const a=String(null!=(e=null==i?void 0:i.getPropertyValue("--vscode-editor-foreground"))?e:""),s=String(null!=(t=null==i?void 0:i.getPropertyValue("--vscode-editor-background"))?t:""),u=String(null!=(n=null==i?void 0:i.getPropertyValue("--vscode-editor-hoverHighlightBackground"))?n:"");return a&&s?(r.style.setProperty("--vscode-editor-foreground",a.trim()),r.style.setProperty("--vscode-editor-background",s.trim()),r.style.setProperty("--vscode-editor-selectionBackground",u.trim()),!0):void 0}function me(){try{const e=g.value;if(!e)return;const t=e.getBoundingClientRect(),n=window.scrollY+t.top,o=de();if(null!=o&&o>0){const r=t.height;e.style.height=`${Math.ceil(o)}px`,e.style.maxHeight="none";const l=Math.ceil(o)-r;0!==l&&n<window.scrollY&&window.scrollBy(0,l)}}catch(e){}}function he(){var e;try{const t=g.value;if(!t)return;const n=t.getBoundingClientRect(),o=window.scrollY+n.top,r=n.height,l=ve();if(T>0&&(T--,null!=B.value)){const e=Math.min(B.value,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const i=de();if(null!=i&&i>0){const e=Math.min(i,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}if(null!=B.value){const e=Math.min(B.value,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const a=Math.ceil((null==(e=t.getBoundingClientRect)?void 0:e.call(t).height)||0);if(a>0){const e=Math.min(a,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const s=Number.parseFloat(t.style.height);if(!Number.isNaN(s)&&s>0){const e=Math.ceil(Math.min(s,l));t.style.height=`${e}px`;const n=e-r;0!==n&&o<window.scrollY&&window.scrollBy(0,n)}else{const e=Math.ceil(l);t.style.height=`${e}px`;const n=e-r;0!==n&&o<window.scrollY&&window.scrollBy(0,n)}t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto"}catch(t){}}function ve(){var e,t;const n=null!=(t=null==(e=r.monacoOptions)?void 0:e.MAX_HEIGHT)?t:500;if("number"==typeof n)return n;const o=String(n).match(/^(\d+(?:\.\d+)?)/);return o?Number.parseFloat(o[1]):500}const fe=p.computed(()=>r.isShowPreview&&("html"===x.value||"svg"===x.value));p.watch(()=>r.node.language,e=>{x.value=Qe(e)}),p.watch(()=>r.node.code,e=>c(this,null,function*(){var t,n;if(!1!==r.stream){if(x.value||(x.value=Qe(z(e))),R&&!_.value&&g.value)try{yield Ce(g.value)}catch(o){}Z.value?P(String(null!=(t=r.node.originalCode)?t:""),String(null!=(n=r.node.updatedCode)?n:""),k.value):I(e,k.value),b.value&&ot(()=>me())}}));const ge=p.computed(()=>{const e=x.value;return e?nt[e]||e.charAt(0).toUpperCase()+e.slice(1):nt[""]||"Plain Text"}),we=p.computed(()=>tt(x.value||"")),ye=p.computed(()=>{const e={},t=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},n=t(r.minWidth),o=t(r.maxWidth);return n&&(e.minWidth=n),o&&(e.maxWidth=o),e});function xe(e){return!e||e.disabled}function ke(e){var t,n;try{if(Z.value){const n=j();null==(t=null==n?void 0:n.updateOptions)||t.call(n,{automaticLayout:e})}else{const t=D();null==(n=null==t?void 0:t.updateOptions)||n.call(t,{automaticLayout:e})}}catch(o){}}function be(e){return c(this,null,function*(){var t,n,o;if(!R)return;Z.value?($(),N?yield N(e,String(null!=(t=r.node.originalCode)?t:""),String(null!=(n=r.node.updatedCode)?n:""),k.value):yield R(e,r.node.code,k.value)):yield R(e,r.node.code,k.value);const l=Z.value?j():D();if("number"==typeof(null==(o=r.monacoOptions)?void 0:o.fontSize))null==l||l.updateOptions({fontSize:r.monacoOptions.fontSize,automaticLayout:!1}),oe.value=r.monacoOptions.fontSize,le.value=r.monacoOptions.fontSize;else{const e=se();e&&e>0?(oe.value=e,le.value=e):(oe.value=12,le.value=12)}b.value||C.value||he(),!1===r.loading&&(yield p.nextTick(),ot(()=>{b.value&&!C.value?me():C.value||he()}))})}function Ce(e){if(!R)return null;if(A)return A;_.value=!0;const t=(()=>c(this,null,function*(){yield be(e)}))();return A=t.finally(()=>{A=null}),A}p.watch(()=>le.value,(e,t)=>{const n=Z.value?j():D();n&&"number"==typeof e&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),b.value&&!C.value&&me())},{flush:"post",immediate:!1});const _e=p.watch(()=>[g.value,Z.value,r.stream,r.loading,M.value,E.value],e=>c(this,[e],function*([e,t,n,o,r,l]){if(!e||!R)return;if(!l)return;if(!1===n&&!1!==o)return;const i=Ce(e);i&&(yield i,_e())}));function Me(){return r.isDark?r.darkTheme:r.lightTheme}function Be(){const e=Me();e&&Y(e)}p.watch(()=>[r.darkTheme,r.lightTheme,_.value,E.value],()=>{_.value&&E.value&&Be()}),p.watch(()=>[r.monacoOptions,E.value],()=>{var e,t;if(!R||!E.value)return;const n=Z.value?j():D(),o="number"==typeof(null==(e=r.monacoOptions)?void 0:e.fontSize)?r.monacoOptions.fontSize:Number.isFinite(le.value)?le.value:void 0;"number"==typeof o&&Number.isFinite(o)&&o>0&&(null==(t=null==n?void 0:n.updateOptions)||t.call(n,{fontSize:o})),b.value&&!C.value?me():C.value||he()},{deep:!0});const Te=p.watch(()=>[r.loading,E.value],e=>c(this,[e],function*([e,t]){t&&(e||(yield p.nextTick(),ot(()=>{C.value||(b.value?me():he()),Te()})))}),{immediate:!0,flush:"post"});return p.onUnmounted(()=>{O()}),{__sfc:!0,props:r,emits:t,MONACO_TOUCH_PATCH_FLAG:l,ensureMonacoPassiveTouchListeners:i,shouldForcePassiveForMonaco:a,withPassiveOptions:d,instance:h,hasPreviewListener:v,t:f,codeEditor:g,container:w,copyText:y,codeLanguage:x,monacoLanguage:k,isExpanded:b,isCollapsed:C,editorCreated:_,monacoReady:M,expandRafId:null,heightBeforeCollapse:B,resumeGuardFrames:T,registerVisibility:S,viewportHandle:L,viewportReady:E,createEditor:R,createDiffEditor:N,updateCode:I,updateDiffCode:P,getEditor:H,getEditorView:D,getDiffEditorView:j,cleanupEditor:O,safeClean:$,createEditorPromise:A,detectLanguage:z,setTheme:F,themeApplyPromise:V,inFlightThemeKey:W,pendingTheme:K,pendingThemeKey:U,lastAppliedThemeKey:X,getThemeKey:q,scheduleThemeUpdate:Y,isDiff:Z,usePreCodeRender:G,showInlinePreview:J,isDevEnv:te,codeFontMin:10,codeFontMax:36,codeFontStep:1,defaultCodeFontSize:oe,codeFontSize:le,fontBaselineReady:ie,CONTENT_PADDING:0,LINE_EXTRA_PER_LINE:1.5,PIXEL_EPSILON:1,measureLineHeightFromDom:ae,readActualFontSizeFromEditor:se,getLineHeightSafe:ue,ensureFontBaseline:ce,increaseCodeFont:function(){const e=ce(),t=Math.min(36,e+1);le.value=t},decreaseCodeFont:function(){const e=ce(),t=Math.max(10,e-1);le.value=t},resetCodeFont:function(){ce(),Number.isFinite(oe.value)&&(le.value=oe.value)},computeContentHeight:de,syncEditorCssVars:pe,resizeSyncHandler:null,updateExpandedHeight:me,updateCollapsedHeight:he,getMaxHeightValue:ve,isPreviewable:fe,displayLanguage:ge,languageIcon:we,containerStyle:ye,copy:function(){return c(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(r.node.code)),y.value=!0,t("copy",r.node.code),setTimeout(()=>{y.value=!1},1e3)}catch(e){console.error("复制失败:",e)}})},shouldSkipEventTarget:xe,onBtnHover:function(e,t,n="top"){if(xe(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;Q(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){ee()},onCopyHover:function(e){if(xe(e.currentTarget))return;const t=y.value?f("common.copied")||"Copied":f("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;Q(e.currentTarget,t,"top",!1,o,r.isDark)},toggleExpand:function(){b.value=!b.value;const e=Z.value?j():D(),t=g.value;e&&t&&(b.value?(ke(!0),t.style.maxHeight="none",t.style.overflow="visible",me()):(ke(!1),t.style.overflow="auto",he()))},toggleHeaderCollapse:function(){var e,t,n;if(C.value=!C.value,C.value){if(g.value){const n=Math.ceil((null==(t=(e=g.value).getBoundingClientRect)?void 0:t.call(e).height)||0);n>0&&(B.value=n)}ke(!1)}else{b.value&&ke(!0),g.value&&null!=B.value&&(g.value.style.height=`${B.value}px`);const e=Z.value?j():D();try{null==(n=null==e?void 0:e.layout)||n.call(e)}catch(o){}T=2,ot(()=>{b.value?me():he()})}},previewCode:function(){if(!fe.value)return;const e=x.value;if(v.value){const n="html"===e?"text/html":"image/svg+xml",o="html"===e?f("artifacts.htmlPreviewTitle")||"HTML Preview":f("artifacts.svgPreviewTitle")||"SVG Preview";return void t("previewCode",{node:r.node,artifactType:n,artifactTitle:o,id:`temp-${e}-${Date.now()}`})}"html"===e&&(J.value=!J.value)},setAutomaticLayout:ke,runEditorCreation:be,ensureEditorCreation:Ce,stopCreateEditorWatch:_e,getPreferredColorScheme:Me,themeUpdate:Be,stopLoadingWatch:Te,stopExpandAutoResize:function(){},PreCodeNode:Oe,HtmlPreviewFrame:lt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return n.usePreCodeRender?t(n.PreCodeNode,{attrs:{node:e.node,loading:n.props.loading}}):t("div",{ref:"container",staticClass:"code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",{"is-rendering":n.props.loading,"is-dark":n.props.isDark}],style:n.containerStyle},[n.props.showHeader?t("div",{staticClass:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",staticStyle:{color:"var(--vscode-editor-foreground)","background-color":"var(--vscode-editor-background)"}},[e._t("header-left",function(){return[t("div",{staticClass:"flex items-center space-x-2 flex-1 overflow-hidden"},[t("span",{staticClass:"icon-slot h-4 w-4 flex-shrink-0",domProps:{innerHTML:e._s(n.languageIcon)}}),t("span",{staticClass:"text-sm font-medium font-mono truncate"},[e._v(e._s(n.displayLanguage))])])]}),e._t("header-right",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isCollapsed},on:{click:n.toggleHeaderCollapse,mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]),n.props.showFontSizeButtons&&n.props.enableFontSizeControl?[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize<=n.codeFontMin},on:{click:function(e){return n.decreaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},focus:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"}})])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!n.fontBaselineReady||n.codeFontSize===n.defaultCodeFontSize},on:{click:function(e){return n.resetCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},focus:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}}),t("path",{attrs:{d:"M3 3v5h5"}})])])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize>=n.codeFontMax},on:{click:function(e){return n.increaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},focus:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"}})])])]:e._e(),n.props.showCopyButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.copyText?n.t("common.copied")||"Copied":n.t("common.copy")||"Copy"},on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExpandButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isExpanded},on:{click:n.toggleExpand,mouseenter:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},focus:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isExpanded?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})])]):e._e(),n.isPreviewable&&n.props.showPreviewButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.t("common.preview")||"Preview"},on:{click:n.previewCode,mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24"}},[t("g",{attrs:{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"}},[t("path",{attrs:{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"}}),t("path",{attrs:{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"}})])])]):e._e()],2)]})],2):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!(n.isCollapsed||!e.stream&&e.loading),expression:"!isCollapsed && (stream ? true : !loading)"}],ref:"codeEditor",staticClass:"code-editor-container",class:[e.stream?"":"code-height-placeholder"]}),n.showInlinePreview&&!n.hasPreviewListener&&n.isPreviewable&&"html"===n.codeLanguage?t(n.HtmlPreviewFrame,{attrs:{code:e.node.code,"is-dark":n.props.isDark,"on-close":()=>n.showInlinePreview=!1}}):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.stream&&e.loading,expression:"!stream && loading"}],staticClass:"code-loading-placeholder"},[e._t("loading",function(){return[t("div",{staticClass:"loading-skeleton"},[t("div",{staticClass:"skeleton-line"}),t("div",{staticClass:"skeleton-line"}),t("div",{staticClass:"skeleton-line short"})])]},{loading:e.loading,stream:e.stream})],2),t("span",{staticClass:"sr-only",attrs:{"aria-live":"polite",role:"status"}},[e._v(e._s(n.copyText?n.t("common.copied")||"Copied":""))])],1)},[],!1,null,"eee77872",null,null).exports,at=h(p.defineComponent({__name:"MarkdownCodeBlockNode",props:{node:{type:Object,required:!0},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{type:String,default:"vitesse-dark"},lightTheme:{type:String,default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{type:[String,Number],default:void 0},maxWidth:{type:[String,Number],default:void 0},themes:{type:Array,default:void 0},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}},emits:["previewCode","copy"],setup(e,{emit:t}){var n,o;const r=e,{t:l}=ne(),i=p.ref(String(null!=(n=r.node.language)?n:"")),a=p.ref(!1),s=p.ref(!1),u=p.ref(!1),d=p.ref(null),h=p.ref(null),v=p.ref(""),f=p.ref(!1);let g;const w=p.ref(!0),y=p.ref(0),x=p.ref(14),k=p.ref(x.value),b=p.computed(()=>{const e=x.value,t=k.value;return"number"==typeof e&&Number.isFinite(e)&&e>0&&"number"==typeof t&&Number.isFinite(t)&&t>0}),C=p.computed(()=>{const e=i.value.trim().toLowerCase();return nt[e]||e.charAt(0).toUpperCase()+e.slice(1)}),_=p.computed(()=>tt(i.value.trim().toLowerCase().split(":")[0])),M=p.computed(()=>{const e=i.value.trim().toLowerCase();return r.isShowPreview&&("html"===e||"svg"===e)}),B=p.computed(()=>{const e={},t=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},n=t(r.minWidth),o=t(r.maxWidth);return n&&(e.minWidth=n),o&&(e.maxWidth=o),e}),T=p.computed(()=>({fontSize:`${k.value}px`}));function S(){return r.isDark?r.darkTheme:r.lightTheme}function L(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function E(e){if(null==g||g.disconnect(),g=void 0,!e)return v.value="",void(f.value=!1);v.value=`<pre class="shiki shiki-fallback"><code>${L(e)}</code></pre>`,f.value=!1}function R(){v.value="",f.value=!0}function N(){var e;const t=h.value;return!!t&&(t.childNodes.length>0||Boolean(null==(e=t.textContent)?void 0:e.trim().length))}function I(){return c(this,null,function*(){if(yield p.nextTick(),N())return void R();const e=h.value;e&&(null==g||g.disconnect(),g=new MutationObserver(()=>{N()&&(R(),null==g||g.disconnect(),g=void 0)}),g.observe(e,{childList:!0,subtree:!0}))})}let P,H,D,j;const O=new Set,$=new Set,A=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("exports.js",document.baseURI).href}&&Boolean(null==(o={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:o.DEV);function z(e,t=!1){var n;const[o]=String(null!=e?e:"").split(":"),r=null!=(n=null==o?void 0:o.trim().toLowerCase())?n:"";return r?!j||j.has(r)?r:(t&&A&&!O.has(r)&&(O.add(r),console.warn(`[MarkdownCodeBlockNode] Language "${r}" not preloaded in stream-markdown; falling back to plaintext.`)),"plaintext"):"plaintext"}function F(e,t){return c(this,null,function*(){if(!P)return;const n=z(t,Boolean(e&&e.length));try{yield P.updateCode(e,n)}catch(o){"plaintext"!==n?(A&&!$.has(n)&&($.add(n),console.warn(`[MarkdownCodeBlockNode] Failed to render language "${n}", retrying as plaintext.`,o)),yield P.updateCode(e,"plaintext")):A&&console.warn("[MarkdownCodeBlockNode] Failed to render code block even as plaintext.",o)}})}function V(){return c(this,null,function*(){if(!H)try{const e=yield import("stream-markdown");H=e.createShikiStreamRenderer,D=e.registerHighlight;const t=Array.isArray(e.defaultLanguages)?e.defaultLanguages:void 0;j=t?new Set(t.map(e=>e.toLowerCase())):void 0,null==D||D({themes:r.themes})}catch(e){console.warn("[MarkdownCodeBlockNode] stream-markdown not available:",e)}})}function W(){return c(this,null,function*(){yield V(),d.value&&h.value?(null==D||D({themes:r.themes}),!P&&H&&(P=H(h.value,{theme:S()}),f.value=!0),P?!1===r.stream&&r.loading?E(r.node.code):(E(r.node.code),yield F(r.node.code,i.value),yield I()):E(r.node.code)):E(r.node.code)})}function K(e,t=50){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function U(e){return!e||e.disabled}return W(),p.onMounted(()=>{W()}),p.watch(()=>r.themes,()=>c(this,null,function*(){D&&D({themes:r.themes})})),p.watch(()=>r.loading,e=>{e||W()}),p.watch(()=>[r.node.code,r.node.language],e=>c(this,[e],function*([e,t]){t!==i.value&&(i.value=t.trim()),d.value&&h.value?(P||(E(e),yield W()),P&&e&&(!1===r.stream&&r.loading||(E(e),yield F(e,t),yield I()))):E(e)})),p.watch(()=>[r.darkTheme,r.lightTheme],()=>c(this,null,function*(){d.value&&h.value&&(P||(yield W()),null==P||P.setTheme(S()))})),p.watch(()=>r.node.code,()=>c(this,null,function*(){if(s.value||!w.value)return;yield p.nextTick();const e=d.value;e&&e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})),{__sfc:!0,props:r,emits:t,t:l,codeLanguage:i,copyText:a,isExpanded:s,isCollapsed:u,codeBlockContent:d,rendererTarget:h,fallbackHtml:v,rendererReady:f,renderObserver:g,autoScrollEnabled:w,lastScrollTop:y,codeFontMin:10,codeFontMax:36,codeFontStep:1,defaultCodeFontSize:x,codeFontSize:k,fontBaselineReady:b,displayLanguage:C,languageIcon:_,isPreviewable:M,containerStyle:B,contentStyle:T,getPreferredColorScheme:S,escapeHtml:L,renderFallback:E,clearFallback:R,hasRendererContent:N,clearFallbackWhenRendererReady:I,renderer:P,createShikiRenderer:H,registerHighlight:D,registeredHighlightLanguages:j,warnedMissingLanguages:O,warnedRendererErrors:$,isDevEnv:A,normalizeRendererLanguage:z,updateRendererWithFallback:F,ensureStreamMarkdownLoaded:V,initRenderer:W,isAtBottom:K,handleScroll:function(){const e=d.value;if(!e||s.value)return;const t=e.scrollTop;t<y.value?w.value=!1:K(e)&&(w.value=!0),y.value=t},copy:function(){return c(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(r.node.code)),a.value=!0,t("copy",r.node.code),setTimeout(()=>{a.value=!1},1e3)}catch(e){console.error("Copy failed:",e)}})},shouldSkipEventTarget:U,onBtnHover:function(e,t,n="top"){if(U(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;Q(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){ee()},onCopyHover:function(e){if(U(e.currentTarget))return;const t=a.value?l("common.copied")||"Copied":l("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;Q(e.currentTarget,t,"top",!1,o,r.isDark)},toggleExpand:function(){s.value=!s.value;const e=d.value;e&&(s.value?(e.style.maxHeight="none",e.style.overflow="visible"):(e.style.maxHeight="500px",e.style.overflow="auto",w.value=!0,p.nextTick(()=>{e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})))},toggleHeaderCollapse:function(){u.value=!u.value},increaseCodeFont:function(){const e=Math.min(36,k.value+1);k.value=e},decreaseCodeFont:function(){const e=Math.max(10,k.value-1);k.value=e},resetCodeFont:function(){k.value=x.value},previewCode:function(){if(!M.value)return;const e=(i.value||r.node.language).toLowerCase(),n="html"===e?"HTML Preview":"SVG Preview";t("previewCode",{type:"html"===e?"text/html":"image/svg+xml",content:r.node.code,title:n})}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",n.props.isDark?"is-dark":""],style:n.containerStyle},[n.props.showHeader?t("div",{staticClass:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",staticStyle:{color:"var(--vscode-editor-foreground)","background-color":"var(--vscode-editor-background)"}},[e._t("header-left",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("span",{staticClass:"icon-slot h-4 w-4 flex-shrink-0",domProps:{innerHTML:e._s(n.languageIcon)}}),t("span",{staticClass:"text-sm font-medium font-mono"},[e._v(e._s(n.displayLanguage))])])]}),e._t("header-right",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isCollapsed},on:{click:n.toggleHeaderCollapse,mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]),n.props.showFontSizeButtons&&n.props.enableFontSizeControl?[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize<=n.codeFontMin},on:{click:function(e){return n.decreaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},focus:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"}})])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!n.fontBaselineReady||n.codeFontSize===n.defaultCodeFontSize},on:{click:function(e){return n.resetCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},focus:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}}),t("path",{attrs:{d:"M3 3v5h5"}})])])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize>=n.codeFontMax},on:{click:function(e){return n.increaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},focus:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"}})])])]:e._e(),n.props.showCopyButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.copyText?n.t("common.copied")||"Copied":n.t("common.copy")||"Copy"},on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExpandButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isExpanded},on:{click:n.toggleExpand,mouseenter:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},focus:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isExpanded?t("svg",{attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})]):t("svg",{attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})])]):e._e(),n.isPreviewable&&n.props.showPreviewButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.t("common.preview")||"Preview"},on:{click:n.previewCode,mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{"data-v-3d59cc65":"",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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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"}}),t("circle",{attrs:{cx:"12",cy:"12",r:"3"}})])])]):e._e()],2)]})],2):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!(n.isCollapsed||!e.stream&&e.loading),expression:"!isCollapsed && (stream ? true : !loading)"}],ref:"codeBlockContent",staticClass:"code-block-content",style:n.contentStyle,on:{scroll:n.handleScroll}},[t("div",{ref:"rendererTarget",staticClass:"code-block-render"}),n.rendererReady?e._e():t("div",{staticClass:"code-fallback-plain",domProps:{innerHTML:e._s(n.fallbackHtml)}})]),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.stream&&e.loading,expression:"!stream && loading"}],staticClass:"code-loading-placeholder"},[e._t("loading",function(){return[e._m(0)]},{loading:e.loading,stream:e.stream})],2)])},[function(){var e=this._self._c;return this._self._setupProxy,e("div",{staticClass:"loading-skeleton"},[e("div",{staticClass:"skeleton-line"}),e("div",{staticClass:"skeleton-line"}),e("div",{staticClass:"skeleton-line short"})])}],!1,null,"a2d5140c",null,null).exports;let st=null,ut=null,ct=!1;const dt=new Map,pt=new Map;let mt=5;const ht=new Set;function vt(){if(dt.size<mt&&ht.size){const t=Array.from(ht);ht.clear();for(const n of t)try{n()}catch(e){}}}let ft=null;const gt=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("exports.js",document.baseURI).href}&&Boolean(null==(e={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:e.DEV);try{"undefined"!=typeof window&>&&Promise.resolve().then(()=>require("./performance-monitor.js")).then(e=>{ft=e.perfMonitor})}catch(Gt){}function wt(e,t=!0,n=2e3,o){return c(this,null,function*(){const r=performance.now();if(!me()){const e=new Error("KaTeX rendering disabled");return e.name="KaTeXDisabled",e.code="KATEX_DISABLED",Promise.reject(e)}if(ut)return Promise.reject(ut);const l=`${t?"d":"i"}:${e}`,i=pt.get(l);if(i)return ft&&ft.recordRender({type:"cache-hit",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!0}),Promise.resolve(i);const a=st||(ut=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),ut.name="WorkerInitError",ut.code="WORKER_INIT_ERROR",null);if(!a)return Promise.reject(ut);if(dt.size>=mt){const t=new Error("Worker busy");return t.name="WorkerBusy",t.code="WORKER_BUSY",t.busy=!0,t.inFlight=dt.size,t.max=mt,ft&&ft.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:"busy"}),Promise.reject(t)}return new Promise((l,i)=>{if(null==o?void 0:o.aborted){const e=new Error("Aborted");return e.name="AbortError",void i(e)}const s=Math.random().toString(36).slice(2),u=globalThis.setTimeout(()=>{dt.delete(s);const t=new Error("Worker render timed out");t.name="WorkerTimeout",t.code="WORKER_TIMEOUT",ft&&ft.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:"timeout"}),i(t),vt()},n);o&&o.addEventListener("abort",()=>{globalThis.clearTimeout(u),dt.has(s)&&dt.delete(s);const e=new Error("Aborted");e.name="AbortError",i(e),vt()},{once:!0});const c=l,d=i;dt.set(s,{resolve:t=>{ft&&ft.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!0}),c(t)},reject:t=>{ft&&ft.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:(null==t?void 0:t.message)||String(t)}),d(t)},timeoutId:u}),a.postMessage({id:s,content:e,displayMode:t})})})}function yt(e,t=!0,n){const o=`${t?"d":"i"}:${e}`;if(pt.set(o,n),pt.size>200){const e=pt.keys().next().value;pt.delete(e)}}const xt="WORKER_BUSY";function kt(e=2e3,t){return dt.size<mt?Promise.resolve():new Promise((n,o)=>{let r,l=!1;const i=()=>{l||(l=!0,r&&globalThis.clearTimeout(r),ht.delete(i),n())};if(ht.add(i),r=globalThis.setTimeout(()=>{if(l)return;l=!0,ht.delete(i);const e=new Error("Wait for worker slot timed out");e.name="WorkerBusyTimeout",e.code="WORKER_BUSY_TIMEOUT",o(e)},e),queueMicrotask(()=>vt()),t){const e=()=>{if(l)return;l=!0,r&&globalThis.clearTimeout(r),ht.delete(i);const e=new Error("Aborted");e.name="AbortError",o(e)};t.aborted?e():t.addEventListener("abort",e,{once:!0})}})}const bt={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function Ct(e){return c(this,arguments,function*(e,t=!0,n={}){var o,r,l,i;if(!me()){const e=new Error("KaTeX rendering disabled");throw e.name="KaTeXDisabled",e.code="KATEX_DISABLED",e}const a=null!=(o=n.timeout)?o:bt.timeout,s=null!=(r=n.waitTimeout)?r:bt.waitTimeout,u=null!=(l=n.backoffMs)?l:bt.backoffMs,c=null!=(i=n.maxRetries)?i:bt.maxRetries,d=n.signal;let p=0;for(;;){if(null==d?void 0:d.aborted){const e=new Error("Aborted");throw e.name="AbortError",e}try{return yield wt(e,t,a,d)}catch(m){if((null==m?void 0:m.code)!==xt||p>=c)throw m;if(p++,yield kt(s,d).catch(()=>{}),null==d?void 0:d.aborted){const e=new Error("Aborted");throw e.name="AbortError",e}u>0&&(yield new Promise(e=>globalThis.setTimeout(e,u*p)))}}})}const _t=h(p.defineComponent({__name:"MathBlockNode",props:{node:null},setup(e){const t=e,n=p.ref(null),o=p.ref(null);let r=!1,l=0,i=!1,a=null;const s=re();let u=null;const d=p.ref(!0);function m(){return c(this,null,function*(){if(!o.value||i)return;if(!t.node.content)return d.value=!1,o.value.textContent=t.node.raw,void(r=!0);if(!r)try{!u&&n.value&&(u=s(n.value)),yield null==u?void 0:u.whenVisible}catch(Gt){}a&&(a.abort(),a=null);const e=++l,p=new AbortController;a=p,Ct(t.node.content,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:p.signal}).then(t=>{i||e!==l||o.value&&(o.value.innerHTML=t,r=!0,d.value=!1)}).catch(n=>c(this,null,function*(){if(i||e!==l)return;if(!o.value)return;const a=(null==n?void 0:n.code)||(null==n?void 0:n.name),s="KATEX_DISABLED"===a;if("WORKER_INIT_ERROR"===a||(null==n?void 0:n.fallbackToRenderer)||a===xt||"WORKER_TIMEOUT"===a){const e=yield he();if(e){try{const n=e.renderToString(t.node.content,{throwOnError:t.node.loading,displayMode:!0});o.value.innerHTML=n,r=!0,d.value=!1,yt(t.node.content,!0,n)}catch(Gt){}return}}if(s)return d.value=!1,void(o.value.textContent=t.node.raw);r||(d.value=!0),t.node.loading||(d.value=!1,o.value.textContent=t.node.raw)}))})}return p.watch(()=>t.node.content,()=>{m()}),p.onMounted(()=>{m()}),p.onBeforeUnmount(()=>{var e;i=!0,a&&(a.abort(),a=null),null==(e=null==u?void 0:u.destroy)||e.call(u),u=null}),{__sfc:!0,props:t,containerEl:n,mathBlockElement:o,hasRenderedOnce:r,currentRenderId:l,isUnmounted:i,currentAbortController:a,registerVisibility:s,visibilityHandle:u,renderingLoading:d,renderMath:m}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{ref:"containerEl",staticClass:"math-block text-center overflow-x-auto relative min-h-[40px]"},[t("transition",{attrs:{name:"math-fade"}},[n.renderingLoading?t("div",{staticClass:"math-loading-overlay"},[t("div",{staticClass:"math-loading-spinner"})]):e._e()]),t("div",{ref:"mathBlockElement",class:{"math-rendering":n.renderingLoading}})],1)},[],!1,null,"83ce9de4",null,null).exports,Mt=h(p.defineComponent({__name:"MathInlineNode",props:{node:null},setup(e){const t=e,n=p.ref(null),o=p.ref(null);let r=!1,l=0,i=!1,a=null;const s=p.ref(!0),u=re();let d=null;function m(){return c(this,null,function*(){if(!o.value||i)return;if(!t.node.content)return s.value=!1,o.value.textContent=t.node.raw,void(r=!0);a&&(a.abort(),a=null);const e=++l,p=new AbortController;if(a=p,!r)try{!d&&n.value&&(d=u(n.value)),yield null==d?void 0:d.whenVisible}catch(Gt){}Ct(t.node.content,!1,{timeout:1500,waitTimeout:0,maxRetries:0,signal:p.signal}).then(t=>{i||e!==l||o.value&&(o.value.innerHTML=t,s.value=!1,r=!0)}).catch(n=>c(this,null,function*(){if(i||e!==l)return;if(!o.value)return;const a=(null==n?void 0:n.code)||(null==n?void 0:n.name),u="KATEX_DISABLED"===a;if("WORKER_INIT_ERROR"===a||(null==n?void 0:n.fallbackToRenderer)||a===xt||"WORKER_TIMEOUT"===a){const e=yield he();if(e){try{const n=e.renderToString(t.node.content,{throwOnError:t.node.loading,displayMode:!1});s.value=!1,o.value.innerHTML=n,r=!0,yt(t.node.content,!1,n)}catch(Gt){}return}}if(u)return s.value=!1,void(o.value.textContent=t.node.raw);r||(s.value=!u),t.node.loading?u&&(o.value.textContent=t.node.raw):(s.value=!1,o.value.textContent=t.node.raw)}))})}return p.watch(()=>t.node.content,()=>{m()}),p.onMounted(()=>{m()}),p.onBeforeUnmount(()=>{var e;i=!0,a&&(a.abort(),a=null),null==(e=null==d?void 0:d.destroy)||e.call(d),d=null}),{__sfc:!0,props:t,containerEl:n,mathElement:o,hasRenderedOnce:r,currentRenderId:l,isUnmounted:i,currentAbortController:a,renderingLoading:s,registerVisibility:u,visibilityHandle:d,renderMath:m}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("span",{ref:"containerEl",staticClass:"math-inline-wrapper"},[t("span",{directives:[{name:"show",rawName:"v-show",value:!n.renderingLoading,expression:"!renderingLoading"}],ref:"mathElement",staticClass:"math-inline"}),n.renderingLoading?t("transition",{attrs:{name:"table-node-fade"}},[t("span",{staticClass:"math-inline__loading",attrs:{role:"status","aria-live":"polite"}},[e._t("loading",function(){return[t("span",{staticClass:"math-inline__spinner animate-spin",attrs:{"aria-hidden":"true"}}),t("span",{staticClass:"sr-only"},[e._v("Loading")])]},{isLoading:n.renderingLoading})],2)]):e._e()],1)},[],!1,null,"65c5e97c",null,null).exports,Bt=()=>import("mermaid");let Tt=null,St=Bt;function Lt(e){St=e,Tt=null}function Et(){return"function"==typeof St}function Rt(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&("function"==typeof t.render||"function"==typeof t.parse||"function"==typeof t.initialize))return t;if(t&&t.mermaidAPI&&("function"==typeof t.mermaidAPI.render||"function"==typeof t.mermaidAPI.parse)){const e=t.mermaidAPI;return u(s({},t),{render:e.render.bind(e),parse:e.parse?e.parse.bind(e):void 0,initialize:n=>"function"==typeof t.initialize?t.initialize(n):e.initialize?e.initialize(n):void 0})}return e.mermaid&&"function"==typeof e.mermaid.render?e.mermaid:t}function Nt(e){if(e)try{const t=null==e?void 0:e.initialize;e.initialize=n=>{const o=s({suppressErrorRendering:!0},n||{});return"function"==typeof t?t.call(e,o):(null==e?void 0:e.mermaidAPI)&&"function"==typeof e.mermaidAPI.initialize?e.mermaidAPI.initialize(o):void 0}}catch(Gt){}}let It=null,Pt=null;const Ht=new Map;let Dt=5,jt=!1;const Ot="WORKER_BUSY",$t="MERMAID_DISABLED";function At(e,t,n=1400){if(!Et()){const e=new Error("Mermaid rendering disabled");return e.name="MermaidDisabled",e.code=$t,Promise.reject(e)}if(Pt)return Promise.reject(Pt);const o=It||(Pt=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Pt.name="WorkerInitError",Pt.code="WORKER_INIT_ERROR",null);if(!o)return Promise.reject(Pt);if(Ht.size>=Dt){const e=new Error("Worker busy");return e.name="WorkerBusy",e.code=Ot,e.inFlight=Ht.size,e.max=Dt,Promise.reject(e)}return new Promise((r,l)=>{const i=Math.random().toString(36).slice(2);let a,s=!1;const u=()=>{s||(s=!0,null!=a&&globalThis.clearTimeout(a),Ht.delete(i))},c={resolve:e=>{u(),r(e)},reject:e=>{u(),l(e)}};Ht.set(i,c);try{o.postMessage({id:i,action:e,payload:t})}catch(d){return Ht.delete(i),void l(d)}a=globalThis.setTimeout(()=>{const e=new Error("Worker call timed out");e.name="WorkerTimeout",e.code="WORKER_TIMEOUT";const t=Ht.get(i);t&&t.reject(e)},n)})}function zt(e,t,n=1400){return c(this,null,function*(){try{return yield At("canParse",{code:e,theme:t},n)}catch(Gt){return Promise.reject(Gt)}})}function Ft(e,t,n=1400){return c(this,null,function*(){try{return yield At("findPrefix",{code:e,theme:t},n)}catch(Gt){return Promise.reject(Gt)}})}function Vt(){if(It)try{for(const[e,t]of Ht.entries())t.reject(new Error("Worker terminated"));Ht.clear(),It.terminate()}finally{It=null}}const Wt=h(p.defineComponent({__name:"MermaidBlockNode",props:{node:null,maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},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:!1}},emits:["copy","export","openModal","toggleMode"],setup(e,{emit:t}){var n,o;const r=e,l={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},i=p.ref(!1),a=p.computed(()=>r.isStrict?"strict":"loose"),d=p.computed(()=>({startOnLoad:!1,securityLevel:a.value,dompurifyConfig:"strict"===a.value?l:void 0,flowchart:"strict"===a.value?{htmlLabels:!1}:void 0}));function h(e){return e.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}const v=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],f=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function g(e){if(!e)return"";const t=e.trim();return f.test(t)?t:""}function w(e){const t=new Set(["script"]),n=[e,...Array.from(e.querySelectorAll("*"))];for(const o of n){if(t.has(o.tagName.toLowerCase())){o.remove();continue}const e=Array.from(o.attributes);for(const t of e){const e=t.name;if(/^on/i.test(e))o.removeAttribute(e);else{if("style"===e&&t.value){const n=t.value;if(v.some(e=>e.test(n))){o.removeAttribute(e);continue}}if(("href"===e||"xlink:href"===e)&&t.value){const n=g(t.value);if(!n){o.removeAttribute(e);continue}n!==t.value&&o.setAttribute(e,n)}}}}}function y(e){if("undefined"==typeof window||"undefined"==typeof DOMParser)return null;if(!e)return null;const t=h(e),n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(!n||"svg"!==n.nodeName.toLowerCase())return null;const o=n;return w(o),o}function x(e,t){if(!e)return"";try{e.replaceChildren()}catch(Gt){e.innerHTML=""}const n=y(t);return n?(e.appendChild(n),e.innerHTML):""}function k(e){if(e)try{e.replaceChildren()}catch(Gt){e.innerHTML=""}}function b(e,t){if(!e)return"";if("strict"===a.value)return x(e,t);try{e.replaceChildren()}catch(Gt){e.innerHTML=""}if(t)try{e.insertAdjacentHTML("afterbegin",t)}catch(Gt){e.innerHTML=t}return e.innerHTML}const{t:C}=ne();function _(){return c(this,null,function*(){try{const e=yield function(){return c(this,null,function*(){if(Tt)return Tt;const e=function(){try{const e=globalThis;return Rt(null==e?void 0:e.mermaid)}catch(Gt){return null}}();if(e)return Tt=e,Nt(Tt),Tt;const t=St;if(!t)return null;let n;try{n=yield t()}catch(o){if(t===Bt)throw new Error('Optional dependency "mermaid" is not installed. Please install it to enable mermaid diagrams.');throw o}return n?(Tt=Rt(n),Nt(Tt),Tt):null})}();return i.value=!!e,e}catch(e){throw i.value=!1,e}})}"undefined"!=typeof window&&(()=>{c(this,null,function*(){var e;try{const t=yield _();if(!t)return;null==(e=null==t?void 0:t.initialize)||e.call(t,s({},d.value))}catch(t){i.value=!1,console.warn("[markstream-vue2] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",t)}})})();const M=p.ref(!1),B=p.ref(!1),T=p.ref(),S=p.ref(),L=p.ref(),E=p.ref(null),R=re();let N=null;const I=p.ref("undefined"==typeof window),P=p.ref(),H=p.computed(()=>r.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function D(e,t=H.value){const n=t,o=`%%{init: {"theme": "${"dark"===e?"dark":"default"}"}}%%\n`;return n.trim().startsWith("%%{")?n:o+n}const j=p.ref(1),O=p.ref(0),$=p.ref(0),A=p.ref(!1),z=p.ref({x:0,y:0}),F=p.ref(!1),V=p.ref(!1),W=p.ref(!1),K=p.ref(null),U=p.ref(0),X=p.ref(!1);let q=null,Y=null,Z=0;const G=null!=(n=globalThis.requestIdleCallback)?n:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),J=Ve(()=>{G(()=>{Ze()},{timeout:500})},300);function te(){null!=Y&&(globalThis.clearTimeout(Y),Y=null)}function oe(e=600){if("undefined"==typeof globalThis)return;const t=Math.max(0,e);te(),Y=globalThis.setTimeout(()=>{Y=null,r.loading||W.value||!I.value?oe(Math.min(1200,Math.max(300,1.2*t))):J()},t)}const le=p.ref("360px");let ie=null;const ae=p.ref(!1),se=p.ref(!1),ue=p.ref({}),ce=p.ref(null),de=p.ref(""),pe=p.ref(0);let me=null;const he=p.ref(!1),ve=p.ref({zoom:1,translateX:0,translateY:0,containerHeight:"360px"}),fe=p.computed(()=>r.enableWheelZoom?{wheel:Ke}:{}),ge=p.computed(()=>{var e,t,n,o;return{worker:null!=(e=r.workerTimeoutMs)?e:1400,parse:null!=(t=r.parseTimeoutMs)?t:1800,render:null!=(n=r.renderTimeoutMs)?n:2500,fullRender:null!=(o=r.fullRenderTimeoutMs)?o:4e3}}),we=null!=(o=globalThis.cancelIdleCallback)?o:e=>clearTimeout(e);let ye=null,xe=null,ke=!1,be=800,Ce=null,_e=0,Me=!0;function Be(e,t){const n=null==t?void 0:t.timeoutMs,o=null==t?void 0:t.signal;if(null==o?void 0:o.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,l=!1,i=null;return new Promise((t,a)=>{const s=()=>{null!=r&&clearTimeout(r),i&&o&&o.removeEventListener("abort",i)};n&&n>0&&(r=globalThis.setTimeout(()=>{l||(l=!0,s(),a(new Error("Operation timed out")))},n)),o&&(i=()=>{l||(l=!0,s(),a(new DOMException("Aborted","AbortError")))},o.addEventListener("abort",i)),e().then(e=>{l||(l=!0,s(),t(e))}).catch(e=>{l||(l=!0,s(),a(e))})})}function Te(e){if("undefined"==typeof document)return;if(!S.value)return;const t=document.createElement("div");t.className="text-red-500 p-4",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),k(S.value),S.value.appendChild(t),le.value="360px",he.value=!0,Ge()}function Se(e){const t="string"==typeof e?e:"string"==typeof(null==e?void 0:e.message)?e.message:"";return"string"==typeof t&&/timed out/i.test(t)}function Le(e){return!e||e.disabled}function Ee(e,t){const n=`%%{init: {"theme": "${"dark"===t?"dark":"default"}"}}%%\n`;return e.trimStart().startsWith("%%{")?e:n+e}function Re(){return Me&&!F.value&&!ae.value&&!he.value}function Ne(e){const t=e.split(/\r?\n/);for(;t.length>0;){const e=t[t.length-1].trimEnd();if(""!==e){if(!(/^[-=~>|<\s]+$/.test(e.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(e)||/[-|><]$/.test(e)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(e)))break;t.pop()}else t.pop()}return t.join("\n")}function Ie(e,t,n){return c(this,null,function*(){var o,r;const l=yield _();if(!l)return;const i=l,a=Ee(e,t);if("function"==typeof i.parse)return yield Be(()=>i.parse(a),{timeoutMs:null!=(o=null==n?void 0:n.timeoutMs)?o:ge.value.parse,signal:null==n?void 0:n.signal}),!0;const s=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return yield Be(()=>l.render(s,a),{timeoutMs:null!=(r=null==n?void 0:n.timeoutMs)?r:ge.value.render,signal:null==n?void 0:n.signal}),!0})}function Pe(e,t,n){return c(this,null,function*(){var o;try{return yield zt(e,t,null!=(o=null==n?void 0:n.timeoutMs)?o:ge.value.worker)}catch(Gt){return yield Ie(e,t,n)}})}function He(e,t,n){return c(this,null,function*(){var o;try{if(yield Pe(e,t,n))return{fullOk:!0,prefixOk:!1}}catch(Gt){if("AbortError"===(null==Gt?void 0:Gt.name))throw Gt}let r=Ne(e);if(r&&r.trim()&&r!==e)try{try{const l=yield Ft(e,t,null!=(o=null==n?void 0:n.timeoutMs)?o:ge.value.worker);l&&l.trim()&&(r=l)}catch(Gt){}if(yield Pe(r,t,n))return{fullOk:!1,prefixOk:!0,prefix:r}}catch(Gt){if("AbortError"===(null==Gt?void 0:Gt.name))throw Gt}return{fullOk:!1,prefixOk:!1}})}"undefined"!=typeof window&&p.watch(()=>T.value,e=>{if(null==N||N.destroy(),N=null,!e)return void(I.value=!1);const t=R(e,{rootMargin:"400px"});N=t,I.value=t.isVisible.value,t.whenVisible.then(()=>{I.value=!0})},{immediate:!0}),p.onBeforeUnmount(()=>{null==N||N.destroy(),N=null});const De=p.computed(()=>F.value||W.value||B.value);function je(e){if(!T.value||!S.value)return;const t=S.value.querySelector("svg");if(!t)return;let n=0,o=0;const r=t.getAttribute("viewBox"),l=t.getAttribute("width"),i=t.getAttribute("height");if(r){const e=r.split(" ");4===e.length&&(n=Number.parseFloat(e[2]),o=Number.parseFloat(e[3]))}if(n&&o||l&&i&&(n=Number.parseFloat(l),o=Number.parseFloat(i)),Number.isNaN(n)||Number.isNaN(o)||n<=0||o<=0)try{const e=t.getBBox();e&&e.width>0&&e.height>0&&(n=e.width,o=e.height)}catch(Gt){return void console.error("Failed to get SVG BBox:",Gt)}if(n>0&&o>0){const t=o/n;let r=(null!=e?e:T.value.clientWidth)*t;r>o&&(r=o),le.value=`${r}px`}}const Oe=p.ref(!1),$e=p.computed(()=>({transform:`translate(${O.value}px, ${$.value}px) scale(${j.value})`}));function Ae(e){"Escape"===e.key&&Oe.value&&Fe()}function ze(){if(Oe.value=!0,"undefined"!=typeof document)try{document.body.style.overflow="hidden"}catch(Gt){}if("undefined"!=typeof window)try{window.addEventListener("keydown",Ae)}catch(Gt){}p.nextTick(()=>{if(T.value&&L.value){const e=T.value.cloneNode(!0);e.classList.add("fullscreen");const t=e.querySelector("[data-mermaid-wrapper]");t&&(E.value=t,t.style.transform=$e.value.transform),k(L.value),L.value.appendChild(e)}})}function Fe(){if(Oe.value=!1,L.value&&k(L.value),E.value=null,"undefined"!=typeof document)try{document.body.style.overflow=""}catch(Gt){}if("undefined"!=typeof window)try{window.removeEventListener("keydown",Ae)}catch(Gt){}}function Ve(e,t){let n=null;return(...o)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...o),t)}}function We(){if(!F.value)return;if(!i.value)return;const e=H.value.length;e!==U.value&&(X.value=!0,U.value=e,q&&clearTimeout(q),q=setTimeout(()=>{X.value&&F.value&&H.value.trim()&&(X.value=!1,Xe("preview"))},500))}function Ke(e){if(r.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!T.value)return;const t=T.value.getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top,r=n-t.width/2,l=o-t.height/2,i=(r-O.value)/j.value,a=(l-$.value)/j.value,s=.01,u=-e.deltaY*s,c=Math.min(Math.max(j.value+u,.5),3);c!==j.value&&(O.value=r-i*c,$.value=l-a*c,j.value=c)}}function Ue(e,t=null){return c(this,null,function*(){try{const n=null!=t?t:(new XMLSerializer).serializeToString(e),o=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(o);if("undefined"!=typeof document){const e=document.createElement("a");e.href=r,e.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(Gt){}URL.revokeObjectURL(r)}}catch(n){console.error("Failed to export SVG:",n)}})}function Xe(e){return c(this,null,function*(){const t=P.value;if(!t)return V.value=!0,void(F.value="source"===e);const n=t.getBoundingClientRect().height;t.style.height=`${n}px`,t.style.overflow="hidden",V.value=!0,F.value="source"===e,yield p.nextTick();const o=t.scrollHeight;t.style.transition="height 180ms ease",t.offsetHeight,t.style.height=`${o}px`;const r=()=>{t.style.transition="",t.style.height="",t.style.overflow="",t.removeEventListener("transitionend",l)};function l(){r()}t.addEventListener("transitionend",l),setTimeout(()=>r(),220)})}function qe(){return c(this,null,function*(){return W.value?K.value:S.value||(yield p.nextTick(),S.value)?(W.value=!0,K.value=(()=>c(this,null,function*(){var e,t;S.value&&(S.value.style.opacity="0");try{const t=yield _();if(!t)return;const n=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;ae.value||se.value||null==(e=t.initialize)||e.call(t,u(s({},d.value),{dompurifyConfig:s({},l)}));const o=D(r.isDark?"dark":"light"),i=yield Be(()=>t.render(n,o),{timeoutMs:ge.value.fullRender}),a=null==i?void 0:i.svg;if(S.value){const e=b(S.value,a);ae.value||se.value||(je(),ae.value=!0,ve.value={zoom:j.value,translateX:O.value,translateY:$.value,containerHeight:le.value});const t=r.isDark?"dark":"light";e&&(ue.value[t]=e),se.value&&(se.value=!1),he.value=!1,Z=0,te()}}catch(n){const e=Se(n),o=Z+1;e&&o<=3?(Z=o,oe(Math.min(1200,600*o)),void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("exports.js",document.baseURI).href}&&(null==(t={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:t.DEV)&&console.warn("[markstream-vue2] Mermaid render timed out, retry scheduled:",o)):(Z=0,te(),console.error("Failed to render mermaid diagram:",n),!1===r.loading&&Te(n))}finally{yield p.nextTick(),S.value&&(S.value.style.opacity="1"),W.value=!1,K.value=null}}))(),K.value):void console.warn("Mermaid container not ready")})}function Ye(e){return c(this,null,function*(){if(Re()&&(S.value||(yield p.nextTick(),S.value))&&!W.value){W.value=!0;try{const t=yield _();if(!t)return;const n=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,o=r.isDark?"dark":"light",l=Ne(e),i=Ee(l&&l.trim()?l:e,o);S.value&&(S.value.style.opacity="0");const a=yield Be(()=>t.render(n,i),{timeoutMs:ge.value.render}),s=null==a?void 0:a.svg;S.value&&s&&(b(S.value,s),je())}catch(Gt){}finally{yield p.nextTick(),S.value&&(S.value.style.opacity="1"),W.value=!1}}})}function Ze(){return c(this,null,function*(){var e,t;const n=Date.now(),o=++pe.value;me&&me.abort(),me=new AbortController;const l=me.signal,i=r.isDark?"dark":"light",a=H.value,s=a.replace(/\s+/g,"");if(!a.trim())return S.value&&k(S.value),ce.value=null,de.value="",void(he.value=!1);if(s===de.value)return;try{const r=yield He(a,i,{signal:l,timeoutMs:ge.value.worker});if(r.fullOk)return yield qe(),void(pe.value===o&&(ce.value=null!=(t=null==(e=S.value)?void 0:e.innerHTML)?t:null,de.value=s,he.value=!1));const u=_e&&n<=_e;if(r.prefixOk&&r.prefix&&Re()&&!u)return void(yield Ye(r.prefix))}catch(Gt){if("AbortError"===(null==Gt?void 0:Gt.name))return}if(pe.value!==o)return;if(he.value)return;const u=ue.value[i];u&&S.value&&b(S.value,u)})}function Ge(){ke&&(ke=!1,be=800,Me=!1,Ce&&(Ce.abort(),Ce=null),ye&&(globalThis.clearTimeout(ye),ye=null),xe&&(we(xe),xe=null),_e=Date.now())}function Je(){if(Ge(),me){try{me.abort()}catch(Gt){}me=null}if(Ce){try{Ce.abort()}catch(Gt){}Ce=null}Vt(),te(),Z=0}function Qe(e=800){ke&&(ye&&globalThis.clearTimeout(ye),ye=globalThis.setTimeout(()=>{xe=G(()=>c(this,null,function*(){if(!ke)return;if(F.value||ae.value)return void Ge();const e=r.isDark?"dark":"light",t=H.value;if(t.trim()){Ce&&Ce.abort(),Ce=new AbortController;try{if((yield Pe(t,e,{signal:Ce.signal,timeoutMs:ge.value.worker}))&&(yield qe(),ae.value))return void Ge()}catch(Gt){}be=Math.min(Math.floor(1.5*be),4e3),Qe(be)}else Qe(be)}),{timeout:500})},e))}function et(){ke||F.value||ae.value||(ke=!0,_e=0,Me=!0,Qe(500))}p.watch($e,e=>{Oe.value&&E.value&&(E.value.style.transform=e.transform)},{immediate:!0}),p.watch(()=>H.value,()=>{ae.value=!1,ue.value={},J(),!F.value&&i.value&&et(),We()}),p.watch(()=>r.isDark,()=>c(this,null,function*(){if(!ae.value)return;if(he.value)return;const e=r.isDark?"dark":"light",t=ue.value[e];if(t)return void(S.value&&b(S.value,t));const n={zoom:j.value,translateX:O.value,translateY:$.value,containerHeight:le.value},o=1!==j.value||0!==O.value||0!==$.value;se.value=!0,o&&(j.value=1,O.value=0,$.value=0,yield p.nextTick()),yield qe(),o&&(yield p.nextTick(),j.value=n.zoom,O.value=n.translateX,$.value=n.translateY,le.value=n.containerHeight,ve.value=n)})),p.watch(()=>F.value,e=>c(this,null,function*(){if(e)Ge(),ae.value&&(ve.value={zoom:j.value,translateX:O.value,translateY:$.value,containerHeight:le.value});else{if(he.value)return;const e=r.isDark?"dark":"light";if(ae.value&&ue.value[e])return yield p.nextTick(),S.value&&b(S.value,ue.value[e]),j.value=ve.value.zoom,O.value=ve.value.translateX,$.value=ve.value.translateY,void(le.value=ve.value.containerHeight);if(yield p.nextTick(),!i.value)return;yield Ze(),et()}})),p.watch(()=>r.loading,(e,t)=>c(this,null,function*(){if(!0===t&&!1===e){const e=H.value.trim();if(!e)return Je();const t=r.isDark?"dark":"light",o=e.replace(/\s+/g,"");if(ae.value&&o===de.value)return yield p.nextTick(),S.value&&!S.value.querySelector("svg")&&ue.value[t]&&b(S.value,ue.value[t]),void Je();try{yield Pe(e,t,{timeoutMs:ge.value.worker}),yield qe(),de.value=o,he.value=!1,Je()}catch(n){Je(),Te(n)}}})),p.watch(T,e=>{ie&&ie.disconnect(),!e||ae.value||se.value||(ie=new ResizeObserver(e=>{e&&e.length>0&&!ae.value&&!se.value&&ot(()=>{je(e[0].contentRect.width)})}),ie.observe(e))},{immediate:!0}),p.onMounted(()=>c(this,null,function*(){yield p.nextTick(),V.value||(F.value=!i.value),I.value&&(J(),U.value=H.value.length)})),p.watch(()=>i.value,e=>{V.value||(F.value=!e)}),p.watch(()=>I.value,e=>{e&&(ae.value||(J(),U.value=H.value.length),r.loading||ae.value||J())},{immediate:!1}),p.onUnmounted(()=>{q&&clearTimeout(q),ie&&ie.disconnect(),me&&(me.abort(),me=null),Vt(),Ge(),te()}),p.watch(()=>B.value,e=>c(this,null,function*(){e?(Ge(),me&&me.abort()):ae.value||(yield p.nextTick(),J(),F.value||et())}),{immediate:!1});const tt=p.computed(()=>r.isDark?"mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700");return{__sfc:!0,props:r,emits:t,DOMPURIFY_CONFIG:l,mermaidAvailable:i,mermaidSecurityLevel:a,mermaidInitConfig:d,neutralizeScriptProtocols:h,DISALLOWED_STYLE_PATTERNS:v,SAFE_URL_PROTOCOLS:f,sanitizeUrl:g,scrubSvgElement:w,toSafeSvgElement:y,setSafeSvg:x,clearElement:k,renderSvgToTarget:b,t:C,resolveMermaidInstance:_,copyText:M,isCollapsed:B,mermaidContainer:T,mermaidContent:S,modalContent:L,modalCloneWrapper:E,registerViewport:R,viewportHandle:N,viewportReady:I,modeContainerRef:P,baseFixedCode:H,getCodeWithTheme:D,zoom:j,translateX:O,translateY:$,isDragging:A,dragStart:z,showSource:F,userToggledShowSource:V,isRendering:W,renderQueue:K,RENDER_DEBOUNCE_DELAY:300,CONTENT_STABLE_DELAY:500,lastContentLength:U,isContentGenerating:X,contentStableTimer:q,renderRetryTimer:Y,consecutiveRenderTimeouts:Z,MAX_RENDER_TIMEOUT_RETRIES:3,requestIdle:G,debouncedProgressiveRender:J,clearRenderRetryTimer:te,scheduleRenderRetry:oe,containerHeight:le,resizeObserver:ie,hasRenderedOnce:ae,isThemeRendering:se,svgCache:ue,lastSvgSnapshot:ce,lastRenderedCode:de,renderToken:pe,currentWorkController:me,hasRenderError:he,savedTransformState:ve,wheelListeners:fe,timeouts:ge,cancelIdle:we,previewPollTimeoutId:ye,previewPollIdleId:xe,isPreviewPolling:ke,previewPollDelay:be,previewPollController:Ce,lastPreviewStopAt:_e,allowPartialPreview:Me,withTimeoutSignal:Be,renderErrorToContainer:Te,isTimeoutError:Se,shouldSkipEventTarget:Le,onBtnHover:function(e,t,n="top"){if(Le(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;Q(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){ee()},onCopyHover:function(e){if(Le(e.currentTarget))return;const t=M.value?C("common.copied")||"Copied":C("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;Q(e.currentTarget,t,"top",!1,o,r.isDark)},applyThemeTo:Ee,canApplyPartialPreview:Re,getSafePrefixCandidate:Ne,canParseOnMain:Ie,canParseOffthread:Pe,canParseOrPrefix:He,isFullscreenDisabled:De,updateContainerHeight:je,isModalOpen:Oe,transformStyle:$e,handleKeydown:Ae,openModal:ze,closeModal:Fe,debounce:Ve,checkContentStability:We,zoomIn:function(){j.value<3&&(j.value+=.1)},zoomOut:function(){j.value>.5&&(j.value-=.1)},resetZoom:function(){j.value=1,O.value=0,$.value=0},startDrag:function(e){A.value=!0,e instanceof MouseEvent?z.value={x:e.clientX-O.value,y:e.clientY-$.value}:z.value={x:e.touches[0].clientX-O.value,y:e.touches[0].clientY-$.value}},onDrag:function(e){if(!A.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),O.value=t-z.value.x,$.value=n-z.value.y},stopDrag:function(){A.value=!1},handleWheel:Ke,copy:function(){return c(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(H.value)),M.value=!0,t("copy",H.value),setTimeout(()=>{M.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})},exportSvg:Ue,handleExportClick:function(){var e;const n=null==(e=S.value)?void 0:e.querySelector("svg");if(!n)return void console.error("SVG element not found");const o=(new XMLSerializer).serializeToString(n),r={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:n,svgString:o};t("export",r),r.defaultPrevented||Ue(n,o)},handleOpenModalClick:function(){var e,n;const o=null!=(n=null==(e=S.value)?void 0:e.querySelector("svg"))?n:null,r=o?(new XMLSerializer).serializeToString(o):null,l={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:o,svgString:r};t("openModal",l),l.defaultPrevented||ze()},handleSwitchMode:function(e){const n={payload:{type:"toggle-mode",target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};t("toggleMode",e,n),n.defaultPrevented||Xe(e)},switchMode:Xe,initMermaid:qe,renderPartial:Ye,progressiveRender:Ze,stopPreviewPolling:Ge,cleanupAfterLoadingSettled:Je,scheduleNextPreviewPoll:Qe,startPreviewPolling:et,computedButtonStyle:tt,mermaidIconUrl:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij4KICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNjYTllZTYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEuNSAyLjVjMCA2IDIuMjUgNS43NSA0IDcgLjgzLjY3IDEuMTcgMiAxIDRoM2MtLjE3LTIgLjE3LTMuMzMgMS00IDEuNzUtMS4yNSA0LTEgNC03QzEyIDIuNSAxMCAzIDggNyA2IDMgNCAyLjUgMS41IDIuNSIgLz4KPC9zdmc+Cg==",Portal:rt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":n.props.loading}]},[n.props.showHeader?t("div",{staticClass:"mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b",class:n.props.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"},[e.$slots["header-left"]?t("div",[e._t("header-left")],2):t("div",{staticClass:"flex items-center space-x-2 overflow-hidden"},[t("img",{staticClass:"w-4 h-4 my-0",attrs:{src:n.mermaidIconUrl,alt:"Mermaid"}}),t("span",{staticClass:"text-sm font-medium font-mono truncate",class:n.props.isDark?"text-gray-400":"text-gray-600"},[e._v("Mermaid")])]),e.$slots["header-center"]?t("div",[e._t("header-center")],2):n.props.showModeToggle&&n.mermaidAvailable?t("div",{staticClass:"flex items-center space-x-1 rounded-md p-0.5",class:n.props.isDark?"bg-gray-700":"bg-gray-100"},[t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"],on:{click:()=>n.handleSwitchMode("preview"),mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center space-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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"}}),t("circle",{attrs:{cx:"12",cy:"12",r:"3"}})])]),t("span",[e._v(e._s(n.t("common.preview")||"Preview"))])])]),t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"],on:{click:()=>n.handleSwitchMode("source"),mouseenter:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},focus:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center space-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"}})]),t("span",[e._v(e._s(n.t("common.source")||"Source"))])])])]):e._e(),e.$slots["header-right"]?t("div",[e._t("header-right")],2):t("div",{staticClass:"flex items-center space-x-1"},[n.props.showCollapseButton?t("button",{class:n.computedButtonStyle,attrs:{"aria-pressed":n.isCollapsed},on:{click:function(e){n.isCollapsed=!n.isCollapsed},mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]):e._e(),n.props.showCopyButton?t("button",{class:n.computedButtonStyle,on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExportButton&&n.mermaidAvailable?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleExportClick,mouseenter:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},focus:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}}),t("path",{attrs:{d:"m7 10l5 5l5-5"}})])])]):e._e(),n.props.showFullscreenButton&&n.mermaidAvailable?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleOpenModalClick,mouseenter:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},focus:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isModalOpen?t("svg",{attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})]):t("svg",{attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})])]):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.isCollapsed,expression:"!isCollapsed"}],ref:"modeContainerRef"},[n.showSource?t("div",{staticClass:"p-4",class:n.props.isDark?"bg-gray-900":"bg-gray-50"},[t("pre",{staticClass:"text-sm font-mono whitespace-pre-wrap",class:n.props.isDark?"text-gray-300":"text-gray-700"},[e._v(e._s(n.baseFixedCode))])]):t("div",{staticClass:"relative"},[n.props.showZoomControls?t("div",{staticClass:"absolute top-2 right-2 z-10 rounded-lg"},[t("div",{staticClass:"flex items-center gap-2 backdrop-blur rounded-lg"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},focus:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},focus:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom,mouseenter:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},focus:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")])])]):e._e(),t("div",e._g({ref:"mermaidContainer",staticClass:"min-h-[360px] relative transition-all duration-100 overflow-hidden block",class:n.props.isDark?"bg-gray-900":"bg-gray-50",style:{height:n.containerHeight},on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},n.wheelListeners),[t("div",{staticClass:"absolute inset-0 cursor-grab",class:{"cursor-grabbing":n.isDragging},style:n.transformStyle,attrs:{"data-mermaid-wrapper":""}},[t("div",{ref:"mermaidContent",staticClass:"_mermaid w-full text-center flex items-center justify-center min-h-full"})])]),t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue2"},[t("transition",{attrs:{name:"mermaid-dialog",appear:""}},[n.isModalOpen?t("div",{staticClass:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",on:{click:function(e){return e.target!==e.currentTarget?null:n.closeModal.apply(null,arguments)}}},[t("div",{staticClass:"dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",class:n.props.isDark?"bg-gray-900":"bg-white"},[t("div",{staticClass:"absolute top-6 right-6 z-50 flex items-center gap-2"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")]),t("button",{staticClass:"inline-flex items-center justify-center p-2 rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.closeModal}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"}})])])]),t("div",e._g({ref:"modalContent",staticClass:"w-full h-full flex items-center justify-center p-4 overflow-hidden",on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},n.wheelListeners))])]):e._e()])],1)])],1)])])},[],!1,null,"7f0dc907",null,null).exports;function Kt(e){return JSON.stringify(e)}function Ut(e){var t;const n=null!=(t=e.mode)?t:"classic",o=e.katexUrl,r=e.mhchemUrl,l=Kt(s({throwOnError:!0,displayMode:!0,output:"html",strict:"ignore"},e.renderOptions||{})),i=Kt(o),a=r?Kt(r):'""';return"module"===n?`\nlet DEBUG = false\nlet katex = null\nlet katexLoadError = null\nlet loadPromise = null\n\nfunction normalizeKaTeX(mod) {\n const resolved = (mod && mod.default) ? mod.default : mod\n if (resolved && typeof resolved.renderToString === 'function')\n return resolved\n return null\n}\n\nasync function loadKaTeX() {\n if (katex || katexLoadError)\n return\n if (!loadPromise) {\n loadPromise = (async () => {\n try {\n const mod = await import(${i})\n katex = normalizeKaTeX(mod) || null\n const mhchemUrl = ${a}\n if (mhchemUrl) {\n try {\n await import(mhchemUrl)\n }\n catch (e) {\n // ignore optional mhchem load failures\n if (DEBUG)\n console.warn('[katex-cdn-worker] failed to load mhchem', e)\n }\n }\n }\n catch (e) {\n katexLoadError = e\n }\n })()\n }\n await loadPromise\n}\n\nglobalThis.addEventListener('message', async (ev) => {\n const data = ev.data || {}\n if (data.type === 'init') {\n DEBUG = !!data.debug\n if (DEBUG)\n console.debug('[katex-cdn-worker] debug enabled')\n return\n }\n const id = data.id ?? ''\n const content = data.content ?? ''\n const displayMode = data.displayMode ?? true\n\n await loadKaTeX()\n\n if (!katex) {\n const reason = katexLoadError ? String(katexLoadError?.message || katexLoadError) : 'KaTeX is not available in worker'\n globalThis.postMessage({ id, error: reason, content, displayMode })\n return\n }\n\n try {\n const opts = ${l}\n const html = katex.renderToString(content, { ...opts, displayMode: !!displayMode })\n globalThis.postMessage({ id, html, content, displayMode })\n }\n catch (err) {\n const msg = String(err?.message || err)\n globalThis.postMessage({ id, error: msg, content, displayMode })\n }\n})\n`.trimStart():`\nlet DEBUG = false\nlet katex = null\nlet katexLoadError = null\n\nfunction normalizeKaTeX(val) {\n const resolved = (val && val.default) ? val.default : val\n if (resolved && typeof resolved.renderToString === 'function')\n return resolved\n return null\n}\n\nfunction loadKaTeXClassic() {\n if (katex || katexLoadError)\n return\n try {\n importScripts(${i})\n const mhchemUrl = ${a}\n if (mhchemUrl) {\n try {\n importScripts(mhchemUrl)\n }\n catch (e) {\n // ignore optional mhchem load failures\n if (DEBUG)\n console.warn('[katex-cdn-worker] failed to load mhchem', e)\n }\n }\n katex = normalizeKaTeX(globalThis.katex)\n }\n catch (e) {\n katexLoadError = e\n }\n}\n\nloadKaTeXClassic()\n\nglobalThis.addEventListener('message', (ev) => {\n const data = ev.data || {}\n if (data.type === 'init') {\n DEBUG = !!data.debug\n if (DEBUG)\n console.debug('[katex-cdn-worker] debug enabled')\n return\n }\n const id = data.id ?? ''\n const content = data.content ?? ''\n const displayMode = data.displayMode ?? true\n\n if (!katex && !katexLoadError)\n loadKaTeXClassic()\n\n if (!katex) {\n const reason = katexLoadError ? String(katexLoadError?.message || katexLoadError) : 'KaTeX is not available in worker'\n globalThis.postMessage({ id, error: reason, content, displayMode })\n return\n }\n\n try {\n const opts = ${l}\n const html = katex.renderToString(content, { ...opts, displayMode: !!displayMode })\n globalThis.postMessage({ id, html, content, displayMode })\n }\n catch (err) {\n const msg = String(err?.message || err)\n globalThis.postMessage({ id, error: msg, content, displayMode })\n }\n})\n`.trimStart()}function Xt(e){return JSON.stringify(e)}function qt(e){var t;const n=null!=(t=e.mode)?t:"module",o=Xt(e.mermaidUrl),r=`\nlet DEBUG = false\nlet mermaid = null\nlet mermaidLoadError = null\n\nfunction normalizeMermaidModule(mod) {\n if (!mod)\n return mod\n const candidate = (mod && mod.default) ? mod.default : mod\n if (candidate && (typeof candidate.render === 'function' || typeof candidate.parse === 'function' || typeof candidate.initialize === 'function'))\n return candidate\n if (candidate && candidate.mermaidAPI && (typeof candidate.mermaidAPI.render === 'function' || typeof candidate.mermaidAPI.parse === 'function')) {\n const api = candidate.mermaidAPI\n return {\n ...candidate,\n render: api.render ? api.render.bind(api) : undefined,\n parse: api.parse ? api.parse.bind(api) : undefined,\n initialize: (opts) => {\n if (typeof candidate.initialize === 'function')\n return candidate.initialize(opts)\n return api.initialize ? api.initialize(opts) : undefined\n },\n }\n }\n if (mod && mod.mermaid && typeof mod.mermaid.parse === 'function')\n return mod.mermaid\n return candidate\n}\n\nfunction applyThemeTo(code, theme) {\n const themeValue = theme === 'dark' ? 'dark' : 'default'\n const themeConfig = \`%%{init: {"theme": "\${themeValue}"}}%%\\n\`\n const trimmed = (code || '').trimStart()\n if (trimmed.startsWith('%%{'))\n return code\n return themeConfig + code\n}\n\nfunction findHeaderIndex(lines) {\n const headerRe = /^(?:graph|flowchart|flowchart\\s+tb|flowchart\\s+lr|sequenceDiagram|gantt|classDiagram|stateDiagram(?:-v2)?|erDiagram|journey|pie|quadrantChart|timeline|xychart(?:-beta)?)\\b/\n for (let i = 0; i < lines.length; i++) {\n const l = (lines[i] || '').trim()\n if (!l)\n continue\n if (l.startsWith('%%'))\n continue\n if (headerRe.test(l))\n return i\n }\n return -1\n}\n\nasync function canParse(code, theme) {\n const themed = applyThemeTo(code, theme)\n const anyMermaid = mermaid\n if (anyMermaid && typeof anyMermaid.parse === 'function') {\n await anyMermaid.parse(themed)\n return true\n }\n throw new Error('mermaid.parse not available in worker')\n}\n\nasync function findLastRenderablePrefix(baseCode, theme) {\n const lines = String(baseCode || '').split('\\n')\n const headerIdx = findHeaderIndex(lines)\n if (headerIdx === -1)\n return null\n const head = lines.slice(0, headerIdx + 1)\n await canParse(head.join('\\n'), theme)\n\n let low = headerIdx + 1\n let high = lines.length\n let lastGood = headerIdx + 1\n let tries = 0\n const MAX_TRIES = 12\n\n while (low <= high && tries < MAX_TRIES) {\n const mid = Math.floor((low + high) / 2)\n const candidate = [...head, ...lines.slice(headerIdx + 1, mid)].join('\\n')\n tries++\n try {\n await canParse(candidate, theme)\n lastGood = mid\n low = mid + 1\n }\n catch {\n high = mid - 1\n }\n }\n\n return [...head, ...lines.slice(headerIdx + 1, lastGood)].join('\\n')\n}\n\nfunction initMermaidOnce() {\n if (!mermaid)\n return\n try {\n if (typeof mermaid.initialize === 'function')\n mermaid.initialize(${Xt(s({startOnLoad:!1,securityLevel:"loose"},e.initializeOptions||{}))})\n }\n catch (e) {\n if (DEBUG)\n console.warn('[mermaid-cdn-worker] initialize failed', e)\n }\n}\n\nglobalThis.addEventListener('message', async (ev) => {\n const msg = ev.data || {}\n if (msg.type === 'init') {\n DEBUG = !!msg.debug\n if (DEBUG)\n console.debug('[mermaid-cdn-worker] debug enabled')\n return\n }\n\n const id = msg.id\n const action = msg.action\n const payload = msg.payload || {}\n\n if (!mermaid) {\n const errMsg = mermaidLoadError ? String(mermaidLoadError?.message || mermaidLoadError) : 'Mermaid is not available in worker'\n globalThis.postMessage({ id, ok: false, error: errMsg })\n return\n }\n\n try {\n if (action === 'canParse') {\n const ok = await canParse(payload.code, payload.theme)\n globalThis.postMessage({ id, ok: true, result: ok })\n return\n }\n if (action === 'findPrefix') {\n const res = await findLastRenderablePrefix(payload.code, payload.theme)\n globalThis.postMessage({ id, ok: true, result: res })\n return\n }\n globalThis.postMessage({ id, ok: false, error: 'Unknown action' })\n }\n catch (e) {\n globalThis.postMessage({ id, ok: false, error: String(e?.message || e) })\n }\n})\n`.trimStart();return"module"===n?`\n${r}\n\nlet loadPromise = null\nasync function loadMermaid() {\n if (mermaid || mermaidLoadError)\n return\n if (!loadPromise) {\n loadPromise = (async () => {\n try {\n const mod = await import(${o})\n mermaid = normalizeMermaidModule(mod) || null\n initMermaidOnce()\n }\n catch (e) {\n mermaidLoadError = e\n }\n })()\n }\n await loadPromise\n}\n\n// Load immediately; failures are reported per-request\nawait loadMermaid()\n`.trimStart():`\n${r}\n\nfunction loadMermaidClassic() {\n if (mermaid || mermaidLoadError)\n return\n try {\n importScripts(${o})\n mermaid = normalizeMermaidModule(globalThis.mermaid) || null\n initMermaidOnce()\n }\n catch (e) {\n mermaidLoadError = e\n }\n}\n\nloadMermaidClassic()\n`.trimStart()}const Yt={AdmonitionNode:Ke,BlockquoteNode:v,CheckboxNode:f,CodeBlockNode:it,DefinitionListNode:g,EmojiNode:w,FootnoteNode:Ne,FootnoteReferenceNode:b,FootnoteAnchorNode:Re,HardBreakNode:Ie,HeadingNode:Pe,HtmlInlineNode:O,HighlightNode:Le,ImageNode:le,InlineCodeNode:$,PreCodeNode:Oe,InsertNode:Se,LinkNode:Te,ListItemNode:He,ListNode:De,MarkdownCodeBlockNode:at,MathBlockNode:_t,MathInlineNode:Mt,MermaidBlockNode:Wt,ParagraphNode:je,StrikethroughNode:Be,StrongNode:Me,SubscriptNode:_e,SuperscriptNode:Ce,TableNode:$e,TextNode:we,ThematicBreakNode:Ae,ReferenceNode:be},Zt={install(e,t){Object.entries(Yt).forEach(([t,n])=>{e.component(t,n)}),e.component("MarkdownRender",We),e.component("NodeRenderer",We),(null==t?void 0:t.getLanguageIcon)&&Ge(t.getLanguageIcon),(null==t?void 0:t.mathOptions)&&d.setDefaultMathOptions(t.mathOptions)}};exports.AdmonitionNode=Ke,exports.BlockquoteNode=v,exports.CheckboxNode=f,exports.CodeBlockNode=it,exports.DefinitionListNode=g,exports.EmojiNode=w,exports.FootnoteAnchorNode=Re,exports.FootnoteNode=Ne,exports.FootnoteReferenceNode=b,exports.HardBreakNode=Ie,exports.HeadingNode=Pe,exports.HighlightNode=Le,exports.HtmlInlineNode=O,exports.ImageNode=le,exports.InlineCodeNode=$,exports.InsertNode=Se,exports.LinkNode=Te,exports.ListItemNode=He,exports.ListNode=De,exports.MERMAID_DISABLED_CODE=$t,exports.MERMAID_WORKER_BUSY_CODE=Ot,exports.MarkdownCodeBlockNode=at,exports.MathBlockNode=_t,exports.MathInlineNode=Mt,exports.MermaidBlockNode=Wt,exports.NodeRenderer=We,exports.ParagraphNode=je,exports.Portal=rt,exports.PreCodeNode=Oe,exports.ReferenceNode=be,exports.StrikethroughNode=Be,exports.StrongNode=Me,exports.SubscriptNode=_e,exports.SuperscriptNode=Ce,exports.TableNode=$e,exports.TextNode=we,exports.ThematicBreakNode=Ae,exports.VueRendererMarkdown=Zt,exports.WORKER_BUSY_CODE=xt,exports.buildKaTeXCDNWorkerSource=Ut,exports.buildMermaidCDNWorkerSource=qt,exports.canParseOffthread=zt,exports.clearGlobalCustomComponents=function(){delete x[y]},exports.clearKaTeXWorker=function(){var e;st&&(null==(e=st.terminate)||e.call(st)),st=null,ut=null},exports.clearMermaidWorker=function(){var e;if(It)try{for(const[e,t]of Ht.entries())t.reject(new Error("Worker cleared"));Ht.clear(),null==(e=It.terminate)||e.call(It)}catch(Gt){}It=null,Pt=null},exports.createKaTeXWorkerFromCDN=function(e){var t,n;const o=Ut(e);if("undefined"==typeof Worker||"undefined"==typeof URL||"undefined"==typeof Blob)return{worker:null,dispose:()=>{},source:o};const r=new Blob([o],{type:"text/javascript"}),l=URL.createObjectURL(r);let i=!1;const a="module"===(null!=(t=e.mode)?t:"classic")?u(s({},null!=(n=e.workerOptions)?n:{}),{type:"module"}):e.workerOptions,c=new Worker(l,a);if(e.debug)try{c.postMessage({type:"init",debug:!0})}catch(Gt){}return{worker:c,dispose:()=>{if(!i){i=!0;try{URL.revokeObjectURL(l)}catch(Gt){}}},source:o}},exports.createMermaidWorkerFromCDN=function(e){var t,n;const o=qt(e);if("undefined"==typeof Worker||"undefined"==typeof URL||"undefined"==typeof Blob)return{worker:null,dispose:()=>{},source:o};const r=new Blob([o],{type:"text/javascript"}),l=URL.createObjectURL(r);let i=!1;const a="module"===(null!=(t=e.mode)?t:"module")?u(s({},null!=(n=e.workerOptions)?n:{}),{type:"module"}):e.workerOptions,c=new Worker(l,a);if(e.debug)try{c.postMessage({type:"init",debug:!0})}catch(Gt){}return{worker:c,dispose:()=>{if(!i){i=!0;try{URL.revokeObjectURL(l)}catch(Gt){}}},source:o}},exports.disableKatex=function(){pe(null)},exports.disableMermaid=function(){Lt(null)},exports.enableKatex=function(e){pe(null!=e?e:de)},exports.enableMermaid=function(e){Lt(null!=e?e:Bt)},exports.findPrefixOffthread=Ft,exports.getCustomNodeComponents=k,exports.getKaTeXBackpressureDefaults=function(){return s({},bt)},exports.getKaTeXWorkerLoad=function(){return{inFlight:dt.size,max:mt}},exports.getLanguageIcon=tt,exports.getMermaidWorkerLoad=function(){return{inFlight:Ht.size,max:Dt}},exports.getUseMonaco=Ye,exports.isKaTeXWorkerBusy=function(){return dt.size>=mt},exports.isKatexEnabled=me,exports.isMermaidEnabled=Et,exports.languageMap=nt,exports.normalizeComponent=h,exports.normalizeLanguageIdentifier=Qe,exports.removeCustomComponents=function(e){if(e===y)throw new Error("removeCustomComponents: use clearGlobalCustomComponents() to clear the global mapping");delete x[e]},exports.renderKaTeXInWorker=wt,exports.renderKaTeXWithBackpressure=Ct,exports.resolveMonacoLanguageId=et,exports.setCustomComponents=function(e,t){"string"==typeof e?x[e]=t||{}:x[y]=e||{}},exports.setDefaultI18nMap=function(e){Object.assign(te,e)},exports.setKaTeXBackpressureDefaults=function(e){null!=e.timeout&&(bt.timeout=Math.max(0,Math.floor(e.timeout))),null!=e.waitTimeout&&(bt.waitTimeout=Math.max(0,Math.floor(e.waitTimeout))),null!=e.backoffMs&&(bt.backoffMs=Math.max(0,Math.floor(e.backoffMs))),null!=e.maxRetries&&(bt.maxRetries=Math.max(0,Math.floor(e.maxRetries)))},exports.setKaTeXCache=yt,exports.setKaTeXWorker=function(e){st=e,ut=null,st.onmessage=e=>{const{id:t,html:n,error:o}=e.data,r=dt.get(t);if(r)if(dt.delete(t),clearTimeout(r.timeoutId),vt(),o)r.reject(new Error(o));else{const{content:t,displayMode:o}=e.data;if(t){const e=`${o?"d":"i"}:${t}`;if(pt.set(e,n),pt.size>200){const e=pt.keys().next().value;pt.delete(e)}}r.resolve(n)}},st.onerror=e=>{console.error("[katexWorkerClient] Worker error:",e);for(const[t,n]of dt.entries())clearTimeout(n.timeoutId),n.reject(new Error(`Worker error: ${e.message}`));dt.clear(),vt()}},exports.setKaTeXWorkerDebug=function(e){ct=!!e,st&&st.postMessage({type:"init",debug:ct})},exports.setKaTeXWorkerMaxConcurrency=function(e){Number.isFinite(e)&&e>0&&(mt=Math.floor(e))},exports.setKatexLoader=pe,exports.setLanguageIconResolver=Ge,exports.setMermaidLoader=Lt,exports.setMermaidWorker=function(e){It=e,Pt=null;const t=e;It.onmessage=e=>{if(It!==t)return;const{id:n,ok:o,result:r,error:l}=e.data,i=Ht.get(n);i&&(!1===o||l?i.reject(new Error(l||"Unknown error")):i.resolve(r))},It.onerror=e=>{var n,o;if(It===t)if(0!==Ht.size){try{jt?console.error("[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e):null==(o=console.debug)||o.call(console,"[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e)}catch(r){}for(const[t,n]of Ht.entries())n.reject(new Error(`Worker error: ${e.message}`));Ht.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker error (no pending):",(null==e?void 0:e.message)||e)},It.onmessageerror=e=>{var n,o;if(It===t)if(0!==Ht.size){try{jt?console.error("[mermaidWorkerClient] Worker messageerror:",e):null==(o=console.debug)||o.call(console,"[mermaidWorkerClient] Worker messageerror:",e)}catch(Gt){}for(const[e,t]of Ht.entries())t.reject(new Error("Worker messageerror"));Ht.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",e)}},exports.setMermaidWorkerClientDebug=function(e){jt=!!e},exports.setMermaidWorkerMaxConcurrency=function(e){Number.isFinite(e)&&e>0&&(Dt=Math.floor(e))},exports.terminateWorker=Vt,exports.waitForKaTeXWorkerSlot=kt;
|
|
1
|
+
"use strict";Object.create;var e,t=Object.defineProperty,n=Object.defineProperties,o=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),r=(Object.getOwnPropertyNames,Object.getOwnPropertySymbols),l=(Object.getPrototypeOf,Object.prototype.hasOwnProperty),i=Object.prototype.propertyIsEnumerable,a=(e,n,o)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,s=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&a(e,n,t[n]);if(r)for(var n of r(t))i.call(t,n)&&a(e,n,t[n]);return e},u=(e,t)=>n(e,o(t)),c=(e,t,n)=>new Promise((o,r)=>{var l=e=>{try{a(n.next(e))}catch(t){r(t)}},i=e=>{try{a(n.throw(e))}catch(t){r(t)}},a=e=>e.done?o(e.value):Promise.resolve(e.value).then(l,i);a((n=n.apply(e,t)).next())});const d=require("stream-markdown-parser"),p=require("vue");var m="undefined"!=typeof document?document.currentScript:null;function h(e,t,n,o,r,l,i,a){var s,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),l&&(u._scopeId="data-v-"+l),i?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},u._ssrRegister=s):r&&(s=a?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),s)if(u.functional){u._injectStyles=s;var c=u.render;u.render=function(e,t){return s.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,s):[s]}return{exports:e,options:u}}const v=h(p.defineComponent({__name:"BlockquoteNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},setup:e=>({__sfc:!0,props:e,NodeRenderer:Fe})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("blockquote",{staticClass:"blockquote",attrs:{dir:"auto",cite:e.node.cite}},[t(n.NodeRenderer,{attrs:{"index-key":`blockquote-${n.props.indexKey}`,nodes:n.props.node.children||[],"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)},[],!1,null,"6d8bbd17",null,null).exports,g=h(p.defineComponent({__name:"CheckboxNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"checkbox-node"},[t("input",{staticClass:"checkbox-input",attrs:{type:"checkbox",disabled:""},domProps:{checked:e.node.checked}})])},[],!1,null,"8dc6c46f",null,null).exports,f=h(p.defineComponent({__name:"DefinitionListNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},emits:["copy"],setup:e=>({__sfc:!0,props:e,NodeRenderer:Fe})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("dl",{staticClass:"definition-list"},[e._l(n.props.node.items,function(o,r){return[t("dt",{key:`definition-term-${n.props.indexKey}-${r}`,staticClass:"definition-term"},[t(n.NodeRenderer,{attrs:{"index-key":`definition-term-${n.props.indexKey}-${r}`,nodes:o.term,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1),t("dd",{key:`definition-desc-${n.props.indexKey}-${r}`,staticClass:"definition-desc"},[t(n.NodeRenderer,{attrs:{"index-key":`definition-desc-${n.props.indexKey}-${r}`,nodes:o.definition,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)]})],2)},[],!1,null,"b5d9dc8e",null,null).exports,w=h(p.defineComponent({__name:"EmojiNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"emoji-node"},[e._v(e._s(e.node.name))])},[],!1,null,"de55dc97",null,null).exports,y="__global__",x={};function M(e){return e?x[e]||x[y]||{}:x[y]||{}}const k=h(p.defineComponent({__name:"FootnoteReferenceNode",props:{node:null},setup(e){const t=e,n=`#footnote-${t.node.id}`;return{__sfc:!0,props:t,href:n,handleScroll:function(){if("undefined"==typeof document)return;const e=document.querySelector(n);e?e.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${n} not found`)}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sup",{staticClass:"footnote-reference",attrs:{id:`fnref-${e.node.id}`},on:{click:n.handleScroll}},[t("span",{staticClass:"footnote-link cursor-pointer",attrs:{href:n.href,title:`查看脚注 ${e.node.id}`}},[e._v("["+e._s(e.node.id)+"]")])])},[],!1,null,"01af0fee",null,null).exports,b=new Set(["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onreset","onsearch","onsubmit"]),C=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),N=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),T=new Set(["script"]),j=new Set(["href","src","srcset","xlink:href","formaction"]),I=(()=>{var e;try{return Boolean(null==(e={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:e.DEV)}catch(t){}return!1})();function D(e){I&&console.warn(e)}function L(e){const t=function(e){let t="";for(const n of e){const e=n.charCodeAt(0);e<=31||127===e||/\s/u.test(n)||(t+=n)}return t}(e).toLowerCase();return!(!t.startsWith("javascript:")&&!t.startsWith("vbscript:"))||!!t.startsWith("data:")&&!(t.startsWith("data:image/")||t.startsWith("data:video/")||t.startsWith("data:audio/"))}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function E(e,t){const n=e.toLowerCase();return!N.has(n)&&(_(t,n)||_(t,e))}function S(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return"true"===e||""===e||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const t=Number(e);if(""!==e&&!Number.isNaN(t))return t}return e}function B(e){return e.trim().length>0}function z(e,t,n,o){if(T.has(e.toLowerCase()))return null;const a=function(e){const t={};for(const[n,o]of Object.entries(e)){const e=n.toLowerCase();b.has(e)||j.has(e)&&o&&L(o)||(t[n]=o)}return t}(t);if(E(e,o)){const t=o[e]||o[e.toLowerCase()],r=function(e){const t={};for(const[n,o]of Object.entries(e))t[n]=S(o,n);return t}(a);return p.h(t,r,n.length>0?n:void 0)}{const t=a,{innerHTML:o}=t,s=((e,t)=>{var n={};for(var o in e)l.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&r)for(var o of r(e))t.indexOf(o)<0&&i.call(e,o)&&(n[o]=e[o]);return n})(t,["innerHTML"]);return p.h(e,s,n.length>0?n:void 0)}}function A(e,t){const n=/<([a-z][a-z0-9-]*)\b[^>]*>/gi;let o;for(;null!==(o=n.exec(e));)if(E(o[1],t))return!0;return!1}function O(e,t){if(!e)return[];try{const n=function(e,t){const n=[],o=[];for(const r of e)if("text"===r.type)(n.length>0?n[n.length-1].children:o).push(r.content);else if("self_closing"===r.type){const e=z(r.tagName,r.attrs||{},[],t),l=n.length>0?n[n.length-1].children:o;null!=e&&l.push(e)}else if("tag_open"===r.type)n.push({tagName:r.tagName,children:[],attrs:r.attrs});else if("tag_close"===r.type){const e=r.tagName.toLowerCase();let l=-1;for(let t=n.length-1;t>=0;t--)if(n[t].tagName.toLowerCase()===e){l=t;break}if(-1!==l)for(;n.length>l;){const r=n.pop(),i=z(r.tagName,r.attrs||{},r.children,t);n.length>0?null!=i&&n[n.length-1].children.push(i):null!=i&&o.push(i),r.tagName.toLowerCase()!==e&&n.length>l&&D(`Auto-closing unclosed tag: <${r.tagName}>`)}else D(`Ignoring closing tag with no matching opening tag: </${r.tagName}>`)}for(;n.length>0;){const e=n.pop(),r=z(e.tagName,e.attrs||{},e.children,t);null!=r&&o.push(r),D(`Auto-closing unclosed tag: <${e.tagName}>`)}return o}(function(e){var t,n,o;const r=[];let l=0;for(;l<e.length;){if(e.startsWith("\x3c!--",l)){const t=e.indexOf("--\x3e",l);if(-1!==t){l=t+3;continue}break}const i=e.indexOf("<",l);if(-1===i){if(l<e.length){const t=e.slice(l);B(t)&&r.push({type:"text",content:t})}break}if(i>l){const t=e.slice(l,i);B(t)&&r.push({type:"text",content:t})}if(e.startsWith("![CDATA[",i+1)){const t=e.indexOf("]]>",i);if(-1!==t){r.push({type:"text",content:e.slice(i,t+3)}),l=t+3;continue}break}if(e.startsWith("!",i+1)){const t=e.indexOf(">",i);if(-1!==t){l=t+1;continue}break}const a=e.indexOf(">",i);if(-1===a)break;const s=e.slice(i+1,a).trim(),u=s.startsWith("/"),c=s.endsWith("/");if(u){const e=s.slice(1).trim();r.push({type:"tag_close",tagName:e})}else{const e=s.indexOf(" ");let l,i="";-1===e?l=c?s.slice(0,-1).trim():s.trim():(l=s.slice(0,e).trim(),i=s.slice(e+1));const a={};if(i){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let r;for(;null!==(r=e.exec(i));){const e=r[1],l=null!=(o=null!=(n=null!=(t=r[2])?t:r[3])?n:r[4])?o:"";e&&!e.endsWith("/")&&(a[e]=l)}}r.push({type:c||C.has(l.toLowerCase())?"self_closing":"tag_open",tagName:l,attrs:a})}l=a+1}return r}(e),t);return n}catch(o){return n=o,I&&console.error("Failed to parse HTML to VNodes:",n),null}var n}const R=h(p.defineComponent({__name:"HtmlInlineNode",props:{node:null,customId:null},setup(e){const t=e,n=p.computed(()=>M(t.customId)),o=p.defineComponent({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=p.computed(()=>{const e=t.node.content;if(!e)return{mode:"html",content:""};if(!A(e,n.value))return{mode:"html",content:e};const o=O(e,n.value);return null===o?{mode:"html",content:e}:{mode:"dynamic",nodes:o}}),l=p.ref(null),i="undefined"!=typeof window;function a(){if(!i||!l.value)return;const e=l.value;e.innerHTML="";const n=document.createElement("template");n.innerHTML=t.node.content,e.appendChild(n.content.cloneNode(!0))}function s(){if(!l.value)return;const e=l.value;e.innerHTML="",e.textContent=t.node.content}return p.onMounted(()=>{"html"===r.value.mode&&(t.node.loading&&!t.node.autoClosed?s():a())}),p.watch(()=>[t.node.content,t.node.loading,t.node.autoClosed],()=>{"html"===r.value.mode&&(t.node.loading&&!t.node.autoClosed?s():a())}),p.onBeforeUnmount(()=>{l.value&&(l.value.innerHTML="")}),{__sfc:!0,props:t,customComponents:n,DynamicRenderer:o,renderMode:r,containerRef:l,isClient:i,renderHtmlContent:a,renderLoadingContent:s}}}),function(){var e=this._self._c,t=this._self._setupProxy;return"dynamic"===t.renderMode.mode?e("span",{staticClass:"html-inline-node",class:{"html-inline-node--loading":t.props.node.loading}},[e(t.DynamicRenderer,{attrs:{nodes:t.renderMode.nodes}})],1):e("span",{ref:"containerRef",staticClass:"html-inline-node",class:{"html-inline-node--loading":t.props.node.loading}})},[],!1,null,"1e6c55b0",null,null).exports,P=h(p.defineComponent({__name:"InlineCodeNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("code",{staticClass:"inline text-[85%] px-1 py-0.5 rounded font-mono bg-secondary whitespace-normal break-words max-w-full before:content-[''] after:content-['']"},[e._v(e._s(e.node.code))])},[],!1,null,null,null,null).exports,H=p.ref(!1),U=p.ref(""),$=p.ref("top"),Y=p.ref(null),F=p.ref(null),V=p.ref(null),Q=p.ref(null),W=p.ref(null);let K=null,X=null;function q(){K&&(clearTimeout(K),K=null),X&&(clearTimeout(X),X=null)}let Z=!1,G=null;function J(e,t,n="top",o=!1,r,l){if(!e)return;Z||"undefined"!=typeof document&&(G||(G=Promise.resolve().then(()=>require("./Tooltip.js")).then(({default:e})=>{Z=!0;const t=document.createElement("div");t.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(t),(new(p.extend({render(t){var n;return t(e,{props:{visible:H.value,anchorEl:Y.value,content:U.value,placement:$.value,id:F.value,originX:V.value,originY:Q.value,isDark:null!=(n=W.value)?n:void 0}})}}))).$mount(t)}).catch(e=>{G=null,Z=!1,console.warn("[markstream-vue2] Failed to load Tooltip component. Tooltips will be disabled.",e)}))),q();const i=()=>{var o,i;F.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,Y.value=e,U.value=t,$.value=n,V.value=null!=(o=null==r?void 0:r.x)?o:null,Q.value=null!=(i=null==r?void 0:r.y)?i:null,W.value="boolean"==typeof l?l:null,H.value=!0;try{e.setAttribute("aria-describedby",F.value)}catch(a){}};o?i():K=setTimeout(i,80)}function ee(e=!1){q();const t=()=>{if(Y.value&&F.value)try{Y.value.removeAttribute("aria-describedby")}catch(e){}H.value=!1,Y.value=null,F.value=null,V.value=null,Q.value=null};e?t():X=setTimeout(t,120)}const te={"common.copy":"Copy","common.copySuccess":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."};function ne(){try{const t=globalThis.$vueI18nUse||null;if(t&&"function"==typeof t)try{const e=t();if(e&&"function"==typeof e.t)return{t:e.t.bind(e)}}catch(e){}}catch(e){}return{t:e=>{var t;return null!=(t=te[e])?t:function(e){return(e.split(".").pop()||e).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()}(e)}}}const oe=Symbol("ViewportPriority");function re(){const e=p.inject(oe,void 0);if(e)return e;const t=new WeakMap;let n=null;return e=>{const o=p.ref(!1);let r,l=!1;const i=new Promise(e=>{r=()=>{l||(l=!0,e())}}),a=()=>{try{null==n||n.unobserve(e)}catch(o){}t.delete(e)},s=n||("undefined"==typeof window||"undefined"==typeof IntersectionObserver?null:(n=new IntersectionObserver(e=>{for(const r of e){const e=t.get(r.target);if(e&&(r.isIntersecting||r.intersectionRatio>0)){if(!e.visible.value){e.visible.value=!0;try{e.resolve()}catch(o){}}null==n||n.unobserve(r.target),t.delete(r.target)}}},{root:null,rootMargin:"300px",threshold:0}),n));return s?(t.set(e,{resolve:r,visible:o}),s.observe(e),{isVisible:o,whenVisible:i,destroy:a}):(o.value=!0,r(),{isVisible:o,whenVisible:i,destroy:a})}}const le=h(p.defineComponent({__name:"ImageNode",props:{node:null,fallbackSrc:{default:""},showCaption:{type:Boolean,default:!1},lazy:{type:Boolean,default:!0},svgMinHeight:{default:"12rem"},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){const n=e,o=p.ref(!1),r=p.ref(!1),l=p.ref(!1),i=p.ref(null),a=re();let s=null;const u=p.ref("undefined"==typeof window);"undefined"!=typeof window&&p.watch(()=>i.value,e=>{if(null==s||s.destroy(),s=null,!e)return void(u.value=!1);const t=a(e,{rootMargin:"400px"});s=t,u.value=t.isVisible.value,t.whenVisible.then(()=>{u.value=!0})},{immediate:!0}),p.onBeforeUnmount(()=>{null==s||s.destroy(),s=null});const c=p.computed(()=>r.value&&n.fallbackSrc?n.fallbackSrc:n.node.src),d=p.computed(()=>!n.lazy||u.value),m=p.computed(()=>/\.svg(?:\?|$)/i.test(c.value)),{t:h}=ne();return p.watch(c,()=>{o.value=!1,r.value=!1}),{__sfc:!0,props:n,emit:t,imageLoaded:o,hasError:r,fallbackTried:l,figureRef:i,registerVisibility:a,visibilityHandle:s,isVisible:u,displaySrc:c,canRenderImage:d,isSvg:m,handleImageError:function(){n.fallbackSrc&&!l.value?(l.value=!0,r.value=!0):(r.value=!0,t("error",n.node.src))},handleImageLoad:function(){o.value=!0,r.value=!1,t("load",c.value)},handleClick:function(e){e.preventDefault(),o.value&&!r.value&&t("click",[e,c.value])},t:h}}}),function(){var e,t,n,o,r,l=this,i=l._self._c,a=l._self._setupProxy;return i("figure",{ref:"figureRef",staticClass:"text-center my-8"},[i("div",{staticClass:"relative inline-block"},[i("transition",{attrs:{name:"img-switch",mode:"out-in"}},[l.node.loading||a.hasError||!a.canRenderImage?a.hasError?l.node.loading||a.props.fallbackSrc?l._e():i("div",{key:"error",staticClass:"px-4 py-2 bg-gray-100 flex items-center justify-center rounded-lg gap-2 text-red-500"},[l._t("error",function(){return[i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"}},[i("path",{attrs:{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"}})]),i("span",{staticClass:"text-sm whitespace-nowrap"},[l._v(l._s(a.t("image.loadError")))])]},{node:a.props.node,displaySrc:a.displaySrc,imageLoaded:a.imageLoaded,hasError:a.hasError,fallbackSrc:a.props.fallbackSrc,lazy:a.props.lazy,isSvg:a.isSvg})],2):i("div",{key:"placeholder",staticClass:"placeholder-layer max-w-96 inline-flex items-center justify-center gap-2",style:a.isSvg?{minHeight:a.props.svgMinHeight,width:"100%"}:{minHeight:"6rem"}},[a.props.usePlaceholder?[l._t("placeholder",function(){return[i("div",{staticClass:"w-4 h-4 rounded-full border-2 border-solid border-current border-t-transparent animate-spin",attrs:{"aria-hidden":"true"}}),i("span",{staticClass:"text-sm whitespace-nowrap"},[l._v(l._s(a.t("image.loading")))])]},{node:a.props.node,displaySrc:a.displaySrc,imageLoaded:a.imageLoaded,hasError:a.hasError,fallbackSrc:a.props.fallbackSrc,lazy:a.props.lazy,isSvg:a.isSvg})]:[i("span",{staticClass:"text-sm text-gray-500"},[l._v(l._s(l.node.raw))])]],2):i("img",{key:"image",staticClass:"max-w-96 h-auto rounded-lg transition-opacity duration-200 ease-in-out",class:{"opacity-0":!a.imageLoaded,"opacity-100":a.imageLoaded,"cursor-pointer":a.imageLoaded},style:a.isSvg?{minHeight:a.props.svgMinHeight,width:"100%",height:"auto",objectFit:"contain"}:void 0,attrs:{src:a.displaySrc,alt:String(null!=(t=null!=(e=a.props.node.alt)?e:a.props.node.title)?t:""),title:String(null!=(o=null!=(n=a.props.node.title)?n:a.props.node.alt)?o:""),loading:a.props.lazy?"lazy":"eager",decoding:"async",tabindex:a.imageLoaded?0:-1,"aria-label":null!=(r=a.props.node.alt)?r:a.t("image.preview")},on:{error:a.handleImageError,load:a.handleImageLoad,click:a.handleClick}})])],1),a.props.showCaption&&a.props.node.alt?i("figcaption",{staticClass:"mt-2 text-sm text-gray-500 italic"},[l._v(" "+l._s(a.props.node.alt)+" ")]):l._e()])},[],!1,null,"a5977223",null,null).exports;let ie=null,ae=!1,se=de;function ue(e){var t;const n=null!=(t=null==e?void 0:e.default)?t:e;return n&&"function"==typeof n.renderToString?n:null}function ce(){try{const e=globalThis;return ue(null==e?void 0:e.katex)}catch(e){return null}}function de(){return(()=>c(this,null,function*(){const e=ce();if(e)return e;const t=yield import("katex");try{yield import("katex/contrib/mhchem")}catch(n){}return ue(t)}))()}function pe(e){se=e,ie=null,ae=!1}function me(){return"function"==typeof se}function he(){return c(this,null,function*(){var e;const t=ce();if(t)return ie=t,ie;if(ie)return ie;if(ae)return null;const n=se;if(!n)return ae=!0,null;try{const t=yield n();if(t)return ie=null!=(e=ue(t))?e:t,ie}catch(o){}return ae=!0,null})}const ve=p.shallowRef(!1);let ge=null;function fe(){return ge||(ge=he().then(e=>{ve.value=!!e}).catch(()=>{ve.value=!1})),p.readonly(ve)}const we=h(p.defineComponent({__name:"TextNode",props:{node:null},emits:["copy"],setup:e=>({__sfc:!0,katexReady:fe()})}),function(){var e=this;return(0,e._self._c)("span",{staticClass:"whitespace-pre-wrap break-words text-node",class:[e._self._setupProxy.katexReady&&e.node.center?"text-node-center":""]},[e._v(" "+e._s(e.node.content)+" ")])},[],!1,null,"56f30838",null,null).exports;function ye(e){return t=>{var n,o;return p.h(we,u(s({},t),{node:u(s({},t.node),{content:null!=(o=t.node.raw)?o:e(String(null!=(n=t.node.content)?n:""))})}))}}function xe(){return c(this,null,function*(){var e,t;if("undefined"!=typeof globalThis&&void 0!==globalThis.process&&"test"===(null==(t=null==(e=globalThis.process)?void 0:e.env)?void 0:t.NODE_ENV))return ye(e=>`$${e}$`);try{if(yield he())return(yield Promise.resolve().then(()=>require("./index.js"))).default}catch(n){console.warn('[markstream-vue2] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',n)}return ye(e=>`$${e}$`)})}function Me(){return c(this,null,function*(){try{if(yield he())return(yield Promise.resolve().then(()=>require("./index2.js"))).default}catch(e){console.warn('[markstream-vue2] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return ye(e=>`$$${e}$$`)})}const ke=h(p.defineComponent({__name:"ReferenceNode",props:{node:null,messageId:null,threadId:null},emits:["click","mouseEnter","mouseLeave"],setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"reference-node cursor-pointer bg-accent text-xs rounded-md px-1.5 mx-0.5 hover:bg-secondary",attrs:{role:"button",tabindex:"0"},on:{click:function(t){return e.$emit("click",t,e.node.id,e.messageId,e.threadId)},mouseenter:function(t){return e.$emit("mouseEnter",t,e.node.id,e.messageId,e.threadId)},mouseleave:function(t){return e.$emit("mouseLeave",t,e.node.id,e.messageId,e.threadId)}}},[e._v(" "+e._s(e.node.id)+" ")])},[],!1,null,"b436f945",null,null).exports,be=h(p.defineComponent({__name:"SuperscriptNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=M(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:P,link:je,html_inline:R,strong:Ne,emphasis:Le,footnote_reference:k,strikethrough:Te,highlight:De,insert:Ie,subscript:Ce,emoji:w,math_inline:xe,reference:ke},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sup",{staticClass:"superscript-node"},[e._l(e.node.children,function(o,r){return[n.nodeComponents[o.type]?t(n.nodeComponents[o.type],{key:`${e.indexKey||"superscript"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"superscript"}-${r}`}}):t("span",{key:`${e.indexKey||"superscript"}-${r}`},[e._v(" "+e._s(o.content||o.raw)+" ")])]})],2)},[],!1,null,"3cc2c5de",null,null).exports,Ce=h(p.defineComponent({__name:"SubscriptNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=M(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:P,link:je,html_inline:R,strong:Ne,emphasis:Le,footnote_reference:k,strikethrough:Te,highlight:De,insert:Ie,superscript:be,emoji:w,math_inline:xe,reference:ke},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sub",{staticClass:"subscript-node"},[e._l(e.node.children,function(o,r){return[n.nodeComponents[o.type]?t(n.nodeComponents[o.type],{key:`${e.indexKey||"subscript"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"subscript"}-${r}`}}):t("span",{key:`${e.indexKey||"subscript"}-${r}`},[e._v(" "+e._s(o.content||o.raw)+" ")])]})],2)},[],!1,null,"a2b068c3",null,null).exports,Ne=h(p.defineComponent({__name:"StrongNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=M(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:P,link:je,html_inline:R,emphasis:Le,strikethrough:Te,highlight:De,insert:Ie,subscript:Ce,superscript:be,emoji:w,footnote_reference:k,math_inline:xe,reference:ke},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("strong",{staticClass:"strong-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"strong"}-${r}`,tag:"component",attrs:{"index-key":`${e.indexKey||"strong"}-${r}`,node:o,"custom-id":n.props.customId}})}),1)},[],!1,null,"af3ce037",null,null).exports,Te=h(p.defineComponent({__name:"StrikethroughNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=M(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:P,link:je,html_inline:R,strong:Ne,emphasis:Le,highlight:De,insert:Ie,subscript:Ce,superscript:be,emoji:w,footnote_reference:k,math_inline:xe,reference:ke},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("del",{staticClass:"strikethrough-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"strikethrough"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"strikethrough"}-${r}`}})}),1)},[],!1,null,"904d5bd1",null,null).exports,je=h(p.defineComponent({__name:"LinkNode",props:{node:null,indexKey:null,customId:null,showTooltip:{type:Boolean,default:!0},color:null,underlineHeight:null,underlineBottom:null,animationDuration:null,animationOpacity:null,animationTiming:null,animationIteration:null},setup(e){const t=e,n=p.computed(()=>{var e,n,o,r,l,i;const a=void 0!==t.underlineBottom?"number"==typeof t.underlineBottom?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px";return{"--link-color":null!=(e=t.color)?e:"#0366d6","--underline-height":`${null!=(n=t.underlineHeight)?n:2}px`,"--underline-bottom":a,"--underline-opacity":String(null!=(o=t.animationOpacity)?o:.9),"--underline-duration":`${null!=(r=t.animationDuration)?r:.8}s`,"--underline-timing":null!=(l=t.animationTiming)?l:"linear","--underline-iteration":"number"==typeof t.animationIteration?String(t.animationIteration):null!=(i=t.animationIteration)?i:"infinite"}}),o={text:we,strong:Ne,strikethrough:Te,emphasis:Le,image:le,html_inline:R},r=p.useAttrs(),l=p.computed(()=>{var e,n;return String(null!=(n=null!=(e=t.node.title)?e:t.node.href)?n:"")});return{__sfc:!0,props:t,cssVars:n,nodeComponents:o,attrs:r,onAnchorEnter:function(e){var n,o,r;if(!t.showTooltip)return;const l=e,i=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0,a=(null==(n=t.node)?void 0:n.title)||(null==(o=t.node)?void 0:o.href)||(null==(r=t.node)?void 0:r.text)||"";J(e.currentTarget,a,"top",!1,i)},onAnchorLeave:function(){t.showTooltip&&ee()},title:l}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return e.node.loading?t("span",e._b({staticClass:"link-loading inline-flex items-baseline gap-1.5",style:n.cssVars,attrs:{"aria-hidden":e.node.loading?"false":"true"}},"span",n.attrs,!1),[t("span",{staticClass:"link-text-wrapper relative inline-flex"},[t("span",{staticClass:"leading-[normal] link-text"},[t("span",{staticClass:"leading-[normal] link-text"},[e._v(e._s(e.node.text))])]),t("span",{staticClass:"underline-anim",attrs:{"aria-hidden":"true"}})])]):t("a",e._b({staticClass:"link-node",style:n.cssVars,attrs:{href:e.node.href,title:e.showTooltip?"":n.title,"aria-label":`Link: ${n.title}`,"aria-hidden":e.node.loading?"true":"false",target:"_blank",rel:"noopener noreferrer"},on:{mouseenter:e=>n.onAnchorEnter(e),mouseleave:n.onAnchorLeave}},"a",n.attrs,!1),e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"emphasis"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"link-text"}-${r}`}})}),1)},[],!1,null,"c6e041bc",null,null).exports,Ie=h(p.defineComponent({__name:"InsertNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=M(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:P,link:je,html_inline:R,strong:Ne,emphasis:Le,strikethrough:Te,highlight:De,subscript:Ce,superscript:be,emoji:w,footnote_reference:k,math_inline:xe,reference:ke},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("ins",{staticClass:"insert-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"insert"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"insert"}-${r}`}})}),1)},[],!1,null,"ab1ec9bc",null,null).exports,De=h(p.defineComponent({__name:"HighlightNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=M(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:P,link:je,html_inline:R,strong:Ne,emphasis:Le,strikethrough:Te,insert:Ie,subscript:Ce,superscript:be,emoji:w,footnote_reference:k,math_inline:xe,reference:ke},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("mark",{staticClass:"highlight-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"highlight"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"highlight"}-${r}`}})}),1)},[],!1,null,"38e31bf6",null,null).exports,Le=h(p.defineComponent({__name:"EmphasisNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=M(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:P,link:je,html_inline:R,strong:Ne,strikethrough:Te,highlight:De,insert:Ie,subscript:Ce,superscript:be,emoji:w,footnote_reference:k,math_inline:xe,reference:ke},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("em",{staticClass:"emphasis-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"emphasis"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"emphasis"}-${r}`}})}),1)},[],!1,null,"8264674d",null,null).exports,_e=h(p.defineComponent({__name:"FootnoteAnchorNode",props:{node:null},setup(e){const t=e;return{__sfc:!0,props:t,scrollToReference:function(e){var n;if(e.preventDefault(),"undefined"==typeof document)return;const o=`fnref-${String(null!=(n=t.node.id)?n:"")}`,r=document.getElementById(o);r&&r.scrollIntoView({behavior:"smooth"})}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("a",{staticClass:"footnote-anchor text-sm text-[#0366d6] hover:underline cursor-pointer",attrs:{href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`},on:{click:n.scrollToReference}},[e._v(" ↩︎ ")])},[],!1,null,"4756ce0d",null,null).exports,Ee=h(p.defineComponent({__name:"FootnoteNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},emits:["copy"],setup:e=>({__sfc:!0,props:e,NodeRenderer:Fe})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2",attrs:{id:`fnref--${e.node.id}`}},[t("div",{staticClass:"flex-1"},[t(n.NodeRenderer,{attrs:{"index-key":`footnote-${n.props.indexKey}`,nodes:n.props.node.children,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)])},[],!1,null,null,null,null).exports,Se=h(p.defineComponent({__name:"HardBreakNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this._self._c;return this._self._setupProxy,e("br",{staticClass:"hard-break"})},[],!1,null,"50c58f70",null,null).exports,Be=h(p.defineComponent({__name:"HeadingNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=M(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:we,inline_code:P,link:je,image:le,strong:Ne,emphasis:Le,strikethrough:Te,highlight:De,insert:Ie,subscript:Ce,superscript:be,emoji:w,checkbox:g,checkbox_input:g,footnote_reference:k,hardbreak:Se,math_inline:xe,reference:ke},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(`h${e.node.level}`,{tag:"component",staticClass:"heading-node",class:[`heading-${e.node.level}`],attrs:{dir:"auto"}},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"heading"}-${r}`,tag:"component",attrs:{"custom-id":n.props.customId,node:o,"index-key":`${e.indexKey||"heading"}-${r}`}})}),1)},[],!1,null,"ac93e8bf",null,null).exports,ze=h(p.defineComponent({__name:"ListItemNode",props:{item:null,indexKey:null,value:null,customId:null,typewriter:{type:Boolean}},setup(e){const t=e,n=p.computed(()=>null==t.value?{}:{value:t.value});return{__sfc:!0,props:t,liValueAttr:n,NodeRenderer:Fe}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("li",e._b({staticClass:"list-item pl-1.5 my-2",attrs:{dir:"auto"}},"li",n.liValueAttr,!1),[t(n.NodeRenderer,{attrs:{"index-key":`list-item-${n.props.indexKey}`,nodes:n.props.item.children,"custom-id":n.props.customId,typewriter:n.props.typewriter,"batch-rendering":!1},on:{copy:function(t){return e.$emit("copy",t)}}})],1)},[],!1,null,"a690b83a",null,null).exports,Ae=h(p.defineComponent({__name:"ListNode",props:{node:null,customId:null,indexKey:null,typewriter:{type:Boolean}},emits:["copy"],setup:e=>({__sfc:!0,ListItemNode:ze})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(e.node.ordered?"ol":"ul",{tag:"component",staticClass:"list-node",class:{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}},e._l(e.node.items,function(o,r){var l;return t(n.ListItemNode,{key:`${e.indexKey||"list"}-${r}`,attrs:{item:o,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,value:e.node.ordered?(null!=(l=e.node.start)?l:1)+r:void 0},on:{copy:function(t){return e.$emit("copy",t)}}})}),1)},[],!1,null,"d4344dd3",null,null).exports,Oe=h(p.defineComponent({__name:"HtmlBlockNode",props:{node:null,customId:null},setup(e){const t=e,n=p.computed(()=>{const e=t.node.attrs;if(e){if(Array.isArray(e)){const t={};for(const n of e){if(!n||n.length<2)continue;const[e,o]=n;null!=e&&(t[String(e)]=null==o?"":String(o))}return t}return e}}),o=p.computed(()=>M(t.customId)),r=p.defineComponent({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),l=p.computed(()=>{const e=t.node.content;if(!e)return{mode:"html",content:""};if(!A(e,o.value))return{mode:"html",content:e};const n=O(e,o.value);return null===n?{mode:"html",content:e}:{mode:"dynamic",nodes:n}}),i=p.ref(null),a=p.ref("undefined"==typeof window),s=p.ref(t.node.content),u=re();let c=null;const d=!!t.node.loading;return"undefined"!=typeof window?(p.watch(i,e=>{var n;if(null==(n=null==c?void 0:c.destroy)||n.call(c),c=null,!d)return a.value=!0,void(s.value=t.node.content);if(!e)return void(a.value=!1);const o=u(e,{rootMargin:"400px"});c=o,a.value=o.isVisible.value,o.whenVisible.then(()=>{a.value=!0})},{immediate:!0}),p.watch(()=>t.node.content,e=>{d&&!a.value||(s.value=e)})):a.value=!0,p.onBeforeUnmount(()=>{var e;null==(e=null==c?void 0:c.destroy)||e.call(c),c=null}),{__sfc:!0,props:t,boundAttrs:n,customComponents:o,DynamicRenderer:r,renderMode:l,htmlRef:i,shouldRender:a,renderContent:s,registerVisibility:u,visibilityHandle:c,isDeferred:d}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",e._b({ref:"htmlRef",staticClass:"html-block-node"},"div",n.boundAttrs,!1),[n.shouldRender?["dynamic"===n.renderMode.mode?t(n.DynamicRenderer,{attrs:{nodes:n.renderMode.nodes}}):t("div",{domProps:{innerHTML:e._s(n.renderContent)}})]:t("div",{staticClass:"html-block-node__placeholder"},[e._t("placeholder",function(){return[t("span",{staticClass:"html-block-node__placeholder-bar"}),t("span",{staticClass:"html-block-node__placeholder-bar w-4/5"}),t("span",{staticClass:"html-block-node__placeholder-bar w-2/3"})]},{node:e.node})],2)],2)},[],!1,null,"5f3e95bd",null,null).exports,Re=h(p.defineComponent({__name:"ParagraphNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=M(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({inline_code:P,image:le,link:je,hardbreak:Se,emphasis:Le,strong:Ne,strikethrough:Te,highlight:De,insert:Ie,subscript:Ce,superscript:be,html_inline:R,html_block:Oe,emoji:w,checkbox:g,math_inline:xe,checkbox_input:g,reference:ke,footnote_anchor:_e,footnote_reference:k},n),katexReady:fe()}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("p",{staticClass:"paragraph-node",attrs:{dir:"auto"}},[e._l(e.node.children,function(o,r){return["text"!==o.type?t(n.nodeComponents[o.type],{key:`${e.indexKey||"paragraph"}-${r}`,tag:"component",attrs:{node:o,"index-key":`${e.indexKey}-${r}`,"custom-id":n.props.customId}}):t("span",{key:`${e.indexKey||"paragraph"}-${r}`,staticClass:"whitespace-pre-wrap break-words text-node",class:[n.katexReady&&o.center?"text-node-center":""]},[e._v(" "+e._s(o.content)+" ")])]})],2)},[],!1,null,"5aa62108",null,null).exports,Pe=h(p.defineComponent({__name:"PreCodeNode",props:{node:null},setup(e){const t=e,n=p.computed(()=>{var e,n,o;const r=String(null!=(n=null==(e=t.node)?void 0:e.language)?n:"");return String(null!=(o=String(r).split(/\s+/g)[0])?o:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),o=p.computed(()=>`language-${n.value}`),r=p.computed(()=>{const e=n.value;return e?`Code block: ${e}`:"Code block"});return{__sfc:!0,props:t,normalizedLanguage:n,languageClass:o,ariaLabel:r}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("pre",{class:[n.languageClass],attrs:{"aria-busy":!0===e.node.loading,"aria-label":n.ariaLabel,"data-language":n.normalizedLanguage,tabindex:"0"}},[t("code",{attrs:{translate:"no"},domProps:{textContent:e._s(e.node.code)}})])},[],!1,null,null,null,null).exports,He=h(p.defineComponent({__name:"TableNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},emits:["copy"],setup(e){const t=e,n=p.computed(()=>{var e;return null!=(e=t.node.loading)&&e}),o=p.computed(()=>{var e;return null!=(e=t.node.rows)?e:[]});return{__sfc:!0,props:t,isLoading:n,bodyRows:o,NodeRenderer:Fe}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"table-node-wrapper"},[t("table",{staticClass:"my-8 text-sm table-node",class:{"table-node--loading":n.isLoading},attrs:{"aria-busy":n.isLoading}},[t("thead",{staticClass:"border-[var(--table-border,#cbd5e1)] border-solid"},[t("tr",{staticClass:"border-b border-solid"},e._l(e.node.header.cells,function(o,r){return t("th",{key:`header-${r}`,staticClass:"font-semibold p-[calc(4/7*1em)]",class:["right"===o.align?"text-right":"center"===o.align?"text-center":"text-left"],attrs:{dir:"auto"}},[t(n.NodeRenderer,{attrs:{nodes:o.children,"index-key":`table-th-${n.props.indexKey}`,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)}),0)]),t("tbody",e._l(n.bodyRows,function(o,r){return t("tr",{key:`row-${r}`,staticClass:"border-[var(--table-border,#cbd5e1)] border-solid",class:[r<n.bodyRows.length-1?"border-b":""]},e._l(o.cells,function(o,l){return t("td",{key:`cell-${r}-${l}`,staticClass:"p-[calc(4/7*1em)]",class:["right"===o.align?"text-right":"center"===o.align?"text-center":"text-left"],attrs:{dir:"auto"}},[t(n.NodeRenderer,{attrs:{nodes:o.children,"index-key":`table-td-${n.props.indexKey}`,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)}),0)}),0)]),t("transition",{attrs:{name:"table-node-fade"}},[n.isLoading?t("div",{staticClass:"table-node__loading",attrs:{role:"status","aria-live":"polite"}},[e._t("loading",function(){return[t("span",{staticClass:"table-node__spinner animate-spin",attrs:{"aria-hidden":"true"}}),t("span",{staticClass:"sr-only"},[e._v("Loading")])]},{isLoading:n.isLoading})],2):e._e()])],1)},[],!1,null,"2b3c2be6",null,null).exports,Ue=h(p.defineComponent({__name:"ThematicBreakNode",setup:e=>({__sfc:!0})}),function(){var e=this._self._c;return this._self._setupProxy,e("hr",{staticClass:"hr-node"})},[],!1,null,"639cbad9",null,null).exports,$e=h(p.defineComponent({__name:"FallbackComponent",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"unknown-node"},[e._v(" "+e._s(e.node.raw)+" ")])},[],!1,null,"89aff01f",null,null).exports,Ye=h(p.defineComponent({__name:"VmrContainerNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},setup(e){const t=e,n=p.computed(()=>`vmr-container vmr-container-${t.node.name}`),o=M(t.customId),r=s({text:we,paragraph:Re,heading:Be,inline_code:P,link:je,image:le,strong:Ne,emphasis:Le,strikethrough:Te,insert:Ie,subscript:Ce,superscript:be,checkbox:g,checkbox_input:g,hardbreak:Se,math_inline:xe,reference:ke,list:Ae,math_block:Me,table:He},o);return{__sfc:!0,props:t,containerClass:n,overrides:o,nodeComponents:r,getNodeComponent:function(e){return r[e]||$e}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",e._b({class:n.containerClass},"div",e.node.attrs,!1),e._l(e.node.children,function(o,r){return t(n.getNodeComponent(o.type),{key:`${e.indexKey||"vmr-container"}-${r}`,tag:"component",attrs:{"custom-id":n.props.customId,node:o,"index-key":`${e.indexKey||"vmr-container"}-${r}`}})}),1)},[],!1,null,"841500ff",null,null).exports,Fe=h(p.defineComponent({__name:"NodeRenderer",props:{content:null,nodes:null,final:{type:Boolean},parseOptions:null,customMarkdownIt:null,debugPerformance:{type:Boolean,default:!1},customHtmlTags:null,viewportPriority:{type:Boolean},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:null,codeBlockLightTheme:null,codeBlockMonacoOptions:null,renderCodeBlocksAsPre:{type:Boolean},codeBlockMinWidth:null,codeBlockMaxWidth:null,codeBlockProps:null,themes:null,isDark:{type:Boolean},customId:null,indexKey:null,typewriter:{type:Boolean,default:!0},batchRendering:{type:Boolean,default:!0},initialRenderBatchSize:{default:40},renderBatchSize:{default:80},renderBatchDelay:{default:16},renderBatchBudgetMs:{default:6},renderBatchIdleTimeoutMs:{default:120},deferNodesUntilVisible:{type:Boolean,default:!0},maxLiveNodes:{default:320},liveNodeBuffer:{default:60}},emits:["copy","handleArtifactClick","click","mouseover","mouseout"],setup(e,{emit:t}){var n,o,r;const l=e,i=p.ref(),a=p.ref(!1),h=/auto|scroll|overlay/i,y="undefined"!=typeof window,x=p.computed(()=>l.debugPerformance&&y&&"undefined"!=typeof console);function b(e,t){x.value&&console.info(`[markstream-vue2][perf] ${e}`,t)}function C(e){if("undefined"==typeof window)return null;const t=null!=e?e:i.value;if(!t)return null;const n=t.ownerDocument||document,o=n.scrollingElement||n.documentElement;let r=t;for(;r&&r!==n.body&&r!==o;){const e=window.getComputedStyle(r),t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();if(h.test(t)||h.test(n))return r;r=r.parentElement}return null}const N=l.customId?`renderer-${l.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,T=d.getMarkdown(N),j=p.computed(()=>{const e=l.customHtmlTags;return e&&0!==e.length?d.getMarkdown(N,{customHtmlTags:e}):T}),I=p.computed(()=>{const e=j.value;return l.customMarkdownIt?l.customMarkdownIt(e):e});function D(e){const t=String(null!=e?e:"").trim();if(!t)return"";const n=t.match(/^[<\s/]*([A-Z][\w-]*)/i);return n?n[1].toLowerCase():""}const L=p.computed(()=>{var e,t,n,o;const r=null!=(e=l.parseOptions)?e:{},i=null!=(t=l.final)?t:r.final,a=[...null!=(n=l.customHtmlTags)?n:[],...null!=(o=r.customHtmlTags)?o:[]].map(D).filter(Boolean);return a.length?u(s({},r),{final:i,customHtmlTags:Array.from(new Set(a))}):null==i?r:u(s({},r),{final:i})}),_=p.computed(()=>{var e;if(null==(e=l.nodes)?void 0:e.length)return p.markRaw(l.nodes.slice());if(l.content){const e=x.value?performance.now():0,t=d.parseMarkdownToStructure(l.content,I.value,L.value);return x.value&&b("parse(sync)",{ms:Math.round(performance.now()-e),nodes:t.length,contentLength:l.content.length}),p.markRaw(t)}return[]}),E=p.computed(()=>{var e;return Math.max(1,null!=(e=l.maxLiveNodes)?e:320)}),S=p.computed(()=>{var e;return!((null!=(e=l.maxLiveNodes)?e:0)<=0)&&_.value.length>E.value}),B=p.computed(()=>!1!==l.viewportPriority&&!a.value),z=function(e,t){const n="undefined"!=typeof window&&"undefined"!=typeof document,o="boolean"==typeof t?p.ref(t):t;let r=null,l=null;const i=new WeakMap,a=(t,a)=>{const u=p.ref(!1);let c,d=!1;const m=new Promise(e=>{c=()=>{d||(d=!0,e())}}),h=()=>{try{null==r||r.unobserve(t)}catch(e){}i.delete(t)};if(!n||!o.value)return u.value=!0,c(),{isVisible:u,whenVisible:m,destroy:h};!l&&a&&(l=s({},a));const v=function(t){var o,a,s;if(r||!n)return r;if("undefined"==typeof IntersectionObserver)return null;const u=null!=(o=null==e?void 0:e(null!=t?t:null))?o:null,c=l||{};return r=new IntersectionObserver(e=>{for(const n of e){const e=i.get(n.target);if(e&&(n.isIntersecting||n.intersectionRatio>0)){if(!e.visible.value){e.visible.value=!0;try{e.resolve()}catch(t){}}null==r||r.unobserve(n.target),i.delete(n.target)}}},{root:u,rootMargin:null!=(a=c.rootMargin)?a:"300px",threshold:null!=(s=c.threshold)?s:0}),r}(t);return v?(i.set(t,{resolve:c,visible:u}),v.observe(t),{isVisible:u,whenVisible:m,destroy:h}):(u.value=!0,c(),{isVisible:u,whenVisible:m,destroy:h})};return p.provide(oe,a),a}(e=>{var t;return C(null!=(t=null!=e?e:i.value)?t:null)},B),A=y&&"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame.bind(window):null,O=y&&"function"==typeof window.cancelAnimationFrame?window.cancelAnimationFrame.bind(window):null,H="undefined"!=typeof globalThis&&void 0!==globalThis.process&&"test"===(null==(o=null==(n=globalThis.process)?void 0:n.env)?void 0:o.NODE_ENV),U=y&&"function"==typeof window.requestIdleCallback,$=p.computed(()=>{var e;const t=Math.trunc(null!=(e=l.renderBatchSize)?e:80);return Number.isFinite(t)?Math.max(0,t):0}),Y=p.computed(()=>{var e;const t=Math.trunc(null!=(e=l.initialRenderBatchSize)?e:$.value);return Number.isFinite(t)?Math.max(0,t):$.value}),F=p.computed(()=>!1!==l.batchRendering&&$.value>0&&y&&!H),V=p.ref(0),Q=p.ref({key:l.indexKey,total:0}),W=p.ref(Math.max(1,$.value||1)),K=p.reactive({}),X=new Map,q=new Map,Z=new Map,G=p.ref(null);let J=null,ee=null;const te=p.reactive({start:0,end:0}),ne=p.computed(()=>{if(!S.value)return _.value.map((e,t)=>({node:e,index:t}));const e=_.value.length,t=Xe(te.start,0,e),n=Xe(te.end,t,e);return _.value.slice(t,n).map((e,n)=>({node:e,index:t+n}))}),re=p.computed(()=>{var e;return!1!==l.deferNodesUntilVisible&&!((null!=(e=l.maxLiveNodes)?e:0)<=0)&&!S.value&&!(_.value.length>900)&&B.value}),ie=p.computed(()=>{var e;return F.value&&(null!=(e=l.maxLiveNodes)?e:0)<=0}),ae=p.ref({batchSize:$.value,initial:Y.value,delay:null!=(r=l.renderBatchDelay)?r:16,enabled:ie.value}),se=p.computed(()=>!!z&&(re.value||S.value)),ue=p.computed(()=>{var e;return Math.max(0,null!=(e=l.liveNodeBuffer)?e:60)}),ce=p.ref(0),de=new Map,pe=p.getCurrentInstance();function me(){var e,t,n,o;const r=null==pe?void 0:pe.proxy;if(!r||!r.$refs)return;const l=r.$refs,i=new Set;for(const a of ne.value){const r=null!=(e=l[`node-slot-${a.index}`])?e:null,s=null!=(t=l[`node-content-${a.index}`])?t:null;(null!=(n=Z.get(a.index))?n:null)!==r&&ut(a.index,r),(null!=(o=de.get(a.index))?o:null)!==s&&ct(a.index,s),i.add(a.index)}for(const a of Array.from(Z.keys()))i.has(a)||ut(a,null);for(const a of Array.from(de.keys()))i.has(a)||ct(a,null)}const he=p.computed(()=>{if(!S.value)return _.value.length;const e=ue.value,t=Math.max(te.end+e,Y.value),n=Math.min(_.value.length,t);return Math.max(V.value,n)});function ve(e){var t,n,o,r;const l=C(null!=(t=null!=e?e:i.value)?t:null);if(l)return l;const a=null!=(r=null!=(o=null==e?void 0:e.ownerDocument)?o:null==(n=i.value)?void 0:n.ownerDocument)?r:"undefined"!=typeof document?document:null;return(null==a?void 0:a.scrollingElement)||(null==a?void 0:a.documentElement)||null}function ge(e){if(!y)return!1;try{const t=window.getComputedStyle(e);return!!(t.display||"").toLowerCase().includes("flex")&&(t.flexDirection||"").toLowerCase().endsWith("reverse")}catch(t){return!1}}function fe(e,t,n){var o,r,l,i,a,s;if(n)return null!=(i=null!=(l=null==(o=null==t?void 0:t.documentElement)?void 0:o.scrollTop)?l:null==(r=null==t?void 0:t.body)?void 0:r.scrollTop)?i:0;const u=e.scrollTop;if(!ge(e))return u;const c=u<0?-u:u;return Math.max(0,(null!=(a=e.scrollHeight)?a:0)-(null!=(s=e.clientHeight)?s:0))-c}function ye(e,t){let n=e,o=0,r=0;for(;n&&n!==t&&r++<64;)o+=n.offsetTop||0,n=n.offsetParent;return o}function ze(){J&&(J(),J=null),G.value=null}function Fe(){if(!y||!S.value)return;const e=ve();if(!e||G.value===e)return;ze();const t=()=>We();e.addEventListener("scroll",t,{passive:!0}),G.value=e,J=()=>{e.removeEventListener("scroll",t)}}function Qe(){var e,t,n;if(!ee)return;const o=null!=(n=null==(t=null==(e=i.value)?void 0:e.ownerDocument)?void 0:t.defaultView)?n:"undefined"!=typeof window?window:null;ee.viaTimeout?o?o.clearTimeout(ee.id):clearTimeout(ee.id):null==O||O(ee.id),ee=null}function We(e={}){var t,n,o;if(!S.value)return;if(!y)return void Ke(!0);if(e.immediate)return Qe(),void Ke(!0);if(ee)return;const r=()=>{ee=null,Ke()};if(A)ee={id:A(r),viaTimeout:!1};else{const e=null!=(o=null==(n=null==(t=i.value)?void 0:t.ownerDocument)?void 0:n.defaultView)?o:"undefined"!=typeof window?window:null,l=e?e.setTimeout(r,16):setTimeout(r,16);ee={id:l,viaTimeout:!0}}}function Ke(e=!1){var t,n,o,r,l,a,s;if(!S.value)return;const u=G.value||ve();if(!u)return;const c=u.ownerDocument||(null==(t=i.value)?void 0:t.ownerDocument)||document,d=(null==c?void 0:c.defaultView)||("undefined"!=typeof window?window:null),p=u===(null==c?void 0:c.documentElement)||u===(null==c?void 0:c.body),m=_.value.length;if(!p&&m>0&&ge(u)){const t=u.clientHeight||0,n=u.scrollTop,o=n<0?-n:n,r=Xe(lt(Math.max(0,o)+.5*Math.max(0,t)),0,Math.max(0,m-1));return void((e||Math.abs(r-ce.value)>1)&&(ce.value=r))}const h=p?null:u.getBoundingClientRect(),v=p?0:h.top,g=p?null!=(o=null!=(n=null==d?void 0:d.innerHeight)?n:u.clientHeight)?o:0:h.bottom,f=Array.from(Z.entries()).sort((e,t)=>e[0]-t[0]);let w=null,y=null;for(const[i,M]of f){if(!M)continue;const e=M.getBoundingClientRect();e.bottom<=v||e.top>=g||(null==w&&(w=i),y=i)}if(null==w||null==y){const e=i.value;if(!e)return;const t=p?{top:0}:u.getBoundingClientRect(),n=fe(u,c,p),o=p?(()=>{const n=e.getBoundingClientRect(),o=(p?0:t.top)-n.top;return Math.max(0,o)})():(()=>{const t=ye(e,u);return Math.max(0,n-t)})(),m=p?null!=(s=null!=(a=null!=(l=null==d?void 0:d.innerHeight)?l:null==(r=null==c?void 0:c.documentElement)?void 0:r.clientHeight)?a:u.clientHeight)?s:0:u.clientHeight,h=rt(o+.5*Math.max(0,m));return void(ce.value=Xe(h,0,Math.max(0,_.value.length-1)))}const x=Math.round((w+y)/2);!e&&Math.abs(x-ce.value)<=1||(ce.value=Xe(x,0,Math.max(0,_.value.length-1)))}function Xe(e,t,n){return Math.min(Math.max(e,t),n)}function qe(){const e=_.value.length;if(!S.value||0===e)return te.start=0,void(te.end=e);const t=Math.min(E.value,e),n=ue.value,o=Xe(ce.value-n,0,Math.max(0,e-t));te.start=o,te.end=Math.min(e,o+t)}const Ze=p.reactive({}),Ge=p.reactive({total:0,count:0});function Je(e,t){if(!Number.isFinite(t)||t<=0)return;const n=Ze[e];Ze[e]=t,n?Ge.total+=t-n:(Ge.total+=t,Ge.count++)}const et=p.computed(()=>Ge.count>0?Math.max(12,Ge.total/Ge.count):32);function tt(e,t){var n;if(e>=t)return 0;let o=0;for(let r=e;r<t;r++)o+=null!=(n=Ze[r])?n:et.value;return o}const nt=p.computed(()=>S.value?tt(0,Math.min(te.start,_.value.length)):0),ot=p.computed(()=>{if(!S.value)return 0;const e=_.value.length;return tt(Math.min(te.end,e),e)});function rt(e){var t;if(e<=0)return 0;let n=e;const o=_.value;for(let r=0;r<o.length;r++){const e=null!=(t=Ze[r])?t:et.value;if(n<=e)return r;n-=e}return Math.max(0,o.length-1)}function lt(e){var t;const n=_.value;if(!n.length)return 0;if(e<=0)return Math.max(0,n.length-1);let o=e;for(let r=n.length-1;r>=0;r--){const e=null!=(t=Ze[r])?t:et.value;if(o<=e)return r;o-=e}return 0}function it(e){if(X.size&&S.value)for(const[t,n]of X)t>=e&&(n.destroy(),X.delete(t),re.value&&delete K[t],ft(t),Z.delete(t))}function at(e,t){re.value&&(K[e]=t),t&&(S.value?We():ce.value=Xe(e,0,Math.max(0,_.value.length-1)))}function st(e){const t=X.get(e);t&&(t.destroy(),X.delete(e)),ft(e)}function ut(e,t){if(t?Z.set(e,t):Z.delete(e),t||ft(e),!se.value||!z)return st(e),void(t?at(e,!0):re.value&&delete K[e]);if(!S.value&&re.value&&!a.value&&X.size>=640&&(yt("too-many-targets"),!se.value||!z))return st(e),void(t?at(e,!0):re.value&&delete K[e]);if(e<Y.value&&!S.value)return st(e),void at(e,!0);if(!t)return st(e),void(re.value&&delete K[e]);st(e);const n=z(t,{rootMargin:"400px"});n&&(X.set(e,n),at(e,n.isVisible.value),re.value&&wt(e),n.whenVisible.then(()=>{ft(e),at(e,!0)}).catch(()=>{}).finally(()=>{X.get(e)===n&&X.delete(e);try{n.destroy()}catch(t){}}),S.value&&We())}function ct(e,t){t?(de.set(e,t),queueMicrotask(()=>{Je(e,t.offsetHeight)})):de.delete(e)}p.onMounted(()=>{y&&p.nextTick(me)}),p.watch(ne,()=>{y&&p.nextTick(me)}),p.watch(V,()=>{y&&p.nextTick(me)}),p.watch(S,()=>{y&&p.nextTick(me)});let dt=null,pt=null,mt=!1,ht=null,vt=null;function gt(){y&&(null!=dt&&(null==O||O(dt),dt=null),null!=pt&&(window.clearTimeout(pt),pt=null),null!=vt&&"function"==typeof window.cancelIdleCallback&&(window.cancelIdleCallback(vt),vt=null),mt=!1,ht=null)}function ft(e){if(!y)return;const t=q.get(e);null!=t&&(window.clearTimeout(t),q.delete(e))}function wt(e){if(!y||!re.value)return;ft(e);const t=e%17*23,n=window.setTimeout(()=>{var t,n;if(q.delete(e),!re.value)return;if(!0===K[e])return;const o=Z.get(e);if(!o)return void delete K[e];const r=ve(o),l=o.ownerDocument||document,i=l.defaultView||window,a=!r||r===l.documentElement||r===l.body,s=!a&&r?r.getBoundingClientRect():null,u=a?0:s.top,c=a?null!=(n=null!=(t=i.innerHeight)?t:null==r?void 0:r.clientHeight)?n:0:s.bottom,d=o.getBoundingClientRect();d.bottom>=u-500&&d.top<=c+500&&at(e,!0)},1800+t);q.set(e,n)}function yt(e){var t;if(!a.value){a.value=!0,void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("exports.js",document.baseURI).href}&&(null==(t={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:t.DEV)&&"undefined"!=typeof console&&console.warn("[markstream-vue2] viewportPriority auto-disabled:",e);for(const e of X.values())e.destroy();if(X.clear(),y)for(const e of q.values())window.clearTimeout(e);q.clear();for(const e of Object.keys(K))delete K[e]}}function xt(e,t={}){var n,o;if(!ie.value)return;const r=he.value;if(V.value>=r)return;const i=Math.max(1,e),a=e=>{var t;dt=null,pt=null,vt=null,mt=!1;const n=null!=ht?ht:i;ht=null;const o=Math.max(2,null!=(t=l.renderBatchBudgetMs)?t:6),a=e=>{const t="undefined"!=typeof performance?performance.now():Date.now();V.value=Math.min(r,V.value+Math.max(1,e)),it(V.value);const n=("undefined"!=typeof performance?performance.now():Date.now())-t;return kt(n),n};let s=n;for(;(a(s),!(V.value>=r)&&e)&&!(("function"==typeof e.timeRemaining?e.timeRemaining():0)<=.5*o);)s=Math.max(1,Math.round(W.value));V.value<r&&Mt()};if(!y||t.immediate)return void a();const s=Math.max(0,null!=(n=l.renderBatchDelay)?n:16);if(ht=null!=ht?Math.max(ht,i):i,!mt){if(mt=!0,!H&&U&&window.requestIdleCallback){const e=Math.max(0,null!=(o=l.renderBatchIdleTimeoutMs)?o:120);return void(vt=window.requestIdleCallback(e=>{a(e)},{timeout:e}))}A&&!H?dt=A(()=>{0!==s?pt=window.setTimeout(()=>a(),s):a()}):pt=window.setTimeout(()=>a(),s)}}function Mt(){ie.value&&xt(F.value?Math.max(1,Math.round(W.value)):Math.max(1,$.value))}function kt(e){var t;if(!ie.value)return;const n=Math.max(2,null!=(t=l.renderBatchBudgetMs)?t:6),o=Math.max(1,$.value||1),r=Math.max(1,Math.floor(o/4));e>1.2*n?W.value=Math.max(r,Math.floor(.7*W.value)):e<.5*n&&W.value<o&&(W.value=Math.min(o,Math.ceil(1.2*W.value)))}function bt(){return c(this,null,function*(){try{return(yield Promise.resolve().then(()=>require("./index3.js"))).default}catch(e){return console.warn('[markstream-vue2] Optional peer dependencies for CodeBlockNode are missing. Falling back to inline-code rendering (no Monaco). To enable full code block features, please install "stream-monaco".',e),Pe}})}function Ct(){return c(this,null,function*(){try{return(yield Promise.resolve().then(()=>require("./index4.js"))).default}catch(e){return console.warn('[markstream-vue2] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',e),Pe}})}function Nt(){return c(this,null,function*(){try{return(yield Promise.resolve().then(()=>require("./index5.js"))).default}catch(e){return console.warn("[markstream-vue2] Optional peer dependencies for InfographicBlockNode are missing. Falling back to preformatted code rendering.",e),Pe}})}p.watch([()=>_.value,()=>_.value.length,()=>ie.value,()=>$.value,()=>Y.value,()=>l.renderBatchDelay,()=>l.indexKey],()=>{var e;const t=_.value.length,n=Q.value,o=l.indexKey,r=void 0!==o&&o!==n.key,i=t!==n.total,a=r||i;Q.value={key:o,total:t};const s=ae.value,u=null!=(e=l.renderBatchDelay)?e:16,c=s.batchSize!==$.value||s.initial!==Y.value||s.delay!==u||s.enabled!==ie.value;ae.value={batchSize:$.value,initial:Y.value,delay:u,enabled:ie.value},(a||c||!ie.value)&>(),(a||c)&&(W.value=Math.max(1,$.value||1)),a&&S.value&&We({immediate:!0});const d=he.value;if(!t)return V.value=0,void it(0);if(!ie.value)return V.value=d,void it(V.value);const p=r||0===n.total;V.value=p||c?Math.min(d,Y.value):Math.min(V.value,d);const m=Math.max(1,Y.value||$.value||t);V.value<d?xt(m,{immediate:!y}):it(V.value)},{immediate:!0}),p.watch(()=>S.value,e=>{if(!e)return ze(),void Qe();Fe(),We({immediate:!0})},{immediate:!0}),p.watch([()=>_.value.length,()=>S.value],e=>c(this,[e],function*([e,t]){t&&e&&y&&(yield p.nextTick(),We({immediate:!0}))}),{flush:"post"}),p.watch(()=>i.value,()=>{S.value&&(Fe(),We({immediate:!0}))}),p.watch(()=>_.value.length,()=>{S.value&&We({immediate:!0})}),p.watch(()=>re.value,e=>{if(e)for(const[t,n]of Z)ut(t,n);else{for(const e of X.values())e.destroy();X.clear();for(const e of Array.from(q.keys()))ft(e);for(const e of Object.keys(K))delete K[e];for(const[e,t]of Z)t&&at(e,!0)}},{immediate:!1}),p.watch([()=>l.viewportPriority,()=>_.value.length],([e,t])=>{!1!==e?a.value&&t<=200&&(a.value=!1):a.value=!1}),p.watch(()=>V.value,()=>{S.value&&We({immediate:!0})}),p.watch([ce,E,ue,()=>_.value.length,S],()=>{qe()},{immediate:!0}),p.watch([()=>_.value.length,S,E,ue,()=>te.start,()=>te.end],([e,t,n,o,r,l])=>{x.value&&b("virtualization",{nodes:e,virtualization:t,maxLiveNodes:n,buffer:o,focusIndex:ce.value,scroll:t?(()=>{const e=G.value||ve();return e?{reverse:ge(e),scrollTop:Math.round(e.scrollTop),scrollTopAbs:Math.round(Math.abs(e.scrollTop)),scrollHeight:Math.round(e.scrollHeight),clientHeight:Math.round(e.clientHeight)}:null})():null,liveRange:{start:r,end:l},rendered:V.value})}),p.watch(()=>he.value,(e,t)=>{ie.value&&("number"==typeof t&&e<=t||e>V.value&&Mt())}),p.onBeforeUnmount(()=>{gt();for(const e of X.values())e.destroy();X.clear();for(const e of Array.from(q.keys()))ft(e);ze(),Qe()});const Tt=p.computed(()=>l.renderCodeBlocksAsPre?Pe:bt),jt={text:we,paragraph:Re,heading:Be,code_block:bt,list:Ae,blockquote:v,table:He,definition_list:f,footnote:Ee,footnote_reference:k,footnote_anchor:_e,admonition:Ve,vmr_container:Ye,hardbreak:Se,link:je,image:le,thematic_break:Ue,math_inline:xe,math_block:Me,strong:Ne,emphasis:Le,strikethrough:Te,highlight:De,insert:Ie,subscript:Ce,superscript:be,emoji:w,checkbox:g,checkbox_input:g,inline_code:P,html_inline:R,reference:ke,html_block:Oe};return{__sfc:!0,props:l,emit:t,MAX_DEFERRED_NODE_COUNT:900,MAX_VIEWPORT_OBSERVER_TARGETS:640,VIEWPORT_PRIORITY_RECOVERY_COUNT:200,containerRef:i,viewportPriorityAutoDisabled:a,SCROLL_PARENT_OVERFLOW_RE:h,isClient:y,debugPerformanceEnabled:x,logPerf:b,resolveViewportRoot:C,instanceMsgId:N,defaultMd:T,mdBase:j,mdInstance:I,normalizeCustomTag:D,mergedParseOptions:L,parsedNodes:_,maxLiveNodesResolved:E,virtualizationEnabled:S,viewportPriorityEnabled:B,registerNodeVisibility:z,requestFrame:A,cancelFrame:O,isTestEnv:H,hasIdleCallback:U,resolvedBatchSize:$,resolvedInitialBatch:Y,batchingEnabled:F,renderedCount:V,previousRenderContext:Q,adaptiveBatchSize:W,nodeVisibilityState:K,nodeVisibilityHandles:X,nodeVisibilityFallbackTimers:q,nodeSlotElements:Z,scrollRootElement:G,detachScrollHandler:J,pendingFocusSync:ee,liveRange:te,visibleNodes:ne,deferNodes:re,incrementalRenderingActive:ie,previousBatchConfig:ae,shouldObserveSlots:se,liveNodeBufferResolved:ue,focusIndex:ce,nodeContentElements:de,instance:pe,syncNodeRefs:me,desiredRenderedCount:he,resolveScrollContainer:ve,isReverseFlexScrollRoot:ge,getNormalizedScrollTop:fe,getOffsetTopWithinRoot:ye,cleanupScrollListener:ze,setupScrollListener:Fe,cancelScheduledFocusSync:Qe,scheduleFocusSync:We,syncFocusToScroll:Ke,clamp:Xe,updateLiveRange:qe,nodeHeights:Ze,heightStats:Ge,recordNodeHeight:Je,averageNodeHeight:et,estimateHeightRange:tt,topSpacerHeight:nt,bottomSpacerHeight:ot,estimateIndexForOffset:rt,estimateIndexForOffsetFromEnd:lt,cleanupNodeVisibility:it,markNodeVisible:at,shouldRenderNode:function(e){return!(ie.value&&e>=V.value)&&(!re.value||e<Y.value||!0===K[e])},destroyNodeHandle:st,setNodeSlotElement:ut,setNodeContentRef:ct,batchRaf:dt,batchTimeout:pt,batchPending:mt,pendingIncrement:ht,batchIdle:vt,VIEWPORT_FALLBACK_DELAY:1800,VIEWPORT_FALLBACK_MARGIN_PX:500,cancelBatchTimers:gt,clearVisibilityFallback:ft,scheduleVisibilityFallback:wt,autoDisableViewportPriority:yt,scheduleBatch:xt,queueNextBatch:Mt,adjustAdaptiveBatchSize:kt,CodeBlockNodeAsync:bt,MermaidBlockNodeAsync:Ct,InfographicBlockNodeAsync:Nt,codeBlockComponent:Tt,nodeComponents:jt,getNodeComponent:function(e){var t;if(!e)return $e;const n=M(l.customId),o=n[String(e.type)];if("code_block"===e.type){const r=String(null!=(t=e.language)?t:"").trim().toLowerCase();if("mermaid"===r)return n.mermaid||Ct;if("infographic"===r)return n.infographic||Nt;if(o)return o;return n.code_block||Tt.value}return o||jt[String(e.type)]||$e},getBindingsFor:function(e){var t;const n="code_block"===(null==e?void 0:e.type)?String(null!=(t=e.language)?t:"").trim().toLowerCase():"";return"mermaid"===n||"infographic"===n?{}:"code_block"===e.type?s({stream:l.codeBlockStream,darkTheme:l.codeBlockDarkTheme,lightTheme:l.codeBlockLightTheme,monacoOptions:l.codeBlockMonacoOptions,themes:l.themes,minWidth:l.codeBlockMinWidth,maxWidth:l.codeBlockMaxWidth},l.codeBlockProps||{}):{typewriter:l.typewriter}},handleContainerClick:function(e){t("click",e)},handleContainerMouseover:function(e){var n;(null==(n=e.target)?void 0:n.closest("[data-node-index]"))&&t("mouseover",e)},handleContainerMouseout:function(e){var n;(null==(n=e.target)?void 0:n.closest("[data-node-index]"))&&t("mouseout",e)}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{ref:"containerRef",staticClass:"markstream-vue2 markdown-renderer",class:[{dark:n.props.isDark},{virtualized:n.virtualizationEnabled}],on:{click:n.handleContainerClick,mouseover:n.handleContainerMouseover,mouseout:n.handleContainerMouseout}},[n.virtualizationEnabled?t("div",{staticClass:"node-spacer",style:{height:`${n.topSpacerHeight}px`},attrs:{"aria-hidden":"true"}}):e._e(),e._l(n.visibleNodes,function(o){var r;return t("div",{key:o.index,ref:`node-slot-${o.index}`,refInFor:!0,staticClass:"node-slot",attrs:{"data-node-index":o.index,"data-node-type":o.node.type}},[n.shouldRenderNode(o.index)?t("div",{ref:`node-content-${o.index}`,refInFor:!0,staticClass:"node-content"},["code_block"!==o.node.type&&!1!==n.props.typewriter?t("transition",{attrs:{name:"typewriter",appear:""}},[t(n.getNodeComponent(o.node),e._b({tag:"component",attrs:{node:o.node,loading:o.node.loading,"index-key":`${e.indexKey||"markdown-renderer"}-${o.index}`,"custom-id":n.props.customId,"is-dark":n.props.isDark},on:{copy:function(e){return n.emit("copy",e)},"handle-artifact-click":function(e){return n.emit("handleArtifactClick",e)}}},"component",n.getBindingsFor(o.node),!1))],1):t(n.getNodeComponent(o.node),e._b({tag:"component",attrs:{node:o.node,loading:o.node.loading,"index-key":`${e.indexKey||"markdown-renderer"}-${o.index}`,"custom-id":n.props.customId,"is-dark":n.props.isDark},on:{copy:function(e){return n.emit("copy",e)},"handle-artifact-click":function(e){return n.emit("handleArtifactClick",e)}}},"component",n.getBindingsFor(o.node),!1))],1):t("div",{staticClass:"node-placeholder",style:{height:`${null!=(r=n.nodeHeights[o.index])?r:n.averageNodeHeight}px`}})])}),n.virtualizationEnabled?t("div",{staticClass:"node-spacer",style:{height:`${n.bottomSpacerHeight}px`},attrs:{"aria-hidden":"true"}}):e._e()],2)},[],!1,null,"ae90e4fd",null,null).exports,Ve=h(p.defineComponent({__name:"AdmonitionNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},emits:["copy"],setup(e,{emit:t}){var n;const o=e,r=p.computed(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const e=o.node.kind||"note";return e.charAt(0).toUpperCase()+e.slice(1)}),l=p.ref(!!o.node.collapsible&&!(null==(n=o.node.open)||n)),i=`admonition-${Math.random().toString(36).slice(2,9)}`;return{__sfc:!0,props:o,emit:t,iconMap:{note:"ℹ️",info:"ℹ️",tip:"💡",warning:"⚠️",danger:"❗",error:"⛔",caution:"⚠️"},displayTitle:r,collapsed:l,toggleCollapse:function(){o.node.collapsible&&(l.value=!l.value)},headerId:i,NodeRenderer:Fe}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"admonition",class:[`admonition-${n.props.node.kind}`,n.props.isDark?"is-dark":""]},[t("div",{staticClass:"admonition-header",attrs:{id:n.headerId}},[n.iconMap[n.props.node.kind]?t("span",{staticClass:"admonition-icon"},[e._v(e._s(n.iconMap[n.props.node.kind]))]):e._e(),t("span",{staticClass:"admonition-title"},[e._v(e._s(n.displayTitle))]),n.props.node.collapsible?t("button",{staticClass:"admonition-toggle",attrs:{"aria-expanded":!n.collapsed,"aria-controls":`${n.headerId}-content`,title:n.collapsed?"Expand":"Collapse"},on:{click:n.toggleCollapse}},[n.collapsed?t("span",[e._v("▶")]):t("span",[e._v("▼")])]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.collapsed,expression:"!collapsed"}],staticClass:"admonition-content",attrs:{id:`${n.headerId}-content`,"aria-labelledby":n.headerId}},[t(n.NodeRenderer,{attrs:{"index-key":`admonition-${e.indexKey}`,nodes:n.props.node.children,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(e){return n.emit("copy",e)}}})],1)])},[],!1,null,"ee240a2a",null,null).exports;let Qe=!1,We=null,Ke=!1;function Xe(){return c(this,null,function*(){if(We)return We;if(Ke)return null;try{return We=yield import("stream-monaco"),yield function(e){return c(this,null,function*(){if(!Qe)return Qe=!0,e.preloadMonacoWorkers()})}(We),We}catch(e){return Ke=!0,null}})}let qe=null;function Ze(e){qe=null!=e?e:null}const Ge={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain","c++":"cpp","c#":"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function Je(e){var t;const n=function(e){if(!e)return"";const t=e.trim();if(!t)return"";const[n]=t.split(/\s+/),[o]=n.split(":");return o.toLowerCase()}(e);return null!=(t=Ge[n])?t:n}function et(e){const t=Je(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";default:return t}}function tt(e){if(qe){const t=qe(e);if(null!=t&&""!==t)return t}switch(Je(e)){case"javascript":case"js":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4.5 11c0 .828427.6715729 1.5 1.5 1.5.8284271 0 1.5-.671573 1.5-1.5V7.5M12.5 8.75C12.5 8.05964406 11.9627417 7.5 11.3 7.5L10.7 7.5C10.0372583 7.5 9.5 8.05964406 9.5 8.75 9.5 9.44035594 10.0372583 10 10.7 10L11.3 10C11.9627417 10 12.5 10.5596441 12.5 11.25 12.5 11.9403559 11.9627417 12.5 11.3 12.5L10.7 12.5C10.0372583 12.5 9.5 11.9403559 9.5 11.25" />\n <path d="m 4,1.5 h 8 c 1.385,0 2.5,1.115 2.5,2.5 v 8 c 0,1.385 -1.115,2.5 -2.5,2.5 H 4 C 2.615,14.5 1.5,13.385 1.5,12 V 4 C 1.5,2.615 2.615,1.5 4,1.5 Z" />\n </g>\n</svg>\n';case"typescript":case"ts":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4 1.5h8A2.5 2.5 0 0114.5 4v8a2.5 2.5 0 01-2.5 2.5H4A2.5 2.5 0 011.5 12V4A2.5 2.5 0 014 1.5" />\n <path d="M12.5 8.75c0-.69-.54-1.25-1.2-1.25h-.6c-.66 0-1.2.56-1.2 1.25S10.04 10 10.7 10h.6c.66 0 1.2.56 1.2 1.25s-.54 1.25-1.2 1.25h-.6c-.66 0-1.2-.56-1.2-1.25m-3-3.75v5M5 7.5h3" />\n </g>\n</svg>\n';case"jsx":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#99d1db" stroke-linecap="round" stroke-linejoin="round">\n <path d="M8 10.8c4.14 0 7.5-1.25 7.5-2.8S12.14 5.2 8 5.2.5 6.45.5 8s3.36 2.8 7.5 2.8" />\n <path d="M5.52 9.4c2.07 3.5 4.86 5.72 6.23 4.95 1.37-.78.8-4.24-1.27-7.75C8.41 3.1 5.62.88 4.25 1.65c-1.37.78-.8 4.24 1.27 7.75" />\n <path d="M5.52 6.6c-2.07 3.5-2.64 6.97-1.27 7.75 1.37.77 4.16-1.45 6.23-4.95s2.64-6.97 1.27-7.75C10.38.88 7.59 3.1 5.52 6.6" />\n <path d="M8.5 8a.5.5 0 01-.5.5.5.5 0 01-.5-.5.5.5 0 01.5-.5.5.5 0 01.5.5" />\n </g>\n</svg>\n';case"tsx":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M8 11.3c4.14 0 7.5-1.28 7.5-2.86S12.14 5.58 8 5.58.5 6.86.5 8.44s3.36 2.87 7.5 2.87Z" />\n <path d="M5.52 9.87c2.07 3.6 4.86 5.86 6.23 5.07 1.37-.8.8-4.34-1.27-7.93S5.62 1.16 4.25 1.95s-.8 4.34 1.27 7.92" />\n <path d="M5.52 7.01c-2.07 3.59-2.64 7.14-1.27 7.93s4.16-1.48 6.23-5.07c2.07-3.58 2.64-7.13 1.27-7.92-1.37-.8-4.16 1.47-6.23 5.06" />\n <path d="M8.5 8.44a.5.5 0 01-.5.5.5.5 0 01-.5-.5.5.5 0 01.5-.5.5.5 0 01.5.5" />\n </g>\n</svg>\n';case"html":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#ef9f76" d="M1.5 1.5h13L13 13l-5 2-5-2z" />\n <path stroke="#c6d0f5" d="M11 4.5H5l.25 3h5.5l-.25 3-2.5 1-2.5-1-.08-1" />\n </g>\n</svg>\n';case"css":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round">\n <path d="m4 1.5h8c1.38 0 2.5 1.12 2.5 2.5v8c0 1.38-1.12 2.5-2.5 2.5h-8c-1.38 0-2.5-1.12-2.5-2.5v-8c0-1.38 1.12-2.5 2.5-2.5z" />\n <path stroke-width=".814" d="m 10.240861,11.529149 c 0,0.58011 0.437448,1.039154 0.96002,1.035371 l 0.451635,-0.0032 c 0.522572,-0.0036 0.949379,-0.451477 0.949379,-1.032848 0,-0.581372 -0.426807,-1.065638 -0.949379,-1.065638 l -0.451635,3.4e-5 c -0.522572,3.9e-5 -0.949379,-0.4855273 -0.949379,-1.0656374 0,-0.5801104 0.426807,-1.0378931 0.949379,-1.0378931 l 0.451635,2.825e-4 c 0.522572,3.267e-4 0.951743,0.4577827 0.951743,1.0378931 M 6.8003972,11.529149 c 0,0.58011 0.4374474,1.039154 0.9600196,1.035371 l 0.46464,-0.0032 c 0.5225722,-0.0035 0.9363738,-0.451477 0.9363738,-1.031587 0,-0.580111 -0.4090724,-1.065638 -0.9316446,-1.065638 l -0.4693692,3.4e-5 c -0.5225722,3.8e-5 -0.949379,-0.4855272 -0.949379,-1.0656373 0,-0.5801104 0.4268068,-1.0378931 0.949379,-1.0378931 h 0.4516348 c 0.5225722,0 0.9635665,0.4577827 0.9635665,1.0378931 M 3.4072246,11.529149 c 0,0.58011 0.4374474,1.051765 0.9600196,1.051765 H 4.818879 c 0.5225722,0 0.949379,-0.456521 0.949379,-1.037893 m 0.01129,-2.1312747 c 0,-0.5801103 -0.4374474,-1.037893 -0.9600196,-1.037893 L 4.3678939,8.3741358 C 3.8453217,8.3744624 3.4078743,8.8420074 3.4078743,9.4233788 v 2.1186642" />\n </g>\n</svg>\n';case"scss":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#f4b8e4" stroke-linecap="round" stroke-linejoin="round" d="M6.75 6.38c1.85 1.07 3.35.74 4.83-.2 1.5-.95 2.7-2.78 1.3-4.15-.7-.68-3.25-.8-5.62.19-2.36.99-4.59 3.02-4.74 4.11-.31 2.19 3.15 2.88 3.64 4.23s.28 1.98-.2 2.83c-.5.85-1.96 1.62-2.8.68-.83-.95 1.67-2.75 2.98-3.25 1.3-.5 3.1-.4 3.69.25.58.64-.07 1.79-.03 1.79" />\n</svg>\n';case"json":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M4.5 2.5H4c-.75 0-1.5.75-1.5 1.5v2c0 1.1-1 2-1.83 2 .83 0 1.83.9 1.83 2v2c0 .75.75 1.5 1.5 1.5h.5m7-11h.5c.75 0 1.5.75 1.5 1.5v2c0 1.1 1 2 1.83 2-.83 0-1.83.9-1.83 2v2c0 .74-.75 1.5-1.5 1.5h-.5m-6.5-3a.5.5 0 100-1 .5.5 0 000 1m3 0a.5.5 0 100-1 .5.5 0 000 1m3 0a.5.5 0 100-1 .5.5 0 000 1" />\n</svg>\n';case"python":case"py":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#8caaee" d="M8.5 5.5h-3m6 0V3c0-.8-.7-1.5-1.5-1.5H7c-.8 0-1.5.7-1.5 1.5v2.5H3c-.8 0-1.5.7-1.5 1.5v2c0 .8.7 1.5 1.48 1.5" />\n <path stroke="#e5c890" d="M10.5 10.5h-3m-3 0V13c0 .8.7 1.5 1.5 1.5h3c.8 0 1.5-.7 1.5-1.5v-2.5H13c.8 0 1.5-.7 1.5-1.5V7c0-.8-.7-1.5-1.48-1.5H11.5c0 1.5 0 2-1 2h-2" />\n <path stroke="#8caaee" d="M2.98 10.5H4.5c0-1.5 0-2 1-2h2M7.5 3.5v0" />\n <path stroke="#e5c890" d="m 8.5,12.5 v 0" />\n </g>\n</svg>\n';case"ruby":case"rb":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="M1.5 9.06v2.5c.02.86.36 1.61.9 2.15 1.76 1.76 5.71.65 8.84-2.47 3.12-3.13 4.23-7.08 2.47-8.84a3.1 3.1 0 00-2.15-.9h-2.5M14.5 4l-.25 10.25L4 14.5m4.39-6.11c2.34-2.35 3.29-5.2 2.12-6.37S6.49 1.8 4.14 4.14C1.8 6.5.85 9.34 2.02 10.51s4.02.22 6.37-2.12M5.5 14.5l.25-3.75L11 11l-.25-5.25 3.75-.25" />\n</svg>\n';case"go":case"golang":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round" d="m15.48 8.06-4.85.48m4.85-.48a4.98 4.98 0 01-4.54 5.42 5 5 0 112.95-8.66l-1.7 1.84a2.5 2.5 0 00-4.18 2.06c.05.57.3 1.1.69 1.51.25.27 1 .83 1.78.82.8-.02 1.58-.25 2.07-.81 0 0 .8-.96.68-1.88M2.5 8.5l-2 .01m1.5 2h1.5m-2-3.99 2-.02" />\n</svg>\n';case"r":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#838ba7" d="M13.5 9.5c.63-.7 1-1.54 1-2.43 0-2.52-2.91-4.57-6.5-4.57S1.5 4.55 1.5 7.07c0 1.9 1.65 3.53 4 4.22" />\n <path stroke="#8caaee" d="M10.5 9.5c.4 0 .86.34 1 .7l1 3.3m-5 0v-8h3.05c.95 0 1.95 1 1.95 2s-1 2-1.95 2H7.5Z" />\n </g>\n</svg>\n';case"java":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#c6d0f5" d="M10.73 8.41c.57 3 1.59 5.83 2.77 7.09-6.63-3.45-9.76-1.75-10.5 0-.66-3.4-.54-5.74.09-7.78" />\n <path stroke="#e78284" d="M8.5 7c.63.34 1.82 1.07 2.24 1.41-.54-2.9-.64-5.96-.74-7.91-2.13.58-5.73 1.98-6.9 7.22.52-.69 1.72-1.05 2.4-1.22" />\n <path stroke="#e78284" d="M5.5 7A1.5 1.5 0 007 8.5 1.5 1.5 0 008.5 7 1.5 1.5 0 007 5.5 1.5 1.5 0 005.5 7" />\n </g>\n</svg>\n';case"kotlin":case"kt":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#ca9ee6" d="M2.5 13.5h11L8 8" />\n <path stroke="#ef9f76" d="M8.03 2.5h5.47l-8 8" />\n <path stroke="#e78284" d="M2.5 13.5V8" />\n <path stroke="#85c1dc" d="M8 2.5H2.5V8l3-2.5" />\n </g>\n</svg>\n';case"c":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="m 4.0559072,12.951629 c 2.7459832,2.734744 7.1981158,2.734744 9.9441188,0 l -1.789955,-1.782586 c -1.75742,1.750224 -4.6067879,1.750224 -6.3642294,0 -1.7574416,-1.7502236 -1.7574416,-4.587893 0,-6.338097 1.7574415,-1.750224 4.6068094,-1.750224 6.3642294,0 l 0.894977,-0.8912929 0.894978,-0.891293 c -2.746003,-2.73472867 -7.1981359,-2.73472867 -9.944119,0 -2.7459858,2.7347089 -2.7459858,7.1685599 2e-7,9.9032689 z" clip-rule="evenodd" />\n</svg>\n';case"cpp":case"c++":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="m 2.5559121,12.951629 c 2.7459832,2.734744 7.1981158,2.734744 9.9441189,0 l -1.789955,-1.782586 c -1.7574201,1.750224 -4.606788,1.750224 -6.3642295,0 -1.7574416,-1.7502236 -1.7574416,-4.587893 0,-6.338097 1.7574415,-1.750224 4.6068094,-1.750224 6.3642295,0 l 0.894977,-0.8912929 0.894978,-0.891293 c -2.7460031,-2.73472867 -7.198136,-2.73472867 -9.9441191,0 -2.74598585,2.7347089 -2.74598585,7.1685599 2e-7,9.9032689 z" clip-rule="evenodd" />\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M7.5 6v4M5.513524 7.9999996H9.51304M13.486476 5.9999996v4M11.5 7.9999992h3.999516" />\n</svg>\n';case"cs":case"csharp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" d="m 6.665625,1.0107144 c 0.54375,0.090628 0.9125,0.6062693 0.821875,1.1500367 L 7.18125,3.9983098 h 2.971875 L 10.5125,1.8326156 c 0.09063,-0.5437673 0.60625,-0.9125291 1.15,-0.8219012 0.54375,0.090628 0.9125,0.6062693 0.821875,1.1500367 L 12.18125,3.9983098 H 14 c 0.553125,0 1,0.4468892 1,1.0000319 0,0.5531426 -0.446875,1.0000319 -1,1.0000319 H 11.846875 L 11.18125,9.9985013 H 13 c 0.553125,0 1,0.4468897 1,1.0000317 0,0.553143 -0.446875,1.000032 -1,1.000032 H 10.846875 L 10.4875,14.164259 c -0.09063,0.543768 -0.60625,0.912529 -1.15,0.821902 -0.54375,-0.09063 -0.9125,-0.60627 -0.821875,-1.150037 l 0.30625,-1.834434 h -2.975 L 5.4875,14.167384 c -0.090625,0.543768 -0.60625,0.91253 -1.15,0.821902 C 3.79375,14.898658 3.425,14.383016 3.515625,13.839249 L 3.81875,11.998565 H 2 c -0.553125,0 -1,-0.446889 -1,-1.000032 C 1,10.445391 1.446875,9.9985013 2,9.9985013 H 4.153125 L 4.81875,5.9983736 H 3 c -0.553125,0 -1,-0.4468893 -1,-1.0000319 C 2,4.445199 2.446875,3.9983098 3,3.9983098 H 5.153125 L 5.5125,1.8326156 C 5.603125,1.2888483 6.11875,0.9200865 6.6625,1.0107144 Z M 6.846875,5.9983736 6.18125,9.9985013 H 9.153125 L 9.81875,5.9983736 Z" />\n</svg>\n';case"php":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M0.5,12.5 L0.5,13.24 C0.5,14 1.27360724,14.5 2,14.5 C2.9375516,14.5 3.5,14 3.5,13.2445661 L3.5,6.00089968 C3.5,4.28551107 4.99401107,2.52263547 7.14960413,2.5 C9.49387886,2.5 11,4.0579782 11,5.5 C11.1657296,8.48962302 9.57820404,9.63684469 7.49621582,10.5 L7.49621582,14.5 L15.4979764,14.5 L15.4979764,9 C15.5394484,8.36478228 14.9387379,7.15595371 14.1308258,6.5 C13.1942239,5.80827275 12.0584852,5.50253264 11,5.5 M11.5,14.5 L11.5,11.5 M6,6.5 C6.27614237,6.5 6.5,6.27614237 6.5,6 C6.5,5.72385763 6.27614237,5.5 6,5.5 C5.72385763,5.5 5.5,5.72385763 5.5,6 C5.5,6.27614237 5.72385763,6.5 6,6.5 Z" />\n</svg>\n';case"scala":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="m2.5 2.48 11-.98v3.04l-11 1zm0 5 11-.98v3.04l-11 1zm0 5 11-.98v3.04l-11 1z" />\n</svg>\n';case"shell":case"sh":case"bash":case"zsh":case"powershell":case"ps1":case"bat":case"batch":case"shellscript":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M2 15.5c-.7 0-1.5-.8-1.5-1.5V5c0-.7.8-1.5 1.5-1.5h9c.7 0 1.5.8 1.5 1.5v9c0 .7-.8 1.5-1.5 1.5z" />\n <path d="m1.2 3.8 3.04-2.5S5.17.5 5.7.5h8.4c.66 0 1.4.73 1.4 1.4v7.73a2.7 2.7 0 01-.7 1.75l-2.68 3.51M3 8.5l3 2-3 2m4 0h2" />\n </g>\n</svg>\n';case"sql":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M8 6.5c3.59 0 6.5-1.4 6.5-2.68S11.59 1.5 8 1.5 1.5 2.54 1.5 3.82 4.41 6.5 8 6.5M14.5 8c0 .83-1.24 1.79-3.25 2.2s-4.49.41-6.5 0S1.5 8.83 1.5 8m13 4.18c0 .83-1.24 1.6-3.25 2-2.01.42-4.49.42-6.5 0-2.01-.4-3.25-1.17-3.25-2m0-8.3v8.3m13-8.3v8.3" />\n</svg>\n';case"yaml":case"yml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="M2.5 1.5h3l3 4 3-4h3l-9 13h-3L7 8z" />\n</svg>\n';case"markdown":case"md":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round" d="m9.25 8.25 2.25 2.25 2.25-2.25M3.5 11V5.5l2.04 3 1.96-3V11m4-.5V5M1.65 2.5h12.7c.59 0 1.15.49 1.15 1v9c0 .51-.56 1-1.15 1H1.65c-.59 0-1.15-.49-1.15-1V3.58c0-.5.56-1.08 1.15-1.08" />\n</svg>\n';case"xml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M4.5 4.5 1 8 4.5 11.5M11.5 4.5 15 8 11.5 11.5M9.5 2 6.5 14" />\n</svg>\n';case"rust":case"rs":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round">\n <path d="M15.5 9.5Q8 13.505.5 9.5l1-1-1-2 2-.5V4.5h2l.5-2 1.5 1 1.5-2 1.5 2 1.5-1 .5 2h2V6l2 .5-1 2z" />\n <path d="M6.5 7.5a1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1 1 1 0 011 1m5 0a1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1 1 1 0 011 1M4 11.02c-.67.37-1.5.98-1.5 2.23s1.22 1.22 2 1.25v-2M12 11c.67.37 1.5 1 1.5 2.25s-1.22 1.22-2 1.25v-2" />\n </g>\n</svg>\n';case"swift":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M14.34 10.2c.34-1.08 1.1-5.07-4.45-8.62a.48.48 0 00-.6.07.44.44 0 00-.02.6c.03.02 2.07 2.5 1.34 5.34-1.26-.86-6.24-4.81-6.24-4.81L7.25 7.5 1.9 4.05S5.68 8.7 8 10.45c-1.12.4-3.56.82-6.78-1.18a.48.48 0 00-.58.06.44.44 0 00-.08.56c.11.18 2.7 4.36 8.14 4.36 1.5 0 2.37-.42 3.08-.77.43-.2.77-.37 1.14-.37.93 0 1.54.92 1.54.93.1.14.27.22.44.21a.46.46 0 00.4-.28c.67-1.55-.49-3.2-.96-3.78h0Z" />\n</svg>\n';case"perl":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M12.5 14.5v-3.34c-1-.66-1-1.35-1-2.66m-3 1 .02 2.53.98 2.47m-4-5v5m9 0V9.23s.17-1.73-1-1.73c0-1.5-.5-6-2.5-6S8.75 4.25 8.75 4.25A3.67 3.67 0 006.5 7.12v-3.5c0-.63-.85-1.32-1.5-1.32-.92 0-1.33.59-1.5 1.2H2.25c-.42.11-.75.59-.75 1 0 .5.28 1 .75 1h1.22l.02 3c.01.75.51 1 1.51 1h4.5" />\n</svg>\n';case"lua":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#c6d0f5" d="M10.5 7A1.5 1.5 0 019 8.5 1.5 1.5 0 017.5 7 1.5 1.5 0 019 5.5 1.5 1.5 0 0110.5 7" />\n <path stroke="#8caaee" d="M7 2.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13m7-2a1.5 1.5 0 100 3 1.5 1.5 0 000-3" />\n </g>\n</svg>\n';case"haskell":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M12.5 4.5h3m-1.5 3h1.5m-10 6 2.5-5-2.5-5H8l5.6 10h-2.53l-1.52-2.92L8 13.5zm-5 0 2.5-5-2.5-5H3l2.5 5-2.5 5z" />\n</svg>\n';case"erlang":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round">\n <path d="M6.5 5.5c0-1.25 1-2 2-2s2 .75 2 2z" />\n <path d="M13.5 13c.47-.57 1.12-1.24 1.5-2l-2.25-1.25c-.74 1.36-1.76 2.75-3.25 2.75-2.1 0-3-2.3-3-5h8c.05-1.61-.31-3.45-1-4.5M3 13c-1.08-1.3-1.5-3-1.5-5S2.1 4.24 3 3" />\n </g>\n</svg>\n';case"clojure":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#a6d189" d="M14.17 10.03A6.5 6.5 0 011.81 6.02" />\n <path stroke="#8caaee" d="M1.87 5.85A6.5 6.5 0 0114.22 9.9" />\n <path stroke="#a6d189" d="M6.36 4.9a3.5 3.5 0 103.41 6.12" />\n <path stroke="#8caaee" d="M9.77 11.02a3.5 3.5 0 00-3.03-6.29" />\n <path stroke="#c6d0f5" d="M8 7.5s-1.66 2.48-1.5 3.65" />\n <path stroke="#c6d0f5" d="M1.81 6.02C2.47 5 3.83 4.49 5 4.46c4.06 0 3 5.56 5.03 6.86 1.21.52 3.5-.21 4.15-1.32" />\n </g>\n</svg>\n';case"vue":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#a6d189" stroke-linecap="round" stroke-linejoin="round">\n <path d="M1 1.5h5.44L8 4.56 9.56 1.5H15l-6.99 13z" />\n <path d="M12.05 1.73 8 9.28 3.95 1.73" />\n </g>\n</svg>\n';case"svg":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="m4.54 10 6.92-4m-6.92 4a1.5 1.5 0 10-2.6 1.5 1.5 1.5 0 002.6-1.5M8 4v8m0-8a1.5 1.5 0 100-3 1.5 1.5 0 000 3M4.54 6l6.92 4M4.54 6a1.5 1.5 0 10-2.6-1.5A1.5 1.5 0 004.54 6M8 12a1.5 1.5 0 100 3 1.5 1.5 0 000-3m3.46-2a1.5 1.5 0 102.6 1.5 1.5 1.5 0 00-2.6-1.5m0-4a1.5 1.5 0 102.6-1.5 1.5 1.5 0 00-2.6 1.5" />\n</svg>\n';case"mermaid":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <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" />\n</svg>\n';case"dart":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round">\n <path d="M7 14.5h4.5v-3h3V7L9.17 1.64c-.28-.29-.8-.47-1.17-.29L3.5 3.5 1.35 8c-.18.37 0 .88.3 1.17z" />\n <path d="M3.5 11V3.5H11m-7.5 0 8 8" />\n </g>\n</svg>\n';case"assembly":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <rect width="8" height="13.001" x="4" y="1.499" fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" rx="2.286" ry="2.286" />\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="M 4,4.500025 H 1.5 M 4,7.9999993 H 1.5 M 4,11.499973 H 1.5 m 13,-6.999948 H 12 m 2.5,3.4999743 H 12 m 2.5,3.4999737 H 12" />\n</svg>\n';case"dockerfile":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M.5 8.5H11l.75-.5a5.35 5.35 0 010-3.5c1 .6 1 1.88 1.74 2 .77-.09 1.23.01 2 .52 0 0-.97 1.77-2.5 1.98-1.93 3.65-4.5 5.5-6.98 5.5C0 14.5.5 8.5.5 8.5m1 0v-2m0 0h8m-6 2v-4m0 0h4m-2-2h2m-2 6v-6m2 6v-6m2 6v-2" />\n</svg>\n';case"fortran":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M7.5 14.5v-1l-1-1v-3h2l1 2h1v-6h-1l-1 2h-2v-4h5l1 3h1v-5h-11v1l1 1v9l-1 1.25v.75z" />\n</svg>\n';case"lisp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round">\n <path d="M.5 5.06v6.07C.5 12.41.82 13 2.27 13h5.6c1.04 0 1.63-.51 1.63-1.62 0-.85-.2-1.88-1.5-1.88h-.36C6.4 9.5 6 8.77 6 7.75 6 6.81 6.8 6 7.49 6h2.68" />\n <path d="M3.5 10.5V4.99C3.5 3.89 3.62 3 5 3h9c.97 0 1.5.99 1.5 1.63.12 1.55-.98 1.62-2.1 2.16-.58.26-1.4.52-1.4.98V11" />\n </g>\n</svg>\n';case"ocaml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round">\n <path d="M1.5 8V3c0-.83.67-1.5 1.5-1.5h10c.83 0 1.5.67 1.5 1.5v10c0 .83-.67 1.5-1.5 1.5H9" />\n <path d="m1.5 8 1.14-2.3q.09-.21.36-.24a.8.8 0 01.44.13c.18.12.23.53.28.64.06.1.64 1.23.85 1.23.2 0 .71-1.47.71-1.47s.37-.49.72-.49.55.32.67.49c.12.16.24 1.76.46 2.01s1.32.87 1.67.73c.34-.13.53-.4.63-.73.1-.34-.14-.75 0-1a1.1 1.1 0 011.02-.55c.56.03 2.05.56 2.05 1.05q0 .75-1.5.75c-.48 1.33.28 2.22-3 2.25l1 4" />\n <path d="m4.5 14.5 1.5-4 1 4zm-2 0 1.5-4-1.5-.5-1 1.54V14l1 .49Z" />\n </g>\n</svg>\n';case"prolog":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M4.5 13.5c-.33.33-.5.67-.5 1s.17.67.5 1c.17-.67.5-1 1-1s.83.33 1 1c.33-.33.5-.83.5-1.5h2c0 .67.17 1.17.5 1.5.17-.67.5-1 1-1s.83.33 1 1c.33-.33.5-.67.5-1s-.17-.67-.5-1l1-1 1.25 1.25c0-2.75 1-2.75 1-5.75a7.1 7.1 0 00-2-5.25A3.64 3.64 0 0113 .5c-1.17 0-2 .42-2.5 1.25A3.08 3.08 0 008 .5c-1 0-1.83.42-2.5 1.25C5 .92 4.17.5 3 .5c.5.83.58 1.58.25 2.25a7.1 7.1 0 00-2 5.25c0 3 1 3 1 5.75L3.5 12.5zm6-5a2 2 0 100-4 2 2 0 000 4m-5 0a2 2 0 100-4 2 2 0 000 4M7 8l1 2.5L9 8m1.5-1.5" />\n</svg>\n';case"groovy":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round">\n <path d="M11.68 5.38c.4.19.54.68 1.53 3.25 1 2.57-.92 4.07-.92 4.07s-6.73 2.47-6.73 1.63c-.18-.92-1.92-2.08-1.92-2.08s-.52-.63.06-.75c5.89-1.27 6.96-.61 7.3-2" />\n <path d="M7.38 10.63C2.62 10.88 2.48 8.08 2.5 8 3.6 4.6 9.24.91 10.8 1.58 14.07 3.04 9.2 8.96 7 8.5c-4.02-.83 1.5-4 1.5-4" />\n </g>\n</svg>\n';case"matlab":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#85c1dc" d="M4 11 .5 8.5 5 7q.78-1.77 1.89-1.89c.74-.07 1.94-1.28 3.61-3.61M5 7l1.5 1.5" />\n <path stroke="#ef9f76" d="m15.5 12.5-5-11C8.5 6.83 6.33 10 4 11c1.67-.33 2.67.83 3 3.5 3.5-1.5 3.5-3.5 5-4s1.5 1.5 3.5 2" />\n </g>\n</svg>\n';case"cobol":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M6.74 2.24c.32-1.32 2.2-1.32 2.52 0a1.3 1.3 0 001.93.8c1.15-.7 2.48.62 1.77 1.77a1.3 1.3 0 00.8 1.93c1.32.32 1.32 2.2 0 2.52a1.3 1.3 0 00-.8 1.93c.7 1.15-.62 2.48-1.77 1.77a1.3 1.3 0 00-1.93.8c-.32 1.32-2.2 1.32-2.52 0a1.3 1.3 0 00-1.93-.8c-1.15.7-2.48-.62-1.77-1.77a1.3 1.3 0 00-.8-1.93c-1.32-.32-1.32-2.2 0-2.52a1.3 1.3 0 00.8-1.93c-.7-1.15.62-2.48 1.77-1.77a1.3 1.3 0 001.93-.8M10 6.5a2.5 2.5 0 100 3" />\n</svg>\n';case"ada":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#0f23c3" d="M24.554 20.075c.209.27 1.356.961 1.37 1.246a7 7 0 0 0-1.4-.324a17 17 0 0 1-1.412-.48a9.2 9.2 0 0 1-2.375-1.3A3.15 3.15 0 0 1 19.3 16.75a1.72 1.72 0 0 1 1.767-1.822a3.6 3.6 0 0 1 1.593.321c.146.066 1.31.606 1.256.809a5.5 5.5 0 0 0-1.41-.112c-.649.244-.4.828-.168 1.311a8 8 0 0 0 1.078 1.554c.164.194.884 1.271 1.138 1.264"/><path fill="#1a1978" d="M24.141 16.276c.128-.59.819-1.384 1.344-.773a4.2 4.2 0 0 1 .578 1.918c.12.656.2 1.327.261 1.982c.038.379.34 1.794.123 2.075a23 23 0 0 1-2.922-2.838a3.76 3.76 0 0 1-.925-1.7c-.1-1.073.879-.73 1.541-.664"/><path fill="#0f23c3" d="M26.3 17.781c.141-.732-.406-2.592-1.067-2.949a.06.06 0 0 0 .044-.007c-.156-.444-1.359 1.116-1.228 1.174c-.316-.138.774-1.984.988-2.16c.7-.578 1.372-.086 1.845.543a6.04 6.04 0 0 1 .733 4.434a4.5 4.5 0 0 1-.421 1.312c-.1.22-.45 1.1-.682 1.174a14.8 14.8 0 0 0-.212-3.521"/><path fill="#d2d2d2" d="M3.687 8.4c.179-.188-.041-1.527.324-1.548c.262-.015.553 1.741.627 1.968a9.2 9.2 0 0 0 1.127 2.329a7.53 7.53 0 0 0 4.016 2.978a4.55 4.55 0 0 0 2.366.2c.931-.208 1.82-.577 2.757-.765c1.35-.27 3.342-.352 4.438.647c.7.641.376.76.043 1.421a2.44 2.44 0 0 0 .178 2.562c.235.342 1.033.827.675 1.094c-.567.424-1.277-.452-1.636-.776c-1.4-1.264-2.711-1.313-4.492-1.074a9 9 0 0 1-4.883-.708A9.47 9.47 0 0 1 3.687 8.4M19.941 30a3.6 3.6 0 0 1-2.325-.817c.469-.092 1.021.025 1.508-.044a9.7 9.7 0 0 0 1.754-.43a10.5 10.5 0 0 0 3.022-1.554a6.55 6.55 0 0 0 2.757-5.214c.149-.088.316 1.034.319 1.091a5.8 5.8 0 0 1-.19 1.727a6.9 6.9 0 0 1-1.423 2.774A7.3 7.3 0 0 1 19.941 30"/><path fill="#d2d2d2" d="M18.962 19.109a5.8 5.8 0 0 1-2.05.859a13.4 13.4 0 0 1-2.224.549a8.86 8.86 0 0 1-4.435-.51a9.94 9.94 0 0 1-3.849-2.4c-.352-.367-2.104-2.417-1.548-3.05c.248-.282.875.846 1 .992a5 5 0 0 0 1.357 1.11a10.9 10.9 0 0 0 4.035 1.456a6.7 6.7 0 0 0 2.34-.094a13 13 0 0 1 1.694-.485a4 4 0 0 1 2.113.457c.344.17 1.523.743 1.567 1.116m9.351-4.031a19.3 19.3 0 0 1-.453 3.774c-.176-.242.016-1.47 0-1.792a6 6 0 0 0-.384-2.087a4.9 4.9 0 0 0-1.376-1.661a15 15 0 0 1-1.27-1.536c-1.837-2.382-3.245-5.211-2.9-8.3c.034-.308.069-1.448.411-1.445c.152 0 .266 1.561.29 1.718a12.5 12.5 0 0 0 1.224 4.116c.67 1.222 1.947 2.023 2.825 3.1a6.58 6.58 0 0 1 1.633 4.113M15.7 26.935a10.85 10.85 0 0 0 6.436-.687a6.94 6.94 0 0 0 4.278-4.418c.319.2-.048 1.529-.128 1.781a5.7 5.7 0 0 1-1.01 1.813a8.9 8.9 0 0 1-3.257 2.514c-1.703.772-5.662 1.652-6.319-1.003"/><path fill="#d2d2d2" d="M19.151 19.376c.367 2.107-2.957 3.124-4.478 3.213c-1.859.11-4.929-.292-6.06-2.031c-.673-1.035.781-.09 1.188.058a8.7 8.7 0 0 0 3.06.5a11.6 11.6 0 0 0 3.305-.5a14 14 0 0 0 1.533-.576c.301-.132 1.124-.691 1.452-.664m4.991 4.084c.4-.945-1.883-1.578-2.445-1.858a4.9 4.9 0 0 1-1.315-.867c-.181-.181-.872-.92-.807-1.219a5 5 0 0 1 1.087-.175a6 6 0 0 1 .855.588a10 10 0 0 0 .964.5a16 16 0 0 0 2.119.771c.308.09 1.549.208 1.727.428c-.04.296-1.97 2.021-2.185 1.832"/><path fill="#d2d2d2" d="M26.1 22.172c.265.43-1.08 1.831-1.363 2.105a9.3 9.3 0 0 1-2.566 1.728a7.8 7.8 0 0 1-2.56.753c-.679.058-1.966-.124-2.141-.979a7 7 0 0 1 1.177-.086c.462-.059.921-.149 1.376-.246a13 13 0 0 0 2.184-.645a11.5 11.5 0 0 0 2.084-1.11a11 11 0 0 0 1.078-.822c.105-.089.617-.702.731-.698m-7.342-10.207c-.1-1.308 2.612-1.3 3.271-1.092a5.98 5.98 0 0 1 2.982 2.475c-1.082.8-2.449.094-3.3-.654a4.3 4.3 0 0 0-1.481-1.029c-.809-.265-.818.094-1.472.3"/><path fill="#d2d2d2" d="M25.783 13.341c-.444-.029-.316.071-.647-.212c-.358-.307-.614-.795-.945-1.141c-.534-.558-1.242-.895-1.723-1.485a7.27 7.27 0 0 1-1.624-4.848c.018-1.489.407.187.551.675a12.3 12.3 0 0 0 1.126 2.708a46 46 0 0 0 3.4 4.321c-.039.002-.097-.021-.138-.018m-5.715 1.415c.033-.625-.911-.792-1.211-1.42c-.164-.343-.211-.569.029-.7c.082-.045.383.012.5-.02c.271-.076.335-.273.581-.4a1.193 1.193 0 0 1 1.633 1.021a1.82 1.82 0 0 1-1.532 1.519"/><path fill="#d2d2d2" d="M20.5 14.745a1.93 1.93 0 0 0 1.323-1.7c.524.139.928.658 1.521.771a2.6 2.6 0 0 0 1.029-.017c.207-.045.54-.274.721-.259c-.033.163-.464.546-.565.717a4.2 4.2 0 0 0-.388.9c-.229.741-.061.739-.709.311a4.3 4.3 0 0 0-1.957-.72c-.266-.026-.881.019-.975-.003m-.595 5.989a2.01 2.01 0 0 1-1.4 1.712c-.205.091-2.018.733-2.032.348c-.007-.2 1.624-.954 1.809-1.11a3.4 3.4 0 0 0 .867-1.071c.055-.112.232-.925.271-.943c.224-.106.488.93.485 1.064m-8.532-8.202a10.6 10.6 0 0 1 3.71-.914a10.3 10.3 0 0 1 1.865.024c.366.039 1.469.054 1.74.343a.255.255 0 0 1-.273.173c-.037.077.251.371.3.425c-.034.034-1.445-.4-1.572-.424a10.6 10.6 0 0 0-2.282-.134a16 16 0 0 0-1.841.194a6.2 6.2 0 0 1-1.647.313m11.139-1.801a1.89 1.89 0 0 1-1.517-.6c-.247-.349-.737-1.692-.385-2.021c.209-.2.384.662.484.846a11 11 0 0 0 1.418 1.775m5.276 8.469a19 19 0 0 1-.749 3.313c-.173-.077-.275-.778-.562-.95a4.1 4.1 0 0 0 .76-1.154c.152-.302.303-1.046.551-1.209m-7.807-7.357c-.132.268-.932 1.1-1.118.481c-.107-.356.876-.841 1.118-.481m-.747.45c.228.006.012-.248.012-.266c-.001-.043-.368.266-.012.266"/></svg>';case"julia":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#a6d189" d="M10.5 5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n <path stroke="#e78284" d="M6.5 11a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n <path stroke="#ca9ee6" d="M14.5 11a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n </g>\n</svg>\n';case"elixir":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M8.03 14.5C5 14.5 3.5 12.49 3.5 10.01c0-2.82 2.25-7.02 4.62-8.48a.24.24 0 01.24 0c.08.04.12.12.11.2-.13 1.25.22 2.5.98 3.54.3.43.63.8 1.02 1.27.54.66.94 1.03 1.52 2.08l.01.02c.33.56.5 1.2.5 1.84 0 2.03-1.69 4.02-4.47 4.02" />\n</svg>\n';case"vb.net":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#00519a" d="M6.67 7.836L9 18.915l2.336-11.079H16l-4.664 16.328H6.672L2 7.836Zm11.661 0h7.6a4.08 4.08 0 0 1 2.9 1.749a3.8 3.8 0 0 1 .571 2.04a4 4 0 0 1-.571 2.034a4.1 4.1 0 0 1-2.341 1.763a4.1 4.1 0 0 1 2.929 1.756a3.8 3.8 0 0 1 .58 2.1a4.66 4.66 0 0 1-.579 2.546a5.05 5.05 0 0 1-3.5 2.338h-7.589ZM23 14.252h1.166a1.754 1.754 0 0 0 0-3.5H23Zm0 7h1.39a2.047 2.047 0 0 0 0-4.089H23Z"/></svg>';case"nim":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M1 7 .5 4.5l1.01.67c.28-.27.47-.48 1.18-.85l.56-1.82L4.5 3.84c.77-.18 1.53-.36 2.4-.33L8 1.5l1.1 2.01c.87-.03 1.63.15 2.4.33l1.25-1.34.56 1.82c.7.37.9.58 1.18.85l1.01-.67L15 7m-1.5 1C13 6.5 11 5.5 8 5.5S3 6.5 2.5 8m11.5.75L13.5 8l-1 1.5-1.5.5-3-1.5L5 10l-1.5-.5-1-1.5-.5.75L1 7l1.25 3.75C3 12.75 6 13.5 8 13.5s5-.75 5.75-2.75L15 7z" />\n</svg>\n';case"crystal":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="m 15.4712,10.050637 -5.433601,5.433968 c -0.015,0.01505 -0.04554,0.01505 -0.09055,0.01505 L 2.536327,13.517264 c -0.015,0 -0.04501,-0.01505 -0.06055,-0.06072 L 0.50026325,6.0396501 a 0.21432208,0.21495127 0 0 1 0.015,-0.090817 L 5.9483283,0.5154023 c 0.015,-0.0150465 0.04501,-0.0150465 0.09055,-0.0150465 l 7.4101857,1.997972 c 0.015,0 0.04501,0.015046 0.06055,0.060724 l 1.977121,7.4158186 c 0.03001,0.03063 0.01608,0.060724 -0.01554,0.07577 M 8.2121063,4.1480782 0.93801425,6.1154197 q -0.0225,0 0,0.04514 L 6.2655263,11.50371 c 0.015,0.01505 0.015,0 0.04501,0 l 1.962119,-7.2803988 c -0.03054,-0.075233 -0.06055,-0.075233 -0.06055,-0.075233" />\n</svg>\n';case"d":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<defs><linearGradient id="SVGMV3iTbAN" x1="185.455" x2="181.955" y1="1601.641" y2="1630.224" gradientTransform="translate(-62.523 -666.646)scale(.427)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient id="SVGniw2Mvsa" x1="176.136" x2="172.636" y1="1600.5" y2="1629.083" href="#SVGMV3iTbAN"/></defs><path fill="#b03931" d="m3.978 15.462l-.009-6.953a.59.59 0 0 1 .531-.562h.076l6.074-.009a15.7 15.7 0 0 1 6.067.95a8.9 8.9 0 0 1 2.244 1.359a4.47 4.47 0 0 1 2.946-1.083a4.11 4.11 0 0 1 4.276 3.92A4.11 4.11 0 0 1 21.907 17c-.089 0-.177-.008-.265-.012a7 7 0 0 1-.232.953a85 85 0 0 1 8.59 2.6V2H2v13.4q.992.02 1.978.062m22.8-7.944a1.32 1.32 0 0 1 1.374 1.259a1.379 1.379 0 0 1-2.747 0a1.32 1.32 0 0 1 1.375-1.26Z"/><path fill="#b03931" d="M17.861 15.787a4.11 4.11 0 0 0-1.748-3.458a5.8 5.8 0 0 0-1.508-.822a7.4 7.4 0 0 0-1.629-.438a22 22 0 0 0-2.588-.1H7.769l.006 4.737a89 89 0 0 1 9.91 1.408a5 5 0 0 0 .176-1.327m3.132 3.192a7.9 7.9 0 0 1-2.128 2.582a9.7 9.7 0 0 1-3.256 1.71a11.6 11.6 0 0 1-1.971.472h-.015a32 32 0 0 1-3.326.111l-5.625.022a.616.616 0 0 1-.686-.681l-.01-7.734Q2.992 15.42 2 15.4V30h28v-9.456a85 85 0 0 0-8.59-2.6a7 7 0 0 1-.417 1.035"/><path fill="url(#SVGMV3iTbAN)" d="M20.993 18.979a7.9 7.9 0 0 1-2.128 2.582a9.7 9.7 0 0 1-3.256 1.71a11.6 11.6 0 0 1-1.971.472h-.015a32 32 0 0 1-3.326.111l-5.625.022a.616.616 0 0 1-.686-.681l-.01-7.734Q2.992 15.42 2 15.4V30h28v-9.456a85 85 0 0 0-8.59-2.6a7 7 0 0 1-.417 1.035" opacity=".3"/><path fill="#b03931" d="M10.477 20.835a16 16 0 0 0 2.877-.2a7.6 7.6 0 0 0 1.628-.5a5.6 5.6 0 0 0 1.187-.748a4.46 4.46 0 0 0 1.518-2.271a89 89 0 0 0-9.91-1.408l.006 5.133Z"/><path fill="url(#SVGniw2Mvsa)" d="M10.477 20.835a16 16 0 0 0 2.877-.2a7.6 7.6 0 0 0 1.628-.5a5.6 5.6 0 0 0 1.187-.748a4.46 4.46 0 0 0 1.518-2.271a89 89 0 0 0-9.91-1.408l.006 5.133Z" opacity=".3"/><path fill="#fff" d="M20.383 11.746a7 7 0 0 1 1.36 4.148a6.6 6.6 0 0 1-.1 1.1c.088 0 .176.012.265.012a4.11 4.11 0 0 0 4.276-3.92a4.11 4.11 0 0 0-4.276-3.92a4.47 4.47 0 0 0-2.946 1.083a8 8 0 0 1 1.421 1.497"/><ellipse cx="26.78" cy="8.777" fill="#fff" rx="1.374" ry="1.259"/><path fill="#fff" d="m4.673 23.877l5.625-.022a32 32 0 0 0 3.326-.111h.015a11.5 11.5 0 0 0 1.971-.472a9.7 9.7 0 0 0 3.256-1.71a7.9 7.9 0 0 0 2.128-2.582a7 7 0 0 0 .417-1.034a7 7 0 0 0 .332-2.051a7 7 0 0 0-1.36-4.148a8 8 0 0 0-1.421-1.5a8.9 8.9 0 0 0-2.244-1.359a15.7 15.7 0 0 0-6.067-.95l-6.074.009h-.076a.59.59 0 0 0-.532.562l.009 6.952l.01 7.734a.616.616 0 0 0 .685.682m3.1-12.908h2.619a22 22 0 0 1 2.588.1a7.4 7.4 0 0 1 1.629.438a5.8 5.8 0 0 1 1.508.822a4.12 4.12 0 0 1 1.748 3.458a5 5 0 0 1-.175 1.327a4.46 4.46 0 0 1-1.518 2.271a5.6 5.6 0 0 1-1.187.748a7.7 7.7 0 0 1-1.628.5a16 16 0 0 1-2.877.2H7.786L7.78 15.7Z"/></svg>';case"applescript":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="M14.4561802 11.3673353C13.0276218 14.1261537 11.8858593 15.5 10.8437759 15.5 10.3588459 15.5 9.88231005 15.3491298 9.41749082 15.0543006 8.74000639 14.6241577 7.8668418 14.6059458 7.17068967 15.0074382 6.60881451 15.3319356 6.07177167 15.5 5.56305868 15.5 4.02887542 15.5 1.5 10.9491129 1.5 8.45090396 1.5 5.78581061 2.95006811 3.551507 5.15647301 3.551507 6.19383481 3.551507 7.09007204 4.20001691 7.84308619 4.497206 8.16210316 4.62512517 8.52255587 4.61592787 8.83410596 4.47192 9.44477141 4.18872223 10.2497236 3.551507 11.2503615 3.551507 12.4715175 3.551507 13.5338865 4.33779342 14.4184071 5.47479877 14.5532906 5.64778615 14.5172013 5.89341518 14.3377895 6.02349446 13.3500923 6.736546 12.8746057 7.53893969 12.8746057 8.45090396 12.8746057 9.36404821 13.3502672 10.1652619 14.3377895 10.8793249 14.4946576 10.992887 14.5445377 11.1984946 14.4561802 11.3673353ZM8.5 3C8.5 3 8.3468635 1.3936039 10 1" />\n</svg>\n';case"solidity":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="m3 11.5 2.5 4 2.5-4 2.5 4 2.5-4-2.5-4-2.5 4m2.5 4h-5m7.5-4H3m10-7-2.5-4-2.5 4-2.5-4-2.5 4 2.5 4 2.5-4M5.5.5h5M3 4.5h10" />\n</svg>\n';case"objectivec":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#c2c2c2" d="M11.29 15.976a8.9 8.9 0 0 0 1.039 4.557a4.82 4.82 0 0 0 5.579 2.13a3.79 3.79 0 0 0 2.734-3.181c.095-.535.1-.54.1-.54c1.537.222 4.014.582 5.55.8l-.1.389A9.96 9.96 0 0 1 23.8 24.9a8.35 8.35 0 0 1-4.747 2.378a12.93 12.93 0 0 1-7.322-.725a8.98 8.98 0 0 1-5.106-5.524A14.35 14.35 0 0 1 6.642 10.9a9.32 9.32 0 0 1 7.929-6.24a11.8 11.8 0 0 1 5.9.491a8.47 8.47 0 0 1 5.456 6.1c.083.311.1.369.1.369c-1.709.311-3.821.705-5.518 1.075c-.323-1.695-1.122-3.029-2.831-3.445a4.656 4.656 0 0 0-5.853 3.158a9 9 0 0 0-.341 1.273a11 11 0 0 0-.194 2.295"/><path fill="#c2c2c2" d="M2.033 30V2h5.934v2.227H4.723v23.546h3.244V30zm27.934-.001h-5.934v-2.228h3.244V4.226h-3.244V1.999h5.934z"/></svg>';case"objectivecpp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#c2c2c2" d="M19.5 24.833a11.24 11.24 0 0 1-5.13 1.009a8.37 8.37 0 0 1-6.492-2.576A9.75 9.75 0 0 1 5.512 16.4a10.4 10.4 0 0 1 2.659-7.406a9.02 9.02 0 0 1 6.9-2.841a12.2 12.2 0 0 1 4.43.7v4.129a7.5 7.5 0 0 0-4.108-1.142a5.28 5.28 0 0 0-4.075 1.685A6.48 6.48 0 0 0 9.766 16.1a6.37 6.37 0 0 0 1.464 4.4a5.02 5.02 0 0 0 3.941 1.639a8.03 8.03 0 0 0 4.329-1.223Z"/><path fill="#c2c2c2" d="M16.572 15.081V13.24h1.841v1.841h1.84v1.84h-1.84v1.841h-1.841v-1.841h-1.839V15.08zm6.44 0V13.24h1.841v1.841h1.84v1.84h-1.84v1.841h-1.841v-1.841h-1.839V15.08zM2.035 30V2.001h5.933v2.227H4.725v23.545h3.243V30z"/><path fill="#c2c2c2" d="M29.965 29.999h-5.933v-2.228h3.243V4.227h-3.243V2h5.933z"/></svg>';case"terraform":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="m1.5 6 8 4.25 4-2.25m-12-2V1.5l8 4.25 4-2.25V8m-4-2.25v8.75M5.53 3.82 5.5 12.5l4 2" />\n</svg>\n';case"plain":case"text":case"":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round">\n <path d="M13.5 6.5v6a2 2 0 01-2 2h-7a2 2 0 01-2-2v-9c0-1.1.9-2 2-2h4.01" />\n <path d="m8.5 1.5 5 5h-4a1 1 0 01-1-1zm-3 10h5m-5-3h5m-5-3h1" />\n </g>\n</svg>\n';default:return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">\x3c!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE --\x3e<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m10 9l-3 3l3 3m4 0l3-3l-3-3"/><rect width="18" height="18" x="3" y="3" rx="2"/></g></svg>'}}const nt={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown","":"Plain Text",plain:"Plain Text"};function ot(e){try{if("undefined"!=typeof globalThis&&"function"==typeof globalThis.requestAnimationFrame)return globalThis.requestAnimationFrame(e)}catch(t){}return globalThis.setTimeout(e,0)}const rt=h(p.defineComponent({__name:"Portal",props:{to:null},setup(e){const t=e,n=p.ref(null);function o(){return"undefined"==typeof document?null:t.to&&"body"!==t.to?document.querySelector(t.to):document.body}function r(){const e=n.value;if(!e)return;const t=o();t&&e.parentElement!==t&&t.appendChild(e)}return p.onMounted(()=>{r()}),p.watch(()=>t.to,()=>{r()}),p.onBeforeUnmount(()=>{}),{__sfc:!0,props:t,rootRef:n,resolveTarget:o,moveToTarget:r}}}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{ref:"rootRef",staticClass:"portal-root"},[e._t("default")],2)},[],!1,null,"26355139",null,null).exports,lt=h(p.defineComponent({__name:"HtmlPreviewFrame",props:{code:null,isDark:{type:Boolean},onClose:null,title:null},setup(e){const t=e,{t:n}=ne(),o=p.computed(()=>{const e=t.code||"",n=e.trim().toLowerCase();return n.startsWith("<!doctype")||n.startsWith("<html")||n.startsWith("<body")?e:`<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background-color: ${t.isDark?"#020617":"#ffffff"};\n color: ${t.isDark?"#e5e7eb":"#020617"};\n }\n body {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;\n }\n </style>\n </head>\n <body>\n ${e}\n </body>\n</html>`});function r(e){var n;"Escape"!==e.key&&"Esc"!==e.key||null==(n=t.onClose)||n.call(t)}return p.onMounted(()=>{"undefined"!=typeof window&&window.addEventListener("keydown",r)}),p.onUnmounted(()=>{"undefined"!=typeof window&&window.removeEventListener("keydown",r)}),{__sfc:!0,props:t,t:n,srcdoc:o,handleKeydown:r,Portal:rt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue2"},[t("div",{staticClass:"html-preview-frame__backdrop",class:{"html-preview-frame__backdrop--dark":n.props.isDark},on:{click:function(e){var t,o;null==(o=(t=n.props).onClose)||o.call(t)}}},[t("div",{staticClass:"html-preview-frame",class:{"html-preview-frame--dark":n.props.isDark},on:{click:function(e){e.stopPropagation()}}},[t("div",{staticClass:"html-preview-frame__header"},[t("div",{staticClass:"html-preview-frame__title"},[t("span",{staticClass:"html-preview-frame__dot"}),t("span",{staticClass:"html-preview-frame__label"},[e._v(e._s(n.props.title||n.t("common.preview")||"Preview"))])]),t("button",{staticClass:"html-preview-frame__close",class:{"html-preview-frame__close--dark":n.props.isDark},attrs:{type:"button"},on:{click:function(e){var t,o;null==(o=(t=n.props).onClose)||o.call(t)}}},[e._v(" × ")])]),t("iframe",{staticClass:"html-preview-frame__iframe",attrs:{sandbox:"allow-scripts allow-same-origin",srcdoc:n.srcdoc}})])])])])},[],!1,null,"7157861b",null,null).exports;let it=null,at=null,st=null,ut=null,ct=null;const dt=new WeakMap;let pt=0;const mt=h(p.defineComponent({__name:"CodeBlockNode",props:{node:{type:Object,required:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{type:[Object,String],default:void 0},lightTheme:{type:[Object,String],default:void 0},isShowPreview:{type:Boolean,default:!0},monacoOptions:{type:Object,default:void 0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{type:[String,Number],default:void 0},maxWidth:{type:[String,Number],default:void 0},themes:{type:Array,default:void 0},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:{type:String,default:void 0}},emits:["previewCode","copy"],setup(e,{emit:t}){var n,o;const r=e,l="__markstreamMonacoPassiveTouch__";function i(){var e;try{const t=window;if(t[l])return;const n=null==(e=window.Element)?void 0:e.prototype,o=null==n?void 0:n.addEventListener;if(!n||!o)return;n.addEventListener=function(e,t,n){return"touchstart"===e&&a(this,n)?o.call(this,e,t,d(n)):o.call(this,e,t,n)},t[l]=!0}catch(t){}}function a(e,t){if(!e)return!1;const n=e;return!("function"!=typeof n.closest||!n.closest(".monaco-editor, .monaco-diff-editor")||t&&"object"==typeof t&&"passive"in t)}function d(e){return null==e?{passive:!0}:"boolean"==typeof e?{capture:e,passive:!0}:"object"==typeof e?"passive"in e?e:u(s({},e),{passive:!0}):{passive:!0}}"undefined"!=typeof window&&i();const h=p.getCurrentInstance(),v=p.computed(()=>{var e,t,n,o,r,l,i,a,s,u;const c=null==h?void 0:h.proxy,d=null!=(e=null==c?void 0:c.$listeners)?e:{};if(d.previewCode||d["preview-code"])return!0;const p=null!=(i=null!=(l=null==(n=null==(t=null==c?void 0:c.$vnode)?void 0:t.data)?void 0:n.on)?l:null==(r=null==(o=null==c?void 0:c.$vnode)?void 0:o.componentOptions)?void 0:r.listeners)?i:{};if(p.previewCode||p["preview-code"])return!0;const m=null!=(u=null==(a=null==c?void 0:c.$vnode)?void 0:a.props)?u:null==(s=null==h?void 0:h.vnode)?void 0:s.props;return!(!m||!m.onPreviewCode&&!m.onPreviewcode)}),{t:g}=ne(),f=p.ref(null),w=p.ref(null),y=p.ref(!1),x=p.ref(Je(r.node.language)),M=p.computed(()=>et(x.value)),k=p.ref(!1),b=p.ref(!1),C=p.ref(!1),N=p.ref(!1),T=p.ref(null);let j=0;const I=re();let D=null;const L=p.ref("undefined"==typeof window);"undefined"!=typeof window&&p.watch(()=>w.value,e=>{if(null==D||D.destroy(),D=null,!e)return void(L.value=!1);const t=I(e,{rootMargin:"400px"});D=t,L.value=t.isVisible.value,t.whenVisible.then(()=>{L.value=!0})},{immediate:!0}),p.onBeforeUnmount(()=>{null==D||D.destroy(),D=null});let _=null,E=null,S=()=>{},B=()=>{},z=()=>null,A=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),O=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),R=()=>{},P=()=>{},H=null,U=()=>{var e;return String(null!=(e=r.node.language)?e:"plaintext")},$=()=>c(this,null,function*(){});const Y=p.computed(()=>r.node.diff),F=p.ref(!1),V=p.ref(!1),Q=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("exports.js",document.baseURI).href}&&Boolean(null==(n={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:n.DEV);"undefined"!=typeof window&&(()=>{c(this,null,function*(){try{const e=yield Xe();if(!e)return Q&&console.warn("[markstream-vue2] stream-monaco is not installed. Code blocks will use basic rendering. Install stream-monaco for enhanced code editor features."),void(F.value=!0);const t=e.useMonaco,n=e.detectLanguage;if("function"==typeof n&&(U=n),"function"==typeof t){const e=we();if(e&&r.themes&&Array.isArray(r.themes)&&!r.themes.includes(e))throw new Error("Preferred theme not in provided themes array");const n=t(u(s({wordWrap:"on",wrappingIndent:"same",themes:r.themes,theme:e},r.monacoOptions||{}),{onThemeChange(){le()}}));_=n.createEditor||_,E=n.createDiffEditor||E,S=n.updateCode||S,B=n.updateDiff||B,z=n.getEditor||z,A=n.getEditorView||A,O=n.getDiffEditorView||O,R=n.cleanupEditor||R,P=n.safeClean||n.cleanupEditor||P,$=n.setTheme||$,N.value=!0,f.value&&(yield ge(f.value))}}catch(e){Q&&console.warn("[markstream-vue2] Failed to initialize Monaco editor:",e),F.value=!0}})})();const W=p.ref("number"==typeof(null==(o=r.monacoOptions)?void 0:o.fontSize)?r.monacoOptions.fontSize:Number.NaN),K=p.ref(W.value),X=p.computed(()=>{const e=W.value,t=K.value;return"number"==typeof e&&Number.isFinite(e)&&e>0&&"number"==typeof t&&Number.isFinite(t)&&t>0});function q(){try{const e=f.value;if(!e)return null;const t=e.querySelector(".view-lines .view-line");if(t){const e=Math.ceil(t.getBoundingClientRect().height);if(e>0)return e}}catch(e){}return null}function Z(){var e,t,n,o,r;try{const l=Y.value?null!=(n=null==(t=null==(e=O())?void 0:e.getModifiedEditor)?void 0:t.call(e))?n:O():A(),i=z(),a=null==(o=null==i?void 0:i.EditorOption)?void 0:o.fontInfo;if(l&&null!=a){const e=null==(r=l.getOption)?void 0:r.call(l,a),t=null==e?void 0:e.fontSize;if("number"==typeof t&&Number.isFinite(t)&&t>0)return t}}catch(l){}try{const e=f.value;if(e){const t=e.querySelector(".view-lines .view-line");if(t)try{if("undefined"!=typeof window&&"function"==typeof window.getComputedStyle){const e=window.getComputedStyle(t).fontSize,n=e&&e.match(/^(\d+(?:\.\d+)?)/);if(n)return Number.parseFloat(n[1])}}catch(l){}}}catch(l){}return null}function G(e){var t,n;try{const o=z(),r=null==(t=null==o?void 0:o.EditorOption)?void 0:t.lineHeight;if(null!=r){const t=null==(n=null==e?void 0:e.getOption)?void 0:n.call(e,r);if("number"==typeof t&&t>0)return t}}catch(l){}const o=q();if(o&&o>0)return o;const r=Number.isFinite(K.value)&&K.value>0?K.value:12;return Math.max(12,Math.round(1.35*r))}function te(){var e;if(Number.isFinite(K.value)&&K.value>0&&Number.isFinite(W.value))return K.value;const t=Z();return"number"==typeof(null==(e=r.monacoOptions)?void 0:e.fontSize)?(W.value=r.monacoOptions.fontSize,K.value=r.monacoOptions.fontSize,K.value):t&&t>0?(W.value=t,K.value=t,t):(W.value=12,K.value=12,12)}function oe(){var e,t,n,o,r,l,i,a,s,u,c,d,p,m;try{const h=Y.value?O():A();if(!h)return null;if(Y.value&&(null==h?void 0:h.getOriginalEditor)&&(null==h?void 0:h.getModifiedEditor)){const p=null==(e=h.getOriginalEditor)?void 0:e.call(h),m=null==(t=h.getModifiedEditor)?void 0:t.call(h);null==(n=null==p?void 0:p.layout)||n.call(p),null==(o=null==m?void 0:m.layout)||o.call(m);const v=(null==(r=null==p?void 0:p.getContentHeight)?void 0:r.call(p))||0,g=(null==(l=null==m?void 0:m.getContentHeight)?void 0:l.call(m))||0,f=Math.max(v,g);if(f>0)return Math.ceil(f+1);const w=(null==(s=null==(a=null==(i=null==p?void 0:p.getModel)?void 0:i.call(p))?void 0:a.getLineCount)?void 0:s.call(a))||1,y=(null==(d=null==(c=null==(u=null==m?void 0:m.getModel)?void 0:u.call(m))?void 0:c.getLineCount)?void 0:d.call(c))||1,x=Math.max(w,y),M=Math.max(G(p),G(m));return Math.ceil(x*(M+1.5)+0+1)}if(null==h?void 0:h.getContentHeight){null==(p=null==h?void 0:h.layout)||p.call(h);const e=h.getContentHeight();if(e>0)return Math.ceil(e+1)}const v=null==(m=null==h?void 0:h.getModel)?void 0:m.call(h);let g=1;v&&"function"==typeof v.getLineCount&&(g=v.getLineCount());const f=G(h);return Math.ceil(g*(f+1.5)+0+1)}catch(h){return null}}function le(){var e,t,n,o,r,l,i,a;const s=f.value,u=w.value;if(!s||!u)return;const c=s.querySelector(".monaco-editor")||s,d=c.querySelector(".monaco-editor-background")||c,p=c.querySelector(".view-lines")||c;let m=null,h=null,v=null;try{"undefined"!=typeof window&&"function"==typeof window.getComputedStyle&&(m=window.getComputedStyle(c),h=d===c?m:window.getComputedStyle(d),v=p===c?m:window.getComputedStyle(p))}catch(b){m=null,h=null,v=null}const g=String(null!=(e=null==m?void 0:m.getPropertyValue("--vscode-editor-foreground"))?e:"").trim(),y=String(null!=(t=null==m?void 0:m.getPropertyValue("--vscode-editor-background"))?t:"").trim(),x=String(null!=(o=null!=(n=null==m?void 0:m.getPropertyValue("--vscode-editor-selectionBackground"))?n:null==m?void 0:m.getPropertyValue("--vscode-editor-hoverHighlightBackground"))?o:"").trim(),M=g||String(null!=(l=null!=(r=null==v?void 0:v.color)?r:null==m?void 0:m.color)?l:"").trim(),k=y||String(null!=(a=null!=(i=null==h?void 0:h.backgroundColor)?i:null==m?void 0:m.backgroundColor)?a:"").trim();M&&u.style.setProperty("--vscode-editor-foreground",M),k&&u.style.setProperty("--vscode-editor-background",k),x&&u.style.setProperty("--vscode-editor-selectionBackground",x)}function ie(){try{const e=f.value;if(!e)return;const t=e.getBoundingClientRect(),n=window.scrollY+t.top,o=oe();if(null!=o&&o>0){const r=t.height;e.style.height=`${Math.ceil(o)}px`,e.style.maxHeight="none";const l=Math.ceil(o)-r;0!==l&&n<window.scrollY&&window.scrollBy(0,l)}}catch(e){}}function ae(){var e;try{const t=f.value;if(!t)return;const n=t.getBoundingClientRect(),o=window.scrollY+n.top,r=n.height,l=se();if(j>0&&(j--,null!=T.value)){const e=Math.min(T.value,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const i=oe();if(null!=i&&i>0){const e=Math.min(i,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}if(null!=T.value){const e=Math.min(T.value,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const a=Math.ceil((null==(e=t.getBoundingClientRect)?void 0:e.call(t).height)||0);if(a>0){const e=Math.min(a,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const s=Number.parseFloat(t.style.height);if(!Number.isNaN(s)&&s>0){const e=Math.ceil(Math.min(s,l));t.style.height=`${e}px`;const n=e-r;0!==n&&o<window.scrollY&&window.scrollBy(0,n)}else{const e=Math.ceil(l);t.style.height=`${e}px`;const n=e-r;0!==n&&o<window.scrollY&&window.scrollBy(0,n)}t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto"}catch(t){}}function se(){var e,t;const n=null!=(t=null==(e=r.monacoOptions)?void 0:e.MAX_HEIGHT)?t:500;if("number"==typeof n)return n;const o=String(n).match(/^(\d+(?:\.\d+)?)/);return o?Number.parseFloat(o[1]):500}const ue=p.computed(()=>r.isShowPreview&&("html"===x.value||"svg"===x.value));p.watch(()=>r.node.language,e=>{x.value=Je(e)}),p.watch(()=>r.node.code,e=>c(this,null,function*(){var t,n;if(!1!==r.stream){if(x.value||(x.value=Je(U(e))),_&&!C.value&&f.value)try{yield ge(f.value)}catch(o){}Y.value?B(String(null!=(t=r.node.originalCode)?t:""),String(null!=(n=r.node.updatedCode)?n:""),M.value):S(e,M.value),k.value&&ot(()=>ie())}}));const ce=p.computed(()=>{const e=x.value;return e?nt[e]||e.charAt(0).toUpperCase()+e.slice(1):nt[""]||"Plain Text"}),de=p.computed(()=>tt(x.value||"")),pe=p.computed(()=>{const e={},t=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},n=t(r.minWidth),o=t(r.maxWidth);return n&&(e.minWidth=n),o&&(e.maxWidth=o),e});function me(e){return!e||e.disabled}function he(e){var t,n;try{if(Y.value){const n=O();null==(t=null==n?void 0:n.updateOptions)||t.call(n,{automaticLayout:e})}else{const t=A();null==(n=null==t?void 0:t.updateOptions)||n.call(t,{automaticLayout:e})}}catch(o){}}function ve(e){return c(this,null,function*(){var t,n,o;if(!_)return;Y.value?(P(),E?yield E(e,String(null!=(t=r.node.originalCode)?t:""),String(null!=(n=r.node.updatedCode)?n:""),M.value):yield _(e,r.node.code,M.value)):yield _(e,r.node.code,M.value);const l=Y.value?O():A();if("number"==typeof(null==(o=r.monacoOptions)?void 0:o.fontSize))null==l||l.updateOptions({fontSize:r.monacoOptions.fontSize,automaticLayout:!1}),W.value=r.monacoOptions.fontSize,K.value=r.monacoOptions.fontSize;else{const e=Z();e&&e>0?(W.value=e,K.value=e):(W.value=12,K.value=12)}k.value||b.value||ae(),!1===r.loading&&(yield p.nextTick(),ot(()=>{k.value&&!b.value?ie():b.value||ae()}))})}function ge(e){if(!_)return null;if(H)return H;C.value=!0;const t=(()=>c(this,null,function*(){yield ve(e)}))();return H=t.finally(()=>{H=null}),H}p.watch(()=>K.value,(e,t)=>{const n=Y.value?O():A();n&&"number"==typeof e&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),k.value&&!b.value&&ie())},{flush:"post",immediate:!1});const fe=p.watch(()=>[f.value,Y.value,r.stream,r.loading,N.value,L.value],e=>c(this,[e],function*([e,t,n,o,r,l]){if(!e||!_)return;if(!l)return;if(!1===n&&!1!==o)return;const i=ge(e);i&&(yield i,fe())}));function we(){return r.isDark?r.darkTheme:r.lightTheme}function ye(){const e=we();e&&function(e,t){const n=function(e){if(null==e)return null;if("string"==typeof e)return e;if("object"==typeof e&&e&&"name"in e)return String(e.name);if("object"==typeof e){const n=dt.get(e);if(n)return n;try{const t=JSON.stringify(e);if(t)return dt.set(e,t),t}catch(t){}const o="__theme_"+ ++pt;return dt.set(e,o),o}return String(e)}(t);return n?(ct=e,it||ut!==n?(at=t,st=n,it||(it=(()=>c(this,null,function*(){for(;st&&null!=at;){const n=at,o=st;if(at=null,st=null,ut!==o)try{inFlightKey=o,yield(null!=ct?ct:e)(n),ut=o}catch(t){}}}))().finally(()=>{it=null,inFlightKey=null}),it)):Promise.resolve()):Promise.resolve()}($,e).then(()=>{ot(()=>le())})}p.watch(()=>[r.isDark,r.darkTheme,r.lightTheme,N.value],()=>{N.value&&ye()}),p.watch(()=>[r.monacoOptions,L.value],()=>{var e,t;if(!_||!L.value)return;const n=Y.value?O():A(),o="number"==typeof(null==(e=r.monacoOptions)?void 0:e.fontSize)?r.monacoOptions.fontSize:Number.isFinite(K.value)?K.value:void 0;"number"==typeof o&&Number.isFinite(o)&&o>0&&(null==(t=null==n?void 0:n.updateOptions)||t.call(n,{fontSize:o})),k.value&&!b.value?ie():b.value||ae()},{deep:!0});const xe=p.watch(()=>[r.loading,L.value],e=>c(this,[e],function*([e,t]){t&&(e||(yield p.nextTick(),ot(()=>{b.value||(k.value?ie():ae()),xe()})))}),{immediate:!0,flush:"post"});return p.onUnmounted(()=>{R()}),{__sfc:!0,props:r,emits:t,MONACO_TOUCH_PATCH_FLAG:l,ensureMonacoPassiveTouchListeners:i,shouldForcePassiveForMonaco:a,withPassiveOptions:d,instance:h,hasPreviewListener:v,t:g,codeEditor:f,container:w,copyText:y,codeLanguage:x,monacoLanguage:M,isExpanded:k,isCollapsed:b,editorCreated:C,monacoReady:N,expandRafId:null,heightBeforeCollapse:T,resumeGuardFrames:j,registerVisibility:I,viewportHandle:D,viewportReady:L,createEditor:_,createDiffEditor:E,updateCode:S,updateDiffCode:B,getEditor:z,getEditorView:A,getDiffEditorView:O,cleanupEditor:R,safeClean:P,createEditorPromise:H,detectLanguage:U,setTheme:$,isDiff:Y,usePreCodeRender:F,showInlinePreview:V,isDevEnv:Q,codeFontMin:10,codeFontMax:36,codeFontStep:1,defaultCodeFontSize:W,codeFontSize:K,fontBaselineReady:X,CONTENT_PADDING:0,LINE_EXTRA_PER_LINE:1.5,PIXEL_EPSILON:1,measureLineHeightFromDom:q,readActualFontSizeFromEditor:Z,getLineHeightSafe:G,ensureFontBaseline:te,increaseCodeFont:function(){const e=te(),t=Math.min(36,e+1);K.value=t},decreaseCodeFont:function(){const e=te(),t=Math.max(10,e-1);K.value=t},resetCodeFont:function(){te(),Number.isFinite(W.value)&&(K.value=W.value)},computeContentHeight:oe,syncEditorCssVars:le,resizeSyncHandler:null,updateExpandedHeight:ie,updateCollapsedHeight:ae,getMaxHeightValue:se,isPreviewable:ue,displayLanguage:ce,languageIcon:de,containerStyle:pe,copy:function(){return c(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(r.node.code)),y.value=!0,t("copy",r.node.code),setTimeout(()=>{y.value=!1},1e3)}catch(e){console.error("复制失败:",e)}})},shouldSkipEventTarget:me,onBtnHover:function(e,t,n="top"){if(me(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;J(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){ee()},onCopyHover:function(e){if(me(e.currentTarget))return;const t=y.value?g("common.copied")||"Copied":g("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;J(e.currentTarget,t,"top",!1,o,r.isDark)},toggleExpand:function(){k.value=!k.value;const e=Y.value?O():A(),t=f.value;e&&t&&(k.value?(he(!0),t.style.maxHeight="none",t.style.overflow="visible",ie()):(he(!1),t.style.overflow="auto",ae()))},toggleHeaderCollapse:function(){var e,t,n;if(b.value=!b.value,b.value){if(f.value){const n=Math.ceil((null==(t=(e=f.value).getBoundingClientRect)?void 0:t.call(e).height)||0);n>0&&(T.value=n)}he(!1)}else{k.value&&he(!0),f.value&&null!=T.value&&(f.value.style.height=`${T.value}px`);const e=Y.value?O():A();try{null==(n=null==e?void 0:e.layout)||n.call(e)}catch(o){}j=2,ot(()=>{k.value?ie():ae()})}},previewCode:function(){if(!ue.value)return;const e=x.value;if(v.value){const n="html"===e?"text/html":"image/svg+xml",o="html"===e?g("artifacts.htmlPreviewTitle")||"HTML Preview":g("artifacts.svgPreviewTitle")||"SVG Preview";return void t("previewCode",{node:r.node,artifactType:n,artifactTitle:o,id:`temp-${e}-${Date.now()}`})}"html"===e&&(V.value=!V.value)},setAutomaticLayout:he,runEditorCreation:ve,ensureEditorCreation:ge,stopCreateEditorWatch:fe,getPreferredColorScheme:we,themeUpdate:ye,stopLoadingWatch:xe,stopExpandAutoResize:function(){},PreCodeNode:Pe,HtmlPreviewFrame:lt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return n.usePreCodeRender?t(n.PreCodeNode,{attrs:{node:e.node,loading:n.props.loading}}):t("div",{ref:"container",staticClass:"code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",{"is-rendering":n.props.loading,"is-dark":n.props.isDark}],style:n.containerStyle},[n.props.showHeader?t("div",{staticClass:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",staticStyle:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))","background-color":"var(--vscode-editor-background, var(--markstream-code-fallback-bg))"}},[e._t("header-left",function(){return[t("div",{staticClass:"flex items-center space-x-2 flex-1 overflow-hidden"},[t("span",{staticClass:"icon-slot h-4 w-4 flex-shrink-0",domProps:{innerHTML:e._s(n.languageIcon)}}),t("span",{staticClass:"text-sm font-medium font-mono truncate"},[e._v(e._s(n.displayLanguage))])])]}),e._t("header-right",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isCollapsed},on:{click:n.toggleHeaderCollapse,mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]),n.props.showFontSizeButtons&&n.props.enableFontSizeControl?[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize<=n.codeFontMin},on:{click:function(e){return n.decreaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},focus:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"}})])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!n.fontBaselineReady||n.codeFontSize===n.defaultCodeFontSize},on:{click:function(e){return n.resetCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},focus:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}}),t("path",{attrs:{d:"M3 3v5h5"}})])])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize>=n.codeFontMax},on:{click:function(e){return n.increaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},focus:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"}})])])]:e._e(),n.props.showCopyButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.copyText?n.t("common.copied")||"Copied":n.t("common.copy")||"Copy"},on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExpandButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isExpanded},on:{click:n.toggleExpand,mouseenter:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},focus:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isExpanded?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})])]):e._e(),n.isPreviewable&&n.props.showPreviewButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.t("common.preview")||"Preview"},on:{click:n.previewCode,mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24"}},[t("g",{attrs:{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"}},[t("path",{attrs:{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"}}),t("path",{attrs:{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"}})])])]):e._e()],2)]})],2):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!(n.isCollapsed||!e.stream&&e.loading),expression:"!isCollapsed && (stream ? true : !loading)"}],ref:"codeEditor",staticClass:"code-editor-container",class:[e.stream?"":"code-height-placeholder"]}),n.showInlinePreview&&!n.hasPreviewListener&&n.isPreviewable&&"html"===n.codeLanguage?t(n.HtmlPreviewFrame,{attrs:{code:e.node.code,"is-dark":n.props.isDark,"on-close":()=>n.showInlinePreview=!1}}):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.stream&&e.loading,expression:"!stream && loading"}],staticClass:"code-loading-placeholder"},[e._t("loading",function(){return[t("div",{staticClass:"loading-skeleton"},[t("div",{staticClass:"skeleton-line"}),t("div",{staticClass:"skeleton-line"}),t("div",{staticClass:"skeleton-line short"})])]},{loading:e.loading,stream:e.stream})],2),t("span",{staticClass:"sr-only",attrs:{"aria-live":"polite",role:"status"}},[e._v(e._s(n.copyText?n.t("common.copied")||"Copied":""))])],1)},[],!1,null,"78564fa2",null,null).exports;let ht=null,vt=null;const gt=h(p.defineComponent({__name:"InfographicBlockNode",props:{node:null,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},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(e,{emit:t}){const n=e,{t:o}=ne(),r=p.ref(!1),l=p.ref(!1),i=p.ref(),a=p.ref(!1),s=p.ref("360px"),u=p.ref(!1),d=p.ref(),m=p.ref(null),h=p.ref(1),v=p.ref(0),g=p.ref(0),f=p.ref(!1),w=p.ref({x:0,y:0}),y=p.computed(()=>n.node.code);function x(e){return!e||e.disabled}function M(e){return c(this,null,function*(){try{const n=(new XMLSerializer).serializeToString(e),o=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(o);if("undefined"!=typeof document){const e=document.createElement("a");e.href=r,e.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(t){}URL.revokeObjectURL(r)}}catch(n){console.error("Failed to export SVG:",n)}})}function k(e){"Escape"===e.key&&u.value&&C()}function b(){if(u.value=!0,"undefined"!=typeof document)try{document.body.style.overflow="hidden"}catch(e){}if("undefined"!=typeof window)try{window.addEventListener("keydown",k)}catch(e){}p.nextTick(()=>{if(i.value&&d.value){d.value.innerHTML="";const e=document.createElement("div");e.style.transition="transform 0.1s ease",e.style.transformOrigin="center center",e.style.width="100%",e.style.height="100%",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center";const t=i.value.cloneNode(!0);t.classList.add("fullscreen"),t.style.height="auto",e.appendChild(t),d.value.appendChild(e),m.value=e,e.style.transform=`translate(${v.value}px, ${g.value}px) scale(${h.value})`}})}function C(){if(u.value=!1,d.value&&(d.value.innerHTML=""),m.value=null,"undefined"!=typeof document)try{document.body.style.overflow=""}catch(e){}if("undefined"!=typeof window)try{window.removeEventListener("keydown",k)}catch(e){}}let N=null;function T(){return c(this,null,function*(){var e;if(i.value)try{const t=yield function(){return c(this,null,function*(){return vt||ht||(ht=import("@antv/infographic").then(e=>{const t=e&&e.default?e.default:e;let n=t;return"function"==typeof t&&t.prototype&&t.prototype.render?n=t:e.Infographic?n=e.Infographic:t&&t.Infographic&&(n=t.Infographic),vt=n,n}).catch(e=>(console.warn("Failed to load @antv/infographic",e),null)),ht)})}();if(!t)return void console.warn("Infographic library failed to load.");N&&(null==(e=N.destroy)||e.call(N),N=null),i.value.innerHTML="",N=new t({container:i.value,width:"100%",height:"100%"}),N.render(y.value),p.nextTick(()=>{if(i.value){const e=i.value.scrollHeight;e>0&&(s.value=`${Math.min(e,800)}px`)}})}catch(t){console.error("Failed to render infographic:",t),i.value&&(i.value.innerHTML=`<div class="text-red-500 p-4">Failed to render infographic: ${t instanceof Error?t.message:"Unknown error"}</div>`)}})}p.watch(()=>y.value,()=>{a.value||l.value||p.nextTick(()=>{T()})}),p.watch(()=>a.value,e=>{e||l.value||p.nextTick(()=>{T()})}),p.watch(()=>l.value,e=>{e||a.value||p.nextTick(()=>{T()})}),p.onMounted(()=>{a.value||l.value||p.nextTick(()=>{T()})}),p.onBeforeUnmount(()=>{var e;if(N&&(null==(e=N.destroy)||e.call(N),N=null),"undefined"!=typeof window)try{window.removeEventListener("keydown",k)}catch(t){}});const j=p.computed(()=>n.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"),I=p.computed(()=>a.value||l.value),D=p.computed(()=>({transform:`translate(${v.value}px, ${g.value}px) scale(${h.value})`}));return p.watch(D,e=>{u.value&&m.value&&(m.value.style.transform=e.transform)}),{__sfc:!0,props:n,_emits:t,t:o,copyText:r,isCollapsed:l,infographicContainer:i,showSource:a,containerHeight:s,isModalOpen:u,modalContent:d,modalCloneWrapper:m,zoom:h,translateX:v,translateY:g,isDragging:f,dragStart:w,baseCode:y,shouldSkipEventTarget:x,onBtnHover:function(e,t,o="top"){if(x(e.currentTarget))return;const r=e,l=null!=(null==r?void 0:r.clientX)&&null!=(null==r?void 0:r.clientY)?{x:r.clientX,y:r.clientY}:void 0;J(e.currentTarget,t,o,!1,l,n.isDark)},onBtnLeave:function(){ee()},onCopyHover:function(e){if(x(e.currentTarget))return;const t=r.value?o("common.copied")||"Copied":o("common.copy")||"Copy",l=e,i=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0;J(e.currentTarget,t,"top",!1,i,n.isDark)},copy:function(){return c(this,null,function*(){try{const e=y.value;"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(e)),r.value=!0,setTimeout(()=>{r.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})},handleSwitchMode:function(e){a.value="source"===e},handleExportClick:function(){var e;const t=null==(e=i.value)?void 0:e.querySelector("svg");t?M(t):console.error("SVG element not found")},exportSvg:M,handleKeydown:k,openModal:b,closeModal:C,handleOpenModalClick:function(){b()},zoomIn:function(){h.value<3&&(h.value+=.1)},zoomOut:function(){h.value>.5&&(h.value-=.1)},resetZoom:function(){h.value=1,v.value=0,g.value=0},startDrag:function(e){f.value=!0,e instanceof MouseEvent?w.value={x:e.clientX-v.value,y:e.clientY-g.value}:w.value={x:e.touches[0].clientX-v.value,y:e.touches[0].clientY-g.value}},onDrag:function(e){if(!f.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),v.value=t-w.value.x,g.value=n-w.value.y},stopDrag:function(){f.value=!1},infographicInstance:N,renderInfographic:T,computedButtonStyle:j,isFullscreenDisabled:I,transformStyle:D,infographicIconUrl:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUuNTIiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyOTEgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnPjxwYXRoIGQ9Ik0xNDAuOTA0IDIzOS4zNzZDMTI4LjgzIDIzOS42ODMgMTE5LjY3NSAyMzkuMjk5IDExNS40NDggMjQzLjg0M0MxMTAuOTAyIDI0OC4wNyAxMTEuMjg4IDI1Ny4yMjcgMTEwLjk3OSAyNjkuMzAyQzExMS4xMTggMjc0LjY3NSAxMTEuMTE4IDI3OS40NzggMTExLjQ3MiAyODMuNTJDMTExLjY2MiAyODUuNjM4IDExMS45NSAyODcuNTQ3IDExMi40MDYgMjg5LjIyNEMxMTIuNDExIDI4OS4yNDMgMTEyLjQxNiAyODkuMjU5IDExMi40MjIgMjg5LjI4QzExMi40NjIgMjg5LjQxOSAxMTIuNDk2IDI4OS41NTggMTEyLjUzOSAyODkuNjkxQzExMy4xNjggMjkxLjc4NyAxMTQuMDg4IDI5My40OTEgMTE1LjQ0NiAyOTQuNzU4QzExNi42NjIgMjk2LjA2NCAxMTguMjgzIDI5Ni45NjMgMTIwLjI2NCAyOTcuNjlDMTIwLjM2IDI5Ny42MTQgMTIwLjQ2NCAyOTcuNjQ2IDEyMC41NTUgMjk3LjY3NUMxMjAuNTYgMjk3LjY4IDEyMC41NiAyOTcuNjggMTIwLjU2NiAyOTcuNjhDMTIwLjg0OCAyOTcuNzY4IDEyMS4xNDIgMjk3Ljg0NiAxMjEuNDQzIDI5Ny45MjNDMTIxLjQ1NCAyOTcuOTIzIDEyMS40NjQgMjk3LjkyOCAxMjEuNDc4IDI5Ny45MzRDMTIyLjg3NSAyOTguMjcyIDEyNC40MjQgMjk4LjUwNyAxMjYuMTEgMjk4LjY3OEMxMjYuMzI2IDI5OC42OTYgMTI2LjU0MiAyOTguNzE4IDEyNi43NjMgMjk4LjczOUMxMzAuNzkgMjk5LjA4NiAxMzUuNTU4IDI5OS4wODggMTQwLjkwNCAyOTkuMjIyQzE1Mi45NzQgMjk4LjkxMiAxNjIuMTI4IDI5OS4zMDIgMTY2LjM2IDI5NC43NThDMTcwLjkwNCAyOTAuNTI2IDE3MC41MTUgMjgxLjM3MSAxNzAuODI0IDI2OS4zMDJDMTcwLjUxNSAyNTcuMjI3IDE3MC45MDcgMjQ4LjA3IDE2Ni4zNiAyNDMuODQzQzE2Mi4xMzEgMjM5LjI5OSAxNTIuOTc0IDIzOS42ODMgMTQwLjkwNCAyMzkuMzc2WiIgZmlsbD0iI0ZGNjM3NiI+PC9wYXRoPjxwYXRoIGQ9Ik0yMS4yMTU1IDEyOC4zOThDMTIuNjU1NSAxMjguNjE2IDYuMTY0ODQgMTI4LjMzOSAzLjE2NzUxIDEzMS41NkMtMC4wNTM4MjIyIDEzNC41NiAwLjIxODE3OCAxNDEuMDU0IC0wLjAwMDQ4ODI4MSAxNDkuNjA4QzAuMjE4MTc4IDE1OC4xNjggLTAuMDUzODIyMiAxNjQuNjU5IDMuMTY3NTEgMTY3LjY1NkM2LjE2NDg0IDE3MC44NzggMTIuNjU1NSAxNzAuNjA2IDIxLjIxNTUgMTcwLjgyNEMyNS4wMjYyIDE3MC43MjYgMjguNDI4OCAxNzAuNzI2IDMxLjI5NTUgMTcwLjQ3NUMzMi43OTY4IDE3MC4zNDIgMzQuMTQ4OCAxNzAuMTM2IDM1LjMzODIgMTY5LjgxNEMzNS4zNTQyIDE2OS44MTEgMzUuMzY0OCAxNjkuODA2IDM1LjM3ODIgMTY5LjgwM0MzNS40NzY4IDE2OS43NzQgMzUuNTc1NSAxNjkuNzQ3IDM1LjY2ODggMTY5LjcxOEMzNy4xNTY4IDE2OS4yNzIgMzguMzY0OCAxNjguNjIyIDM5LjI2MzUgMTY3LjY1NkM0MC4xOTE1IDE2Ni43OTUgNDAuODI2MiAxNjUuNjQ2IDQxLjI3MTUgMTY0LjI0M0M0MS4yODc1IDE2NC4xNzQgNDEuMzExNSAxNjQuMTAyIDQxLjMzMjggMTY0LjAzNUM0MS4zMzI4IDE2NC4wMzUgNDEuMzM1NSAxNjQuMDMyIDQxLjMzNTUgMTY0LjAyN0M0MS4zOTY4IDE2My44MjcgNDEuNDUyOSAxNjMuNjIyIDQxLjUwNjIgMTYzLjQwNkM0MS41MDYyIDE2My4zOTggNDEuNTExNSAxNjMuMzkyIDQxLjUxNDIgMTYzLjM4MkM0MS43NTQyIDE2Mi4zOTIgNDEuOTIyMiAxNjEuMjk0IDQyLjA0MjIgMTYwLjA5NkM0Mi4wNTU1IDE1OS45NDQgNDIuMDcxNSAxNTkuNzkyIDQyLjA4NDggMTU5LjYzNUM0Mi4zMzI4IDE1Ni43NzkgNDIuMzMyOCAxNTMuMzk4IDQyLjQyNjIgMTQ5LjYwOEM0Mi4yMDc1IDE0MS4wNTQgNDIuNDg0OCAxMzQuNTYgMzkuMjYzNSAxMzEuNTZDMzYuMjYzNSAxMjguMzM5IDI5Ljc3MjggMTI4LjYxNiAyMS4yMTU1IDEyOC4zOThaIiBmaWxsPSIjRkZDQ0NDIj48L3BhdGg+PHBhdGggZD0iTTgxLjA1OTUgMTg0LjE3MUM3MC44NTY4IDE4NC40MzMgNjMuMTIwOCAxODQuMTAyIDU5LjU0NzUgMTg3Ljk0MkM1NS43MDc1IDE5MS41MTggNTYuMDMyOCAxOTkuMjU0IDU1Ljc3NDIgMjA5LjQ1NEM1Ni4wMzI4IDIxOS42NTcgNTUuNzA3NSAyMjcuMzkzIDU5LjU0NzUgMjMwLjk2M0M2My4xMjA4IDIzNC44MDMgNzAuODU2OCAyMzQuNDc4IDgxLjA1OTUgMjM0LjczOUM4NS42MDA4IDIzNC42MjIgODkuNjU5NSAyMzQuNjIyIDkzLjA3MjggMjM0LjMyM0M5NC44NjQ4IDIzNC4xNjMgOTYuNDc1NSAyMzMuOTIxIDk3Ljg5NDIgMjMzLjUzNEM5Ny45MTAyIDIzMy41MjkgOTcuOTIzNSAyMzMuNTI2IDk3Ljk0MjIgMjMzLjUyMUM5OC4wNTY4IDIzMy40ODYgOTguMTc0MiAyMzMuNDU3IDk4LjI4ODggMjMzLjQyMkMxMDAuMDYgMjMyLjg4OSAxMDEuNSAyMzIuMTEzIDEwMi41NjkgMjMwLjk2M0MxMDMuNjc2IDIyOS45MzcgMTA0LjQzMyAyMjguNTY2IDEwNC45NjQgMjI2Ljg5NEMxMDQuOTg1IDIyNi44MTEgMTA1LjAxMiAyMjYuNzI2IDEwNS4wMzYgMjI2LjY0NkMxMDUuMDQxIDIyNi42NDMgMTA1LjA0MSAyMjYuNjQzIDEwNS4wNDEgMjI2LjYzOEMxMDUuMTE2IDIyNi40MDEgMTA1LjE4IDIyNi4xNTMgMTA1LjI0NCAyMjUuODk3QzEwNS4yNDQgMjI1Ljg4OSAxMDUuMjQ5IDIyNS44ODEgMTA1LjI1NCAyMjUuODY3QzEwNS41NCAyMjQuNjg5IDEwNS43NCAyMjMuMzc5IDEwNS44ODEgMjIxLjk1M0MxMDUuOSAyMjEuNzcxIDEwNS45MTYgMjIxLjU5IDEwNS45MzQgMjIxLjQwM0MxMDYuMjI4IDIxOC4wMDEgMTA2LjIyOCAyMTMuOTY5IDEwNi4zNDIgMjA5LjQ1NEMxMDYuMDgxIDE5OS4yNTQgMTA2LjQxMiAxOTEuNTE4IDEwMi41NzIgMTg3Ljk0MkM5OC45OTU1IDE4NC4xMDIgOTEuMjU2OCAxODQuNDMzIDgxLjA1OTUgMTg0LjE3MVoiIGZpbGw9IiNGRjkzOUYiPjwvcGF0aD48cGF0aCBkPSJNMjYwLjU5MSAxNTEuODdDMjE1LjY1MiAxNTEuODcgMjAzLjAyIDE2NC41MjMgMjAzLjAyIDIwOS40NjJIMTk4LjQ3NkMxOTguNDc2IDE2NC41MjMgMTg1LjgzNiAxNTEuODgxIDE0MC44OTUgMTUxLjg4MVYxNDcuMzM3QzE4NS44MzYgMTQ3LjMzNyAxOTguNDg3IDEzNC43MDUgMTk4LjQ4NyA4OS43NjU5SDIwMy4wMkMyMDMuMDIgMTM0LjcwNSAyMTUuNjUyIDE0Ny4zMzcgMjYwLjU5MSAxNDcuMzM3VjE1MS44N1pNMjg2LjA1MiAxMjQuMTU4QzI4MS44MiAxMTkuNjE0IDI3Mi42NiAxMjAuMDAxIDI2MC41OTEgMTE5LjY4OUMyNDguNTIxIDExOS4zODUgMjM5LjM2MSAxMTkuNzcxIDIzNS4xMjkgMTE1LjIyN0MyMzAuNTg1IDExMC45OTUgMjMwLjk4MyAxMDEuODQ2IDIzMC42NzEgODkuNzY1OUMyMzAuNTEzIDgzLjczMTIgMjMwLjUzNSA3OC40MjcyIDIzMC4wMjMgNzQuMTAxOUMyMjkuNTEzIDY5Ljc2NTkgMjI4LjQ4MSA2Ni40MjE5IDIyNi4yMDkgNjQuMzA0NkMyMjEuOTY3IDU5Ljc2MDYgMjEyLjgxNyA2MC4xNDcyIDIwMC43NDggNTkuODQ1OUMxODguNjgxIDYwLjE0NzIgMTc5LjUxOSA1OS43NjA2IDE3NS4yODcgNjQuMzA0NkMxNzAuNzUzIDY4LjUzNjYgMTcxLjEyOSA3Ny42OTY2IDE3MC44MjggODkuNzY1OUMxNzAuNTE2IDEwMS44MzUgMTcwLjkgMTEwLjk5NSAxNjYuMzU2IDExNS4yMjdDMTYyLjEyNCAxMTkuNzcxIDE1Mi45ODUgMTE5LjM3NCAxNDAuOTA1IDExOS42ODlDMTM4Ljg3MyAxMTkuNzM5IDEzNi45MjQgMTE5Ljc3MSAxMzUuMDcxIDExOS44MTFDMTE5LjMxMyAxMTguNjk3IDEwNi4zMzcgMTEyLjMxOCAxMDYuMzM3IDg5Ljc2NTlDMTA2LjIxMiA4NC42Njk5IDEwNi4yMzMgODAuMTc5MiAxMDUuODA3IDc2LjUyMDZDMTA1LjM2NyA3Mi44NzI2IDEwNC40OTIgNzAuMDM3OSAxMDIuNTc1IDY4LjI1NjZDOTkuMDAxMyA2NC40MTEyIDkxLjI1NzMgNjQuNzQ0NiA4MS4wNjUzIDY0LjQ4MzJDNzAuODYgNjQuNzQ0NiA2My4xMTg2IDY0LjQxMTIgNTkuNTUzMyA2OC4yNTY2QzU1LjcwOCA3MS44Mjk5IDU2LjAzMDYgNzkuNTYzMiA1NS43NjkzIDg5Ljc2NTlDNTYuMDMwNiA5OS45Njg2IDU1LjcwOCAxMDcuNzAyIDU5LjU1MzMgMTExLjI3OEM2My4xMTg2IDExNS4xMTMgNzAuODYgMTE0Ljc5IDgxLjA2NTMgMTE1LjA0OUMxMDMuNjE3IDExNS4wNDkgMTA5Ljk5NiAxMjguMDM1IDExMS4xIDE0My44MDNDMTExLjA2OCAxNDUuNjU5IDExMS4wMjggMTQ3LjU4NyAxMTAuOTc1IDE0OS42MTlDMTExLjEyMSAxNTQuOTg3IDExMS4xMjEgMTU5Ljc5IDExMS40NzYgMTYzLjgzNUMxMTEuNjYzIDE2NS45NSAxMTEuOTQ1IDE2Ny44NTcgMTEyLjQwNCAxNjkuNTM0QzExMi40MTIgMTY5LjU1NSAxMTIuNDEyIDE2OS41NjYgMTEyLjQyMyAxNjkuNTk4QzExMi40NjUgMTY5LjczNCAxMTIuNDk3IDE2OS44NjcgMTEyLjUzNyAxNzAuMDAzQzExMy4xNjQgMTcyLjA5OSAxMTQuMDkyIDE3My44MDkgMTE1LjQ0NyAxNzUuMDdDMTE2LjY2NSAxNzYuMzcxIDExOC4yODEgMTc3LjI3OCAxMjAuMjcxIDE3Ny45MDVDMTIwLjM2NCAxNzcuOTM0IDEyMC40NiAxNzcuOTU1IDEyMC41NjQgMTc3Ljk4N0MxMjAuODU1IDE3OC4wODEgMTIxLjE0NSAxNzguMTUzIDEyMS40MzkgMTc4LjIzOEMxMjEuNDYgMTc4LjIzOCAxMjEuNDcxIDE3OC4yMzggMTIxLjQ3OSAxNzguMjQ5QzEyMi44NzYgMTc4LjU4MiAxMjQuNDIgMTc4LjgyMiAxMjYuMTA4IDE3OC45ODdDMTI2LjMyNyAxNzkuMDA5IDEyNi41NDUgMTc5LjAzIDEyNi43NjQgMTc5LjA1MUMxMzAuNzg4IDE3OS4zOTUgMTM1LjU1OSAxNzkuMzk1IDE0MC45MDUgMTc5LjUyOUMxNTIuOTc1IDE3OS44NDMgMTYyLjEyNCAxNzkuNDU3IDE2Ni4zNTYgMTg0LjAwMUMxNzAuOSAxODguMjMzIDE3MC41MTYgMTk3LjM3MSAxNzAuODI4IDIwOS40NTFDMTcxLjEyOSAyMjEuNTI5IDE3MC43NDMgMjMwLjY4MSAxNzUuMjg3IDIzNC45MUMxNzkuNTE5IDIzOS40NTQgMTg4LjY4MSAyMzkuMDcgMjAwLjc0OCAyMzkuMzcxQzIwNi4xMjcgMjM5LjIzNSAyMTAuOTIxIDIzOS4yMzUgMjE0Ljk3NSAyMzguODgxQzIxNy4wNzkgMjM4LjY5NCAyMTguOTg1IDIzOC40MDMgMjIwLjY3NiAyMzcuOTU1QzIyMC42OTUgMjM3Ljk0NSAyMjAuNzA1IDIzNy45MzQgMjIwLjcyNyAyMzcuOTM0QzIyMC44NzMgMjM3Ljg5MSAyMjAuOTk5IDIzNy44NTkgMjIxLjEzNSAyMzcuODE5QzIyMy4yMjggMjM3LjE5MyAyMjQuOTM3IDIzNi4yNjUgMjI2LjIwOSAyMzQuOTFDMjI3LjUxMSAyMzMuNjkxIDIyOC40MDkgMjMyLjA2NSAyMjkuMDQ0IDIzMC4wOTdDMjI5LjA2NSAyMzAuMDAzIDIyOS4wOTUgMjI5Ljg5OSAyMjkuMTI3IDIyOS44MDNWMjI5Ljc5M0MyMjkuMjIgMjI5LjUxMyAyMjkuMjk1IDIyOS4yMjIgMjI5LjM2NyAyMjguOTE4QzIyOS4zNjcgMjI4Ljg5NyAyMjkuMzc3IDIyOC44OTcgMjI5LjM3NyAyMjguODc4QzIyOS43MjEgMjI3LjQ4MSAyMjkuOTUxIDIyNS45MzcgMjMwLjEyNyAyMjQuMjQ5QzIzMC4xMzcgMjI0LjAzIDIzMC4xNjkgMjIzLjgxMSAyMzAuMTkxIDIyMy41OTNDMjMwLjUzNSAyMTkuNTcxIDIzMC41MzUgMjE0Ljc5OCAyMzAuNjcxIDIwOS40NTFDMjMwLjk3MiAxOTcuMzcxIDIzMC41ODUgMTg4LjIzMyAyMzUuMTI5IDE4NC4wMDFDMjM5LjM2MSAxNzkuNDU3IDI0OC41MTEgMTc5Ljg0MyAyNjAuNTkxIDE3OS41MjlDMjcyLjY2IDE3OS4yMjcgMjgxLjgyIDE3OS42MTQgMjg2LjA1MiAxNzUuMDdDMjkwLjU5NiAxNzAuODM4IDI5MC4yMDkgMTYxLjY4OSAyOTAuNTExIDE0OS42MTlDMjkwLjIwOSAxMzcuNTM5IDI5MC41OTYgMTI4LjM3OSAyODYuMDUyIDEyNC4xNThaIiBmaWxsPSIjRkYzNTZBIj48L3BhdGg+PHBhdGggZD0iTTExMi40MDUgNDkuODQ4QzExMi40MTEgNDkuODY5NCAxMTIuNDE2IDQ5Ljg4MjcgMTEyLjQyMSA0OS45MDRDMTEyLjQ2MSA1MC4wNDI3IDExMi40OTkgNTAuMTgxNCAxMTIuNTM5IDUwLjMxNDdDMTEzLjE3MSA1Mi40MTM0IDExNC4wODggNTQuMTE0NyAxMTUuNDQ4IDU1LjM4NEMxMTYuNjYxIDU2LjY5MDcgMTE4LjI4MyA1Ny41ODk0IDEyMC4yNjQgNTguMjEzNEMxMjAuMzYgNTguMjQgMTIwLjQ2NCA1OC4yNjk0IDEyMC41NTUgNTguMzAxNEMxMjAuNTYgNTguMzA2NyAxMjAuNTYgNTguMzA2NyAxMjAuNTY1IDU4LjMwNjdDMTIwLjg0OCA1OC4zOTQ3IDEyMS4xNDEgNTguNDY5NCAxMjEuNDQzIDU4LjU0NjdDMTIxLjQ1MyA1OC41NDY3IDEyMS40NjQgNTguNTUyIDEyMS40OCA1OC41NTc0QzEyMi44NzUgNTguODk2IDEyNC40MjQgNTkuMTMzNCAxMjYuMTEyIDU5LjMwMTRDMTI2LjMyNSA1OS4zMjI3IDEyNi41NDEgNTkuMzQxNCAxMjYuNzYzIDU5LjM2MjdDMTMwLjc4OSA1OS43MTIgMTM1LjU2IDU5LjcxMiAxNDAuOTA0IDU5Ljg0NTRDMTUyLjk3MyA1OS41Mzg3IDE2Mi4xMjggNTkuOTI4IDE2Ni4zNiA1NS4zODRDMTcwLjkwNyA1MS4xNTIgMTcwLjUxNSA0MS45OTQ3IDE3MC44MjQgMjkuOTI1NEMxNzAuNTE3IDE3Ljg1MDcgMTcwLjkwNyA4LjY5NjAyIDE2Ni4zNjMgNC40NjkzNUMxNjIuMTMxIC0wLjA3NDY1MTEgMTUyLjk3MyAwLjMwOTM0OSAxNDAuOTA0IDEuNTI1ODhlLTA1QzEyOC44MjkgMC4zMDkzNDkgMTE5LjY3NSAtMC4wNzQ2NTExIDExNS40NDggNC40NjkzNUMxMTAuOTA0IDguNjk2MDIgMTExLjI4OCAxNy44NTA3IDExMC45NzkgMjkuOTI1NEMxMTEuMTE3IDM1LjMwMTQgMTExLjExNyA0MC4xMDE0IDExMS40NzIgNDQuMTQ0QzExMS42NjEgNDYuMjYxNCAxMTEuOTQ5IDQ4LjE3MDcgMTEyLjQwNSA0OS44NDhaIiBmaWxsPSIjRkY2Mzc2Ij48L3BhdGg+PC9nPjwvc3ZnPgo=",Portal:rt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":n.props.loading}]},[n.props.showHeader?t("div",{staticClass:"infographic-block-header flex justify-between items-center px-4 py-2.5 border-b",class:n.props.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"},[e.$slots["header-left"]?t("div",[e._t("header-left")],2):t("div",{staticClass:"flex items-center gap-x-2 overflow-hidden"},[t("img",{staticClass:"w-4 h-4 my-0",attrs:{src:n.infographicIconUrl,alt:"Infographic"}}),t("span",{staticClass:"text-sm font-medium font-mono truncate",class:n.props.isDark?"text-gray-400":"text-gray-600"},[e._v("Infographic")])]),e.$slots["header-center"]?t("div",[e._t("header-center")],2):n.props.showModeToggle?t("div",{staticClass:"flex items-center gap-x-1 rounded-md p-0.5",class:n.props.isDark?"bg-gray-700":"bg-gray-100"},[t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"],on:{click:()=>n.handleSwitchMode("preview"),mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center gap-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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"}}),t("circle",{attrs:{cx:"12",cy:"12",r:"3"}})])]),t("span",[e._v(e._s(n.t("common.preview")||"Preview"))])])]),t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"],on:{click:()=>n.handleSwitchMode("source"),mouseenter:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},focus:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center gap-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"}})]),t("span",[e._v(e._s(n.t("common.source")||"Source"))])])])]):e._e(),e.$slots["header-right"]?t("div",[e._t("header-right")],2):t("div",{staticClass:"flex items-center gap-x-1"},[n.props.showCollapseButton?t("button",{class:n.computedButtonStyle,attrs:{"aria-pressed":n.isCollapsed},on:{click:function(e){n.isCollapsed=!n.isCollapsed},mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]):e._e(),n.props.showCopyButton?t("button",{class:n.computedButtonStyle,on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExportButton?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleExportClick,mouseenter:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},focus:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}}),t("path",{attrs:{d:"m7 10l5 5l5-5"}})])])]):e._e(),n.props.showFullscreenButton?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleOpenModalClick,mouseenter:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},focus:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isModalOpen?t("svg",{attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})]):t("svg",{attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})])]):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.isCollapsed,expression:"!isCollapsed"}]},[n.showSource?t("div",{staticClass:"p-4",class:n.props.isDark?"bg-gray-900":"bg-gray-50"},[t("pre",{staticClass:"text-sm font-mono whitespace-pre-wrap",class:n.props.isDark?"text-gray-300":"text-gray-700"},[e._v(e._s(n.baseCode))])]):t("div",{staticClass:"relative"},[n.props.showZoomControls?t("div",{staticClass:"absolute top-2 right-2 z-10 rounded-lg"},[t("div",{staticClass:"flex items-center gap-2 backdrop-blur rounded-lg"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},focus:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},focus:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom,mouseenter:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},focus:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")])])]):e._e(),t("div",{staticClass:"min-h-[360px] relative transition-all duration-100 overflow-hidden block",class:n.props.isDark?"bg-gray-900":"bg-gray-50",style:{height:n.containerHeight},on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},[t("div",{staticClass:"absolute inset-0 cursor-grab",class:{"cursor-grabbing":n.isDragging},style:n.transformStyle},[t("div",{ref:"infographicContainer",staticClass:"w-full text-center flex items-center justify-center min-h-full"})])])])]),t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue"},[t("transition",{attrs:{name:"infographic-dialog",appear:""}},[n.isModalOpen?t("div",{staticClass:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",on:{click:function(e){return e.target!==e.currentTarget?null:n.closeModal.apply(null,arguments)}}},[t("div",{staticClass:"dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",class:n.props.isDark?"bg-gray-900":"bg-white"},[t("div",{staticClass:"absolute top-6 right-6 z-50 flex items-center gap-2"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")]),t("button",{staticClass:"inline-flex items-center justify-center p-2 rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.closeModal}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"}})])])]),t("div",{ref:"modalContent",staticClass:"w-full h-full flex items-center justify-center p-4 overflow-hidden",class:{"cursor-grab":!n.isDragging,"cursor-grabbing":n.isDragging},on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}})])]):e._e()])],1)])],1)},[],!1,null,"c97dc3fc",null,null).exports,ft=h(p.defineComponent({__name:"MarkdownCodeBlockNode",props:{node:{type:Object,required:!0},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{type:String,default:"vitesse-dark"},lightTheme:{type:String,default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{type:[String,Number],default:void 0},maxWidth:{type:[String,Number],default:void 0},themes:{type:Array,default:void 0},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}},emits:["previewCode","copy"],setup(e,{emit:t}){var n,o;const r=e,{t:l}=ne(),i=p.ref(String(null!=(n=r.node.language)?n:"")),a=p.ref(!1),s=p.ref(!1),u=p.ref(!1),d=p.ref(null),h=p.ref(null),v=p.ref(""),g=p.ref(!1);let f;const w=p.ref(!0),y=p.ref(0),x=p.ref(14),M=p.ref(x.value),k=p.computed(()=>{const e=x.value,t=M.value;return"number"==typeof e&&Number.isFinite(e)&&e>0&&"number"==typeof t&&Number.isFinite(t)&&t>0}),b=p.computed(()=>{const e=i.value.trim().toLowerCase();return nt[e]||e.charAt(0).toUpperCase()+e.slice(1)}),C=p.computed(()=>tt(i.value.trim().toLowerCase().split(":")[0])),N=p.computed(()=>{const e=i.value.trim().toLowerCase();return r.isShowPreview&&("html"===e||"svg"===e)}),T=p.computed(()=>{const e={},t=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},n=t(r.minWidth),o=t(r.maxWidth);return n&&(e.minWidth=n),o&&(e.maxWidth=o),e}),j=p.computed(()=>({fontSize:`${M.value}px`}));function I(){return r.isDark?r.darkTheme:r.lightTheme}function D(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function L(e){if(null==f||f.disconnect(),f=void 0,!e)return v.value="",void(g.value=!1);v.value=`<pre class="shiki shiki-fallback"><code>${D(e)}</code></pre>`,g.value=!1}function _(){v.value="",g.value=!0}function E(){var e;const t=h.value;return!!t&&(t.childNodes.length>0||Boolean(null==(e=t.textContent)?void 0:e.trim().length))}function S(){return c(this,null,function*(){if(yield p.nextTick(),E())return void _();const e=h.value;e&&(null==f||f.disconnect(),f=new MutationObserver(()=>{E()&&(_(),null==f||f.disconnect(),f=void 0)}),f.observe(e,{childList:!0,subtree:!0}))})}let B,z,A,O;const R=new Set,P=new Set,H=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("exports.js",document.baseURI).href}&&Boolean(null==(o={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:o.DEV);function U(e,t=!1){var n;const[o]=String(null!=e?e:"").split(":"),r=null!=(n=null==o?void 0:o.trim().toLowerCase())?n:"";return r?!O||O.has(r)?r:(t&&H&&!R.has(r)&&(R.add(r),console.warn(`[MarkdownCodeBlockNode] Language "${r}" not preloaded in stream-markdown; falling back to plaintext.`)),"plaintext"):"plaintext"}function $(e,t){return c(this,null,function*(){if(!B)return;const n=U(t,Boolean(e&&e.length));try{yield B.updateCode(e,n)}catch(o){"plaintext"!==n?(H&&!P.has(n)&&(P.add(n),console.warn(`[MarkdownCodeBlockNode] Failed to render language "${n}", retrying as plaintext.`,o)),yield B.updateCode(e,"plaintext")):H&&console.warn("[MarkdownCodeBlockNode] Failed to render code block even as plaintext.",o)}})}function Y(){return c(this,null,function*(){if(!z)try{const e=yield import("stream-markdown");z=e.createShikiStreamRenderer,A=e.registerHighlight;const t=Array.isArray(e.defaultLanguages)?e.defaultLanguages:void 0;O=t?new Set(t.map(e=>e.toLowerCase())):void 0,null==A||A({themes:r.themes})}catch(e){console.warn("[MarkdownCodeBlockNode] stream-markdown not available:",e)}})}function F(){return c(this,null,function*(){yield Y(),d.value&&h.value?(null==A||A({themes:r.themes}),!B&&z&&(B=z(h.value,{theme:I()}),g.value=!0),B?!1===r.stream&&r.loading?L(r.node.code):(L(r.node.code),yield $(r.node.code,i.value),yield S()):L(r.node.code)):L(r.node.code)})}function V(e,t=50){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function Q(e){return!e||e.disabled}return F(),p.onMounted(()=>{F()}),p.watch(()=>r.themes,()=>c(this,null,function*(){A&&A({themes:r.themes})})),p.watch(()=>r.loading,e=>{e||F()}),p.watch(()=>[r.node.code,r.node.language],e=>c(this,[e],function*([e,t]){t!==i.value&&(i.value=t.trim()),d.value&&h.value?(B||(L(e),yield F()),B&&e&&(!1===r.stream&&r.loading||(L(e),yield $(e,t),yield S()))):L(e)})),p.watch(()=>[r.darkTheme,r.lightTheme],()=>c(this,null,function*(){d.value&&h.value&&(B||(yield F()),null==B||B.setTheme(I()))})),p.watch(()=>r.node.code,()=>c(this,null,function*(){if(s.value||!w.value)return;yield p.nextTick();const e=d.value;e&&e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})),{__sfc:!0,props:r,emits:t,t:l,codeLanguage:i,copyText:a,isExpanded:s,isCollapsed:u,codeBlockContent:d,rendererTarget:h,fallbackHtml:v,rendererReady:g,renderObserver:f,autoScrollEnabled:w,lastScrollTop:y,codeFontMin:10,codeFontMax:36,codeFontStep:1,defaultCodeFontSize:x,codeFontSize:M,fontBaselineReady:k,displayLanguage:b,languageIcon:C,isPreviewable:N,containerStyle:T,contentStyle:j,getPreferredColorScheme:I,escapeHtml:D,renderFallback:L,clearFallback:_,hasRendererContent:E,clearFallbackWhenRendererReady:S,renderer:B,createShikiRenderer:z,registerHighlight:A,registeredHighlightLanguages:O,warnedMissingLanguages:R,warnedRendererErrors:P,isDevEnv:H,normalizeRendererLanguage:U,updateRendererWithFallback:$,ensureStreamMarkdownLoaded:Y,initRenderer:F,isAtBottom:V,handleScroll:function(){const e=d.value;if(!e||s.value)return;const t=e.scrollTop;t<y.value?w.value=!1:V(e)&&(w.value=!0),y.value=t},copy:function(){return c(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(r.node.code)),a.value=!0,t("copy",r.node.code),setTimeout(()=>{a.value=!1},1e3)}catch(e){console.error("Copy failed:",e)}})},shouldSkipEventTarget:Q,onBtnHover:function(e,t,n="top"){if(Q(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;J(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){ee()},onCopyHover:function(e){if(Q(e.currentTarget))return;const t=a.value?l("common.copied")||"Copied":l("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;J(e.currentTarget,t,"top",!1,o,r.isDark)},toggleExpand:function(){s.value=!s.value;const e=d.value;e&&(s.value?(e.style.maxHeight="none",e.style.overflow="visible"):(e.style.maxHeight="500px",e.style.overflow="auto",w.value=!0,p.nextTick(()=>{e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})))},toggleHeaderCollapse:function(){u.value=!u.value},increaseCodeFont:function(){const e=Math.min(36,M.value+1);M.value=e},decreaseCodeFont:function(){const e=Math.max(10,M.value-1);M.value=e},resetCodeFont:function(){M.value=x.value},previewCode:function(){if(!N.value)return;const e=(i.value||r.node.language).toLowerCase(),n="html"===e?"HTML Preview":"SVG Preview";t("previewCode",{type:"html"===e?"text/html":"image/svg+xml",content:r.node.code,title:n})}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",n.props.isDark?"is-dark":""],style:n.containerStyle},[n.props.showHeader?t("div",{staticClass:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",staticStyle:{color:"var(--vscode-editor-foreground)","background-color":"var(--vscode-editor-background)"}},[e._t("header-left",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("span",{staticClass:"icon-slot h-4 w-4 flex-shrink-0",domProps:{innerHTML:e._s(n.languageIcon)}}),t("span",{staticClass:"text-sm font-medium font-mono"},[e._v(e._s(n.displayLanguage))])])]}),e._t("header-right",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isCollapsed},on:{click:n.toggleHeaderCollapse,mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]),n.props.showFontSizeButtons&&n.props.enableFontSizeControl?[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize<=n.codeFontMin},on:{click:function(e){return n.decreaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},focus:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"}})])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!n.fontBaselineReady||n.codeFontSize===n.defaultCodeFontSize},on:{click:function(e){return n.resetCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},focus:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}}),t("path",{attrs:{d:"M3 3v5h5"}})])])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize>=n.codeFontMax},on:{click:function(e){return n.increaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},focus:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"}})])])]:e._e(),n.props.showCopyButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.copyText?n.t("common.copied")||"Copied":n.t("common.copy")||"Copy"},on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExpandButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isExpanded},on:{click:n.toggleExpand,mouseenter:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},focus:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isExpanded?t("svg",{attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})]):t("svg",{attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})])]):e._e(),n.isPreviewable&&n.props.showPreviewButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.t("common.preview")||"Preview"},on:{click:n.previewCode,mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{"data-v-3d59cc65":"",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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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"}}),t("circle",{attrs:{cx:"12",cy:"12",r:"3"}})])])]):e._e()],2)]})],2):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!(n.isCollapsed||!e.stream&&e.loading),expression:"!isCollapsed && (stream ? true : !loading)"}],ref:"codeBlockContent",staticClass:"code-block-content",style:n.contentStyle,on:{scroll:n.handleScroll}},[t("div",{ref:"rendererTarget",staticClass:"code-block-render"}),n.rendererReady?e._e():t("div",{staticClass:"code-fallback-plain",domProps:{innerHTML:e._s(n.fallbackHtml)}})]),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.stream&&e.loading,expression:"!stream && loading"}],staticClass:"code-loading-placeholder"},[e._t("loading",function(){return[e._m(0)]},{loading:e.loading,stream:e.stream})],2)])},[function(){var e=this._self._c;return this._self._setupProxy,e("div",{staticClass:"loading-skeleton"},[e("div",{staticClass:"skeleton-line"}),e("div",{staticClass:"skeleton-line"}),e("div",{staticClass:"skeleton-line short"})])}],!1,null,"a2d5140c",null,null).exports;let wt=null,yt=null,xt=!1;const Mt=new Map,kt=new Map;let bt=5;const Ct=new Set;function Nt(){if(Mt.size<bt&&Ct.size){const t=Array.from(Ct);Ct.clear();for(const n of t)try{n()}catch(e){}}}let Tt=null;const jt=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("exports.js",document.baseURI).href}&&Boolean(null==(e={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:e.DEV);try{"undefined"!=typeof window&&jt&&Promise.resolve().then(()=>require("./performance-monitor.js")).then(e=>{Tt=e.perfMonitor})}catch(sn){}function It(e,t=!0,n=2e3,o){return c(this,null,function*(){const r=performance.now();if(!me()){const e=new Error("KaTeX rendering disabled");return e.name="KaTeXDisabled",e.code="KATEX_DISABLED",Promise.reject(e)}if(yt)return Promise.reject(yt);const l=`${t?"d":"i"}:${e}`,i=kt.get(l);if(i)return Tt&&Tt.recordRender({type:"cache-hit",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!0}),Promise.resolve(i);const a=wt||(yt=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),yt.name="WorkerInitError",yt.code="WORKER_INIT_ERROR",null);if(!a)return Promise.reject(yt);if(Mt.size>=bt){const t=new Error("Worker busy");return t.name="WorkerBusy",t.code="WORKER_BUSY",t.busy=!0,t.inFlight=Mt.size,t.max=bt,Tt&&Tt.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:"busy"}),Promise.reject(t)}return new Promise((l,i)=>{if(null==o?void 0:o.aborted){const e=new Error("Aborted");return e.name="AbortError",void i(e)}const s=Math.random().toString(36).slice(2),u=globalThis.setTimeout(()=>{Mt.delete(s);const t=new Error("Worker render timed out");t.name="WorkerTimeout",t.code="WORKER_TIMEOUT",Tt&&Tt.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:"timeout"}),i(t),Nt()},n);o&&o.addEventListener("abort",()=>{globalThis.clearTimeout(u),Mt.has(s)&&Mt.delete(s);const e=new Error("Aborted");e.name="AbortError",i(e),Nt()},{once:!0});const c=l,d=i;Mt.set(s,{resolve:t=>{Tt&&Tt.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!0}),c(t)},reject:t=>{Tt&&Tt.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:(null==t?void 0:t.message)||String(t)}),d(t)},timeoutId:u}),a.postMessage({id:s,content:e,displayMode:t})})})}function Dt(e,t=!0,n){const o=`${t?"d":"i"}:${e}`;if(kt.set(o,n),kt.size>200){const e=kt.keys().next().value;kt.delete(e)}}const Lt="WORKER_BUSY";function _t(e=2e3,t){return Mt.size<bt?Promise.resolve():new Promise((n,o)=>{let r,l=!1;const i=()=>{l||(l=!0,r&&globalThis.clearTimeout(r),Ct.delete(i),n())};if(Ct.add(i),r=globalThis.setTimeout(()=>{if(l)return;l=!0,Ct.delete(i);const e=new Error("Wait for worker slot timed out");e.name="WorkerBusyTimeout",e.code="WORKER_BUSY_TIMEOUT",o(e)},e),queueMicrotask(()=>Nt()),t){const e=()=>{if(l)return;l=!0,r&&globalThis.clearTimeout(r),Ct.delete(i);const e=new Error("Aborted");e.name="AbortError",o(e)};t.aborted?e():t.addEventListener("abort",e,{once:!0})}})}const Et={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function St(e){return c(this,arguments,function*(e,t=!0,n={}){var o,r,l,i;if(!me()){const e=new Error("KaTeX rendering disabled");throw e.name="KaTeXDisabled",e.code="KATEX_DISABLED",e}const a=null!=(o=n.timeout)?o:Et.timeout,s=null!=(r=n.waitTimeout)?r:Et.waitTimeout,u=null!=(l=n.backoffMs)?l:Et.backoffMs,c=null!=(i=n.maxRetries)?i:Et.maxRetries,d=n.signal;let p=0;for(;;){if(null==d?void 0:d.aborted){const e=new Error("Aborted");throw e.name="AbortError",e}try{return yield It(e,t,a,d)}catch(m){if((null==m?void 0:m.code)!==Lt||p>=c)throw m;if(p++,yield _t(s,d).catch(()=>{}),null==d?void 0:d.aborted){const e=new Error("Aborted");throw e.name="AbortError",e}u>0&&(yield new Promise(e=>globalThis.setTimeout(e,u*p)))}}})}const Bt=h(p.defineComponent({__name:"MathBlockNode",props:{node:null},setup(e){const t=e,n=p.ref(null),o=p.ref(null);let r=!1,l=0,i=!1,a=null;const s=re();let u=null;const d=p.ref(!0);function m(){return c(this,null,function*(){if(!o.value||i)return;if(!t.node.content)return d.value=!1,o.value.textContent=t.node.raw,void(r=!0);if(!r)try{!u&&n.value&&(u=s(n.value)),yield null==u?void 0:u.whenVisible}catch(sn){}a&&(a.abort(),a=null);const e=++l,p=new AbortController;a=p,St(t.node.content,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:p.signal}).then(t=>{i||e!==l||o.value&&(o.value.innerHTML=t,r=!0,d.value=!1)}).catch(n=>c(this,null,function*(){if(i||e!==l)return;if(!o.value)return;const a=(null==n?void 0:n.code)||(null==n?void 0:n.name),s="KATEX_DISABLED"===a;if("WORKER_INIT_ERROR"===a||(null==n?void 0:n.fallbackToRenderer)||a===Lt||"WORKER_TIMEOUT"===a){const e=yield he();if(e){try{const n=e.renderToString(t.node.content,{throwOnError:t.node.loading,displayMode:!0});o.value.innerHTML=n,r=!0,d.value=!1,Dt(t.node.content,!0,n)}catch(sn){}return}}if(s)return d.value=!1,void(o.value.textContent=t.node.raw);r||(d.value=!0),t.node.loading||(d.value=!1,o.value.textContent=t.node.raw)}))})}return p.watch(()=>t.node.content,()=>{m()}),p.onMounted(()=>{m()}),p.onBeforeUnmount(()=>{var e;i=!0,a&&(a.abort(),a=null),null==(e=null==u?void 0:u.destroy)||e.call(u),u=null}),{__sfc:!0,props:t,containerEl:n,mathBlockElement:o,hasRenderedOnce:r,currentRenderId:l,isUnmounted:i,currentAbortController:a,registerVisibility:s,visibilityHandle:u,renderingLoading:d,renderMath:m}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{ref:"containerEl",staticClass:"math-block text-center overflow-x-auto relative min-h-[40px]"},[t("transition",{attrs:{name:"math-fade"}},[n.renderingLoading?t("div",{staticClass:"math-loading-overlay"},[t("div",{staticClass:"math-loading-spinner"})]):e._e()]),t("div",{ref:"mathBlockElement",class:{"math-rendering":n.renderingLoading}})],1)},[],!1,null,"83ce9de4",null,null).exports,zt=h(p.defineComponent({__name:"MathInlineNode",props:{node:null},setup(e){const t=e,n=p.ref(null),o=p.ref(null);let r=!1,l=0,i=!1,a=null;const s=p.ref(!0),u=re();let d=null;function m(){return c(this,null,function*(){if(!o.value||i)return;if(!t.node.content)return s.value=!1,o.value.textContent=t.node.raw,void(r=!0);a&&(a.abort(),a=null);const e=++l,p=new AbortController;if(a=p,!r)try{!d&&n.value&&(d=u(n.value)),yield null==d?void 0:d.whenVisible}catch(sn){}St(t.node.content,!1,{timeout:1500,waitTimeout:0,maxRetries:0,signal:p.signal}).then(t=>{i||e!==l||o.value&&(o.value.innerHTML=t,s.value=!1,r=!0)}).catch(n=>c(this,null,function*(){if(i||e!==l)return;if(!o.value)return;const a=(null==n?void 0:n.code)||(null==n?void 0:n.name),u="KATEX_DISABLED"===a;if("WORKER_INIT_ERROR"===a||(null==n?void 0:n.fallbackToRenderer)||a===Lt||"WORKER_TIMEOUT"===a){const e=yield he();if(e){try{const n=e.renderToString(t.node.content,{throwOnError:t.node.loading,displayMode:!1});s.value=!1,o.value.innerHTML=n,r=!0,Dt(t.node.content,!1,n)}catch(sn){}return}}if(u)return s.value=!1,void(o.value.textContent=t.node.raw);r||(s.value=!u),t.node.loading?u&&(o.value.textContent=t.node.raw):(s.value=!1,o.value.textContent=t.node.raw)}))})}return p.watch(()=>t.node.content,()=>{m()}),p.onMounted(()=>{m()}),p.onBeforeUnmount(()=>{var e;i=!0,a&&(a.abort(),a=null),null==(e=null==d?void 0:d.destroy)||e.call(d),d=null}),{__sfc:!0,props:t,containerEl:n,mathElement:o,hasRenderedOnce:r,currentRenderId:l,isUnmounted:i,currentAbortController:a,renderingLoading:s,registerVisibility:u,visibilityHandle:d,renderMath:m}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("span",{ref:"containerEl",staticClass:"math-inline-wrapper"},[t("span",{directives:[{name:"show",rawName:"v-show",value:!n.renderingLoading,expression:"!renderingLoading"}],ref:"mathElement",staticClass:"math-inline"}),n.renderingLoading?t("transition",{attrs:{name:"table-node-fade"}},[t("span",{staticClass:"math-inline__loading",attrs:{role:"status","aria-live":"polite"}},[e._t("loading",function(){return[t("span",{staticClass:"math-inline__spinner animate-spin",attrs:{"aria-hidden":"true"}}),t("span",{staticClass:"sr-only"},[e._v("Loading")])]},{isLoading:n.renderingLoading})],2)]):e._e()],1)},[],!1,null,"65c5e97c",null,null).exports,At=()=>import("mermaid");let Ot=null,Rt=At;function Pt(e){Rt=e,Ot=null}function Ht(){return"function"==typeof Rt}function Ut(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&("function"==typeof t.render||"function"==typeof t.parse||"function"==typeof t.initialize))return t;if(t&&t.mermaidAPI&&("function"==typeof t.mermaidAPI.render||"function"==typeof t.mermaidAPI.parse)){const e=t.mermaidAPI;return u(s({},t),{render:e.render.bind(e),parse:e.parse?e.parse.bind(e):void 0,initialize:n=>"function"==typeof t.initialize?t.initialize(n):e.initialize?e.initialize(n):void 0})}return e.mermaid&&"function"==typeof e.mermaid.render?e.mermaid:t}function $t(e){if(e)try{const t=null==e?void 0:e.initialize;e.initialize=n=>{const o=s({suppressErrorRendering:!0},n||{});return"function"==typeof t?t.call(e,o):(null==e?void 0:e.mermaidAPI)&&"function"==typeof e.mermaidAPI.initialize?e.mermaidAPI.initialize(o):void 0}}catch(sn){}}let Yt=null,Ft=null;const Vt=new Map;let Qt=5,Wt=!1;const Kt="WORKER_BUSY",Xt="MERMAID_DISABLED";function qt(e,t,n=1400){if(!Ht()){const e=new Error("Mermaid rendering disabled");return e.name="MermaidDisabled",e.code=Xt,Promise.reject(e)}if(Ft)return Promise.reject(Ft);const o=Yt||(Ft=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Ft.name="WorkerInitError",Ft.code="WORKER_INIT_ERROR",null);if(!o)return Promise.reject(Ft);if(Vt.size>=Qt){const e=new Error("Worker busy");return e.name="WorkerBusy",e.code=Kt,e.inFlight=Vt.size,e.max=Qt,Promise.reject(e)}return new Promise((r,l)=>{const i=Math.random().toString(36).slice(2);let a,s=!1;const u=()=>{s||(s=!0,null!=a&&globalThis.clearTimeout(a),Vt.delete(i))},c={resolve:e=>{u(),r(e)},reject:e=>{u(),l(e)}};Vt.set(i,c);try{o.postMessage({id:i,action:e,payload:t})}catch(d){return Vt.delete(i),void l(d)}a=globalThis.setTimeout(()=>{const e=new Error("Worker call timed out");e.name="WorkerTimeout",e.code="WORKER_TIMEOUT";const t=Vt.get(i);t&&t.reject(e)},n)})}function Zt(e,t,n=1400){return c(this,null,function*(){try{return yield qt("canParse",{code:e,theme:t},n)}catch(sn){return Promise.reject(sn)}})}function Gt(e,t,n=1400){return c(this,null,function*(){try{return yield qt("findPrefix",{code:e,theme:t},n)}catch(sn){return Promise.reject(sn)}})}function Jt(){if(Yt)try{for(const[e,t]of Vt.entries())t.reject(new Error("Worker terminated"));Vt.clear(),Yt.terminate()}finally{Yt=null}}const en=h(p.defineComponent({__name:"MermaidBlockNode",props:{node:null,maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},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:!1}},emits:["copy","export","openModal","toggleMode"],setup(e,{emit:t}){var n,o;const r=e,l={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},i=p.ref(!1),a=p.computed(()=>r.isStrict?"strict":"loose"),d=p.computed(()=>({startOnLoad:!1,securityLevel:a.value,dompurifyConfig:"strict"===a.value?l:void 0,flowchart:"strict"===a.value?{htmlLabels:!1}:void 0}));function h(e){return e.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}const v=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],g=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function f(e){if(!e)return"";const t=e.trim();return g.test(t)?t:""}function w(e){const t=new Set(["script"]),n=[e,...Array.from(e.querySelectorAll("*"))];for(const o of n){if(t.has(o.tagName.toLowerCase())){o.remove();continue}const e=Array.from(o.attributes);for(const t of e){const e=t.name;if(/^on/i.test(e))o.removeAttribute(e);else{if("style"===e&&t.value){const n=t.value;if(v.some(e=>e.test(n))){o.removeAttribute(e);continue}}if(("href"===e||"xlink:href"===e)&&t.value){const n=f(t.value);if(!n){o.removeAttribute(e);continue}n!==t.value&&o.setAttribute(e,n)}}}}}function y(e){if("undefined"==typeof window||"undefined"==typeof DOMParser)return null;if(!e)return null;const t=h(e),n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(!n||"svg"!==n.nodeName.toLowerCase())return null;const o=n;return w(o),o}function x(e,t){if(!e)return"";try{e.replaceChildren()}catch(sn){e.innerHTML=""}const n=y(t);return n?(e.appendChild(n),e.innerHTML):""}function M(e){if(e)try{e.replaceChildren()}catch(sn){e.innerHTML=""}}function k(e,t){if(!e)return"";if("strict"===a.value)return x(e,t);try{e.replaceChildren()}catch(sn){e.innerHTML=""}if(t)try{e.insertAdjacentHTML("afterbegin",t)}catch(sn){e.innerHTML=t}return e.innerHTML}const{t:b}=ne();function C(){return c(this,null,function*(){try{const e=yield function(){return c(this,null,function*(){if(Ot)return Ot;const e=function(){try{const e=globalThis;return Ut(null==e?void 0:e.mermaid)}catch(sn){return null}}();if(e)return Ot=e,$t(Ot),Ot;const t=Rt;if(!t)return null;let n;try{n=yield t()}catch(o){if(t===At)throw new Error('Optional dependency "mermaid" is not installed. Please install it to enable mermaid diagrams.');throw o}return n?(Ot=Ut(n),$t(Ot),Ot):null})}();return i.value=!!e,e}catch(e){throw i.value=!1,e}})}"undefined"!=typeof window&&(()=>{c(this,null,function*(){var e;try{const t=yield C();if(!t)return;null==(e=null==t?void 0:t.initialize)||e.call(t,s({},d.value))}catch(t){i.value=!1,console.warn("[markstream-vue2] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",t)}})})();const N=p.ref(!1),T=p.ref(!1),j=p.ref(),I=p.ref(),D=p.ref(),L=p.ref(null),_=re();let E=null;const S=p.ref("undefined"==typeof window),B=p.ref(),z=p.computed(()=>r.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function A(e,t=z.value){const n=t,o=`%%{init: {"theme": "${"dark"===e?"dark":"default"}"}}%%\n`;return n.trim().startsWith("%%{")?n:o+n}const O=p.ref(1),R=p.ref(0),P=p.ref(0),H=p.ref(!1),U=p.ref({x:0,y:0}),$=p.ref(!1),Y=p.ref(!1),F=p.ref(!1),V=p.ref(null),Q=p.ref(0),W=p.ref(!1);let K=null,X=null,q=0;const Z=null!=(n=globalThis.requestIdleCallback)?n:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),G=Ye(()=>{Z(()=>{qe()},{timeout:500})},300);function te(){null!=X&&(globalThis.clearTimeout(X),X=null)}function oe(e=600){if("undefined"==typeof globalThis)return;const t=Math.max(0,e);te(),X=globalThis.setTimeout(()=>{X=null,r.loading||F.value||!S.value?oe(Math.min(1200,Math.max(300,1.2*t))):G()},t)}const le=p.ref("360px");let ie=null;const ae=p.ref(!1),se=p.ref(!1),ue=p.ref({}),ce=p.ref(null),de=p.ref(""),pe=p.ref(0);let me=null;const he=p.ref(!1),ve=p.ref({zoom:1,translateX:0,translateY:0,containerHeight:"360px"}),ge=p.computed(()=>r.enableWheelZoom?{wheel:Ve}:{}),fe=p.computed(()=>{var e,t,n,o;return{worker:null!=(e=r.workerTimeoutMs)?e:1400,parse:null!=(t=r.parseTimeoutMs)?t:1800,render:null!=(n=r.renderTimeoutMs)?n:2500,fullRender:null!=(o=r.fullRenderTimeoutMs)?o:4e3}}),we=null!=(o=globalThis.cancelIdleCallback)?o:e=>clearTimeout(e);let ye=null,xe=null,Me=!1,ke=800,be=null,Ce=0,Ne=!0;function Te(e,t){const n=null==t?void 0:t.timeoutMs,o=null==t?void 0:t.signal;if(null==o?void 0:o.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,l=!1,i=null;return new Promise((t,a)=>{const s=()=>{null!=r&&clearTimeout(r),i&&o&&o.removeEventListener("abort",i)};n&&n>0&&(r=globalThis.setTimeout(()=>{l||(l=!0,s(),a(new Error("Operation timed out")))},n)),o&&(i=()=>{l||(l=!0,s(),a(new DOMException("Aborted","AbortError")))},o.addEventListener("abort",i)),e().then(e=>{l||(l=!0,s(),t(e))}).catch(e=>{l||(l=!0,s(),a(e))})})}function je(e){if("undefined"==typeof document)return;if(!I.value)return;const t=document.createElement("div");t.className="text-red-500 p-4",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),M(I.value),I.value.appendChild(t),le.value="360px",he.value=!0,Ze()}function Ie(e){const t="string"==typeof e?e:"string"==typeof(null==e?void 0:e.message)?e.message:"";return"string"==typeof t&&/timed out/i.test(t)}function De(e){return!e||e.disabled}function Le(e,t){const n=`%%{init: {"theme": "${"dark"===t?"dark":"default"}"}}%%\n`;return e.trimStart().startsWith("%%{")?e:n+e}function _e(){return Ne&&!$.value&&!ae.value&&!he.value}function Ee(e){const t=e.split(/\r?\n/);for(;t.length>0;){const e=t[t.length-1].trimEnd();if(""!==e){if(!(/^[-=~>|<\s]+$/.test(e.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(e)||/[-|><]$/.test(e)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(e)))break;t.pop()}else t.pop()}return t.join("\n")}function Se(e,t,n){return c(this,null,function*(){var o,r;const l=yield C();if(!l)return;const i=l,a=Le(e,t);if("function"==typeof i.parse)return yield Te(()=>i.parse(a),{timeoutMs:null!=(o=null==n?void 0:n.timeoutMs)?o:fe.value.parse,signal:null==n?void 0:n.signal}),!0;const s=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return yield Te(()=>l.render(s,a),{timeoutMs:null!=(r=null==n?void 0:n.timeoutMs)?r:fe.value.render,signal:null==n?void 0:n.signal}),!0})}function Be(e,t,n){return c(this,null,function*(){var o;try{return yield Zt(e,t,null!=(o=null==n?void 0:n.timeoutMs)?o:fe.value.worker)}catch(sn){return yield Se(e,t,n)}})}function ze(e,t,n){return c(this,null,function*(){var o;try{if(yield Be(e,t,n))return{fullOk:!0,prefixOk:!1}}catch(sn){if("AbortError"===(null==sn?void 0:sn.name))throw sn}let r=Ee(e);if(r&&r.trim()&&r!==e)try{try{const l=yield Gt(e,t,null!=(o=null==n?void 0:n.timeoutMs)?o:fe.value.worker);l&&l.trim()&&(r=l)}catch(sn){}if(yield Be(r,t,n))return{fullOk:!1,prefixOk:!0,prefix:r}}catch(sn){if("AbortError"===(null==sn?void 0:sn.name))throw sn}return{fullOk:!1,prefixOk:!1}})}"undefined"!=typeof window&&p.watch(()=>j.value,e=>{if(null==E||E.destroy(),E=null,!e)return void(S.value=!1);const t=_(e,{rootMargin:"400px"});E=t,S.value=t.isVisible.value,t.whenVisible.then(()=>{S.value=!0})},{immediate:!0}),p.onBeforeUnmount(()=>{null==E||E.destroy(),E=null});const Ae=p.computed(()=>$.value||F.value||T.value);function Oe(e){if(!j.value||!I.value)return;const t=I.value.querySelector("svg");if(!t)return;let n=0,o=0;const r=t.getAttribute("viewBox"),l=t.getAttribute("width"),i=t.getAttribute("height");if(r){const e=r.split(" ");4===e.length&&(n=Number.parseFloat(e[2]),o=Number.parseFloat(e[3]))}if(n&&o||l&&i&&(n=Number.parseFloat(l),o=Number.parseFloat(i)),Number.isNaN(n)||Number.isNaN(o)||n<=0||o<=0)try{const e=t.getBBox();e&&e.width>0&&e.height>0&&(n=e.width,o=e.height)}catch(sn){return void console.error("Failed to get SVG BBox:",sn)}if(n>0&&o>0){const t=o/n;let r=(null!=e?e:j.value.clientWidth)*t;r>o&&(r=o),le.value=`${r}px`}}const Re=p.ref(!1),Pe=p.computed(()=>({transform:`translate(${R.value}px, ${P.value}px) scale(${O.value})`}));function He(e){"Escape"===e.key&&Re.value&&$e()}function Ue(){if(Re.value=!0,"undefined"!=typeof document)try{document.body.style.overflow="hidden"}catch(sn){}if("undefined"!=typeof window)try{window.addEventListener("keydown",He)}catch(sn){}p.nextTick(()=>{if(j.value&&D.value){const e=j.value.cloneNode(!0);e.classList.add("fullscreen");const t=e.querySelector("[data-mermaid-wrapper]");t&&(L.value=t,t.style.transform=Pe.value.transform),M(D.value),D.value.appendChild(e)}})}function $e(){if(Re.value=!1,D.value&&M(D.value),L.value=null,"undefined"!=typeof document)try{document.body.style.overflow=""}catch(sn){}if("undefined"!=typeof window)try{window.removeEventListener("keydown",He)}catch(sn){}}function Ye(e,t){let n=null;return(...o)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...o),t)}}function Fe(){if(!$.value)return;if(!i.value)return;const e=z.value.length;e!==Q.value&&(W.value=!0,Q.value=e,K&&clearTimeout(K),K=setTimeout(()=>{W.value&&$.value&&z.value.trim()&&(W.value=!1,We("preview"))},500))}function Ve(e){if(r.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!j.value)return;const t=j.value.getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top,r=n-t.width/2,l=o-t.height/2,i=(r-R.value)/O.value,a=(l-P.value)/O.value,s=.01,u=-e.deltaY*s,c=Math.min(Math.max(O.value+u,.5),3);c!==O.value&&(R.value=r-i*c,P.value=l-a*c,O.value=c)}}function Qe(e,t=null){return c(this,null,function*(){try{const n=null!=t?t:(new XMLSerializer).serializeToString(e),o=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(o);if("undefined"!=typeof document){const e=document.createElement("a");e.href=r,e.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(sn){}URL.revokeObjectURL(r)}}catch(n){console.error("Failed to export SVG:",n)}})}function We(e){return c(this,null,function*(){const t=B.value;if(!t)return Y.value=!0,void($.value="source"===e);const n=t.getBoundingClientRect().height;t.style.height=`${n}px`,t.style.overflow="hidden",Y.value=!0,$.value="source"===e,yield p.nextTick();const o=t.scrollHeight;t.style.transition="height 180ms ease",t.offsetHeight,t.style.height=`${o}px`;const r=()=>{t.style.transition="",t.style.height="",t.style.overflow="",t.removeEventListener("transitionend",l)};function l(){r()}t.addEventListener("transitionend",l),setTimeout(()=>r(),220)})}function Ke(){return c(this,null,function*(){return F.value?V.value:I.value||(yield p.nextTick(),I.value)?(F.value=!0,V.value=(()=>c(this,null,function*(){var e,t;I.value&&(I.value.style.opacity="0");try{const t=yield C();if(!t)return;const n=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;ae.value||se.value||null==(e=t.initialize)||e.call(t,u(s({},d.value),{dompurifyConfig:s({},l)}));const o=A(r.isDark?"dark":"light"),i=yield Te(()=>t.render(n,o),{timeoutMs:fe.value.fullRender}),a=null==i?void 0:i.svg;if(I.value){const e=k(I.value,a);ae.value||se.value||(Oe(),ae.value=!0,ve.value={zoom:O.value,translateX:R.value,translateY:P.value,containerHeight:le.value});const t=r.isDark?"dark":"light";e&&(ue.value[t]=e),se.value&&(se.value=!1),he.value=!1,q=0,te()}}catch(n){const e=Ie(n),o=q+1;e&&o<=3?(q=o,oe(Math.min(1200,600*o)),void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:m&&"SCRIPT"===m.tagName.toUpperCase()&&m.src||new URL("exports.js",document.baseURI).href}&&(null==(t={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:t.DEV)&&console.warn("[markstream-vue2] Mermaid render timed out, retry scheduled:",o)):(q=0,te(),console.error("Failed to render mermaid diagram:",n),!1===r.loading&&je(n))}finally{yield p.nextTick(),I.value&&(I.value.style.opacity="1"),F.value=!1,V.value=null}}))(),V.value):void console.warn("Mermaid container not ready")})}function Xe(e){return c(this,null,function*(){if(_e()&&(I.value||(yield p.nextTick(),I.value))&&!F.value){F.value=!0;try{const t=yield C();if(!t)return;const n=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,o=r.isDark?"dark":"light",l=Ee(e),i=Le(l&&l.trim()?l:e,o);I.value&&(I.value.style.opacity="0");const a=yield Te(()=>t.render(n,i),{timeoutMs:fe.value.render}),s=null==a?void 0:a.svg;I.value&&s&&(k(I.value,s),Oe())}catch(sn){}finally{yield p.nextTick(),I.value&&(I.value.style.opacity="1"),F.value=!1}}})}function qe(){return c(this,null,function*(){var e,t;const n=Date.now(),o=++pe.value;me&&me.abort(),me=new AbortController;const l=me.signal,i=r.isDark?"dark":"light",a=z.value,s=a.replace(/\s+/g,"");if(!a.trim())return I.value&&M(I.value),ce.value=null,de.value="",void(he.value=!1);if(s===de.value)return;try{const r=yield ze(a,i,{signal:l,timeoutMs:fe.value.worker});if(r.fullOk)return yield Ke(),void(pe.value===o&&(ce.value=null!=(t=null==(e=I.value)?void 0:e.innerHTML)?t:null,de.value=s,he.value=!1));const u=Ce&&n<=Ce;if(r.prefixOk&&r.prefix&&_e()&&!u)return void(yield Xe(r.prefix))}catch(sn){if("AbortError"===(null==sn?void 0:sn.name))return}if(pe.value!==o)return;if(he.value)return;const u=ue.value[i];u&&I.value&&k(I.value,u)})}function Ze(){Me&&(Me=!1,ke=800,Ne=!1,be&&(be.abort(),be=null),ye&&(globalThis.clearTimeout(ye),ye=null),xe&&(we(xe),xe=null),Ce=Date.now())}function Ge(){if(Ze(),me){try{me.abort()}catch(sn){}me=null}if(be){try{be.abort()}catch(sn){}be=null}Jt(),te(),q=0}function Je(e=800){Me&&(ye&&globalThis.clearTimeout(ye),ye=globalThis.setTimeout(()=>{xe=Z(()=>c(this,null,function*(){if(!Me)return;if($.value||ae.value)return void Ze();const e=r.isDark?"dark":"light",t=z.value;if(t.trim()){be&&be.abort(),be=new AbortController;try{if((yield Be(t,e,{signal:be.signal,timeoutMs:fe.value.worker}))&&(yield Ke(),ae.value))return void Ze()}catch(sn){}ke=Math.min(Math.floor(1.5*ke),4e3),Je(ke)}else Je(ke)}),{timeout:500})},e))}function et(){Me||$.value||ae.value||(Me=!0,Ce=0,Ne=!0,Je(500))}p.watch(Pe,e=>{Re.value&&L.value&&(L.value.style.transform=e.transform)},{immediate:!0}),p.watch(()=>z.value,()=>{ae.value=!1,ue.value={},G(),!$.value&&i.value&&et(),Fe()}),p.watch(()=>r.isDark,()=>c(this,null,function*(){if(!ae.value)return;if(he.value)return;const e=r.isDark?"dark":"light",t=ue.value[e];if(t)return void(I.value&&k(I.value,t));const n={zoom:O.value,translateX:R.value,translateY:P.value,containerHeight:le.value},o=1!==O.value||0!==R.value||0!==P.value;se.value=!0,o&&(O.value=1,R.value=0,P.value=0,yield p.nextTick()),yield Ke(),o&&(yield p.nextTick(),O.value=n.zoom,R.value=n.translateX,P.value=n.translateY,le.value=n.containerHeight,ve.value=n)})),p.watch(()=>$.value,e=>c(this,null,function*(){if(e)Ze(),ae.value&&(ve.value={zoom:O.value,translateX:R.value,translateY:P.value,containerHeight:le.value});else{if(he.value)return;const e=r.isDark?"dark":"light";if(ae.value&&ue.value[e])return yield p.nextTick(),I.value&&k(I.value,ue.value[e]),O.value=ve.value.zoom,R.value=ve.value.translateX,P.value=ve.value.translateY,void(le.value=ve.value.containerHeight);if(yield p.nextTick(),!i.value)return;yield qe(),et()}})),p.watch(()=>r.loading,(e,t)=>c(this,null,function*(){if(!0===t&&!1===e){const e=z.value.trim();if(!e)return Ge();const t=r.isDark?"dark":"light",o=e.replace(/\s+/g,"");if(ae.value&&o===de.value)return yield p.nextTick(),I.value&&!I.value.querySelector("svg")&&ue.value[t]&&k(I.value,ue.value[t]),void Ge();try{yield Be(e,t,{timeoutMs:fe.value.worker}),yield Ke(),de.value=o,he.value=!1,Ge()}catch(n){Ge(),je(n)}}})),p.watch(j,e=>{ie&&ie.disconnect(),!e||ae.value||se.value||(ie=new ResizeObserver(e=>{e&&e.length>0&&!ae.value&&!se.value&&ot(()=>{Oe(e[0].contentRect.width)})}),ie.observe(e))},{immediate:!0}),p.onMounted(()=>c(this,null,function*(){yield p.nextTick(),Y.value||($.value=!i.value),S.value&&(G(),Q.value=z.value.length)})),p.watch(()=>i.value,e=>{Y.value||($.value=!e)}),p.watch(()=>S.value,e=>{e&&(ae.value||(G(),Q.value=z.value.length),r.loading||ae.value||G())},{immediate:!1}),p.onUnmounted(()=>{K&&clearTimeout(K),ie&&ie.disconnect(),me&&(me.abort(),me=null),Jt(),Ze(),te()}),p.watch(()=>T.value,e=>c(this,null,function*(){e?(Ze(),me&&me.abort()):ae.value||(yield p.nextTick(),G(),$.value||et())}),{immediate:!1});const tt=p.computed(()=>r.isDark?"mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700");return{__sfc:!0,props:r,emits:t,DOMPURIFY_CONFIG:l,mermaidAvailable:i,mermaidSecurityLevel:a,mermaidInitConfig:d,neutralizeScriptProtocols:h,DISALLOWED_STYLE_PATTERNS:v,SAFE_URL_PROTOCOLS:g,sanitizeUrl:f,scrubSvgElement:w,toSafeSvgElement:y,setSafeSvg:x,clearElement:M,renderSvgToTarget:k,t:b,resolveMermaidInstance:C,copyText:N,isCollapsed:T,mermaidContainer:j,mermaidContent:I,modalContent:D,modalCloneWrapper:L,registerViewport:_,viewportHandle:E,viewportReady:S,modeContainerRef:B,baseFixedCode:z,getCodeWithTheme:A,zoom:O,translateX:R,translateY:P,isDragging:H,dragStart:U,showSource:$,userToggledShowSource:Y,isRendering:F,renderQueue:V,RENDER_DEBOUNCE_DELAY:300,CONTENT_STABLE_DELAY:500,lastContentLength:Q,isContentGenerating:W,contentStableTimer:K,renderRetryTimer:X,consecutiveRenderTimeouts:q,MAX_RENDER_TIMEOUT_RETRIES:3,requestIdle:Z,debouncedProgressiveRender:G,clearRenderRetryTimer:te,scheduleRenderRetry:oe,containerHeight:le,resizeObserver:ie,hasRenderedOnce:ae,isThemeRendering:se,svgCache:ue,lastSvgSnapshot:ce,lastRenderedCode:de,renderToken:pe,currentWorkController:me,hasRenderError:he,savedTransformState:ve,wheelListeners:ge,timeouts:fe,cancelIdle:we,previewPollTimeoutId:ye,previewPollIdleId:xe,isPreviewPolling:Me,previewPollDelay:ke,previewPollController:be,lastPreviewStopAt:Ce,allowPartialPreview:Ne,withTimeoutSignal:Te,renderErrorToContainer:je,isTimeoutError:Ie,shouldSkipEventTarget:De,onBtnHover:function(e,t,n="top"){if(De(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;J(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){ee()},onCopyHover:function(e){if(De(e.currentTarget))return;const t=N.value?b("common.copied")||"Copied":b("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;J(e.currentTarget,t,"top",!1,o,r.isDark)},applyThemeTo:Le,canApplyPartialPreview:_e,getSafePrefixCandidate:Ee,canParseOnMain:Se,canParseOffthread:Be,canParseOrPrefix:ze,isFullscreenDisabled:Ae,updateContainerHeight:Oe,isModalOpen:Re,transformStyle:Pe,handleKeydown:He,openModal:Ue,closeModal:$e,debounce:Ye,checkContentStability:Fe,zoomIn:function(){O.value<3&&(O.value+=.1)},zoomOut:function(){O.value>.5&&(O.value-=.1)},resetZoom:function(){O.value=1,R.value=0,P.value=0},startDrag:function(e){H.value=!0,e instanceof MouseEvent?U.value={x:e.clientX-R.value,y:e.clientY-P.value}:U.value={x:e.touches[0].clientX-R.value,y:e.touches[0].clientY-P.value}},onDrag:function(e){if(!H.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),R.value=t-U.value.x,P.value=n-U.value.y},stopDrag:function(){H.value=!1},handleWheel:Ve,copy:function(){return c(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(z.value)),N.value=!0,t("copy",z.value),setTimeout(()=>{N.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})},exportSvg:Qe,handleExportClick:function(){var e;const n=null==(e=I.value)?void 0:e.querySelector("svg");if(!n)return void console.error("SVG element not found");const o=(new XMLSerializer).serializeToString(n),r={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:n,svgString:o};t("export",r),r.defaultPrevented||Qe(n,o)},handleOpenModalClick:function(){var e,n;const o=null!=(n=null==(e=I.value)?void 0:e.querySelector("svg"))?n:null,r=o?(new XMLSerializer).serializeToString(o):null,l={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:o,svgString:r};t("openModal",l),l.defaultPrevented||Ue()},handleSwitchMode:function(e){const n={payload:{type:"toggle-mode",target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};t("toggleMode",e,n),n.defaultPrevented||We(e)},switchMode:We,initMermaid:Ke,renderPartial:Xe,progressiveRender:qe,stopPreviewPolling:Ze,cleanupAfterLoadingSettled:Ge,scheduleNextPreviewPoll:Je,startPreviewPolling:et,computedButtonStyle:tt,mermaidIconUrl:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij4KICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNjYTllZTYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEuNSAyLjVjMCA2IDIuMjUgNS43NSA0IDcgLjgzLjY3IDEuMTcgMiAxIDRoM2MtLjE3LTIgLjE3LTMuMzMgMS00IDEuNzUtMS4yNSA0LTEgNC03QzEyIDIuNSAxMCAzIDggNyA2IDMgNCAyLjUgMS41IDIuNSIgLz4KPC9zdmc+Cg==",Portal:rt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":n.props.loading}]},[n.props.showHeader?t("div",{staticClass:"mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b",class:n.props.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"},[e.$slots["header-left"]?t("div",[e._t("header-left")],2):t("div",{staticClass:"flex items-center space-x-2 overflow-hidden"},[t("img",{staticClass:"w-4 h-4 my-0",attrs:{src:n.mermaidIconUrl,alt:"Mermaid"}}),t("span",{staticClass:"text-sm font-medium font-mono truncate",class:n.props.isDark?"text-gray-400":"text-gray-600"},[e._v("Mermaid")])]),e.$slots["header-center"]?t("div",[e._t("header-center")],2):n.props.showModeToggle&&n.mermaidAvailable?t("div",{staticClass:"flex items-center space-x-1 rounded-md p-0.5",class:n.props.isDark?"bg-gray-700":"bg-gray-100"},[t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"],on:{click:()=>n.handleSwitchMode("preview"),mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center space-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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"}}),t("circle",{attrs:{cx:"12",cy:"12",r:"3"}})])]),t("span",[e._v(e._s(n.t("common.preview")||"Preview"))])])]),t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"],on:{click:()=>n.handleSwitchMode("source"),mouseenter:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},focus:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center space-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"}})]),t("span",[e._v(e._s(n.t("common.source")||"Source"))])])])]):e._e(),e.$slots["header-right"]?t("div",[e._t("header-right")],2):t("div",{staticClass:"flex items-center space-x-1"},[n.props.showCollapseButton?t("button",{class:n.computedButtonStyle,attrs:{"aria-pressed":n.isCollapsed},on:{click:function(e){n.isCollapsed=!n.isCollapsed},mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]):e._e(),n.props.showCopyButton?t("button",{class:n.computedButtonStyle,on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExportButton&&n.mermaidAvailable?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleExportClick,mouseenter:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},focus:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}}),t("path",{attrs:{d:"m7 10l5 5l5-5"}})])])]):e._e(),n.props.showFullscreenButton&&n.mermaidAvailable?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleOpenModalClick,mouseenter:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},focus:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isModalOpen?t("svg",{attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})]):t("svg",{attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})])]):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.isCollapsed,expression:"!isCollapsed"}],ref:"modeContainerRef"},[n.showSource?t("div",{staticClass:"p-4",class:n.props.isDark?"bg-gray-900":"bg-gray-50"},[t("pre",{staticClass:"text-sm font-mono whitespace-pre-wrap",class:n.props.isDark?"text-gray-300":"text-gray-700"},[e._v(e._s(n.baseFixedCode))])]):t("div",{staticClass:"relative"},[n.props.showZoomControls?t("div",{staticClass:"absolute top-2 right-2 z-10 rounded-lg"},[t("div",{staticClass:"flex items-center gap-2 backdrop-blur rounded-lg"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},focus:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},focus:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom,mouseenter:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},focus:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")])])]):e._e(),t("div",e._g({ref:"mermaidContainer",staticClass:"min-h-[360px] relative transition-all duration-100 overflow-hidden block",class:n.props.isDark?"bg-gray-900":"bg-gray-50",style:{height:n.containerHeight},on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},n.wheelListeners),[t("div",{staticClass:"absolute inset-0 cursor-grab",class:{"cursor-grabbing":n.isDragging},style:n.transformStyle,attrs:{"data-mermaid-wrapper":""}},[t("div",{ref:"mermaidContent",staticClass:"_mermaid w-full text-center flex items-center justify-center min-h-full"})])]),t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue2"},[t("transition",{attrs:{name:"mermaid-dialog",appear:""}},[n.isModalOpen?t("div",{staticClass:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",on:{click:function(e){return e.target!==e.currentTarget?null:n.closeModal.apply(null,arguments)}}},[t("div",{staticClass:"dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",class:n.props.isDark?"bg-gray-900":"bg-white"},[t("div",{staticClass:"absolute top-6 right-6 z-50 flex items-center gap-2"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")]),t("button",{staticClass:"inline-flex items-center justify-center p-2 rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.closeModal}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"}})])])]),t("div",e._g({ref:"modalContent",staticClass:"w-full h-full flex items-center justify-center p-4 overflow-hidden",on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},n.wheelListeners))])]):e._e()])],1)])],1)])])},[],!1,null,"7f0dc907",null,null).exports;function tn(e){return JSON.stringify(e)}function nn(e){var t;const n=null!=(t=e.mode)?t:"classic",o=e.katexUrl,r=e.mhchemUrl,l=tn(s({throwOnError:!0,displayMode:!0,output:"html",strict:"ignore"},e.renderOptions||{})),i=tn(o),a=r?tn(r):'""';return"module"===n?`\nlet DEBUG = false\nlet katex = null\nlet katexLoadError = null\nlet loadPromise = null\n\nfunction normalizeKaTeX(mod) {\n const resolved = (mod && mod.default) ? mod.default : mod\n if (resolved && typeof resolved.renderToString === 'function')\n return resolved\n return null\n}\n\nasync function loadKaTeX() {\n if (katex || katexLoadError)\n return\n if (!loadPromise) {\n loadPromise = (async () => {\n try {\n const mod = await import(${i})\n katex = normalizeKaTeX(mod) || null\n const mhchemUrl = ${a}\n if (mhchemUrl) {\n try {\n await import(mhchemUrl)\n }\n catch (e) {\n // ignore optional mhchem load failures\n if (DEBUG)\n console.warn('[katex-cdn-worker] failed to load mhchem', e)\n }\n }\n }\n catch (e) {\n katexLoadError = e\n }\n })()\n }\n await loadPromise\n}\n\nglobalThis.addEventListener('message', async (ev) => {\n const data = ev.data || {}\n if (data.type === 'init') {\n DEBUG = !!data.debug\n if (DEBUG)\n console.debug('[katex-cdn-worker] debug enabled')\n return\n }\n const id = data.id ?? ''\n const content = data.content ?? ''\n const displayMode = data.displayMode ?? true\n\n await loadKaTeX()\n\n if (!katex) {\n const reason = katexLoadError ? String(katexLoadError?.message || katexLoadError) : 'KaTeX is not available in worker'\n globalThis.postMessage({ id, error: reason, content, displayMode })\n return\n }\n\n try {\n const opts = ${l}\n const html = katex.renderToString(content, { ...opts, displayMode: !!displayMode })\n globalThis.postMessage({ id, html, content, displayMode })\n }\n catch (err) {\n const msg = String(err?.message || err)\n globalThis.postMessage({ id, error: msg, content, displayMode })\n }\n})\n`.trimStart():`\nlet DEBUG = false\nlet katex = null\nlet katexLoadError = null\n\nfunction normalizeKaTeX(val) {\n const resolved = (val && val.default) ? val.default : val\n if (resolved && typeof resolved.renderToString === 'function')\n return resolved\n return null\n}\n\nfunction loadKaTeXClassic() {\n if (katex || katexLoadError)\n return\n try {\n importScripts(${i})\n const mhchemUrl = ${a}\n if (mhchemUrl) {\n try {\n importScripts(mhchemUrl)\n }\n catch (e) {\n // ignore optional mhchem load failures\n if (DEBUG)\n console.warn('[katex-cdn-worker] failed to load mhchem', e)\n }\n }\n katex = normalizeKaTeX(globalThis.katex)\n }\n catch (e) {\n katexLoadError = e\n }\n}\n\nloadKaTeXClassic()\n\nglobalThis.addEventListener('message', (ev) => {\n const data = ev.data || {}\n if (data.type === 'init') {\n DEBUG = !!data.debug\n if (DEBUG)\n console.debug('[katex-cdn-worker] debug enabled')\n return\n }\n const id = data.id ?? ''\n const content = data.content ?? ''\n const displayMode = data.displayMode ?? true\n\n if (!katex && !katexLoadError)\n loadKaTeXClassic()\n\n if (!katex) {\n const reason = katexLoadError ? String(katexLoadError?.message || katexLoadError) : 'KaTeX is not available in worker'\n globalThis.postMessage({ id, error: reason, content, displayMode })\n return\n }\n\n try {\n const opts = ${l}\n const html = katex.renderToString(content, { ...opts, displayMode: !!displayMode })\n globalThis.postMessage({ id, html, content, displayMode })\n }\n catch (err) {\n const msg = String(err?.message || err)\n globalThis.postMessage({ id, error: msg, content, displayMode })\n }\n})\n`.trimStart()}function on(e){return JSON.stringify(e)}function rn(e){var t;const n=null!=(t=e.mode)?t:"module",o=on(e.mermaidUrl),r=`\nlet DEBUG = false\nlet mermaid = null\nlet mermaidLoadError = null\n\nfunction normalizeMermaidModule(mod) {\n if (!mod)\n return mod\n const candidate = (mod && mod.default) ? mod.default : mod\n if (candidate && (typeof candidate.render === 'function' || typeof candidate.parse === 'function' || typeof candidate.initialize === 'function'))\n return candidate\n if (candidate && candidate.mermaidAPI && (typeof candidate.mermaidAPI.render === 'function' || typeof candidate.mermaidAPI.parse === 'function')) {\n const api = candidate.mermaidAPI\n return {\n ...candidate,\n render: api.render ? api.render.bind(api) : undefined,\n parse: api.parse ? api.parse.bind(api) : undefined,\n initialize: (opts) => {\n if (typeof candidate.initialize === 'function')\n return candidate.initialize(opts)\n return api.initialize ? api.initialize(opts) : undefined\n },\n }\n }\n if (mod && mod.mermaid && typeof mod.mermaid.parse === 'function')\n return mod.mermaid\n return candidate\n}\n\nfunction applyThemeTo(code, theme) {\n const themeValue = theme === 'dark' ? 'dark' : 'default'\n const themeConfig = \`%%{init: {"theme": "\${themeValue}"}}%%\\n\`\n const trimmed = (code || '').trimStart()\n if (trimmed.startsWith('%%{'))\n return code\n return themeConfig + code\n}\n\nfunction findHeaderIndex(lines) {\n const headerRe = /^(?:graph|flowchart|flowchart\\s+tb|flowchart\\s+lr|sequenceDiagram|gantt|classDiagram|stateDiagram(?:-v2)?|erDiagram|journey|pie|quadrantChart|timeline|xychart(?:-beta)?)\\b/\n for (let i = 0; i < lines.length; i++) {\n const l = (lines[i] || '').trim()\n if (!l)\n continue\n if (l.startsWith('%%'))\n continue\n if (headerRe.test(l))\n return i\n }\n return -1\n}\n\nasync function canParse(code, theme) {\n const themed = applyThemeTo(code, theme)\n const anyMermaid = mermaid\n if (anyMermaid && typeof anyMermaid.parse === 'function') {\n await anyMermaid.parse(themed)\n return true\n }\n throw new Error('mermaid.parse not available in worker')\n}\n\nasync function findLastRenderablePrefix(baseCode, theme) {\n const lines = String(baseCode || '').split('\\n')\n const headerIdx = findHeaderIndex(lines)\n if (headerIdx === -1)\n return null\n const head = lines.slice(0, headerIdx + 1)\n await canParse(head.join('\\n'), theme)\n\n let low = headerIdx + 1\n let high = lines.length\n let lastGood = headerIdx + 1\n let tries = 0\n const MAX_TRIES = 12\n\n while (low <= high && tries < MAX_TRIES) {\n const mid = Math.floor((low + high) / 2)\n const candidate = [...head, ...lines.slice(headerIdx + 1, mid)].join('\\n')\n tries++\n try {\n await canParse(candidate, theme)\n lastGood = mid\n low = mid + 1\n }\n catch {\n high = mid - 1\n }\n }\n\n return [...head, ...lines.slice(headerIdx + 1, lastGood)].join('\\n')\n}\n\nfunction initMermaidOnce() {\n if (!mermaid)\n return\n try {\n if (typeof mermaid.initialize === 'function')\n mermaid.initialize(${on(s({startOnLoad:!1,securityLevel:"loose"},e.initializeOptions||{}))})\n }\n catch (e) {\n if (DEBUG)\n console.warn('[mermaid-cdn-worker] initialize failed', e)\n }\n}\n\nglobalThis.addEventListener('message', async (ev) => {\n const msg = ev.data || {}\n if (msg.type === 'init') {\n DEBUG = !!msg.debug\n if (DEBUG)\n console.debug('[mermaid-cdn-worker] debug enabled')\n return\n }\n\n const id = msg.id\n const action = msg.action\n const payload = msg.payload || {}\n\n if (!mermaid) {\n const errMsg = mermaidLoadError ? String(mermaidLoadError?.message || mermaidLoadError) : 'Mermaid is not available in worker'\n globalThis.postMessage({ id, ok: false, error: errMsg })\n return\n }\n\n try {\n if (action === 'canParse') {\n const ok = await canParse(payload.code, payload.theme)\n globalThis.postMessage({ id, ok: true, result: ok })\n return\n }\n if (action === 'findPrefix') {\n const res = await findLastRenderablePrefix(payload.code, payload.theme)\n globalThis.postMessage({ id, ok: true, result: res })\n return\n }\n globalThis.postMessage({ id, ok: false, error: 'Unknown action' })\n }\n catch (e) {\n globalThis.postMessage({ id, ok: false, error: String(e?.message || e) })\n }\n})\n`.trimStart();return"module"===n?`\n${r}\n\nlet loadPromise = null\nasync function loadMermaid() {\n if (mermaid || mermaidLoadError)\n return\n if (!loadPromise) {\n loadPromise = (async () => {\n try {\n const mod = await import(${o})\n mermaid = normalizeMermaidModule(mod) || null\n initMermaidOnce()\n }\n catch (e) {\n mermaidLoadError = e\n }\n })()\n }\n await loadPromise\n}\n\n// Load immediately; failures are reported per-request\nawait loadMermaid()\n`.trimStart():`\n${r}\n\nfunction loadMermaidClassic() {\n if (mermaid || mermaidLoadError)\n return\n try {\n importScripts(${o})\n mermaid = normalizeMermaidModule(globalThis.mermaid) || null\n initMermaidOnce()\n }\n catch (e) {\n mermaidLoadError = e\n }\n}\n\nloadMermaidClassic()\n`.trimStart()}const ln={AdmonitionNode:Ve,BlockquoteNode:v,CheckboxNode:g,CodeBlockNode:mt,DefinitionListNode:f,EmojiNode:w,FootnoteNode:Ee,FootnoteReferenceNode:k,FootnoteAnchorNode:_e,HardBreakNode:Se,HeadingNode:Be,HtmlInlineNode:R,HighlightNode:De,ImageNode:le,InlineCodeNode:P,PreCodeNode:Pe,InsertNode:Ie,LinkNode:je,ListItemNode:ze,ListNode:Ae,MarkdownCodeBlockNode:ft,MathBlockNode:Bt,MathInlineNode:zt,MermaidBlockNode:en,InfographicBlockNode:gt,ParagraphNode:Re,StrikethroughNode:Te,StrongNode:Ne,SubscriptNode:Ce,SuperscriptNode:be,TableNode:He,TextNode:we,ThematicBreakNode:Ue,ReferenceNode:ke},an={install(e,t){Object.entries(ln).forEach(([t,n])=>{e.component(t,n)}),e.component("MarkdownRender",Fe),e.component("NodeRenderer",Fe),(null==t?void 0:t.getLanguageIcon)&&Ze(t.getLanguageIcon),(null==t?void 0:t.mathOptions)&&d.setDefaultMathOptions(t.mathOptions)}};exports.AdmonitionNode=Ve,exports.BlockquoteNode=v,exports.CheckboxNode=g,exports.CodeBlockNode=mt,exports.DefinitionListNode=f,exports.EmojiNode=w,exports.FootnoteAnchorNode=_e,exports.FootnoteNode=Ee,exports.FootnoteReferenceNode=k,exports.HardBreakNode=Se,exports.HeadingNode=Be,exports.HighlightNode=De,exports.HtmlInlineNode=R,exports.ImageNode=le,exports.InfographicBlockNode=gt,exports.InlineCodeNode=P,exports.InsertNode=Ie,exports.LinkNode=je,exports.ListItemNode=ze,exports.ListNode=Ae,exports.MERMAID_DISABLED_CODE=Xt,exports.MERMAID_WORKER_BUSY_CODE=Kt,exports.MarkdownCodeBlockNode=ft,exports.MathBlockNode=Bt,exports.MathInlineNode=zt,exports.MermaidBlockNode=en,exports.NodeRenderer=Fe,exports.ParagraphNode=Re,exports.Portal=rt,exports.PreCodeNode=Pe,exports.ReferenceNode=ke,exports.StrikethroughNode=Te,exports.StrongNode=Ne,exports.SubscriptNode=Ce,exports.SuperscriptNode=be,exports.TableNode=He,exports.TextNode=we,exports.ThematicBreakNode=Ue,exports.VueRendererMarkdown=an,exports.WORKER_BUSY_CODE=Lt,exports.buildKaTeXCDNWorkerSource=nn,exports.buildMermaidCDNWorkerSource=rn,exports.canParseOffthread=Zt,exports.clearGlobalCustomComponents=function(){delete x[y]},exports.clearKaTeXWorker=function(){var e;wt&&(null==(e=wt.terminate)||e.call(wt)),wt=null,yt=null},exports.clearMermaidWorker=function(){var e;if(Yt)try{for(const[e,t]of Vt.entries())t.reject(new Error("Worker cleared"));Vt.clear(),null==(e=Yt.terminate)||e.call(Yt)}catch(sn){}Yt=null,Ft=null},exports.createKaTeXWorkerFromCDN=function(e){var t,n;const o=nn(e);if("undefined"==typeof Worker||"undefined"==typeof URL||"undefined"==typeof Blob)return{worker:null,dispose:()=>{},source:o};const r=new Blob([o],{type:"text/javascript"}),l=URL.createObjectURL(r);let i=!1;const a="module"===(null!=(t=e.mode)?t:"classic")?u(s({},null!=(n=e.workerOptions)?n:{}),{type:"module"}):e.workerOptions,c=new Worker(l,a);if(e.debug)try{c.postMessage({type:"init",debug:!0})}catch(sn){}return{worker:c,dispose:()=>{if(!i){i=!0;try{URL.revokeObjectURL(l)}catch(sn){}}},source:o}},exports.createMermaidWorkerFromCDN=function(e){var t,n;const o=rn(e);if("undefined"==typeof Worker||"undefined"==typeof URL||"undefined"==typeof Blob)return{worker:null,dispose:()=>{},source:o};const r=new Blob([o],{type:"text/javascript"}),l=URL.createObjectURL(r);let i=!1;const a="module"===(null!=(t=e.mode)?t:"module")?u(s({},null!=(n=e.workerOptions)?n:{}),{type:"module"}):e.workerOptions,c=new Worker(l,a);if(e.debug)try{c.postMessage({type:"init",debug:!0})}catch(sn){}return{worker:c,dispose:()=>{if(!i){i=!0;try{URL.revokeObjectURL(l)}catch(sn){}}},source:o}},exports.disableKatex=function(){pe(null)},exports.disableMermaid=function(){Pt(null)},exports.enableKatex=function(e){pe(null!=e?e:de)},exports.enableMermaid=function(e){Pt(null!=e?e:At)},exports.findPrefixOffthread=Gt,exports.getCustomNodeComponents=M,exports.getKaTeXBackpressureDefaults=function(){return s({},Et)},exports.getKaTeXWorkerLoad=function(){return{inFlight:Mt.size,max:bt}},exports.getLanguageIcon=tt,exports.getMermaidWorkerLoad=function(){return{inFlight:Vt.size,max:Qt}},exports.getUseMonaco=Xe,exports.isKaTeXWorkerBusy=function(){return Mt.size>=bt},exports.isKatexEnabled=me,exports.isMermaidEnabled=Ht,exports.languageMap=nt,exports.normalizeComponent=h,exports.normalizeLanguageIdentifier=Je,exports.removeCustomComponents=function(e){if(e===y)throw new Error("removeCustomComponents: use clearGlobalCustomComponents() to clear the global mapping");delete x[e]},exports.renderKaTeXInWorker=It,exports.renderKaTeXWithBackpressure=St,exports.resolveMonacoLanguageId=et,exports.setCustomComponents=function(e,t){"string"==typeof e?x[e]=t||{}:x[y]=e||{}},exports.setDefaultI18nMap=function(e){Object.assign(te,e)},exports.setKaTeXBackpressureDefaults=function(e){null!=e.timeout&&(Et.timeout=Math.max(0,Math.floor(e.timeout))),null!=e.waitTimeout&&(Et.waitTimeout=Math.max(0,Math.floor(e.waitTimeout))),null!=e.backoffMs&&(Et.backoffMs=Math.max(0,Math.floor(e.backoffMs))),null!=e.maxRetries&&(Et.maxRetries=Math.max(0,Math.floor(e.maxRetries)))},exports.setKaTeXCache=Dt,exports.setKaTeXWorker=function(e){wt=e,yt=null,wt.onmessage=e=>{const{id:t,html:n,error:o}=e.data,r=Mt.get(t);if(r)if(Mt.delete(t),clearTimeout(r.timeoutId),Nt(),o)r.reject(new Error(o));else{const{content:t,displayMode:o}=e.data;if(t){const e=`${o?"d":"i"}:${t}`;if(kt.set(e,n),kt.size>200){const e=kt.keys().next().value;kt.delete(e)}}r.resolve(n)}},wt.onerror=e=>{console.error("[katexWorkerClient] Worker error:",e);for(const[t,n]of Mt.entries())clearTimeout(n.timeoutId),n.reject(new Error(`Worker error: ${e.message}`));Mt.clear(),Nt()}},exports.setKaTeXWorkerDebug=function(e){xt=!!e,wt&&wt.postMessage({type:"init",debug:xt})},exports.setKaTeXWorkerMaxConcurrency=function(e){Number.isFinite(e)&&e>0&&(bt=Math.floor(e))},exports.setKatexLoader=pe,exports.setLanguageIconResolver=Ze,exports.setMermaidLoader=Pt,exports.setMermaidWorker=function(e){Yt=e,Ft=null;const t=e;Yt.onmessage=e=>{if(Yt!==t)return;const{id:n,ok:o,result:r,error:l}=e.data,i=Vt.get(n);i&&(!1===o||l?i.reject(new Error(l||"Unknown error")):i.resolve(r))},Yt.onerror=e=>{var n,o;if(Yt===t)if(0!==Vt.size){try{Wt?console.error("[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e):null==(o=console.debug)||o.call(console,"[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e)}catch(r){}for(const[t,n]of Vt.entries())n.reject(new Error(`Worker error: ${e.message}`));Vt.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker error (no pending):",(null==e?void 0:e.message)||e)},Yt.onmessageerror=e=>{var n,o;if(Yt===t)if(0!==Vt.size){try{Wt?console.error("[mermaidWorkerClient] Worker messageerror:",e):null==(o=console.debug)||o.call(console,"[mermaidWorkerClient] Worker messageerror:",e)}catch(sn){}for(const[e,t]of Vt.entries())t.reject(new Error("Worker messageerror"));Vt.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",e)}},exports.setMermaidWorkerClientDebug=function(e){Wt=!!e},exports.setMermaidWorkerMaxConcurrency=function(e){Number.isFinite(e)&&e>0&&(Qt=Math.floor(e))},exports.terminateWorker=Jt,exports.waitForKaTeXWorkerSlot=_t;
|