markstream-react 0.0.3-beta.6 → 0.0.3-beta.8

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/package.json CHANGED
@@ -1,8 +1,59 @@
1
1
  {
2
2
  "name": "markstream-react",
3
3
  "type": "module",
4
- "version": "0.0.3-beta.6",
5
- "description": "React renderer for stream-markdown based AST output used in markstream-vue.",
4
+ "version": "0.0.3-beta.8",
5
+ "description": "React Markdown renderer optimized for large documents with progressive Mermaid rendering, streaming diff code blocks, and fast real-time preview. Built on stream-markdown AST for consistent rendering across frameworks. Perfect for documentation sites, AI chat interfaces, and content management systems.",
6
+ "author": "Simon He",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/Simon-He95/markstream-vue#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Simon-He95/markstream-vue.git",
12
+ "directory": "packages/markstream-react"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/Simon-He95/markstream-vue/issues"
16
+ },
17
+ "keywords": [
18
+ "react",
19
+ "reactjs",
20
+ "markdown",
21
+ "markdown-to-html",
22
+ "markdown-renderer",
23
+ "react-markdown",
24
+ "react-markdown-renderer",
25
+ "react-markdown-component",
26
+ "markdown-preview",
27
+ "markdown-viewer",
28
+ "react-component",
29
+ "nextjs",
30
+ "next.js",
31
+ "remix",
32
+ "vite",
33
+ "webpack",
34
+ "sse",
35
+ "ai-chat",
36
+ "streaming-markdown",
37
+ "html",
38
+ "renderer",
39
+ "custom-component",
40
+ "mermaid",
41
+ "progressive-mermaid",
42
+ "streaming-diff",
43
+ "diff-codeblock",
44
+ "large-documents",
45
+ "performance",
46
+ "real-time-preview",
47
+ "markstream-react",
48
+ "markstream",
49
+ "documentation",
50
+ "docs",
51
+ "content-management",
52
+ "cms",
53
+ "markdown-parser",
54
+ "md-to-html",
55
+ "react-markdown-component"
56
+ ],
6
57
  "sideEffects": [
7
58
  "**/*.css"
8
59
  ],
@@ -68,6 +119,6 @@
68
119
  "autoprefixer": "^10.4.23",
69
120
  "tailwindcss": "^3.4.19",
70
121
  "typescript": "^5.9.3",
71
- "vite": "^7.3.0"
122
+ "vite": "^7.3.1"
72
123
  }
73
124
  }
