markstream-react 0.0.3-beta.2 → 0.0.3-beta.3

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/README.md CHANGED
@@ -29,6 +29,11 @@ export default function Article({ markdown }: { markdown: string }) {
29
29
 
30
30
  You can also pass a pre-parsed `nodes` array if you already have AST data.
31
31
 
32
+ ## Tailwind
33
+
34
+ - Non-Tailwind projects: keep importing `markstream-react/index.css` (includes precompiled utilities for the renderer).
35
+ - Tailwind projects (avoid duplicate utilities): import `markstream-react/index.tailwind.css` and add `require('markstream-react/tailwind')` to your `tailwind.config.js` `content`.
36
+
32
37
  ## Custom components (e.g. `<thinking>`)
33
38
 
34
39
  Custom tag-like blocks are exposed as nodes with `type: '<tag>'` (for example `type: 'thinking'`) when you register the tag in `customHtmlTags` or register a custom component mapping for it.
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.markstream-vue .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.markstream-vue .pointer-events-none{pointer-events:none}.markstream-vue .visible{visibility:visible}.markstream-vue .collapse{visibility:collapse}.markstream-vue .fixed{position:fixed}.markstream-vue .absolute{position:absolute}.markstream-vue .relative{position:relative}.markstream-vue .inset-0{top:0;right:0;bottom:0;left:0}.markstream-vue .right-2{right:.5rem}.markstream-vue .top-2{top:.5rem}.markstream-vue .z-10{z-index:10}.markstream-vue .z-\[9999\]{z-index:9999}.markstream-vue .m-0{margin:0}.markstream-vue .mx-0\.5{margin-left:.125rem;margin-right:.125rem}.markstream-vue .my-2{margin-top:.5rem;margin-bottom:.5rem}.markstream-vue .my-4{margin-top:1rem;margin-bottom:1rem}.markstream-vue .my-5{margin-top:1.25rem;margin-bottom:1.25rem}.markstream-vue .my-8{margin-top:2rem;margin-bottom:2rem}.markstream-vue .mb-2{margin-bottom:.5rem}.markstream-vue .mb-4{margin-bottom:1rem}.markstream-vue .ml-4{margin-left:1rem}.markstream-vue .mt-2{margin-top:.5rem}.markstream-vue .block{display:block}.markstream-vue .inline-block{display:inline-block}.markstream-vue .inline{display:inline}.markstream-vue .flex{display:flex}.markstream-vue .inline-flex{display:inline-flex}.markstream-vue .table{display:table}.markstream-vue .contents{display:contents}.markstream-vue .list-item{display:list-item}.markstream-vue .hidden{display:none}.markstream-vue .h-3{height:.75rem}.markstream-vue .h-4{height:1rem}.markstream-vue .min-h-\[360px\]{min-height:360px}.markstream-vue .min-h-\[40px\]{min-height:40px}.markstream-vue .min-h-full{min-height:100%}.markstream-vue .w-2\/3{width:66.666667%}.markstream-vue .w-3{width:.75rem}.markstream-vue .w-4{width:1rem}.markstream-vue .w-4\/5{width:80%}.markstream-vue .w-full{width:100%}.markstream-vue .max-w-full{max-width:100%}.markstream-vue .flex-1{flex:1 1 0%}.markstream-vue .flex-shrink-0{flex-shrink:0}.markstream-vue .border-collapse{border-collapse:collapse}.markstream-vue .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.markstream-vue .cursor-grab{cursor:grab}.markstream-vue .cursor-grabbing{cursor:grabbing}.markstream-vue .cursor-not-allowed{cursor:not-allowed}.markstream-vue .cursor-pointer{cursor:pointer}.markstream-vue .list-decimal{list-style-type:decimal}.markstream-vue .list-disc{list-style-type:disc}.markstream-vue .items-center{align-items:center}.markstream-vue .items-baseline{align-items:baseline}.markstream-vue .justify-center{justify-content:center}.markstream-vue .justify-between{justify-content:space-between}.markstream-vue .gap-1\.5{gap:.375rem}.markstream-vue .gap-2{gap:.5rem}.markstream-vue :is(.space-x-1>:not([hidden])~:not([hidden])){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.markstream-vue :is(.space-x-2>:not([hidden])~:not([hidden])){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.markstream-vue .overflow-hidden{overflow:hidden}.markstream-vue .overflow-x-auto{overflow-x:auto}.markstream-vue .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markstream-vue .whitespace-normal{white-space:normal}.markstream-vue .whitespace-nowrap{white-space:nowrap}.markstream-vue .whitespace-pre-wrap{white-space:pre-wrap}.markstream-vue .break-words{overflow-wrap:break-word}.markstream-vue .rounded{border-radius:.25rem}.markstream-vue .rounded-lg{border-radius:.5rem}.markstream-vue .rounded-md{border-radius:.375rem}.markstream-vue .border{border-width:1px}.markstream-vue .border-b{border-bottom-width:1px}.markstream-vue .border-t{border-top-width:1px}.markstream-vue .border-\[\#eaecef\]{--tw-border-opacity: 1;border-color:rgb(234 236 239 / var(--tw-border-opacity, 1))}.markstream-vue .border-\[var\(--table-border\,\#cbd5e1\)\]{border-color:var(--table-border,#cbd5e1)}.markstream-vue .border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.markstream-vue .border-gray-400\/5{border-color:#9ca3af0d}.markstream-vue .border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.markstream-vue .border-gray-700\/30{border-color:#3741514d}.markstream-vue .bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.markstream-vue .bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.markstream-vue .bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.markstream-vue .bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.markstream-vue .bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.markstream-vue .bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.markstream-vue .bg-secondary{background-color:hsl(var(--secondary),214.3 21.44% 93.4%)}.markstream-vue .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.markstream-vue .p-0\.5{padding:.125rem}.markstream-vue .p-2{padding:.5rem}.markstream-vue .p-4{padding:1rem}.markstream-vue .p-\[calc\(4\/7\*1em\)\]{padding:calc(4 / 7 * 1em)}.markstream-vue .px-1{padding-left:.25rem;padding-right:.25rem}.markstream-vue .px-1\.5{padding-left:.375rem;padding-right:.375rem}.markstream-vue .px-2\.5{padding-left:.625rem;padding-right:.625rem}.markstream-vue .px-3{padding-left:.75rem;padding-right:.75rem}.markstream-vue .px-4{padding-left:1rem;padding-right:1rem}.markstream-vue .py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.markstream-vue .py-1{padding-top:.25rem;padding-bottom:.25rem}.markstream-vue .py-2{padding-top:.5rem;padding-bottom:.5rem}.markstream-vue .py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.markstream-vue .pl-1\.5{padding-left:.375rem}.markstream-vue .pl-\[calc\(13\/8\*1em\)\]{padding-left:1.625em}.markstream-vue .pt-2{padding-top:.5rem}.markstream-vue .text-left{text-align:left}.markstream-vue .text-center{text-align:center}.markstream-vue .text-right{text-align:right}.markstream-vue .font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.markstream-vue .text-\[85\%\]{font-size:85%}.markstream-vue .text-base{font-size:1rem;line-height:1.5rem}.markstream-vue .text-sm{font-size:.875rem;line-height:1.25rem}.markstream-vue .text-xs{font-size:.75rem;line-height:1rem}.markstream-vue .font-medium{font-weight:500}.markstream-vue .font-semibold{font-weight:600}.markstream-vue .uppercase{text-transform:uppercase}.markstream-vue .italic{font-style:italic}.markstream-vue .leading-\[normal\]{line-height:normal}.markstream-vue .leading-relaxed{line-height:1.625}.markstream-vue .text-\[\#0366d6\]{--tw-text-opacity: 1;color:rgb(3 102 214 / var(--tw-text-opacity, 1))}.markstream-vue .text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.markstream-vue .text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.markstream-vue .text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.markstream-vue .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.markstream-vue .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.markstream-vue .text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.markstream-vue .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.markstream-vue .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.markstream-vue .underline{text-decoration-line:underline}.markstream-vue .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markstream-vue .opacity-50{opacity:.5}.markstream-vue .shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.markstream-vue .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.markstream-vue .outline{outline-style:solid}.markstream-vue .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .duration-100{transition-duration:.1s}.markstream-vue .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.markstream-vue .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}:root{--border: 214.3 31.8% 91.4%;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--secondary: 210 40% 96%;--muted: 210 40% 96%;--muted-foreground: 215.4 16.3% 46.9%}.markstream-vue{--border: 214.3 31.8% 91.4%;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--secondary: 210 40% 96%;--muted: 210 40% 96%;--muted-foreground: 215.4 16.3% 46.9%}.markstream-vue button{-moz-appearance:none;appearance:none;-webkit-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.dark,.dark .markstream-vue,.markstream-vue.dark{--border: 217.2 32.6% 17.5%;--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--secondary: 217.2 32.6% 17.5%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%}.markdown-renderer{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized{content-visibility:visible;contain-intrinsic-size:auto}.node-slot,.node-content{width:100%}.node-placeholder{width:100%;min-height:1rem;margin:.25rem 0;border-radius:.5rem;background-image:linear-gradient(90deg,#94a3b82e,#94a3b80d,#94a3b82e);background-size:200% 100%;animation:node-placeholder-shimmer 1.1s ease-in-out infinite}.node-placeholder:first-child{margin-top:0}.node-spacer{width:100%}.typewriter-node{opacity:0;animation:typewriter-fade .9s ease-out forwards}.unknown-node{color:#6a737d;font-style:italic;margin:1rem 0}.text-node{display:inline;font-weight:inherit;vertical-align:baseline;white-space:pre-wrap;word-break:break-word}.text-node.text-node-center{display:inline-flex;justify-content:center;width:100%}.paragraph-node{margin:1.25em 0;line-height:1.625}li .paragraph-node{margin:0}.blockquote-node{font-weight:500;font-style:italic;border-left:.25rem solid var(--blockquote-border-color,#e2e8f0);quotes:"“" "”" "‘" "’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.blockquote-node .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node{font-weight:600}.heading-1{margin-top:0;margin-bottom:calc(8 / 9 * 1em);font-size:2.25rem;line-height:calc(10 / 9 * 1);font-weight:800}.heading-2{margin-top:2rem;margin-bottom:1rem;font-size:1.5rem;line-height:calc(4 / 3 * 1)}.heading-3{margin-top:1.6em;margin-bottom:calc(3 / 5 * 1em);font-size:1.25rem;line-height:calc(5 / 3 * 1)}.heading-4,.heading-5,.heading-6{margin-top:1.5rem;margin-bottom:.5rem;font-size:1rem}.heading-5,.heading-6{margin-top:0;margin-bottom:0}.link-node{color:var(--link-color, #0366d6);text-decoration:none}.link-node:hover{text-decoration:underline;text-underline-offset:.2rem}.link-loading .link-text-wrapper{position:relative}.link-loading .link-text{position:relative;z-index:2}.underline-anim{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;transform-origin:center center;will-change:transform,opacity;opacity:var(--underline-opacity, .9);transform:scaleX(0);animation:underlineLoop var(--underline-duration, .8s) var(--underline-timing, linear) var(--underline-iteration, infinite)}@keyframes underlineLoop{0%{transform:scaleX(0);opacity:var(--underline-opacity, .9)}75%{transform:scaleX(1);opacity:var(--underline-opacity, .9)}99%{transform:scaleX(1);opacity:var(--underline-opacity, .9)}to{transform:scaleX(0);opacity:0}}.inline-code{padding:.125rem .375rem;border-radius:.375rem;background:#f3f4f6;font-size:.875rem}.image-node{margin:2rem auto;text-align:center}.image-node__inner{position:relative;display:inline-block;max-width:24rem}.image-node__img{display:inline-block;max-width:24rem;width:100%;border-radius:.75rem;height:auto;opacity:0;transition:opacity .2s ease;box-shadow:0 15px 35px #0f172a14}.image-node__img.is-loaded{opacity:1}.image-node__caption{margin-top:.5rem;font-size:.875rem;color:#6b7280;font-style:italic}.image-node__placeholder,.image-node__error{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;width:100%;padding:1.5rem;border-radius:.75rem}.image-node__placeholder{background:linear-gradient(120deg,#94a3b833,#e2e8f059);color:#475569;box-shadow:inset 0 0 0 1px #94a3b833}.image-node__error{color:#dc2626;background:#f8717114}.image-node__spinner{width:1rem;height:1rem;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:spin 1s linear infinite}.image-node__placeholder-text{font-size:.875rem;color:currentColor}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.footnote-node{border-left:.25rem solid #e2e8f0;padding-left:1rem;margin:1.5rem 0;font-size:.875rem;color:#475569}.admonition-node{border-left:4px solid #e5e7eb;border-radius:.5rem;padding:.75rem 1rem;margin:1.5rem 0;background:#f9fafbe6}.admonition-node__title{font-weight:600;margin-bottom:.5rem}.table-node-wrapper{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scrollbar-gutter:stable}.table-node{table-layout:auto;width:-moz-max-content;width:max-content;min-width:100%;border-collapse:collapse}.table-node--loading{table-layout:fixed;width:100%}.table-node th,.table-node td{white-space:nowrap}.table-node .text-node,.table-node code{white-space:nowrap;overflow-wrap:normal;word-break:normal;max-width:none}.table-node--loading tbody td{position:relative;overflow:hidden}.table-node--loading tbody td>*{visibility:hidden}.table-node--loading tbody td:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:.25rem;background:linear-gradient(90deg,#94a3b829 25%,#94a3b847,#94a3b829 75%);background-size:200% 100%;animation:table-node-shimmer 1.2s linear infinite;will-change:background-position}.table-node__loading{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner{width:2.5rem;height:2.5rem;border-radius:999px;border:2px solid rgba(94,104,121,.25);border-top-color:#5e6879cc;animation:spin 1s linear infinite;will-change:transform}.table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.table-node .markdown-renderer .node-slot,.table-node .markdown-renderer .node-content,.table-node .markdown-renderer .node-space{display:contents}.markdown-renderer .markdown-renderer{content-visibility:visible;contain-intrinsic-size:auto}@keyframes table-node-shimmer{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper{margin-top:0}.hr+.table-node-wrapper .table-node{margin-top:0}.code-block-node{background:#0f172a;color:#fff;border-radius:.75rem;padding:1rem;margin:1.25rem 0;overflow-x:auto;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.code-block{border-radius:.75rem;background:#0f172a;color:#e2e8f0;margin:1.25rem 0;overflow:hidden;position:relative}.code-block--expanded{max-height:none}.code-block-header{display:flex;align-items:center;justify-content:space-between;padding:.65rem .9rem;background:#0f172ad9;border-bottom:1px solid rgba(148,163,184,.2)}.code-block-meta{display:flex;align-items:center;gap:.5rem}.code-block-language{font-size:.825rem;letter-spacing:.08em;text-transform:uppercase;color:#e2e8f0d9}.code-block-badge{font-size:.7rem;padding:.1rem .4rem;border-radius:9999px;background:#3b82f633;color:#bfdbfe}.code-block-actions{display:flex;gap:.35rem}.code-block-btn{border:1px solid rgba(148,163,184,.4);background:#0f172a99;color:#f8fafc;font-size:.75rem;padding:.25rem .65rem;border-radius:.35rem;cursor:pointer;transition:background .2s ease,color .2s ease,border-color .2s ease}.code-block-btn:hover{background:#3b82f6cc;border-color:#3b82f699}.code-block-body{position:relative;min-height:120px}.code-block-body--expanded{max-height:none}.code-block-body--collapsed{min-height:0;height:0;overflow:hidden}.code-block-monaco{min-height:120px}.code-block-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#0f172a99;backdrop-filter:blur(2px)}.code-block-spinner{width:2rem;height:2rem;border:2px solid rgba(255,255,255,.3);border-top-color:#ffffffe6;border-radius:9999px;animation:spin 1s linear infinite}.code-block-footer{padding:.35rem .9rem .7rem;border-top:1px solid rgba(148,163,184,.2);font-size:.75rem;color:#e2e8f0cc}.mermaid-block{border:1px solid rgba(148,163,184,.3);border-radius:1rem;background:#fff;color:#0f172a;margin:1.25rem 0;overflow:hidden}.dark .mermaid-block{background:#0f172a;color:#e2e8f0;border-color:#94a3b866}.mermaid-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;flex-direction:column;background:#0009}.mermaid-modal-panel{position:relative;width:min(64rem,calc(100% - 2rem));margin:2rem auto;border-radius:.75rem;overflow:hidden;background:#fff;color:#0f172a;box-shadow:0 24px 60px #00000038}.mermaid-modal-panel.is-dark{background:#0f172a;color:#e2e8f0}.mermaid-modal-header{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;border-bottom:1px solid rgba(148,163,184,.25)}.mermaid-modal-panel.is-dark .mermaid-modal-header{border-bottom-color:#94a3b840}.mermaid-modal-title{font-size:.875rem;font-weight:600}.mermaid-modal-close{font-size:.875rem;padding:.25rem .5rem;border-radius:.375rem;cursor:pointer;opacity:.9}.mermaid-modal-close:hover{opacity:1;background:#94a3b829}.mermaid-modal-body{padding:1rem;max-height:80vh;overflow:auto}.mermaid-modal-content{width:100%;height:100%;display:flex;justify-content:center}.fullscreen{width:100%;max-height:100%!important;height:100%!important}.mermaid-header{display:flex;align-items:center;justify-content:space-between;padding:.65rem .9rem;border-bottom:1px solid rgba(148,163,184,.3);background:#f8fafcd9}.dark .mermaid-header{background:#0f172ad9;border-color:#47556999}.mermaid-title__text{font-size:.85rem;letter-spacing:.08em;text-transform:uppercase;color:inherit}.mermaid-actions{display:flex;align-items:center;gap:.35rem}.mermaid-btn{border:1px solid rgba(148,163,184,.4);background:transparent;color:inherit;font-size:.75rem;padding:.2rem .65rem;border-radius:.35rem;cursor:pointer;transition:background .2s ease,color .2s ease}.mermaid-btn:hover{background:#3b82f626;color:#1d4ed8}.dark .mermaid-btn:hover{background:#3b82f64d;color:#bfdbfe}.mermaid-toggle{display:inline-flex;border-radius:9999px;border:1px solid rgba(148,163,184,.3);overflow:hidden}.mermaid-toggle-btn{border:none;background:transparent;color:inherit;font-size:.75rem;padding:.2rem .65rem;cursor:pointer;transition:background .2s ease}.mermaid-toggle-btn--active{background:#3b82f62e;color:#1d4ed8}.dark .mermaid-toggle-btn--active{background:#3b82f64d;color:#bfdbfe}.mermaid-body{position:relative;padding:1rem}.mermaid-preview{width:100%;min-height:180px;display:flex;align-items:center;justify-content:center;text-align:center}.mermaid-preview svg{width:100%;height:auto}.mermaid-source{background:#0f172af2;color:#e2e8f0;border-radius:.5rem;padding:1rem;overflow-x:auto}.mermaid-error{padding:.85rem 1rem;color:#b91c1c;background:#f8717126;border-top:1px solid rgba(248,113,113,.25)}.mermaid-loading{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem 1rem;font-size:.85rem;color:#0f172a99}.dark .mermaid-loading{color:#e2e8f0b3}.mermaid-spinner{width:1.2rem;height:1.2rem;border:2px solid rgba(59,130,246,.4);border-top-color:#3b82f6e6;border-radius:9999px;animation:spin .9s linear infinite}.math-block-node{margin:1rem 0}.math-inline-wrapper{position:relative;display:inline-block}.math-inline{display:inline-block;vertical-align:middle}.math-inline--hidden{visibility:hidden}.math-inline__loading{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner{width:1rem;height:1rem;border-radius:9999px;border:2px solid rgba(94,104,121,.25);border-top-color:#5e6879cc;animation:spin 1s linear infinite}.math-block{position:relative;text-align:center;overflow-x:auto;min-height:40px;padding:.5rem}.math-rendering{opacity:.3;transition:opacity .2s ease}.thematic-break{margin:3rem 0;border-top:1px solid #e2e8f0}.hr-node{margin:3rem 0;border-top:1px solid var(--hr-border-color, #e2e8f0)}.hard-break{display:block}.checkbox-node{margin-right:.5rem;vertical-align:middle}.checkbox-input{margin:0;cursor:default}.html-inline-node{display:inline}.html-inline-node--loading{opacity:.85}.html-block-node__placeholder{display:flex;flex-direction:column;gap:.35rem;padding:.5rem 0}.html-block-node__placeholder-bar{display:block;height:.8rem;border-radius:9999px;background-image:linear-gradient(90deg,#94a3b859,#94a3b81a,#94a3b859);background-size:200% 100%;animation:html-block-node-shimmer 1.2s ease infinite}@keyframes html-block-node-shimmer{0%{background-position:0% 0%}to{background-position:200% 0%}}.vmr-container{border-radius:.5rem;border:1px solid rgba(148,163,184,.35);padding:1rem;margin:1rem 0;border-left-width:4px}.admonition{--admonition-bg: #f8f8f8;--admonition-border: #eaecef;--admonition-header-bg: rgba(0, 0, 0, .03);--admonition-text: #111827;--admonition-muted: #374151;--admonition-note-color: #448aff;--admonition-tip-color: #00bfa5;--admonition-warning-color: #ff9100;--admonition-danger-color: #ff5252;margin:1rem 0;padding:0;border-radius:4px;border-left:4px solid var(--admonition-border);background-color:var(--admonition-bg);color:var(--admonition-text);overflow:hidden}.admonition-header{padding:.5rem 1rem;font-weight:600;display:flex;align-items:center;background-color:var(--admonition-header-bg);color:var(--admonition-muted)}.admonition-icon{margin-right:.5rem;color:inherit}.admonition-content{padding:.5rem 1rem 1rem;color:var(--admonition-text)}.admonition-note{border-left-color:var(--admonition-note-color)}.admonition-note .admonition-header{background-color:#448aff0f;color:var(--admonition-note-color)}.admonition-info{border-left-color:var(--admonition-note-color)}.admonition-info .admonition-header{background-color:#448aff0f;color:var(--admonition-note-color)}.admonition-tip{border-left-color:var(--admonition-tip-color)}.admonition-tip .admonition-header{background-color:#00bfa50f;color:var(--admonition-tip-color)}.admonition-warning{border-left-color:var(--admonition-warning-color)}.admonition-warning .admonition-header{background-color:#ff91000f;color:var(--admonition-warning-color)}.admonition-danger{border-left-color:var(--admonition-danger-color)}.admonition-danger .admonition-header{background-color:#ff52520f;color:var(--admonition-danger-color)}.admonition-error{border-left-color:var(--admonition-danger-color)}.admonition-error .admonition-header{background-color:#ff52520f;color:var(--admonition-danger-color)}.admonition-caution{border-left-color:var(--admonition-warning-color)}.admonition-caution .admonition-header{background-color:#ff91000f;color:var(--admonition-warning-color)}.admonition-toggle{margin-left:auto;background:transparent;border:none;color:inherit;cursor:pointer;padding:.25rem .5rem;border-radius:4px;font-size:.9rem}.admonition-toggle:focus{outline:2px solid rgba(0,0,0,.08);outline-offset:2px}.admonition.is-dark{--admonition-bg: #0b1220;--admonition-border: rgba(255, 255, 255, .06);--admonition-header-bg: rgba(255, 255, 255, .03);--admonition-text: #e6eef8;--admonition-muted: #cbd5e1}.code-block-container{contain:content;content-visibility:auto;contain-intrinsic-size:320px 180px}.code-editor-container,.code-height-placeholder{min-height:120px}.code-action-btn{cursor:pointer;opacity:.7;transition:opacity .2s}.code-action-btn:hover{opacity:1}.code-action-btn:disabled{opacity:.5;cursor:not-allowed}.code-action-btn:disabled:hover{background-color:transparent}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg,.icon-slot img{display:block;width:100%;height:100%}.code-block-container .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background, #111827)}.code-block-content{max-height:min(70vh,500px);overflow:auto;transition:max-height .3s ease;font-family:var(--vscode-editor-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);line-height:var(--vscode-editor-line-height, 1.5)}.code-block-render{min-height:1px}.code-fallback-plain{white-space:pre;overflow:auto;background:transparent;color:inherit;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-family:var(--vscode-editor-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-weight:var(--vscode-editor-font-weight, 400)}.code-fallback-plain>code{font-size:inherit;line-height:inherit;font-family:inherit;font-weight:inherit}.code-loading-placeholder{padding:1rem;min-height:120px}.loading-skeleton{display:flex;flex-direction:column;gap:.75rem}.skeleton-line{height:1rem;background:linear-gradient(90deg,#0000000f 25%,#0000001f 37%,#0000000f 63%);background-size:400% 100%;animation:code-skeleton-shimmer 1.2s ease-in-out infinite;border-radius:.25rem}.code-block-container.is-dark .skeleton-line{background:linear-gradient(90deg,#ffffff0f 25%,#ffffff1f 37%,#ffffff0f 63%);background-size:400% 100%}.skeleton-line.short{width:60%}@keyframes code-skeleton-shimmer{0%{background-position:100% 0}to{background-position:0 0}}.markstream-vue pre[class^=language-],.markstream-vue pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-vue pre[class^=language-]>code,.markstream-vue pre[class*=" language-"]>code{display:block}.markstream-vue pre[class^=language-]:focus,.markstream-vue pre[class*=" language-"]:focus{outline:2px solid var(--vmdr-focus, #3b82f6);outline-offset:2px}.html-preview-frame__backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame__backdrop--dark{background-color:#0f172acc}.html-preview-frame{width:80vw;max-width:960px;height:70vh;background-color:#fff;border-radius:.5rem;overflow:hidden;box-shadow:0 10px 40px #00000040;display:flex;flex-direction:column}.html-preview-frame--dark{background-color:#020617;color:#e5e7eb;box-shadow:0 10px 40px #0009}.html-preview-frame__header{display:flex;justify-content:space-between;align-items:center;padding:.4rem .75rem;border-bottom:1px solid rgba(0,0,0,.06)}.html-preview-frame--dark .html-preview-frame__header{border-bottom-color:#94a3b859}.html-preview-frame__title{display:inline-flex;align-items:center;gap:.4rem;font-size:.75rem;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot{width:.5rem;height:.5rem;border-radius:999px;background-color:#22c55e}.html-preview-frame--dark .html-preview-frame__dot{background-color:#4ade80}.html-preview-frame__label{white-space:nowrap}.html-preview-frame__close{border:none;background:transparent;font-size:1.25rem;line-height:1;cursor:pointer}.html-preview-frame__close--dark{color:#e5e7eb}.html-preview-frame__iframe{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame{width:100vw;height:80vh;border-radius:0}}.ms-tooltip{position:fixed;padding:.4rem .65rem;font-size:.875rem;border-radius:.375rem;border-width:1px;border-style:solid;box-shadow:0 10px 15px #00000014;pointer-events:none;z-index:9999;opacity:0;transition:opacity .12s linear,transform .22s cubic-bezier(.16,1,.3,1)}.ms-tooltip[data-visible=true]{opacity:1}.ms-tooltip[data-dark=true]{background-color:#111827;color:#f9fafb;border-color:#374151}.ms-tooltip[data-dark=false],.ms-tooltip:not([data-dark=true]){background-color:#fff;color:#111827;border-color:#e5e7eb}@keyframes node-placeholder-shimmer{0%{background-position:200% 0%}to{background-position:-200% 0%}}@keyframes typewriter-fade{0%{opacity:0}to{opacity:1}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes spin{to{transform:rotate(360deg)}}.markstream-vue .hover\:bg-\[var\(--vscode-editor-selectionBackground\)\]:hover{background-color:var(--vscode-editor-selectionBackground)}.markstream-vue .hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.markstream-vue .hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.markstream-vue .hover\:bg-secondary:hover{background-color:hsl(var(--secondary),214.3 21.44% 93.4%)}.markstream-vue .hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.markstream-vue .hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.markstream-vue .hover\:underline:hover{text-decoration-line:underline}@media not all and (min-width:1024px){.markstream-vue .max-lg\:my-\[calc\(4\/3\*1em\)\]{margin-top:calc(4 / 3 * 1em);margin-bottom:calc(4 / 3 * 1em)}.markstream-vue .max-lg\:pl-\[calc\(14\/9\*1em\)\]{padding-left:calc(14 / 9 * 1em)}}
1
+ .markstream-react .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.markstream-react .pointer-events-none{pointer-events:none}.markstream-react .visible{visibility:visible}.markstream-react .collapse{visibility:collapse}.markstream-react .fixed{position:fixed}.markstream-react .absolute{position:absolute}.markstream-react .relative{position:relative}.markstream-react .inset-0{top:0;right:0;bottom:0;left:0}.markstream-react .right-2{right:.5rem}.markstream-react .top-2{top:.5rem}.markstream-react .z-10{z-index:10}.markstream-react .z-\[9999\]{z-index:9999}.markstream-react .m-0{margin:0}.markstream-react .mx-0\.5{margin-left:.125rem;margin-right:.125rem}.markstream-react .my-2{margin-top:.5rem;margin-bottom:.5rem}.markstream-react .my-4{margin-top:1rem;margin-bottom:1rem}.markstream-react .my-5{margin-top:1.25rem;margin-bottom:1.25rem}.markstream-react .my-8{margin-top:2rem;margin-bottom:2rem}.markstream-react .mb-2{margin-bottom:.5rem}.markstream-react .mb-4{margin-bottom:1rem}.markstream-react .ml-4{margin-left:1rem}.markstream-react .mt-2{margin-top:.5rem}.markstream-react .block{display:block}.markstream-react .inline-block{display:inline-block}.markstream-react .inline{display:inline}.markstream-react .flex{display:flex}.markstream-react .inline-flex{display:inline-flex}.markstream-react .table{display:table}.markstream-react .contents{display:contents}.markstream-react .list-item{display:list-item}.markstream-react .hidden{display:none}.markstream-react .h-3{height:.75rem}.markstream-react .h-4{height:1rem}.markstream-react .min-h-\[360px\]{min-height:360px}.markstream-react .min-h-\[40px\]{min-height:40px}.markstream-react .min-h-full{min-height:100%}.markstream-react .w-2\/3{width:66.666667%}.markstream-react .w-3{width:.75rem}.markstream-react .w-4{width:1rem}.markstream-react .w-4\/5{width:80%}.markstream-react .w-full{width:100%}.markstream-react .max-w-full{max-width:100%}.markstream-react .flex-1{flex:1 1 0%}.markstream-react .flex-shrink-0{flex-shrink:0}.markstream-react .border-collapse{border-collapse:collapse}.markstream-react .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.markstream-react .cursor-grab{cursor:grab}.markstream-react .cursor-grabbing{cursor:grabbing}.markstream-react .cursor-not-allowed{cursor:not-allowed}.markstream-react .cursor-pointer{cursor:pointer}.markstream-react .list-decimal{list-style-type:decimal}.markstream-react .list-disc{list-style-type:disc}.markstream-react .items-center{align-items:center}.markstream-react .items-baseline{align-items:baseline}.markstream-react .justify-center{justify-content:center}.markstream-react .justify-between{justify-content:space-between}.markstream-react .gap-1\.5{gap:.375rem}.markstream-react .gap-2{gap:.5rem}.markstream-react :is(.space-x-1>:not([hidden])~:not([hidden])){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.markstream-react :is(.space-x-2>:not([hidden])~:not([hidden])){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.markstream-react .overflow-hidden{overflow:hidden}.markstream-react .overflow-x-auto{overflow-x:auto}.markstream-react .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markstream-react .whitespace-normal{white-space:normal}.markstream-react .whitespace-nowrap{white-space:nowrap}.markstream-react .whitespace-pre-wrap{white-space:pre-wrap}.markstream-react .break-words{overflow-wrap:break-word}.markstream-react .rounded{border-radius:.25rem}.markstream-react .rounded-lg{border-radius:.5rem}.markstream-react .rounded-md{border-radius:.375rem}.markstream-react .border{border-width:1px}.markstream-react .border-b{border-bottom-width:1px}.markstream-react .border-t{border-top-width:1px}.markstream-react .border-\[\#eaecef\]{--tw-border-opacity: 1;border-color:rgb(234 236 239 / var(--tw-border-opacity, 1))}.markstream-react .border-\[var\(--table-border\,\#cbd5e1\)\]{border-color:var(--table-border,#cbd5e1)}.markstream-react .border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.markstream-react .border-gray-400\/5{border-color:#9ca3af0d}.markstream-react .border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.markstream-react .border-gray-700\/30{border-color:#3741514d}.markstream-react .bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.markstream-react .bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.markstream-react .bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.markstream-react .bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.markstream-react .bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.markstream-react .bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.markstream-react .bg-secondary{background-color:hsl(var(--secondary),214.3 21.44% 93.4%)}.markstream-react .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.markstream-react .p-0\.5{padding:.125rem}.markstream-react .p-2{padding:.5rem}.markstream-react .p-4{padding:1rem}.markstream-react .p-\[calc\(4\/7\*1em\)\]{padding:calc(4 / 7 * 1em)}.markstream-react .px-1{padding-left:.25rem;padding-right:.25rem}.markstream-react .px-1\.5{padding-left:.375rem;padding-right:.375rem}.markstream-react .px-2\.5{padding-left:.625rem;padding-right:.625rem}.markstream-react .px-3{padding-left:.75rem;padding-right:.75rem}.markstream-react .px-4{padding-left:1rem;padding-right:1rem}.markstream-react .py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.markstream-react .py-1{padding-top:.25rem;padding-bottom:.25rem}.markstream-react .py-2{padding-top:.5rem;padding-bottom:.5rem}.markstream-react .py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.markstream-react .pl-1\.5{padding-left:.375rem}.markstream-react .pl-\[calc\(13\/8\*1em\)\]{padding-left:1.625em}.markstream-react .pt-2{padding-top:.5rem}.markstream-react .text-left{text-align:left}.markstream-react .text-center{text-align:center}.markstream-react .text-right{text-align:right}.markstream-react .font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.markstream-react .text-\[85\%\]{font-size:85%}.markstream-react .text-base{font-size:1rem;line-height:1.5rem}.markstream-react .text-sm{font-size:.875rem;line-height:1.25rem}.markstream-react .text-xs{font-size:.75rem;line-height:1rem}.markstream-react .font-medium{font-weight:500}.markstream-react .font-semibold{font-weight:600}.markstream-react .uppercase{text-transform:uppercase}.markstream-react .italic{font-style:italic}.markstream-react .leading-\[normal\]{line-height:normal}.markstream-react .leading-relaxed{line-height:1.625}.markstream-react .text-\[\#0366d6\]{--tw-text-opacity: 1;color:rgb(3 102 214 / var(--tw-text-opacity, 1))}.markstream-react .text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.markstream-react .text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.markstream-react .text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.markstream-react .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.markstream-react .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.markstream-react .text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.markstream-react .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.markstream-react .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.markstream-react .underline{text-decoration-line:underline}.markstream-react .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markstream-react .opacity-50{opacity:.5}.markstream-react .shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.markstream-react .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.markstream-react .outline{outline-style:solid}.markstream-react .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-react .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-react .backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-react .backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-react .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-react .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-react .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-react .duration-100{transition-duration:.1s}.markstream-react .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.markstream-react .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.markstream-react{--border: 214.3 31.8% 91.4%;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--secondary: 210 40% 96%;--muted: 210 40% 96%;--muted-foreground: 215.4 16.3% 46.9%}.markstream-react button{-moz-appearance:none;appearance:none;-webkit-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.dark .markstream-react,.markstream-react.dark{--border: 217.2 32.6% 17.5%;--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--secondary: 217.2 32.6% 17.5%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%}.markdown-renderer{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized{content-visibility:visible;contain-intrinsic-size:auto}.node-slot,.node-content{width:100%}.node-placeholder{width:100%;min-height:1rem;margin:.25rem 0;border-radius:.5rem;background-image:linear-gradient(90deg,#94a3b82e,#94a3b80d,#94a3b82e);background-size:200% 100%;animation:node-placeholder-shimmer 1.1s ease-in-out infinite}.node-placeholder:first-child{margin-top:0}.node-spacer{width:100%}.typewriter-node{opacity:0;animation:typewriter-fade .9s ease-out forwards}.unknown-node{color:#6a737d;font-style:italic;margin:1rem 0}.text-node{display:inline;font-weight:inherit;vertical-align:baseline;white-space:pre-wrap;word-break:break-word}.text-node.text-node-center{display:inline-flex;justify-content:center;width:100%}.paragraph-node{margin:1.25em 0;line-height:1.625}li .paragraph-node{margin:0}.blockquote-node{font-weight:500;font-style:italic;border-left:.25rem solid var(--blockquote-border-color,#e2e8f0);quotes:"“" "”" "‘" "’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.blockquote-node .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node{font-weight:600}.heading-1{margin-top:0;margin-bottom:calc(8 / 9 * 1em);font-size:2.25rem;line-height:calc(10 / 9 * 1);font-weight:800}.heading-2{margin-top:2rem;margin-bottom:1rem;font-size:1.5rem;line-height:calc(4 / 3 * 1)}.heading-3{margin-top:1.6em;margin-bottom:calc(3 / 5 * 1em);font-size:1.25rem;line-height:calc(5 / 3 * 1)}.heading-4,.heading-5,.heading-6{margin-top:1.5rem;margin-bottom:.5rem;font-size:1rem}.heading-5,.heading-6{margin-top:0;margin-bottom:0}.link-node{color:var(--link-color, #0366d6);text-decoration:none}.link-node:hover{text-decoration:underline;text-underline-offset:.2rem}.link-loading .link-text-wrapper{position:relative}.link-loading .link-text{position:relative;z-index:2}.underline-anim{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;transform-origin:center center;will-change:transform,opacity;opacity:var(--underline-opacity, .9);transform:scaleX(0);animation:underlineLoop var(--underline-duration, .8s) var(--underline-timing, linear) var(--underline-iteration, infinite)}@keyframes underlineLoop{0%{transform:scaleX(0);opacity:var(--underline-opacity, .9)}75%{transform:scaleX(1);opacity:var(--underline-opacity, .9)}99%{transform:scaleX(1);opacity:var(--underline-opacity, .9)}to{transform:scaleX(0);opacity:0}}.inline-code{padding:.125rem .375rem;border-radius:.375rem;background:#f3f4f6;font-size:.875rem}.image-node{margin:2rem auto;text-align:center}.image-node__inner{position:relative;display:inline-block;max-width:24rem}.image-node__img{display:inline-block;max-width:24rem;width:100%;border-radius:.75rem;height:auto;opacity:0;transition:opacity .2s ease;box-shadow:0 15px 35px #0f172a14}.image-node__img.is-loaded{opacity:1}.image-node__caption{margin-top:.5rem;font-size:.875rem;color:#6b7280;font-style:italic}.image-node__placeholder,.image-node__error{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;width:100%;padding:1.5rem;border-radius:.75rem}.image-node__placeholder{background:linear-gradient(120deg,#94a3b833,#e2e8f059);color:#475569;box-shadow:inset 0 0 0 1px #94a3b833}.image-node__error{color:#dc2626;background:#f8717114}.image-node__spinner{width:1rem;height:1rem;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:spin 1s linear infinite}.image-node__placeholder-text{font-size:.875rem;color:currentColor}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.footnote-node{border-left:.25rem solid #e2e8f0;padding-left:1rem;margin:1.5rem 0;font-size:.875rem;color:#475569}.admonition-node{border-left:4px solid #e5e7eb;border-radius:.5rem;padding:.75rem 1rem;margin:1.5rem 0;background:#f9fafbe6}.admonition-node__title{font-weight:600;margin-bottom:.5rem}.table-node-wrapper{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scrollbar-gutter:stable}.table-node{table-layout:auto;width:-moz-max-content;width:max-content;min-width:100%;border-collapse:collapse}.table-node--loading{table-layout:fixed;width:100%}.table-node th,.table-node td{white-space:nowrap}.table-node .text-node,.table-node code{white-space:nowrap;overflow-wrap:normal;word-break:normal;max-width:none}.table-node--loading tbody td{position:relative;overflow:hidden}.table-node--loading tbody td>*{visibility:hidden}.table-node--loading tbody td:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:.25rem;background:linear-gradient(90deg,#94a3b829 25%,#94a3b847,#94a3b829 75%);background-size:200% 100%;animation:table-node-shimmer 1.2s linear infinite;will-change:background-position}.table-node__loading{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner{width:2.5rem;height:2.5rem;border-radius:999px;border:2px solid rgba(94,104,121,.25);border-top-color:#5e6879cc;animation:spin 1s linear infinite;will-change:transform}.table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.table-node .markdown-renderer .node-slot,.table-node .markdown-renderer .node-content,.table-node .markdown-renderer .node-space{display:contents}.markdown-renderer .markdown-renderer{content-visibility:visible;contain-intrinsic-size:auto}@keyframes table-node-shimmer{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper{margin-top:0}.hr+.table-node-wrapper .table-node{margin-top:0}.code-block-node{background:#0f172a;color:#fff;border-radius:.75rem;padding:1rem;margin:1.25rem 0;overflow-x:auto;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.code-block{border-radius:.75rem;background:#0f172a;color:#e2e8f0;margin:1.25rem 0;overflow:hidden;position:relative}.code-block--expanded{max-height:none}.code-block-header{display:flex;align-items:center;justify-content:space-between;padding:.65rem .9rem;background:#0f172ad9;border-bottom:1px solid rgba(148,163,184,.2)}.code-block-meta{display:flex;align-items:center;gap:.5rem}.code-block-language{font-size:.825rem;letter-spacing:.08em;text-transform:uppercase;color:#e2e8f0d9}.code-block-badge{font-size:.7rem;padding:.1rem .4rem;border-radius:9999px;background:#3b82f633;color:#bfdbfe}.code-block-actions{display:flex;gap:.35rem}.code-block-btn{border:1px solid rgba(148,163,184,.4);background:#0f172a99;color:#f8fafc;font-size:.75rem;padding:.25rem .65rem;border-radius:.35rem;cursor:pointer;transition:background .2s ease,color .2s ease,border-color .2s ease}.code-block-btn:hover{background:#3b82f6cc;border-color:#3b82f699}.code-block-body{position:relative;min-height:120px}.code-block-body--expanded{max-height:none}.code-block-body--collapsed{min-height:0;height:0;overflow:hidden}.code-block-monaco{min-height:120px}.code-block-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#0f172a99;backdrop-filter:blur(2px)}.code-block-spinner{width:2rem;height:2rem;border:2px solid rgba(255,255,255,.3);border-top-color:#ffffffe6;border-radius:9999px;animation:spin 1s linear infinite}.code-block-footer{padding:.35rem .9rem .7rem;border-top:1px solid rgba(148,163,184,.2);font-size:.75rem;color:#e2e8f0cc}.mermaid-block{border:1px solid rgba(148,163,184,.3);border-radius:1rem;background:#fff;color:#0f172a;margin:1.25rem 0;overflow:hidden}.dark .mermaid-block{background:#0f172a;color:#e2e8f0;border-color:#94a3b866}.mermaid-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;flex-direction:column;background:#0009}.mermaid-modal-panel{position:relative;width:min(64rem,calc(100% - 2rem));margin:2rem auto;border-radius:.75rem;overflow:hidden;background:#fff;color:#0f172a;box-shadow:0 24px 60px #00000038}.mermaid-modal-panel.is-dark{background:#0f172a;color:#e2e8f0}.mermaid-modal-header{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;border-bottom:1px solid rgba(148,163,184,.25)}.mermaid-modal-panel.is-dark .mermaid-modal-header{border-bottom-color:#94a3b840}.mermaid-modal-title{font-size:.875rem;font-weight:600}.mermaid-modal-close{font-size:.875rem;padding:.25rem .5rem;border-radius:.375rem;cursor:pointer;opacity:.9}.mermaid-modal-close:hover{opacity:1;background:#94a3b829}.mermaid-modal-body{padding:1rem;max-height:80vh;overflow:auto}.mermaid-modal-content{width:100%;height:100%;display:flex;justify-content:center}.fullscreen{width:100%;max-height:100%!important;height:100%!important}.mermaid-header{display:flex;align-items:center;justify-content:space-between;padding:.65rem .9rem;border-bottom:1px solid rgba(148,163,184,.3);background:#f8fafcd9}.dark .mermaid-header{background:#0f172ad9;border-color:#47556999}.mermaid-title__text{font-size:.85rem;letter-spacing:.08em;text-transform:uppercase;color:inherit}.mermaid-actions{display:flex;align-items:center;gap:.35rem}.mermaid-btn{border:1px solid rgba(148,163,184,.4);background:transparent;color:inherit;font-size:.75rem;padding:.2rem .65rem;border-radius:.35rem;cursor:pointer;transition:background .2s ease,color .2s ease}.mermaid-btn:hover{background:#3b82f626;color:#1d4ed8}.dark .mermaid-btn:hover{background:#3b82f64d;color:#bfdbfe}.mermaid-toggle{display:inline-flex;border-radius:9999px;border:1px solid rgba(148,163,184,.3);overflow:hidden}.mermaid-toggle-btn{border:none;background:transparent;color:inherit;font-size:.75rem;padding:.2rem .65rem;cursor:pointer;transition:background .2s ease}.mermaid-toggle-btn--active{background:#3b82f62e;color:#1d4ed8}.dark .mermaid-toggle-btn--active{background:#3b82f64d;color:#bfdbfe}.mermaid-body{position:relative;padding:1rem}.mermaid-preview{width:100%;min-height:180px;display:flex;align-items:center;justify-content:center;text-align:center}.mermaid-preview svg{width:100%;height:auto}.mermaid-source{background:#0f172af2;color:#e2e8f0;border-radius:.5rem;padding:1rem;overflow-x:auto}.mermaid-error{padding:.85rem 1rem;color:#b91c1c;background:#f8717126;border-top:1px solid rgba(248,113,113,.25)}.mermaid-loading{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem 1rem;font-size:.85rem;color:#0f172a99}.dark .mermaid-loading{color:#e2e8f0b3}.mermaid-spinner{width:1.2rem;height:1.2rem;border:2px solid rgba(59,130,246,.4);border-top-color:#3b82f6e6;border-radius:9999px;animation:spin .9s linear infinite}.math-block-node{margin:1rem 0}.math-inline-wrapper{position:relative;display:inline-block}.math-inline{display:inline-block;vertical-align:middle}.math-inline--hidden{visibility:hidden}.math-inline__loading{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner{width:1rem;height:1rem;border-radius:9999px;border:2px solid rgba(94,104,121,.25);border-top-color:#5e6879cc;animation:spin 1s linear infinite}.math-block{position:relative;text-align:center;overflow-x:auto;min-height:40px;padding:.5rem}.math-rendering{opacity:.3;transition:opacity .2s ease}.thematic-break{margin:3rem 0;border-top:1px solid #e2e8f0}.hr-node{margin:3rem 0;border-top:1px solid var(--hr-border-color, #e2e8f0)}.hard-break{display:block}.checkbox-node{margin-right:.5rem;vertical-align:middle}.checkbox-input{margin:0;cursor:default}.html-inline-node{display:inline}.html-inline-node--loading{opacity:.85}.html-block-node__placeholder{display:flex;flex-direction:column;gap:.35rem;padding:.5rem 0}.html-block-node__placeholder-bar{display:block;height:.8rem;border-radius:9999px;background-image:linear-gradient(90deg,#94a3b859,#94a3b81a,#94a3b859);background-size:200% 100%;animation:html-block-node-shimmer 1.2s ease infinite}@keyframes html-block-node-shimmer{0%{background-position:0% 0%}to{background-position:200% 0%}}.vmr-container{border-radius:.5rem;border:1px solid rgba(148,163,184,.35);padding:1rem;margin:1rem 0;border-left-width:4px}.admonition{--admonition-bg: #f8f8f8;--admonition-border: #eaecef;--admonition-header-bg: rgba(0, 0, 0, .03);--admonition-text: #111827;--admonition-muted: #374151;--admonition-note-color: #448aff;--admonition-tip-color: #00bfa5;--admonition-warning-color: #ff9100;--admonition-danger-color: #ff5252;margin:1rem 0;padding:0;border-radius:4px;border-left:4px solid var(--admonition-border);background-color:var(--admonition-bg);color:var(--admonition-text);overflow:hidden}.admonition-header{padding:.5rem 1rem;font-weight:600;display:flex;align-items:center;background-color:var(--admonition-header-bg);color:var(--admonition-muted)}.admonition-icon{margin-right:.5rem;color:inherit}.admonition-content{padding:.5rem 1rem 1rem;color:var(--admonition-text)}.admonition-note{border-left-color:var(--admonition-note-color)}.admonition-note .admonition-header{background-color:#448aff0f;color:var(--admonition-note-color)}.admonition-info{border-left-color:var(--admonition-note-color)}.admonition-info .admonition-header{background-color:#448aff0f;color:var(--admonition-note-color)}.admonition-tip{border-left-color:var(--admonition-tip-color)}.admonition-tip .admonition-header{background-color:#00bfa50f;color:var(--admonition-tip-color)}.admonition-warning{border-left-color:var(--admonition-warning-color)}.admonition-warning .admonition-header{background-color:#ff91000f;color:var(--admonition-warning-color)}.admonition-danger{border-left-color:var(--admonition-danger-color)}.admonition-danger .admonition-header{background-color:#ff52520f;color:var(--admonition-danger-color)}.admonition-error{border-left-color:var(--admonition-danger-color)}.admonition-error .admonition-header{background-color:#ff52520f;color:var(--admonition-danger-color)}.admonition-caution{border-left-color:var(--admonition-warning-color)}.admonition-caution .admonition-header{background-color:#ff91000f;color:var(--admonition-warning-color)}.admonition-toggle{margin-left:auto;background:transparent;border:none;color:inherit;cursor:pointer;padding:.25rem .5rem;border-radius:4px;font-size:.9rem}.admonition-toggle:focus{outline:2px solid rgba(0,0,0,.08);outline-offset:2px}.admonition.is-dark{--admonition-bg: #0b1220;--admonition-border: rgba(255, 255, 255, .06);--admonition-header-bg: rgba(255, 255, 255, .03);--admonition-text: #e6eef8;--admonition-muted: #cbd5e1}.code-block-container{contain:content;content-visibility:auto;contain-intrinsic-size:320px 180px}.code-editor-container,.code-height-placeholder{min-height:120px}.code-action-btn{cursor:pointer;opacity:.7;transition:opacity .2s}.code-action-btn:hover{opacity:1}.code-action-btn:disabled{opacity:.5;cursor:not-allowed}.code-action-btn:disabled:hover{background-color:transparent}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg,.icon-slot img{display:block;width:100%;height:100%}.code-block-container .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background, #111827)}.code-block-content{max-height:min(70vh,500px);overflow:auto;transition:max-height .3s ease;font-family:var(--vscode-editor-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);line-height:var(--vscode-editor-line-height, 1.5)}.code-block-render{min-height:1px}.code-fallback-plain{white-space:pre;overflow:auto;background:transparent;color:inherit;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-family:var(--vscode-editor-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-weight:var(--vscode-editor-font-weight, 400)}.code-fallback-plain>code{font-size:inherit;line-height:inherit;font-family:inherit;font-weight:inherit}.code-loading-placeholder{padding:1rem;min-height:120px}.loading-skeleton{display:flex;flex-direction:column;gap:.75rem}.skeleton-line{height:1rem;background:linear-gradient(90deg,#0000000f 25%,#0000001f 37%,#0000000f 63%);background-size:400% 100%;animation:code-skeleton-shimmer 1.2s ease-in-out infinite;border-radius:.25rem}.code-block-container.is-dark .skeleton-line{background:linear-gradient(90deg,#ffffff0f 25%,#ffffff1f 37%,#ffffff0f 63%);background-size:400% 100%}.skeleton-line.short{width:60%}@keyframes code-skeleton-shimmer{0%{background-position:100% 0}to{background-position:0 0}}.markstream-react pre[class^=language-],.markstream-react pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-react pre[class^=language-]>code,.markstream-react pre[class*=" language-"]>code{display:block}.markstream-react pre[class^=language-]:focus,.markstream-react pre[class*=" language-"]:focus{outline:2px solid var(--vmdr-focus, #3b82f6);outline-offset:2px}.html-preview-frame__backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame__backdrop--dark{background-color:#0f172acc}.html-preview-frame{width:80vw;max-width:960px;height:70vh;background-color:#fff;border-radius:.5rem;overflow:hidden;box-shadow:0 10px 40px #00000040;display:flex;flex-direction:column}.html-preview-frame--dark{background-color:#020617;color:#e5e7eb;box-shadow:0 10px 40px #0009}.html-preview-frame__header{display:flex;justify-content:space-between;align-items:center;padding:.4rem .75rem;border-bottom:1px solid rgba(0,0,0,.06)}.html-preview-frame--dark .html-preview-frame__header{border-bottom-color:#94a3b859}.html-preview-frame__title{display:inline-flex;align-items:center;gap:.4rem;font-size:.75rem;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot{width:.5rem;height:.5rem;border-radius:999px;background-color:#22c55e}.html-preview-frame--dark .html-preview-frame__dot{background-color:#4ade80}.html-preview-frame__label{white-space:nowrap}.html-preview-frame__close{border:none;background:transparent;font-size:1.25rem;line-height:1;cursor:pointer}.html-preview-frame__close--dark{color:#e5e7eb}.html-preview-frame__iframe{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame{width:100vw;height:80vh;border-radius:0}}.ms-tooltip{position:fixed;padding:.4rem .65rem;font-size:.875rem;border-radius:.375rem;border-width:1px;border-style:solid;box-shadow:0 10px 15px #00000014;pointer-events:none;z-index:9999;opacity:0;transition:opacity .12s linear,transform .22s cubic-bezier(.16,1,.3,1)}.ms-tooltip[data-visible=true]{opacity:1}.ms-tooltip[data-dark=true]{background-color:#111827;color:#f9fafb;border-color:#374151}.ms-tooltip[data-dark=false],.ms-tooltip:not([data-dark=true]){background-color:#fff;color:#111827;border-color:#e5e7eb}@keyframes node-placeholder-shimmer{0%{background-position:200% 0%}to{background-position:-200% 0%}}@keyframes typewriter-fade{0%{opacity:0}to{opacity:1}}.markstream-react .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes spin{to{transform:rotate(360deg)}}.markstream-react .hover\:bg-\[var\(--vscode-editor-selectionBackground\)\]:hover{background-color:var(--vscode-editor-selectionBackground)}.markstream-react .hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.markstream-react .hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.markstream-react .hover\:bg-secondary:hover{background-color:hsl(var(--secondary),214.3 21.44% 93.4%)}.markstream-react .hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.markstream-react .hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.markstream-react .hover\:underline:hover{text-decoration-line:underline}@media not all and (min-width:1024px){.markstream-react .max-lg\:my-\[calc\(4\/3\*1em\)\]{margin-top:calc(4 / 3 * 1em);margin-bottom:calc(4 / 3 * 1em)}.markstream-react .max-lg\:pl-\[calc\(14\/9\*1em\)\]{padding-left:calc(14 / 9 * 1em)}}
package/dist/index.js CHANGED
@@ -1,31 +1,31 @@
1
- import e,{useMemo as t,useState as n,createContext as r,useContext as o,useRef as i,useEffect as l,useCallback as a,useSyncExternalStore as s,useLayoutEffect as c}from"react";import{getMarkdown as d,parseMarkdownToStructure as u}from"stream-markdown-parser";import{autoUpdate as m,computePosition as h,offset as p,flip as f,shift as g}from"@floating-ui/dom";import{createPortal as v}from"react-dom";var w,x,y,b={exports:{}},k={},j={};var M=(y||(y=1,"production"===process.env.NODE_ENV?b.exports=function(){if(w)return k;w=1;var t=e,n=/* @__PURE__ */Symbol.for("react.element"),r=/* @__PURE__ */Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,r){var a,s={},c=null,d=null;for(a in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)o.call(t,a)&&!l.hasOwnProperty(a)&&(s[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===s[a]&&(s[a]=t[a]);return{$$typeof:n,type:e,key:c,ref:d,props:s,_owner:i.current}}return k.Fragment=r,k.jsx=a,k.jsxs=a,k}():b.exports=(x||(x=1,"production"!==process.env.NODE_ENV&&function(){var t,n=e,r=/* @__PURE__ */Symbol.for("react.element"),o=/* @__PURE__ */Symbol.for("react.portal"),i=/* @__PURE__ */Symbol.for("react.fragment"),l=/* @__PURE__ */Symbol.for("react.strict_mode"),a=/* @__PURE__ */Symbol.for("react.profiler"),s=/* @__PURE__ */Symbol.for("react.provider"),c=/* @__PURE__ */Symbol.for("react.context"),d=/* @__PURE__ */Symbol.for("react.forward_ref"),u=/* @__PURE__ */Symbol.for("react.suspense"),m=/* @__PURE__ */Symbol.for("react.suspense_list"),h=/* @__PURE__ */Symbol.for("react.memo"),p=/* @__PURE__ */Symbol.for("react.lazy"),f=/* @__PURE__ */Symbol.for("react.offscreen"),g=Symbol.iterator,v=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map(function(e){return String(e)});o.unshift("Warning: "+t),Function.prototype.apply.call(console.error,console,o)}(0,e,n)}function x(e){return e.displayName||"Context"}function y(e){if(null==e)return null;if("number"==typeof e.tag&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case o:return"Portal";case a:return"Profiler";case l:return"StrictMode";case u:return"Suspense";case m:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return x(e)+".Consumer";case s:return x(e._context)+".Provider";case d:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case h:var t=e.displayName||null;return null!==t?t:y(e.type)||"Memo";case p:var n=e,r=n._payload,f=n._init;try{return y(f(r))}catch(g){return null}}return null}t=/* @__PURE__ */Symbol.for("react.module.reference");var b,k,M,N,C,S,B,E=Object.assign,_=0;function T(){}T.__reactDisabledLog=!0;var L,$=v.ReactCurrentDispatcher;function O(e,t,n){if(void 0===L)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);L=r&&r[1]||""}return"\n"+L+e}var P,R=!1,D="function"==typeof WeakMap?WeakMap:Map;function W(e,t){if(!e||R)return"";var n,r=P.get(e);if(void 0!==r)return r;R=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=$.current,$.current=null,function(){if(0===_){b=console.log,k=console.info,M=console.warn,N=console.error,C=console.group,S=console.groupCollapsed,B=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}_++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(p){n=p}Reflect.construct(e,[],l)}else{try{l.call()}catch(p){n=p}e.call(l.prototype)}}else{try{throw Error()}catch(p){n=p}e()}}catch(f){if(f&&n&&"string"==typeof f.stack){for(var a=f.stack.split("\n"),s=n.stack.split("\n"),c=a.length-1,d=s.length-1;c>=1&&d>=0&&a[c]!==s[d];)d--;for(;c>=1&&d>=0;c--,d--)if(a[c]!==s[d]){if(1!==c||1!==d)do{if(c--,--d<0||a[c]!==s[d]){var u="\n"+a[c].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),"function"==typeof e&&P.set(e,u),u}}while(c>=1&&d>=0);break}}}finally{R=!1,$.current=o,function(){if(0===--_){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:E({},e,{value:b}),info:E({},e,{value:k}),warn:E({},e,{value:M}),error:E({},e,{value:N}),group:E({},e,{value:C}),groupCollapsed:E({},e,{value:S}),groupEnd:E({},e,{value:B})})}_<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var m=e?e.displayName||e.name:"",h=m?O(m):"";return"function"==typeof e&&P.set(e,h),h}function A(e,t,n){if(null==e)return"";if("function"==typeof e)return W(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return O(e);switch(e){case u:return O("Suspense");case m:return O("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case d:return W(e.render,!1);case h:return A(e.type,t,n);case p:var o=e,i=o._payload,l=o._init;try{return A(l(i),t,n)}catch(a){}}return""}P=new D;var I=Object.prototype.hasOwnProperty,F={},z=v.ReactDebugCurrentFrame;function H(e){if(e){var t=e._owner,n=A(e.type,e._source,t?t.type:null);z.setExtraStackFrame(n)}else z.setExtraStackFrame(null)}var V=Array.isArray;function K(e){return V(e)}function X(e){return""+e}function q(e){if(function(e){try{return X(e),!1}catch(t){return!0}}(e))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),X(e)}var U,Y,Z,J=v.ReactCurrentOwner,G={key:!0,ref:!0,__self:!0,__source:!0},Q=v.ReactCurrentOwner,ee=v.ReactDebugCurrentFrame;function te(e){if(e){var t=e._owner,n=A(e.type,e._source,t?t.type:null);ee.setExtraStackFrame(n)}else ee.setExtraStackFrame(null)}function ne(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function re(){if(Q.current){var e=y(Q.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Z=!1;var oe={};function ie(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=re();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!oe[n]){oe[n]=!0;var r="";e&&e._owner&&e._owner!==Q.current&&(r=" It was passed a child from "+y(e._owner.type)+"."),te(e),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),te(null)}}}function le(e,t){if("object"==typeof e)if(K(e))for(var n=0;n<e.length;n++){var r=e[n];ne(r)&&ie(r,t)}else if(ne(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=g&&e[g]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,l=o.call(e);!(i=l.next()).done;)ne(i.value)&&ie(i.value,t)}}var ae={};function se(e,n,o,g,v,x){var b=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===l||e===u||e===m||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===t||void 0!==e.getModuleId)}(e);if(!b){var k,j="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(j+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),j+=re(),null===e?k="null":K(e)?k="array":void 0!==e&&e.$$typeof===r?(k="<"+(y(e.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):k=typeof e,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,j)}var M=function(e,t,n,o,i){var l,a={},s=null,c=null;for(l in void 0!==n&&(q(n),s=""+n),function(e){if(I.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(q(t.key),s=""+t.key),function(e){if(I.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e){"string"==typeof e.ref&&J.current}(t)),t)I.call(t,l)&&!G.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var d=e.defaultProps;for(l in d)void 0===a[l]&&(a[l]=d[l])}if(s||c){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){U||(U=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(a,u),c&&function(e,t){var n=function(){Y||(Y=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(a,u)}return function(e,t,n,o,i,l,a){var s={$$typeof:r,type:e,key:t,ref:n,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,J.current,a)}(e,n,o,v,x);if(null==M)return M;if(b){var N=n.children;if(void 0!==N)if(g)if(K(N)){for(var C=0;C<N.length;C++)le(N[C],e);Object.freeze&&Object.freeze(N)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else le(N,e)}if(I.call(n,"key")){var S=y(e),B=Object.keys(n).filter(function(e){return"key"!==e}),E=B.length>0?"{key: someKey, "+B.join(": ..., ")+": ...}":"{key: someKey}";ae[S+E]||(w('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',E,S,B.length>0?"{"+B.join(": ..., ")+": ...}":"{}",S),ae[S+E]=!0)}return e===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){te(e),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),te(null);break}}null!==e.ref&&(te(e),w("Invalid attribute `ref` supplied to `React.Fragment`."),te(null))}(M):function(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==d&&n.$$typeof!==h)return;t=n.propTypes}if(t){var r=y(n);!function(e,t,n,r,o){var i=Function.call.bind(I);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}!a||a instanceof Error||(H(o),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,l,typeof a),H(null)),a instanceof Error&&!(a.message in F)&&(F[a.message]=!0,H(o),w("Failed %s type: %s",n,a.message),H(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||Z||(Z=!0,w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",y(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}(M),M}j.Fragment=i,j.jsx=function(e,t,n){return se(e,t,n,!1)},j.jsxs=function(e,t,n){return se(e,t,n,!0)}}()),j)),b.exports);const N=/* @__PURE__ */new Set(["image","table","code_block","html_block","blockquote","list","list_item","definition_list","footnote","footnote_reference","footnote_anchor","admonition","thematic_break","math_block","thinking","vmr_container"]);function C(e){if(Array.isArray(e)&&0!==e.length)return e.reduce((e,[t,n])=>t?(e["for"===t?"htmlFor":"class"===t?"className":t]=null==n||n,e):e,{})}function S(e,t,n,r){if(!Array.isArray(e)||0===e.length)return null;const o=[];for(let i=0;i<e.length;i++){const l=e[i];if(l){if("label_open"===l.type){const a=[];for(i++;i<e.length;){const t=e[i];if("label_close"===(null==t?void 0:t.type))break;t&&a.push(t),i++}const s=`${n}-label-${i}`;o.push(
1
+ import e,{useMemo as t,useState as n,useContext as r,createContext as o,useRef as i,useEffect as l,useCallback as a,useSyncExternalStore as s,useLayoutEffect as c}from"react";import{getMarkdown as d,parseMarkdownToStructure as u}from"stream-markdown-parser";import{autoUpdate as m,computePosition as h,offset as p,flip as f,shift as g}from"@floating-ui/dom";import{createPortal as w}from"react-dom";var v,x,y,b={exports:{}},k={},j={};var M=(y||(y=1,"production"===process.env.NODE_ENV?b.exports=function(){if(v)return k;v=1;var t=e,n=/* @__PURE__ */Symbol.for("react.element"),r=/* @__PURE__ */Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,r){var a,s={},c=null,d=null;for(a in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)o.call(t,a)&&!l.hasOwnProperty(a)&&(s[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===s[a]&&(s[a]=t[a]);return{$$typeof:n,type:e,key:c,ref:d,props:s,_owner:i.current}}return k.Fragment=r,k.jsx=a,k.jsxs=a,k}():b.exports=(x||(x=1,"production"!==process.env.NODE_ENV&&function(){var t,n=e,r=/* @__PURE__ */Symbol.for("react.element"),o=/* @__PURE__ */Symbol.for("react.portal"),i=/* @__PURE__ */Symbol.for("react.fragment"),l=/* @__PURE__ */Symbol.for("react.strict_mode"),a=/* @__PURE__ */Symbol.for("react.profiler"),s=/* @__PURE__ */Symbol.for("react.provider"),c=/* @__PURE__ */Symbol.for("react.context"),d=/* @__PURE__ */Symbol.for("react.forward_ref"),u=/* @__PURE__ */Symbol.for("react.suspense"),m=/* @__PURE__ */Symbol.for("react.suspense_list"),h=/* @__PURE__ */Symbol.for("react.memo"),p=/* @__PURE__ */Symbol.for("react.lazy"),f=/* @__PURE__ */Symbol.for("react.offscreen"),g=Symbol.iterator,w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=w.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map(function(e){return String(e)});o.unshift("Warning: "+t),Function.prototype.apply.call(console.error,console,o)}(0,e,n)}function x(e){return e.displayName||"Context"}function y(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case o:return"Portal";case a:return"Profiler";case l:return"StrictMode";case u:return"Suspense";case m:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return x(e)+".Consumer";case s:return x(e._context)+".Provider";case d:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case h:var t=e.displayName||null;return null!==t?t:y(e.type)||"Memo";case p:var n=e,r=n._payload,f=n._init;try{return y(f(r))}catch(g){return null}}return null}t=/* @__PURE__ */Symbol.for("react.module.reference");var b,k,M,N,C,S,B,E=Object.assign,_=0;function T(){}T.__reactDisabledLog=!0;var L,$=w.ReactCurrentDispatcher;function O(e,t,n){if(void 0===L)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);L=r&&r[1]||""}return"\n"+L+e}var P,R=!1,D="function"==typeof WeakMap?WeakMap:Map;function W(e,t){if(!e||R)return"";var n,r=P.get(e);if(void 0!==r)return r;R=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=$.current,$.current=null,function(){if(0===_){b=console.log,k=console.info,M=console.warn,N=console.error,C=console.group,S=console.groupCollapsed,B=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}_++}();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(l,[])}catch(p){n=p}Reflect.construct(e,[],l)}else{try{l.call()}catch(p){n=p}e.call(l.prototype)}}else{try{throw Error()}catch(p){n=p}e()}}catch(f){if(f&&n&&"string"==typeof f.stack){for(var a=f.stack.split("\n"),s=n.stack.split("\n"),c=a.length-1,d=s.length-1;c>=1&&d>=0&&a[c]!==s[d];)d--;for(;c>=1&&d>=0;c--,d--)if(a[c]!==s[d]){if(1!==c||1!==d)do{if(c--,--d<0||a[c]!==s[d]){var u="\n"+a[c].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),"function"==typeof e&&P.set(e,u),u}}while(c>=1&&d>=0);break}}}finally{R=!1,$.current=o,function(){if(0===--_){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:E({},e,{value:b}),info:E({},e,{value:k}),warn:E({},e,{value:M}),error:E({},e,{value:N}),group:E({},e,{value:C}),groupCollapsed:E({},e,{value:S}),groupEnd:E({},e,{value:B})})}_<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var m=e?e.displayName||e.name:"",h=m?O(m):"";return"function"==typeof e&&P.set(e,h),h}function A(e,t,n){if(null==e)return"";if("function"==typeof e)return W(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return O(e);switch(e){case u:return O("Suspense");case m:return O("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case d:return W(e.render,!1);case h:return A(e.type,t,n);case p:var o=e,i=o._payload,l=o._init;try{return A(l(i),t,n)}catch(a){}}return""}P=new D;var I=Object.prototype.hasOwnProperty,F={},z=w.ReactDebugCurrentFrame;function H(e){if(e){var t=e._owner,n=A(e.type,e._source,t?t.type:null);z.setExtraStackFrame(n)}else z.setExtraStackFrame(null)}var V=Array.isArray;function K(e){return V(e)}function X(e){return""+e}function q(e){if(function(e){try{return X(e),!1}catch(t){return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),X(e)}var U,Y,Z,J=w.ReactCurrentOwner,G={key:!0,ref:!0,__self:!0,__source:!0},Q=w.ReactCurrentOwner,ee=w.ReactDebugCurrentFrame;function te(e){if(e){var t=e._owner,n=A(e.type,e._source,t?t.type:null);ee.setExtraStackFrame(n)}else ee.setExtraStackFrame(null)}function ne(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function re(){if(Q.current){var e=y(Q.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Z=!1;var oe={};function ie(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=re();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!oe[n]){oe[n]=!0;var r="";e&&e._owner&&e._owner!==Q.current&&(r=" It was passed a child from "+y(e._owner.type)+"."),te(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),te(null)}}}function le(e,t){if("object"==typeof e)if(K(e))for(var n=0;n<e.length;n++){var r=e[n];ne(r)&&ie(r,t)}else if(ne(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=g&&e[g]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,l=o.call(e);!(i=l.next()).done;)ne(i.value)&&ie(i.value,t)}}var ae={};function se(e,n,o,g,w,x){var b=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===l||e===u||e===m||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===t||void 0!==e.getModuleId)}(e);if(!b){var k,j="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(j+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),j+=re(),null===e?k="null":K(e)?k="array":void 0!==e&&e.$$typeof===r?(k="<"+(y(e.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):k=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,j)}var M=function(e,t,n,o,i){var l,a={},s=null,c=null;for(l in void 0!==n&&(q(n),s=""+n),function(e){if(I.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(q(t.key),s=""+t.key),function(e){if(I.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e){"string"==typeof e.ref&&J.current}(t)),t)I.call(t,l)&&!G.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var d=e.defaultProps;for(l in d)void 0===a[l]&&(a[l]=d[l])}if(s||c){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){U||(U=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(a,u),c&&function(e,t){var n=function(){Y||(Y=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(a,u)}return function(e,t,n,o,i,l,a){var s={$$typeof:r,type:e,key:t,ref:n,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,J.current,a)}(e,n,o,w,x);if(null==M)return M;if(b){var N=n.children;if(void 0!==N)if(g)if(K(N)){for(var C=0;C<N.length;C++)le(N[C],e);Object.freeze&&Object.freeze(N)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else le(N,e)}if(I.call(n,"key")){var S=y(e),B=Object.keys(n).filter(function(e){return"key"!==e}),E=B.length>0?"{key: someKey, "+B.join(": ..., ")+": ...}":"{key: someKey}";ae[S+E]||(v('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',E,S,B.length>0?"{"+B.join(": ..., ")+": ...}":"{}",S),ae[S+E]=!0)}return e===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){te(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),te(null);break}}null!==e.ref&&(te(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),te(null))}(M):function(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==d&&n.$$typeof!==h)return;t=n.propTypes}if(t){var r=y(n);!function(e,t,n,r,o){var i=Function.call.bind(I);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var s=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}!a||a instanceof Error||(H(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,l,typeof a),H(null)),a instanceof Error&&!(a.message in F)&&(F[a.message]=!0,H(o),v("Failed %s type: %s",n,a.message),H(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||Z||(Z=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",y(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}(M),M}j.Fragment=i,j.jsx=function(e,t,n){return se(e,t,n,!1)},j.jsxs=function(e,t,n){return se(e,t,n,!0)}}()),j)),b.exports);const N=/* @__PURE__ */new Set(["image","table","code_block","html_block","blockquote","list","list_item","definition_list","footnote","footnote_reference","footnote_anchor","admonition","thematic_break","math_block","thinking","vmr_container"]);function C(e){if(Array.isArray(e)&&0!==e.length)return e.reduce((e,[t,n])=>t?(e["for"===t?"htmlFor":"class"===t?"className":t]=null==n||n,e):e,{})}function S(e,t,n,r){if(!Array.isArray(e)||0===e.length)return null;const o=[];for(let i=0;i<e.length;i++){const l=e[i];if(l){if("label_open"===l.type){const a=[];for(i++;i<e.length;){const t=e[i];if("label_close"===(null==t?void 0:t.type))break;t&&a.push(t),i++}const s=`${n}-label-${i}`;o.push(
2
2
  /* @__PURE__ */M.jsx("label",{...C(l.attrs),children:S(a,t,`${s}-child`,r)},s));continue}"label_close"!==l.type&&o.push(r(l,`${n}-${i}`,t))}}return o}function B(e,t,n,r){/* @__PURE__ */
3
3
  return M.jsx(M.Fragment,{children:S(e,t,`${n}-inline`,r)})}const E={note:"ℹ️",info:"ℹ️",tip:"💡",warning:"⚠️",danger:"❗",error:"⛔",caution:"⚠️"};function _(e){const{node:r,ctx:o,renderNode:i,indexKey:l,isDark:a}=e,s=String(r.kind||"note"),c=t(()=>r.title&&String(r.title).trim().length?String(r.title):s.charAt(0).toUpperCase()+s.slice(1),[s,r.title]),[d,u]=n(()=>{var e;return!!r.collapsible&&!(null==(e=r.open)||e)}),m=t(()=>`admonition-${Math.random().toString(36).slice(2,9)}`,[]);/* @__PURE__ */
4
4
  return M.jsxs("div",{className:`admonition admonition-${s}${a?" is-dark":""}`,"data-index-key":l,children:[
5
5
  /* @__PURE__ */M.jsxs("div",{id:m,className:"admonition-header",children:[E[s]&&/* @__PURE__ */M.jsx("span",{className:"admonition-icon",children:E[s]}),
6
- /* @__PURE__ */M.jsx("span",{className:"admonition-title",children:c}),r.collapsible&&/* @__PURE__ */M.jsx("button",{type:"button",className:"admonition-toggle","aria-expanded":!d,"aria-controls":`${m}-content`,title:d?"Expand":"Collapse",onClick:()=>u(e=>!e),children:/* @__PURE__ */M.jsx("span",{children:d?"▶":"▼"})})]}),!d&&/* @__PURE__ */M.jsx("div",{id:`${m}-content`,className:"admonition-content","aria-labelledby":m,children:o&&i?S(r.children,o,String(null!=l?l:m),i):null})]})}const T=r(null);function L(e,t){const n="undefined"!=typeof window&&"undefined"!=typeof document,r=/* @__PURE__ */new Map;return(o,i)=>{var l,a;const s={current:!1};let c,d=!1;const u=new Promise(e=>{c=()=>{d||(d=!0,e())}}),m=()=>{for(const e of r.values())if(e.targets.has(o)){e.targets.delete(o);try{e.observer.unobserve(o)}catch{}}};if(!n||!t())return s.current=!0,c(),{isVisible:()=>!0,whenVisible:u,destroy:m};const h=((t,o)=>{var i,l;if(!n)return null;if("undefined"==typeof IntersectionObserver)return null;const a=null!=(i=e())?i:null,s=`${t}::${o}`,c=r.get(s);if(c&&c.root===a)return c;if(c){try{c.observer.disconnect()}catch{}r.delete(s)}const d=null!=(l=null==c?void 0:c.targets)?l:/* @__PURE__ */new Map,u=new IntersectionObserver(e=>{for(const t of e){const e=d.get(t.target);if(e&&(t.isIntersecting||t.intersectionRatio>0)){e.state.current=!0;try{e.resolve()}catch{}try{u.unobserve(t.target)}catch{}d.delete(t.target)}}},{root:a,rootMargin:t,threshold:o}),m={observer:u,root:a,rootMargin:t,threshold:o,targets:d};r.set(s,m);for(const e of d.keys())u.observe(e);return m})(null!=(l=null==i?void 0:i.rootMargin)?l:"300px",null!=(a=null==i?void 0:i.threshold)?a:0);return h?(h.targets.set(o,{resolve:c,state:s}),h.observer.observe(o),{isVisible:()=>s.current,whenVisible:u,destroy:m}):(s.current=!0,c(),{isVisible:()=>!0,whenVisible:u,destroy:m})}}const $=L(()=>null,()=>!0);function O({getRoot:e,enabled:n=!0,children:r}){const o=i(n);o.current=n;const l=i(e);l.current=e;const a=t(()=>L(()=>{var e,t;return null!=(t=null==(e=l.current)?void 0:e.call(l))?t:null},()=>o.current),[]);/* @__PURE__ */
7
- return M.jsx(T.Provider,{value:a,children:r})}function P(){var e;return null!=(e=o(T))?e:$}const R="__global__",D="__MARKSTREAM_REACT_CUSTOM_COMPONENTS_STORE__",W=(()=>{const e=globalThis;if(e[D])return e[D];const t={scopedComponents:{},revision:0,listeners:/* @__PURE__ */new Set};return e[D]=t,t})();function A(){W.revision++;for(const e of Array.from(W.listeners))try{e()}catch{}}function I(e){return W.listeners.add(e),()=>{W.listeners.delete(e)}}function F(){return W.revision}function z(e,t){"string"==typeof e?W.scopedComponents[e]={...t||{}}:W.scopedComponents[R]={...e},A()}function H(e){const t=W.scopedComponents[R]||{};if(!e)return t;const n=W.scopedComponents[e]||{};return t&&0!==Object.keys(t).length?n&&0!==Object.keys(n).length?{...t,...n}:t:n}function V(e){if(e===R)throw new Error("removeCustomComponents: cannot delete global mapping; call clearGlobalCustomComponents instead.");delete W.scopedComponents[e],A()}function K(){delete W.scopedComponents[R],A()}function X(e){const{node:t}=e;/* @__PURE__ */
8
- return M.jsx("span",{className:"checkbox-node",children:/* @__PURE__ */M.jsx("input",{type:"checkbox",checked:Boolean(t.checked),disabled:!0,className:"checkbox-input",readOnly:!0})})}const q={"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 U(e){Object.assign(q,e)}function Y(){return{t:e=>{var t;return null!=(t=q[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)}}}let Z=null,J=null,G=null,Q=null,ee=null,te=null;function ne(){Q&&(clearTimeout(Q),Q=null),ee&&(clearTimeout(ee),ee=null)}async function re(e){if(!Z||!J)return;const{x:t,y:n}=await h(J,Z,{placement:e,middleware:[p(8),f(),g({padding:8})],strategy:"fixed"});Z.style.transform=`translate3d(${Math.round(t)}px, ${Math.round(n)}px, 0)`}function oe(e,t,n="top",r=!1,o,i){if(!e||"undefined"==typeof document)return;if(Z||"undefined"==typeof document||(Z=document.createElement("div"),Z.className="ms-tooltip",Z.setAttribute("role","tooltip"),Z.dataset.visible="false",Z.style.position="fixed",Z.style.left="0px",Z.style.top="0px",Z.style.transform="translate3d(0,0,0)",document.body.appendChild(Z)),!Z)return;ne();const l=async()=>{if(Z){J=e,Z.textContent=t,Z.dataset.placement=n,Z.dataset.dark=function(e){if("boolean"==typeof e)return e;if("undefined"!=typeof document)try{if(document.documentElement.classList.contains("dark"))return!0}catch{}if("undefined"!=typeof window&&"function"==typeof window.matchMedia)try{return window.matchMedia("(prefers-color-scheme: dark)").matches}catch{}return!1}(i)?"true":"false",Z.dataset.visible="false",te=`tooltip-${Date.now()}-${Math.random().toString(36).slice(2)}`,Z.id=te;try{e.setAttribute("aria-describedby",te)}catch{}await re(n),Z.dataset.visible="true",null==G||G(),G=m(e,Z,()=>{re(n)})}};r?l():Q=setTimeout(l,80)}function ie(e=!1){if(!Z)return;ne();const t=()=>{if(Z){if(Z.dataset.visible="false",J&&te)try{J.removeAttribute("aria-describedby")}catch{}J=null,te=null,G&&(G(),G=null)}};e?t():ee=setTimeout(t,120)}let le=null;function ae(e){le=null!=e?e:null}const se={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",plaintext:"plain",text:"plain","c++":"cpp",md:"markdown"};function ce(e){var t;const n=function(e){if(!e)return"";const t=e.trim();if(!t)return"";const[n]=t.split(/\s+/),[r]=n.split(":");return r.toLowerCase()}(e);return null!=(t=se[n])?t:n}function de(e){const t=ce(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";default:return t}}function ue(e){if(le){const t=le(e);if(null!=t&&""!==t)return t}switch(ce(e)){case"javascript":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\n';case"typescript":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\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\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\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\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\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\n';case"python":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\n';case"shell":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\n';case"markdown":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\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\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\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\n';case"cpp":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\n';case"plain":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\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>\n\n'}}const me={javascript:"JavaScript",typescript:"TypeScript",jsx:"JSX",tsx:"TSX",shell:"Shell",plain:"Text",text:"Text",markdown:"Markdown",json:"JSON",python:"Python",cpp:"C++",vue:"Vue",html:"HTML",css:"CSS",svg:"SVG",mermaid:"Mermaid"};function he(e){const n=t(()=>{const t=e.code||"",n=t.trim().toLowerCase();return n.startsWith("<!doctype")||n.startsWith("<html")||n.startsWith("<body")?t:`<!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: ${e.isDark?"#020617":"#ffffff"};\n color: ${e.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 ${t}\n </body>\n</html>`},[e.code,e.isDark]);return l(()=>{const t=t=>{var n;"Escape"!==t.key&&"Esc"!==t.key||null==(n=e.onClose)||n.call(e)};return"undefined"!=typeof window&&window.addEventListener("keydown",t),()=>{"undefined"!=typeof window&&window.removeEventListener("keydown",t)}},[e]),"undefined"==typeof document?null:v(
6
+ /* @__PURE__ */M.jsx("span",{className:"admonition-title",children:c}),r.collapsible&&/* @__PURE__ */M.jsx("button",{type:"button",className:"admonition-toggle","aria-expanded":!d,"aria-controls":`${m}-content`,title:d?"Expand":"Collapse",onClick:()=>u(e=>!e),children:/* @__PURE__ */M.jsx("span",{children:d?"▶":"▼"})})]}),!d&&/* @__PURE__ */M.jsx("div",{id:`${m}-content`,className:"admonition-content","aria-labelledby":m,children:o&&i?S(r.children,o,String(null!=l?l:m),i):null})]})}const T=o(null);function L(e,t){const n="undefined"!=typeof window&&"undefined"!=typeof document,r=/* @__PURE__ */new Map;return(o,i)=>{var l,a;const s={current:!1};let c,d=!1;const u=new Promise(e=>{c=()=>{d||(d=!0,e())}}),m=()=>{for(const e of r.values())if(e.targets.has(o)){e.targets.delete(o);try{e.observer.unobserve(o)}catch{}}};if(!n||!t())return s.current=!0,c(),{isVisible:()=>!0,whenVisible:u,destroy:m};const h=((t,o)=>{var i,l;if(!n)return null;if("undefined"==typeof IntersectionObserver)return null;const a=null!=(i=e())?i:null,s=`${t}::${o}`,c=r.get(s);if(c&&c.root===a)return c;if(c){try{c.observer.disconnect()}catch{}r.delete(s)}const d=null!=(l=null==c?void 0:c.targets)?l:/* @__PURE__ */new Map,u=new IntersectionObserver(e=>{for(const t of e){const e=d.get(t.target);if(e&&(t.isIntersecting||t.intersectionRatio>0)){e.state.current=!0;try{e.resolve()}catch{}try{u.unobserve(t.target)}catch{}d.delete(t.target)}}},{root:a,rootMargin:t,threshold:o}),m={observer:u,root:a,rootMargin:t,threshold:o,targets:d};r.set(s,m);for(const e of d.keys())u.observe(e);return m})(null!=(l=null==i?void 0:i.rootMargin)?l:"300px",null!=(a=null==i?void 0:i.threshold)?a:0);return h?(h.targets.set(o,{resolve:c,state:s}),h.observer.observe(o),{isVisible:()=>s.current,whenVisible:u,destroy:m}):(s.current=!0,c(),{isVisible:()=>!0,whenVisible:u,destroy:m})}}const $=L(()=>null,()=>!0);function O({getRoot:e,enabled:n=!0,children:r}){const o=i(n);o.current=n;const l=i(e);l.current=e;const a=t(()=>L(()=>{var e,t;return null!=(t=null==(e=l.current)?void 0:e.call(l))?t:null},()=>o.current),[]);/* @__PURE__ */
7
+ return M.jsx(T.Provider,{value:a,children:r})}function P(){var e;return null!=(e=r(T))?e:$}const R="__global__",D="__MARKSTREAM_REACT_CUSTOM_COMPONENTS_STORE__",W=(()=>{const e=globalThis;if(e[D])return e[D];const t={scopedComponents:{},revision:0,listeners:/* @__PURE__ */new Set};return e[D]=t,t})();function A(){W.revision++;for(const e of Array.from(W.listeners))try{e()}catch{}}function I(e){return W.listeners.add(e),()=>{W.listeners.delete(e)}}function F(){return W.revision}function z(e,t){"string"==typeof e?W.scopedComponents[e]={...t||{}}:W.scopedComponents[R]={...e},A()}function H(e){const t=W.scopedComponents[R]||{};if(!e)return t;const n=W.scopedComponents[e]||{};return t&&0!==Object.keys(t).length?n&&0!==Object.keys(n).length?{...t,...n}:t:n}function V(e){if(e===R)throw new Error("removeCustomComponents: cannot delete global mapping; call clearGlobalCustomComponents instead.");delete W.scopedComponents[e],A()}function K(){delete W.scopedComponents[R],A()}function X(e){const{node:t}=e;/* @__PURE__ */
8
+ return M.jsx("span",{className:"checkbox-node",children:/* @__PURE__ */M.jsx("input",{type:"checkbox",checked:Boolean(t.checked),disabled:!0,className:"checkbox-input",readOnly:!0})})}const q={"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 U(e){Object.assign(q,e)}function Y(){return{t:e=>{var t;return null!=(t=q[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)}}}let Z=null,J=null,G=null,Q=null,ee=null,te=null;function ne(){Q&&(clearTimeout(Q),Q=null),ee&&(clearTimeout(ee),ee=null)}async function re(e){if(!Z||!J)return;const{x:t,y:n}=await h(J,Z,{placement:e,middleware:[p(8),f(),g({padding:8})],strategy:"fixed"});Z.style.transform=`translate3d(${Math.round(t)}px, ${Math.round(n)}px, 0)`}function oe(e,t,n="top",r=!1,o,i){if(!e||"undefined"==typeof document)return;if(Z||"undefined"==typeof document||(Z=document.createElement("div"),Z.className="ms-tooltip",Z.setAttribute("role","tooltip"),Z.dataset.visible="false",Z.style.position="fixed",Z.style.left="0px",Z.style.top="0px",Z.style.transform="translate3d(0,0,0)",document.body.appendChild(Z)),!Z)return;ne();const l=async()=>{if(Z){J=e,Z.textContent=t,Z.dataset.placement=n,Z.dataset.dark=function(e){if("boolean"==typeof e)return e;if("undefined"!=typeof document)try{if(document.documentElement.classList.contains("dark"))return!0}catch{}if("undefined"!=typeof window&&"function"==typeof window.matchMedia)try{return window.matchMedia("(prefers-color-scheme: dark)").matches}catch{}return!1}(i)?"true":"false",Z.dataset.visible="false",te=`tooltip-${Date.now()}-${Math.random().toString(36).slice(2)}`,Z.id=te;try{e.setAttribute("aria-describedby",te)}catch{}await re(n),Z.dataset.visible="true",null==G||G(),G=m(e,Z,()=>{re(n)})}};r?l():Q=setTimeout(l,80)}function ie(e=!1){if(!Z)return;ne();const t=()=>{if(Z){if(Z.dataset.visible="false",J&&te)try{J.removeAttribute("aria-describedby")}catch{}J=null,te=null,G&&(G(),G=null)}};e?t():ee=setTimeout(t,120)}let le=null;function ae(e){le=null!=e?e:null}const se={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",plaintext:"plain",text:"plain","c++":"cpp",md:"markdown"};function ce(e){var t;const n=function(e){if(!e)return"";const t=e.trim();if(!t)return"";const[n]=t.split(/\s+/),[r]=n.split(":");return r.toLowerCase()}(e);return null!=(t=se[n])?t:n}function de(e){const t=ce(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";default:return t}}function ue(e){if(le){const t=le(e);if(null!=t&&""!==t)return t}switch(ce(e)){case"javascript":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\n';case"typescript":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\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\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\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\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\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\n';case"python":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\n';case"shell":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\n';case"markdown":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\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\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\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\n';case"cpp":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\n';case"plain":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\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>\n\n'}}const me={javascript:"JavaScript",typescript:"TypeScript",jsx:"JSX",tsx:"TSX",shell:"Shell",plain:"Text",text:"Text",markdown:"Markdown",json:"JSON",python:"Python",cpp:"C++",vue:"Vue",html:"HTML",css:"CSS",svg:"SVG",mermaid:"Mermaid"};function he(e){const n=t(()=>{const t=e.code||"",n=t.trim().toLowerCase();return n.startsWith("<!doctype")||n.startsWith("<html")||n.startsWith("<body")?t:`<!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: ${e.isDark?"#020617":"#ffffff"};\n color: ${e.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 ${t}\n </body>\n</html>`},[e.code,e.isDark]);return l(()=>{const t=t=>{var n;"Escape"!==t.key&&"Esc"!==t.key||null==(n=e.onClose)||n.call(e)};return"undefined"!=typeof window&&window.addEventListener("keydown",t),()=>{"undefined"!=typeof window&&window.removeEventListener("keydown",t)}},[e]),"undefined"==typeof document?null:w(
9
9
  /* @__PURE__ */M.jsx("div",{className:"html-preview-frame__backdrop"+(e.isDark?" html-preview-frame__backdrop--dark":""),onClick:()=>{var t;return null==(t=e.onClose)?void 0:t.call(e)},children:/* @__PURE__ */M.jsxs("div",{className:"html-preview-frame"+(e.isDark?" html-preview-frame--dark":""),onClick:e=>e.stopPropagation(),children:[
10
10
  /* @__PURE__ */M.jsxs("div",{className:"html-preview-frame__header",children:[
11
11
  /* @__PURE__ */M.jsxs("div",{className:"html-preview-frame__title",children:[
12
12
  /* @__PURE__ */M.jsx("span",{className:"html-preview-frame__dot"}),
13
13
  /* @__PURE__ */M.jsx("span",{className:"html-preview-frame__label",children:e.title||"Preview"})]}),
14
14
  /* @__PURE__ */M.jsx("button",{type:"button",className:"html-preview-frame__close"+(e.isDark?" html-preview-frame__close--dark":""),onClick:()=>{var t;return null==(t=e.onClose)?void 0:t.call(e)},children:"×"})]}),
15
- /* @__PURE__ */M.jsx("iframe",{className:"html-preview-frame__iframe",sandbox:"allow-scripts allow-same-origin",srcDoc:n,title:e.title||"Preview"})]})}),document.body)}let pe=!1,fe=null,ge=!1;async function ve(){if(fe)return fe;if(ge)return null;try{return fe=await import("stream-monaco"),await async function(e){pe||(pe=!0,(null==e?void 0:e.preloadMonacoWorkers)&&await e.preloadMonacoWorkers())}(fe),fe}catch{return ge=!0,null}}let we=null,xe=!1,ye=null,be=null,ke=null,je=null,Me=null;function Ne(e,t){const n=function(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{return String(e)}}(e);return n?(we!==t&&(we=t),xe||Me!==n?!ye||je!==n&&be!==n?(ke=e,je=n,ye||(xe=!0,ye=(async()=>{for(;null!=ke&&null!=je;){const e=ke,t=je;if(ke=null,je=null,Me===t)continue;const n=we;if(!n)break;try{be=t,await Promise.resolve(n(e)),Me=t}catch{}}})().finally(()=>{xe=!1,ye=null,be=null}),ye)):ye:Promise.resolve()):Promise.resolve()}let Ce=null,Se=null,Be=null;const Ee=/* @__PURE__ */new Set;function _e(){for(const e of Array.from(Ee))try{e()}catch{}}function Te({node:e}){var n;const r=t(()=>function(e){var t;return String(null!=(t=String(null!=e?e:"").split(/\s+/g)[0])?t:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}(null==e?void 0:e.language),[e]),o=`language-${r}`,i=r?`Code block: ${r}`:"Code block";/* @__PURE__ */
16
- return M.jsx("pre",{className:o,"aria-busy":!0===(null==e?void 0:e.loading),"aria-label":i,"data-language":r,tabIndex:0,children:/* @__PURE__ */M.jsx("code",{translate:"no",children:String(null!=(n=null==e?void 0:e.code)?n:"")})})}const Le={isShowPreview:!0,loading:!0,stream:!0,enableFontSizeControl:!0,showHeader:!0,showCopyButton:!0,showExpandButton:!0,showPreviewButton:!0,showFontSizeButtons:!0};function $e(e){var r;const o={...Le,...e},{node:s,isDark:c,loading:d,stream:u,isShowPreview:m,enableFontSizeControl:h,darkTheme:p,lightTheme:f,monacoOptions:g,themes:v,minWidth:w,maxWidth:x,showHeader:y,showCopyButton:b,showExpandButton:k,showPreviewButton:j,showFontSizeButtons:N}=o,C=i(null),S=i(null),B=i(null),E=i(null),_=i(null),T=i(null),L=i(null),$=i(0),O=i(null),R=i(null),D=P(),W=i(g),A=i(v),I=i(g),[F,z]=n(!1),[H,V]=n(()=>"undefined"==typeof window),[K,X]=n(!1),[q,U]=n(!1),[Z,J]=n(!1),[G,Q]=n(()=>s.language||"plaintext"),[ee,te]=n(()=>ce(s.language)),[ne,re]=n(!1),[le,ae]=n(!1),[se,pe]=n(!1),[fe,ge]=n(!1),{t:we}=Y(),[xe,ye]=n(()=>{const e=Number(null==g?void 0:g.fontSize);return Number.isFinite(e)&&e>0?e:14}),[be,ke]=n(xe),je=a(()=>{var e,t;const n=null!=(t=null==(e=W.current)?void 0:e.MAX_HEIGHT)?t:500;if("number"==typeof n&&Number.isFinite(n))return Math.max(80,n);const r=String(n).match(/^(\d+(?:\.\d+)?)/),o=r?Number.parseFloat(r[1]):500;return Number.isFinite(o)?Math.max(80,o):500},[]),Me=a(e=>{var t,n,r,o;if(F)return;const i=C.current,l=B.current;if(!i||!l)return;const a="diff"===T.current?null==(t=l.getDiffEditorView)?void 0:t.call(l):null==(n=l.getEditorView)?void 0:n.call(l);if(!a)return;const s=je();try{null==(r=a.updateOptions)||r.call(a,{automaticLayout:e})}catch{}e?(i.style.maxHeight="none",i.style.overflow="visible"):(i.style.maxHeight=`${Math.ceil(s)}px`,i.style.overflow="auto");try{const t=Number((()=>{if("function"==typeof a.getContentHeight)return a.getContentHeight();if("diff"===T.current&&"function"==typeof a.getModifiedEditor){const e=a.getModifiedEditor();if(e&&"function"==typeof e.getContentHeight)return e.getContentHeight()}})());if(Number.isFinite(t)&&t>0){const n=e?t:Math.min(t,s);i.style.height=`${Math.ceil(Math.max(120,n))}px`}null==(o=a.layout)||o.call(a)}catch{}},[je,F]);l(()=>{W.current=g},[g]),l(()=>{te(ce(s.language))},[s.language]);const $e=i(s);$e.current=s;const Oe=a(()=>{var e;$.current+=1;try{null==(e=E.current)||e.call(E)}catch{}_.current=null,T.current=null,L.current=null,J(!1),U(!1)},[]),Pe=a(()=>{var e,t,n,r,o,i;const l=C.current,a=S.current;if(!l||!a)return;const s=null!=(e=l.querySelector(".monaco-editor"))?e:l;try{const e="undefined"!=typeof window&&window.getComputedStyle?window.getComputedStyle(s):null,l=String(null!=(t=null==e?void 0:e.getPropertyValue("--vscode-editor-foreground"))?t:"").trim()||String(null!=(n=null==e?void 0:e.color)?n:"").trim(),c=String(null!=(r=null==e?void 0:e.getPropertyValue("--vscode-editor-background"))?r:"").trim()||String(null!=(o=null==e?void 0:e.backgroundColor)?o:"").trim(),d=String(null!=(i=null==e?void 0:e.getPropertyValue("--vscode-editor-selectionBackground"))?i:"").trim();l&&a.style.setProperty("--vscode-editor-foreground",l),c&&a.style.setProperty("--vscode-editor-background",c),d&&a.style.setProperty("--vscode-editor-selectionBackground",d)}catch{}},[]);l(()=>()=>{var e,t,n;$.current+=1,null==(e=E.current)||e.call(E),E.current=null,_.current=null,T.current=null,L.current=null,O.current=null,null==(n=null==(t=R.current)?void 0:t.destroy)||n.call(t),R.current=null},[]),l(()=>{var e,t;if("undefined"==typeof window)return;if(H)return;const n=S.current;if(!n)return;null==(t=null==(e=R.current)?void 0:e.destroy)||t.call(e);const r=D(n,{rootMargin:"400px"});return R.current=r,r.isVisible()&&V(!0),r.whenVisible.then(()=>V(!0)),()=>{r.destroy(),R.current===r&&(R.current=null)}},[D,H]),l(()=>{let e=!0;return"undefined"==typeof window||(async()=>{var t,n;try{const r=await ve();if(!e)return;if(!r)return void z(!0);const o=r.useMonaco,i=r.detectLanguage;if("function"==typeof i&&(O.current=i),"function"!=typeof o)return void z(!0);const l=null!=(t=c?p:f)?t:Ce,a={...I.current||{}},s=o({wordWrap:"on",wrappingIndent:"same",themes:A.current,theme:l,...a,onThemeChange(){Pe()}});B.current=s,"function"==typeof(n=s.setTheme)&&(Be=n,null!=Ce&&null!=Se&&Ne(Ce,Be).then(()=>_e()).catch(()=>{})),E.current="function"==typeof s.safeClean?()=>s.safeClean():"function"==typeof s.cleanupEditor?()=>s.cleanupEditor():null,X(!0)}catch{e&&z(!0)}})(),()=>{e=!1}},[]),l(()=>{var e;if(!s.language&&!ee&&O.current)try{const t=O.current(String(null!=(e=s.code)?e:""));t&&Q(t)}catch{}},[ee,s.code,s.language]);const Re=t(()=>String(s.language||ee||G||"plaintext"),[ee,G,s.language]),De=t(()=>ce(Re),[Re]),We=t(()=>de(De),[De]),Ae=t(()=>ue(De),[De]),Ie=t(()=>!!m&&("html"===De||"svg"===De),[De,m]),Fe=t(()=>{const e=De;return e?me[e]||e.charAt(0).toUpperCase()+e.slice(1):me[""]||"Plain Text"},[De]),ze=t(()=>{var e,t,n;return s.diff?null!=(t=null!=(e=s.updatedCode)?e:s.code)?t:"":null!=(n=s.code)?n:""},[s.code,s.diff,s.updatedCode]),He=t(()=>{const e=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},t={},n=e(w),r=e(x);return n&&(t.minWidth=n),r&&(t.maxWidth=r),t},[w,x]),Ve=!1===u&&d,Ke=t(()=>c?p:f,[p,c,f]);l(()=>{if(F)return;if(!q||!H)return;const e=B.current;(null==e?void 0:e.setTheme)&&Ke&&Ne(Ke,e.setTheme).then(Pe).catch(()=>{})},[q,Ke,Pe,F,H]),l(()=>{var e;if("undefined"!=typeof window)return e=()=>{Pe()},Ee.add(e),()=>{Ee.delete(e)}},[Pe]);const Xe=a(async()=>{var e,t;if(F)return null;if(!H)return null;if(se)return null;if(Ve)return null;const n=B.current,r=C.current;if(!n||!r||!n.createEditor)return null;const o=$e.current,i=o.diff?"diff":"single",l=L.current,a="diff"===i?Boolean(null==(e=n.getDiffEditorView)?void 0:e.call(n)):Boolean(null==(t=n.getEditorView)?void 0:t.call(n));if(T.current===i&&l===r&&a)return null;if(_.current)return _.current;$.current+=1;const s=$.current;U(!0);const c=(async()=>{var e,t,i,l,a,c,d,u,m,h;try{null==(e=E.current)||e.call(E),T.current=null,L.current=null,J(!1);const p=We;if(o.diff?"function"==typeof n.createDiffEditor?(T.current="diff",await n.createDiffEditor(r,String(null!=(t=o.originalCode)?t:""),String(null!=(i=o.updatedCode)?i:""),p)):(T.current="single",await n.createEditor(r,String(null!=(a=null!=(l=o.updatedCode)?l:o.code)?a:""),p)):(T.current="single",await n.createEditor(r,String(null!=(c=o.code)?c:""),p)),L.current=r,$.current!==s)return;const f=Number(null==(d=W.current)?void 0:d.fontSize);if(Number.isFinite(f)&&f>0){ye(f),ke(f);try{const e="diff"===T.current?null==(u=n.getDiffEditorView)?void 0:u.call(n):null==(m=n.getEditorView)?void 0:m.call(n);null==(h=null==e?void 0:e.updateOptions)||h.call(e,{fontSize:f,automaticLayout:!1})}catch{}}Pe(),le||se||Me(!1),J(!0)}catch{$.current===s&&z(!0)}})().finally(()=>{_.current===c&&(_.current=null)});return _.current=c,c},[Me,se,le,We,Ve,Pe,F,H]);l(()=>{F||K&&H&&(se||Ve?Oe():Xe())},[se,Xe,K,Oe,Ve,F,H]),l(()=>{var e;if(F)return;if(!K)return;if(!H)return;if(se)return;if(Ve)return;const t=B.current;if(!t)return;const n=String(null!=(e=s.code)?e:"");(async()=>{var e,r;let o=ee;if(!o&&O.current)try{o=ce(O.current(n)),o&&te(o)}catch{}const i=de(o||De);if(t.createEditor&&C.current){try{await Promise.resolve(Xe())}catch{}const e=_.current;if(e)try{await e}catch{}}try{s.diff&&t.updateDiff?await Promise.resolve(t.updateDiff(String(null!=(e=s.originalCode)?e:""),String(null!=(r=s.updatedCode)?r:""),i)):t.updateCode&&await Promise.resolve(t.updateCode(n,i))}catch{}le&&Me(!0)})()},[Me,De,ee,se,q,Xe,le,K,s.code,s.diff,s.originalCode,s.updatedCode,Ve,F,H]),l(()=>{if(F)return;if(!K)return;if(!H)return;if(se)return;if(Ve)return;if(!le&&d)return;const e="undefined"!=typeof window&&"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame(()=>Me(le)):null;return null==e&&Me(le),()=>{null!=e&&"undefined"!=typeof window&&"function"==typeof window.cancelAnimationFrame&&window.cancelAnimationFrame(e)}},[Me,se,le,d,K,Ve,F,H]),l(()=>{var e,t,n;if(!h)return;if(F)return;const r=B.current;if(r){try{const o="diff"===T.current?null==(e=r.getDiffEditorView)?void 0:e.call(r):null==(t=r.getEditorView)?void 0:t.call(r);null==(n=null==o?void 0:o.updateOptions)||n.call(o,{fontSize:be})}catch{}Me(le)}},[Me,h,le,be,s.diff,F]);const qe=a((e,t)=>{oe(e.currentTarget,t,"top",!1,(e.clientX,e.clientY),c)},[c]),Ue=a(()=>{ie()},[]),Ye=a(async()=>{var e;try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&await navigator.clipboard.writeText(String(ze)),re(!0),null==(e=o.onCopy)||e.call(o,String(ze)),setTimeout(()=>re(!1),1e3)}catch{}},[o,ze]),Ze=a(()=>{if(!Ie)return;const e="html"===De?"text/html":"image/svg+xml",t="html"===De?we("artifacts.htmlPreviewTitle")||"HTML Preview":we("artifacts.svgPreviewTitle")||"SVG Preview";"function"!=typeof o.onPreviewCode?"html"===De&&ge(e=>!e):o.onPreviewCode({node:s,artifactType:e,artifactTitle:t,id:`temp-${De}-${Date.now()}`})},[De,Ie,s,o,we]);return F?/* @__PURE__ */M.jsx(Te,{node:s}):/* @__PURE__ */M.jsxs("div",{ref:S,className:["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",c?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",d?"is-rendering":"",c?"is-dark":""].join(" "),style:He,children:[y&&/* @__PURE__ */M.jsxs("div",{className:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",style:{color:`var(--vscode-editor-foreground, ${c?"#e5e7eb":"#111827"})`,backgroundColor:`var(--vscode-editor-background, ${c?"#111827":"#ffffff"})`},children:[
15
+ /* @__PURE__ */M.jsx("iframe",{className:"html-preview-frame__iframe",sandbox:"allow-scripts allow-same-origin",srcDoc:n,title:e.title||"Preview"})]})}),document.body)}let pe=!1,fe=null,ge=!1;async function we(){if(fe)return fe;if(ge)return null;try{return fe=await import("stream-monaco"),await async function(e){pe||(pe=!0,(null==e?void 0:e.preloadMonacoWorkers)&&await e.preloadMonacoWorkers())}(fe),fe}catch{return ge=!0,null}}let ve=null,xe=!1,ye=null,be=null,ke=null,je=null,Me=null;function Ne(e,t){const n=function(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{return String(e)}}(e);return n?(ve!==t&&(ve=t),xe||Me!==n?!ye||je!==n&&be!==n?(ke=e,je=n,ye||(xe=!0,ye=(async()=>{for(;null!=ke&&null!=je;){const e=ke,t=je;if(ke=null,je=null,Me===t)continue;const n=ve;if(!n)break;try{be=t,await Promise.resolve(n(e)),Me=t}catch{}}})().finally(()=>{xe=!1,ye=null,be=null}),ye)):ye:Promise.resolve()):Promise.resolve()}let Ce=null,Se=null,Be=null;const Ee=/* @__PURE__ */new Set;function _e(){for(const e of Array.from(Ee))try{e()}catch{}}function Te({node:e}){var n;const r=t(()=>function(e){var t;return String(null!=(t=String(null!=e?e:"").split(/\s+/g)[0])?t:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}(null==e?void 0:e.language),[e]),o=`language-${r}`,i=r?`Code block: ${r}`:"Code block";/* @__PURE__ */
16
+ return M.jsx("pre",{className:o,"aria-busy":!0===(null==e?void 0:e.loading),"aria-label":i,"data-language":r,tabIndex:0,children:/* @__PURE__ */M.jsx("code",{translate:"no",children:String(null!=(n=null==e?void 0:e.code)?n:"")})})}const Le={isShowPreview:!0,loading:!0,stream:!0,enableFontSizeControl:!0,showHeader:!0,showCopyButton:!0,showExpandButton:!0,showPreviewButton:!0,showFontSizeButtons:!0};function $e(e){var r;const o={...Le,...e},{node:s,isDark:c,loading:d,stream:u,isShowPreview:m,enableFontSizeControl:h,darkTheme:p,lightTheme:f,monacoOptions:g,themes:w,minWidth:v,maxWidth:x,showHeader:y,showCopyButton:b,showExpandButton:k,showPreviewButton:j,showFontSizeButtons:N}=o,C=i(null),S=i(null),B=i(null),E=i(null),_=i(null),T=i(null),L=i(null),$=i(0),O=i(null),R=i(null),D=P(),W=i(g),A=i(w),I=i(g),[F,z]=n(!1),[H,V]=n(()=>"undefined"==typeof window),[K,X]=n(!1),[q,U]=n(!1),[Z,J]=n(!1),[G,Q]=n(()=>s.language||"plaintext"),[ee,te]=n(()=>ce(s.language)),[ne,re]=n(!1),[le,ae]=n(!1),[se,pe]=n(!1),[fe,ge]=n(!1),{t:ve}=Y(),[xe,ye]=n(()=>{const e=Number(null==g?void 0:g.fontSize);return Number.isFinite(e)&&e>0?e:14}),[be,ke]=n(xe),je=a(()=>{var e,t;const n=null!=(t=null==(e=W.current)?void 0:e.MAX_HEIGHT)?t:500;if("number"==typeof n&&Number.isFinite(n))return Math.max(80,n);const r=String(n).match(/^(\d+(?:\.\d+)?)/),o=r?Number.parseFloat(r[1]):500;return Number.isFinite(o)?Math.max(80,o):500},[]),Me=a(e=>{var t,n,r,o;if(F)return;const i=C.current,l=B.current;if(!i||!l)return;const a="diff"===T.current?null==(t=l.getDiffEditorView)?void 0:t.call(l):null==(n=l.getEditorView)?void 0:n.call(l);if(!a)return;const s=je();try{null==(r=a.updateOptions)||r.call(a,{automaticLayout:e})}catch{}e?(i.style.maxHeight="none",i.style.overflow="visible"):(i.style.maxHeight=`${Math.ceil(s)}px`,i.style.overflow="auto");try{const t=Number((()=>{if("function"==typeof a.getContentHeight)return a.getContentHeight();if("diff"===T.current&&"function"==typeof a.getModifiedEditor){const e=a.getModifiedEditor();if(e&&"function"==typeof e.getContentHeight)return e.getContentHeight()}})());if(Number.isFinite(t)&&t>0){const n=e?t:Math.min(t,s);i.style.height=`${Math.ceil(Math.max(120,n))}px`}null==(o=a.layout)||o.call(a)}catch{}},[je,F]);l(()=>{W.current=g},[g]),l(()=>{te(ce(s.language))},[s.language]);const $e=i(s);$e.current=s;const Oe=a(()=>{var e;$.current+=1;try{null==(e=E.current)||e.call(E)}catch{}_.current=null,T.current=null,L.current=null,J(!1),U(!1)},[]),Pe=a(()=>{var e,t,n,r,o,i;const l=C.current,a=S.current;if(!l||!a)return;const s=null!=(e=l.querySelector(".monaco-editor"))?e:l;try{const e="undefined"!=typeof window&&window.getComputedStyle?window.getComputedStyle(s):null,l=String(null!=(t=null==e?void 0:e.getPropertyValue("--vscode-editor-foreground"))?t:"").trim()||String(null!=(n=null==e?void 0:e.color)?n:"").trim(),c=String(null!=(r=null==e?void 0:e.getPropertyValue("--vscode-editor-background"))?r:"").trim()||String(null!=(o=null==e?void 0:e.backgroundColor)?o:"").trim(),d=String(null!=(i=null==e?void 0:e.getPropertyValue("--vscode-editor-selectionBackground"))?i:"").trim();l&&a.style.setProperty("--vscode-editor-foreground",l),c&&a.style.setProperty("--vscode-editor-background",c),d&&a.style.setProperty("--vscode-editor-selectionBackground",d)}catch{}},[]);l(()=>()=>{var e,t,n;$.current+=1,null==(e=E.current)||e.call(E),E.current=null,_.current=null,T.current=null,L.current=null,O.current=null,null==(n=null==(t=R.current)?void 0:t.destroy)||n.call(t),R.current=null},[]),l(()=>{var e,t;if("undefined"==typeof window)return;if(H)return;const n=S.current;if(!n)return;null==(t=null==(e=R.current)?void 0:e.destroy)||t.call(e);const r=D(n,{rootMargin:"400px"});return R.current=r,r.isVisible()&&V(!0),r.whenVisible.then(()=>V(!0)),()=>{r.destroy(),R.current===r&&(R.current=null)}},[D,H]),l(()=>{let e=!0;return"undefined"==typeof window||(async()=>{var t,n;try{const r=await we();if(!e)return;if(!r)return void z(!0);const o=r.useMonaco,i=r.detectLanguage;if("function"==typeof i&&(O.current=i),"function"!=typeof o)return void z(!0);const l=null!=(t=c?p:f)?t:Ce,a={...I.current||{}},s=o({wordWrap:"on",wrappingIndent:"same",themes:A.current,theme:l,...a,onThemeChange(){Pe()}});B.current=s,"function"==typeof(n=s.setTheme)&&(Be=n,null!=Ce&&null!=Se&&Ne(Ce,Be).then(()=>_e()).catch(()=>{})),E.current="function"==typeof s.safeClean?()=>s.safeClean():"function"==typeof s.cleanupEditor?()=>s.cleanupEditor():null,X(!0)}catch{e&&z(!0)}})(),()=>{e=!1}},[]),l(()=>{var e;if(!s.language&&!ee&&O.current)try{const t=O.current(String(null!=(e=s.code)?e:""));t&&Q(t)}catch{}},[ee,s.code,s.language]);const Re=t(()=>String(s.language||ee||G||"plaintext"),[ee,G,s.language]),De=t(()=>ce(Re),[Re]),We=t(()=>de(De),[De]),Ae=t(()=>ue(De),[De]),Ie=t(()=>!!m&&("html"===De||"svg"===De),[De,m]),Fe=t(()=>{const e=De;return e?me[e]||e.charAt(0).toUpperCase()+e.slice(1):me[""]||"Plain Text"},[De]),ze=t(()=>{var e,t,n;return s.diff?null!=(t=null!=(e=s.updatedCode)?e:s.code)?t:"":null!=(n=s.code)?n:""},[s.code,s.diff,s.updatedCode]),He=t(()=>{const e=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},t={},n=e(v),r=e(x);return n&&(t.minWidth=n),r&&(t.maxWidth=r),t},[v,x]),Ve=!1===u&&d,Ke=t(()=>c?p:f,[p,c,f]);l(()=>{if(F)return;if(!q||!H)return;const e=B.current;(null==e?void 0:e.setTheme)&&Ke&&Ne(Ke,e.setTheme).then(Pe).catch(()=>{})},[q,Ke,Pe,F,H]),l(()=>{var e;if("undefined"!=typeof window)return e=()=>{Pe()},Ee.add(e),()=>{Ee.delete(e)}},[Pe]);const Xe=a(async()=>{var e,t;if(F)return null;if(!H)return null;if(se)return null;if(Ve)return null;const n=B.current,r=C.current;if(!n||!r||!n.createEditor)return null;const o=$e.current,i=o.diff?"diff":"single",l=L.current,a="diff"===i?Boolean(null==(e=n.getDiffEditorView)?void 0:e.call(n)):Boolean(null==(t=n.getEditorView)?void 0:t.call(n));if(T.current===i&&l===r&&a)return null;if(_.current)return _.current;$.current+=1;const s=$.current;U(!0);const c=(async()=>{var e,t,i,l,a,c,d,u,m,h;try{null==(e=E.current)||e.call(E),T.current=null,L.current=null,J(!1);const p=We;if(o.diff?"function"==typeof n.createDiffEditor?(T.current="diff",await n.createDiffEditor(r,String(null!=(t=o.originalCode)?t:""),String(null!=(i=o.updatedCode)?i:""),p)):(T.current="single",await n.createEditor(r,String(null!=(a=null!=(l=o.updatedCode)?l:o.code)?a:""),p)):(T.current="single",await n.createEditor(r,String(null!=(c=o.code)?c:""),p)),L.current=r,$.current!==s)return;const f=Number(null==(d=W.current)?void 0:d.fontSize);if(Number.isFinite(f)&&f>0){ye(f),ke(f);try{const e="diff"===T.current?null==(u=n.getDiffEditorView)?void 0:u.call(n):null==(m=n.getEditorView)?void 0:m.call(n);null==(h=null==e?void 0:e.updateOptions)||h.call(e,{fontSize:f,automaticLayout:!1})}catch{}}Pe(),le||se||Me(!1),J(!0)}catch{$.current===s&&z(!0)}})().finally(()=>{_.current===c&&(_.current=null)});return _.current=c,c},[Me,se,le,We,Ve,Pe,F,H]);l(()=>{F||K&&H&&(se||Ve?Oe():Xe())},[se,Xe,K,Oe,Ve,F,H]),l(()=>{var e;if(F)return;if(!K)return;if(!H)return;if(se)return;if(Ve)return;const t=B.current;if(!t)return;const n=String(null!=(e=s.code)?e:"");(async()=>{var e,r;let o=ee;if(!o&&O.current)try{o=ce(O.current(n)),o&&te(o)}catch{}const i=de(o||De);if(t.createEditor&&C.current){try{await Promise.resolve(Xe())}catch{}const e=_.current;if(e)try{await e}catch{}}try{s.diff&&t.updateDiff?await Promise.resolve(t.updateDiff(String(null!=(e=s.originalCode)?e:""),String(null!=(r=s.updatedCode)?r:""),i)):t.updateCode&&await Promise.resolve(t.updateCode(n,i))}catch{}le&&Me(!0)})()},[Me,De,ee,se,q,Xe,le,K,s.code,s.diff,s.originalCode,s.updatedCode,Ve,F,H]),l(()=>{if(F)return;if(!K)return;if(!H)return;if(se)return;if(Ve)return;if(!le&&d)return;const e="undefined"!=typeof window&&"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame(()=>Me(le)):null;return null==e&&Me(le),()=>{null!=e&&"undefined"!=typeof window&&"function"==typeof window.cancelAnimationFrame&&window.cancelAnimationFrame(e)}},[Me,se,le,d,K,Ve,F,H]),l(()=>{var e,t,n;if(!h)return;if(F)return;const r=B.current;if(r){try{const o="diff"===T.current?null==(e=r.getDiffEditorView)?void 0:e.call(r):null==(t=r.getEditorView)?void 0:t.call(r);null==(n=null==o?void 0:o.updateOptions)||n.call(o,{fontSize:be})}catch{}Me(le)}},[Me,h,le,be,s.diff,F]);const qe=a((e,t)=>{oe(e.currentTarget,t,"top",!1,(e.clientX,e.clientY),c)},[c]),Ue=a(()=>{ie()},[]),Ye=a(async()=>{var e;try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&await navigator.clipboard.writeText(String(ze)),re(!0),null==(e=o.onCopy)||e.call(o,String(ze)),setTimeout(()=>re(!1),1e3)}catch{}},[o,ze]),Ze=a(()=>{if(!Ie)return;const e="html"===De?"text/html":"image/svg+xml",t="html"===De?ve("artifacts.htmlPreviewTitle")||"HTML Preview":ve("artifacts.svgPreviewTitle")||"SVG Preview";"function"!=typeof o.onPreviewCode?"html"===De&&ge(e=>!e):o.onPreviewCode({node:s,artifactType:e,artifactTitle:t,id:`temp-${De}-${Date.now()}`})},[De,Ie,s,o,ve]);return F?/* @__PURE__ */M.jsx(Te,{node:s}):/* @__PURE__ */M.jsxs("div",{ref:S,className:["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",c?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",d?"is-rendering":"",c?"is-dark":""].join(" "),style:He,children:[y&&/* @__PURE__ */M.jsxs("div",{className:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",style:{color:`var(--vscode-editor-foreground, ${c?"#e5e7eb":"#111827"})`,backgroundColor:`var(--vscode-editor-background, ${c?"#111827":"#ffffff"})`},children:[
17
17
  /* @__PURE__ */M.jsxs("div",{className:"flex items-center space-x-2 flex-1 overflow-hidden",children:[
18
18
  /* @__PURE__ */M.jsx("span",{className:"icon-slot h-4 w-4 flex-shrink-0",dangerouslySetInnerHTML:{__html:Ae}}),
19
19
  /* @__PURE__ */M.jsx("span",{className:"text-sm font-medium font-mono truncate",children:Fe})]}),
20
20
  /* @__PURE__ */M.jsxs("div",{className:"flex items-center space-x-2",children:[
21
- /* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":se,onClick:()=>pe(e=>!e),onMouseEnter:e=>qe(e,se?we("common.expand")||"Expand":we("common.collapse")||"Collapse"),onFocus:e=>qe(e,se?we("common.expand")||"Expand":we("common.collapse")||"Collapse"),onMouseLeave:Ue,onBlur:Ue,children:/* @__PURE__ */M.jsx("svg",{style:{rotate:se?"0deg":"90deg"},xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m9 18l6-6l-6-6"})})}),N&&h&&/* @__PURE__ */M.jsxs(M.Fragment,{children:[
22
- /* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:be<=10,onClick:()=>ke(e=>Math.max(10,e-1)),onMouseEnter:e=>qe(e,we("common.decrease")||"Decrease"),onFocus:e=>qe(e,we("common.decrease")||"Decrease"),onMouseLeave:Ue,onBlur:Ue,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 12h14"})})}),
23
- /* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:be===xe,onClick:()=>ke(xe),onMouseEnter:e=>qe(e,we("common.reset")||"Reset"),onFocus:e=>qe(e,we("common.reset")||"Reset"),onMouseLeave:Ue,onBlur:Ue,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
21
+ /* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":se,onClick:()=>pe(e=>!e),onMouseEnter:e=>qe(e,se?ve("common.expand")||"Expand":ve("common.collapse")||"Collapse"),onFocus:e=>qe(e,se?ve("common.expand")||"Expand":ve("common.collapse")||"Collapse"),onMouseLeave:Ue,onBlur:Ue,children:/* @__PURE__ */M.jsx("svg",{style:{rotate:se?"0deg":"90deg"},xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m9 18l6-6l-6-6"})})}),N&&h&&/* @__PURE__ */M.jsxs(M.Fragment,{children:[
22
+ /* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:be<=10,onClick:()=>ke(e=>Math.max(10,e-1)),onMouseEnter:e=>qe(e,ve("common.decrease")||"Decrease"),onFocus:e=>qe(e,ve("common.decrease")||"Decrease"),onMouseLeave:Ue,onBlur:Ue,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 12h14"})})}),
23
+ /* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:be===xe,onClick:()=>ke(xe),onMouseEnter:e=>qe(e,ve("common.reset")||"Reset"),onFocus:e=>qe(e,ve("common.reset")||"Reset"),onMouseLeave:Ue,onBlur:Ue,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
24
24
  /* @__PURE__ */M.jsx("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),
25
25
  /* @__PURE__ */M.jsx("path",{d:"M3 3v5h5"})]})})}),
26
- /* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:be>=36,onClick:()=>ke(e=>Math.min(36,e+1)),onMouseEnter:e=>qe(e,we("common.increase")||"Increase"),onFocus:e=>qe(e,we("common.increase")||"Increase"),onMouseLeave:Ue,onBlur:Ue,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 12h14m-7-7v14"})})})]}),b&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":ne?we("common.copied")||"Copied":we("common.copy")||"Copy",onClick:Ye,onMouseEnter:e=>qe(e,ne?we("common.copied")||"Copied":we("common.copy")||"Copy"),onFocus:e=>qe(e,ne?we("common.copied")||"Copied":we("common.copy")||"Copy"),onMouseLeave:Ue,onBlur:Ue,children:ne?/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20 6L9 17l-5-5"})}):/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
26
+ /* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:be>=36,onClick:()=>ke(e=>Math.min(36,e+1)),onMouseEnter:e=>qe(e,ve("common.increase")||"Increase"),onFocus:e=>qe(e,ve("common.increase")||"Increase"),onMouseLeave:Ue,onBlur:Ue,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 12h14m-7-7v14"})})})]}),b&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":ne?ve("common.copied")||"Copied":ve("common.copy")||"Copy",onClick:Ye,onMouseEnter:e=>qe(e,ne?ve("common.copied")||"Copied":ve("common.copy")||"Copy"),onFocus:e=>qe(e,ne?ve("common.copied")||"Copied":ve("common.copy")||"Copy"),onMouseLeave:Ue,onBlur:Ue,children:ne?/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20 6L9 17l-5-5"})}):/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
27
27
  /* @__PURE__ */M.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),
28
- /* @__PURE__ */M.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})})}),k&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":le,onClick:()=>ae(e=>!e),onMouseEnter:e=>qe(e,le?we("common.collapse")||"Collapse":we("common.expand")||"Expand"),onFocus:e=>qe(e,le?we("common.collapse")||"Collapse":we("common.expand")||"Expand"),onMouseLeave:Ue,onBlur:Ue,children:le?/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"})}):/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"})})}),Ie&&j&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":we("common.preview")||"Preview",onClick:Ze,onMouseEnter:e=>qe(e,we("common.preview")||"Preview"),onFocus:e=>qe(e,we("common.preview")||"Preview"),onMouseLeave:Ue,onBlur:Ue,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",children:/* @__PURE__ */M.jsxs("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",children:[
28
+ /* @__PURE__ */M.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})})}),k&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":le,onClick:()=>ae(e=>!e),onMouseEnter:e=>qe(e,le?ve("common.collapse")||"Collapse":ve("common.expand")||"Expand"),onFocus:e=>qe(e,le?ve("common.collapse")||"Collapse":ve("common.expand")||"Expand"),onMouseLeave:Ue,onBlur:Ue,children:le?/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"})}):/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"})})}),Ie&&j&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":ve("common.preview")||"Preview",onClick:Ze,onMouseEnter:e=>qe(e,ve("common.preview")||"Preview"),onFocus:e=>qe(e,ve("common.preview")||"Preview"),onMouseLeave:Ue,onBlur:Ue,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",children:/* @__PURE__ */M.jsxs("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",children:[
29
29
  /* @__PURE__ */M.jsx("path",{d:"M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496"}),
