@nuvin/ui-design-system 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ApprovalCard.d.ts +25 -0
- package/dist/components/ApprovalCard.stories.d.ts +25 -0
- package/dist/components/AssistantMessage.d.ts +7 -0
- package/dist/components/AssistantMessage.stories.d.ts +15 -0
- package/dist/components/Badge.d.ts +9 -0
- package/dist/components/Button.d.ts +10 -0
- package/dist/components/Button.stories.d.ts +17 -0
- package/dist/components/Callout.d.ts +23 -0
- package/dist/components/Card.d.ts +10 -0
- package/dist/components/Chip.d.ts +2 -0
- package/dist/components/Composer.d.ts +19 -0
- package/dist/components/Composer.stories.d.ts +13 -0
- package/dist/components/DiffBlock.d.ts +17 -0
- package/dist/components/DiffBlock.stories.d.ts +49 -0
- package/dist/components/Markdown.d.ts +9 -0
- package/dist/components/Markdown.stories.d.ts +13 -0
- package/dist/components/ReasoningDisclosure.d.ts +10 -0
- package/dist/components/ReasoningDisclosure.stories.d.ts +14 -0
- package/dist/components/Spinner.d.ts +2 -0
- package/dist/components/StatusLine.d.ts +12 -0
- package/dist/components/StatusLine.stories.d.ts +11 -0
- package/dist/components/ToolCard.d.ts +17 -0
- package/dist/components/ToolCard.stories.d.ts +19 -0
- package/dist/components/ToolGroup.d.ts +20 -0
- package/dist/components/ToolGroup.stories.d.ts +14 -0
- package/dist/components/UserMessage.d.ts +7 -0
- package/dist/components/UserMessage.stories.d.ts +16 -0
- package/dist/components/data/Avatar.d.ts +13 -0
- package/dist/components/data/Avatar.stories.d.ts +11 -0
- package/dist/components/data/CopyButton.d.ts +7 -0
- package/dist/components/data/CopyButton.stories.d.ts +9 -0
- package/dist/components/data/Kbd.d.ts +5 -0
- package/dist/components/data/Kbd.stories.d.ts +13 -0
- package/dist/components/data/StatCard.d.ts +10 -0
- package/dist/components/data/StatCard.stories.d.ts +13 -0
- package/dist/components/data/Table.d.ts +34 -0
- package/dist/components/data/Table.stories.d.ts +14 -0
- package/dist/components/disclosure/Accordion.d.ts +6 -0
- package/dist/components/disclosure/Accordion.stories.d.ts +9 -0
- package/dist/components/feedback/AlertBanner.d.ts +12 -0
- package/dist/components/feedback/AlertBanner.stories.d.ts +16 -0
- package/dist/components/feedback/Progress.d.ts +7 -0
- package/dist/components/feedback/Progress.stories.d.ts +11 -0
- package/dist/components/forms/Checkbox.d.ts +9 -0
- package/dist/components/forms/Checkbox.stories.d.ts +15 -0
- package/dist/components/forms/Combobox.d.ts +16 -0
- package/dist/components/forms/Combobox.stories.d.ts +20 -0
- package/dist/components/forms/Field.d.ts +19 -0
- package/dist/components/forms/Field.stories.d.ts +10 -0
- package/dist/components/forms/Input.d.ts +13 -0
- package/dist/components/forms/Input.stories.d.ts +17 -0
- package/dist/components/forms/RadioGroup.d.ts +9 -0
- package/dist/components/forms/RadioGroup.stories.d.ts +20 -0
- package/dist/components/forms/Select.d.ts +17 -0
- package/dist/components/forms/Select.stories.d.ts +19 -0
- package/dist/components/forms/Switch.d.ts +10 -0
- package/dist/components/forms/Switch.stories.d.ts +15 -0
- package/dist/components/forms/Textarea.d.ts +10 -0
- package/dist/components/forms/Textarea.stories.d.ts +14 -0
- package/dist/components/layout/Box.d.ts +12 -0
- package/dist/components/layout/Divider.d.ts +6 -0
- package/dist/components/layout/Inline.d.ts +10 -0
- package/dist/components/layout/ScrollArea.d.ts +8 -0
- package/dist/components/layout/ScrollArea.stories.d.ts +10 -0
- package/dist/components/layout/Separator.d.ts +11 -0
- package/dist/components/layout/Separator.stories.d.ts +10 -0
- package/dist/components/layout/Stack.d.ts +9 -0
- package/dist/components/layout/layout.stories.d.ts +9 -0
- package/dist/components/layout/space-maps.d.ts +66 -0
- package/dist/components/navigation/Breadcrumb.d.ts +14 -0
- package/dist/components/navigation/Breadcrumb.stories.d.ts +11 -0
- package/dist/components/navigation/CommandPalette.d.ts +27 -0
- package/dist/components/navigation/CommandPalette.stories.d.ts +18 -0
- package/dist/components/navigation/Pagination.d.ts +8 -0
- package/dist/components/navigation/Pagination.stories.d.ts +17 -0
- package/dist/components/navigation/Sidebar.d.ts +16 -0
- package/dist/components/navigation/Sidebar.stories.d.ts +11 -0
- package/dist/components/navigation/Tabs.d.ts +6 -0
- package/dist/components/navigation/Tabs.stories.d.ts +9 -0
- package/dist/components/overlays/ConfirmDialog.d.ts +14 -0
- package/dist/components/overlays/ConfirmDialog.stories.d.ts +11 -0
- package/dist/components/overlays/DropdownMenu.d.ts +17 -0
- package/dist/components/overlays/DropdownMenu.stories.d.ts +12 -0
- package/dist/components/overlays/EmptyState.d.ts +13 -0
- package/dist/components/overlays/EmptyState.stories.d.ts +11 -0
- package/dist/components/overlays/Modal.d.ts +15 -0
- package/dist/components/overlays/Modal.stories.d.ts +11 -0
- package/dist/components/overlays/Popover.d.ts +5 -0
- package/dist/components/overlays/Popover.stories.d.ts +9 -0
- package/dist/components/overlays/Skeleton.d.ts +5 -0
- package/dist/components/overlays/Skeleton.stories.d.ts +10 -0
- package/dist/components/overlays/Toast.stories.d.ts +10 -0
- package/dist/components/overlays/Toaster.d.ts +3 -0
- package/dist/components/overlays/Tooltip.d.ts +11 -0
- package/dist/components/overlays/Tooltip.stories.d.ts +10 -0
- package/dist/components/overlays/toast.d.ts +26 -0
- package/dist/components/typography/Code.d.ts +5 -0
- package/dist/components/typography/Heading.d.ts +10 -0
- package/dist/components/typography/Link.d.ts +5 -0
- package/dist/components/typography/Text.d.ts +9 -0
- package/dist/components/typography/type-maps.d.ts +25 -0
- package/dist/components/typography/typography.stories.d.ts +7 -0
- package/dist/highlighted-body-KPVGNVTW-B7V4eq0Z.js +19 -0
- package/dist/highlighted-body-KPVGNVTW-BzLVG-SF.cjs +1 -0
- package/dist/index-B8qLWEuY.js +34699 -0
- package/dist/index-Ctl3DYP3.cjs +312 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +84 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/mermaid-HWGCJPDP-B921Bgi1.js +4 -0
- package/dist/mermaid-HWGCJPDP-DwanGdS4.cjs +1 -0
- package/dist/primitives.css +34 -0
- package/dist/semantic.css +98 -0
- package/dist/showcases/Conversation.stories.d.ts +13 -0
- package/dist/spacing.css +16 -0
- package/dist/styles.css +5 -0
- package/dist/theme/ThemeProvider.d.ts +14 -0
- package/dist/theme.css +96 -0
- package/dist/themes/light.css +55 -0
- package/package.json +81 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
"use strict";var OE=Object.defineProperty;var nd=e=>{throw TypeError(e)};var LE=(e,t,n)=>t in e?OE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ne=(e,t,n)=>LE(e,typeof t!="symbol"?t+"":t,n),rd=(e,t,n)=>t.has(e)||nd("Cannot "+n);var st=(e,t,n)=>(rd(e,t,"read from private field"),n?n.call(e):t.get(e)),od=(e,t,n)=>t.has(e)?nd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ss=(e,t,n,r)=>(rd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);const f=require("react/jsx-runtime"),A=require("react"),fa=require("react-dom");function zh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=zh(A),Kr=zh(fa);function Vh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Vh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ha(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vh(e))&&(r&&(r+=" "),r+=t);return r}const tu="-",DE=e=>{const t=FE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(tu);return s[0]===""&&s.length!==1&&s.shift(),Wh(s,t)||ME(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},Wh=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Wh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(tu);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},id=/^\[(.+)\]$/,ME=e=>{if(id.test(e)){const t=id.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},FE=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return jE(Object.entries(e.classGroups),n).forEach(([i,a])=>{Ks(a,r,i,t)}),r},Ks=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:ad(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(BE(o)){Ks(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Ks(a,ad(t,i),n,r)})})},ad=(e,t)=>{let n=e;return t.split(tu).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},BE=e=>e.isThemeGetter,jE=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[n,o]}):e,HE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Yh="!",UE=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=s=>{const l=[];let u=0,c=0,d;for(let E=0;E<s.length;E++){let T=s[E];if(u===0){if(T===o&&(r||s.slice(E,E+i)===t)){l.push(s.slice(c,E)),c=E+i;continue}if(T==="/"){d=E;continue}}T==="["?u++:T==="]"&&u--}const h=l.length===0?s:s.substring(c),p=h.startsWith(Yh),b=p?h.substring(1):h,x=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:x}};return n?s=>n({className:s,parseClassName:a}):a},$E=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},zE=e=>({cache:HE(e.cacheSize),parseClassName:UE(e),...DE(e)}),VE=/\s+/,WE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(VE);let s="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:c,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let b=!!p,x=r(b?h.substring(0,p):h);if(!x){if(!b){s=u+(s.length>0?" "+s:s);continue}if(x=r(h),!x){s=u+(s.length>0?" "+s:s);continue}b=!1}const E=$E(c).join(":"),T=d?E+Yh:E,v=T+x;if(i.includes(v))continue;i.push(v);const y=o(x,b);for(let C=0;C<y.length;++C){const I=y[C];i.push(T+I)}s=u+(s.length>0?" "+s:s)}return s};function YE(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qh(t))&&(r&&(r+=" "),r+=n);return r}const qh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qh(e[r]))&&(n&&(n+=" "),n+=t);return n};function qE(e,...t){let n,r,o,i=a;function a(l){const u=t.reduce((c,d)=>d(c),e());return n=zE(u),r=n.cache.get,o=n.cache.set,i=s,s(l)}function s(l){const u=r(l);if(u)return u;const c=WE(l,n);return o(l,c),c}return function(){return i(YE.apply(null,arguments))}}const Be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Gh=/^\[(?:([a-z-]+):)?(.+)\]$/i,GE=/^\d+\/\d+$/,KE=new Set(["px","full","screen"]),XE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,QE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ZE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,JE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,un=e=>Ur(e)||KE.has(e)||GE.test(e),Sn=e=>Xr(e,"length",lT),Ur=e=>!!e&&!Number.isNaN(Number(e)),ls=e=>Xr(e,"number",Ur),bo=e=>!!e&&Number.isInteger(Number(e)),tT=e=>e.endsWith("%")&&Ur(e.slice(0,-1)),xe=e=>Gh.test(e),An=e=>XE.test(e),nT=new Set(["length","size","percentage"]),rT=e=>Xr(e,nT,Kh),oT=e=>Xr(e,"position",Kh),iT=new Set(["image","url"]),aT=e=>Xr(e,iT,cT),sT=e=>Xr(e,"",uT),xo=()=>!0,Xr=(e,t,n)=>{const r=Gh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},lT=e=>QE.test(e)&&!ZE.test(e),Kh=()=>!1,uT=e=>JE.test(e),cT=e=>eT.test(e),dT=()=>{const e=Be("colors"),t=Be("spacing"),n=Be("blur"),r=Be("brightness"),o=Be("borderColor"),i=Be("borderRadius"),a=Be("borderSpacing"),s=Be("borderWidth"),l=Be("contrast"),u=Be("grayscale"),c=Be("hueRotate"),d=Be("invert"),h=Be("gap"),p=Be("gradientColorStops"),b=Be("gradientColorStopPositions"),x=Be("inset"),E=Be("margin"),T=Be("opacity"),v=Be("padding"),y=Be("saturate"),C=Be("scale"),I=Be("sepia"),w=Be("skew"),P=Be("space"),L=Be("translate"),F=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",xe,t],M=()=>[xe,t],W=()=>["",un,Sn],z=()=>["auto",Ur,xe],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",xe],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ue=()=>[Ur,xe];return{cacheSize:500,separator:":",theme:{colors:[xo],spacing:[un,Sn],blur:["none","",An,xe],brightness:ue(),borderColor:[e],borderRadius:["none","","full",An,xe],borderSpacing:M(),borderWidth:W(),contrast:ue(),grayscale:re(),hueRotate:ue(),invert:re(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[tT,Sn],inset:D(),margin:D(),opacity:ue(),padding:M(),saturate:ue(),scale:ue(),sepia:re(),skew:ue(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",xe]}],container:["container"],columns:[{columns:[An]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),xe]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",bo,xe]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xe]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",bo,xe]}],"grid-cols":[{"grid-cols":[xo]}],"col-start-end":[{col:["auto",{span:["full",bo,xe]},xe]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[xo]}],"row-start-end":[{row:["auto",{span:[bo,xe]},xe]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",xe,t]}],"min-w":[{"min-w":[xe,t,"min","max","fit"]}],"max-w":[{"max-w":[xe,t,"none","full","min","max","fit","prose",{screen:[An]},An]}],h:[{h:[xe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[xe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[xe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[xe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",An,Sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ls]}],"font-family":[{font:[xo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",xe]}],"line-clamp":[{"line-clamp":["none",Ur,ls]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",un,xe]}],"list-image":[{"list-image":["none",xe]}],"list-style-type":[{list:["none","disc","decimal",xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[T]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",un,Sn]}],"underline-offset":[{"underline-offset":["auto",un,xe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[T]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),oT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},aT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[T]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[T]}],"divide-style":[{divide:H()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[un,xe]}],"outline-w":[{outline:[un,Sn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[T]}],"ring-offset-w":[{"ring-offset":[un,Sn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",An,sT]}],"shadow-color":[{shadow:[xo]}],opacity:[{opacity:[T]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",An,xe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[I]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[T]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xe]}],duration:[{duration:ue()}],ease:[{ease:["linear","in","out","in-out",xe]}],delay:[{delay:ue()}],animate:[{animate:["none","spin","ping","pulse","bounce",xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[bo,xe]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[un,Sn,ls]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},fT=qE(dT);function q(...e){return fT(ha(e))}const Xh=A.createContext(null),hT="nuvin-theme";function pT(){return window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function mT({children:e,defaultMode:t="dark",storageKey:n=hT}){const[r,o]=A.useState(()=>{if(typeof window>"u")return"dark";const a=localStorage.getItem(n);return a==="dark"||a==="light"?a:t==="system"?pT():t});A.useEffect(()=>{document.documentElement.setAttribute("data-theme",r),localStorage.setItem(n,r)},[r,n]);const i={mode:r,setMode:o,toggleMode:()=>o(a=>a==="dark"?"light":"dark")};return f.jsx(Xh.Provider,{value:i,children:e})}function gT(){const e=A.useContext(Xh);if(!e)throw new Error("useTheme requires <ThemeProvider>");return e}const sd=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ld=ha,$n=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ld(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const h=sd(c)||sd(d);return o[u][h]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,h]=c;return h===void 0||(u[d]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:h,...p}=c;return Object.entries(p).every(b=>{let[x,E]=b;return Array.isArray(E)?E.includes({...i,...s}[x]):{...i,...s}[x]===E})?[...u,d,h]:u},[]);return ld(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},bT=$n(["inline-flex items-center justify-center gap-1.5 font-semibold","transition-colors motion-reduce:transition-none","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-35"],{variants:{variant:{default:["bg-primary text-primary-foreground","hover:brightness-110"],destructive:["bg-transparent text-destructive border border-border","hover:bg-del-bg"],ghost:["bg-transparent text-foreground","hover:bg-panel-2"],chip:["rounded-full bg-transparent text-text-2 border border-border","text-xs px-2.5 py-0.5 font-normal","hover:bg-panel-2"]},size:{sm:"px-2.5 py-1 text-xs rounded-md",md:"px-4 py-1.5 text-sm rounded-lg"}},compoundVariants:[{variant:"chip",class:"rounded-full px-2.5 py-0.5 text-xs"}],defaultVariants:{variant:"default",size:"md"}}),fn=A.forwardRef(({className:e,variant:t,size:n,...r},o)=>f.jsx("button",{ref:o,"data-testid":"button",className:q(bT({variant:t,size:n}),e),...r}));fn.displayName="Button";const pa=A.forwardRef(({className:e,...t},n)=>f.jsx("span",{ref:n,"data-testid":"spinner","aria-label":"loading",className:q("inline-block h-3 w-3 shrink-0 animate-spin rounded-full","border-2 border-border border-t-status-running","motion-reduce:animate-none",e),...t}));pa.displayName="Spinner";var xT=Object.defineProperty,Qr=(e,t)=>xT(e,"name",{value:t,configurable:!0}),Qh=!!(typeof window<"u"&&window.document&&window.document.createElement);function J(e,t,{checkForDefaultPrevented:n=!0}={}){return Qr(function(o){if(e==null||e(o),n===!1||!o||!o.defaultPrevented)return t==null?void 0:t(o)},"handleEvent")}Qr(J,"composeEventHandlers");function ET(e){var t;if(!Qh)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}Qr(ET,"getOwnerWindow");function Xs(e){if(!Qh)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Qr(Xs,"getOwnerDocument");function Zh(e,t=!1){const{activeElement:n}=Xs(e);if(!(n!=null&&n.nodeName))return null;if(Jh(n)&&n.contentDocument)return Zh(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=Xs(n).getElementById(r);if(o)return o}}return n}Qr(Zh,"getActiveElement");function Jh(e){return e.tagName==="IFRAME"}Qr(Jh,"isFrame");var TT=Object.defineProperty,Pt=(e,t)=>TT(e,"name",{value:t,configurable:!0});function yT(e,t){const n=g.createContext(t);n.displayName=e+"Context";const r=Pt(i=>{const{children:a,...s}=i,l=g.useMemo(()=>s,Object.values(s));return f.jsx(n.Provider,{value:l,children:a})},"Provider");r.displayName=e+"Provider";function o(i,a={}){const{optional:s=!1}=a,l=g.useContext(n);if(l)return l;if(t!==void 0)return t;if(!s)throw new Error(`\`${i}\` must be used within \`${e}\``)}return Pt(o,"useContext"),[r,o]}Pt(yT,"createContext");function Ve(e,t=[]){let n=[];function r(i,a){const s=g.createContext(a);s.displayName=i+"Context";const l=n.length;n=[...n,a];const u=Pt(d=>{var T;const{scope:h,children:p,...b}=d,x=((T=h==null?void 0:h[e])==null?void 0:T[l])||s,E=g.useMemo(()=>b,Object.values(b));return f.jsx(x.Provider,{value:E,children:p})},"Provider");u.displayName=i+"Provider";function c(d,h,p={}){var T;const{optional:b=!1}=p,x=((T=h==null?void 0:h[e])==null?void 0:T[l])||s,E=g.useContext(x);if(E)return E;if(a!==void 0)return a;if(!b)throw new Error(`\`${d}\` must be used within \`${i}\``)}return Pt(c,"useContext"),[u,c]}Pt(r,"createContext");const o=Pt(()=>{const i=n.map(a=>g.createContext(a));return Pt(function(s){const l=(s==null?void 0:s[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])},"useScope")},"createScope");return o.scopeName=e,[r,ep(o,...t)]}Pt(Ve,"createContextScope");function ep(...e){const t=e[0];if(e.length===1)return t;const n=Pt(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return Pt(function(i){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Pt(ep,"composeContextScopes");var $e=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},vT=Object.defineProperty,wT=(e,t)=>vT(e,"name",{value:t,configurable:!0}),ud=g[" useEffectEvent ".trim().toString()],cd=g[" useInsertionEffect ".trim().toString()];function tp(e){if(typeof ud=="function")return ud(e);const t=g.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof cd=="function"?cd(()=>{t.current=e}):$e(()=>{t.current=e}),g.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}wT(tp,"useEffectEvent");var CT=Object.defineProperty,ei=(e,t)=>CT(e,"name",{value:t,configurable:!0}),kT=g[" useInsertionEffect ".trim().toString()]||$e;function ct({prop:e,defaultProp:t,onChange:n=ei(()=>{},"onChange"),caller:r}){const[o,i,a]=np({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o,u=g.useCallback(c=>{var d;if(s){const h=rp(c)?c(e):c;h!==e&&((d=a.current)==null||d.call(a,h))}else i(c)},[s,e,i,a]);return[l,u]}ei(ct,"useControllableState");function np({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),o=g.useRef(n),i=g.useRef(t);return kT(()=>{i.current=t},[t]),g.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}ei(np,"useUncontrolledState");function rp(e){return typeof e=="function"}ei(rp,"isFunction");var dd=Symbol("RADIX:SYNC_STATE");function ST(e,t,n,r){const{prop:o,defaultProp:i,onChange:a,caller:s}=t,l=o!==void 0,u=tp(a),c=[{...n,state:i}];r&&c.push(r);const[d,h]=g.useReducer((E,T)=>{if(T.type===dd)return{...E,state:T.state};const v=e(E,T);return l&&!Object.is(v.state,E.state)&&u(v.state),v},...c),p=d.state,b=g.useRef(p);g.useEffect(()=>{b.current!==p&&(b.current=p,l||u(p))},[p,b,l]);const x=g.useMemo(()=>o!==void 0?{...d,state:o}:d,[d,o]);return g.useEffect(()=>{l&&!Object.is(o,d.state)&&h({type:dd,state:o})},[o,d.state,l]),[x,h]}ei(ST,"useControllableStateReducer");var AT=Object.defineProperty,nu=(e,t)=>AT(e,"name",{value:t,configurable:!0});function Qs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}nu(Qs,"setRef");function dr(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Qs(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Qs(e[o],null)}}}}nu(dr,"composeRefs");function he(...e){return g.useCallback(dr(...e),e)}nu(he,"useComposedRefs");var _T=Object.defineProperty,Ht=(e,t)=>_T(e,"name",{value:t,configurable:!0});function Qt(e){const t=g.forwardRef((n,r)=>{let{children:o,...i}=n,a=null,s=!1;const l=[];Zs(o)&&typeof Ei=="function"&&(o=Ei(o._payload)),g.Children.forEach(o,h=>{var p;if(lp(h)){s=!0;const b=h;let x="child"in b.props?b.props.child:b.props.children;Zs(x)&&typeof Ei=="function"&&(x=Ei(x._payload)),a=IT(b,x),l.push((p=a==null?void 0:a.props)==null?void 0:p.children)}else l.push(h)}),a?a=g.cloneElement(a,void 0,l):!s&&g.Children.count(o)===1&&g.isValidElement(o)&&(a=o);const u=a?sp(a):void 0,c=he(r,u);if(!a){if(o||o===0)throw new Error(s?PT(e):RT(e));return o}const d=ap(i,a.props??{});return a.type!==g.Fragment&&(d.ref=r?c:u),g.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}Ht(Qt,"createSlot");var op=Symbol.for("radix.slottable");function ip(e){const t=Ht(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=op,t}Ht(ip,"createSlottable");var IT=Ht((e,t)=>{if("child"in e.props){const n=e.props.child;return g.isValidElement(n)?g.cloneElement(n,void 0,e.props.children(n.props.children)):null}return g.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function ap(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}Ht(ap,"mergeProps");function sp(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ht(sp,"getElementRef");function lp(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===op}Ht(lp,"isSlottable");var NT=Symbol.for("react.lazy");function Zs(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===NT&&"_payload"in e&&up(e._payload)}Ht(Zs,"isLazyComponent");function up(e){return typeof e=="object"&&e!==null&&"then"in e}Ht(up,"isPromiseLike");var RT=Ht(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),PT=Ht(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Ei=g[" use ".trim().toString()],OT=Object.defineProperty,LT=(e,t)=>OT(e,"name",{value:t,configurable:!0}),DT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=DT.reduce((e,t)=>{const n=Qt(`Primitive.${t}`),r=g.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ma(e,t){e&&Kr.flushSync(()=>e.dispatchEvent(t))}LT(ma,"dispatchDiscreteCustomEvent");var MT=Object.defineProperty,bn=(e,t)=>MT(e,"name",{value:t,configurable:!0});function cp(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}bn(cp,"useStateMachine");var Ze=bn(e=>{const{present:t,children:n}=e,r=dp(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),i=fp(r.ref,hp(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:i}):null},"Presence");function dp(e){const[t,n]=g.useState(),r=g.useRef(null),o=g.useRef(e),i=g.useRef("none"),a=g.useRef(void 0),s=e?"mounted":"unmounted",[l,u]=cp(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{l==="mounted"?(i.current=a.current??Mr(r.current),a.current=void 0):i.current="none"},[l]),$e(()=>{const c=r.current,d=o.current;if(d!==e){const p=i.current,b=Mr(c);e?(a.current=b,u("MOUNT")):b==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&p!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),$e(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,h=bn(b=>{const E=Mr(r.current).includes(CSS.escape(b.animationName));if(b.target===t&&E&&(u("ANIMATION_END"),!o.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},"handleAnimationEnd"),p=bn(b=>{b.target===t&&(i.current=Mr(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(c=>{if(c){const d=getComputedStyle(c);r.current=d,a.current=Mr(d)}else r.current=null;n(c)},[])}}bn(dp,"usePresence");function Js(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}bn(Js,"setRef");function fp(...e){const t=g.useRef(e);return t.current=e,g.useCallback(n=>{const r=t.current;let o=!1;const i=r.map(a=>{const s=Js(a,n);return!o&&typeof s=="function"&&(o=!0),s});if(o)return()=>{for(let a=0;a<i.length;a++){const s=i[a];typeof s=="function"?s():Js(r[a],null)}}},[])}bn(fp,"useStableComposedRefs");function Mr(e){return(e==null?void 0:e.animationName)||"none"}bn(Mr,"getAnimationName");function hp(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}bn(hp,"getElementRef");var FT=Object.defineProperty,BT=(e,t)=>FT(e,"name",{value:t,configurable:!0}),jT=g[" useId ".trim().toString()]||(()=>{}),HT=0;function Ke(e){const[t,n]=g.useState(jT());return $e(()=>{e||n(r=>r??String(HT++))},[e]),e||(t?`radix-${t}`:"")}BT(Ke,"useId");var UT=Object.defineProperty,ti=(e,t)=>UT(e,"name",{value:t,configurable:!0}),ru="Collapsible",[$T,pp]=Ve(ru),[zT,ou]=$T(ru),VT=g.forwardRef(ti(function(t,n){const{__scopeCollapsible:r,open:o,defaultOpen:i,disabled:a,onOpenChange:s,...l}=t,[u,c]=ct({prop:o,defaultProp:i??!1,onChange:s,caller:ru});return f.jsx(zT,{scope:r,disabled:a,contentId:Ke(),open:u,onOpenToggle:g.useCallback(()=>c(d=>!d),[c]),children:f.jsx(ie.div,{"data-state":ga(u),"data-disabled":a?"":void 0,...l,ref:n})})},"Collapsible")),WT="CollapsibleTrigger",YT=g.forwardRef(ti(function(t,n){const{__scopeCollapsible:r,...o}=t,i=ou(WT,r);return f.jsx(ie.button,{type:"button","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":ga(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...o,ref:n,onClick:J(t.onClick,i.onOpenToggle)})},"CollapsibleTrigger")),mp="CollapsibleContent",qT=g.forwardRef(ti(function(t,n){const{forceMount:r,...o}=t,i=ou(mp,t.__scopeCollapsible);return f.jsx(Ze,{present:r||i.open,children:({present:a})=>f.jsx(GT,{...o,ref:n,present:a})})},"CollapsibleContent")),GT=g.forwardRef(ti(function(t,n){const{__scopeCollapsible:r,present:o,children:i,...a}=t,s=ou(mp,r),[l,u]=g.useState(o),c=g.useRef(null),d=he(n,c),h=g.useRef(0),p=h.current,b=g.useRef(0),x=b.current,E=s.open||l,T=g.useRef(E),v=g.useRef(void 0);return g.useEffect(()=>{const y=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(y)},[]),$e(()=>{const y=c.current;if(y){v.current=v.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const C=y.getBoundingClientRect();h.current=C.height,b.current=C.width,T.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),u(o)}},[s.open,o]),f.jsx(ie.div,{"data-state":ga(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!E,...a,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...t.style},children:E&&i})},"CollapsibleContentImpl"));function ga(e){return e?"open":"closed"}ti(ga,"getState");var ba=VT,xa=YT,Ea=qT;const KT={read:{glyph:"☰",classes:"bg-[color-mix(in_srgb,var(--color-status-ok)_12%,transparent)] text-info"},edit:{glyph:"✎",classes:"bg-[color-mix(in_srgb,var(--color-brand)_12%,transparent)] text-brand"},exec:{glyph:"$",classes:"bg-[color-mix(in_srgb,var(--color-status-ok)_12%,transparent)] text-primary"},search:{glyph:"⌕",classes:"bg-[color-mix(in_srgb,var(--color-status-pending)_12%,transparent)] text-accent"},other:{glyph:"◇",classes:"bg-panel-2 text-text-2"}},fd={ok:"text-status-ok",error:"text-status-error",running:"text-status-running",pending:"text-accent"},gp=A.forwardRef(({kind:e="other",name:t,arg:n,status:r,statusText:o,durationText:i,children:a,defaultOpen:s=!1,open:l,onOpenChange:u,className:c},d)=>{const h=KT[e];return f.jsxs(ba,{ref:d,"data-testid":"tool-card",defaultOpen:s,open:l,onOpenChange:u,className:q("overflow-hidden rounded-lg border border-border bg-panel text-[13px]",c),children:[f.jsxs(xa,{"data-testid":"tool-card-trigger",className:q("flex w-full cursor-pointer select-none items-center gap-2.5 px-3 py-2 text-left","hover:bg-panel-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[f.jsx("span",{"aria-hidden":!0,className:q("grid h-[22px] w-[22px] shrink-0 place-items-center rounded-md text-xs",h.classes),children:h.glyph}),f.jsx("span",{className:"font-semibold",children:t}),n?f.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-2",children:n}):f.jsx("span",{className:"flex-1"}),f.jsxs("span",{className:q("flex shrink-0 items-center gap-1.5 text-xs text-text-3",fd[r]),children:[r==="running"?f.jsx(pa,{}):null,r==="ok"?"✓":null,r==="error"?"✕":null,o?f.jsx("span",{className:fd[r],children:o}):null,i?f.jsx("span",{children:i}):null]})]}),a||n?f.jsx(Ea,{className:"border-t border-border bg-code-bg",children:f.jsxs("div",{"data-testid":"tool-card-detail",className:"max-h-64 overflow-auto p-3 font-mono text-xs text-text-2",children:[n?f.jsx("div",{"data-testid":"tool-card-full-arg",className:"mb-2.5 whitespace-pre-wrap break-all rounded-md border border-border bg-panel px-2.5 py-1.5 text-text-2",children:n}):null,a]})}):null]})});gp.displayName="ToolCard";const XT=[{key:"searches",label:e=>`${e} ${e===1?"search":"searches"}`},{key:"execs",label:e=>`${e} ${e===1?"command":"commands"}`},{key:"edits",label:e=>`${e} ${e===1?"edit":"edits"}`}],bp=A.forwardRef(({title:e,durationText:t,facts:n,running:r=!1,children:o,defaultOpen:i=!1,open:a,onOpenChange:s,className:l},u)=>{const c=e??(r?"Working…":`Worked for ${t??"a moment"}`);return f.jsxs(ba,{ref:u,"data-testid":"tool-group",defaultOpen:i,open:a,onOpenChange:s,className:q("overflow-hidden rounded-lg border border-border bg-panel",l),children:[f.jsxs(xa,{"data-testid":"tool-group-trigger",className:q("flex w-full cursor-pointer select-none items-center gap-2.5 px-3 py-2.5 text-left text-[13px]","hover:bg-panel-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[f.jsx("span",{"aria-hidden":!0,className:"text-[11px] text-text-3 transition-transform duration-150 [[data-state=open]>&]:rotate-90",children:"▶"}),f.jsx("span",{className:"font-semibold text-text-2",children:c}),n?f.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[XT.map(({key:d,label:h})=>{const p=n[d];return p?f.jsx("span",{className:"rounded-full bg-panel-2 px-2 py-0.5 text-[11.5px] text-text-2",children:h(p)},d):null}),n.ok?f.jsxs("span",{className:"rounded-full bg-panel-2 px-2 py-0.5 text-[11.5px] text-status-ok",children:[f.jsx("span",{"aria-hidden":!0,children:"✓ "}),n.ok," ok"]}):null,n.failed?f.jsxs("span",{className:"rounded-full bg-panel-2 px-2 py-0.5 text-[11.5px] text-status-error",children:[f.jsx("span",{"aria-hidden":!0,children:"✕ "}),n.failed," failed"]}):null]}):null,f.jsx("span",{className:"ml-auto flex shrink-0 items-center gap-1.5 text-xs text-text-3",children:r?f.jsx(pa,{}):null})]}),f.jsx(Ea,{children:f.jsx("div",{"data-testid":"tool-group-body",className:"flex flex-col gap-2 px-2 pb-2 pt-0",children:o})})]})});bp.displayName="ToolGroup";const QT=$n("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11.5px] tabular-nums",{variants:{tone:{neutral:"border-border bg-panel-2 text-text-2",ok:"border-transparent bg-panel-2 text-status-ok",error:"border-transparent bg-panel-2 text-status-error",warning:"border-transparent bg-panel-2 text-accent",running:"border-status-running text-status-running",brand:"border-border bg-transparent text-brand",model:"border-border bg-transparent text-[var(--ui-magenta-500)]"}},defaultVariants:{tone:"neutral"}}),xp=A.forwardRef(({className:e,tone:t,...n},r)=>f.jsx("span",{ref:r,"data-testid":"badge",className:q(QT({tone:t}),e),...n}));xp.displayName="Badge";const Ep=A.forwardRef(({className:e,...t},n)=>f.jsx("button",{ref:n,type:"button","data-testid":"chip",className:q("rounded-full border border-border bg-transparent px-2.5 py-0.5","text-xs text-text-2 hover:bg-panel-2","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","motion-reduce:transition-none transition-colors",e),...t}));Ep.displayName="Chip";const Tp=A.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-testid":"card",className:q("rounded-xl border border-border bg-panel overflow-hidden",e),...t}));Tp.displayName="Card.Root";const yp=A.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:q("flex items-center gap-2.5 border-b border-border px-4 py-2.5 text-sm font-semibold",e),...t}));yp.displayName="Card.Header";const vp=A.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-testid":"card-body",className:q("px-4 py-3.5 text-sm",e),...t}));vp.displayName="Card.Body";const wp=A.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-testid":"card-actions",className:q("flex flex-wrap gap-2.5 border-t border-border px-4 py-3",e),...t}));wp.displayName="Card.Actions";const ar=Object.assign(Tp,{Header:yp,Body:vp,Actions:wp}),ZT={info:{icon:"i",box:"border-border bg-panel text-text-2",glyph:"text-info"},warning:{icon:"!",box:"border-accent/25 bg-add-bg text-foreground",glyph:"text-accent"},error:{icon:"×",box:"border-destructive/25 bg-del-bg text-foreground",glyph:"text-destructive"}},Cp=A.forwardRef(({className:e,severity:t,children:n,...r},o)=>{const i=ZT[t];return f.jsxs("div",{ref:o,"data-testid":"callout",role:t==="error"?"alert":"status",className:q("flex items-baseline gap-3 rounded-lg border px-4 py-3 text-sm",i.box,e),...r,children:[f.jsx("span",{"aria-hidden":!0,className:q("shrink-0 font-bold",i.glyph),children:i.icon}),f.jsx("span",{children:n})]})});Cp.displayName="Callout";const kp=A.forwardRef(({className:e,who:t="You",timestamp:n,children:r,...o},i)=>f.jsxs("div",{ref:i,"data-testid":"user-message",className:q("flex flex-col gap-1.5",e),...o,children:[f.jsxs("div",{className:"flex items-baseline gap-2 text-[12.5px]",children:[f.jsx("span",{className:"font-semibold text-primary",children:t}),n?f.jsx("span",{className:"ml-auto tabular-nums text-text-3",children:n}):null]}),f.jsx("div",{"data-testid":"user-bubble",className:"w-fit max-w-[88%] whitespace-pre-wrap rounded-xl bg-bubble-user px-4 py-3 text-foreground",children:r})]}));kp.displayName="UserMessage";const Sp=A.forwardRef(({className:e,who:t="◆ Nuvin",timestamp:n,children:r,...o},i)=>f.jsxs("div",{ref:i,"data-testid":"assistant-message",className:q("flex flex-col gap-1.5",e),...o,children:[f.jsxs("div",{className:"flex items-baseline gap-2 text-[12.5px]",children:[f.jsx("span",{className:"font-semibold text-brand",children:t}),n?f.jsx("span",{className:"ml-auto tabular-nums text-text-3",children:n}):null]}),f.jsx("div",{"data-testid":"assistant-prose",className:"flex flex-col gap-3 text-[15px] leading-relaxed text-foreground [&_code]:rounded [&_code]:border [&_code]:border-border [&_code]:bg-panel-2 [&_code]:px-1 [&_code]:text-[12.5px] [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:border [&_pre]:border-border [&_pre]:bg-code-bg [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-[12.5px] [&_ul]:list-disc [&_ul]:pl-6",children:r})]}));Sp.displayName="AssistantMessage";const hd={add:"bg-add-bg",del:"bg-del-bg",context:"",hunk:"text-text-3 bg-panel px-3 py-1"},Ap=A.forwardRef(({path:e,additions:t=0,deletions:n=0,lines:r,className:o},i)=>f.jsxs("div",{ref:i,"data-testid":"diff-block",className:q("overflow-hidden rounded-lg border border-border font-mono text-[12.5px]",o),children:[f.jsxs("div",{className:"flex items-center gap-2 border-b border-border bg-panel px-3 py-1.5",children:[f.jsx("span",{className:"truncate text-info",children:e}),f.jsxs("span",{className:"ml-auto shrink-0 tabular-nums",children:[f.jsxs("span",{className:"text-status-ok",children:["+",t]})," ",f.jsxs("span",{className:"text-destructive",children:["−",n]})]})]}),f.jsx("div",{"data-testid":"diff-lines",children:r.map((a,s)=>{const l=a.kind==="hunk"?`hunk-${s}-${a.text}`:`${a.kind}-${a.lineNo??""}-${a.sign}-${a.text}-${s}`;return a.kind==="hunk"?f.jsx("div",{"data-kind":"hunk",className:hd.hunk,children:a.text},l):f.jsxs("div",{"data-kind":a.kind,className:q("flex whitespace-pre px-3",hd[a.kind]),children:[f.jsx("span",{"aria-hidden":!0,className:"w-8 shrink-0 select-none text-right text-text-3",children:a.lineNo??""}),f.jsx("span",{"aria-hidden":!0,className:q("mr-3.5 shrink-0 select-none",a.kind==="add"&&"text-primary",a.kind==="del"&&"text-destructive"),children:a.sign}),f.jsx("span",{className:"min-w-0 flex-1",children:a.text}),f.jsxs("span",{className:"sr-only",children:[a.kind==="add"?"Added":a.kind==="del"?"Removed":"",a.lineNo!==void 0&&a.kind!=="context"?` line ${a.lineNo}`:"",": ",a.text]})]},l)})})]}));Ap.displayName="DiffBlock";const Ta=(function(e){if(e==null)return ny;if(typeof e=="function")return ya(e);if(typeof e=="object")return Array.isArray(e)?JT(e):ey(e);if(typeof e=="string")return ty(e);throw new Error("Expected function, string, or object as test")});function JT(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ta(e[n]);return ya(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function ey(e){const t=e;return ya(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function ty(e){return ya(t);function t(n){return n&&n.type===e}}function ya(e){return t;function t(n,r,o){return!!(ry(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function ny(){return!0}function ry(e){return e!==null&&typeof e=="object"&&"type"in e}const _p=[],Io=!0,el=!1,sr="skip";function va(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Ta(o),a=r?-1:1;s(e,void 0,[])();function s(l,u,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=_p,b,x,E;if((!t||i(l,u,c[c.length-1]||void 0))&&(p=oy(n(l,c)),p[0]===el))return p;if("children"in l&&l.children){const T=l;if(T.children&&p[0]!==sr)for(x=(r?T.children.length:-1)+a,E=c.concat(T);x>-1&&x<T.children.length;){const v=T.children[x];if(b=s(v,x,E)(),b[0]===el)return b;x=typeof b[1]=="number"?b[1]:x+a}}return p}}}function oy(e){return Array.isArray(e)?e:typeof e=="number"?[Io,e]:e==null?_p:[e]}function jt(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),va(e,i,s,o);function s(l,u){const c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return a(l,d,c)}}const Wr={indicator:"indicator",textOnly:"text-only",remove:"remove"};function iy({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:o=[],blockedImageClass:i="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:s=Wr.indicator,imageBlockPolicy:l=Wr.indicator}){const u=t.length&&!t.every(d=>d==="*"),c=n.length&&!n.every(d=>d==="*");if(!e&&(u||c))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const h=dy(e,t,n,r,o,i,a,s,l);Ip(d),jt(d,h)}}function pd(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function ay(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const sy=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),ly=new Set(["javascript:","data:","file:","vbscript:"]);function md(e,t,n,r=!1,o=!1,i=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!o)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return o&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const c=e.substring(5);if(c&&c.length>0&&c!=="invalid")return e}}catch{return null}return null}const a=pd(e,n);if(!a||ly.has(a.protocol)||!(sy.has(a.protocol)||i.includes(a.protocol)||i.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const l=ay(e);return a&&t.some(u=>{const c=pd(u,n);return!c||c.origin!==a.origin?!1:a.href.startsWith(c.href)})?l?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:l?a.pathname+a.search+a.hash:a.href:null}function Ip(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Ip(t)}}const us=Symbol("node-seen");function uy(e,t,n){return t===Wr.remove?{type:"remove"}:t===Wr.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function cy(e,t,n){if(t===Wr.remove)return{type:"remove"};if(t===Wr.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const dy=(e,t,n,r,o,i,a,s,l)=>{const u=(c,d,h)=>{if(c.type!=="element"||c[us])return Io;if(c.tagName==="a"){const p=md(c.properties.href,t,e,!1,!1,o);if(p===null){if(c[us]=!0,jt(c,u),h&&typeof d=="number"){const b=uy(c,s,a);if(b.type==="remove")return h.children.splice(d,1),[sr,d];h.children[d]=b.element}return sr}else return c.properties.href=p,c.properties.target="_blank",c.properties.rel="noopener noreferrer",Io}if(c.tagName==="img"){const p=md(c.properties.src,n,e,r,!0,o);if(p===null){if(c[us]=!0,jt(c,u),h&&typeof d=="number"){const b=cy(c,l,i);if(b.type==="remove")return h.children.splice(d,1),[sr,d];h.children[d]=b.element}return sr}else return c.properties.src=p,Io}return Io};return u},Np=-1,wa=0,Lo=1,Gi=2,iu=3,au=4,su=5,lu=6,Rp=7,Pp=8,{defineProperty:fy}=Object,Op=typeof self=="object"?self:globalThis,gd=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Op[e](t)},hy=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case wa:case Np:return n(a,o);case Lo:{const s=n([],o);for(const l of a)s.push(r(l));return s}case Gi:{const s=n({},o);for(const[l,u]of a){const c=r(l),d=r(u);c==="__proto__"?fy(s,c,{value:d,configurable:!0,enumerable:!0,writable:!0}):s[c]=d}return s}case iu:return n(new Date(a),o);case au:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case su:{const s=n(new Map,o);for(const[l,u]of a)s.set(r(l),r(u));return s}case lu:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case Rp:{const{name:s,message:l}=a;return n(typeof Op[s]=="function"?gd(s,l):new Error(l),o)}case Pp:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}case"-0":return-0}return n(gd(i,a),o)};return r},bd=e=>hy(new Map,e)(0),rr="",{toString:py}={},{keys:my,is:gy}=Object,Eo=e=>{const t=typeof e;if(t!=="object"||!e)return[wa,t];const n=py.call(e).slice(8,-1);switch(n){case"Array":return[Lo,rr];case"Object":return[Gi,rr];case"Date":return[iu,rr];case"RegExp":return[au,rr];case"Map":return[su,rr];case"Set":return[lu,rr];case"DataView":return[Lo,n]}return n.includes("Array")?[Lo,n]:e instanceof Error?[Rp,e.name||"Error"]:[Gi,n]},Ti=([e,t])=>e===wa&&(t==="function"||t==="symbol"),by=(e,t,n,r)=>{const o=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},i=a=>{if(n.has(a))return n.get(a);let[s,l]=Eo(a);switch(s){case wa:{let c=a;switch(l){case"bigint":s=Pp,c=a.toString();break;case"number":if(!a&&gy(a,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return o([Np],a)}return o([s,c],a)}case Lo:{if(l){let h=a;return l==="DataView"?h=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(a)),o([l,[...h]],a)}const c=[],d=o([s,c],a);for(const h of a)c.push(i(h));return d}case Gi:{if(l)switch(l){case"BigInt":return o([l,a.toString()],a);case"Boolean":case"Number":case"String":return o([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const c=[],d=o([s,c],a);for(const h of my(a))(e||!Ti(Eo(a[h])))&&c.push([i(h),i(a[h])]);return d}case iu:return o([s,isNaN(a.getTime())?rr:a.toISOString()],a);case au:{const{source:c,flags:d}=a;return o([s,{source:c,flags:d}],a)}case su:{const c=[],d=o([s,c],a);for(const[h,p]of a)(e||!(Ti(Eo(h))||Ti(Eo(p))))&&c.push([i(h),i(p)]);return d}case lu:{const c=[],d=o([s,c],a);for(const h of a)(e||!Ti(Eo(h)))&&c.push(i(h));return d}}const{message:u}=a;return o([s,{name:l,message:u}],a)};return i},xd=(e,{json:t,lossy:n}={})=>{const r=[];return by(!(t||n),!!t,new Map,r)(e),r},fr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?bd(xd(e,t)):structuredClone(e):(e,t)=>bd(xd(e,t));class ni{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ni.prototype.normal={};ni.prototype.property={};ni.prototype.space=void 0;function Lp(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new ni(n,r,t)}function zo(e){return e.toLowerCase()}let yt=class{constructor(t,n){this.attribute=n,this.property=t}};yt.prototype.attribute="";yt.prototype.booleanish=!1;yt.prototype.boolean=!1;yt.prototype.commaOrSpaceSeparated=!1;yt.prototype.commaSeparated=!1;yt.prototype.defined=!1;yt.prototype.mustUseProperty=!1;yt.prototype.number=!1;yt.prototype.overloadedBoolean=!1;yt.prototype.property="";yt.prototype.spaceSeparated=!1;yt.prototype.space=void 0;let xy=0;const me=Tr(),Ge=Tr(),tl=Tr(),Z=Tr(),Le=Tr(),ur=Tr(),Ct=Tr();function Tr(){return 2**++xy}const nl=Object.freeze(Object.defineProperty({__proto__:null,boolean:me,booleanish:Ge,commaOrSpaceSeparated:Ct,commaSeparated:ur,number:Z,overloadedBoolean:tl,spaceSeparated:Le},Symbol.toStringTag,{value:"Module"})),cs=Object.keys(nl);class uu extends yt{constructor(t,n,r,o){let i=-1;if(super(t,n),Ed(this,"space",o),typeof r=="number")for(;++i<cs.length;){const a=cs[i];Ed(this,cs[i],(r&nl[a])===nl[a])}}}uu.prototype.defined=!0;function Ed(e,t,n){n&&(e[t]=n)}function Zr(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new uu(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[zo(r)]=r,n[zo(i.attribute)]=r}return new ni(t,n,e.space)}const Dp=Zr({properties:{ariaActiveDescendant:null,ariaAtomic:Ge,ariaAutoComplete:null,ariaBusy:Ge,ariaChecked:Ge,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Le,ariaCurrent:null,ariaDescribedBy:Le,ariaDetails:null,ariaDisabled:Ge,ariaDropEffect:Le,ariaErrorMessage:null,ariaExpanded:Ge,ariaFlowTo:Le,ariaGrabbed:Ge,ariaHasPopup:null,ariaHidden:Ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Le,ariaLevel:Z,ariaLive:null,ariaModal:Ge,ariaMultiLine:Ge,ariaMultiSelectable:Ge,ariaOrientation:null,ariaOwns:Le,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:Ge,ariaReadOnly:Ge,ariaRelevant:null,ariaRequired:Ge,ariaRoleDescription:Le,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:Ge,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Mp(e,t){return t in e?e[t]:t}function Fp(e,t){return Mp(e,t.toLowerCase())}const Ey=Zr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ur,acceptCharset:Le,accessKey:Le,action:null,allow:null,allowFullScreen:me,allowPaymentRequest:me,allowUserMedia:me,alpha:me,alt:null,as:null,async:me,autoCapitalize:null,autoComplete:Le,autoFocus:me,autoPlay:me,blocking:Le,capture:null,charSet:null,checked:me,cite:null,className:Le,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:Ge,controls:me,controlsList:Le,coords:Z|ur,crossOrigin:null,data:null,dateTime:null,decoding:null,default:me,defer:me,dir:null,dirName:null,disabled:me,download:tl,draggable:Ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:me,formTarget:null,headers:Le,height:Z,hidden:tl,high:Z,href:null,hrefLang:null,htmlFor:Le,httpEquiv:Le,id:null,imageSizes:null,imageSrcSet:null,inert:me,inputMode:null,integrity:null,is:null,isMap:me,itemId:null,itemProp:Le,itemRef:Le,itemScope:me,itemType:Le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:me,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:me,muted:me,name:null,nonce:null,noModule:me,noValidate:me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:me,optimum:Z,pattern:null,ping:Le,placeholder:null,playsInline:me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:me,referrerPolicy:null,rel:Le,required:me,reversed:me,rows:Z,rowSpan:Z,sandbox:Le,scope:null,scoped:me,seamless:me,selected:me,shadowRootClonable:me,shadowRootCustomElementRegistry:me,shadowRootDelegatesFocus:me,shadowRootMode:null,shadowRootSerializable:me,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:Ge,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:me,useMap:null,value:Ge,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Le,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:me,declare:me,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:me,noHref:me,noShade:me,noWrap:me,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:Ge,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:me,disablePictureInPicture:me,disableRemotePlayback:me,exportParts:ur,part:Le,prefix:null,property:null,results:Z,security:null,unselectable:null},space:"html",transform:Fp}),Ty=Zr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ct,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:me,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ur,g2:ur,glyphName:ur,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:Ct,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ct,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ct,rev:Ct,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ct,requiredFeatures:Ct,requiredFonts:Ct,requiredFormats:Ct,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:Ct,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ct,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ct,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Mp}),Bp=Zr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),jp=Zr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Fp}),Hp=Zr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),yy={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},vy=/[A-Z]/g,Td=/-[a-z]/g,wy=/^data[-\w.:]+$/i;function Ca(e,t){const n=zo(t);let r=t,o=yt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wy.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Td,ky);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Td.test(i)){let a=i.replace(vy,Cy);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=uu}return new o(r,t)}function Cy(e){return"-"+e.toLowerCase()}function ky(e){return e.charAt(1).toUpperCase()}const ri=Lp([Dp,Ey,Bp,jp,Hp],"html"),zn=Lp([Dp,Ty,Bp,jp,Hp],"svg");function yd(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const a=n.slice(o,r).trim();(a||!i)&&t.push(a),o=r+1,r=n.indexOf(",",o)}return t}function Up(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const vd=/[#.]/g;function Sy(e,t){const n=e||"",r={};let o=0,i,a;for(;o<n.length;){vd.lastIndex=o;const s=vd.exec(n),l=n.slice(o,s?s.index:n.length);l&&(i?i==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:a=l,o+=l.length),s&&(i=s[0],o++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function wd(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function $p(e){return e.join(" ").trim()}function zp(e,t,n){const r=n?Ny(n):void 0;function o(i,a,...s){let l;if(i==null){l={type:"root",children:[]};const u=a;s.unshift(u)}else{l=Sy(i,t);const u=l.tagName.toLowerCase(),c=r?r.get(u):void 0;if(l.tagName=c||u,Ay(a))s.unshift(a);else for(const[d,h]of Object.entries(a))_y(e,l.properties,d,h)}for(const u of s)rl(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return o}function Ay(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const i=o;for(const a of i)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function _y(e,t,n,r){const o=Ca(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?o.spaceSeparated?i=wd(r):o.commaSeparated?i=yd(r):o.commaOrSpaceSeparated?i=wd(yd(r).join(" ")):i=Cd(o,o.property,r):Array.isArray(r)?i=[...r]:i=o.property==="style"?Iy(r):String(r);if(Array.isArray(i)){const a=[];for(const s of i)a.push(Cd(o,o.property,s));i=a}o.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[o.property]=i}}function rl(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)rl(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?rl(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Cd(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||zo(n)===zo(t)))return!0}return n}function Iy(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Ny(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Ry=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Py=zp(ri,"div"),Oy=zp(zn,"g",Ry);function Ly(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let a=0;for(;;){let s=n[a];if(s===void 0){const l=kd(t,n[a-1]);s=l===-1?t.length+1:l+1,n[a]=s}if(s>i)return{line:a+1,column:i-(a>0?n[a-1]:0)+1,offset:i};a++}}}function o(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const s=n[n.length-1],l=kd(t,s),u=l===-1?t.length+1:l+1;if(s===u)break;n.push(u)}const a=(i.line>1?n[i.line-2]:0)+i.column-1;if(a<n[i.line-1])return a}}}function kd(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
2
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const lr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Vp={}.hasOwnProperty,Dy=Object.prototype;function My(e,t){const n=t||{};return cu({file:n.file||void 0,location:!1,schema:n.space==="svg"?zn:ri,verbose:n.verbose||!1},e)}function cu(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ji(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Wp(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const i=String(e.file),a=Ly(i),s=a.toPoint(0),l=a.toPoint(i.length);n.position={start:s,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ji(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ji(e,r,n),n}default:return n=Fy(e,t),n}}function Wp(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=cu(e,t[n]);r.push(o)}return r}function Fy(e,t){const n=e.schema;e.schema=t.namespaceURI===lr.svg?zn:ri;let r=-1;const o={};for(;++r<t.attrs.length;){const s=t.attrs[r],l=(s.prefix?s.prefix+":":"")+s.name;Vp.call(Dy,l)||(o[l]=s.value)}const a=(e.schema.space==="svg"?Oy:Py)(t.tagName,o,Wp(e,t.childNodes));if(ji(e,t,a),a.tagName==="template"){const s=t,l=s.sourceCodeLocation,u=l&&l.startTag&&Hr(l.startTag),c=l&&l.endTag&&Hr(l.endTag),d=cu(e,s.content);u&&c&&e.file&&(d.position={start:u.end,end:c.start}),a.content=d}return e.schema=n,a}function ji(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=By(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function By(e,t,n){const r=Hr(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const i={};let a;if(n.attrs)for(a in n.attrs)Vp.call(n.attrs,a)&&(i[Ca(e.schema,a).property]=Hr(n.attrs[a]));n.startTag;const s=Hr(n.startTag),l=n.endTag?Hr(n.endTag):void 0,u={opening:s};l&&(u.closing=l),u.properties=i,t.data={position:u}}}return r}function Hr(e){const t=Sd({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Sd({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Sd(e){return e.line&&e.column?e:void 0}const Ad={}.hasOwnProperty;function Yp(e,t){const n=t||{};function r(o,...i){let a=r.invalid;const s=r.handlers;if(o&&Ad.call(o,e)){const l=String(o[e]);a=Ad.call(s,l)?s[l]:r.unknown}if(a)return a.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const jy={},Hy={}.hasOwnProperty,qp=Yp("type",{handlers:{root:$y,element:qy,text:Wy,comment:Yy,doctype:Vy}});function Uy(e,t){const r=(t||jy).space;return qp(e,r==="svg"?zn:ri)}function $y(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=du(e.children,n,t),Jr(e,n),n}function zy(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=du(e.children,n,t),Jr(e,n),n}function Vy(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Jr(e,t),t}function Wy(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Jr(e,t),t}function Yy(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Jr(e,t),t}function qy(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=zn);const o=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&Hy.call(e.properties,i)){const l=Gy(r,i,e.properties[i]);l&&o.push(l)}}const a=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:lr[a],childNodes:[],parentNode:null};return s.childNodes=du(e.children,s,r),Jr(e,s),e.tagName==="template"&&e.content&&(s.content=zy(e.content,r)),s}function Gy(e,t,n){const r=Ca(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Up(n):$p(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=o.name.indexOf(":");i<0?o.prefix="":(o.name=o.name.slice(i+1),o.prefix=r.attribute.slice(0,i)),o.namespace=lr[r.space]}return o}function du(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const i=qp(e[r],n);i.parentNode=t,o.push(i)}return o}function Jr(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Ky=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Xy=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),He="�";var S;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(S||(S={}));const xt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Gp(e){return e>=55296&&e<=57343}function Qy(e){return e>=56320&&e<=57343}function Zy(e,t){return(e-55296)*1024+9216+t}function Kp(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Xp(e){return e>=64976&&e<=65007||Xy.has(e)}var U;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(U||(U={}));const Jy=65536;class ev{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Jy,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:i}=this,a=o+n,s=i+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:s,endOffset:s}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Qy(n))return this.pos++,this._addGap(),Zy(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,S.EOF;return this._err(U.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,S.EOF;const r=this.html.charCodeAt(n);return r===S.CARRIAGE_RETURN?S.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,S.EOF;let t=this.html.charCodeAt(this.pos);return t===S.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,S.LINE_FEED):t===S.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Gp(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===S.LINE_FEED||t===S.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Kp(t)?this._err(U.controlCharacterInInputStream):Xp(t)&&this._err(U.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ye;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ye||(ye={}));function Qp(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const tv=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),nv=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function rv(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=nv.get(e))!==null&&t!==void 0?t:e}var tt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(tt||(tt={}));const ov=32;var On;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(On||(On={}));function ol(e){return e>=tt.ZERO&&e<=tt.NINE}function iv(e){return e>=tt.UPPER_A&&e<=tt.UPPER_F||e>=tt.LOWER_A&&e<=tt.LOWER_F}function av(e){return e>=tt.UPPER_A&&e<=tt.UPPER_Z||e>=tt.LOWER_A&&e<=tt.LOWER_Z||ol(e)}function sv(e){return e===tt.EQUALS||av(e)}var Je;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Je||(Je={}));var hn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(hn||(hn={}));class lv{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Je.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=hn.Strict}startEntity(t){this.decodeMode=t,this.state=Je.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Je.EntityStart:return t.charCodeAt(n)===tt.NUM?(this.state=Je.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Je.NamedEntity,this.stateNamedEntity(t,n));case Je.NumericStart:return this.stateNumericStart(t,n);case Je.NumericDecimal:return this.stateNumericDecimal(t,n);case Je.NumericHex:return this.stateNumericHex(t,n);case Je.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|ov)===tt.LOWER_X?(this.state=Je.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Je.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+Number.parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(ol(o)||iv(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(ol(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===tt.SEMI)this.consumed+=1;else if(this.decodeMode===hn.Strict)return 0;return this.emitCodePoint(rv(this.result),this.consumed),this.errors&&(t!==tt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&On.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=uv(r,o,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===hn.Attribute&&(i===0||sv(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&On.VALUE_LENGTH)>>14,i!==0){if(a===tt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==hn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&On.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~On.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Je.NamedEntity:return this.result!==0&&(this.decodeMode!==hn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Je.NumericDecimal:return this.emitNumericEntity(0,2);case Je.NumericHex:return this.emitNumericEntity(0,3);case Je.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Je.EntityStart:return 0}}}function uv(e,t,n,r){const o=(t&On.BRANCH_LENGTH)>>7,i=t&On.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const l=r-i;return l<0||l>=o?-1:e[n+l]-1}let a=n,s=a+o-1;for(;a<=s;){const l=a+s>>>1,u=e[l];if(u<r)a=l+1;else if(u>r)s=l-1;else return e[l+o]}return-1}var G;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(G||(G={}));var cr;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(cr||(cr={}));var It;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(It||(It={}));var B;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(B||(B={}));var m;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(m||(m={}));const cv=new Map([[B.A,m.A],[B.ADDRESS,m.ADDRESS],[B.ANNOTATION_XML,m.ANNOTATION_XML],[B.APPLET,m.APPLET],[B.AREA,m.AREA],[B.ARTICLE,m.ARTICLE],[B.ASIDE,m.ASIDE],[B.B,m.B],[B.BASE,m.BASE],[B.BASEFONT,m.BASEFONT],[B.BGSOUND,m.BGSOUND],[B.BIG,m.BIG],[B.BLOCKQUOTE,m.BLOCKQUOTE],[B.BODY,m.BODY],[B.BR,m.BR],[B.BUTTON,m.BUTTON],[B.CAPTION,m.CAPTION],[B.CENTER,m.CENTER],[B.CODE,m.CODE],[B.COL,m.COL],[B.COLGROUP,m.COLGROUP],[B.DD,m.DD],[B.DESC,m.DESC],[B.DETAILS,m.DETAILS],[B.DIALOG,m.DIALOG],[B.DIR,m.DIR],[B.DIV,m.DIV],[B.DL,m.DL],[B.DT,m.DT],[B.EM,m.EM],[B.EMBED,m.EMBED],[B.FIELDSET,m.FIELDSET],[B.FIGCAPTION,m.FIGCAPTION],[B.FIGURE,m.FIGURE],[B.FONT,m.FONT],[B.FOOTER,m.FOOTER],[B.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[B.FORM,m.FORM],[B.FRAME,m.FRAME],[B.FRAMESET,m.FRAMESET],[B.H1,m.H1],[B.H2,m.H2],[B.H3,m.H3],[B.H4,m.H4],[B.H5,m.H5],[B.H6,m.H6],[B.HEAD,m.HEAD],[B.HEADER,m.HEADER],[B.HGROUP,m.HGROUP],[B.HR,m.HR],[B.HTML,m.HTML],[B.I,m.I],[B.IMG,m.IMG],[B.IMAGE,m.IMAGE],[B.INPUT,m.INPUT],[B.IFRAME,m.IFRAME],[B.KEYGEN,m.KEYGEN],[B.LABEL,m.LABEL],[B.LI,m.LI],[B.LINK,m.LINK],[B.LISTING,m.LISTING],[B.MAIN,m.MAIN],[B.MALIGNMARK,m.MALIGNMARK],[B.MARQUEE,m.MARQUEE],[B.MATH,m.MATH],[B.MENU,m.MENU],[B.META,m.META],[B.MGLYPH,m.MGLYPH],[B.MI,m.MI],[B.MO,m.MO],[B.MN,m.MN],[B.MS,m.MS],[B.MTEXT,m.MTEXT],[B.NAV,m.NAV],[B.NOBR,m.NOBR],[B.NOFRAMES,m.NOFRAMES],[B.NOEMBED,m.NOEMBED],[B.NOSCRIPT,m.NOSCRIPT],[B.OBJECT,m.OBJECT],[B.OL,m.OL],[B.OPTGROUP,m.OPTGROUP],[B.OPTION,m.OPTION],[B.P,m.P],[B.PARAM,m.PARAM],[B.PLAINTEXT,m.PLAINTEXT],[B.PRE,m.PRE],[B.RB,m.RB],[B.RP,m.RP],[B.RT,m.RT],[B.RTC,m.RTC],[B.RUBY,m.RUBY],[B.S,m.S],[B.SCRIPT,m.SCRIPT],[B.SEARCH,m.SEARCH],[B.SECTION,m.SECTION],[B.SELECT,m.SELECT],[B.SOURCE,m.SOURCE],[B.SMALL,m.SMALL],[B.SPAN,m.SPAN],[B.STRIKE,m.STRIKE],[B.STRONG,m.STRONG],[B.STYLE,m.STYLE],[B.SUB,m.SUB],[B.SUMMARY,m.SUMMARY],[B.SUP,m.SUP],[B.TABLE,m.TABLE],[B.TBODY,m.TBODY],[B.TEMPLATE,m.TEMPLATE],[B.TEXTAREA,m.TEXTAREA],[B.TFOOT,m.TFOOT],[B.TD,m.TD],[B.TH,m.TH],[B.THEAD,m.THEAD],[B.TITLE,m.TITLE],[B.TR,m.TR],[B.TRACK,m.TRACK],[B.TT,m.TT],[B.U,m.U],[B.UL,m.UL],[B.SVG,m.SVG],[B.VAR,m.VAR],[B.WBR,m.WBR],[B.XMP,m.XMP]]);function eo(e){var t;return(t=cv.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const X=m,dv={[G.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[G.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[G.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[G.XLINK]:new Set,[G.XML]:new Set,[G.XMLNS]:new Set},il=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);B.STYLE,B.SCRIPT,B.XMP,B.IFRAME,B.NOEMBED,B.NOFRAMES,B.PLAINTEXT;var N;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(N||(N={}));const ze={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function fv(e){return e>=S.DIGIT_0&&e<=S.DIGIT_9}function No(e){return e>=S.LATIN_CAPITAL_A&&e<=S.LATIN_CAPITAL_Z}function hv(e){return e>=S.LATIN_SMALL_A&&e<=S.LATIN_SMALL_Z}function Nn(e){return hv(e)||No(e)}function _d(e){return Nn(e)||fv(e)}function yi(e){return e+32}function Zp(e){return e===S.SPACE||e===S.LINE_FEED||e===S.TABULATION||e===S.FORM_FEED}function Id(e){return Zp(e)||e===S.SOLIDUS||e===S.GREATER_THAN_SIGN}function pv(e){return e===S.NULL?U.nullCharacterReference:e>1114111?U.characterReferenceOutsideUnicodeRange:Gp(e)?U.surrogateCharacterReference:Xp(e)?U.noncharacterCharacterReference:Kp(e)||e===S.CARRIAGE_RETURN?U.controlCharacterReference:null}class mv{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=N.DATA,this.returnState=N.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new ev(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new lv(tv,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(U.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(U.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=pv(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ye.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ye.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ye.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ye.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Qp(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(U.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=eo(t.tagName),t.type===ye.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(U.endTagWithAttributes),t.selfClosing&&this._err(U.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case ye.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ye.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ye.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:ye.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Zp(t)?ye.WHITESPACE_CHARACTER:t===S.NULL?ye.NULL_CHARACTER:ye.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ye.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?hn.Attribute:hn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case S.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.NULL:{this._err(U.unexpectedNullCharacter),this._emitCodePoint(t);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case S.AMPERSAND:{this._startCharacterReference();break}case S.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case S.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(He);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case S.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case S.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(He);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case S.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(He);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case S.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(He);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Nn(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case S.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case S.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case S.QUESTION_MARK:{this._err(U.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case S.EOF:{this._err(U.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(U.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Nn(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case S.GREATER_THAN_SIGN:{this._err(U.missingEndTagName),this.state=N.DATA;break}case S.EOF:{this._err(U.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(U.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case S.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case S.NULL:{this._err(U.unexpectedNullCharacter),n.tagName+=He;break}case S.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(No(t)?yi(t):t)}}_stateRcdataLessThanSign(t){t===S.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Nn(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case S.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case S.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===S.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Nn(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case S.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case S.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Nn(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===S.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===S.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case S.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case S.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(He);break}case S.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case S.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case S.NULL:{this._err(U.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(He);break}case S.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case S.HYPHEN_MINUS:{this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case S.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case S.NULL:{this._err(U.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(He);break}case S.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===S.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Nn(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Nn(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(xt.SCRIPT,!1)&&Id(this.preprocessor.peek(xt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<xt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case S.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case S.NULL:{this._err(U.unexpectedNullCharacter),this._emitChars(He);break}case S.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case S.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case S.NULL:{this._err(U.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(He);break}case S.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case S.HYPHEN_MINUS:{this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case S.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case S.NULL:{this._err(U.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(He);break}case S.EOF:{this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===S.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(xt.SCRIPT,!1)&&Id(this.preprocessor.peek(xt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<xt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.SOLIDUS:case S.GREATER_THAN_SIGN:case S.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case S.EQUALS_SIGN:{this._err(U.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:case S.SOLIDUS:case S.GREATER_THAN_SIGN:case S.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case S.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case S.QUOTATION_MARK:case S.APOSTROPHE:case S.LESS_THAN_SIGN:{this._err(U.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case S.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.name+=He;break}default:this.currentAttr.name+=String.fromCodePoint(No(t)?yi(t):t)}}_stateAfterAttributeName(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case S.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case S.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(U.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case S.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=He;break}case S.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case S.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=He;break}case S.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case S.NULL:{this._err(U.unexpectedNullCharacter),this.currentAttr.value+=He;break}case S.QUOTATION_MARK:case S.APOSTROPHE:case S.LESS_THAN_SIGN:case S.EQUALS_SIGN:case S.GRAVE_ACCENT:{this._err(U.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case S.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case S.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case S.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case S.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case S.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case S.EOF:{this._err(U.eofInTag),this._emitEOFToken();break}default:this._err(U.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case S.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case S.NULL:{this._err(U.unexpectedNullCharacter),n.data+=He;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(xt.DASH_DASH,!0)?(this._createCommentToken(xt.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(xt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(xt.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(xt.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(U.cdataInHtmlContent),this._createCommentToken(xt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(U.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case S.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case S.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case S.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case S.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case S.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case S.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case S.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case S.NULL:{this._err(U.unexpectedNullCharacter),n.data+=He;break}case S.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case S.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case S.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===S.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===S.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==S.GREATER_THAN_SIGN&&t!==S.EOF&&this._err(U.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case S.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case S.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case S.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case S.HYPHEN_MINUS:{n.data+="-";break}case S.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case S.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case S.GREATER_THAN_SIGN:{this._err(U.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case S.EOF:{this._err(U.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case S.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case S.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(No(t))this._createDoctypeToken(String.fromCharCode(yi(t))),this.state=N.DOCTYPE_NAME;else switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.NULL:{this._err(U.unexpectedNullCharacter),this._createDoctypeToken(He),this.state=N.DOCTYPE_NAME;break}case S.GREATER_THAN_SIGN:{this._err(U.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.NULL:{this._err(U.unexpectedNullCharacter),n.name+=He;break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(No(t)?yi(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(xt.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(xt.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(U.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case S.QUOTATION_MARK:{this._err(U.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this._err(U.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(U.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(U.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case S.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case S.NULL:{this._err(U.unexpectedNullCharacter),n.publicId+=He;break}case S.GREATER_THAN_SIGN:{this._err(U.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case S.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case S.NULL:{this._err(U.unexpectedNullCharacter),n.publicId+=He;break}case S.GREATER_THAN_SIGN:{this._err(U.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.QUOTATION_MARK:{this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case S.QUOTATION_MARK:{this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(U.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(U.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case S.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case S.NULL:{this._err(U.unexpectedNullCharacter),n.systemId+=He;break}case S.GREATER_THAN_SIGN:{this._err(U.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case S.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case S.NULL:{this._err(U.unexpectedNullCharacter),n.systemId+=He;break}case S.GREATER_THAN_SIGN:{this._err(U.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(U.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(U.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case S.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.NULL:{this._err(U.unexpectedNullCharacter);break}case S.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case S.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case S.EOF:{this._err(U.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===S.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case S.GREATER_THAN_SIGN:{this.state=N.DATA;break}case S.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(S.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&_d(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){_d(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===S.SEMICOLON&&this._err(U.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Jp=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),Nd=new Set([...Jp,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Ki=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),gv=new Set([...Ki,m.OL,m.UL]),bv=new Set([...Ki,m.BUTTON]),Rd=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),Pd=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),xv=new Set([m.TR,m.TEMPLATE,m.HTML]),Ev=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),Tv=new Set([m.TABLE,m.TEMPLATE,m.HTML]),yv=new Set([m.TD,m.TH]);class vv{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===G.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==G.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(il,G.HTML)}popUntilTableCellPopped(){this.popUntilPopped(yv,G.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Tv,G.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Ev,G.HTML)}clearBackToTableRowContext(){this.clearBackTo(xv,G.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===m.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case G.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case G.SVG:{if(Pd.has(o))return!1;break}case G.MATHML:{if(Rd.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ki)}hasInListItemScope(t){return this.hasInDynamicScope(t,gv)}hasInButtonScope(t){return this.hasInDynamicScope(t,bv)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case G.HTML:{if(il.has(n))return!0;if(Ki.has(n))return!1;break}case G.SVG:{if(Pd.has(n))return!1;break}case G.MATHML:{if(Rd.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===G.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===G.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===G.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Jp.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Nd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Nd.has(this.currentTagId);)this.pop()}}const ds=3;var qt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(qt||(qt={}));const Od={type:qt.Marker};class wv{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,i=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const l=this.entries[s];if(l.type===qt.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===i&&this.treeAdapter.getNamespaceURI(u)===a){const c=this.treeAdapter.getAttrList(u);c.length===o&&r.push({idx:s,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ds)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ds)return;const o=new Map(n.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<r.length;a++){const s=r[a];s.attrs.every(l=>o.get(l.name)===l.value)&&(i+=1,i>=ds&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(Od)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:qt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:qt.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Od);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===qt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===qt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===qt.Element&&n.element===t)}}const Rn={createDocument(){return{nodeName:"#document",mode:It.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(i=>i.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Rn.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Rn.isTextNode(n)){n.value+=t;return}}Rn.appendChild(e,Rn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Rn.isTextNode(r)?r.value+=t:Rn.insertBefore(e,Rn.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},em="html",Cv="about:legacy-compat",kv="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",tm=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Sv=[...tm,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Av=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),nm=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],_v=[...nm,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ld(e,t){return t.some(n=>e.startsWith(n))}function Iv(e){return e.name===em&&e.publicId===null&&(e.systemId===null||e.systemId===Cv)}function Nv(e){if(e.name!==em)return It.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===kv)return It.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Av.has(n))return It.QUIRKS;let r=t===null?Sv:tm;if(Ld(n,r))return It.QUIRKS;if(r=t===null?nm:_v,Ld(n,r))return It.LIMITED_QUIRKS}return It.NO_QUIRKS}const Dd={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Rv="definitionurl",Pv="definitionURL",Ov=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Lv=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:G.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:G.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:G.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:G.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:G.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:G.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:G.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:G.XML}],["xml:space",{prefix:"xml",name:"space",namespace:G.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:G.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:G.XMLNS}]]),Dv=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Mv=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function Fv(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===cr.COLOR||r===cr.SIZE||r===cr.FACE)||Mv.has(t)}function rm(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Rv){e.attrs[t].name=Pv;break}}function om(e){for(let t=0;t<e.attrs.length;t++){const n=Ov.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function fu(e){for(let t=0;t<e.attrs.length;t++){const n=Lv.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Bv(e){const t=Dv.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=eo(e.tagName))}function jv(e,t){return t===G.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function Hv(e,t,n){if(t===G.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===cr.ENCODING){const o=n[r].value.toLowerCase();return o===Dd.TEXT_HTML||o===Dd.APPLICATION_XML}}return t===G.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function Uv(e,t,n,r){return(!r||r===G.HTML)&&Hv(e,t,n)||(!r||r===G.MATHML)&&jv(e,t)}const $v="hidden",zv=8,Vv=3;var O;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(O||(O={}));const Wv={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},im=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),Md={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Rn,onParseError:null};class Fd{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=O.INITIAL,this.originalInsertionMode=O.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Md,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new mv(this.options,this),this.activeFormattingElements=new wv(this.treeAdapter),this.fragmentContextID=r?eo(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new vv(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Md,...n};t??(t=r.treeAdapter.createElement(B.TEMPLATE,G.HTML,[]));const o=r.treeAdapter.createElement("documentmock",G.HTML,[]),i=new this(r,o,t);return i.fragmentContextID===m.TEMPLATE&&i.tmplInsertionModeStack.unshift(O.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const i=(o=t.location)!==null&&o!==void 0?o:Wv,a={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(t,n,r){var o,i;(i=(o=this.treeAdapter).onItemPush)===null||i===void 0||i.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===G.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,G.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=O.TEXT}switchToPlaintextParsing(){this.insertionMode=O.TEXT,this.originalInsertionMode=O.IN_BODY,this.tokenizer.state=ze.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===B.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==G.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=ze.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=ze.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=ze.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=ze.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,G.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,G.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(B.HTML,G.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),i=r?o.lastIndexOf(r):o.length,a=o[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:l,endCol:u,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:u,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),i=n.type===ye.END_TAG&&o===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===B.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===G.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,G.HTML)}_processToken(t){switch(t.type){case ye.CHARACTER:{this.onCharacter(t);break}case ye.NULL_CHARACTER:{this.onNullCharacter(t);break}case ye.COMMENT:{this.onComment(t);break}case ye.DOCTYPE:{this.onDoctype(t);break}case ye.START_TAG:{this._processStartTag(t);break}case ye.END_TAG:{this.onEndTag(t);break}case ye.EOF:{this.onEof(t);break}case ye.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return Uv(t,o,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===qt.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const i=this.activeFormattingElements.entries[o];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=O.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=O.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=O.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=O.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=O.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=O.IN_TABLE;return}case m.BODY:{this.insertionMode=O.IN_BODY;return}case m.FRAMESET:{this.insertionMode=O.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?O.AFTER_HEAD:O.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=O.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=O.IN_HEAD;return}break}}this.insertionMode=O.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=O.IN_SELECT_IN_TABLE;return}}this.insertionMode=O.IN_SELECT}_isElementCausesFosterParenting(t){return im.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===G.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return dv[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){yC(this,t);return}switch(this.insertionMode){case O.INITIAL:{To(this,t);break}case O.BEFORE_HTML:{Do(this,t);break}case O.BEFORE_HEAD:{Mo(this,t);break}case O.IN_HEAD:{Fo(this,t);break}case O.IN_HEAD_NO_SCRIPT:{Bo(this,t);break}case O.AFTER_HEAD:{jo(this,t);break}case O.IN_BODY:case O.IN_CAPTION:case O.IN_CELL:case O.IN_TEMPLATE:{sm(this,t);break}case O.TEXT:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{fs(this,t);break}case O.IN_TABLE_TEXT:{hm(this,t);break}case O.IN_COLUMN_GROUP:{Xi(this,t);break}case O.AFTER_BODY:{Qi(this,t);break}case O.AFTER_AFTER_BODY:{Hi(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){TC(this,t);return}switch(this.insertionMode){case O.INITIAL:{To(this,t);break}case O.BEFORE_HTML:{Do(this,t);break}case O.BEFORE_HEAD:{Mo(this,t);break}case O.IN_HEAD:{Fo(this,t);break}case O.IN_HEAD_NO_SCRIPT:{Bo(this,t);break}case O.AFTER_HEAD:{jo(this,t);break}case O.TEXT:{this._insertCharacters(t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{fs(this,t);break}case O.IN_COLUMN_GROUP:{Xi(this,t);break}case O.AFTER_BODY:{Qi(this,t);break}case O.AFTER_AFTER_BODY:{Hi(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){al(this,t);return}switch(this.insertionMode){case O.INITIAL:case O.BEFORE_HTML:case O.BEFORE_HEAD:case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:case O.IN_BODY:case O.IN_TABLE:case O.IN_CAPTION:case O.IN_COLUMN_GROUP:case O.IN_TABLE_BODY:case O.IN_ROW:case O.IN_CELL:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:case O.IN_TEMPLATE:case O.IN_FRAMESET:case O.AFTER_FRAMESET:{al(this,t);break}case O.IN_TABLE_TEXT:{yo(this,t);break}case O.AFTER_BODY:{Zv(this,t);break}case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{Jv(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case O.INITIAL:{ew(this,t);break}case O.BEFORE_HEAD:case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:{this._err(t,U.misplacedDoctype);break}case O.IN_TABLE_TEXT:{yo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,U.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?vC(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{To(this,t);break}case O.BEFORE_HTML:{tw(this,t);break}case O.BEFORE_HEAD:{rw(this,t);break}case O.IN_HEAD:{Ut(this,t);break}case O.IN_HEAD_NO_SCRIPT:{aw(this,t);break}case O.AFTER_HEAD:{lw(this,t);break}case O.IN_BODY:{dt(this,t);break}case O.IN_TABLE:{Yr(this,t);break}case O.IN_TABLE_TEXT:{yo(this,t);break}case O.IN_CAPTION:{oC(this,t);break}case O.IN_COLUMN_GROUP:{mu(this,t);break}case O.IN_TABLE_BODY:{Aa(this,t);break}case O.IN_ROW:{_a(this,t);break}case O.IN_CELL:{sC(this,t);break}case O.IN_SELECT:{gm(this,t);break}case O.IN_SELECT_IN_TABLE:{uC(this,t);break}case O.IN_TEMPLATE:{dC(this,t);break}case O.AFTER_BODY:{hC(this,t);break}case O.IN_FRAMESET:{pC(this,t);break}case O.AFTER_FRAMESET:{gC(this,t);break}case O.AFTER_AFTER_BODY:{xC(this,t);break}case O.AFTER_AFTER_FRAMESET:{EC(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?wC(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{To(this,t);break}case O.BEFORE_HTML:{nw(this,t);break}case O.BEFORE_HEAD:{ow(this,t);break}case O.IN_HEAD:{iw(this,t);break}case O.IN_HEAD_NO_SCRIPT:{sw(this,t);break}case O.AFTER_HEAD:{uw(this,t);break}case O.IN_BODY:{Sa(this,t);break}case O.TEXT:{Gw(this,t);break}case O.IN_TABLE:{Vo(this,t);break}case O.IN_TABLE_TEXT:{yo(this,t);break}case O.IN_CAPTION:{iC(this,t);break}case O.IN_COLUMN_GROUP:{aC(this,t);break}case O.IN_TABLE_BODY:{sl(this,t);break}case O.IN_ROW:{mm(this,t);break}case O.IN_CELL:{lC(this,t);break}case O.IN_SELECT:{bm(this,t);break}case O.IN_SELECT_IN_TABLE:{cC(this,t);break}case O.IN_TEMPLATE:{fC(this,t);break}case O.AFTER_BODY:{Em(this,t);break}case O.IN_FRAMESET:{mC(this,t);break}case O.AFTER_FRAMESET:{bC(this,t);break}case O.AFTER_AFTER_BODY:{Hi(this,t);break}}}onEof(t){switch(this.insertionMode){case O.INITIAL:{To(this,t);break}case O.BEFORE_HTML:{Do(this,t);break}case O.BEFORE_HEAD:{Mo(this,t);break}case O.IN_HEAD:{Fo(this,t);break}case O.IN_HEAD_NO_SCRIPT:{Bo(this,t);break}case O.AFTER_HEAD:{jo(this,t);break}case O.IN_BODY:case O.IN_TABLE:case O.IN_CAPTION:case O.IN_COLUMN_GROUP:case O.IN_TABLE_BODY:case O.IN_ROW:case O.IN_CELL:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:{dm(this,t);break}case O.TEXT:{Kw(this,t);break}case O.IN_TABLE_TEXT:{yo(this,t);break}case O.IN_TEMPLATE:{xm(this,t);break}case O.AFTER_BODY:case O.IN_FRAMESET:case O.AFTER_FRAMESET:case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{pu(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===S.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:case O.TEXT:case O.IN_COLUMN_GROUP:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:case O.IN_FRAMESET:case O.AFTER_FRAMESET:{this._insertCharacters(t);break}case O.IN_BODY:case O.IN_CAPTION:case O.IN_CELL:case O.IN_TEMPLATE:case O.AFTER_BODY:case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{am(this,t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{fs(this,t);break}case O.IN_TABLE_TEXT:{fm(this,t);break}}}}function Yv(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):cm(e,t),n}function qv(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Gv(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let i=0,a=o;a!==n;i++,a=o){o=e.openElements.getCommonAncestor(a);const s=e.activeFormattingElements.getElementEntry(a),l=s&&i>=Vv;!s||l?(l&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(a)):(a=Kv(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Kv(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Xv(e,t,n){const r=e.treeAdapter.getTagName(t),o=eo(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&i===G.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Qv(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,i=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,o.tagID)}function hu(e,t){for(let n=0;n<zv;n++){const r=Yv(e,t);if(!r)break;const o=qv(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const i=Gv(e,o,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),a&&Xv(e,a,i),Qv(e,o,r)}}function al(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Zv(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Jv(e,t){e._appendCommentNode(t,e.document)}function pu(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(i);a&&!a.endTag&&e._setEndLocation(i,t)}}}}function ew(e,t){e._setDocumentType(t);const n=t.forceQuirks?It.QUIRKS:Nv(t);Iv(t)||e._err(t,U.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=O.BEFORE_HTML}function To(e,t){e._err(t,U.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,It.QUIRKS),e.insertionMode=O.BEFORE_HTML,e._processToken(t)}function tw(e,t){t.tagID===m.HTML?(e._insertElement(t,G.HTML),e.insertionMode=O.BEFORE_HEAD):Do(e,t)}function nw(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&Do(e,t)}function Do(e,t){e._insertFakeRootElement(),e.insertionMode=O.BEFORE_HEAD,e._processToken(t)}function rw(e,t){switch(t.tagID){case m.HTML:{dt(e,t);break}case m.HEAD:{e._insertElement(t,G.HTML),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD;break}default:Mo(e,t)}}function ow(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Mo(e,t):e._err(t,U.endTagWithoutMatchingOpenElement)}function Mo(e,t){e._insertFakeElement(B.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD,e._processToken(t)}function Ut(e,t){switch(t.tagID){case m.HTML:{dt(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,ze.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ze.RAWTEXT):(e._insertElement(t,G.HTML),e.insertionMode=O.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,ze.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,ze.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=O.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(O.IN_TEMPLATE);break}case m.HEAD:{e._err(t,U.misplacedStartTagForHeadElement);break}default:Fo(e,t)}}function iw(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=O.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Fo(e,t);break}case m.TEMPLATE:{yr(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function yr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,U.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,U.endTagWithoutMatchingOpenElement)}function Fo(e,t){e.openElements.pop(),e.insertionMode=O.AFTER_HEAD,e._processToken(t)}function aw(e,t){switch(t.tagID){case m.HTML:{dt(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{Ut(e,t);break}case m.NOSCRIPT:{e._err(t,U.nestedNoscriptInHead);break}default:Bo(e,t)}}function sw(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=O.IN_HEAD;break}case m.BR:{Bo(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function Bo(e,t){const n=t.type===ye.EOF?U.openElementsLeftAfterEof:U.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=O.IN_HEAD,e._processToken(t)}function lw(e,t){switch(t.tagID){case m.HTML:{dt(e,t);break}case m.BODY:{e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=O.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,G.HTML),e.insertionMode=O.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,U.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),Ut(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,U.misplacedStartTagForHeadElement);break}default:jo(e,t)}}function uw(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{jo(e,t);break}case m.TEMPLATE:{yr(e,t);break}default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function jo(e,t){e._insertFakeElement(B.BODY,m.BODY),e.insertionMode=O.IN_BODY,ka(e,t)}function ka(e,t){switch(t.type){case ye.CHARACTER:{sm(e,t);break}case ye.WHITESPACE_CHARACTER:{am(e,t);break}case ye.COMMENT:{al(e,t);break}case ye.START_TAG:{dt(e,t);break}case ye.END_TAG:{Sa(e,t);break}case ye.EOF:{dm(e,t);break}}}function am(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function sm(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function cw(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function dw(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function fw(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,G.HTML),e.insertionMode=O.IN_FRAMESET)}function hw(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function pw(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&il.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,G.HTML)}function mw(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function gw(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,G.HTML),n||(e.formElement=e.openElements.current))}function bw(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function xw(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.tokenizer.state=ze.PLAINTEXT}function Ew(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1}function Tw(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(B.A);n&&(hu(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vw(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(hu(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ww(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Cw(e,t){e.treeAdapter.getDocumentMode(e.document)!==It.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=O.IN_TABLE}function lm(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function um(e){const t=Qp(e,cr.TYPE);return t!=null&&t.toLowerCase()===$v}function kw(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),um(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Sw(e,t){e._appendElement(t,G.HTML),t.ackSelfClosing=!0}function Aw(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function _w(e,t){t.tagName=B.IMG,t.tagID=m.IMG,lm(e,t)}function Iw(e,t){e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ze.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=O.TEXT}function Nw(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ze.RAWTEXT)}function Rw(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ze.RAWTEXT)}function Bd(e,t){e._switchToTextParsing(t,ze.RAWTEXT)}function Pw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===O.IN_TABLE||e.insertionMode===O.IN_CAPTION||e.insertionMode===O.IN_TABLE_BODY||e.insertionMode===O.IN_ROW||e.insertionMode===O.IN_CELL?O.IN_SELECT_IN_TABLE:O.IN_SELECT}function Ow(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function Lw(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,G.HTML)}function Dw(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,G.HTML)}function Mw(e,t){e._reconstructActiveFormattingElements(),rm(t),fu(t),t.selfClosing?e._appendElement(t,G.MATHML):e._insertElement(t,G.MATHML),t.ackSelfClosing=!0}function Fw(e,t){e._reconstructActiveFormattingElements(),om(t),fu(t),t.selfClosing?e._appendElement(t,G.SVG):e._insertElement(t,G.SVG),t.ackSelfClosing=!0}function jd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function dt(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{yw(e,t);break}case m.A:{Tw(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{pw(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{hw(e,t);break}case m.LI:case m.DD:case m.DT:{bw(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{lm(e,t);break}case m.HR:{Aw(e,t);break}case m.RB:case m.RTC:{Lw(e,t);break}case m.RT:case m.RP:{Dw(e,t);break}case m.PRE:case m.LISTING:{mw(e,t);break}case m.XMP:{Nw(e,t);break}case m.SVG:{Fw(e,t);break}case m.HTML:{cw(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{Ut(e,t);break}case m.BODY:{dw(e,t);break}case m.FORM:{gw(e,t);break}case m.NOBR:{vw(e,t);break}case m.MATH:{Mw(e,t);break}case m.TABLE:{Cw(e,t);break}case m.INPUT:{kw(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{Sw(e,t);break}case m.IMAGE:{_w(e,t);break}case m.BUTTON:{Ew(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{ww(e,t);break}case m.IFRAME:{Rw(e,t);break}case m.SELECT:{Pw(e,t);break}case m.OPTION:case m.OPTGROUP:{Ow(e,t);break}case m.NOEMBED:case m.NOFRAMES:{Bd(e,t);break}case m.FRAMESET:{fw(e,t);break}case m.TEXTAREA:{Iw(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?Bd(e,t):jd(e,t);break}case m.PLAINTEXT:{xw(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:jd(e,t)}}function Bw(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=O.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function jw(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=O.AFTER_BODY,Em(e,t))}function Hw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Uw(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function $w(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(B.P,m.P),e._closePElement()}function zw(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function Vw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Ww(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Yw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function qw(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(B.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function cm(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const i=e.openElements.items[o],a=e.openElements.tagIDs[o];if(r===a&&(r!==m.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(i,a))break}}function Sa(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{hu(e,t);break}case m.P:{$w(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{Hw(e,t);break}case m.LI:{zw(e);break}case m.DD:case m.DT:{Vw(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{Ww(e);break}case m.BR:{qw(e);break}case m.BODY:{Bw(e,t);break}case m.HTML:{jw(e,t);break}case m.FORM:{Uw(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{Yw(e,t);break}case m.TEMPLATE:{yr(e,t);break}default:cm(e,t)}}function dm(e,t){e.tmplInsertionModeStack.length>0?xm(e,t):pu(e,t)}function Gw(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Kw(e,t){e._err(t,U.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function fs(e,t){if(e.openElements.currentTagId!==void 0&&im.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=O.IN_TABLE_TEXT,t.type){case ye.CHARACTER:{hm(e,t);break}case ye.WHITESPACE_CHARACTER:{fm(e,t);break}}else oi(e,t)}function Xw(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,G.HTML),e.insertionMode=O.IN_CAPTION}function Qw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=O.IN_COLUMN_GROUP}function Zw(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(B.COLGROUP,m.COLGROUP),e.insertionMode=O.IN_COLUMN_GROUP,mu(e,t)}function Jw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=O.IN_TABLE_BODY}function eC(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(B.TBODY,m.TBODY),e.insertionMode=O.IN_TABLE_BODY,Aa(e,t)}function tC(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function nC(e,t){um(t)?e._appendElement(t,G.HTML):oi(e,t),t.ackSelfClosing=!0}function rC(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,G.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Yr(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{eC(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{Ut(e,t);break}case m.COL:{Zw(e,t);break}case m.FORM:{rC(e,t);break}case m.TABLE:{tC(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{Jw(e,t);break}case m.INPUT:{nC(e,t);break}case m.CAPTION:{Xw(e,t);break}case m.COLGROUP:{Qw(e,t);break}default:oi(e,t)}}function Vo(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{yr(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:oi(e,t)}}function oi(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ka(e,t),e.fosterParentingEnabled=n}function fm(e,t){e.pendingCharacterTokens.push(t)}function hm(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function yo(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)oi(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const pm=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function oC(e,t){const n=t.tagID;pm.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,Yr(e,t)):dt(e,t)}function iC(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,n===m.TABLE&&Vo(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:Sa(e,t)}}function mu(e,t){switch(t.tagID){case m.HTML:{dt(e,t);break}case m.COL:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{Ut(e,t);break}default:Xi(e,t)}}function aC(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case m.TEMPLATE:{yr(e,t);break}case m.COL:break;default:Xi(e,t)}}function Xi(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE,e._processToken(t))}function Aa(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,G.HTML),e.insertionMode=O.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(B.TR,m.TR),e.insertionMode=O.IN_ROW,_a(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,Yr(e,t));break}default:Yr(e,t)}}function sl(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,Vo(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:Vo(e,t)}}function _a(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,G.HTML),e.insertionMode=O.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,Aa(e,t));break}default:Yr(e,t)}}function mm(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,sl(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,sl(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:Vo(e,t)}}function sC(e,t){const n=t.tagID;pm.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),_a(e,t)):dt(e,t)}function lC(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),mm(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:Sa(e,t)}}function gm(e,t){switch(t.tagID){case m.HTML:{dt(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,G.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,G.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{Ut(e,t);break}}}function bm(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{yr(e,t);break}}}function uC(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):gm(e,t)}function cC(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):bm(e,t)}function dC(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{Ut(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=O.IN_TABLE,e.insertionMode=O.IN_TABLE,Yr(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=O.IN_COLUMN_GROUP,e.insertionMode=O.IN_COLUMN_GROUP,mu(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=O.IN_TABLE_BODY,e.insertionMode=O.IN_TABLE_BODY,Aa(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=O.IN_ROW,e.insertionMode=O.IN_ROW,_a(e,t);break}default:e.tmplInsertionModeStack[0]=O.IN_BODY,e.insertionMode=O.IN_BODY,dt(e,t)}}function fC(e,t){t.tagID===m.TEMPLATE&&yr(e,t)}function xm(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):pu(e,t)}function hC(e,t){t.tagID===m.HTML?dt(e,t):Qi(e,t)}function Em(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=O.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Qi(e,t)}function Qi(e,t){e.insertionMode=O.IN_BODY,ka(e,t)}function pC(e,t){switch(t.tagID){case m.HTML:{dt(e,t);break}case m.FRAMESET:{e._insertElement(t,G.HTML);break}case m.FRAME:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{Ut(e,t);break}}}function mC(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=O.AFTER_FRAMESET))}function gC(e,t){switch(t.tagID){case m.HTML:{dt(e,t);break}case m.NOFRAMES:{Ut(e,t);break}}}function bC(e,t){t.tagID===m.HTML&&(e.insertionMode=O.AFTER_AFTER_FRAMESET)}function xC(e,t){t.tagID===m.HTML?dt(e,t):Hi(e,t)}function Hi(e,t){e.insertionMode=O.IN_BODY,ka(e,t)}function EC(e,t){switch(t.tagID){case m.HTML:{dt(e,t);break}case m.NOFRAMES:{Ut(e,t);break}}}function TC(e,t){t.chars=He,e._insertCharacters(t)}function yC(e,t){e._insertCharacters(t),e.framesetOk=!1}function Tm(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==G.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function vC(e,t){if(Fv(t))Tm(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===G.MATHML?rm(t):r===G.SVG&&(Bv(t),om(t)),fu(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function wC(e,t){if(t.tagID===m.P||t.tagID===m.BR){Tm(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===G.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}B.AREA,B.BASE,B.BASEFONT,B.BGSOUND,B.BR,B.COL,B.EMBED,B.FRAME,B.HR,B.IMG,B.INPUT,B.KEYGEN,B.LINK,B.META,B.PARAM,B.SOURCE,B.TRACK,B.WBR;const Ia=ym("end"),en=ym("start");function ym(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function vm(e){const t=en(e),n=Ia(e);if(t&&n)return{start:t,end:n}}const CC=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,kC=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Hd={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function wm(e,t){const n=DC(e),r=Yp("type",{handlers:{root:SC,element:AC,text:_C,comment:km,doctype:IC,raw:RC},unknown:PC}),o={parser:n?new Fd(Hd):Fd.getFragmentParser(void 0,Hd),handle(s){r(s,o)},stitches:!1,options:t||{}};r(e,o),to(o,en());const i=n?o.parser.document:o.parser.getFragment(),a=My(i,{file:o.options.file});return o.stitches&&jt(a,"comment",function(s,l,u){const c=s;if(c.value.stitch&&u&&l!==void 0){const d=u.children;return d[l]=c.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Cm(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function SC(e,t){Cm(e.children,t)}function AC(e,t){OC(e,t),Cm(e.children,t),LC(e,t)}function _C(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ye.CHARACTER,chars:e.value,location:ii(e)};to(t,en(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function IC(e,t){const n={type:ye.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ii(e)};to(t,en(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function NC(e,t){t.stitches=!0;const n=MC(e);if("children"in e&&"children"in n){const r=wm({type:"root",children:e.children},t.options);n.children=r.children}km({type:"comment",value:{stitch:n}},t)}function km(e,t){const n=e.value,r={type:ye.COMMENT,data:n,location:ii(e)};to(t,en(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function RC(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Sm(t,en(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(CC,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function PC(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))NC(n,t);else{let r="";throw kC.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function to(e,t){Sm(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=ze.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Sm(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function OC(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ze.PLAINTEXT)return;to(t,en(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:lr.html;o===lr.html&&n==="svg"&&(o=lr.svg);const i=Uy({...e,children:[]},{space:o===lr.svg?"svg":"html"}),a={type:ye.START_TAG,tagName:n,tagID:eo(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:ii(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function LC(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Ky.includes(n)||t.parser.tokenizer.state===ze.PLAINTEXT)return;to(t,Ia(e));const r={type:ye.END_TAG,tagName:n,tagID:eo(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ii(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ze.RCDATA||t.parser.tokenizer.state===ze.RAWTEXT||t.parser.tokenizer.state===ze.SCRIPT_DATA)&&(t.parser.tokenizer.state=ze.DATA)}function DC(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ii(e){const t=en(e)||{line:void 0,column:void 0,offset:void 0},n=Ia(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function MC(e){return"children"in e?fr({...e,children:[]}):fr(e)}function ll(e){return function(t,n){return wm(t,{...e,file:n})}}const Jn=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],or={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Jn,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Jn],h2:[["className","sr-only"]],img:[...Jn,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Jn,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Jn],table:[...Jn],ul:[...Jn,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Pn={}.hasOwnProperty;function FC(e,t){let n={type:"root",children:[]};const r={schema:t?{...or,...t}:or,stack:[]},o=Am(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Am(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return BC(e,n);case"doctype":return jC(e,n);case"element":return HC(e,n);case"root":return UC(e,n);case"text":return $C(e,n)}}}function BC(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return ai(i,t),i}}function jC(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ai(n,t),n}}function HC(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=_m(e,t.children),o=zC(e,t.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&Pn.call(e.schema.ancestors,n))){const s=e.schema.ancestors[n];let l=-1;for(i=!1;++l<s.length;)e.stack.includes(s[l])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:o,children:r};return ai(a,t),a}function UC(e,t){const r={type:"root",children:_m(e,t.children)};return ai(r,t),r}function $C(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ai(r,t),r}function _m(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const i=Am(e,r[o]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function zC(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,i=r&&Pn.call(r,n)?r[n]:void 0,a=r&&Pn.call(r,"*")?r["*"]:void 0,s=t&&typeof t=="object"?t:{},l={};let u;for(u in s)if(Pn.call(s,u)){const c=s[u];let d=Ud(e,$d(i,u),u,c);d==null&&(d=Ud(e,$d(a,u),u,c)),d!=null&&(l[u]=d)}if(o&&Pn.call(o,n)){const c=o[n];for(u in c)Pn.call(c,u)&&!Pn.call(l,u)&&(l[u]=c[u])}return l}function Ud(e,t,n,r){return t?Array.isArray(r)?VC(e,t,n,r):Im(e,t,n,r):void 0}function VC(e,t,n,r){let o=-1;const i=[];for(;++o<r.length;){const a=Im(e,t,n,r[o]);(typeof a=="number"||typeof a=="string")&&i.push(a)}return i}function Im(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&WC(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,i=0;for(;++i<t.length;){const a=t[i];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){o=!0;break}}else if(a===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function WC(e,t,n){const r=e.schema.protocols&&Pn.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),i=o.indexOf(":"),a=o.indexOf("?"),s=o.indexOf("#"),l=o.indexOf("/");if(i<0||l>-1&&i>l||a>-1&&i>a||s>-1&&i>s)return!0;let u=-1;for(;++u<r.length;){const c=r[u];if(i===c.length&&o.slice(0,c.length)===c)return!0}return!1}function ai(e,t){const n=vm(t);t.data&&(e.data=fr(t.data)),n&&(e.position=n)}function $d(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],i=typeof o=="string"?o:o[0];if(i===t)return o;i==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Nm(e){return function(t){return FC(t,e)}}function zd(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}const pt=Vn(/[A-Za-z]/),lt=Vn(/[\dA-Za-z]/),YC=Vn(/[#-'*+\--9=?A-Z^-~]/);function Zi(e){return e!==null&&(e<32||e===127)}const ul=Vn(/\d/),qC=Vn(/[\dA-Fa-f]/),GC=Vn(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function Me(e){return e!==null&&(e<0||e===32)}function Ce(e){return e===-2||e===-1||e===32}const Na=Vn(new RegExp("\\p{P}|\\p{S}","u")),hr=Vn(/\s/);function Vn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function KC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function XC(e,t,n){const o=Ta((n||{}).ignore||[]),i=QC(t);let a=-1;for(;++a<i.length;)va(e,"text",s);function s(u,c){let d=-1,h;for(;++d<c.length;){const p=c[d],b=h?h.children:void 0;if(o(p,b?b.indexOf(p):void 0,h))return;h=p}if(h)return l(u,c)}function l(u,c){const d=c[c.length-1],h=i[a][0],p=i[a][1];let b=0;const E=d.children.indexOf(u);let T=!1,v=[];h.lastIndex=0;let y=h.exec(u.value);for(;y;){const C=y.index,I={index:y.index,input:y.input,stack:[...c,u]};let w=p(...y,I);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?h.lastIndex=C+1:(b!==C&&v.push({type:"text",value:u.value.slice(b,C)}),Array.isArray(w)?v.push(...w):w&&v.push(w),b=C+y[0].length,T=!0),!h.global)break;y=h.exec(u.value)}return T?(b<u.value.length&&v.push({type:"text",value:u.value.slice(b)}),d.children.splice(E,1,...v)):v=[u],E+v.length}}function QC(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([ZC(o[0]),JC(o[1])])}return t}function ZC(e){return typeof e=="string"?new RegExp(KC(e),"g"):e}function JC(e){return typeof e=="function"?e:function(){return e}}const hs="phrasing",ps=["autolink","link","image","label"];function e2(){return{transforms:[s2],enter:{literalAutolink:n2,literalAutolinkEmail:ms,literalAutolinkHttp:ms,literalAutolinkWww:ms},exit:{literalAutolink:a2,literalAutolinkEmail:i2,literalAutolinkHttp:r2,literalAutolinkWww:o2}}}function t2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hs,notInConstruct:ps},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hs,notInConstruct:ps},{character:":",before:"[ps]",after:"\\/",inConstruct:hs,notInConstruct:ps}]}}function n2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ms(e){this.config.enter.autolinkProtocol.call(this,e)}function r2(e){this.config.exit.autolinkProtocol.call(this,e)}function o2(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function i2(e){this.config.exit.autolinkEmail.call(this,e)}function a2(e){this.exit(e)}function s2(e){XC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,l2],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),u2]],{ignore:["link","linkReference"]})}function l2(e,t,n,r,o){let i="";if(!Rm(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!c2(n)))return!1;const a=d2(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function u2(e,t,n,r){return!Rm(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function c2(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function d2(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=zd(e,"(");let i=zd(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function Rm(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||hr(n)||Na(n))&&(!t||n!==47)}function Bt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Pm.peek=T2;function f2(){this.buffer()}function h2(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function p2(){this.buffer()}function m2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function g2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Bt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function b2(e){this.exit(e)}function x2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Bt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function E2(e){this.exit(e)}function T2(){return"["}function Pm(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function y2(){return{enter:{gfmFootnoteCallString:f2,gfmFootnoteCall:h2,gfmFootnoteDefinitionLabelString:p2,gfmFootnoteDefinition:m2},exit:{gfmFootnoteCallString:g2,gfmFootnoteCall:b2,gfmFootnoteDefinitionLabelString:x2,gfmFootnoteDefinition:E2}}}function v2(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Pm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,i,a){const s=i.createTracker(a);let l=s.move("[^");const u=i.enter("footnoteDefinition"),c=i.enter("label");return l+=s.move(i.safe(i.associationId(r),{before:l,after:"]"})),c(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
3
|
+
`:" ")+i.indentLines(i.containerFlow(r,s.current()),t?Om:w2))),u(),l}}function w2(e,t,n){return t===0?e:Om(e,t,n)}function Om(e,t,n){return(n?"":" ")+e}const C2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Lm.peek=I2;function k2(){return{canContainEols:["delete"],enter:{strikethrough:A2},exit:{strikethrough:_2}}}function S2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:C2}],handlers:{delete:Lm}}}function A2(e){this.enter({type:"delete",children:[]},e)}function _2(e){this.exit(e)}function Lm(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function I2(){return"~"}function N2(e){return e.length}function R2(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||N2,i=[],a=[],s=[],l=[];let u=0,c=-1;for(;++c<e.length;){const x=[],E=[];let T=-1;for(e[c].length>u&&(u=e[c].length);++T<e[c].length;){const v=P2(e[c][T]);if(n.alignDelimiters!==!1){const y=o(v);E[T]=y,(l[T]===void 0||y>l[T])&&(l[T]=y)}x.push(v)}a[c]=x,s[c]=E}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)i[d]=Vd(r[d]);else{const x=Vd(r);for(;++d<u;)i[d]=x}d=-1;const h=[],p=[];for(;++d<u;){const x=i[d];let E="",T="";x===99?(E=":",T=":"):x===108?E=":":x===114&&(T=":");let v=n.alignDelimiters===!1?1:Math.max(1,l[d]-E.length-T.length);const y=E+"-".repeat(v)+T;n.alignDelimiters!==!1&&(v=E.length+v+T.length,v>l[d]&&(l[d]=v),p[d]=v),h[d]=y}a.splice(1,0,h),s.splice(1,0,p),c=-1;const b=[];for(;++c<a.length;){const x=a[c],E=s[c];d=-1;const T=[];for(;++d<u;){const v=x[d]||"";let y="",C="";if(n.alignDelimiters!==!1){const I=l[d]-(E[d]||0),w=i[d];w===114?y=" ".repeat(I):w===99?I%2?(y=" ".repeat(I/2+.5),C=" ".repeat(I/2-.5)):(y=" ".repeat(I/2),C=y):C=" ".repeat(I)}n.delimiterStart!==!1&&!d&&T.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&v==="")&&(n.delimiterStart!==!1||d)&&T.push(" "),n.alignDelimiters!==!1&&T.push(y),T.push(v),n.alignDelimiters!==!1&&T.push(C),n.padding!==!1&&T.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&T.push("|")}b.push(n.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return b.join(`
|
|
4
|
+
`)}function P2(e){return e==null?"":String(e)}function Vd(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function O2(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),L2);return o(),a}function L2(e,t,n){return">"+(n?"":" ")+e}function D2(e,t){return Wd(e,t.inConstruct,!0)&&!Wd(e,t.notInConstruct,!1)}function Wd(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Yd(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
5
|
+
`&&D2(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
6
|
+
`}function M2(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function F2(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function B2(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function j2(e,t,n,r){const o=B2(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(F2(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(i,H2);return d(),h}const s=n.createTracker(r),l=o.repeat(Math.max(M2(i,o)+1,3)),u=n.enter("codeFenced");let c=s.move(l);if(e.lang){const d=n.enter(`codeFencedLang${a}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
|
|
7
|
+
`,encode:["`"],...s.current()})),d()}return c+=s.move(`
|
|
8
|
+
`),i&&(c+=s.move(i+`
|
|
9
|
+
`)),c+=s.move(l),u(),c}function H2(e,t,n){return(n?"":" ")+e}function gu(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function U2(e,t,n,r){const o=gu(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
10
|
+
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),a(),u}function $2(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Wo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function qr(e){if(e===null||Me(e)||hr(e))return 1;if(Na(e))return 2}function Ji(e,t,n){const r=qr(e),o=qr(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Dm.peek=z2;function Dm(e,t,n,r){const o=$2(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const u=l.charCodeAt(0),c=Ji(r.before.charCodeAt(r.before.length-1),u,o);c.inside&&(l=Wo(u)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ji(r.after.charCodeAt(0),d,o);h.inside&&(l=l.slice(0,-1)+Wo(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},s+l+p}function z2(e,t,n){return n.options.emphasis||"*"}const V2={};function bu(e,t){const n=V2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Mm(e,r,o)}function Mm(e,t,n){if(W2(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qd(e.children,t,n)}return Array.isArray(e)?qd(e,t,n):""}function qd(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Mm(e[o],t,n);return r.join("")}function W2(e){return!!(e&&typeof e=="object")}function Y2(e,t){let n=!1;return jt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,el}),!!((!e.depth||e.depth<3)&&bu(e)&&(t.options.setext||n))}function q2(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(Y2(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...i.current(),before:`
|
|
11
|
+
`,after:`
|
|
12
|
+
`});return d(),c(),h+`
|
|
13
|
+
`+(o===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
14
|
+
`))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
15
|
+
`,...i.current()});return/^[\t ]/.test(u)&&(u=Wo(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}Fm.peek=G2;function Fm(e){return e.value||""}function G2(){return"<"}Bm.peek=K2;function Bm(e,t,n,r){const o=gu(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),u+=l.move(" "+o),u+=l.move(n.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),u+=l.move(")"),a(),u}function K2(){return"!"}jm.peek=X2;function jm(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,i(),o==="full"||!u||u!==d?l+=s.move(d+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function X2(){return"!"}Hm.peek=Q2;function Hm(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return o+r+o}function Q2(){return"`"}function Um(e,t){const n=bu(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}$m.peek=Z2;function $m(e,t,n,r){const o=gu(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Um(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),s(),n.stack=c,d}s=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=a.move(" "+o),u+=a.move(n.safe(e.title,{before:u,after:o,...a.current()})),u+=a.move(o),l()),u+=a.move(")"),s(),u}function Z2(e,t,n){return Um(e,n)?"<":"["}zm.peek=J2;function zm(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=c,i(),o==="full"||!u||u!==d?l+=s.move(d+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function J2(){return"["}function xu(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ek(e){const t=xu(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function tk(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Vm(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function nk(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?tk(n):xu(n);const s=e.ordered?a==="."?")":".":ek(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Vm(n)===a&&c){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),u}function rk(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function ok(e,t,n,r){const o=rk(n);let i=n.bulletCurrent||xu(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),c);return l(),u;function c(d,h,p){return h?(p?"":" ".repeat(a))+d:(p?i:i+" ".repeat(a-i.length))+d}}function ik(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const ak=Ta(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function sk(e,t,n,r){return(e.children.some(function(a){return ak(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function lk(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Wm.peek=uk;function Wm(e,t,n,r){const o=lk(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const u=l.charCodeAt(0),c=Ji(r.before.charCodeAt(r.before.length-1),u,o);c.inside&&(l=Wo(u)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ji(r.after.charCodeAt(0),d,o);h.inside&&(l=l.slice(0,-1)+Wo(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},s+l+p}function uk(e,t,n){return n.options.strong||"*"}function ck(e,t,n,r){return n.safe(e.value,r)}function dk(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function fk(e,t,n){const r=(Vm(n)+(n.options.ruleSpaces?" ":"")).repeat(dk(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ym={blockquote:O2,break:Yd,code:j2,definition:U2,emphasis:Dm,hardBreak:Yd,heading:q2,html:Fm,image:Bm,imageReference:jm,inlineCode:Hm,link:$m,linkReference:zm,list:nk,listItem:ok,paragraph:ik,root:sk,strong:Wm,text:ck,thematicBreak:fk},Gd=document.createElement("i");function Eu(e){const t="&"+e+";";Gd.innerHTML=t;const n=Gd.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function qm(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const hk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function pk(e){return e.replace(hk,mk)}function mk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return qm(n.slice(i?2:1),i?16:10)}return Eu(n)||e}function gk(){return{enter:{table:bk,tableData:Kd,tableHeader:Kd,tableRow:Ek},exit:{codeText:Tk,table:xk,tableData:gs,tableHeader:gs,tableRow:gs}}}function bk(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function xk(e){this.exit(e),this.data.inTable=void 0}function Ek(e){this.enter({type:"tableRow",children:[]},e)}function gs(e){this.exit(e)}function Kd(e){this.enter({type:"tableCell",children:[]},e)}function Tk(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,yk));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function yk(e,t){return t==="|"?t:e}function vk(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
16
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:a,tableCell:l,tableRow:s}};function a(p,b,x,E){return u(c(p,x,E),p.align)}function s(p,b,x,E){const T=d(p,x,E),v=u([T]);return v.slice(0,v.indexOf(`
|
|
17
|
+
`))}function l(p,b,x,E){const T=x.enter("tableCell"),v=x.enter("phrasing"),y=x.containerPhrasing(p,{...E,before:i,after:i});return v(),T(),y}function u(p,b){return R2(p,{align:b,alignDelimiters:r,padding:n,stringLength:o})}function c(p,b,x){const E=p.children;let T=-1;const v=[],y=b.enter("table");for(;++T<E.length;)v[T]=d(E[T],b,x);return y(),v}function d(p,b,x){const E=p.children;let T=-1;const v=[],y=b.enter("tableRow");for(;++T<E.length;)v[T]=l(E[T],p,b,x);return y(),v}function h(p,b,x){let E=Ym.inlineCode(p,b,x);return x.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function wk(){return{exit:{taskListCheckValueChecked:Xd,taskListCheckValueUnchecked:Xd,paragraph:kk}}}function Ck(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Sk}}}function Xd(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function kk(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Sk(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=Ym.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+a}}function Ak(){return[e2(),y2(),k2(),gk(),wk()]}function _k(e){return{extensions:[t2(),v2(e),S2(),vk(e),Ck()]}}function St(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Nt(e,t){return e.length>0?(St(e,e.length,0,t),e):t}const Qd={}.hasOwnProperty;function Gm(e){const t={};let n=-1;for(;++n<e.length;)Ik(t,e[n]);return t}function Ik(e,t){let n;for(n in t){const o=(Qd.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Qd.call(o,a)||(o[a]=[]);const s=i[a];Nk(o[a],Array.isArray(s)?s:s?[s]:[])}}}function Nk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);St(e,0,0,r)}const Rk={tokenize:Fk,partial:!0},Km={tokenize:Bk,partial:!0},Xm={tokenize:jk,partial:!0},Qm={tokenize:Hk,partial:!0},Pk={tokenize:Uk,partial:!0},Zm={name:"wwwAutolink",tokenize:Dk,previous:e0},Jm={name:"protocolAutolink",tokenize:Mk,previous:t0},yn={name:"emailAutolink",tokenize:Lk,previous:n0},tn={};function Ok(){return{text:tn}}let er=48;for(;er<123;)tn[er]=yn,er++,er===58?er=65:er===91&&(er=97);tn[43]=yn;tn[45]=yn;tn[46]=yn;tn[95]=yn;tn[72]=[yn,Jm];tn[104]=[yn,Jm];tn[87]=[yn,Zm];tn[119]=[yn,Zm];function Lk(e,t,n){const r=this;let o,i;return a;function a(d){return!cl(d)||!n0.call(r,r.previous)||Tu(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return cl(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(Pk,c,u)(d):d===45||d===95||lt(d)?(i=!0,e.consume(d),l):c(d)}function u(d){return e.consume(d),o=!0,l}function c(d){return i&&o&&pt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Dk(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!e0.call(r,r.previous)||Tu(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Rk,e.attempt(Km,e.attempt(Xm,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Mk(e,t,n){const r=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&t0.call(r,r.previous)&&!Tu(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(pt(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const h=o.toLowerCase();if(h==="http"||h==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),i?u:(i=!0,l)):n(d)}function u(d){return d===null||Zi(d)||Me(d)||hr(d)||Na(d)?n(d):e.attempt(Km,e.attempt(Xm,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Fk(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function Bk(e,t,n){let r,o,i;return a;function a(u){return u===46||u===95?e.check(Qm,l,s)(u):u===null||Me(u)||hr(u)||u!==45&&Na(u)?l(u):(i=!0,e.consume(u),a)}function s(u){return u===95?r=!0:(o=r,r=void 0),e.consume(u),a}function l(u){return o||r||!i?n(u):t(u)}}function jk(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Qm,t,i)(a):a===null||Me(a)||hr(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function Hk(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||Me(s)||hr(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||Me(s)||hr(s)?t(s):r(s)}function i(s){return pt(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):pt(s)?(e.consume(s),a):n(s)}}function Uk(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return lt(i)?n(i):t(i)}}function e0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Me(e)}function t0(e){return!pt(e)}function n0(e){return!(e===47||cl(e))}function cl(e){return e===43||e===45||e===46||e===95||lt(e)}function Tu(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function no(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&<(e.charCodeAt(n+1))&<(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ra(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const dl={name:"attention",resolveAll:$k,tokenize:zk};function $k(e,t){let n=-1,r,o,i,a,s,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};Zd(d,-l),Zd(h,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Nt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Nt(u,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),u=Nt(u,Ra(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Nt(u,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Nt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,St(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function zk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=qr(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const u=e.exit("attentionSequence"),c=qr(l),d=!c||c===2&&o||n.includes(l),h=!o||o===2&&c||n.includes(r);return u._open=!!(i===42?d:d&&(o||!h)),u._close=!!(i===42?h:h&&(c||!d)),t(l)}}function Zd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Vk={name:"autolink",tokenize:Wk};function Wk(e,t,n){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return pt(p)?(e.consume(p),a):p===64?n(p):u(p)}function a(p){return p===43||p===45||p===46||lt(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||lt(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Zi(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),c):YC(p)?(e.consume(p),u):n(p)}function c(p){return lt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||lt(p))&&r++<63){const b=p===45?h:d;return e.consume(p),b}return n(p)}}function _e(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return Ce(l)?(e.enter(n),s(l)):t(l)}function s(l){return Ce(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const si={partial:!0,tokenize:Yk};function Yk(e,t,n){return r;function r(i){return Ce(i)?_e(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||fe(i)?t(i):n(i)}}const r0={continuation:{tokenize:Gk},exit:Kk,name:"blockQuote",tokenize:qk};function qk(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return Ce(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Gk(e,t,n){const r=this;return o;function o(a){return Ce(a)?_e(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(r0,t,n)(a)}}function Kk(e){e.exit("blockQuote")}const o0={name:"characterEscape",tokenize:Xk};function Xk(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return GC(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const i0={name:"characterReference",tokenize:Qk};function Qk(e,t,n){const r=this;let o=0,i,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,a=lt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=qC,c):(e.enter("characterReferenceValue"),i=7,a=ul,c(d))}function c(d){if(d===59&&o){const h=e.exit("characterReferenceValue");return a===lt&&!Eu(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&o++<i?(e.consume(d),c):n(d)}}const Jd={partial:!0,tokenize:Jk},ef={concrete:!0,name:"codeFenced",tokenize:Zk};function Zk(e,t,n){const r=this,o={partial:!0,tokenize:I};let i=0,a=0,s;return l;function l(w){return u(w)}function u(w){const P=r.events[r.events.length-1];return i=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,s=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(w)}function c(w){return w===s?(a++,e.consume(w),c):a<3?n(w):(e.exit("codeFencedFenceSequence"),Ce(w)?_e(e,d,"whitespace")(w):d(w))}function d(w){return w===null||fe(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Jd,x,C)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(w))}function h(w){return w===null||fe(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(w)):Ce(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_e(e,p,"whitespace")(w)):w===96&&w===s?n(w):(e.consume(w),h)}function p(w){return w===null||fe(w)?d(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===null||fe(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(w)):w===96&&w===s?n(w):(e.consume(w),b)}function x(w){return e.attempt(o,C,E)(w)}function E(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),T}function T(w){return i>0&&Ce(w)?_e(e,v,"linePrefix",i+1)(w):v(w)}function v(w){return w===null||fe(w)?e.check(Jd,x,C)(w):(e.enter("codeFlowValue"),y(w))}function y(w){return w===null||fe(w)?(e.exit("codeFlowValue"),v(w)):(e.consume(w),y)}function C(w){return e.exit("codeFenced"),t(w)}function I(w,P,L){let F=0;return R;function R($){return w.enter("lineEnding"),w.consume($),w.exit("lineEnding"),D}function D($){return w.enter("codeFencedFence"),Ce($)?_e(w,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):M($)}function M($){return $===s?(w.enter("codeFencedFenceSequence"),W($)):L($)}function W($){return $===s?(F++,w.consume($),W):F>=a?(w.exit("codeFencedFenceSequence"),Ce($)?_e(w,z,"whitespace")($):z($)):L($)}function z($){return $===null||fe($)?(w.exit("codeFencedFence"),P($)):L($)}}}function Jk(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const bs={name:"codeIndented",tokenize:tS},eS={partial:!0,tokenize:nS};function tS(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),_e(e,i,"linePrefix",5)(u)}function i(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):fe(u)?e.attempt(eS,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||fe(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function nS(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):_e(e,i,"linePrefix",5)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):fe(a)?o(a):n(a)}}const rS={name:"codeText",previous:iS,resolve:oS,tokenize:aS};function oS(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function iS(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function aS(e,t,n){let r=0,o,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(i=e.enter("codeTextSequence"),o=0,c(d)):fe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||fe(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),o++,c):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",u(d))}}class sS{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&vo(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),vo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),vo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);vo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);vo(this.left,n.reverse())}}}function vo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function a0(e){const t={};let n=-1,r,o,i,a,s,l,u;const c=new sS(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,lS(c,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(a=c.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(c.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...c.get(o)[1].start},s=c.slice(o,n),s.unshift(r),c.splice(o,n-o+1,s))}}return St(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function lS(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],u={};let c,d,h=-1,p=n,b=0,x=0;const E=[x];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(x=h+1,E.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):E.pop(),h=E.length;h--;){const T=s.slice(E[h],E[h+1]),v=i.pop();l.push([v,v+T.length-1]),e.splice(v,2,T)}for(l.reverse(),h=-1;++h<l.length;)u[b+l[h][0]]=b+l[h][1],b+=l[h][1]-l[h][0]-1;return u}const uS={resolve:dS,tokenize:fS},cS={partial:!0,tokenize:hS};function dS(e){return a0(e),e}function fS(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):fe(s)?e.check(cS,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function hS(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),_e(e,i,"linePrefix")}function i(a){if(a===null||fe(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function s0(e,t,n,r,o,i,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(T){return T===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(T),e.exit(i),h):T===null||T===32||T===41||Zi(T)?n(T):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),x(T))}function h(T){return T===62?(e.enter(i),e.consume(T),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===62?(e.exit("chunkString"),e.exit(s),h(T)):T===null||T===60||fe(T)?n(T):(e.consume(T),T===92?b:p)}function b(T){return T===60||T===62||T===92?(e.consume(T),p):p(T)}function x(T){return!c&&(T===null||T===41||Me(T))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(T)):c<u&&T===40?(e.consume(T),c++,x):T===41?(e.consume(T),c--,x):T===null||T===32||T===40||Zi(T)?n(T):(e.consume(T),T===92?E:x)}function E(T){return T===40||T===41||T===92?(e.consume(T),x):x(T)}}function l0(e,t,n,r,o,i){const a=this;let s=0,l;return u;function u(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(i),c}function c(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):fe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||fe(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),l||(l=!Ce(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function u0(e,t,n,r,o,i){let a;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(o),e.consume(h),e.exit(o),a=h===40?41:h,l):n(h)}function l(h){return h===a?(e.enter(o),e.consume(h),e.exit(o),e.exit(r),t):(e.enter(i),u(h))}function u(h){return h===a?(e.exit(i),l(a)):h===null?n(h):fe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),_e(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===a||h===null||fe(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:c)}function d(h){return h===a||h===92?(e.consume(h),c):c(h)}}function Ho(e,t){let n;return r;function r(o){return fe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ce(o)?_e(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const pS={name:"definition",tokenize:gS},mS={partial:!0,tokenize:bS};function gS(e,t,n){const r=this;let o;return i;function i(p){return e.enter("definition"),a(p)}function a(p){return l0.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=Bt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return Me(p)?Ho(e,u)(p):u(p)}function u(p){return s0(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(mS,d,d)(p)}function d(p){return Ce(p)?_e(e,h,"whitespace")(p):h(p)}function h(p){return p===null||fe(p)?(e.exit("definition"),r.parser.defined.push(o),t(p)):n(p)}}function bS(e,t,n){return r;function r(s){return Me(s)?Ho(e,o)(s):n(s)}function o(s){return u0(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return Ce(s)?_e(e,a,"whitespace")(s):a(s)}function a(s){return s===null||fe(s)?t(s):n(s)}}const xS={name:"hardBreakEscape",tokenize:ES};function ES(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return fe(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const TS={name:"headingAtx",resolve:yS,tokenize:vS};function yS(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},St(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function vS(e,t,n){let r=0;return o;function o(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||Me(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||fe(c)?(e.exit("atxHeading"),t(c)):Ce(c)?_e(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||Me(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const wS=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],tf=["pre","script","style","textarea"],CS={concrete:!0,name:"htmlFlow",resolveTo:AS,tokenize:_S},kS={partial:!0,tokenize:NS},SS={partial:!0,tokenize:IS};function AS(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _S(e,t,n){const r=this;let o,i,a,s,l;return u;function u(_){return c(_)}function c(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),h):_===47?(e.consume(_),i=!0,x):_===63?(e.consume(_),o=3,r.interrupt?t:k):pt(_)?(e.consume(_),a=String.fromCharCode(_),E):n(_)}function h(_){return _===45?(e.consume(_),o=2,p):_===91?(e.consume(_),o=5,s=0,b):pt(_)?(e.consume(_),o=4,r.interrupt?t:k):n(_)}function p(_){return _===45?(e.consume(_),r.interrupt?t:k):n(_)}function b(_){const ae="CDATA[";return _===ae.charCodeAt(s++)?(e.consume(_),s===ae.length?r.interrupt?t:M:b):n(_)}function x(_){return pt(_)?(e.consume(_),a=String.fromCharCode(_),E):n(_)}function E(_){if(_===null||_===47||_===62||Me(_)){const ae=_===47,K=a.toLowerCase();return!ae&&!i&&tf.includes(K)?(o=1,r.interrupt?t(_):M(_)):wS.includes(a.toLowerCase())?(o=6,ae?(e.consume(_),T):r.interrupt?t(_):M(_)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):i?v(_):y(_))}return _===45||lt(_)?(e.consume(_),a+=String.fromCharCode(_),E):n(_)}function T(_){return _===62?(e.consume(_),r.interrupt?t:M):n(_)}function v(_){return Ce(_)?(e.consume(_),v):R(_)}function y(_){return _===47?(e.consume(_),R):_===58||_===95||pt(_)?(e.consume(_),C):Ce(_)?(e.consume(_),y):R(_)}function C(_){return _===45||_===46||_===58||_===95||lt(_)?(e.consume(_),C):I(_)}function I(_){return _===61?(e.consume(_),w):Ce(_)?(e.consume(_),I):y(_)}function w(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),l=_,P):Ce(_)?(e.consume(_),w):L(_)}function P(_){return _===l?(e.consume(_),l=null,F):_===null||fe(_)?n(_):(e.consume(_),P)}function L(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Me(_)?I(_):(e.consume(_),L)}function F(_){return _===47||_===62||Ce(_)?y(_):n(_)}function R(_){return _===62?(e.consume(_),D):n(_)}function D(_){return _===null||fe(_)?M(_):Ce(_)?(e.consume(_),D):n(_)}function M(_){return _===45&&o===2?(e.consume(_),H):_===60&&o===1?(e.consume(_),V):_===62&&o===4?(e.consume(_),ue):_===63&&o===3?(e.consume(_),k):_===93&&o===5?(e.consume(_),re):fe(_)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(kS,j,W)(_)):_===null||fe(_)?(e.exit("htmlFlowData"),W(_)):(e.consume(_),M)}function W(_){return e.check(SS,z,j)(_)}function z(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),$}function $(_){return _===null||fe(_)?W(_):(e.enter("htmlFlowData"),M(_))}function H(_){return _===45?(e.consume(_),k):M(_)}function V(_){return _===47?(e.consume(_),a="",Q):M(_)}function Q(_){if(_===62){const ae=a.toLowerCase();return tf.includes(ae)?(e.consume(_),ue):M(_)}return pt(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),Q):M(_)}function re(_){return _===93?(e.consume(_),k):M(_)}function k(_){return _===62?(e.consume(_),ue):_===45&&o===2?(e.consume(_),k):M(_)}function ue(_){return _===null||fe(_)?(e.exit("htmlFlowData"),j(_)):(e.consume(_),ue)}function j(_){return e.exit("htmlFlow"),t(_)}}function IS(e,t,n){const r=this;return o;function o(a){return fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function NS(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(si,t,n)}}const RS={name:"htmlText",tokenize:PS};function PS(e,t,n){const r=this;let o,i,a;return s;function s(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),l}function l(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),I):k===63?(e.consume(k),y):pt(k)?(e.consume(k),L):n(k)}function u(k){return k===45?(e.consume(k),c):k===91?(e.consume(k),i=0,b):pt(k)?(e.consume(k),v):n(k)}function c(k){return k===45?(e.consume(k),p):n(k)}function d(k){return k===null?n(k):k===45?(e.consume(k),h):fe(k)?(a=d,V(k)):(e.consume(k),d)}function h(k){return k===45?(e.consume(k),p):d(k)}function p(k){return k===62?H(k):k===45?h(k):d(k)}function b(k){const ue="CDATA[";return k===ue.charCodeAt(i++)?(e.consume(k),i===ue.length?x:b):n(k)}function x(k){return k===null?n(k):k===93?(e.consume(k),E):fe(k)?(a=x,V(k)):(e.consume(k),x)}function E(k){return k===93?(e.consume(k),T):x(k)}function T(k){return k===62?H(k):k===93?(e.consume(k),T):x(k)}function v(k){return k===null||k===62?H(k):fe(k)?(a=v,V(k)):(e.consume(k),v)}function y(k){return k===null?n(k):k===63?(e.consume(k),C):fe(k)?(a=y,V(k)):(e.consume(k),y)}function C(k){return k===62?H(k):y(k)}function I(k){return pt(k)?(e.consume(k),w):n(k)}function w(k){return k===45||lt(k)?(e.consume(k),w):P(k)}function P(k){return fe(k)?(a=P,V(k)):Ce(k)?(e.consume(k),P):H(k)}function L(k){return k===45||lt(k)?(e.consume(k),L):k===47||k===62||Me(k)?F(k):n(k)}function F(k){return k===47?(e.consume(k),H):k===58||k===95||pt(k)?(e.consume(k),R):fe(k)?(a=F,V(k)):Ce(k)?(e.consume(k),F):H(k)}function R(k){return k===45||k===46||k===58||k===95||lt(k)?(e.consume(k),R):D(k)}function D(k){return k===61?(e.consume(k),M):fe(k)?(a=D,V(k)):Ce(k)?(e.consume(k),D):F(k)}function M(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,W):fe(k)?(a=M,V(k)):Ce(k)?(e.consume(k),M):(e.consume(k),z)}function W(k){return k===o?(e.consume(k),o=void 0,$):k===null?n(k):fe(k)?(a=W,V(k)):(e.consume(k),W)}function z(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||Me(k)?F(k):(e.consume(k),z)}function $(k){return k===47||k===62||Me(k)?F(k):n(k)}function H(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function V(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Q}function Q(k){return Ce(k)?_e(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):re(k)}function re(k){return e.enter("htmlTextData"),a(k)}}const yu={name:"labelEnd",resolveAll:MS,resolveTo:FS,tokenize:BS},OS={tokenize:jS},LS={tokenize:HS},DS={tokenize:US};function MS(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&St(e,0,e.length,n),e}function FS(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=Nt(s,e.slice(i+1,i+r+3)),s=Nt(s,[["enter",c,t]]),s=Nt(s,Ra(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=Nt(s,[["exit",c,t],e[a-2],e[a-1],["exit",u,t]]),s=Nt(s,e.slice(a+1)),s=Nt(s,[["exit",l,t]]),St(e,i,e.length,s),e}function BS(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(h){return i?i._inactive?d(h):(a=r.parser.defined.includes(Bt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(OS,c,a?c:d)(h):h===91?e.attempt(LS,c,a?u:d)(h):a?c(h):d(h)}function u(h){return e.attempt(DS,c,d)(h)}function c(h){return t(h)}function d(h){return i._balanced=!0,n(h)}}function jS(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return Me(d)?Ho(e,i)(d):i(d)}function i(d){return d===41?c(d):s0(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return Me(d)?Ho(e,l)(d):c(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?u0(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Me(d)?Ho(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function HS(e,t,n){const r=this;return o;function o(s){return l0.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Bt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function US(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const $S={name:"labelStartImage",resolveAll:yu.resolveAll,tokenize:zS};function zS(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const VS={name:"labelStartLink",resolveAll:yu.resolveAll,tokenize:WS};function WS(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const xs={name:"lineEnding",tokenize:YS};function YS(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),_e(e,t,"linePrefix")}}const Ui={name:"thematicBreak",tokenize:qS};function qS(e,t,n){let r=0,o;return i;function i(u){return e.enter("thematicBreak"),a(u)}function a(u){return o=u,s(u)}function s(u){return u===o?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||fe(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===o?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Ce(u)?_e(e,s,"whitespace")(u):s(u))}}const Et={continuation:{tokenize:QS},exit:JS,name:"list",tokenize:XS},GS={partial:!0,tokenize:eA},KS={partial:!0,tokenize:ZS};function XS(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(p){const b=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ul(p)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ui,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return ul(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(si,r.interrupt?n:c,e.attempt(GS,h,d))}function c(p){return r.containerState.initialBlankLine=!0,i++,h(p)}function d(p){return Ce(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function QS(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(si,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_e(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!Ce(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(KS,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,_e(e,e.attempt(Et,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function ZS(e,t,n){const r=this;return _e(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function JS(e){e.exit(this.containerState.type)}function eA(e,t,n){const r=this;return _e(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!Ce(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const nf={name:"setextUnderline",resolveTo:tA,tokenize:nA};function tA(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function nA(e,t,n){const r=this;let o;return i;function i(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),o=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===o?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),Ce(u)?_e(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||fe(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const rA={tokenize:dA,partial:!0};function oA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:lA,continuation:{tokenize:uA},exit:cA}},text:{91:{name:"gfmFootnoteCall",tokenize:sA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:iA,resolveTo:aA}}}}function iA(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const u=Bt(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function aA(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function sA(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(i>999||d===93&&!a||d===null||d===91||Me(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return o.includes(Bt(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Me(d)||(a=!0),i++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),i++,u):u(d)}}function lA(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(b)}function c(b){if(a>999||b===93&&!s||b===null||b===91||Me(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return i=Bt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Me(b)||(s=!0),a++,e.consume(b),b===92?d:c}function d(b){return b===91||b===92||b===93?(e.consume(b),a++,c):c(b)}function h(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),o.includes(i)||o.push(i),_e(e,p,"gfmFootnoteDefinitionWhitespace")):n(b)}function p(b){return t(b)}}function uA(e,t,n){return e.check(si,t,e.attempt(rA,t,n))}function cA(e){e.exit("gfmFootnoteDefinition")}function dA(e,t,n){const r=this;return _e(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function fA(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",c,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",d,s]],p=s.parser.constructs.insideSpan.null;p&&St(h,h.length,0,Ra(p,a.slice(u+1,l),s)),St(h,h.length,0,[["exit",d,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",c,s]]),St(a,u-1,l-u+3,h),l=u+h.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const u=this.previous,c=this.events;let d=0;return h;function h(b){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(b):(a.enter("strikethroughSequenceTemporary"),p(b))}function p(b){const x=qr(u);if(b===126)return d>1?l(b):(a.consume(b),d++,p);if(d<2&&!n)return l(b);const E=a.exit("strikethroughSequenceTemporary"),T=qr(b);return E._open=!T||T===2&&!!x,E._close=!x||x===2&&!!T,s(b)}}}class hA{constructor(){this.map=[],this.index=new Map}add(t,n,r){pA(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0,this.index.clear()}}function pA(e,t,n,r){if(n===0&&r.length===0)return;const o=e.index.get(t);if(o){o[1]+=n,o[2].push(...r);return}const i=[t,n,r];e.map.push(i),e.index.set(t,i)}function mA(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function gA(){return{flow:{null:{name:"table",tokenize:bA,resolveAll:xA}}}}function bA(e,t,n){const r=this;let o=0,i=0,a;return s;function s(R){let D=r.events.length-1;for(;D>-1;){const{type:z}=r.events[D][1];if(z==="lineEnding"||z==="linePrefix")D--;else break}const M=D>-1?r.events[D][1].type:null,W=M==="tableHead"||M==="tableRow"?w:l;return W===w&&r.parser.lazy[r.now().line]?n(R):W(R)}function l(R){return e.enter("tableHead"),e.enter("tableRow"),u(R)}function u(R){return R===124||(a=!0,i+=1),c(R)}function c(R){return R===null?n(R):fe(R)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),p):n(R):Ce(R)?_e(e,c,"whitespace")(R):(i+=1,a&&(a=!1,o+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||Me(R)?(e.exit("data"),c(R)):(e.consume(R),R===92?h:d)}function h(R){return R===92||R===124?(e.consume(R),d):d(R)}function p(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),a=!1,Ce(R)?_e(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):b(R))}function b(R){return R===45||R===58?E(R):R===124?(a=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),x):I(R)}function x(R){return Ce(R)?_e(e,E,"whitespace")(R):E(R)}function E(R){return R===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),T):R===45?(i+=1,T(R)):R===null||fe(R)?C(R):I(R)}function T(R){return R===45?(e.enter("tableDelimiterFiller"),v(R)):I(R)}function v(R){return R===45?(e.consume(R),v):R===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(R))}function y(R){return Ce(R)?_e(e,C,"whitespace")(R):C(R)}function C(R){return R===124?b(R):R===null||fe(R)?!a||o!==i?I(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):I(R)}function I(R){return n(R)}function w(R){return e.enter("tableRow"),P(R)}function P(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),P):R===null||fe(R)?(e.exit("tableRow"),t(R)):Ce(R)?_e(e,P,"whitespace")(R):(e.enter("data"),L(R))}function L(R){return R===null||R===124||Me(R)?(e.exit("data"),P(R)):(e.consume(R),R===92?F:L)}function F(R){return R===92||R===124?(e.consume(R),L):L(R)}}function xA(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,c,d;const h=new hA;for(;++n<e.length;){const p=e[n],b=p[1];p[0]==="enter"?b.type==="tableHead"?(s=!1,l!==0&&(rf(h,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},h.add(n,0,[["enter",u,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},h.add(n,0,[["enter",c,t]])),o=b.type==="tableDelimiterRow"?2:c?3:1):o&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=vi(h,t,i,o,void 0,d),i=[0,0,0,0]),a[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],d=vi(h,t,i,o,void 0,d)),i=a,a=[i[1],n,0,0])):b.type==="tableHead"?(s=!0,l=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],d=vi(h,t,i,o,n,d)):a[1]!==0&&(d=vi(h,t,a,o,n,d)),o=0):o&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&rf(h,t,l,u,c),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=mA(t.events,n))}return e}function vi(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Fr(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Fr(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=Fr(t.events,n[2]),c=Fr(t.events,n[3]),d={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,x=n[3]-n[2]-1;e.add(b,x,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return o!==void 0&&(i.end=Object.assign({},Fr(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function rf(e,t,n,r,o){const i=[],a=Fr(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function Fr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const EA={name:"tasklistCheck",tokenize:yA};function TA(){return{text:{91:EA}}}function yA(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return Me(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return fe(l)?t(l):Ce(l)?e.check({tokenize:vA},t,n)(l):n(l)}}function vA(e,t,n){return _e(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function wA(e){return Gm([Ok(),oA(),fA(e),gA(),TA()])}const CA={};function kA(e){const t=this,n=e||CA,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(wA(n)),i.push(Ak()),a.push(_k(n))}var SA=Object.defineProperty,AA=Object.defineProperties,_A=Object.getOwnPropertyDescriptors,of=Object.getOwnPropertySymbols,IA=Object.prototype.hasOwnProperty,NA=Object.prototype.propertyIsEnumerable,af=(e,t,n)=>t in e?SA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c0=(e,t)=>{for(var n in t||(t={}))IA.call(t,n)&&af(e,n,t[n]);if(of)for(var n of of(t))NA.call(t,n)&&af(e,n,t[n]);return e},d0=(e,t)=>AA(e,_A(t)),RA=e=>{let t=new Uint8Array(e.length+1),n=!1,r=!1,o=0;for(;o<e.length;){if(e[o]==="\\"&&o+1<e.length&&e[o+1]==="`"){let i=n||r?1:0;t[o+1]=i,t[o+2]=i,o+=2;continue}if(e.substring(o,o+3)==="```"){r=!r;let i=n||r?1:0,a=Math.min(o+3,e.length);for(let s=o+1;s<=a;s+=1)t[s]=i;o=a;continue}!r&&e[o]==="`"&&(n=!n),t[o+1]=n||r?1:0,o+=1}return t},sf=null,bt=(e,t)=>{let n=sf;return(n===null||n.text!==e)&&(n={text:e,lookup:RA(e)},sf=n),n.lookup[Math.min(t,e.length)]===1},PA=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",o=t>1&&e.substring(t-2,t+1)==="```";return n||r||o},OA=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!PA(e,n)&&(t+=1)}return t},Fn=(e,t)=>{let n=!1,r=!1,o=-1;for(let i=0;i<e.length;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}if(!r&&e[i]==="`")if(n){if(o<t&&t<i)return!0;n=!1,o=-1}else n=!0,o=i}return!1},LA=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,DA=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(LA,(t,n,r,o)=>bt(e,o)?t:`${n}\\>${r}`),MA=/(\*\*)([^*]*\*?)$/,FA=/(__)([^_]*?)$/,BA=/(\*\*\*)([^*]*?)$/,jA=/(\*)([^*]*?)$/,HA=/(_)([^_]*?)$/,UA=/(`)([^`]*?)$/,$A=/(~~)([^~]*?)$/,vr=/^[\s_~*`]*$/,f0=/^[\s]*[-*+][\s]+$/,zA=/[\p{L}\p{N}_]/u,VA=/^```[^`\n]*```?$/,WA=/^\*{4,}$/,YA=/(__)([^_]+)_$/,qA=/(~~)([^~]+)~$/,lf=/~~/g,xn=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:zA.test(e)},GA=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},h0=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},KA=e=>e==="inlineLatex"||e==="blockLatex",XA=(e,t)=>t==="["&&e==="none"?"blockLatex":t==="]"&&e==="blockLatex"?"none":t==="("&&e==="none"?"inlineLatex":t===")"&&e==="inlineLatex"?"none":null,QA=(e,t)=>t?e==="blockDollar"?"none":"blockDollar":e==="blockDollar"?e:e==="inlineDollar"?"none":"inlineDollar",Pa=(e,t)=>{let n="none";for(let r=0;r<e.length&&r<t;r+=1){if(e[r]==="\\"&&e[r+1]==="$"){r+=1;continue}if(e[r]==="\\"){let o=XA(n,e[r+1]);if(o!==null){n=o,r+=1;continue}}if(e[r]==="$"&&!KA(n)){let o=e[r+1]==="$";n=QA(n,o),o&&(r+=1)}}return n!=="none"},ZA=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
18
|
+
`)return!1}return!1},p0=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?ZA(e,t):!1;if(e[n]===`
|
|
19
|
+
`)return!1}return!1},JA=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
20
|
+
`)return!1}return!1},vu=(e,t,n)=>{let r=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
|
|
21
|
+
`){r=l+1;break}let o=e.length;for(let l=t;l<e.length;l+=1)if(e[l]===`
|
|
22
|
+
`){o=l;break}let i=e.substring(r,o),a=0,s=!1;for(let l of i)if(l===n)a+=1;else if(l!==" "&&l!==" "){s=!0;break}return a>=3&&!s},m0=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),e_=(e,t,n,r)=>n==="\\"||m0(e)&&Pa(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":n==="*"||(!n||n===" "||n===" "||n===`
|
|
23
|
+
`)&&(!r||r===" "||r===" "||r===`
|
|
24
|
+
`),ea=e=>e===" "||e===" "||e===`
|
|
25
|
+
`,t_=(e,t)=>!!(e&&t&&xn(e)&&xn(t)),n_=(e,t,n,r)=>{let o=t_(e,t),i=!!t&&!ea(t),a=!!e&&!ea(e);return o&&n%2===0&&!r?{count:!1}:a&&n%2===1||i?{count:!0,inWordAsteriskChain:o}:{count:!1}},g0=e=>{let t=0,n=!1,r=!1,o=e.length;for(let i=0;i<o;i+=1){if(e[i]==="`"&&i+2<o&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n)continue;if(e[i]!=="*"){xn(e[i])||(r=!1);continue}let a=i>0?e[i-1]:"",s=i<o-1?e[i+1]:"";if(e_(e,i,a,s))continue;let l=n_(a,s,t,r);l.count&&(t+=1,r=l.inWordAsteriskChain)}return t},r_=(e,t,n,r)=>!!(n==="\\"||m0(e)&&Pa(e,t)||p0(e,t)||JA(e,t)||n==="_"||r==="_"||n&&r&&xn(n)&&xn(r)),o_=e=>{let t=0,n=!1,r=e.length;for(let o=0;o<r;o+=1){if(e[o]==="`"&&o+2<r&&e[o+1]==="`"&&e[o+2]==="`"){n=!n,o+=2;continue}if(n||e[o]!=="_")continue;let i=o>0?e[o-1]:"",a=o<r-1?e[o+1]:"";r_(e,o,i,a)||(t+=1)}return t},i_=e=>{let t=0,n=0,r=!1;for(let o=0;o<e.length;o+=1){if(e[o]==="`"&&o+2<e.length&&e[o+1]==="`"&&e[o+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,o+=2;continue}r||(e[o]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},wu=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},uf=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},a_=(e,t,n)=>{if(!t||vr.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
26
|
+
`),o=r===-1?0:r+1,i=e.substring(o,n);return f0.test(i)&&t.includes(`
|
|
27
|
+
`)?!0:vu(e,n,"*")},s_=e=>{let t=e.match(MA);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return bt(e,r)||Fn(e,r)||a_(e,n,r)?e:wu(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},l_=(e,t,n)=>{if(!t||vr.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
28
|
+
`),o=r===-1?0:r+1,i=e.substring(o,n);return f0.test(i)&&t.includes(`
|
|
29
|
+
`)?!0:vu(e,n,"_")},u_=e=>{let t=e.match(FA);if(!t){let o=e.match(YA);if(o){let i=e.lastIndexOf(o[1]);if(!(bt(e,i)||Fn(e,i))&&uf(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return bt(e,r)||Fn(e,r)||l_(e,n,r)?e:uf(e)%2===1?`${e}__`:e},c_=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Pa(e,n)){let r=n>0?e[n-1]:"",o=n<e.length-1?e[n+1]:"",i=!r||ea(r),a=!o||ea(o);if(i&&a||r&&o&&xn(r)&&xn(o)||a)continue;return n}}return-1},d_=e=>{if(!e.match(jA))return e;let t=c_(e);if(t===-1||bt(e,t)||Fn(e,t))return e;let n=e.substring(t+1);return!n||vr.test(n)?e:g0(e)%2===1?`${e}*`:e},b0=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Pa(e,n)&&!p0(e,n)){let r=n>0?e[n-1]:"",o=n<e.length-1?e[n+1]:"";if(r&&o&&xn(r)&&xn(o))continue;return n}}return-1},f_=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
30
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},h_=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(wu(t)%2!==1)return null;let n=t.indexOf("**"),r=b0(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},p_=e=>{if(!e.match(HA))return e;let t=b0(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||vr.test(n)||bt(e,t)||Fn(e,t))return e;if(o_(e)%2===1){let r=h_(e);return r!==null?r:f_(e)}return e},m_=e=>{let t=wu(e),n=g0(e);return t%2===0&&n%2===0},g_=(e,t,n)=>!t||vr.test(t)||bt(e,n)||Fn(e,n)?!0:vu(e,n,"*"),b_=e=>{if(WA.test(e))return e;let t=e.match(BA);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return g_(e,n,r)?e:i_(e)%2===1?m_(e)?e:`${e}***`:e},x_=/<[a-zA-Z/][^>]*$/,E_=e=>{let t=e.match(x_);return!t||t.index===void 0||bt(e,t.index)?e:e.substring(0,t.index).trimEnd()},T_=e=>!e.match(VA)||e.includes(`
|
|
31
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,y_=e=>(e.match(/```/g)||[]).length%2===1,v_=e=>{let t=T_(e);if(t!==null)return t;let n=e.match(UA);if(n&&!y_(e)){let r=n[2];if(!r||vr.test(r))return e;if(OA(e)%2===1)return`${e}\``}return e},x0=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",w_=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!x0(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},C_=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!x0(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},k_=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
32
|
+
`,t)!==-1&&!e.endsWith(`
|
|
33
|
+
`)?`${e}
|
|
34
|
+
$$`:`${e}$$`},S_=e=>w_(e)%2===0?e:k_(e),A_=e=>C_(e)%2===1?`${e}$`:e,__=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=GA(e,t);if(r===-1||bt(e,r))return null;let o=r>0&&e[r-1]==="!",i=o?r-1:r,a=e.substring(0,i);if(o)return a;let s=e.substring(r+1,t);return n==="text-only"?`${a}${s}`:`${a}[${s}](streamdown:incomplete-link)`},cf=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!bt(e,n)){if(n>0&&e[n-1]==="!")continue;let r=h0(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let o=e.indexOf(")",r+2);o!==-1&&(n=o)}}return t},I_=(e,t,n)=>{let r=t>0&&e[t-1]==="!",o=r?t-1:t;if(!e.substring(t+1).includes("]")){let i=e.substring(0,o);if(r)return i;if(n==="text-only"){let a=cf(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(h0(e,t)===-1){let i=e.substring(0,o);if(r)return i;if(n==="text-only"){let a=cf(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},E0=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!bt(e,n)){let r=__(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!bt(e,r)){let o=I_(e,r,t);if(o!==null)return o}return e},N_=/^-{1,2}$/,R_=/^[\s]*-{1,2}[\s]+$/,P_=/^={1,2}$/,O_=/^[\s]*={1,2}[\s]+$/,L_=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
35
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),o=n.trim();if(N_.test(o)&&!n.match(R_)){let i=r.split(`
|
|
36
|
+
`).at(-1);if(i&&i.trim().length>0)return`${e}`}if(P_.test(o)&&!n.match(O_)){let i=r.split(`
|
|
37
|
+
`).at(-1);if(i&&i.trim().length>0)return`${e}`}return e},D_=/([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu,M_=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(D_,(t,n,r)=>{let o=r+n.length;return bt(e,o)?t:`${n}\\~`}),F_=e=>{var t,n;let r=e.match($A);if(r){let o=r[2];if(!o||vr.test(o))return e;let i=e.lastIndexOf(r[1]);if(bt(e,i)||Fn(e,i))return e;if(((t=e.match(lf))==null?void 0:t.length)%2===1)return`${e}~~`}else{let o=e.match(qA);if(o){let i=e.lastIndexOf(o[0].slice(0,2));if(bt(e,i)||Fn(e,i))return e;if(((n=e.match(lf))==null?void 0:n.length)%2===1)return`${e}~`}}return e},Es=e=>e!==!1,B_=e=>e===!0,ht={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},j_=[{handler:{name:"singleTilde",handle:M_,priority:ht.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:DA,priority:ht.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:E_,priority:ht.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:L_,priority:ht.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:E0,priority:ht.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:b_,priority:ht.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:s_,priority:ht.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:u_,priority:ht.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:d_,priority:ht.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:p_,priority:ht.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:v_,priority:ht.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:F_,priority:ht.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:S_,priority:ht.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:A_,priority:ht.INLINE_KATEX},optionKey:"inlineKatex"}],H_=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return j_.filter(({handler:r,optionKey:o})=>r.name==="links"?Es(e==null?void 0:e.links)||Es(e==null?void 0:e.images):r.name==="inlineKatex"?B_(e==null?void 0:e.inlineKatex):Es(e==null?void 0:e[o])).map(({handler:r,earlyReturn:o})=>r.name==="links"?{handler:d0(c0({},r),{handle:i=>E0(i,n)}),earlyReturn:n==="protocol"?o:void 0}:{handler:r,earlyReturn:o})},U_=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,o=H_(t),i=((n=t==null?void 0:t.handlers)!=null?n:[]).map(s=>{var l;return{handler:d0(c0({},s),{priority:(l=s.priority)!=null?l:ht.DEFAULT}),earlyReturn:void 0}}),a=[...o,...i].sort((s,l)=>{var u,c;return((u=s.handler.priority)!=null?u:0)-((c=l.handler.priority)!=null?c:0)});for(let{handler:s,earlyReturn:l}of a)if(r=s.handle(r),l!=null&&l(r))return r;return r},$_=U_;const z_=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},V_=(e,t)=>({classGroupId:e,validator:t}),T0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ta="-",df=[],W_="arbitrary..",Y_=e=>{const t=G_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return q_(a);const s=a.split(ta),l=s[0]===""&&s.length>1?1:0;return y0(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],u=n[a];return l?u?z_(u,l):l:u||df}return n[a]||df}}},y0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=y0(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const s=t===0?e.join(ta):e.slice(t).join(ta),l=a.length;for(let u=0;u<l;u++){const c=a[u];if(c.validator(s))return c.classGroupId}},q_=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?W_+r:void 0})(),G_=e=>{const{theme:t,classGroups:n}=e;return K_(n,t)},K_=(e,t)=>{const n=T0();for(const r in e){const o=e[r];Cu(o,n,r,t)}return n},Cu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];X_(a,t,n,r)}},X_=(e,t,n,r)=>{if(typeof e=="string"){Q_(e,t,n);return}if(typeof e=="function"){Z_(e,t,n,r);return}J_(e,t,n,r)},Q_=(e,t,n)=>{const r=e===""?t:v0(t,e);r.classGroupId=n},Z_=(e,t,n,r)=>{if(eI(e)){Cu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(V_(n,e))},J_=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];Cu(l,v0(t,s),n,r)}},v0=(e,t)=>{let n=e;const r=t.split(ta),o=r.length;for(let i=0;i<o;i++){const a=r[i];let s=n.nextPart.get(a);s||(s=T0(),n.nextPart.set(a,s)),n=s}return n},eI=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,tI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},fl="!",ff=":",nI=[],hf=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),rI=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,u;const c=o.length;for(let x=0;x<c;x++){const E=o[x];if(a===0&&s===0){if(E===ff){i.push(o.slice(l,x)),l=x+1;continue}if(E==="/"){u=x;continue}}E==="["?a++:E==="]"?a--:E==="("?s++:E===")"&&s--}const d=i.length===0?o:o.slice(l);let h=d,p=!1;d.endsWith(fl)?(h=d.slice(0,-1),p=!0):d.startsWith(fl)&&(h=d.slice(1),p=!0);const b=u&&u>l?u-l:void 0;return hf(i,p,h,b)};if(t){const o=t+ff,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):hf(nI,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},oI=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},iI=e=>({cache:tI(e.cacheSize),parseClassName:rI(e),sortModifiers:oI(e),postfixLookupClassGroupIds:aI(e),...Y_(e)}),aI=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},sI=/\s+/,lI=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:a}=t,s=[],l=e.trim().split(sI);let u="";for(let c=l.length-1;c>=0;c-=1){const d=l[c],{isExternal:h,modifiers:p,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:E}=n(d);if(h){u=d+(u.length>0?" "+u:u);continue}let T=!!E,v;if(T){const P=x.substring(0,E);v=r(P);const L=v&&a[v]?r(x):void 0;L&&L!==v&&(v=L,T=!1)}else v=r(x);if(!v){if(!T){u=d+(u.length>0?" "+u:u);continue}if(v=r(x),!v){u=d+(u.length>0?" "+u:u);continue}T=!1}const y=p.length===0?"":p.length===1?p[0]:i(p).join(":"),C=b?y+fl:y,I=C+v;if(s.indexOf(I)>-1)continue;s.push(I);const w=o(v,T);for(let P=0;P<w.length;++P){const L=w[P];s.push(C+L)}u=d+(u.length>0?" "+u:u)}return u},uI=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=w0(n))&&(o&&(o+=" "),o+=r);return o},w0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=w0(e[r]))&&(n&&(n+=" "),n+=t);return n},cI=(e,...t)=>{let n,r,o,i;const a=l=>{const u=t.reduce((c,d)=>d(c),e());return n=iI(u),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const u=r(l);if(u)return u;const c=lI(l,n);return o(l,c),c};return i=a,(...l)=>i(uI(...l))},dI=[],Xe=e=>{const t=n=>n[e]||dI;return t.isThemeGetter=!0,t.themeKey=e,t},C0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,k0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fI=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,hI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,gI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_n=e=>fI.test(e),Te=e=>!!e&&!Number.isNaN(Number(e)),zt=e=>!!e&&Number.isInteger(Number(e)),Ts=e=>e.endsWith("%")&&Te(e.slice(0,-1)),cn=e=>hI.test(e),S0=()=>!0,xI=e=>pI.test(e)&&!mI.test(e),ku=()=>!1,EI=e=>gI.test(e),TI=e=>bI.test(e),yI=e=>!se(e)&&!le(e),vI=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),wI=e=>Wn(e,I0,ku),se=e=>C0.test(e),tr=e=>Wn(e,N0,xI),pf=e=>Wn(e,RI,Te),CI=e=>Wn(e,P0,S0),kI=e=>Wn(e,R0,ku),mf=e=>Wn(e,A0,ku),SI=e=>Wn(e,_0,TI),wi=e=>Wn(e,O0,EI),le=e=>k0.test(e),wo=e=>wr(e,N0),AI=e=>wr(e,R0),gf=e=>wr(e,A0),_I=e=>wr(e,I0),II=e=>wr(e,_0),Ci=e=>wr(e,O0,!0),NI=e=>wr(e,P0,!0),Wn=(e,t,n)=>{const r=C0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},wr=(e,t,n=!1)=>{const r=k0.exec(e);return r?r[1]?t(r[1]):n:!1},A0=e=>e==="position"||e==="percentage",_0=e=>e==="image"||e==="url",I0=e=>e==="length"||e==="size"||e==="bg-size",N0=e=>e==="length",RI=e=>e==="number",R0=e=>e==="family-name",P0=e=>e==="number"||e==="weight",O0=e=>e==="shadow",PI=()=>{const e=Xe("color"),t=Xe("font"),n=Xe("text"),r=Xe("font-weight"),o=Xe("tracking"),i=Xe("leading"),a=Xe("breakpoint"),s=Xe("container"),l=Xe("spacing"),u=Xe("radius"),c=Xe("shadow"),d=Xe("inset-shadow"),h=Xe("text-shadow"),p=Xe("drop-shadow"),b=Xe("blur"),x=Xe("perspective"),E=Xe("aspect"),T=Xe("ease"),v=Xe("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...C(),le,se],w=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],L=()=>[le,se,l],F=()=>[_n,"full","auto",...L()],R=()=>[zt,"none","subgrid",le,se],D=()=>["auto",{span:["full",zt,le,se]},zt,le,se],M=()=>[zt,"auto",le,se],W=()=>["auto","min","max","fr",le,se],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...L()],V=()=>[_n,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],Q=()=>[s,_n,"screen","full","dvw","lvw","svw","min","max","fit",...L()],re=()=>[_n,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],k=()=>[e,le,se],ue=()=>[...C(),gf,mf,{position:[le,se]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",_I,wI,{size:[le,se]}],ae=()=>[Ts,wo,tr],K=()=>["","none","full",u,le,se],ee=()=>["",Te,wo,tr],ce=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[Te,Ts,gf,mf],pe=()=>["","none",b,le,se],be=()=>["none",Te,le,se],Ee=()=>["none",Te,le,se],we=()=>[Te,le,se],We=()=>[_n,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[cn],breakpoint:[cn],color:[S0],container:[cn],"drop-shadow":[cn],ease:["in","out","in-out"],font:[yI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[cn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[cn],shadow:[cn],spacing:["px",Te],text:[cn],"text-shadow":[cn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_n,se,le,E]}],container:["container"],"container-type":[{"@container":["","normal","size",le,se]}],"container-named":[vI],columns:[{columns:[Te,"auto",se,le,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[zt,"auto",le,se]}],basis:[{basis:[_n,"full","auto",s,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,_n,"auto","initial","none",se]}],grow:[{grow:["",Te,le,se]}],shrink:[{shrink:["",Te,le,se]}],order:[{order:[zt,"first","last","none",le,se]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...Q()]}],"min-inline-size":[{"min-inline":["auto",...Q()]}],"max-inline-size":[{"max-inline":["none",...Q()]}],"block-size":[{block:["auto",...re()]}],"min-block-size":[{"min-block":["auto",...re()]}],"max-block-size":[{"max-block":["none",...re()]}],w:[{w:[s,"screen",...V()]}],"min-w":[{"min-w":[s,"screen","none",...V()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh","none",...V()]}],"font-size":[{text:["base",n,wo,tr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,NI,CI]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ts,se]}],"font-family":[{font:[AI,kI,t]}],"font-features":[{"font-features":[se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,le,se]}],"line-clamp":[{"line-clamp":[Te,"none",le,pf]}],leading:[{leading:["none",i,...L()]}],"list-image":[{"list-image":["none",le,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",le,tr]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[Te,"auto",le,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"tab-size":[{tab:[zt,le,se]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},zt,le,se],radial:["",le,se],conic:["",zt,le,se]},II,SI]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,le,se]}],"outline-w":[{outline:["",Te,wo,tr]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","inner","none",c,Ci,wi]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,Ci,wi]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[Te,tr]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",h,Ci,wi]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[Te,le,se]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[le,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,se]}],filter:[{filter:["","none",le,se]}],blur:[{blur:pe()}],brightness:[{brightness:[Te,le,se]}],contrast:[{contrast:[Te,le,se]}],"drop-shadow":[{"drop-shadow":["","none",p,Ci,wi]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",Te,le,se]}],"hue-rotate":[{"hue-rotate":[Te,le,se]}],invert:[{invert:["",Te,le,se]}],saturate:[{saturate:[Te,le,se]}],sepia:[{sepia:["",Te,le,se]}],"backdrop-filter":[{"backdrop-filter":["","none",le,se]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[Te,le,se]}],"backdrop-contrast":[{"backdrop-contrast":[Te,le,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,le,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,le,se]}],"backdrop-invert":[{"backdrop-invert":["",Te,le,se]}],"backdrop-opacity":[{"backdrop-opacity":[Te,le,se]}],"backdrop-saturate":[{"backdrop-saturate":[Te,le,se]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,le,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",le,se]}],ease:[{ease:["linear","initial",T,le,se]}],delay:[{delay:[Te,le,se]}],animate:[{animate:["none",v,le,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,le,se]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[le,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],zoom:[{zoom:[zt,le,se]}],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,se]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[Te,wo,tr,pf]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},L0=cI(PI),OI=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LI=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,DI={};function bf(e,t){return(DI.jsx?LI:OI).test(e)}const MI=/[ \t\n\f\r]/g;function FI(e){return typeof e=="object"?e.type==="text"?xf(e.value):!1:xf(e)}function xf(e){return e.replace(MI,"")===""}function D0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pr={},ys,Ef;function BI(){if(Ef)return ys;Ef=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
|
|
38
|
+
`,u="/",c="*",d="",h="comment",p="declaration";function b(E,T){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];T=T||{};var v=1,y=1;function C(z){var $=z.match(t);$&&(v+=$.length);var H=z.lastIndexOf(l);y=~H?z.length-H:y+z.length}function I(){var z={line:v,column:y};return function($){return $.position=new w(z),F(),$}}function w(z){this.start=z,this.end={line:v,column:y},this.source=T.source}w.prototype.content=E;function P(z){var $=new Error(T.source+":"+v+":"+y+": "+z);if($.reason=z,$.filename=T.source,$.line=v,$.column=y,$.source=E,!T.silent)throw $}function L(z){var $=z.exec(E);if($){var H=$[0];return C(H),E=E.slice(H.length),$}}function F(){L(n)}function R(z){var $;for(z=z||[];$=D();)$!==!1&&z.push($);return z}function D(){var z=I();if(!(u!=E.charAt(0)||c!=E.charAt(1))){for(var $=2;d!=E.charAt($)&&(c!=E.charAt($)||u!=E.charAt($+1));)++$;if($+=2,d===E.charAt($-1))return P("End of comment missing");var H=E.slice(2,$-2);return y+=2,C(H),E=E.slice($),y+=2,z({type:h,comment:H})}}function M(){var z=I(),$=L(r);if($){if(D(),!L(o))return P("property missing ':'");var H=L(i),V=z({type:p,property:x($[0].replace(e,d)),value:H?x(H[0].replace(e,d)):d});return L(a),V}}function W(){var z=[];R(z);for(var $;$=M();)$!==!1&&(z.push($),R(z));return z}return F(),W()}function x(E){return E?E.replace(s,d):d}return ys=b,ys}var Tf;function jI(){if(Tf)return Pr;Tf=1;var e=Pr&&Pr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=n;const t=e(BI());function n(r,o){let i=null;if(!r||typeof r!="string")return i;const a=(0,t.default)(r),s=typeof o=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:c}=l;s?o(u,c,l):c&&(i=i||{},i[u]=c)}),i}return Pr}var Co={},yf;function HI(){if(yf)return Co;yf=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(u){return!u||n.test(u)||e.test(u)},a=function(u,c){return c.toUpperCase()},s=function(u,c){return"".concat(c,"-")},l=function(u,c){return c===void 0&&(c={}),i(u)?u:(u=u.toLowerCase(),c.reactCompat?u=u.replace(o,s):u=u.replace(r,s),u.replace(t,a))};return Co.camelCase=l,Co}var ko,vf;function UI(){if(vf)return ko;vf=1;var e=ko&&ko.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(jI()),n=HI();function r(o,i){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(s,l){s&&l&&(a[(0,n.camelCase)(s,i)]=l)}),a}return r.default=r,ko=r,ko}var $I=UI();const zI=D0($I);function Uo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?wf(e.position):"start"in e||"end"in e?wf(e):"line"in e||"column"in e?hl(e):""}function hl(e){return Cf(e&&e.line)+":"+Cf(e&&e.column)}function wf(e){return hl(e&&e.start)+"-"+hl(e&&e.end)}function Cf(e){return e&&typeof e=="number"?e:1}class ft extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=Uo(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ft.prototype.file="";ft.prototype.name="";ft.prototype.reason="";ft.prototype.message="";ft.prototype.stack="";ft.prototype.column=void 0;ft.prototype.line=void 0;ft.prototype.ancestors=void 0;ft.prototype.cause=void 0;ft.prototype.fatal=void 0;ft.prototype.place=void 0;ft.prototype.ruleId=void 0;ft.prototype.source=void 0;const Su={}.hasOwnProperty,VI=new Map,WI=/[A-Z]/g,YI=new Set(["table","tbody","thead","tfoot","tr"]),qI=new Set(["td","th"]),M0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function GI(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=nN(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=tN(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?zn:ri,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=F0(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function F0(e,t,n){if(t.type==="element")return KI(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return XI(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ZI(e,t,n);if(t.type==="mdxjsEsm")return QI(e,t);if(t.type==="root")return JI(e,t,n);if(t.type==="text")return eN(e,t)}function KI(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=zn,e.schema=o),e.ancestors.push(t);const i=j0(e,t.tagName,!1),a=rN(e,t);let s=_u(e,t);return YI.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!FI(l):!0})),B0(e,a,i,t),Au(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function XI(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Yo(e,t.position)}function QI(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Yo(e,t.position)}function ZI(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=zn,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:j0(e,t.name,!0),a=oN(e,t),s=_u(e,t);return B0(e,a,i,t),Au(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function JI(e,t,n){const r={};return Au(r,_u(e,t)),e.create(t,e.Fragment,r,n)}function eN(e,t){return t.value}function B0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Au(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function tN(e,t,n){return r;function r(o,i,a,s){const u=Array.isArray(a.children)?n:t;return s?u(i,a,s):u(i,a)}}function nN(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=en(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function rN(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Su.call(t.properties,o)){const i=iN(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&qI.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function oN(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Yo(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else Yo(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function _u(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:VI;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const u=o.get(l)||0;a=l+"-"+u,o.set(l,u+1)}}const s=F0(e,i,a);s!==void 0&&n.push(s)}return n}function iN(e,t,n){const r=Ca(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Up(n):$p(n)),r.property==="style"){let o=typeof n=="object"?n:aN(e,String(n));return e.stylePropertyNameCase==="css"&&(o=sN(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?yy[r.property]||r.property:r.attribute,n]}}function aN(e,t){try{return zI(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new ft("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=M0+"#cannot-parse-style-attribute",o}}function j0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=bf(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=bf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Su.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Yo(e)}function Yo(e,t){const n=new ft("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=M0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function sN(e){const t={};let n;for(n in e)Su.call(e,n)&&(t[lN(n)]=e[n]);return t}function lN(e){let t=e.replace(WI,uN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uN(e){return"-"+e.toLowerCase()}const vs={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},cN={tokenize:dN};function dN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),_e(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return fe(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const fN={tokenize:hN},kf={tokenize:pN};function hN(e){const t=this,n=[];let r=0,o,i,a;return s;function s(y){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,l,u)(y)}return u(y)}function l(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&v();const C=t.events.length;let I=C,w;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){w=t.events[I][1].end;break}T(r);let P=C;for(;P<t.events.length;)t.events[P][1].end={...w},P++;return St(t.events,I+1,0,t.events.slice(C)),t.events.length=P,u(y)}return s(y)}function u(y){if(r===n.length){if(!o)return h(y);if(o.currentConstruct&&o.currentConstruct.concrete)return b(y);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(kf,c,d)(y)}function c(y){return o&&v(),T(r),h(y)}function d(y){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,b(y)}function h(y){return t.containerState={},e.attempt(kf,p,b)(y)}function p(y){return r++,n.push([t.currentConstruct,t.containerState]),h(y)}function b(y){if(y===null){o&&v(),T(0),e.consume(y);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),x(y)}function x(y){if(y===null){E(e.exit("chunkFlow"),!0),T(0),e.consume(y);return}return fe(y)?(e.consume(y),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(y),x)}function E(y,C){const I=t.sliceStream(y);if(C&&I.push(null),y.previous=i,i&&(i.next=y),i=y,o.defineSkip(y.start),o.write(I),t.parser.lazy[y.start.line]){let w=o.events.length;for(;w--;)if(o.events[w][1].start.offset<a&&(!o.events[w][1].end||o.events[w][1].end.offset>a))return;const P=t.events.length;let L=P,F,R;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(F){R=t.events[L][1].end;break}F=!0}for(T(r),w=P;w<t.events.length;)t.events[w][1].end={...R},w++;St(t.events,L+1,0,t.events.slice(P)),t.events.length=w}}function T(y){let C=n.length;for(;C-- >y;){const I=n[C];t.containerState=I[1],I[0].exit.call(t,e)}n.length=y}function v(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function pN(e,t,n){return _e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const mN={tokenize:gN};function gN(e){const t=this,n=e.attempt(si,r,e.attempt(this.parser.constructs.flowInitial,o,_e(e,e.attempt(this.parser.constructs.flow,o,e.attempt(uS,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const bN={resolveAll:U0()},xN=H0("string"),EN=H0("text");function H0(e){return{resolveAll:U0(e==="text"?TN:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(c){return u(c)?i(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),i(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=o[c];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function U0(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function TN(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const u=o[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const yN={42:Et,43:Et,45:Et,48:Et,49:Et,50:Et,51:Et,52:Et,53:Et,54:Et,55:Et,56:Et,57:Et,62:r0},vN={91:pS},wN={[-2]:bs,[-1]:bs,32:bs},CN={35:TS,42:Ui,45:[nf,Ui],60:CS,61:nf,95:Ui,96:ef,126:ef},kN={38:i0,92:o0},SN={[-5]:xs,[-4]:xs,[-3]:xs,33:$S,38:i0,42:dl,60:[Vk,RS],91:VS,92:[xS,o0],93:yu,95:dl,96:rS},AN={null:[dl,bN]},_N={null:[42,95]},IN={null:[]},NN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:_N,contentInitial:vN,disable:IN,document:yN,flow:CN,flowInitial:wN,insideSpan:AN,string:kN,text:SN},Symbol.toStringTag,{value:"Module"}));function RN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:P(I),check:P(w),consume:v,enter:y,exit:C,interrupt:P(w,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:b,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&i.push(t),u;function d(D){return a=Nt(a,D),E(),a[a.length-1]!==null?[]:(L(t,0),u.events=Ra(i,u.events,u),u.events)}function h(D,M){return ON(p(D),M)}function p(D){return PN(a,D)}function b(){const{_bufferIndex:D,_index:M,line:W,column:z,offset:$}=r;return{_bufferIndex:D,_index:M,line:W,column:z,offset:$}}function x(D){o[D.line]=D.column,R()}function E(){let D;for(;r._index<a.length;){const M=a[r._index];if(typeof M=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<M.length;)T(M.charCodeAt(r._bufferIndex));else T(M)}}function T(D){c=c(D)}function v(D){fe(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,R()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=D}function y(D,M){const W=M||{};return W.type=D,W.start=b(),u.events.push(["enter",W,u]),s.push(W),W}function C(D){const M=s.pop();return M.end=b(),u.events.push(["exit",M,u]),M}function I(D,M){L(D,M.from)}function w(D,M){M.restore()}function P(D,M){return W;function W(z,$,H){let V,Q,re,k;return Array.isArray(z)?j(z):"tokenize"in z?j([z]):ue(z);function ue(ee){return ce;function ce(te){const oe=te!==null&&ee[te],pe=te!==null&&ee.null,be=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return j(be)(te)}}function j(ee){return V=ee,Q=0,ee.length===0?H:_(ee[Q])}function _(ee){return ce;function ce(te){return k=F(),re=ee,ee.partial||(u.currentConstruct=ee),ee.name&&u.parser.constructs.disable.null.includes(ee.name)?K():ee.tokenize.call(M?Object.assign(Object.create(u),M):u,l,ae,K)(te)}}function ae(ee){return D(re,k),$}function K(ee){return k.restore(),++Q<V.length?_(V[Q]):H}}}function L(D,M){D.resolveAll&&!i.includes(D)&&i.push(D),D.resolve&&St(u.events,M,u.events.length-M,D.resolve(u.events.slice(M),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function F(){const D=b(),M=u.previous,W=u.currentConstruct,z=u.events.length,$=Array.from(s);return{from:z,restore:H};function H(){r=D,u.previous=M,u.currentConstruct=W,u.events.length=z,s=$,R()}}function R(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function PN(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function ON(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|
|
39
|
+
`;break}case-3:{a=`\r
|
|
40
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}function LN(e){const r={constructs:Gm([NN,...(e||{}).extensions||[]]),content:o(cN),defined:[],document:o(fN),flow:o(mN),lazy:{},string:o(xN),text:o(EN)};return r;function o(i){return a;function a(s){return RN(r,i,s)}}}function DN(e){for(;!a0(e););return e}const Sf=/[\0\t\n\r]/g;function MN(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let u,c,d,h,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(Sf.lastIndex=d,u=Sf.exec(i),h=u&&u.index!==void 0?u.index:i.length,p=i.charCodeAt(h),!u){t=i.slice(d);break}if(p===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(i.slice(d,h)),e+=h-d),p){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const $0={}.hasOwnProperty;function FN(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),BN(n)(DN(LN(n).document().write(MN()(e,t,!0))))}function BN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Nr),autolinkProtocol:F,autolinkEmail:F,atxHeading:i(it),blockQuote:i(pe),characterEscape:F,characterReference:F,codeFenced:i(be),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(be,a),codeText:i(Ee,a),codeTextData:F,data:F,codeFlowValue:F,definition:i(we),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(We),hardBreakEscape:i(at),hardBreakTrailing:i(at),htmlFlow:i(vt,a),htmlFlowData:F,htmlText:i(vt,a),htmlTextData:F,image:i(an),label:a,link:i(Nr),listItem:i(Ae),listItemValue:h,listOrdered:i(de,d),listUnordered:i(de),paragraph:i(Ye),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(it),strong:i(_t),thematicBreak:i(po)},exit:{atxHeading:l(),atxHeadingSequence:I,autolink:l(),autolinkEmail:oe,autolinkProtocol:te,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:K,characterReferenceMarkerNumeric:K,characterReferenceValue:ee,characterReference:ce,codeFenced:l(E),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:b,codeFlowValue:R,codeIndented:l(T),codeText:l($),codeTextData:R,data:R,definition:l(),definitionDestinationString:C,definitionLabelString:v,definitionTitleString:y,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l(W),htmlFlowData:R,htmlText:l(z),htmlTextData:R,image:l(V),label:re,labelText:Q,lineEnding:D,link:l(H),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:k,resourceTitleString:ue,resource:j,setextHeading:l(L),setextHeadingLineSequence:P,setextHeadingText:w,strong:l(),thematicBreak:l()}};z0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Y){let ne={type:"root",children:[]};const ge={stack:[ne],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:c,data:n},Se=[];let Oe=-1;for(;++Oe<Y.length;)if(Y[Oe][1].type==="listOrdered"||Y[Oe][1].type==="listUnordered")if(Y[Oe][0]==="enter")Se.push(Oe);else{const Dt=Se.pop();Oe=o(Y,Dt,Oe)}for(Oe=-1;++Oe<Y.length;){const Dt=t[Y[Oe][0]];$0.call(Dt,Y[Oe][1].type)&&Dt[Y[Oe][1].type].call(Object.assign({sliceSerialize:Y[Oe][2].sliceSerialize},ge),Y[Oe][1])}if(ge.tokenStack.length>0){const Dt=ge.tokenStack[ge.tokenStack.length-1];(Dt[1]||Af).call(ge,void 0,Dt[0])}for(ne.position={start:In(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:In(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<t.transforms.length;)ne=t.transforms[Oe](ne)||ne;return ne}function o(Y,ne,ge){let Se=ne-1,Oe=-1,Dt=!1,Zn,sn,mo,go;for(;++Se<=ge;){const wt=Y[Se];switch(wt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{wt[0]==="enter"?Oe++:Oe--,go=void 0;break}case"lineEndingBlank":{wt[0]==="enter"&&(Zn&&!go&&!Oe&&!mo&&(mo=Se),go=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:go=void 0}if(!Oe&&wt[0]==="enter"&&wt[1].type==="listItemPrefix"||Oe===-1&&wt[0]==="exit"&&(wt[1].type==="listUnordered"||wt[1].type==="listOrdered")){if(Zn){let Rr=Se;for(sn=void 0;Rr--;){const ln=Y[Rr];if(ln[1].type==="lineEnding"||ln[1].type==="lineEndingBlank"){if(ln[0]==="exit")continue;sn&&(Y[sn][1].type="lineEndingBlank",Dt=!0),ln[1].type="lineEnding",sn=Rr}else if(!(ln[1].type==="linePrefix"||ln[1].type==="blockQuotePrefix"||ln[1].type==="blockQuotePrefixWhitespace"||ln[1].type==="blockQuoteMarker"||ln[1].type==="listItemIndent"))break}mo&&(!sn||mo<sn)&&(Zn._spread=!0),Zn.end=Object.assign({},sn?Y[sn][1].start:wt[1].end),Y.splice(sn||Se,0,["exit",Zn,wt[2]]),Se++,ge++}if(wt[1].type==="listItemPrefix"){const Rr={type:"listItem",_spread:!1,start:Object.assign({},wt[1].start),end:void 0};Zn=Rr,Y.splice(Se,0,["enter",Rr,wt[2]]),Se++,ge++,mo=void 0,go=!0}}}return Y[ne][1]._spread=Dt,ge}function i(Y,ne){return ge;function ge(Se){s.call(this,Y(Se),Se),ne&&ne.call(this,Se)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(Y,ne,ge){this.stack[this.stack.length-1].children.push(Y),this.stack.push(Y),this.tokenStack.push([ne,ge||void 0]),Y.position={start:In(ne.start),end:void 0}}function l(Y){return ne;function ne(ge){Y&&Y.call(this,ge),u.call(this,ge)}}function u(Y,ne){const ge=this.stack.pop(),Se=this.tokenStack.pop();if(Se)Se[0].type!==Y.type&&(ne?ne.call(this,Y,Se[0]):(Se[1]||Af).call(this,Y,Se[0]));else throw new Error("Cannot close `"+Y.type+"` ("+Uo({start:Y.start,end:Y.end})+"): it’s not open");ge.position.end=In(Y.end)}function c(){return bu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(Y){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(Y),10),this.data.expectingFirstListItemValue=void 0}}function p(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=Y}function b(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=Y}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Y.replace(/(\r?\n|\r)$/g,"")}function v(Y){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ne,ge.identifier=Bt(this.sliceSerialize(Y)).toLowerCase()}function y(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.title=Y}function C(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.url=Y}function I(Y){const ne=this.stack[this.stack.length-1];if(!ne.depth){const ge=this.sliceSerialize(Y).length;ne.depth=ge}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function P(Y){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(Y).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function F(Y){const ge=this.stack[this.stack.length-1].children;let Se=ge[ge.length-1];(!Se||Se.type!=="text")&&(Se=kn(),Se.position={start:In(Y.start),end:void 0},ge.push(Se)),this.stack.push(Se)}function R(Y){const ne=this.stack.pop();ne.value+=this.sliceSerialize(Y),ne.position.end=In(Y.end)}function D(Y){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=ne.children[ne.children.length-1];ge.position.end=In(Y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(F.call(this,Y),R.call(this,Y))}function M(){this.data.atHardBreak=!0}function W(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Y}function z(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Y}function $(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Y}function H(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=ne,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function V(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=ne,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function Q(Y){const ne=this.sliceSerialize(Y),ge=this.stack[this.stack.length-2];ge.label=pk(ne),ge.identifier=Bt(ne).toLowerCase()}function re(){const Y=this.stack[this.stack.length-1],ne=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const Se=Y.children;ge.children=Se}else ge.alt=ne}function k(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.url=Y}function ue(){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.title=Y}function j(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function ae(Y){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ne,ge.identifier=Bt(this.sliceSerialize(Y)).toLowerCase(),this.data.referenceType="full"}function K(Y){this.data.characterReferenceType=Y.type}function ee(Y){const ne=this.sliceSerialize(Y),ge=this.data.characterReferenceType;let Se;ge?(Se=qm(ne,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Se=Eu(ne);const Oe=this.stack[this.stack.length-1];Oe.value+=Se}function ce(Y){const ne=this.stack.pop();ne.position.end=In(Y.end)}function te(Y){R.call(this,Y);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(Y)}function oe(Y){R.call(this,Y);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(Y)}function pe(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function Ee(){return{type:"inlineCode",value:""}}function we(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function We(){return{type:"emphasis",children:[]}}function it(){return{type:"heading",depth:0,children:[]}}function at(){return{type:"break"}}function vt(){return{type:"html",value:""}}function an(){return{type:"image",title:null,url:"",alt:null}}function Nr(){return{type:"link",title:null,url:"",children:[]}}function de(Y){return{type:"list",ordered:Y.type==="listOrdered",start:null,spread:Y._spread,children:[]}}function Ae(Y){return{type:"listItem",spread:Y._spread,checked:null,children:[]}}function Ye(){return{type:"paragraph",children:[]}}function _t(){return{type:"strong",children:[]}}function kn(){return{type:"text",value:""}}function po(){return{type:"thematicBreak"}}}function In(e){return{line:e.line,column:e.column,offset:e.offset}}function z0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?z0(e,r):jN(e,r)}}function jN(e,t){let n;for(n in t)if($0.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Af(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Uo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Uo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Uo({start:t.start,end:t.end})+") is still open")}function HN(e){const t=this;t.parser=n;function n(r){return FN(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function UN(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function $N(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
41
|
+
`}]}function zN(e,t){const n=t.value?t.value+`
|
|
42
|
+
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function VN(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WN(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=no(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function qN(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function V0(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function KN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return V0(e,t);const o={src:no(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function XN(e,t){const n={src:no(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function QN(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function ZN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return V0(e,t);const o={href:no(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function JN(e,t){const n={href:no(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function e3(e,t,n){const r=e.all(t),o=n?t3(n):W0(t),i={},a=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(o||s!==0||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
|
|
43
|
+
`}),c.type==="element"&&c.tagName==="p"&&!o?a.push(...c.children):a.push(c)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
44
|
+
`});const u={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,u),e.applyData(t,u)}function t3(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=W0(n[r])}return t}function W0(e){const t=e.spread;return t??e.children.length>1}function n3(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function r3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function o3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function i3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function a3(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=en(t.children[1]),l=Ia(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function s3(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const d=t.children[l],h={},p=a?a[l]:void 0;p&&(h.align=p);let b={type:"element",tagName:i,properties:h,children:[]};d&&(b.children=e.all(d),e.patch(d,b),b=e.applyData(d,b)),u.push(b)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function l3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const _f=9,If=32;function u3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Nf(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Nf(t.slice(o),o>0,!1)),i.join("")}function Nf(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===_f||i===If;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===_f||i===If;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function c3(e,t){const n={type:"text",value:u3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function d3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const f3={blockquote:UN,break:$N,code:zN,delete:VN,emphasis:WN,footnoteReference:YN,heading:qN,html:GN,imageReference:KN,image:XN,inlineCode:QN,linkReference:ZN,link:JN,listItem:e3,list:n3,paragraph:r3,root:o3,strong:i3,table:a3,tableCell:l3,tableRow:s3,text:c3,thematicBreak:d3,toml:ki,yaml:ki,definition:ki,footnoteDefinition:ki};function ki(){}function h3(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function p3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function m3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||h3,r=e.options.footnoteBackLabel||p3,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),d=String(u.identifier).toUpperCase(),h=no(d.toLowerCase());let p=0;const b=[],x=e.footnoteCounts.get(d);for(;x!==void 0&&++p<=x;){b.length>0&&b.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,p);typeof v=="string"&&(v={type:"text",value:v}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const E=c[c.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const v=E.children[E.children.length-1];v&&v.type==="text"?v.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...b)}else c.push(...b);const T={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(u,T),s.push(T)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...fr(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
45
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
46
|
+
`}]}}const pl={}.hasOwnProperty,g3={};function b3(e,t){const n=t||g3,r=new Map,o=new Map,i=new Map,a={...f3,...n.handlers},s={all:u,applyData:E3,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:x3,wrap:y3};return jt(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:o,h=String(c.identifier).toUpperCase();d.has(h)||d.set(h,c)}}),s;function l(c,d){const h=c.type,p=s.handlers[h];if(pl.call(s.handlers,h)&&p)return p(s,c,d);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in c){const{children:x,...E}=c,T=fr(E);return T.children=s.all(c),T}return fr(c)}return(s.options.unknownHandler||T3)(s,c,d)}function u(c){const d=[];if("children"in c){const h=c.children;let p=-1;for(;++p<h.length;){const b=s.one(h[p],c);if(b){if(p&&h[p-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=Rf(b.value)),!Array.isArray(b)&&b.type==="element")){const x=b.children[0];x&&x.type==="text"&&(x.value=Rf(x.value))}Array.isArray(b)?d.push(...b):d.push(b)}}}return d}}function x3(e,t){e.position&&(t.position=vm(e))}function E3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,fr(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function T3(e,t){const n=t.data||{},r="value"in t&&!(pl.call(n,"hProperties")||pl.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function y3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
47
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
48
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
49
|
+
`}),n}function Rf(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Pf(e,t){const n=b3(e,t),r=n.one(e,void 0),o=m3(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
|
|
50
|
+
`},o),i}function v3(e,t){return e&&"run"in e?async function(n,r){const o=Pf(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Pf(n,{file:r,...e||t})}}function Of(e){if(e)throw e}var ws,Lf;function w3(){if(Lf)return ws;Lf=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},i=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var c=e.call(u,"constructor"),d=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!d)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},a=function(u,c){n&&c.name==="__proto__"?n(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},s=function(u,c){if(c==="__proto__")if(e.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return ws=function l(){var u,c,d,h,p,b,x=arguments[0],E=1,T=arguments.length,v=!1;for(typeof x=="boolean"&&(v=x,x=arguments[1]||{},E=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});E<T;++E)if(u=arguments[E],u!=null)for(c in u)d=s(x,c),h=s(u,c),x!==h&&(v&&h&&(i(h)||(p=o(h)))?(p?(p=!1,b=d&&o(d)?d:[]):b=d&&i(d)?d:{},a(x,{name:c,newValue:l(v,b,h)})):typeof h<"u"&&a(x,{name:c,newValue:h}));return x},ws}var C3=w3();const Cs=D0(C3);function ml(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function k3(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...u){const c=e[++i];let d=-1;if(l){a(l);return}for(;++d<o.length;)(u[d]===null||u[d]===void 0)&&(u[d]=o[d]);o=u,c?S3(c,s)(...u):a(null,...u)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function S3(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(u){const c=u;if(s&&n)throw c;return o(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const Yt={basename:A3,dirname:_3,extname:I3,join:N3,sep:"/"};function A3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');li(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function _3(e){if(li(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function I3(e){li(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function N3(...e){let t=-1,n;for(;++t<e.length;)li(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":R3(n)}function R3(e){li(e);const t=e.codePointAt(0)===47;let n=P3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function P3(e,t){let n="",r=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function li(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const O3={cwd:L3};function L3(){return"/"}function gl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function D3(e){if(typeof e=="string")e=new URL(e);else if(!gl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return M3(e)}function M3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ks=["history","path","basename","stem","extname","dirname"];class F3{constructor(t){let n;t?gl(t)?n={path:t}:typeof t=="string"||B3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":O3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ks.length;){const i=ks[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)ks.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Yt.basename(this.path):void 0}set basename(t){As(t,"basename"),Ss(t,"basename"),this.path=Yt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Yt.dirname(this.path):void 0}set dirname(t){Df(this.basename,"dirname"),this.path=Yt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Yt.extname(this.path):void 0}set extname(t){if(Ss(t,"extname"),Df(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){gl(t)&&(t=D3(t)),As(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Yt.basename(this.path,this.extname):void 0}set stem(t){As(t,"stem"),Ss(t,"stem"),this.path=Yt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new ft(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ss(e,t){if(e&&e.includes(Yt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yt.sep+"`")}function As(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Df(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function B3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const j3=(function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),H3={}.hasOwnProperty;class Iu extends j3{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=k3()}copy(){const t=new Iu;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Cs(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ns("data",this.frozen),this.namespace[t]=n,this):H3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ns("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Si(t),r=this.parser||this.Parser;return _s("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),_s("process",this.parser||this.Parser),Is("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Si(t),l=r.parse(s);r.run(l,s,function(c,d,h){if(c||!d||!h)return u(c);const p=d,b=r.stringify(p,h);z3(b)?h.value=b:h.result=b,u(c,h)});function u(c,d){c||!d?a(c):i?i(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),_s("processSync",this.parser||this.Parser),Is("processSync",this.compiler||this.Compiler),this.process(t,o),Ff("processSync","process",n),r;function o(i,a){n=!0,Of(i),r=a}}run(t,n,r){Mf(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=Si(n);o.run(t,l,u);function u(c,d,h){const p=d||t;c?s(c):a?a(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),Ff("runSync","run",r),o;function i(a,s){Of(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Si(n),o=this.compiler||this.Compiler;return Is("stringify",o),Mf(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Ns("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;l(c,d)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(o.settings=Cs(!0,o.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];i(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===u){h=d;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[p,...b]=c;const x=r[h][1];ml(x)&&ml(p)&&(p=Cs(!0,x,p)),r[h]=[u,p,...b]}}}}const U3=new Iu().freeze();function _s(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Is(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ns(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Mf(e){if(!ml(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ff(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Si(e){return $3(e)?e:new F3(e)}function $3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function z3(e){return typeof e=="string"||V3(e)}function V3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Nu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Cr=Nu();function Y0(e){Cr=e}var ir={exec:()=>null};function Ie(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(mt.caret,"$1"),n=n.replace(o,a),r},getRegex:()=>new RegExp(n,t)};return r}var W3=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),mt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Y3=/^(?:[ \t]*(?:\n|$))+/,q3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,G3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ui=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,K3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ru=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,q0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,G0=Ie(q0).replace(/bull/g,Ru).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),X3=Ie(q0).replace(/bull/g,Ru).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Pu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Q3=/^[^\n]+/,Ou=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Z3=Ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ou).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),J3=Ie(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ru).getRegex(),Oa="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Lu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,eR=Ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Lu).replace("tag",Oa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K0=Ie(Pu).replace("hr",ui).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Oa).getRegex(),tR=Ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",K0).getRegex(),Du={blockquote:tR,code:q3,def:Z3,fences:G3,heading:K3,hr:ui,html:eR,lheading:G0,list:J3,newline:Y3,paragraph:K0,table:ir,text:Q3},Bf=Ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ui).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Oa).getRegex(),nR={...Du,lheading:X3,table:Bf,paragraph:Ie(Pu).replace("hr",ui).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bf).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Oa).getRegex()},rR={...Du,html:Ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Lu).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ir,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ie(Pu).replace("hr",ui).replace("heading",` *#{1,6} *[^
|
|
51
|
+
]`).replace("lheading",G0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},oR=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,X0=/^( {2,}|\\)\n(?!\s*$)/,aR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ro=/[\p{P}\p{S}]/u,La=/[\s\p{P}\p{S}]/u,Mu=/[^\s\p{P}\p{S}]/u,sR=Ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,La).getRegex(),Q0=/(?!~)[\p{P}\p{S}]/u,lR=/(?!~)[\s\p{P}\p{S}]/u,uR=/(?:[^\s\p{P}\p{S}]|~)/u,cR=Ie(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",W3?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Z0=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,dR=Ie(Z0,"u").replace(/punct/g,ro).getRegex(),fR=Ie(Z0,"u").replace(/punct/g,Q0).getRegex(),J0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hR=Ie(J0,"gu").replace(/notPunctSpace/g,Mu).replace(/punctSpace/g,La).replace(/punct/g,ro).getRegex(),pR=Ie(J0,"gu").replace(/notPunctSpace/g,uR).replace(/punctSpace/g,lR).replace(/punct/g,Q0).getRegex(),mR=Ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Mu).replace(/punctSpace/g,La).replace(/punct/g,ro).getRegex(),gR=Ie(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ro).getRegex(),bR="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",xR=Ie(bR,"gu").replace(/notPunctSpace/g,Mu).replace(/punctSpace/g,La).replace(/punct/g,ro).getRegex(),ER=Ie(/\\(punct)/,"gu").replace(/punct/g,ro).getRegex(),TR=Ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),yR=Ie(Lu).replace("(?:-->|$)","-->").getRegex(),vR=Ie("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",yR).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),na=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,wR=Ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",na).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),eg=Ie(/^!?\[(label)\]\[(ref)\]/).replace("label",na).replace("ref",Ou).getRegex(),tg=Ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ou).getRegex(),CR=Ie("reflink|nolink(?!\\()","g").replace("reflink",eg).replace("nolink",tg).getRegex(),jf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Fu={_backpedal:ir,anyPunctuation:ER,autolink:TR,blockSkip:cR,br:X0,code:iR,del:ir,delLDelim:ir,delRDelim:ir,emStrongLDelim:dR,emStrongRDelimAst:hR,emStrongRDelimUnd:mR,escape:oR,link:wR,nolink:tg,punctuation:sR,reflink:eg,reflinkSearch:CR,tag:vR,text:aR,url:ir},kR={...Fu,link:Ie(/^!?\[(label)\]\((.*?)\)/).replace("label",na).getRegex(),reflink:Ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",na).getRegex()},bl={...Fu,emStrongRDelimAst:pR,emStrongLDelim:fR,delLDelim:gR,delRDelim:xR,url:Ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",jf).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",jf).getRegex()},SR={...bl,br:Ie(X0).replace("{2,}","*").getRegex(),text:Ie(bl.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ai={normal:Du,gfm:nR,pedantic:rR},So={normal:Fu,gfm:bl,breaks:SR,pedantic:kR},AR={"&":"&","<":"<",">":">",'"':""","'":"'"},Hf=e=>AR[e];function Wt(e,t){if(t){if(mt.escapeTest.test(e))return e.replace(mt.escapeReplace,Hf)}else if(mt.escapeTestNoEncode.test(e))return e.replace(mt.escapeReplaceNoEncode,Hf);return e}function Uf(e){try{e=encodeURI(e).replace(mt.percentDecode,"%")}catch{return null}return e}function $f(e,t){var i;let n=e.replace(mt.findPipe,(a,s,l)=>{let u=!1,c=s;for(;--c>=0&&l[c]==="\\";)u=!u;return u?"|":" |"}),r=n.split(mt.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((i=r.at(-1))!=null&&i.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(mt.slashPipe,"|");return r}function Ao(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function _R(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function IR(e,t=0){let n=t,r="";for(let o of e)if(o===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=o,n++;return r}function zf(e,t,n,r,o){let i=t.href,a=t.title||null,s=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function NR(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
|
|
52
|
+
`).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[s]=a;return s.length>=o.length?i.slice(o.length):i}).join(`
|
|
53
|
+
`)}var ra=class{constructor(e){Ne(this,"options");Ne(this,"rules");Ne(this,"lexer");this.options=e||Cr}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ao(n,`
|
|
54
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=NR(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Ao(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ao(t[0],`
|
|
55
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Ao(t[0],`
|
|
56
|
+
`).split(`
|
|
57
|
+
`),r="",o="",i=[];for(;n.length>0;){let a=!1,s=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))s.push(n[l]),a=!0;else if(!a)s.push(n[l]);else break;n=n.slice(l);let u=s.join(`
|
|
58
|
+
`),c=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
59
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
60
|
+
${u}`:u,o=o?`${o}
|
|
61
|
+
${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=d,n.length===0)break;let h=i.at(-1);if((h==null?void 0:h.type)==="code")break;if((h==null?void 0:h.type)==="blockquote"){let p=h,b=p.raw+`
|
|
62
|
+
`+n.join(`
|
|
63
|
+
`),x=this.blockquote(b);i[i.length-1]=x,r=r.substring(0,r.length-p.raw.length)+x.raw,o=o.substring(0,o.length-p.text.length)+x.text;break}else if((h==null?void 0:h.type)==="list"){let p=h,b=p.raw+`
|
|
64
|
+
`+n.join(`
|
|
65
|
+
`),x=this.list(b);i[i.length-1]=x,r=r.substring(0,r.length-h.raw.length)+x.raw,o=o.substring(0,o.length-p.raw.length)+x.raw,n=b.substring(i.at(-1).raw.length).split(`
|
|
66
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:i,text:o}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let o=t[1].trim(),i=o.length>1,a={type:"list",raw:"",ordered:i,start:i?+o.slice(0,-1):"",loose:!1,items:[]};o=i?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=i?o:"[*+-]");let s=this.rules.other.listItemRegex(o),l=!1;for(;e;){let c=!1,d="",h="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let p=IR(t[2].split(`
|
|
67
|
+
`,1)[0],t[1].length),b=e.split(`
|
|
68
|
+
`,1)[0],x=!p.trim(),E=0;if(this.options.pedantic?(E=2,h=p.trimStart()):x?E=t[1].length+1:(E=p.search(this.rules.other.nonSpaceChar),E=E>4?1:E,h=p.slice(E),E+=t[1].length),x&&this.rules.other.blankLine.test(b)&&(d+=b+`
|
|
69
|
+
`,e=e.substring(b.length+1),c=!0),!c){let T=this.rules.other.nextBulletRegex(E),v=this.rules.other.hrRegex(E),y=this.rules.other.fencesBeginRegex(E),C=this.rules.other.headingBeginRegex(E),I=this.rules.other.htmlBeginRegex(E),w=this.rules.other.blockquoteBeginRegex(E);for(;e;){let P=e.split(`
|
|
70
|
+
`,1)[0],L;if(b=P,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),L=b):L=b.replace(this.rules.other.tabCharGlobal," "),y.test(b)||C.test(b)||I.test(b)||w.test(b)||T.test(b)||v.test(b))break;if(L.search(this.rules.other.nonSpaceChar)>=E||!b.trim())h+=`
|
|
71
|
+
`+L.slice(E);else{if(x||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(p)||C.test(p)||v.test(p))break;h+=`
|
|
72
|
+
`+b}x=!b.trim(),d+=P+`
|
|
73
|
+
`,e=e.substring(P.length+1),p=L.slice(E)}}a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(l=!0)),a.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),a.raw+=d}let u=a.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c of a.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),((n=c.tokens[0])==null?void 0:n.type)==="text"||((r=c.tokens[0])==null?void 0:r.type)==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(c.raw);if(d){let h={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};c.checked=h.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}if(!a.loose){let d=c.tokens.filter(p=>p.type==="space"),h=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=h}}if(a.loose)for(let c of a.items){c.loose=!0;for(let d of c.tokens)d.type==="text"&&(d.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:o}}}table(e){var a;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=$f(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(a=t[3])!=null&&a.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
74
|
+
`):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?i.align.push("right"):this.rules.other.tableAlignCenter.test(s)?i.align.push("center"):this.rules.other.tableAlignLeft.test(s)?i.align.push("left"):i.align.push(null);for(let s=0;s<n.length;s++)i.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:i.align[s]});for(let s of o)i.rows.push($f(s,i.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[u]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
75
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Ao(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=_R(t[2],"()");if(i===-2)return;if(i>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],o="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],o=i[3])}else o=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),zf(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[r.toLowerCase()];if(!o){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return zf(n,o,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,i,a,s=o,l=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);(r=u.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){s+=a;continue}else if((r[5]||r[6])&&o%3&&!((o+a)%3)){l+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+l);let c=[...r[0]][0].length,d=e.slice(0,o+r.index+c+a);if(Math.min(o,a)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,i,a,s=o,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+o);(r=l.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==o))continue;if(r[3]||r[4]){s+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s);let u=[...r[0]][0].length,c=e.slice(0,o+r.index+u+a),d=c.slice(o,-o);return{type:"del",raw:c,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,o;if(t[2]==="@")r=t[0],o="mailto:"+r;else{let i;do i=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(i!==t[0]);r=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Rt=class xl{constructor(t){Ne(this,"tokens");Ne(this,"options");Ne(this,"state");Ne(this,"inlineQueue");Ne(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Cr,this.options.tokenizer=this.options.tokenizer||new ra,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:mt,block:Ai.normal,inline:So.normal};this.options.pedantic?(n.block=Ai.pedantic,n.inline=So.pedantic):this.options.gfm&&(n.block=Ai.gfm,this.options.breaks?n.inline=So.breaks:n.inline=So.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ai,inline:So}}static lex(t,n){return new xl(n).lex(t)}static lexInline(t,n){return new xl(n).inlineTokens(t)}lex(t){t=t.replace(mt.carriageReturn,`
|
|
76
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var o,i,a;for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(mt.tabCharGlobal," ").replace(mt.spaceLine,""));t;){let s;if((i=(o=this.options.extensions)==null?void 0:o.block)!=null&&i.some(u=>(s=u.call({lexer:this},t,n))?(t=t.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let u=n.at(-1);s.raw.length===1&&u!==void 0?u.raw+=`
|
|
77
|
+
`:n.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
78
|
+
`)?"":`
|
|
79
|
+
`)+s.raw,u.text+=`
|
|
80
|
+
`+s.text,this.inlineQueue.at(-1).src=u.text):n.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
81
|
+
`)?"":`
|
|
82
|
+
`)+s.raw,u.text+=`
|
|
83
|
+
`+s.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},n.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),n.push(s);continue}let l=t;if((a=this.options.extensions)!=null&&a.startBlock){let u=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(h=>{d=h.call({lexer:this},c),typeof d=="number"&&d>=0&&(u=Math.min(u,d))}),u<1/0&&u>=0&&(l=t.substring(0,u+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let u=n.at(-1);r&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(`
|
|
84
|
+
`)?"":`
|
|
85
|
+
`)+s.raw,u.text+=`
|
|
86
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(s),r=l.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
87
|
+
`)?"":`
|
|
88
|
+
`)+s.raw,u.text+=`
|
|
89
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(s);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var l,u,c,d,h;this.tokenizer.lexer=this;let r=t,o=null;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)p.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)i=o[2]?o[2].length:0,r=r.slice(0,o.index+i)+"["+"a".repeat(o[0].length-i-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((u=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:u.call({lexer:this},r))??r;let a=!1,s="";for(;t;){a||(s=""),a=!1;let p;if((d=(c=this.options.extensions)==null?void 0:c.inline)!=null&&d.some(x=>(p=x.call({lexer:this},t,n))?(t=t.substring(p.raw.length),n.push(p),!0):!1))continue;if(p=this.tokenizer.escape(t)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.tag(t)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.link(t)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(p.raw.length);let x=n.at(-1);p.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=p.raw,x.text+=p.text):n.push(p);continue}if(p=this.tokenizer.emStrong(t,r,s)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.codespan(t)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.br(t)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.del(t,r,s)){t=t.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.autolink(t)){t=t.substring(p.raw.length),n.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(t))){t=t.substring(p.raw.length),n.push(p);continue}let b=t;if((h=this.options.extensions)!=null&&h.startInline){let x=1/0,E=t.slice(1),T;this.options.extensions.startInline.forEach(v=>{T=v.call({lexer:this},E),typeof T=="number"&&T>=0&&(x=Math.min(x,T))}),x<1/0&&x>=0&&(b=t.substring(0,x+1))}if(p=this.tokenizer.inlineText(b)){t=t.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(s=p.raw.slice(-1)),a=!0;let x=n.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=p.raw,x.text+=p.text):n.push(p);continue}if(t){let x="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return n}},oa=class{constructor(e){Ne(this,"options");Ne(this,"parser");this.options=e||Cr}space(e){return""}code({text:e,lang:t,escaped:n}){var i;let r=(i=(t||"").match(mt.notSpaceStart))==null?void 0:i[0],o=e.replace(mt.endingNewline,"")+`
|
|
90
|
+
`;return r?'<pre><code class="language-'+Wt(r)+'">'+(n?o:Wt(o,!0))+`</code></pre>
|
|
91
|
+
`:"<pre><code>"+(n?o:Wt(o,!0))+`</code></pre>
|
|
92
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
93
|
+
${this.parser.parse(e)}</blockquote>
|
|
94
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
95
|
+
`}hr(e){return`<hr>
|
|
96
|
+
`}list(e){let t=e.ordered,n=e.start,r="";for(let a=0;a<e.items.length;a++){let s=e.items[a];r+=this.listitem(s)}let o=t?"ol":"ul",i=t&&n!==1?' start="'+n+'"':"";return"<"+o+i+`>
|
|
97
|
+
`+r+"</"+o+`>
|
|
98
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
99
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
100
|
+
`}table(e){let t="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);t+=this.tablerow({text:n});let r="";for(let o=0;o<e.rows.length;o++){let i=e.rows[o];n="";for(let a=0;a<i.length;a++)n+=this.tablecell(i[a]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
101
|
+
<thead>
|
|
102
|
+
`+t+`</thead>
|
|
103
|
+
`+r+`</table>
|
|
104
|
+
`}tablerow({text:e}){return`<tr>
|
|
105
|
+
${e}</tr>
|
|
106
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
107
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Wt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),o=Uf(e);if(o===null)return r;e=o;let i='<a href="'+e+'"';return t&&(i+=' title="'+Wt(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=Uf(e);if(o===null)return Wt(n);e=o;let i=`<img src="${e}" alt="${Wt(n)}"`;return t&&(i+=` title="${Wt(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Wt(e.text)}},Bu=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Ft=class El{constructor(t){Ne(this,"options");Ne(this,"renderer");Ne(this,"textRenderer");this.options=t||Cr,this.options.renderer=this.options.renderer||new oa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bu}static parse(t,n){return new El(n).parse(t)}static parseInline(t,n){return new El(n).parseInline(t)}parse(t){var r,o;this.renderer.parser=this;let n="";for(let i=0;i<t.length;i++){let a=t[i];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[a.type]){let l=a,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=u||"";continue}}let s=a;switch(s.type){case"space":{n+=this.renderer.space(s);break}case"hr":{n+=this.renderer.hr(s);break}case"heading":{n+=this.renderer.heading(s);break}case"code":{n+=this.renderer.code(s);break}case"table":{n+=this.renderer.table(s);break}case"blockquote":{n+=this.renderer.blockquote(s);break}case"list":{n+=this.renderer.list(s);break}case"checkbox":{n+=this.renderer.checkbox(s);break}case"html":{n+=this.renderer.html(s);break}case"def":{n+=this.renderer.def(s);break}case"paragraph":{n+=this.renderer.paragraph(s);break}case"text":{n+=this.renderer.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,n=this.renderer){var o,i;this.renderer.parser=this;let r="";for(let a=0;a<t.length;a++){let s=t[a];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[s.type]){let u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=u||"";continue}}let l=s;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"checkbox":{r+=n.checkbox(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},Bi,Ro=(Bi=class{constructor(t){Ne(this,"options");Ne(this,"block");this.options=t||Cr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?Rt.lex:Rt.lexInline}provideParser(t=this.block){return t?Ft.parse:Ft.parseInline}},Ne(Bi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ne(Bi,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Bi),RR=class{constructor(...t){Ne(this,"defaults",Nu());Ne(this,"options",this.setOptions);Ne(this,"parse",this.parseMarkdown(!0));Ne(this,"parseInline",this.parseMarkdown(!1));Ne(this,"Parser",Ft);Ne(this,"Renderer",oa);Ne(this,"TextRenderer",Bu);Ne(this,"Lexer",Rt);Ne(this,"Tokenizer",ra);Ne(this,"Hooks",Ro);this.use(...t)}walkTokens(t,n){var o,i;let r=[];for(let a of t)switch(r=r.concat(n.call(this,a)),a.type){case"table":{let s=a;for(let l of s.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of s.rows)for(let u of l)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{let s=a;r=r.concat(this.walkTokens(s.items,n));break}default:{let s=a;(i=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{let u=s[l].flat(1/0);r=r.concat(this.walkTokens(u,n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=n.renderers[i.name];a?n.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[i.level];a?a.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){let i=this.defaults.renderer||new oa(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=r.renderer[s],u=i[s];i[s]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}o.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new ra(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=r.tokenizer[s],u=i[s];i[s]=(...c)=>{let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Ro;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=r.hooks[s],u=i[s];Ro.passThroughHooks.has(a)?i[s]=c=>{if(this.defaults.async&&Ro.passThroughHooksRespectAsync.has(a))return(async()=>{let h=await l.call(i,c);return u.call(i,h)})();let d=l.call(i,c);return u.call(i,d)}:i[s]=(...c)=>{if(this.defaults.async)return(async()=>{let h=await l.apply(i,c);return h===!1&&(h=await u.apply(i,c)),h})();let d=l.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;o.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Rt.lex(t,n??this.defaults)}parser(t,n){return Ft.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let o={...r},i={...this.defaults,...o},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&o.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(n):n,l=await(i.hooks?await i.hooks.provideLexer(t):t?Rt.lex:Rt.lexInline)(s,i),u=i.hooks?await i.hooks.processAllTokens(l):l;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let c=await(i.hooks?await i.hooks.provideParser(t):t?Ft.parse:Ft.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(c):c})().catch(a);try{i.hooks&&(n=i.hooks.preprocess(n));let s=(i.hooks?i.hooks.provideLexer(t):t?Rt.lex:Rt.lexInline)(n,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let l=(i.hooks?i.hooks.provideParser(t):t?Ft.parse:Ft.parseInline)(s,i);return i.hooks&&(l=i.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(t,n){return r=>{if(r.message+=`
|
|
108
|
+
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Wt(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}},pr=new RR;function Re(e,t){return pr.parse(e,t)}Re.options=Re.setOptions=function(e){return pr.setOptions(e),Re.defaults=pr.defaults,Y0(Re.defaults),Re};Re.getDefaults=Nu;Re.defaults=Cr;Re.use=function(...e){return pr.use(...e),Re.defaults=pr.defaults,Y0(Re.defaults),Re};Re.walkTokens=function(e,t){return pr.walkTokens(e,t)};Re.parseInline=pr.parseInline;Re.Parser=Ft;Re.parser=Ft.parse;Re.Renderer=oa;Re.TextRenderer=Bu;Re.Lexer=Rt;Re.lexer=Rt.lex;Re.Tokenizer=ra;Re.Hooks=Ro;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;Ft.parse;Rt.lex;var PR=300,OR="300px",LR=500;function DR(e={}){let{immediate:t=!1,debounceDelay:n=PR,rootMargin:r=OR,idleTimeout:o=LR}=e,[i,a]=A.useState(!1),s=A.useRef(null),l=A.useRef(null),u=A.useRef(null),c=A.useMemo(()=>p=>{let b=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-b))})},1)},[]),d=A.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(p,b)=>window.requestIdleCallback(p,b):c,[c]),h=A.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return A.useEffect(()=>{if(t){a(!0);return}let p=s.current;if(!p)return;l.current&&(clearTimeout(l.current),l.current=null),u.current&&(h(u.current),u.current=null);let b=()=>{l.current&&(clearTimeout(l.current),l.current=null),u.current&&(h(u.current),u.current=null)},x=y=>{u.current=d(C=>{C.timeRemaining()>0||C.didTimeout?(a(!0),y.disconnect()):u.current=d(()=>{a(!0),y.disconnect()},{timeout:o/2})},{timeout:o})},E=y=>{b(),l.current=window.setTimeout(()=>{var C,I;let w=y.takeRecords();(w.length===0||(I=(C=w.at(-1))==null?void 0:C.isIntersecting)!=null&&I)&&x(y)},n)},T=(y,C)=>{y.isIntersecting?E(C):b()},v=new IntersectionObserver(y=>{for(let C of y)T(C,v)},{rootMargin:r,threshold:0});return v.observe(p),()=>{l.current&&clearTimeout(l.current),u.current&&h(u.current),v.disconnect()}},[t,n,r,o,h,d]),{shouldRender:i,containerRef:s}}var MR=320,FR=4,ng=()=>typeof performance>"u"?Date.now():performance.now();function Vf(e){var t,n;let r=(t=e==null?void 0:e.now)!=null?t:ng,o=(n=e==null?void 0:e.maxBacklogMs)!=null?n:MR,i=0,a=0;return{now:r,beginPass(s){a=Math.min(Math.max(i,s),s+o)},mark(){return a},rewind(s){a=s},take(s,l,u){if(s<=0)return{baseDelay:0,step:Math.max(0,l)};let c=Math.max(0,l),d=c===0?0:Math.min(c,FR),h=Math.max(a,u),p=u+o,b=h+Math.max(0,s-1)*c,x=c;if(b>p&&s>1)if(h<p){let T=p-h;x=Math.max(d,T/(s-1))}else x=d;let E=Math.max(0,Math.round(h-u));return a=h+s*x,{baseDelay:E,step:x}},commitPass(){i=a}}}var rg=/\s/,ju=/^\s+$/,BR=new Set(["pre","svg","math","annotation"]),jR=new Set(["img","hr"]),ci=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",Hu=e=>e.some(t=>ci(t)&&BR.has(t.tagName)),HR=e=>{for(let t=e.length-1;t>=0;t--){let n=e[t];if(ci(n)&&n.tagName==="li")return n}},UR=(e,t,n,r)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate-marker"]=!0;let o=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${o}--sd-marker-duration:${t}ms;--sd-marker-delay:${Math.round(n)}ms;--sd-marker-easing:${r}`},$R=new Set(["ul","ol","li"]),og=e=>{for(let t of e.children)if(ci(t)){if(t.tagName==="input")return t;if($R.has(t.tagName))continue;let n=og(t);if(n)return n}},ig=(e,t,n,r)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate"]=!0;let o=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${o}--sd-animation:sd-${t.animation};--sd-duration:${n}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(r)}ms`},zR=(e,t,n,r)=>{let o=og(e);o&&ig(o,t,n,r)},VR=(e,t,n,r,o,i)=>{if(Hu(t))return;let a=r.prevContentLength,s=o.count;o.count+=1;let l=a>0&&s<a,u=l?0:i.baseDelay+o.newIndex++*i.step;ig(e,n,l?0:n.duration,u)},WR=e=>{var t;for(let n=e.length-1;n>=0;n-=1){let r=e[n];if(ci(r)){if((t=r.properties)!=null&&t["data-sd-animated"])break;r.properties={...r.properties,"data-sd-animated":!0}}}},ag=e=>{let t=[],n="",r=!1;for(let o of e){let i=rg.test(o);if(i!==r&&n){if(i){n+=o,r=!0;continue}t.push(n),n=""}n+=o,r=i}return n&&t.push(n),t},sg=e=>{let t=[],n="";for(let r of e)rg.test(r)?t.length>0&&!ju.test(t.at(-1))?t[t.length-1]+=r:n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&(t.length>0?t[t.length-1]+=n:t.push(n)),t},YR=(e,t,n,r,o,i)=>{let a=`--sd-animation:sd-${t};--sd-duration:${o?0:n}ms;--sd-easing:${r}`;return i&&(a+=`;--sd-delay:${Math.round(i)}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:a},children:[{type:"text",value:e}]}},Wf=(e,t)=>!(e>0&&t<e),Tl=e=>ci(e)&&jR.has(e.tagName),qR=(e,t,n)=>{let r=0,o=0;return va(e,i=>i.type==="text"||Tl(i),(i,a)=>{if(Hu(a))return sr;if(Tl(i)){Wf(n,o)&&(r+=1),o+=1;return}let s=i.value;if(!s.trim()){o+=s.length;return}let l=t.sep==="char"?sg(s):ag(s);for(let u of l){let c=o;o+=u.length,!ju.test(u)&&Wf(n,c)&&(r+=1)}}),r},GR=(e,t,n,r,o,i)=>{var a;let s=t.at(-1);if(!(s&&"children"in s))return;if(Hu(t))return sr;let l=s,u=l.children.indexOf(e);if(u===-1)return;let c=e.value;if(!c.trim()){o.count+=c.length;return}let d=n.sep==="char"?sg(c):ag(c),h=r.prevContentLength,p=!1,b=HR(t),x=!!(b&&!((a=b.properties)!=null&&a["data-sd-animate-marker"])),E=!1,T=d.map(v=>{let y=o.count;if(o.count+=v.length,ju.test(v))return{type:"text",value:v};let C=h>0&&y<h,I=C?0:i.baseDelay+o.newIndex++*i.step;if(p=!0,b&&x&&!E){let w=C?0:n.duration;UR(b,w,I,n.easing),zR(b,n,w,I),E=!0}return YR(v,n.animation,n.duration,n.easing,C,I)});return p&&WR(t),l.children.splice(u,1,...T),u+T.length},KR=0;function lg(e){var t,n,r,o,i;let a={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(o=e==null?void 0:e.sep)!=null?o:"word",stagger:(i=e==null?void 0:e.stagger)!=null?i:40,timeline:e==null?void 0:e.timeline},s={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},l=KR++,u=()=>c=>{var d;let h={count:0,newIndex:0};s.prevContentLength=s.committedCharCount;let p=a.timeline,b=(d=p==null?void 0:p.now())!=null?d:ng();p&&(s.pendingMark===null?s.pendingMark=p.mark():p.rewind(s.pendingMark));let x=p?p.take(qR(c,a,s.prevContentLength),a.stagger,b):{baseDelay:0,step:a.stagger};va(c,E=>E.type==="text"||Tl(E),(E,T)=>{if(E.type==="text")return GR(E,T,a,s,h,x);VR(E,T,a,s,h,x)}),s.lastRenderCharCount=h.count,s.prevContentLength=0};return Object.defineProperty(u,"name",{value:`rehypeAnimate$${l}`}),{name:"animate",type:"animate",rehypePlugin:u,setPrevContentLength(c){s.committedCharCount=c,s.prevContentLength=c},getLastRenderCharCount(){return s.lastRenderCharCount},commit(){s.committedCharCount=s.lastRenderCharCount,s.pendingMark=null}}}lg();var ug=A.createContext(!1),XR=()=>A.useContext(ug),Da=(...e)=>L0(ha(e)),QR=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},ZR=e=>e?(...t)=>QR(e,L0(ha(t))):Da,$r=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",o=typeof t=="string"?new Blob([r+t],{type:n}):t,i=URL.createObjectURL(o),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},yl=A.createContext(Da),ve=()=>A.useContext(yl),JR=8,cg=e=>{if(!(e===void 0||e===0||e===Number.POSITIVE_INFINITY)){if(typeof e=="number")return Number.isFinite(e)&&e>0?`${e}px`:void 0;if(!(e==="0"||e==="none"||e==="Infinity"))return e}},dg=(e,t,n)=>{let r=A.useRef(null),o=A.useRef(!0),i=A.useRef(!1);return A.useEffect(()=>{let a=r.current;if(!(a&&t))return;let s=()=>{let l=a.scrollHeight-a.scrollTop-a.clientHeight<JR;o.current=l};return a.addEventListener("scroll",s,{passive:!0}),()=>a.removeEventListener("scroll",s)},[t]),A.useEffect(()=>{e&&!i.current&&(o.current=!0),e||(o.current=!0),i.current=e},[e]),A.useEffect(()=>{let a=r.current;a&&t&&e&&o.current&&a.scrollTo({top:a.scrollHeight,behavior:"instant"})},[e,t,n]),r},eP=Da("block"),tP=Da("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),nP=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let o=n.slice(0,r).trim(),i=n.slice(r+1).trim();o&&i&&(t[o]=i)}}return t},fg=A.memo(({children:e,result:t,language:n,className:r,maxHeight:o,startLine:i,lineNumbers:a=!0,...s})=>{let l=ve(),{isAnimating:u}=A.useContext(rt),c=cg(o),d=dg(u,!!c,t),h=A.useMemo(()=>l(tP),[l]),p=A.useMemo(()=>l(eP),[l]),b=A.useMemo(()=>{let x={};return t.bg&&(x["--sdm-bg"]=t.bg),t.fg&&(x["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(x,nP(t.rootStyle)),x},[t.bg,t.fg,t.rootStyle]);return f.jsx("div",{className:l(r,c?"overflow-y-auto":null,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",ref:d,style:c?{maxHeight:c}:void 0,...s,children:f.jsx("pre",{className:l(r,"bg-[var(--sdm-bg,inherit)]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]"),style:b,children:f.jsx("code",{className:a?l("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((x,E)=>f.jsx("span",{className:a?h:p,children:x.length===0||x.length===1&&x[0].content===""?`
|
|
109
|
+
`:x.map((T,v)=>{let y={},C=!!T.bgColor;if(T.color&&(y["--sdm-c"]=T.color),T.bgColor&&(y["--sdm-tbg"]=T.bgColor),T.htmlStyle)for(let[I,w]of Object.entries(T.htmlStyle))I==="color"?y["--sdm-c"]=w:I==="background-color"?(y["--sdm-tbg"]=w,C=!0):y[I]=w;return f.jsx("span",{className:l("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",C&&"bg-[var(--sdm-tbg)]",C&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:y,...T.htmlAttrs,children:T.content},v)})},E))})})})}),rP=({className:e,language:t,style:n,isIncomplete:r,...o})=>{let i=ve();return f.jsx("div",{className:i("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...o})},hg=A.createContext({code:""}),pg=()=>A.useContext(hg),oP=({language:e})=>{let t=ve();return f.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:f.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},iP=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
110
|
+
`;)t--;return e.slice(0,t)},aP=A.lazy(()=>Promise.resolve().then(()=>require("./highlighted-body-KPVGNVTW-BzLVG-SF.cjs")).then(e=>({default:e.HighlightedCodeBlockBody}))),sP=({code:e,language:t,className:n,children:r,isIncomplete:o=!1,startLine:i,lineNumbers:a,...s})=>{let l=ve(),{codeBlockMaxHeight:u}=A.useContext(rt),c=A.useMemo(()=>iP(e),[e]),d=A.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:c.split(`
|
|
111
|
+
`).map(h=>[{content:h,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[c]);return f.jsx(hg.Provider,{value:{code:e},children:f.jsxs(rP,{dir:"ltr",isIncomplete:o,language:t,children:[f.jsx(oP,{language:t}),r?f.jsx("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:f.jsx("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,f.jsx(A.Suspense,{fallback:f.jsx(fg,{className:n,language:t,lineNumbers:a,maxHeight:u,result:d,startLine:i,...s}),children:f.jsx(aP,{className:n,code:c,language:t,lineNumbers:a,maxHeight:u,raw:d,startLine:i,...s})})]})})},lP=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),uP=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),cP=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),dP=e=>f.jsxs("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[f.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),fP=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),hP=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),pP=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),mP=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),gP=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),bP=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Po={CheckIcon:lP,CopyIcon:uP,DownloadIcon:cP,ExternalLinkIcon:mP,Loader2Icon:dP,Maximize2Icon:fP,RotateCcwIcon:hP,XIcon:pP,ZoomInIcon:gP,ZoomOutIcon:bP},mg=A.createContext(Po),xP=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(o=>e[o]===t[o])},Yf=({icons:e,children:t})=>{let n=A.useRef(e),r=A.useRef(e?{...Po,...e}:Po);xP(n.current,e)||(n.current=e,r.current=e?{...Po,...e}:Po);let o=r.current;return f.jsx(mg.Provider,{value:o,children:t})},$t=()=>A.useContext(mg),gg={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",zoomIn:"Zoom in",zoomOut:"Zoom out",resetView:"Reset zoom and pan",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},vl=A.createContext(gg),nn=()=>A.useContext(vl),wl=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:o,code:i,...a})=>{let s=ve(),[l,u]=A.useState(!1),c=A.useRef(0),{code:d}=pg(),{isAnimating:h}=A.useContext(rt),p=nn(),b=i??d,x=async()=>{var v;if(typeof window>"u"||!((v=navigator==null?void 0:navigator.clipboard)!=null&&v.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{l||(await navigator.clipboard.writeText(b),u(!0),e==null||e(),c.current=window.setTimeout(()=>u(!1),n))}catch(y){t==null||t(y)}};A.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let E=$t(),T=l?E.CheckIcon:E.CopyIcon;return f.jsxs(f.Fragment,{children:[f.jsx("button",{"aria-label":p.copyCode,className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",o),"data-streamdown":"code-block-copy-button",disabled:h,onClick:x,title:p.copyCode,type:"button",...a,children:r??f.jsx(T,{"aria-hidden":"true",size:14})}),l&&f.jsx("output",{"aria-live":"polite",className:"sr-only",children:p.copied})]})},Uu=(e,t,n)=>{if(typeof e=="boolean")return n;let r=e[t];if(typeof r!="object")return n;let o=r.download;return typeof o!="object"?n:o.filename||n},qf={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},EP=({onDownload:e,onError:t,language:n,children:r,className:o,code:i,...a})=>{let s=ve(),{code:l}=pg(),{isAnimating:u,controls:c}=A.useContext(rt),d=nn(),h=$t(),p=i??l,b=n&&n in qf?qf[n]:"txt",x=`${Uu(c,"code","file")}.${b}`,E="text/plain",T=()=>{try{$r(x,p,E),e==null||e()}catch(v){t==null||t(v)}};return f.jsx("button",{"aria-label":d.downloadFile,className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",o),"data-streamdown":"code-block-download-button",disabled:u,onClick:T,title:d.downloadFile,type:"button",...a,children:r??f.jsx(h.DownloadIcon,{size:14})})},Gf=()=>{let{Loader2Icon:e}=$t(),t=ve();return f.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[f.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),f.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:f.jsx(e,{className:t("size-4 animate-spin")})})]})},TP=/\.[^/.]+$/,yP=({node:e,className:t,src:n,alt:r,onLoad:o,onError:i,showControls:a=!0,showDownloadControl:s=!0,...l})=>{let{DownloadIcon:u}=$t(),c=ve(),d=A.useRef(null),[h,p]=A.useState(!1),[b,x]=A.useState(!1),E=nn(),T=l.width!=null||l.height!=null,v=(h||T)&&!b&&a&&s,y=b&&!T;A.useEffect(()=>{let P=d.current;if(P!=null&&P.complete){let L=P.naturalWidth>0;p(L),x(!L)}},[]);let C=A.useCallback(P=>{p(!0),x(!1),o==null||o(P)},[o]),I=A.useCallback(P=>{p(!1),x(!0),i==null||i(P)},[i]),w=async()=>{if(n)try{let P=await(await fetch(n)).blob(),L=new URL(n,window.location.origin).pathname.split("/").pop()||"",F=L.split(".").pop(),R=L.includes(".")&&F!==void 0&&F.length<=4,D="";if(R)D=L;else{let M=P.type,W="png";M.includes("jpeg")||M.includes("jpg")?W="jpg":M.includes("png")?W="png":M.includes("svg")?W="svg":M.includes("gif")?W="gif":M.includes("webp")&&(W="webp"),D=`${(r||L||"image").replace(TP,"")}.${W}`}$r(D,P,P.type)}catch{window.open(n,"_blank")}};return n?f.jsxs("div",{className:c("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[f.jsx("img",{alt:r,className:c("max-w-full rounded-lg",y&&"hidden",t),"data-streamdown":"image",onError:I,onLoad:C,ref:d,src:n,...l}),y&&f.jsx("span",{className:c("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:E.imageNotAvailable}),a&&f.jsx("div",{className:c("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"),"data-streamdown":"image-overlay"}),v&&f.jsx("button",{className:c("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:w,title:E.downloadImage,type:"button",children:f.jsx(u,{size:14})})]}):null},$o=0,$u=()=>{$o+=1,$o===1&&(document.body.style.overflow="hidden")},zu=()=>{$o=Math.max(0,$o-1),$o===0&&(document.body.style.overflow="")},vP=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:o,CopyIcon:i,ExternalLinkIcon:a,XIcon:s}=$t(),l=ve(),[u,c]=A.useState(!1),d=nn(),h=A.useCallback(async()=>{try{await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)}catch{}},[e]),p=A.useCallback(()=>{r(),n()},[r,n]);if(A.useEffect(()=>{if(t){$u();let x=E=>{E.key==="Escape"&&n()};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x),zu()}}},[t,n]),!t||typeof document>"u")return null;let b=f.jsx("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:x=>{x.key==="Escape"&&n()},role:"button",tabIndex:0,children:f.jsxs("div",{className:l("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:x=>x.stopPropagation(),onKeyDown:x=>x.stopPropagation(),role:"presentation",children:[f.jsx("button",{className:l("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:d.close,type:"button",children:f.jsx(s,{size:16})}),f.jsxs("div",{className:l("flex flex-col gap-2"),children:[f.jsxs("div",{className:l("flex items-center gap-2 font-semibold text-lg"),children:[f.jsx(a,{size:20}),f.jsx("span",{children:d.openExternalLink})]}),f.jsx("p",{className:l("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),f.jsx("div",{className:l("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),f.jsxs("div",{className:l("flex gap-2"),children:[f.jsx("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:h,type:"button",children:u?f.jsxs(f.Fragment,{children:[f.jsx(o,{size:14}),f.jsx("span",{children:d.copied})]}):f.jsxs(f.Fragment,{children:[f.jsx(i,{size:14}),f.jsx("span",{children:d.copyLink})]})}),f.jsxs("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:p,type:"button",children:[f.jsx(a,{size:14}),f.jsx("span",{children:d.openLink})]})]})]})});return fa.createPortal(b,document.body)},Cl=A.createContext(null),Vu=()=>A.useContext(Cl),wP=()=>{var e;let t=Vu();return(e=t==null?void 0:t.code)!=null?e:null},Wu=()=>{var e;let t=Vu();return(e=t==null?void 0:t.mermaid)!=null?e:null},CP=e=>{var t;let n=Vu();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},kP=e=>{if(typeof DOMParser>"u"||typeof XMLSerializer>"u")return e;let t=new DOMParser().parseFromString(e,"text/html").querySelector("svg");return t?new XMLSerializer().serializeToString(t):e},SP=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((o,i)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),s=new Image;s.crossOrigin="anonymous",s.onload=()=>{let l=document.createElement("canvas"),u=s.width*r,c=s.height*r;l.width=u,l.height=c;let d=l.getContext("2d");if(!d){i(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(s,0,0,u,c),l.toBlob(h=>{if(!h){i(new Error("Failed to create PNG blob"));return}o(h)},"image/png")},s.onerror=()=>i(new Error("Failed to load SVG image")),s.src=a})},bg=({chart:e,children:t,className:n,onDownload:r,config:o,onError:i})=>{let a=ve(),[s,l]=A.useState(!1),u=A.useRef(null),{isAnimating:c,controls:d}=A.useContext(rt),h=$t(),p=Wu(),b=nn(),x=Uu(d,"mermaid","diagram"),E=async T=>{try{if(T==="mmd"){let P=`${x}.mmd`;$r(P,e,"text/plain"),l(!1),r==null||r(T);return}if(!p){i==null||i(new Error("Mermaid plugin not available"));return}let v=p.getMermaid(o),y=e.split("").reduce((P,L)=>(P<<5)-P+L.charCodeAt(0)|0,0),C=`mermaid-${Math.abs(y)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:I}=await v.render(C,e);if(!I){i==null||i(new Error("SVG not found. Please wait for the diagram to render."));return}let w=kP(I);if(T==="svg"){let P=`${x}.svg`;$r(P,w,"image/svg+xml"),l(!1),r==null||r(T);return}if(T==="png"){let P=await SP(w);$r(`${x}.png`,P,"image/png"),r==null||r(T),l(!1);return}}catch(v){i==null||i(v)}};return A.useEffect(()=>{let T=v=>{let y=v.composedPath();u.current&&!y.includes(u.current)&&l(!1)};return document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T)}},[]),f.jsxs("div",{className:a("relative"),ref:u,children:[f.jsx("button",{"aria-label":b.downloadDiagram,className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>l(!s),title:b.downloadDiagram,type:"button",children:t??f.jsx(h.DownloadIcon,{"aria-hidden":"true",size:14})}),s?f.jsxs("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[f.jsx("button",{"aria-label":b.downloadDiagramAsSvg,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("svg"),title:b.downloadDiagramAsSvg,type:"button",children:b.mermaidFormatSvg}),f.jsx("button",{"aria-label":b.downloadDiagramAsPng,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("png"),title:b.downloadDiagramAsPng,type:"button",children:b.mermaidFormatPng}),f.jsx("button",{"aria-label":b.downloadDiagramAsMmd,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("mmd"),title:b.downloadDiagramAsMmd,type:"button",children:b.mermaidFormatMmd})]}):null]})},AP=({chart:e,config:t,onFullscreen:n,onExit:r,className:o,...i})=>{let{Maximize2Icon:a,XIcon:s}=$t(),l=ve(),[u,c]=A.useState(!1),{isAnimating:d,controls:h}=A.useContext(rt),p=nn(),b=(()=>{if(typeof h=="boolean")return h;let v=h.mermaid;return v===!1?!1:v===!0||v===void 0?!0:v.panZoom!==!1})(),x=(()=>{if(typeof h=="boolean")return h;let v=h.mermaid;return v===!1?!1:v===!0||v===void 0?!0:v.download!==!1})(),E=(()=>{if(typeof h=="boolean")return h;let v=h.mermaid;return v===!1?!1:v===!0||v===void 0?!0:v.copy!==!1})(),T=()=>{c(!u)};return A.useEffect(()=>{if(u){$u();let v=y=>{y.key==="Escape"&&c(!1)};return document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v),zu()}}},[u]),A.useEffect(()=>{u?n==null||n():r&&r()},[u,n,r]),f.jsxs(f.Fragment,{children:[f.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",o),disabled:d,onClick:T,title:p.viewFullscreen,type:"button",...i,"aria-label":p.viewFullscreen,children:f.jsx(a,{"aria-hidden":"true",size:14})}),u?fa.createPortal(f.jsxs("div",{"aria-label":p.viewFullscreen,"aria-modal":"true",className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),"data-streamdown":"mermaid-fullscreen",onClick:T,onKeyDown:v=>{v.key==="Escape"&&T()},role:"dialog",children:[f.jsxs("div",{className:l("absolute top-4 right-4 z-10 flex items-center gap-1"),onClick:v=>v.stopPropagation(),onKeyDown:v=>v.stopPropagation(),role:"presentation",children:[x?f.jsx(bg,{chart:e,config:t}):null,E?f.jsx(wl,{code:e}):null,f.jsx("button",{"aria-label":p.exitFullscreen,className:l("rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:T,title:p.exitFullscreen,type:"button",children:f.jsx(s,{"aria-hidden":"true",size:20})})]}),f.jsx("div",{className:l("flex size-full items-center justify-center p-4"),onClick:v=>v.stopPropagation(),onKeyDown:v=>v.stopPropagation(),role:"presentation",children:f.jsx(rb,{chart:e,className:l("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:b})})]}),document.body):null]})};function kl(e){var t;if(e.nodeType===Node.TEXT_NODE)return(t=e.textContent)!=null?t:"";if(e.nodeType!==Node.ELEMENT_NODE)return"";let n=e;return n.tagName==="BR"?`
|
|
112
|
+
`:Array.from(n.childNodes).map(kl).join("")}var xg=e=>{let t=[],n=[],r=e.querySelectorAll("thead th");for(let i of r)t.push(kl(i).trim());let o=e.querySelectorAll("tbody tr");for(let i of o){let a=[],s=i.querySelectorAll("td");for(let l of s)a.push(kl(l).trim());n.push(a)}return{headers:t,rows:n}},Eg=e=>{var t;if(typeof e!="object")return",";let n=e.table;return typeof n!="object"?",":(t=n.csvSeparator)!=null?t:","},Tg=(e,t=",")=>{let n;t==="auto"?Intl.NumberFormat().format(1.1).includes(",")?n=";":n=",":n=t;let{headers:r,rows:o}=e,i=u=>{let c=!1;for(let d of u)if(d===n||d==='"'||d===`
|
|
113
|
+
`||d==="\r"){c=!0;break}return c?`"${u.replace(/"/g,'""')}"`:u},a=r.length>0?o.length+1:o.length,s=new Array(a),l=0;r.length>0&&(s[l]=r.map(i).join(n),l+=1);for(let u of o)s[l]=u.map(i).join(n),l+=1;return s.join(`
|
|
114
|
+
`)},_P=e=>{let{headers:t,rows:n}=e,r=s=>{let l=!1;for(let c of s)if(c===" "||c===`
|
|
115
|
+
`||c==="\r"){l=!0;break}if(!l)return s;let u=[];for(let c of s)c===" "?u.push("\\t"):c===`
|
|
116
|
+
`?u.push("\\n"):c==="\r"?u.push("\\r"):u.push(c);return u.join("")},o=t.length>0?n.length+1:n.length,i=new Array(o),a=0;t.length>0&&(i[a]=t.map(r).join(" "),a+=1);for(let s of n)i[a]=s.map(r).join(" "),a+=1;return i.join(`
|
|
117
|
+
`)},Rs=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"||r===`
|
|
118
|
+
`){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):r===`
|
|
119
|
+
`?n.push("<br>"):n.push(r);return n.join("")},yg=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),o=0,i=t.map(s=>Rs(s));r[o]=`| ${i.join(" | ")} |`,o+=1;let a=new Array(t.length);for(let s=0;s<t.length;s+=1)a[s]="---";r[o]=`| ${a.join(" | ")} |`,o+=1;for(let s of n)if(s.length<t.length){let l=new Array(t.length);for(let u=0;u<t.length;u+=1)l[u]=u<s.length?Rs(s[u]):"";r[o]=`| ${l.join(" | ")} |`,o+=1}else{let l=s.map(u=>Rs(u));r[o]=`| ${l.join(" | ")} |`,o+=1}return r.join(`
|
|
120
|
+
`)},vg=({children:e,className:t,onCopy:n,onError:r,timeout:o=2e3})=>{let i=ve(),[a,s]=A.useState(!1),[l,u]=A.useState(!1),c=A.useRef(null),d=A.useRef(0),{isAnimating:h,controls:p}=A.useContext(rt),b=nn(),x=Eg(p),E=async y=>{var C,I;if(typeof window>"u"||!((C=navigator==null?void 0:navigator.clipboard)!=null&&C.write)){r==null||r(new Error("Clipboard API not available"));return}try{let w=(I=c.current)==null?void 0:I.closest('[data-streamdown="table-wrapper"]'),P=w==null?void 0:w.querySelector("table");if(!P){r==null||r(new Error("Table not found"));return}let L=xg(P),F="";y==="csv"?F=Tg(L,x):y==="tsv"?F=_P(L):F=yg(L);let R=new ClipboardItem({"text/plain":new Blob([F],{type:"text/plain"}),"text/html":new Blob([P.outerHTML],{type:"text/html"})});await navigator.clipboard.write([R]),u(!0),s(!1),n==null||n(y),d.current=window.setTimeout(()=>u(!1),o)}catch(w){r==null||r(w)}};A.useEffect(()=>{let y=C=>{let I=C.composedPath();c.current&&!I.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y),window.clearTimeout(d.current)}},[]);let T=$t(),v=l?T.CheckIcon:T.CopyIcon;return f.jsxs("div",{className:i("relative"),ref:c,children:[f.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:()=>s(!a),title:b.copyTable,type:"button",children:e??f.jsx(v,{height:14,width:14})}),a?f.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[f.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("md"),title:b.copyTableAsMarkdown,type:"button",children:b.tableFormatMarkdown}),f.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("csv"),title:b.copyTableAsCsv,type:"button",children:b.tableFormatCsv}),f.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("tsv"),title:b.copyTableAsTsv,type:"button",children:b.tableFormatTsv})]}):null]})},wg=({children:e,className:t,onDownload:n,onError:r})=>{let o=ve(),[i,a]=A.useState(!1),s=A.useRef(null),{isAnimating:l,controls:u}=A.useContext(rt),c=nn(),d=$t(),h=Eg(u),p=b=>{var x;try{let E=(x=s.current)==null?void 0:x.closest('[data-streamdown="table-wrapper"]'),T=E==null?void 0:E.querySelector("table");if(!T){r==null||r(new Error("Table not found"));return}let v=xg(T),y=b==="csv"?Tg(v,h):yg(v),C=b==="csv"?"csv":"md",I=`${Uu(u,"table","table")}.${C}`;$r(I,y,b==="csv"?"text/csv":"text/markdown"),a(!1),n==null||n(b)}catch(E){r==null||r(E)}};return A.useEffect(()=>{let b=x=>{let E=x.composedPath();s.current&&!E.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),f.jsxs("div",{className:o("relative"),ref:s,children:[f.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:()=>a(!i),title:c.downloadTable,type:"button",children:e??f.jsx(d.DownloadIcon,{size:14})}),i?f.jsxs("div",{className:o("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[f.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("csv"),title:c.downloadTableAsCsv,type:"button",children:c.tableFormatCsv}),f.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("markdown"),title:c.downloadTableAsMarkdown,type:"button",children:c.tableFormatMarkdown})]}):null]})},IP=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:o,XIcon:i}=$t(),a=ve(),[s,l]=A.useState(!1),{isAnimating:u}=A.useContext(rt),c=nn(),d=()=>{l(!0)},h=()=>{l(!1)};return A.useEffect(()=>{if(s){$u();let p=b=>{b.key==="Escape"&&l(!1)};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),zu()}}},[s]),f.jsxs(f.Fragment,{children:[f.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:d,title:c.viewFullscreen,type:"button",children:f.jsx(o,{size:14})}),s?fa.createPortal(f.jsx("div",{"aria-label":c.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:h,onKeyDown:p=>{p.key==="Escape"&&h()},role:"dialog",children:f.jsxs("div",{className:a("flex h-full flex-col"),"data-streamdown":"table-wrapper",onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:[f.jsxs("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[n?f.jsx(vg,{}):null,r?f.jsx(wg,{}):null,f.jsx("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:h,title:c.exitFullscreen,type:"button",children:f.jsx(i,{size:20})})]}),f.jsx("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:f.jsx("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},NP=({children:e,className:t,maxHeight:n,showControls:r,showCopy:o=!0,showDownload:i=!0,showFullscreen:a=!0,...s})=>{let l=ve(),{isAnimating:u}=A.useContext(rt),c=cg(n),d=dg(u,!!c,e),h=r&&o,p=r&&i,b=r&&a,x=h||p||b;return f.jsxs("div",{className:l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[x?f.jsxs("div",{className:l("flex items-center justify-end gap-1"),children:[h?f.jsx(vg,{}):null,p?f.jsx(wg,{}):null,b?f.jsx(IP,{showCopy:h,showDownload:p,children:e}):null]}):null,f.jsx("div",{className:l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),ref:d,style:c?{maxHeight:c}:void 0,children:f.jsx("table",{className:l("w-full divide-y divide-border",t),"data-streamdown":"table",...s,children:e})})]})},RP=/startLine=(\d+)/,PP=/\bnoLineNumbers\b/,OP=A.lazy(()=>Promise.resolve().then(()=>require("./mermaid-HWGCJPDP-DwanGdS4.cjs")).then(e=>({default:e.Mermaid}))),LP=/language-([^\s]+)/,DP="node";function je(e,t){let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;let r=e,o=t;for(let i of n)if(i!==DP&&!Object.is(r[i],o[i]))return!1;return!0}function MP(e,t){var n,r;return((n=e==null?void 0:e.properties)==null?void 0:n.metastring)===((r=t==null?void 0:t.properties)==null?void 0:r.metastring)}var ia=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Ps=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Kf=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},_i=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},FP=(e,t)=>{if(typeof e=="boolean")return e;let n=e.image;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Yu=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("ol",{className:o("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>je(e,t));Yu.displayName="MarkdownOl";var Cg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("li",{className:o("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>je(e,t));Cg.displayName="MarkdownLi";var kg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("ul",{className:o("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>je(e,t));kg.displayName="MarkdownUl";var Sg=A.memo(({className:e,node:t,...n})=>{let r=ve();return f.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>je(e,t));Sg.displayName="MarkdownHr";var Ag=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("span",{className:o("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>je(e,t));Ag.displayName="MarkdownStrong";var BP=({children:e,className:t,href:n,node:r,...o})=>{let i=ve(),{linkSafety:a}=A.useContext(rt),[s,l]=A.useState(!1),u=n==="streamdown:incomplete-link",c=A.useCallback(async b=>{if(!(!(a!=null&&a.enabled&&n)||u)){if(b.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}l(!0)}},[a,n,u]),d=A.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),h=A.useCallback(()=>{l(!1)},[]),p={url:n??"",isOpen:s,onClose:h,onConfirm:d};return a!=null&&a.enabled&&n?f.jsxs(f.Fragment,{children:[f.jsx("button",{className:i("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(p):f.jsx(vP,{...p})]}):f.jsx("a",{className:i("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...o,children:e})},_g=A.memo(BP,(e,t)=>je(e,t));_g.displayName="MarkdownA";var Ig=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("h1",{className:o("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>je(e,t));Ig.displayName="MarkdownH1";var Ng=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("h2",{className:o("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>je(e,t));Ng.displayName="MarkdownH2";var Rg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("h3",{className:o("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>je(e,t));Rg.displayName="MarkdownH3";var Pg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("h4",{className:o("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>je(e,t));Pg.displayName="MarkdownH4";var Og=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("h5",{className:o("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>je(e,t));Og.displayName="MarkdownH5";var Lg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("h6",{className:o("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>je(e,t));Lg.displayName="MarkdownH6";var Dg=A.memo(({children:e,className:t,node:n,...r})=>{let{controls:o,tableMaxHeight:i}=A.useContext(rt),a=ia(o,"table"),s=Ps(o,"copy"),l=Ps(o,"download"),u=Ps(o,"fullscreen");return f.jsx(NP,{className:t,maxHeight:i,showControls:a,showCopy:s,showDownload:l,showFullscreen:u,...r,children:e})},(e,t)=>je(e,t));Dg.displayName="MarkdownTable";var Mg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("thead",{className:o("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>je(e,t));Mg.displayName="MarkdownThead";var Fg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("tbody",{className:o("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>je(e,t));Fg.displayName="MarkdownTbody";var Bg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("tr",{className:o("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>je(e,t));Bg.displayName="MarkdownTr";var jg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("th",{className:o("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>je(e,t));jg.displayName="MarkdownTh";var Hg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("td",{className:o("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>je(e,t));Hg.displayName="MarkdownTd";var Ug=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("blockquote",{className:o("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>je(e,t));Ug.displayName="MarkdownBlockquote";var $g=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("sup",{className:o("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>je(e,t));$g.displayName="MarkdownSup";var zg=A.memo(({children:e,className:t,node:n,...r})=>{let o=ve();return f.jsx("sub",{className:o("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>je(e,t));zg.displayName="MarkdownSub";var Vg=A.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let o=a=>{var s,l;if(!A.isValidElement(a))return!1;let u=Array.isArray(a.props.children)?a.props.children:[a.props.children],c=!1,d=!1;for(let h of u)if(h){if(typeof h=="string")h.trim()!==""&&(c=!0);else if(A.isValidElement(h))if(((s=h.props)==null?void 0:s["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(h.props.children)?h.props.children:[h.props.children];for(let b of p){if(typeof b=="string"&&b.trim()!==""){c=!0;break}if(A.isValidElement(b)&&((l=b.props)==null?void 0:l["data-footnote-backref"])===void 0){c=!0;break}}}}return d&&!c},i=Array.isArray(e)?e.map(a=>{if(!A.isValidElement(a))return a;if(a.type===Yu){let s=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(l=>!o(l));return s.length===0?null:{...a,props:{...a.props,children:s}}}return a}):e;return(Array.isArray(i)?i.some(a=>a!==null):i!==null)?f.jsx("section",{className:t,...r,children:i}):null}return f.jsx("section",{className:t,...r,children:e})},(e,t)=>je(e,t));Vg.displayName="MarkdownSection";var jP=({node:e,className:t,children:n,...r})=>{var o,i;let a=ve(),s=!("data-block"in r),{mermaid:l,controls:u,lineNumbers:c}=A.useContext(rt),d=Wu(),h=XR(),p=t==null?void 0:t.match(LP),b=(o=p==null?void 0:p.at(1))!=null?o:"",x=CP(b);if(s)return f.jsx("code",{className:a("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let E=(i=e==null?void 0:e.properties)==null?void 0:i.metastring,T=E==null?void 0:E.match(RP),v=T?Number.parseInt(T[1],10):void 0,y=v!==void 0&&v>=1?v:void 0,C=!(E&&PP.test(E))&&c!==!1,I="";if(A.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?I=n.props.children:typeof n=="string"&&(I=n),x){let D=x.component;return f.jsx(A.Suspense,{fallback:f.jsx(Gf,{}),children:f.jsx(D,{code:I,isIncomplete:h,language:b,meta:E})})}if(b==="mermaid"&&d){let D=ia(u,"mermaid"),M=_i(u,"download"),W=_i(u,"copy"),z=_i(u,"fullscreen"),$=_i(u,"panZoom"),H=D&&(M||W||z);return f.jsx(A.Suspense,{fallback:f.jsx(Gf,{}),children:f.jsxs("div",{className:a("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[f.jsx("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:f.jsx("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),H?f.jsx("div",{className:a("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:f.jsxs("div",{className:a("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[M?f.jsx(bg,{chart:I,config:l==null?void 0:l.config}):null,W?f.jsx(wl,{code:I}):null,z?f.jsx(AP,{chart:I,config:l==null?void 0:l.config}):null]})}):null,f.jsx("div",{className:a("rounded-md border border-border bg-background"),children:f.jsx(OP,{chart:I,config:l==null?void 0:l.config,showControls:$})})]})})}let w=ia(u,"code"),P=Kf(u,"download"),L=Kf(u,"copy"),{"data-block":F,...R}=r;return f.jsx(sP,{className:t,code:I,isIncomplete:h,language:b,lineNumbers:C,startLine:y,...R,children:w?f.jsxs(f.Fragment,{children:[P?f.jsx(EP,{code:I,language:b}):null,L?f.jsx(wl,{}):null]}):null})},Wg=A.memo(jP,(e,t)=>je(e,t)&&MP(e.node,t.node));Wg.displayName="MarkdownCode";var HP=({node:e,className:t,...n})=>{let{controls:r}=A.useContext(rt),o=ia(r,"image"),i=o&&FP(r,"download");return f.jsx(yP,{className:t,node:e,showControls:o,showDownloadControl:i,...n})},Yg=A.memo(HP,(e,t)=>je(e,t));Yg.displayName="MarkdownImg";var qg=A.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(o=>o!=null&&o!=="");if(r.length===1&&A.isValidElement(r[0])){let o=r[0].props.node,i=o==null?void 0:o.tagName;if(i==="img")return f.jsx(f.Fragment,{children:e});if(i==="code"&&"data-block"in r[0].props)return f.jsx(f.Fragment,{children:e})}return f.jsx("p",{...n,children:e})},(e,t)=>je(e,t));qg.displayName="MarkdownParagraph";var UP={ol:Yu,li:Cg,ul:kg,hr:Sg,strong:Ag,a:_g,h1:Ig,h2:Ng,h3:Rg,h4:Pg,h5:Og,h6:Lg,table:Dg,thead:Mg,tbody:Fg,tr:Bg,th:jg,td:Hg,blockquote:Ug,code:Wg,img:Yg,pre:({children:e})=>A.isValidElement(e)?A.cloneElement(e,{"data-block":"true"}):e,sup:$g,sub:zg,p:qg,section:Vg},$P=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,zP=new RegExp("\\p{L}","u");function Gg(e){let t=e.replace(/(```|~~~)[\s\S]*?\1/g,"").replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,""),n,r=0,o=0;for(let i of t){if($P.test(i)){n!=null||(n="rtl"),o+=1;continue}zP.test(i)&&(n!=null||(n="ltr"),r+=1)}return o>r?"rtl":r>o?"ltr":n??"ltr"}var VP=/^[ \t]{0,3}(`{3,}|~{3,})/,WP=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Xf=e=>{let t=e.split(`
|
|
121
|
+
`),n=null,r=0;for(let o of t){let i=VP.exec(o);if(n===null){if(i){let a=i[1];n=a[0],r=a.length}}else if(i){let a=i[1],s=a[0],l=a.length;s===n&&l>=r&&(n=null,r=0)}}return n!==null},YP=e=>{let t=e.split(`
|
|
122
|
+
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&WP.test(r))return!0}return!1},qP=()=>e=>{jt(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Qf=[],Zf={allowDangerousHtml:!0},Ii=new WeakMap,GP=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,o=e.remarkRehypeOptions;if(!(n||r||o)){let c="default";return this.keyCache.set(e,c),c}let i=c=>{if(!c||c.length===0)return"";let d="";for(let h=0;h<c.length;h+=1){let p=c[h];if(h>0&&(d+=","),Array.isArray(p)){let[b,x]=p;if(typeof b=="function"){let E=Ii.get(b);E||(E=b.name,Ii.set(b,E)),d+=E}else d+=String(b);d+=":",d+=JSON.stringify(x)}else if(typeof p=="function"){let b=Ii.get(p);b||(b=p.name,Ii.set(p,b)),d+=b}else d+=String(p)}return d},a=i(n),s=i(r),l=o?JSON.stringify(o):"",u=`${s}::${a}::${l}`;return this.keyCache.set(e,u),u}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Jf=new GP,Kg=e=>{let t=KP(e),n=e.children||"",r=t.runSync(t.parse(n),n);return n6(r,e)},KP=e=>{let t=Jf.get(e);if(t)return t;let n=QP(e);return Jf.set(e,n),n},XP=e=>e.some(t=>Array.isArray(t)?t[0]===ll:t===ll),QP=e=>{let t=e.rehypePlugins||Qf,n=e.remarkPlugins||Qf,r=XP(t)?n:[...n,qP],o=e.remarkRehypeOptions?{...Zf,...e.remarkRehypeOptions}:Zf;return U3().use(HN).use(r).use(v3,o).use(t)},ZP=e=>e,JP=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},e6=(e,t)=>{var n;for(let r in vs)if(Object.hasOwn(vs,r)&&Object.hasOwn(e.properties,r)){let o=e.properties[r],i=vs[r];(i===null||i.includes(e.tagName))&&(e.properties[r]=(n=t(String(o||""),r,e))!=null?n:void 0)}},t6=(e,t,n,r,o,i)=>{let a=!1;return r?a=!r.includes(e.tagName):o&&(a=o.includes(e.tagName)),!a&&i&&typeof t=="number"&&(a=!i(e,t,n)),a},n6=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:o,skipHtml:i,unwrapDisallowed:a,urlTransform:s}=t;if(n||r||o||i||s){let l=s||ZP;jt(e,(u,c,d)=>{if(u.type==="raw"&&d&&typeof c=="number")return JP(d,c,i,u.value),c;if(u.type==="element"&&(e6(u,l),t6(u,c,d,r,o,n)&&d&&typeof c=="number"))return a&&u.children?d.children.splice(c,1,...u.children):d.children.splice(c,1),c})}return GI(e,{Fragment:f.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0})},r6=/\[\^[\w-]{1,200}\](?!:)/,o6=/\[\^[\w-]{1,200}\]:/,i6=/<([A-Za-z][\w:-]*)[\s>/]/,a6=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),eh=new Map,th=new Map,s6=e=>{let t=e.toLowerCase(),n=eh.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return eh.set(t,r),r},l6=e=>{let t=e.toLowerCase(),n=th.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return th.set(t,r),r},nh=(e,t)=>{if(a6.has(t.toLowerCase()))return 0;let n=e.match(s6(t));if(!n)return 0;let r=0;for(let o of n)o.trimEnd().endsWith("/>")||(r+=1);return r},rh=(e,t)=>{let n=e.match(l6(t));return n?n.length:0},u6=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},c6=e=>{let t=r6.test(e),n=o6.test(e);if(t||n)return[e];let r=Rt.lex(e,{gfm:!0}),o=[],i=[],a=!1;for(let s of r){let l=s.raw,u=o.length;if(i.length>0){o[u-1]+=l;let c=i.at(-1),d=nh(l,c),h=rh(l,c);for(let p=0;p<d;p+=1)i.push(c);for(let p=0;p<h;p+=1)i.length>0&&i.at(-1)===c&&i.pop();continue}if(s.type==="html"&&s.block){let c=l.match(i6);if(c){let d=c[1],h=nh(l,d),p=rh(l,d);h>p&&i.push(d)}}if(u>0&&!a){let c=o[u-1];if(u6(c)%2===1){o[u-1]=c+l;continue}}o.push(l),s.type!=="space"&&(a=s.type==="code")}return o},d6=/^\n*/,f6=/\n*$/,Sl=/\n\n/g,h6=(e,t,n)=>{if(!t.includes(`
|
|
123
|
+
`))return e+t+n;let r=t.replace(Sl,`
|
|
124
|
+
<!---->
|
|
125
|
+
`).replace(d6,`
|
|
126
|
+
|
|
127
|
+
`).replace(f6,`
|
|
128
|
+
|
|
129
|
+
`);return`${e}${r}${n}
|
|
130
|
+
|
|
131
|
+
`},p6=(e,t)=>{let n=new RegExp(`<(${t})(?=[\\s>/])([^>]*)>`,"gi"),r="",o=0,i=n.exec(e);for(;i;){let a=i[0],s=i[1],l=i.index+a.length,u=e.slice(l);if(new RegExp(`</${s}\\s*>`,"i").test(u)){i=n.exec(e);continue}if(r+=e.slice(o,i.index),u.length===0){r+=a,o=l,i=n.exec(e);continue}if(u.startsWith(`
|
|
132
|
+
|
|
133
|
+
`)){let h=u.slice(2).replace(Sl,`
|
|
134
|
+
<!---->
|
|
135
|
+
`);r+=`${a}
|
|
136
|
+
|
|
137
|
+
${h}`,o=e.length;break}if(!u.startsWith(`
|
|
138
|
+
`)){r+=a,o=l,i=n.exec(e);continue}let c=u.slice(1);if(c.trim().length===0){r+=a,o=l,i=n.exec(e);continue}let d=c.replace(Sl,`
|
|
139
|
+
<!---->
|
|
140
|
+
`);r+=`${a}
|
|
141
|
+
|
|
142
|
+
${d}`,o=e.length;break}return o===0?e:r+e.slice(o)},m6=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let o=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(o,(i,a,s,l)=>h6(a,s,l)),n=p6(n,r)}return n},g6=/([\\`*_~[\]|])/g,b6=e=>e.replace(g6,"\\$1"),x6=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let o=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(o,(i,a,s,l)=>{let u=b6(s).replace(/\n\n/g," ");return a+u+l})}return n},E6=new Set(["blockquote","dd","dt","figcaption","h1","h2","h3","h4","h5","h6","li","p","td","th"]),Xg=new Set(["code","kbd","pre","samp","var"]);function Qg(e){return e.children.map(t=>t.type==="text"?t.value:t.type==="element"&&!Xg.has(t.tagName)?Qg(t):"").join("")}function T6(){return e=>{jt(e,"element",t=>{if(Xg.has(t.tagName)){t.properties!=null||(t.properties={}),t.properties.dir="ltr";return}E6.has(t.tagName)&&(t.properties!=null||(t.properties={}),typeof t.properties.dir!="string"&&(t.properties.dir=Gg(Qg(t))))})}}var Zg=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Zg).join(""):"",y6=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));jt(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let o=Zg(r);r.children=o?[{type:"text",value:o}]:[]}})},v6=()=>e=>{jt(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},w6=/^[ \t]*<[\w!/?-]/,C6=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,k6=e=>typeof e!="string"||e.length===0||!w6.test(e)?e:e.replace(C6,"$1"),oh,ih,ah,sh,$i={...or,clobberPrefix:"",protocols:{...or.protocols,href:[...(ih=(oh=or.protocols)==null?void 0:oh.href)!=null?ih:[],"tel","streamdown"]},attributes:{...or.attributes,code:[...(sh=(ah=or.attributes)==null?void 0:ah.code)!=null?sh:[],"metastring"]}},Al={raw:ll,sanitize:[Nm,$i],harden:[iy,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},S6={gfm:[kA,{}],codeMeta:v6},lh=Object.values(Al),A6=Object.values(S6),_6={block:" ▋",circle:" ●"},Jg=["github-light","github-dark"],eb={enabled:!0},I6={codeBlockMaxHeight:400,shikiTheme:Jg,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:eb,tableMaxHeight:300},rt=A.createContext(I6),tb=A.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:o,dir:i,animatePlugin:a,...s})=>{A.useLayoutEffect(()=>{a==null||a.commit()});let l=typeof e=="string"&&n?k6(e):e,u=f.jsx(Kg,{...s,children:l});return f.jsx(ug.Provider,{value:o,children:i?f.jsx("div",{dir:i,style:{display:"contents"},children:u}):u})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(o=>{var i,a;return((i=e.components)==null?void 0:i[o])!==((a=t.components)==null?void 0:a[o])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins||!!e.animatePlugin!=!!t.animatePlugin)});tb.displayName="Block";var nb=A.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:o=!1,components:i,rehypePlugins:a=lh,remarkPlugins:s=A6,className:l,shikiTheme:u,mermaid:c,codeBlockMaxHeight:d=400,controls:h=!0,isAnimating:p=!1,tableMaxHeight:b=300,animated:x,BlockComponent:E=tb,parseMarkdownIntoBlocksFn:T=c6,caret:v,plugins:y,remend:C,linkSafety:I=eb,lineNumbers:w=!0,allowedTags:P,literalTagContent:L,translations:F,icons:R,prefix:D,onAnimationStart:M,onAnimationEnd:W,...z})=>{let $=A.useId(),H=A.useMemo(()=>ZR(D),[D]),V=A.useRef(null),Q=A.useRef(M),re=A.useRef(W);Q.current=M,re.current=W,A.useEffect(()=>{var de,Ae,Ye;if(t==="static")return;let _t=V.current;if(V.current=p,_t===null){p&&((de=Q.current)==null||de.call(Q));return}p&&!_t?(Ae=Q.current)==null||Ae.call(Q):!p&&_t&&((Ye=re.current)==null||Ye.call(re))},[p,t]);let k=A.useMemo(()=>P?Object.keys(P):[],[P]),ue=A.useMemo(()=>{if(typeof e!="string")return"";let de=t==="streaming"&&r?$_(e,C):e;return L&&L.length>0&&(de=x6(de,L)),k.length>0&&(de=m6(de,k)),de},[e,t,r,C,k,L]),j=A.useMemo(()=>T(ue),[ue,T]),_=A.useMemo(()=>n==="auto"?j.map(Gg):void 0,[j,n]),ae=A.useMemo(()=>j.map((de,Ae)=>`${$}-${Ae}`),[j.length,$]),K=A.useMemo(()=>x===!0?"true":x?JSON.stringify(x):"",[x]),ee=A.useRef(null),ce=A.useRef([]),te=A.useRef([]),oe=A.useRef(null),pe=A.useRef("");if(K){if(pe.current!==K){pe.current=K;let de=K!=="true"?x.maxBacklogMs:void 0;ee.current=Vf({maxBacklogMs:de}),ce.current=[],te.current=[]}else ee.current||(ee.current=Vf());p&&ee.current&&ee.current.beginPass(ee.current.now())}else ee.current=null,ce.current=[],te.current=[],pe.current="";A.useLayoutEffect(()=>{var de;p&&((de=ee.current)==null||de.commitPass())});let be=A.useMemo(()=>{var de,Ae;return{codeBlockMaxHeight:d,shikiTheme:(Ae=u??((de=y==null?void 0:y.code)==null?void 0:de.getThemes()))!=null?Ae:Jg,controls:h,isAnimating:p,lineNumbers:w,mode:t,mermaid:c,linkSafety:I,tableMaxHeight:b}},[d,u,h,p,w,t,c,I,y==null?void 0:y.code,b]),Ee=A.useMemo(()=>F?JSON.stringify(F):"",[F]),we=A.useMemo(()=>({...gg,...F}),[Ee]),We=A.useMemo(()=>{let{inlineCode:de,...Ae}=i??{},Ye={...UP,...Ae};if(de){let _t=Ye.code;Ye.code=kn=>"data-block"in kn?_t?A.createElement(_t,kn):null:A.createElement(de,kn)}return Ye},[i]),it=A.useMemo(()=>{let de=[];return y!=null&&y.cjk&&(de=[...de,...y.cjk.remarkPluginsBefore]),de=[...de,...s],y!=null&&y.cjk&&(de=[...de,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(de=[...de,y.math.remarkPlugin]),de},[s,y==null?void 0:y.math,y==null?void 0:y.cjk]),at=A.useMemo(()=>{var de;let Ae=a;if(P&&Object.keys(P).length>0&&a===lh){let Ye={...$i,tagNames:[...(de=$i.tagNames)!=null?de:[],...Object.keys(P)],attributes:{...$i.attributes,...P}};Ae=[Al.raw,[Nm,Ye],Al.harden]}return L&&L.length>0&&(Ae=[...Ae,[y6,L]]),y!=null&&y.math&&(Ae=[...Ae,y.math.rehypePlugin]),n==="auto"&&t==="static"&&(Ae=[...Ae,T6]),Ae},[a,y==null?void 0:y.math,P,L,n,t]),vt=A.useMemo(()=>{if(!p||j.length===0)return!1;let de=j.at(-1);return Xf(de)||YP(de)},[p,j]),an=A.useMemo(()=>v&&p&&!vt?{"--streamdown-caret":`"${_6[v]}"`}:void 0,[v,p,vt]),Nr=de=>{let Ae=null;if(ee.current&&p){if(!ce.current[de]){let _t=K&&K!=="true"?x:{},{maxBacklogMs:kn,...po}=_t;ce.current[de]=lg({...po,timeline:ee.current})}Ae=ce.current[de]}oe.current!==at&&(te.current=[],oe.current=at),Ae&&!te.current[de]&&(te.current[de]=[...at,Ae.rehypePlugin]);let Ye=Ae&&te.current[de]?te.current[de]:at;return{blockAnimatePlugin:Ae,blockRehypePlugins:Ye}};return t==="static"?f.jsx(vl.Provider,{value:we,children:f.jsx(Cl.Provider,{value:y??null,children:f.jsx(rt.Provider,{value:be,children:f.jsx(Yf,{icons:R,children:f.jsx(yl.Provider,{value:H,children:f.jsx("div",{className:H("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",l),dir:n==="auto"?void 0:n,children:f.jsx(Kg,{components:We,rehypePlugins:at,remarkPlugins:it,...z,children:ue})})})})})})}):f.jsx(vl.Provider,{value:we,children:f.jsx(Cl.Provider,{value:y??null,children:f.jsx(rt.Provider,{value:be,children:f.jsx(Yf,{icons:R,children:f.jsx(yl.Provider,{value:H,children:f.jsxs("div",{className:H("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",v&&!vt?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,l),style:an,children:[j.length===0&&v&&p&&f.jsx("span",{}),j.map((de,Ae)=>{var Ye;let _t=Ae===j.length-1,kn=p&&_t&&Xf(de),{blockAnimatePlugin:po,blockRehypePlugins:Y}=Nr(Ae);return f.jsx(E,{animatePlugin:po,components:We,content:de,dir:(Ye=_==null?void 0:_[Ae])!=null?Ye:n!=="auto"?n:void 0,index:Ae,isIncomplete:kn,rehypePlugins:Y,remarkPlugins:it,shouldNormalizeHtmlIndentation:o,shouldParseIncompleteMarkdown:r,...z},ae[Ae])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.codeBlockMaxHeight===t.codeBlockMaxHeight&&e.tableMaxHeight===t.tableMaxHeight&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);nb.displayName="Streamdown";var N6=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:o=.1,showControls:i=!0,initialZoom:a=1,fullscreen:s=!1})=>{let{RotateCcwIcon:l,ZoomInIcon:u,ZoomOutIcon:c}=$t(),d=ve(),h=nn(),p=A.useRef(null),b=A.useRef(null),[x,E]=A.useState(a),[T,v]=A.useState({x:0,y:0}),[y,C]=A.useState(!1),[I,w]=A.useState({x:0,y:0}),[P,L]=A.useState({x:0,y:0}),F=A.useCallback(V=>{E(Q=>Math.max(n,Math.min(r,Q+V)))},[n,r]),R=A.useCallback(()=>{F(o)},[F,o]),D=A.useCallback(()=>{F(-o)},[F,o]),M=A.useCallback(()=>{E(a),v({x:0,y:0})},[a]),W=A.useCallback(V=>{V.preventDefault();let Q=V.deltaY>0?-o:o;F(Q)},[F,o]),z=A.useCallback(V=>{if(V.button!==0||V.isPrimary===!1)return;C(!0),w({x:V.clientX,y:V.clientY}),L(T);let Q=V.currentTarget;Q instanceof HTMLElement&&Q.setPointerCapture(V.pointerId)},[T]),$=A.useCallback(V=>{if(!y)return;V.preventDefault();let Q=V.clientX-I.x,re=V.clientY-I.y;v({x:P.x+Q,y:P.y+re})},[y,I,P]),H=A.useCallback(V=>{C(!1);let Q=V.currentTarget;Q instanceof HTMLElement&&Q.releasePointerCapture(V.pointerId)},[]);return A.useEffect(()=>{let V=p.current;if(V)return V.addEventListener("wheel",W,{passive:!1}),()=>{V.removeEventListener("wheel",W)}},[W]),A.useEffect(()=>{let V=b.current;if(V&&y)return document.body.style.userSelect="none",V.addEventListener("pointermove",$,{passive:!1}),V.addEventListener("pointerup",H),V.addEventListener("pointercancel",H),()=>{document.body.style.userSelect="",V.removeEventListener("pointermove",$),V.removeEventListener("pointerup",H),V.removeEventListener("pointercancel",H)}},[y,$,H]),f.jsxs("div",{className:d("relative flex flex-col",s?"h-full w-full":"min-h-28 w-full",t),ref:p,style:{cursor:y?"grabbing":"grab"},children:[i?f.jsxs("div",{className:d("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",s?"bottom-4 left-4":"bottom-2 left-2"),children:[f.jsx("button",{"aria-label":h.zoomIn,className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:x>=r,onClick:R,title:h.zoomIn,type:"button",children:f.jsx(u,{"aria-hidden":"true",size:16})}),f.jsx("button",{"aria-label":h.zoomOut,className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:x<=n,onClick:D,title:h.zoomOut,type:"button",children:f.jsx(c,{"aria-hidden":"true",size:16})}),f.jsx("button",{"aria-label":h.resetView,className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:M,title:h.resetView,type:"button",children:f.jsx(l,{"aria-hidden":"true",size:16})})]}):null,f.jsx("div",{className:d("flex-1 origin-center transition-transform duration-150 ease-out",s?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:z,ref:b,role:"application",style:{transform:`translate(${T.x}px, ${T.y}px) scale(${x})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},rb=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:o=!0})=>{let i=ve(),[a,s]=A.useState(null),[l,u]=A.useState(!1),[c,d]=A.useState(""),[h,p]=A.useState(""),[b,x]=A.useState(0),{mermaid:E}=A.useContext(rt),T=Wu(),v=E==null?void 0:E.errorComponent,{shouldRender:y,containerRef:C}=DR({immediate:r});if(A.useEffect(()=>{if(y){if(!T){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),u(!0);let w=T.getMermaid(n),P=e.split("").reduce((R,D)=>(R<<5)-R+D.charCodeAt(0)|0,0),L=`mermaid-${Math.abs(P)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:F}=await w.render(L,e);d(F),p(F)}catch(w){if(!(h||c)){let P=w instanceof Error?w.message:"Failed to render Mermaid chart";s(P)}}finally{u(!1)}})()}},[e,n,b,y,T]),!(y||c||h))return f.jsx("div",{className:i("my-4 min-h-[200px]",t),ref:C});if(l&&!c&&!h)return f.jsx("div",{className:i("my-4 flex justify-center p-4",t),ref:C,children:f.jsxs("div",{className:i("flex items-center space-x-2 text-muted-foreground"),children:[f.jsx("div",{className:i("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),f.jsx("span",{className:i("text-sm"),children:"Loading diagram..."})]})});if(a&&!c&&!h){let w=()=>x(P=>P+1);return v?f.jsx("div",{ref:C,children:f.jsx(v,{chart:e,error:a,retry:w})}):f.jsxs("div",{className:i("rounded-md bg-red-50 p-4",t),ref:C,children:[f.jsxs("p",{className:i("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",a]}),f.jsxs("details",{className:i("mt-2"),children:[f.jsx("summary",{className:i("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),f.jsx("pre",{className:i("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let I=c||h;return f.jsx("div",{className:i("size-full",t),"data-streamdown":"mermaid",ref:C,children:f.jsx(N6,{className:i(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:o,zoomStep:.1,children:f.jsx("div",{"aria-label":"Mermaid chart",className:i("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:I},role:"img"})})})};const ob=A.forwardRef(function({children:t,className:n},r){return f.jsx("div",{ref:r,"data-testid":"markdown",className:q("flex flex-col gap-3",n),children:f.jsx(nb,{children:t})})});ob.displayName="Markdown";const ib=A.forwardRef(({durationText:e,children:t,defaultOpen:n=!1,open:r,onOpenChange:o,className:i},a)=>f.jsxs(ba,{ref:a,"data-testid":"reasoning-disclosure",defaultOpen:n,open:r,onOpenChange:o,className:q(i),children:[f.jsxs(xa,{"data-testid":"reasoning-toggle",className:q("inline-flex cursor-pointer select-none items-center gap-1.5 rounded-full border border-border bg-transparent px-2.5 py-1 text-[12.5px] font-medium text-text-2","hover:bg-panel focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[f.jsx("span",{"aria-hidden":!0,className:"text-[10px] transition-transform duration-150 [[data-state=open]>&]:rotate-0 -rotate-90",children:"▾"}),e?`Thought for ${e}`:"Thought process"]}),f.jsx(Ea,{children:f.jsx("div",{"data-testid":"reasoning-body",className:"mt-2 whitespace-pre-wrap border-l-2 border-border pl-3.5 text-sm text-text-2",children:t})})]}));ib.displayName="ReasoningDisclosure";const ab=A.createContext(null);function Yn(){return A.useContext(ab)}const sb=A.forwardRef(({label:e,hint:t,error:n,required:r,className:o,children:i},a)=>{const s=A.useId(),l=t&&!n?`${s}-hint`:void 0,u=n?`${s}-error`:void 0,c=[l,u].filter(Boolean).join(" ")||void 0;return f.jsx(ab.Provider,{value:{id:s,label:e,describedBy:c,invalid:!!n},children:f.jsxs("div",{ref:a,className:q("flex flex-col gap-1.5",o),"data-testid":"field",children:[f.jsxs("label",{htmlFor:s,className:"text-sm font-medium text-foreground","data-testid":"field-label",children:[e,r?f.jsxs("span",{"aria-hidden":"true",className:"text-destructive",children:[" ","*"]}):null]}),i,t&&!n?f.jsx("p",{className:"text-xs text-text-3","data-testid":"field-hint",id:l,children:t}):null,n?f.jsx("p",{className:"text-xs text-destructive","data-testid":"field-error",id:u,role:"alert",children:n}):null]})})});sb.displayName="Field";const R6=$n(["w-full bg-panel text-foreground placeholder:text-text-3","border border-input rounded-lg","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-35","transition-colors motion-reduce:transition-none"],{variants:{variant:{default:"",error:"border-destructive focus-visible:ring-destructive"},size:{sm:"px-2.5 py-1 text-xs",md:"px-3 py-1.5 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),qu=A.forwardRef(({className:e,variant:t,size:n="md",leftIcon:r,rightSlot:o,id:i,...a},s)=>{const l=Yn(),u=t==="error"||((l==null?void 0:l.invalid)??!1);return f.jsxs("div",{className:"relative flex w-full items-center",children:[r?f.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-2.5 text-text-3",children:f.jsx(r,{size:14})}):null,f.jsx("input",{ref:s,"data-testid":"input",id:i??(l==null?void 0:l.id),"aria-describedby":l==null?void 0:l.describedBy,"aria-invalid":u||void 0,className:q(R6({variant:u?"error":t,size:n}),r&&"pl-8",e),...a}),o?f.jsx("span",{className:"absolute right-2.5 flex items-center text-xs text-text-3",children:o}):null]})});qu.displayName="Input";const P6=A.forwardRef(function({title:t,tool:n,command:r,scopeNote:o,pendingCount:i=0,onDecision:a,onDenyComment:s,denyCommentLabel:l="Deny with note",allowAlwaysLabel:u="Allow always",disabled:c=!1,className:d},h){const p=A.useRef(a);p.current=a;const[b,x]=A.useState(!1),[E,T]=A.useState(""),v=E.trim(),y=C=>{C.preventDefault(),v&&(s==null||s(v),T(""),x(!1))};return A.useEffect(()=>{if(c)return;const C=I=>{if(I.metaKey||I.ctrlKey||I.altKey)return;const w=I.target;if(w!=null&&w.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test((w==null?void 0:w.tagName)??""))return;const L={y:"allow",a:"allow-always",n:"deny"}[I.key.toLowerCase()];L&&p.current(L)};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[c]),f.jsx("div",{ref:h,"data-testid":"approval-card",className:q(d),children:f.jsxs(ar,{className:"border-accent/40",children:[f.jsxs(ar.Header,{className:"border-accent/25 bg-add-bg text-accent",children:[f.jsx("span",{"aria-hidden":"true",children:"⏸"}),f.jsx("span",{children:t??`Approval needed — ${n}`}),i>0?f.jsxs("span",{className:"ml-auto font-normal text-text-3",children:[i," queued"]}):null]}),f.jsxs(ar.Body,{children:[o?f.jsx("p",{className:"mb-2.5 text-xs text-text-3",children:o}):null,f.jsx("pre",{className:"overflow-x-auto rounded-lg border border-border bg-code-bg p-3 font-mono text-[12.5px]",children:r})]}),f.jsxs(ar.Actions,{children:[f.jsxs(fn,{onClick:()=>a("allow"),disabled:c,children:[f.jsx("span",{children:"Allow"}),f.jsx("kbd",{className:"ml-1.5 rounded border border-current px-1 text-[11px] opacity-75",children:"Y"})]}),f.jsxs(fn,{variant:"ghost",onClick:()=>a("allow-always"),disabled:c,children:[f.jsx("span",{children:u}),f.jsx("kbd",{className:"ml-1.5 rounded border border-current px-1 text-[11px] opacity-75",children:"A"})]}),f.jsxs(fn,{variant:"destructive",onClick:()=>a("deny"),disabled:c,children:[f.jsx("span",{children:"Deny"}),f.jsx("kbd",{className:"ml-1.5 rounded border border-current px-1 text-[11px] opacity-75",children:"N"})]}),s?f.jsx(fn,{variant:"ghost",onClick:()=>x(C=>!C),disabled:c,"aria-expanded":b,children:f.jsx("span",{children:l})}):null]}),s&&b?f.jsxs("form",{onSubmit:y,className:"flex items-center gap-2 border-t border-border px-4 py-2.5",children:[f.jsx(qu,{size:"sm",value:E,onChange:C=>T(C.target.value),"aria-label":"Deny comment",placeholder:"Why are you denying this?",autoFocus:!0,disabled:c}),f.jsx(fn,{type:"submit",variant:"destructive",size:"sm",disabled:c||!v,children:f.jsx("span",{children:"Deny"})})]}):null]})})}),O6=180,L6=A.forwardRef(function({placeholder:t="Reply… type / for commands",busy:n=!1,onSubmit:r,onStop:o,onCommand:i,commands:a,leftChips:s,metaRight:l,autoFocus:u=!1,className:c},d){const[h,p]=A.useState(""),[b,x]=A.useState(0),E=A.useRef(null);A.useEffect(()=>{var D;u&&((D=E.current)==null||D.focus())},[u]);const T=A.useCallback(()=>{const D=E.current;D&&(D.style.height="auto",D.style.height=`${Math.min(D.scrollHeight,O6)}px`)},[]),v=/^\/\S*$/.test(h)?h.slice(1):null,y=v!==null&&(a!=null&&a.length)?a.filter(D=>D.name.startsWith(v)):[],C=y.length>0,I=Math.min(b,y.length-1),w=A.useId(),P=D=>`${w}-option-${D}`,L=A.useCallback(D=>{var M;p(`/${D.name} `),x(0),(M=E.current)==null||M.focus()},[]),F=A.useCallback(()=>{const D=h.trim();if(!D||n)return;(a==null?void 0:a.some(W=>D===`/${W.name}`))&&i!==void 0?i(D):r==null||r(D),p(""),requestAnimationFrame(()=>{var W;((W=E.current)==null?void 0:W.value)===""&&(E.current.style.height="auto")})},[n,a,i,r,h]),R=D=>{if(C&&!D.nativeEvent.isComposing){if(D.key==="ArrowDown"){D.preventDefault(),x(M=>(M+1)%y.length);return}if(D.key==="ArrowUp"){D.preventDefault(),x(M=>(M-1+y.length)%y.length);return}if((D.key==="Enter"||D.key==="Tab")&&(D.key==="Tab"||h.trim()!==`/${y[I].name}`)){D.preventDefault(),L(y[I]);return}}D.key==="Enter"&&!D.shiftKey&&!D.nativeEvent.isComposing&&(D.preventDefault(),F())};return f.jsxs("div",{ref:d,"data-testid":"composer",className:q("rounded-2xl border border-border bg-panel px-3.5 pb-2.5 pt-3 transition-colors focus-within:border-primary/45 focus-within:ring-2 focus-within:ring-ring motion-reduce:transition-none",c),children:[f.jsxs("div",{className:"relative",children:[C&&f.jsx("div",{role:"listbox",id:w,"aria-label":"Commands",tabIndex:-1,"data-testid":"composer-commands",className:"absolute bottom-full left-0 right-0 mb-1.5 max-h-56 overflow-y-auto rounded-xl border border-border bg-panel p-1 shadow-md",children:y.map((D,M)=>f.jsxs("button",{type:"button",role:"option",id:P(M),"aria-selected":M===I,tabIndex:-1,onMouseDown:W=>W.preventDefault(),onClick:()=>L(D),className:q("flex w-full items-baseline gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm",M===I?"bg-panel-2":"hover:bg-panel-2/60"),children:[f.jsxs("span",{className:"font-semibold text-foreground",children:["/",D.name]}),D.argumentHint&&f.jsx("span",{className:"text-xs text-text-3",children:D.argumentHint}),D.description&&f.jsx("span",{className:"truncate text-xs text-text-2",children:D.description})]},D.name))}),f.jsx("textarea",{ref:E,"data-testid":"composer-input",rows:1,role:a!=null&&a.length?"combobox":void 0,"aria-autocomplete":a!=null&&a.length?"list":void 0,"aria-expanded":a!=null&&a.length?C:void 0,"aria-controls":C?w:void 0,"aria-activedescendant":C?P(I):void 0,value:h,placeholder:t,onChange:D=>{p(D.target.value),x(0),T()},onKeyDown:R,onPaste:()=>requestAnimationFrame(T),className:"max-h-[180px] w-full resize-none bg-transparent leading-relaxed outline-none placeholder:text-text-3"})]}),f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[s,f.jsx("span",{className:"flex-1"}),l,n?f.jsx("button",{type:"button","data-testid":"composer-stop",onClick:()=>o==null?void 0:o(),className:"rounded-full border border-border bg-panel-2 px-4 py-1.5 text-sm font-semibold hover:bg-panel focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"Stop"}):f.jsx("button",{type:"button","data-testid":"composer-send",onClick:F,disabled:!h.trim(),className:"rounded-full bg-primary px-4 py-1.5 text-sm font-bold text-primary-foreground disabled:pointer-events-none disabled:opacity-35 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"Send ⏎"})]})]})}),D6=[{keys:"/",label:"commands"},{keys:"⇧⏎",label:"newline"}];function M6(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}const lb=A.forwardRef(({hints:e=D6,tokens:t,requests:n,costUsd:r,children:o,className:i,...a},s)=>f.jsxs("div",{ref:s,"data-testid":"status-line",className:q("flex items-center gap-3.5 px-1 pb-2.5 pt-1.5 text-xs tabular-nums text-text-3",i),...a,children:[e.map(l=>f.jsxs("span",{children:[f.jsx("span",{className:"font-medium text-text-2",children:l.keys})," ",l.label]},l.label)),o,f.jsx("span",{className:"flex-1"}),t!==void 0?f.jsxs("span",{children:[M6(t)," tokens"]}):null,n!==void 0?f.jsxs("span",{children:[n," requests"]}):null,r!==void 0?f.jsxs("span",{children:["$",r.toFixed(3)]}):null]}));lb.displayName="StatusLine";const F6=$n(["w-full bg-panel text-foreground placeholder:text-text-3 resize-y","border border-input rounded-lg px-3 py-2 text-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-35","transition-colors motion-reduce:transition-none"],{variants:{variant:{default:"",error:"border-destructive focus-visible:ring-destructive"}},defaultVariants:{variant:"default"}}),ub=A.forwardRef(({className:e,variant:t,minRows:n=4,rows:r,id:o,...i},a)=>{const s=Yn(),l=t==="error"||((s==null?void 0:s.invalid)??!1);return f.jsx("textarea",{ref:a,"data-testid":"textarea",id:o??(s==null?void 0:s.id),"aria-describedby":s==null?void 0:s.describedBy,"aria-invalid":l||void 0,rows:r??n,className:q(F6({variant:l?"error":t}),e),...i})});ub.displayName="Textarea";var B6=Object.defineProperty,j6=(e,t)=>B6(e,"name",{value:t,configurable:!0});function aa(e,[t,n]){return Math.min(n,Math.max(t,e))}j6(aa,"clamp");var H6=Object.defineProperty,et=(e,t)=>H6(e,"name",{value:t,configurable:!0});function oo(e){const t=e+"CollectionProvider",[n,r]=Ve(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=et(x=>{const{scope:E,children:T}=x,v=g.useRef(null),y=g.useRef(new Map).current;return f.jsx(o,{scope:E,itemMap:y,collectionRef:v,children:T})},"CollectionProvider");a.displayName=t;const s=e+"CollectionSlot",l=Qt(s),u=g.forwardRef((x,E)=>{const{scope:T,children:v}=x,y=i(s,T),C=he(E,y.collectionRef);return f.jsx(l,{ref:C,children:v})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",h=Qt(c),p=g.forwardRef((x,E)=>{const{scope:T,children:v,...y}=x,C=g.useRef(null),I=he(E,C),w=i(c,T);return g.useEffect(()=>(w.itemMap.set(C,{ref:C,...y}),()=>void w.itemMap.delete(C))),f.jsx(h,{[d]:"",ref:I,children:v})});p.displayName=c;function b(x){const E=i(e+"CollectionConsumer",x);return g.useCallback(()=>{const v=E.collectionRef.current;if(!v)return[];const y=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(E.itemMap.values()).sort((w,P)=>y.indexOf(w.ref.current)-y.indexOf(P.ref.current))},[E.collectionRef,E.itemMap])}return et(b,"useCollection"),[{Provider:a,Slot:u,ItemSlot:p},b,r]}et(oo,"createCollection");var uh=new WeakMap,qe,kt,Os=(kt=class extends Map{constructor(n){super(n);od(this,qe);ss(this,qe,[...super.keys()]),uh.set(this,!0)}set(n,r){return uh.get(this)&&(this.has(n)?st(this,qe)[st(this,qe).indexOf(n)]=n:st(this,qe).push(n)),super.set(n,r),this}insert(n,r,o){const i=this.has(r),a=st(this,qe).length,s=Gu(n);let l=s>=0?s:a+s;const u=l<0||l>=a?-1:l;if(u===this.size||i&&u===this.size-1||u===-1)return this.set(r,o),this;const c=this.size+(i?0:1);s<0&&l++;const d=[...st(this,qe)];let h,p=!1;for(let b=l;b<c;b++)if(l===b){let x=d[b];d[b]===r&&(x=d[b+1]),i&&this.delete(r),h=this.get(x),this.set(r,o)}else{!p&&d[b-1]===r&&(p=!0);const x=d[p?b:b-1],E=h;h=this.get(x),this.delete(x),this.set(x,E)}return this}with(n,r,o){const i=new kt(this);return i.insert(n,r,o),i}before(n){const r=st(this,qe).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,o){const i=st(this,qe).indexOf(n);return i===-1?this:this.insert(i,r,o)}after(n){let r=st(this,qe).indexOf(n);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(n,r,o){const i=st(this,qe).indexOf(n);return i===-1?this:this.insert(i+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return ss(this,qe,[]),super.clear()}delete(n){const r=super.delete(n);return r&&st(this,qe).splice(st(this,qe).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=zi(st(this,qe),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=zi(st(this,qe),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return st(this,qe).indexOf(n)}keyAt(n){return zi(st(this,qe),n)}from(n,r){const o=this.indexOf(n);if(o===-1)return;let i=o+r;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(n,r){const o=this.indexOf(n);if(o===-1)return;let i=o+r;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(n,r){let o=0;for(const i of this){if(Reflect.apply(n,r,[i,o,this]))return i;o++}}findIndex(n,r){let o=0;for(const i of this){if(Reflect.apply(n,r,[i,o,this]))return o;o++}return-1}filter(n,r){const o=[];let i=0;for(const a of this)Reflect.apply(n,r,[a,i,this])&&o.push(a),i++;return new kt(o)}map(n,r){const o=[];let i=0;for(const a of this)o.push([a[0],Reflect.apply(n,r,[a,i,this])]),i++;return new kt(o)}reduce(...n){const[r,o]=n;let i=0,a=o??this.at(0);for(const s of this)i===0&&n.length===1?a=s:a=Reflect.apply(r,this,[a,s,i,this]),i++;return a}reduceRight(...n){const[r,o]=n;let i=o??this.at(-1);for(let a=this.size-1;a>=0;a--){const s=this.at(a);a===this.size-1&&n.length===1?i=s:i=Reflect.apply(r,this,[i,s,a,this])}return i}toSorted(n){const r=[...this.entries()].sort(n);return new kt(r)}toReversed(){const n=new kt;for(let r=this.size-1;r>=0;r--){const o=this.keyAt(r),i=this.get(o);n.set(o,i)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new kt(r)}slice(n,r){const o=new kt;let i=this.size-1;if(n===void 0)return o;n<0&&(n=n+this.size),r!==void 0&&r>0&&(i=r-1);for(let a=n;a<=i;a++){const s=this.keyAt(a),l=this.get(s);o.set(s,l)}return o}every(n,r){let o=0;for(const i of this){if(!Reflect.apply(n,r,[i,o,this]))return!1;o++}return!0}some(n,r){let o=0;for(const i of this){if(Reflect.apply(n,r,[i,o,this]))return!0;o++}return!1}},qe=new WeakMap,et(kt,"OrderedDict"),kt);function zi(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=cb(e,t);return n===-1?void 0:e[n]}et(zi,"at");function cb(e,t){const n=e.length,r=Gu(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}et(cb,"toSafeIndex");function Gu(e){return e!==e||e===0?0:Math.trunc(e)}et(Gu,"toSafeInteger");function U6(e){const t=e+"CollectionProvider",[n,r]=Ve(t),[o,i]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Os,setItemMap:et(()=>{},"setItemMap")}),a=et(({state:y,...C})=>y?f.jsx(l,{...C,state:y}):f.jsx(s,{...C}),"CollectionProvider");a.displayName=t;const s=et(y=>{const C=E();return f.jsx(l,{...y,state:C})},"CollectionInit");s.displayName=t+"Init";const l=et(y=>{const{scope:C,children:I,state:w}=y,P=g.useRef(null),[L,F]=g.useState(null),R=he(P,F),[D,M]=w;return g.useEffect(()=>{if(!L)return;const W=hb(()=>{});return W.observe(L,{childList:!0,subtree:!0}),()=>{W.disconnect()}},[L]),f.jsx(o,{scope:C,itemMap:D,setItemMap:M,collectionRef:R,collectionRefObject:P,collectionElement:L,children:I})},"CollectionProviderImpl");l.displayName=t+"Impl";const u=e+"CollectionSlot",c=Qt(u),d=g.forwardRef((y,C)=>{const{scope:I,children:w}=y,P=i(u,I),L=he(C,P.collectionRef);return f.jsx(c,{ref:L,children:w})});d.displayName=u;const h=e+"CollectionItemSlot",p="data-radix-collection-item",b=Qt(h),x=g.forwardRef((y,C)=>{const{scope:I,children:w,...P}=y,L=g.useRef(null),[F,R]=g.useState(null),D=he(C,L,R),M=i(h,I),{setItemMap:W}=M,z=g.useRef(P);db(z.current,P)||(z.current=P);const $=z.current;return g.useEffect(()=>{const H=$;return W(V=>F?V.has(F)?V.set(F,{...H,element:F}).toSorted(_l):(V.set(F,{...H,element:F}),V.toSorted(_l)):V),()=>{W(V=>!F||!V.has(F)?V:(V.delete(F),new Os(V)))}},[F,$,W]),f.jsx(b,{[p]:"",ref:D,children:w})});x.displayName=h;function E(){return g.useState(new Os)}et(E,"useInitCollection");function T(y){const{itemMap:C}=i(e+"CollectionConsumer",y);return C}return et(T,"useCollection"),[{Provider:a,Slot:d,ItemSlot:x},{createCollectionScope:r,useCollection:T,useInitCollection:E}]}et(U6,"createCollection");function db(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||e[o]!==t[o])return!1;return!0}et(db,"shallowEqual");function fb(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}et(fb,"isElementPreceding");function _l(e,t){return!e[1].element||!t[1].element?0:fb(e[1].element,t[1].element)?-1:1}et(_l,"sortByDocumentPosition");function hb(e){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){e();return}})}et(hb,"getChildListObserver");var $6=Object.defineProperty,z6=(e,t)=>$6(e,"name",{value:t,configurable:!0}),V6=g.createContext(void 0);function qn(e){const t=g.useContext(V6);return e||t||"ltr"}z6(qn,"useDirection");var W6=Object.defineProperty,Y6=(e,t)=>W6(e,"name",{value:t,configurable:!0});function Ue(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}Y6(Ue,"useCallbackRef");var q6=Object.defineProperty,Qe=(e,t)=>q6(e,"name",{value:t,configurable:!0}),Il="dismissableLayer.update",G6="dismissableLayer.pointerDownOutside",K6="dismissableLayer.focusOutside",ch,Ku=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),io=g.forwardRef(Qe(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=t,d=g.useContext(Ku),[h,p]=g.useState(null),b=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=g.useState({}),E=he(n,p),T=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?T.indexOf(v):-1,C=h?T.indexOf(h):-1,I=d.layersWithOutsidePointerEventsDisabled.size>0,w=C>=y,P=g.useRef(!1),L=mb(M=>{a==null||a(M),l==null||l(M),M.defaultPrevented||u==null||u()},{ownerDocument:b,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:g.useCallback(M=>{if(!(M instanceof Node))return!1;const W=[...d.branches].some(z=>z.contains(M));return w&&!W},[d.branches,w])}),F=gb(M=>{if(o&&P.current)return;const W=M.target;[...d.branches].some($=>$.contains(W))||(s==null||s(M),l==null||l(M),M.defaultPrevented||u==null||u())},b),R=h?C===T.length-1:!1,D=Ue(M=>{M.key==="Escape"&&(i==null||i(M),!M.defaultPrevented&&u&&(M.preventDefault(),u()))});return g.useEffect(()=>{if(R)return b.addEventListener("keydown",D,{capture:!0}),()=>b.removeEventListener("keydown",D,{capture:!0})},[b,R,D]),g.useEffect(()=>{if(h)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ch=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),Nl(),()=>{r&&(d.layersWithOutsidePointerEventsDisabled.delete(h),d.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=ch))}},[h,b,r,d]),g.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),Nl())},[h,d]),g.useEffect(()=>{const M=Qe(()=>x({}),"handleUpdate");return document.addEventListener(Il,M),()=>document.removeEventListener(Il,M)},[]),f.jsx(ie.div,{...c,ref:E,style:{pointerEvents:I?w?"auto":"none":void 0,...t.style},onFocusCapture:J(t.onFocusCapture,F.onFocusCapture),onBlurCapture:J(t.onBlurCapture,F.onBlurCapture),onPointerDownCapture:J(t.onPointerDownCapture,L.onPointerDownCapture)})},"DismissableLayer")),X6=g.forwardRef(Qe(function(t,n){const r=g.useContext(Ku),o=g.useRef(null),i=he(n,o);return g.useEffect(()=>{const a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),f.jsx(ie.div,{...t,ref:i})},"DismissableLayerBranch"));function pb(){const e=g.useContext(Ku),[t,n]=g.useState(null);return g.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Qe(pb,"useDismissableLayerSurface");var Q6=Qe(()=>!0,"IS_TRUE");function mb(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:i,shouldHandlePointerDownOutside:a=Q6}=t,s=Ue(e),l=g.useRef(!1),u=g.useRef(!1),c=g.useRef(new Map),d=g.useRef(()=>{});return g.useEffect(()=>{function h(){u.current=!1,o.current=!1,c.current.clear()}Qe(h,"resetOutsideInteraction");function p(){return Array.from(c.current.values()).some(Boolean)}Qe(p,"isOutsideInteractionIntercepted");function b(y){if(!u.current)return;const C=y.target;C instanceof Node&&[...i].some(w=>w.contains(C))||c.current.set(y.type,!0),y.type==="click"&&window.setTimeout(()=>{u.current&&d.current()},0)}Qe(b,"handleInteractionCapture");function x(y){u.current&&c.current.set(y.type,!1)}Qe(x,"handleInteractionBubble");const E=Qe(y=>{if(y.target&&!l.current){let C=function(){n.removeEventListener("click",d.current);const w=p();h(),w||Xu(G6,s,I,{discrete:!0})};if(Qe(C,"handleAndDispatchPointerDownOutsideEvent"),!a(y.target)){n.removeEventListener("click",d.current),h(),l.current=!1;return}const I={originalEvent:y};u.current=!0,o.current=r&&y.button===0,c.current.clear(),!r||y.button!==0?C():(n.removeEventListener("click",d.current),d.current=C,n.addEventListener("click",d.current,{once:!0}))}else n.removeEventListener("click",d.current),h();l.current=!1},"handlePointerDown"),T=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const y of T)n.addEventListener(y,b,!0),n.addEventListener(y,x);const v=window.setTimeout(()=>{n.addEventListener("pointerdown",E)},0);return()=>{window.clearTimeout(v),n.removeEventListener("pointerdown",E),n.removeEventListener("click",d.current);for(const y of T)n.removeEventListener(y,b,!0),n.removeEventListener(y,x)}},[n,s,r,o,i,a]),{onPointerDownCapture:Qe(()=>l.current=!0,"onPointerDownCapture")}}Qe(mb,"usePointerDownOutside");function gb(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e),r=g.useRef(!1);return g.useEffect(()=>{const o=Qe(i=>{i.target&&!r.current&&Xu(K6,n,{originalEvent:i},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:Qe(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Qe(()=>r.current=!1,"onBlurCapture")}}Qe(gb,"useFocusOutside");function Nl(){const e=new CustomEvent(Il);document.dispatchEvent(e)}Qe(Nl,"dispatchUpdate");function Xu(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ma(o,i):o.dispatchEvent(i)}Qe(Xu,"handleAndDispatchCustomEvent");var Z6=io,J6=X6,eO=Object.defineProperty,Qu=(e,t)=>eO(e,"name",{value:t,configurable:!0}),Ni=0,Vt=null;function tO(e){return ao(),e.children}Qu(tO,"FocusGuards");function ao(){g.useEffect(()=>{Vt||(Vt={start:Rl(),end:Rl()});const{start:e,end:t}=Vt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Ni++,()=>{Ni===1&&(Vt==null||Vt.start.remove(),Vt==null||Vt.end.remove(),Vt=null),Ni=Math.max(0,Ni-1)}},[])}Qu(ao,"useFocusGuards");function Rl(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}Qu(Rl,"createFocusGuard");var nO=Object.defineProperty,gt=(e,t)=>nO(e,"name",{value:t,configurable:!0}),Ls="focusScope.autoFocusOnMount",Ds="focusScope.autoFocusOnUnmount",dh={bubbles:!1,cancelable:!0},Ma=g.forwardRef(gt(function(t,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,u]=g.useState(null),c=Ue(i),d=Ue(a),h=g.useRef(null),p=he(n,u),b=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(o){let E=function(C){if(b.paused||!l)return;const I=C.target;l.contains(I)?h.current=I:dn(h.current,{select:!0})},T=function(C){if(b.paused||!l)return;const I=C.relatedTarget;I!==null&&(l.contains(I)||dn(h.current,{select:!0}))},v=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&dn(l)};gt(E,"handleFocusIn"),gt(T,"handleFocusOut"),gt(v,"handleMutations"),document.addEventListener("focusin",E),document.addEventListener("focusout",T);const y=new MutationObserver(v);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",T),y.disconnect()}}},[o,l,b.paused]),g.useEffect(()=>{if(l){fh.add(b);const E=document.activeElement;if(!l.contains(E)){const v=new CustomEvent(Ls,dh);l.addEventListener(Ls,c),l.dispatchEvent(v),v.defaultPrevented||(bb(vb(Zu(l)),{select:!0}),document.activeElement===E&&dn(l))}return()=>{l.removeEventListener(Ls,c),setTimeout(()=>{const v=new CustomEvent(Ds,dh);l.addEventListener(Ds,d),l.dispatchEvent(v),v.defaultPrevented||dn(E??document.body,{select:!0}),l.removeEventListener(Ds,d),fh.remove(b)},0)}}},[l,c,d,b]);const x=g.useCallback(E=>{if(!r&&!o||b.paused)return;const T=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,v=document.activeElement;if(T&&v){const y=E.currentTarget,[C,I]=xb(y);C&&I?!E.shiftKey&&v===I?(E.preventDefault(),r&&dn(C,{select:!0})):E.shiftKey&&v===C&&(E.preventDefault(),r&&dn(I,{select:!0})):v===y&&E.preventDefault()}},[r,o,b.paused]);return f.jsx(ie.div,{tabIndex:-1,...s,ref:p,onKeyDown:x})},"FocusScope"));function bb(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(dn(r,{select:t}),document.activeElement!==n)return}gt(bb,"focusFirst");function xb(e){const t=Zu(e),n=Pl(t,e),r=Pl(t.reverse(),e);return[n,r]}gt(xb,"getTabbableEdges");function Zu(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:gt(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}gt(Zu,"getTabbableCandidates");function Pl(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Eb(r,{upTo:t})))return r}gt(Pl,"findVisible");function Eb(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}gt(Eb,"isHidden");function Tb(e){return e instanceof HTMLInputElement&&"select"in e}gt(Tb,"isSelectableInput");function dn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Tb(e)&&t&&e.select()}}gt(dn,"focus");var fh=yb();function yb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ol(e,t),e.unshift(t)},remove(t){var n;e=Ol(e,t),(n=e[0])==null||n.resume()}}}gt(yb,"createFocusScopesStack");function Ol(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}gt(Ol,"arrayRemove");function vb(e){return e.filter(t=>t.tagName!=="A")}gt(vb,"removeLinks");const rO=["top","right","bottom","left"],Bn=Math.min,pn=Math.max,sa=Math.round,Ri=Math.floor,mn=e=>({x:e,y:e}),oO={left:"right",right:"left",bottom:"top",top:"bottom"};function wb(e,t,n){return pn(e,Bn(t,n))}function En(e,t){return typeof e=="function"?e(t):e}function jn(e){return e.split("-")[0]}function so(e){return e.split("-")[1]}function Ju(e){return e==="x"?"y":"x"}function ec(e){return e==="y"?"height":"width"}function Xt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function tc(e){return Ju(Xt(e))}function iO(e,t,n){n===void 0&&(n=!1);const r=so(e),o=tc(e),i=ec(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=la(a)),[a,la(a)]}function aO(e){const t=la(e);return[Ll(e),t,Ll(t)]}function Ll(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const hh=["left","right"],ph=["right","left"],sO=["top","bottom"],lO=["bottom","top"];function uO(e,t,n){switch(e){case"top":case"bottom":return n?t?ph:hh:t?hh:ph;case"left":case"right":return t?sO:lO;default:return[]}}function cO(e,t,n,r){const o=so(e);let i=uO(jn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ll)))),i}function la(e){const t=jn(e);return oO[t]+e.slice(t.length)}function dO(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function Cb(e){return typeof e!="number"?dO(e):{top:e,right:e,bottom:e,left:e}}function ua(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function mh(e,t,n){let{reference:r,floating:o}=e;const i=Xt(t),a=tc(t),s=ec(a),l=jn(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}const b=so(t);return b&&(p[a]+=h*(b==="end"?1:-1)*(n&&u?-1:1)),p}async function fO(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=En(t,e),b=Cb(p),E=s[h?d==="floating"?"reference":"floating":d],T=ua(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(E)))==null||n?E:E.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(y))&&await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1},I=ua(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(T.top-I.top+b.top)/C.y,bottom:(I.bottom-T.bottom+b.bottom)/C.y,left:(T.left-I.left+b.left)/C.x,right:(I.right-T.right+b.right)/C.x}}const hO=50,pO=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:fO},l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=mh(u,r,l),h=r,p=0;const b={};for(let x=0;x<i.length;x++){const E=i[x];if(!E)continue;const{name:T,fn:v}=E,{x:y,y:C,data:I,reset:w}=await v({x:c,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:b,rects:u,platform:s,elements:{reference:e,floating:t}});c=y??c,d=C??d,b[T]={...b[T],...I},w&&p<hO&&(p++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(u=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:c,y:d}=mh(u,h,l)),x=-1)}return{x:c,y:d,placement:h,strategy:o,middlewareData:b}},mO=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=En(e,t)||{};if(u==null)return{};const d=Cb(c),h={x:n,y:r},p=tc(o),b=ec(p),x=await a.getDimensions(u),E=p==="y",T=E?"top":"left",v=E?"bottom":"right",y=E?"clientHeight":"clientWidth",C=i.reference[b]+i.reference[p]-h[p]-i.floating[b],I=h[p]-i.reference[p],w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let P=w?w[y]:0;(!P||!await(a.isElement==null?void 0:a.isElement(w)))&&(P=s.floating[y]||i.floating[b]);const L=C/2-I/2,F=P/2-x[b]/2-1,R=Bn(d[T],F),D=Bn(d[v],F),M=P-x[b]-D,W=P/2-x[b]/2+L,z=wb(R,W,M),$=!l.arrow&&so(o)!=null&&W!==z&&i.reference[b]/2-(W<R?R:D)-x[b]/2<0,H=$?W<R?W-R:W-M:0;return{[p]:h[p]+H,data:{[p]:z,centerOffset:W-z-H,...$&&{alignmentOffset:H}},reset:$}}}),gO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...E}=En(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const T=jn(o),v=Xt(s),y=jn(s)===s,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),I=h||(y||!x?[la(s)]:aO(s)),w=b!=="none";!h&&w&&I.push(...cO(s,x,b,C));const P=[s,...I],L=await l.detectOverflow(t,E),F=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&F.push(L[T]),d){const z=iO(o,a,C);F.push(L[z[0]],L[z[1]])}if(R=[...R,{placement:o,overflows:F}],!F.every(z=>z<=0)){var D,M;const z=(((D=i.flip)==null?void 0:D.index)||0)+1,$=P[z];if($&&(!(d==="alignment"?v!==Xt($):!1)||R.every(Q=>Xt(Q.placement)===v?Q.overflows[0]>0:!0)))return{data:{index:z,overflows:R},reset:{placement:$}};let H=(M=R.filter(V=>V.overflows[0]<=0).sort((V,Q)=>V.overflows[1]-Q.overflows[1])[0])==null?void 0:M.placement;if(!H)switch(p){case"bestFit":{var W;const V=(W=R.filter(Q=>{if(w){const re=Xt(Q.placement);return re===v||re==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(re=>re>0).reduce((re,k)=>re+k,0)]).sort((Q,re)=>Q[1]-re[1])[0])==null?void 0:W[0];V&&(H=V);break}case"initialPlacement":H=s;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function gh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bh(e){return rO.some(t=>e[t]>=0)}const bO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=En(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...i,elementContext:"reference"}),s=gh(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:bh(s)}}}case"escaped":{const a=await r.detectOverflow(t,{...i,altBoundary:!0}),s=gh(a,n.floating);return{data:{escapedOffsets:s,escaped:bh(s)}}}default:return{}}}}},kb=new Set(["left","top"]);async function xO(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=jn(n),s=so(n),l=Xt(n)==="y",u=kb.has(a)?-1:1,c=i&&l?-1:1,d=En(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof b=="number"&&(p=s==="end"?b*-1:b),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const EO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await xO(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},TO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:v=>{let{x:y,y:C}=v;return{x:y,y:C}}},...u}=En(e,t),c={x:n,y:r},d=await i.detectOverflow(t,u),h=Xt(o),p=Ju(h);let b=c[p],x=c[h];const E=(v,y)=>wb(y+d[v==="y"?"top":"left"],y,y-d[v==="y"?"bottom":"right"]);a&&(b=E(p,b)),s&&(x=E(h,x));const T=l.fn({...t,[p]:b,[h]:x});return{...T,data:{x:T.x-n,y:T.y-r,enabled:{[p]:a,[h]:s}}}}}},yO=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:o,y:i,placement:a,rects:s,middlewareData:l}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=En(e,t),h={x:o,y:i},p=Xt(a),b=Ju(p);let x=h[b],E=h[p];const T=En(u,t),v=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:(n=T.mainAxis)!=null?n:0,crossAxis:(r=T.crossAxis)!=null?r:0};if(c){const I=b==="y"?"height":"width",w=s.reference[b]-s.floating[I]+v.mainAxis,P=s.reference[b]+s.reference[I]-v.mainAxis;x<w?x=w:x>P&&(x=P)}if(d){var y,C;const I=b==="y"?"width":"height",w=kb.has(jn(a)),P=s.reference[p]-s.floating[I]+(w&&((y=l.offset)==null?void 0:y[p])||0)+(w?0:v.crossAxis),L=s.reference[p]+s.reference[I]+(w?0:((C=l.offset)==null?void 0:C[p])||0)-(w?v.crossAxis:0);E<P?E=P:E>L&&(E=L)}return{[b]:x,[p]:E}}}},vO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=En(e,t),l=await o.detectOverflow(t,s),u=jn(n),c=so(n),d=Xt(n)==="y",{width:h,height:p}=r.floating;let b,x;u==="top"||u==="bottom"?(b=u,x=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(x=u,b=c==="end"?"top":"bottom");const E=p-l.top-l.bottom,T=h-l.left-l.right,v=Bn(p-l[b],E),y=Bn(h-l[x],T),C=t.middlewareData.shift,I=!C;let w=v,P=y;C!=null&&C.enabled.x&&(P=T),C!=null&&C.enabled.y&&(w=E),I&&!c&&(d?P=h-2*pn(l.left,l.right):w=p-2*pn(l.top,l.bottom)),await a({...t,availableWidth:P,availableHeight:w});const L=await o.getDimensions(i.floating);return h!==L.width||p!==L.height?{reset:{rects:!0}}:{}}}};function Fa(){return typeof window<"u"}function lo(e){return Sb(e)?(e.nodeName||"").toLowerCase():"#document"}function Tt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vn(e){var t;return(t=(Sb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sb(e){return Fa()?e instanceof Node||e instanceof Tt(e).Node:!1}function Zt(e){return Fa()?e instanceof Element||e instanceof Tt(e).Element:!1}function Gn(e){return Fa()?e instanceof HTMLElement||e instanceof Tt(e).HTMLElement:!1}function xh(e){return!Fa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Tt(e).ShadowRoot}function Ba(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Jt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function wO(e){return/^(table|td|th)$/.test(lo(e))}function ja(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const CO=/transform|translate|scale|rotate|perspective|filter/,kO=/paint|layout|strict|content/,nr=e=>!!e&&e!=="none";let Ms;function nc(e){const t=Zt(e)?Jt(e):e;return nr(t.transform)||nr(t.translate)||nr(t.scale)||nr(t.rotate)||nr(t.perspective)||!rc()&&(nr(t.backdropFilter)||nr(t.filter))||CO.test(t.willChange||"")||kO.test(t.contain||"")}function SO(e){let t=mr(e);for(;Gn(t)&&!qo(t);){if(nc(t))return t;if(ja(t))return null;t=mr(t)}return null}function rc(){return Ms==null&&(Ms=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ms}function qo(e){return/^(html|body|#document)$/.test(lo(e))}function Jt(e){return Tt(e).getComputedStyle(e)}function Ha(e){return Zt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mr(e){if(lo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xh(e)&&e.host||vn(e);return xh(t)?t.host:t}function Ab(e){const t=mr(e);return qo(t)?(e.ownerDocument||e).body:Gn(t)&&Ba(t)?t:Ab(t)}function Go(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ab(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Tt(o);if(i){const s=Dl(a);return t.concat(a,a.visualViewport||[],Ba(o)?o:[],s&&n?Go(s):[])}else return t.concat(o,Go(o,[],n))}function Dl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _b(e){const t=Jt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Gn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=sa(n)!==i||sa(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function oc(e){return Zt(e)?e:e.contextElement}function zr(e){const t=oc(e);if(!Gn(t))return mn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=_b(t);let a=(i?sa(n.width):n.width)/r,s=(i?sa(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const AO=mn(0);function Ib(e){const t=Tt(e);return!rc()||!t.visualViewport?AO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _O(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Tt(e)}function gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=oc(e);let a=mn(1);t&&(r?Zt(r)&&(a=zr(r)):a=zr(e));const s=_O(i,n,r)?Ib(i):mn(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i&&r){const h=Tt(i),p=Zt(r)?Tt(r):r;let b=h,x=Dl(b);for(;x&&p!==b;){const E=zr(x),T=x.getBoundingClientRect(),v=Jt(x),y=T.left+(x.clientLeft+parseFloat(v.paddingLeft))*E.x,C=T.top+(x.clientTop+parseFloat(v.paddingTop))*E.y;l*=E.x,u*=E.y,c*=E.x,d*=E.y,l+=y,u+=C,b=Tt(x),x=Dl(b)}}return ua({width:c,height:d,x:l,y:u})}function Ua(e,t){const n=Ha(e).scrollLeft;return t?t.left+n:gr(vn(e)).left+n}function Nb(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ua(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function IO(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=vn(r),s=t?ja(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=mn(1);const c=mn(0),d=Gn(r);if((d||!i)&&((lo(r)!=="body"||Ba(a))&&(l=Ha(r)),d)){const p=gr(r);u=zr(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const h=a&&!d&&!i?Nb(a,l):mn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}}function NO(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function RO(e){const t=Ha(e),n=e.ownerDocument.body,r=pn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=pn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+Ua(e);const a=-t.scrollTop;return Jt(n).direction==="rtl"&&(i+=pn(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:i,y:a}}const PO=25;function OO(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",o=Tt(e),i=vn(e),a=o.visualViewport;let s=i.clientWidth,l=i.clientHeight,u=0,c=0;if(a){const h=!rc()||t==="fixed";r?h||(u=-a.offsetLeft,c=-a.offsetTop):(s=a.width,l=a.height,h&&(u=a.offsetLeft,c=a.offsetTop))}if(Ua(i)<=0){const h=i.ownerDocument,p=h.body,b=getComputedStyle(p),x=h.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(i.clientWidth-p.clientWidth-x),T=getComputedStyle(i).scrollbarGutter==="stable both-edges"?E/2:E;T<=PO&&(s-=T)}return{width:s,height:l,x:u,y:c}}function LO(e,t){const n=gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=zr(e),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:s,x:l,y:u}}function Eh(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=OO(e,n,t);else if(t==="document")r=RO(vn(e));else if(Zt(t))r=LO(t,n);else{const o=Ib(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ua(r)}function DO(e,t){const n=t.get(e);if(n)return n;let r=Go(e,[],!1).filter(s=>Zt(s)&&lo(s)!=="body"),o=null;const i=Jt(e).position==="fixed";let a=i?mr(e):e;for(;Zt(a)&&!qo(a);){const s=Jt(a),l=nc(a),u=o?o.position:i?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&s.position==="static")?r=r.filter(d=>d!==a):o=s,a=mr(a)}return t.set(e,r),r}function MO(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ja(t)?[]:DO(t,this._c):[].concat(n),r],s=Eh(t,a[0],o);let l=s.top,u=s.right,c=s.bottom,d=s.left;for(let h=1;h<a.length;h++){const p=Eh(t,a[h],o);l=pn(p.top,l),u=Bn(p.right,u),c=Bn(p.bottom,c),d=pn(p.left,d)}return{width:u-d,height:c-l,x:d,y:l}}function FO(e){const{width:t,height:n}=_b(e);return{width:t,height:n}}function BO(e,t,n){const r=Gn(t),o=vn(t),i=n==="fixed",a=gr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=mn(0);if((r||!i)&&((lo(t)!=="body"||Ba(o))&&(s=Ha(t)),r)){const h=gr(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}!r&&o&&(l.x=Ua(o));const u=o&&!r&&!i?Nb(o,s):mn(0),c=a.left+s.scrollLeft-l.x-u.x,d=a.top+s.scrollTop-l.y-u.y;return{x:c,y:d,width:a.width,height:a.height}}function Fs(e){return Jt(e).position==="static"}function Th(e,t){if(!Gn(e)||Jt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vn(e)===n&&(n=n.ownerDocument.body),n}function Rb(e,t){const n=Tt(e);if(ja(e))return n;if(!Gn(e)){let o=mr(e);for(;o&&!qo(o);){if(Zt(o)&&!Fs(o))return o;o=mr(o)}return n}let r=Th(e,t);for(;r&&wO(r)&&Fs(r);)r=Th(r,t);return r&&qo(r)&&Fs(r)&&!nc(r)?n:r||SO(e)||n}const jO=async function(e){const t=this.getOffsetParent||Rb,n=this.getDimensions,r=await n(e.floating);return{reference:BO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function HO(e){return Jt(e).direction==="rtl"}const UO={convertOffsetParentRelativeRectToViewportRelativeRect:IO,getDocumentElement:vn,getClippingRect:MO,getOffsetParent:Rb,getElementRects:jO,getClientRects:NO,getDimensions:FO,getScale:zr,isElement:Zt,isRTL:HO};function Pb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $O(e,t,n){let r=null,o;const i=vn(e);function a(){var c;clearTimeout(o),(c=r)==null||c.disconnect(),r=null}function s(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const h=e.getBoundingClientRect(),{left:p,top:b,width:x,height:E}=h;if(c||t(),!x||!E)return;const T=Ri(b),v=Ri(i.clientWidth-(p+x)),y=Ri(i.clientHeight-(b+E)),C=Ri(p),w={rootMargin:-T+"px "+-v+"px "+-y+"px "+-C+"px",threshold:pn(0,Bn(1,d))||1};let P=!0;function L(F){const R=F[0].intersectionRatio;if(!Pb(h,e.getBoundingClientRect()))return s();if(R!==d){if(!P)return s();R?s(!1,R):o=setTimeout(()=>{s(!1,1e-7)},1e3)}P=!1}try{r=new IntersectionObserver(L,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(L,w)}r.observe(e)}const l=Tt(e),u=()=>s(n);return l.addEventListener("resize",u),s(!0),()=>{l.removeEventListener("resize",u),a()}}function zO(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=oc(e),c=o||i?[...u?Go(u):[],...t?Go(t):[]]:[];c.forEach(T=>{o&&T.addEventListener("scroll",n),i&&T.addEventListener("resize",n)});const d=u&&s?$O(u,n,i):null;let h=-1,p=null;a&&(p=new ResizeObserver(T=>{let[v]=T;v&&v.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let b,x=l?gr(e):null;l&&E();function E(){const T=gr(e);x&&!Pb(x,T)&&n(),x=T,b=requestAnimationFrame(E)}return n(),()=>{var T;c.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d==null||d(),(T=p)==null||T.disconnect(),p=null,l&&cancelAnimationFrame(b)}}const VO=EO,WO=TO,YO=gO,qO=vO,GO=bO,yh=mO,KO=yO,XO=(e,t,n)=>{const r=new Map,o=n??{},i={...UO,...o.platform,_c:r};return pO(e,t,{...o,platform:i})};var QO=typeof document<"u",ZO=function(){},Vi=QO?A.useLayoutEffect:ZO;function ca(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ca(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ca(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ob(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vh(e,t){const n=Ob(e);return Math.round(t*n)/n}function Bs(e){const t=g.useRef(e);return Vi(()=>{t.current=e}),t}function JO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=g.useState(r);ca(h,r)||p(r);const[b,x]=g.useState(null),[E,T]=g.useState(null),v=g.useCallback(Q=>{Q!==w.current&&(w.current=Q,x(Q))},[]),y=g.useCallback(Q=>{Q!==P.current&&(P.current=Q,T(Q))},[]),C=i||b,I=a||E,w=g.useRef(null),P=g.useRef(null),L=g.useRef(c),F=l!=null,R=Bs(l),D=Bs(o),M=Bs(u),W=g.useCallback(()=>{if(!w.current||!P.current)return;const Q={placement:t,strategy:n,middleware:h};D.current&&(Q.platform=D.current),XO(w.current,P.current,Q).then(re=>{const k={...re,isPositioned:M.current!==!1};z.current&&!ca(L.current,k)&&(L.current=k,Kr.flushSync(()=>{d(k)}))})},[h,t,n,D,M]);Vi(()=>{u===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,d(Q=>({...Q,isPositioned:!1})))},[u]);const z=g.useRef(!1);Vi(()=>(z.current=!0,()=>{z.current=!1}),[]),Vi(()=>{if(C&&(w.current=C),I&&(P.current=I),C&&I){if(R.current)return R.current(C,I,W);W()}},[C,I,W,R,F]);const $=g.useMemo(()=>({reference:w,floating:P,setReference:v,setFloating:y}),[v,y]),H=g.useMemo(()=>({reference:C,floating:I}),[C,I]),V=g.useMemo(()=>{const Q={position:n,left:0,top:0};if(!H.floating)return Q;const re=vh(H.floating,c.x),k=vh(H.floating,c.y);return s?{...Q,transform:"translate("+re+"px, "+k+"px)",...Ob(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:k}},[n,s,H.floating,c.x,c.y]);return g.useMemo(()=>({...c,update:W,refs:$,elements:H,floatingStyles:V}),[c,W,$,H,V])}const eL=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?yh({element:r.current,padding:o}).fn(n):{}:r?yh({element:r,padding:o}).fn(n):{}}}},tL=(e,t)=>{const n=VO(e);return{name:n.name,fn:n.fn,options:[e,t]}},nL=(e,t)=>{const n=WO(e);return{name:n.name,fn:n.fn,options:[e,t]}},rL=(e,t)=>({fn:KO(e).fn,options:[e,t]}),oL=(e,t)=>{const n=YO(e);return{name:n.name,fn:n.fn,options:[e,t]}},iL=(e,t)=>{const n=qO(e);return{name:n.name,fn:n.fn,options:[e,t]}},aL=(e,t)=>{const n=GO(e);return{name:n.name,fn:n.fn,options:[e,t]}},sL=(e,t)=>{const n=eL(e);return{name:n.name,fn:n.fn,options:[e,t]}};var lL=Object.defineProperty,uL=(e,t)=>lL(e,"name",{value:t,configurable:!0});function di(e){const[t,n]=g.useState(void 0);return $e(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}uL(di,"useSize");var cL=Object.defineProperty,Ln=(e,t)=>cL(e,"name",{value:t,configurable:!0}),Lb="Popper",[Db,Kn]=Ve(Lb),[dL,Mb]=Db(Lb),fL=Ln(e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null),[i,a]=g.useState(void 0);return f.jsx(dL,{scope:t,anchor:r,onAnchorChange:o,placementState:i,setPlacementState:a,children:n})},"Popper"),hL="PopperAnchor",pL=g.forwardRef(Ln(function(t,n){const{__scopePopper:r,virtualRef:o,...i}=t,a=Mb(hL,r),s=g.useRef(null),l=a.onAnchorChange,u=g.useCallback(x=>{s.current=x,x&&l(x)},[l]),c=he(n,u),d=g.useRef(null);g.useEffect(()=>{if(!o)return;const x=d.current;d.current=o.current,x!==d.current&&l(d.current)});const h=a.placementState&&$a(a.placementState),p=h==null?void 0:h[0],b=h==null?void 0:h[1];return o?null:f.jsx(ie.div,{"data-radix-popper-side":p,"data-radix-popper-align":b,...i,ref:c})},"PopperAnchor")),Fb="PopperContent",[mL,hB]=Db(Fb),gL=g.forwardRef(Ln(function(t,n){var oe,pe,be,Ee,we,We,it;const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:b="optimized",onPlaced:x,...E}=t,T=Mb(Fb,r),[v,y]=g.useState(null),C=he(n,y),[I,w]=g.useState(null),P=di(I),L=(P==null?void 0:P.width)??0,F=(P==null?void 0:P.height)??0,R=o+(a!=="center"?"-"+a:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},M=Array.isArray(c)?c:[c],W=M.length>0,z={padding:D,boundary:M.filter(Bb),altBoundary:W},{refs:$,floatingStyles:H,placement:V,isPositioned:Q,middlewareData:re}=JO({strategy:"fixed",placement:R,whileElementsMounted:Ln((...at)=>zO(...at,{animationFrame:b==="always"}),"whileElementsMounted"),elements:{reference:T.anchor},middleware:[tL({mainAxis:i+F,alignmentAxis:s}),u&&nL({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?rL():void 0,...z}),u&&oL({...z}),iL({...z,apply:Ln(({elements:at,rects:vt,availableWidth:an,availableHeight:Nr})=>{const{width:de,height:Ae}=vt.reference,Ye=at.floating.style;Ye.setProperty("--radix-popper-available-width",`${an}px`),Ye.setProperty("--radix-popper-available-height",`${Nr}px`),Ye.setProperty("--radix-popper-anchor-width",`${de}px`),Ye.setProperty("--radix-popper-anchor-height",`${Ae}px`)},"apply")}),I&&sL({element:I,padding:l}),bL({arrowWidth:L,arrowHeight:F}),p&&aL({strategy:"referenceHidden",...z,boundary:W?z.boundary:void 0})]}),k=T.setPlacementState;$e(()=>(k(V),()=>{k(void 0)}),[V,k]);const[ue,j]=$a(V),_=Ue(x);$e(()=>{Q&&(_==null||_())},[Q,_]);const ae=(oe=re.arrow)==null?void 0:oe.x,K=(pe=re.arrow)==null?void 0:pe.y,ee=((be=re.arrow)==null?void 0:be.centerOffset)!==0,[ce,te]=g.useState();return $e(()=>{v&&te(window.getComputedStyle(v).zIndex)},[v]),f.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:Q?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(Ee=re.transformOrigin)==null?void 0:Ee.x,(we=re.transformOrigin)==null?void 0:we.y].join(" "),...((We=re.hide)==null?void 0:We.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:f.jsx(mL,{scope:r,placedSide:ue,placedAlign:j,onArrowChange:w,arrowX:ae,arrowY:K,shouldHideArrow:ee,children:f.jsx(ie.div,{"data-side":ue,"data-align":j,...E,ref:C,style:{...E.style,animation:Q?(it=E.style)==null?void 0:it.animation:"none"}})})})},"PopperContent"));function Bb(e){return e!==null}Ln(Bb,"isNotNull");var bL=Ln(e=>({name:"transformOrigin",options:e,fn(t){var E,T,v;const{placement:n,rects:r,middlewareData:o}=t,a=((E=o.arrow)==null?void 0:E.centerOffset)!==0,s=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,c]=$a(n),d={start:"0%",center:"50%",end:"100%"}[c],h=(((T=o.arrow)==null?void 0:T.x)??0)+s/2,p=(((v=o.arrow)==null?void 0:v.y)??0)+l/2;let b="",x="";return u==="bottom"?(b=a?d:`${h}px`,x=`${-l}px`):u==="top"?(b=a?d:`${h}px`,x=`${r.floating.height+l}px`):u==="right"?(b=`${-l}px`,x=a?d:`${p}px`):u==="left"&&(b=`${r.floating.width+l}px`,x=a?d:`${p}px`),{data:{x:b,y:x}}}}),"transformOrigin");function $a(e){const[t,n="center"]=e.split("-");return[t,n]}Ln($a,"getSideAndAlignFromPlacement");var za=fL,Va=pL,Wa=gL,xL=Object.defineProperty,EL=(e,t)=>xL(e,"name",{value:t,configurable:!0}),uo=g.forwardRef(EL(function(t,n){var l;const{container:r,...o}=t,[i,a]=g.useState(!1);$e(()=>a(!0),[]);const s=r||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?Kr.createPortal(f.jsx(ie.div,{...o,ref:n}),s):null},"Portal")),TL=Object.defineProperty,yL=(e,t)=>TL(e,"name",{value:t,configurable:!0});function jb(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}yL(jb,"usePrevious");var vL=Object.defineProperty,wL=(e,t)=>vL(e,"name",{value:t,configurable:!0}),Hb=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ic=g.forwardRef(wL(function(t,n){return f.jsx(ie.span,{...t,ref:n,style:{...Hb,...t.style}})},"VisuallyHidden")),CL=ic,kL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Or=new WeakMap,Pi=new WeakMap,Oi={},js=0,Ub=function(e){return e&&(e.host||Ub(e.parentNode))},SL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ub(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},AL=function(e,t,n,r){var o=SL(t,Array.isArray(e)?e:[e]);Oi[n]||(Oi[n]=new WeakMap);var i=Oi[n],a=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(r),b=p!==null&&p!=="false",x=(Or.get(h)||0)+1,E=(i.get(h)||0)+1;Or.set(h,x),i.set(h,E),a.push(h),x===1&&b&&Pi.set(h,!0),E===1&&h.setAttribute(n,"true"),b||h.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",h,T)}})};return c(t),s.clear(),js++,function(){a.forEach(function(d){var h=Or.get(d)-1,p=i.get(d)-1;Or.set(d,h),i.set(d,p),h||(Pi.has(d)||d.removeAttribute(r),Pi.delete(d)),p||d.removeAttribute(n)}),js--,js||(Or=new WeakMap,Or=new WeakMap,Pi=new WeakMap,Oi={})}},Ya=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=kL(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),AL(r,o,n,"aria-hidden")):function(){return null}},Kt=function(){return Kt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Kt.apply(this,arguments)};function $b(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function _L(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Wi="right-scroll-bar-position",Yi="width-before-scroll-bar",IL="with-scroll-bars-hidden",NL="--removed-body-scroll-bar-size";function Hs(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function RL(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var PL=typeof window<"u"?g.useLayoutEffect:g.useEffect,wh=new WeakMap;function OL(e,t){var n=RL(null,function(r){return e.forEach(function(o){return Hs(o,r)})});return PL(function(){var r=wh.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||Hs(s,null)}),i.forEach(function(s){o.has(s)||Hs(s,a)})}wh.set(n,e)},[e]),n}function LL(e){return e}function DL(e,t){t===void 0&&(t=LL);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var c=a;a=[],c.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),n}}}};return o}function ML(e){e===void 0&&(e={});var t=DL(null);return t.options=Kt({async:!0,ssr:!1},e),t}var zb=function(e){var t=e.sideCar,n=$b(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,Kt({},n))};zb.isSideCarExport=!0;function FL(e,t){return e.useMedium(t),zb}var Vb=ML(),Us=function(){},qa=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:Us,onWheelCapture:Us,onTouchMoveCapture:Us}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,h=e.sideCar,p=e.noRelative,b=e.noIsolation,x=e.inert,E=e.allowPinchZoom,T=e.as,v=T===void 0?"div":T,y=e.gapMode,C=$b(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=h,w=OL([n,t]),P=Kt(Kt({},C),o);return g.createElement(g.Fragment,null,c&&g.createElement(I,{sideCar:Vb,removeScrollBar:u,shards:d,noRelative:p,noIsolation:b,inert:x,setCallbacks:i,allowPinchZoom:!!E,lockRef:n,gapMode:y}),a?g.cloneElement(g.Children.only(s),Kt(Kt({},P),{ref:w})):g.createElement(v,Kt({},P,{className:l,ref:w}),s))});qa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qa.classNames={fullWidth:Yi,zeroRight:Wi};var BL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jL(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=BL();return t&&e.setAttribute("nonce",t),e}function HL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function UL(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $L=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jL())&&(HL(t,n),UL(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zL=function(){var e=$L();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Wb=function(){var e=zL(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},VL={left:0,top:0,right:0,gap:0},$s=function(e){return parseInt(e||"",10)||0},WL=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[$s(n),$s(r),$s(o)]},YL=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return VL;var t=WL(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},qL=Wb(),Vr="data-scroll-locked",GL=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
143
|
+
.`.concat(IL,` {
|
|
144
|
+
overflow: hidden `).concat(r,`;
|
|
145
|
+
padding-right: `).concat(s,"px ").concat(r,`;
|
|
146
|
+
}
|
|
147
|
+
body[`).concat(Vr,`] {
|
|
148
|
+
overflow: hidden `).concat(r,`;
|
|
149
|
+
overscroll-behavior: contain;
|
|
150
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
151
|
+
padding-left: `.concat(o,`px;
|
|
152
|
+
padding-top: `).concat(i,`px;
|
|
153
|
+
padding-right: `).concat(a,`px;
|
|
154
|
+
margin-left:0;
|
|
155
|
+
margin-top:0;
|
|
156
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
157
|
+
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.`).concat(Wi,` {
|
|
161
|
+
right: `).concat(s,"px ").concat(r,`;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.`).concat(Yi,` {
|
|
165
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.`).concat(Wi," .").concat(Wi,` {
|
|
169
|
+
right: 0 `).concat(r,`;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.`).concat(Yi," .").concat(Yi,` {
|
|
173
|
+
margin-right: 0 `).concat(r,`;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
body[`).concat(Vr,`] {
|
|
177
|
+
`).concat(NL,": ").concat(s,`px;
|
|
178
|
+
}
|
|
179
|
+
`)},Ch=function(){var e=parseInt(document.body.getAttribute(Vr)||"0",10);return isFinite(e)?e:0},KL=function(){g.useEffect(function(){return document.body.setAttribute(Vr,(Ch()+1).toString()),function(){var e=Ch()-1;e<=0?document.body.removeAttribute(Vr):document.body.setAttribute(Vr,e.toString())}},[])},XL=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;KL();var i=g.useMemo(function(){return YL(o)},[o]);return g.createElement(qL,{styles:GL(i,!t,o,n?"":"!important")})},Ml=!1;if(typeof window<"u")try{var Li=Object.defineProperty({},"passive",{get:function(){return Ml=!0,!0}});window.addEventListener("test",Li,Li),window.removeEventListener("test",Li,Li)}catch{Ml=!1}var Lr=Ml?{passive:!1}:!1,QL=function(e){return e.tagName==="TEXTAREA"},Yb=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!QL(e)&&n[t]==="visible")},ZL=function(e){return Yb(e,"overflowY")},JL=function(e){return Yb(e,"overflowX")},kh=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=qb(e,r);if(o){var i=Gb(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},eD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tD=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qb=function(e,t){return e==="v"?ZL(t):JL(t)},Gb=function(e,t){return e==="v"?eD(t):tD(t)},nD=function(e,t){return e==="h"&&t==="rtl"?-1:1},rD=function(e,t,n,r,o){var i=nD(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,h=0;do{if(!s)break;var p=Gb(e,s),b=p[0],x=p[1],E=p[2],T=x-E-i*b;(b||T)&&qb(e,s)&&(d+=T,h+=b);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&Math.abs(d)<1||!c&&Math.abs(h)<1)&&(u=!0),u},Di=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Sh=function(e){return[e.deltaX,e.deltaY]},Ah=function(e){return e&&"current"in e?e.current:e},oD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},iD=function(e){return`
|
|
180
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
181
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
182
|
+
`)},aD=0,Dr=[];function sD(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(aD++)[0],i=g.useState(Wb)[0],a=g.useRef(e);g.useEffect(function(){a.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=_L([e.lockRef.current],(e.shards||[]).map(Ah),!0).filter(Boolean);return x.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=g.useCallback(function(x,E){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!a.current.allowPinchZoom;var T=Di(x),v=n.current,y="deltaX"in x?x.deltaX:v[0]-T[0],C="deltaY"in x?x.deltaY:v[1]-T[1],I,w=x.target,P=Math.abs(y)>Math.abs(C)?"h":"v";if("touches"in x&&P==="h"&&w.type==="range")return!1;var L=window.getSelection(),F=L&&L.anchorNode,R=F?F===w||F.contains(w):!1;if(R)return!1;var D=kh(P,w);if(!D)return!0;if(D?I=P:(I=P==="v"?"h":"v",D=kh(P,w)),!D)return!1;if(!r.current&&"changedTouches"in x&&(y||C)&&(r.current=I),!I)return!0;var M=r.current||I;return rD(M,E,x,M==="h"?y:C)},[]),l=g.useCallback(function(x){var E=x;if(!(!Dr.length||Dr[Dr.length-1]!==i)){var T="deltaY"in E?Sh(E):Di(E),v=t.current.filter(function(I){return I.name===E.type&&(I.target===E.target||E.target===I.shadowParent)&&oD(I.delta,T)})[0];if(v&&v.should){E.cancelable&&E.preventDefault();return}if(!v){var y=(a.current.shards||[]).map(Ah).filter(Boolean).filter(function(I){return I.contains(E.target)}),C=y.length>0?s(E,y[0]):!a.current.noIsolation;C&&E.cancelable&&E.preventDefault()}}},[]),u=g.useCallback(function(x,E,T,v){var y={name:x,delta:E,target:T,should:v,shadowParent:lD(T)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(C){return C!==y})},1)},[]),c=g.useCallback(function(x){n.current=Di(x),r.current=void 0},[]),d=g.useCallback(function(x){u(x.type,Sh(x),x.target,s(x,e.lockRef.current))},[]),h=g.useCallback(function(x){u(x.type,Di(x),x.target,s(x,e.lockRef.current))},[]);g.useEffect(function(){return Dr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Lr),document.addEventListener("touchmove",l,Lr),document.addEventListener("touchstart",c,Lr),function(){Dr=Dr.filter(function(x){return x!==i}),document.removeEventListener("wheel",l,Lr),document.removeEventListener("touchmove",l,Lr),document.removeEventListener("touchstart",c,Lr)}},[]);var p=e.removeScrollBar,b=e.inert;return g.createElement(g.Fragment,null,b?g.createElement(i,{styles:iD(o)}):null,p?g.createElement(XL,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function lD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const uD=FL(Vb,sD);var fi=g.forwardRef(function(e,t){return g.createElement(qa,Kt({},e,{ref:t,sideCar:uD}))});fi.classNames=qa.classNames;var cD=Object.defineProperty,Pe=(e,t)=>cD(e,"name",{value:t,configurable:!0}),dD=[" ","Enter","ArrowUp","ArrowDown"],fD=[" ","Enter"],Gr="Select",[Ga,ac,hD]=oo(Gr),[kr,pB]=Ve(Gr,[hD,Kn]),sc=Kn(),[pD,Xn]=kr(Gr),[mD,gD]=kr(Gr);function Kb(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:h,required:p,form:b,internal_do_not_use_render:x}=e,E=sc(t),[T,v]=g.useState(null),[y,C]=g.useState(null),[I,w]=g.useState(!1),P=qn(u),[L,F]=ct({prop:r,defaultProp:o??!1,onChange:i,caller:Gr}),[R,D]=ct({prop:a,defaultProp:s,onChange:l,caller:Gr}),M=g.useRef(null),W=g.useRef(R);g.useEffect(()=>{const j=b?T==null?void 0:T.ownerDocument.getElementById(b):T==null?void 0:T.form;if(j instanceof HTMLFormElement){const _=Pe(()=>D(W.current),"reset");return j.addEventListener("reset",_),()=>j.removeEventListener("reset",_)}},[b,T,D]);const z=T?!!b||!!T.closest("form"):!0,[$,H]=g.useState(new Set),V=Ke(),Q=Array.from($).map(j=>j.props.value).join(";"),re=g.useCallback(j=>{H(_=>new Set(_).add(j))},[]),k=g.useCallback(j=>{H(_=>{const ae=new Set(_);return ae.delete(j),ae})},[]),ue={required:p,trigger:T,onTriggerChange:v,valueNode:y,onValueNodeChange:C,valueNodeHasChildren:I,onValueNodeHasChildrenChange:w,contentId:V,value:R,onValueChange:D,open:L,onOpenChange:F,dir:P,triggerPointerDownPosRef:M,disabled:h,name:c,autoComplete:d,form:b,nativeOptions:$,nativeSelectKey:Q,isFormControl:z};return f.jsx(za,{...E,children:f.jsx(pD,{scope:t,...ue,children:f.jsx(Ga.Provider,{scope:t,children:f.jsx(mD,{scope:t,onNativeOptionAdd:re,onNativeOptionRemove:k,children:Zb(x)?x(ue):n})})})})}Pe(Kb,"SelectProvider");var bD=Pe(e=>{const{__scopeSelect:t,children:n,...r}=e;return f.jsx(Kb,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:o})=>f.jsxs(f.Fragment,{children:[n,o?f.jsx($D,{__scopeSelect:t}):null]})})},"Select"),xD="SelectTrigger",ED=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r,disabled:o=!1,...i}=t,a=sc(r),s=Xn(xD,r),l=s.disabled||o,u=he(n,s.onTriggerChange),c=ac(r),d=g.useRef("touch"),[h,p,b]=lc(E=>{const T=c().filter(C=>!C.disabled),v=T.find(C=>C.value===s.value),y=uc(T,E,v);y!==void 0&&s.onValueChange(y.value)}),x=Pe(E=>{l||(s.onOpenChange(!0),b()),E&&(s.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})},"handleOpen");return f.jsx(Va,{asChild:!0,...a,children:f.jsx(ie.button,{type:"button",role:"combobox","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":hi(s.value)?"":void 0,...i,ref:u,onClick:J(i.onClick,E=>{E.currentTarget.focus(),d.current!=="mouse"&&x(E)}),onPointerDown:J(i.onPointerDown,E=>{d.current=E.pointerType;const T=E.target;T.hasPointerCapture(E.pointerId)&&T.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(x(E),E.preventDefault())}),onKeyDown:J(i.onKeyDown,E=>{const T=h.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&p(E.key),!(T&&E.key===" ")&&dD.includes(E.key)&&(x(),E.preventDefault())})})})},"SelectTrigger")),TD="SelectValue",yD=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r,className:o,style:i,children:a,placeholder:s="",...l}=t,u=Xn(TD,r),{onValueNodeHasChildrenChange:c}=u,d=a!==void 0,h=he(n,u.onValueNodeChange);$e(()=>{c(d)},[c,d]);const p=hi(u.value);return f.jsx(ie.span,{...l,asChild:p?!1:l.asChild,ref:h,style:{pointerEvents:"none"},children:f.jsx(g.Fragment,{children:p?s:a},p?"placeholder":"value")})},"SelectValue")),vD=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r,children:o,...i}=t;return f.jsx(ie.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})},"SelectIcon")),wD="SelectPortal",[CD,kD]=kr(wD,{forceMount:void 0}),SD=Pe(e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return f.jsx(CD,{scope:e.__scopeSelect,forceMount:n,children:f.jsx(uo,{asChild:!0,...r})})},"SelectPortal"),br="SelectContent",AD=g.forwardRef(Pe(function(t,n){const r=kD(br,t.__scopeSelect),{forceMount:o=r.forceMount,...i}=t,a=Xn(br,t.__scopeSelect),[s,l]=g.useState();return $e(()=>{l(new DocumentFragment)},[]),f.jsx(Ze,{present:o||a.open,children:({present:u})=>u?f.jsx(ND,{...i,ref:n}):f.jsx(_D,{...i,fragment:s})})},"SelectContent")),_D=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r,children:o,fragment:i}=t;return i?Kr.createPortal(f.jsx(Xb,{scope:r,children:f.jsx(Ga.Slot,{scope:r,children:f.jsx("div",{ref:n,children:o})})}),i):null},"SelectContentFragment")),Mt=10,[Xb,Ka]=kr(br),ID=Qt("SelectContent.RemoveScroll"),ND=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r}=t,{position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:l,sideOffset:u,align:c,alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:b,sticky:x,hideWhenDetached:E,avoidCollisions:T,...v}=t,y=Xn(br,r),[C,I]=g.useState(null),[w,P]=g.useState(null),L=he(n,I),[F,R]=g.useState(null),[D,M]=g.useState(null),W=ac(r),[z,$]=g.useState(!1),H=g.useRef(!1);g.useEffect(()=>{if(C)return Ya(C)},[C]),ao();const V=g.useCallback(te=>{const[oe,...pe]=W().map(we=>we.ref.current),[be]=pe.slice(-1),Ee=document.activeElement;for(const we of te)if(we===Ee||(we==null||we.scrollIntoView({block:"nearest"}),we===oe&&w&&(w.scrollTop=0),we===be&&w&&(w.scrollTop=w.scrollHeight),we==null||we.focus(),document.activeElement!==Ee))return},[W,w]),Q=g.useCallback(()=>V([F,C]),[V,F,C]);g.useEffect(()=>{z&&Q()},[z,Q]);const{onOpenChange:re,triggerPointerDownPosRef:k}=y;g.useEffect(()=>{if(C){let te={x:0,y:0};const oe=Pe(be=>{var Ee,we;te={x:Math.abs(Math.round(be.pageX)-(((Ee=k.current)==null?void 0:Ee.x)??0)),y:Math.abs(Math.round(be.pageY)-(((we=k.current)==null?void 0:we.y)??0))}},"handlePointerMove"),pe=Pe(be=>{te.x<=10&&te.y<=10?be.preventDefault():be.composedPath().includes(C)||re(!1),document.removeEventListener("pointermove",oe),k.current=null},"handlePointerUp");return k.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",pe,{capture:!0})}}},[C,re,k]),g.useEffect(()=>{const te=Pe(()=>re(!1),"close");return window.addEventListener("blur",te),window.addEventListener("resize",te),()=>{window.removeEventListener("blur",te),window.removeEventListener("resize",te)}},[re]);const[ue,j]=lc(te=>{const oe=W().filter(Ee=>!Ee.disabled),pe=oe.find(Ee=>Ee.ref.current===document.activeElement),be=uc(oe,te,pe);be&&setTimeout(()=>{var Ee;return(Ee=be.ref.current)==null?void 0:Ee.focus()})}),_=g.useCallback((te,oe,pe)=>{const be=!H.current&&!pe;(y.value!==void 0&&y.value===oe||be)&&(R(te),be&&(H.current=!0))},[y.value]),ae=g.useCallback(()=>C==null?void 0:C.focus(),[C]),K=g.useCallback((te,oe,pe)=>{const be=!H.current&&!pe;(y.value!==void 0&&y.value===oe||be)&&M(te)},[y.value]),ee=o==="popper"?_h:RD,ce=ee===_h?{side:l,sideOffset:u,align:c,alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:b,sticky:x,hideWhenDetached:E,avoidCollisions:T}:{};return f.jsx(Xb,{scope:r,content:C,viewport:w,onViewportChange:P,itemRefCallback:_,selectedItem:F,onItemLeave:ae,itemTextRefCallback:K,focusSelectedItem:Q,selectedItemText:D,position:o,isPositioned:z,searchRef:ue,children:f.jsx(fi,{as:ID,allowPinchZoom:!0,children:f.jsx(Ma,{asChild:!0,trapped:y.open,onMountAutoFocus:te=>{te.preventDefault()},onUnmountAutoFocus:J(i,te=>{var oe;(oe=y.trigger)==null||oe.focus({preventScroll:!0}),te.preventDefault()}),children:f.jsx(io,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:te=>te.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:f.jsx(ee,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:te=>te.preventDefault(),...v,...ce,onPlaced:()=>$(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:J(v.onKeyDown,te=>{const oe=te.ctrlKey||te.altKey||te.metaKey;if(te.key==="Tab"&&te.preventDefault(),!oe&&te.key.length===1&&j(te.key),["ArrowUp","ArrowDown","Home","End"].includes(te.key)){let be=W().filter(Ee=>!Ee.disabled).map(Ee=>Ee.ref.current);if(["ArrowUp","End"].includes(te.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(te.key)){const Ee=te.target,we=be.indexOf(Ee);be=be.slice(we+1)}setTimeout(()=>V(be)),te.preventDefault()}})})})})})})},"SelectContentImpl")),RD=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r,onPlaced:o,...i}=t,a=Xn(br,r),s=Ka(br,r),[l,u]=g.useState(null),[c,d]=g.useState(null),h=he(n,d),p=ac(r),b=g.useRef(!1),x=g.useRef(!0),{viewport:E,selectedItem:T,selectedItemText:v,focusSelectedItem:y}=s,C=g.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&c&&E&&T&&v){const L=a.trigger.getBoundingClientRect(),F=c.getBoundingClientRect(),R=a.valueNode.getBoundingClientRect(),D=v.getBoundingClientRect();if(a.dir!=="rtl"){const Ee=D.left-F.left,we=R.left-Ee,We=L.left-we,it=L.width+We,at=Math.max(it,F.width),vt=window.innerWidth-Mt,an=aa(we,[Mt,Math.max(Mt,vt-at)]);l.style.minWidth=it+"px",l.style.left=an+"px"}else{const Ee=F.right-D.right,we=window.innerWidth-R.right-Ee,We=window.innerWidth-L.right-we,it=L.width+We,at=Math.max(it,F.width),vt=window.innerWidth-Mt,an=aa(we,[Mt,Math.max(Mt,vt-at)]);l.style.minWidth=it+"px",l.style.right=an+"px"}const M=p(),W=window.innerHeight-Mt*2,z=E.scrollHeight,$=window.getComputedStyle(c),H=parseInt($.borderTopWidth,10),V=parseInt($.paddingTop,10),Q=parseInt($.borderBottomWidth,10),re=parseInt($.paddingBottom,10),k=H+V+z+re+Q,ue=Math.min(T.offsetHeight*5,k),j=window.getComputedStyle(E),_=parseInt(j.paddingTop,10),ae=parseInt(j.paddingBottom,10),K=L.top+L.height/2-Mt,ee=W-K,ce=T.offsetHeight/2,te=T.offsetTop+ce,oe=H+V+te,pe=k-oe;if(oe<=K){const Ee=M.length>0&&T===M[M.length-1].ref.current;l.style.bottom="0px";const we=c.clientHeight-E.offsetTop-E.offsetHeight,We=Math.max(ee,ce+(Ee?ae:0)+we+Q),it=oe+We;l.style.height=it+"px"}else{const Ee=M.length>0&&T===M[0].ref.current;l.style.top="0px";const We=Math.max(K,H+E.offsetTop+(Ee?_:0)+ce)+pe;l.style.height=We+"px",E.scrollTop=oe-K+E.offsetTop}l.style.margin=`${Mt}px 0`,l.style.minHeight=ue+"px",l.style.maxHeight=W+"px",o==null||o(),requestAnimationFrame(()=>b.current=!0)}},[p,a.trigger,a.valueNode,l,c,E,T,v,a.dir,o]);$e(()=>C(),[C]);const[I,w]=g.useState();$e(()=>{c&&w(window.getComputedStyle(c).zIndex)},[c]);const P=g.useCallback(L=>{L&&x.current===!0&&(C(),y==null||y(),x.current=!1)},[C,y]);return f.jsx(PD,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:b,onScrollButtonChange:P,children:f.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I},children:f.jsx(ie.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),_h=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r,align:o="start",collisionPadding:i=Mt,...a}=t,s=sc(r);return f.jsx(Wa,{...s,...a,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[PD,OD]=kr(br,{}),Ih="SelectViewport",LD=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r,nonce:o,...i}=t,a=Ka(Ih,r),s=OD(Ih,r),l=he(n,a.onViewportChange),u=g.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),f.jsx(Ga.Slot,{scope:r,children:f.jsx(ie.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:J(i.onScroll,c=>{const d=c.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&h){const b=Math.abs(u.current-d.scrollTop);if(b>0){const x=window.innerHeight-Mt*2,E=parseFloat(h.style.minHeight),T=parseFloat(h.style.height),v=Math.max(E,T);if(v<x){const y=v+b,C=Math.min(x,y),I=y-C;h.style.height=C+"px",h.style.bottom==="0px"&&(d.scrollTop=I>0?I:0,h.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})},"SelectViewport")),DD="SelectGroup",[mB,gB]=kr(DD),Fl="SelectItem",[MD,Qb]=kr(Fl),FD=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r,value:o,disabled:i=!1,textValue:a,...s}=t,l=Xn(Fl,r),u=Ka(Fl,r),c=l.value===o,[d,h]=g.useState(a??""),[p,b]=g.useState(!1),x=Ue(C=>{var I;return(I=u.itemRefCallback)==null?void 0:I.call(u,C,o,i)}),E=he(n,x),T=Ke(),v=g.useRef("touch"),y=Pe(()=>{i||(l.onValueChange(o),l.onOpenChange(!1))},"handleSelect");return f.jsx(MD,{scope:r,value:o,disabled:i,textId:T,isSelected:c,onItemTextChange:g.useCallback(C=>{h(I=>I||((C==null?void 0:C.textContent)??"").trim())},[]),children:f.jsx(Ga.ItemSlot,{scope:r,value:o,disabled:i,textValue:d,children:f.jsx(ie.div,{role:"option","aria-labelledby":T,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:E,onFocus:J(s.onFocus,()=>b(!0)),onBlur:J(s.onBlur,()=>b(!1)),onClick:J(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:J(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:J(s.onPointerDown,C=>{v.current=C.pointerType}),onPointerMove:J(s.onPointerMove,C=>{var I;v.current=C.pointerType,i?(I=u.onItemLeave)==null||I.call(u):v.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:J(s.onPointerLeave,C=>{var I;C.currentTarget===document.activeElement&&((I=u.onItemLeave)==null||I.call(u))}),onKeyDown:J(s.onKeyDown,C=>{var w;i||C.target!==C.currentTarget||((w=u.searchRef)==null?void 0:w.current)!==""&&C.key===" "||(fD.includes(C.key)&&y(),C.key===" "&&C.preventDefault())})})})})},"SelectItem")),Mi="SelectItemText",BD=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r,className:o,style:i,...a}=t,s=Xn(Mi,r),l=Ka(Mi,r),u=Qb(Mi,r),c=gD(Mi,r),[d,h]=g.useState(null),p=Ue(y=>{var C;return(C=l.itemTextRefCallback)==null?void 0:C.call(l,y,u.value,u.disabled)}),b=he(n,h,u.onItemTextChange,p),x=d==null?void 0:d.textContent,E=g.useMemo(()=>f.jsx("option",{value:u.value,disabled:u.disabled,children:x},u.value),[u.disabled,u.value,x]),{onNativeOptionAdd:T,onNativeOptionRemove:v}=c;return $e(()=>(T(E),()=>v(E)),[T,v,E]),f.jsxs(f.Fragment,{children:[f.jsx(ie.span,{id:u.textId,...a,ref:b}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!hi(s.value)?Kr.createPortal(a.children,s.valueNode):null]})},"SelectItemText")),jD="SelectItemIndicator",HD=g.forwardRef(Pe(function(t,n){const{__scopeSelect:r,...o}=t;return Qb(jD,r).isSelected?f.jsx(ie.span,{"aria-hidden":!0,...o,ref:n}):null},"SelectItemIndicator")),UD="SelectBubbleInput",$D=g.forwardRef(Pe(function({__scopeSelect:t,...n},r){const o=Xn(UD,t),{value:i,onValueChange:a,required:s,disabled:l,name:u,autoComplete:c,form:d}=o,{nativeOptions:h,nativeSelectKey:p}=o,b=g.useRef(null),x=he(r,b),E=i??"",T=jb(E),v=Array.from(h).some(y=>(y.props.value??"")==="");return g.useEffect(()=>{const y=b.current;if(!y)return;const C=window.HTMLSelectElement.prototype,w=Object.getOwnPropertyDescriptor(C,"value").set;if(T!==E&&w){const P=new Event("change",{bubbles:!0});w.call(y,E),y.dispatchEvent(P)}},[T,E]),f.jsxs(ie.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:u,autoComplete:c,disabled:l,form:d,onChange:y=>a(y.target.value),...n,style:{...Hb,...n.style},ref:x,defaultValue:E,children:[hi(i)&&!v?f.jsx("option",{value:""}):null,Array.from(h)]},p)},"SelectBubbleInput"));function Zb(e){return typeof e=="function"}Pe(Zb,"isFunction");function hi(e){return e===""||e===void 0}Pe(hi,"shouldShowPlaceholder");function lc(e){const t=Ue(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback(a=>{const s=n.current+a;t(s),Pe((function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}),"updateSearch")(s)},[t]),i=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}Pe(lc,"useTypeaheadSearch");function uc(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=Jb(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}Pe(uc,"findNextItem");function Jb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Pe(Jb,"wrapArray");/**
|
|
183
|
+
* @license lucide-react v1.33.0 - ISC
|
|
184
|
+
*
|
|
185
|
+
* This source code is licensed under the ISC license.
|
|
186
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
+
*/const e1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
188
|
+
* @license lucide-react v1.33.0 - ISC
|
|
189
|
+
*
|
|
190
|
+
* This source code is licensed under the ISC license.
|
|
191
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
+
*/const zD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
193
|
+
* @license lucide-react v1.33.0 - ISC
|
|
194
|
+
*
|
|
195
|
+
* This source code is licensed under the ISC license.
|
|
196
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
+
*/const VD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
198
|
+
* @license lucide-react v1.33.0 - ISC
|
|
199
|
+
*
|
|
200
|
+
* This source code is licensed under the ISC license.
|
|
201
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
+
*/const Nh=e=>{const t=VD(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
203
|
+
* @license lucide-react v1.33.0 - ISC
|
|
204
|
+
*
|
|
205
|
+
* This source code is licensed under the ISC license.
|
|
206
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
+
*/var zs={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
208
|
+
* @license lucide-react v1.33.0 - ISC
|
|
209
|
+
*
|
|
210
|
+
* This source code is licensed under the ISC license.
|
|
211
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
+
*/const WD=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},YD=A.createContext({}),qD=()=>A.useContext(YD),GD=A.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>{const{size:u=24,strokeWidth:c=2,absoluteStrokeWidth:d=!1,color:h="currentColor",className:p=""}=qD()??{},b=r??d?Number(n??c)*24/Number(t??u):n??c;return A.createElement("svg",{ref:l,...zs,width:t??u??zs.width,height:t??u??zs.height,stroke:e??h,strokeWidth:b,className:e1("lucide",p,o),...!i&&!WD(s)&&{"aria-hidden":"true"},...s},[...a.map(([x,E])=>A.createElement(x,E)),...Array.isArray(i)?i:[i]])});/**
|
|
213
|
+
* @license lucide-react v1.33.0 - ISC
|
|
214
|
+
*
|
|
215
|
+
* This source code is licensed under the ISC license.
|
|
216
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
+
*/const ot=(e,t)=>{const n=A.forwardRef(({className:r,...o},i)=>A.createElement(GD,{ref:i,iconNode:t,className:e1(`lucide-${zD(Nh(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Nh(e),n};/**
|
|
218
|
+
* @license lucide-react v1.33.0 - ISC
|
|
219
|
+
*
|
|
220
|
+
* This source code is licensed under the ISC license.
|
|
221
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
+
*/const KD=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],XD=ot("arrow-down-right",KD);/**
|
|
223
|
+
* @license lucide-react v1.33.0 - ISC
|
|
224
|
+
*
|
|
225
|
+
* This source code is licensed under the ISC license.
|
|
226
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
+
*/const QD=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],ZD=ot("arrow-down",QD);/**
|
|
228
|
+
* @license lucide-react v1.33.0 - ISC
|
|
229
|
+
*
|
|
230
|
+
* This source code is licensed under the ISC license.
|
|
231
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
+
*/const JD=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],e4=ot("arrow-up-down",JD);/**
|
|
233
|
+
* @license lucide-react v1.33.0 - ISC
|
|
234
|
+
*
|
|
235
|
+
* This source code is licensed under the ISC license.
|
|
236
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
+
*/const t4=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],n4=ot("arrow-up-right",t4);/**
|
|
238
|
+
* @license lucide-react v1.33.0 - ISC
|
|
239
|
+
*
|
|
240
|
+
* This source code is licensed under the ISC license.
|
|
241
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
+
*/const r4=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],o4=ot("arrow-up",r4);/**
|
|
243
|
+
* @license lucide-react v1.33.0 - ISC
|
|
244
|
+
*
|
|
245
|
+
* This source code is licensed under the ISC license.
|
|
246
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
+
*/const i4=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xa=ot("check",i4);/**
|
|
248
|
+
* @license lucide-react v1.33.0 - ISC
|
|
249
|
+
*
|
|
250
|
+
* This source code is licensed under the ISC license.
|
|
251
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
+
*/const a4=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],cc=ot("chevron-down",a4);/**
|
|
253
|
+
* @license lucide-react v1.33.0 - ISC
|
|
254
|
+
*
|
|
255
|
+
* This source code is licensed under the ISC license.
|
|
256
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
+
*/const s4=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],t1=ot("chevron-right",s4);/**
|
|
258
|
+
* @license lucide-react v1.33.0 - ISC
|
|
259
|
+
*
|
|
260
|
+
* This source code is licensed under the ISC license.
|
|
261
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
+
*/const l4=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],u4=ot("chevron-left",l4);/**
|
|
263
|
+
* @license lucide-react v1.33.0 - ISC
|
|
264
|
+
*
|
|
265
|
+
* This source code is licensed under the ISC license.
|
|
266
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
+
*/const c4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],n1=ot("circle-check",c4);/**
|
|
268
|
+
* @license lucide-react v1.33.0 - ISC
|
|
269
|
+
*
|
|
270
|
+
* This source code is licensed under the ISC license.
|
|
271
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
+
*/const d4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],f4=ot("circle-x",d4);/**
|
|
273
|
+
* @license lucide-react v1.33.0 - ISC
|
|
274
|
+
*
|
|
275
|
+
* This source code is licensed under the ISC license.
|
|
276
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
+
*/const h4=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],p4=ot("copy",h4);/**
|
|
278
|
+
* @license lucide-react v1.33.0 - ISC
|
|
279
|
+
*
|
|
280
|
+
* This source code is licensed under the ISC license.
|
|
281
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
+
*/const m4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],r1=ot("info",m4);/**
|
|
283
|
+
* @license lucide-react v1.33.0 - ISC
|
|
284
|
+
*
|
|
285
|
+
* This source code is licensed under the ISC license.
|
|
286
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
+
*/const g4=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],b4=ot("loader-circle",g4);/**
|
|
288
|
+
* @license lucide-react v1.33.0 - ISC
|
|
289
|
+
*
|
|
290
|
+
* This source code is licensed under the ISC license.
|
|
291
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
292
|
+
*/const x4=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],E4=ot("octagon-x",x4);/**
|
|
293
|
+
* @license lucide-react v1.33.0 - ISC
|
|
294
|
+
*
|
|
295
|
+
* This source code is licensed under the ISC license.
|
|
296
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
297
|
+
*/const T4=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],y4=ot("search",T4);/**
|
|
298
|
+
* @license lucide-react v1.33.0 - ISC
|
|
299
|
+
*
|
|
300
|
+
* This source code is licensed under the ISC license.
|
|
301
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
302
|
+
*/const v4=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],o1=ot("triangle-alert",v4);/**
|
|
303
|
+
* @license lucide-react v1.33.0 - ISC
|
|
304
|
+
*
|
|
305
|
+
* This source code is licensed under the ISC license.
|
|
306
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
307
|
+
*/const w4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Qa=ot("x",w4),C4=$n(["flex w-full items-center justify-between gap-2 bg-panel text-foreground","border border-input rounded-lg text-left","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-35 data-[placeholder]:text-text-3","transition-colors motion-reduce:transition-none"],{variants:{size:{sm:"px-2.5 py-1 text-xs",md:"px-3 py-1.5 text-sm"},variant:{default:"",error:"border-destructive focus-visible:ring-destructive"}},defaultVariants:{size:"md",variant:"default"}}),i1=A.forwardRef(({items:e,value:t,onValueChange:n,placeholder:r,size:o="md",variant:i,disabled:a,className:s,id:l},u)=>{const c=Yn();return f.jsxs(bD,{value:t,onValueChange:n,children:[f.jsxs(ED,{ref:u,"data-testid":"select-trigger",id:l??(c==null?void 0:c.id),"aria-invalid":(c==null?void 0:c.invalid)||void 0,"aria-describedby":c==null?void 0:c.describedBy,disabled:a,className:q(C4({size:o,variant:c!=null&&c.invalid?"error":i}),s),children:[f.jsx(yD,{placeholder:r??"Select…"}),f.jsx(vD,{children:f.jsx(cc,{"aria-hidden":"true",className:"size-4 text-text-3"})})]}),f.jsx(SD,{children:f.jsx(AD,{position:"popper",sideOffset:4,className:"z-50 min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-lg border border-border bg-panel-2 shadow-lg",children:f.jsx(LD,{className:"p-1",children:e.map(d=>f.jsxs(FD,{value:d.value,disabled:d.disabled,"data-testid":`select-item-${d.value}`,className:"flex cursor-pointer items-center justify-between gap-2 rounded-md px-2 py-1.5 text-sm text-foreground data-[highlighted]:bg-panel data-[disabled]:pointer-events-none data-[disabled]:opacity-35",children:[f.jsx(BD,{children:d.label}),f.jsx(HD,{children:f.jsx(Xa,{"aria-hidden":"true",className:"size-3.5 text-primary"})})]},d.value))})})})]})});i1.displayName="Select";var Rh=1,k4=.9,S4=.8,A4=.17,Vs=.1,Ws=.999,_4=.9999,I4=.99,N4=/[\\\/_+.#"@\[\(\{&]/,R4=/[\\\/_+.#"@\[\(\{&]/g,P4=/[\s-]/,a1=/[\s-]/g;function Bl(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?Rh:I4;var s=`${o},${i}`;if(a[s]!==void 0)return a[s];for(var l=r.charAt(i),u=n.indexOf(l,o),c=0,d,h,p,b;u>=0;)d=Bl(e,t,n,r,u+1,i+1,a),d>c&&(u===o?d*=Rh:N4.test(e.charAt(u-1))?(d*=S4,p=e.slice(o,u-1).match(R4),p&&o>0&&(d*=Math.pow(Ws,p.length))):P4.test(e.charAt(u-1))?(d*=k4,b=e.slice(o,u-1).match(a1),b&&o>0&&(d*=Math.pow(Ws,b.length))):(d*=A4,o>0&&(d*=Math.pow(Ws,u-o))),e.charAt(u)!==t.charAt(i)&&(d*=_4)),(d<Vs&&n.charAt(u-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(u-1)!==r.charAt(i))&&(h=Bl(e,t,n,r,u+1,i+2,a),h*Vs>d&&(d=h*Vs)),d>c&&(c=d),u=n.indexOf(l,u+1);return a[s]=c,c}function Ph(e){return e.toLowerCase().replace(a1," ")}function O4(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Bl(e,t,Ph(e),Ph(t),0,0,{})}var L4=Object.defineProperty,Ot=(e,t)=>L4(e,"name",{value:t,configurable:!0}),dc="Dialog",[s1,bB]=Ve(dc),[D4,rn]=s1(dc),l1=Ot(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=g.useRef(null),l=g.useRef(null),[u,c]=ct({prop:r,defaultProp:o??!1,onChange:i,caller:dc}),[d,h]=g.useState(0),[p,b]=g.useState(0);return f.jsx(D4,{scope:t,triggerRef:s,contentRef:l,contentId:Ke(),titleId:Ke(),descriptionId:Ke(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:h,setDescriptionCount:b,open:u,onOpenChange:c,onOpenToggle:g.useCallback(()=>c(x=>!x),[c]),modal:a,children:n})},"Dialog"),u1="DialogPortal",[M4,c1]=s1(u1,{forceMount:void 0}),d1=Ot(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=rn(u1,t);return f.jsx(M4,{scope:t,forceMount:n,children:g.Children.map(r,a=>f.jsx(Ze,{present:n||i.open,children:f.jsx(uo,{asChild:!0,container:o,children:a})}))})},"DialogPortal"),jl="DialogOverlay",f1=g.forwardRef(Ot(function(t,n){const r=c1(jl,t.__scopeDialog),{forceMount:o=r.forceMount,...i}=t,a=rn(jl,t.__scopeDialog);return a.modal?f.jsx(Ze,{present:o||a.open,children:f.jsx(B4,{...i,ref:n})}):null},"DialogOverlay")),F4=Qt("DialogOverlay.RemoveScroll"),B4=g.forwardRef(Ot(function(t,n){const{__scopeDialog:r,...o}=t,i=rn(jl,r),a=pb(),s=he(n,a);return f.jsx(fi,{as:F4,allowPinchZoom:!0,shards:[i.contentRef],children:f.jsx(ie.div,{"data-state":fc(i.open),...o,ref:s,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Ko="DialogContent",h1=g.forwardRef(Ot(function(t,n){const r=c1(Ko,t.__scopeDialog),{forceMount:o=r.forceMount,...i}=t,a=rn(Ko,t.__scopeDialog);return f.jsx(Ze,{present:o||a.open,children:a.modal?f.jsx(j4,{...i,ref:n}):f.jsx(H4,{...i,ref:n})})},"DialogContent")),j4=g.forwardRef(Ot(function(t,n){const r=rn(Ko,t.__scopeDialog),o=g.useRef(null),i=he(n,r.contentRef,o);return g.useEffect(()=>{const a=o.current;if(a)return Ya(a)},[]),f.jsx(p1,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:J(t.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:J(t.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&a.preventDefault()}),onFocusOutside:J(t.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),H4=g.forwardRef(Ot(function(t,n){const r=rn(Ko,t.__scopeDialog),o=g.useRef(!1),i=g.useRef(!1);return f.jsx(p1,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=t.onCloseAutoFocus)==null||s.call(t,a),a.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:a=>{var u,c;(u=t.onInteractOutside)==null||u.call(t,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((c=r.triggerRef.current)==null?void 0:c.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})},"DialogContentNonModal")),p1=g.forwardRef(Ot(function(t,n){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=rn(Ko,r);return ao(),f.jsx(f.Fragment,{children:f.jsx(Ma,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:f.jsx(io,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":fc(l.open),...s,ref:n,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),U4="DialogTitle",$4=g.forwardRef(Ot(function(t,n){const{__scopeDialog:r,...o}=t,i=rn(U4,r),{setTitleCount:a}=i;return $e(()=>(a(s=>s+1),()=>a(s=>s-1)),[a]),f.jsx(ie.h2,{id:i.titleId,...o,ref:n})},"DialogTitle")),z4="DialogDescription",V4=g.forwardRef(Ot(function(t,n){const{__scopeDialog:r,...o}=t,i=rn(z4,r),{setDescriptionCount:a}=i;return $e(()=>(a(s=>s+1),()=>a(s=>s-1)),[a]),f.jsx(ie.p,{id:i.descriptionId,...o,ref:n})},"DialogDescription")),W4="DialogClose",Y4=g.forwardRef(Ot(function(t,n){const{__scopeDialog:r,...o}=t,i=rn(W4,r);return f.jsx(ie.button,{type:"button",...o,ref:n,onClick:J(t.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function fc(e){return e?"open":"closed"}Ot(fc,"getState");var _o='[cmdk-group=""]',Ys='[cmdk-group-items=""]',q4='[cmdk-group-heading=""]',m1='[cmdk-item=""]',Oh=`${m1}:not([aria-disabled="true"])`,Hl="cmdk-item-select",Br="data-value",G4=(e,t,n)=>O4(e,t,n),g1=g.createContext(void 0),pi=()=>g.useContext(g1),b1=g.createContext(void 0),hc=()=>g.useContext(b1),x1=g.createContext(void 0),E1=g.forwardRef((e,t)=>{let n=jr(()=>{var j,_;return{search:"",value:(_=(j=e.value)!=null?j:e.defaultValue)!=null?_:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=jr(()=>new Set),o=jr(()=>new Map),i=jr(()=>new Map),a=jr(()=>new Set),s=T1(e),{label:l,children:u,value:c,onValueChange:d,filter:h,shouldFilter:p,loop:b,disablePointerSelection:x=!1,vimBindings:E=!0,...T}=e,v=Ke(),y=Ke(),C=Ke(),I=g.useRef(null),w=i5();xr(()=>{if(c!==void 0){let j=c.trim();n.current.value=j,P.emit()}},[c]),xr(()=>{w(6,W)},[]);let P=g.useMemo(()=>({subscribe:j=>(a.current.add(j),()=>a.current.delete(j)),snapshot:()=>n.current,setState:(j,_,ae)=>{var K,ee,ce,te;if(!Object.is(n.current[j],_)){if(n.current[j]=_,j==="search")M(),R(),w(1,D);else if(j==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let oe=document.getElementById(C);oe?oe.focus():(K=document.getElementById(v))==null||K.focus()}if(w(7,()=>{var oe;n.current.selectedItemId=(oe=z())==null?void 0:oe.id,P.emit()}),ae||w(5,W),((ee=s.current)==null?void 0:ee.value)!==void 0){let oe=_??"";(te=(ce=s.current).onValueChange)==null||te.call(ce,oe);return}}P.emit()}},emit:()=>{a.current.forEach(j=>j())}}),[]),L=g.useMemo(()=>({value:(j,_,ae)=>{var K;_!==((K=i.current.get(j))==null?void 0:K.value)&&(i.current.set(j,{value:_,keywords:ae}),n.current.filtered.items.set(j,F(_,ae)),w(2,()=>{R(),P.emit()}))},item:(j,_)=>(r.current.add(j),_&&(o.current.has(_)?o.current.get(_).add(j):o.current.set(_,new Set([j]))),w(3,()=>{M(),R(),n.current.value||D(),P.emit()}),()=>{i.current.delete(j),r.current.delete(j),n.current.filtered.items.delete(j);let ae=z();w(4,()=>{M(),(ae==null?void 0:ae.getAttribute("id"))===j&&D(),P.emit()})}),group:j=>(o.current.has(j)||o.current.set(j,new Set),()=>{i.current.delete(j),o.current.delete(j)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:C,labelId:y,listInnerRef:I}),[]);function F(j,_){var ae,K;let ee=(K=(ae=s.current)==null?void 0:ae.filter)!=null?K:G4;return j?ee(j,n.current.search,_):0}function R(){if(!n.current.search||s.current.shouldFilter===!1)return;let j=n.current.filtered.items,_=[];n.current.filtered.groups.forEach(K=>{let ee=o.current.get(K),ce=0;ee.forEach(te=>{let oe=j.get(te);ce=Math.max(oe,ce)}),_.push([K,ce])});let ae=I.current;$().sort((K,ee)=>{var ce,te;let oe=K.getAttribute("id"),pe=ee.getAttribute("id");return((ce=j.get(pe))!=null?ce:0)-((te=j.get(oe))!=null?te:0)}).forEach(K=>{let ee=K.closest(Ys);ee?ee.appendChild(K.parentElement===ee?K:K.closest(`${Ys} > *`)):ae.appendChild(K.parentElement===ae?K:K.closest(`${Ys} > *`))}),_.sort((K,ee)=>ee[1]-K[1]).forEach(K=>{var ee;let ce=(ee=I.current)==null?void 0:ee.querySelector(`${_o}[${Br}="${encodeURIComponent(K[0])}"]`);ce==null||ce.parentElement.appendChild(ce)})}function D(){let j=$().find(ae=>ae.getAttribute("aria-disabled")!=="true"),_=j==null?void 0:j.getAttribute(Br);P.setState("value",_||void 0)}function M(){var j,_,ae,K;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ee=0;for(let ce of r.current){let te=(_=(j=i.current.get(ce))==null?void 0:j.value)!=null?_:"",oe=(K=(ae=i.current.get(ce))==null?void 0:ae.keywords)!=null?K:[],pe=F(te,oe);n.current.filtered.items.set(ce,pe),pe>0&&ee++}for(let[ce,te]of o.current)for(let oe of te)if(n.current.filtered.items.get(oe)>0){n.current.filtered.groups.add(ce);break}n.current.filtered.count=ee}function W(){var j,_,ae;let K=z();K&&(((j=K.parentElement)==null?void 0:j.firstChild)===K&&((ae=(_=K.closest(_o))==null?void 0:_.querySelector(q4))==null||ae.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function z(){var j;return(j=I.current)==null?void 0:j.querySelector(`${m1}[aria-selected="true"]`)}function $(){var j;return Array.from(((j=I.current)==null?void 0:j.querySelectorAll(Oh))||[])}function H(j){let _=$()[j];_&&P.setState("value",_.getAttribute(Br))}function V(j){var _;let ae=z(),K=$(),ee=K.findIndex(te=>te===ae),ce=K[ee+j];(_=s.current)!=null&&_.loop&&(ce=ee+j<0?K[K.length-1]:ee+j===K.length?K[0]:K[ee+j]),ce&&P.setState("value",ce.getAttribute(Br))}function Q(j){let _=z(),ae=_==null?void 0:_.closest(_o),K;for(;ae&&!K;)ae=j>0?r5(ae,_o):o5(ae,_o),K=ae==null?void 0:ae.querySelector(Oh);K?P.setState("value",K.getAttribute(Br)):V(j)}let re=()=>H($().length-1),k=j=>{j.preventDefault(),j.metaKey?re():j.altKey?Q(1):V(1)},ue=j=>{j.preventDefault(),j.metaKey?H(0):j.altKey?Q(-1):V(-1)};return g.createElement(ie.div,{ref:t,tabIndex:-1,...T,"cmdk-root":"",onKeyDown:j=>{var _;(_=T.onKeyDown)==null||_.call(T,j);let ae=j.nativeEvent.isComposing||j.keyCode===229;if(!(j.defaultPrevented||ae))switch(j.key){case"n":case"j":{E&&j.ctrlKey&&k(j);break}case"ArrowDown":{k(j);break}case"p":case"k":{E&&j.ctrlKey&&ue(j);break}case"ArrowUp":{ue(j);break}case"Home":{j.preventDefault(),H(0);break}case"End":{j.preventDefault(),re();break}case"Enter":{j.preventDefault();let K=z();if(K){let ee=new Event(Hl);K.dispatchEvent(ee)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:s5},l),Za(e,j=>g.createElement(b1.Provider,{value:P},g.createElement(g1.Provider,{value:L},j))))}),K4=g.forwardRef((e,t)=>{var n,r;let o=Ke(),i=g.useRef(null),a=g.useContext(x1),s=pi(),l=T1(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;xr(()=>{if(!u)return s.item(o,a==null?void 0:a.id)},[u]);let c=y1(o,i,[e.value,e.children,i],e.keywords),d=hc(),h=Hn(w=>w.value&&w.value===c.current),p=Hn(w=>u||s.filter()===!1?!0:w.search?w.filtered.items.get(o)>0:!0);g.useEffect(()=>{let w=i.current;if(!(!w||e.disabled))return w.addEventListener(Hl,b),()=>w.removeEventListener(Hl,b)},[p,e.onSelect,e.disabled]);function b(){var w,P;x(),(P=(w=l.current).onSelect)==null||P.call(w,c.current)}function x(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:E,value:T,onSelect:v,forceMount:y,keywords:C,...I}=e;return g.createElement(ie.div,{ref:dr(i,t),...I,id:o,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!h,"data-disabled":!!E,"data-selected":!!h,onPointerMove:E||s.getDisablePointerSelection()?void 0:x,onClick:E?void 0:b},e.children)}),X4=g.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,a=Ke(),s=g.useRef(null),l=g.useRef(null),u=Ke(),c=pi(),d=Hn(p=>o||c.filter()===!1?!0:p.search?p.filtered.groups.has(a):!0);xr(()=>c.group(a),[]),y1(a,s,[e.value,e.heading,l]);let h=g.useMemo(()=>({id:a,forceMount:o}),[o]);return g.createElement(ie.div,{ref:dr(s,t),...i,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&g.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),Za(e,p=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},g.createElement(x1.Provider,{value:h},p))))}),Q4=g.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=g.useRef(null),i=Hn(a=>!a.search);return!n&&!i?null:g.createElement(ie.div,{ref:dr(o,t),...r,"cmdk-separator":"",role:"separator"})}),Z4=g.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=hc(),a=Hn(u=>u.search),s=Hn(u=>u.selectedItemId),l=pi();return g.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),g.createElement(ie.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:o?e.value:a,onChange:u=>{o||i.setState("search",u.target.value),n==null||n(u.target.value)}})}),J4=g.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=g.useRef(null),a=g.useRef(null),s=Hn(u=>u.selectedItemId),l=pi();return g.useEffect(()=>{if(a.current&&i.current){let u=a.current,c=i.current,d,h=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=u.offsetHeight;c.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return h.observe(u),()=>{cancelAnimationFrame(d),h.unobserve(u)}}},[]),g.createElement(ie.div,{ref:dr(i,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},Za(e,u=>g.createElement("div",{ref:dr(a,l.listInnerRef),"cmdk-list-sizer":""},u)))}),e5=g.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:a,...s}=e;return g.createElement(l1,{open:n,onOpenChange:r},g.createElement(d1,{container:a},g.createElement(f1,{"cmdk-overlay":"",className:o}),g.createElement(h1,{"aria-label":e.label,"cmdk-dialog":"",className:i},g.createElement(E1,{ref:t,...s}))))}),t5=g.forwardRef((e,t)=>Hn(n=>n.filtered.count===0)?g.createElement(ie.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),n5=g.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return g.createElement(ie.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Za(e,a=>g.createElement("div",{"aria-hidden":!0},a)))}),Gt=Object.assign(E1,{List:J4,Item:K4,Input:Z4,Group:X4,Separator:Q4,Dialog:e5,Empty:t5,Loading:n5});function r5(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function o5(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function T1(e){let t=g.useRef(e);return xr(()=>{t.current=e}),t}var xr=typeof window>"u"?g.useEffect:g.useLayoutEffect;function jr(e){let t=g.useRef();return t.current===void 0&&(t.current=e()),t}function Hn(e){let t=hc(),n=()=>e(t.snapshot());return g.useSyncExternalStore(t.subscribe,n,n)}function y1(e,t,n,r=[]){let o=g.useRef(),i=pi();return xr(()=>{var a;let s=(()=>{var u;for(let c of n){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():o.current}})(),l=r.map(u=>u.trim());i.value(e,s,l),(a=t.current)==null||a.setAttribute(Br,s),o.current=s}),o}var i5=()=>{let[e,t]=g.useState(),n=jr(()=>new Map);return xr(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function a5(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Za({asChild:e,children:t},n){return e&&g.isValidElement(t)?g.cloneElement(a5(t),{ref:t.ref},n(t.props.children)):n(t)}var s5={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const l5=$n(["flex w-full items-center gap-2 bg-panel text-foreground","border border-input rounded-lg","focus-within:ring-2 focus-within:ring-ring","has-[:disabled]:pointer-events-none has-[:disabled]:opacity-35","transition-colors motion-reduce:transition-none"],{variants:{size:{sm:"px-2.5 py-1 text-xs",md:"px-3 py-1.5 text-sm"},variant:{default:"",error:"border-destructive focus-within:ring-destructive"}},defaultVariants:{size:"md",variant:"default"}}),v1=A.forwardRef(({options:e,value:t,onValueChange:n,placeholder:r="Select…",size:o="md",variant:i,disabled:a,className:s},l)=>{const u=Yn(),[c,d]=A.useState(!1),[h,p]=A.useState(""),b=e.find(w=>w.value===t),x=h.trim().toLowerCase(),E=x?e.filter(w=>w.label.toLowerCase().includes(x)||w.value.toLowerCase().includes(x)):e,T=()=>{a||d(!0)},v=w=>{n==null||n(w),p(""),d(!1)},y=w=>w.preventDefault(),C=w=>{w.key==="Escape"&&(c&&w.stopPropagation(),d(!1),p("")),!c&&w.key!=="Tab"&&w.key!=="Shift"&&w.key!=="Escape"&&T()},I=()=>{d(!1),p("")};return f.jsx("div",{"data-testid":"combobox",className:q("relative w-full",s),children:f.jsxs(Gt,{label:(u==null?void 0:u.label)??r,loop:!0,shouldFilter:!1,className:"static",children:[f.jsxs("div",{className:q(l5({size:o,variant:u!=null&&u.invalid?"error":i})),children:[f.jsx(Gt.Input,{ref:l,"data-testid":"combobox-input","aria-invalid":(u==null?void 0:u.invalid)||void 0,"aria-describedby":u==null?void 0:u.describedBy,value:c?h:(b==null?void 0:b.label)??"",onValueChange:p,placeholder:r,disabled:a,onFocus:T,onClick:T,onKeyDown:C,onBlur:I,className:"w-full min-w-0 bg-transparent outline-none placeholder:text-text-3"}),t?f.jsx("button",{type:"button",tabIndex:-1,"data-testid":"combobox-clear","aria-label":"Clear selection",disabled:a,onMouseDown:w=>w.preventDefault(),onClick:()=>{n==null||n(""),p("")},className:"shrink-0 text-text-3 transition-colors hover:text-foreground motion-reduce:transition-none",children:f.jsx(Qa,{"aria-hidden":"true",className:"size-3.5"})}):null,f.jsx(cc,{"aria-hidden":"true",className:"size-4 shrink-0 text-text-3"})]}),c?f.jsx("div",{"data-testid":"combobox-dropdown",role:"presentation",onMouseDown:y,className:"absolute inset-x-0 top-full z-50 mt-1 overflow-hidden rounded-lg border border-border bg-panel-2 shadow-lg",children:f.jsxs(Gt.List,{label:r,className:"max-h-60 overflow-y-auto p-1",children:[E.map(w=>f.jsxs(Gt.Item,{value:w.value,keywords:[w.label],disabled:w.disabled,onSelect:v,"data-testid":`combobox-item-${w.value}`,className:"flex cursor-pointer items-center justify-between gap-2 rounded-md px-2 py-1.5 text-sm text-foreground data-[selected=true]:bg-panel data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-35",children:[f.jsx("span",{children:w.label}),w.value===t?f.jsx(Xa,{"aria-hidden":"true",className:"size-3.5 text-primary"}):null]},w.value)),E.length===0?f.jsx("div",{"data-testid":"combobox-empty",className:"px-2 py-1.5 text-sm text-text-3",children:"No results found."}):null]})}):null]})})});v1.displayName="Combobox";var u5=Object.defineProperty,Tn=(e,t)=>u5(e,"name",{value:t,configurable:!0}),pc="Checkbox",[c5,xB]=Ve(pc),[d5,mc]=c5(pc);function w1(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:a,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[h,p]=ct({prop:n,defaultProp:o??!1,onChange:l,caller:pc}),[b,x]=g.useState(null),[E,T]=g.useState(null),v=g.useRef(!1),[y,C]=g.useReducer(P=>P+1,0),I=b?!!a||!!b.closest("form"):!0,w={checked:h,disabled:i,setChecked:p,control:b,setControl:x,name:s,form:a,value:c,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:C,required:u,defaultChecked:gn(o)?!1:o,isFormControl:I,bubbleInput:E,setBubbleInput:T};return f.jsx(d5,{scope:t,...w,children:C1(d)?d(w):r})}Tn(w1,"CheckboxProvider");var f5="CheckboxTrigger",h5=g.forwardRef(Tn(function({__scopeCheckbox:t,onKeyDown:n,onClick:r,...o},i){const{control:a,value:s,disabled:l,checked:u,required:c,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:p,onUserInteraction:b,isFormControl:x,bubbleInput:E}=mc(f5,t),T=he(i,d),v=g.useRef(u);return g.useEffect(()=>{const y=a==null?void 0:a.form;if(y){const C=Tn(()=>h(v.current),"reset");return y.addEventListener("reset",C),()=>y.removeEventListener("reset",C)}},[a,h]),f.jsx(ie.button,{type:"button",role:"checkbox","aria-checked":gn(u)?"mixed":u,"aria-required":c,"data-state":gc(u),"data-disabled":l?"":void 0,disabled:l,value:s,...o,ref:T,onKeyDown:J(n,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:J(r,y=>{b(),h(C=>gn(C)?!0:!C),E&&x&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})},"CheckboxTrigger")),p5=g.forwardRef(Tn(function(t,n){const{__scopeCheckbox:r,name:o,checked:i,defaultChecked:a,required:s,disabled:l,value:u,onCheckedChange:c,form:d,...h}=t;return f.jsx(w1,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:l,required:s,onCheckedChange:c,name:o,form:d,value:u,internal_do_not_use_render:({isFormControl:p})=>f.jsxs(f.Fragment,{children:[f.jsx(h5,{...h,ref:n,__scopeCheckbox:r}),p&&f.jsx(x5,{__scopeCheckbox:r})]})})},"Checkbox")),m5="CheckboxIndicator",g5=g.forwardRef(Tn(function(t,n){const{__scopeCheckbox:r,forceMount:o,...i}=t,a=mc(m5,r);return f.jsx(Ze,{present:o||gn(a.checked)||a.checked===!0,children:f.jsx(ie.span,{"data-state":gc(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...t.style}})})},"CheckboxIndicator")),b5="CheckboxBubbleInput",x5=g.forwardRef(Tn(function({__scopeCheckbox:t,onClick:n,...r},o){const{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:s,checked:l,defaultChecked:u,required:c,disabled:d,name:h,value:p,form:b,bubbleInput:x,setBubbleInput:E}=mc(b5,t),T=he(o,E),v=di(i),y=g.useRef(!1),C=g.useRef(l),I=g.useRef(s);g.useEffect(()=>{const P=x;if(!P)return;const L=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(L,"checked").set,D=s!==I.current;I.current=s;const M=C.current!==l;C.current=l;const W=!(D&&a.current);if(M&&R){y.current=!D;const z=new Event("click",{bubbles:W});P.indeterminate=gn(l),R.call(P,gn(l)?!1:l),P.dispatchEvent(z),y.current=!1}},[x,l,a,s]);const w=g.useRef(gn(l)?!1:l);return f.jsx(ie.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??w.current,required:c,disabled:d,name:h,value:p,form:b,...r,tabIndex:-1,ref:T,onClick:J(n,P=>{y.current&&P.stopPropagation()}),style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function C1(e){return typeof e=="function"}Tn(C1,"isFunction");function gn(e){return e==="indeterminate"}Tn(gn,"isIndeterminate");function gc(e){return gn(e)?"indeterminate":e?"checked":"unchecked"}Tn(gc,"getState");const k1=A.forwardRef(({checked:e,onCheckedChange:t,label:n,disabled:r,className:o,id:i},a)=>{const s=Yn(),l=(s==null?void 0:s.id)??i,u=f.jsx(p5,{ref:a,id:l,"data-testid":"checkbox",checked:e,onCheckedChange:t,disabled:r,"aria-describedby":s==null?void 0:s.describedBy,className:q("flex size-4 shrink-0 items-center justify-center rounded border border-input bg-panel","data-[state=checked]:border-primary data-[state=checked]:bg-primary","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-35","transition-colors motion-reduce:transition-none"),children:f.jsx(g5,{children:f.jsx(Xa,{"aria-hidden":"true",className:"size-3 text-primary-foreground"})})});return n?f.jsxs("label",{"data-testid":"checkbox-label",htmlFor:l,className:q("flex items-center gap-2 text-sm text-foreground",o),children:[u,n]}):f.jsx("span",{className:o,children:u})});k1.displayName="Checkbox";var E5=Object.defineProperty,bc=(e,t)=>E5(e,"name",{value:t,configurable:!0}),qs=!1;function S1(){const[e,t]=g.useState(qs);return g.useEffect(()=>{qs||(qs=!0,t(!0))},[]),e}bc(S1,"useIsHydrated");var A1=g[" useSyncExternalStore ".trim().toString()];function _1(){return()=>{}}bc(_1,"subscribe");function I1(){return A1(_1,()=>!0,()=>!1)}bc(I1,"useIsHydratedModern");var T5=typeof A1=="function"?I1:S1,y5=Object.defineProperty,Sr=(e,t)=>y5(e,"name",{value:t,configurable:!0}),Gs="rovingFocusGroup.onEntryFocus",v5={bubbles:!1,cancelable:!0},Ja="RovingFocusGroup",[Ul,N1,w5]=oo(Ja),[C5,co]=Ve(Ja,[w5]),[k5,S5]=C5(Ja),A5=g.forwardRef(Sr(function(t,n){return f.jsx(Ul.Provider,{scope:t.__scopeRovingFocusGroup,children:f.jsx(Ul.Slot,{scope:t.__scopeRovingFocusGroup,children:f.jsx(_5,{...t,ref:n})})})},"RovingFocusGroup")),_5=g.forwardRef(Sr(function(t,n){const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...h}=t,p=g.useRef(null),b=he(n,p),x=qn(a),[E,T]=ct({prop:s,defaultProp:l??null,onChange:u,caller:Ja}),[v,y]=g.useState(!1),C=Ue(c),I=N1(r),w=g.useRef(!1),[P,L]=g.useState(0);return g.useEffect(()=>{const F=p.current;if(F)return F.addEventListener(Gs,C),()=>F.removeEventListener(Gs,C)},[C]),f.jsx(k5,{scope:r,orientation:o,dir:x,loop:i,currentTabStopId:E,onItemFocus:g.useCallback(F=>T(F),[T]),onItemShiftTab:g.useCallback(()=>y(!0),[]),onFocusableItemAdd:g.useCallback(()=>L(F=>F+1),[]),onFocusableItemRemove:g.useCallback(()=>L(F=>F-1),[]),children:f.jsx(ie.div,{tabIndex:v||P===0?-1:0,"data-orientation":o,...h,ref:b,style:{outline:"none",...t.style},onMouseDown:J(t.onMouseDown,()=>{w.current=!0}),onFocus:J(t.onFocus,F=>{const R=!w.current;if(F.target===F.currentTarget&&R&&!v){const D=new CustomEvent(Gs,v5);if(F.currentTarget.dispatchEvent(D),!D.defaultPrevented){const M=I().filter(V=>V.focusable),W=M.find(V=>V.active),z=M.find(V=>V.id===E),H=[W,z,...M].filter(Boolean).map(V=>V.ref.current);xc(H,d)}}w.current=!1}),onBlur:J(t.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),I5="RovingFocusGroupItem",N5=g.forwardRef(Sr(function(t,n){const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:a,children:s,...l}=t,u=Ke(),c=a||u,d=S5(I5,r),h=d.currentTabStopId===c,p=N1(r),{onFocusableItemAdd:b,onFocusableItemRemove:x,currentTabStopId:E}=d,T=T5();return $e(()=>{if(!(!T||!o))return b(),()=>x()},[T,o,b,x]),g.useEffect(()=>{if(!(T||!o))return b(),()=>x()},[T,o,b,x]),f.jsx(Ul.ItemSlot,{scope:r,id:c,focusable:o,active:i,children:f.jsx(ie.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:n,onMouseDown:J(t.onMouseDown,v=>{o?d.onItemFocus(c):v.preventDefault()}),onFocus:J(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:J(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=P1(v,d.orientation,d.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let I=p().filter(w=>w.focusable).map(w=>w.ref.current);if(y==="last")I.reverse();else if(y==="prev"||y==="next"){y==="prev"&&I.reverse();const w=I.indexOf(v.currentTarget);I=d.loop?O1(I,w+1):I.slice(w+1)}setTimeout(()=>xc(I))}}),children:typeof s=="function"?s({isCurrentTabStop:h,hasTabStop:E!=null}):s})})},"RovingFocusGroupItem")),R5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R1(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Sr(R1,"getDirectionAwareKey");function P1(e,t,n){const r=R1(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return R5[r]}Sr(P1,"getFocusIntent");function xc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Sr(xc,"focusFirst");function O1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Sr(O1,"wrapArray");var Ec=A5,Tc=N5,P5=Object.defineProperty,ut=(e,t)=>P5(e,"name",{value:t,configurable:!0}),L1="Radio",[O5,D1]=Ve(L1),[L5,es]=O5(L1);function M1(e){const{__scopeRadio:t,checked:n=!1,children:r,disabled:o,form:i,name:a,onCheck:s,required:l,value:u="on",internal_do_not_use_render:c}=e,[d,h]=g.useState(null),[p,b]=g.useState(null),x=g.useRef(!1),[E,T]=g.useReducer(C=>C+1,0),v=d?!!i||!!d.closest("form"):!0,y={checked:n,disabled:o,required:l,name:a,form:i,value:u,control:d,setControl:h,hasConsumerStoppedPropagationRef:x,userInteractionCount:E,onUserInteraction:T,isFormControl:v,bubbleInput:p,setBubbleInput:b,onCheck:ut(()=>s==null?void 0:s(),"onCheck")};return f.jsx(L5,{scope:t,...y,children:F1(c)?c(y):r})}ut(M1,"RadioProvider");var D5="RadioTrigger",M5=g.forwardRef(ut(function({__scopeRadio:t,onClick:n,...r},o){const{checked:i,disabled:a,value:s,setControl:l,onCheck:u,hasConsumerStoppedPropagationRef:c,onUserInteraction:d,isFormControl:h,bubbleInput:p}=es(D5,t),b=he(o,l);return f.jsx(ie.button,{type:"button",role:"radio","aria-checked":i,"data-state":yc(i),"data-disabled":a?"":void 0,disabled:a,value:s,...r,ref:b,onClick:J(n,x=>{i||(d(),u()),p&&h&&(c.current=x.isPropagationStopped(),c.current||x.stopPropagation())})})},"RadioTrigger")),F5="RadioIndicator",B5=g.forwardRef(ut(function(t,n){const{__scopeRadio:r,forceMount:o,...i}=t,a=es(F5,r);return f.jsx(Ze,{present:o||a.checked,children:f.jsx(ie.span,{"data-state":yc(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:n})})},"RadioIndicator")),j5="RadioBubbleInput",H5=g.forwardRef(ut(function({__scopeRadio:t,onClick:n,...r},o){const{control:i,checked:a,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:h,setBubbleInput:p,hasConsumerStoppedPropagationRef:b,userInteractionCount:x}=es(j5,t),E=he(o,p),T=di(i),v=g.useRef(!1),y=g.useRef(a),C=g.useRef(x);g.useEffect(()=>{const w=h;if(!w)return;const P=window.HTMLInputElement.prototype,F=Object.getOwnPropertyDescriptor(P,"checked").set,R=x!==C.current;C.current=x;const D=y.current!==a;y.current=a;const M=!(R&&b.current);if(D&&F){v.current=!R;const W=new Event("click",{bubbles:M});F.call(w,a),w.dispatchEvent(W),v.current=!1}},[h,a,b,x]);const I=g.useRef(a);return f.jsx(ie.input,{type:"radio","aria-hidden":!0,defaultChecked:I.current,required:s,disabled:l,name:u,value:c,form:d,...r,tabIndex:-1,ref:E,onClick:J(n,w=>{v.current&&w.stopPropagation()}),style:{...r.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"RadioBubbleInput"));function F1(e){return typeof e=="function"}ut(F1,"isFunction");function yc(e){return e?"checked":"unchecked"}ut(yc,"getState");var U5=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],vc="RadioGroup",[$5,EB]=Ve(vc,[co,D1]),B1=co(),ts=D1(),[z5,V5]=$5(vc),W5=g.forwardRef(ut(function(t,n){const{__scopeRadioGroup:r,name:o,form:i,defaultValue:a,value:s,required:l=!1,disabled:u=!1,orientation:c,dir:d,loop:h=!0,onValueChange:p,...b}=t,x=B1(r),E=qn(d),[T,v]=ct({prop:s,defaultProp:a??null,onChange:p,caller:vc}),[y,C]=g.useState(null),I=he(n,C),w=g.useRef(T);return g.useEffect(()=>{const P=i?y==null?void 0:y.ownerDocument.getElementById(i):y==null?void 0:y.closest("form");if(P instanceof HTMLFormElement){const L=ut(()=>v(w.current),"reset");return P.addEventListener("reset",L),()=>P.removeEventListener("reset",L)}},[y,i,v]),f.jsx(z5,{scope:r,name:o,form:i,required:l,disabled:u,value:T,onValueChange:v,children:f.jsx(Ec,{asChild:!0,...x,orientation:c,dir:E,loop:h,children:f.jsx(ie.div,{role:"radiogroup","aria-required":l,"aria-orientation":c,"data-disabled":u?"":void 0,dir:E,...b,ref:I})})})},"RadioGroup")),Y5="RadioGroupItemProvider",q5="RadioGroupItemTrigger";function j1(e){const{__scopeRadioGroup:t,value:n,disabled:r,children:o,internal_do_not_use_render:i}=e,a=V5(Y5,t),s=ts(t),l=a.disabled||r;return f.jsx(M1,{...s,checked:a.value===n,disabled:l,required:a.required,name:a.name,form:a.form,value:n,onCheck:()=>a.onValueChange(n),internal_do_not_use_render:i,children:o})}ut(j1,"RadioGroupItemProvider");var G5=g.forwardRef(ut(function(t,n){const{__scopeRadioGroup:r,...o}=t,i=B1(r),a=ts(r),{checked:s,disabled:l}=es(q5,a.__scopeRadio),u=g.useRef(null),c=he(n,u),d=g.useRef(!1);return g.useEffect(()=>{const h=ut(b=>{U5.includes(b.key)&&(d.current=!0)},"handleKeyDown"),p=ut(()=>d.current=!1,"handleKeyUp");return document.addEventListener("keydown",h),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)}},[]),f.jsx(Tc,{asChild:!0,...i,focusable:!l,active:s,children:f.jsx(M5,{...a,...o,ref:c,onKeyDown:J(o.onKeyDown,h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:J(o.onFocus,()=>{var h;d.current&&((h=u.current)==null||h.click())})})})},"RadioGroupItemTrigger")),K5=g.forwardRef(ut(function(t,n){const{__scopeRadioGroup:r,value:o,disabled:i,...a}=t;return f.jsx(j1,{__scopeRadioGroup:r,value:o,disabled:i,internal_do_not_use_render:({isFormControl:s})=>f.jsxs(f.Fragment,{children:[f.jsx(G5,{...a,ref:n,__scopeRadioGroup:r}),s&&f.jsx(X5,{__scopeRadioGroup:r})]})})},"RadioGroupItem")),X5=g.forwardRef(ut(function(t,n){const{__scopeRadioGroup:r,...o}=t,i=ts(r);return f.jsx(H5,{...i,...o,ref:n})},"RadioGroupItemBubbleInput")),Q5=g.forwardRef(ut(function(t,n){const{__scopeRadioGroup:r,...o}=t,i=ts(r);return f.jsx(B5,{...i,...o,ref:n})},"RadioGroupIndicator"));const H1=A.forwardRef(({options:e,value:t,onValueChange:n,disabled:r,className:o},i)=>{const a=Yn();return f.jsx(W5,{ref:i,value:t,onValueChange:n,disabled:r,"data-testid":"radio-group","aria-invalid":(a==null?void 0:a.invalid)||void 0,"aria-describedby":a==null?void 0:a.describedBy,className:q("flex flex-col gap-2",o),children:e.map(s=>f.jsxs("label",{className:"flex items-center gap-2 text-sm text-foreground","data-disabled":s.disabled||void 0,children:[f.jsx(K5,{value:s.value,disabled:s.disabled,"data-testid":`radio-${s.value}`,className:q("flex size-4 shrink-0 items-center justify-center rounded-full border border-input bg-panel","data-[state=checked]:border-primary","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-35","transition-colors motion-reduce:transition-none"),children:f.jsx(Q5,{className:"size-2 rounded-full bg-primary"})}),s.label]},s.value))})});H1.displayName="RadioGroup";var Z5=Object.defineProperty,Un=(e,t)=>Z5(e,"name",{value:t,configurable:!0}),wc="Switch",[J5,TB]=Ve(wc),[eM,Cc]=J5(wc);function U1(e){const{__scopeSwitch:t,checked:n,children:r,defaultChecked:o,disabled:i,form:a,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[h,p]=ct({prop:n,defaultProp:o??!1,onChange:l,caller:wc}),[b,x]=g.useState(null),[E,T]=g.useState(null),v=g.useRef(!1),[y,C]=g.useReducer(P=>P+1,0),I=b?!!a||!!b.closest("form"):!0,w={checked:h,setChecked:p,disabled:i,control:b,setControl:x,name:s,form:a,value:c,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:C,required:u,defaultChecked:o,isFormControl:I,bubbleInput:E,setBubbleInput:T};return f.jsx(eM,{scope:t,...w,children:$1(d)?d(w):r})}Un(U1,"SwitchProvider");var tM="SwitchTrigger",nM=g.forwardRef(Un(function({__scopeSwitch:t,onClick:n,...r},o){const{control:i,form:a,value:s,disabled:l,checked:u,required:c,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:p,onUserInteraction:b,isFormControl:x,bubbleInput:E}=Cc(tM,t),T=he(o,d),v=g.useRef(u);return g.useEffect(()=>{const y=a?i==null?void 0:i.ownerDocument.getElementById(a):i==null?void 0:i.form;if(y instanceof HTMLFormElement){const C=Un(()=>h(v.current),"reset");return y.addEventListener("reset",C),()=>y.removeEventListener("reset",C)}},[i,a,h]),f.jsx(ie.button,{type:"button",role:"switch","aria-checked":u,"aria-required":c,"data-state":kc(u),"data-disabled":l?"":void 0,disabled:l,value:s,...r,ref:T,onClick:J(n,y=>{b(),h(C=>!C),E&&x&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})},"SwitchTrigger")),rM=g.forwardRef(Un(function(t,n){const{__scopeSwitch:r,name:o,checked:i,defaultChecked:a,required:s,disabled:l,value:u,onCheckedChange:c,form:d,...h}=t;return f.jsx(U1,{__scopeSwitch:r,checked:i,defaultChecked:a,disabled:l,required:s,onCheckedChange:c,name:o,form:d,value:u,internal_do_not_use_render:({isFormControl:p})=>f.jsxs(f.Fragment,{children:[f.jsx(nM,{...h,ref:n,__scopeSwitch:r}),p&&f.jsx(sM,{__scopeSwitch:r})]})})},"Switch")),oM="SwitchThumb",iM=g.forwardRef(Un(function(t,n){const{__scopeSwitch:r,...o}=t,i=Cc(oM,r);return f.jsx(ie.span,{"data-state":kc(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:n})},"SwitchThumb")),aM="SwitchBubbleInput",sM=g.forwardRef(Un(function({__scopeSwitch:t,onClick:n,...r},o){const{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:s,checked:l,defaultChecked:u,required:c,disabled:d,name:h,value:p,form:b,bubbleInput:x,setBubbleInput:E}=Cc(aM,t),T=he(o,E),v=di(i),y=g.useRef(!1),C=g.useRef(l),I=g.useRef(s);g.useEffect(()=>{const P=x;if(!P)return;const L=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(L,"checked").set,D=s!==I.current;I.current=s;const M=C.current!==l;C.current=l;const W=!(D&&a.current);if(M&&R){y.current=!D;const z=new Event("click",{bubbles:W});R.call(P,l),P.dispatchEvent(z),y.current=!1}},[x,l,a,s]);const w=g.useRef(l);return f.jsx(ie.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??w.current,required:c,disabled:d,name:h,value:p,form:b,...r,tabIndex:-1,ref:T,onClick:J(n,P=>{y.current&&P.stopPropagation()}),style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function $1(e){return typeof e=="function"}Un($1,"isFunction");function kc(e){return e?"checked":"unchecked"}Un(kc,"getState");const z1=A.forwardRef(({checked:e,onCheckedChange:t,label:n,description:r,disabled:o,className:i,id:a},s)=>{const l=Yn(),u=(l==null?void 0:l.id)??a,c=f.jsx(rM,{ref:s,id:u,"data-testid":"switch",checked:e,onCheckedChange:t,disabled:o,"aria-describedby":l==null?void 0:l.describedBy,className:q("relative h-5 w-9 shrink-0 rounded-full border border-input bg-panel-2","data-[state=checked]:border-primary data-[state=checked]:bg-primary","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-35","transition-colors motion-reduce:transition-none"),children:f.jsx(iM,{className:"block size-4 translate-x-0.5 rounded-full bg-foreground transition-transform motion-reduce:transition-none data-[state=checked]:translate-x-4 data-[state=checked]:bg-primary-foreground"})});return n?f.jsxs("label",{htmlFor:u,className:q("flex items-center justify-between gap-4",i),children:[f.jsxs("span",{className:"flex flex-col",children:[f.jsx("span",{className:"text-sm font-medium text-foreground",children:n}),r?f.jsx("span",{className:"text-xs text-text-3",children:r}):null]}),c]}):f.jsx("span",{className:i,children:c})});z1.displayName="Switch";const lM=$n(["fixed left-1/2 top-1/2 z-modal -translate-x-1/2 -translate-y-1/2","rounded-lg border border-border bg-panel shadow-lg","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","motion-reduce:animate-none"],{variants:{size:{sm:"w-[min(24rem,calc(100vw-2rem))]",md:"w-[min(32rem,calc(100vw-2rem))]",lg:"w-[min(48rem,calc(100vw-2rem))]"}},defaultVariants:{size:"md"}}),Sc=A.forwardRef(({open:e,onOpenChange:t,title:n,description:r,size:o,className:i,children:a},s)=>f.jsx(l1,{open:e,onOpenChange:t,children:f.jsxs(d1,{children:[f.jsx(f1,{"data-testid":"modal-overlay",className:"fixed inset-0 z-overlay bg-overlay data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 motion-reduce:animate-none"}),f.jsxs(h1,{ref:s,"data-testid":"modal-panel",className:q(lM({size:o}),i),children:[f.jsxs("div",{className:"flex items-start justify-between gap-4 p-4 pb-0",children:[f.jsx("div",{className:"flex flex-col gap-1",children:f.jsx($4,{className:"text-base font-semibold text-foreground",children:n})}),f.jsx(Y4,{"data-testid":"modal-close","aria-label":"Close",className:"shrink-0 rounded p-1 text-text-3 hover:bg-panel-2 hover:text-foreground",children:f.jsx(Qa,{"aria-hidden":"true",className:"size-4"})})]}),r?f.jsx(V4,{className:"px-4 pt-1 text-sm text-text-2",children:r}):null,f.jsx("div",{className:"flex flex-col gap-4 p-4",children:a})]})]})}));Sc.displayName="Modal";function V1({open:e,onOpenChange:t,title:n,message:r,confirmLabel:o="Confirm",cancelLabel:i="Cancel",intent:a="default",onConfirm:s}){const[l,u]=A.useState(!1),c=async()=>{u(!0);try{await s(),t(!1)}catch{}finally{u(!1)}};return f.jsxs(Sc,{open:e,onOpenChange:l?()=>{}:t,title:n,size:"sm",children:[f.jsx("p",{className:"text-sm text-text-2",children:r}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx(fn,{"data-testid":"cancel-button",variant:"ghost",disabled:l,onClick:()=>t(!1),children:i}),f.jsxs(fn,{"data-testid":"confirm-button",variant:a==="destructive"?"destructive":"default",className:a==="destructive"?"border-destructive":void 0,disabled:l,onClick:()=>void c(),children:[l?f.jsx(b4,{"aria-hidden":"true",className:"size-3.5 animate-spin motion-reduce:animate-none"}):null,o]})]})]})}V1.displayName="ConfirmDialog";var uM=Object.defineProperty,De=(e,t)=>uM(e,"name",{value:t,configurable:!0}),cM=["Enter"," "],dM=["ArrowDown","PageUp","Home"],W1=["ArrowUp","PageDown","End"],fM=[...dM,...W1],ns="Menu",[$l,hM,pM]=oo(ns),[Ar,Y1]=Ve(ns,[pM,Kn,co]),Ac=Kn(),q1=co(),[mM,mi]=Ar(ns),[gM,_c]=Ar(ns),bM=De(e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,s=Ac(t),[l,u]=g.useState(null),c=g.useRef(!1),d=Ue(i),h=qn(o);return g.useEffect(()=>{const p=De(()=>{c.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},"handleKeyDown"),b=De(()=>c.current=!1,"handlePointer");return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),g.useEffect(()=>{if(!n)return;const p=De(()=>d(!1),"handleBlur");return window.addEventListener("blur",p),()=>window.removeEventListener("blur",p)},[n,d]),f.jsx(za,{...s,children:f.jsx(mM,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:f.jsx(gM,{scope:t,onClose:g.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})},"Menu"),xM=g.forwardRef(De(function(t,n){const{__scopeMenu:r,...o}=t,i=Ac(r);return f.jsx(Va,{...i,...o,ref:n})},"MenuAnchor")),G1="MenuPortal",[EM,TM]=Ar(G1,{forceMount:void 0}),yM=De(e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=mi(G1,t);return f.jsx(EM,{scope:t,forceMount:n,children:f.jsx(Ze,{present:n||i.open,children:f.jsx(uo,{asChild:!0,container:o,children:r})})})},"MenuPortal"),Dn="MenuContent",[vM,K1]=Ar(Dn),wM=g.forwardRef(De(function(t,n){const r=TM(Dn,t.__scopeMenu),{forceMount:o=r.forceMount,...i}=t,a=mi(Dn,t.__scopeMenu),s=_c(Dn,t.__scopeMenu);return f.jsx($l.Provider,{scope:t.__scopeMenu,children:f.jsx(Ze,{present:o||a.open,children:f.jsx($l.Slot,{scope:t.__scopeMenu,children:s.modal?f.jsx(CM,{...i,ref:n}):f.jsx(kM,{...i,ref:n})})})})},"MenuContent")),CM=g.forwardRef(De(function(t,n){const r=mi(Dn,t.__scopeMenu),o=g.useRef(null),i=he(n,o);return g.useEffect(()=>{const a=o.current;if(a)return Ya(a)},[]),f.jsx(X1,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:J(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),kM=g.forwardRef(De(function(t,n){const r=mi(Dn,t.__scopeMenu);return f.jsx(X1,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),SM=Qt("MenuContent.ScrollLock"),X1=g.forwardRef(De(function(t,n){const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:b,disableOutsideScroll:x,...E}=t,T=mi(Dn,r),v=_c(Dn,r),y=Ac(r),C=q1(r),I=hM(r),[w,P]=g.useState(null),L=g.useRef(null),F=he(n,L,T.onContentChange),R=g.useRef(0),D=g.useRef(""),M=g.useRef(0),W=g.useRef(null),z=g.useRef("right"),$=g.useRef(0),H=x?fi:g.Fragment,V=x?{as:SM,allowPinchZoom:!0}:void 0,Q=De(k=>{var te,oe;const ue=D.current+k,j=I().filter(pe=>!pe.disabled),_=document.activeElement,ae=(te=j.find(pe=>pe.ref.current===_))==null?void 0:te.textValue,K=j.map(pe=>pe.textValue),ee=tx(K,ue,ae),ce=(oe=j.find(pe=>pe.textValue===ee))==null?void 0:oe.ref.current;De((function pe(be){D.current=be,window.clearTimeout(R.current),be!==""&&(R.current=window.setTimeout(()=>pe(""),1e3))}),"updateSearch")(ue),ce&&setTimeout(()=>ce.focus())},"handleTypeaheadSearch");g.useEffect(()=>()=>window.clearTimeout(R.current),[]),ao();const re=g.useCallback(k=>{var j,_;return z.current===((j=W.current)==null?void 0:j.side)&&rx(k,(_=W.current)==null?void 0:_.area)},[]);return f.jsx(vM,{scope:r,searchRef:D,onItemEnter:g.useCallback(k=>{re(k)&&k.preventDefault()},[re]),onItemLeave:g.useCallback(k=>{var ue;re(k)||((ue=L.current)==null||ue.focus(),P(null))},[re]),onTriggerLeave:g.useCallback(k=>{re(k)&&k.preventDefault()},[re]),pointerGraceTimerRef:M,onPointerGraceIntentChange:g.useCallback(k=>{W.current=k},[]),children:f.jsx(H,{...V,children:f.jsx(Ma,{asChild:!0,trapped:i,onMountAutoFocus:J(a,k=>{var ue;k.preventDefault(),(ue=L.current)==null||ue.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:f.jsx(io,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:b,children:f.jsx(Ec,{asChild:!0,...C,dir:v.dir,orientation:"vertical",loop:o,currentTabStopId:w,onCurrentTabStopIdChange:P,onEntryFocus:J(u,k=>{v.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(Wa,{role:"menu","aria-orientation":"vertical","data-state":Q1(T.open),"data-radix-menu-content":"",dir:v.dir,...y,...E,ref:F,style:{outline:"none",...E.style},onKeyDown:J(E.onKeyDown,k=>{const j=k.target.closest("[data-radix-menu-content]")===k.currentTarget,_=k.ctrlKey||k.altKey||k.metaKey,ae=k.key.length===1;j&&(k.key==="Tab"&&k.preventDefault(),!_&&ae&&Q(k.key));const K=L.current;if(k.target!==K||!fM.includes(k.key))return;k.preventDefault();const ce=I().filter(te=>!te.disabled).map(te=>te.ref.current);W1.includes(k.key)&&ce.reverse(),J1(ce)}),onBlur:J(t.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(R.current),D.current="")}),onPointerMove:J(t.onPointerMove,da(k=>{const ue=k.target,j=$.current!==k.clientX;if(k.currentTarget.contains(ue)&&j){const _=k.clientX>$.current?"right":"left";z.current=_,$.current=k.clientX}}))})})})})})})},"MenuContentImpl")),AM=g.forwardRef(De(function(t,n){const{__scopeMenu:r,...o}=t;return f.jsx(ie.div,{...o,ref:n})},"MenuLabel")),zl="MenuItem",Lh="menu.itemSelect",_M=g.forwardRef(De(function(t,n){const{disabled:r=!1,onSelect:o,...i}=t,a=g.useRef(null),s=_c(zl,t.__scopeMenu),l=K1(zl,t.__scopeMenu),u=he(n,a),c=g.useRef(!1),d=De(()=>{const h=a.current;if(!r&&h){const p=new CustomEvent(Lh,{bubbles:!0,cancelable:!0});h.addEventListener(Lh,b=>o==null?void 0:o(b),{once:!0}),ma(h,p),p.defaultPrevented?c.current=!1:s.onClose()}},"handleSelect");return f.jsx(IM,{...i,ref:u,disabled:r,onClick:J(t.onClick,d),onPointerDown:h=>{var p;(p=t.onPointerDown)==null||p.call(t,h),c.current=!0},onPointerUp:J(t.onPointerUp,h=>{var p;c.current||(p=h.currentTarget)==null||p.click()}),onKeyDown:J(t.onKeyDown,h=>{r||h.target!==h.currentTarget||l.searchRef.current!==""&&h.key===" "||cM.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})},"MenuItem")),IM=g.forwardRef(De(function(t,n){const{__scopeMenu:r,disabled:o=!1,textValue:i,...a}=t,s=K1(zl,r),l=q1(r),u=g.useRef(null),c=he(n,u),[d,h]=g.useState(!1),[p,b]=g.useState("");return g.useEffect(()=>{const x=u.current;x&&b((x.textContent??"").trim())},[a.children]),f.jsx($l.ItemSlot,{scope:r,disabled:o,textValue:i??p,children:f.jsx(Tc,{asChild:!0,...l,focusable:!o,children:f.jsx(ie.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:c,onPointerMove:J(t.onPointerMove,da(x=>{o?s.onItemLeave(x):(s.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(t.onPointerLeave,da(x=>s.onItemLeave(x))),onFocus:J(t.onFocus,()=>h(!0)),onBlur:J(t.onBlur,()=>h(!1))})})})},"MenuItemImpl")),NM="MenuRadioGroup",[yB,vB]=Ar(NM,{value:void 0,onValueChange:De(()=>{},"onValueChange")}),RM="MenuItemIndicator",[wB,CB]=Ar(RM,{checked:!1}),PM=g.forwardRef(De(function(t,n){const{__scopeMenu:r,...o}=t;return f.jsx(ie.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),OM="MenuSub",[kB,SB]=Ar(OM);function Q1(e){return e?"open":"closed"}De(Q1,"getOpenState");function Z1(e){return e==="indeterminate"}De(Z1,"isIndeterminate");function LM(e){return Z1(e)?"indeterminate":e?"checked":"unchecked"}De(LM,"getCheckedState");function J1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}De(J1,"focusFirst");function ex(e,t){return e.map((n,r)=>e[(t+r)%e.length])}De(ex,"wrapArray");function tx(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=ex(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}De(tx,"getNextMatch");function nx(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],l=t[a],u=s.x,c=s.y,d=l.x,h=l.y;c>r!=h>r&&n<(d-u)*(r-c)/(h-c)+u&&(o=!o)}return o}De(nx,"isPointInPolygon");function rx(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return nx(n,t)}De(rx,"isPointerInGraceArea");function da(e){return t=>t.pointerType==="mouse"?e(t):void 0}De(da,"whenMouse");var DM=bM,MM=xM,FM=yM,BM=wM,jM=AM,HM=_M,UM=PM,$M=Object.defineProperty,_r=(e,t)=>$M(e,"name",{value:t,configurable:!0}),Ic="DropdownMenu",[zM,AB]=Ve(Ic,[Y1]),Ir=Y1(),[VM,ox]=zM(Ic),WM=_r(e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=Ir(t),u=g.useRef(null),[c,d]=ct({prop:o,defaultProp:i??!1,onChange:a,caller:Ic});return f.jsx(VM,{scope:t,triggerId:Ke(),triggerRef:u,contentId:Ke(),open:c,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(h=>!h),[d]),modal:s,children:f.jsx(DM,{...l,open:c,onOpenChange:d,dir:r,modal:s,children:n})})},"DropdownMenu"),YM="DropdownMenuTrigger",qM=g.forwardRef(_r(function(t,n){const{__scopeDropdownMenu:r,disabled:o=!1,...i}=t,a=ox(YM,r),s=Ir(r),l=he(n,a.triggerRef);return f.jsx(MM,{asChild:!0,...s,children:f.jsx(ie.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:l,onPointerDown:J(t.onPointerDown,u=>{!o&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:J(t.onKeyDown,u=>{o||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),GM=_r(e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ir(t);return f.jsx(FM,{...r,...n})},"DropdownMenuPortal"),KM="DropdownMenuContent",XM=g.forwardRef(_r(function(t,n){const{__scopeDropdownMenu:r,...o}=t,i=ox(KM,r),a=Ir(r),s=g.useRef(!1);return f.jsx(BM,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...o,ref:n,onCloseAutoFocus:J(t.onCloseAutoFocus,l=>{var u;s.current||(u=i.triggerRef.current)==null||u.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:J(t.onInteractOutside,l=>{const u=l.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0,d=u.button===2||c;(!i.modal||d)&&(s.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),QM=g.forwardRef(_r(function(t,n){const{__scopeDropdownMenu:r,...o}=t,i=Ir(r);return f.jsx(jM,{...i,...o,ref:n})},"DropdownMenuLabel")),ZM=g.forwardRef(_r(function(t,n){const{__scopeDropdownMenu:r,...o}=t,i=Ir(r);return f.jsx(HM,{...i,...o,ref:n})},"DropdownMenuItem")),JM=g.forwardRef(_r(function(t,n){const{__scopeDropdownMenu:r,...o}=t,i=Ir(r);return f.jsx(UM,{...i,...o,ref:n})},"DropdownMenuSeparator")),e8=WM,t8=qM,n8=GM,r8=XM,o8=QM,i8=ZM,a8=JM;const ix=({children:e,...t})=>{const n=[],r=[];return A.Children.forEach(e,o=>{A.isValidElement(o)&&o.type===Nc?n.push(o):r.push(o)}),f.jsxs(e8,{...t,children:[n,f.jsx(n8,{children:f.jsx(r8,{className:q("z-dropdown min-w-[8rem] overflow-hidden rounded-md border border-border bg-panel p-1 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","motion-reduce:animate-none"),children:r})})]})};ix.displayName="DropdownMenu";const Nc=A.forwardRef(({className:e,...t},n)=>f.jsx(t8,{ref:n,className:q("inline-flex",e),...t}));Nc.displayName="DropdownMenuTrigger";const s8=["flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-panel data-[disabled]:pointer-events-none data-[disabled]:opacity-35"],ax=A.forwardRef(({className:e,...t},n)=>f.jsx(i8,{ref:n,className:q(s8,e),...t}));ax.displayName="DropdownMenuItem";const sx=A.forwardRef(({className:e,...t},n)=>f.jsx(a8,{ref:n,className:q("-mx-1 my-1 h-px bg-border",e),...t}));sx.displayName="DropdownMenuSeparator";const lx=A.forwardRef(({className:e,...t},n)=>f.jsx(o8,{ref:n,className:q("px-2 py-1.5 text-xs font-medium text-text-3",e),...t}));lx.displayName="DropdownMenuLabel";var l8=Object.defineProperty,Qn=(e,t)=>l8(e,"name",{value:t,configurable:!0}),Rc="Popover",[ux,_B]=Ve(Rc,[Kn]),Pc=Kn(),[u8,fo]=ux(Rc),c8=Qn(e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=Pc(t),l=g.useRef(null),[u,c]=g.useState(!1),[d,h]=ct({prop:r,defaultProp:o??!1,onChange:i,caller:Rc});return f.jsx(za,{...s,children:f.jsx(u8,{scope:t,contentId:Ke(),triggerRef:l,open:d,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:u,onCustomAnchorAdd:g.useCallback(()=>c(!0),[]),onCustomAnchorRemove:g.useCallback(()=>c(!1),[]),modal:a,children:n})})},"Popover"),d8="PopoverTrigger",f8=g.forwardRef(Qn(function(t,n){const{__scopePopover:r,...o}=t,i=fo(d8,r),a=Pc(r),s=he(n,i.triggerRef),l=f.jsx(ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Oc(i.open),...o,ref:s,onClick:J(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:f.jsx(Va,{asChild:!0,...a,children:l})},"PopoverTrigger")),cx="PopoverPortal",[h8,p8]=ux(cx,{forceMount:void 0}),m8=Qn(e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=fo(cx,t);return f.jsx(h8,{scope:t,forceMount:n,children:f.jsx(Ze,{present:n||i.open,children:f.jsx(uo,{asChild:!0,container:o,children:r})})})},"PopoverPortal"),Xo="PopoverContent",g8=g.forwardRef(Qn(function(t,n){const r=p8(Xo,t.__scopePopover),{forceMount:o=r.forceMount,...i}=t,a=fo(Xo,t.__scopePopover);return f.jsx(Ze,{present:o||a.open,children:a.modal?f.jsx(x8,{...i,ref:n}):f.jsx(E8,{...i,ref:n})})},"PopoverContent")),b8=Qt("PopoverContent.RemoveScroll"),x8=g.forwardRef(Qn(function(t,n){const r=fo(Xo,t.__scopePopover),o=g.useRef(null),i=he(n,o),a=g.useRef(!1);return g.useEffect(()=>{const s=o.current;if(s)return Ya(s)},[]),f.jsx(fi,{as:b8,allowPinchZoom:!0,children:f.jsx(dx,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(t.onCloseAutoFocus,s=>{var l;s.preventDefault(),a.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:J(t.onPointerDownOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;a.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:J(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),E8=g.forwardRef(Qn(function(t,n){const r=fo(Xo,t.__scopePopover),o=g.useRef(!1),i=g.useRef(!1);return f.jsx(dx,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=t.onCloseAutoFocus)==null||s.call(t,a),a.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:a=>{var u,c;(u=t.onInteractOutside)==null||u.call(t,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((c=r.triggerRef.current)==null?void 0:c.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})},"PopoverContentNonModal")),dx=g.forwardRef(Qn(function(t,n){const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,...h}=t,p=fo(Xo,r),b=Pc(r);return ao(),f.jsx(Ma,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:f.jsx(io,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:f.jsx(Wa,{"data-state":Oc(p.open),role:"dialog",id:p.contentId,...b,...h,ref:n,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function Oc(e){return e?"open":"closed"}Qn(Oc,"getState");var T8=c8,y8=f8,v8=m8,w8=g8;const C8=T8,fx=A.forwardRef(({className:e,...t},n)=>f.jsx(y8,{ref:n,className:q("inline-flex",e),...t}));fx.displayName="PopoverTrigger";const hx=A.forwardRef(({className:e,sideOffset:t=4,...n},r)=>f.jsx(v8,{children:f.jsx(w8,{ref:r,sideOffset:t,className:q("z-popover rounded-lg border border-border bg-panel-2 p-3 shadow-lg outline-none","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","motion-reduce:animate-none",e),...n})}));hx.displayName="PopoverContent";var k8=Object.defineProperty,nt=(e,t)=>k8(e,"name",{value:t,configurable:!0}),[Lc,IB]=Ve("Tooltip",[Kn]),Dc=Kn(),S8="TooltipProvider",A8=700,Vl="tooltip.open",[_8,Mc]=Lc(S8),I8=nt(e=>{const{__scopeTooltip:t,delayDuration:n=A8,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,a=g.useRef(!0),s=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),f.jsx(_8,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:g.useCallback(()=>{r<=0||(window.clearTimeout(l.current),a.current=!1)},[r]),onClose:g.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:g.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:i})},"TooltipProvider"),Wl="Tooltip",[N8,gi]=Lc(Wl),R8=nt(e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=Mc(Wl,e.__scopeTooltip),u=Dc(t),[c,d]=g.useState(null),[h,p]=g.useState(void 0),b=Ke(),x=g.useRef(0),E=a??l.disableHoverableContent,T=s??l.delayDuration,v=g.useRef(!1),[y,C]=ct({prop:r,defaultProp:o??!1,onChange:nt(R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(Vl))):l.onClose(),i==null||i(R)},"onChange"),caller:Wl}),I=g.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),w=g.useCallback(()=>{window.clearTimeout(x.current),x.current=0,v.current=!1,C(!0)},[C]),P=g.useCallback(()=>{window.clearTimeout(x.current),x.current=0,C(!1)},[C]),L=g.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{v.current=!0,C(!0),x.current=0},T)},[T,C]);g.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]);const F=h??b;return f.jsx(za,{...u,children:f.jsx(N8,{scope:t,contentId:F,setContentId:p,open:y,stateAttribute:I,trigger:c,onTriggerChange:d,onTriggerEnter:g.useCallback(()=>{l.isOpenDelayedRef.current?L():w()},[l.isOpenDelayedRef,L,w]),onTriggerLeave:g.useCallback(()=>{E?P():(window.clearTimeout(x.current),x.current=0)},[P,E]),onOpen:w,onClose:P,disableHoverableContent:E,children:n})})},"Tooltip"),Dh="TooltipTrigger",P8=g.forwardRef(nt(function(t,n){const{__scopeTooltip:r,...o}=t,i=gi(Dh,r),a=Mc(Dh,r),s=Dc(r),l=g.useRef(null),u=he(n,l,i.onTriggerChange),c=g.useRef(!1),d=g.useRef(!1),h=g.useCallback(()=>c.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),f.jsx(Va,{asChild:!0,...s,children:f.jsx(ie.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:u,onPointerMove:J(t.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:J(t.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:J(t.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:J(t.onFocus,()=>{c.current||i.onOpen()}),onBlur:J(t.onBlur,i.onClose),onClick:J(t.onClick,i.onClose)})})},"TooltipTrigger")),px="TooltipPortal",[O8,L8]=Lc(px,{forceMount:void 0}),D8=nt(e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=gi(px,t);return f.jsx(O8,{scope:t,forceMount:n,children:f.jsx(Ze,{present:n||i.open,children:f.jsx(uo,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),Qo="TooltipContent",M8=g.forwardRef(nt(function(t,n){const r=L8(Qo,t.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...a}=t,s=gi(Qo,t.__scopeTooltip);return f.jsx(Ze,{present:o||s.open,children:s.disableHoverableContent?f.jsx(mx,{side:i,...a,ref:n}):f.jsx(F8,{side:i,...a,ref:n})})},"TooltipContent")),F8=g.forwardRef(nt(function(t,n){const r=gi(Qo,t.__scopeTooltip),o=Mc(Qo,t.__scopeTooltip),i=g.useRef(null),a=he(n,i),[s,l]=g.useState(null),{trigger:u,onClose:c}=r,d=i.current,{onPointerInTransitChange:h}=o,p=g.useCallback(()=>{l(null),h(!1)},[h]),b=g.useCallback((x,E)=>{const T=x.currentTarget,v={x:x.clientX,y:x.clientY},y=gx(v,T.getBoundingClientRect()),C=bx(v,y),I=xx(E.getBoundingClientRect()),w=Tx([...C,...I]);l(w),h(!0)},[h]);return g.useEffect(()=>()=>p(),[p]),g.useEffect(()=>{if(u&&d){const x=nt(T=>b(T,d),"handleTriggerLeave"),E=nt(T=>b(T,u),"handleContentLeave");return u.addEventListener("pointerleave",x),d.addEventListener("pointerleave",E),()=>{u.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",E)}}},[u,d,b,p]),g.useEffect(()=>{if(s){const x=nt(E=>{const T=E.target,v={x:E.clientX,y:E.clientY},y=(u==null?void 0:u.contains(T))||(d==null?void 0:d.contains(T)),C=!Ex(v,s);y?p():C&&(p(),c())},"handleTrackPointerGrace");return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[u,d,s,c,p]),f.jsx(mx,{...t,ref:a})},"TooltipContentHoverable")),B8=ip("TooltipContent"),mx=g.forwardRef(nt(function(t,n){const{__scopeTooltip:r,children:o,"aria-label":i,id:a,onEscapeKeyDown:s,onPointerDownOutside:l,...u}=t,c=gi(Qo,r),d=Dc(r),{onClose:h}=c;g.useEffect(()=>(document.addEventListener(Vl,h),()=>document.removeEventListener(Vl,h)),[h]),g.useEffect(()=>{if(c.trigger){const b=nt(x=>{x.target instanceof Node&&x.target.contains(c.trigger)&&h()},"handleScroll");return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[c.trigger,h]);const{setContentId:p}=c;return $e(()=>(p(a),()=>{p(void 0)}),[a,p]),f.jsx(io,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:b=>b.preventDefault(),onDismiss:h,children:f.jsxs(Wa,{"data-state":c.stateAttribute,role:i?void 0:"tooltip",id:i?void 0:c.contentId,...d,...u,ref:n,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(B8,{children:o}),i?f.jsx(CL,{id:c.contentId,role:"tooltip",children:i}):null]})})},"TooltipContentImpl"));function gx(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}nt(gx,"getExitSideFromRect");function bx(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}nt(bx,"getPaddedExitPoints");function xx(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}nt(xx,"getPointsFromRect");function Ex(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],l=t[a],u=s.x,c=s.y,d=l.x,h=l.y;c>r!=h>r&&n<(d-u)*(r-c)/(h-c)+u&&(o=!o)}return o}nt(Ex,"isPointInPolygon");function Tx(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),yx(t)}nt(Tx,"getHull");function yx(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}nt(yx,"getHullPresorted");var j8=I8,H8=R8,U8=P8,$8=D8,z8=M8;function vx({content:e,children:t,delay:n=300,className:r}){return f.jsx(j8,{delayDuration:n,children:f.jsxs(H8,{children:[f.jsx(U8,{asChild:!0,children:t}),f.jsx($8,{children:f.jsx(z8,{sideOffset:4,className:q("z-tooltip rounded-md border border-border bg-panel px-2 py-1 text-xs text-foreground shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","motion-reduce:animate-none",r),children:e})})]})})}vx.displayName="Tooltip";var V8=Object.defineProperty,Fe=(e,t)=>V8(e,"name",{value:t,configurable:!0}),wx="ToastProvider",[Fc,Cx,W8]=oo("Toast"),[kx,NB]=Ve("Toast",[W8]),[Y8,rs]=kx(wx),q8=Fe(e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,announcerContainer:a,children:s}=e,[l,u]=g.useState(null),[c,d]=g.useState(0),h=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${wx}\`. Expected non-empty \`string\`.`),f.jsx(Fc.Provider,{scope:t,children:f.jsx(Y8,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:l,onViewportChange:u,onToastAdd:g.useCallback(()=>d(p=>p+1),[]),onToastRemove:g.useCallback(()=>d(p=>p-1),[]),isClosePausedRef:h,announcerContainer:a,children:s})})},"ToastProvider"),G8="ToastViewport",K8=["F8"],Yl="toast.viewportPause",ql="toast.viewportResume",X8=g.forwardRef(Fe(function(t,n){const{__scopeToast:r,hotkey:o=K8,label:i="Notifications ({hotkey})",...a}=t,s=rs(G8,r),l=Cx(r),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),h=g.useRef(null),p=he(n,h,s.onViewportChange),b=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=s.toastCount>0;g.useEffect(()=>{const T=Fe(v=>{var C;o.length!==0&&o.every(I=>v[I]||v.code===I)&&((C=h.current)==null||C.focus())},"handleKeyDown");return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[o]),g.useEffect(()=>{const T=u.current,v=h.current;if(x&&T&&v){const y=Fe(()=>{if(!s.isClosePausedRef.current){const P=new CustomEvent(Yl);v.dispatchEvent(P),s.isClosePausedRef.current=!0}},"handlePause"),C=Fe(()=>{if(s.isClosePausedRef.current){const P=new CustomEvent(ql);v.dispatchEvent(P),s.isClosePausedRef.current=!1}},"handleResume"),I=Fe(P=>{!T.contains(P.relatedTarget)&&C()},"handleFocusOutResume"),w=Fe(()=>{T.contains(document.activeElement)||C()},"handlePointerLeaveResume");return T.addEventListener("focusin",y),T.addEventListener("focusout",I),T.addEventListener("pointermove",y),T.addEventListener("pointerleave",w),window.addEventListener("blur",y),window.addEventListener("focus",C),()=>{T.removeEventListener("focusin",y),T.removeEventListener("focusout",I),T.removeEventListener("pointermove",y),T.removeEventListener("pointerleave",w),window.removeEventListener("blur",y),window.removeEventListener("focus",C)}}},[x,s.isClosePausedRef]);const E=g.useCallback(({tabbingDirection:T})=>{const y=l().map(C=>{const I=C.ref.current,w=[I,..._x(I)];return T==="forwards"?w:w.reverse()});return(T==="forwards"?y.reverse():y).flat()},[l]);return g.useEffect(()=>{const T=h.current;if(T){const v=Fe(y=>{var w,P,L;const C=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!C){const F=document.activeElement,R=y.shiftKey;if(y.target===T&&R){(w=c.current)==null||w.focus();return}const W=E({tabbingDirection:R?"backwards":"forwards"}),z=W.findIndex($=>$===F);qi(W.slice(z+1))?y.preventDefault():R?(P=c.current)==null||P.focus():(L=d.current)==null||L.focus()}},"handleKeyDown");return T.addEventListener("keydown",v),()=>T.removeEventListener("keydown",v)}},[l,E]),f.jsxs(J6,{ref:u,role:"region","aria-label":i.replace("{hotkey}",b),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&f.jsx(Mh,{ref:c,onFocusFromOutsideViewport:()=>{const T=E({tabbingDirection:"forwards"});qi(T)}}),f.jsx(Fc.Slot,{scope:r,children:f.jsx(ie.ol,{tabIndex:-1,...a,ref:p})}),x&&f.jsx(Mh,{ref:d,onFocusFromOutsideViewport:()=>{const T=E({tabbingDirection:"backwards"});qi(T)}})]})},"ToastViewport")),Q8="ToastFocusProxy",Mh=g.forwardRef(Fe(function(t,n){const{__scopeToast:r,onFocusFromOutsideViewport:o,...i}=t,a=rs(Q8,r);return f.jsx(ic,{tabIndex:0,...i,ref:n,style:{position:"fixed"},onFocus:s=>{var c;const l=s.relatedTarget;!((c=a.viewport)!=null&&c.contains(l))&&o()}})},"ToastFocusProxy")),os="Toast",Z8="toast.swipeStart",J8="toast.swipeMove",e9="toast.swipeCancel",t9="toast.swipeEnd",n9=g.forwardRef(Fe(function(t,n){const{forceMount:r,open:o,defaultOpen:i,onOpenChange:a,...s}=t,[l,u]=ct({prop:o,defaultProp:i??!0,onChange:a,caller:os});return f.jsx(Ze,{present:r||l,children:f.jsx(i9,{open:l,...s,ref:n,onClose:()=>u(!1),onPause:Ue(t.onPause),onResume:Ue(t.onResume),onSwipeStart:J(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:J(t.onSwipeMove,c=>{const{x:d,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:J(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:J(t.onSwipeEnd,c=>{const{x:d,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),u(!1)})})})},"Toast")),[r9,o9]=kx(os,{onClose(){}}),i9=g.forwardRef(Fe(function(t,n){const{__scopeToast:r,type:o="foreground",duration:i,open:a,onClose:s,onEscapeKeyDown:l,onPause:u,onResume:c,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:b,...x}=t,E=rs(os,r),T=Cx(r),[v,y]=g.useState(null),C=he(n,y),I=g.useRef(null),w=g.useRef(null),P=i||E.duration,L=g.useRef(0),F=g.useRef(P),R=g.useRef(0),{onToastAdd:D,onToastRemove:M}=E,W=Ue(()=>{var V;(v==null?void 0:v.contains(document.activeElement))&&((V=E.viewport)==null||V.focus()),s()}),z=g.useCallback(H=>{!H||H===1/0||(window.clearTimeout(R.current),L.current=new Date().getTime(),R.current=window.setTimeout(W,H))},[W]);g.useEffect(()=>{const H=E.viewport;if(H){const V=Fe(()=>{z(F.current),c==null||c()},"handleResume"),Q=Fe(()=>{const re=new Date().getTime()-L.current;F.current=F.current-re,window.clearTimeout(R.current),u==null||u()},"handlePause");return H.addEventListener(Yl,Q),H.addEventListener(ql,V),()=>{H.removeEventListener(Yl,Q),H.removeEventListener(ql,V)}}},[E.viewport,P,u,c,z]),g.useEffect(()=>{a&&!E.isClosePausedRef.current&&z(P)},[a,P,E.isClosePausedRef,z]),g.useEffect(()=>()=>{window.clearTimeout(R.current)},[]),g.useEffect(()=>(D(),()=>M()),[D,M]);const $=g.useMemo(()=>v?Bc(v):null,[v]);return E.viewport?f.jsxs(f.Fragment,{children:[$&&f.jsx(a9,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:$}),f.jsx(r9,{scope:r,onClose:W,children:Kr.createPortal(f.jsx(Fc.ItemSlot,{scope:r,children:f.jsx(Z6,{asChild:!0,onEscapeKeyDown:J(l,H=>{T().some(Q=>{var re;return(re=Q.ref.current)==null?void 0:re.contains(H.target)})||W()}),children:f.jsx(ie.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":E.swipeDirection,...x,ref:C,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:J(t.onKeyDown,H=>{H.key==="Escape"&&(l==null||l(H.nativeEvent),H.nativeEvent.defaultPrevented||W())}),onPointerDown:J(t.onPointerDown,H=>{H.button===0&&(I.current={x:H.clientX,y:H.clientY})}),onPointerMove:J(t.onPointerMove,H=>{if(!I.current)return;const V=H.clientX-I.current.x,Q=H.clientY-I.current.y,re=!!w.current,k=["left","right"].includes(E.swipeDirection),ue=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,j=k?ue(0,V):0,_=k?0:ue(0,Q),ae=H.pointerType==="touch"?10:2,K={x:j,y:_},ee={originalEvent:H,delta:K};re?(w.current=K,Oo(J8,h,ee,{discrete:!1})):Fh(K,E.swipeDirection,ae)?(w.current=K,Oo(Z8,d,ee,{discrete:!1}),H.target.setPointerCapture(H.pointerId)):(Math.abs(V)>ae||Math.abs(Q)>ae)&&(I.current=null)}),onPointerUp:J(t.onPointerUp,H=>{const V=w.current,Q=H.target;if(Q.hasPointerCapture(H.pointerId)&&Q.releasePointerCapture(H.pointerId),w.current=null,I.current=null,V){const re=H.currentTarget,k={originalEvent:H,delta:V};Fh(V,E.swipeDirection,E.swipeThreshold)?Oo(t9,b,k,{discrete:!0}):Oo(e9,p,k,{discrete:!0}),re.addEventListener("click",ue=>ue.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null},"ToastImpl")),a9=Fe(e=>{const{__scopeToast:t,children:n,...r}=e,o=rs(os,t),[i,a]=g.useState(!1),[s,l]=g.useState(!1);return Sx(()=>a(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:f.jsx(uo,{asChild:!0,container:o.announcerContainer||void 0,children:f.jsx(ic,{...r,children:i&&f.jsxs(f.Fragment,{children:[o.label," ",n]})})})},"ToastAnnounce"),s9=g.forwardRef(Fe(function(t,n){const{__scopeToast:r,...o}=t;return f.jsx(ie.div,{...o,ref:n})},"ToastTitle")),l9=g.forwardRef(Fe(function(t,n){const{__scopeToast:r,...o}=t;return f.jsx(ie.div,{...o,ref:n})},"ToastDescription")),u9="ToastClose",c9=g.forwardRef(Fe(function(t,n){const{__scopeToast:r,...o}=t,i=o9(u9,r);return f.jsx(d9,{asChild:!0,children:f.jsx(ie.button,{type:"button",...o,ref:n,onClick:J(t.onClick,i.onClose)})})},"ToastClose")),d9=g.forwardRef(Fe(function(t,n){const{__scopeToast:r,altText:o,...i}=t;return f.jsx(ie.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...i,ref:n})},"ToastAnnounceExclude"));function Bc(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Ax(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Bc(r))}}),t}Fe(Bc,"getAnnounceTextContent");function Oo(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ma(o,i):o.dispatchEvent(i)}Fe(Oo,"handleAndDispatchCustomEvent");var Fh=Fe((e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n},"isDeltaInDirection");function Sx(e=()=>{}){const t=Ue(e);$e(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}Fe(Sx,"useNextFrame");function Ax(e){return e.nodeType===e.ELEMENT_NODE}Fe(Ax,"isHTMLElement");function _x(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Fe(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}Fe(_x,"getTabbableCandidates");function qi(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}Fe(qi,"focusFirst");var f9=q8,h9=X8,p9=n9,m9=s9,g9=l9,b9=c9;let Ix=0,Mn=[];const Gl=new Set;function Kl(){for(const e of Gl)e(Mn)}function Fi(e,t,n={}){const r={id:n.id??++Ix,variant:e,duration:n.duration??5e3,message:t,description:n.description,onDismiss:n.onDismiss};return Mn=[...Mn,r],Kl(),r.id}function x9(e){return Gl.add(e),e(Mn),()=>{Gl.delete(e)}}function Bh(){return Mn}const Nx={success:(e,t={})=>Fi("success",e,t),error:(e,t={})=>Fi("error",e,t),info:(e,t={})=>Fi("info",e,t),warning:(e,t={})=>Fi("warning",e,t),dismiss(e){Mn=Mn.filter(t=>t.id!==e),Kl()},_clearForTests(){Mn=[],Ix=0,Kl()}},E9={success:n1,error:f4,info:r1,warning:o1},T9={success:"text-primary",error:"text-destructive",info:"text-text-2",warning:"text-primary"};function y9({className:e}){const t=A.useSyncExternalStore(x9,Bh,Bh);return f.jsxs(f9,{swipeDirection:"right",children:[t.map(n=>f.jsxs(p9,{duration:n.duration,"data-variant":n.variant,"data-testid":"toast-root",onOpenChange:r=>{var o;r||((o=n.onDismiss)==null||o.call(n),Nx.dismiss(n.id))},className:q("flex items-start gap-2.5 rounded-lg border border-border bg-panel-2 p-3 shadow-lg",e),children:[(()=>{const r=E9[n.variant];return f.jsx(r,{"aria-hidden":"true",className:q("mt-0.5 size-4 shrink-0",T9[n.variant])})})(),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx(m9,{className:"text-sm font-medium text-foreground",children:n.message}),n.description?f.jsx(g9,{className:"mt-0.5 text-xs text-text-2",children:n.description}):null]}),f.jsx(b9,{"data-testid":"toast-close","aria-label":"Dismiss",className:"shrink-0 rounded p-0.5 text-text-3 hover:text-foreground",children:f.jsx(Qa,{"aria-hidden":"true",className:"size-3.5"})})]},n.id)),f.jsx(h9,{className:"fixed bottom-4 right-4 z-toast flex w-80 flex-col gap-2 outline-none"})]})}const jc=A.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-testid":"skeleton","aria-hidden":"true",className:q("animate-pulse rounded-md bg-panel-2 motion-reduce:animate-none",e),...t}));jc.displayName="Skeleton";function Hc({icon:e,title:t,description:n,action:r,className:o}){return f.jsxs("div",{"data-testid":"empty-state",className:q("flex flex-col items-center justify-center gap-2 px-6 py-12 text-center",o),children:[e?f.jsx("div",{role:"img","aria-label":t,className:"flex size-10 items-center justify-center rounded-lg bg-panel-2 text-text-3",children:f.jsx(e,{"aria-hidden":"true",className:"size-5"})}):null,f.jsx("h3",{className:"text-sm font-semibold text-foreground",children:t}),n?f.jsx("p",{className:"max-w-sm text-xs text-text-3",children:n}):null,r?f.jsx("div",{className:"mt-2",children:r}):null]})}Hc.displayName="EmptyState";const Uc=A.forwardRef(({className:e,...t},n)=>f.jsx("kbd",{ref:n,"data-testid":"kbd",className:q("inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-panel-2 px-1 font-sans text-[0.6875rem] font-medium text-text-3",e),...t}));Uc.displayName="Kbd";const Rx=A.forwardRef(({value:e,className:t,onCopied:n,...r},o)=>{const[i,a]=A.useState(!1),s=A.useRef(null),l=async()=>{try{await navigator.clipboard.writeText(e),a(!0),n==null||n(),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>a(!1),2e3)}catch{}};return f.jsx("button",{ref:o,type:"button","data-testid":"copy-button","data-copied":i,"aria-label":i?"Copied":"Copy",onClick:()=>void l(),className:q("inline-flex size-7 items-center justify-center rounded-md text-text-3 transition-colors motion-reduce:transition-none","hover:bg-panel-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",i&&"text-primary",t),...r,children:i?f.jsx(Xa,{"aria-hidden":"true",className:"size-4"}):f.jsx(p4,{"aria-hidden":"true",className:"size-4"})})});Rx.displayName="CopyButton";const jh=["bg-primary text-primary-foreground","bg-panel-2 text-foreground"];function v9(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)|0;return Math.abs(t)}function w9(e){var o;const t=e.trim().split(/\s+/).filter(Boolean),n=((o=t[0])==null?void 0:o.charAt(0))??"",r=t.length>1?t[t.length-1].charAt(0):"";return(n+r).toUpperCase()}const C9={sm:"size-6 text-[0.625rem]",md:"size-8 text-xs",lg:"size-10 text-sm"},Px=A.forwardRef(({name:e,src:t,size:n="md",className:r},o)=>{const i=jh[v9(e)%jh.length];return f.jsx("span",{ref:o,"data-testid":"avatar",className:q("inline-flex shrink-0 select-none items-center justify-center overflow-hidden rounded-full font-semibold",C9[n],i,r),children:t?f.jsx("img",{src:t,alt:e,"data-testid":"avatar-img",className:"size-full object-cover"}):w9(e)})});Px.displayName="Avatar";const Ox=A.forwardRef(({label:e,value:t,delta:n,deltaLabel:r,icon:o,className:i},a)=>{const s=typeof n=="number"&&n!==0,l=(n??0)>0;return f.jsx(ar,{ref:a,className:q(i),children:f.jsx(ar.Body,{className:"p-4",children:f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"text-xs font-medium text-text-3",children:e}),f.jsx("span",{"data-testid":"stat-value",className:"text-2xl font-semibold text-foreground",children:t}),s?f.jsxs("span",{"data-testid":"stat-delta",className:q("flex items-center gap-0.5 text-xs font-medium",l?"text-status-ok":"text-status-error"),children:[l?f.jsx(n4,{"aria-hidden":"true",className:"size-3.5"}):f.jsx(XD,{"aria-hidden":"true",className:"size-3.5"}),l?"+":"",n,"%",r?f.jsxs("span",{className:"text-text-3",children:[" ",r]}):null]}):null]}),o?f.jsx("div",{"data-testid":"stat-icon",className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-panel-2 text-text-2",children:f.jsx(o,{"aria-hidden":"true",className:"size-4"})}):null]})})})});Ox.displayName="StatCard";const Hh={left:"text-left",center:"text-center",right:"text-right"},k9=5,Lx=A.forwardRef(function({columns:t,rows:n,rowKey:r,sort:o,onSortChange:i,filter:a,loading:s,empty:l,onRowClick:u,className:c},d){const h=x=>{if(!x.sortable||!i)return;const E=(o==null?void 0:o.key)===x.key&&o.direction==="asc"?"desc":"asc";i({key:x.key,direction:E})},p=a==null?void 0:a.text.toLowerCase(),b=p?n.filter(x=>a==null?void 0:a.keys.some(E=>String(x[E]??"").toLowerCase().includes(p))):n;return f.jsx("div",{ref:d,"data-testid":"table",className:q("w-full overflow-x-auto",c),children:f.jsxs("table",{className:"w-full border-collapse text-sm",children:[f.jsx("thead",{children:f.jsx("tr",{className:"border-b border-border",children:t.map(x=>{const E=(o==null?void 0:o.key)===x.key;return f.jsx("th",{"data-testid":`th-${x.key}`,"aria-sort":x.sortable&&E?(o==null?void 0:o.direction)==="asc"?"ascending":"descending":void 0,style:x.width?{width:x.width}:void 0,className:q("px-3 py-2 font-medium text-text-3",Hh[x.align??"left"],x.sortable&&"cursor-pointer select-none hover:text-foreground"),...x.sortable?{tabIndex:0,onClick:()=>h(x),onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),h(x))}}:{},children:f.jsxs("span",{className:q("inline-flex items-center gap-1",x.align==="right"&&"flex-row-reverse"),children:[x.header,x.sortable?E?(o==null?void 0:o.direction)==="asc"?f.jsx(o4,{"aria-hidden":"true",className:"size-3"}):f.jsx(ZD,{"aria-hidden":"true",className:"size-3"}):f.jsx(e4,{"aria-hidden":"true",className:"size-3 opacity-40"}):null]})},x.key)})})}),f.jsx("tbody",{children:s?Array.from({length:k9},(x,E)=>f.jsx("tr",{className:"border-b border-border",children:t.map(T=>f.jsx("td",{className:"px-3 py-2.5",children:f.jsx(jc,{className:"h-4 w-3/4"})},T.key))},`sk-${E}`)):b.length===0?f.jsx("tr",{children:f.jsx("td",{colSpan:t.length,className:"px-3 py-6",children:l??f.jsx(Hc,{title:"No results"})})}):b.map(x=>f.jsx("tr",{className:q("border-b border-border last:border-b-0",u&&"cursor-pointer hover:bg-panel-2"),tabIndex:u?0:void 0,onClick:u?()=>u(x):void 0,onKeyDown:u?E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),u(x))}:void 0,children:t.map(E=>f.jsx("td",{className:q("px-3 py-2.5 text-foreground",Hh[E.align??"left"]),children:E.render?E.render(x):String(x[E.key]??"")},E.key))},r(x)))})]})})});Lx.displayName="Table";const S9={0:"p-0",1:"p-1",2:"p-2",3:"p-3",4:"p-4",5:"p-5",6:"p-6",8:"p-8",10:"p-10",12:"p-12",16:"p-16"},A9={0:"px-0",1:"px-1",2:"px-2",3:"px-3",4:"px-4",5:"px-5",6:"px-6",8:"px-8",10:"px-10",12:"px-12",16:"px-16"},_9={0:"py-0",1:"py-1",2:"py-2",3:"py-3",4:"py-4",5:"py-5",6:"py-6",8:"py-8",10:"py-10",12:"py-12",16:"py-16"},I9={0:"m-0",1:"m-1",2:"m-2",3:"m-3",4:"m-4",5:"m-5",6:"m-6",8:"m-8",10:"m-10",12:"m-12",16:"m-16"},Dx={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12",16:"gap-16"},N9={background:"bg-background",panel:"bg-panel","panel-2":"bg-panel-2",muted:"bg-muted"},R9={sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},Mx=A.forwardRef(({p:e,px:t,py:n,m:r,bg:o,rounded:i,as:a="div",className:s,...l},u)=>f.jsx(a,{ref:u,"data-testid":"box",className:q(e&&S9[e],t&&A9[t],n&&_9[n],r&&I9[r],o&&N9[o],i&&R9[i],s),...l}));Mx.displayName="Box";const P9={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},O9={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},Fx=A.forwardRef(({gap:e,align:t,justify:n,as:r="div",className:o,...i},a)=>f.jsx(r,{ref:a,"data-testid":"stack",className:q("flex flex-col",e&&Dx[e],t&&P9[t],n&&O9[n],o),...i}));Fx.displayName="Stack";const L9={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},D9={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},Bx=A.forwardRef(({gap:e,align:t,justify:n,wrap:r,as:o="div",className:i,...a},s)=>f.jsx(o,{ref:s,"data-testid":"inline",className:q("flex items-center",e&&Dx[e],t&&L9[t],n&&D9[n],r&&"flex-wrap",i),...a}));Bx.displayName="Inline";const jx=A.forwardRef(({orientation:e="horizontal",className:t,"data-testid":n},r)=>f.jsx("hr",{ref:r,"data-testid":n??"divider","aria-orientation":e,className:q("border-border",e==="horizontal"?"h-px w-full border-t":"h-full w-px border-l",t)}));jx.displayName="Divider";var M9=Object.defineProperty,ke=(e,t)=>M9(e,"name",{value:t,configurable:!0});function Hx(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}ke(Hx,"useStateMachine");var Ux="ScrollArea",[$x,RB]=Ve(Ux),[F9,Lt]=$x(Ux),B9=g.forwardRef(ke(function(t,n){const{__scopeScrollArea:r,type:o="hover",dir:i,scrollHideDelay:a=600,...s}=t,[l,u]=g.useState(null),[c,d]=g.useState(null),[h,p]=g.useState(null),[b,x]=g.useState(null),[E,T]=g.useState(null),[v,y]=g.useState(0),[C,I]=g.useState(0),[w,P]=g.useState(!1),[L,F]=g.useState(!1),R=he(n,u),D=qn(i);return f.jsx(F9,{scope:r,type:o,dir:D,scrollHideDelay:a,scrollArea:l,viewport:c,onViewportChange:d,content:h,onContentChange:p,scrollbarX:b,onScrollbarXChange:x,scrollbarXEnabled:w,onScrollbarXEnabledChange:P,scrollbarY:E,onScrollbarYChange:T,scrollbarYEnabled:L,onScrollbarYEnabledChange:F,onCornerWidthChange:y,onCornerHeightChange:I,children:f.jsx(ie.div,{dir:D,...s,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":C+"px",...t.style}})})},"ScrollArea")),j9="ScrollAreaViewport",H9=g.forwardRef(ke(function(t,n){const{__scopeScrollArea:r,children:o,nonce:i,...a}=t,s=Lt(j9,r),l=g.useRef(null),u=he(n,l,s.onViewportChange);return f.jsxs(f.Fragment,{children:[f.jsx(U9,{nonce:i}),f.jsx(ie.div,{"data-radix-scroll-area-viewport":"",...a,ref:u,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...t.style},children:f.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})},"ScrollAreaViewport")),U9=g.memo(ke(function({nonce:t}){return f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t})},"ScrollAreaViewportStyle"),(e,t)=>e.nonce===t.nonce),wn="ScrollAreaScrollbar",$9=g.forwardRef(ke(function(t,n){const{forceMount:r,...o}=t,i=Lt(wn,t.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=i,l=t.orientation==="horizontal";return g.useEffect(()=>(l?a(!0):s(!0),()=>{l?a(!1):s(!1)}),[l,a,s]),i.type==="hover"?f.jsx(z9,{...o,ref:n,forceMount:r}):i.type==="scroll"?f.jsx(V9,{...o,ref:n,forceMount:r}):i.type==="auto"?f.jsx(zx,{...o,ref:n,forceMount:r}):i.type==="always"?f.jsx($c,{...o,ref:n,"data-state":"visible"}):null},"ScrollAreaScrollbar")),z9=g.forwardRef(ke(function(t,n){const{forceMount:r,...o}=t,i=Lt(wn,t.__scopeScrollArea),[a,s]=g.useState(!1);return g.useEffect(()=>{const l=i.scrollArea;let u=0;if(l){const c=ke(()=>{window.clearTimeout(u),s(!0)},"handlePointerEnter"),d=ke(()=>{u=window.setTimeout(()=>s(!1),i.scrollHideDelay)},"handlePointerLeave");return l.addEventListener("pointerenter",c),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(u),l.removeEventListener("pointerenter",c),l.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),f.jsx(Ze,{present:r||a,children:f.jsx(zx,{"data-state":a?"visible":"hidden",...o,ref:n})})},"ScrollAreaScrollbarHover")),V9=g.forwardRef(ke(function(t,n){const{forceMount:r,...o}=t,i=Lt(wn,t.__scopeScrollArea),a=t.orientation==="horizontal",s=xi(()=>u("SCROLL_END"),100),[l,u]=Hx("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(l==="idle"){const c=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[l,i.scrollHideDelay,u]),g.useEffect(()=>{const c=i.viewport,d=a?"scrollLeft":"scrollTop";if(c){let h=c[d];const p=ke(()=>{const b=c[d];h!==b&&(u("SCROLL"),s()),h=b},"handleScroll");return c.addEventListener("scroll",p),()=>c.removeEventListener("scroll",p)}},[i.viewport,a,u,s]),f.jsx(Ze,{present:r||l!=="hidden",children:f.jsx($c,{"data-state":l==="hidden"?"hidden":"visible",...o,ref:n,onPointerEnter:J(t.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:J(t.onPointerLeave,()=>u("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),zx=g.forwardRef(ke(function(t,n){const r=Lt(wn,t.__scopeScrollArea),{forceMount:o,...i}=t,[a,s]=g.useState(!1),l=t.orientation==="horizontal",u=xi(()=>{if(r.viewport){const c=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;s(l?c:d)}},10);return Er(r.viewport,u),Er(r.content,u),f.jsx(Ze,{present:o||a,children:f.jsx($c,{"data-state":a?"visible":"hidden",...i,ref:n})})},"ScrollAreaScrollbarAuto")),$c=g.forwardRef(ke(function(t,n){const{orientation:r="vertical",...o}=t,i=Lt(wn,t.__scopeScrollArea),a=g.useRef(null),s=g.useRef(0),[l,u]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=zc(l.viewport,l.content),d={...o,sizes:l,onSizesChange:u,hasThumb:c>0&&c<1,onThumbChange:ke(p=>a.current=p,"onThumbChange"),onThumbPointerUp:ke(()=>s.current=0,"onThumbPointerUp"),onThumbPointerDown:ke(p=>s.current=p,"onThumbPointerDown")};function h(p,b){return qx(p,s.current,l,b)}return ke(h,"getScrollPosition"),r==="horizontal"?f.jsx(W9,{...d,ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const p=i.viewport.scrollLeft,b=Ql(p,l,i.dir);a.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollLeft=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollLeft=h(p,i.dir))}}):r==="vertical"?f.jsx(Y9,{...d,ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const p=i.viewport.scrollTop,b=Ql(p,l);a.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollTop=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollTop=h(p))}}):null},"ScrollAreaScrollbarVisible")),W9=g.forwardRef(ke(function(t,n){const{sizes:r,onSizesChange:o,...i}=t,a=Lt(wn,t.__scopeScrollArea),[s,l]=g.useState(),u=g.useRef(null),c=he(n,u,a.onScrollbarXChange);return g.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),f.jsx(Wx,{"data-orientation":"horizontal",...i,ref:c,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":bi(r)+"px",...t.style},onThumbPointerDown:d=>t.onThumbPointerDown(d.x),onDragScroll:d=>t.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(a.viewport){const p=a.viewport.scrollLeft+d.deltaX;t.onWheelScroll(p),Wc(p,h)&&d.preventDefault()}},onResize:()=>{u.current&&a.viewport&&s&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Zo(s.paddingLeft),paddingEnd:Zo(s.paddingRight)}})}})},"ScrollAreaScrollbarX")),Y9=g.forwardRef(ke(function(t,n){const{sizes:r,onSizesChange:o,...i}=t,a=Lt(wn,t.__scopeScrollArea),[s,l]=g.useState(),u=g.useRef(null),c=he(n,u,a.onScrollbarYChange);return g.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),f.jsx(Wx,{"data-orientation":"vertical",...i,ref:c,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":bi(r)+"px",...t.style},onThumbPointerDown:d=>t.onThumbPointerDown(d.y),onDragScroll:d=>t.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(a.viewport){const p=a.viewport.scrollTop+d.deltaY;t.onWheelScroll(p),Wc(p,h)&&d.preventDefault()}},onResize:()=>{u.current&&a.viewport&&s&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Zo(s.paddingTop),paddingEnd:Zo(s.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[q9,Vx]=$x(wn),Wx=g.forwardRef(ke(function(t,n){const{__scopeScrollArea:r,sizes:o,hasThumb:i,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:l,onThumbPositionChange:u,onDragScroll:c,onWheelScroll:d,onResize:h,...p}=t,b=Lt(wn,r),[x,E]=g.useState(null),T=he(n,E),v=g.useRef(null),y=g.useRef(""),C=b.viewport,I=o.content-o.viewport,w=Ue(d),P=Ue(u),L=xi(h,10);function F(R){if(v.current){const D=R.clientX-v.current.left,M=R.clientY-v.current.top;c({x:D,y:M})}}return ke(F,"handleDragScroll"),g.useEffect(()=>{const R=ke(D=>{const M=D.target;(x==null?void 0:x.contains(M))&&w(D,I)},"handleWheel");return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[C,x,I,w]),g.useEffect(P,[o,P]),Er(x,L),Er(b.content,L),f.jsx(q9,{scope:r,scrollbar:x,hasThumb:i,onThumbChange:Ue(a),onThumbPointerUp:Ue(s),onThumbPositionChange:P,onThumbPointerDown:Ue(l),children:f.jsx(ie.div,{...p,ref:T,style:{position:"absolute",...p.style},onPointerDown:J(t.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),v.current=x.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),F(R))}),onPointerMove:J(t.onPointerMove,F),onPointerUp:J(t.onPointerUp,R=>{const D=R.target;D.hasPointerCapture(R.pointerId)&&D.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=y.current,b.viewport&&(b.viewport.style.scrollBehavior=""),v.current=null})})})},"ScrollAreaScrollbarImpl")),Xl="ScrollAreaThumb",G9=g.forwardRef(ke(function(t,n){const{forceMount:r,...o}=t,i=Vx(Xl,t.__scopeScrollArea);return f.jsx(Ze,{present:r||i.hasThumb,children:f.jsx(K9,{ref:n,...o})})},"ScrollAreaThumb")),K9=g.forwardRef(ke(function(t,n){const{__scopeScrollArea:r,style:o,...i}=t,a=Lt(Xl,r),s=Vx(Xl,r),{onThumbPositionChange:l}=s,u=he(n,s.onThumbChange),c=g.useRef(void 0),d=xi(()=>{c.current&&(c.current(),c.current=void 0)},100);return g.useEffect(()=>{const h=a.viewport;if(h){const p=ke(()=>{if(d(),!c.current){const b=Z9(h,l);c.current=b,l()}},"handleScroll");return l(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[a.viewport,d,l]),f.jsx(ie.div,{"data-state":s.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:J(t.onPointerDownCapture,h=>{const b=h.target.getBoundingClientRect(),x=h.clientX-b.left,E=h.clientY-b.top;s.onThumbPointerDown({x,y:E})}),onPointerUp:J(t.onPointerUp,s.onThumbPointerUp)})},"ScrollAreaThumbImpl")),Yx="ScrollAreaCorner",X9=g.forwardRef(ke(function(t,n){const r=Lt(Yx,t.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?f.jsx(Q9,{...t,ref:n}):null},"ScrollAreaCorner")),Q9=g.forwardRef(ke(function(t,n){const{__scopeScrollArea:r,...o}=t,i=Lt(Yx,r),[a,s]=g.useState(0),[l,u]=g.useState(0),c=!!(a&&l),{onCornerWidthChange:d,onCornerHeightChange:h}=i;return Er(i.scrollbarX,()=>{var b;const p=((b=i.scrollbarX)==null?void 0:b.offsetHeight)||0;i.onCornerHeightChange(p),u(p)}),Er(i.scrollbarY,()=>{var b;const p=((b=i.scrollbarY)==null?void 0:b.offsetWidth)||0;i.onCornerWidthChange(p),s(p)}),g.useEffect(()=>()=>{d(0),h(0)},[d,h]),c?f.jsx(ie.div,{...o,ref:n,style:{width:a,height:l,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null},"ScrollAreaCornerImpl"));function Zo(e){return e?parseInt(e,10):0}ke(Zo,"toInt");function zc(e,t){const n=e/t;return isNaN(n)?0:n}ke(zc,"getThumbRatio");function bi(e){const t=zc(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}ke(bi,"getThumbSize");function qx(e,t,n,r="ltr"){const o=bi(n),i=o/2,a=t||i,s=o-a,l=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return Vc([l,u],d)(e)}ke(qx,"getScrollPositionFromPointer");function Ql(e,t,n="ltr"){const r=bi(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-r,l=n==="ltr"?[0,a]:[a*-1,0],u=aa(e,l);return Vc([0,a],[0,s])(u)}ke(Ql,"getThumbOffsetFromScroll");function Vc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}ke(Vc,"linearScale");function Wc(e,t){return e>0&&e<t}ke(Wc,"isScrollingWithinScrollbarBounds");var Z9=ke((e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return ke((function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=n.left!==i.left,s=n.top!==i.top;(a||s)&&t(),n=i,r=window.requestAnimationFrame(o)}),"loop")(),()=>window.cancelAnimationFrame(r)},"addUnlinkedScrollListener");function xi(e,t){const n=Ue(e),r=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),g.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}ke(xi,"useDebounceCallback");function Er(e,t){const n=Ue(t);$e(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}ke(Er,"useResizeObserver");var J9=B9,eF=H9,tF=$9,nF=G9,rF=X9;const Gx=A.forwardRef(({maxHeight:e,className:t,style:n,"data-testid":r,children:o,...i},a)=>f.jsxs(J9,{ref:a,"data-testid":r??"scroll-area",className:q("relative overflow-hidden",t),style:{...n,...e===void 0?{}:{maxHeight:e}},...i,children:[f.jsx(eF,{className:"h-full max-h-[inherit] w-full rounded-[inherit]",children:o}),f.jsx(tF,{orientation:"vertical",className:"flex w-1.5 touch-none select-none bg-transparent p-px transition-colors motion-reduce:transition-none",children:f.jsx(nF,{className:"relative flex-1 rounded-full bg-border"})}),f.jsx(rF,{})]}));Gx.displayName="ScrollArea";var oF=Object.defineProperty,Kx=(e,t)=>oF(e,"name",{value:t,configurable:!0}),Uh="horizontal",iF=["horizontal","vertical"],aF=g.forwardRef(Kx(function(t,n){const{decorative:r,orientation:o=Uh,...i}=t,a=Xx(o)?o:Uh,l=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return f.jsx(ie.div,{"data-orientation":a,...l,...i,ref:n})},"Separator"));function Xx(e){return iF.includes(e)}Kx(Xx,"isValidOrientation");var sF=aF;const Qx=A.forwardRef(({orientation:e="horizontal",className:t,"data-testid":n,...r},o)=>f.jsx(sF,{ref:o,orientation:e,"data-testid":n??"separator",className:q("border-border",e==="horizontal"?"h-px w-full border-t":"h-full w-px border-l",t),...r}));Qx.displayName="Separator";const Zx={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl"},Jx={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},lF={foreground:"text-foreground","text-2":"text-text-2","text-3":"text-text-3",brand:"text-brand",primary:"text-primary",destructive:"text-destructive"},uF={1:"2xl",2:"xl",3:"lg",4:"base"},eE=A.forwardRef(({level:e=2,size:t,weight:n="semibold",className:r,children:o,...i},a)=>{const s=`h${e}`,l=t??uF[e];return f.jsx(s,{ref:a,"data-testid":"heading",className:q(Zx[l],Jx[n],"text-foreground leading-tight",r),...i,children:o})});eE.displayName="Heading";const tE=A.forwardRef(({size:e="base",weight:t="normal",color:n="foreground",as:r="p",className:o,children:i,...a},s)=>{const l=r;return f.jsx(l,{ref:s,"data-testid":"text",className:q(Zx[e],Jx[t],lF[n],"leading-normal",o),...a,children:i})});tE.displayName="Text";const nE=A.forwardRef(({block:e=!1,className:t,children:n,...r},o)=>e?f.jsx("pre",{ref:o,"data-testid":"code-block",className:q("overflow-x-auto rounded-lg bg-code-bg p-3 font-mono text-sm text-foreground",t),...r,children:n}):f.jsx("code",{ref:o,"data-testid":"code",className:q("rounded bg-code-bg px-1 py-0.5 font-mono text-sm text-foreground",t),...r,children:n}));nE.displayName="Code";const rE=A.forwardRef(({external:e,className:t,children:n,...r},o)=>f.jsx("a",{ref:o,"data-testid":"link",className:q("text-brand underline underline-offset-2 transition-colors","hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","motion-reduce:transition-none",t),target:e?"_blank":void 0,rel:e?"noopener noreferrer":void 0,...r,children:n}));rE.displayName="Link";const oE=A.forwardRef(({open:e,onOpenChange:t,commands:n,placeholder:r="Type a command or search…",emptyText:o="No results found.",label:i="Command palette",className:a,overlayClassName:s},l)=>{const u=c=>{var d;(d=c.onSelect)==null||d.call(c),t(!1)};return f.jsxs(Gt.Dialog,{ref:l,open:e,onOpenChange:t,label:i,loop:!0,"data-testid":"command-palette",overlayClassName:q("fixed inset-0 z-overlay bg-overlay","data-[state=open]:animate-in data-[state=open]:fade-in-0","data-[state=closed]:animate-out data-[state=closed]:fade-out-0","motion-reduce:animate-none",s),contentClassName:q("fixed left-1/2 top-1/2 z-modal w-[min(36rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2","overflow-hidden rounded-lg border border-border bg-panel shadow-overlay","focus-visible:outline-none","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","motion-reduce:animate-none",a),children:[f.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[f.jsx(y4,{"aria-hidden":"true",className:"size-4 shrink-0 text-text-3"}),f.jsx(Gt.Input,{"data-testid":"command-palette-input",placeholder:r,className:"w-full min-w-0 bg-transparent py-3 text-sm text-foreground outline-none placeholder:text-text-3"})]}),f.jsxs(Gt.List,{label:i,"data-testid":"command-palette-list",className:"max-h-80 overflow-y-auto p-2",children:[f.jsx(Gt.Empty,{"data-testid":"command-palette-empty",className:"px-2 py-6 text-center text-sm text-text-3",children:o}),n.map(({group:c,items:d})=>f.jsx(Gt.Group,{heading:c,"data-testid":`command-palette-group-${c}`,className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-text-3",children:d.map(h=>f.jsxs(Gt.Item,{value:h.id,keywords:[h.label],onSelect:()=>u(h),"data-testid":`command-palette-item-${h.id}`,className:"flex cursor-pointer items-center justify-between gap-2 rounded-md px-2 py-1.5 text-sm text-foreground data-[selected=true]:bg-panel-2",children:[f.jsx("span",{children:h.label}),h.shortcut?f.jsx(Uc,{"data-testid":`command-palette-shortcut-${h.id}`,children:h.shortcut}):null]},h.id))},c))]})]})});oE.displayName="CommandPalette";var cF=Object.defineProperty,ho=(e,t)=>cF(e,"name",{value:t,configurable:!0}),Yc="Tabs",[dF,PB]=Ve(Yc,[co]),iE=co(),[fF,qc]=dF(Yc),hF=g.forwardRef(ho(function(t,n){const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:u="automatic",...c}=t,d=qn(l),[h,p]=ct({prop:o,onChange:i,defaultProp:a??"",caller:Yc});return f.jsx(fF,{scope:r,baseId:Ke(),value:h,onValueChange:p,orientation:s,dir:d,activationMode:u,children:f.jsx(ie.div,{dir:d,"data-orientation":s,...c,ref:n})})},"Tabs")),pF="TabsList",mF=g.forwardRef(ho(function(t,n){const{__scopeTabs:r,loop:o=!0,...i}=t,a=qc(pF,r),s=iE(r);return f.jsx(Ec,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:f.jsx(ie.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:n})})},"TabsList")),gF="TabsTrigger",bF=g.forwardRef(ho(function(t,n){const{__scopeTabs:r,value:o,disabled:i=!1,...a}=t,s=qc(gF,r),l=iE(r),u=Gc(s.baseId,o),c=Kc(s.baseId,o),d=o===s.value;return f.jsx(Tc,{asChild:!0,...l,focusable:!i,active:d,children:f.jsx(ie.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...a,ref:n,onMouseDown:J(t.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?s.onValueChange(o):h.preventDefault()}),onKeyDown:J(t.onKeyDown,h=>{i||h.target!==h.currentTarget||[" ","Enter"].includes(h.key)&&s.onValueChange(o)}),onFocus:J(t.onFocus,()=>{const h=s.activationMode!=="manual";!d&&!i&&h&&s.onValueChange(o)})})})},"TabsTrigger")),xF="TabsContent",EF=g.forwardRef(ho(function(t,n){const{__scopeTabs:r,value:o,forceMount:i,children:a,...s}=t,l=qc(xF,r),u=Gc(l.baseId,o),c=Kc(l.baseId,o),d=o===l.value,h=g.useRef(d);return g.useEffect(()=>{const p=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(p)},[]),f.jsx(Ze,{present:i||d,children:({present:p})=>f.jsx(ie.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!p,id:c,tabIndex:0,...s,ref:n,style:{...t.style,animationDuration:h.current?"0s":void 0},children:p&&a})})},"TabsContent"));function Gc(e,t){return`${e}-trigger-${t}`}ho(Gc,"makeTriggerId");function Kc(e,t){return`${e}-content-${t}`}ho(Kc,"makeContentId");var TF=hF,yF=mF,vF=bF,wF=EF;const CF=TF,aE=A.forwardRef(({className:e,...t},n)=>f.jsx(yF,{ref:n,"data-testid":"tabs-list",className:q("flex gap-0 border-b border-border",e),...t}));aE.displayName="TabsList";const sE=A.forwardRef(({className:e,...t},n)=>f.jsx(vF,{ref:n,"data-testid":"tabs-trigger",className:q("relative px-4 py-2 text-sm font-medium text-text-2","transition-colors motion-reduce:transition-none","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","data-[state=active]:text-foreground","data-[state=active]:after:absolute data-[state=active]:after:bottom-0 data-[state=active]:after:left-0 data-[state=active]:after:right-0","data-[state=active]:after:h-0.5 data-[state=active]:after:bg-primary",e),...t}));sE.displayName="TabsTrigger";const lE=A.forwardRef(({className:e,...t},n)=>f.jsx(wF,{ref:n,"data-testid":"tabs-content",className:q("mt-4 focus-visible:outline-none",e),...t}));lE.displayName="TabsContent";function kF(e,t,n){const r=[],o=Math.max(2,e-n),i=Math.min(t-1,e+n);r.push(1),o>2&&r.push("ellipsis");for(let a=o;a<=i;a++)r.push(a);return i<t-1&&r.push("ellipsis"),t>1&&r.push(t),r}const uE=A.forwardRef(({page:e,totalPages:t,onPageChange:n,siblingCount:r=1,className:o},i)=>{const a=kF(e,t,r);let s=0;return f.jsxs("nav",{ref:i,"data-testid":"pagination","aria-label":"Pagination",className:q("flex items-center gap-1",o),children:[f.jsxs("button",{type:"button","aria-label":"Previous page",disabled:e<=1,onClick:()=>n(e-1),className:q("inline-flex items-center gap-1 rounded-md px-2 py-1 text-sm text-text-2","hover:bg-panel-2 disabled:pointer-events-none disabled:opacity-35","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[f.jsx(u4,{"aria-hidden":"true",className:"size-3.5"}),"Prev"]}),a.map(l=>l==="ellipsis"?f.jsx("span",{className:"px-1 text-text-3",children:"…"},`e-${s++}`):f.jsx("button",{type:"button","aria-label":`Page ${l}`,"aria-current":l===e?"page":void 0,onClick:()=>n(l),className:q("inline-flex h-7 w-7 items-center justify-center rounded-md text-sm",l===e?"bg-primary font-semibold text-primary-foreground":"text-text-2 hover:bg-panel-2","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:l},l)),f.jsxs("button",{type:"button","aria-label":"Next page",disabled:e>=t,onClick:()=>n(e+1),className:q("inline-flex items-center gap-1 rounded-md px-2 py-1 text-sm text-text-2","hover:bg-panel-2 disabled:pointer-events-none disabled:opacity-35","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:["Next",f.jsx(t1,{"aria-hidden":"true",className:"size-3.5"})]})]})});uE.displayName="Pagination";const cE=A.forwardRef(({className:e,...t},n)=>f.jsx("nav",{ref:n,"data-testid":"breadcrumb","aria-label":"Breadcrumb",className:q("text-sm",e),...t}));cE.displayName="Breadcrumb";const dE=A.forwardRef(({className:e,...t},n)=>f.jsx("ol",{ref:n,"data-testid":"breadcrumb-list",className:q("flex flex-wrap items-center gap-1.5",e),...t}));dE.displayName="BreadcrumbList";const fE=A.forwardRef(({className:e,...t},n)=>f.jsx("li",{ref:n,"data-testid":"breadcrumb-item",className:q("inline-flex items-center",e),...t}));fE.displayName="BreadcrumbItem";const hE=A.forwardRef(({className:e,...t},n)=>f.jsx("a",{ref:n,"data-testid":"breadcrumb-link",className:q("rounded-sm text-text-2 transition-colors motion-reduce:transition-none","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...t}));hE.displayName="BreadcrumbLink";const pE=A.forwardRef(({className:e,children:t,...n},r)=>f.jsx("li",{ref:r,"data-testid":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:q("inline-flex items-center text-text-3 [&>svg]:size-3.5",e),...n,children:t??f.jsx(t1,{"aria-hidden":"true"})}));pE.displayName="BreadcrumbSeparator";const mE=A.forwardRef(({className:e,...t},n)=>f.jsx("span",{ref:n,"data-testid":"breadcrumb-page","aria-current":"page",className:q("font-medium text-foreground",e),...t}));mE.displayName="BreadcrumbPage";const gE=A.forwardRef(({className:e,...t},n)=>f.jsx("aside",{ref:n,"data-testid":"sidebar",className:q("flex h-screen w-64 flex-col border-r border-border bg-panel",e),...t}));gE.displayName="Sidebar";const bE=A.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-testid":"sidebar-header",className:q("border-b border-border px-4 py-3",e),...t}));bE.displayName="SidebarHeader";const xE=A.forwardRef(({className:e,children:t,...n},r)=>f.jsx("nav",{ref:r,"data-testid":"sidebar-nav","aria-label":"Sidebar",className:q("flex-1 overflow-y-auto px-2 py-3",e),...n,children:f.jsx("ul",{"data-testid":"sidebar-nav-list",className:"flex flex-col gap-0.5",children:t})}));xE.displayName="SidebarNav";const EE=A.forwardRef(({className:e,active:t=!1,children:n,...r},o)=>f.jsx("li",{children:f.jsx("a",{ref:o,"data-testid":"sidebar-nav-item","aria-current":t?"page":void 0,className:q("block rounded-md px-3 py-2 text-sm","transition-colors motion-reduce:transition-none","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",t?"bg-panel-2 font-medium text-foreground":"text-text-2 hover:bg-panel-2",e),...r,children:n})}));EE.displayName="SidebarNavItem";const TE=A.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-testid":"sidebar-footer",className:q("mt-auto border-t border-border px-4 py-3",e),...t}));TE.displayName="SidebarFooter";var SF=Object.defineProperty,At=(e,t)=>SF(e,"name",{value:t,configurable:!0}),on="Accordion",AF=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Xc,_F,IF]=oo(on),[is,OB]=Ve(on,[IF,pp]),Qc=pp(),NF=g.forwardRef(At(function(t,n){const{type:r,...o}=t,i=o,a=o;return f.jsx(Xc.Provider,{scope:t.__scopeAccordion,children:r==="multiple"?f.jsx(LF,{...a,ref:n}):f.jsx(OF,{...i,ref:n})})},"Accordion")),[yE,RF]=is(on),[vE,PF]=is(on,{collapsible:!1}),OF=g.forwardRef(At(function(t,n){const{value:r,defaultValue:o,onValueChange:i=At(()=>{},"onValueChange"),collapsible:a=!1,...s}=t,[l,u]=ct({prop:r,defaultProp:o??"",onChange:i,caller:on});return f.jsx(yE,{scope:t.__scopeAccordion,value:g.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:g.useCallback(()=>a&&u(""),[a,u]),children:f.jsx(vE,{scope:t.__scopeAccordion,collapsible:a,children:f.jsx(wE,{...s,ref:n})})})},"AccordionImplSingle")),LF=g.forwardRef(At(function(t,n){const{value:r,defaultValue:o,onValueChange:i=At(()=>{},"onValueChange"),...a}=t,[s,l]=ct({prop:r,defaultProp:o??[],onChange:i,caller:on}),u=g.useCallback(d=>l((h=[])=>[...h,d]),[l]),c=g.useCallback(d=>l((h=[])=>h.filter(p=>p!==d)),[l]);return f.jsx(yE,{scope:t.__scopeAccordion,value:s,onItemOpen:u,onItemClose:c,children:f.jsx(vE,{scope:t.__scopeAccordion,collapsible:!0,children:f.jsx(wE,{...a,ref:n})})})},"AccordionImplMultiple")),[DF,as]=is(on),wE=g.forwardRef(At(function(t,n){const{__scopeAccordion:r,disabled:o,dir:i,orientation:a="vertical",...s}=t,l=g.useRef(null),u=he(l,n),c=_F(r),h=qn(i)==="ltr",p=J(t.onKeyDown,b=>{var F;if(!AF.includes(b.key))return;const x=b.target,E=c().filter(R=>{var D;return!((D=R.ref.current)!=null&&D.disabled)}),T=E.findIndex(R=>R.ref.current===x),v=E.length;if(T===-1)return;b.preventDefault();let y=T;const C=0,I=v-1,w=At(()=>{y=T+1,y>I&&(y=C)},"moveNext"),P=At(()=>{y=T-1,y<C&&(y=I)},"movePrev");switch(b.key){case"Home":y=C;break;case"End":y=I;break;case"ArrowRight":a==="horizontal"&&(h?w():P());break;case"ArrowDown":a==="vertical"&&w();break;case"ArrowLeft":a==="horizontal"&&(h?P():w());break;case"ArrowUp":a==="vertical"&&P();break}const L=y%v;(F=E[L].ref.current)==null||F.focus()});return f.jsx(DF,{scope:r,disabled:o,direction:i,orientation:a,children:f.jsx(Xc.Slot,{scope:r,children:f.jsx(ie.div,{...s,"data-orientation":a,ref:u,onKeyDown:o?void 0:p})})})},"AccordionImpl")),Zl="AccordionItem",[MF,Zc]=is(Zl),FF=g.forwardRef(At(function(t,n){const{__scopeAccordion:r,value:o,...i}=t,a=as(Zl,r),s=RF(Zl,r),l=Qc(r),u=Ke(),c=o&&s.value.includes(o)||!1,d=a.disabled||t.disabled;return f.jsx(MF,{scope:r,open:c,disabled:d,triggerId:u,children:f.jsx(ba,{"data-orientation":a.orientation,"data-state":Jc(c),...l,...i,ref:n,disabled:d,open:c,onOpenChange:h=>{h?s.onItemOpen(o):s.onItemClose(o)}})})},"AccordionItem")),BF="AccordionHeader",jF=g.forwardRef(At(function(t,n){const{__scopeAccordion:r,...o}=t,i=as(on,r),a=Zc(BF,r);return f.jsx(ie.h3,{"data-orientation":i.orientation,"data-state":Jc(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:n})},"AccordionHeader")),$h="AccordionTrigger",HF=g.forwardRef(At(function(t,n){const{__scopeAccordion:r,...o}=t,i=as(on,r),a=Zc($h,r),s=PF($h,r),l=Qc(r);return f.jsx(Xc.ItemSlot,{scope:r,children:f.jsx(xa,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...l,...o,ref:n})})},"AccordionTrigger")),UF="AccordionContent",$F=g.forwardRef(At(function(t,n){const{__scopeAccordion:r,...o}=t,i=as(on,r),a=Zc(UF,r),s=Qc(r);return f.jsx(Ea,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...s,...o,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})},"AccordionContent"));function Jc(e){return e?"open":"closed"}At(Jc,"getState");var zF=NF,VF=FF,WF=jF,YF=HF,qF=$F;const GF=zF,CE=A.forwardRef(({className:e,...t},n)=>f.jsx(VF,{ref:n,"data-testid":"accordion-item",className:q("border-b border-border",e),...t}));CE.displayName="AccordionItem";const kE=A.forwardRef(({className:e,children:t,...n},r)=>f.jsx(WF,{className:"flex",children:f.jsxs(YF,{ref:r,"data-testid":"accordion-trigger",className:q("flex flex-1 items-center justify-between py-3 text-sm font-medium text-foreground","transition-colors motion-reduce:transition-none","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","[&[data-state=open]>svg]:rotate-180",e),...n,children:[t,f.jsx(cc,{"aria-hidden":"true",className:"size-4 shrink-0 text-text-3 transition-transform duration-200 motion-reduce:transition-none"})]})}));kE.displayName="AccordionTrigger";const SE=A.forwardRef(({className:e,children:t,...n},r)=>f.jsx(qF,{ref:r,"data-testid":"accordion-content",className:q("overflow-hidden text-sm text-text-2","data-[state=open]:animate-in data-[state=open]:slide-in-from-top-1","data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top-1","motion-reduce:animate-none",e),...n,children:f.jsx("div",{className:"pb-3",children:t})}));SE.displayName="AccordionContent";var KF=Object.defineProperty,Cn=(e,t)=>KF(e,"name",{value:t,configurable:!0}),AE="Progress",ed=100,[XF,LB]=Ve(AE),[QF,ZF]=XF(AE),JF=g.forwardRef(Cn(function(t,n){const{__scopeProgress:r,value:o=null,max:i,getValueLabel:a=_E,...s}=t;(i||i===0)&&!Jl(i)&&console.error(IE(`${i}`,"Progress"));const l=Jl(i)?i:ed;o!==null&&!eu(o,l)&&console.error(NE(`${o}`,"Progress"));const u=eu(o,l)?o:null,c=Jo(u)?a(u,l):void 0;return f.jsx(QF,{scope:r,value:u,max:l,children:f.jsx(ie.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Jo(u)?u:void 0,"aria-valuetext":c,role:"progressbar","data-state":td(u,l),"data-value":u??void 0,"data-max":l,...s,ref:n})})},"Progress")),eB="ProgressIndicator",tB=g.forwardRef(Cn(function(t,n){const{__scopeProgress:r,...o}=t,i=ZF(eB,r);return f.jsx(ie.div,{"data-state":td(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...o,ref:n})},"ProgressIndicator"));function _E(e,t){return`${Math.round(e/t*100)}%`}Cn(_E,"defaultGetValueLabel");function td(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}Cn(td,"getProgressState");function Jo(e){return typeof e=="number"}Cn(Jo,"isNumber");function Jl(e){return Jo(e)&&!isNaN(e)&&e>0}Cn(Jl,"isValidMaxNumber");function eu(e,t){return Jo(e)&&!isNaN(e)&&e<=t&&e>=0}Cn(eu,"isValidValueNumber");function IE(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ed}\`.`}Cn(IE,"getInvalidMaxError");function NE(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
308
|
+
- a positive number
|
|
309
|
+
- less than the value passed to \`max\` (or ${ed} if no \`max\` prop is set)
|
|
310
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
311
|
+
|
|
312
|
+
Defaulting to \`null\`.`}Cn(NE,"getInvalidValueError");var nB=JF,rB=tB;const RE=A.forwardRef(({value:e,max:t=100,indeterminate:n,className:r},o)=>f.jsx(nB,{ref:o,"data-testid":"progress",value:n?null:e,max:t,className:q("relative h-1.5 w-full overflow-hidden rounded-full bg-panel-2",r),children:f.jsx(rB,{"data-testid":"progress-indicator",className:q("h-full rounded-full bg-primary transition-transform motion-reduce:transition-none",n&&"animate-pulse w-full"),style:n?void 0:{transform:`translateX(-${100-(e??0)/t*100}%)`}})}));RE.displayName="Progress";const oB=$n("flex items-start gap-2.5 rounded-lg border px-4 py-3 text-sm",{variants:{variant:{info:"border-border bg-panel",success:"border-status-ok/25 bg-add-bg",warning:"border-status-warning/25 bg-[color-mix(in_srgb,var(--color-status-warning)_8%,transparent)]",error:"border-destructive/25 bg-del-bg"}},defaultVariants:{variant:"info"}}),iB={info:r1,success:n1,warning:o1,error:E4},aB={info:"text-text-2",success:"text-status-ok",warning:"text-status-warning",error:"text-status-error"},sB={info:"status",success:"status",warning:"alert",error:"alert"},PE=A.forwardRef(({className:e,variant:t="info",dismissible:n,onDismiss:r,children:o,...i},a)=>{const s=iB[t??"info"];return f.jsxs("div",{ref:a,"data-testid":"alert-banner",role:sB[t??"info"],className:q(oB({variant:t}),e),...i,children:[f.jsx(s,{"aria-hidden":"true",className:q("mt-0.5 size-4 shrink-0",aB[t??"info"])}),f.jsx("div",{className:"min-w-0 flex-1 text-foreground",children:o}),n?f.jsx("button",{type:"button","data-testid":"alert-banner-dismiss","aria-label":"Dismiss",onClick:r,className:q("shrink-0 rounded p-0.5 text-text-3","transition-colors motion-reduce:transition-none","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:f.jsx(Qa,{"aria-hidden":"true",className:"size-3.5"})}):null]})});PE.displayName="AlertBanner";exports.Accordion=GF;exports.AccordionContent=SE;exports.AccordionItem=CE;exports.AccordionTrigger=kE;exports.AlertBanner=PE;exports.ApprovalCard=P6;exports.AssistantMessage=Sp;exports.Avatar=Px;exports.Badge=xp;exports.Box=Mx;exports.Breadcrumb=cE;exports.BreadcrumbItem=fE;exports.BreadcrumbLink=hE;exports.BreadcrumbList=dE;exports.BreadcrumbPage=mE;exports.BreadcrumbSeparator=pE;exports.Button=fn;exports.Callout=Cp;exports.Card=ar;exports.Checkbox=k1;exports.Chip=Ep;exports.Code=nE;exports.Combobox=v1;exports.CommandPalette=oE;exports.Composer=L6;exports.ConfirmDialog=V1;exports.CopyButton=Rx;exports.DiffBlock=Ap;exports.Divider=jx;exports.DropdownMenu=ix;exports.DropdownMenuItem=ax;exports.DropdownMenuLabel=lx;exports.DropdownMenuSeparator=sx;exports.DropdownMenuTrigger=Nc;exports.El=wP;exports.EmptyState=Hc;exports.Field=sb;exports.Heading=eE;exports.Inline=Bx;exports.Input=qu;exports.Kbd=Uc;exports.Link=rE;exports.Markdown=ob;exports.Modal=Sc;exports.Pagination=uE;exports.Popover=C8;exports.PopoverContent=hx;exports.PopoverTrigger=fx;exports.Progress=RE;exports.RadioGroup=H1;exports.ReasoningDisclosure=ib;exports.S=rt;exports.ScrollArea=Gx;exports.Select=i1;exports.Separator=Qx;exports.Sidebar=gE;exports.SidebarFooter=TE;exports.SidebarHeader=bE;exports.SidebarNav=xE;exports.SidebarNavItem=EE;exports.Skeleton=jc;exports.Spinner=pa;exports.Stack=Fx;exports.StatCard=Ox;exports.StatusLine=lb;exports.Switch=z1;exports.Table=Lx;exports.Tabs=CF;exports.TabsContent=lE;exports.TabsList=aE;exports.TabsTrigger=sE;exports.Text=tE;exports.Textarea=ub;exports.ThemeProvider=mT;exports.Toaster=y9;exports.ToolCard=gp;exports.ToolGroup=bp;exports.Tooltip=vx;exports.UserMessage=kp;exports.Vo=rb;exports.cn=q;exports.co=fg;exports.toast=Nx;exports.useField=Yn;exports.useTheme=gT;
|