package/dist/index.css DELETED
@@ -1 +0,0 @@
1
- :where(.markstream-react) button{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.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 .right-6{right:1.5rem}.markstream-react .top-2{top:.5rem}.markstream-react .top-6{top:1.5rem}.markstream-react .z-10{z-index:10}.markstream-react .z-50{z-index:50}.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 .h-full{height:100%}.markstream-react .max-h-full{max-height:100%}.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 .gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.markstream-react .gap-x-2{-moz-column-gap:.5rem;column-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-black\/70{background-color:#000000b3}.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-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / 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-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px 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-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%}.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 DELETED
@@ -1,205 +0,0 @@
1
- import e,{useMemo as t,useState as n,useContext as r,createContext as o,useRef as i,useEffect as s,useCallback as a,useSyncExternalStore as l,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 x}from"react-dom";var w,v,y,k={exports:{}},b={},j={};var C=(y||(y=1,"production"===process.env.NODE_ENV?k.exports=function(){if(w)return b;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,s={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,r){var a,l={},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)&&!s.hasOwnProperty(a)&&(l[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===l[a]&&(l[a]=t[a]);return{$$typeof:n,type:e,key:c,ref:d,props:l,_owner:i.current}}return b.Fragment=r,b.jsx=a,b.jsxs=a,b}():k.exports=(v||(v=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"),s=/* @__PURE__ */Symbol.for("react.strict_mode"),a=/* @__PURE__ */Symbol.for("react.profiler"),l=/* @__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,x=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=x.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 v(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 s:return"StrictMode";case u:return"Suspense";case m:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case c:return v(e)+".Consumer";case l:return v(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 k,b,C,M,N,S,L,B=Object.assign,E=0;function T(){}T.__reactDisabledLog=!0;var _,$=x.ReactCurrentDispatcher;function D(e,t,n){if(void 0===_)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);_=r&&r[1]||""}return"\n"+_+e}var O,P=!1,R="function"==typeof WeakMap?WeakMap:Map;function W(e,t){if(!e||P)return"";var n,r=O.get(e);if(void 0!==r)return r;P=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=$.current,$.current=null,function(){if(0===E){k=console.log,b=console.info,C=console.warn,M=console.error,N=console.group,S=console.groupCollapsed,L=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})}E++}();try{if(t){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(s,[])}catch(p){n=p}Reflect.construct(e,[],s)}else{try{s.call()}catch(p){n=p}e.call(s.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"),l=n.stack.split("\n"),c=a.length-1,d=l.length-1;c>=1&&d>=0&&a[c]!==l[d];)d--;for(;c>=1&&d>=0;c--,d--)if(a[c]!==l[d]){if(1!==c||1!==d)do{if(c--,--d<0||a[c]!==l[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&&O.set(e,u),u}}while(c>=1&&d>=0);break}}}finally{P=!1,$.current=o,function(){if(0===--E){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},e,{value:k}),info:B({},e,{value:b}),warn:B({},e,{value:C}),error:B({},e,{value:M}),group:B({},e,{value:N}),groupCollapsed:B({},e,{value:S}),groupEnd:B({},e,{value:L})})}E<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?D(m):"";return"function"==typeof e&&O.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 D(e);switch(e){case u:return D("Suspense");case m:return D("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,s=o._init;try{return A(s(i),t,n)}catch(a){}}return""}O=new R;var I=Object.prototype.hasOwnProperty,F={},z=x.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 U(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 q,Y,Z,J=x.ReactCurrentOwner,G={key:!0,ref:!0,__self:!0,__source:!0},Q=x.ReactCurrentOwner,ee=x.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 se(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,s=o.call(e);!(i=s.next()).done;)ne(i.value)&&ie(i.value,t)}}var ae={};function le(e,n,o,g,x,v){var k=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===s||e===u||e===m||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||e.$$typeof===t||void 0!==e.getModuleId)}(e);if(!k){var b,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?b="null":K(e)?b="array":void 0!==e&&e.$$typeof===r?(b="<"+(y(e.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):b=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",b,j)}var C=function(e,t,n,o,i){var s,a={},l=null,c=null;for(s in void 0!==n&&(U(n),l=""+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)&&(U(t.key),l=""+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,s)&&!G.hasOwnProperty(s)&&(a[s]=t[s]);if(e&&e.defaultProps){var d=e.defaultProps;for(s in d)void 0===a[s]&&(a[s]=d[s])}if(l||c){var u="function"==typeof e?e.displayName||e.name||"Unknown":e;l&&function(e,t){var n=function(){q||(q=!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,s,a){var l={$$typeof:r,type:e,key:t,ref:n,props:a,_owner:s,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}(e,l,c,i,o,J.current,a)}(e,n,o,x,v);if(null==C)return C;if(k){var M=n.children;if(void 0!==M)if(g)if(K(M)){for(var N=0;N<M.length;N++)se(M[N],e);Object.freeze&&Object.freeze(M)}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 se(M,e)}if(I.call(n,"key")){var S=y(e),L=Object.keys(n).filter(function(e){return"key"!==e}),B=L.length>0?"{key: someKey, "+L.join(": ..., ")+": ...}":"{key: someKey}";ae[S+B]||(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} />',B,S,L.length>0?"{"+L.join(": ..., ")+": ...}":"{}",S),ae[S+B]=!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))}(C):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 s in e)if(i(e,s)){var a=void 0;try{if("function"!=typeof e[s]){var l=Error((r||"React class")+": "+n+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}a=e[s](t,s,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,s,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.")}}(C),C}j.Fragment=i,j.jsx=function(e,t,n){return le(e,t,n,!1)},j.jsxs=function(e,t,n){return le(e,t,n,!0)}}()),j)),k.exports);const M=/* @__PURE__ */new Set(["image","table","code_block","html_block","html_inline","blockquote","list","list_item","definition_list","footnote","footnote_reference","footnote_anchor","admonition","thematic_break","math_block","thinking","vmr_container"]);function N(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 s=e[i];if(s){if("label_open"===s.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 l=`${n}-label-${i}`;o.push(
2
- /* @__PURE__ */C.jsx("label",{...N(s.attrs),children:S(a,t,`${l}-child`,r)},l));continue}"label_close"!==s.type&&o.push(r(s,`${n}-${i}`,t))}}return o}function L(e,t,n,r){/* @__PURE__ */
3
- return C.jsx(C.Fragment,{children:S(e,t,`${n}-inline`,r)})}const B={note:"ℹ️",info:"ℹ️",tip:"💡",warning:"⚠️",danger:"❗",error:"⛔",caution:"⚠️"};function E(e){const{node:r,ctx:o,renderNode:i,indexKey:s,isDark:a}=e,l=String(r.kind||"note"),c=t(()=>r.title&&String(r.title).trim().length?String(r.title):l.charAt(0).toUpperCase()+l.slice(1),[l,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
- return C.jsxs("div",{className:`admonition admonition-${l}${a?" is-dark":""}`,"data-index-key":s,children:[
5
- /* @__PURE__ */C.jsxs("div",{id:m,className:"admonition-header",children:[B[l]&&/* @__PURE__ */C.jsx("span",{className:"admonition-icon",children:B[l]}),
6
- /* @__PURE__ */C.jsx("span",{className:"admonition-title",children:c}),r.collapsible&&/* @__PURE__ */C.jsx("button",{type:"button",className:"admonition-toggle","aria-expanded":!d,"aria-controls":`${m}-content`,title:d?"Expand":"Collapse",onClick:()=>u(e=>!e),children:/* @__PURE__ */C.jsx("span",{children:d?"▶":"▼"})})]}),!d&&/* @__PURE__ */C.jsx("div",{id:`${m}-content`,className:"admonition-content","aria-labelledby":m,children:o&&i?S(r.children,o,String(null!=s?s:m),i):null})]})}const T=o(null);function _(e,t){const n="undefined"!=typeof window&&"undefined"!=typeof document,r=/* @__PURE__ */new Map;return(o,i)=>{var s,a;const l={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 l.current=!0,c(),{isVisible:()=>!0,whenVisible:u,destroy:m};const h=((t,o)=>{var i,s;if(!n)return null;if("undefined"==typeof IntersectionObserver)return null;const a=null!=(i=e())?i:null,l=`${t}::${o}`,c=r.get(l);if(c&&c.root===a)return c;if(c){try{c.observer.disconnect()}catch{}r.delete(l)}const d=null!=(s=null==c?void 0:c.targets)?s:/* @__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(l,m);for(const e of d.keys())u.observe(e);return m})(null!=(s=null==i?void 0:i.rootMargin)?s:"300px",null!=(a=null==i?void 0:i.threshold)?a:0);return h?(h.targets.set(o,{resolve:c,state:l}),h.observer.observe(o),{isVisible:()=>l.current,whenVisible:u,destroy:m}):(l.current=!0,c(),{isVisible:()=>!0,whenVisible:u,destroy:m})}}const $=_(()=>null,()=>!0);function D({getRoot:e,enabled:n=!0,children:r}){const o=i(n);o.current=n;const s=i(e);s.current=e;const a=t(()=>_(()=>{var e,t;return null!=(t=null==(e=s.current)?void 0:e.call(s))?t:null},()=>o.current),[]);/* @__PURE__ */
7
- return C.jsx(T.Provider,{value:a,children:r})}function O(){var e;return null!=(e=r(T))?e:$}const P="__global__",R="__MARKSTREAM_REACT_CUSTOM_COMPONENTS_STORE__",W=(()=>{const e=globalThis;if(e[R])return e[R];const t={scopedComponents:{},revision:0,listeners:/* @__PURE__ */new Set};return e[R]=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[P]={...e},A()}function H(e){const t=W.scopedComponents[P]||{};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===P)throw new Error("removeCustomComponents: cannot delete global mapping; call clearGlobalCustomComponents instead.");delete W.scopedComponents[e],A()}function K(){delete W.scopedComponents[P],A()}function X(e){const{node:t}=e;/* @__PURE__ */
8
- return C.jsx("span",{className:"checkbox-node",children:/* @__PURE__ */C.jsx("input",{type:"checkbox",checked:Boolean(t.checked),disabled:!0,className:"checkbox-input",readOnly:!0})})}const U={"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 q(e){Object.assign(U,e)}function Y(){return{t:e=>{var t;return null!=(t=U[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 s=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?s():Q=setTimeout(s,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 se=null;function ae(e){se=null!=e?e:null}const le={"":"",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=le[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(se){const t=se(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 s(()=>{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:x(
9
- /* @__PURE__ */C.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__ */C.jsxs("div",{className:"html-preview-frame"+(e.isDark?" html-preview-frame--dark":""),onClick:e=>e.stopPropagation(),children:[
10
- /* @__PURE__ */C.jsxs("div",{className:"html-preview-frame__header",children:[
11
- /* @__PURE__ */C.jsxs("div",{className:"html-preview-frame__title",children:[
12
- /* @__PURE__ */C.jsx("span",{className:"html-preview-frame__dot"}),
13
- /* @__PURE__ */C.jsx("span",{className:"html-preview-frame__label",children:e.title||"Preview"})]}),
14
- /* @__PURE__ */C.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__ */C.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 xe(){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,ve=!1,ye=null,ke=null,be=null,je=null,Ce=null;const Me=/* @__PURE__ */new WeakMap;let Ne=0;function Se(e,t){const n=function(e){if(null==e)return null;if("string"==typeof e)return e;if("object"==typeof e&&e&&"name"in e)return String(e.name);if("object"==typeof e){const t=Me.get(e);if(t)return t;try{const t=JSON.stringify(e);if(t)return Me.set(e,t),t}catch{}const n="__theme_"+ ++Ne;return Me.set(e,n),n}return String(e)}(e);return n?(we!==t&&(we=t),ve||Ce!==n?!ye||je!==n&&ke!==n?(be=e,je=n,ye||(ve=!0,ye=(async()=>{for(;null!=be&&null!=je;){const e=be,t=je;if(be=null,je=null,Ce===t)continue;const n=we;if(!n)break;try{ke=t,await Promise.resolve(n(e)),Ce=t}catch{}}})().finally(()=>{ve=!1,ye=null,ke=null}),ye)):ye:Promise.resolve()):Promise.resolve()}let Le=null,Be=null,Ee=null;const Te=/* @__PURE__ */new Set,_e=/* @__PURE__ */new WeakMap;let $e=0;function De(){for(const e of Array.from(Te))try{e()}catch{}}function Oe({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 C.jsx("pre",{className:o,"aria-busy":!0===(null==e?void 0:e.loading),"aria-label":i,"data-language":r,tabIndex:0,children:/* @__PURE__ */C.jsx("code",{translate:"no",children:String(null!=(n=null==e?void 0:e.code)?n:"")})})}const Pe={isShowPreview:!0,loading:!0,stream:!0,enableFontSizeControl:!0,showHeader:!0,showCopyButton:!0,showExpandButton:!0,showPreviewButton:!0,showFontSizeButtons:!0};function Re(e){var r;const o={...Pe,...e},{node:l,isDark:c,loading:d,stream:u,isShowPreview:m,enableFontSizeControl:h,darkTheme:p,lightTheme:f,monacoOptions:g,themes:x,minWidth:w,maxWidth:v,showHeader:y,showCopyButton:k,showExpandButton:b,showPreviewButton:j,showFontSizeButtons:M}=o,N=i(null),S=i(null),L=i(null),B=i(null),E=i(null),T=i(null),_=i(null),$=i(0),D=i(null),P=i(null),R=O(),W=i(g),A=i(x),I=i(g),[F,z]=n(!1),[H,V]=n(()=>"undefined"==typeof window),[K,X]=n(!1),[U,q]=n(!1),[Z,J]=n(!1),[G,Q]=n(()=>l.language||"plaintext"),[ee,te]=n(()=>ce(l.language)),[ne,re]=n(!1),[se,ae]=n(!1),[le,pe]=n(!1),[fe,ge]=n(!1),{t:we}=Y(),[ve,ye]=n(()=>{const e=Number(null==g?void 0:g.fontSize);return Number.isFinite(e)&&e>0?e:14}),[ke,be]=n(ve),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},[]),Ce=a(e=>{var t,n,r,o;if(F)return;const i=N.current,s=L.current;if(!i||!s)return;const a="diff"===T.current?null==(t=s.getDiffEditorView)?void 0:t.call(s):null==(n=s.getEditorView)?void 0:n.call(s);if(!a)return;const l=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(l)}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,l);i.style.height=`${Math.ceil(Math.max(120,n))}px`}null==(o=a.layout)||o.call(a)}catch{}},[je,F]);s(()=>{W.current=g},[g]),s(()=>{te(ce(l.language))},[l.language]);const Me=i(l);Me.current=l;const Ne=a(()=>{var e;$.current+=1;try{null==(e=B.current)||e.call(B)}catch{}E.current=null,T.current=null,_.current=null,J(!1),q(!1)},[]),_e=a(()=>{var e,t,n,r,o,i;const s=N.current,a=S.current;if(!s||!a)return;const l=null!=(e=s.querySelector(".monaco-editor"))?e:s;try{const e="undefined"!=typeof window&&window.getComputedStyle?window.getComputedStyle(l):null,s=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();s&&a.style.setProperty("--vscode-editor-foreground",s),c&&a.style.setProperty("--vscode-editor-background",c),d&&a.style.setProperty("--vscode-editor-selectionBackground",d)}catch{}},[]);s(()=>()=>{var e,t,n;$.current+=1,null==(e=B.current)||e.call(B),B.current=null,E.current=null,T.current=null,_.current=null,D.current=null,null==(n=null==(t=P.current)?void 0:t.destroy)||n.call(t),P.current=null},[]),s(()=>{var e,t;if("undefined"==typeof window)return;if(H)return;const n=S.current;if(!n)return;null==(t=null==(e=P.current)?void 0:e.destroy)||t.call(e);const r=R(n,{rootMargin:"400px"});return P.current=r,r.isVisible()&&V(!0),r.whenVisible.then(()=>V(!0)),()=>{r.destroy(),P.current===r&&(P.current=null)}},[R,H]),s(()=>{let e=!0;return"undefined"==typeof window||(async()=>{var t,n;try{const r=await xe();if(!e)return;if(!r)return void z(!0);const o=r.useMonaco,i=r.detectLanguage;if("function"==typeof i&&(D.current=i),"function"!=typeof o)return void z(!0);const s=null!=(t=c?p:f)?t:Le,a={...I.current||{}},l=o({wordWrap:"on",wrappingIndent:"same",themes:A.current,theme:s,...a,onThemeChange(){_e()}});L.current=l,"function"==typeof(n=l.setTheme)&&(Ee=n,null!=Le&&null!=Be&&Se(Le,Ee).then(()=>De()).catch(()=>{})),B.current="function"==typeof l.safeClean?()=>l.safeClean():"function"==typeof l.cleanupEditor?()=>l.cleanupEditor():null,X(!0)}catch{e&&z(!0)}})(),()=>{e=!1}},[]),s(()=>{var e;if(!l.language&&!ee&&D.current)try{const t=D.current(String(null!=(e=l.code)?e:""));t&&Q(t)}catch{}},[ee,l.code,l.language]);const $e=t(()=>String(l.language||ee||G||"plaintext"),[ee,G,l.language]),Re=t(()=>ce($e),[$e]),We=t(()=>de(Re),[Re]),Ae=t(()=>ue(Re),[Re]),Ie=t(()=>!!m&&("html"===Re||"svg"===Re),[Re,m]),Fe=t(()=>{const e=Re;return e?me[e]||e.charAt(0).toUpperCase()+e.slice(1):me[""]||"Plain Text"},[Re]),ze=t(()=>{var e,t,n;return l.diff?null!=(t=null!=(e=l.updatedCode)?e:l.code)?t:"":null!=(n=l.code)?n:""},[l.code,l.diff,l.updatedCode]),He=t(()=>{const e=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},t={},n=e(w),r=e(v);return n&&(t.minWidth=n),r&&(t.maxWidth=r),t},[w,v]),Ve=!1===u&&d,Ke=t(()=>c?p:f,[p,c,f]);s(()=>{if(F)return;if(!U||!H)return;const e=L.current;(null==e?void 0:e.setTheme)&&Ke&&Se(Ke,e.setTheme).then(_e).catch(()=>{})},[U,Ke,_e,F,H]),s(()=>{var e;if("undefined"!=typeof window)return e=()=>{_e()},Te.add(e),()=>{Te.delete(e)}},[_e]);const Xe=a(async()=>{var e,t;if(F)return null;if(!H)return null;if(le)return null;if(Ve)return null;const n=L.current,r=N.current;if(!n||!r||!n.createEditor)return null;const o=Me.current,i=o.diff?"diff":"single",s=_.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&&s===r&&a)return null;if(E.current)return E.current;$.current+=1;const l=$.current;q(!0);const c=(async()=>{var e,t,i,s,a,c,d,u,m,h;try{null==(e=B.current)||e.call(B),T.current=null,_.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!=(s=o.updatedCode)?s:o.code)?a:""),p)):(T.current="single",await n.createEditor(r,String(null!=(c=o.code)?c:""),p)),_.current=r,$.current!==l)return;const f=Number(null==(d=W.current)?void 0:d.fontSize);if(Number.isFinite(f)&&f>0){ye(f),be(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{}}_e(),se||le||Ce(!1),J(!0)}catch{$.current===l&&z(!0)}})().finally(()=>{E.current===c&&(E.current=null)});return E.current=c,c},[Ce,le,se,We,Ve,_e,F,H]);s(()=>{F||K&&H&&(le||Ve?Ne():Xe())},[le,Xe,K,Ne,Ve,F,H]),s(()=>{var e;if(F)return;if(!K)return;if(!H)return;if(le)return;if(Ve)return;const t=L.current;if(!t)return;const n=String(null!=(e=l.code)?e:"");(async()=>{var e,r;let o=ee;if(!o&&D.current)try{o=ce(D.current(n)),o&&te(o)}catch{}const i=de(o||Re);if(t.createEditor&&N.current){try{await Promise.resolve(Xe())}catch{}const e=E.current;if(e)try{await e}catch{}}try{l.diff&&t.updateDiff?await Promise.resolve(t.updateDiff(String(null!=(e=l.originalCode)?e:""),String(null!=(r=l.updatedCode)?r:""),i)):t.updateCode&&await Promise.resolve(t.updateCode(n,i))}catch{}se&&Ce(!0)})()},[Ce,Re,ee,le,U,Xe,se,K,l.code,l.diff,l.originalCode,l.updatedCode,Ve,F,H]),s(()=>{if(F)return;if(!K)return;if(!H)return;if(le)return;if(Ve)return;if(!se&&d)return;const e="undefined"!=typeof window&&"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame(()=>Ce(se)):null;return null==e&&Ce(se),()=>{null!=e&&"undefined"!=typeof window&&"function"==typeof window.cancelAnimationFrame&&window.cancelAnimationFrame(e)}},[Ce,le,se,d,K,Ve,F,H]),s(()=>{var e,t,n;if(!h)return;if(F)return;const r=L.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:ke})}catch{}Ce(se)}},[Ce,h,se,ke,l.diff,F]);const Ue=a((e,t)=>{oe(e.currentTarget,t,"top",!1,(e.clientX,e.clientY),c)},[c]),qe=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"===Re?"text/html":"image/svg+xml",t="html"===Re?we("artifacts.htmlPreviewTitle")||"HTML Preview":we("artifacts.svgPreviewTitle")||"SVG Preview";"function"!=typeof o.onPreviewCode?"html"===Re&&ge(e=>!e):o.onPreviewCode({node:l,artifactType:e,artifactTitle:t,id:`temp-${Re}-${Date.now()}`})},[Re,Ie,l,o,we]);return F?/* @__PURE__ */C.jsx(Oe,{node:l}):/* @__PURE__ */C.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__ */C.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
- /* @__PURE__ */C.jsxs("div",{className:"flex items-center space-x-2 flex-1 overflow-hidden",children:[
18
- /* @__PURE__ */C.jsx("span",{className:"icon-slot h-4 w-4 flex-shrink-0",dangerouslySetInnerHTML:{__html:Ae}}),
19
- /* @__PURE__ */C.jsx("span",{className:"text-sm font-medium font-mono truncate",children:Fe})]}),
20
- /* @__PURE__ */C.jsxs("div",{className:"flex items-center space-x-2",children:[
21
- /* @__PURE__ */C.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:()=>pe(e=>!e),onMouseEnter:e=>Ue(e,le?we("common.expand")||"Expand":we("common.collapse")||"Collapse"),onFocus:e=>Ue(e,le?we("common.expand")||"Expand":we("common.collapse")||"Collapse"),onMouseLeave:qe,onBlur:qe,children:/* @__PURE__ */C.jsx("svg",{style:{rotate:le?"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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m9 18l6-6l-6-6"})})}),M&&h&&/* @__PURE__ */C.jsxs(C.Fragment,{children:[
22
- /* @__PURE__ */C.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:ke<=10,onClick:()=>be(e=>Math.max(10,e-1)),onMouseEnter:e=>Ue(e,we("common.decrease")||"Decrease"),onFocus:e=>Ue(e,we("common.decrease")||"Decrease"),onMouseLeave:qe,onBlur:qe,children:/* @__PURE__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 12h14"})})}),
23
- /* @__PURE__ */C.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:ke===ve,onClick:()=>be(ve),onMouseEnter:e=>Ue(e,we("common.reset")||"Reset"),onFocus:e=>Ue(e,we("common.reset")||"Reset"),onMouseLeave:qe,onBlur:qe,children:/* @__PURE__ */C.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__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
24
- /* @__PURE__ */C.jsx("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),
25
- /* @__PURE__ */C.jsx("path",{d:"M3 3v5h5"})]})})}),
26
- /* @__PURE__ */C.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:ke>=36,onClick:()=>be(e=>Math.min(36,e+1)),onMouseEnter:e=>Ue(e,we("common.increase")||"Increase"),onFocus:e=>Ue(e,we("common.increase")||"Increase"),onMouseLeave:qe,onBlur:qe,children:/* @__PURE__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 12h14m-7-7v14"})})})]}),k&&/* @__PURE__ */C.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=>Ue(e,ne?we("common.copied")||"Copied":we("common.copy")||"Copy"),onFocus:e=>Ue(e,ne?we("common.copied")||"Copied":we("common.copy")||"Copy"),onMouseLeave:qe,onBlur:qe,children:ne?/* @__PURE__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20 6L9 17l-5-5"})}):/* @__PURE__ */C.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__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
27
- /* @__PURE__ */C.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),
28
- /* @__PURE__ */C.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})})}),b&&/* @__PURE__ */C.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:()=>ae(e=>!e),onMouseEnter:e=>Ue(e,se?we("common.collapse")||"Collapse":we("common.expand")||"Expand"),onFocus:e=>Ue(e,se?we("common.collapse")||"Collapse":we("common.expand")||"Expand"),onMouseLeave:qe,onBlur:qe,children:se?/* @__PURE__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"})}):/* @__PURE__ */C.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__ */C.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__ */C.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=>Ue(e,we("common.preview")||"Preview"),onFocus:e=>Ue(e,we("common.preview")||"Preview"),onMouseLeave:qe,onBlur:qe,children:/* @__PURE__ */C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",children:/* @__PURE__ */C.jsxs("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",children:[
29
- /* @__PURE__ */C.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
- /* @__PURE__ */C.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
- /* @__PURE__ */C.jsxs("div",{className:`code-block-body${le?" code-block-body--collapsed":""}${se?" code-block-body--expanded":""}`,children:[!le&&(!!u||!d)&&(F?/* @__PURE__ */C.jsx(Oe,{node:l}):/* @__PURE__ */C.jsxs(C.Fragment,{children:[
32
- /* @__PURE__ */C.jsx("div",{ref:N,className:"code-editor-container"+(u?"":" code-height-placeholder"),style:{visibility:Z?"visible":"hidden"},"aria-hidden":!Z}),!Z&&/* @__PURE__ */C.jsx("div",{style:{position:"absolute",inset:0,overflow:"auto",padding:"1rem"},children:/* @__PURE__ */C.jsx("pre",{className:"code-fallback-plain m-0","aria-busy":d,"aria-label":`Code block: ${Fe}`,tabIndex:0,children:/* @__PURE__ */C.jsx("code",{translate:"no",children:String(ze)})})})]})),!u&&d&&/* @__PURE__ */C.jsx("div",{className:"code-loading-placeholder",children:/* @__PURE__ */C.jsxs("div",{className:"loading-skeleton",children:[
33
- /* @__PURE__ */C.jsx("div",{className:"skeleton-line"}),
34
- /* @__PURE__ */C.jsx("div",{className:"skeleton-line"}),
35
- /* @__PURE__ */C.jsx("div",{className:"skeleton-line short"})]})})]}),fe&&!o.onPreviewCode&&Ie&&"html"===Re&&/* @__PURE__ */C.jsx(he,{code:String(null!=(r=l.code)?r:""),isDark:c,onClose:()=>ge(!1)}),
36
- /* @__PURE__ */C.jsx("span",{className:"sr-only","aria-live":"polite",role:"status",children:ne?we("common.copied")||"Copied":""})]})}function We(e){const{node:t,ctx:n,renderNode:r,indexKey:o}=e,i=Array.isArray(t.items)?t.items:[];/* @__PURE__ */
37
- return C.jsx("dl",{className:"definition-list","data-index-key":o,children:i.map((e,t)=>/* @__PURE__ */C.jsxs("div",{className:"mb-4",children:[
38
- /* @__PURE__ */C.jsx("dt",{className:"definition-term font-semibold",children:n&&r?L(e.term,n,`${String(null!=o?o:"definition")}-term-${t}`,r):null}),
39
- /* @__PURE__ */C.jsx("dd",{className:"definition-desc ml-4",children:n&&r?L(e.definition,n,`${String(null!=o?o:"definition")}-desc-${t}`,r):null})]},`${String(null!=o?o:"definition")}-${t}`))})}function Ae(e){var t;const{node:n}=e;/* @__PURE__ */
40
- return C.jsx("span",{className:"emoji-node",children:null!=(t=n.name)?t:n.markup})}function Ie(e){/* @__PURE__ */
41
- return C.jsx("em",{className:"emphasis-node",children:e.children})}function Fe(e){const{node:t}=e,n=a(e=>{var n;if(e.preventDefault(),"undefined"==typeof document)return;const r=document.getElementById(`fnref-${String(null!=(n=t.id)?n:"")}`);r&&r.scrollIntoView({behavior:"smooth"})},[t.id]);/* @__PURE__ */
42
- return C.jsx("a",{className:"footnote-anchor text-sm text-[#0366d6] hover:underline cursor-pointer",href:`#fnref-${t.id}`,title:`Back to reference ${t.id}`,onClick:n,children:"↩︎"})}function ze(e){const{node:t,ctx:n,renderNode:r,indexKey:o}=e;/* @__PURE__ */
43
- return C.jsx("div",{id:`footnote-${t.id}`,className:"footnote-node flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2",children:/* @__PURE__ */C.jsx("div",{className:"flex-1",children:n&&r?S(t.children,n,String(null!=o?o:`footnote-${t.id}`),r):null})})}function He(e){const{node:n}=e,r=t(()=>`#footnote-${n.id}`,[n.id]),o=a(e=>{if(e.preventDefault(),"undefined"==typeof document)return;const t=document.querySelector(r);t&&t.scrollIntoView({behavior:"smooth"})},[r]);/* @__PURE__ */
44
- return C.jsx("sup",{id:`fnref-${n.id}`,className:"footnote-reference",onClick:o,children:/* @__PURE__ */C.jsxs("a",{href:r,title:`View footnote ${n.id}`,className:"footnote-link cursor-pointer",children:["[",n.id,"]"]})})}function Ve(e){/* @__PURE__ */
45
- return C.jsx("br",{className:"hard-break"})}function Ke(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=Ke(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xe(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ke(e))&&(r&&(r+=" "),r+=t);return r}function Ue(e){const{node:t,ctx:n,renderNode:r,indexKey:o,children:i}=e,s=Math.min(6,Math.max(1,Number(t.level)||1)),a=`h${s}`;/* @__PURE__ */
46
- return C.jsx(a,{dir:"auto",className:Xe("heading-node font-semibold",`heading-${s}`),children:null!=i?i:n&&r?S(t.children,n,String(null!=o?o:`heading-${s}`),r):null})}function qe(e){/* @__PURE__ */
47
- return C.jsx("mark",{className:"highlight-node",children:e.children})}const Ye=/* @__PURE__ */new Set(["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick"]),Ze=/* @__PURE__ */new Set(["script"]),Je=/* @__PURE__ */new Set(["href","src","srcset","xlink:href","formaction"]);function Ge(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 Qe=/* @__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"]),et=/* @__PURE__ */new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function tt(e){return e.startsWith("--")?e:e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function nt(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=tt(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 rt(e){const t={};for(const[n,r]of Object.entries(e)){const e=n.toLowerCase();Ye.has(e)||Je.has(e)&&r&&Ge(r)||(t[n]=r)}return t}function ot(e,t){const n=e.toLowerCase();return!Qe.has(n)&&(Object.prototype.hasOwnProperty.call(t,n)||Object.prototype.hasOwnProperty.call(t,e))}function it(r){const{node:o,placeholder:a,customId:c}=r,d=O(),[u,m]=n(null),h=i(null),[p,f]=n(()=>"undefined"==typeof window),[g,x]=n(o.content),w=Boolean(o.loading),v=l(I,F,F),y=t(()=>{var e;return null!=(e=r.customComponents)?e:H(c)},[c,r.customComponents,v]);s(()=>{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 x(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]),s(()=>()=>{var e;null==(e=h.current)||e.destroy(),h.current=null},[]),s(()=>{w&&!p||x(o.content)},[w,o.content,p]);const k=t(()=>{var e;return N(null!=(e=o.attrs)?e:void 0)},[o.attrs]),b=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(ot(r[1],t))return!0;return!1}(null!=(e=o.content)?e:"",y)},[y,o.content]),j=t(()=>b&&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 s=e.indexOf("<",i);if(-1===s){i<e.length&&e.slice(i).trim()&&o.push({type:"text",content:e.slice(i)});break}if(s>i){const t=e.slice(i,s);t.trim()&&o.push({type:"text",content:t})}const a=e.indexOf(">",s);if(-1===a)break;const l=e.slice(s+1,a).trim(),c=l.startsWith("/"),d=l.endsWith("/");if(c)o.push({type:"tag_close",tagName:l.slice(1).trim()});else{const e=l.indexOf(" ");let i,s="";-1===e?i=d?l.slice(0,-1).trim():l.trim():(i=l.slice(0,e).trim(),s=l.slice(e+1));const a={};if(s){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let o;for(;null!==(o=e.exec(s));){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||et.has(i.toLowerCase())?"self_closing":"tag_open",tagName:i,attrs:a})}i=a+1}return o}(t);let o=0;const i=[],s=[];for(const t of r)if("text"===t.type){if(i.length>0&&i[i.length-1].blocked)continue;(i.length>0?i[i.length-1].children:s).push(t.content)}else if("self_closing"===t.type){if(Ze.has(t.tagName.toLowerCase()))continue;const r=rt(t.attrs||{}),a=r.key,l=null!=a&&""!==a?a:"ms-html-"+o++,c=ot(t.tagName,n)?n[t.tagName]||n[t.tagName.toLowerCase()]:void 0;c?(i.length>0?i[i.length-1].children:s).push(e.createElement(c,{...r,key:l})):(i.length>0?i[i.length-1].children:s).push(e.createElement(t.tagName,{...nt(r),key:l,suppressHydrationWarning:!0}))}else if("tag_open"===t.type)i.push({tagName:t.tagName,children:[],attrs:t.attrs,blocked:Ze.has(t.tagName.toLowerCase())});else if("tag_close"===t.type){const t=i.pop();if(t){if(t.blocked)continue;const r=rt(t.attrs||{}),a=r.key,l=null!=a&&""!==a?a:"ms-html-"+o++,c=ot(t.tagName,n)?n[t.tagName]||n[t.tagName.toLowerCase()]:void 0,d=c?e.createElement(c,{...r,key:l},...t.children):e.createElement(t.tagName,{...nt(r),key:l,suppressHydrationWarning:!0},...t.children);i.length>0?i[i.length-1].children.push(d):s.push(d)}}for(;i.length>0;){const t=i.pop();if(t.blocked)continue;const r=rt(t.attrs||{}),a=r.key,l=null!=a&&""!==a?a:"ms-html-"+o++,c=ot(t.tagName,n)?n[t.tagName]||n[t.tagName.toLowerCase()]:void 0,d=c?e.createElement(c,{...r,key:l},...t.children):e.createElement(t.tagName,{...nt(r),key:l,suppressHydrationWarning:!0},...t.children);s.push(d)}return s}catch{return null}}(o.content,y):null,[y,o.content,b]);/* @__PURE__ */
48
- return C.jsx("div",{ref:m,className:"html-block-node",...k,children:p?b&&j?/* @__PURE__ */C.jsx(C.Fragment,{children:j}):/* @__PURE__ */C.jsx("div",{dangerouslySetInnerHTML:{__html:null!=g?g:""}}):/* @__PURE__ */C.jsx("div",{className:"html-block-node__placeholder",children:null!=a?a:/* @__PURE__ */C.jsxs(C.Fragment,{children:[
49
- /* @__PURE__ */C.jsx("span",{className:"html-block-node__placeholder-bar"}),
50
- /* @__PURE__ */C.jsx("span",{className:"html-block-node__placeholder-bar w-4/5"}),
51
- /* @__PURE__ */C.jsx("span",{className:"html-block-node__placeholder-bar w-2/3"})]})})})}const st=/* @__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"]),at=/* @__PURE__ */new Set(["script"]),lt=/* @__PURE__ */new Set(["href","src","srcset","xlink:href","formaction"]),ct=(()=>{try{return Boolean(!1)}catch{}return!1})();function dt(e){ct&&console.warn(e)}function ut(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 mt=/* @__PURE__ */new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ht=/* @__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 pt(e){return e.startsWith("--")?e:e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function ft(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=pt(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 gt(e,t){const n=e.toLowerCase();return!ht.has(n)&&(Object.prototype.hasOwnProperty.call(t,n)||Object.prototype.hasOwnProperty.call(t,e))}function xt(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 wt(e){return e.trim().length>0}function vt(t,n,r,o,i){if(at.has(t.toLowerCase()))return null;const s=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=n.toLowerCase();st.has(e)||lt.has(e)&&r&&ut(r)||(t[n]=r)}return t}(n),a=s.key,l=null!=a&&""!==a?a:i;if(gt(t,o)){const n=o[t]||o[t.toLowerCase()],i=function(e){const t={};for(const[n,r]of Object.entries(e))t[n]=xt(r,n);return t}(s);return e.createElement(n,{...i,key:l},...r)}return e.createElement(t,{...ft(s),key:l},...r)}function yt(t){const{node:r,customId:o}=t,a=i(null),[l,c]=n(!1);s(()=>{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(gt(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){let n=0;const r=[],o=[];for(const i of e)if("text"===i.type)(r.length>0?r[r.length-1].children:o).push(i.content);else if("self_closing"===i.type){const e=vt(i.tagName,i.attrs||{},[],t,"ms-html-"+n++),s=r.length>0?r[r.length-1].children:o;null!=e&&s.push(e)}else if("tag_open"===i.type)r.push({tagName:i.tagName,children:[],attrs:i.attrs});else if("tag_close"===i.type){const e=i.tagName.toLowerCase();let s=-1;for(let t=r.length-1;t>=0;t--)if(r[t].tagName.toLowerCase()===e){s=t;break}if(-1!==s)for(;r.length>s;){const i=r.pop(),a=vt(i.tagName,i.attrs||{},i.children,t,"ms-html-"+n++);r.length>0?null!=a&&r[r.length-1].children.push(a):null!=a&&o.push(a),i.tagName.toLowerCase()!==e&&r.length>s&&dt(`Auto-closing unclosed tag: <${i.tagName}>`)}else dt(`Ignoring closing tag with no matching opening tag: </${i.tagName}>`)}for(;r.length>0;){const e=r.pop(),i=vt(e.tagName,e.attrs||{},e.children,t,"ms-html-"+n++);null!=i&&o.push(i),dt(`Auto-closing unclosed tag: <${e.tagName}>`)}return o}(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 s=e.indexOf("<",i);if(-1===s){if(i<e.length){const t=e.slice(i);wt(t)&&o.push({type:"text",content:t})}break}if(s>i){const t=e.slice(i,s);wt(t)&&o.push({type:"text",content:t})}if(e.startsWith("![CDATA[",s+1)){const t=e.indexOf("]]>",s);if(-1!==t){o.push({type:"text",content:e.slice(s,t+3)}),i=t+3;continue}break}if(e.startsWith("!",s+1)){const t=e.indexOf(">",s);if(-1!==t){i=t+1;continue}break}const a=e.indexOf(">",s);if(-1===a)break;const l=e.slice(s+1,a).trim(),c=l.startsWith("/"),d=l.endsWith("/");if(c){const e=l.slice(1).trim();o.push({type:"tag_close",tagName:e})}else{const e=l.indexOf(" ");let i,s="";-1===e?i=d?l.slice(0,-1).trim():l.trim():(i=l.slice(0,e).trim(),s=l.slice(e+1));const a={};if(s){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let o;for(;null!==(o=e.exec(s));){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||mt.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,ct&&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 s(()=>{var e;if(!l||!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,l]),r.loading&&!r.autoClosed?/* @__PURE__ */C.jsx("span",{className:"html-inline-node html-inline-node--loading",children:r.content}):"dynamic"===u.mode?/* @__PURE__ */C.jsx("span",{className:"html-inline-node",style:{display:"inline"},children:u.nodes}):/* @__PURE__ */C.jsx("span",{ref:a,className:"html-inline-node",style:{display:"inline"}})}const kt={fallbackSrc:"",showCaption:!1,lazy:!0,svgMinHeight:"12rem",usePlaceholder:!0};function bt(e){var r,o,a,l,c,d;const u={...kt,...e},m=O(),[h,p]=n(null),f=i(null),[g,x]=n(()=>"undefined"==typeof window||!1===u.lazy),[w,v]=n(!1),[y,k]=n(!1),[b,j]=n(!1);s(()=>{var e;if(!u.lazy)return;const t=h;if(null==(e=f.current)||e.destroy(),f.current=null,!t)return void x(!1);const n=m(t,{rootMargin:"400px"});return f.current=n,n.isVisible()&&x(!0),n.whenVisible.then(()=>x(!0)).catch(()=>{}),()=>{n.destroy(),f.current=null}},[h,m,u.lazy]),s(()=>()=>{var e;null==(e=f.current)||e.destroy(),f.current=null},[]);const M=t(()=>y&&u.fallbackSrc?u.fallbackSrc:u.node.src,[y,u.fallbackSrc,u.node.src]);s(()=>{v(!1),k(!1)},[M]),s(()=>{j(!1)},[u.node.src]);const N=t(()=>/\.svg(?:\?|$)/i.test(String(M)),[M]),S=!u.lazy||g,L=N?{minHeight:u.svgMinHeight,width:"100%"}:{minHeight:"6rem"};/* @__PURE__ */
52
- return C.jsxs("figure",{ref:p,className:"image-node",children:[
53
- /* @__PURE__ */C.jsx("div",{className:"image-node__inner",children:u.node.loading||y||!S?y?/* @__PURE__ */C.jsxs("div",{className:"image-node__error",children:[
54
- /* @__PURE__ */C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24","aria-hidden":"true",children:/* @__PURE__ */C.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
- /* @__PURE__ */C.jsx("span",{className:"image-node__placeholder-text",children:"Image failed to load"})]}):/* @__PURE__ */C.jsx("div",{className:"image-node__placeholder",style:L,children:u.usePlaceholder?/* @__PURE__ */C.jsxs(C.Fragment,{children:[
56
- /* @__PURE__ */C.jsx("span",{className:"image-node__spinner","aria-hidden":"true"}),
57
- /* @__PURE__ */C.jsx("span",{className:"image-node__placeholder-text",children:"Loading image..."})]}):/* @__PURE__ */C.jsx("span",{className:"image-node__placeholder-text",children:null!=(d=u.node.raw)?d:"Loading image…"})},"placeholder"):/* @__PURE__ */C.jsx("img",{src:M,alt:String(null!=(o=null!=(r=u.node.alt)?r:u.node.title)?o:""),title:String(null!=(l=null!=(a=u.node.title)?a:u.node.alt)?l:""),className:"image-node__img"+(w?" is-loaded":""),style:N?{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&&!b?(j(!0),k(!0)):(k(!0),null==(e=u.onError)||e.call(u,u.node.src))},onLoad:()=>{var e;v(!0),k(!1),null==(e=u.onLoad)||e.call(u,M)},onClick:e=>{var t;e.preventDefault(),w&&!y&&(null==(t=u.onClick)||t.call(u,[e,M]))}},"image")}),u.showCaption&&u.node.alt&&/* @__PURE__ */C.jsx("figcaption",{className:"image-node__caption",children:u.node.alt})]})}let jt=null,Ct=null;const Mt=/* @__PURE__ */C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 291 300",fill:"none",className:"w-4 h-4 flex-shrink-0",xmlns:"http://www.w3.org/2000/svg",children:/* @__PURE__ */C.jsxs("g",{children:[
58
- /* @__PURE__ */C.jsx("path",{d:"M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.69C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z",fill:"#FF6376"}),
59
- /* @__PURE__ */C.jsx("path",{d:"M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z",fill:"#FFCCCC"}),
60
- /* @__PURE__ */C.jsx("path",{d:"M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z",fill:"#FF939F"}),
61
- /* @__PURE__ */C.jsx("path",{d:"M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z",fill:"#FF356A"}),
62
- /* @__PURE__ */C.jsx("path",{d:"M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z",fill:"#FF6376"})]})}),Nt={maxHeight:"500px",loading:!0,showHeader:!0,showCopyButton:!0,showCollapseButton:!0,showModeToggle:!0,showExportButton:!0,showFullscreenButton:!0,showZoomControls:!0};function St(e){const t={...Nt,...e},{t:r}=Y(),[o,l]=n(!1),[c,d]=n(!1),[u,m]=n(!1),[h,p]=n("360px"),[f,g]=n(!1),[w,v]=n(1),[y,k]=n({x:0,y:0}),[b,j]=n(!1),M=i(null),N=i(null),S=i(null),L=i({x:0,y:0}),B=i(null),E=t.node.code,T=a(async()=>{var e,n;try{await(null==(e=navigator.clipboard)?void 0:e.writeText(E)),l(!0),null==(n=t.onCopy)||n.call(t,E),setTimeout(()=>l(!1),1e3)}catch{}},[E,t]),_=a(async()=>{var e,t;if(!M.current)return;const n=M.current;try{const r=await async function(){return Ct||jt||(jt=import("@antv/infographic").then(e=>{const t=e&&e.default?e.default:e;let n=t;return"function"==typeof t&&t.prototype&&t.prototype.render?n=t:e.Infographic?n=e.Infographic:t&&t.Infographic&&(n=t.Infographic),Ct=n,n}).catch(e=>(console.warn("Failed to load @antv/infographic",e),null)),jt)}();if(!r)return void console.warn("Infographic library failed to load.");B.current&&(null==(t=(e=B.current).destroy)||t.call(e),B.current=null),n.innerHTML="";const o=new r({container:n,width:"100%",height:"100%"});B.current=o,o.render(E),setTimeout(()=>{if(n){const e=n.scrollHeight;e>0&&p(`${Math.min(e,800)}px`)}},0)}catch(r){console.error("Failed to render infographic:",r),n.innerHTML=`<div class="text-red-500 p-4">Failed to render infographic: ${r instanceof Error?r.message:"Unknown error"}</div>`}},[E]);s(()=>{u||c||_()},[E,u,c,_]),s(()=>()=>{var e,t;B.current&&(null==(t=(e=B.current).destroy)||t.call(e),B.current=null)},[]);const $=a(()=>{g(!1),N.current&&(N.current.innerHTML=""),S.current=null,document.body.style.overflow=""},[]),D=a(()=>{g(!0),document.body.style.overflow="hidden"},[]);s(()=>{if(!f)return;const e=e=>{"Escape"===e.key&&$()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[f,$]),s(()=>{f&&setTimeout(()=>{if(M.current&&N.current){N.current.innerHTML="";const e=document.createElement("div");Object.assign(e.style,{transition:"transform 0.1s ease",transformOrigin:"center center",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"});const t=M.current.cloneNode(!0);t.classList.add("fullscreen"),t.style.height="auto",e.appendChild(t),N.current.appendChild(e),S.current=e,e.style.transform=`translate(${y.x}px, ${y.y}px) scale(${w})`}},0)},[f]),s(()=>{f&&S.current&&(S.current.style.transform=`translate(${y.x}px, ${y.y}px) scale(${w})`)},[f,y,w]);const O=a(()=>{var e;const t=null==(e=M.current)?void 0:e.querySelector("svg");if(!t)return;const n=(new XMLSerializer).serializeToString(t),r=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=`infographic-${Date.now()}.svg`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)},[]),P=e=>{j(!0);const t="touches"in e?e.touches[0].clientX:e.clientX,n="touches"in e?e.touches[0].clientY:e.clientY;L.current={x:t-y.x,y:n-y.y}},R=e=>{if(!b)return;const t="touches"in e?e.touches[0].clientX:e.clientX,n="touches"in e?e.touches[0].clientY:e.clientY;k({x:t-L.current.x,y:n-L.current.y})},W=()=>j(!1),A=t.isDark?"p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700",I=u||c;/* @__PURE__ */
63
- return C.jsxs(C.Fragment,{children:[
64
- /* @__PURE__ */C.jsxs("div",{className:Xe("my-4 rounded-lg border overflow-hidden shadow-sm",t.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":t.loading}),children:[t.showHeader&&/* @__PURE__ */C.jsxs("div",{className:Xe("flex justify-between items-center px-4 py-2.5 border-b",t.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"),children:[
65
- /* @__PURE__ */C.jsxs("div",{className:"flex items-center gap-x-2 overflow-hidden",children:[Mt,
66
- /* @__PURE__ */C.jsx("span",{className:Xe("text-sm font-medium font-mono truncate",t.isDark?"text-gray-400":"text-gray-600"),children:"Infographic"})]}),t.showModeToggle&&/* @__PURE__ */C.jsxs("div",{className:Xe("flex items-center gap-x-1 rounded-md p-0.5",t.isDark?"bg-gray-700":"bg-gray-100"),children:[
67
- /* @__PURE__ */C.jsx("button",{className:Xe("px-2.5 py-1 text-xs rounded transition-colors",u?t.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":t.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"),onClick:()=>m(!1),onMouseEnter:e=>oe(e.currentTarget,r("common.preview")||"Preview","top",!1,0,t.isDark),onMouseLeave:()=>ie(),children:/* @__PURE__ */C.jsxs("div",{className:"flex items-center gap-x-1",children:[
68
- /* @__PURE__ */C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
69
- /* @__PURE__ */C.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"}),
70
- /* @__PURE__ */C.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),
71
- /* @__PURE__ */C.jsx("span",{children:r("common.preview")||"Preview"})]})}),
72
- /* @__PURE__ */C.jsx("button",{className:Xe("px-2.5 py-1 text-xs rounded transition-colors",u?t.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":t.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"),onClick:()=>m(!0),onMouseEnter:e=>oe(e.currentTarget,r("common.source")||"Source","top",!1,0,t.isDark),onMouseLeave:()=>ie(),children:/* @__PURE__ */C.jsxs("div",{className:"flex items-center gap-x-1",children:[
73
- /* @__PURE__ */C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})}),
74
- /* @__PURE__ */C.jsx("span",{children:r("common.source")||"Source"})]})})]}),
75
- /* @__PURE__ */C.jsxs("div",{className:"flex items-center gap-x-1",children:[t.showCollapseButton&&/* @__PURE__ */C.jsx("button",{className:A,onClick:()=>d(!c),onMouseEnter:e=>oe(e.currentTarget,c?r("common.expand")||"Expand":r("common.collapse")||"Collapse","top",!1,0,t.isDark),onMouseLeave:()=>ie(),children:/* @__PURE__ */C.jsx("svg",{style:{rotate:c?"0deg":"90deg"},xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m9 18l6-6l-6-6"})})}),t.showCopyButton&&/* @__PURE__ */C.jsx("button",{className:A,onClick:T,onMouseEnter:e=>oe(e.currentTarget,o?r("common.copied")||"Copied":r("common.copy")||"Copy","top",!1,0,t.isDark),onMouseLeave:()=>ie(),children:o?/* @__PURE__ */C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20 6L9 17l-5-5"})}):/* @__PURE__ */C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
76
- /* @__PURE__ */C.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),
77
- /* @__PURE__ */C.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})})}),t.showExportButton&&/* @__PURE__ */C.jsx("button",{className:Xe(A,I&&"opacity-50 cursor-not-allowed"),disabled:I,onClick:O,onMouseEnter:e=>oe(e.currentTarget,r("common.export")||"Export","top",!1,0,t.isDark),onMouseLeave:()=>ie(),children:/* @__PURE__ */C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:"w-3 h-3",children:/* @__PURE__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
78
- /* @__PURE__ */C.jsx("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),
79
- /* @__PURE__ */C.jsx("path",{d:"m7 10l5 5l5-5"})]})})}),t.showFullscreenButton&&/* @__PURE__ */C.jsx("button",{className:Xe(A,I&&"opacity-50 cursor-not-allowed"),disabled:I,onClick:D,onMouseEnter:e=>oe(e.currentTarget,f?r("common.minimize")||"Minimize":r("common.open")||"Open","top",!1,0,t.isDark),onMouseLeave:()=>ie(),children:f?/* @__PURE__ */C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24",children:/* @__PURE__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"})}):/* @__PURE__ */C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24",children:/* @__PURE__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"})})})]})]}),!c&&/* @__PURE__ */C.jsx("div",{children:u?/* @__PURE__ */C.jsx("div",{className:Xe("p-4",t.isDark?"bg-gray-900":"bg-gray-50"),children:/* @__PURE__ */C.jsx("pre",{className:Xe("text-sm font-mono whitespace-pre-wrap",t.isDark?"text-gray-300":"text-gray-700"),children:E})}):/* @__PURE__ */C.jsxs("div",{className:"relative",children:[t.showZoomControls&&/* @__PURE__ */C.jsx("div",{className:"absolute top-2 right-2 z-10 rounded-lg",children:/* @__PURE__ */C.jsxs("div",{className:"flex items-center gap-2 backdrop-blur rounded-lg",children:[
80
- /* @__PURE__ */C.jsx("button",{className:Xe("p-2 text-xs rounded transition-colors",t.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"),onClick:()=>v(Math.min(w+.1,3)),children:"+"}),
81
- /* @__PURE__ */C.jsx("button",{className:Xe("p-2 text-xs rounded transition-colors",t.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"),onClick:()=>v(Math.max(w-.1,.5)),children:"-"}),
82
- /* @__PURE__ */C.jsxs("button",{className:Xe("p-2 text-xs rounded transition-colors",t.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"),onClick:()=>{v(1),k({x:0,y:0})},children:[Math.round(100*w),"%"]})]})}),
83
- /* @__PURE__ */C.jsx("div",{className:Xe("min-h-[360px] relative transition-all duration-100 overflow-hidden block",t.isDark?"bg-gray-900":"bg-gray-50"),style:{height:h},onMouseDown:P,onMouseMove:R,onMouseUp:W,onMouseLeave:W,onTouchStart:P,onTouchMove:R,onTouchEnd:W,children:/* @__PURE__ */C.jsx("div",{className:Xe("absolute inset-0 cursor-grab",b&&"cursor-grabbing"),style:{transform:`translate(${y.x}px, ${y.y}px) scale(${w})`},children:/* @__PURE__ */C.jsx("div",{ref:M,className:"w-full text-center flex items-center justify-center min-h-full"})})})]})})]}),f&&"undefined"!=typeof document&&x(
84
- /* @__PURE__ */C.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:$,role:"dialog","aria-modal":"true",children:/* @__PURE__ */C.jsxs("div",{className:Xe("dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",t.isDark?"bg-gray-900":"bg-white"),onClick:e=>e.stopPropagation(),children:[
85
- /* @__PURE__ */C.jsxs("div",{className:"absolute top-6 right-6 z-50 flex items-center gap-2",children:[
86
- /* @__PURE__ */C.jsx("button",{className:Xe("p-2 text-xs rounded transition-colors",t.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"),onClick:()=>v(Math.min(w+.1,3)),children:"+"}),
87
- /* @__PURE__ */C.jsx("button",{className:Xe("p-2 text-xs rounded transition-colors",t.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"),onClick:()=>v(Math.max(w-.1,.5)),children:"-"}),
88
- /* @__PURE__ */C.jsxs("button",{className:Xe("p-2 text-xs rounded transition-colors",t.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"),onClick:()=>{v(1),k({x:0,y:0})},children:[Math.round(100*w),"%"]}),
89
- /* @__PURE__ */C.jsx("button",{className:Xe("inline-flex items-center justify-center p-2 rounded transition-colors",t.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"),onClick:$,children:"X"})]}),
90
- /* @__PURE__ */C.jsx("div",{ref:N,className:Xe("w-full h-full flex items-center justify-center p-4 overflow-hidden",!b&&"cursor-grab",b&&"cursor-grabbing"),onMouseDown:P,onMouseMove:R,onMouseUp:W,onMouseLeave:W,onTouchStart:P,onTouchMove:R,onTouchEnd:W})]})}),document.body)]})}function Lt(e){const{node:t}=e;/* @__PURE__ */
91
- return C.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 Bt(e){/* @__PURE__ */
92
- return C.jsx("ins",{className:"insert-node",children:e.children})}function Et(e){var n,r,o,i,s;const{node:l,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,s;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!=(s=e.animationIteration)?s:"infinite"}},[e.animationDuration,e.animationIteration,e.animationOpacity,e.animationTiming,e.color,e.underlineBottom,e.underlineHeight]),f=String(null!=(o=null!=(r=l.title)?r:l.href)?o:""),g=a(e=>{m&&oe(e.currentTarget,String(l.title||l.href||l.text||""),"top",!1,(e.clientX,e.clientY),h)},[h,l.href,l.text,l.title,m]),x=a(()=>{m&&ie()},[m]);return l.loading?/* @__PURE__ */C.jsx("span",{className:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":"false",style:p,children:/* @__PURE__ */C.jsxs("span",{className:"link-text-wrapper relative inline-flex",children:[
93
- /* @__PURE__ */C.jsx("span",{className:"leading-[normal] link-text",children:/* @__PURE__ */C.jsx("span",{className:"leading-[normal] link-text",children:null!=(i=l.text)?i:""})}),
94
- /* @__PURE__ */C.jsx("span",{className:"underline-anim","aria-hidden":"true"})]})}):/* @__PURE__ */C.jsx("a",{className:"link-node",href:l.href,title:m?"":f,"aria-label":`Link: ${f}`,target:"_blank",rel:"noopener noreferrer",style:p,onMouseEnter:g,onMouseLeave:x,children:c&&d?S(l.children,c,String(null!=u?u:"link"),d):null!=(s=l.text)?s:null})}function Tt(e){const{node:t,ctx:n,renderNode:r,value:o,indexKey:i,children:s}=e,a=null==o?void 0:o;/* @__PURE__ */
95
- return C.jsx("li",{className:"list-item pl-1.5 my-2",dir:"auto",value:a,children:null!=s?s:n&&r?S(t.children,n,String(null!=i?i:"list-item"),r):null})}function _t(e){var t;const{node:n,ctx:r,renderNode:o,indexKey:i}=e,s=n.ordered?"ol":"ul",a=n.ordered&&n.start?n.start:void 0;/* @__PURE__ */
96
- return C.jsx(s,{className:Xe("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 s;/* @__PURE__ */
97
- return C.jsx(Tt,{node:e,value:n.ordered?(null!=(s=n.start)?s:1)+t:void 0,ctx:r,renderNode:o,indexKey:`${String(null!=i?i:"list")}-${t}`},`${String(null!=i?i:"list")}-${t}`)})})}let $t=null,Dt=null,Ot=!1;const Pt=/* @__PURE__ */new Map,Rt=/* @__PURE__ */new Map;let Wt=5;const At=/* @__PURE__ */new Set;function It(){if(Pt.size<Wt&&At.size){const e=Array.from(At);At.clear();for(const t of e)try{t()}catch{}}}function Ft(e){$t=e,Dt=null,$t.onmessage=e=>{const{id:t,html:n,error:r}=e.data,o=Pt.get(t);if(o)if(Pt.delete(t),clearTimeout(o.timeoutId),It(),r)o.reject(new Error(r));else{const{content:t,displayMode:r}=e.data;if(t){const e=`${r?"d":"i"}:${t}`;if(Rt.set(e,n),Rt.size>200){const e=Rt.keys().next().value;Rt.delete(e)}}o.resolve(n)}},$t.onerror=e=>{console.error("[katexWorkerClient] Worker error:",e);for(const[t,n]of Pt.entries())clearTimeout(n.timeoutId),n.reject(new Error(`Worker error: ${e.message}`));Pt.clear(),It()}}function zt(){var e;$t&&(null==(e=$t.terminate)||e.call($t)),$t=null,Dt=null}function Ht(e){Ot=!!e,$t&&$t.postMessage({type:"init",debug:Ot})}const Vt="WORKER_BUSY";async function Kt(e,t=!0,n=2e3,r){if(performance.now(),Dt)return Promise.reject(Dt);const o=`${t?"d":"i"}:${e}`,i=Rt.get(o);if(i)return Promise.resolve(i);const s=$t||(Dt=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Dt.name="WORKER_INIT_ERROR",Dt.code="WORKER_INIT_ERROR",null);if(!s)return Promise.reject(Dt);if(Pt.size>=Wt){const e=new Error("Worker busy");return e.name="WorkerBusy",e.code=Vt,e.busy=!0,e.inFlight=Pt.size,e.max=Wt,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),l=setTimeout(()=>{Pt.delete(a);const e=new Error("Worker render timed out");e.name="WorkerTimeout",e.code="WORKER_TIMEOUT",i(e),It()},n),c=()=>{},d=()=>{Pt.delete(a),clearTimeout(l),At.delete(c);const e=new Error("Aborted");e.name="AbortError",i(e),It()};r&&r.addEventListener("abort",d,{once:!0}),Pt.set(a,{resolve:e=>{r&&r.removeEventListener("abort",d),o(e)},reject:e=>{r&&r.removeEventListener("abort",d),i(e)},timeoutId:l});try{s.postMessage({id:a,content:e,displayMode:t,debug:Ot})}catch(u){Pt.delete(a),clearTimeout(l),r&&r.removeEventListener("abort",d),i(u),It()}})}function Xt(e,t,n){const r=`${t?"d":"i"}:${e}`;if(Rt.set(r,n),Rt.size>200){const e=Rt.keys().next().value;Rt.delete(e)}}function Ut(){Rt.clear()}function qt(e){Wt=Math.max(1,Math.floor(e)),It()}function Yt(e=1500,t){return Pt.size<Wt?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(){At.delete(s),null!=o&&clearTimeout(o),t&&t.removeEventListener("abort",a)}function s(){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}),At.add(s)})}const Zt={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function Jt(e){null!=e.timeout&&(Zt.timeout=Math.max(0,Math.floor(e.timeout))),null!=e.waitTimeout&&(Zt.waitTimeout=Math.max(0,Math.floor(e.waitTimeout))),null!=e.backoffMs&&(Zt.backoffMs=Math.max(0,Math.floor(e.backoffMs))),null!=e.maxRetries&&(Zt.maxRetries=Math.max(0,Math.floor(e.maxRetries)))}function Gt(){return{...Zt}}async function Qt(e,t=!0,n={}){var r,o,i,s;const a=null!=(r=n.timeout)?r:Zt.timeout,l=null!=(o=n.waitTimeout)?o:Zt.waitTimeout,c=null!=(i=n.backoffMs)?i:Zt.backoffMs,d=null!=(s=n.maxRetries)?s:Zt.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 Kt(e,t,a,u)}catch(h){if((null==h?void 0:h.code)!==Vt||m>=d)throw h;if(m++,await Yt(l,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 en=null,tn=!1;async function nn(){if(en)return en;if(tn)return null;try{return en=await import("katex"),await import("katex/contrib/mhchem"),en}catch{return tn=!0,null}}function rn({node:e}){const t=i(null),[r,o]=n(!0),a=i(0);return s(()=>{var n;let r=!1;const i=new AbortController,s=++a.current,l=null!=(n=e.content)?n:"";return l?(Qt(l,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:i.signal}).then(e=>{r||s!==a.current||(t.current&&(t.current.innerHTML=e),o(!1))}).catch(async n=>{if(r||s!==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===Vt||"WORKER_TIMEOUT"===i){const n=await nn();if(n)try{const i=n.renderToString(l,{throwOnError:e.loading,displayMode:!0});return void(!r&&s===a.current&&t.current&&(t.current.innerHTML=i,o(!1),Xt(l,!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__ */C.jsx("div",{className:"math-block text-center overflow-x-auto relative min-h-[40px]",children:/* @__PURE__ */C.jsx("div",{ref:t,className:r?"math-rendering":void 0})})}function on({node:e}){const t=i(null),r=i(null),[o,a]=n(!0),l=i(0);return s(()=>{var t;let n=!1;const o=new AbortController,i=++l.current,s=null!=(t=e.content)?t:"";return s?(Qt(s,!1,{timeout:1500,waitTimeout:0,maxRetries:0,signal:o.signal}).then(e=>{n||i!==l.current||r.current&&(r.current.innerHTML=e,a(!1))}).catch(async t=>{if(n||i!==l.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===Vt||"WORKER_TIMEOUT"===o){const t=await nn();if(t)try{const o=t.renderToString(s,{throwOnError:e.loading,displayMode:!1});return void(!n&&i===l.current&&r.current&&(r.current.innerHTML=o,a(!1),Xt(s,!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__ */C.jsxs("span",{ref:t,className:"math-inline-wrapper",children:[
98
- /* @__PURE__ */C.jsx("span",{ref:r,className:"math-inline"+(o?" math-inline--hidden":"")}),o&&/* @__PURE__ */C.jsxs("span",{className:"math-inline__loading",role:"status","aria-live":"polite",children:[
99
- /* @__PURE__ */C.jsx("span",{className:"math-inline__spinner","aria-hidden":"true"}),
100
- /* @__PURE__ */C.jsx("span",{className:"sr-only",children:"Loading"})]})]})}let sn=null,an=null;const ln=/* @__PURE__ */new Map;let cn=5,dn=!1;function un(e){dn=!!e}function mn(e){Number.isFinite(e)&&e>0&&(cn=Math.floor(e))}function hn(){return{inFlight:ln.size,max:cn}}const pn="WORKER_BUSY";function fn(e){sn=e,an=null;const t=e;sn.onmessage=e=>{if(sn!==t)return;const{id:n,ok:r,result:o,error:i}=e.data,s=ln.get(n);s&&(!1===r||i?s.reject(new Error(i||"Unknown error")):s.resolve(o))},sn.onerror=e=>{var n,r;if(sn===t)if(0!==ln.size){try{dn?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 ln.entries())n.reject(new Error(`Worker error: ${e.message}`));ln.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker error (no pending):",(null==e?void 0:e.message)||e)},sn.onmessageerror=e=>{var n,r;if(sn===t)if(0!==ln.size){try{dn?console.error("[mermaidWorkerClient] Worker messageerror:",e):null==(r=console.debug)||r.call(console,"[mermaidWorkerClient] Worker messageerror:",e)}catch{}for(const[e,t]of ln.entries())t.reject(new Error("Worker messageerror"));ln.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",e)}}function gn(){var e;if(sn)try{for(const[e,t]of ln.entries())t.reject(new Error("Worker cleared"));ln.clear(),null==(e=sn.terminate)||e.call(sn)}catch{}sn=null,an=null}function xn(e,t,n=1400){if(an)return Promise.reject(an);const r=sn||(an=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),an.name="WORKER_INIT_ERROR",an.code="WORKER_INIT_ERROR",null);if(!r)return Promise.reject(an);if(ln.size>=cn){const e=new Error("Worker busy");return e.name="WorkerBusy",e.code=pn,e.inFlight=ln.size,e.max=cn,Promise.reject(e)}return new Promise((o,i)=>{const s=Math.random().toString(36).slice(2);let a=!1,l=null;const c=()=>{a||(a=!0,null!=l&&clearTimeout(l),ln.delete(s))},d={resolve:e=>{c(),o(e)},reject:e=>{c(),i(e)}};ln.set(s,d);try{r.postMessage({id:s,action:e,payload:t})}catch(u){return ln.delete(s),void i(u)}l=setTimeout(()=>{const e=new Error("Worker call timed out");e.name="WorkerTimeout",e.code="WORKER_TIMEOUT";const t=ln.get(s);null==t||t.reject(e)},n)})}async function wn(e,t,n=1400){return xn("canParse",{code:e,theme:t},n)}async function vn(e,t,n=2400){return xn("findPrefix",{code:e,theme:t},n)}function yn(){var e;null==(e=null==sn?void 0:sn.terminate)||e.call(sn),sn=null,an=null,ln.clear()}let kn=null,bn=!1,jn=null,Cn=null;function Mn(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(jn!==r)try{"function"==typeof e.initialize?e.initialize(t):(null==(n=e.mermaidAPI)?void 0:n.initialize)&&e.mermaidAPI.initialize(t),jn=r}catch{}}const Nn="undefined"!=typeof window?c:s,Sn={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},Ln=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],Bn=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function En(e){if(!e)return"";const t=e.trim();return Bn.test(t)?t:""}function Tn(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function _n(e,t,n){if(!e)return"";if(n)return function(e,t){if(!e)return"";Tn(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(Ln.some(e=>e.test(n))){r.removeAttribute(e);continue}}if(("href"===e||"xlink:href"===e)&&t.value){const n=En(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(Tn(e),t)try{e.insertAdjacentHTML("afterbegin",t)}catch{e.innerHTML=t}return e.innerHTML}const $n={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 Dn(e){var r,o,l,c,d,u,m,h,p;const f={...$n,...e},{t:g}=Y(),w=t(()=>ue("mermaid"),[]),v=null!=(o=null==(r=f.node)?void 0:r.code)?o:"",y=t(()=>v.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"),[v]),k=null!=(l=f.workerTimeoutMs)?l:$n.workerTimeoutMs,b=null!=(c=f.parseTimeoutMs)?c:$n.parseTimeoutMs,j=null!=(d=f.renderTimeoutMs)?d:$n.renderTimeoutMs,M=null!=(u=f.fullRenderTimeoutMs)?u:$n.fullRenderTimeoutMs,[N,S]=n(!1),[L,B]=n(!1),[E,T]=n(!1),[_,$]=n(!1),[D,P]=n(1),[R,W]=n({x:0,y:0}),[A,I]=n(!1),[F,z]=n(!1),[H,V]=n(!1),[K,X]=n(null),[U,q]=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),se=i(null),ae=i(null),le=i(null),ce=i({x:0,y:0}),de=i(0),me=i({}),he=i(""),pe=i(!1),fe=i(null),ge=i(!1),xe=i({zoom:1,translateX:0,translateY:0,containerHeight:Z||"360px"}),we=O(),ve=Boolean(null!=(h=null==(m=f.node)?void 0:m.loading)?h:f.loading),ye=f.isDark?"dark":"light",ke=Boolean(f.isStrict),be=t(()=>ke?{startOnLoad:!1,securityLevel:"strict",dompurifyConfig:Sn,flowchart:{htmlLabels:!1}}:{startOnLoad:!1,securityLevel:"loose"},[ke]);s(()=>{ge.current=H},[H]),s(()=>{me.current={}},[ye,y,ke]),s(()=>{let e=!1;return(async()=>{const t=await async function(e){if(kn)return Mn(kn,e),kn;if(Cn){const t=await Cn;return t&&Mn(t,e),t}if(bn)return null;try{bn=!0,Cn=(async()=>{try{const t=await import("mermaid"),n=(null==t?void 0:t.default)||t;if(kn=(null==n?void 0:n.default)?n.default:(null==n?void 0:n.mermaidAPI)?n:(null==n?void 0:n.mermaid)?n.mermaid:n,!kn)throw new Error("Mermaid module did not export expected API");return Mn(kn,null!=e?e:{startOnLoad:!1,securityLevel:"loose"}),kn}catch(t){return console.warn("[markstream-react] Failed to load mermaid:",t),null}finally{Cn=null}})();const t=await Cn;return t&&Mn(t,e),t}catch{return null}}(be);e||(ee.current=t,S(Boolean(t)),pe.current||B(!t))})(),()=>{e=!0}},[be]),s(()=>{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]),s(()=>{if("undefined"==typeof document)return;if(!U)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[U]);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 s=r.getAttribute("viewBox");if(s){const e=s.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),l=Number.isFinite(a)&&a>0?a:i;J(`${Math.min(l,i)}px`)},[]);s(()=>{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]),s(()=>()=>{yn()},[]);const Ce=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=Pn(e,t),s=await Wn(()=>ee.current.render(o,i),{timeoutMs:M,signal:n});if(!(null==s?void 0:s.svg))return!1;const a=_n(re.current,s.svg,ke);return null==(r=s.bindFunctions)||r.call(s,re.current),je(),me.current[t]=a,V(!0),X(null),!0}catch(o){return ve||X(o instanceof Error?o.message:String(o)),!1}finally{z(!1)}},[M,ve,ke,je]),Me=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=Pn(Rn(e)||e,t),s=await Wn(()=>ee.current.render(o,i),{timeoutMs:j,signal:n});(null==s?void 0:s.svg)&&(_n(re.current,s.svg,ke),null==(r=s.bindFunctions)||r.call(s,re.current),je())}catch{}finally{z(!1)}}},[j,ve,ke,je]),Ne=a(async(e,t)=>{if(!e.trim())return Tn(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 wn(e,t,n.workerTimeout))return!0}catch(s){if("AbortError"===(null==s?void 0:s.name))throw s}if(!n.mermaid)throw new Error("Mermaid not available");const r=Pn(e,t),o=n.mermaid;if("function"==typeof o.parse)return await Wn(()=>o.parse(r),{timeoutMs:n.parseTimeout,signal:n.signal}),!0;const i=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return await Wn(()=>o.render(i,r),{timeoutMs:n.parseTimeout,signal:n.signal}),!0}(e,ye,{workerTimeout:k,parseTimeout:b,mermaid:ee.current,signal:t}),(null==t?void 0:t.aborted)||de.current!==r)return;return void(await Ce(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 vn(e,t,n.workerTimeout);if(r)return r}catch(o){if("AbortError"===(null==o?void 0:o.name))throw o}return Rn(e)}(e,ye,{workerTimeout:k,signal:t});if(!n||(null==t?void 0:t.aborted)||de.current!==r)return;await Me(n,ye,t)}catch{}},[b,Ce,Me,ye,k]);s(()=>{if(!G||L||E)return;const e=new AbortController;return Ne(y,e.signal),()=>e.abort()},[y,E,Ne,L,G]);const Se=a((e,t)=>{e.clientX,e.clientY,oe(e.currentTarget,t,"top",!1,0,f.isDark)},[f.isDark]),Le=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]),Be=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=An(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:An(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]),Ee=a(()=>{le.current=null,Tn(ae.current)},[]),Te=a(()=>{q(!1),Ee()},[Ee]),_e=a(()=>{var e,t,n;const r=null!=(t=null==(e=re.current)?void 0:e.querySelector("svg"))?t:null,o=r?An(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||q(!0)},[f]);s(()=>{if(!U)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,U]),Nn(()=>{if(!U)return;const e=ae.current,t=te.current;if(!e||!t)return;const n=`translate(${R.x}px, ${R.y}px) scale(${D})`,r=t.cloneNode(!0);r.classList.add("fullscreen");const o=r.querySelector("[data-mermaid-wrapper]");o&&(le.current=o,o.style.transform=n),Tn(e),e.appendChild(r)},[U]),s(()=>{U&&le.current&&(le.current.style.transform=`translate(${R.x}px, ${R.y}px) scale(${D})`)},[U,R.x,R.y,D]);const $e=L||F||E,De=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]),Oe=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){B(!1);const e=xe.current;P(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()):Ne(y)}else xe.current={zoom:D,translateX:R.x,translateY:R.y,containerHeight:Z},B(!0)},[y,Z,Ne,f,ye,R.x,R.y,je,D]),Pe=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-R.x,o=e.clientY-n.top-R.y,i=.01*-e.deltaY,s=On(D+i,.5,3);if(s===D)return;const a=s/D;W({x:R.x-r*(a-1),y:R.y-o*(a-1)}),P(s)},[R,D]),Re=a((e,t)=>{I(!0),ce.current={x:e-R.x,y:t-R.y}},[R.x,R.y]),We=a((e,t)=>{A&&W({x:e-ce.current.x,y:t-ce.current.y})},[A]),Ae=a(()=>{I(!1)},[]),Ie=/* @__PURE__ */C.jsxs("div",{className:"relative",children:[f.showZoomControls&&/* @__PURE__ */C.jsx("div",{className:"absolute top-2 right-2 z-10 rounded-lg",children:/* @__PURE__ */C.jsxs("div",{className:"flex items-center gap-2 backdrop-blur rounded-lg",children:[
101
- /* @__PURE__ */C.jsx("button",{type:"button",className:Xe("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:()=>P(On(D+.1,.5,3)),children:"+"}),
102
- /* @__PURE__ */C.jsx("button",{type:"button",className:Xe("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:()=>P(On(D-.1,.5,3)),children:"−"}),
103
- /* @__PURE__ */C.jsxs("button",{type:"button",className:Xe("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:()=>{P(1),W({x:0,y:0})},children:[Math.round(100*D),"%"]})]})}),
104
- /* @__PURE__ */C.jsxs("div",{ref:te,className:Xe("min-h-[360px] relative transition-all duration-100 overflow-hidden block",f.isDark?"bg-gray-900":"bg-gray-50"),style:{height:Z,maxHeight:null!=(p=f.maxHeight)?p:void 0},onWheel:Pe,onMouseDown:e=>{0===e.button&&(e.preventDefault(),Re(e.clientX,e.clientY))},onMouseMove:e=>We(e.clientX,e.clientY),onMouseUp:Ae,onMouseLeave:Ae,onTouchStart:e=>{const t=e.touches[0];t&&Re(t.clientX,t.clientY)},onTouchMove:e=>{const t=e.touches[0];t&&We(t.clientX,t.clientY)},onTouchEnd:Ae,children:[
105
- /* @__PURE__ */C.jsx("div",{ref:ne,"data-mermaid-wrapper":!0,className:Xe("absolute inset-0 cursor-grab",{"cursor-grabbing":A}),style:{transform:`translate(${R.x}px, ${R.y}px) scale(${D})`},children:/* @__PURE__ */C.jsx("div",{ref:re,className:"_mermaid w-full text-center flex items-center justify-center min-h-full"})}),(F||ve)&&/* @__PURE__ */C.jsxs("div",{className:"mermaid-loading",children:[
106
- /* @__PURE__ */C.jsx("span",{className:"mermaid-spinner"}),
107
- /* @__PURE__ */C.jsx("span",{children:"Rendering diagram…"})]})]})]}),Fe=f.showHeader&&/* @__PURE__ */C.jsxs("div",{className:Xe("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:[
108
- /* @__PURE__ */C.jsxs("div",{className:"flex items-center space-x-2 overflow-hidden",children:[
109
- /* @__PURE__ */C.jsx("span",{className:"icon-slot h-4 w-4 flex-shrink-0",dangerouslySetInnerHTML:{__html:w}}),
110
- /* @__PURE__ */C.jsx("span",{className:Xe("text-sm font-medium font-mono truncate",f.isDark?"text-gray-400":"text-gray-600"),children:"Mermaid"})]}),f.showModeToggle&&N&&/* @__PURE__ */C.jsxs("div",{className:Xe("flex items-center space-x-1 rounded-md p-0.5",f.isDark?"bg-gray-700":"bg-gray-100"),children:[
111
- /* @__PURE__ */C.jsx("button",{type:"button",className:Xe("px-2.5 py-1 text-xs rounded transition-colors",L?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:()=>Oe("preview"),onMouseEnter:e=>Se(e,g("common.preview")),onFocus:e=>Se(e,g("common.preview")),onMouseLeave:()=>ie(),onBlur:()=>ie(),children:/* @__PURE__ */C.jsxs("div",{className:"flex items-center space-x-1",children:[
112
- /* @__PURE__ */C.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__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
113
- /* @__PURE__ */C.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"}),
114
- /* @__PURE__ */C.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),
115
- /* @__PURE__ */C.jsx("span",{children:g("common.preview")})]})}),
116
- /* @__PURE__ */C.jsx("button",{type:"button",className:Xe("px-2.5 py-1 text-xs rounded transition-colors",L?f.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":f.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"),onClick:()=>Oe("source"),onMouseEnter:e=>Se(e,g("common.source")),onFocus:e=>Se(e,g("common.source")),onMouseLeave:()=>ie(),onBlur:()=>ie(),children:/* @__PURE__ */C.jsxs("div",{className:"flex items-center space-x-1",children:[
117
- /* @__PURE__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})}),
118
- /* @__PURE__ */C.jsx("span",{children:g("common.source")})]})})]}),
119
- /* @__PURE__ */C.jsxs("div",{className:"flex items-center space-x-1",children:[f.showCollapseButton&&/* @__PURE__ */C.jsx("button",{type:"button",className:De,"aria-pressed":E,onClick:()=>T(e=>!e),onMouseEnter:e=>Se(e,g(E?"common.expand":"common.collapse")),onFocus:e=>Se(e,g(E?"common.expand":"common.collapse")),onMouseLeave:()=>ie(),onBlur:()=>ie(),children:/* @__PURE__ */C.jsx("svg",{style:{rotate:E?"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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m9 18l6-6l-6-6"})})}),f.showCopyButton&&/* @__PURE__ */C.jsx("button",{type:"button",className:De,onClick:Le,onMouseEnter:e=>Se(e,g(_?"common.copySuccess":"common.copy")),onFocus:e=>Se(e,g(_?"common.copySuccess":"common.copy")),onMouseLeave:()=>ie(),onBlur:()=>ie(),children:_?/* @__PURE__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20 6L9 17l-5-5"})}):/* @__PURE__ */C.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__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
120
- /* @__PURE__ */C.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),
121
- /* @__PURE__ */C.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})})}),f.showExportButton&&N&&/* @__PURE__ */C.jsx("button",{type:"button",className:Xe(De,$e?"opacity-50 cursor-not-allowed":""),disabled:$e,onClick:Be,onMouseEnter:e=>Se(e,g("common.export")),onFocus:e=>Se(e,g("common.export")),onMouseLeave:()=>ie(),onBlur:()=>ie(),children:/* @__PURE__ */C.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__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
122
- /* @__PURE__ */C.jsx("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),
123
- /* @__PURE__ */C.jsx("path",{d:"m7 10l5 5l5-5"})]})})}),f.showFullscreenButton&&N&&/* @__PURE__ */C.jsx("button",{type:"button",className:Xe(De,$e?"opacity-50 cursor-not-allowed":""),disabled:$e,onClick:U?Te:_e,onMouseEnter:e=>Se(e,g(U?"common.minimize":"common.open")),onFocus:e=>Se(e,g(U?"common.minimize":"common.open")),onMouseLeave:()=>ie(),onBlur:()=>ie(),children:U?/* @__PURE__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"})}):/* @__PURE__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"})})})]})]}),ze=/* @__PURE__ */C.jsxs("div",{children:[L?/* @__PURE__ */C.jsx("div",{className:Xe("p-4",f.isDark?"bg-gray-900 text-gray-300":"bg-gray-50 text-gray-700"),children:/* @__PURE__ */C.jsx("pre",{className:"text-sm font-mono whitespace-pre-wrap",children:y})}):Ie,K&&/* @__PURE__ */C.jsx("div",{className:"mermaid-error",children:K})]});/* @__PURE__ */
124
- return C.jsxs(C.Fragment,{children:[
125
- /* @__PURE__ */C.jsxs("div",{className:Xe("my-4 rounded-lg border overflow-hidden shadow-sm mermaid-block",f.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":ve}),children:[Fe,!E&&/* @__PURE__ */C.jsx("div",{ref:se,children:ze})]}),U&&"undefined"!=typeof document&&x(
126
- /* @__PURE__ */C.jsx("div",{className:"mermaid-modal-overlay",onClick:()=>Te(),children:/* @__PURE__ */C.jsxs("div",{className:Xe("mermaid-modal-panel",{"is-dark":f.isDark}),role:"dialog","aria-modal":"true",onClick:e=>e.stopPropagation(),children:[
127
- /* @__PURE__ */C.jsxs("div",{className:"mermaid-modal-header",children:[
128
- /* @__PURE__ */C.jsx("span",{className:"mermaid-modal-title",children:"Mermaid Preview"}),
129
- /* @__PURE__ */C.jsx("button",{type:"button",className:"mermaid-modal-close",onClick:Te,children:"Close"})]}),
130
- /* @__PURE__ */C.jsx("div",{className:"mermaid-modal-body",children:/* @__PURE__ */C.jsx("div",{ref:ae,className:"mermaid-modal-content"})})]})}),document.body)]})}function On(e,t,n){return Math.min(Math.max(e,t),n)}function Pn(e,t){return e.trimStart().startsWith("%%{")?e:`%%{init: {"theme": "${"dark"===t?"dark":"default"}"}}%%\n${e}`}function Rn(e){const t=e.split("\n");for(;t.length>0;){const e=t[t.length-1].trimEnd();if(""!==e){if(!(/^[-=~>|<\s]+$/.test(e.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(e)||/[-|><]$/.test(e)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(e)))break;t.pop()}else t.pop()}return t.join("\n")}async function Wn(e,t={}){const{timeoutMs:n,signal:r}=t;return(null==r?void 0:r.aborted)?Promise.reject(new DOMException("Aborted","AbortError")):new Promise((t,o)=>{let i=!1,s=null;function a(){i||(i=!0,l(),o(new DOMException("Aborted","AbortError")))}function l(){null!=s&&clearTimeout(s),r&&r.removeEventListener("abort",a)}r&&r.addEventListener("abort",a,{once:!0}),n&&n>0&&(s=setTimeout(()=>{i||(i=!0,l(),o(new Error("Operation timed out")))},n)),e().then(e=>{i||(i=!0,l(),t(e))}).catch(e=>{i||(i=!0,l(),o(e))})})}function An(e){return(new XMLSerializer).serializeToString(e)}function In(e){const{node:t}=e;/* @__PURE__ */
131
- return C.jsxs("div",{className:"unknown-node text-sm text-gray-500 italic",children:["Unsupported node type:"," ",String(null==t?void 0:t.type)]})}function Fn(t){var n;const{node:r,ctx:o,renderNode:i,indexKey:s,children:a}=t;if(!o||!i)/* @__PURE__ */
132
- return C.jsx("p",{dir:"auto",className:"paragraph-node",children:a});const l=null!=(n=r.children)?n:[],c=[],d=[],u=()=>{if(!d.length)return;const e=c.length;c.push(
133
- /* @__PURE__ */C.jsx("p",{dir:"auto",className:"paragraph-node",children:S(d.slice(),o,`${String(null!=s?s:"paragraph")}-${e}`,i)},`${String(null!=s?s:"paragraph")}-inline-${e}`)),d.length=0};return l.forEach((t,n)=>{M.has(t.type)?(u(),c.push(
134
- /* @__PURE__ */C.jsx(e.Fragment,{children:i(t,`${String(null!=s?s:"paragraph")}-block-${n}`,o)},`${String(null!=s?s:"paragraph")}-block-${n}`))):d.push(t)}),u(),c.length?/* @__PURE__ */C.jsx(C.Fragment,{children:c}):/* @__PURE__ */C.jsx("p",{dir:"auto",className:"paragraph-node",children:S(l,o,String(null!=s?s:"paragraph"),i)})}function zn(e){const{node:t}=e,n=a(n=>{var r;null==(r=e.onClick)||r.call(e,n,t.id,e.messageId,e.threadId)},[t.id,e]);/* @__PURE__ */
135
- return C.jsx("span",{className:"reference-node cursor-pointer bg-accent text-xs rounded-md px-1.5 mx-0.5 hover:bg-secondary",role:"button",tabIndex:0,onClick:n,onMouseEnter:n=>{var r;null==(r=e.onMouseEnter)||r.call(e,n,t.id,e.messageId,e.threadId)},onMouseLeave:n=>{var r;null==(r=e.onMouseLeave)||r.call(e,n,t.id,e.messageId,e.threadId)},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||n(e)},children:t.id})}function Hn(e){/* @__PURE__ */
136
- return C.jsx("s",{className:"strikethrough-node",children:e.children})}function Vn(e){/* @__PURE__ */
137
- return C.jsx("strong",{className:"strong-node",children:e.children})}function Kn(e){/* @__PURE__ */
138
- return C.jsx("sub",{className:"subscript-node",children:e.children})}function Xn(e){/* @__PURE__ */
139
- return C.jsx("sup",{className:"superscript-node",children:e.children})}function Un(e){var t;const{node:n,ctx:r,renderNode:o,indexKey:i}=e,s=Array.isArray(null==(t=null==n?void 0:n.header)?void 0:t.cells)?n.header.cells:[],a=Boolean(null==n?void 0:n.loading),l=Array.isArray(null==n?void 0:n.rows)?n.rows:[],c=e=>"right"===e?"text-right":"center"===e?"text-center":"text-left";/* @__PURE__ */
140
- return C.jsxs("div",{className:"table-node-wrapper","data-index-key":i,children:[
141
- /* @__PURE__ */C.jsxs("table",{className:Xe("my-8 text-sm table-node",a&&"table-node--loading"),"aria-busy":a,children:[
142
- /* @__PURE__ */C.jsx("thead",{className:"border-[var(--table-border,#cbd5e1)]",children:/* @__PURE__ */C.jsx("tr",{className:"border-b",children:s.map((e,t)=>/* @__PURE__ */C.jsx("th",{className:Xe("font-semibold p-[calc(4/7*1em)]",c(e.align)),dir:"auto",children:r&&o?L(e.children,r,`${String(null!=i?i:"table")}-th-${t}`,o):null},`header-${t}`))})}),
143
- /* @__PURE__ */C.jsx("tbody",{children:l.map((e,t)=>{var n;/* @__PURE__ */
144
- return C.jsx("tr",{className:Xe("border-[var(--table-border,#cbd5e1)]",t<l.length-1&&"border-b"),children:null==(n=e.cells)?void 0:n.map((e,n)=>/* @__PURE__ */C.jsx("td",{className:Xe("p-[calc(4/7*1em)]",c(e.align)),dir:"auto",children:r&&o?L(e.children,r,`${String(null!=i?i:"table")}-row-${t}-${n}`,o):null},`cell-${t}-${n}`))},`row-${t}`)})})]}),a&&/* @__PURE__ */C.jsxs("div",{className:"table-node__loading",role:"status","aria-live":"polite",children:[
145
- /* @__PURE__ */C.jsx("span",{className:"table-node__spinner","aria-hidden":"true"}),
146
- /* @__PURE__ */C.jsx("span",{className:"sr-only",children:"Loading"})]})]})}function qn(e){const{node:t,children:n}=e;/* @__PURE__ */
147
- return C.jsx("span",{className:Xe("text-node whitespace-pre-wrap break-words",t.center&&"text-node-center"),children:null!=n?n:t.content})}function Yn(){/* @__PURE__ */
148
- return C.jsx("hr",{className:"hr-node thematic-break"})}function Zn(n){const{node:r,ctx:o,renderNode:i,indexKey:s}=n,a=`vmr-container vmr-container-${r.name}`,l=t(()=>{if(r.attrs)return Array.isArray(r.attrs)?N(r.attrs):r.attrs},[r.attrs]);/* @__PURE__ */
149
- return C.jsx("div",{className:a,...l,children:o&&i&&Array.isArray(r.children)?r.children.map((t,n)=>/* @__PURE__ */C.jsx(e.Fragment,{children:i(t,`${String(null!=s?s:"vmr-container")}-${n}`,o)},`${String(null!=s?s:"vmr-container")}-${n}`)):null})}function Jn(e,t){const n=String(null!=e?e:"");if(!t)return n;const r=new RegExp(String.raw`^\s*<\s*${t}(?:\s[^>]*)?>\s*`,"i"),o=new RegExp(String.raw`\s*<\s*\/\s*${t}\s*>\s*$`,"i");return n.replace(r,"").replace(o,"")}function Gn(t,n,r){var o,i;const s=H(r.customId),a=s[t.type];if(a)return e.createElement(a,{key:n,node:t,customId:r.customId,isDark:r.isDark,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter});if("html_block"===t.type||"html_inline"===t.type){const i=String(null!=(o=t.tag)?o:"").trim().toLowerCase()||function(e){const t=String(null!=e?e:"").match(/^\s*<\s*([A-Z][\w:-]*)/i);return t?t[1].toLowerCase():""}(t.content),a=i?s[i]:null;if(a){const o={...t,type:i,tag:i,content:Jn(t.content,i)};return e.createElement(a,{key:n,node:o,customId:r.customId,isDark:r.isDark,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter})}}switch(t.type){case"text":/* @__PURE__ */
150
- return C.jsx(qn,{node:t,typewriter:r.typewriter},n);case"text_special":/* @__PURE__ */
151
- return C.jsx(qn,{node:{type:"text",content:null!=(i=t.content)?i:"",center:t.center},typewriter:r.typewriter},n);case"paragraph":/* @__PURE__ */
152
- return C.jsx(Fn,{node:t,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter},n);case"heading":/* @__PURE__ */
153
- return C.jsx(Ue,{node:t,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter},n);case"blockquote":/* @__PURE__ */
154
- return C.jsx(ir,{node:t,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter},n);case"list":/* @__PURE__ */
155
- return C.jsx(_t,{node:t,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter},n);case"list_item":/* @__PURE__ */
156
- return C.jsx(Tt,{node:t,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter},n);case"table":/* @__PURE__ */
157
- return C.jsx(Un,{node:t,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter},n);case"definition_list":/* @__PURE__ */
158
- return C.jsx(We,{node:t,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter},n);case"footnote":/* @__PURE__ */
159
- return C.jsx(ze,{node:t,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter},n);case"footnote_reference":/* @__PURE__ */
160
- return C.jsx(He,{node:t},n);case"footnote_anchor":/* @__PURE__ */
161
- return C.jsx(Fe,{node:t},n);case"admonition":/* @__PURE__ */
162
- return C.jsx(E,{node:t,ctx:r,renderNode:Gn,indexKey:n,isDark:r.isDark,typewriter:r.typewriter},n);case"hardbreak":/* @__PURE__ */
163
- return C.jsx(Ve,{node:t,typewriter:r.typewriter},n);case"link":/* @__PURE__ */
164
- return C.jsx(Et,{node:t,ctx:r,renderNode:Gn,indexKey:n,isDark:r.isDark,typewriter:r.typewriter},n);case"image":/* @__PURE__ */
165
- return C.jsx(bt,{node:t},n);case"inline_code":/* @__PURE__ */
166
- return C.jsx(Lt,{node:t,typewriter:r.typewriter},n);case"code_block":return function(t,n,r){var o,i,s,a;const l=ce(String(t.language||""));if("mermaid"===l){const o=H(r.customId).mermaid;if(o)return e.createElement(o,{key:n,node:t,isDark:r.isDark});if(!r.renderCodeBlocksAsPre)/* @__PURE__ */
167
- return C.jsx(Dn,{node:t,isDark:r.isDark,loading:Boolean(t.loading)},n)}if("infographic"===l){const o=H(r.customId).infographic;return o?e.createElement(o,{key:n,node:t,isDark:r.isDark}):/* @__PURE__ */C.jsx(St,{node:t,isDark:r.isDark,loading:Boolean(t.loading)},n)}return r.renderCodeBlocksAsPre||"mermaid"===l?/* @__PURE__ */C.jsx(Oe,{node:t},n):/* @__PURE__ */C.jsx(Re,{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==(s=r.codeBlockThemes)?void 0:s.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__ */
168
- return C.jsx(Vn,{node:t,children:S(t.children,r,`${String(n)}-strong`,Gn)},n);case"emphasis":/* @__PURE__ */
169
- return C.jsx(Ie,{node:t,children:S(t.children,r,`${String(n)}-em`,Gn)},n);case"strikethrough":/* @__PURE__ */
170
- return C.jsx(Hn,{node:t,children:S(t.children,r,`${String(n)}-strike`,Gn)},n);case"highlight":/* @__PURE__ */
171
- return C.jsx(qe,{node:t,children:S(t.children,r,`${String(n)}-highlight`,Gn)},n);case"insert":/* @__PURE__ */
172
- return C.jsx(Bt,{node:t,children:S(t.children,r,`${String(n)}-insert`,Gn)},n);case"subscript":/* @__PURE__ */
173
- return C.jsx(Kn,{node:t,children:S(t.children,r,`${String(n)}-sub`,Gn)},n);case"superscript":/* @__PURE__ */
174
- return C.jsx(Xn,{node:t,children:S(t.children,r,`${String(n)}-sup`,Gn)},n);case"checkbox":case"checkbox_input":/* @__PURE__ */
175
- return C.jsx(X,{node:t,typewriter:r.typewriter},n);case"emoji":/* @__PURE__ */
176
- return C.jsx(Ae,{node:t,typewriter:r.typewriter},n);case"thematic_break":/* @__PURE__ */
177
- return C.jsx(Yn,{},n);case"math_inline":/* @__PURE__ */
178
- return C.jsx(on,{node:t},n);case"math_block":/* @__PURE__ */
179
- return C.jsx(rn,{node:t},n);case"reference":/* @__PURE__ */
180
- return C.jsx(zn,{node:t,ctx:r,typewriter:r.typewriter},n);case"html_block":case"html_inline":return"html_block"===t.type?/* @__PURE__ */C.jsx(it,{node:t,typewriter:r.typewriter,customId:r.customId},n):/* @__PURE__ */C.jsx(yt,{node:t,typewriter:r.typewriter,customId:r.customId},n);case"vmr_container":/* @__PURE__ */
181
- return C.jsx(Zn,{node:t,ctx:r,renderNode:Gn,indexKey:n,typewriter:r.typewriter},n);case"label_open":case"label_close":return null;default:/* @__PURE__ */
182
- return C.jsx(In,{node:t},n)}}const Qn={codeBlockStream:!0,typewriter:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:320,liveNodeBuffer:60},er=d();function tr(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 nr(e){return/^[a-z][a-z0-9-]*$/.test(e)}const rr=e.memo(({props:e,parsedNodes:r,renderCtx:o,indexPrefix:l,containerRef:c})=>{var d,u,m,h,p,f,g;const x=O(),w="undefined"!=typeof window,v="undefined"!=typeof window&&"function"==typeof window.requestIdleCallback,y=Math.max(0,Math.trunc(null!=(d=e.renderBatchSize)?d:80)),k=Math.max(0,Math.trunc(null!=(u=e.initialRenderBatchSize)?u:y||r.length)),b=!1!==e.batchRendering&&y>0&&w,j=Math.max(0,null!=(m=e.liveNodeBuffer)?m:60),M=Math.max(1,null!=(h=e.maxLiveNodes)?h:320),N=(null!=(p=e.maxLiveNodes)?p:0)>0&&r.length>M,S=!1!==e.viewportPriority,L=b&&(null!=(f=e.maxLiveNodes)?f:0)<=0,B=t(()=>{var t;return!1!==e.deferNodesUntilVisible&&!((null!=(t=e.maxLiveNodes)?t:0)<=0)&&!N&&!(r.length>900)&&S},[r.length,e.deferNodesUntilVisible,e.maxLiveNodes,S,N]),[E,T]=n(()=>L?Math.min(r.length,k):r.length),_=i(E);s(()=>{_.current=E},[E]);const $=L?E:r.length,[D,P]=n(0),[R,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(E),U=i(null),q=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:k,delay:null!=(g=e.renderBatchDelay)?g:16,enabled:L}),ne=B||N,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(!N)return r.map((e,t)=>({node:e,index:t}));const e=r.length,t=Math.max(0,Math.min(R.start,e)),n=Math.max(t,Math.min(R.end,e));return r.slice(t,n).map((e,n)=>({node:e,index:t+n}))},[r,R,N]),ie=t(()=>{if(!N)return r.length;const e=Math.max(R.end+j,k),t=Math.min(r.length,e);return Math.max(E,t)},[r.length,N,R.end,j,k,E]);Q.current=ie;const se=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=N?se(0,Math.min(R.start,r.length)):0,le=N?se(Math.min(R.end,r.length),r.length):0,ce=a(()=>{null!=U.current&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(U.current),U.current=null),null!=q.current&&(window.clearTimeout(q.current),q.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(!L)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)))},[L,e.renderBatchBudgetMs,y]),ue=a((t,n={})=>{var r,o;if(!L)return;const i=Q.current;if(_.current>=i)return;const s=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 _.current=n,n});const n="undefined"!=typeof performance?performance.now():Date.now();de(n-t)},l=()=>{const e=Math.max(1,Math.round(G.current));ue(e)},c=t=>{var n;U.current=null,q.current=null,Y.current=null,Z.current=!1;const r=J.current;if(J.current=null,a(null!=r?r:s),_.current>=Q.current)return;if(!t)return void l();const o=Math.max(2,null!=(n=e.renderBatchBudgetMs)?n:6);for(;_.current<Q.current&&!(("function"==typeof t.timeRemaining?t.timeRemaining():0)<=.5*o);)a(Math.max(1,Math.round(G.current)));_.current<Q.current&&l()};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,s):s,!Z.current){if(Z.current=!0,v){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?U.current=requestAnimationFrame(()=>{0!==d?q.current=window.setTimeout(()=>c(),d):c()}):q.current=window.setTimeout(()=>c(),d)}},[de,v,L,w,e.renderBatchDelay,e.renderBatchBudgetMs,e.renderBatchIdleTimeoutMs]);s(()=>{var t;const n=e.indexKey,o=r.length,i=ee.current,s=void 0!==n?n!==i.key:o!==i.total;ee.current={key:n,total:o};const a=te.current,l=null!=(t=e.renderBatchDelay)?t:16,c=a.batchSize!==y||a.initial!==k||a.delay!==l||a.enabled!==L;if(te.current={batchSize:y,initial:k,delay:l,enabled:L},(s||c||!L)&&ce(),(s||c)&&(G.current=Math.max(1,y||1),K.current.clear()),!o)return _.current=0,void T(0);const d=Q.current;if(!L)return _.current=d,void T(d);if(s||c){const e=Math.min(d,k);return _.current=e,T(e),void(e<d&&ue(Math.max(1,k),{immediate:!w}))}const u=Math.min(_.current,d);u!==_.current&&(_.current=u,T(u)),_.current<d&&ue(Math.max(1,y||1))},[ce,L,w,r.length,e.indexKey,e.renderBatchDelay,y,k,ue]),s(()=>{if(!N)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(D,e-1));let n=Math.max(0,t-j),o=Math.min(e,t+j+1);const i=o-n;if(i>M){const e=i-M;n+=Math.ceil(e/2),o-=Math.floor(e/2)}else if(i<M){const t=M-i;n=Math.max(0,n-Math.ceil(t/2)),o=Math.min(e,o+Math.floor(t/2))}W({start:n,end:o})},[D,j,M,r.length,N]),s(()=>()=>{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))},[]);s(()=>{me($)},[me,$]),s(()=>{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)=>{B&&t&&(z.current[e]=!0),t&&N&&P(t=>e>t?e:t)},[B,N]),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),B&&!t&&delete z.current[e],void(t&&he(e,!0));if(e<k&&!N)return pe(e),void he(e,!0);pe(e);const r=x(t,{rootMargin:"400px"});H.current.set(e,r),r.isVisible()&&he(e,!0),r.whenVisible.then(()=>he(e,!0)).catch(()=>{})},[B,pe,he,x,k,ne,N]),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)},[]),xe=a(e=>!(L&&e>=_.current)&&(!B||e<k||!0===z.current[e]),[B,L,k]),we=a(e=>t=>{if(!e)return;const n=t.target;(null==n?void 0:n.closest("[data-node-index]"))&&e(t)},[]);s(()=>{for(const[e,t]of V.current.entries())t&&fe(e,t)},[fe]),s(()=>{N&&E>X.current&&P(E-1),X.current=E},[E,N]);const ve=N?/* @__PURE__ */C.jsx("div",{className:"node-spacer",style:{height:`${ae}px`},"aria-hidden":"true"}):null,ye=N?/* @__PURE__ */C.jsx("div",{className:"node-spacer",style:{height:`${le}px`},"aria-hidden":"true"}):null;/* @__PURE__ */
183
- return C.jsxs("div",{ref:c,className:`markstream-react markdown-renderer${e.isDark?" dark":""}${N?" virtualized":""}`,onClick:e.onClick,onMouseOver:we(e.onMouseOver),onMouseOut:we(e.onMouseOut),children:[ve,oe.map(({node:t,index:n})=>{var r;const i=xe(n),s=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__ */C.jsx("div",{ref:e=>fe(n,e),className:"node-slot","data-node-index":n,"data-node-type":t.type,children:i?/* @__PURE__ */C.jsx("div",{ref:e=>ge(n,e),className:"node-content"+(a?" typewriter-node":""),children:Gn(t,`${l}-${n}`,o)}):/* @__PURE__ */C.jsx("div",{className:"node-placeholder",style:{height:`${s}px`}})},`${l}-${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}),or=e=>{const n={...Qn,...e},r=i(null),o=i(null),a=l(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(nr)},[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(tr).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]),x=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:er,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(s(()=>{var e,t;if("undefined"==typeof window)return;if(n.renderCodeBlocksAsPre)return;if(!x.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(()=>{xe()},{timeout:900});return()=>o(i)},[x,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&&e&&"name"in e)return String(e.name);if("object"==typeof e){const t=_e.get(e);if(t)return t;try{const t=JSON.stringify(e);if(t)return _e.set(e,t),t}catch{}const n="__theme_"+ ++$e;return _e.set(e,n),n}return String(e)}(e);t&&Be!==t&&(Le=e,Be=t,Ee&&Se(Le,Ee).then(()=>De()).catch(()=>{}))}(e))}const w=t(()=>null!=n.indexKey?String(n.indexKey):"markdown-renderer",[n.indexKey]),v=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__ */
184
- return C.jsx(D,{getRoot:()=>r.current,enabled:!1!==n.viewportPriority,children:/* @__PURE__ */C.jsx(rr,{props:n,parsedNodes:x,renderCtx:v,indexPrefix:w,containerRef:r})})};function ir(e){var t,n,r,o,i,s;const{node:a,ctx:l,renderNode:c,indexKey:d,children:u}=e;/* @__PURE__ */
185
- return C.jsx("blockquote",{className:"blockquote-node",dir:"auto",cite:a.cite,children:null!=u?u:l&&c?/* @__PURE__ */C.jsx(or,{nodes:a.children||[],indexKey:`blockquote-${String(null!=d?d:"blockquote")}`,customId:l.customId,isDark:l.isDark,typewriter:l.typewriter,viewportPriority:!0,codeBlockStream:l.codeBlockStream,renderCodeBlocksAsPre:l.renderCodeBlocksAsPre,codeBlockProps:l.codeBlockProps,themes:null==(t=l.codeBlockThemes)?void 0:t.themes,codeBlockDarkTheme:null==(n=l.codeBlockThemes)?void 0:n.darkTheme,codeBlockLightTheme:null==(r=l.codeBlockThemes)?void 0:r.lightTheme,codeBlockMonacoOptions:null==(o=l.codeBlockThemes)?void 0:o.monacoOptions,codeBlockMinWidth:null==(i=l.codeBlockThemes)?void 0:i.minWidth,codeBlockMaxWidth:null==(s=l.codeBlockThemes)?void 0:s.maxWidth,onCopy:l.events.onCopy,onHandleArtifactClick:l.events.onHandleArtifactClick}):null})}function sr(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]),l=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),[x,w]=n(!1),[v,y]=n(!1),[k,b]=n(""),[j,M]=n(!1),[N,S]=n(14),[L,B]=n(N),E=i(null),T=i(null),_=i(null),$=i(null),D=i(!1),O=a(()=>r.isDark?r.darkTheme:r.lightTheme,[r.darkTheme,r.isDark,r.lightTheme]),P=a(e=>{if(!e)return b(""),void M(!1);var t;b(`<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>`),M(!1)},[]),R=a(()=>{b(""),M(!0)},[]),W=a(async()=>{if(!$.current&&!D.current){D.current=!0;try{const e=await import("stream-markdown");$.current=e.createShikiStreamRenderer}catch{}}},[]),A=a(async()=>{if(await W(),E.current&&T.current)if(!_.current&&$.current&&(_.current=$.current(T.current,{theme:O(),themes:r.themes}),M(!0)),_.current)if(!1===r.stream&&r.loading)P(r.node.code);else{P(r.node.code);try{await _.current.updateCode(r.node.code,l),R()}catch{}}else P(r.node.code);else P(r.node.code)},[R,W,O,l,r.loading,r.node.code,r.stream,r.themes,P]);s(()=>(A(),()=>{var e;null==(e=_.current)||e.dispose(),_.current=null}),[A]),s(()=>{_.current&&_.current.setTheme(O())},[O]),s(()=>{_.current&&(!1===r.stream&&r.loading||(P(r.node.code),Promise.resolve(_.current.updateCode(r.node.code,l)).then(()=>R()).catch(()=>{})))},[R,l,r.loading,r.node.code,r.stream,P]);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"===l?"text/html":"image/svg+xml",n="html"===l?"HTML Preview":"SVG Preview";null==(e=r.onPreviewCode)||e.call(r,{type:t,content:r.node.code,title:n})},[h,l,r]),V=t(()=>({fontSize:`${L}px`}),[L]);return s(()=>{S(14),B(14)},[]),/* @__PURE__ */C.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__ */C.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:[
186
- /* @__PURE__ */C.jsxs("div",{className:"flex items-center space-x-2",children:[
187
- /* @__PURE__ */C.jsx("span",{className:"icon-slot h-4 w-4 flex-shrink-0",dangerouslySetInnerHTML:{__html:u}}),
188
- /* @__PURE__ */C.jsx("span",{className:"text-sm font-medium font-mono",children:d})]}),
189
- /* @__PURE__ */C.jsxs("div",{className:"flex items-center space-x-2",children:[
190
- /* @__PURE__ */C.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:()=>y(e=>!e),onMouseEnter:e=>I(e,v?m("common.expand")||"Expand":m("common.collapse")||"Collapse"),onFocus:e=>I(e,v?m("common.expand")||"Expand":m("common.collapse")||"Collapse"),onMouseLeave:F,onBlur:F,children:/* @__PURE__ */C.jsx("svg",{style:{rotate:v?"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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m9 18l6-6l-6-6"})})}),r.showFontSizeButtons&&r.enableFontSizeControl&&/* @__PURE__ */C.jsxs(C.Fragment,{children:[
191
- /* @__PURE__ */C.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:L<=10,onClick:()=>B(e=>Math.max(10,e-1)),onMouseEnter:e=>I(e,m("common.decrease")||"Decrease"),onFocus:e=>I(e,m("common.decrease")||"Decrease"),onMouseLeave:F,onBlur:F,children:/* @__PURE__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 12h14"})})}),
192
- /* @__PURE__ */C.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:L===N,onClick:()=>B(N),onMouseEnter:e=>I(e,m("common.reset")||"Reset"),onFocus:e=>I(e,m("common.reset")||"Reset"),onMouseLeave:F,onBlur:F,children:/* @__PURE__ */C.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__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
193
- /* @__PURE__ */C.jsx("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),
194
- /* @__PURE__ */C.jsx("path",{d:"M3 3v5h5"})]})})}),
195
- /* @__PURE__ */C.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:L>=36,onClick:()=>B(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__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 12h14m-7-7v14"})})})]}),r.showCopyButton&&/* @__PURE__ */C.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__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20 6L9 17l-5-5"})}):/* @__PURE__ */C.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__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
196
- /* @__PURE__ */C.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),
197
- /* @__PURE__ */C.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__ */C.jsx("button",{type:"button",className:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":x,onClick:()=>w(e=>!e),onMouseEnter:e=>I(e,x?m("common.collapse")||"Collapse":m("common.expand")||"Expand"),onFocus:e=>I(e,x?m("common.collapse")||"Collapse":m("common.expand")||"Expand"),onMouseLeave:F,onBlur:F,children:x?/* @__PURE__ */C.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__ */C.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"})}):/* @__PURE__ */C.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__ */C.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__ */C.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__ */C.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__ */C.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[
198
- /* @__PURE__ */C.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"}),
199
- /* @__PURE__ */C.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})})]})]}),!v&&(!!r.stream||!r.loading)&&/* @__PURE__ */C.jsxs("div",{ref:E,className:"code-block-content",style:{...V,maxHeight:x?"none":"500px",overflow:x?"visible":"auto"},children:[
200
- /* @__PURE__ */C.jsx("div",{ref:T,className:"code-block-render"}),!j&&k&&/* @__PURE__ */C.jsx("div",{className:"code-fallback-plain",dangerouslySetInnerHTML:{__html:k}})]}),!r.stream&&r.loading&&/* @__PURE__ */C.jsx("div",{className:"code-loading-placeholder",children:/* @__PURE__ */C.jsxs("div",{className:"loading-skeleton",children:[
201
- /* @__PURE__ */C.jsx("div",{className:"skeleton-line"}),
202
- /* @__PURE__ */C.jsx("div",{className:"skeleton-line"}),
203
- /* @__PURE__ */C.jsx("div",{className:"skeleton-line short"})]})}),
204
- /* @__PURE__ */C.jsx("span",{className:"sr-only","aria-live":"polite",role:"status",children:f?m("common.copied")||"Copied":""})]})}function ar(e){var r;const o=i(null),[a,l]=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 s(()=>{if(!e.visible)return void l(!1);if(!e.anchorEl||!o.current)return void l(!0);let t=null,n=!1;const r=async()=>{var t,r;if(!e.anchorEl||!o.current)return;const{x:i,y:s}=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(s)}px, 0)`})};return r().then(()=>{n||l(!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?x(
205
- /* @__PURE__ */C.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{E as AdmonitionNode,ir as BlockquoteNode,X as CheckboxNode,Re as CodeBlockNode,We as DefinitionListNode,Ae as EmojiNode,Ie as EmphasisNode,In as FallbackComponent,Fe as FootnoteAnchorNode,ze as FootnoteNode,He as FootnoteReferenceNode,Ve as HardBreakNode,Ue as HeadingNode,qe as HighlightNode,it as HtmlBlockNode,yt as HtmlInlineNode,he as HtmlPreviewFrame,bt as ImageNode,St as InfographicBlockNode,Lt as InlineCodeNode,Bt as InsertNode,Et as LinkNode,Tt as ListItemNode,_t as ListNode,pn as MERMAID_WORKER_BUSY_CODE,sr as MarkdownCodeBlockNode,rn as MathBlockNode,on as MathInlineNode,Dn as MermaidBlockNode,or as NodeRenderer,Fn as ParagraphNode,Oe as PreCodeNode,Re as ReactCodeBlockNode,zn as ReferenceNode,Hn as StrikethroughNode,Vn as StrongNode,Kn as SubscriptNode,Xn as SuperscriptNode,Un as TableNode,qn as TextNode,Yn as ThematicBreakNode,ar as Tooltip,Zn as VmrContainerNode,Vt as WORKER_BUSY_CODE,wn as canParseOffthread,K as clearGlobalCustomComponents,Ut as clearKaTeXCache,zt as clearKaTeXWorker,gn as clearMermaidWorker,vn as findPrefixOffthread,H as getCustomNodeComponents,Gt as getKaTeXBackpressureDefaults,ue as getLanguageIcon,hn as getMermaidWorkerLoad,me as languageMap,ce as normalizeLanguageIdentifier,V as removeCustomComponents,Kt as renderKaTeXInWorker,Qt as renderKaTeXWithBackpressure,Gn as renderNode,de as resolveMonacoLanguageId,z as setCustomComponents,q as setDefaultI18nMap,Jt as setKaTeXBackpressureDefaults,Xt as setKaTeXCache,qt as setKaTeXConcurrencyLimit,Ft as setKaTeXWorker,Ht as setKaTeXWorkerDebug,ae as setLanguageIconResolver,fn as setMermaidWorker,un as setMermaidWorkerClientDebug,mn as setMermaidWorkerMaxConcurrency,yn as terminateWorker,Y as useSafeI18n,Yt as waitForKaTeXWorkerSlot};
@@ -1 +0,0 @@
1
- :where(.markstream-react) button{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.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%}.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)}}
package/dist/tailwind.ts DELETED
@@ -1,3 +0,0 @@
1
- export const safeList = `string cannot delete global call clearGlobalCustomComponents blockquote-node auto react note is-dark data-index-key headerId admonition-header admonition-icon admonition-title admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby 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 checkbox-node checkbox checkbox-input 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 dl definition-list indexKey mb-4 dt definition-term font-semibold ctx renderNode ?? definition dd definition-desc ml-4 emphasis-node emoji-node footnote-node flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2 flex-1 clsx heading-node hard-break smooth footnote-reference handleScroll href footnote footnote-link cursor-pointer mark highlight-node footnote-anchor text-[#0366d6] hover:underline ↩︎ 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 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 library failed to render text-red-500 p-4">Failed instanceof error.message error transform ease center fullscreen touches rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 bg-gray-800 bg-gray-50 gap-x-2 gap-x-1 p-0.5 bg-gray-700 bg-gray-100 px-2.5 py-1 !showSource bg-gray-600 text-gray-200 text-gray-700 text-gray-500 showSource m16 isCollapsed opacity-50 cursor-not-allowed m7 whitespace-pre-wrap text-gray-300 baseCode relative top-2 right-2 z-10 gap-2 backdrop-blur min-h-[360px] transition-all duration-100 block inset-0 cursor-grab isDragging containerRef w-full text-center justify-center min-h-full fixed z-50 bg-black/70 p-4 closeModal h-full max-w-full max-h-full shadow-lg top-6 right-6 !isDragging cursor-grabbing inline-code inline text-[85%] px-1 py-0.5 bg-secondary whitespace-normal break-words insert-node 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 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 linear infinite link-loading inline-flex items-baseline gap-1.5 link-text-wrapper leading-[normal] link-text node.text underline-anim link-node noopener noreferrer list-item pl-1.5 my-2 valueAttr children superscript-node strikethrough-node subscript-node unknown-node italic node hr-node thematic-break text-node text-node-center in out zoom reference-node bg-accent px-1.5 mx-0.5 hover:bg-secondary strong-node containerClass vmr-container boolean window.matchMedia 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 right text-right 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 vitesse-dark vitesse-light shiki shiki-fallback stream-markdown code-block-content rendererTargetRef code-block-render infographic 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 [mermaidWorkerClient] messageerror cleared worker instance inject via busy timed canParse findPrefix javascript typescript python shell plain cpp markdown afterbegin light loose strict viewBox open-modal [data-mermaid-wrapper] mermaid-action-btn toggle-mode preview common.zoomIn common.zoomOut common.resetZoom data-mermaid-wrapper mermaid-loading mermaid-spinner diagram… mermaid-block-header space-x-1 common.preview common.source common.export mermaid-error mermaid-block mermaid-modal-overlay mermaid-modal-panel mermaid-modal-header mermaid-modal-title mermaid-modal-close mermaid-modal-body modalContentRef mermaid-modal-content not available default abort stream-monaco thinking htmlFor className data-language document 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 math-block overflow-x-auto min-h-[40px] mathRef rendering math-rendering math-inline-wrapper math-inline--hidden math-inline__loading math-inline__spinner [katexWorkerClient] init cache-hit timeout waiting slot globalThis.requestAnimationFrame globalThis.cancelAnimationFrame module did expected [markstream-react] katex`
2
- module.exports = safeList;
3
- export default safeList;
@@ -1 +0,0 @@
1
- import e from"katex";import"katex/contrib/mhchem";let r=!1;globalThis.addEventListener("message",o=>{var t,s,n,a;const d=o.data||{};if("init"===d.type){r=!!d.debug;try{r&&console.debug("[katexRenderer.worker] debug enabled")}catch{}return}const l=null!=(t=d.id)?t:"",i=null!=(s=d.content)?s:"",c=null==(n=d.displayMode)||n;try{r&&console.debug("[katexRenderer.worker] render start",{id:l,displayMode:c,content:i});const o={id:l,html:e.renderToString(i,{throwOnError:!0,displayMode:c,output:"html",strict:"ignore"}),content:i,displayMode:c};try{globalThis.postMessage(o),r&&console.debug("[katexRenderer.worker] render success",{id:l})}catch(g){console.error("[katexRenderer.worker] failed to postMessage result",g)}}catch(u){const e={id:l,error:String(null!=(a=null==u?void 0:u.message)?a:u),content:i,displayMode:c};try{globalThis.postMessage(e)}catch(g){console.error("[katexRenderer.worker] failed to postMessage error",g)}}}),globalThis.addEventListener("error",e=>{var r;console.error("[katexRenderer.worker] uncaught error",e.message,e.error);try{globalThis.postMessage({id:"__worker_uncaught__",error:String(null!=(r=e.message)?r:e.error),content:"",displayMode:!0})}catch{}});
@@ -1 +0,0 @@
1
- import t from"mermaid";async function a(a,r){var n;const e=function(t,a){const r=`%%{init: {"theme": "${"dark"===a?"dark":"default"}"}}%%\n`;return t.trimStart().startsWith("%%{")?t:r+t}(a,r),i=t;if("function"==typeof i.parse)return await(null==(n=i.parse)?void 0:n.call(i,e)),!0;throw new Error("mermaid.parse not available in worker")}t.initialize({startOnLoad:!1,securityLevel:"loose"}),self.onmessage=async t=>{var r;const n=t.data,e=t=>self.postMessage(t),i=n.id;try{if("canParse"===n.action)return void e({id:i,ok:!0,result:await a(n.payload.code,n.payload.theme)});if("findPrefix"===n.action)return void e({id:i,ok:!0,result:await async function(t,r){const n=t.split("\n"),e=function(t){const a=/^(?:graph|flowchart|flowchart\s+tb|flowchart\s+lr|sequenceDiagram|gantt|classDiagram|stateDiagram(?:-v2)?|erDiagram|journey|pie|quadrantChart|timeline|xychart(?:-beta)?)\b/;for(let r=0;r<t.length;r++){const n=t[r].trim();if(n&&!n.startsWith("%%")&&a.test(n))return r}return-1}(n);if(-1===e)return null;const i=n.slice(0,e+1);await a(i.join("\n"),r);let o=e+1,s=n.length,l=e+1,c=0;for(;o<=s&&c<12;){const t=Math.floor((o+s)/2),d=[...i,...n.slice(e+1,t)].join("\n");c++;try{await a(d,r),l=t,o=t+1}catch{s=t-1}}return[...i,...n.slice(e+1,l)].join("\n")}(n.payload.code,n.payload.theme)});e({id:i,ok:!1,error:"Unknown action"})}catch(o){e({id:i,ok:!1,error:null!=(r=null==o?void 0:o.message)?r:String(o)})}};