30
30
  /* @__PURE__ */M.jsx("path",{d:"M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23"})]})})})]})]}),
31
31
  /* @__PURE__ */M.jsxs("div",{className:`code-block-body${se?" code-block-body--collapsed":""}${le?" code-block-body--expanded":""}`,children:[!se&&(!!u||!d)&&(F?/* @__PURE__ */M.jsx(Te,{node:s}):/* @__PURE__ */M.jsxs(M.Fragment,{children:[
@@ -33,7 +33,7 @@ return M.jsx("pre",{className:o,"aria-busy":!0===(null==e?void 0:e.loading),"ari
33
33
  /* @__PURE__ */M.jsx("div",{className:"skeleton-line"}),
34
34
  /* @__PURE__ */M.jsx("div",{className:"skeleton-line"}),
35
35
  /* @__PURE__ */M.jsx("div",{className:"skeleton-line short"})]})})]}),fe&&!o.onPreviewCode&&Ie&&"html"===De&&/* @__PURE__ */M.jsx(he,{code:String(null!=(r=s.code)?r:""),isDark:c,onClose:()=>ge(!1)}),
36
- /* @__PURE__ */M.jsx("span",{className:"sr-only","aria-live":"polite",role:"status",children:ne?we("common.copied")||"Copied":""})]})}function Oe(e){const{node:t,ctx:n,renderNode:r,indexKey:o}=e,i=Array.isArray(t.items)?t.items:[];/* @__PURE__ */
36
+ /* @__PURE__ */M.jsx("span",{className:"sr-only","aria-live":"polite",role:"status",children:ne?ve("common.copied")||"Copied":""})]})}function Oe(e){const{node:t,ctx:n,renderNode:r,indexKey:o}=e,i=Array.isArray(t.items)?t.items:[];/* @__PURE__ */
37
37
  return M.jsx("dl",{className:"definition-list","data-index-key":o,children:i.map((e,t)=>/* @__PURE__ */M.jsxs("div",{className:"mb-4",children:[
38
38
  /* @__PURE__ */M.jsx("dt",{className:"definition-term font-semibold",children:n&&r?B(e.term,n,`${String(null!=o?o:"definition")}-term-${t}`,r):null}),
39
39
  /* @__PURE__ */M.jsx("dd",{className:"definition-desc ml-4",children:n&&r?B(e.definition,n,`${String(null!=o?o:"definition")}-desc-${t}`,r):null})]},`${String(null!=o?o:"definition")}-${t}`))})}function Pe(e){var t;const{node:n}=e;/* @__PURE__ */
@@ -44,27 +44,27 @@ return M.jsx("div",{id:`footnote-${t.id}`,className:"footnote-node flex mt-2 mb-
44
44
  return M.jsx("sup",{id:`fnref-${n.id}`,className:"footnote-reference",onClick:o,children:/* @__PURE__ */M.jsxs("a",{href:r,title:`View footnote ${n.id}`,className:"footnote-link cursor-pointer",children:["[",n.id,"]"]})})}function Ie(e){/* @__PURE__ */
45
45
  return M.jsx("br",{className:"hard-break"})}function Fe(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Fe(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ze(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Fe(e))&&(r&&(r+=" "),r+=t);return r}function He(e){const{node:t,ctx:n,renderNode:r,indexKey:o,children:i}=e,l=Math.min(6,Math.max(1,Number(t.level)||1)),a=`h${l}`;/* @__PURE__ */
46
46
  return M.jsx(a,{dir:"auto",className:ze("heading-node font-semibold",`heading-${l}`),children:null!=i?i:n&&r?S(t.children,n,String(null!=o?o:`heading-${l}`),r):null})}function Ve(e){/* @__PURE__ */
47
- return M.jsx("mark",{className:"highlight-node",children:e.children})}const Ke=/* @__PURE__ */new Set(["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick"]),Xe=/* @__PURE__ */new Set(["script"]),qe=/* @__PURE__ */new Set(["href","src","srcset","xlink:href","formaction"]);function Ue(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/"))}const Ye=/* @__PURE__ */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"]),Ze=/* @__PURE__ */new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Je(e){return e.startsWith("--")?e:e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Ge(e){const t={...e};if(Object.prototype.hasOwnProperty.call(t,"class")&&(t.className=t.class,delete t.class),Object.prototype.hasOwnProperty.call(t,"for")&&(t.htmlFor=t.for,delete t.for),"string"==typeof t.style){const e=function(e){const t=e.trim();if(!t)return;const n={};for(const r of t.split(";")){const e=r.trim();if(!e)continue;const t=e.indexOf(":");if(-1===t)continue;const o=Je(e.slice(0,t).trim()),i=e.slice(t+1).trim();o&&(n[o]=i)}return Object.keys(n).length?n:void 0}(t.style);e?t.style=e:delete t.style}return t}function Qe(e){const t={};for(const[n,r]of Object.entries(e)){const e=n.toLowerCase();Ke.has(e)||qe.has(e)&&r&&Ue(r)||(t[n]=r)}return t}function et(e,t){const n=e.toLowerCase();return!Ye.has(n)&&(Object.prototype.hasOwnProperty.call(t,n)||Object.prototype.hasOwnProperty.call(t,e))}function tt(r){const{node:o,placeholder:a,customId:c}=r,d=P(),[u,m]=n(null),h=i(null),[p,f]=n(()=>"undefined"==typeof window),[g,v]=n(o.content),w=Boolean(o.loading),x=s(I,F,F),y=t(()=>{var e;return null!=(e=r.customComponents)?e:H(c)},[c,r.customComponents,x]);l(()=>{var e;if("undefined"==typeof window)return void f(!0);if(null==(e=h.current)||e.destroy(),h.current=null,!w)return f(!0),void v(o.content);if(!u)return void f(!1);const t=d(u,{rootMargin:"400px"});return h.current=t,t.isVisible()&&f(!0),t.whenVisible.then(()=>f(!0)).catch(()=>{}),()=>{t.destroy(),h.current=null}},[u,w,o.content,d]),l(()=>()=>{var e;null==(e=h.current)||e.destroy(),h.current=null},[]),l(()=>{w&&!p||v(o.content)},[w,o.content,p]);const b=t(()=>{var e;return C(null!=(e=o.attrs)?e:void 0)},[o.attrs]),k=t(()=>{var e;return function(e,t){const n=/<([a-z][a-z0-9-]*)\b[^>]*>/gi;let r;for(;null!==(r=n.exec(e));)if(et(r[1],t))return!0;return!1}(null!=(e=o.content)?e:"",y)},[y,o.content]),j=t(()=>k&&o.content?function(t,n){if(!t)return[];try{const r=function(e){var t,n,r;const o=[];let i=0;for(;i<e.length;){if(e.startsWith("\x3c!--",i)){const t=e.indexOf("--\x3e",i);if(-1!==t){i=t+3;continue}break}const l=e.indexOf("<",i);if(-1===l){i<e.length&&e.slice(i).trim()&&o.push({type:"text",content:e.slice(i)});break}if(l>i){const t=e.slice(i,l);t.trim()&&o.push({type:"text",content:t})}const a=e.indexOf(">",l);if(-1===a)break;const s=e.slice(l+1,a).trim(),c=s.startsWith("/"),d=s.endsWith("/");if(c)o.push({type:"tag_close",tagName:s.slice(1).trim()});else{const e=s.indexOf(" ");let i,l="";-1===e?i=d?s.slice(0,-1).trim():s.trim():(i=s.slice(0,e).trim(),l=s.slice(e+1));const a={};if(l){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let o;for(;null!==(o=e.exec(l));){const e=o[1],i=null!=(r=null!=(n=null!=(t=o[2])?t:o[3])?n:o[4])?r:"";e&&!e.endsWith("/")&&(a[e]=i)}}o.push({type:d||Ze.has(i.toLowerCase())?"self_closing":"tag_open",tagName:i,attrs:a})}i=a+1}return o}(t),o=[],i=[];for(const t of r)if("text"===t.type){if(o.length>0&&o[o.length-1].blocked)continue;(o.length>0?o[o.length-1].children:i).push(t.content)}else if("self_closing"===t.type){if(Xe.has(t.tagName.toLowerCase()))continue;const r=Qe(t.attrs||{}),l=et(t.tagName,n)?n[t.tagName]||n[t.tagName.toLowerCase()]:void 0;l?(o.length>0?o[o.length-1].children:i).push(e.createElement(l,r)):(o.length>0?o[o.length-1].children:i).push(e.createElement(t.tagName,{...Ge(r),suppressHydrationWarning:!0}))}else if("tag_open"===t.type)o.push({tagName:t.tagName,children:[],attrs:t.attrs,blocked:Xe.has(t.tagName.toLowerCase())});else if("tag_close"===t.type){const t=o.pop();if(t){if(t.blocked)continue;const r=Qe(t.attrs||{}),l=et(t.tagName,n)?n[t.tagName]||n[t.tagName.toLowerCase()]:void 0,a=l?e.createElement(l,r,...t.children):e.createElement(t.tagName,{...Ge(r),suppressHydrationWarning:!0},...t.children);o.length>0?o[o.length-1].children.push(a):i.push(a)}}for(;o.length>0;){const t=o.pop();if(t.blocked)continue;const r=Qe(t.attrs||{}),l=et(t.tagName,n)?n[t.tagName]||n[t.tagName.toLowerCase()]:void 0,a=l?e.createElement(l,r,...t.children):e.createElement(t.tagName,{...Ge(r),suppressHydrationWarning:!0},...t.children);i.push(a)}return i}catch{return null}}(o.content,y):null,[y,o.content,k]);/* @__PURE__ */
47
+ return M.jsx("mark",{className:"highlight-node",children:e.children})}const Ke=/* @__PURE__ */new Set(["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick"]),Xe=/* @__PURE__ */new Set(["script"]),qe=/* @__PURE__ */new Set(["href","src","srcset","xlink:href","formaction"]);function Ue(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/"))}const Ye=/* @__PURE__ */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"]),Ze=/* @__PURE__ */new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Je(e){return e.startsWith("--")?e:e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Ge(e){const t={...e};if(Object.prototype.hasOwnProperty.call(t,"class")&&(t.className=t.class,delete t.class),Object.prototype.hasOwnProperty.call(t,"for")&&(t.htmlFor=t.for,delete t.for),"string"==typeof t.style){const e=function(e){const t=e.trim();if(!t)return;const n={};for(const r of t.split(";")){const e=r.trim();if(!e)continue;const t=e.indexOf(":");if(-1===t)continue;const o=Je(e.slice(0,t).trim()),i=e.slice(t+1).trim();o&&(n[o]=i)}return Object.keys(n).length?n:void 0}(t.style);e?t.style=e:delete t.style}return t}function Qe(e){const t={};for(const[n,r]of Object.entries(e)){const e=n.toLowerCase();Ke.has(e)||qe.has(e)&&r&&Ue(r)||(t[n]=r)}return t}function et(e,t){const n=e.toLowerCase();return!Ye.has(n)&&(Object.prototype.hasOwnProperty.call(t,n)||Object.prototype.hasOwnProperty.call(t,e))}function tt(r){const{node:o,placeholder:a,customId:c}=r,d=P(),[u,m]=n(null),h=i(null),[p,f]=n(()=>"undefined"==typeof window),[g,w]=n(o.content),v=Boolean(o.loading),x=s(I,F,F),y=t(()=>{var e;return null!=(e=r.customComponents)?e:H(c)},[c,r.customComponents,x]);l(()=>{var e;if("undefined"==typeof window)return void f(!0);if(null==(e=h.current)||e.destroy(),h.current=null,!v)return f(!0),void w(o.content);if(!u)return void f(!1);const t=d(u,{rootMargin:"400px"});return h.current=t,t.isVisible()&&f(!0),t.whenVisible.then(()=>f(!0)).catch(()=>{}),()=>{t.destroy(),h.current=null}},[u,v,o.content,d]),l(()=>()=>{var e;null==(e=h.current)||e.destroy(),h.current=null},[]),l(()=>{v&&!p||w(o.content)},[v,o.content,p]);const b=t(()=>{var e;return C(null!=(e=o.attrs)?e:void 0)},[o.attrs]),k=t(()=>{var e;return function(e,t){const n=/<([a-z][a-z0-9-]*)\b[^>]*>/gi;let r;for(;null!==(r=n.exec(e));)if(et(r[1],t))return!0;return!1}(null!=(e=o.content)?e:"",y)},[y,o.content]),j=t(()=>k&&o.content?function(t,n){if(!t)return[];try{const r=function(e){var t,n,r;const o=[];let i=0;for(;i<e.length;){if(e.startsWith("\x3c!--",i)){const t=e.indexOf("--\x3e",i);if(-1!==t){i=t+3;continue}break}const l=e.indexOf("<",i);if(-1===l){i<e.length&&e.slice(i).trim()&&o.push({type:"text",content:e.slice(i)});break}if(l>i){const t=e.slice(i,l);t.trim()&&o.push({type:"text",content:t})}const a=e.indexOf(">",l);if(-1===a)break;const s=e.slice(l+1,a).trim(),c=s.startsWith("/"),d=s.endsWith("/");if(c)o.push({type:"tag_close",tagName:s.slice(1).trim()});else{const e=s.indexOf(" ");let i,l="";-1===e?i=d?s.slice(0,-1).trim():s.trim():(i=s.slice(0,e).trim(),l=s.slice(e+1));const a={};if(l){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let o;for(;null!==(o=e.exec(l));){const e=o[1],i=null!=(r=null!=(n=null!=(t=o[2])?t:o[3])?n:o[4])?r:"";e&&!e.endsWith("/")&&(a[e]=i)}}o.push({type:d||Ze.has(i.toLowerCase())?"self_closing":"tag_open",tagName:i,attrs:a})}i=a+1}return o}(t),o=[],i=[];for(const t of r)if("text"===t.type){if(o.length>0&&o[o.length-1].blocked)continue;(o.length>0?o[o.length-1].children:i).push(t.content)}else if("self_closing"===t.type){if(Xe.has(t.tagName.toLowerCase()))continue;const r=Qe(t.attrs||{}),l=et(t.tagName,n)?n[t.tagName]||n[t.tagName.toLowerCase()]:void 0;l?(o.length>0?o[o.length-1].children:i).push(e.createElement(l,r)):(o.length>0?o[o.length-1].children:i).push(e.createElement(t.tagName,{...Ge(r),suppressHydrationWarning:!0}))}else if("tag_open"===t.type)o.push({tagName:t.tagName,children:[],attrs:t.attrs,blocked:Xe.has(t.tagName.toLowerCase())});else if("tag_close"===t.type){const t=o.pop();if(t){if(t.blocked)continue;const r=Qe(t.attrs||{}),l=et(t.tagName,n)?n[t.tagName]||n[t.tagName.toLowerCase()]:void 0,a=l?e.createElement(l,r,...t.children):e.createElement(t.tagName,{...Ge(r),suppressHydrationWarning:!0},...t.children);o.length>0?o[o.length-1].children.push(a):i.push(a)}}for(;o.length>0;){const t=o.pop();if(t.blocked)continue;const r=Qe(t.attrs||{}),l=et(t.tagName,n)?n[t.tagName]||n[t.tagName.toLowerCase()]:void 0,a=l?e.createElement(l,r,...t.children):e.createElement(t.tagName,{...Ge(r),suppressHydrationWarning:!0},...t.children);i.push(a)}return i}catch{return null}}(o.content,y):null,[y,o.content,k]);/* @__PURE__ */
48
48
  return M.jsx("div",{ref:m,className:"html-block-node",...b,children:p?k&&j?/* @__PURE__ */M.jsx(M.Fragment,{children:j}):/* @__PURE__ */M.jsx("div",{dangerouslySetInnerHTML:{__html:null!=g?g:""}}):/* @__PURE__ */M.jsx("div",{className:"html-block-node__placeholder",children:null!=a?a:/* @__PURE__ */M.jsxs(M.Fragment,{children:[
49
49
  /* @__PURE__ */M.jsx("span",{className:"html-block-node__placeholder-bar"}),
50
50
  /* @__PURE__ */M.jsx("span",{className:"html-block-node__placeholder-bar w-4/5"}),
51
- /* @__PURE__ */M.jsx("span",{className:"html-block-node__placeholder-bar w-2/3"})]})})})}const nt=/* @__PURE__ */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"]),rt=/* @__PURE__ */new Set(["script"]),ot=/* @__PURE__ */new Set(["href","src","srcset","xlink:href","formaction"]),it=(()=>{try{return Boolean(!1)}catch{}return!1})();function lt(e){it&&console.warn(e)}function at(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/"))}const st=/* @__PURE__ */new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ct=/* @__PURE__ */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"]);function dt(e){return e.startsWith("--")?e:e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function ut(e,t){const n=e.toLowerCase();return!ct.has(n)&&(Object.prototype.hasOwnProperty.call(t,n)||Object.prototype.hasOwnProperty.call(t,e))}function mt(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 ht(e){return e.trim().length>0}function pt(t,n,r,o){if(rt.has(t.toLowerCase()))return null;const i=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=n.toLowerCase();nt.has(e)||ot.has(e)&&r&&at(r)||(t[n]=r)}return t}(n);if(ut(t,o)){const n=o[t]||o[t.toLowerCase()],l=function(e){const t={};for(const[n,r]of Object.entries(e))t[n]=mt(r,n);return t}(i);return e.createElement(n,l,...r)}return e.createElement(t,function(e){const t={...e};if(Object.prototype.hasOwnProperty.call(t,"class")&&(t.className=t.class,delete t.class),Object.prototype.hasOwnProperty.call(t,"for")&&(t.htmlFor=t.for,delete t.for),"string"==typeof t.style){const e=function(e){const t=e.trim();if(!t)return;const n={};for(const r of t.split(";")){const e=r.trim();if(!e)continue;const t=e.indexOf(":");if(-1===t)continue;const o=dt(e.slice(0,t).trim()),i=e.slice(t+1).trim();o&&(n[o]=i)}return Object.keys(n).length?n:void 0}(t.style);e?t.style=e:delete t.style}return t}(i),...r)}function ft(t){const{node:r,customId:o}=t,a=i(null),[s,c]=n(!1);l(()=>{c(!0)},[]);const d=H(o),u=e.useMemo(()=>{const e=r.content;if(!e)return{mode:"html",content:""};if(!function(e,t){const n=/<([a-z][a-z0-9-]*)\b[^>]*>/gi;let r;for(;null!==(r=n.exec(e));)if(ut(r[1],t))return!0;return!1}(e,d))return{mode:"html",content:e};const t=function(e,t){if(!e)return[];try{const n=function(e,t){const n=[],r=[];for(const o of e)if("text"===o.type)(n.length>0?n[n.length-1].children:r).push(o.content);else if("self_closing"===o.type){const e=pt(o.tagName,o.attrs||{},[],t),i=n.length>0?n[n.length-1].children:r;null!=e&&i.push(e)}else if("tag_open"===o.type)n.push({tagName:o.tagName,children:[],attrs:o.attrs});else if("tag_close"===o.type){const e=o.tagName.toLowerCase();let i=-1;for(let t=n.length-1;t>=0;t--)if(n[t].tagName.toLowerCase()===e){i=t;break}if(-1!==i)for(;n.length>i;){const o=n.pop(),l=pt(o.tagName,o.attrs||{},o.children,t);n.length>0?null!=l&&n[n.length-1].children.push(l):null!=l&&r.push(l),o.tagName.toLowerCase()!==e&&n.length>i&&lt(`Auto-closing unclosed tag: <${o.tagName}>`)}else lt(`Ignoring closing tag with no matching opening tag: </${o.tagName}>`)}for(;n.length>0;){const e=n.pop(),o=pt(e.tagName,e.attrs||{},e.children,t);null!=o&&r.push(o),lt(`Auto-closing unclosed tag: <${e.tagName}>`)}return r}(function(e){var t,n,r;const o=[];let i=0;for(;i<e.length;){if(e.startsWith("\x3c!--",i)){const t=e.indexOf("--\x3e",i);if(-1!==t){i=t+3;continue}break}const l=e.indexOf("<",i);if(-1===l){if(i<e.length){const t=e.slice(i);ht(t)&&o.push({type:"text",content:t})}break}if(l>i){const t=e.slice(i,l);ht(t)&&o.push({type:"text",content:t})}if(e.startsWith("![CDATA[",l+1)){const t=e.indexOf("]]>",l);if(-1!==t){o.push({type:"text",content:e.slice(l,t+3)}),i=t+3;continue}break}if(e.startsWith("!",l+1)){const t=e.indexOf(">",l);if(-1!==t){i=t+1;continue}break}const a=e.indexOf(">",l);if(-1===a)break;const s=e.slice(l+1,a).trim(),c=s.startsWith("/"),d=s.endsWith("/");if(c){const e=s.slice(1).trim();o.push({type:"tag_close",tagName:e})}else{const e=s.indexOf(" ");let i,l="";-1===e?i=d?s.slice(0,-1).trim():s.trim():(i=s.slice(0,e).trim(),l=s.slice(e+1));const a={};if(l){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let o;for(;null!==(o=e.exec(l));){const e=o[1],i=null!=(r=null!=(n=null!=(t=o[2])?t:o[3])?n:o[4])?r:"";e&&!e.endsWith("/")&&(a[e]=i)}}o.push({type:d||st.has(i.toLowerCase())?"self_closing":"tag_open",tagName:i,attrs:a})}i=a+1}return o}(e),t);return n}catch(r){return n=r,it&&console.error("Failed to parse HTML to React nodes:",n),null}var n}(e,d);return null===t?{mode:"html",content:e}:{mode:"dynamic",nodes:t}},[r.content,d]);return l(()=>{var e;if(!s||!a.current||"html"!==u.mode)return;const t=a.current;t.innerHTML="";const n=document.createElement("template");n.innerHTML=null!=(e=r.content)?e:"",t.appendChild(n.content.cloneNode(!0))},[r.content,u.mode,s]),r.loading&&!r.autoClosed?/* @__PURE__ */M.jsx("span",{className:"html-inline-node html-inline-node--loading",children:r.content}):"dynamic"===u.mode?/* @__PURE__ */M.jsx("span",{className:"html-inline-node",style:{display:"inline"},children:u.nodes}):/* @__PURE__ */M.jsx("span",{ref:a,className:"html-inline-node",style:{display:"inline"}})}const gt={fallbackSrc:"",showCaption:!1,lazy:!0,svgMinHeight:"12rem",usePlaceholder:!0};function vt(e){var r,o,a,s,c,d;const u={...gt,...e},m=P(),[h,p]=n(null),f=i(null),[g,v]=n(()=>"undefined"==typeof window||!1===u.lazy),[w,x]=n(!1),[y,b]=n(!1),[k,j]=n(!1);l(()=>{var e;if(!u.lazy)return;const t=h;if(null==(e=f.current)||e.destroy(),f.current=null,!t)return void v(!1);const n=m(t,{rootMargin:"400px"});return f.current=n,n.isVisible()&&v(!0),n.whenVisible.then(()=>v(!0)).catch(()=>{}),()=>{n.destroy(),f.current=null}},[h,m,u.lazy]),l(()=>()=>{var e;null==(e=f.current)||e.destroy(),f.current=null},[]);const N=t(()=>y&&u.fallbackSrc?u.fallbackSrc:u.node.src,[y,u.fallbackSrc,u.node.src]);l(()=>{x(!1),b(!1)},[N]),l(()=>{j(!1)},[u.node.src]);const C=t(()=>/\.svg(?:\?|$)/i.test(String(N)),[N]),S=!u.lazy||g,B=C?{minHeight:u.svgMinHeight,width:"100%"}:{minHeight:"6rem"};/* @__PURE__ */
51
+ /* @__PURE__ */M.jsx("span",{className:"html-block-node__placeholder-bar w-2/3"})]})})})}const nt=/* @__PURE__ */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"]),rt=/* @__PURE__ */new Set(["script"]),ot=/* @__PURE__ */new Set(["href","src","srcset","xlink:href","formaction"]),it=(()=>{try{return Boolean(!1)}catch{}return!1})();function lt(e){it&&console.warn(e)}function at(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/"))}const st=/* @__PURE__ */new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ct=/* @__PURE__ */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"]);function dt(e){return e.startsWith("--")?e:e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function ut(e,t){const n=e.toLowerCase();return!ct.has(n)&&(Object.prototype.hasOwnProperty.call(t,n)||Object.prototype.hasOwnProperty.call(t,e))}function mt(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 ht(e){return e.trim().length>0}function pt(t,n,r,o){if(rt.has(t.toLowerCase()))return null;const i=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=n.toLowerCase();nt.has(e)||ot.has(e)&&r&&at(r)||(t[n]=r)}return t}(n);if(ut(t,o)){const n=o[t]||o[t.toLowerCase()],l=function(e){const t={};for(const[n,r]of Object.entries(e))t[n]=mt(r,n);return t}(i);return e.createElement(n,l,...r)}return e.createElement(t,function(e){const t={...e};if(Object.prototype.hasOwnProperty.call(t,"class")&&(t.className=t.class,delete t.class),Object.prototype.hasOwnProperty.call(t,"for")&&(t.htmlFor=t.for,delete t.for),"string"==typeof t.style){const e=function(e){const t=e.trim();if(!t)return;const n={};for(const r of t.split(";")){const e=r.trim();if(!e)continue;const t=e.indexOf(":");if(-1===t)continue;const o=dt(e.slice(0,t).trim()),i=e.slice(t+1).trim();o&&(n[o]=i)}return Object.keys(n).length?n:void 0}(t.style);e?t.style=e:delete t.style}return t}(i),...r)}function ft(t){const{node:r,customId:o}=t,a=i(null),[s,c]=n(!1);l(()=>{c(!0)},[]);const d=H(o),u=e.useMemo(()=>{const e=r.content;if(!e)return{mode:"html",content:""};if(!function(e,t){const n=/<([a-z][a-z0-9-]*)\b[^>]*>/gi;let r;for(;null!==(r=n.exec(e));)if(ut(r[1],t))return!0;return!1}(e,d))return{mode:"html",content:e};const t=function(e,t){if(!e)return[];try{const n=function(e,t){const n=[],r=[];for(const o of e)if("text"===o.type)(n.length>0?n[n.length-1].children:r).push(o.content);else if("self_closing"===o.type){const e=pt(o.tagName,o.attrs||{},[],t),i=n.length>0?n[n.length-1].children:r;null!=e&&i.push(e)}else if("tag_open"===o.type)n.push({tagName:o.tagName,children:[],attrs:o.attrs});else if("tag_close"===o.type){const e=o.tagName.toLowerCase();let i=-1;for(let t=n.length-1;t>=0;t--)if(n[t].tagName.toLowerCase()===e){i=t;break}if(-1!==i)for(;n.length>i;){const o=n.pop(),l=pt(o.tagName,o.attrs||{},o.children,t);n.length>0?null!=l&&n[n.length-1].children.push(l):null!=l&&r.push(l),o.tagName.toLowerCase()!==e&&n.length>i&&lt(`Auto-closing unclosed tag: <${o.tagName}>`)}else lt(`Ignoring closing tag with no matching opening tag: </${o.tagName}>`)}for(;n.length>0;){const e=n.pop(),o=pt(e.tagName,e.attrs||{},e.children,t);null!=o&&r.push(o),lt(`Auto-closing unclosed tag: <${e.tagName}>`)}return r}(function(e){var t,n,r;const o=[];let i=0;for(;i<e.length;){if(e.startsWith("\x3c!--",i)){const t=e.indexOf("--\x3e",i);if(-1!==t){i=t+3;continue}break}const l=e.indexOf("<",i);if(-1===l){if(i<e.length){const t=e.slice(i);ht(t)&&o.push({type:"text",content:t})}break}if(l>i){const t=e.slice(i,l);ht(t)&&o.push({type:"text",content:t})}if(e.startsWith("![CDATA[",l+1)){const t=e.indexOf("]]>",l);if(-1!==t){o.push({type:"text",content:e.slice(l,t+3)}),i=t+3;continue}break}if(e.startsWith("!",l+1)){const t=e.indexOf(">",l);if(-1!==t){i=t+1;continue}break}const a=e.indexOf(">",l);if(-1===a)break;const s=e.slice(l+1,a).trim(),c=s.startsWith("/"),d=s.endsWith("/");if(c){const e=s.slice(1).trim();o.push({type:"tag_close",tagName:e})}else{const e=s.indexOf(" ");let i,l="";-1===e?i=d?s.slice(0,-1).trim():s.trim():(i=s.slice(0,e).trim(),l=s.slice(e+1));const a={};if(l){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let o;for(;null!==(o=e.exec(l));){const e=o[1],i=null!=(r=null!=(n=null!=(t=o[2])?t:o[3])?n:o[4])?r:"";e&&!e.endsWith("/")&&(a[e]=i)}}o.push({type:d||st.has(i.toLowerCase())?"self_closing":"tag_open",tagName:i,attrs:a})}i=a+1}return o}(e),t);return n}catch(r){return n=r,it&&console.error("Failed to parse HTML to React nodes:",n),null}var n}(e,d);return null===t?{mode:"html",content:e}:{mode:"dynamic",nodes:t}},[r.content,d]);return l(()=>{var e;if(!s||!a.current||"html"!==u.mode)return;const t=a.current;t.innerHTML="";const n=document.createElement("template");n.innerHTML=null!=(e=r.content)?e:"",t.appendChild(n.content.cloneNode(!0))},[r.content,u.mode,s]),r.loading&&!r.autoClosed?/* @__PURE__ */M.jsx("span",{className:"html-inline-node html-inline-node--loading",children:r.content}):"dynamic"===u.mode?/* @__PURE__ */M.jsx("span",{className:"html-inline-node",style:{display:"inline"},children:u.nodes}):/* @__PURE__ */M.jsx("span",{ref:a,className:"html-inline-node",style:{display:"inline"}})}const gt={fallbackSrc:"",showCaption:!1,lazy:!0,svgMinHeight:"12rem",usePlaceholder:!0};function wt(e){var r,o,a,s,c,d;const u={...gt,...e},m=P(),[h,p]=n(null),f=i(null),[g,w]=n(()=>"undefined"==typeof window||!1===u.lazy),[v,x]=n(!1),[y,b]=n(!1),[k,j]=n(!1);l(()=>{var e;if(!u.lazy)return;const t=h;if(null==(e=f.current)||e.destroy(),f.current=null,!t)return void w(!1);const n=m(t,{rootMargin:"400px"});return f.current=n,n.isVisible()&&w(!0),n.whenVisible.then(()=>w(!0)).catch(()=>{}),()=>{n.destroy(),f.current=null}},[h,m,u.lazy]),l(()=>()=>{var e;null==(e=f.current)||e.destroy(),f.current=null},[]);const N=t(()=>y&&u.fallbackSrc?u.fallbackSrc:u.node.src,[y,u.fallbackSrc,u.node.src]);l(()=>{x(!1),b(!1)},[N]),l(()=>{j(!1)},[u.node.src]);const C=t(()=>/\.svg(?:\?|$)/i.test(String(N)),[N]),S=!u.lazy||g,B=C?{minHeight:u.svgMinHeight,width:"100%"}:{minHeight:"6rem"};/* @__PURE__ */
52
52
  return M.jsxs("figure",{ref:p,className:"image-node",children:[
53
53
  /* @__PURE__ */M.jsx("div",{className:"image-node__inner",children:u.node.loading||y||!S?y?/* @__PURE__ */M.jsxs("div",{className:"image-node__error",children:[
54
54
  /* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","aria-hidden":"true",children:/* @__PURE__ */M.jsx("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})}),
55
55
  /* @__PURE__ */M.jsx("span",{className:"image-node__placeholder-text",children:"Image failed to load"})]}):/* @__PURE__ */M.jsx("div",{className:"image-node__placeholder",style:B,children:u.usePlaceholder?/* @__PURE__ */M.jsxs(M.Fragment,{children:[
56
56
  /* @__PURE__ */M.jsx("span",{className:"image-node__spinner","aria-hidden":"true"}),
57
- /* @__PURE__ */M.jsx("span",{className:"image-node__placeholder-text",children:"Loading image..."})]}):/* @__PURE__ */M.jsx("span",{className:"image-node__placeholder-text",children:null!=(d=u.node.raw)?d:"Loading image…"})},"placeholder"):/* @__PURE__ */M.jsx("img",{src:N,alt:String(null!=(o=null!=(r=u.node.alt)?r:u.node.title)?o:""),title:String(null!=(s=null!=(a=u.node.title)?a:u.node.alt)?s:""),className:"image-node__img"+(w?" is-loaded":""),style:C?{minHeight:u.svgMinHeight,width:"100%",height:"auto",objectFit:"contain"}:void 0,loading:u.lazy?"lazy":"eager",decoding:"async",tabIndex:w?0:-1,"aria-label":null!=(c=u.node.alt)?c:"Preview image",onError:()=>{var e;u.fallbackSrc&&!k?(j(!0),b(!0)):(b(!0),null==(e=u.onError)||e.call(u,u.node.src))},onLoad:()=>{var e;x(!0),b(!1),null==(e=u.onLoad)||e.call(u,N)},onClick:e=>{var t;e.preventDefault(),w&&!y&&(null==(t=u.onClick)||t.call(u,[e,N]))}},"image")}),u.showCaption&&u.node.alt&&/* @__PURE__ */M.jsx("figcaption",{className:"image-node__caption",children:u.node.alt})]})}function wt(e){const{node:t}=e;/* @__PURE__ */
57
+ /* @__PURE__ */M.jsx("span",{className:"image-node__placeholder-text",children:"Loading image..."})]}):/* @__PURE__ */M.jsx("span",{className:"image-node__placeholder-text",children:null!=(d=u.node.raw)?d:"Loading image…"})},"placeholder"):/* @__PURE__ */M.jsx("img",{src:N,alt:String(null!=(o=null!=(r=u.node.alt)?r:u.node.title)?o:""),title:String(null!=(s=null!=(a=u.node.title)?a:u.node.alt)?s:""),className:"image-node__img"+(v?" is-loaded":""),style:C?{minHeight:u.svgMinHeight,width:"100%",height:"auto",objectFit:"contain"}:void 0,loading:u.lazy?"lazy":"eager",decoding:"async",tabIndex:v?0:-1,"aria-label":null!=(c=u.node.alt)?c:"Preview image",onError:()=>{var e;u.fallbackSrc&&!k?(j(!0),b(!0)):(b(!0),null==(e=u.onError)||e.call(u,u.node.src))},onLoad:()=>{var e;x(!0),b(!1),null==(e=u.onLoad)||e.call(u,N)},onClick:e=>{var t;e.preventDefault(),v&&!y&&(null==(t=u.onClick)||t.call(u,[e,N]))}},"image")}),u.showCaption&&u.node.alt&&/* @__PURE__ */M.jsx("figcaption",{className:"image-node__caption",children:u.node.alt})]})}function vt(e){const{node:t}=e;/* @__PURE__ */
58
58
  return M.jsx("code",{className:"inline-code inline text-[85%] px-1 py-0.5 rounded font-mono bg-secondary whitespace-normal break-words max-w-full",children:t.code})}function xt(e){/* @__PURE__ */
59
- return M.jsx("ins",{className:"insert-node",children:e.children})}function yt(e){var n,r,o,i,l;const{node:s,ctx:c,renderNode:d,indexKey:u}=e,m=!1!==e.showTooltip,h=null!=(n=e.isDark)?n:null==c?void 0:c.isDark,p=t(()=>{var t,n,r,o,i,l;const a=void 0!==e.underlineBottom?"number"==typeof e.underlineBottom?`${e.underlineBottom}px`:String(e.underlineBottom):"-3px";return{"--link-color":null!=(t=e.color)?t:"#0366d6","--underline-height":`${null!=(n=e.underlineHeight)?n:2}px`,"--underline-bottom":a,"--underline-opacity":String(null!=(r=e.animationOpacity)?r:.9),"--underline-duration":`${null!=(o=e.animationDuration)?o:.8}s`,"--underline-timing":null!=(i=e.animationTiming)?i:"linear","--underline-iteration":"number"==typeof e.animationIteration?String(e.animationIteration):null!=(l=e.animationIteration)?l:"infinite"}},[e.animationDuration,e.animationIteration,e.animationOpacity,e.animationTiming,e.color,e.underlineBottom,e.underlineHeight]),f=String(null!=(o=null!=(r=s.title)?r:s.href)?o:""),g=a(e=>{m&&oe(e.currentTarget,String(s.title||s.href||s.text||""),"top",!1,(e.clientX,e.clientY),h)},[h,s.href,s.text,s.title,m]),v=a(()=>{m&&ie()},[m]);return s.loading?/* @__PURE__ */M.jsx("span",{className:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":"false",style:p,children:/* @__PURE__ */M.jsxs("span",{className:"link-text-wrapper relative inline-flex",children:[
59
+ return M.jsx("ins",{className:"insert-node",children:e.children})}function yt(e){var n,r,o,i,l;const{node:s,ctx:c,renderNode:d,indexKey:u}=e,m=!1!==e.showTooltip,h=null!=(n=e.isDark)?n:null==c?void 0:c.isDark,p=t(()=>{var t,n,r,o,i,l;const a=void 0!==e.underlineBottom?"number"==typeof e.underlineBottom?`${e.underlineBottom}px`:String(e.underlineBottom):"-3px";return{"--link-color":null!=(t=e.color)?t:"#0366d6","--underline-height":`${null!=(n=e.underlineHeight)?n:2}px`,"--underline-bottom":a,"--underline-opacity":String(null!=(r=e.animationOpacity)?r:.9),"--underline-duration":`${null!=(o=e.animationDuration)?o:.8}s`,"--underline-timing":null!=(i=e.animationTiming)?i:"linear","--underline-iteration":"number"==typeof e.animationIteration?String(e.animationIteration):null!=(l=e.animationIteration)?l:"infinite"}},[e.animationDuration,e.animationIteration,e.animationOpacity,e.animationTiming,e.color,e.underlineBottom,e.underlineHeight]),f=String(null!=(o=null!=(r=s.title)?r:s.href)?o:""),g=a(e=>{m&&oe(e.currentTarget,String(s.title||s.href||s.text||""),"top",!1,(e.clientX,e.clientY),h)},[h,s.href,s.text,s.title,m]),w=a(()=>{m&&ie()},[m]);return s.loading?/* @__PURE__ */M.jsx("span",{className:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":"false",style:p,children:/* @__PURE__ */M.jsxs("span",{className:"link-text-wrapper relative inline-flex",children:[
60
60
  /* @__PURE__ */M.jsx("span",{className:"leading-[normal] link-text",children:/* @__PURE__ */M.jsx("span",{className:"leading-[normal] link-text",children:null!=(i=s.text)?i:""})}),
61
- /* @__PURE__ */M.jsx("span",{className:"underline-anim","aria-hidden":"true"})]})}):/* @__PURE__ */M.jsx("a",{className:"link-node",href:s.href,title:m?"":f,"aria-label":`Link: ${f}`,target:"_blank",rel:"noopener noreferrer",style:p,onMouseEnter:g,onMouseLeave:v,children:c&&d?S(s.children,c,String(null!=u?u:"link"),d):null!=(l=s.text)?l:null})}function bt(e){const{node:t,ctx:n,renderNode:r,value:o,indexKey:i,children:l}=e,a=null==o?void 0:o;/* @__PURE__ */
61
+ /* @__PURE__ */M.jsx("span",{className:"underline-anim","aria-hidden":"true"})]})}):/* @__PURE__ */M.jsx("a",{className:"link-node",href:s.href,title:m?"":f,"aria-label":`Link: ${f}`,target:"_blank",rel:"noopener noreferrer",style:p,onMouseEnter:g,onMouseLeave:w,children:c&&d?S(s.children,c,String(null!=u?u:"link"),d):null!=(l=s.text)?l:null})}function bt(e){const{node:t,ctx:n,renderNode:r,value:o,indexKey:i,children:l}=e,a=null==o?void 0:o;/* @__PURE__ */
62
62
  return M.jsx("li",{className:"list-item pl-1.5 my-2",dir:"auto",value:a,children:null!=l?l:n&&r?S(t.children,n,String(null!=i?i:"list-item"),r):null})}function kt(e){var t;const{node:n,ctx:r,renderNode:o,indexKey:i}=e,l=n.ordered?"ol":"ul",a=n.ordered&&n.start?n.start:void 0;/* @__PURE__ */
63
63
  return M.jsx(l,{className:ze("list-node my-5 pl-[calc(13/8*1em)]",n.ordered?"list-decimal":"list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)]"),start:a,children:null==(t=n.items)?void 0:t.map((e,t)=>{var l;/* @__PURE__ */
64
64
  return M.jsx(bt,{node:e,value:n.ordered?(null!=(l=n.start)?l:1)+t:void 0,ctx:r,renderNode:o,indexKey:`${String(null!=i?i:"list")}-${t}`},`${String(null!=i?i:"list")}-${t}`)})})}let jt=null,Mt=null,Nt=!1;const Ct=/* @__PURE__ */new Map,St=/* @__PURE__ */new Map;let Bt=5;const Et=/* @__PURE__ */new Set;function _t(){if(Ct.size<Bt&&Et.size){const e=Array.from(Et);Et.clear();for(const t of e)try{t()}catch{}}}function Tt(e){jt=e,Mt=null,jt.onmessage=e=>{const{id:t,html:n,error:r}=e.data,o=Ct.get(t);if(o)if(Ct.delete(t),clearTimeout(o.timeoutId),_t(),r)o.reject(new Error(r));else{const{content:t,displayMode:r}=e.data;if(t){const e=`${r?"d":"i"}:${t}`;if(St.set(e,n),St.size>200){const e=St.keys().next().value;St.delete(e)}}o.resolve(n)}},jt.onerror=e=>{console.error("[katexWorkerClient] Worker error:",e);for(const[t,n]of Ct.entries())clearTimeout(n.timeoutId),n.reject(new Error(`Worker error: ${e.message}`));Ct.clear(),_t()}}function Lt(){var e;jt&&(null==(e=jt.terminate)||e.call(jt)),jt=null,Mt=null}function $t(e){Nt=!!e,jt&&jt.postMessage({type:"init",debug:Nt})}const Ot="WORKER_BUSY";async function Pt(e,t=!0,n=2e3,r){if(performance.now(),Mt)return Promise.reject(Mt);const o=`${t?"d":"i"}:${e}`,i=St.get(o);if(i)return Promise.resolve(i);const l=jt||(Mt=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Mt.name="WORKER_INIT_ERROR",Mt.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(Mt);if(Ct.size>=Bt){const e=new Error("Worker busy");return e.name="WorkerBusy",e.code=Ot,e.busy=!0,e.inFlight=Ct.size,e.max=Bt,Promise.reject(e)}return new Promise((o,i)=>{if(null==r?void 0:r.aborted){const e=new Error("Aborted");return e.name="AbortError",void i(e)}const a=Math.random().toString(36).slice(2),s=setTimeout(()=>{Ct.delete(a);const e=new Error("Worker render timed out");e.name="WorkerTimeout",e.code="WORKER_TIMEOUT",i(e),_t()},n),c=()=>{},d=()=>{Ct.delete(a),clearTimeout(s),Et.delete(c);const e=new Error("Aborted");e.name="AbortError",i(e),_t()};r&&r.addEventListener("abort",d,{once:!0}),Ct.set(a,{resolve:e=>{r&&r.removeEventListener("abort",d),o(e)},reject:e=>{r&&r.removeEventListener("abort",d),i(e)},timeoutId:s});try{l.postMessage({id:a,content:e,displayMode:t,debug:Nt})}catch(u){Ct.delete(a),clearTimeout(s),r&&r.removeEventListener("abort",d),i(u),_t()}})}function Rt(e,t,n){const r=`${t?"d":"i"}:${e}`;if(St.set(r,n),St.size>200){const e=St.keys().next().value;St.delete(e)}}function Dt(){St.clear()}function Wt(e){Bt=Math.max(1,Math.floor(e)),_t()}function At(e=1500,t){return Ct.size<Bt?Promise.resolve():new Promise((n,r)=>{if(null==t?void 0:t.aborted){const e=new Error("Aborted");return e.name="AbortError",void r(e)}let o=null;function i(){Et.delete(l),null!=o&&clearTimeout(o),t&&t.removeEventListener("abort",a)}function l(){i(),n()}function a(){i();const e=new Error("Aborted");e.name="AbortError",r(e)}o=e>0?setTimeout(()=>{i(),r(new Error("Timeout waiting for worker slot"))},e):null,t&&t.addEventListener("abort",a,{once:!0}),Et.add(l)})}const It={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function Ft(e){null!=e.timeout&&(It.timeout=Math.max(0,Math.floor(e.timeout))),null!=e.waitTimeout&&(It.waitTimeout=Math.max(0,Math.floor(e.waitTimeout))),null!=e.backoffMs&&(It.backoffMs=Math.max(0,Math.floor(e.backoffMs))),null!=e.maxRetries&&(It.maxRetries=Math.max(0,Math.floor(e.maxRetries)))}function zt(){return{...It}}async function Ht(e,t=!0,n={}){var r,o,i,l;const a=null!=(r=n.timeout)?r:It.timeout,s=null!=(o=n.waitTimeout)?o:It.waitTimeout,c=null!=(i=n.backoffMs)?i:It.backoffMs,d=null!=(l=n.maxRetries)?l:It.maxRetries,u=n.signal;let m=0;for(;;){if(null==u?void 0:u.aborted){const e=new Error("Aborted");throw e.name="AbortError",e}try{return await Pt(e,t,a,u)}catch(h){if((null==h?void 0:h.code)!==Ot||m>=d)throw h;if(m++,await At(s,u).catch(()=>{}),null==u?void 0:u.aborted){const e=new Error("Aborted");throw e.name="AbortError",e}c>0&&await new Promise(e=>setTimeout(e,c*m))}}}let Vt=null,Kt=!1;async function Xt(){if(Vt)return Vt;if(Kt)return null;try{return Vt=await import("katex"),await import("katex/contrib/mhchem"),Vt}catch{return Kt=!0,null}}function qt({node:e}){const t=i(null),[r,o]=n(!0),a=i(0);return l(()=>{var n;let r=!1;const i=new AbortController,l=++a.current,s=null!=(n=e.content)?n:"";return s?(Ht(s,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:i.signal}).then(e=>{r||l!==a.current||(t.current&&(t.current.innerHTML=e),o(!1))}).catch(async n=>{if(r||l!==a.current)return;if(!t.current)return;const i=(null==n?void 0:n.code)||(null==n?void 0:n.name);if("WORKER_INIT_ERROR"===i||(null==n?void 0:n.fallbackToRenderer)||i===Ot||"WORKER_TIMEOUT"===i){const n=await Xt();if(n)try{const i=n.renderToString(s,{throwOnError:e.loading,displayMode:!0});return void(!r&&l===a.current&&t.current&&(t.current.innerHTML=i,o(!1),Rt(s,!0,i)))}catch{}}e.loading||(t.current.textContent=e.raw,o(!1))}),()=>{r=!0,i.abort()}):(o(!1),()=>i.abort())},[e.content,e.loading,e.raw]),/* @__PURE__ */M.jsx("div",{className:"math-block text-center overflow-x-auto relative min-h-[40px]",children:/* @__PURE__ */M.jsx("div",{ref:t,className:r?"math-rendering":void 0})})}function Ut({node:e}){const t=i(null),r=i(null),[o,a]=n(!0),s=i(0);return l(()=>{var t;let n=!1;const o=new AbortController,i=++s.current,l=null!=(t=e.content)?t:"";return l?(Ht(l,!1,{timeout:1500,waitTimeout:0,maxRetries:0,signal:o.signal}).then(e=>{n||i!==s.current||r.current&&(r.current.innerHTML=e,a(!1))}).catch(async t=>{if(n||i!==s.current)return;if(!r.current)return;const o=(null==t?void 0:t.code)||(null==t?void 0:t.name);if("WORKER_INIT_ERROR"===o||(null==t?void 0:t.fallbackToRenderer)||o===Ot||"WORKER_TIMEOUT"===o){const t=await Xt();if(t)try{const o=t.renderToString(l,{throwOnError:e.loading,displayMode:!1});return void(!n&&i===s.current&&r.current&&(r.current.innerHTML=o,a(!1),Rt(l,!1,o)))}catch{}}e.loading||(r.current.textContent=e.raw,a(!1))}),()=>{n=!0,o.abort()}):(a(!1),()=>o.abort())},[e.content,e.loading,e.raw]),/* @__PURE__ */M.jsxs("span",{ref:t,className:"math-inline-wrapper",children:[
65
65
  /* @__PURE__ */M.jsx("span",{ref:r,className:"math-inline"+(o?" math-inline--hidden":"")}),o&&/* @__PURE__ */M.jsxs("span",{className:"math-inline__loading",role:"status","aria-live":"polite",children:[
66
66
  /* @__PURE__ */M.jsx("span",{className:"math-inline__spinner","aria-hidden":"true"}),
67
- /* @__PURE__ */M.jsx("span",{className:"sr-only",children:"Loading"})]})]})}let Yt=null,Zt=null;const Jt=/* @__PURE__ */new Map;let Gt=5,Qt=!1;function en(e){Qt=!!e}function tn(e){Number.isFinite(e)&&e>0&&(Gt=Math.floor(e))}function nn(){return{inFlight:Jt.size,max:Gt}}const rn="WORKER_BUSY";function on(e){Yt=e,Zt=null;const t=e;Yt.onmessage=e=>{if(Yt!==t)return;const{id:n,ok:r,result:o,error:i}=e.data,l=Jt.get(n);l&&(!1===r||i?l.reject(new Error(i||"Unknown error")):l.resolve(o))},Yt.onerror=e=>{var n,r;if(Yt===t)if(0!==Jt.size){try{Qt?console.error("[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e):null==(r=console.debug)||r.call(console,"[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e)}catch{}for(const[t,n]of Jt.entries())n.reject(new Error(`Worker error: ${e.message}`));Jt.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,r;if(Yt===t)if(0!==Jt.size){try{Qt?console.error("[mermaidWorkerClient] Worker messageerror:",e):null==(r=console.debug)||r.call(console,"[mermaidWorkerClient] Worker messageerror:",e)}catch{}for(const[e,t]of Jt.entries())t.reject(new Error("Worker messageerror"));Jt.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",e)}}function ln(){var e;if(Yt)try{for(const[e,t]of Jt.entries())t.reject(new Error("Worker cleared"));Jt.clear(),null==(e=Yt.terminate)||e.call(Yt)}catch{}Yt=null,Zt=null}function an(e,t,n=1400){if(Zt)return Promise.reject(Zt);const r=Yt||(Zt=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Zt.name="WORKER_INIT_ERROR",Zt.code="WORKER_INIT_ERROR",null);if(!r)return Promise.reject(Zt);if(Jt.size>=Gt){const e=new Error("Worker busy");return e.name="WorkerBusy",e.code=rn,e.inFlight=Jt.size,e.max=Gt,Promise.reject(e)}return new Promise((o,i)=>{const l=Math.random().toString(36).slice(2);let a=!1,s=null;const c=()=>{a||(a=!0,null!=s&&clearTimeout(s),Jt.delete(l))},d={resolve:e=>{c(),o(e)},reject:e=>{c(),i(e)}};Jt.set(l,d);try{r.postMessage({id:l,action:e,payload:t})}catch(u){return Jt.delete(l),void i(u)}s=setTimeout(()=>{const e=new Error("Worker call timed out");e.name="WorkerTimeout",e.code="WORKER_TIMEOUT";const t=Jt.get(l);null==t||t.reject(e)},n)})}async function sn(e,t,n=1400){return an("canParse",{code:e,theme:t},n)}async function cn(e,t,n=2400){return an("findPrefix",{code:e,theme:t},n)}function dn(){var e;null==(e=null==Yt?void 0:Yt.terminate)||e.call(Yt),Yt=null,Zt=null,Jt.clear()}let un=null,mn=!1,hn=null,pn=null;function fn(e,t){var n;if(!e||!t)return;const r=function(e){var t,n;return`${String(null!=(t=null==e?void 0:e.securityLevel)?t:"loose")}|htmlLabels:${!1===(null==(n=null==e?void 0:e.flowchart)?void 0:n.htmlLabels)?"0":"1"}`}(t);if(hn!==r)try{"function"==typeof e.initialize?e.initialize(t):(null==(n=e.mermaidAPI)?void 0:n.initialize)&&e.mermaidAPI.initialize(t),hn=r}catch{}}const gn="undefined"!=typeof window?c:l,vn={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},wn=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],xn=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function yn(e){if(!e)return"";const t=e.trim();return xn.test(t)?t:""}function bn(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function kn(e,t,n){if(!e)return"";if(n)return function(e,t){if(!e)return"";bn(e);const n=function(e){if("undefined"==typeof window||"undefined"==typeof DOMParser)return null;if(!e)return null;const t=e.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(!n||"svg"!==n.nodeName.toLowerCase())return null;const r=n;return function(e){const t=/* @__PURE__ */new Set(["script"]),n=[e,...Array.from(e.querySelectorAll("*"))];for(const r of n){if(t.has(r.tagName.toLowerCase())){r.remove();continue}const e=Array.from(r.attributes);for(const t of e){const e=t.name;if(/^on/i.test(e))r.removeAttribute(e);else{if("style"===e&&t.value){const n=t.value;if(wn.some(e=>e.test(n))){r.removeAttribute(e);continue}}if(("href"===e||"xlink:href"===e)&&t.value){const n=yn(t.value);if(!n){r.removeAttribute(e);continue}n!==t.value&&r.setAttribute(e,n)}}}}}(r),r}(t);return n?(e.appendChild(n),e.innerHTML):""}(e,t);if(bn(e),t)try{e.insertAdjacentHTML("afterbegin",t)}catch{e.innerHTML=t}return e.innerHTML}const jn={maxHeight:"500px",loading:!0,workerTimeoutMs:1400,parseTimeoutMs:1800,renderTimeoutMs:2500,fullRenderTimeoutMs:4e3,showHeader:!0,showModeToggle:!0,showCopyButton:!0,showExportButton:!0,showFullscreenButton:!0,showCollapseButton:!0,showZoomControls:!0,enableWheelZoom:!1,isStrict:!1};function Mn(e){var r,o,s,c,d,u,m,h,p;const f={...jn,...e},{t:g}=Y(),w=t(()=>ue("mermaid"),[]),x=null!=(o=null==(r=f.node)?void 0:r.code)?o:"",y=t(()=>x.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"),[x]),b=null!=(s=f.workerTimeoutMs)?s:jn.workerTimeoutMs,k=null!=(c=f.parseTimeoutMs)?c:jn.parseTimeoutMs,j=null!=(d=f.renderTimeoutMs)?d:jn.renderTimeoutMs,N=null!=(u=f.fullRenderTimeoutMs)?u:jn.fullRenderTimeoutMs,[C,S]=n(!1),[B,E]=n(!1),[_,T]=n(!1),[L,$]=n(!1),[O,R]=n(1),[D,W]=n({x:0,y:0}),[A,I]=n(!1),[F,z]=n(!1),[H,V]=n(!1),[K,X]=n(null),[q,U]=n(!1),[Z,J]=n(()=>null==f.maxHeight?"360px":f.maxHeight),[G,Q]=n("undefined"==typeof window),ee=i(null),te=i(null),ne=i(null),re=i(null),le=i(null),ae=i(null),se=i(null),ce=i({x:0,y:0}),de=i(0),me=i({}),he=i(""),pe=i(!1),fe=i(null),ge=i(!1),ve=i({zoom:1,translateX:0,translateY:0,containerHeight:Z||"360px"}),we=P(),xe=Boolean(null!=(h=null==(m=f.node)?void 0:m.loading)?h:f.loading),ye=f.isDark?"dark":"light",be=Boolean(f.isStrict),ke=t(()=>be?{startOnLoad:!1,securityLevel:"strict",dompurifyConfig:vn,flowchart:{htmlLabels:!1}}:{startOnLoad:!1,securityLevel:"loose"},[be]);l(()=>{ge.current=H},[H]),l(()=>{me.current={}},[ye,y,be]),l(()=>{let e=!1;return(async()=>{const t=await async function(e){if(un)return fn(un,e),un;if(pn){const t=await pn;return t&&fn(t,e),t}if(mn)return null;try{mn=!0,pn=(async()=>{try{const t=await import("mermaid"),n=(null==t?void 0:t.default)||t;if(un=(null==n?void 0:n.default)?n.default:(null==n?void 0:n.mermaidAPI)?n:(null==n?void 0:n.mermaid)?n.mermaid:n,!un)throw new Error("Mermaid module did not export expected API");return fn(un,null!=e?e:{startOnLoad:!1,securityLevel:"loose"}),un}catch(t){return console.warn("[markstream-react] Failed to load mermaid:",t),null}finally{pn=null}})();const t=await pn;return t&&fn(t,e),t}catch{return null}}(ke);e||(ee.current=t,S(Boolean(t)),pe.current||E(!t))})(),()=>{e=!0}},[ke]),l(()=>{const e=te.current;if(!e)return;const t=we(e,{rootMargin:"400px"});return fe.current=t,t.isVisible()&&Q(!0),t.whenVisible.then(()=>Q(!0)),()=>{t.destroy(),fe.current=null}},[we]),l(()=>{if("undefined"==typeof document)return;if(!q)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[q]);const je=a(e=>{const t=te.current,n=re.current;if(!t||!n)return;const r=n.querySelector("svg");if(!r)return;let o=0,i=0;const l=r.getAttribute("viewBox");if(l){const e=l.split(" ");4===e.length&&(o=Number.parseFloat(e[2]),i=Number.parseFloat(e[3]))}if(o&&i||!r.hasAttribute("width")||!r.hasAttribute("height")||(o=Number.parseFloat(r.getAttribute("width")||"0"),i=Number.parseFloat(r.getAttribute("height")||"0")),!o||!i||Number.isNaN(o)||Number.isNaN(i))try{const e=r.getBBox();o=e.width,i=e.height}catch{return}if(!(o>0&&i>0))return;const a=(null!=e?e:t.clientWidth)*(i/o),s=Number.isFinite(a)&&a>0?a:i;J(`${Math.min(s,i)}px`)},[]);l(()=>{if(!te.current||"undefined"==typeof ResizeObserver)return;const e=new ResizeObserver(e=>{if(!e.length)return;const t=e[0].contentRect.width;!function(e){try{if("undefined"!=typeof globalThis&&"function"==typeof globalThis.requestAnimationFrame)return globalThis.requestAnimationFrame(e)}catch{}globalThis.setTimeout(e,0)}(()=>je(t))});return e.observe(te.current),()=>e.disconnect()},[je]),l(()=>()=>{dn()},[]);const Me=a(async(e,t,n)=>{var r;if(!ee.current||!re.current)return!1;z(!0);try{const o=`mermaid-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,i=Cn(e,t),l=await Bn(()=>ee.current.render(o,i),{timeoutMs:N,signal:n});if(!(null==l?void 0:l.svg))return!1;const a=kn(re.current,l.svg,be);return null==(r=l.bindFunctions)||r.call(l,re.current),je(),me.current[t]=a,V(!0),X(null),!0}catch(o){return xe||X(o instanceof Error?o.message:String(o)),!1}finally{z(!1)}},[N,xe,be,je]),Ne=a(async(e,t,n)=>{var r;if(ee.current&&re.current){z(!0);try{const o=`mermaid-preview-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,i=Cn(Sn(e)||e,t),l=await Bn(()=>ee.current.render(o,i),{timeoutMs:j,signal:n});(null==l?void 0:l.svg)&&(kn(re.current,l.svg,be),null==(r=l.bindFunctions)||r.call(l,re.current),je())}catch{}finally{z(!1)}}},[j,xe,be,je]),Ce=a(async(e,t)=>{if(!e.trim())return bn(re.current),V(!1),void(he.current="");const n=e.replace(/\s+/g,"");if(n===he.current&&ge.current)return;const r=++de.current;try{if(await async function(e,t,n){try{if(await sn(e,t,n.workerTimeout))return!0}catch(l){if("AbortError"===(null==l?void 0:l.name))throw l}if(!n.mermaid)throw new Error("Mermaid not available");const r=Cn(e,t),o=n.mermaid;if("function"==typeof o.parse)return await Bn(()=>o.parse(r),{timeoutMs:n.parseTimeout,signal:n.signal}),!0;const i=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return await Bn(()=>o.render(i,r),{timeoutMs:n.parseTimeout,signal:n.signal}),!0}(e,ye,{workerTimeout:b,parseTimeout:k,mermaid:ee.current,signal:t}),(null==t?void 0:t.aborted)||de.current!==r)return;return void(await Me(e,ye,t)&&(he.current=n))}catch(o){if("AbortError"===(null==o?void 0:o.name))return}try{const n=await async function(e,t,n){try{const r=await cn(e,t,n.workerTimeout);if(r)return r}catch(o){if("AbortError"===(null==o?void 0:o.name))throw o}return Sn(e)}(e,ye,{workerTimeout:b,signal:t});if(!n||(null==t?void 0:t.aborted)||de.current!==r)return;await Ne(n,ye,t)}catch{}},[k,Me,Ne,ye,b]);l(()=>{if(!G||B||_)return;const e=new AbortController;return Ce(y,e.signal),()=>e.abort()},[y,_,Ce,B,G]);const Se=a((e,t)=>{e.clientX,e.clientY,oe(e.currentTarget,t,"top",!1,0,f.isDark)},[f.isDark]),Be=a(async()=>{var e,t;try{await(null==(e=navigator.clipboard)?void 0:e.writeText(y)),$(!0),null==(t=f.onCopy)||t.call(f,y),setTimeout(()=>$(!1),1e3)}catch{}},[y,f]),Ee=a(()=>{var e,t,n;const r=null!=(t=null==(e=re.current)?void 0:e.querySelector("svg"))?t:null;if(!r)return;const o=En(r),i={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:r,svgString:o};null==(n=f.onExport)||n.call(f,i),i.defaultPrevented||function(e,t){const n=null!=t?t:En(e),r=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=`mermaid-${Date.now()}.svg`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}(r,o)},[f]),_e=a(()=>{se.current=null,bn(ae.current)},[]),Te=a(()=>{U(!1),_e()},[_e]),Le=a(()=>{var e,t,n;const r=null!=(t=null==(e=re.current)?void 0:e.querySelector("svg"))?t:null,o=r?En(r):null,i={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:r,svgString:o};null==(n=f.onOpenModal)||n.call(f,i),i.defaultPrevented||U(!0)},[f]);l(()=>{if(!q)return;if("undefined"==typeof window)return;const e=e=>{"Escape"===e.key&&Te()};try{window.addEventListener("keydown",e)}catch{}return()=>{try{window.removeEventListener("keydown",e)}catch{}}},[Te,q]),gn(()=>{if(!q)return;const e=ae.current,t=te.current;if(!e||!t)return;const n=`translate(${D.x}px, ${D.y}px) scale(${O})`,r=t.cloneNode(!0);r.classList.add("fullscreen");const o=r.querySelector("[data-mermaid-wrapper]");o&&(se.current=o,o.style.transform=n),bn(e),e.appendChild(r)},[q]),l(()=>{q&&se.current&&(se.current.style.transform=`translate(${D.x}px, ${D.y}px) scale(${O})`)},[q,D.x,D.y,O]);const $e=B||F||_,Oe=t(()=>f.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",[f.isDark]),Pe=a(e=>{var t;const n={payload:{type:"toggle-mode",target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(null==(t=f.onToggleMode)||t.call(f,e,n),!n.defaultPrevented)if(pe.current=!0,"preview"===e){E(!1);const e=ve.current;R(e.zoom),W({x:e.translateX,y:e.translateY}),J(e.containerHeight),ge.current&&me.current[ye]&&re.current?(re.current.innerHTML=me.current[ye],je()):Ce(y)}else ve.current={zoom:O,translateX:D.x,translateY:D.y,containerHeight:Z},E(!0)},[y,Z,Ce,f,ye,D.x,D.y,je,O]),Re=a(e=>{if(!1===f.enableWheelZoom)return;if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const t=te.current;if(!t)return;const n=t.getBoundingClientRect(),r=e.clientX-n.left-D.x,o=e.clientY-n.top-D.y,i=.01*-e.deltaY,l=Nn(O+i,.5,3);if(l===O)return;const a=l/O;W({x:D.x-r*(a-1),y:D.y-o*(a-1)}),R(l)},[D,O]),De=a((e,t)=>{I(!0),ce.current={x:e-D.x,y:t-D.y}},[D.x,D.y]),We=a((e,t)=>{A&&W({x:e-ce.current.x,y:t-ce.current.y})},[A]),Ae=a(()=>{I(!1)},[]),Ie=/* @__PURE__ */M.jsxs("div",{className:"relative",children:[f.showZoomControls&&/* @__PURE__ */M.jsx("div",{className:"absolute top-2 right-2 z-10 rounded-lg",children:/* @__PURE__ */M.jsxs("div",{className:"flex items-center gap-2 backdrop-blur rounded-lg",children:[
67
+ /* @__PURE__ */M.jsx("span",{className:"sr-only",children:"Loading"})]})]})}let Yt=null,Zt=null;const Jt=/* @__PURE__ */new Map;let Gt=5,Qt=!1;function en(e){Qt=!!e}function tn(e){Number.isFinite(e)&&e>0&&(Gt=Math.floor(e))}function nn(){return{inFlight:Jt.size,max:Gt}}const rn="WORKER_BUSY";function on(e){Yt=e,Zt=null;const t=e;Yt.onmessage=e=>{if(Yt!==t)return;const{id:n,ok:r,result:o,error:i}=e.data,l=Jt.get(n);l&&(!1===r||i?l.reject(new Error(i||"Unknown error")):l.resolve(o))},Yt.onerror=e=>{var n,r;if(Yt===t)if(0!==Jt.size){try{Qt?console.error("[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e):null==(r=console.debug)||r.call(console,"[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e)}catch{}for(const[t,n]of Jt.entries())n.reject(new Error(`Worker error: ${e.message}`));Jt.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,r;if(Yt===t)if(0!==Jt.size){try{Qt?console.error("[mermaidWorkerClient] Worker messageerror:",e):null==(r=console.debug)||r.call(console,"[mermaidWorkerClient] Worker messageerror:",e)}catch{}for(const[e,t]of Jt.entries())t.reject(new Error("Worker messageerror"));Jt.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",e)}}function ln(){var e;if(Yt)try{for(const[e,t]of Jt.entries())t.reject(new Error("Worker cleared"));Jt.clear(),null==(e=Yt.terminate)||e.call(Yt)}catch{}Yt=null,Zt=null}function an(e,t,n=1400){if(Zt)return Promise.reject(Zt);const r=Yt||(Zt=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),Zt.name="WORKER_INIT_ERROR",Zt.code="WORKER_INIT_ERROR",null);if(!r)return Promise.reject(Zt);if(Jt.size>=Gt){const e=new Error("Worker busy");return e.name="WorkerBusy",e.code=rn,e.inFlight=Jt.size,e.max=Gt,Promise.reject(e)}return new Promise((o,i)=>{const l=Math.random().toString(36).slice(2);let a=!1,s=null;const c=()=>{a||(a=!0,null!=s&&clearTimeout(s),Jt.delete(l))},d={resolve:e=>{c(),o(e)},reject:e=>{c(),i(e)}};Jt.set(l,d);try{r.postMessage({id:l,action:e,payload:t})}catch(u){return Jt.delete(l),void i(u)}s=setTimeout(()=>{const e=new Error("Worker call timed out");e.name="WorkerTimeout",e.code="WORKER_TIMEOUT";const t=Jt.get(l);null==t||t.reject(e)},n)})}async function sn(e,t,n=1400){return an("canParse",{code:e,theme:t},n)}async function cn(e,t,n=2400){return an("findPrefix",{code:e,theme:t},n)}function dn(){var e;null==(e=null==Yt?void 0:Yt.terminate)||e.call(Yt),Yt=null,Zt=null,Jt.clear()}let un=null,mn=!1,hn=null,pn=null;function fn(e,t){var n;if(!e||!t)return;const r=function(e){var t,n;return`${String(null!=(t=null==e?void 0:e.securityLevel)?t:"loose")}|htmlLabels:${!1===(null==(n=null==e?void 0:e.flowchart)?void 0:n.htmlLabels)?"0":"1"}`}(t);if(hn!==r)try{"function"==typeof e.initialize?e.initialize(t):(null==(n=e.mermaidAPI)?void 0:n.initialize)&&e.mermaidAPI.initialize(t),hn=r}catch{}}const gn="undefined"!=typeof window?c:l,wn={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},vn=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],xn=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function yn(e){if(!e)return"";const t=e.trim();return xn.test(t)?t:""}function bn(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function kn(e,t,n){if(!e)return"";if(n)return function(e,t){if(!e)return"";bn(e);const n=function(e){if("undefined"==typeof window||"undefined"==typeof DOMParser)return null;if(!e)return null;const t=e.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(!n||"svg"!==n.nodeName.toLowerCase())return null;const r=n;return function(e){const t=/* @__PURE__ */new Set(["script"]),n=[e,...Array.from(e.querySelectorAll("*"))];for(const r of n){if(t.has(r.tagName.toLowerCase())){r.remove();continue}const e=Array.from(r.attributes);for(const t of e){const e=t.name;if(/^on/i.test(e))r.removeAttribute(e);else{if("style"===e&&t.value){const n=t.value;if(vn.some(e=>e.test(n))){r.removeAttribute(e);continue}}if(("href"===e||"xlink:href"===e)&&t.value){const n=yn(t.value);if(!n){r.removeAttribute(e);continue}n!==t.value&&r.setAttribute(e,n)}}}}}(r),r}(t);return n?(e.appendChild(n),e.innerHTML):""}(e,t);if(bn(e),t)try{e.insertAdjacentHTML("afterbegin",t)}catch{e.innerHTML=t}return e.innerHTML}const jn={maxHeight:"500px",loading:!0,workerTimeoutMs:1400,parseTimeoutMs:1800,renderTimeoutMs:2500,fullRenderTimeoutMs:4e3,showHeader:!0,showModeToggle:!0,showCopyButton:!0,showExportButton:!0,showFullscreenButton:!0,showCollapseButton:!0,showZoomControls:!0,enableWheelZoom:!1,isStrict:!1};function Mn(e){var r,o,s,c,d,u,m,h,p;const f={...jn,...e},{t:g}=Y(),v=t(()=>ue("mermaid"),[]),x=null!=(o=null==(r=f.node)?void 0:r.code)?o:"",y=t(()=>x.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"),[x]),b=null!=(s=f.workerTimeoutMs)?s:jn.workerTimeoutMs,k=null!=(c=f.parseTimeoutMs)?c:jn.parseTimeoutMs,j=null!=(d=f.renderTimeoutMs)?d:jn.renderTimeoutMs,N=null!=(u=f.fullRenderTimeoutMs)?u:jn.fullRenderTimeoutMs,[C,S]=n(!1),[B,E]=n(!1),[_,T]=n(!1),[L,$]=n(!1),[O,R]=n(1),[D,W]=n({x:0,y:0}),[A,I]=n(!1),[F,z]=n(!1),[H,V]=n(!1),[K,X]=n(null),[q,U]=n(!1),[Z,J]=n(()=>null==f.maxHeight?"360px":f.maxHeight),[G,Q]=n("undefined"==typeof window),ee=i(null),te=i(null),ne=i(null),re=i(null),le=i(null),ae=i(null),se=i(null),ce=i({x:0,y:0}),de=i(0),me=i({}),he=i(""),pe=i(!1),fe=i(null),ge=i(!1),we=i({zoom:1,translateX:0,translateY:0,containerHeight:Z||"360px"}),ve=P(),xe=Boolean(null!=(h=null==(m=f.node)?void 0:m.loading)?h:f.loading),ye=f.isDark?"dark":"light",be=Boolean(f.isStrict),ke=t(()=>be?{startOnLoad:!1,securityLevel:"strict",dompurifyConfig:wn,flowchart:{htmlLabels:!1}}:{startOnLoad:!1,securityLevel:"loose"},[be]);l(()=>{ge.current=H},[H]),l(()=>{me.current={}},[ye,y,be]),l(()=>{let e=!1;return(async()=>{const t=await async function(e){if(un)return fn(un,e),un;if(pn){const t=await pn;return t&&fn(t,e),t}if(mn)return null;try{mn=!0,pn=(async()=>{try{const t=await import("mermaid"),n=(null==t?void 0:t.default)||t;if(un=(null==n?void 0:n.default)?n.default:(null==n?void 0:n.mermaidAPI)?n:(null==n?void 0:n.mermaid)?n.mermaid:n,!un)throw new Error("Mermaid module did not export expected API");return fn(un,null!=e?e:{startOnLoad:!1,securityLevel:"loose"}),un}catch(t){return console.warn("[markstream-react] Failed to load mermaid:",t),null}finally{pn=null}})();const t=await pn;return t&&fn(t,e),t}catch{return null}}(ke);e||(ee.current=t,S(Boolean(t)),pe.current||E(!t))})(),()=>{e=!0}},[ke]),l(()=>{const e=te.current;if(!e)return;const t=ve(e,{rootMargin:"400px"});return fe.current=t,t.isVisible()&&Q(!0),t.whenVisible.then(()=>Q(!0)),()=>{t.destroy(),fe.current=null}},[ve]),l(()=>{if("undefined"==typeof document)return;if(!q)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[q]);const je=a(e=>{const t=te.current,n=re.current;if(!t||!n)return;const r=n.querySelector("svg");if(!r)return;let o=0,i=0;const l=r.getAttribute("viewBox");if(l){const e=l.split(" ");4===e.length&&(o=Number.parseFloat(e[2]),i=Number.parseFloat(e[3]))}if(o&&i||!r.hasAttribute("width")||!r.hasAttribute("height")||(o=Number.parseFloat(r.getAttribute("width")||"0"),i=Number.parseFloat(r.getAttribute("height")||"0")),!o||!i||Number.isNaN(o)||Number.isNaN(i))try{const e=r.getBBox();o=e.width,i=e.height}catch{return}if(!(o>0&&i>0))return;const a=(null!=e?e:t.clientWidth)*(i/o),s=Number.isFinite(a)&&a>0?a:i;J(`${Math.min(s,i)}px`)},[]);l(()=>{if(!te.current||"undefined"==typeof ResizeObserver)return;const e=new ResizeObserver(e=>{if(!e.length)return;const t=e[0].contentRect.width;!function(e){try{if("undefined"!=typeof globalThis&&"function"==typeof globalThis.requestAnimationFrame)return globalThis.requestAnimationFrame(e)}catch{}globalThis.setTimeout(e,0)}(()=>je(t))});return e.observe(te.current),()=>e.disconnect()},[je]),l(()=>()=>{dn()},[]);const Me=a(async(e,t,n)=>{var r;if(!ee.current||!re.current)return!1;z(!0);try{const o=`mermaid-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,i=Cn(e,t),l=await Bn(()=>ee.current.render(o,i),{timeoutMs:N,signal:n});if(!(null==l?void 0:l.svg))return!1;const a=kn(re.current,l.svg,be);return null==(r=l.bindFunctions)||r.call(l,re.current),je(),me.current[t]=a,V(!0),X(null),!0}catch(o){return xe||X(o instanceof Error?o.message:String(o)),!1}finally{z(!1)}},[N,xe,be,je]),Ne=a(async(e,t,n)=>{var r;if(ee.current&&re.current){z(!0);try{const o=`mermaid-preview-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,i=Cn(Sn(e)||e,t),l=await Bn(()=>ee.current.render(o,i),{timeoutMs:j,signal:n});(null==l?void 0:l.svg)&&(kn(re.current,l.svg,be),null==(r=l.bindFunctions)||r.call(l,re.current),je())}catch{}finally{z(!1)}}},[j,xe,be,je]),Ce=a(async(e,t)=>{if(!e.trim())return bn(re.current),V(!1),void(he.current="");const n=e.replace(/\s+/g,"");if(n===he.current&&ge.current)return;const r=++de.current;try{if(await async function(e,t,n){try{if(await sn(e,t,n.workerTimeout))return!0}catch(l){if("AbortError"===(null==l?void 0:l.name))throw l}if(!n.mermaid)throw new Error("Mermaid not available");const r=Cn(e,t),o=n.mermaid;if("function"==typeof o.parse)return await Bn(()=>o.parse(r),{timeoutMs:n.parseTimeout,signal:n.signal}),!0;const i=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return await Bn(()=>o.render(i,r),{timeoutMs:n.parseTimeout,signal:n.signal}),!0}(e,ye,{workerTimeout:b,parseTimeout:k,mermaid:ee.current,signal:t}),(null==t?void 0:t.aborted)||de.current!==r)return;return void(await Me(e,ye,t)&&(he.current=n))}catch(o){if("AbortError"===(null==o?void 0:o.name))return}try{const n=await async function(e,t,n){try{const r=await cn(e,t,n.workerTimeout);if(r)return r}catch(o){if("AbortError"===(null==o?void 0:o.name))throw o}return Sn(e)}(e,ye,{workerTimeout:b,signal:t});if(!n||(null==t?void 0:t.aborted)||de.current!==r)return;await Ne(n,ye,t)}catch{}},[k,Me,Ne,ye,b]);l(()=>{if(!G||B||_)return;const e=new AbortController;return Ce(y,e.signal),()=>e.abort()},[y,_,Ce,B,G]);const Se=a((e,t)=>{e.clientX,e.clientY,oe(e.currentTarget,t,"top",!1,0,f.isDark)},[f.isDark]),Be=a(async()=>{var e,t;try{await(null==(e=navigator.clipboard)?void 0:e.writeText(y)),$(!0),null==(t=f.onCopy)||t.call(f,y),setTimeout(()=>$(!1),1e3)}catch{}},[y,f]),Ee=a(()=>{var e,t,n;const r=null!=(t=null==(e=re.current)?void 0:e.querySelector("svg"))?t:null;if(!r)return;const o=En(r),i={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:r,svgString:o};null==(n=f.onExport)||n.call(f,i),i.defaultPrevented||function(e,t){const n=null!=t?t:En(e),r=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=`mermaid-${Date.now()}.svg`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}(r,o)},[f]),_e=a(()=>{se.current=null,bn(ae.current)},[]),Te=a(()=>{U(!1),_e()},[_e]),Le=a(()=>{var e,t,n;const r=null!=(t=null==(e=re.current)?void 0:e.querySelector("svg"))?t:null,o=r?En(r):null,i={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:r,svgString:o};null==(n=f.onOpenModal)||n.call(f,i),i.defaultPrevented||U(!0)},[f]);l(()=>{if(!q)return;if("undefined"==typeof window)return;const e=e=>{"Escape"===e.key&&Te()};try{window.addEventListener("keydown",e)}catch{}return()=>{try{window.removeEventListener("keydown",e)}catch{}}},[Te,q]),gn(()=>{if(!q)return;const e=ae.current,t=te.current;if(!e||!t)return;const n=`translate(${D.x}px, ${D.y}px) scale(${O})`,r=t.cloneNode(!0);r.classList.add("fullscreen");const o=r.querySelector("[data-mermaid-wrapper]");o&&(se.current=o,o.style.transform=n),bn(e),e.appendChild(r)},[q]),l(()=>{q&&se.current&&(se.current.style.transform=`translate(${D.x}px, ${D.y}px) scale(${O})`)},[q,D.x,D.y,O]);const $e=B||F||_,Oe=t(()=>f.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",[f.isDark]),Pe=a(e=>{var t;const n={payload:{type:"toggle-mode",target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(null==(t=f.onToggleMode)||t.call(f,e,n),!n.defaultPrevented)if(pe.current=!0,"preview"===e){E(!1);const e=we.current;R(e.zoom),W({x:e.translateX,y:e.translateY}),J(e.containerHeight),ge.current&&me.current[ye]&&re.current?(re.current.innerHTML=me.current[ye],je()):Ce(y)}else we.current={zoom:O,translateX:D.x,translateY:D.y,containerHeight:Z},E(!0)},[y,Z,Ce,f,ye,D.x,D.y,je,O]),Re=a(e=>{if(!1===f.enableWheelZoom)return;if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const t=te.current;if(!t)return;const n=t.getBoundingClientRect(),r=e.clientX-n.left-D.x,o=e.clientY-n.top-D.y,i=.01*-e.deltaY,l=Nn(O+i,.5,3);if(l===O)return;const a=l/O;W({x:D.x-r*(a-1),y:D.y-o*(a-1)}),R(l)},[D,O]),De=a((e,t)=>{I(!0),ce.current={x:e-D.x,y:t-D.y}},[D.x,D.y]),We=a((e,t)=>{A&&W({x:e-ce.current.x,y:t-ce.current.y})},[A]),Ae=a(()=>{I(!1)},[]),Ie=/* @__PURE__ */M.jsxs("div",{className:"relative",children:[f.showZoomControls&&/* @__PURE__ */M.jsx("div",{className:"absolute top-2 right-2 z-10 rounded-lg",children:/* @__PURE__ */M.jsxs("div",{className:"flex items-center gap-2 backdrop-blur rounded-lg",children:[
68
68
  /* @__PURE__ */M.jsx("button",{type:"button",className:ze("p-2 text-xs rounded transition-colors",f.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"),onMouseEnter:e=>Se(e,g("common.zoomIn")),onMouseLeave:()=>ie(),onClick:()=>R(Nn(O+.1,.5,3)),children:"+"}),
69
69
  /* @__PURE__ */M.jsx("button",{type:"button",className:ze("p-2 text-xs rounded transition-colors",f.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"),onMouseEnter:e=>Se(e,g("common.zoomOut")),onMouseLeave:()=>ie(),onClick:()=>R(Nn(O-.1,.5,3)),children:"−"}),
70
70
  /* @__PURE__ */M.jsxs("button",{type:"button",className:ze("p-2 text-xs rounded transition-colors",f.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"),onMouseEnter:e=>Se(e,g("common.resetZoom")),onMouseLeave:()=>ie(),onClick:()=>{R(1),W({x:0,y:0})},children:[Math.round(100*O),"%"]})]})}),
@@ -73,7 +73,7 @@ return M.jsx(bt,{node:e,value:n.ordered?(null!=(l=n.start)?l:1)+t:void 0,ctx:r,r
73
73
  /* @__PURE__ */M.jsx("span",{className:"mermaid-spinner"}),
74
74
  /* @__PURE__ */M.jsx("span",{children:"Rendering diagram…"})]})]})]}),Fe=f.showHeader&&/* @__PURE__ */M.jsxs("div",{className:ze("mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b",f.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"),children:[
75
75
  /* @__PURE__ */M.jsxs("div",{className:"flex items-center space-x-2 overflow-hidden",children:[
76
- /* @__PURE__ */M.jsx("span",{className:"icon-slot h-4 w-4 flex-shrink-0",dangerouslySetInnerHTML:{__html:w}}),
76
+ /* @__PURE__ */M.jsx("span",{className:"icon-slot h-4 w-4 flex-shrink-0",dangerouslySetInnerHTML:{__html:v}}),
77
77
  /* @__PURE__ */M.jsx("span",{className:ze("text-sm font-medium font-mono truncate",f.isDark?"text-gray-400":"text-gray-600"),children:"Mermaid"})]}),f.showModeToggle&&C&&/* @__PURE__ */M.jsxs("div",{className:ze("flex items-center space-x-1 rounded-md p-0.5",f.isDark?"bg-gray-700":"bg-gray-100"),children:[
78
78
  /* @__PURE__ */M.jsx("button",{type:"button",className:ze("px-2.5 py-1 text-xs rounded transition-colors",B?f.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":f.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"),onClick:()=>Pe("preview"),onMouseEnter:e=>Se(e,g("common.preview")),onFocus:e=>Se(e,g("common.preview")),onMouseLeave:()=>ie(),onBlur:()=>ie(),children:/* @__PURE__ */M.jsxs("div",{className:"flex items-center space-x-1",children:[
79
79
  /* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
@@ -89,7 +89,7 @@ return M.jsx(bt,{node:e,value:n.ordered?(null!=(l=n.start)?l:1)+t:void 0,ctx:r,r
89
89
  /* @__PURE__ */M.jsx("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),
90
90
  /* @__PURE__ */M.jsx("path",{d:"m7 10l5 5l5-5"})]})})}),f.showFullscreenButton&&C&&/* @__PURE__ */M.jsx("button",{type:"button",className:ze(Oe,$e?"opacity-50 cursor-not-allowed":""),disabled:$e,onClick:q?Te:Le,onMouseEnter:e=>Se(e,g(q?"common.minimize":"common.open")),onFocus:e=>Se(e,g(q?"common.minimize":"common.open")),onMouseLeave:()=>ie(),onBlur:()=>ie(),children:q?/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"})}):/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"})})})]})]}),He=/* @__PURE__ */M.jsxs("div",{children:[B?/* @__PURE__ */M.jsx("div",{className:ze("p-4",f.isDark?"bg-gray-900 text-gray-300":"bg-gray-50 text-gray-700"),children:/* @__PURE__ */M.jsx("pre",{className:"text-sm font-mono whitespace-pre-wrap",children:y})}):Ie,K&&/* @__PURE__ */M.jsx("div",{className:"mermaid-error",children:K})]});/* @__PURE__ */
91
91
  return M.jsxs(M.Fragment,{children:[
92
- /* @__PURE__ */M.jsxs("div",{className:ze("my-4 rounded-lg border overflow-hidden shadow-sm mermaid-block",f.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":xe}),children:[Fe,!_&&/* @__PURE__ */M.jsx("div",{ref:le,children:He})]}),q&&"undefined"!=typeof document&&v(
92
+ /* @__PURE__ */M.jsxs("div",{className:ze("my-4 rounded-lg border overflow-hidden shadow-sm mermaid-block",f.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":xe}),children:[Fe,!_&&/* @__PURE__ */M.jsx("div",{ref:le,children:He})]}),q&&"undefined"!=typeof document&&w(
93
93
  /* @__PURE__ */M.jsx("div",{className:"mermaid-modal-overlay",onClick:()=>Te(),children:/* @__PURE__ */M.jsxs("div",{className:ze("mermaid-modal-panel",{"is-dark":f.isDark}),role:"dialog","aria-modal":"true",onClick:e=>e.stopPropagation(),children:[
94
94
  /* @__PURE__ */M.jsxs("div",{className:"mermaid-modal-header",children:[
95
95
  /* @__PURE__ */M.jsx("span",{className:"mermaid-modal-title",children:"Mermaid Preview"}),
@@ -129,8 +129,8 @@ return M.jsx(De,{node:t},n);case"admonition":/* @__PURE__ */
129
129
  return M.jsx(_,{node:t,ctx:r,renderNode:zn,indexKey:n,isDark:r.isDark,typewriter:r.typewriter},n);case"hardbreak":/* @__PURE__ */
130
130
  return M.jsx(Ie,{node:t,typewriter:r.typewriter},n);case"link":/* @__PURE__ */
131
131
  return M.jsx(yt,{node:t,ctx:r,renderNode:zn,indexKey:n,isDark:r.isDark,typewriter:r.typewriter},n);case"image":/* @__PURE__ */
132
- return M.jsx(vt,{node:t},n);case"inline_code":/* @__PURE__ */
133
- return M.jsx(wt,{node:t,typewriter:r.typewriter},n);case"code_block":return function(t,n,r){var o,i,l,a;const s=ce(String(t.language||""));if("mermaid"===s){const o=H(r.customId).mermaid;if(o)return e.createElement(o,{key:n,node:t,isDark:r.isDark});if(!r.renderCodeBlocksAsPre)/* @__PURE__ */
132
+ return M.jsx(wt,{node:t},n);case"inline_code":/* @__PURE__ */
133
+ return M.jsx(vt,{node:t,typewriter:r.typewriter},n);case"code_block":return function(t,n,r){var o,i,l,a;const s=ce(String(t.language||""));if("mermaid"===s){const o=H(r.customId).mermaid;if(o)return e.createElement(o,{key:n,node:t,isDark:r.isDark});if(!r.renderCodeBlocksAsPre)/* @__PURE__ */
134
134
  return M.jsx(Mn,{node:t,isDark:r.isDark,loading:Boolean(t.loading)},n)}return r.renderCodeBlocksAsPre||"mermaid"===s?/* @__PURE__ */M.jsx(Te,{node:t},n):/* @__PURE__ */M.jsx($e,{node:t,loading:Boolean(t.loading),stream:r.codeBlockStream,monacoOptions:null==(o=r.codeBlockThemes)?void 0:o.monacoOptions,themes:null==(i=r.codeBlockThemes)?void 0:i.themes,minWidth:null==(l=r.codeBlockThemes)?void 0:l.minWidth,maxWidth:null==(a=r.codeBlockThemes)?void 0:a.maxWidth,isDark:r.isDark,onCopy:r.events.onCopy,...r.codeBlockProps||{}},n)}(t,n,r);case"strong":/* @__PURE__ */
135
135
  return M.jsx(On,{node:t,children:S(t.children,r,`${String(n)}-strong`,zn)},n);case"emphasis":/* @__PURE__ */
136
136
  return M.jsx(Re,{node:t,children:S(t.children,r,`${String(n)}-em`,zn)},n);case"strikethrough":/* @__PURE__ */
@@ -146,10 +146,10 @@ return M.jsx(Ut,{node:t},n);case"math_block":/* @__PURE__ */
146
146
  return M.jsx(qt,{node:t},n);case"reference":/* @__PURE__ */
147
147
  return M.jsx(Ln,{node:t,ctx:r,typewriter:r.typewriter},n);case"html_block":case"html_inline":return"html_block"===t.type?/* @__PURE__ */M.jsx(tt,{node:t,typewriter:r.typewriter,customId:r.customId},n):/* @__PURE__ */M.jsx(ft,{node:t,typewriter:r.typewriter,customId:r.customId},n);case"vmr_container":/* @__PURE__ */
148
148
  return M.jsx(In,{node:t,ctx:r,renderNode:zn,indexKey:n,typewriter:r.typewriter},n);case"label_open":case"label_close":return null;default:/* @__PURE__ */
149
- return M.jsx(_n,{node:t},n)}}const Hn={codeBlockStream:!0,typewriter:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:320,liveNodeBuffer:60},Vn=d();function Kn(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():""}function Xn(e){return/^[a-z][a-z0-9-]*$/.test(e)}const qn=e.memo(({props:e,parsedNodes:r,renderCtx:o,indexPrefix:s,containerRef:c})=>{var d,u,m,h,p,f,g;const v=P(),w="undefined"!=typeof window,x="undefined"!=typeof window&&"function"==typeof window.requestIdleCallback,y=Math.max(0,Math.trunc(null!=(d=e.renderBatchSize)?d:80)),b=Math.max(0,Math.trunc(null!=(u=e.initialRenderBatchSize)?u:y||r.length)),k=!1!==e.batchRendering&&y>0&&w,j=Math.max(0,null!=(m=e.liveNodeBuffer)?m:60),N=Math.max(1,null!=(h=e.maxLiveNodes)?h:320),C=(null!=(p=e.maxLiveNodes)?p:0)>0&&r.length>N,S=!1!==e.viewportPriority,B=k&&(null!=(f=e.maxLiveNodes)?f:0)<=0,E=t(()=>{var t;return!1!==e.deferNodesUntilVisible&&!((null!=(t=e.maxLiveNodes)?t:0)<=0)&&!C&&!(r.length>900)&&S},[r.length,e.deferNodesUntilVisible,e.maxLiveNodes,S,C]),[_,T]=n(()=>B?Math.min(r.length,b):r.length),L=i(_);l(()=>{L.current=_},[_]);const $=B?_:r.length,[O,R]=n(0),[D,W]=n({start:0,end:r.length}),A=i(/* @__PURE__ */new Map),[I,F]=n(0),z=i({}),H=i(/* @__PURE__ */new Map),V=i(/* @__PURE__ */new Map),K=i(/* @__PURE__ */new Set),X=i(_),q=i(null),U=i(null),Y=i(null),Z=i(!1),J=i(null),G=i(Math.max(1,y||1)),Q=i(r.length),ee=i({key:e.indexKey,total:r.length}),te=i({batchSize:y,initial:b,delay:null!=(g=e.renderBatchDelay)?g:16,enabled:B}),ne=E||C,re=t(()=>{const e=A.current;if(!e.size)return 32;let t=0;for(const n of e.values())t+=n;return Math.max(16,t/e.size)},[I]),oe=t(()=>{if(!C)return r.map((e,t)=>({node:e,index:t}));const e=r.length,t=Math.max(0,Math.min(D.start,e)),n=Math.max(t,Math.min(D.end,e));return r.slice(t,n).map((e,n)=>({node:e,index:t+n}))},[r,D,C]),ie=t(()=>{if(!C)return r.length;const e=Math.max(D.end+j,b),t=Math.min(r.length,e);return Math.max(_,t)},[r.length,C,D.end,j,b,_]);Q.current=ie;const le=a((e,t)=>{var n;if(e>=t)return 0;const r=A.current;let o=0;for(let i=e;i<t;i++)o+=null!=(n=r.get(i))?n:re;return o},[re]),ae=C?le(0,Math.min(D.start,r.length)):0,se=C?le(Math.min(D.end,r.length),r.length):0,ce=a(()=>{null!=q.current&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(q.current),q.current=null),null!=U.current&&(window.clearTimeout(U.current),U.current=null),null!=Y.current&&"function"==typeof window.cancelIdleCallback&&(window.cancelIdleCallback(Y.current),Y.current=null),Z.current=!1,J.current=null},[]),de=a(t=>{var n;if(!B)return;const r=Math.max(2,null!=(n=e.renderBatchBudgetMs)?n:6),o=Math.max(1,y||1),i=Math.max(1,Math.floor(o/4));t>1.2*r?G.current=Math.max(i,Math.floor(.7*G.current)):t<.5*r&&G.current<o&&(G.current=Math.min(o,Math.ceil(1.2*G.current)))},[B,e.renderBatchBudgetMs,y]),ue=a((t,n={})=>{var r,o;if(!B)return;const i=Q.current;if(L.current>=i)return;const l=Math.max(1,t),a=e=>{const t="undefined"!=typeof performance?performance.now():Date.now();T(t=>{const n=Math.min(Q.current,t+Math.max(1,e));return L.current=n,n});const n="undefined"!=typeof performance?performance.now():Date.now();de(n-t)},s=()=>{const e=Math.max(1,Math.round(G.current));ue(e)},c=t=>{var n;q.current=null,U.current=null,Y.current=null,Z.current=!1;const r=J.current;if(J.current=null,a(null!=r?r:l),L.current>=Q.current)return;if(!t)return void s();const o=Math.max(2,null!=(n=e.renderBatchBudgetMs)?n:6);for(;L.current<Q.current&&!(("function"==typeof t.timeRemaining?t.timeRemaining():0)<=.5*o);)a(Math.max(1,Math.round(G.current)));L.current<Q.current&&s()};if(!w||n.immediate)return void c();const d=Math.max(0,null!=(r=e.renderBatchDelay)?r:16);if(J.current=null!=J.current?Math.max(J.current,l):l,!Z.current){if(Z.current=!0,x){const t=Math.max(0,null!=(o=e.renderBatchIdleTimeoutMs)?o:120);return void(Y.current=window.requestIdleCallback(e=>c(e),{timeout:t}))}"function"==typeof requestAnimationFrame?q.current=requestAnimationFrame(()=>{0!==d?U.current=window.setTimeout(()=>c(),d):c()}):U.current=window.setTimeout(()=>c(),d)}},[de,x,B,w,e.renderBatchDelay,e.renderBatchBudgetMs,e.renderBatchIdleTimeoutMs]);l(()=>{var t;const n=e.indexKey,o=r.length,i=ee.current,l=void 0!==n?n!==i.key:o!==i.total;ee.current={key:n,total:o};const a=te.current,s=null!=(t=e.renderBatchDelay)?t:16,c=a.batchSize!==y||a.initial!==b||a.delay!==s||a.enabled!==B;if(te.current={batchSize:y,initial:b,delay:s,enabled:B},(l||c||!B)&&ce(),(l||c)&&(G.current=Math.max(1,y||1),K.current.clear()),!o)return L.current=0,void T(0);const d=Q.current;if(!B)return L.current=d,void T(d);if(l||c){const e=Math.min(d,b);return L.current=e,T(e),void(e<d&&ue(Math.max(1,b),{immediate:!w}))}const u=Math.min(L.current,d);u!==L.current&&(L.current=u,T(u)),L.current<d&&ue(Math.max(1,y||1))},[ce,B,w,r.length,e.indexKey,e.renderBatchDelay,y,b,ue]),l(()=>{if(!C)return void W({start:0,end:r.length});const e=r.length;if(!e)return void W({start:0,end:0});const t=Math.max(0,Math.min(O,e-1));let n=Math.max(0,t-j),o=Math.min(e,t+j+1);const i=o-n;if(i>N){const e=i-N;n+=Math.ceil(e/2),o-=Math.floor(e/2)}else if(i<N){const t=N-i;n=Math.max(0,n-Math.ceil(t/2)),o=Math.min(e,o+Math.floor(t/2))}W({start:n,end:o})},[O,j,N,r.length,C]),l(()=>()=>{ce();for(const e of H.current.values())e.destroy();H.current.clear()},[ce]);const me=a(e=>{for(const[t,n]of H.current.entries())t>=e&&(n.destroy(),H.current.delete(t),delete z.current[t],V.current.delete(t))},[]);l(()=>{me($)},[me,$]),l(()=>{const e=r.length;let t=!1;for(const n of Array.from(A.current.keys()))n>=e&&(A.current.delete(n),t=!0);t&&F(e=>e+1);for(const n of Object.keys(z.current))Number(n)>=e&&delete z.current[n];for(const n of Array.from(K.current))n>=e&&K.current.delete(n)},[r.length]);const he=a((e,t)=>{E&&t&&(z.current[e]=!0),t&&C&&R(t=>e>t?e:t)},[E,C]),pe=a(e=>{const t=H.current.get(e);t&&(t.destroy(),H.current.delete(e))},[]),fe=a((e,t)=>{const n=V.current;if(t?n.set(e,t):n.delete(e),!ne||!t)return pe(e),E&&!t&&delete z.current[e],void(t&&he(e,!0));if(e<b&&!C)return pe(e),void he(e,!0);pe(e);const r=v(t,{rootMargin:"400px"});H.current.set(e,r),r.isVisible()&&he(e,!0),r.whenVisible.then(()=>he(e,!0)).catch(()=>{})},[E,pe,he,v,b,ne,C]),ge=a((e,t)=>{if(!t)return void(A.current.has(e)&&(A.current.delete(e),F(e=>e+1)));const n=()=>{const n=t.offsetHeight;n&&A.current.get(e)!==n&&(A.current.set(e,n),F(e=>e+1))};"function"==typeof queueMicrotask?queueMicrotask(n):Promise.resolve().then(n)},[]),ve=a(e=>!(B&&e>=L.current)&&(!E||e<b||!0===z.current[e]),[E,B,b]),we=a(e=>t=>{if(!e)return;const n=t.target;(null==n?void 0:n.closest("[data-node-index]"))&&e(t)},[]);l(()=>{for(const[e,t]of V.current.entries())t&&fe(e,t)},[fe]),l(()=>{C&&_>X.current&&R(_-1),X.current=_},[_,C]);const xe=C?/* @__PURE__ */M.jsx("div",{className:"node-spacer",style:{height:`${ae}px`},"aria-hidden":"true"}):null,ye=C?/* @__PURE__ */M.jsx("div",{className:"node-spacer",style:{height:`${se}px`},"aria-hidden":"true"}):null;/* @__PURE__ */
150
- return M.jsxs("div",{ref:c,className:`markstream-vue markdown-renderer${e.isDark?" dark":""}${C?" virtualized":""}`,onClick:e.onClick,onMouseOver:we(e.onMouseOver),onMouseOut:we(e.onMouseOut),children:[xe,oe.map(({node:t,index:n})=>{var r;const i=ve(n),l=null!=(r=A.current.get(n))?r:re,a=!1!==e.typewriter&&"code_block"!==t.type&&!K.current.has(n)&&i;return a&&K.current.add(n),/* @__PURE__ */M.jsx("div",{ref:e=>fe(n,e),className:"node-slot","data-node-index":n,"data-node-type":t.type,children:i?/* @__PURE__ */M.jsx("div",{ref:e=>ge(n,e),className:"node-content"+(a?" typewriter-node":""),children:zn(t,`${s}-${n}`,o)}):/* @__PURE__ */M.jsx("div",{className:"node-placeholder",style:{height:`${l}px`}})},`${s}-${n}`)}),ye]})},function(e,t){if(e.parsedNodes!==t.parsedNodes)return!1;if(e.renderCtx!==t.renderCtx)return!1;if(e.indexPrefix!==t.indexPrefix)return!1;if(e.containerRef!==t.containerRef)return!1;const n=e.props,r=t.props;return n.isDark===r.isDark&&n.typewriter===r.typewriter&&n.batchRendering===r.batchRendering&&n.initialRenderBatchSize===r.initialRenderBatchSize&&n.renderBatchSize===r.renderBatchSize&&n.renderBatchDelay===r.renderBatchDelay&&n.renderBatchBudgetMs===r.renderBatchBudgetMs&&n.renderBatchIdleTimeoutMs===r.renderBatchIdleTimeoutMs&&n.deferNodesUntilVisible===r.deferNodesUntilVisible&&n.maxLiveNodes===r.maxLiveNodes&&n.liveNodeBuffer===r.liveNodeBuffer&&n.viewportPriority===r.viewportPriority&&n.indexKey===r.indexKey&&n.onClick===r.onClick&&n.onMouseOver===r.onMouseOver&&n.onMouseOut===r.onMouseOut}),Un=e=>{const n={...Hn,...e},r=i(null),o=i(null),a=s(I,F,F),c=t(()=>n.customId?`renderer-${n.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,[n.customId]),m=t(()=>{const e=H(n.customId);return Object.keys(e).map(String).map(e=>e.trim().toLowerCase()).filter(Xn)},[n.customId,a]),h=t(()=>{var e,t,r;const o=null!=(t=(null!=(e=n.parseOptions)?e:{}).customHtmlTags)?t:[],i=[...null!=(r=n.customHtmlTags)?r:[],...Array.isArray(o)?o:[],...m].map(Kn).filter(Boolean);return Array.from(new Set(i))},[n.customId,n.customHtmlTags,n.parseOptions,m,a]),p=t(()=>{const e=h;return e&&0!==e.length?d(c,{customHtmlTags:e}):d(c)},[c,h]),f=t(()=>{const e=p;return n.customMarkdownIt?n.customMarkdownIt(e):e},[p,n.customMarkdownIt]),g=t(()=>{var e,t;const r=null!=(e=n.parseOptions)?e:{},o=null!=(t=n.final)?t:r.final,i=h;return i.length?{...r,final:o,customHtmlTags:i}:null==o?r:{...r,final:o}},[h,n.final,n.parseOptions]),v=t(()=>{var e,t;const r=Boolean(n.debugPerformance)&&"undefined"!=typeof console&&"undefined"!=typeof performance,o=r?performance.now():0;let i=[];return Array.isArray(n.nodes)&&n.nodes.length?i=n.nodes.map(e=>({...e})):n.content&&(i=u(n.content,null!=f?f:Vn,g)),r&&console.info("[markstream-react][perf] parse(sync)",{ms:Math.round(performance.now()-o),nodes:i.length,contentLength:null!=(t=null==(e=n.content)?void 0:e.length)?t:0}),i},[n.content,n.debugPerformance,n.nodes,g,f,n.customId,a,h]);if(l(()=>{var e,t;if("undefined"==typeof window)return;if(n.renderCodeBlocksAsPre)return;if(!v.some(e=>{var t;return"code_block"===(null==e?void 0:e.type)&&"mermaid"!==ce(String(null!=(t=null==e?void 0:e.language)?t:""))}))return;const r=null!=(e=window.requestIdleCallback)?e:(e,t)=>{var n;return window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),null!=(n=null==t?void 0:t.timeout)?n:600)},o=null!=(t=window.cancelIdleCallback)?t:e=>window.clearTimeout(e),i=r(()=>{ve()},{timeout:900});return()=>o(i)},[v,n.renderCodeBlocksAsPre]),"undefined"!=typeof window&&!n.renderCodeBlocksAsPre){const e=n.isDark?n.codeBlockDarkTheme:n.codeBlockLightTheme,t="string"==typeof e?e:"object"==typeof e&&e&&"name"in e?String(e.name):null;t&&o.current!==t&&(o.current=t,function(e){if(null==e)return;const t=function(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{return String(e)}}(e);t&&Se!==t&&(Ce=e,Se=t,Be&&Ne(Ce,Be).then(()=>_e()).catch(()=>{}))}(e))}const w=t(()=>null!=n.indexKey?String(n.indexKey):"markdown-renderer",[n.indexKey]),x=t(()=>({customId:n.customId,isDark:n.isDark,indexKey:w,typewriter:n.typewriter,renderCodeBlocksAsPre:n.renderCodeBlocksAsPre,codeBlockStream:n.codeBlockStream,codeBlockProps:n.codeBlockProps,codeBlockThemes:{themes:n.themes,monacoOptions:n.codeBlockMonacoOptions,minWidth:n.codeBlockMinWidth,maxWidth:n.codeBlockMaxWidth},events:{onCopy:n.onCopy,onHandleArtifactClick:n.onHandleArtifactClick}}),[n.customId,n.isDark,w,n.typewriter,n.renderCodeBlocksAsPre,n.codeBlockStream,n.codeBlockProps,n.themes,n.codeBlockMonacoOptions,n.codeBlockMinWidth,n.codeBlockMaxWidth,n.onCopy,n.onHandleArtifactClick]);/* @__PURE__ */
151
- return M.jsx(O,{getRoot:()=>r.current,enabled:!1!==n.viewportPriority,children:/* @__PURE__ */M.jsx(qn,{props:n,parsedNodes:v,renderCtx:x,indexPrefix:w,containerRef:r})})};function Yn(e){var t,n,r,o,i,l;const{node:a,ctx:s,renderNode:c,indexKey:d,children:u}=e;/* @__PURE__ */
152
- return M.jsx("blockquote",{className:"blockquote-node",dir:"auto",cite:a.cite,children:null!=u?u:s&&c?/* @__PURE__ */M.jsx(Un,{nodes:a.children||[],indexKey:`blockquote-${String(null!=d?d:"blockquote")}`,customId:s.customId,isDark:s.isDark,typewriter:s.typewriter,viewportPriority:!0,codeBlockStream:s.codeBlockStream,renderCodeBlocksAsPre:s.renderCodeBlocksAsPre,codeBlockProps:s.codeBlockProps,themes:null==(t=s.codeBlockThemes)?void 0:t.themes,codeBlockDarkTheme:null==(n=s.codeBlockThemes)?void 0:n.darkTheme,codeBlockLightTheme:null==(r=s.codeBlockThemes)?void 0:r.lightTheme,codeBlockMonacoOptions:null==(o=s.codeBlockThemes)?void 0:o.monacoOptions,codeBlockMinWidth:null==(i=s.codeBlockThemes)?void 0:i.minWidth,codeBlockMaxWidth:null==(l=s.codeBlockThemes)?void 0:l.maxWidth,onCopy:s.events.onCopy,onHandleArtifactClick:s.events.onHandleArtifactClick}):null})}function Zn(e){const r={loading:!0,stream:!0,darkTheme:"vitesse-dark",lightTheme:"vitesse-light",isDark:!1,isShowPreview:!0,enableFontSizeControl:!0,showHeader:!0,showCopyButton:!0,showExpandButton:!0,showPreviewButton:!0,showFontSizeButtons:!0,...e},o=t(()=>{var e;return String(null!=(e=r.node.language)?e:"")},[r.node.language]),s=t(()=>function(e){var t;const[n]=String(null!=e?e:"").split(":");return(null!=(t=null==n?void 0:n.trim().toLowerCase())?t:"")||"plaintext"}(o),[o]),c=t(()=>ce(o),[o]),d=t(()=>{const e=me[c]||c;return e?e.charAt(0).toUpperCase()+e.slice(1):"Text"},[c]),u=t(()=>ue(c),[c]),{t:m}=Y(),h=t(()=>!!r.isShowPreview&&("html"===c||"svg"===c),[c,r.isShowPreview]),p=t(()=>{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},[r.maxWidth,r.minWidth]),[f,g]=n(!1),[v,w]=n(!1),[x,y]=n(!1),[b,k]=n(""),[j,N]=n(!1),[C,S]=n(14),[B,E]=n(C),_=i(null),T=i(null),L=i(null),$=i(null),O=i(!1),P=a(()=>r.isDark?r.darkTheme:r.lightTheme,[r.darkTheme,r.isDark,r.lightTheme]),R=a(e=>{if(!e)return k(""),void N(!1);var t;k(`<pre class="shiki shiki-fallback"><code>${t=e,t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}</code></pre>`),N(!1)},[]),D=a(()=>{k(""),N(!0)},[]),W=a(async()=>{if(!$.current&&!O.current){O.current=!0;try{const e=await import("stream-markdown");$.current=e.createShikiStreamRenderer}catch{}}},[]),A=a(async()=>{if(await W(),_.current&&T.current)if(!L.current&&$.current&&(L.current=$.current(T.current,{theme:P(),themes:r.themes}),N(!0)),L.current)if(!1===r.stream&&r.loading)R(r.node.code);else{R(r.node.code);try{await L.current.updateCode(r.node.code,s),D()}catch{}}else R(r.node.code);else R(r.node.code)},[D,W,P,s,r.loading,r.node.code,r.stream,r.themes,R]);l(()=>(A(),()=>{var e;null==(e=L.current)||e.dispose(),L.current=null}),[A]),l(()=>{L.current&&L.current.setTheme(P())},[P]),l(()=>{L.current&&(!1===r.stream&&r.loading||(R(r.node.code),Promise.resolve(L.current.updateCode(r.node.code,s)).then(()=>D()).catch(()=>{})))},[D,s,r.loading,r.node.code,r.stream,R]);const I=a((e,t)=>{oe(e.currentTarget,t,"top",!1,(e.clientX,e.clientY),r.isDark)},[r.isDark]),F=a(()=>ie(),[]),z=a(async()=>{var e;try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&await navigator.clipboard.writeText(r.node.code),g(!0),null==(e=r.onCopy)||e.call(r,r.node.code),setTimeout(()=>g(!1),1e3)}catch{}},[r]),H=a(()=>{var e;if(!h)return;const t="html"===s?"text/html":"image/svg+xml",n="html"===s?"HTML Preview":"SVG Preview";null==(e=r.onPreviewCode)||e.call(r,{type:t,content:r.node.code,title:n})},[h,s,r]),V=t(()=>({fontSize:`${B}px`}),[B]);return l(()=>{S(14),E(14)},[]),/* @__PURE__ */M.jsxs("div",{className:["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",r.isDark?"border-gray-700/30 bg-gray-900 is-dark":"border-gray-200 bg-white"].join(" "),style:p,children:[r.showHeader&&/* @__PURE__ */M.jsxs("div",{className:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",style:{color:"var(--vscode-editor-foreground)",backgroundColor:"var(--vscode-editor-background)"},children:[
149
+ return M.jsx(_n,{node:t},n)}}const Hn={codeBlockStream:!0,typewriter:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:320,liveNodeBuffer:60},Vn=d();function Kn(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():""}function Xn(e){return/^[a-z][a-z0-9-]*$/.test(e)}const qn=e.memo(({props:e,parsedNodes:r,renderCtx:o,indexPrefix:s,containerRef:c})=>{var d,u,m,h,p,f,g;const w=P(),v="undefined"!=typeof window,x="undefined"!=typeof window&&"function"==typeof window.requestIdleCallback,y=Math.max(0,Math.trunc(null!=(d=e.renderBatchSize)?d:80)),b=Math.max(0,Math.trunc(null!=(u=e.initialRenderBatchSize)?u:y||r.length)),k=!1!==e.batchRendering&&y>0&&v,j=Math.max(0,null!=(m=e.liveNodeBuffer)?m:60),N=Math.max(1,null!=(h=e.maxLiveNodes)?h:320),C=(null!=(p=e.maxLiveNodes)?p:0)>0&&r.length>N,S=!1!==e.viewportPriority,B=k&&(null!=(f=e.maxLiveNodes)?f:0)<=0,E=t(()=>{var t;return!1!==e.deferNodesUntilVisible&&!((null!=(t=e.maxLiveNodes)?t:0)<=0)&&!C&&!(r.length>900)&&S},[r.length,e.deferNodesUntilVisible,e.maxLiveNodes,S,C]),[_,T]=n(()=>B?Math.min(r.length,b):r.length),L=i(_);l(()=>{L.current=_},[_]);const $=B?_:r.length,[O,R]=n(0),[D,W]=n({start:0,end:r.length}),A=i(/* @__PURE__ */new Map),[I,F]=n(0),z=i({}),H=i(/* @__PURE__ */new Map),V=i(/* @__PURE__ */new Map),K=i(/* @__PURE__ */new Set),X=i(_),q=i(null),U=i(null),Y=i(null),Z=i(!1),J=i(null),G=i(Math.max(1,y||1)),Q=i(r.length),ee=i({key:e.indexKey,total:r.length}),te=i({batchSize:y,initial:b,delay:null!=(g=e.renderBatchDelay)?g:16,enabled:B}),ne=E||C,re=t(()=>{const e=A.current;if(!e.size)return 32;let t=0;for(const n of e.values())t+=n;return Math.max(16,t/e.size)},[I]),oe=t(()=>{if(!C)return r.map((e,t)=>({node:e,index:t}));const e=r.length,t=Math.max(0,Math.min(D.start,e)),n=Math.max(t,Math.min(D.end,e));return r.slice(t,n).map((e,n)=>({node:e,index:t+n}))},[r,D,C]),ie=t(()=>{if(!C)return r.length;const e=Math.max(D.end+j,b),t=Math.min(r.length,e);return Math.max(_,t)},[r.length,C,D.end,j,b,_]);Q.current=ie;const le=a((e,t)=>{var n;if(e>=t)return 0;const r=A.current;let o=0;for(let i=e;i<t;i++)o+=null!=(n=r.get(i))?n:re;return o},[re]),ae=C?le(0,Math.min(D.start,r.length)):0,se=C?le(Math.min(D.end,r.length),r.length):0,ce=a(()=>{null!=q.current&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(q.current),q.current=null),null!=U.current&&(window.clearTimeout(U.current),U.current=null),null!=Y.current&&"function"==typeof window.cancelIdleCallback&&(window.cancelIdleCallback(Y.current),Y.current=null),Z.current=!1,J.current=null},[]),de=a(t=>{var n;if(!B)return;const r=Math.max(2,null!=(n=e.renderBatchBudgetMs)?n:6),o=Math.max(1,y||1),i=Math.max(1,Math.floor(o/4));t>1.2*r?G.current=Math.max(i,Math.floor(.7*G.current)):t<.5*r&&G.current<o&&(G.current=Math.min(o,Math.ceil(1.2*G.current)))},[B,e.renderBatchBudgetMs,y]),ue=a((t,n={})=>{var r,o;if(!B)return;const i=Q.current;if(L.current>=i)return;const l=Math.max(1,t),a=e=>{const t="undefined"!=typeof performance?performance.now():Date.now();T(t=>{const n=Math.min(Q.current,t+Math.max(1,e));return L.current=n,n});const n="undefined"!=typeof performance?performance.now():Date.now();de(n-t)},s=()=>{const e=Math.max(1,Math.round(G.current));ue(e)},c=t=>{var n;q.current=null,U.current=null,Y.current=null,Z.current=!1;const r=J.current;if(J.current=null,a(null!=r?r:l),L.current>=Q.current)return;if(!t)return void s();const o=Math.max(2,null!=(n=e.renderBatchBudgetMs)?n:6);for(;L.current<Q.current&&!(("function"==typeof t.timeRemaining?t.timeRemaining():0)<=.5*o);)a(Math.max(1,Math.round(G.current)));L.current<Q.current&&s()};if(!v||n.immediate)return void c();const d=Math.max(0,null!=(r=e.renderBatchDelay)?r:16);if(J.current=null!=J.current?Math.max(J.current,l):l,!Z.current){if(Z.current=!0,x){const t=Math.max(0,null!=(o=e.renderBatchIdleTimeoutMs)?o:120);return void(Y.current=window.requestIdleCallback(e=>c(e),{timeout:t}))}"function"==typeof requestAnimationFrame?q.current=requestAnimationFrame(()=>{0!==d?U.current=window.setTimeout(()=>c(),d):c()}):U.current=window.setTimeout(()=>c(),d)}},[de,x,B,v,e.renderBatchDelay,e.renderBatchBudgetMs,e.renderBatchIdleTimeoutMs]);l(()=>{var t;const n=e.indexKey,o=r.length,i=ee.current,l=void 0!==n?n!==i.key:o!==i.total;ee.current={key:n,total:o};const a=te.current,s=null!=(t=e.renderBatchDelay)?t:16,c=a.batchSize!==y||a.initial!==b||a.delay!==s||a.enabled!==B;if(te.current={batchSize:y,initial:b,delay:s,enabled:B},(l||c||!B)&&ce(),(l||c)&&(G.current=Math.max(1,y||1),K.current.clear()),!o)return L.current=0,void T(0);const d=Q.current;if(!B)return L.current=d,void T(d);if(l||c){const e=Math.min(d,b);return L.current=e,T(e),void(e<d&&ue(Math.max(1,b),{immediate:!v}))}const u=Math.min(L.current,d);u!==L.current&&(L.current=u,T(u)),L.current<d&&ue(Math.max(1,y||1))},[ce,B,v,r.length,e.indexKey,e.renderBatchDelay,y,b,ue]),l(()=>{if(!C)return void W({start:0,end:r.length});const e=r.length;if(!e)return void W({start:0,end:0});const t=Math.max(0,Math.min(O,e-1));let n=Math.max(0,t-j),o=Math.min(e,t+j+1);const i=o-n;if(i>N){const e=i-N;n+=Math.ceil(e/2),o-=Math.floor(e/2)}else if(i<N){const t=N-i;n=Math.max(0,n-Math.ceil(t/2)),o=Math.min(e,o+Math.floor(t/2))}W({start:n,end:o})},[O,j,N,r.length,C]),l(()=>()=>{ce();for(const e of H.current.values())e.destroy();H.current.clear()},[ce]);const me=a(e=>{for(const[t,n]of H.current.entries())t>=e&&(n.destroy(),H.current.delete(t),delete z.current[t],V.current.delete(t))},[]);l(()=>{me($)},[me,$]),l(()=>{const e=r.length;let t=!1;for(const n of Array.from(A.current.keys()))n>=e&&(A.current.delete(n),t=!0);t&&F(e=>e+1);for(const n of Object.keys(z.current))Number(n)>=e&&delete z.current[n];for(const n of Array.from(K.current))n>=e&&K.current.delete(n)},[r.length]);const he=a((e,t)=>{E&&t&&(z.current[e]=!0),t&&C&&R(t=>e>t?e:t)},[E,C]),pe=a(e=>{const t=H.current.get(e);t&&(t.destroy(),H.current.delete(e))},[]),fe=a((e,t)=>{const n=V.current;if(t?n.set(e,t):n.delete(e),!ne||!t)return pe(e),E&&!t&&delete z.current[e],void(t&&he(e,!0));if(e<b&&!C)return pe(e),void he(e,!0);pe(e);const r=w(t,{rootMargin:"400px"});H.current.set(e,r),r.isVisible()&&he(e,!0),r.whenVisible.then(()=>he(e,!0)).catch(()=>{})},[E,pe,he,w,b,ne,C]),ge=a((e,t)=>{if(!t)return void(A.current.has(e)&&(A.current.delete(e),F(e=>e+1)));const n=()=>{const n=t.offsetHeight;n&&A.current.get(e)!==n&&(A.current.set(e,n),F(e=>e+1))};"function"==typeof queueMicrotask?queueMicrotask(n):Promise.resolve().then(n)},[]),we=a(e=>!(B&&e>=L.current)&&(!E||e<b||!0===z.current[e]),[E,B,b]),ve=a(e=>t=>{if(!e)return;const n=t.target;(null==n?void 0:n.closest("[data-node-index]"))&&e(t)},[]);l(()=>{for(const[e,t]of V.current.entries())t&&fe(e,t)},[fe]),l(()=>{C&&_>X.current&&R(_-1),X.current=_},[_,C]);const xe=C?/* @__PURE__ */M.jsx("div",{className:"node-spacer",style:{height:`${ae}px`},"aria-hidden":"true"}):null,ye=C?/* @__PURE__ */M.jsx("div",{className:"node-spacer",style:{height:`${se}px`},"aria-hidden":"true"}):null;/* @__PURE__ */
150
+ return M.jsxs("div",{ref:c,className:`markstream-react markdown-renderer${e.isDark?" dark":""}${C?" virtualized":""}`,onClick:e.onClick,onMouseOver:ve(e.onMouseOver),onMouseOut:ve(e.onMouseOut),children:[xe,oe.map(({node:t,index:n})=>{var r;const i=we(n),l=null!=(r=A.current.get(n))?r:re,a=!1!==e.typewriter&&"code_block"!==t.type&&!K.current.has(n)&&i;return a&&K.current.add(n),/* @__PURE__ */M.jsx("div",{ref:e=>fe(n,e),className:"node-slot","data-node-index":n,"data-node-type":t.type,children:i?/* @__PURE__ */M.jsx("div",{ref:e=>ge(n,e),className:"node-content"+(a?" typewriter-node":""),children:zn(t,`${s}-${n}`,o)}):/* @__PURE__ */M.jsx("div",{className:"node-placeholder",style:{height:`${l}px`}})},`${s}-${n}`)}),ye]})},function(e,t){if(e.parsedNodes!==t.parsedNodes)return!1;if(e.renderCtx!==t.renderCtx)return!1;if(e.indexPrefix!==t.indexPrefix)return!1;if(e.containerRef!==t.containerRef)return!1;const n=e.props,r=t.props;return n.isDark===r.isDark&&n.typewriter===r.typewriter&&n.batchRendering===r.batchRendering&&n.initialRenderBatchSize===r.initialRenderBatchSize&&n.renderBatchSize===r.renderBatchSize&&n.renderBatchDelay===r.renderBatchDelay&&n.renderBatchBudgetMs===r.renderBatchBudgetMs&&n.renderBatchIdleTimeoutMs===r.renderBatchIdleTimeoutMs&&n.deferNodesUntilVisible===r.deferNodesUntilVisible&&n.maxLiveNodes===r.maxLiveNodes&&n.liveNodeBuffer===r.liveNodeBuffer&&n.viewportPriority===r.viewportPriority&&n.indexKey===r.indexKey&&n.onClick===r.onClick&&n.onMouseOver===r.onMouseOver&&n.onMouseOut===r.onMouseOut}),Un=e=>{const n={...Hn,...e},r=i(null),o=i(null),a=s(I,F,F),c=t(()=>n.customId?`renderer-${n.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,[n.customId]),m=t(()=>{const e=H(n.customId);return Object.keys(e).map(String).map(e=>e.trim().toLowerCase()).filter(Xn)},[n.customId,a]),h=t(()=>{var e,t,r;const o=null!=(t=(null!=(e=n.parseOptions)?e:{}).customHtmlTags)?t:[],i=[...null!=(r=n.customHtmlTags)?r:[],...Array.isArray(o)?o:[],...m].map(Kn).filter(Boolean);return Array.from(new Set(i))},[n.customId,n.customHtmlTags,n.parseOptions,m,a]),p=t(()=>{const e=h;return e&&0!==e.length?d(c,{customHtmlTags:e}):d(c)},[c,h]),f=t(()=>{const e=p;return n.customMarkdownIt?n.customMarkdownIt(e):e},[p,n.customMarkdownIt]),g=t(()=>{var e,t;const r=null!=(e=n.parseOptions)?e:{},o=null!=(t=n.final)?t:r.final,i=h;return i.length?{...r,final:o,customHtmlTags:i}:null==o?r:{...r,final:o}},[h,n.final,n.parseOptions]),w=t(()=>{var e,t;const r=Boolean(n.debugPerformance)&&"undefined"!=typeof console&&"undefined"!=typeof performance,o=r?performance.now():0;let i=[];return Array.isArray(n.nodes)&&n.nodes.length?i=n.nodes.map(e=>({...e})):n.content&&(i=u(n.content,null!=f?f:Vn,g)),r&&console.info("[markstream-react][perf] parse(sync)",{ms:Math.round(performance.now()-o),nodes:i.length,contentLength:null!=(t=null==(e=n.content)?void 0:e.length)?t:0}),i},[n.content,n.debugPerformance,n.nodes,g,f,n.customId,a,h]);if(l(()=>{var e,t;if("undefined"==typeof window)return;if(n.renderCodeBlocksAsPre)return;if(!w.some(e=>{var t;return"code_block"===(null==e?void 0:e.type)&&"mermaid"!==ce(String(null!=(t=null==e?void 0:e.language)?t:""))}))return;const r=null!=(e=window.requestIdleCallback)?e:(e,t)=>{var n;return window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),null!=(n=null==t?void 0:t.timeout)?n:600)},o=null!=(t=window.cancelIdleCallback)?t:e=>window.clearTimeout(e),i=r(()=>{we()},{timeout:900});return()=>o(i)},[w,n.renderCodeBlocksAsPre]),"undefined"!=typeof window&&!n.renderCodeBlocksAsPre){const e=n.isDark?n.codeBlockDarkTheme:n.codeBlockLightTheme,t="string"==typeof e?e:"object"==typeof e&&e&&"name"in e?String(e.name):null;t&&o.current!==t&&(o.current=t,function(e){if(null==e)return;const t=function(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{return String(e)}}(e);t&&Se!==t&&(Ce=e,Se=t,Be&&Ne(Ce,Be).then(()=>_e()).catch(()=>{}))}(e))}const v=t(()=>null!=n.indexKey?String(n.indexKey):"markdown-renderer",[n.indexKey]),x=t(()=>({customId:n.customId,isDark:n.isDark,indexKey:v,typewriter:n.typewriter,renderCodeBlocksAsPre:n.renderCodeBlocksAsPre,codeBlockStream:n.codeBlockStream,codeBlockProps:n.codeBlockProps,codeBlockThemes:{themes:n.themes,monacoOptions:n.codeBlockMonacoOptions,minWidth:n.codeBlockMinWidth,maxWidth:n.codeBlockMaxWidth},events:{onCopy:n.onCopy,onHandleArtifactClick:n.onHandleArtifactClick}}),[n.customId,n.isDark,v,n.typewriter,n.renderCodeBlocksAsPre,n.codeBlockStream,n.codeBlockProps,n.themes,n.codeBlockMonacoOptions,n.codeBlockMinWidth,n.codeBlockMaxWidth,n.onCopy,n.onHandleArtifactClick]);/* @__PURE__ */
151
+ return M.jsx(O,{getRoot:()=>r.current,enabled:!1!==n.viewportPriority,children:/* @__PURE__ */M.jsx(qn,{props:n,parsedNodes:w,renderCtx:x,indexPrefix:v,containerRef:r})})};function Yn(e){var t,n,r,o,i,l;const{node:a,ctx:s,renderNode:c,indexKey:d,children:u}=e;/* @__PURE__ */
152
+ return M.jsx("blockquote",{className:"blockquote-node",dir:"auto",cite:a.cite,children:null!=u?u:s&&c?/* @__PURE__ */M.jsx(Un,{nodes:a.children||[],indexKey:`blockquote-${String(null!=d?d:"blockquote")}`,customId:s.customId,isDark:s.isDark,typewriter:s.typewriter,viewportPriority:!0,codeBlockStream:s.codeBlockStream,renderCodeBlocksAsPre:s.renderCodeBlocksAsPre,codeBlockProps:s.codeBlockProps,themes:null==(t=s.codeBlockThemes)?void 0:t.themes,codeBlockDarkTheme:null==(n=s.codeBlockThemes)?void 0:n.darkTheme,codeBlockLightTheme:null==(r=s.codeBlockThemes)?void 0:r.lightTheme,codeBlockMonacoOptions:null==(o=s.codeBlockThemes)?void 0:o.monacoOptions,codeBlockMinWidth:null==(i=s.codeBlockThemes)?void 0:i.minWidth,codeBlockMaxWidth:null==(l=s.codeBlockThemes)?void 0:l.maxWidth,onCopy:s.events.onCopy,onHandleArtifactClick:s.events.onHandleArtifactClick}):null})}function Zn(e){const r={loading:!0,stream:!0,darkTheme:"vitesse-dark",lightTheme:"vitesse-light",isDark:!1,isShowPreview:!0,enableFontSizeControl:!0,showHeader:!0,showCopyButton:!0,showExpandButton:!0,showPreviewButton:!0,showFontSizeButtons:!0,...e},o=t(()=>{var e;return String(null!=(e=r.node.language)?e:"")},[r.node.language]),s=t(()=>function(e){var t;const[n]=String(null!=e?e:"").split(":");return(null!=(t=null==n?void 0:n.trim().toLowerCase())?t:"")||"plaintext"}(o),[o]),c=t(()=>ce(o),[o]),d=t(()=>{const e=me[c]||c;return e?e.charAt(0).toUpperCase()+e.slice(1):"Text"},[c]),u=t(()=>ue(c),[c]),{t:m}=Y(),h=t(()=>!!r.isShowPreview&&("html"===c||"svg"===c),[c,r.isShowPreview]),p=t(()=>{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},[r.maxWidth,r.minWidth]),[f,g]=n(!1),[w,v]=n(!1),[x,y]=n(!1),[b,k]=n(""),[j,N]=n(!1),[C,S]=n(14),[B,E]=n(C),_=i(null),T=i(null),L=i(null),$=i(null),O=i(!1),P=a(()=>r.isDark?r.darkTheme:r.lightTheme,[r.darkTheme,r.isDark,r.lightTheme]),R=a(e=>{if(!e)return k(""),void N(!1);var t;k(`<pre class="shiki shiki-fallback"><code>${t=e,t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}</code></pre>`),N(!1)},[]),D=a(()=>{k(""),N(!0)},[]),W=a(async()=>{if(!$.current&&!O.current){O.current=!0;try{const e=await import("stream-markdown");$.current=e.createShikiStreamRenderer}catch{}}},[]),A=a(async()=>{if(await W(),_.current&&T.current)if(!L.current&&$.current&&(L.current=$.current(T.current,{theme:P(),themes:r.themes}),N(!0)),L.current)if(!1===r.stream&&r.loading)R(r.node.code);else{R(r.node.code);try{await L.current.updateCode(r.node.code,s),D()}catch{}}else R(r.node.code);else R(r.node.code)},[D,W,P,s,r.loading,r.node.code,r.stream,r.themes,R]);l(()=>(A(),()=>{var e;null==(e=L.current)||e.dispose(),L.current=null}),[A]),l(()=>{L.current&&L.current.setTheme(P())},[P]),l(()=>{L.current&&(!1===r.stream&&r.loading||(R(r.node.code),Promise.resolve(L.current.updateCode(r.node.code,s)).then(()=>D()).catch(()=>{})))},[D,s,r.loading,r.node.code,r.stream,R]);const I=a((e,t)=>{oe(e.currentTarget,t,"top",!1,(e.clientX,e.clientY),r.isDark)},[r.isDark]),F=a(()=>ie(),[]),z=a(async()=>{var e;try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&await navigator.clipboard.writeText(r.node.code),g(!0),null==(e=r.onCopy)||e.call(r,r.node.code),setTimeout(()=>g(!1),1e3)}catch{}},[r]),H=a(()=>{var e;if(!h)return;const t="html"===s?"text/html":"image/svg+xml",n="html"===s?"HTML Preview":"SVG Preview";null==(e=r.onPreviewCode)||e.call(r,{type:t,content:r.node.code,title:n})},[h,s,r]),V=t(()=>({fontSize:`${B}px`}),[B]);return l(()=>{S(14),E(14)},[]),/* @__PURE__ */M.jsxs("div",{className:["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",r.isDark?"border-gray-700/30 bg-gray-900 is-dark":"border-gray-200 bg-white"].join(" "),style:p,children:[r.showHeader&&/* @__PURE__ */M.jsxs("div",{className:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",style:{color:"var(--vscode-editor-foreground)",backgroundColor:"var(--vscode-editor-background)"},children:[
153
153
  /* @__PURE__ */M.jsxs("div",{className:"flex items-center space-x-2",children:[
154
154
  /* @__PURE__ */M.jsx("span",{className:"icon-slot h-4 w-4 flex-shrink-0",dangerouslySetInnerHTML:{__html:u}}),
155
155
  /* @__PURE__ */M.jsx("span",{className:"text-sm font-medium font-mono",children:d})]}),
@@ -161,12 +161,12 @@ return M.jsx("blockquote",{className:"blockquote-node",dir:"auto",cite:a.cite,ch
161
161
  /* @__PURE__ */M.jsx("path",{d:"M3 3v5h5"})]})})}),
162
162
  /* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:B>=36,onClick:()=>E(e=>Math.min(36,e+1)),onMouseEnter:e=>I(e,m("common.increase")||"Increase"),onFocus:e=>I(e,m("common.increase")||"Increase"),onMouseLeave:F,onBlur:F,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 12h14m-7-7v14"})})})]}),r.showCopyButton&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":f?m("common.copied")||"Copied":m("common.copy")||"Copy",onClick:z,onMouseEnter:e=>I(e,f?m("common.copied")||"Copied":m("common.copy")||"Copy"),onFocus:e=>I(e,f?m("common.copied")||"Copied":m("common.copy")||"Copy"),onMouseLeave:F,onBlur:F,children:f?/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20 6L9 17l-5-5"})}):/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
163
163
  /* @__PURE__ */M.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),
164
- /* @__PURE__ */M.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})})}),r.showExpandButton&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":v,onClick:()=>w(e=>!e),onMouseEnter:e=>I(e,v?m("common.collapse")||"Collapse":m("common.expand")||"Expand"),onFocus:e=>I(e,v?m("common.collapse")||"Collapse":m("common.expand")||"Expand"),onMouseLeave:F,onBlur:F,children:v?/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"})}):/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"})})}),h&&r.showPreviewButton&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":m("common.preview")||"Preview",onClick:H,onMouseEnter:e=>I(e,m("common.preview")||"Preview"),onFocus:e=>I(e,m("common.preview")||"Preview"),onMouseLeave:F,onBlur:F,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
164
+ /* @__PURE__ */M.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})})}),r.showExpandButton&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":w,onClick:()=>v(e=>!e),onMouseEnter:e=>I(e,w?m("common.collapse")||"Collapse":m("common.expand")||"Expand"),onFocus:e=>I(e,w?m("common.collapse")||"Collapse":m("common.expand")||"Expand"),onMouseLeave:F,onBlur:F,children:w?/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"})}):/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"})})}),h&&r.showPreviewButton&&/* @__PURE__ */M.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":m("common.preview")||"Preview",onClick:H,onMouseEnter:e=>I(e,m("common.preview")||"Preview"),onFocus:e=>I(e,m("common.preview")||"Preview"),onMouseLeave:F,onBlur:F,children:/* @__PURE__ */M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */M.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
165
165
  /* @__PURE__ */M.jsx("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),
166
- /* @__PURE__ */M.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})})]})]}),!x&&(!!r.stream||!r.loading)&&/* @__PURE__ */M.jsxs("div",{ref:_,className:"code-block-content",style:{...V,maxHeight:v?"none":"500px",overflow:v?"visible":"auto"},children:[
166
+ /* @__PURE__ */M.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})})]})]}),!x&&(!!r.stream||!r.loading)&&/* @__PURE__ */M.jsxs("div",{ref:_,className:"code-block-content",style:{...V,maxHeight:w?"none":"500px",overflow:w?"visible":"auto"},children:[
167
167
  /* @__PURE__ */M.jsx("div",{ref:T,className:"code-block-render"}),!j&&b&&/* @__PURE__ */M.jsx("div",{className:"code-fallback-plain",dangerouslySetInnerHTML:{__html:b}})]}),!r.stream&&r.loading&&/* @__PURE__ */M.jsx("div",{className:"code-loading-placeholder",children:/* @__PURE__ */M.jsxs("div",{className:"loading-skeleton",children:[
168
168
  /* @__PURE__ */M.jsx("div",{className:"skeleton-line"}),
169
169
  /* @__PURE__ */M.jsx("div",{className:"skeleton-line"}),
170
170
  /* @__PURE__ */M.jsx("div",{className:"skeleton-line short"})]})}),
171
- /* @__PURE__ */M.jsx("span",{className:"sr-only","aria-live":"polite",role:"status",children:f?m("common.copied")||"Copied":""})]})}function Jn(e){var r;const o=i(null),[a,s]=n(!1),[c,d]=n({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),u=t(()=>function(e){if("boolean"==typeof e)return e;if("undefined"!=typeof document)try{if(document.documentElement.classList.contains("dark"))return!0}catch{}if("undefined"!=typeof window&&"function"==typeof window.matchMedia)try{return window.matchMedia("(prefers-color-scheme: dark)").matches}catch{}return!1}(e.isDark),[e.isDark]);return l(()=>{if(!e.visible)return void s(!1);if(!e.anchorEl||!o.current)return void s(!0);let t=null,n=!1;const r=async()=>{var t,r;if(!e.anchorEl||!o.current)return;const{x:i,y:l}=await h(e.anchorEl,o.current,{placement:null!=(t=e.placement)?t:"top",middleware:[p(null!=(r=e.offset)?r:8),f(),g({padding:8})],strategy:"fixed"});n||d({position:"fixed",left:"0px",top:"0px",transform:`translate3d(${Math.round(i)}px, ${Math.round(l)}px, 0)`})};return r().then(()=>{n||s(!0)}),t=m(e.anchorEl,o.current,r),()=>{n=!0,null==t||t()}},[e.anchorEl,e.offset,e.placement,e.visible]),"undefined"==typeof document?null:e.visible&&a?v(
172
- /* @__PURE__ */M.jsx("div",{id:null!=(r=e.id)?r:void 0,ref:o,style:c,className:["ms-tooltip z-[9999] inline-block text-base py-2 px-3 rounded-md shadow-md whitespace-nowrap pointer-events-none border tooltip-element",u?"bg-gray-900 text-white border-gray-700 is-dark":"bg-white text-gray-900 border-gray-200"].join(" "),role:"tooltip",children:e.content}),document.body):null}export{_ as AdmonitionNode,Yn as BlockquoteNode,X as CheckboxNode,$e as CodeBlockNode,Oe as DefinitionListNode,Pe as EmojiNode,Re as EmphasisNode,_n as FallbackComponent,De as FootnoteAnchorNode,We as FootnoteNode,Ae as FootnoteReferenceNode,Ie as HardBreakNode,He as HeadingNode,Ve as HighlightNode,tt as HtmlBlockNode,ft as HtmlInlineNode,he as HtmlPreviewFrame,vt as ImageNode,wt as InlineCodeNode,xt as InsertNode,yt as LinkNode,bt as ListItemNode,kt as ListNode,rn as MERMAID_WORKER_BUSY_CODE,Zn as MarkdownCodeBlockNode,qt as MathBlockNode,Ut as MathInlineNode,Mn as MermaidBlockNode,Un as NodeRenderer,Tn as ParagraphNode,Te as PreCodeNode,$e as ReactCodeBlockNode,Ln as ReferenceNode,$n as StrikethroughNode,On as StrongNode,Pn as SubscriptNode,Rn as SuperscriptNode,Dn as TableNode,Wn as TextNode,An as ThematicBreakNode,Jn as Tooltip,In as VmrContainerNode,Ot as WORKER_BUSY_CODE,sn as canParseOffthread,K as clearGlobalCustomComponents,Dt as clearKaTeXCache,Lt as clearKaTeXWorker,ln as clearMermaidWorker,cn as findPrefixOffthread,H as getCustomNodeComponents,zt as getKaTeXBackpressureDefaults,ue as getLanguageIcon,nn as getMermaidWorkerLoad,me as languageMap,ce as normalizeLanguageIdentifier,V as removeCustomComponents,Pt as renderKaTeXInWorker,Ht as renderKaTeXWithBackpressure,zn as renderNode,de as resolveMonacoLanguageId,z as setCustomComponents,U as setDefaultI18nMap,Ft as setKaTeXBackpressureDefaults,Rt as setKaTeXCache,Wt as setKaTeXConcurrencyLimit,Tt as setKaTeXWorker,$t as setKaTeXWorkerDebug,ae as setLanguageIconResolver,on as setMermaidWorker,en as setMermaidWorkerClientDebug,tn as setMermaidWorkerMaxConcurrency,dn as terminateWorker,Y as useSafeI18n,At as waitForKaTeXWorkerSlot};
171
+ /* @__PURE__ */M.jsx("span",{className:"sr-only","aria-live":"polite",role:"status",children:f?m("common.copied")||"Copied":""})]})}function Jn(e){var r;const o=i(null),[a,s]=n(!1),[c,d]=n({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),u=t(()=>function(e){if("boolean"==typeof e)return e;if("undefined"!=typeof document)try{if(document.documentElement.classList.contains("dark"))return!0}catch{}if("undefined"!=typeof window&&"function"==typeof window.matchMedia)try{return window.matchMedia("(prefers-color-scheme: dark)").matches}catch{}return!1}(e.isDark),[e.isDark]);return l(()=>{if(!e.visible)return void s(!1);if(!e.anchorEl||!o.current)return void s(!0);let t=null,n=!1;const r=async()=>{var t,r;if(!e.anchorEl||!o.current)return;const{x:i,y:l}=await h(e.anchorEl,o.current,{placement:null!=(t=e.placement)?t:"top",middleware:[p(null!=(r=e.offset)?r:8),f(),g({padding:8})],strategy:"fixed"});n||d({position:"fixed",left:"0px",top:"0px",transform:`translate3d(${Math.round(i)}px, ${Math.round(l)}px, 0)`})};return r().then(()=>{n||s(!0)}),t=m(e.anchorEl,o.current,r),()=>{n=!0,null==t||t()}},[e.anchorEl,e.offset,e.placement,e.visible]),"undefined"==typeof document?null:e.visible&&a?w(
172
+ /* @__PURE__ */M.jsx("div",{id:null!=(r=e.id)?r:void 0,ref:o,style:c,className:["ms-tooltip z-[9999] inline-block text-base py-2 px-3 rounded-md shadow-md whitespace-nowrap pointer-events-none border tooltip-element",u?"bg-gray-900 text-white border-gray-700 is-dark":"bg-white text-gray-900 border-gray-200"].join(" "),role:"tooltip",children:e.content}),document.body):null}export{_ as AdmonitionNode,Yn as BlockquoteNode,X as CheckboxNode,$e as CodeBlockNode,Oe as DefinitionListNode,Pe as EmojiNode,Re as EmphasisNode,_n as FallbackComponent,De as FootnoteAnchorNode,We as FootnoteNode,Ae as FootnoteReferenceNode,Ie as HardBreakNode,He as HeadingNode,Ve as HighlightNode,tt as HtmlBlockNode,ft as HtmlInlineNode,he as HtmlPreviewFrame,wt as ImageNode,vt as InlineCodeNode,xt as InsertNode,yt as LinkNode,bt as ListItemNode,kt as ListNode,rn as MERMAID_WORKER_BUSY_CODE,Zn as MarkdownCodeBlockNode,qt as MathBlockNode,Ut as MathInlineNode,Mn as MermaidBlockNode,Un as NodeRenderer,Tn as ParagraphNode,Te as PreCodeNode,$e as ReactCodeBlockNode,Ln as ReferenceNode,$n as StrikethroughNode,On as StrongNode,Pn as SubscriptNode,Rn as SuperscriptNode,Dn as TableNode,Wn as TextNode,An as ThematicBreakNode,Jn as Tooltip,In as VmrContainerNode,Ot as WORKER_BUSY_CODE,sn as canParseOffthread,K as clearGlobalCustomComponents,Dt as clearKaTeXCache,Lt as clearKaTeXWorker,ln as clearMermaidWorker,cn as findPrefixOffthread,H as getCustomNodeComponents,zt as getKaTeXBackpressureDefaults,ue as getLanguageIcon,nn as getMermaidWorkerLoad,me as languageMap,ce as normalizeLanguageIdentifier,V as removeCustomComponents,Pt as renderKaTeXInWorker,Ht as renderKaTeXWithBackpressure,zn as renderNode,de as resolveMonacoLanguageId,z as setCustomComponents,U as setDefaultI18nMap,Ft as setKaTeXBackpressureDefaults,Rt as setKaTeXCache,Wt as setKaTeXConcurrencyLimit,Tt as setKaTeXWorker,$t as setKaTeXWorkerDebug,ae as setLanguageIconResolver,on as setMermaidWorker,en as setMermaidWorkerClientDebug,tn as setMermaidWorkerMaxConcurrency,dn as terminateWorker,Y as useSafeI18n,At as waitForKaTeXWorkerSlot};
@@ -0,0 +1 @@
1
+ .markstream-react{--border: 214.3 31.8% 91.4%;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--secondary: 210 40% 96%;--muted: 210 40% 96%;--muted-foreground: 215.4 16.3% 46.9%}.markstream-react button{-moz-appearance:none;appearance:none;-webkit-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.dark .markstream-react,.markstream-react.dark{--border: 217.2 32.6% 17.5%;--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--secondary: 217.2 32.6% 17.5%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%}.markdown-renderer{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized{content-visibility:visible;contain-intrinsic-size:auto}.node-slot,.node-content{width:100%}.node-placeholder{width:100%;min-height:1rem;margin:.25rem 0;border-radius:.5rem;background-image:linear-gradient(90deg,#94a3b82e,#94a3b80d,#94a3b82e);background-size:200% 100%;animation:node-placeholder-shimmer 1.1s ease-in-out infinite}.node-placeholder:first-child{margin-top:0}.node-spacer{width:100%}.typewriter-node{opacity:0;animation:typewriter-fade .9s ease-out forwards}.unknown-node{color:#6a737d;font-style:italic;margin:1rem 0}.text-node{display:inline;font-weight:inherit;vertical-align:baseline;white-space:pre-wrap;word-break:break-word}.text-node.text-node-center{display:inline-flex;justify-content:center;width:100%}.paragraph-node{margin:1.25em 0;line-height:1.625}li .paragraph-node{margin:0}.blockquote-node{font-weight:500;font-style:italic;border-left:.25rem solid var(--blockquote-border-color,#e2e8f0);quotes:"“" "”" "‘" "’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.blockquote-node .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node{font-weight:600}.heading-1{margin-top:0;margin-bottom:calc(8 / 9 * 1em);font-size:2.25rem;line-height:calc(10 / 9 * 1);font-weight:800}.heading-2{margin-top:2rem;margin-bottom:1rem;font-size:1.5rem;line-height:calc(4 / 3 * 1)}.heading-3{margin-top:1.6em;margin-bottom:calc(3 / 5 * 1em);font-size:1.25rem;line-height:calc(5 / 3 * 1)}.heading-4,.heading-5,.heading-6{margin-top:1.5rem;margin-bottom:.5rem;font-size:1rem}.heading-5,.heading-6{margin-top:0;margin-bottom:0}.link-node{color:var(--link-color, #0366d6);text-decoration:none}.link-node:hover{text-decoration:underline;text-underline-offset:.2rem}.link-loading .link-text-wrapper{position:relative}.link-loading .link-text{position:relative;z-index:2}.underline-anim{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;transform-origin:center center;will-change:transform,opacity;opacity:var(--underline-opacity, .9);transform:scaleX(0);animation:underlineLoop var(--underline-duration, .8s) var(--underline-timing, linear) var(--underline-iteration, infinite)}@keyframes underlineLoop{0%{transform:scaleX(0);opacity:var(--underline-opacity, .9)}75%{transform:scaleX(1);opacity:var(--underline-opacity, .9)}99%{transform:scaleX(1);opacity:var(--underline-opacity, .9)}to{transform:scaleX(0);opacity:0}}.inline-code{padding:.125rem .375rem;border-radius:.375rem;background:#f3f4f6;font-size:.875rem}.image-node{margin:2rem auto;text-align:center}.image-node__inner{position:relative;display:inline-block;max-width:24rem}.image-node__img{display:inline-block;max-width:24rem;width:100%;border-radius:.75rem;height:auto;opacity:0;transition:opacity .2s ease;box-shadow:0 15px 35px #0f172a14}.image-node__img.is-loaded{opacity:1}.image-node__caption{margin-top:.5rem;font-size:.875rem;color:#6b7280;font-style:italic}.image-node__placeholder,.image-node__error{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;width:100%;padding:1.5rem;border-radius:.75rem}.image-node__placeholder{background:linear-gradient(120deg,#94a3b833,#e2e8f059);color:#475569;box-shadow:inset 0 0 0 1px #94a3b833}.image-node__error{color:#dc2626;background:#f8717114}.image-node__spinner{width:1rem;height:1rem;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:spin 1s linear infinite}.image-node__placeholder-text{font-size:.875rem;color:currentColor}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.footnote-node{border-left:.25rem solid #e2e8f0;padding-left:1rem;margin:1.5rem 0;font-size:.875rem;color:#475569}.admonition-node{border-left:4px solid #e5e7eb;border-radius:.5rem;padding:.75rem 1rem;margin:1.5rem 0;background:#f9fafbe6}.admonition-node__title{font-weight:600;margin-bottom:.5rem}.table-node-wrapper{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scrollbar-gutter:stable}.table-node{table-layout:auto;width:-moz-max-content;width:max-content;min-width:100%;border-collapse:collapse}.table-node--loading{table-layout:fixed;width:100%}.table-node th,.table-node td{white-space:nowrap}.table-node .text-node,.table-node code{white-space:nowrap;overflow-wrap:normal;word-break:normal;max-width:none}.table-node--loading tbody td{position:relative;overflow:hidden}.table-node--loading tbody td>*{visibility:hidden}.table-node--loading tbody td:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:.25rem;background:linear-gradient(90deg,#94a3b829 25%,#94a3b847,#94a3b829 75%);background-size:200% 100%;animation:table-node-shimmer 1.2s linear infinite;will-change:background-position}.table-node__loading{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner{width:2.5rem;height:2.5rem;border-radius:999px;border:2px solid rgba(94,104,121,.25);border-top-color:#5e6879cc;animation:spin 1s linear infinite;will-change:transform}.table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.table-node .markdown-renderer .node-slot,.table-node .markdown-renderer .node-content,.table-node .markdown-renderer .node-space{display:contents}.markdown-renderer .markdown-renderer{content-visibility:visible;contain-intrinsic-size:auto}@keyframes table-node-shimmer{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper{margin-top:0}.hr+.table-node-wrapper .table-node{margin-top:0}.code-block-node{background:#0f172a;color:#fff;border-radius:.75rem;padding:1rem;margin:1.25rem 0;overflow-x:auto;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.code-block{border-radius:.75rem;background:#0f172a;color:#e2e8f0;margin:1.25rem 0;overflow:hidden;position:relative}.code-block--expanded{max-height:none}.code-block-header{display:flex;align-items:center;justify-content:space-between;padding:.65rem .9rem;background:#0f172ad9;border-bottom:1px solid rgba(148,163,184,.2)}.code-block-meta{display:flex;align-items:center;gap:.5rem}.code-block-language{font-size:.825rem;letter-spacing:.08em;text-transform:uppercase;color:#e2e8f0d9}.code-block-badge{font-size:.7rem;padding:.1rem .4rem;border-radius:9999px;background:#3b82f633;color:#bfdbfe}.code-block-actions{display:flex;gap:.35rem}.code-block-btn{border:1px solid rgba(148,163,184,.4);background:#0f172a99;color:#f8fafc;font-size:.75rem;padding:.25rem .65rem;border-radius:.35rem;cursor:pointer;transition:background .2s ease,color .2s ease,border-color .2s ease}.code-block-btn:hover{background:#3b82f6cc;border-color:#3b82f699}.code-block-body{position:relative;min-height:120px}.code-block-body--expanded{max-height:none}.code-block-body--collapsed{min-height:0;height:0;overflow:hidden}.code-block-monaco{min-height:120px}.code-block-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#0f172a99;backdrop-filter:blur(2px)}.code-block-spinner{width:2rem;height:2rem;border:2px solid rgba(255,255,255,.3);border-top-color:#ffffffe6;border-radius:9999px;animation:spin 1s linear infinite}.code-block-footer{padding:.35rem .9rem .7rem;border-top:1px solid rgba(148,163,184,.2);font-size:.75rem;color:#e2e8f0cc}.mermaid-block{border:1px solid rgba(148,163,184,.3);border-radius:1rem;background:#fff;color:#0f172a;margin:1.25rem 0;overflow:hidden}.dark .mermaid-block{background:#0f172a;color:#e2e8f0;border-color:#94a3b866}.mermaid-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;flex-direction:column;background:#0009}.mermaid-modal-panel{position:relative;width:min(64rem,calc(100% - 2rem));margin:2rem auto;border-radius:.75rem;overflow:hidden;background:#fff;color:#0f172a;box-shadow:0 24px 60px #00000038}.mermaid-modal-panel.is-dark{background:#0f172a;color:#e2e8f0}.mermaid-modal-header{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;border-bottom:1px solid rgba(148,163,184,.25)}.mermaid-modal-panel.is-dark .mermaid-modal-header{border-bottom-color:#94a3b840}.mermaid-modal-title{font-size:.875rem;font-weight:600}.mermaid-modal-close{font-size:.875rem;padding:.25rem .5rem;border-radius:.375rem;cursor:pointer;opacity:.9}.mermaid-modal-close:hover{opacity:1;background:#94a3b829}.mermaid-modal-body{padding:1rem;max-height:80vh;overflow:auto}.mermaid-modal-content{width:100%;height:100%;display:flex;justify-content:center}.fullscreen{width:100%;max-height:100%!important;height:100%!important}.mermaid-header{display:flex;align-items:center;justify-content:space-between;padding:.65rem .9rem;border-bottom:1px solid rgba(148,163,184,.3);background:#f8fafcd9}.dark .mermaid-header{background:#0f172ad9;border-color:#47556999}.mermaid-title__text{font-size:.85rem;letter-spacing:.08em;text-transform:uppercase;color:inherit}.mermaid-actions{display:flex;align-items:center;gap:.35rem}.mermaid-btn{border:1px solid rgba(148,163,184,.4);background:transparent;color:inherit;font-size:.75rem;padding:.2rem .65rem;border-radius:.35rem;cursor:pointer;transition:background .2s ease,color .2s ease}.mermaid-btn:hover{background:#3b82f626;color:#1d4ed8}.dark .mermaid-btn:hover{background:#3b82f64d;color:#bfdbfe}.mermaid-toggle{display:inline-flex;border-radius:9999px;border:1px solid rgba(148,163,184,.3);overflow:hidden}.mermaid-toggle-btn{border:none;background:transparent;color:inherit;font-size:.75rem;padding:.2rem .65rem;cursor:pointer;transition:background .2s ease}.mermaid-toggle-btn--active{background:#3b82f62e;color:#1d4ed8}.dark .mermaid-toggle-btn--active{background:#3b82f64d;color:#bfdbfe}.mermaid-body{position:relative;padding:1rem}.mermaid-preview{width:100%;min-height:180px;display:flex;align-items:center;justify-content:center;text-align:center}.mermaid-preview svg{width:100%;height:auto}.mermaid-source{background:#0f172af2;color:#e2e8f0;border-radius:.5rem;padding:1rem;overflow-x:auto}.mermaid-error{padding:.85rem 1rem;color:#b91c1c;background:#f8717126;border-top:1px solid rgba(248,113,113,.25)}.mermaid-loading{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem 1rem;font-size:.85rem;color:#0f172a99}.dark .mermaid-loading{color:#e2e8f0b3}.mermaid-spinner{width:1.2rem;height:1.2rem;border:2px solid rgba(59,130,246,.4);border-top-color:#3b82f6e6;border-radius:9999px;animation:spin .9s linear infinite}.math-block-node{margin:1rem 0}.math-inline-wrapper{position:relative;display:inline-block}.math-inline{display:inline-block;vertical-align:middle}.math-inline--hidden{visibility:hidden}.math-inline__loading{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner{width:1rem;height:1rem;border-radius:9999px;border:2px solid rgba(94,104,121,.25);border-top-color:#5e6879cc;animation:spin 1s linear infinite}.math-block{position:relative;text-align:center;overflow-x:auto;min-height:40px;padding:.5rem}.math-rendering{opacity:.3;transition:opacity .2s ease}.thematic-break{margin:3rem 0;border-top:1px solid #e2e8f0}.hr-node{margin:3rem 0;border-top:1px solid var(--hr-border-color, #e2e8f0)}.hard-break{display:block}.checkbox-node{margin-right:.5rem;vertical-align:middle}.checkbox-input{margin:0;cursor:default}.html-inline-node{display:inline}.html-inline-node--loading{opacity:.85}.html-block-node__placeholder{display:flex;flex-direction:column;gap:.35rem;padding:.5rem 0}.html-block-node__placeholder-bar{display:block;height:.8rem;border-radius:9999px;background-image:linear-gradient(90deg,#94a3b859,#94a3b81a,#94a3b859);background-size:200% 100%;animation:html-block-node-shimmer 1.2s ease infinite}@keyframes html-block-node-shimmer{0%{background-position:0% 0%}to{background-position:200% 0%}}.vmr-container{border-radius:.5rem;border:1px solid rgba(148,163,184,.35);padding:1rem;margin:1rem 0;border-left-width:4px}.admonition{--admonition-bg: #f8f8f8;--admonition-border: #eaecef;--admonition-header-bg: rgba(0, 0, 0, .03);--admonition-text: #111827;--admonition-muted: #374151;--admonition-note-color: #448aff;--admonition-tip-color: #00bfa5;--admonition-warning-color: #ff9100;--admonition-danger-color: #ff5252;margin:1rem 0;padding:0;border-radius:4px;border-left:4px solid var(--admonition-border);background-color:var(--admonition-bg);color:var(--admonition-text);overflow:hidden}.admonition-header{padding:.5rem 1rem;font-weight:600;display:flex;align-items:center;background-color:var(--admonition-header-bg);color:var(--admonition-muted)}.admonition-icon{margin-right:.5rem;color:inherit}.admonition-content{padding:.5rem 1rem 1rem;color:var(--admonition-text)}.admonition-note{border-left-color:var(--admonition-note-color)}.admonition-note .admonition-header{background-color:#448aff0f;color:var(--admonition-note-color)}.admonition-info{border-left-color:var(--admonition-note-color)}.admonition-info .admonition-header{background-color:#448aff0f;color:var(--admonition-note-color)}.admonition-tip{border-left-color:var(--admonition-tip-color)}.admonition-tip .admonition-header{background-color:#00bfa50f;color:var(--admonition-tip-color)}.admonition-warning{border-left-color:var(--admonition-warning-color)}.admonition-warning .admonition-header{background-color:#ff91000f;color:var(--admonition-warning-color)}.admonition-danger{border-left-color:var(--admonition-danger-color)}.admonition-danger .admonition-header{background-color:#ff52520f;color:var(--admonition-danger-color)}.admonition-error{border-left-color:var(--admonition-danger-color)}.admonition-error .admonition-header{background-color:#ff52520f;color:var(--admonition-danger-color)}.admonition-caution{border-left-color:var(--admonition-warning-color)}.admonition-caution .admonition-header{background-color:#ff91000f;color:var(--admonition-warning-color)}.admonition-toggle{margin-left:auto;background:transparent;border:none;color:inherit;cursor:pointer;padding:.25rem .5rem;border-radius:4px;font-size:.9rem}.admonition-toggle:focus{outline:2px solid rgba(0,0,0,.08);outline-offset:2px}.admonition.is-dark{--admonition-bg: #0b1220;--admonition-border: rgba(255, 255, 255, .06);--admonition-header-bg: rgba(255, 255, 255, .03);--admonition-text: #e6eef8;--admonition-muted: #cbd5e1}.code-block-container{contain:content;content-visibility:auto;contain-intrinsic-size:320px 180px}.code-editor-container,.code-height-placeholder{min-height:120px}.code-action-btn{cursor:pointer;opacity:.7;transition:opacity .2s}.code-action-btn:hover{opacity:1}.code-action-btn:disabled{opacity:.5;cursor:not-allowed}.code-action-btn:disabled:hover{background-color:transparent}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg,.icon-slot img{display:block;width:100%;height:100%}.code-block-container .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background, #111827)}.code-block-content{max-height:min(70vh,500px);overflow:auto;transition:max-height .3s ease;font-family:var(--vscode-editor-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);line-height:var(--vscode-editor-line-height, 1.5)}.code-block-render{min-height:1px}.code-fallback-plain{white-space:pre;overflow:auto;background:transparent;color:inherit;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-family:var(--vscode-editor-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-weight:var(--vscode-editor-font-weight, 400)}.code-fallback-plain>code{font-size:inherit;line-height:inherit;font-family:inherit;font-weight:inherit}.code-loading-placeholder{padding:1rem;min-height:120px}.loading-skeleton{display:flex;flex-direction:column;gap:.75rem}.skeleton-line{height:1rem;background:linear-gradient(90deg,#0000000f 25%,#0000001f 37%,#0000000f 63%);background-size:400% 100%;animation:code-skeleton-shimmer 1.2s ease-in-out infinite;border-radius:.25rem}.code-block-container.is-dark .skeleton-line{background:linear-gradient(90deg,#ffffff0f 25%,#ffffff1f 37%,#ffffff0f 63%);background-size:400% 100%}.skeleton-line.short{width:60%}@keyframes code-skeleton-shimmer{0%{background-position:100% 0}to{background-position:0 0}}.markstream-react pre[class^=language-],.markstream-react pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-react pre[class^=language-]>code,.markstream-react pre[class*=" language-"]>code{display:block}.markstream-react pre[class^=language-]:focus,.markstream-react pre[class*=" language-"]:focus{outline:2px solid var(--vmdr-focus, #3b82f6);outline-offset:2px}.html-preview-frame__backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame__backdrop--dark{background-color:#0f172acc}.html-preview-frame{width:80vw;max-width:960px;height:70vh;background-color:#fff;border-radius:.5rem;overflow:hidden;box-shadow:0 10px 40px #00000040;display:flex;flex-direction:column}.html-preview-frame--dark{background-color:#020617;color:#e5e7eb;box-shadow:0 10px 40px #0009}.html-preview-frame__header{display:flex;justify-content:space-between;align-items:center;padding:.4rem .75rem;border-bottom:1px solid rgba(0,0,0,.06)}.html-preview-frame--dark .html-preview-frame__header{border-bottom-color:#94a3b859}.html-preview-frame__title{display:inline-flex;align-items:center;gap:.4rem;font-size:.75rem;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot{width:.5rem;height:.5rem;border-radius:999px;background-color:#22c55e}.html-preview-frame--dark .html-preview-frame__dot{background-color:#4ade80}.html-preview-frame__label{white-space:nowrap}.html-preview-frame__close{border:none;background:transparent;font-size:1.25rem;line-height:1;cursor:pointer}.html-preview-frame__close--dark{color:#e5e7eb}.html-preview-frame__iframe{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame{width:100vw;height:80vh;border-radius:0}}.ms-tooltip{position:fixed;padding:.4rem .65rem;font-size:.875rem;border-radius:.375rem;border-width:1px;border-style:solid;box-shadow:0 10px 15px #00000014;pointer-events:none;z-index:9999;opacity:0;transition:opacity .12s linear,transform .22s cubic-bezier(.16,1,.3,1)}.ms-tooltip[data-visible=true]{opacity:1}.ms-tooltip[data-dark=true]{background-color:#111827;color:#f9fafb;border-color:#374151}.ms-tooltip[data-dark=false],.ms-tooltip:not([data-dark=true]){background-color:#fff;color:#111827;border-color:#e5e7eb}@keyframes node-placeholder-shimmer{0%{background-position:200% 0%}to{background-position:-200% 0%}}@keyframes typewriter-fade{0%{opacity:0}to{opacity:1}}.markstream-react .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes spin{to{transform:rotate(360deg)}}
@@ -0,0 +1,3 @@
1
+ export const safeList = `string cannot delete global call clearGlobalCustomComponents blockquote-node auto react react-dom en utf-8 viewport content="width=device-width initial-scale=1 event.key keydown html-preview-frame__backdrop--dark html-preview-frame--dark html-preview-frame__header html-preview-frame__title html-preview-frame__dot html-preview-frame__label html-preview-frame__close--dark html-preview-frame__iframe allow-scripts allow-same-origin stream-markdown-parser typeof window.requestIdleCallback [data-node-index] node-spacer dark virtualized code_block node-slot data-node-index data-node-type typewriter-node node-placeholder performance [markstream-react][perf] mermaid theme object name markdown-renderer note is-dark data-index-key headerId admonition-header admonition-icon admonition-title admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby checkbox-node checkbox checkbox-input dl definition-list indexKey mb-4 dt definition-term font-semibold ctx renderNode ?? definition dd definition-desc ml-4 emoji-node mark highlight-node smooth footnote-anchor text-sm text-[#0366d6] hover:underline cursor-pointer ↩︎ hard-break emphasis-node clsx heading-node footnote-node flex mt-2 mb-2 leading-relaxed border-t border-[#eaecef] pt-2 flex-1 footnote-reference handleScroll href footnote footnote-link plaintext number diff none visible view.getModifiedEditor on same helpers.cleanupEditor canonicalLanguage single window.requestAnimationFrame window.cancelAnimationFrame top navigator.clipboard navigator.clipboard.writeText code-block-container my-4 rounded-lg border overflow-hidden shadow-sm border-gray-700/30 bg-gray-900 border-gray-200 bg-white is-rendering code-block-header justify-between items-center px-4 py-2.5 border-b border-gray-400/5 space-x-2 icon-slot h-4 w-4 flex-shrink-0 font-medium font-mono truncate code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)] aria-pressed w-3 h-3 currentColor round m9 copied m14 evenodd code-block-body--collapsed code-block-body--expanded code-height-placeholder hidden aria-hidden absolute code-fallback-plain m-0 aria-busy aria-label no code-loading-placeholder loading-skeleton skeleton-line short sr-only polite status onclick onerror onload onmouseover onmouseout onmousedown onmouseup onkeydown onkeyup onfocus onblur onsubmit onreset onchange onselect ondblclick src srcset xlink:href formaction abbr address area article aside bdi bdo caption cite col colgroup data datalist details dfn dialog embed fieldset footer header hgroup kbd legend main map menu meter nav optgroup output param picture progress rp rt ruby samp section small source summary template tfoot time track var wbr class text tag_close self_closing tag_open setHostEl html-block-node shouldRender useDynamic reactNodes renderContent html-block-node__placeholder html-block-node__placeholder-bar w-4/5 w-2/3 insert-node inline-code inline text-[85%] px-1 py-0.5 rounded bg-secondary whitespace-normal break-words max-w-full linear infinite link-loading inline-flex items-baseline gap-1.5 link-text-wrapper relative leading-[normal] link-text node.text underline-anim link-node noopener noreferrer list-item pl-1.5 my-2 valueAttr children setFigureEl image-node image-node__inner is-loaded contain lazy eager async image image-node__placeholder image-node__spinner image-node__placeholder-text image… placeholder image-node__error failed to load image-node__caption list-node my-5 pl-[calc(13/8*1em)] list-decimal list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)] list vitesse-dark vitesse-light shiki shiki-fallback stream-markdown code-block-content rendererTargetRef code-block-render unknown-node text-gray-500 italic node subscript-node text-node whitespace-pre-wrap text-node-center strong-node strikethrough-node containerClass vmr-container reference-node bg-accent px-1.5 mx-0.5 hover:bg-secondary hr-node thematic-break in out zoom superscript-node right text-right center text-center text-left table-node-wrapper my-8 table-node table-node--loading border-[var(--table-border,#cbd5e1)] p-[calc(4/7*1em)] table-node__loading table-node__spinner boolean window.matchMedia fixed ms-tooltip z-[9999] inline-block text-base py-2 px-3 shadow-md whitespace-nowrap pointer-events-none tooltip-element text-white border-gray-700 text-gray-900 tooltip paragraph-node paragraph stream-monaco error [mermaidWorkerClient] messageerror cleared worker instance inject via busy timed canParse findPrefix javascript typescript python shell plain cpp markdown html_block node.type html_inline text_special node.content heading list_item definition_list footnote_reference footnote_anchor admonition hardbreak inline_code emphasis strikethrough highlight insert subscript superscript checkbox_input emoji thematic_break math_inline math_block reference vmr_container label_open label_close afterbegin light loose strict viewBox open-modal fullscreen [data-mermaid-wrapper] mermaid-action-btn text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 toggle-mode preview top-2 right-2 z-10 gap-2 backdrop-blur common.zoomIn common.zoomOut common.resetZoom min-h-[360px] transition-all duration-100 block bg-gray-50 data-mermaid-wrapper inset-0 cursor-grab cursor-grabbing w-full justify-center min-h-full mermaid-loading mermaid-spinner diagram… mermaid-block-header bg-gray-800 space-x-1 p-0.5 bg-gray-700 bg-gray-100 px-2.5 py-1 bg-gray-600 text-gray-200 text-gray-700 common.preview common.source m16 opacity-50 cursor-not-allowed common.export m7 text-gray-300 mermaid-error mermaid-block mermaid-modal-overlay mermaid-modal-panel mermaid-modal-header mermaid-modal-title mermaid-modal-close closeModal mermaid-modal-body modalContentRef mermaid-modal-content not available default abort thinking htmlFor className document data-language role aria-describedby ontouchstart ontouchend ontouchmove ontouchcancel onwheel onscroll oncopy oncut onpaste oninput oninvalid onsearch checked disabled readonly required autofocus multiple value min max step width height size maxlength parse dynamic html-inline-node html-inline-node--loading containerRef math-inline-wrapper mathRef math-inline--hidden math-inline__loading math-inline__spinner math-block overflow-x-auto min-h-[40px] rendering math-rendering [katexWorkerClient] init cache-hit render timeout waiting slot globalThis.requestAnimationFrame globalThis.cancelAnimationFrame module did expected [markstream-react] katex`
2
+ module.exports = safeList;
3
+ export default safeList;
package/package.json CHANGED
@@ -1,14 +1,19 @@
1
1
  {
2
2
  "name": "markstream-react",
3
3
  "type": "module",
4
- "version": "0.0.3-beta.2",
4
+ "version": "0.0.3-beta.3",
5
5
  "description": "React renderer for stream-markdown based AST output used in markstream-vue.",
6
+ "sideEffects": [
7
+ "**/*.css"
8
+ ],
6
9
  "exports": {
7
10
  ".": {
8
11
  "types": "./dist/index.d.ts",
9
12
  "import": "./dist/index.js"
10
13
  },
11
14
  "./index.css": "./dist/index.css",
15
+ "./index.tailwind.css": "./dist/index.tailwind.css",
16
+ "./tailwind": "./dist/tailwind.ts",
12
17
  "./workers/katexRenderer.worker": "./dist/workers/katexRenderer.worker.js",
13
18
  "./workers/mermaidParser.worker": "./dist/workers/mermaidParser.worker.js"
14
19
  },
@@ -18,6 +23,13 @@
18
23
  "files": [
19
24
  "dist"
20
25
  ],
26
+ "scripts": {
27
+ "dev": "vite dev",
28
+ "build": "vite build --mode npm && vite build -c vite.config.tailwind.ts --mode npm && node ./scripts/copy-tailwind-css.mjs",
29
+ "preview": "vite preview",
30
+ "typecheck": "tsc --noEmit",
31
+ "release": "bumpp --commit --no-tag --no-push && npm publish --access public && node ../../scripts/tag-package.mjs --package-json package.json --push"
32
+ },
21
33
  "peerDependencies": {
22
34
  "katex": ">=0.16.22",
23
35
  "mermaid": ">=11",
@@ -43,7 +55,7 @@
43
55
  "dependencies": {
44
56
  "@floating-ui/dom": "^1.7.4",
45
57
  "clsx": "^2.1.1",
46
- "stream-markdown-parser": "0.0.53"
58
+ "stream-markdown-parser": "workspace:*"
47
59
  },
48
60
  "devDependencies": {
49
61
  "@types/react": "^18.3.27",
@@ -53,12 +65,5 @@
53
65
  "tailwindcss": "^3.4.19",
54
66
  "typescript": "^5.9.3",
55
67
  "vite": "^7.3.0"
56
- },
57
- "scripts": {
58
- "dev": "vite dev",
59
- "build": "vite build --mode npm",
60
- "preview": "vite preview",
61
- "typecheck": "tsc --noEmit",
62
- "release": "bumpp && npm publish --access public"
63
68
  }
64
- }
69
+ }