@workflow/web 4.1.0-beta.42 → 4.1.0-beta.43

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.
Files changed (25) hide show
  1. package/build/client/assets/{highlighted-body-B3W2YXNL-Zd0qPYE7.js → highlighted-body-B3W2YXNL-BdpKyd6t.js} +1 -1
  2. package/build/client/assets/home-C884R8Ik.js +35 -0
  3. package/build/client/assets/{manifest-41615f41.js → manifest-14123a0c.js} +1 -1
  4. package/build/client/assets/{mermaid-3ZIDBTTL-BMFG0Hnn.js → mermaid-3ZIDBTTL-D6v4WgFl.js} +61 -61
  5. package/build/client/assets/{root-EzkmXyJV.js → root-CxkGJJO9.js} +1 -1
  6. package/build/client/assets/root-DUJPWGN3.css +1 -0
  7. package/build/client/assets/run-detail-D_eXHYm3.js +36 -0
  8. package/build/client/assets/server-build-BFalDDpv.css +1 -0
  9. package/build/client/assets/{use-workflow-graph-DXipnqlR.js → use-workflow-graph-WEp5s5k_.js} +1 -1
  10. package/build/server/assets/{app-BIqik-91.js → app-KW-1KXCl.js} +1 -1
  11. package/build/server/assets/{highlighted-body-B3W2YXNL-WkqeTqm-.js → highlighted-body-B3W2YXNL-DapKdL2n.js} +3 -3
  12. package/build/server/assets/index-93Io7SSr.js +76 -0
  13. package/build/server/assets/{mermaid-3ZIDBTTL-ClaETQoK.js → mermaid-3ZIDBTTL-BdsOvyTU.js} +3 -3
  14. package/build/server/assets/{server-build-Cyb0dncG.js → server-build-D9d_jMLb.js} +3773 -1454
  15. package/build/server/assets/{token-CTJIoJEi.js → token-Bf2BqxEG.js} +2 -2
  16. package/build/server/assets/{token-util-Dp_pg92C.js → token-util-C8FlMBAQ.js} +2 -2
  17. package/build/server/index.js +1 -1
  18. package/package.json +5 -5
  19. package/build/client/assets/home-C-j1J39E.js +0 -35
  20. package/build/client/assets/root-SL7uvdv2.css +0 -1
  21. package/build/client/assets/run-detail-C0ZpSKc-.js +0 -36
  22. package/build/client/assets/server-build-d6BKG46c.css +0 -1
  23. package/build/server/assets/token-Bjyd4X_e.js +0 -86
  24. package/build/server/assets/token-util-D-4jXUkD.js +0 -30
  25. package/build/server/assets/token-util-DoGNqK5w.js +0 -256
@@ -1,109 +1,109 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-B3W2YXNL-Zd0qPYE7.js","assets/index-DklpUtP3.js"])))=>i.map(i=>d[i]);
2
- var Eb=Object.defineProperty;var Tb=(e,t,n)=>t in e?Eb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ve=(e,t,n)=>Tb(e,typeof t!="symbol"?t+"":t,n);import{r as x,j as g,f as Eu,D as Yh,R as F,A as Gh,G as qh}from"./index-DklpUtP3.js";function Xn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Uc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kh(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Uc(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Uc(e[i],null)}}}}function Wr(...e){return x.useCallback(Kh(...e),e)}function ZP(e,t){const n=x.createContext(t),r=s=>{const{children:a,...o}=s,l=x.useMemo(()=>o,Object.values(o));return g.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(s){const a=x.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function Xh(e,t=[]){let n=[];function r(s,a){const o=x.createContext(a),l=n.length;n=[...n,a];const u=c=>{var b;const{scope:h,children:p,...m}=c,E=((b=h==null?void 0:h[e])==null?void 0:b[l])||o,T=x.useMemo(()=>m,Object.values(m));return g.jsx(E.Provider,{value:T,children:p})};u.displayName=s+"Provider";function d(c,h){var E;const p=((E=h==null?void 0:h[e])==null?void 0:E[l])||o,m=x.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=n.map(a=>x.createContext(a));return function(o){const l=(o==null?void 0:o[e])||s;return x.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[r,xb(i,...t)]}function xb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...o,...c}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function yb(e){const t=_b(e),n=x.forwardRef((r,i)=>{const{children:s,...a}=r,o=x.Children.toArray(s),l=o.find(wb);if(l){const u=l.props.children,d=o.map(c=>c===l?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:c);return g.jsx(t,{...a,ref:i,children:x.isValidElement(u)?x.cloneElement(u,void 0,d):null})}return g.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function _b(e){const t=x.forwardRef((n,r)=>{const{children:i,...s}=n;if(x.isValidElement(i)){const a=Ab(i),o=Cb(s,i.props);return i.type!==x.Fragment&&(o.ref=r?Kh(r,a):a),x.cloneElement(i,o)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qh=Symbol("radix.slottable");function kb(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Qh,t}function wb(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qh}function Cb(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function Ab(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Yr=Sb.reduce((e,t)=>{const n=yb(`Primitive.${t}`),r=x.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ib(e,t){e&&Eu.flushSync(()=>e.dispatchEvent(t))}function ro(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function vb(e,t=globalThis==null?void 0:globalThis.document){const n=ro(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Rb="DismissableLayer",Tl="dismissableLayer.update",Nb="dismissableLayer.pointerDownOutside",Ob="dismissableLayer.focusOutside",jc,Zh=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jh=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=e,u=x.useContext(Zh),[d,c]=x.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=x.useState({}),m=Wr(t,A=>c(A)),E=Array.from(u.layers),[T]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=E.indexOf(T),y=d?E.indexOf(d):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,P=y>=b,D=Pb(A=>{const N=A.target,z=[...u.branches].some(R=>R.contains(N));!P||z||(i==null||i(A),a==null||a(A),A.defaultPrevented||o==null||o())},h),v=Mb(A=>{const N=A.target;[...u.branches].some(R=>R.contains(N))||(s==null||s(A),a==null||a(A),A.defaultPrevented||o==null||o())},h);return vb(A=>{y===u.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&o&&(A.preventDefault(),o()))},h),x.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(jc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),zc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=jc)}},[d,h,n,u]),x.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),zc())},[d,u]),x.useEffect(()=>{const A=()=>p({});return document.addEventListener(Tl,A),()=>document.removeEventListener(Tl,A)},[]),g.jsx(Yr.div,{...l,ref:m,style:{pointerEvents:k?P?"auto":"none":void 0,...e.style},onFocusCapture:Xn(e.onFocusCapture,v.onFocusCapture),onBlurCapture:Xn(e.onBlurCapture,v.onBlurCapture),onPointerDownCapture:Xn(e.onPointerDownCapture,D.onPointerDownCapture)})});Jh.displayName=Rb;var Lb="DismissableLayerBranch",Db=x.forwardRef((e,t)=>{const n=x.useContext(Zh),r=x.useRef(null),i=Wr(t,r);return x.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),g.jsx(Yr.div,{...e,ref:i})});Db.displayName=Lb;function Pb(e,t=globalThis==null?void 0:globalThis.document){const n=ro(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let l=function(){ep(Nb,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Mb(e,t=globalThis==null?void 0:globalThis.document){const n=ro(e),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&ep(Ob,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zc(){const e=new CustomEvent(Tl);document.dispatchEvent(e)}function ep(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ib(i,s):i.dispatchEvent(s)}var Fr=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},Bb=Yh[" useId ".trim().toString()]||(()=>{}),Fb=0;function Hb(e){const[t,n]=x.useState(Bb());return Fr(()=>{n(r=>r??String(Fb++))},[e]),t?`radix-${t}`:""}const Ub=["top","right","bottom","left"],mr=Math.min,nn=Math.max,Pa=Math.round,ea=Math.floor,Un=e=>({x:e,y:e}),jb={left:"right",right:"left",bottom:"top",top:"bottom"},zb={start:"end",end:"start"};function xl(e,t,n){return nn(e,mr(t,n))}function Jn(e,t){return typeof e=="function"?e(t):e}function er(e){return e.split("-")[0]}function yi(e){return e.split("-")[1]}function Tu(e){return e==="x"?"y":"x"}function xu(e){return e==="y"?"height":"width"}const $b=new Set(["top","bottom"]);function Fn(e){return $b.has(er(e))?"y":"x"}function yu(e){return Tu(Fn(e))}function Vb(e,t,n){n===void 0&&(n=!1);const r=yi(e),i=yu(e),s=xu(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Ma(a)),[a,Ma(a)]}function Wb(e){const t=Ma(e);return[yl(e),t,yl(t)]}function yl(e){return e.replace(/start|end/g,t=>zb[t])}const $c=["left","right"],Vc=["right","left"],Yb=["top","bottom"],Gb=["bottom","top"];function qb(e,t,n){switch(e){case"top":case"bottom":return n?t?Vc:$c:t?$c:Vc;case"left":case"right":return t?Yb:Gb;default:return[]}}function Kb(e,t,n,r){const i=yi(e);let s=qb(er(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(yl)))),s}function Ma(e){return e.replace(/left|right|bottom|top/g,t=>jb[t])}function Xb(e){return{top:0,right:0,bottom:0,left:0,...e}}function tp(e){return typeof e!="number"?Xb(e):{top:e,right:e,bottom:e,left:e}}function Ba(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Wc(e,t,n){let{reference:r,floating:i}=e;const s=Fn(t),a=yu(t),o=xu(a),l=er(t),u=s==="y",d=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,h=r[o]/2-i[o]/2;let p;switch(l){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-i.width,y:c};break;default:p={x:r.x,y:r.y}}switch(yi(t)){case"start":p[a]-=h*(n&&u?-1:1);break;case"end":p[a]+=h*(n&&u?-1:1);break}return p}const Qb=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:c}=Wc(u,r,l),h=r,p={},m=0;for(let E=0;E<o.length;E++){const{name:T,fn:b}=o[E],{x:y,y:k,data:P,reset:D}=await b({x:d,y:c,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});d=y??d,c=k??c,p={...p,[T]:{...p[T],...P}},D&&m<=50&&(m++,typeof D=="object"&&(D.placement&&(h=D.placement),D.rects&&(u=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:d,y:c}=Wc(u,h,l)),E=-1)}return{x:d,y:c,placement:h,strategy:i,middlewareData:p}};async function ds(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=Jn(t,e),m=tp(p),T=o[h?c==="floating"?"reference":"floating":c],b=Ba(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(T)))==null||n?T:T.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:l})),y=c==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),P=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},D=Ba(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:k,strategy:l}):y);return{top:(b.top-D.top+m.top)/P.y,bottom:(D.bottom-b.bottom+m.bottom)/P.y,left:(b.left-D.left+m.left)/P.x,right:(D.right-b.right+m.right)/P.x}}const Zb=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:u,padding:d=0}=Jn(e,t)||{};if(u==null)return{};const c=tp(d),h={x:n,y:r},p=yu(i),m=xu(p),E=await a.getDimensions(u),T=p==="y",b=T?"top":"left",y=T?"bottom":"right",k=T?"clientHeight":"clientWidth",P=s.reference[m]+s.reference[p]-h[p]-s.floating[m],D=h[p]-s.reference[p],v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let A=v?v[k]:0;(!A||!await(a.isElement==null?void 0:a.isElement(v)))&&(A=o.floating[k]||s.floating[m]);const N=P/2-D/2,z=A/2-E[m]/2-1,R=mr(c[b],z),W=mr(c[y],z),j=R,w=A-E[m]-W,L=A/2-E[m]/2+N,M=xl(j,L,w),H=!l.arrow&&yi(i)!=null&&L!==M&&s.reference[m]/2-(L<j?R:W)-E[m]/2<0,U=H?L<j?L-j:L-w:0;return{[p]:h[p]+U,data:{[p]:M,centerOffset:L-M-U,...H&&{alignmentOffset:U}},reset:H}}}),Jb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:E=!0,...T}=Jn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=er(i),y=Fn(o),k=er(o)===o,P=await(l.isRTL==null?void 0:l.isRTL(u.floating)),D=h||(k||!E?[Ma(o)]:Wb(o)),v=m!=="none";!h&&v&&D.push(...Kb(o,E,m,P));const A=[o,...D],N=await ds(t,T),z=[];let R=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&z.push(N[b]),c){const L=Vb(i,a,P);z.push(N[L[0]],N[L[1]])}if(R=[...R,{placement:i,overflows:z}],!z.every(L=>L<=0)){var W,j;const L=(((W=s.flip)==null?void 0:W.index)||0)+1,M=A[L];if(M&&(!(c==="alignment"?y!==Fn(M):!1)||R.every(G=>Fn(G.placement)===y?G.overflows[0]>0:!0)))return{data:{index:L,overflows:R},reset:{placement:M}};let H=(j=R.filter(U=>U.overflows[0]<=0).sort((U,G)=>U.overflows[1]-G.overflows[1])[0])==null?void 0:j.placement;if(!H)switch(p){case"bestFit":{var w;const U=(w=R.filter(G=>{if(v){const Q=Fn(G.placement);return Q===y||Q==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Q=>Q>0).reduce((Q,_)=>Q+_,0)]).sort((G,Q)=>G[1]-Q[1])[0])==null?void 0:w[0];U&&(H=U);break}case"initialPlacement":H=o;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function Yc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gc(e){return Ub.some(t=>e[t]>=0)}const eE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Jn(e,t);switch(r){case"referenceHidden":{const s=await ds(t,{...i,elementContext:"reference"}),a=Yc(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Gc(a)}}}case"escaped":{const s=await ds(t,{...i,altBoundary:!0}),a=Yc(s,n.floating);return{data:{escapedOffsets:a,escaped:Gc(a)}}}default:return{}}}}},np=new Set(["left","top"]);async function tE(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=er(n),o=yi(n),l=Fn(n)==="y",u=np.has(a)?-1:1,d=s&&l?-1:1,c=Jn(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return o&&typeof m=="number"&&(p=o==="end"?m*-1:m),l?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const nE=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await tE(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},rE=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:T=>{let{x:b,y}=T;return{x:b,y}}},...l}=Jn(e,t),u={x:n,y:r},d=await ds(t,l),c=Fn(er(i)),h=Tu(c);let p=u[h],m=u[c];if(s){const T=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=p+d[T],k=p-d[b];p=xl(y,p,k)}if(a){const T=c==="y"?"top":"left",b=c==="y"?"bottom":"right",y=m+d[T],k=m-d[b];m=xl(y,m,k)}const E=o.fn({...t,[h]:p,[c]:m});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[h]:s,[c]:a}}}}}},iE=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=Jn(e,t),d={x:n,y:r},c=Fn(i),h=Tu(c);let p=d[h],m=d[c];const E=Jn(o,t),T=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(l){const k=h==="y"?"height":"width",P=s.reference[h]-s.floating[k]+T.mainAxis,D=s.reference[h]+s.reference[k]-T.mainAxis;p<P?p=P:p>D&&(p=D)}if(u){var b,y;const k=h==="y"?"width":"height",P=np.has(er(i)),D=s.reference[c]-s.floating[k]+(P&&((b=a.offset)==null?void 0:b[c])||0)+(P?0:T.crossAxis),v=s.reference[c]+s.reference[k]+(P?0:((y=a.offset)==null?void 0:y[c])||0)-(P?T.crossAxis:0);m<D?m=D:m>v&&(m=v)}return{[h]:p,[c]:m}}}},sE=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...u}=Jn(e,t),d=await ds(t,u),c=er(i),h=yi(i),p=Fn(i)==="y",{width:m,height:E}=s.floating;let T,b;c==="top"||c==="bottom"?(T=c,b=h===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(b=c,T=h==="end"?"top":"bottom");const y=E-d.top-d.bottom,k=m-d.left-d.right,P=mr(E-d[T],y),D=mr(m-d[b],k),v=!t.middlewareData.shift;let A=P,N=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=y),v&&!h){const R=nn(d.left,0),W=nn(d.right,0),j=nn(d.top,0),w=nn(d.bottom,0);p?N=m-2*(R!==0||W!==0?R+W:nn(d.left,d.right)):A=E-2*(j!==0||w!==0?j+w:nn(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:A});const z=await a.getDimensions(o.floating);return m!==z.width||E!==z.height?{reset:{rects:!0}}:{}}}};function io(){return typeof window<"u"}function _i(e){return rp(e)?(e.nodeName||"").toLowerCase():"#document"}function an(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $n(e){var t;return(t=(rp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rp(e){return io()?e instanceof Node||e instanceof an(e).Node:!1}function Sn(e){return io()?e instanceof Element||e instanceof an(e).Element:!1}function zn(e){return io()?e instanceof HTMLElement||e instanceof an(e).HTMLElement:!1}function qc(e){return!io()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof an(e).ShadowRoot}const aE=new Set(["inline","contents"]);function Ps(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=In(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!aE.has(i)}const oE=new Set(["table","td","th"]);function lE(e){return oE.has(_i(e))}const uE=[":popover-open",":modal"];function so(e){return uE.some(t=>{try{return e.matches(t)}catch{return!1}})}const cE=["transform","translate","scale","rotate","perspective"],dE=["transform","translate","scale","rotate","perspective","filter"],fE=["paint","layout","strict","content"];function _u(e){const t=ku(),n=Sn(e)?In(e):e;return cE.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||dE.some(r=>(n.willChange||"").includes(r))||fE.some(r=>(n.contain||"").includes(r))}function hE(e){let t=gr(e);for(;zn(t)&&!gi(t);){if(_u(t))return t;if(so(t))return null;t=gr(t)}return null}function ku(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const pE=new Set(["html","body","#document"]);function gi(e){return pE.has(_i(e))}function In(e){return an(e).getComputedStyle(e)}function ao(e){return Sn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gr(e){if(_i(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qc(e)&&e.host||$n(e);return qc(t)?t.host:t}function ip(e){const t=gr(e);return gi(t)?e.ownerDocument?e.ownerDocument.body:e.body:zn(t)&&Ps(t)?t:ip(t)}function fs(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ip(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=an(i);if(s){const o=_l(a);return t.concat(a,a.visualViewport||[],Ps(i)?i:[],o&&n?fs(o):[])}return t.concat(i,fs(i,[],n))}function _l(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sp(e){const t=In(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=zn(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,o=Pa(n)!==s||Pa(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function wu(e){return Sn(e)?e:e.contextElement}function ci(e){const t=wu(e);if(!zn(t))return Un(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=sp(t);let a=(s?Pa(n.width):n.width)/r,o=(s?Pa(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const mE=Un(0);function ap(e){const t=an(e);return!ku()||!t.visualViewport?mE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==an(e)?!1:t}function Hr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=wu(e);let a=Un(1);t&&(r?Sn(r)&&(a=ci(r)):a=ci(e));const o=gE(s,n,r)?ap(s):Un(0);let l=(i.left+o.x)/a.x,u=(i.top+o.y)/a.y,d=i.width/a.x,c=i.height/a.y;if(s){const h=an(s),p=r&&Sn(r)?an(r):r;let m=h,E=_l(m);for(;E&&r&&p!==m;){const T=ci(E),b=E.getBoundingClientRect(),y=In(E),k=b.left+(E.clientLeft+parseFloat(y.paddingLeft))*T.x,P=b.top+(E.clientTop+parseFloat(y.paddingTop))*T.y;l*=T.x,u*=T.y,d*=T.x,c*=T.y,l+=k,u+=P,m=an(E),E=_l(m)}}return Ba({width:d,height:c,x:l,y:u})}function oo(e,t){const n=ao(e).scrollLeft;return t?t.left+n:Hr($n(e)).left+n}function op(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-oo(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function bE(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=$n(r),o=t?so(t.floating):!1;if(r===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Un(1);const d=Un(0),c=zn(r);if((c||!c&&!s)&&((_i(r)!=="body"||Ps(a))&&(l=ao(r)),zn(r))){const p=Hr(r);u=ci(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=a&&!c&&!s?op(a,l):Un(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function EE(e){return Array.from(e.getClientRects())}function TE(e){const t=$n(e),n=ao(e),r=e.ownerDocument.body,i=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+oo(e);const o=-n.scrollTop;return In(r).direction==="rtl"&&(a+=nn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}const Kc=25;function xE(e,t){const n=an(e),r=$n(e),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const d=ku();(!d||d&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const u=oo(r);if(u<=0){const d=r.ownerDocument,c=d.body,h=getComputedStyle(c),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(r.clientWidth-c.clientWidth-p);m<=Kc&&(s-=m)}else u<=Kc&&(s+=u);return{width:s,height:a,x:o,y:l}}const yE=new Set(["absolute","fixed"]);function _E(e,t){const n=Hr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=zn(e)?ci(e):Un(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:a,height:o,x:l,y:u}}function Xc(e,t,n){let r;if(t==="viewport")r=xE(e,n);else if(t==="document")r=TE($n(e));else if(Sn(t))r=_E(t,n);else{const i=ap(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ba(r)}function lp(e,t){const n=gr(e);return n===t||!Sn(n)||gi(n)?!1:In(n).position==="fixed"||lp(n,t)}function kE(e,t){const n=t.get(e);if(n)return n;let r=fs(e,[],!1).filter(o=>Sn(o)&&_i(o)!=="body"),i=null;const s=In(e).position==="fixed";let a=s?gr(e):e;for(;Sn(a)&&!gi(a);){const o=In(a),l=_u(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&yE.has(i.position)||Ps(a)&&!l&&lp(e,a))?r=r.filter(d=>d!==a):i=o,a=gr(a)}return t.set(e,r),r}function wE(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?so(t)?[]:kE(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((u,d)=>{const c=Xc(t,d,i);return u.top=nn(c.top,u.top),u.right=mr(c.right,u.right),u.bottom=mr(c.bottom,u.bottom),u.left=nn(c.left,u.left),u},Xc(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function CE(e){const{width:t,height:n}=sp(e);return{width:t,height:n}}function AE(e,t,n){const r=zn(t),i=$n(t),s=n==="fixed",a=Hr(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=Un(0);function u(){l.x=oo(i)}if(r||!r&&!s)if((_i(t)!=="body"||Ps(i))&&(o=ao(t)),r){const p=Hr(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&u();s&&!r&&i&&u();const d=i&&!r&&!s?op(i,o):Un(0),c=a.left+o.scrollLeft-l.x-d.x,h=a.top+o.scrollTop-l.y-d.y;return{x:c,y:h,width:a.width,height:a.height}}function Po(e){return In(e).position==="static"}function Qc(e,t){if(!zn(e)||In(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return $n(e)===n&&(n=n.ownerDocument.body),n}function up(e,t){const n=an(e);if(so(e))return n;if(!zn(e)){let i=gr(e);for(;i&&!gi(i);){if(Sn(i)&&!Po(i))return i;i=gr(i)}return n}let r=Qc(e,t);for(;r&&lE(r)&&Po(r);)r=Qc(r,t);return r&&gi(r)&&Po(r)&&!_u(r)?n:r||hE(e)||n}const SE=async function(e){const t=this.getOffsetParent||up,n=this.getDimensions,r=await n(e.floating);return{reference:AE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function IE(e){return In(e).direction==="rtl"}const vE={convertOffsetParentRelativeRectToViewportRelativeRect:bE,getDocumentElement:$n,getClippingRect:wE,getOffsetParent:up,getElementRects:SE,getClientRects:EE,getDimensions:CE,getScale:ci,isElement:Sn,isRTL:IE};function cp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RE(e,t){let n=null,r;const i=$n(e);function s(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:c,width:h,height:p}=u;if(o||t(),!h||!p)return;const m=ea(c),E=ea(i.clientWidth-(d+h)),T=ea(i.clientHeight-(c+p)),b=ea(d),k={rootMargin:-m+"px "+-E+"px "+-T+"px "+-b+"px",threshold:nn(0,mr(1,l))||1};let P=!0;function D(v){const A=v[0].intersectionRatio;if(A!==l){if(!P)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!cp(u,e.getBoundingClientRect())&&a(),P=!1}try{n=new IntersectionObserver(D,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(D,k)}n.observe(e)}return a(!0),s}function NE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=wu(e),d=i||s?[...u?fs(u):[],...fs(t)]:[];d.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const c=u&&o?RE(u,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=p)==null||k.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let m,E=l?Hr(e):null;l&&T();function T(){const b=Hr(e);E&&!cp(E,b)&&n(),E=b,m=requestAnimationFrame(T)}return n(),()=>{var b;d.forEach(y=>{i&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),c==null||c(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const OE=nE,LE=rE,DE=Jb,PE=sE,ME=eE,Zc=Zb,BE=iE,FE=(e,t,n)=>{const r=new Map,i={platform:vE,...n},s={...i.platform,_c:r};return Qb(e,t,{...i,platform:s})};var HE=typeof document<"u",UE=function(){},ya=HE?x.useLayoutEffect:UE;function Fa(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,i;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(!Fa(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Fa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function dp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jc(e,t){const n=dp(e);return Math.round(t*n)/n}function Mo(e){const t=x.useRef(e);return ya(()=>{t.current=e}),t}function jE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:l,open:u}=e,[d,c]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=x.useState(r);Fa(h,r)||p(r);const[m,E]=x.useState(null),[T,b]=x.useState(null),y=x.useCallback(G=>{G!==v.current&&(v.current=G,E(G))},[]),k=x.useCallback(G=>{G!==A.current&&(A.current=G,b(G))},[]),P=s||m,D=a||T,v=x.useRef(null),A=x.useRef(null),N=x.useRef(d),z=l!=null,R=Mo(l),W=Mo(i),j=Mo(u),w=x.useCallback(()=>{if(!v.current||!A.current)return;const G={placement:t,strategy:n,middleware:h};W.current&&(G.platform=W.current),FE(v.current,A.current,G).then(Q=>{const _={...Q,isPositioned:j.current!==!1};L.current&&!Fa(N.current,_)&&(N.current=_,Eu.flushSync(()=>{c(_)}))})},[h,t,n,W,j]);ya(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,c(G=>({...G,isPositioned:!1})))},[u]);const L=x.useRef(!1);ya(()=>(L.current=!0,()=>{L.current=!1}),[]),ya(()=>{if(P&&(v.current=P),D&&(A.current=D),P&&D){if(R.current)return R.current(P,D,w);w()}},[P,D,w,R,z]);const M=x.useMemo(()=>({reference:v,floating:A,setReference:y,setFloating:k}),[y,k]),H=x.useMemo(()=>({reference:P,floating:D}),[P,D]),U=x.useMemo(()=>{const G={position:n,left:0,top:0};if(!H.floating)return G;const Q=Jc(H.floating,d.x),_=Jc(H.floating,d.y);return o?{...G,transform:"translate("+Q+"px, "+_+"px)",...dp(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:_}},[n,o,H.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:w,refs:M,elements:H,floatingStyles:U}),[d,w,M,H,U])}const zE=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Zc({element:r.current,padding:i}).fn(n):{}:r?Zc({element:r,padding:i}).fn(n):{}}}},$E=(e,t)=>({...OE(e),options:[e,t]}),VE=(e,t)=>({...LE(e),options:[e,t]}),WE=(e,t)=>({...BE(e),options:[e,t]}),YE=(e,t)=>({...DE(e),options:[e,t]}),GE=(e,t)=>({...PE(e),options:[e,t]}),qE=(e,t)=>({...ME(e),options:[e,t]}),KE=(e,t)=>({...zE(e),options:[e,t]});var XE="Arrow",fp=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return g.jsx(Yr.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});fp.displayName=XE;var QE=fp;function ZE(e){const[t,n]=x.useState(void 0);return Fr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,o=u.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Cu="Popper",[hp,pp]=Xh(Cu),[JE,mp]=hp(Cu),gp=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return g.jsx(JE,{scope:t,anchor:r,onAnchorChange:i,children:n})};gp.displayName=Cu;var bp="PopperAnchor",Ep=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=mp(bp,n),a=x.useRef(null),o=Wr(t,a),l=x.useRef(null);return x.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||a.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:g.jsx(Yr.div,{...i,ref:o})});Ep.displayName=bp;var Au="PopperContent",[eT,tT]=hp(Au),Tp=x.forwardRef((e,t)=>{var qe,X,ue,ke,Me,Ke;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...E}=e,T=mp(Au,n),[b,y]=x.useState(null),k=Wr(t,ze=>y(ze)),[P,D]=x.useState(null),v=ZE(P),A=(v==null?void 0:v.width)??0,N=(v==null?void 0:v.height)??0,z=r+(s!=="center"?"-"+s:""),R=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},W=Array.isArray(u)?u:[u],j=W.length>0,w={padding:R,boundary:W.filter(rT),altBoundary:j},{refs:L,floatingStyles:M,placement:H,isPositioned:U,middlewareData:G}=jE({strategy:"fixed",placement:z,whileElementsMounted:(...ze)=>NE(...ze,{animationFrame:p==="always"}),elements:{reference:T.anchor},middleware:[$E({mainAxis:i+N,alignmentAxis:a}),l&&VE({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?WE():void 0,...w}),l&&YE({...w}),GE({...w,apply:({elements:ze,rects:Be,availableWidth:nt,availableHeight:Xe})=>{const{width:Re,height:$e}=Be.reference,Ye=ze.floating.style;Ye.setProperty("--radix-popper-available-width",`${nt}px`),Ye.setProperty("--radix-popper-available-height",`${Xe}px`),Ye.setProperty("--radix-popper-anchor-width",`${Re}px`),Ye.setProperty("--radix-popper-anchor-height",`${$e}px`)}}),P&&KE({element:P,padding:o}),iT({arrowWidth:A,arrowHeight:N}),h&&qE({strategy:"referenceHidden",...w})]}),[Q,_]=_p(H),se=ro(m);Fr(()=>{U&&(se==null||se())},[U,se]);const te=(qe=G.arrow)==null?void 0:qe.x,S=(X=G.arrow)==null?void 0:X.y,ge=((ue=G.arrow)==null?void 0:ue.centerOffset)!==0,[pe,me]=x.useState();return Fr(()=>{b&&me(window.getComputedStyle(b).zIndex)},[b]),g.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:U?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(ke=G.transformOrigin)==null?void 0:ke.x,(Me=G.transformOrigin)==null?void 0:Me.y].join(" "),...((Ke=G.hide)==null?void 0:Ke.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(eT,{scope:n,placedSide:Q,onArrowChange:D,arrowX:te,arrowY:S,shouldHideArrow:ge,children:g.jsx(Yr.div,{"data-side":Q,"data-align":_,...E,ref:k,style:{...E.style,animation:U?void 0:"none"}})})})});Tp.displayName=Au;var xp="PopperArrow",nT={top:"bottom",right:"left",bottom:"top",left:"right"},yp=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=tT(xp,r),a=nT[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(QE,{...i,ref:n,style:{...i.style,display:"block"}})})});yp.displayName=xp;function rT(e){return e!==null}var iT=e=>({name:"transformOrigin",options:e,fn(t){var T,b,y;const{placement:n,rects:r,middlewareData:i}=t,a=((T=i.arrow)==null?void 0:T.centerOffset)!==0,o=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=_p(n),c={start:"0%",center:"50%",end:"100%"}[d],h=(((b=i.arrow)==null?void 0:b.x)??0)+o/2,p=(((y=i.arrow)==null?void 0:y.y)??0)+l/2;let m="",E="";return u==="bottom"?(m=a?c:`${h}px`,E=`${-l}px`):u==="top"?(m=a?c:`${h}px`,E=`${r.floating.height+l}px`):u==="right"?(m=`${-l}px`,E=a?c:`${p}px`):u==="left"&&(m=`${r.floating.width+l}px`,E=a?c:`${p}px`),{data:{x:m,y:E}}}});function _p(e){const[t,n="center"]=e.split("-");return[t,n]}var sT=gp,aT=Ep,oT=Tp,lT=yp;function uT(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var kp=e=>{const{present:t,children:n}=e,r=cT(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=Wr(r.ref,dT(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};kp.displayName="Presence";function cT(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),s=x.useRef("none"),a=e?"mounted":"unmounted",[o,l]=uT(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=ta(r.current);s.current=o==="mounted"?u:"none"},[o]),Fr(()=>{const u=r.current,d=i.current;if(d!==e){const h=s.current,p=ta(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Fr(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=p=>{const E=ta(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&E&&(l("ANIMATION_END"),!i.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},h=p=>{p.target===t&&(s.current=ta(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ta(e){return(e==null?void 0:e.animationName)||"none"}function dT(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fT=Yh[" useInsertionEffect ".trim().toString()]||Fr;function hT({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=pT({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:i;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const c=d.current;c!==o&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=o},[o,r])}const u=x.useCallback(d=>{var c;if(o){const h=mT(d)?d(e):d;h!==e&&((c=a.current)==null||c.call(a,h))}else s(d)},[o,e,s,a]);return[l,u]}function pT({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),s=x.useRef(t);return fT(()=>{s.current=t},[t]),x.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}function mT(e){return typeof e=="function"}var gT=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"}),bT="VisuallyHidden",wp=x.forwardRef((e,t)=>g.jsx(Yr.span,{...e,ref:t,style:{...gT,...e.style}}));wp.displayName=bT;var ET=wp,[lo]=Xh("Tooltip",[pp]),uo=pp(),Cp="TooltipProvider",TT=700,kl="tooltip.open",[xT,Su]=lo(Cp),yT=e=>{const{__scopeTooltip:t,delayDuration:n=TT,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,a=x.useRef(!0),o=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),g.jsx(xT,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:o,onPointerInTransitChange:x.useCallback(u=>{o.current=u},[]),disableHoverableContent:i,children:s})};yT.displayName=Cp;var hs="Tooltip",[_T,co]=lo(hs),Ap=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:s,disableHoverableContent:a,delayDuration:o}=e,l=Su(hs,e.__scopeTooltip),u=uo(t),[d,c]=x.useState(null),h=Hb(),p=x.useRef(0),m=a??l.disableHoverableContent,E=o??l.delayDuration,T=x.useRef(!1),[b,y]=hT({prop:r,defaultProp:i??!1,onChange:A=>{A?(l.onOpen(),document.dispatchEvent(new CustomEvent(kl))):l.onClose(),s==null||s(A)},caller:hs}),k=x.useMemo(()=>b?T.current?"delayed-open":"instant-open":"closed",[b]),P=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,T.current=!1,y(!0)},[y]),D=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),v=x.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{T.current=!0,y(!0),p.current=0},E)},[E,y]);return x.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),g.jsx(sT,{...u,children:g.jsx(_T,{scope:t,contentId:h,open:b,stateAttribute:k,trigger:d,onTriggerChange:c,onTriggerEnter:x.useCallback(()=>{l.isOpenDelayedRef.current?v():P()},[l.isOpenDelayedRef,v,P]),onTriggerLeave:x.useCallback(()=>{m?D():(window.clearTimeout(p.current),p.current=0)},[D,m]),onOpen:P,onClose:D,disableHoverableContent:m,children:n})})};Ap.displayName=hs;var wl="TooltipTrigger",Sp=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=co(wl,n),s=Su(wl,n),a=uo(n),o=x.useRef(null),l=Wr(t,o,i.onTriggerChange),u=x.useRef(!1),d=x.useRef(!1),c=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),g.jsx(aT,{asChild:!0,...a,children:g.jsx(Yr.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:Xn(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Xn(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Xn(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:Xn(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:Xn(e.onBlur,i.onClose),onClick:Xn(e.onClick,i.onClose)})})});Sp.displayName=wl;var kT="TooltipPortal",[JP,wT]=lo(kT,{forceMount:void 0}),bi="TooltipContent",Ip=x.forwardRef((e,t)=>{const n=wT(bi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,a=co(bi,e.__scopeTooltip);return g.jsx(kp,{present:r||a.open,children:a.disableHoverableContent?g.jsx(vp,{side:i,...s,ref:t}):g.jsx(CT,{side:i,...s,ref:t})})}),CT=x.forwardRef((e,t)=>{const n=co(bi,e.__scopeTooltip),r=Su(bi,e.__scopeTooltip),i=x.useRef(null),s=Wr(t,i),[a,o]=x.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:c}=r,h=x.useCallback(()=>{o(null),c(!1)},[c]),p=x.useCallback((m,E)=>{const T=m.currentTarget,b={x:m.clientX,y:m.clientY},y=RT(b,T.getBoundingClientRect()),k=NT(b,y),P=OT(E.getBoundingClientRect()),D=DT([...k,...P]);o(D),c(!0)},[c]);return x.useEffect(()=>()=>h(),[h]),x.useEffect(()=>{if(l&&d){const m=T=>p(T,d),E=T=>p(T,l);return l.addEventListener("pointerleave",m),d.addEventListener("pointerleave",E),()=>{l.removeEventListener("pointerleave",m),d.removeEventListener("pointerleave",E)}}},[l,d,p,h]),x.useEffect(()=>{if(a){const m=E=>{const T=E.target,b={x:E.clientX,y:E.clientY},y=(l==null?void 0:l.contains(T))||(d==null?void 0:d.contains(T)),k=!LT(b,a);y?h():k&&(h(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,d,a,u,h]),g.jsx(vp,{...e,ref:s})}),[AT,ST]=lo(hs,{isInside:!1}),IT=kb("TooltipContent"),vp=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...o}=e,l=co(bi,n),u=uo(n),{onClose:d}=l;return x.useEffect(()=>(document.addEventListener(kl,d),()=>document.removeEventListener(kl,d)),[d]),x.useEffect(()=>{if(l.trigger){const c=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),g.jsx(Jh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:g.jsxs(oT,{"data-state":l.stateAttribute,...u,...o,ref:t,style:{...o.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:[g.jsx(IT,{children:r}),g.jsx(AT,{scope:n,isInside:!0,children:g.jsx(ET,{id:l.contentId,role:"tooltip",children:i||r})})]})})});Ip.displayName=bi;var Rp="TooltipArrow",vT=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=uo(n);return ST(Rp,n).isInside?null:g.jsx(lT,{...i,...r,ref:t})});vT.displayName=Rp;function RT(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function NT(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}function OT(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function LT(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const o=t[s],l=t[a],u=o.x,d=o.y,c=l.x,h=l.y;d>r!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(i=!i)}return i}function DT(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),PT(t)}function PT(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}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)}var MT=Ap,BT=Sp,Np=Ip;function Op(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Op(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Op(e))&&(r&&(r+=" "),r+=t);return r}const FT=(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},HT=(e,t)=>({classGroupId:e,validator:t}),Lp=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ha="-",ed=[],UT="arbitrary..",jT=e=>{const t=$T(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return zT(a);const o=a.split(Ha),l=o[0]===""&&o.length>1?1:0;return Dp(o,l,t)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=r[a],u=n[a];return l?u?FT(u,l):l:u||ed}return n[a]||ed}}},Dp=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const u=Dp(e,t+1,s);if(u)return u}const a=n.validators;if(a===null)return;const o=t===0?e.join(Ha):e.slice(t).join(Ha),l=a.length;for(let u=0;u<l;u++){const d=a[u];if(d.validator(o))return d.classGroupId}},zT=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?UT+r:void 0})(),$T=e=>{const{theme:t,classGroups:n}=e;return VT(n,t)},VT=(e,t)=>{const n=Lp();for(const r in e){const i=e[r];Iu(i,n,r,t)}return n},Iu=(e,t,n,r)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];WT(a,t,n,r)}},WT=(e,t,n,r)=>{if(typeof e=="string"){YT(e,t,n);return}if(typeof e=="function"){GT(e,t,n,r);return}qT(e,t,n,r)},YT=(e,t,n)=>{const r=e===""?t:Pp(t,e);r.classGroupId=n},GT=(e,t,n,r)=>{if(KT(e)){Iu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(HT(n,e))},qT=(e,t,n,r)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[o,l]=i[a];Iu(l,Pp(t,o),n,r)}},Pp=(e,t)=>{let n=e;const r=t.split(Ha),i=r.length;for(let s=0;s<i;s++){const a=r[s];let o=n.nextPart.get(a);o||(o=Lp(),n.nextPart.set(a,o)),n=o}return n},KT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,XT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return i(s,a),a},set(s,a){s in n?n[s]=a:i(s,a)}}},Cl="!",td=":",QT=[],nd=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ZT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,o=0,l=0,u;const d=i.length;for(let E=0;E<d;E++){const T=i[E];if(a===0&&o===0){if(T===td){s.push(i.slice(l,E)),l=E+1;continue}if(T==="/"){u=E;continue}}T==="["?a++:T==="]"?a--:T==="("?o++:T===")"&&o--}const c=s.length===0?i:i.slice(l);let h=c,p=!1;c.endsWith(Cl)?(h=c.slice(0,-1),p=!0):c.startsWith(Cl)&&(h=c.slice(1),p=!0);const m=u&&u>l?u-l:void 0;return nd(s,p,h,m)};if(t){const i=t+td,s=r;r=a=>a.startsWith(i)?s(a.slice(i.length)):nd(QT,!1,a,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},JT=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const a=n[s],o=a[0]==="[",l=t.has(a);o||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},ex=e=>({cache:XT(e.cacheSize),parseClassName:ZT(e),sortModifiers:JT(e),...jT(e)}),tx=/\s+/,nx=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],o=e.trim().split(tx);let l="";for(let u=o.length-1;u>=0;u-=1){const d=o[u],{isExternal:c,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:E}=n(d);if(c){l=d+(l.length>0?" "+l:l);continue}let T=!!E,b=r(T?m.substring(0,E):m);if(!b){if(!T){l=d+(l.length>0?" "+l:l);continue}if(b=r(m),!b){l=d+(l.length>0?" "+l:l);continue}T=!1}const y=h.length===0?"":h.length===1?h[0]:s(h).join(":"),k=p?y+Cl:y,P=k+b;if(a.indexOf(P)>-1)continue;a.push(P);const D=i(b,T);for(let v=0;v<D.length;++v){const A=D[v];a.push(k+A)}l=d+(l.length>0?" "+l:l)}return l},rx=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=Mp(n))&&(i&&(i+=" "),i+=r);return i},Mp=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Mp(e[r]))&&(n&&(n+=" "),n+=t);return n},ix=(e,...t)=>{let n,r,i,s;const a=l=>{const u=t.reduce((d,c)=>c(d),e());return n=ex(u),r=n.cache.get,i=n.cache.set,s=o,o(l)},o=l=>{const u=r(l);if(u)return u;const d=nx(l,n);return i(l,d),d};return s=a,(...l)=>s(rx(...l))},sx=[],Et=e=>{const t=n=>n[e]||sx;return t.isThemeGetter=!0,t},Bp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Fp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ax=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ox=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lx=/\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$/,ux=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=e=>ax.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),ar=e=>!!e&&Number.isInteger(Number(e)),Bo=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Gn=e=>ox.test(e),Hp=()=>!0,fx=e=>lx.test(e)&&!ux.test(e),vu=()=>!1,hx=e=>cx.test(e),px=e=>dx.test(e),mx=e=>!ce(e)&&!fe(e),gx=e=>xr(e,zp,vu),ce=e=>Bp.test(e),Ir=e=>xr(e,$p,fx),rd=e=>xr(e,wx,Ne),bx=e=>xr(e,Wp,Hp),Ex=e=>xr(e,Vp,vu),id=e=>xr(e,Up,vu),Tx=e=>xr(e,jp,px),na=e=>xr(e,Yp,hx),fe=e=>Fp.test(e),Oi=e=>Gr(e,$p),xx=e=>Gr(e,Vp),sd=e=>Gr(e,Up),yx=e=>Gr(e,zp),_x=e=>Gr(e,jp),ra=e=>Gr(e,Yp,!0),kx=e=>Gr(e,Wp,!0),xr=(e,t,n)=>{const r=Bp.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Gr=(e,t,n=!1)=>{const r=Fp.exec(e);return r?r[1]?t(r[1]):n:!1},Up=e=>e==="position"||e==="percentage",jp=e=>e==="image"||e==="url",zp=e=>e==="length"||e==="size"||e==="bg-size",$p=e=>e==="length",wx=e=>e==="number",Vp=e=>e==="family-name",Wp=e=>e==="number"||e==="weight",Yp=e=>e==="shadow",Cx=()=>{const e=Et("color"),t=Et("font"),n=Et("text"),r=Et("font-weight"),i=Et("tracking"),s=Et("leading"),a=Et("breakpoint"),o=Et("container"),l=Et("spacing"),u=Et("radius"),d=Et("shadow"),c=Et("inset-shadow"),h=Et("text-shadow"),p=Et("drop-shadow"),m=Et("blur"),E=Et("perspective"),T=Et("aspect"),b=Et("ease"),y=Et("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...P(),fe,ce],v=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],N=()=>[fe,ce,l],z=()=>[sr,"full","auto",...N()],R=()=>[ar,"none","subgrid",fe,ce],W=()=>["auto",{span:["full",ar,fe,ce]},ar,fe,ce],j=()=>[ar,"auto",fe,ce],w=()=>["auto","min","max","fr",fe,ce],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...N()],U=()=>[sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],G=()=>[sr,"screen","full","dvw","lvw","svw","min","max","fit",...N()],Q=()=>[sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],_=()=>[e,fe,ce],se=()=>[...P(),sd,id,{position:[fe,ce]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],S=()=>["auto","cover","contain",yx,gx,{size:[fe,ce]}],ge=()=>[Bo,Oi,Ir],pe=()=>["","none","full",u,fe,ce],me=()=>["",Ne,Oi,Ir],qe=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Ne,Bo,sd,id],ke=()=>["","none",m,fe,ce],Me=()=>["none",Ne,fe,ce],Ke=()=>["none",Ne,fe,ce],ze=()=>[Ne,fe,ce],Be=()=>[sr,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gn],breakpoint:[Gn],color:[Hp],container:[Gn],"drop-shadow":[Gn],ease:["in","out","in-out"],font:[mx],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gn],shadow:[Gn],spacing:["px",Ne],text:[Gn],"text-shadow":[Gn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sr,ce,fe,T]}],container:["container"],columns:[{columns:[Ne,ce,fe,o]}],"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"],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:D()}],overflow:[{overflow:v()}],"overflow-x":[{"overflow-x":v()}],"overflow-y":[{"overflow-y":v()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[ar,"auto",fe,ce]}],basis:[{basis:[sr,"full","auto",o,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,sr,"auto","initial","none",ce]}],grow:[{grow:["",Ne,fe,ce]}],shrink:[{shrink:["",Ne,fe,ce]}],order:[{order:[ar,"first","last","none",fe,ce]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":w()}],"auto-rows":[{"auto-rows":w()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],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":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[o,"screen",...U()]}],"min-w":[{"min-w":[o,"screen","none",...U()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,Oi,Ir]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,kx,bx]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bo,ce]}],"font-family":[{font:[xx,Ex,t]}],"font-features":[{"font-features":[ce]}],"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:[i,fe,ce]}],"line-clamp":[{"line-clamp":[Ne,"none",fe,rd]}],leading:[{leading:[s,...N()]}],"list-image":[{"list-image":["none",fe,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fe,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...qe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",fe,Ir]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Ne,"auto",fe,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe,ce]}],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",fe,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:S()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ar,fe,ce],radial:["",fe,ce],conic:[ar,fe,ce]},_x,Tx]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...qe(),"hidden","none"]}],"divide-style":[{divide:[...qe(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-bs":[{"border-bs":_()}],"border-color-be":[{"border-be":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...qe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,fe,ce]}],"outline-w":[{outline:["",Ne,Oi,Ir]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",d,ra,na]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",c,ra,na]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Ne,Ir]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",h,ra,na]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[Ne,fe,ce]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[fe,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"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":P()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:S()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fe,ce]}],filter:[{filter:["","none",fe,ce]}],blur:[{blur:ke()}],brightness:[{brightness:[Ne,fe,ce]}],contrast:[{contrast:[Ne,fe,ce]}],"drop-shadow":[{"drop-shadow":["","none",p,ra,na]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",Ne,fe,ce]}],"hue-rotate":[{"hue-rotate":[Ne,fe,ce]}],invert:[{invert:["",Ne,fe,ce]}],saturate:[{saturate:[Ne,fe,ce]}],sepia:[{sepia:["",Ne,fe,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,ce]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,fe,ce]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,fe,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,fe,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,fe,ce]}],"backdrop-invert":[{"backdrop-invert":["",Ne,fe,ce]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,fe,ce]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,fe,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,fe,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fe,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",fe,ce]}],ease:[{ease:["linear","initial",b,fe,ce]}],delay:[{delay:[Ne,fe,ce]}],animate:[{animate:["none",y,fe,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,fe,ce]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:Me()}],"rotate-x":[{"rotate-x":Me()}],"rotate-y":[{"rotate-y":Me()}],"rotate-z":[{"rotate-z":Me()}],scale:[{scale:Ke()}],"scale-x":[{"scale-x":Ke()}],"scale-y":[{"scale-y":Ke()}],"scale-z":[{"scale-z":Ke()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[fe,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"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",fe,ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",fe,ce]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Ne,Oi,Ir,rd]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{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":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-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-r","border-w-l"],"border-w-y":["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-r","border-color-l"],"border-color-y":["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-mr","scroll-ml"],"scroll-my":["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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ru=ix(Cx);/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-B3W2YXNL-BdpKyd6t.js","assets/index-DklpUtP3.js"])))=>i.map(i=>d[i]);
2
+ var Tb=Object.defineProperty;var xb=(e,t,n)=>t in e?Tb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ve=(e,t,n)=>xb(e,typeof t!="symbol"?t+"":t,n);import{r as x,j as g,f as Tu,D as Gh,R as F,A as qh,G as Kh}from"./index-DklpUtP3.js";function Xn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function jc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xh(...e){return t=>{let n=!1;const r=e.map(i=>{const s=jc(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():jc(e[i],null)}}}}function Wr(...e){return x.useCallback(Xh(...e),e)}function nM(e,t){const n=x.createContext(t),r=s=>{const{children:a,...o}=s,l=x.useMemo(()=>o,Object.values(o));return g.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(s){const a=x.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function Qh(e,t=[]){let n=[];function r(s,a){const o=x.createContext(a),l=n.length;n=[...n,a];const u=c=>{var b;const{scope:h,children:p,...m}=c,E=((b=h==null?void 0:h[e])==null?void 0:b[l])||o,T=x.useMemo(()=>m,Object.values(m));return g.jsx(E.Provider,{value:T,children:p})};u.displayName=s+"Provider";function d(c,h){var E;const p=((E=h==null?void 0:h[e])==null?void 0:E[l])||o,m=x.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=n.map(a=>x.createContext(a));return function(o){const l=(o==null?void 0:o[e])||s;return x.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[r,yb(i,...t)]}function yb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...o,...c}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function _b(e){const t=kb(e),n=x.forwardRef((r,i)=>{const{children:s,...a}=r,o=x.Children.toArray(s),l=o.find(Cb);if(l){const u=l.props.children,d=o.map(c=>c===l?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:c);return g.jsx(t,{...a,ref:i,children:x.isValidElement(u)?x.cloneElement(u,void 0,d):null})}return g.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function kb(e){const t=x.forwardRef((n,r)=>{const{children:i,...s}=n;if(x.isValidElement(i)){const a=Sb(i),o=Ab(s,i.props);return i.type!==x.Fragment&&(o.ref=r?Xh(r,a):a),x.cloneElement(i,o)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zh=Symbol("radix.slottable");function wb(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Zh,t}function Cb(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zh}function Ab(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function Sb(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ib=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Yr=Ib.reduce((e,t)=>{const n=_b(`Primitive.${t}`),r=x.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vb(e,t){e&&Tu.flushSync(()=>e.dispatchEvent(t))}function ro(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Rb(e,t=globalThis==null?void 0:globalThis.document){const n=ro(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Nb="DismissableLayer",xl="dismissableLayer.update",Ob="dismissableLayer.pointerDownOutside",Lb="dismissableLayer.focusOutside",zc,Jh=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ep=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=e,u=x.useContext(Jh),[d,c]=x.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=x.useState({}),m=Wr(t,A=>c(A)),E=Array.from(u.layers),[T]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=E.indexOf(T),y=d?E.indexOf(d):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,P=y>=b,D=Mb(A=>{const N=A.target,z=[...u.branches].some(R=>R.contains(N));!P||z||(i==null||i(A),a==null||a(A),A.defaultPrevented||o==null||o())},h),v=Bb(A=>{const N=A.target;[...u.branches].some(R=>R.contains(N))||(s==null||s(A),a==null||a(A),A.defaultPrevented||o==null||o())},h);return Rb(A=>{y===u.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&o&&(A.preventDefault(),o()))},h),x.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(zc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),$c(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=zc)}},[d,h,n,u]),x.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),$c())},[d,u]),x.useEffect(()=>{const A=()=>p({});return document.addEventListener(xl,A),()=>document.removeEventListener(xl,A)},[]),g.jsx(Yr.div,{...l,ref:m,style:{pointerEvents:k?P?"auto":"none":void 0,...e.style},onFocusCapture:Xn(e.onFocusCapture,v.onFocusCapture),onBlurCapture:Xn(e.onBlurCapture,v.onBlurCapture),onPointerDownCapture:Xn(e.onPointerDownCapture,D.onPointerDownCapture)})});ep.displayName=Nb;var Db="DismissableLayerBranch",Pb=x.forwardRef((e,t)=>{const n=x.useContext(Jh),r=x.useRef(null),i=Wr(t,r);return x.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),g.jsx(Yr.div,{...e,ref:i})});Pb.displayName=Db;function Mb(e,t=globalThis==null?void 0:globalThis.document){const n=ro(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let l=function(){tp(Ob,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Bb(e,t=globalThis==null?void 0:globalThis.document){const n=ro(e),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&tp(Lb,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $c(){const e=new CustomEvent(xl);document.dispatchEvent(e)}function tp(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?vb(i,s):i.dispatchEvent(s)}var Fr=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},Fb=Gh[" useId ".trim().toString()]||(()=>{}),Hb=0;function Ub(e){const[t,n]=x.useState(Fb());return Fr(()=>{n(r=>r??String(Hb++))},[e]),t?`radix-${t}`:""}const jb=["top","right","bottom","left"],mr=Math.min,nn=Math.max,Pa=Math.round,ea=Math.floor,jn=e=>({x:e,y:e}),zb={left:"right",right:"left",bottom:"top",top:"bottom"},$b={start:"end",end:"start"};function yl(e,t,n){return nn(e,mr(t,n))}function Jn(e,t){return typeof e=="function"?e(t):e}function er(e){return e.split("-")[0]}function yi(e){return e.split("-")[1]}function xu(e){return e==="x"?"y":"x"}function yu(e){return e==="y"?"height":"width"}const Vb=new Set(["top","bottom"]);function Hn(e){return Vb.has(er(e))?"y":"x"}function _u(e){return xu(Hn(e))}function Wb(e,t,n){n===void 0&&(n=!1);const r=yi(e),i=_u(e),s=yu(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Ma(a)),[a,Ma(a)]}function Yb(e){const t=Ma(e);return[_l(e),t,_l(t)]}function _l(e){return e.replace(/start|end/g,t=>$b[t])}const Vc=["left","right"],Wc=["right","left"],Gb=["top","bottom"],qb=["bottom","top"];function Kb(e,t,n){switch(e){case"top":case"bottom":return n?t?Wc:Vc:t?Vc:Wc;case"left":case"right":return t?Gb:qb;default:return[]}}function Xb(e,t,n,r){const i=yi(e);let s=Kb(er(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(_l)))),s}function Ma(e){return e.replace(/left|right|bottom|top/g,t=>zb[t])}function Qb(e){return{top:0,right:0,bottom:0,left:0,...e}}function np(e){return typeof e!="number"?Qb(e):{top:e,right:e,bottom:e,left:e}}function Ba(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Yc(e,t,n){let{reference:r,floating:i}=e;const s=Hn(t),a=_u(t),o=yu(a),l=er(t),u=s==="y",d=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,h=r[o]/2-i[o]/2;let p;switch(l){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-i.width,y:c};break;default:p={x:r.x,y:r.y}}switch(yi(t)){case"start":p[a]-=h*(n&&u?-1:1);break;case"end":p[a]+=h*(n&&u?-1:1);break}return p}const Zb=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:c}=Yc(u,r,l),h=r,p={},m=0;for(let E=0;E<o.length;E++){const{name:T,fn:b}=o[E],{x:y,y:k,data:P,reset:D}=await b({x:d,y:c,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});d=y??d,c=k??c,p={...p,[T]:{...p[T],...P}},D&&m<=50&&(m++,typeof D=="object"&&(D.placement&&(h=D.placement),D.rects&&(u=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:d,y:c}=Yc(u,h,l)),E=-1)}return{x:d,y:c,placement:h,strategy:i,middlewareData:p}};async function ds(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=Jn(t,e),m=np(p),T=o[h?c==="floating"?"reference":"floating":c],b=Ba(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(T)))==null||n?T:T.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:l})),y=c==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),P=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},D=Ba(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:k,strategy:l}):y);return{top:(b.top-D.top+m.top)/P.y,bottom:(D.bottom-b.bottom+m.bottom)/P.y,left:(b.left-D.left+m.left)/P.x,right:(D.right-b.right+m.right)/P.x}}const Jb=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:u,padding:d=0}=Jn(e,t)||{};if(u==null)return{};const c=np(d),h={x:n,y:r},p=_u(i),m=yu(p),E=await a.getDimensions(u),T=p==="y",b=T?"top":"left",y=T?"bottom":"right",k=T?"clientHeight":"clientWidth",P=s.reference[m]+s.reference[p]-h[p]-s.floating[m],D=h[p]-s.reference[p],v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let A=v?v[k]:0;(!A||!await(a.isElement==null?void 0:a.isElement(v)))&&(A=o.floating[k]||s.floating[m]);const N=P/2-D/2,z=A/2-E[m]/2-1,R=mr(c[b],z),W=mr(c[y],z),j=R,w=A-E[m]-W,L=A/2-E[m]/2+N,M=yl(j,L,w),H=!l.arrow&&yi(i)!=null&&L!==M&&s.reference[m]/2-(L<j?R:W)-E[m]/2<0,U=H?L<j?L-j:L-w:0;return{[p]:h[p]+U,data:{[p]:M,centerOffset:L-M-U,...H&&{alignmentOffset:U}},reset:H}}}),eE=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:E=!0,...T}=Jn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=er(i),y=Hn(o),k=er(o)===o,P=await(l.isRTL==null?void 0:l.isRTL(u.floating)),D=h||(k||!E?[Ma(o)]:Yb(o)),v=m!=="none";!h&&v&&D.push(...Xb(o,E,m,P));const A=[o,...D],N=await ds(t,T),z=[];let R=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&z.push(N[b]),c){const L=Wb(i,a,P);z.push(N[L[0]],N[L[1]])}if(R=[...R,{placement:i,overflows:z}],!z.every(L=>L<=0)){var W,j;const L=(((W=s.flip)==null?void 0:W.index)||0)+1,M=A[L];if(M&&(!(c==="alignment"?y!==Hn(M):!1)||R.every(G=>Hn(G.placement)===y?G.overflows[0]>0:!0)))return{data:{index:L,overflows:R},reset:{placement:M}};let H=(j=R.filter(U=>U.overflows[0]<=0).sort((U,G)=>U.overflows[1]-G.overflows[1])[0])==null?void 0:j.placement;if(!H)switch(p){case"bestFit":{var w;const U=(w=R.filter(G=>{if(v){const Q=Hn(G.placement);return Q===y||Q==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Q=>Q>0).reduce((Q,_)=>Q+_,0)]).sort((G,Q)=>G[1]-Q[1])[0])==null?void 0:w[0];U&&(H=U);break}case"initialPlacement":H=o;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function Gc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qc(e){return jb.some(t=>e[t]>=0)}const tE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Jn(e,t);switch(r){case"referenceHidden":{const s=await ds(t,{...i,elementContext:"reference"}),a=Gc(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:qc(a)}}}case"escaped":{const s=await ds(t,{...i,altBoundary:!0}),a=Gc(s,n.floating);return{data:{escapedOffsets:a,escaped:qc(a)}}}default:return{}}}}},rp=new Set(["left","top"]);async function nE(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=er(n),o=yi(n),l=Hn(n)==="y",u=rp.has(a)?-1:1,d=s&&l?-1:1,c=Jn(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return o&&typeof m=="number"&&(p=o==="end"?m*-1:m),l?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const rE=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await nE(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},iE=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:T=>{let{x:b,y}=T;return{x:b,y}}},...l}=Jn(e,t),u={x:n,y:r},d=await ds(t,l),c=Hn(er(i)),h=xu(c);let p=u[h],m=u[c];if(s){const T=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=p+d[T],k=p-d[b];p=yl(y,p,k)}if(a){const T=c==="y"?"top":"left",b=c==="y"?"bottom":"right",y=m+d[T],k=m-d[b];m=yl(y,m,k)}const E=o.fn({...t,[h]:p,[c]:m});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[h]:s,[c]:a}}}}}},sE=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=Jn(e,t),d={x:n,y:r},c=Hn(i),h=xu(c);let p=d[h],m=d[c];const E=Jn(o,t),T=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(l){const k=h==="y"?"height":"width",P=s.reference[h]-s.floating[k]+T.mainAxis,D=s.reference[h]+s.reference[k]-T.mainAxis;p<P?p=P:p>D&&(p=D)}if(u){var b,y;const k=h==="y"?"width":"height",P=rp.has(er(i)),D=s.reference[c]-s.floating[k]+(P&&((b=a.offset)==null?void 0:b[c])||0)+(P?0:T.crossAxis),v=s.reference[c]+s.reference[k]+(P?0:((y=a.offset)==null?void 0:y[c])||0)-(P?T.crossAxis:0);m<D?m=D:m>v&&(m=v)}return{[h]:p,[c]:m}}}},aE=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...u}=Jn(e,t),d=await ds(t,u),c=er(i),h=yi(i),p=Hn(i)==="y",{width:m,height:E}=s.floating;let T,b;c==="top"||c==="bottom"?(T=c,b=h===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(b=c,T=h==="end"?"top":"bottom");const y=E-d.top-d.bottom,k=m-d.left-d.right,P=mr(E-d[T],y),D=mr(m-d[b],k),v=!t.middlewareData.shift;let A=P,N=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=y),v&&!h){const R=nn(d.left,0),W=nn(d.right,0),j=nn(d.top,0),w=nn(d.bottom,0);p?N=m-2*(R!==0||W!==0?R+W:nn(d.left,d.right)):A=E-2*(j!==0||w!==0?j+w:nn(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:A});const z=await a.getDimensions(o.floating);return m!==z.width||E!==z.height?{reset:{rects:!0}}:{}}}};function io(){return typeof window<"u"}function _i(e){return ip(e)?(e.nodeName||"").toLowerCase():"#document"}function an(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $n(e){var t;return(t=(ip(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ip(e){return io()?e instanceof Node||e instanceof an(e).Node:!1}function In(e){return io()?e instanceof Element||e instanceof an(e).Element:!1}function zn(e){return io()?e instanceof HTMLElement||e instanceof an(e).HTMLElement:!1}function Kc(e){return!io()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof an(e).ShadowRoot}const oE=new Set(["inline","contents"]);function Ps(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!oE.has(i)}const lE=new Set(["table","td","th"]);function uE(e){return lE.has(_i(e))}const cE=[":popover-open",":modal"];function so(e){return cE.some(t=>{try{return e.matches(t)}catch{return!1}})}const dE=["transform","translate","scale","rotate","perspective"],fE=["transform","translate","scale","rotate","perspective","filter"],hE=["paint","layout","strict","content"];function ku(e){const t=wu(),n=In(e)?vn(e):e;return dE.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||fE.some(r=>(n.willChange||"").includes(r))||hE.some(r=>(n.contain||"").includes(r))}function pE(e){let t=gr(e);for(;zn(t)&&!gi(t);){if(ku(t))return t;if(so(t))return null;t=gr(t)}return null}function wu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const mE=new Set(["html","body","#document"]);function gi(e){return mE.has(_i(e))}function vn(e){return an(e).getComputedStyle(e)}function ao(e){return In(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gr(e){if(_i(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Kc(e)&&e.host||$n(e);return Kc(t)?t.host:t}function sp(e){const t=gr(e);return gi(t)?e.ownerDocument?e.ownerDocument.body:e.body:zn(t)&&Ps(t)?t:sp(t)}function fs(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=sp(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=an(i);if(s){const o=kl(a);return t.concat(a,a.visualViewport||[],Ps(i)?i:[],o&&n?fs(o):[])}return t.concat(i,fs(i,[],n))}function kl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ap(e){const t=vn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=zn(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,o=Pa(n)!==s||Pa(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function Cu(e){return In(e)?e:e.contextElement}function ci(e){const t=Cu(e);if(!zn(t))return jn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=ap(t);let a=(s?Pa(n.width):n.width)/r,o=(s?Pa(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const gE=jn(0);function op(e){const t=an(e);return!wu()||!t.visualViewport?gE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==an(e)?!1:t}function Hr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Cu(e);let a=jn(1);t&&(r?In(r)&&(a=ci(r)):a=ci(e));const o=bE(s,n,r)?op(s):jn(0);let l=(i.left+o.x)/a.x,u=(i.top+o.y)/a.y,d=i.width/a.x,c=i.height/a.y;if(s){const h=an(s),p=r&&In(r)?an(r):r;let m=h,E=kl(m);for(;E&&r&&p!==m;){const T=ci(E),b=E.getBoundingClientRect(),y=vn(E),k=b.left+(E.clientLeft+parseFloat(y.paddingLeft))*T.x,P=b.top+(E.clientTop+parseFloat(y.paddingTop))*T.y;l*=T.x,u*=T.y,d*=T.x,c*=T.y,l+=k,u+=P,m=an(E),E=kl(m)}}return Ba({width:d,height:c,x:l,y:u})}function oo(e,t){const n=ao(e).scrollLeft;return t?t.left+n:Hr($n(e)).left+n}function lp(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-oo(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function EE(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=$n(r),o=t?so(t.floating):!1;if(r===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},u=jn(1);const d=jn(0),c=zn(r);if((c||!c&&!s)&&((_i(r)!=="body"||Ps(a))&&(l=ao(r)),zn(r))){const p=Hr(r);u=ci(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=a&&!c&&!s?lp(a,l):jn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function TE(e){return Array.from(e.getClientRects())}function xE(e){const t=$n(e),n=ao(e),r=e.ownerDocument.body,i=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+oo(e);const o=-n.scrollTop;return vn(r).direction==="rtl"&&(a+=nn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}const Xc=25;function yE(e,t){const n=an(e),r=$n(e),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const d=wu();(!d||d&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const u=oo(r);if(u<=0){const d=r.ownerDocument,c=d.body,h=getComputedStyle(c),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(r.clientWidth-c.clientWidth-p);m<=Xc&&(s-=m)}else u<=Xc&&(s+=u);return{width:s,height:a,x:o,y:l}}const _E=new Set(["absolute","fixed"]);function kE(e,t){const n=Hr(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=zn(e)?ci(e):jn(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:a,height:o,x:l,y:u}}function Qc(e,t,n){let r;if(t==="viewport")r=yE(e,n);else if(t==="document")r=xE($n(e));else if(In(t))r=kE(t,n);else{const i=op(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ba(r)}function up(e,t){const n=gr(e);return n===t||!In(n)||gi(n)?!1:vn(n).position==="fixed"||up(n,t)}function wE(e,t){const n=t.get(e);if(n)return n;let r=fs(e,[],!1).filter(o=>In(o)&&_i(o)!=="body"),i=null;const s=vn(e).position==="fixed";let a=s?gr(e):e;for(;In(a)&&!gi(a);){const o=vn(a),l=ku(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&_E.has(i.position)||Ps(a)&&!l&&up(e,a))?r=r.filter(d=>d!==a):i=o,a=gr(a)}return t.set(e,r),r}function CE(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?so(t)?[]:wE(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((u,d)=>{const c=Qc(t,d,i);return u.top=nn(c.top,u.top),u.right=mr(c.right,u.right),u.bottom=mr(c.bottom,u.bottom),u.left=nn(c.left,u.left),u},Qc(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function AE(e){const{width:t,height:n}=ap(e);return{width:t,height:n}}function SE(e,t,n){const r=zn(t),i=$n(t),s=n==="fixed",a=Hr(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=jn(0);function u(){l.x=oo(i)}if(r||!r&&!s)if((_i(t)!=="body"||Ps(i))&&(o=ao(t)),r){const p=Hr(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&u();s&&!r&&i&&u();const d=i&&!r&&!s?lp(i,o):jn(0),c=a.left+o.scrollLeft-l.x-d.x,h=a.top+o.scrollTop-l.y-d.y;return{x:c,y:h,width:a.width,height:a.height}}function Po(e){return vn(e).position==="static"}function Zc(e,t){if(!zn(e)||vn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return $n(e)===n&&(n=n.ownerDocument.body),n}function cp(e,t){const n=an(e);if(so(e))return n;if(!zn(e)){let i=gr(e);for(;i&&!gi(i);){if(In(i)&&!Po(i))return i;i=gr(i)}return n}let r=Zc(e,t);for(;r&&uE(r)&&Po(r);)r=Zc(r,t);return r&&gi(r)&&Po(r)&&!ku(r)?n:r||pE(e)||n}const IE=async function(e){const t=this.getOffsetParent||cp,n=this.getDimensions,r=await n(e.floating);return{reference:SE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vE(e){return vn(e).direction==="rtl"}const RE={convertOffsetParentRelativeRectToViewportRelativeRect:EE,getDocumentElement:$n,getClippingRect:CE,getOffsetParent:cp,getElementRects:IE,getClientRects:TE,getDimensions:AE,getScale:ci,isElement:In,isRTL:vE};function dp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NE(e,t){let n=null,r;const i=$n(e);function s(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:c,width:h,height:p}=u;if(o||t(),!h||!p)return;const m=ea(c),E=ea(i.clientWidth-(d+h)),T=ea(i.clientHeight-(c+p)),b=ea(d),k={rootMargin:-m+"px "+-E+"px "+-T+"px "+-b+"px",threshold:nn(0,mr(1,l))||1};let P=!0;function D(v){const A=v[0].intersectionRatio;if(A!==l){if(!P)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!dp(u,e.getBoundingClientRect())&&a(),P=!1}try{n=new IntersectionObserver(D,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(D,k)}n.observe(e)}return a(!0),s}function OE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Cu(e),d=i||s?[...u?fs(u):[],...fs(t)]:[];d.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const c=u&&o?NE(u,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=p)==null||k.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let m,E=l?Hr(e):null;l&&T();function T(){const b=Hr(e);E&&!dp(E,b)&&n(),E=b,m=requestAnimationFrame(T)}return n(),()=>{var b;d.forEach(y=>{i&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),c==null||c(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const LE=rE,DE=iE,PE=eE,ME=aE,BE=tE,Jc=Jb,FE=sE,HE=(e,t,n)=>{const r=new Map,i={platform:RE,...n},s={...i.platform,_c:r};return Zb(e,t,{...i,platform:s})};var UE=typeof document<"u",jE=function(){},ya=UE?x.useLayoutEffect:jE;function Fa(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,i;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(!Fa(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Fa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function fp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ed(e,t){const n=fp(e);return Math.round(t*n)/n}function Mo(e){const t=x.useRef(e);return ya(()=>{t.current=e}),t}function zE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:l,open:u}=e,[d,c]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=x.useState(r);Fa(h,r)||p(r);const[m,E]=x.useState(null),[T,b]=x.useState(null),y=x.useCallback(G=>{G!==v.current&&(v.current=G,E(G))},[]),k=x.useCallback(G=>{G!==A.current&&(A.current=G,b(G))},[]),P=s||m,D=a||T,v=x.useRef(null),A=x.useRef(null),N=x.useRef(d),z=l!=null,R=Mo(l),W=Mo(i),j=Mo(u),w=x.useCallback(()=>{if(!v.current||!A.current)return;const G={placement:t,strategy:n,middleware:h};W.current&&(G.platform=W.current),HE(v.current,A.current,G).then(Q=>{const _={...Q,isPositioned:j.current!==!1};L.current&&!Fa(N.current,_)&&(N.current=_,Tu.flushSync(()=>{c(_)}))})},[h,t,n,W,j]);ya(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,c(G=>({...G,isPositioned:!1})))},[u]);const L=x.useRef(!1);ya(()=>(L.current=!0,()=>{L.current=!1}),[]),ya(()=>{if(P&&(v.current=P),D&&(A.current=D),P&&D){if(R.current)return R.current(P,D,w);w()}},[P,D,w,R,z]);const M=x.useMemo(()=>({reference:v,floating:A,setReference:y,setFloating:k}),[y,k]),H=x.useMemo(()=>({reference:P,floating:D}),[P,D]),U=x.useMemo(()=>{const G={position:n,left:0,top:0};if(!H.floating)return G;const Q=ed(H.floating,d.x),_=ed(H.floating,d.y);return o?{...G,transform:"translate("+Q+"px, "+_+"px)",...fp(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:_}},[n,o,H.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:w,refs:M,elements:H,floatingStyles:U}),[d,w,M,H,U])}const $E=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Jc({element:r.current,padding:i}).fn(n):{}:r?Jc({element:r,padding:i}).fn(n):{}}}},VE=(e,t)=>({...LE(e),options:[e,t]}),WE=(e,t)=>({...DE(e),options:[e,t]}),YE=(e,t)=>({...FE(e),options:[e,t]}),GE=(e,t)=>({...PE(e),options:[e,t]}),qE=(e,t)=>({...ME(e),options:[e,t]}),KE=(e,t)=>({...BE(e),options:[e,t]}),XE=(e,t)=>({...$E(e),options:[e,t]});var QE="Arrow",hp=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return g.jsx(Yr.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});hp.displayName=QE;var ZE=hp;function JE(e){const[t,n]=x.useState(void 0);return Fr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,o=u.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Au="Popper",[pp,mp]=Qh(Au),[eT,gp]=pp(Au),bp=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return g.jsx(eT,{scope:t,anchor:r,onAnchorChange:i,children:n})};bp.displayName=Au;var Ep="PopperAnchor",Tp=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=gp(Ep,n),a=x.useRef(null),o=Wr(t,a),l=x.useRef(null);return x.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||a.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:g.jsx(Yr.div,{...i,ref:o})});Tp.displayName=Ep;var Su="PopperContent",[tT,nT]=pp(Su),xp=x.forwardRef((e,t)=>{var qe,X,ue,ke,Me,Ke;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...E}=e,T=gp(Su,n),[b,y]=x.useState(null),k=Wr(t,ze=>y(ze)),[P,D]=x.useState(null),v=JE(P),A=(v==null?void 0:v.width)??0,N=(v==null?void 0:v.height)??0,z=r+(s!=="center"?"-"+s:""),R=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},W=Array.isArray(u)?u:[u],j=W.length>0,w={padding:R,boundary:W.filter(iT),altBoundary:j},{refs:L,floatingStyles:M,placement:H,isPositioned:U,middlewareData:G}=zE({strategy:"fixed",placement:z,whileElementsMounted:(...ze)=>OE(...ze,{animationFrame:p==="always"}),elements:{reference:T.anchor},middleware:[VE({mainAxis:i+N,alignmentAxis:a}),l&&WE({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?YE():void 0,...w}),l&&GE({...w}),qE({...w,apply:({elements:ze,rects:Be,availableWidth:nt,availableHeight:Xe})=>{const{width:Re,height:$e}=Be.reference,Ye=ze.floating.style;Ye.setProperty("--radix-popper-available-width",`${nt}px`),Ye.setProperty("--radix-popper-available-height",`${Xe}px`),Ye.setProperty("--radix-popper-anchor-width",`${Re}px`),Ye.setProperty("--radix-popper-anchor-height",`${$e}px`)}}),P&&XE({element:P,padding:o}),sT({arrowWidth:A,arrowHeight:N}),h&&KE({strategy:"referenceHidden",...w})]}),[Q,_]=kp(H),se=ro(m);Fr(()=>{U&&(se==null||se())},[U,se]);const te=(qe=G.arrow)==null?void 0:qe.x,S=(X=G.arrow)==null?void 0:X.y,ge=((ue=G.arrow)==null?void 0:ue.centerOffset)!==0,[pe,me]=x.useState();return Fr(()=>{b&&me(window.getComputedStyle(b).zIndex)},[b]),g.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:U?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(ke=G.transformOrigin)==null?void 0:ke.x,(Me=G.transformOrigin)==null?void 0:Me.y].join(" "),...((Ke=G.hide)==null?void 0:Ke.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(tT,{scope:n,placedSide:Q,onArrowChange:D,arrowX:te,arrowY:S,shouldHideArrow:ge,children:g.jsx(Yr.div,{"data-side":Q,"data-align":_,...E,ref:k,style:{...E.style,animation:U?void 0:"none"}})})})});xp.displayName=Su;var yp="PopperArrow",rT={top:"bottom",right:"left",bottom:"top",left:"right"},_p=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=nT(yp,r),a=rT[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(ZE,{...i,ref:n,style:{...i.style,display:"block"}})})});_p.displayName=yp;function iT(e){return e!==null}var sT=e=>({name:"transformOrigin",options:e,fn(t){var T,b,y;const{placement:n,rects:r,middlewareData:i}=t,a=((T=i.arrow)==null?void 0:T.centerOffset)!==0,o=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=kp(n),c={start:"0%",center:"50%",end:"100%"}[d],h=(((b=i.arrow)==null?void 0:b.x)??0)+o/2,p=(((y=i.arrow)==null?void 0:y.y)??0)+l/2;let m="",E="";return u==="bottom"?(m=a?c:`${h}px`,E=`${-l}px`):u==="top"?(m=a?c:`${h}px`,E=`${r.floating.height+l}px`):u==="right"?(m=`${-l}px`,E=a?c:`${p}px`):u==="left"&&(m=`${r.floating.width+l}px`,E=a?c:`${p}px`),{data:{x:m,y:E}}}});function kp(e){const[t,n="center"]=e.split("-");return[t,n]}var aT=bp,oT=Tp,lT=xp,uT=_p;function cT(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var wp=e=>{const{present:t,children:n}=e,r=dT(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=Wr(r.ref,fT(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};wp.displayName="Presence";function dT(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),s=x.useRef("none"),a=e?"mounted":"unmounted",[o,l]=cT(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=ta(r.current);s.current=o==="mounted"?u:"none"},[o]),Fr(()=>{const u=r.current,d=i.current;if(d!==e){const h=s.current,p=ta(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Fr(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=p=>{const E=ta(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&E&&(l("ANIMATION_END"),!i.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},h=p=>{p.target===t&&(s.current=ta(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ta(e){return(e==null?void 0:e.animationName)||"none"}function fT(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hT=Gh[" useInsertionEffect ".trim().toString()]||Fr;function pT({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=mT({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:i;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const c=d.current;c!==o&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=o},[o,r])}const u=x.useCallback(d=>{var c;if(o){const h=gT(d)?d(e):d;h!==e&&((c=a.current)==null||c.call(a,h))}else s(d)},[o,e,s,a]);return[l,u]}function mT({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),s=x.useRef(t);return hT(()=>{s.current=t},[t]),x.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}function gT(e){return typeof e=="function"}var bT=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"}),ET="VisuallyHidden",Cp=x.forwardRef((e,t)=>g.jsx(Yr.span,{...e,ref:t,style:{...bT,...e.style}}));Cp.displayName=ET;var TT=Cp,[lo]=Qh("Tooltip",[mp]),uo=mp(),Ap="TooltipProvider",xT=700,wl="tooltip.open",[yT,Iu]=lo(Ap),_T=e=>{const{__scopeTooltip:t,delayDuration:n=xT,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,a=x.useRef(!0),o=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),g.jsx(yT,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:o,onPointerInTransitChange:x.useCallback(u=>{o.current=u},[]),disableHoverableContent:i,children:s})};_T.displayName=Ap;var hs="Tooltip",[kT,co]=lo(hs),Sp=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:s,disableHoverableContent:a,delayDuration:o}=e,l=Iu(hs,e.__scopeTooltip),u=uo(t),[d,c]=x.useState(null),h=Ub(),p=x.useRef(0),m=a??l.disableHoverableContent,E=o??l.delayDuration,T=x.useRef(!1),[b,y]=pT({prop:r,defaultProp:i??!1,onChange:A=>{A?(l.onOpen(),document.dispatchEvent(new CustomEvent(wl))):l.onClose(),s==null||s(A)},caller:hs}),k=x.useMemo(()=>b?T.current?"delayed-open":"instant-open":"closed",[b]),P=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,T.current=!1,y(!0)},[y]),D=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),v=x.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{T.current=!0,y(!0),p.current=0},E)},[E,y]);return x.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),g.jsx(aT,{...u,children:g.jsx(kT,{scope:t,contentId:h,open:b,stateAttribute:k,trigger:d,onTriggerChange:c,onTriggerEnter:x.useCallback(()=>{l.isOpenDelayedRef.current?v():P()},[l.isOpenDelayedRef,v,P]),onTriggerLeave:x.useCallback(()=>{m?D():(window.clearTimeout(p.current),p.current=0)},[D,m]),onOpen:P,onClose:D,disableHoverableContent:m,children:n})})};Sp.displayName=hs;var Cl="TooltipTrigger",Ip=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=co(Cl,n),s=Iu(Cl,n),a=uo(n),o=x.useRef(null),l=Wr(t,o,i.onTriggerChange),u=x.useRef(!1),d=x.useRef(!1),c=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),g.jsx(oT,{asChild:!0,...a,children:g.jsx(Yr.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:Xn(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Xn(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Xn(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:Xn(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:Xn(e.onBlur,i.onClose),onClick:Xn(e.onClick,i.onClose)})})});Ip.displayName=Cl;var wT="TooltipPortal",[rM,CT]=lo(wT,{forceMount:void 0}),bi="TooltipContent",vp=x.forwardRef((e,t)=>{const n=CT(bi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,a=co(bi,e.__scopeTooltip);return g.jsx(wp,{present:r||a.open,children:a.disableHoverableContent?g.jsx(Rp,{side:i,...s,ref:t}):g.jsx(AT,{side:i,...s,ref:t})})}),AT=x.forwardRef((e,t)=>{const n=co(bi,e.__scopeTooltip),r=Iu(bi,e.__scopeTooltip),i=x.useRef(null),s=Wr(t,i),[a,o]=x.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:c}=r,h=x.useCallback(()=>{o(null),c(!1)},[c]),p=x.useCallback((m,E)=>{const T=m.currentTarget,b={x:m.clientX,y:m.clientY},y=NT(b,T.getBoundingClientRect()),k=OT(b,y),P=LT(E.getBoundingClientRect()),D=PT([...k,...P]);o(D),c(!0)},[c]);return x.useEffect(()=>()=>h(),[h]),x.useEffect(()=>{if(l&&d){const m=T=>p(T,d),E=T=>p(T,l);return l.addEventListener("pointerleave",m),d.addEventListener("pointerleave",E),()=>{l.removeEventListener("pointerleave",m),d.removeEventListener("pointerleave",E)}}},[l,d,p,h]),x.useEffect(()=>{if(a){const m=E=>{const T=E.target,b={x:E.clientX,y:E.clientY},y=(l==null?void 0:l.contains(T))||(d==null?void 0:d.contains(T)),k=!DT(b,a);y?h():k&&(h(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,d,a,u,h]),g.jsx(Rp,{...e,ref:s})}),[ST,IT]=lo(hs,{isInside:!1}),vT=wb("TooltipContent"),Rp=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...o}=e,l=co(bi,n),u=uo(n),{onClose:d}=l;return x.useEffect(()=>(document.addEventListener(wl,d),()=>document.removeEventListener(wl,d)),[d]),x.useEffect(()=>{if(l.trigger){const c=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),g.jsx(ep,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:g.jsxs(lT,{"data-state":l.stateAttribute,...u,...o,ref:t,style:{...o.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:[g.jsx(vT,{children:r}),g.jsx(ST,{scope:n,isInside:!0,children:g.jsx(TT,{id:l.contentId,role:"tooltip",children:i||r})})]})})});vp.displayName=bi;var Np="TooltipArrow",RT=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=uo(n);return IT(Np,n).isInside?null:g.jsx(uT,{...i,...r,ref:t})});RT.displayName=Np;function NT(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function OT(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}function LT(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function DT(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const o=t[s],l=t[a],u=o.x,d=o.y,c=l.x,h=l.y;d>r!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(i=!i)}return i}function PT(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),MT(t)}function MT(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}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)}var BT=Sp,FT=Ip,Op=vp;function Lp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Lp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Lp(e))&&(r&&(r+=" "),r+=t);return r}const HT=(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},UT=(e,t)=>({classGroupId:e,validator:t}),Dp=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ha="-",td=[],jT="arbitrary..",zT=e=>{const t=VT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return $T(a);const o=a.split(Ha),l=o[0]===""&&o.length>1?1:0;return Pp(o,l,t)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=r[a],u=n[a];return l?u?HT(u,l):l:u||td}return n[a]||td}}},Pp=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const u=Pp(e,t+1,s);if(u)return u}const a=n.validators;if(a===null)return;const o=t===0?e.join(Ha):e.slice(t).join(Ha),l=a.length;for(let u=0;u<l;u++){const d=a[u];if(d.validator(o))return d.classGroupId}},$T=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?jT+r:void 0})(),VT=e=>{const{theme:t,classGroups:n}=e;return WT(n,t)},WT=(e,t)=>{const n=Dp();for(const r in e){const i=e[r];vu(i,n,r,t)}return n},vu=(e,t,n,r)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];YT(a,t,n,r)}},YT=(e,t,n,r)=>{if(typeof e=="string"){GT(e,t,n);return}if(typeof e=="function"){qT(e,t,n,r);return}KT(e,t,n,r)},GT=(e,t,n)=>{const r=e===""?t:Mp(t,e);r.classGroupId=n},qT=(e,t,n,r)=>{if(XT(e)){vu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(UT(n,e))},KT=(e,t,n,r)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[o,l]=i[a];vu(l,Mp(t,o),n,r)}},Mp=(e,t)=>{let n=e;const r=t.split(Ha),i=r.length;for(let s=0;s<i;s++){const a=r[s];let o=n.nextPart.get(a);o||(o=Dp(),n.nextPart.set(a,o)),n=o}return n},XT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,QT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return i(s,a),a},set(s,a){s in n?n[s]=a:i(s,a)}}},Al="!",nd=":",ZT=[],rd=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),JT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,o=0,l=0,u;const d=i.length;for(let E=0;E<d;E++){const T=i[E];if(a===0&&o===0){if(T===nd){s.push(i.slice(l,E)),l=E+1;continue}if(T==="/"){u=E;continue}}T==="["?a++:T==="]"?a--:T==="("?o++:T===")"&&o--}const c=s.length===0?i:i.slice(l);let h=c,p=!1;c.endsWith(Al)?(h=c.slice(0,-1),p=!0):c.startsWith(Al)&&(h=c.slice(1),p=!0);const m=u&&u>l?u-l:void 0;return rd(s,p,h,m)};if(t){const i=t+nd,s=r;r=a=>a.startsWith(i)?s(a.slice(i.length)):rd(ZT,!1,a,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},ex=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const a=n[s],o=a[0]==="[",l=t.has(a);o||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},tx=e=>({cache:QT(e.cacheSize),parseClassName:JT(e),sortModifiers:ex(e),...zT(e)}),nx=/\s+/,rx=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],o=e.trim().split(nx);let l="";for(let u=o.length-1;u>=0;u-=1){const d=o[u],{isExternal:c,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:E}=n(d);if(c){l=d+(l.length>0?" "+l:l);continue}let T=!!E,b=r(T?m.substring(0,E):m);if(!b){if(!T){l=d+(l.length>0?" "+l:l);continue}if(b=r(m),!b){l=d+(l.length>0?" "+l:l);continue}T=!1}const y=h.length===0?"":h.length===1?h[0]:s(h).join(":"),k=p?y+Al:y,P=k+b;if(a.indexOf(P)>-1)continue;a.push(P);const D=i(b,T);for(let v=0;v<D.length;++v){const A=D[v];a.push(k+A)}l=d+(l.length>0?" "+l:l)}return l},ix=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=Bp(n))&&(i&&(i+=" "),i+=r);return i},Bp=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Bp(e[r]))&&(n&&(n+=" "),n+=t);return n},sx=(e,...t)=>{let n,r,i,s;const a=l=>{const u=t.reduce((d,c)=>c(d),e());return n=tx(u),r=n.cache.get,i=n.cache.set,s=o,o(l)},o=l=>{const u=r(l);if(u)return u;const d=rx(l,n);return i(l,d),d};return s=a,(...l)=>s(ix(...l))},ax=[],Et=e=>{const t=n=>n[e]||ax;return t.isThemeGetter=!0,t},Fp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ox=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ux=/\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$/,cx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=e=>ox.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),ar=e=>!!e&&Number.isInteger(Number(e)),Bo=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Gn=e=>lx.test(e),Up=()=>!0,hx=e=>ux.test(e)&&!cx.test(e),Ru=()=>!1,px=e=>dx.test(e),mx=e=>fx.test(e),gx=e=>!ce(e)&&!fe(e),bx=e=>xr(e,$p,Ru),ce=e=>Fp.test(e),Ir=e=>xr(e,Vp,hx),id=e=>xr(e,Cx,Ne),Ex=e=>xr(e,Yp,Up),Tx=e=>xr(e,Wp,Ru),sd=e=>xr(e,jp,Ru),xx=e=>xr(e,zp,mx),na=e=>xr(e,Gp,px),fe=e=>Hp.test(e),Oi=e=>Gr(e,Vp),yx=e=>Gr(e,Wp),ad=e=>Gr(e,jp),_x=e=>Gr(e,$p),kx=e=>Gr(e,zp),ra=e=>Gr(e,Gp,!0),wx=e=>Gr(e,Yp,!0),xr=(e,t,n)=>{const r=Fp.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Gr=(e,t,n=!1)=>{const r=Hp.exec(e);return r?r[1]?t(r[1]):n:!1},jp=e=>e==="position"||e==="percentage",zp=e=>e==="image"||e==="url",$p=e=>e==="length"||e==="size"||e==="bg-size",Vp=e=>e==="length",Cx=e=>e==="number",Wp=e=>e==="family-name",Yp=e=>e==="number"||e==="weight",Gp=e=>e==="shadow",Ax=()=>{const e=Et("color"),t=Et("font"),n=Et("text"),r=Et("font-weight"),i=Et("tracking"),s=Et("leading"),a=Et("breakpoint"),o=Et("container"),l=Et("spacing"),u=Et("radius"),d=Et("shadow"),c=Et("inset-shadow"),h=Et("text-shadow"),p=Et("drop-shadow"),m=Et("blur"),E=Et("perspective"),T=Et("aspect"),b=Et("ease"),y=Et("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...P(),fe,ce],v=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],N=()=>[fe,ce,l],z=()=>[sr,"full","auto",...N()],R=()=>[ar,"none","subgrid",fe,ce],W=()=>["auto",{span:["full",ar,fe,ce]},ar,fe,ce],j=()=>[ar,"auto",fe,ce],w=()=>["auto","min","max","fr",fe,ce],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...N()],U=()=>[sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],G=()=>[sr,"screen","full","dvw","lvw","svw","min","max","fit",...N()],Q=()=>[sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],_=()=>[e,fe,ce],se=()=>[...P(),ad,sd,{position:[fe,ce]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],S=()=>["auto","cover","contain",_x,bx,{size:[fe,ce]}],ge=()=>[Bo,Oi,Ir],pe=()=>["","none","full",u,fe,ce],me=()=>["",Ne,Oi,Ir],qe=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Ne,Bo,ad,sd],ke=()=>["","none",m,fe,ce],Me=()=>["none",Ne,fe,ce],Ke=()=>["none",Ne,fe,ce],ze=()=>[Ne,fe,ce],Be=()=>[sr,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gn],breakpoint:[Gn],color:[Up],container:[Gn],"drop-shadow":[Gn],ease:["in","out","in-out"],font:[gx],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gn],shadow:[Gn],spacing:["px",Ne],text:[Gn],"text-shadow":[Gn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sr,ce,fe,T]}],container:["container"],columns:[{columns:[Ne,ce,fe,o]}],"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"],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:D()}],overflow:[{overflow:v()}],"overflow-x":[{"overflow-x":v()}],"overflow-y":[{"overflow-y":v()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[ar,"auto",fe,ce]}],basis:[{basis:[sr,"full","auto",o,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,sr,"auto","initial","none",ce]}],grow:[{grow:["",Ne,fe,ce]}],shrink:[{shrink:["",Ne,fe,ce]}],order:[{order:[ar,"first","last","none",fe,ce]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":w()}],"auto-rows":[{"auto-rows":w()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],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":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[o,"screen",...U()]}],"min-w":[{"min-w":[o,"screen","none",...U()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,Oi,Ir]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,wx,Ex]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bo,ce]}],"font-family":[{font:[yx,Tx,t]}],"font-features":[{"font-features":[ce]}],"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:[i,fe,ce]}],"line-clamp":[{"line-clamp":[Ne,"none",fe,id]}],leading:[{leading:[s,...N()]}],"list-image":[{"list-image":["none",fe,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fe,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...qe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",fe,Ir]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Ne,"auto",fe,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe,ce]}],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",fe,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:S()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ar,fe,ce],radial:["",fe,ce],conic:[ar,fe,ce]},kx,xx]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...qe(),"hidden","none"]}],"divide-style":[{divide:[...qe(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-bs":[{"border-bs":_()}],"border-color-be":[{"border-be":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...qe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,fe,ce]}],"outline-w":[{outline:["",Ne,Oi,Ir]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",d,ra,na]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",c,ra,na]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Ne,Ir]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",h,ra,na]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[Ne,fe,ce]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[fe,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"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":P()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:S()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fe,ce]}],filter:[{filter:["","none",fe,ce]}],blur:[{blur:ke()}],brightness:[{brightness:[Ne,fe,ce]}],contrast:[{contrast:[Ne,fe,ce]}],"drop-shadow":[{"drop-shadow":["","none",p,ra,na]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",Ne,fe,ce]}],"hue-rotate":[{"hue-rotate":[Ne,fe,ce]}],invert:[{invert:["",Ne,fe,ce]}],saturate:[{saturate:[Ne,fe,ce]}],sepia:[{sepia:["",Ne,fe,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,ce]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,fe,ce]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,fe,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,fe,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,fe,ce]}],"backdrop-invert":[{"backdrop-invert":["",Ne,fe,ce]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,fe,ce]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,fe,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,fe,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fe,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",fe,ce]}],ease:[{ease:["linear","initial",b,fe,ce]}],delay:[{delay:[Ne,fe,ce]}],animate:[{animate:["none",y,fe,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,fe,ce]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:Me()}],"rotate-x":[{"rotate-x":Me()}],"rotate-y":[{"rotate-y":Me()}],"rotate-z":[{"rotate-z":Me()}],scale:[{scale:Ke()}],"scale-x":[{"scale-x":Ke()}],"scale-y":[{"scale-y":Ke()}],"scale-z":[{"scale-z":Ke()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[fe,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"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",fe,ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",fe,ce]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Ne,Oi,Ir,id]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{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":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-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-r","border-w-l"],"border-w-y":["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-r","border-color-l"],"border-color-y":["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-mr","scroll-ml"],"scroll-my":["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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Nu=sx(Ax);/**
3
3
  * @license lucide-react v0.575.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
- */const Gp=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
7
+ */const qp=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
8
8
  * @license lucide-react v0.575.0 - ISC
9
9
  *
10
10
  * This source code is licensed under the ISC license.
11
11
  * See the LICENSE file in the root directory of this source tree.
12
- */const Ax=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
12
+ */const Sx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
13
13
  * @license lucide-react v0.575.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
- */const Sx=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
17
+ */const Ix=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
18
18
  * @license lucide-react v0.575.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
- */const ad=e=>{const t=Sx(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
22
+ */const od=e=>{const t=Ix(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
23
23
  * @license lucide-react v0.575.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */var Ix={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"};/**
27
+ */var vx={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"};/**
28
28
  * @license lucide-react v0.575.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const vx=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
32
+ */const Rx=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
33
33
  * @license lucide-react v0.575.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */const Rx=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...o},l)=>x.createElement("svg",{ref:l,...Ix,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Gp("lucide",i),...!s&&!vx(o)&&{"aria-hidden":"true"},...o},[...a.map(([u,d])=>x.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
37
+ */const Nx=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...o},l)=>x.createElement("svg",{ref:l,...vx,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:qp("lucide",i),...!s&&!Rx(o)&&{"aria-hidden":"true"},...o},[...a.map(([u,d])=>x.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
38
38
  * @license lucide-react v0.575.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const qp=(e,t)=>{const n=x.forwardRef(({className:r,...i},s)=>x.createElement(Rx,{ref:s,iconNode:t,className:Gp(`lucide-${Ax(ad(e))}`,`lucide-${e}`,r),...i}));return n.displayName=ad(e),n};/**
42
+ */const Kp=(e,t)=>{const n=x.forwardRef(({className:r,...i},s)=>x.createElement(Nx,{ref:s,iconNode:t,className:qp(`lucide-${Sx(od(e))}`,`lucide-${e}`,r),...i}));return n.displayName=od(e),n};/**
43
43
  * @license lucide-react v0.575.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const Nx=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],eM=qp("loader-circle",Nx);/**
47
+ */const Ox=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],iM=Kp("loader-circle",Ox);/**
48
48
  * @license lucide-react v0.575.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const Ox=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Lx=qp("lock",Ox);function Dx(...e){return Ru(Pt(e))}const ia=new Intl.NumberFormat(void 0,{maximumFractionDigits:2}),_a=1e3,Vi=60*_a,Wi=60*Vi,od=24*Wi;function on(e,t=!1){if(e===0)return"0";if(e<_a)return`${ia.format(e)}ms`;if(e<Vi)return`${ia.format(e/_a)}s`;if(t)return e<Wi?`${ia.format(e/Vi)}m`:`${ia.format(e/Wi)}h`;const n=Math.floor(e/od),r=Math.floor(e%od/Wi),i=Math.floor(e%Wi/Vi),s=Math.floor(e%Vi/_a),a=[];return n>0&&a.push(`${n}d`),r>0&&a.push(`${r}h`),i>0&&a.push(`${i}m`),r<=1&&(s>0||a.length===0)&&a.push(`${s}s`),a.join(" ")}function tM(e){return e.endsWith("//doStreamStep")}function nM(e){if(!Array.isArray(e)||e.length===0)return null;const t=e[0];return!Array.isArray(t)||!t.every(n=>n&&typeof n=="object"&&"role"in n)?null:t}const fo=0,yr=1,ki=2,Kp=4;function ld(e){return()=>e}function Px(e){e()}function Xp(e,t){return n=>e(t(n))}function ud(e,t){return()=>e(t)}function Mx(e,t){return n=>e(t,n)}function Nu(e){return e!==void 0}function Bx(...e){return()=>{e.map(Px)}}function wi(){}function ho(e,t){return t(e),e}function Fx(e,t){return t(e)}function st(...e){return e}function Ge(e,t){return e(yr,t)}function Ie(e,t){e(fo,t)}function Ou(e){e(ki)}function lt(e){return e(Kp)}function he(e,t){return Ge(e,Mx(t,fo))}function Cn(e,t){const n=e(yr,r=>{n(),t(r)});return n}function cd(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Qp(e,t){return e===t}function it(e=Qp){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function xe(e){return t=>n=>{e(n)&&t(n)}}function le(e){return t=>Xp(t,e)}function Mn(e){return t=>()=>{t(e)}}function J(e,...t){const n=Hx(...t);return((r,i)=>{switch(r){case ki:Ou(e);return;case yr:return Ge(e,n(i))}})}function Hn(e,t){return n=>r=>{n(t=e(t,r))}}function Ur(e){return t=>n=>{e>0?e--:t(n)}}function Zn(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function ve(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((s,a)=>{const o=Math.pow(2,a);Ge(s,l=>{const u=n;n=n|o,t[a]=l,u!==i&&n===i&&r&&(r(),r=null)})}),s=>a=>{const o=()=>{s([a].concat(t))};n===i?o():r=o}}function Hx(...e){return t=>e.reduceRight(Fx,t)}function Ux(e){let t,n;const r=()=>t==null?void 0:t();return function(i,s){switch(i){case yr:return s?n===s?void 0:(r(),n=s,t=Ge(e,s),t):(r(),wi);case ki:r(),n=null;return}}}function ie(e){let t=e;const n=He();return((r,i)=>{switch(r){case fo:t=i;break;case yr:{i(t);break}case Kp:return t}return n(r,i)})}function Lt(e,t){return ho(ie(t),n=>he(e,n))}function He(){const e=[];return((t,n)=>{switch(t){case fo:e.slice().forEach(r=>{r(n)});return;case ki:e.splice(0,e.length);return;case yr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function ln(e){return ho(He(),t=>he(e,t))}function We(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:jx(),singleton:n}}const jx=()=>Symbol();function zx(e){const t=new Map,n=({constructor:r,dependencies:i,id:s,singleton:a})=>{if(a&&t.has(s))return t.get(s);const o=r(i.map(l=>n(l)));return a&&t.set(s,o),o};return n(e)}function gt(...e){const t=He(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((s,a)=>{const o=Math.pow(2,a);Ge(s,l=>{n[a]=l,r=r|o,r===i&&Ie(t,n)})}),function(s,a){switch(s){case ki:{Ou(t);return}case yr:return r===i&&a(n),Ge(t,a)}}}function Te(e,t=Qp){return J(e,it(t))}function Al(...e){return function(t,n){switch(t){case ki:return;case yr:return Bx(...e.map(r=>Ge(r,n)))}}}var Gt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Gt||{});const $x={0:"debug",3:"error",1:"log",2:"warn"},Vx=()=>typeof globalThis>"u"?window:globalThis,_r=We(()=>{const e=ie(3);return{log:ie((t,n,r=1)=>{var i;const s=(i=Vx().VIRTUOSO_LOG_LEVEL)!=null?i:lt(e);r>=s&&console[$x[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function qr(e,t,n){return Lu(e,t,n).callbackRef}function Lu(e,t,n){const r=F.useRef(null);let i=a=>{};const s=F.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const o=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?o():requestAnimationFrame(o)}):null,[e,n]);return i=a=>{a&&t?(s==null||s.observe(a),r.current=a):(r.current&&(s==null||s.unobserve(r.current)),r.current=null)},{callbackRef:i,ref:r}}function Wx(e,t,n,r,i,s,a,o,l){const u=F.useCallback(d=>{const c=Yx(d.children,t,o?"offsetWidth":"offsetHeight",i);let h=d.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const p=h.lastElementChild.dataset.viewportType==="window";let m;p&&(m=h.ownerDocument.defaultView);const E=a?o?a.scrollLeft:a.scrollTop:p?o?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:o?h.scrollLeft:h.scrollTop,T=a?o?a.scrollWidth:a.scrollHeight:p?o?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:o?h.scrollWidth:h.scrollHeight,b=a?o?a.offsetWidth:a.offsetHeight:p?o?m.innerWidth:m.innerHeight:o?h.offsetWidth:h.offsetHeight;r({scrollHeight:T,scrollTop:Math.max(E,0),viewportHeight:b}),s==null||s(o?dd("column-gap",getComputedStyle(d).columnGap,i):dd("row-gap",getComputedStyle(d).rowGap,i)),c!==null&&e(c)},[e,t,i,s,a,r,o]);return Lu(u,n,l)}function Yx(e,t,n,r){const i=e.length;if(i===0)return null;const s=[];for(let a=0;a<i;a++){const o=e.item(a);if(o.dataset.index===void 0)continue;const l=parseInt(o.dataset.index),u=parseFloat(o.dataset.knownSize),d=t(o,n);if(d===0&&r("Zero-sized element, this should not happen",{child:o},Gt.ERROR),d===u)continue;const c=s[s.length-1];s.length===0||c.size!==d||c.endIndex!==l-1?s.push({endIndex:l,size:d,startIndex:l}):s[s.length-1].endIndex++}return s}function dd(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Gt.WARN),t==="normal"?0:parseInt(t??"0",10)}function Zp(e,t,n){const r=F.useRef(null),i=F.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const u=l.getBoundingClientRect(),d=u.width;let c,h;if(t){const p=t.getBoundingClientRect(),m=u.top-p.top;h=p.height-Math.max(0,m),c=m+t.scrollTop}else{const p=a.current.ownerDocument.defaultView;h=p.innerHeight-Math.max(0,u.top),c=u.top+p.scrollY}r.current={offsetTop:c,visibleHeight:h,visibleWidth:d},e(r.current)},[e,t]),{callbackRef:s,ref:a}=Lu(i,!0,n),o=F.useCallback(()=>{i(a.current)},[i,a]);return F.useEffect(()=>{var l;if(t){t.addEventListener("scroll",o);const u=new ResizeObserver(()=>{requestAnimationFrame(o)});return u.observe(t),()=>{t.removeEventListener("scroll",o),u.unobserve(t)}}else{const u=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return u==null||u.addEventListener("scroll",o),u==null||u.addEventListener("resize",o),()=>{u==null||u.removeEventListener("scroll",o),u==null||u.removeEventListener("resize",o)}}},[o,t,a]),s}const zt=We(()=>{const e=He(),t=He(),n=ie(0),r=He(),i=ie(0),s=He(),a=He(),o=ie(0),l=ie(0),u=ie(0),d=ie(0),c=He(),h=He(),p=ie(!1),m=ie(!1),E=ie(!1);return he(J(e,le(({scrollTop:T})=>T)),t),he(J(e,le(({scrollHeight:T})=>T)),a),he(t,i),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:d,headerHeight:o,horizontalDirection:m,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:c,scrollTop:t,skipAnimationFrameInResizeObserver:E,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:s}},[],{singleton:!0}),ps={lvl:0};function Jp(e,t){const n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]);const s=[];for(let a=1;a<n;a++){const{index:o,value:l}=t(e[a]);s.push({end:o-1,start:r,value:i}),r=o,i=l}return s.push({end:1/0,start:r,value:i}),s}function Ze(e){return e===ps}function ms(e,t){if(!Ze(e))return t===e.k?e.v:t<e.k?ms(e.l,t):ms(e.r,t)}function vn(e,t,n="k"){if(Ze(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=vn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return vn(e.l,t,n)}function rn(e,t,n){return Ze(e)?nm(t,n,1):t===e.k?xt(e,{k:t,v:n}):t<e.k?fd(xt(e,{l:rn(e.l,t,n)})):fd(xt(e,{r:rn(e.r,t,n)}))}function di(){return ps}function fi(e,t,n){if(Ze(e))return[];const r=vn(e,t)[0];return Gx(Il(e,r,n))}function Sl(e,t){if(Ze(e))return ps;const{k:n,l:r,r:i}=e;if(t===n){if(Ze(r))return i;if(Ze(i))return r;{const[s,a]=tm(r);return ka(xt(e,{k:s,l:em(r),v:a}))}}else return t<n?ka(xt(e,{l:Sl(r,t)})):ka(xt(e,{r:Sl(i,t)}))}function Lr(e){return Ze(e)?[]:[...Lr(e.l),{k:e.k,v:e.v},...Lr(e.r)]}function Il(e,t,n){if(Ze(e))return[];const{k:r,l:i,r:s,v:a}=e;let o=[];return r>t&&(o=o.concat(Il(i,t,n))),r>=t&&r<=n&&o.push({k:r,v:a}),r<=n&&(o=o.concat(Il(s,t,n))),o}function ka(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Fo(t))return rm(xt(e,{lvl:n-1}));if(!Ze(t)&&!Ze(t.r))return xt(t.r,{l:xt(t,{r:t.r.l}),lvl:n,r:xt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Fo(e))return vl(xt(e,{lvl:n-1}));if(!Ze(r)&&!Ze(r.l)){const i=r.l,s=Fo(i)?r.lvl-1:r.lvl;return xt(i,{l:xt(e,{lvl:n-1,r:i.l}),lvl:i.lvl+1,r:vl(xt(r,{l:i.r,lvl:s}))})}else throw new Error("Unexpected empty nodes")}}function xt(e,t){return nm(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function em(e){return Ze(e.r)?e.l:ka(xt(e,{r:em(e.r)}))}function Fo(e){return Ze(e)||e.lvl>e.r.lvl}function tm(e){return Ze(e.r)?[e.k,e.v]:tm(e.r)}function nm(e,t,n,r=ps,i=ps){return{k:e,l:r,lvl:n,r:i,v:t}}function fd(e){return vl(rm(e))}function rm(e){const{l:t}=e;return!Ze(t)&&t.lvl===e.lvl?xt(t,{r:xt(e,{l:t.r})}):e}function vl(e){const{lvl:t,r:n}=e;return!Ze(n)&&!Ze(n.r)&&n.lvl===t&&n.r.lvl===t?xt(n,{l:xt(e,{r:n.l}),lvl:t+1}):e}function Gx(e){return Jp(e,({k:t,v:n})=>({index:t,value:n}))}function im(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function gs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Du=We(()=>({recalcInProgress:ie(!1)}),[],{singleton:!0});function sm(e,t,n){return e[Ua(e,t,n)]}function Ua(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const s=Math.floor((r+i)/2),a=e[s],o=n(a,t);if(o===0)return s;if(o===-1){if(i-r<2)return s-1;i=s-1}else{if(i===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function qx(e,t,n,r){const i=Ua(e,t,r),s=Ua(e,n,r,i);return e.slice(i,s+1)}function br(e,t){return Math.round(e.getBoundingClientRect()[t])}function po(e){return!Ze(e.groupOffsetTree)}function Pu({index:e},t){return t===e?0:t<e?-1:1}function Kx(){return{groupIndices:[],groupOffsetTree:di(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:di()}}function Xx(e,t){let n=Ze(e)?0:1/0;for(const r of t){const{endIndex:i,size:s,startIndex:a}=r;if(n=Math.min(n,a),Ze(e)){e=rn(e,0,s);continue}const o=fi(e,a-1,i+1);if(o.some(ry(r)))continue;let l=!1,u=!1;for(const{end:d,start:c,value:h}of o)l?(i>=c||s===h)&&(e=Sl(e,c)):(u=h!==s,l=!0),d>i&&i>=c&&h!==s&&(e=rn(e,i+1,h));u&&(e=rn(e,a,s))}return[e,n]}function Qx(e){return typeof e.groupIndex<"u"}function Zx({offset:e},t){return t===e?0:t<e?-1:1}function bs(e,t,n){if(t.length===0)return 0;const{index:r,offset:i,size:s}=sm(t,e,Pu),a=e-r,o=s*a+(a-1)*n+i;return o>0?o+n:o}function am(e,t){if(!po(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function om(e,t,n){if(Qx(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=am(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function Jx(e,t,n,r=0){return r>0&&(t=Math.max(t,sm(e,r,Pu).offset)),Jp(qx(e,t,n,Zx),ny)}function ey(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Gt.DEBUG);const s=e.sizeTree;let a=s,o=0;if(n.length>0&&Ze(s)&&t.length===2){const h=t[0].size,p=t[1].size;a=n.reduce((m,E)=>rn(rn(m,E,h),E+1,p),a)}else[a,o]=Xx(a,t);if(a===s)return e;const{lastIndex:l,lastOffset:u,lastSize:d,offsetTree:c}=Rl(e.offsetTree,o,a,i);return{groupIndices:n,groupOffsetTree:n.reduce((h,p)=>rn(h,p,bs(p,c,i)),di()),lastIndex:l,lastOffset:u,lastSize:d,offsetTree:c,sizeTree:a}}function ty(e){return Lr(e).map(({k:t,v:n},r,i)=>{const s=i[r+1];return{endIndex:s?s.k-1:1/0,size:n,startIndex:t}})}function hd(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Rl(e,t,n,r){let i=e,s=0,a=0,o=0,l=0;if(t!==0){l=Ua(i,t-1,Pu),o=i[l].offset;const u=vn(n,t-1);s=u[0],a=u[1],i.length&&i[l].size===vn(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}else i=[];for(const{start:u,value:d}of fi(n,t,1/0)){const c=u-s,h=c*a+o+c*r;i.push({index:u,offset:h,size:d}),s=u,o=h,a=d}return{lastIndex:s,lastOffset:o,lastSize:a,offsetTree:i}}function ny(e){return{index:e.index,value:e}}function ry(e){const{endIndex:t,size:n,startIndex:r}=e;return i=>i.start===r&&(i.end===t||i.end===1/0)&&i.value===n}const iy={offsetHeight:"height",offsetWidth:"width"},Vn=We(([{log:e},{recalcInProgress:t}])=>{const n=He(),r=He(),i=Lt(r,0),s=He(),a=He(),o=ie(0),l=ie([]),u=ie(void 0),d=ie(void 0),c=ie(void 0),h=ie(void 0),p=ie((A,N)=>br(A,iy[N])),m=ie(void 0),E=ie(0),T=Kx(),b=Lt(J(n,ve(l,e,E),Hn(ey,T),it()),T),y=Lt(J(l,it(),Hn((A,N)=>({current:N,prev:A.current}),{current:[],prev:[]}),le(({prev:A})=>A)),[]);he(J(l,xe(A=>A.length>0),ve(b,E),le(([A,N,z])=>{const R=A.reduce((W,j,w)=>rn(W,j,bs(j,N.offsetTree,z)||w),di());return{...N,groupIndices:A,groupOffsetTree:R}})),b),he(J(r,ve(b),xe(([A,{lastIndex:N}])=>A<N),le(([A,{lastIndex:N,lastSize:z}])=>[{endIndex:N,size:z,startIndex:A}])),n),he(u,d);const k=Lt(J(u,le(A=>A===void 0)),!0);he(J(d,xe(A=>A!==void 0&&Ze(lt(b).sizeTree)),le(A=>{const N=lt(c),z=lt(l).length>0;return N?z?[{endIndex:0,size:N,startIndex:0},{endIndex:1,size:A,startIndex:1}]:[]:[{endIndex:0,size:A,startIndex:0}]})),n),he(J(h,xe(A=>A!==void 0&&A.length>0&&Ze(lt(b).sizeTree)),le(A=>{const N=[];let z=A[0],R=0;for(let W=1;W<A.length;W++){const j=A[W];j!==z&&(N.push({endIndex:W-1,size:z,startIndex:R}),z=j,R=W)}return N.push({endIndex:A.length-1,size:z,startIndex:R}),N})),n),he(J(l,ve(c,d),xe(([,A,N])=>A!==void 0&&N!==void 0),le(([A,N,z])=>{const R=[];for(let W=0;W<A.length;W++){const j=A[W],w=A[W+1];R.push({startIndex:j,endIndex:j,size:N}),w!==void 0&&R.push({startIndex:j+1,endIndex:w-1,size:z})}return R})),n);const P=ln(J(n,ve(b),Hn(({sizes:A},[N,z])=>({changed:z!==A,sizes:z}),{changed:!1,sizes:T}),le(A=>A.changed)));Ge(J(o,Hn((A,N)=>({diff:A.prev-N,prev:N}),{diff:0,prev:0}),le(A=>A.diff)),A=>{const{groupIndices:N}=lt(b);if(A>0)Ie(t,!0),Ie(s,A+hd(A,N));else if(A<0){const z=lt(y);z.length>0&&(A-=hd(-A,z)),Ie(a,A)}}),Ge(J(o,ve(e)),([A,N])=>{A<0&&N("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:o},Gt.ERROR)});const D=ln(s);he(J(s,ve(b),le(([A,N])=>{const z=N.groupIndices.length>0,R=[],W=N.lastSize;if(z){const j=ms(N.sizeTree,0);let w=0,L=0;for(;w<A;){const H=N.groupIndices[L],U=N.groupIndices.length===L+1?1/0:N.groupIndices[L+1]-H-1;R.push({endIndex:H,size:j,startIndex:H}),R.push({endIndex:H+1+U-1,size:W,startIndex:H+1}),L++,w+=U+1}const M=Lr(N.sizeTree);return w!==A&&M.shift(),M.reduce((H,{k:U,v:G})=>{let Q=H.ranges;return H.prevSize!==0&&(Q=[...H.ranges,{endIndex:U+A-1,size:H.prevSize,startIndex:H.prevIndex}]),{prevIndex:U+A,prevSize:G,ranges:Q}},{prevIndex:A,prevSize:0,ranges:R}).ranges}return Lr(N.sizeTree).reduce((j,{k:w,v:L})=>({prevIndex:w+A,prevSize:L,ranges:[...j.ranges,{endIndex:w+A-1,size:j.prevSize,startIndex:j.prevIndex}]}),{prevIndex:0,prevSize:W,ranges:[]}).ranges})),n);const v=ln(J(a,ve(b,E),le(([A,{offsetTree:N},z])=>{const R=-A;return bs(R,N,z)})));return he(J(a,ve(b,E),le(([A,N,z])=>{if(N.groupIndices.length>0){if(Ze(N.sizeTree))return N;let R=di();const W=lt(y);let j=0,w=0,L=0;for(;j<-A;){L=W[w];const M=W[w+1]-L-1;w++,j+=M+1}if(R=Lr(N.sizeTree).reduce((M,{k:H,v:U})=>rn(M,Math.max(0,H+A),U),R),j!==-A){const M=ms(N.sizeTree,L);R=rn(R,0,M);const H=vn(N.sizeTree,-A+1)[1];R=rn(R,1,H)}return{...N,sizeTree:R,...Rl(N.offsetTree,0,R,z)}}else{const R=Lr(N.sizeTree).reduce((W,{k:j,v:w})=>rn(W,Math.max(0,j+A),w),di());return{...N,sizeTree:R,...Rl(N.offsetTree,0,R,z)}}})),b),{beforeUnshiftWith:D,data:m,defaultItemSize:d,firstItemIndex:o,fixedItemSize:u,fixedGroupSize:c,gap:E,groupIndices:l,heightEstimates:h,itemSize:p,listRefresh:P,shiftWith:a,shiftWithOffset:v,sizeRanges:n,sizes:b,statefulTotalCount:i,totalCount:r,trackItemSizes:k,unshiftWith:s}},st(_r,Du),{singleton:!0});function sy(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const lm=We(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{const s=He(),a=He(),o=ln(J(s,le(sy)));return he(J(o,le(l=>l.totalCount)),n),he(J(o,le(l=>l.groupIndices)),e),he(J(gt(i,t,r),xe(([l,u])=>po(u)),le(([l,u,d])=>vn(u.groupOffsetTree,Math.max(l-d,0),"v")[0]),it(),le(l=>[l])),a),{groupCounts:s,topItemsIndexes:a}},st(Vn,zt)),kr=We(([{log:e}])=>{const t=ie(!1),n=ln(J(t,xe(r=>r),it()));return Ge(t,r=>{r&&lt(e)("props updated",{},Gt.DEBUG)}),{didMount:n,propsReady:t}},st(_r),{singleton:!0}),ay=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function um(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!ay)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ms=We(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:s,footerHeight:a,headerHeight:o,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:d,viewportHeight:c},{log:h}])=>{const p=He(),m=He(),E=ie(0);let T=null,b=null,y=null;function k(){T&&(T(),T=null),y&&(y(),y=null),b&&(clearTimeout(b),b=null),Ie(l,!1)}return he(J(p,ve(n,c,r,E,o,a,h),ve(e,s,i),le(([[P,D,v,A,N,z,R,W],j,w,L])=>{const M=um(P),{align:H,behavior:U,offset:G}=M,Q=A-1,_=om(M,D,Q);let se=bs(_,D.offsetTree,j)+z;H==="end"?(se+=w+vn(D.sizeTree,_)[1]-v+L,_===Q&&(se+=R)):H==="center"?se+=(w+vn(D.sizeTree,_)[1]-v+L)/2:se-=N,G&&(se+=G);const te=S=>{k(),S?(W("retrying to scroll to",{location:P},Gt.DEBUG),Ie(p,P)):(Ie(m,!0),W("list did not change, scroll successful",{},Gt.DEBUG))};if(k(),U==="smooth"){let S=!1;y=Ge(t,ge=>{S=S||ge}),T=Cn(d,()=>{te(S)})}else T=Cn(J(t,oy(150)),te);return b=setTimeout(()=>{k()},1200),Ie(l,!0),W("scrolling from index to",{behavior:U,index:_,top:se},Gt.DEBUG),{behavior:U,top:se}})),u),{scrollTargetReached:m,scrollToIndex:p,topListHeight:E}},st(Vn,zt,_r),{singleton:!0});function oy(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Mu(e,t){e==0?t():requestAnimationFrame(()=>{Mu(e-1,t)})}function Bu(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Bs=We(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:s},{didMount:a}])=>{const o=ie(!0),l=ie(0),u=ie(!0);return he(J(a,ve(l),xe(([d,c])=>!!c),Mn(!1)),o),he(J(a,ve(l),xe(([d,c])=>!!c),Mn(!1)),u),Ge(J(gt(t,a),ve(o,n,e,u),xe(([[,d],c,{sizeTree:h},p,m])=>d&&(!Ze(h)||Nu(p))&&!c&&!m),ve(l)),([,d])=>{Cn(i,()=>{Ie(u,!0)}),Mu(4,()=>{Cn(r,()=>{Ie(o,!0)}),Ie(s,d)})}),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:o}},st(Vn,zt,Ms,kr),{singleton:!0});function cm(e,t){return Math.abs(e-t)<1.01}const Es="up",Qi="down",ly="none",uy={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},cy=0,Fs=We(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:s}])=>{const a=ie(!1),o=ie(!0),l=He(),u=He(),d=ie(4),c=ie(cy),h=Lt(J(Al(J(Te(i),Ur(1),Mn(!0)),J(Te(i),Ur(1),Mn(!1),cd(100))),it()),!1),p=Lt(J(Al(J(n,Mn(!0)),J(n,Mn(!1),cd(200))),it()),!1);he(J(gt(Te(i),Te(c)),le(([y,k])=>y<=k),it()),o),he(J(o,Zn(50)),u);const m=ln(J(gt(r,Te(s),Te(t),Te(e),Te(d)),Hn((y,[{scrollHeight:k,scrollTop:P},D,v,A,N])=>{const z=P+D-k>-N,R={scrollHeight:k,scrollTop:P,viewportHeight:D};if(z){let j,w;return P>y.state.scrollTop?(j="SCROLLED_DOWN",w=y.state.scrollTop-P):(j="SIZE_DECREASED",w=y.state.scrollTop-P||y.scrollTopDelta),{atBottom:!0,atBottomBecause:j,scrollTopDelta:w,state:R}}let W;return R.scrollHeight>y.state.scrollHeight?W="SIZE_INCREASED":D<y.state.viewportHeight?W="VIEWPORT_HEIGHT_DECREASING":P<y.state.scrollTop?W="SCROLLING_UPWARDS":W="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:W,state:R}},uy),it((y,k)=>y&&y.atBottom===k.atBottom))),E=Lt(J(r,Hn((y,{scrollHeight:k,scrollTop:P,viewportHeight:D})=>{if(cm(y.scrollHeight,k))return{changed:!1,jump:0,scrollHeight:k,scrollTop:P};{const v=k-(P+D)<1;return y.scrollTop!==P&&v?{changed:!0,jump:y.scrollTop-P,scrollHeight:k,scrollTop:P}:{changed:!0,jump:0,scrollHeight:k,scrollTop:P}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),xe(y=>y.changed),le(y=>y.jump)),0);he(J(m,le(y=>y.atBottom)),a),he(J(a,Zn(50)),l);const T=ie(Qi);he(J(r,le(({scrollTop:y})=>y),it(),Hn((y,k)=>lt(p)?{direction:y.direction,prevScrollTop:k}:{direction:k<y.prevScrollTop?Es:Qi,prevScrollTop:k},{direction:Qi,prevScrollTop:0}),le(y=>y.direction)),T),he(J(r,Zn(50),Mn(ly)),T);const b=ie(0);return he(J(h,xe(y=>!y),Mn(0)),b),he(J(i,Zn(100),ve(h),xe(([y,k])=>k),Hn(([y,k],[P])=>[k,P],[0,0]),le(([y,k])=>k-y)),b),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:d,atTopStateChange:u,atTopThreshold:c,isAtBottom:a,isAtTop:o,isScrolling:h,lastJumpDueToItemResize:E,scrollDirection:T,scrollVelocity:b}},st(zt)),Ts="top",xs="bottom",pd="none";function md(e,t,n){return typeof e=="number"?n===Es&&t===Ts||n===Qi&&t===xs?e:0:n===Es?t===Ts?e.main:e.reverse:t===xs?e.main:e.reverse}function gd(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const Fu=We(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{const s=He(),a=ie(0),o=ie(0),l=ie(0),u=Lt(J(gt(Te(r),Te(i),Te(n),Te(s,gs),Te(l),Te(a),Te(t),Te(e),Te(o)),le(([d,c,h,[p,m],E,T,b,y,k])=>{const P=d-y,D=T+b,v=Math.max(h-P,0);let A=pd;const N=gd(k,Ts),z=gd(k,xs);return p-=y,p+=h+b,m+=h+b,m-=y,p>d+D-N&&(A=Es),m<d-v+c+z&&(A=Qi),A!==pd?[Math.max(P-h-md(E,Ts,A)-N,0),P-v-b+c+md(E,xs,A)+z]:null}),xe(d=>d!=null),it(gs)),[0,0]);return{increaseViewportBy:o,listBoundary:s,overscan:l,topListHeight:a,visibleRange:u}},st(zt),{singleton:!0});function dy(e,t,n){if(po(t)){const r=am(e,t);return[{index:vn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const Ho={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function wa(e,t,n,r,i,s){const{lastIndex:a,lastOffset:o,lastSize:l}=i;let u=0,d=0;if(e.length>0){u=e[0].offset;const E=e[e.length-1];d=E.offset+E.size}const c=n-a,h=o+c*l+(c-1)*r,p=u,m=h-d;return{bottom:d,firstItemIndex:s,items:bd(e,i,s),offsetBottom:m,offsetTop:u,top:p,topItems:bd(t,i,s),topListHeight:t.reduce((E,T)=>T.size+E,0),totalCount:n}}function dm(e,t,n,r,i,s){let a=0;if(n.groupIndices.length>0)for(const d of n.groupIndices){if(d-a>=e)break;a++}const o=e+a,l=Bu(t,o),u=Array.from({length:o}).map((d,c)=>({data:s[c+l],index:c+l,offset:0,size:0}));return wa(u,[],o,i,n,r)}function bd(e,t,n){if(e.length===0)return[];if(!po(t))return e.map(u=>({...u,index:u.index+n,originalIndex:u.index}));const r=e[0].index,i=e[e.length-1].index,s=[],a=fi(t.groupOffsetTree,r,i);let o,l=0;for(const u of e){(!o||o.end<u.index)&&(o=a.shift(),l=t.groupIndices.indexOf(o.start));let d;u.index===o.start?d={index:l,type:"group"}:d={groupIndex:l,index:u.index-(l+1)+n},s.push({...d,data:u.data,offset:u.offset,originalIndex:u.index,size:u.size})}return s}function Ed(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const Kr=We(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},s,{listBoundary:a,topListHeight:o,visibleRange:l},{initialTopMostItemIndex:u,scrolledToInitialItem:d},{topListHeight:c},h,{didMount:p},{recalcInProgress:m}])=>{const E=ie([]),T=ie(0),b=He(),y=ie(0);he(s.topItemsIndexes,E);const k=Lt(J(gt(p,m,Te(l,gs),Te(i),Te(r),Te(u),d,Te(E),Te(t),Te(n),Te(y),e),xe(([A,N,,z,,,,,,,,R])=>{const W=R&&R.length!==z;return A&&!N&&!W}),le(([,,[A,N],z,R,W,j,w,L,M,H,U])=>{var G,Q,_,se;const te=R,{offsetTree:S,sizeTree:ge}=te,pe=lt(T);if(z===0)return{...Ho,totalCount:z};if(A===0&&N===0)return pe===0?{...Ho,totalCount:z}:dm(pe,W,R,L,M,U||[]);if(Ze(ge))return pe>0?null:wa(dy(Bu(W,z),te,U),[],z,M,te,L);const me=[];if(w.length>0){const ze=w[0],Be=w[w.length-1];let nt=0;for(const Xe of fi(ge,ze,Be)){const Re=Xe.value,$e=Math.max(Xe.start,ze),Ye=Math.min(Xe.end,Be);for(let ut=$e;ut<=Ye;ut++)me.push({data:U==null?void 0:U[ut],index:ut,offset:nt,size:Re}),nt+=Re}}if(!j)return wa([],me,z,M,te,L);const qe=w.length>0?w[w.length-1]+1:0,X=Jx(S,A,N,qe);if(X.length===0)return null;const ue=z-1,ke=ho([],ze=>{for(const Be of X){const nt=Be.value;let Xe=nt.offset,Re=Be.start;const $e=nt.size;if(nt.offset<A){Re+=Math.floor((A-nt.offset+M)/($e+M));const ut=Re-Be.start;Xe+=ut*$e+ut*M}Re<qe&&(Xe+=(qe-Re)*$e,Re=qe);const Ye=Math.min(Be.end,ue);for(let ut=Re;ut<=Ye&&!(Xe>=N);ut++)ze.push({data:U==null?void 0:U[ut],index:ut,offset:Xe,size:$e}),Xe+=$e+M}}),Me=Ed(H,Ts),Ke=Ed(H,xs);if(ke.length>0&&(Me>0||Ke>0)){const ze=ke[0],Be=ke[ke.length-1];if(Me>0&&ze.index>qe){const nt=Math.min(Me,ze.index-qe),Xe=[];let Re=ze.offset;for(let $e=ze.index-1;$e>=ze.index-nt;$e--){const Ye=(Q=(G=fi(ge,$e,$e)[0])==null?void 0:G.value)!=null?Q:ze.size;Re-=Ye+M,Xe.unshift({data:U==null?void 0:U[$e],index:$e,offset:Re,size:Ye})}ke.unshift(...Xe)}if(Ke>0&&Be.index<ue){const nt=Math.min(Ke,ue-Be.index);let Xe=Be.offset+Be.size+M;for(let Re=Be.index+1;Re<=Be.index+nt;Re++){const $e=(se=(_=fi(ge,Re,Re)[0])==null?void 0:_.value)!=null?se:Be.size;ke.push({data:U==null?void 0:U[Re],index:Re,offset:Xe,size:$e}),Xe+=$e+M}}}return wa(ke,me,z,M,te,L)}),xe(A=>A!==null),it()),Ho);he(J(e,xe(Nu),le(A=>A==null?void 0:A.length)),i),he(J(k,le(A=>A.topListHeight)),c),he(c,o),he(J(k,le(A=>[A.top,A.bottom])),a),he(J(k,le(A=>A.items)),b);const P=ln(J(k,xe(({items:A})=>A.length>0),ve(i,e),xe(([{items:A},N])=>A[A.length-1].originalIndex===N-1),le(([,A,N])=>[A-1,N]),it(gs),le(([A])=>A))),D=ln(J(k,Zn(200),xe(({items:A,topItems:N})=>A.length>0&&A[0].originalIndex===N.length),le(({items:A})=>A[0].index),it())),v=ln(J(k,xe(({items:A})=>A.length>0),le(({items:A})=>{let N=0,z=A.length-1;for(;A[N].type==="group"&&N<z;)N++;for(;A[z].type==="group"&&z>N;)z--;return{endIndex:A[z].index,startIndex:A[N].index}}),it(im)));return{endReached:P,initialItemCount:T,itemsRendered:b,listState:k,minOverscanItemCount:y,rangeChanged:v,startReached:D,topItemsIndexes:E,...h}},st(Vn,lm,Fu,Bs,Ms,Fs,kr,Du),{singleton:!0}),fm=We(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{const s=He(),a=Lt(J(gt(n,e,r,t,i),le(([o,l,u,d,c])=>o+l+u+d+c.offsetBottom+c.bottom)),0);return he(Te(a),s),{totalListHeight:a,totalListHeightChanged:s}},st(zt,Kr),{singleton:!0}),fy=We(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ie(!1),r=Lt(J(gt(n,e,t),xe(([i])=>i),le(([,i,s])=>Math.max(0,i-s)),Zn(0),it()),0);return{alignToBottom:n,paddingTopAddition:r}},st(zt,fm),{singleton:!0}),hm=We(()=>({context:ie(null)})),hy=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:s,viewportTop:a})=>t<a?{...i,align:n??"start",behavior:r}:e>s?{...i,align:n??"end",behavior:r}:null,pm=We(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:s,scrollingInProgress:a,scrollTop:o,viewportHeight:l},{scrollToIndex:u}])=>{const d=He();return he(J(d,ve(t,l,n,s,i,r,o),ve(e),le(([[c,h,p,m,E,T,b,y],k])=>{const{align:P,behavior:D,calculateViewLocation:v=hy,done:A,...N}=c,z=om(c,h,m-1),R=bs(z,h.offsetTree,k)+E+T,W=R+vn(h.sizeTree,z)[1],j=y+T,w=y+p-b,L=v({itemBottom:W,itemTop:R,locationParams:{align:P,behavior:D,...N},viewportBottom:w,viewportTop:j});return L?A&&Cn(J(a,xe(M=>!M),Ur(lt(a)?1:2)),A):A==null||A(),L}),xe(c=>c!==null)),u),{scrollIntoView:d}},st(Vn,zt,Ms,Kr,_r),{singleton:!0});function Td(e){return e?e==="smooth"?"smooth":"auto":!1}const py=(e,t)=>typeof e=="function"?Td(e(t)):t&&Td(e),my=We(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:s},{scrollToIndex:a},{scrolledToInitialItem:o},{didMount:l,propsReady:u},{log:d},{scrollingInProgress:c},{context:h},{scrollIntoView:p}])=>{const m=ie(!1),E=He();let T=null;function b(D){Ie(a,{align:"end",behavior:D,index:"LAST"})}Ge(J(gt(J(Te(t),Ur(1)),l),ve(Te(m),s,o,c),le(([[D,v],A,N,z,R])=>{let W=v&&z,j="auto";return W&&(j=py(A,N||R),W=W&&!!j),{followOutputBehavior:j,shouldFollow:W,totalCount:D}}),xe(({shouldFollow:D})=>D)),({followOutputBehavior:D,totalCount:v})=>{T&&(T(),T=null),lt(n)?requestAnimationFrame(()=>{lt(d)("following output to ",{totalCount:v},Gt.DEBUG),b(D)}):T=Cn(e,()=>{lt(d)("following output to ",{totalCount:v},Gt.DEBUG),b(D),T=null})});function y(D){const v=Cn(i,A=>{D&&!A.atBottom&&A.notAtBottomBecause==="SIZE_INCREASED"&&!T&&(lt(d)("scrolling to bottom due to increased size",{},Gt.DEBUG),b("auto"))});setTimeout(v,100)}Ge(J(gt(Te(m),t,u),xe(([D,,v])=>D&&v),Hn(({value:D},[,v])=>({refreshed:D===v,value:v}),{refreshed:!1,value:0}),xe(({refreshed:D})=>D),ve(m,t)),([,D])=>{lt(o)&&y(D!==!1)}),Ge(E,()=>{y(lt(m)!==!1)}),Ge(gt(Te(m),i),([D,v])=>{D&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&b("auto")});const k=ie(null),P=He();return he(Al(J(Te(r),le(D=>{var v;return(v=D==null?void 0:D.length)!=null?v:0})),J(Te(t))),P),Ge(J(gt(J(P,Ur(1)),l),ve(Te(k),o,c,h),le(([[D,v],A,N,z,R])=>v&&N&&(A==null?void 0:A({context:R,totalCount:D,scrollingInProgress:z}))),xe(D=>!!D),Zn(0)),D=>{T&&(T(),T=null),lt(n)?requestAnimationFrame(()=>{lt(d)("scrolling into view",{}),Ie(p,D)}):T=Cn(e,()=>{lt(d)("scrolling into view",{}),Ie(p,D),T=null})}),{autoscrollToBottom:E,followOutput:m,scrollIntoViewOnChange:k}},st(Vn,Fs,Ms,Bs,kr,_r,zt,hm,pm)),gy=We(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:s,listState:a},{didMount:o}])=>(he(J(o,ve(s),xe(([,l])=>l!==0),ve(i,r,t,n,e),le(([[,l],u,d,c,h,p=[]])=>dm(l,u,d,c,h,p))),a),{}),st(Vn,Bs,Kr,kr),{singleton:!0}),by=We(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ie(0);return Ge(J(e,ve(r),xe(([,i])=>i!==0),le(([,i])=>({top:i}))),i=>{Cn(J(n,Ur(1),xe(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Ie(t,i)})})}),{initialScrollTop:r}},st(kr,zt,Kr),{singleton:!0}),mm=We(([{scrollVelocity:e}])=>{const t=ie(!1),n=He(),r=ie(!1);return he(J(e,ve(r,t,n),xe(([i,s])=>!!s),le(([i,s,a,o])=>{const{enter:l,exit:u}=s;if(a){if(u(i,o))return!1}else if(l(i,o))return!0;return a}),it()),t),Ge(J(gt(t,e,n),ve(r)),([[i,s,a],o])=>{i&&o&&o.change&&o.change(s,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},st(Fs),{singleton:!0}),Hu=We(([{scrollContainerState:e,scrollTo:t}])=>{const n=He(),r=He(),i=He(),s=ie(!1),a=ie(void 0);return he(J(gt(n,r),le(([{scrollHeight:o,scrollTop:l,viewportHeight:u},{offsetTop:d}])=>({scrollHeight:o,scrollTop:Math.max(0,l-d),viewportHeight:u}))),e),he(J(t,ve(r),le(([o,{offsetTop:l}])=>({...o,top:o.top+l}))),i),{customScrollParent:a,useWindowScroll:s,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},st(zt)),Ey=We(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:s},{useWindowScroll:a,windowScrollContainerState:o,windowViewportRect:l}])=>{const u=He(),d=ie(void 0),c=ie(null),h=ie(null);return he(o,c),he(l,h),Ge(J(u,ve(t,r,a,c,h,n)),([p,m,E,T,b,y,k])=>{const P=ty(m.sizeTree);T&&b!==null&&y!==null&&(E=b.scrollTop-y.offsetTop),E-=k,p({ranges:P,scrollTop:E})}),he(J(d,xe(Nu),le(Ty)),i),he(J(s,ve(d),xe(([,p])=>p!==void 0),it(),le(([,p])=>p.ranges)),e),{getState:u,restoreStateFrom:d}},st(Vn,zt,Bs,kr,Hu));function Ty(e){return{align:"start",index:0,offset:e.scrollTop}}const xy=We(([{topItemsIndexes:e}])=>{const t=ie(0);return he(J(t,xe(n=>n>=0),le(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},st(Kr));function gm(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const yy=gm(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),_y=We(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:s,lastJumpDueToItemResize:a,scrollDirection:o},{listState:l},{beforeUnshiftWith:u,gap:d,shiftWithOffset:c,sizes:h},{log:p},{recalcInProgress:m}])=>{const E=ln(J(l,ve(a),Hn(([,b,y,k],[{bottom:P,items:D,offsetBottom:v,totalCount:A},N])=>{const z=P+v;let R=0;return y===A&&b.length>0&&D.length>0&&(D[0].originalIndex===0&&b[0].originalIndex===0||(R=z-k,R!==0&&(R+=N))),[R,D,A,z]},[0,[],0,0]),xe(([b])=>b!==0),ve(r,o,n,i,p,m),xe(([,b,y,k,,,P])=>!P&&!k&&b!==0&&y===Es),le(([[b],,,,,y])=>(y("Upward scrolling compensation",{amount:b},Gt.DEBUG),b))));function T(b){b>0?(Ie(t,{behavior:"auto",top:-b}),Ie(e,0)):(Ie(e,0),Ie(t,{behavior:"auto",top:-b}))}return Ge(J(E,ve(e,s)),([b,y,k])=>{k&&yy()?Ie(e,y-b):T(-b)}),Ge(J(gt(Lt(s,!1),e,m),xe(([b,y,k])=>!b&&!k&&y!==0),le(([b,y])=>y),Zn(1)),T),he(J(c,le(b=>({top:-b}))),t),Ge(J(u,ve(h,d),le(([b,{groupIndices:y,lastSize:k,sizeTree:P},D])=>{function v(A){return A*(k+D)}if(y.length===0)return v(b);{let A=0;const N=ms(P,0);let z=0,R=0;for(;z<b;){z++,A+=N;let W=y.length===R+1?1/0:y[R+1]-y[R]-1;z+W>b&&(A-=N,W=b-z+1),z+=W,A+=v(W),R++}return A}})),b=>{Ie(e,b),requestAnimationFrame(()=>{Ie(t,{top:b}),requestAnimationFrame(()=>{Ie(e,0),Ie(m,!1)})})}),{deviation:e}},st(zt,Fs,Kr,Vn,_r,Du)),ky=We(([e,t,n,r,i,s,a,o,l,u,d])=>({...e,...t,...n,...r,...i,...s,...a,...o,...l,...u,...d}),st(Fu,gy,kr,mm,fm,by,fy,Hu,pm,_r,hm)),bm=We(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:s,groupIndices:a,heightEstimates:o,itemSize:l,sizeRanges:u,sizes:d,statefulTotalCount:c,totalCount:h,trackItemSizes:p},{initialItemFinalLocationReached:m,initialTopMostItemIndex:E,scrolledToInitialItem:T},b,y,k,P,{scrollToIndex:D},v,{topItemCount:A},{groupCounts:N},z])=>{const{listState:R,minOverscanItemCount:W,topItemsIndexes:j,rangeChanged:w,...L}=P;return he(w,z.scrollSeekRangeChanged),he(J(z.windowViewportRect,le(M=>M.visibleHeight)),b.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:s,groupCounts:N,heightEstimates:o,initialItemFinalLocationReached:m,initialTopMostItemIndex:E,scrolledToInitialItem:T,sizeRanges:u,topItemCount:A,topItemsIndexes:j,totalCount:h,...k,groupIndices:a,itemSize:l,listState:R,minOverscanItemCount:W,scrollToIndex:D,statefulTotalCount:c,trackItemSizes:p,rangeChanged:w,...L,...z,...b,sizes:d,...y}},st(Vn,Bs,zt,Ey,my,Kr,Ms,_y,xy,lm,ky));function wy(e,t){const n={},r={};let i=0;const s=e.length;for(;i<s;)r[e[i]]=1,i+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const sa=typeof document<"u"?F.useLayoutEffect:F.useEffect;function Em(e,t,n){const r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),o=F.createContext({});function l(T,b){T.propsReady&&Ie(T.propsReady,!1);for(const y of r){const k=T[t.required[y]];Ie(k,b[y])}for(const y of i)if(y in b){const k=T[t.optional[y]];Ie(k,b[y])}T.propsReady&&Ie(T.propsReady,!0)}function u(T){return s.reduce((b,y)=>(b[y]=k=>{const P=T[t.methods[y]];Ie(P,k)},b),{})}function d(T){return a.reduce((b,y)=>(b[y]=Ux(T[t.events[y]]),b),{})}const c=F.forwardRef((T,b)=>{const{children:y,...k}=T,[P]=F.useState(()=>ho(zx(e),A=>{l(A,k)})),[D]=F.useState(ud(d,P));sa(()=>{for(const A of a)A in k&&Ge(D[A],k[A]);return()=>{Object.values(D).map(Ou)}},[k,D,P]),sa(()=>{l(P,k)}),F.useImperativeHandle(b,ld(u(P)));const v=n;return g.jsx(o.Provider,{value:P,children:n?g.jsx(v,{...wy([...r,...i,...a],k),children:y}):y})}),h=T=>{const b=F.useContext(o);return F.useCallback(y=>{Ie(b[T],y)},[b,T])},p=T=>{const b=F.useContext(o)[T],y=F.useCallback(k=>Ge(b,k),[b]);return F.useSyncExternalStore(y,()=>lt(b),()=>lt(b))},m=T=>{const b=F.useContext(o)[T],[y,k]=F.useState(ud(lt,b));return sa(()=>Ge(b,P=>{P!==y&&k(ld(P))}),[b,y]),y},E=F.version.startsWith("18")?p:m;return{Component:c,useEmitter:(T,b)=>{const y=F.useContext(o)[T];sa(()=>Ge(y,b),[b,y])},useEmitterValue:E,usePublisher:h}}const Tm=F.createContext(void 0),xm=F.createContext(void 0),ym=typeof document<"u"?F.useLayoutEffect:F.useEffect;function Uo(e){return"self"in e}function Cy(e){return"body"in e}function _m(e,t,n,r=wi,i,s){const a=F.useRef(null),o=F.useRef(null),l=F.useRef(null),u=F.useCallback(h=>{let p,m,E;const T=h.target;if(Cy(T)||Uo(T)){const y=Uo(T)?T:T.defaultView;E=s?y.scrollX:y.scrollY,p=s?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,m=s?y.innerWidth:y.innerHeight}else E=s?T.scrollLeft:T.scrollTop,p=s?T.scrollWidth:T.scrollHeight,m=s?T.offsetWidth:T.offsetHeight;const b=()=>{e({scrollHeight:p,scrollTop:Math.max(E,0),viewportHeight:m})};h.suppressFlushSync?b():Gh.flushSync(b),o.current!==null&&(E===o.current||E<=0||E===p-m)&&(o.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,s]);F.useEffect(()=>{const h=i||a.current;return r(i||a.current),u({suppressFlushSync:!0,target:h}),h.addEventListener("scroll",u,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",u)}},[a,u,n,r,i]);function d(h){const p=a.current;if(!p||(s?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const m=h.behavior==="smooth";let E,T,b;Uo(p)?(T=Math.max(br(p.document.documentElement,s?"width":"height"),s?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),E=s?p.innerWidth:p.innerHeight,b=s?window.scrollX:window.scrollY):(T=p[s?"scrollWidth":"scrollHeight"],E=br(p,s?"width":"height"),b=p[s?"scrollLeft":"scrollTop"]);const y=T-E;if(h.top=Math.ceil(Math.max(Math.min(y,h.top),0)),cm(E,T)||h.top===b){e({scrollHeight:T,scrollTop:b,viewportHeight:E}),m&&t(!0);return}m?(o.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,o.current=null,t(!0)},1e3)):o.current=null,s&&(h={behavior:h.behavior,left:h.top}),p.scrollTo(h)}function c(h){s&&(h={behavior:h.behavior,left:h.top}),a.current.scrollBy(h)}return{scrollByCallback:c,scrollerRef:a,scrollToCallback:d}}const jo="-webkit-sticky",xd="sticky",Uu=gm(()=>{if(typeof document>"u")return xd;const e=document.createElement("div");return e.style.position=jo,e.style.position===jo?jo:xd});function ju(e){return e}const Ay=We(()=>{const e=ie(o=>`Item ${o}`),t=ie(o=>`Group ${o}`),n=ie({}),r=ie(ju),i=ie("div"),s=ie(wi),a=(o,l=null)=>Lt(J(n,le(u=>u[o]),it()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:i,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),Sy=We(([e,t])=>({...e,...t}),st(bm,Ay)),Iy=({height:e})=>g.jsx("div",{style:{height:e}}),vy={overflowAnchor:"none",position:Uu(),zIndex:1},km={overflowAnchor:"none"},Ry={...km,display:"inline-block",height:"100%"},yd=F.memo(function({showTopList:e=!1}){const t=_e("listState"),n=gn("sizeRanges"),r=_e("useWindowScroll"),i=_e("customScrollParent"),s=gn("windowScrollContainerState"),a=gn("scrollContainerState"),o=i||r?s:a,l=_e("itemContent"),u=_e("context"),d=_e("groupContent"),c=_e("trackItemSizes"),h=_e("itemSize"),p=_e("log"),m=gn("gap"),E=_e("horizontalDirection"),{callbackRef:T}=Wx(n,h,c,e?wi:o,p,m,i,E,_e("skipAnimationFrameInResizeObserver")),[b,y]=F.useState(0);zu("deviation",L=>{b!==L&&y(L)});const k=_e("EmptyPlaceholder"),P=_e("ScrollSeekPlaceholder")||Iy,D=_e("ListComponent"),v=_e("ItemComponent"),A=_e("GroupComponent"),N=_e("computeItemKey"),z=_e("isSeeking"),R=_e("groupIndices").length>0,W=_e("alignToBottom"),j=_e("initialItemFinalLocationReached"),w=e?{}:{boxSizing:"border-box",...E?{display:"inline-block",height:"100%",marginLeft:b!==0?b:W?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:b!==0?b:W?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...j?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&k?g.jsx(k,{...Ot(k,u)}):g.jsx(D,{...Ot(D,u),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:T,style:w,children:(e?t.topItems:t.items).map(L=>{const M=L.originalIndex,H=N(M+t.firstItemIndex,L.data,u);return z?x.createElement(P,{...Ot(P,u),height:L.size,index:L.index,key:H,type:L.type||"item",...L.type==="group"?{}:{groupIndex:L.groupIndex}}):L.type==="group"?x.createElement(A,{...Ot(A,u),"data-index":M,"data-item-index":L.index,"data-known-size":L.size,key:H,style:vy},d(L.index,u)):x.createElement(v,{...Ot(v,u),...Dy(v,L.data),"data-index":M,"data-item-group-index":L.groupIndex,"data-item-index":L.index,"data-known-size":L.size,key:H,style:E?Ry:km},R?l(L.index,L.groupIndex,L.data,u):l(L.index,L.data,u))})})}),Ny={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Oy={outline:"none",overflowX:"auto",position:"relative"},mo=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),Ly={position:Uu(),top:0,width:"100%",zIndex:1};function Ot(e,t){if(typeof e!="string")return{context:t}}function Dy(e,t){return{item:typeof e=="string"?void 0:t}}const Py=F.memo(function(){const e=_e("HeaderComponent"),t=gn("headerHeight"),n=_e("HeaderFooterTag"),r=qr(F.useMemo(()=>s=>{t(br(s,"height"))},[t]),!0,_e("skipAnimationFrameInResizeObserver")),i=_e("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Ot(e,i)})}):null}),My=F.memo(function(){const e=_e("FooterComponent"),t=gn("footerHeight"),n=_e("HeaderFooterTag"),r=qr(F.useMemo(()=>s=>{t(br(s,"height"))},[t]),!0,_e("skipAnimationFrameInResizeObserver")),i=_e("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Ot(e,i)})}):null});function wm({useEmitter:e,useEmitterValue:t,usePublisher:n}){return F.memo(function({children:r,style:i,context:s,...a}){const o=n("scrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),d=t("scrollerRef"),c=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:m}=_m(o,u,l,d,void 0,c);return e("scrollTo",m),e("scrollBy",h),g.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...c?Oy:Ny,...i},tabIndex:0,...a,...Ot(l,s),children:r})})}function Cm({useEmitter:e,useEmitterValue:t,usePublisher:n}){return F.memo(function({children:r,style:i,context:s,...a}){const o=n("windowScrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),d=t("totalListHeight"),c=t("deviation"),h=t("customScrollParent"),p=F.useRef(null),m=t("scrollerRef"),{scrollByCallback:E,scrollerRef:T,scrollToCallback:b}=_m(o,u,l,m,h);return ym(()=>{var y;return T.current=h||((y=p.current)==null?void 0:y.ownerDocument.defaultView),()=>{T.current=null}},[T,h]),e("windowScrollTo",b),e("scrollBy",E),g.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...d!==0?{height:d+c}:{}},...a,...Ot(l,s),children:r})})}const By=({children:e})=>{const t=F.useContext(Tm),n=gn("viewportHeight"),r=gn("fixedItemHeight"),i=_e("alignToBottom"),s=_e("horizontalDirection"),a=F.useMemo(()=>Xp(n,l=>br(l,s?"width":"height")),[n,s]),o=qr(a,!0,_e("skipAnimationFrameInResizeObserver"));return F.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:o,style:mo(i),children:e})},Fy=({children:e})=>{const t=F.useContext(Tm),n=gn("windowViewportRect"),r=gn("fixedItemHeight"),i=_e("customScrollParent"),s=Zp(n,i,_e("skipAnimationFrameInResizeObserver")),a=_e("alignToBottom");return F.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:s,style:mo(a),children:e})},Hy=({children:e})=>{const t=_e("TopItemListComponent")||"div",n=_e("headerHeight"),r={...Ly,marginTop:`${n}px`},i=_e("context");return g.jsx(t,{style:r,...Ot(t,i),children:e})},Uy=F.memo(function(e){const t=_e("useWindowScroll"),n=_e("topItemsIndexes").length>0,r=_e("customScrollParent"),i=_e("context");return g.jsxs(r||t?$y:zy,{...e,context:i,children:[n&&g.jsx(Hy,{children:g.jsx(yd,{showTopList:!0})}),g.jsxs(r||t?Fy:By,{children:[g.jsx(Py,{}),g.jsx(yd,{}),g.jsx(My,{})]})]})}),{Component:jy,useEmitter:zu,useEmitterValue:_e,usePublisher:gn}=Em(Sy,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Uy),zy=wm({useEmitter:zu,useEmitterValue:_e,usePublisher:gn}),$y=Cm({useEmitter:zu,useEmitterValue:_e,usePublisher:gn}),Vy=jy,Wy=We(()=>{const e=ie(u=>g.jsxs("td",{children:["Item $",u]})),t=ie(null),n=ie(u=>g.jsxs("td",{colSpan:1e3,children:["Group ",u]})),r=ie(null),i=ie(null),s=ie({}),a=ie(ju),o=ie(wi),l=(u,d=null)=>Lt(J(s,le(c=>c[u]),it()),d);return{components:s,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}});st(bm,Wy);Uu();const _d={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},Yy={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:kd,floor:ja,max:Zi,min:zo,round:wd}=Math;function Cd(e,t,n){return Array.from({length:t-e+1}).map((r,i)=>({data:n===null?null:n[i+e],index:i+e}))}function Gy(e){return{...Yy,items:e}}function aa(e,t){return e&&e.width===t.width&&e.height===t.height}function qy(e,t){return e&&e.column===t.column&&e.row===t.row}const Ky=We(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:s,scrollBy:a,scrollContainerState:o,scrollTo:l,scrollTop:u,smoothScrollTargetReached:d,viewportHeight:c},h,p,{didMount:m,propsReady:E},{customScrollParent:T,useWindowScroll:b,windowScrollContainerState:y,windowScrollTo:k,windowViewportRect:P},D])=>{const v=ie(0),A=ie(0),N=ie(_d),z=ie({height:0,width:0}),R=ie({height:0,width:0}),W=He(),j=He(),w=ie(0),L=ie(null),M=ie({column:0,row:0}),H=He(),U=He(),G=ie(!1),Q=ie(0),_=ie(!0),se=ie(!1),te=ie(!1);Ge(J(m,ve(Q),xe(([X,ue])=>!!ue)),()=>{Ie(_,!1)}),Ge(J(gt(m,_,R,z,Q,se),xe(([X,ue,ke,Me,,Ke])=>X&&!ue&&ke.height!==0&&Me.height!==0&&!Ke)),([,,,,X])=>{Ie(se,!0),Mu(1,()=>{Ie(W,X)}),Cn(J(u),()=>{Ie(t,[0,0]),Ie(_,!0)})}),he(J(U,xe(X=>X!=null&&X.scrollTop>0),Mn(0)),A),Ge(J(m,ve(U),xe(([,X])=>X!=null)),([,X])=>{X&&(Ie(z,X.viewport),Ie(R,X.item),Ie(M,X.gap),X.scrollTop>0&&(Ie(G,!0),Cn(J(u,Ur(1)),ue=>{Ie(G,!1)}),Ie(l,{top:X.scrollTop})))}),he(J(z,le(({height:X})=>X)),c),he(J(gt(Te(z,aa),Te(R,aa),Te(M,(X,ue)=>X&&X.column===ue.column&&X.row===ue.row),Te(u)),le(([X,ue,ke,Me])=>({gap:ke,item:ue,scrollTop:Me,viewport:X}))),H),he(J(gt(Te(v),r,Te(M,qy),Te(R,aa),Te(z,aa),Te(L),Te(A),Te(G),Te(_),Te(Q)),xe(([,,,,,,,X])=>!X),le(([X,[ue,ke],Me,Ke,ze,Be,nt,,Xe,Re])=>{const{column:$e,row:Ye}=Me,{height:ut,width:Cr}=Ke,{width:_t}=ze;if(nt===0&&(X===0||_t===0))return _d;if(Cr===0){const St=Bu(Re,X),vt=St+Math.max(nt-1,0);return Gy(Cd(St,vt,Be))}const Kt=Am(_t,Cr,$e);let Nn,xn;Xe?ue===0&&ke===0&&nt>0?(Nn=0,xn=nt-1):(Nn=Kt*ja((ue+Ye)/(ut+Ye)),xn=Kt*kd((ke+Ye)/(ut+Ye))-1,xn=zo(X-1,Zi(xn,Kt-1)),Nn=zo(xn,Zi(0,Nn))):(Nn=0,xn=-1);const q=Cd(Nn,xn,Be),{bottom:ae,top:Ee}=Ad(ze,Me,Ke,q),we=kd(X/Kt),De=we*ut+(we-1)*Ye-ae;return{bottom:ae,itemHeight:ut,items:q,itemWidth:Cr,offsetBottom:De,offsetTop:Ee,top:Ee}})),N),he(J(L,xe(X=>X!==null),le(X=>X.length)),v),he(J(gt(z,R,N,M),xe(([X,ue,{items:ke}])=>ke.length>0&&ue.height!==0&&X.height!==0),le(([X,ue,{items:ke},Me])=>{const{bottom:Ke,top:ze}=Ad(X,Me,ue,ke);return[ze,Ke]}),it(gs)),t);const S=ie(!1);he(J(u,ve(S),le(([X,ue])=>ue||X!==0)),S);const ge=ln(J(gt(N,v),xe(([{items:X}])=>X.length>0),ve(S),xe(([[X,ue],ke])=>{const Me=X.items[X.items.length-1].index===ue-1;return(ke||X.bottom>0&&X.itemHeight>0&&X.offsetBottom===0&&X.items.length===ue)&&Me}),le(([[,X]])=>X-1),it())),pe=ln(J(Te(N),xe(({items:X})=>X.length>0&&X[0].index===0),Mn(0),it())),me=ln(J(Te(N),ve(G),xe(([{items:X},ue])=>X.length>0&&!ue),le(([{items:X}])=>({endIndex:X[X.length-1].index,startIndex:X[0].index})),it(im),Zn(0)));he(me,p.scrollSeekRangeChanged),he(J(W,ve(z,R,v,M),le(([X,ue,ke,Me,Ke])=>{const ze=um(X),{align:Be,behavior:nt,offset:Xe}=ze;let Re=ze.index;Re==="LAST"&&(Re=Me-1),Re=Zi(0,Re,zo(Me-1,Re));let $e=Nl(ue,Ke,ke,Re);return Be==="end"?$e=wd($e-ue.height+ke.height):Be==="center"&&($e=wd($e-ue.height/2+ke.height/2)),Xe&&($e+=Xe),{behavior:nt,top:$e}})),l);const qe=Lt(J(N,le(X=>X.offsetBottom+X.bottom)),0);return he(J(P,le(X=>({height:X.visibleHeight,width:X.visibleWidth}))),z),{customScrollParent:T,data:L,deviation:w,footerHeight:i,gap:M,headerHeight:s,increaseViewportBy:e,initialItemCount:A,itemDimensions:R,overscan:n,restoreStateFrom:U,scrollBy:a,scrollContainerState:o,scrollHeight:j,scrollTo:l,scrollToIndex:W,scrollTop:u,smoothScrollTargetReached:d,totalCount:v,useWindowScroll:b,viewportDimensions:z,windowScrollContainerState:y,windowScrollTo:k,windowViewportRect:P,...p,gridState:N,horizontalDirection:te,initialTopMostItemIndex:Q,totalListHeight:qe,...h,endReached:ge,propsReady:E,rangeChanged:me,startReached:pe,stateChanged:H,stateRestoreInProgress:G,...D}},st(Fu,zt,Fs,mm,kr,Hu,_r));function Am(e,t,n){return Zi(1,ja((e+n)/(ja(t)+n)))}function Ad(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};const s=Nl(e,t,n,r[0].index);return{bottom:Nl(e,t,n,r[r.length-1].index)+i,top:s}}function Nl(e,t,n,r){const i=Am(e.width,n.width,t.column),s=ja(r/i),a=s*n.height+Zi(0,s-1)*t.row;return a>0?a+t.row:a}const Xy=We(()=>{const e=ie(c=>`Item ${c}`),t=ie({}),n=ie(null),r=ie("virtuoso-grid-item"),i=ie("virtuoso-grid-list"),s=ie(ju),a=ie("div"),o=ie(wi),l=(c,h=null)=>Lt(J(t,le(p=>p[c]),it()),h),u=ie(!1),d=ie(!1);return he(Te(d),u),{components:t,computeItemKey:s,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:i,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:d,ScrollerComponent:l("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),Qy=We(([e,t])=>({...e,...t}),st(Ky,Xy)),Zy=F.memo(function(){const e=ot("gridState"),t=ot("listClassName"),n=ot("itemClassName"),r=ot("itemContent"),i=ot("computeItemKey"),s=ot("isSeeking"),a=bn("scrollHeight"),o=ot("ItemComponent"),l=ot("ListComponent"),u=ot("ScrollSeekPlaceholder"),d=ot("context"),c=bn("itemDimensions"),h=bn("gap"),p=ot("log"),m=ot("stateRestoreInProgress"),E=bn("reportReadyState"),T=qr(F.useMemo(()=>b=>{const y=b.parentElement.parentElement.scrollHeight;a(y);const k=b.firstChild;if(k){const{height:P,width:D}=k.getBoundingClientRect();c({height:P,width:D})}h({column:Sd("column-gap",getComputedStyle(b).columnGap,p),row:Sd("row-gap",getComputedStyle(b).rowGap,p)})},[a,c,h,p]),!0,!1);return ym(()=>{e.itemHeight>0&&e.itemWidth>0&&E(!0)},[e]),m?null:g.jsx(l,{className:t,ref:T,...Ot(l,d),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(b=>{const y=i(b.index,b.data,d);return s?g.jsx(u,{...Ot(u,d),height:e.itemHeight,index:b.index,width:e.itemWidth},y):x.createElement(o,{...Ot(o,d),className:n,"data-index":b.index,key:y},r(b.index,b.data,d))})})}),Jy=F.memo(function(){const e=ot("HeaderComponent"),t=bn("headerHeight"),n=ot("headerFooterTag"),r=qr(F.useMemo(()=>s=>{t(br(s,"height"))},[t]),!0,!1),i=ot("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Ot(e,i)})}):null}),e2=F.memo(function(){const e=ot("FooterComponent"),t=bn("footerHeight"),n=ot("headerFooterTag"),r=qr(F.useMemo(()=>s=>{t(br(s,"height"))},[t]),!0,!1),i=ot("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Ot(e,i)})}):null}),t2=({children:e})=>{const t=F.useContext(xm),n=bn("itemDimensions"),r=bn("viewportDimensions"),i=qr(F.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]),!0,!1);return F.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),g.jsx("div",{ref:i,style:mo(!1),children:e})},n2=({children:e})=>{const t=F.useContext(xm),n=bn("windowViewportRect"),r=bn("itemDimensions"),i=ot("customScrollParent"),s=Zp(n,i,!1);return F.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),g.jsx("div",{ref:s,style:mo(!1),children:e})},r2=F.memo(function({...e}){const t=ot("useWindowScroll"),n=ot("customScrollParent"),r=n||t?s2:i2,i=n||t?n2:t2,s=ot("context");return g.jsx(r,{...e,...Ot(r,s),children:g.jsxs(i,{children:[g.jsx(Jy,{}),g.jsx(Zy,{}),g.jsx(e2,{})]})})}),{useEmitter:Sm,useEmitterValue:ot,usePublisher:bn}=Em(Qy,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},r2),i2=wm({useEmitter:Sm,useEmitterValue:ot,usePublisher:bn}),s2=Cm({useEmitter:Sm,useEmitterValue:ot,usePublisher:bn});function Sd(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Gt.WARN),t==="normal"?0:parseInt(t??"0",10)}const a2="modulepreload",o2=function(e){return"/"+e},Id={},ys=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let a=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=a(n.map(u=>{if(u=o2(u),u in Id)return;Id[u]=!0;const d=u.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":a2,d||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),d)return new Promise((p,m)=>{h.addEventListener("load",p),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return t().catch(s)})};function l2(e){const t=c2(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let i=0;i<n.byteLength;i++)r.setUint8(i,t.charCodeAt(i));return n}const u2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function c2(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let i=0;i<e.length;i++)n<<=6,n|=u2.indexOf(e[i]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const d2=-1,f2=-2,h2=-3,p2=-4,m2=-5,g2=-6,b2=-7;function E2(e,t){return Im(JSON.parse(e),t)}function Im(e,t){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);let i=null;function s(a,o=!1){if(a===d2)return;if(a===h2)return NaN;if(a===p2)return 1/0;if(a===m2)return-1/0;if(a===g2)return-0;if(o||typeof a!="number")throw new Error("Invalid input");if(a in r)return r[a];const l=n[a];if(!l||typeof l!="object")r[a]=l;else if(Array.isArray(l))if(typeof l[0]=="string"){const u=l[0],d=t&&Object.hasOwn(t,u)?t[u]:void 0;if(d){let c=l[1];if(typeof c!="number"&&(c=n.push(l[1])-1),i??(i=new Set),i.has(c))throw new Error("Invalid circular reference");return i.add(c),r[a]=d(s(c)),i.delete(c),r[a]}switch(u){case"Date":r[a]=new Date(l[1]);break;case"Set":const c=new Set;r[a]=c;for(let m=1;m<l.length;m+=1)c.add(s(l[m]));break;case"Map":const h=new Map;r[a]=h;for(let m=1;m<l.length;m+=2)h.set(s(l[m]),s(l[m+1]));break;case"RegExp":r[a]=new RegExp(l[1],l[2]);break;case"Object":r[a]=Object(l[1]);break;case"BigInt":r[a]=BigInt(l[1]);break;case"null":const p=Object.create(null);r[a]=p;for(let m=1;m<l.length;m+=2)p[l[m]]=s(l[m+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{if(n[l[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const m=globalThis[u],E=s(l[1]),T=new m(E);r[a]=l[2]!==void 0?T.subarray(l[2],l[3]):T;break}case"ArrayBuffer":{const m=l[1];if(typeof m!="string")throw new Error("Invalid ArrayBuffer encoding");const E=l2(m);r[a]=E;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const m=u.slice(9);r[a]=Temporal[m].from(l[1]);break}case"URL":{const m=new URL(l[1]);r[a]=m;break}case"URLSearchParams":{const m=new URLSearchParams(l[1]);r[a]=m;break}default:throw new Error(`Unknown type ${u}`)}}else if(l[0]===b2){const u=l[1],d=new Array(u);r[a]=d;for(let c=2;c<l.length;c+=2){const h=l[c];d[h]=s(l[c+1])}}else{const u=new Array(l.length);r[a]=u;for(let d=0;d<l.length;d+=1){const c=l[d];c!==f2&&(u[d]=s(c))}}else{const u={};r[a]=u;for(const d of Object.keys(l)){if(d==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const c=l[d];u[d]=s(c)}}return r[a]}return s(0)}const _s={DEVALUE_V1:"devl",ENCRYPTED:"encr"},oi=4;new TextEncoder;const vm=new TextDecoder;function $u(e){if(!(e instanceof Uint8Array))return{format:_s.DEVALUE_V1,payload:new TextEncoder().encode(JSON.stringify(e))};if(e.length<oi)throw new Error(`Data too short to contain format prefix: expected at least ${oi} bytes, got ${e.length}`);const t=e.subarray(0,oi),n=vm.decode(t),r=Object.values(_s);if(!r.includes(n))throw new Error(`Unknown serialization format: "${n}". Known formats: ${r.join(", ")}`);const i=e.subarray(oi);return{format:n,payload:i}}function ks(e){return!(e instanceof Uint8Array)||e.length<oi?!1:vm.decode(e.subarray(0,oi))===_s.ENCRYPTED}function sn(e,t){if(e instanceof Uint8Array){if(ks(e))return e;const{format:n,payload:r}=$u(e);if(n===_s.DEVALUE_V1){const i=new TextDecoder().decode(r);return E2(i,t)}throw new Error(`Unsupported serialization format: ${n}`)}return Array.isArray(e)?Im(e,t):e}async function T2(e,t,n){if(e instanceof Uint8Array&&ks(e)&&n){const{decrypt:r}=await ys(async()=>{const{decrypt:a}=await import("./encryption-8OvC6eoJ.js");return{decrypt:a}},[]),{payload:i}=$u(e),s=await r(n,i);return sn(s,t)}return sn(e,t)}const $o="strm_",Rm="__workflow_stream_ref__",Nm="__workflow_class_instance_ref__";class Om{constructor(t,n,r){Ve(this,"className");Ve(this,"classId");Ve(this,"data");Ve(this,"__type",Nm);this.className=t,this.classId=n,this.data=r}toJSON(){return{__type:this.__type,className:this.className,classId:this.classId,data:this.data}}}const Ca=e=>{let t;if("name"in e){const n=String(e.name);n.startsWith($o)?t=n:t=`${$o}${n}`}else t=`${$o}null`;return{__type:Rm,streamId:t}},Lm=e=>!e||typeof e!="object"?"null":"stepId"in e?`<step:${e.stepId}>`:"<function>",ws=e=>{if(!e)return"Unknown";const t=e.split("/");return t[t.length-1]||e},Dm=e=>new Om(ws(e.classId),e.classId,e.data),Pm=e=>`<class:${ws(e.classId)}>`,Mm={ReadableStream:Ca,WritableStream:Ca,TransformStream:Ca,StepFunction:Lm,Instance:Dm,Class:Pm};function x2(e,t){let n=e.input,r=e.output;if(e.input!=null)try{n=sn(e.input,t)}catch{}if(e.output!=null)try{r=sn(e.output,t)}catch{}return{...e,input:n,output:r}}function y2(e,t){let n=e.input,r=e.output;if(e.input!=null)try{n=sn(e.input,t)}catch{}if(e.output!=null)try{r=sn(e.output,t)}catch{}return{...e,input:n,output:r}}function _2(e,t){if(!e.eventData)return e;const n={...e.eventData};if("result"in n&&n.result!=null)try{n.result=sn(n.result,t)}catch{}if("input"in n&&n.input!=null)try{n.input=sn(n.input,t)}catch{}if("output"in n&&n.output!=null)try{n.output=sn(n.output,t)}catch{}if("metadata"in n&&n.metadata!=null)try{n.metadata=sn(n.metadata,t)}catch{}if("payload"in n&&n.payload!=null)try{n.payload=sn(n.payload,t)}catch{}return{...e,eventData:n}}function k2(e,t){if(e.metadata==null)return e;let n=e.metadata;try{n=sn(e.metadata,t)}catch{}return{...e,metadata:n}}function Bm(e,t){if(!e)return e;let n;if("stepId"in e?n=x2(e,t):"hookId"in e?n=k2(e,t):"eventId"in e?n=_2(e,t):n=y2(e,t),"executionContext"in n){const{executionContext:r,...i}=n,s=r&&typeof r=="object"&&"workflowCoreVersion"in r?r.workflowCoreVersion:void 0;return s?{...i,workflowCoreVersion:s}:i}return n}const w2=Object.freeze(Object.defineProperty({__proto__:null,CLASS_INSTANCE_REF_TYPE:Nm,ClassInstanceRef:Om,STREAM_REF_TYPE:Rm,SerializationFormat:_s,decodeFormatPrefix:$u,extractClassName:ws,hydrateData:sn,hydrateDataWithKey:T2,hydrateResourceIO:Bm,isEncryptedData:ks,observabilityRevivers:Mm,serializedClassToString:Pm,serializedInstanceToRef:Dm,serializedStepFunctionToString:Lm,streamToStreamRef:Ca},Symbol.toStringTag,{value:"Module"}));function C2(e){if(e===""||e===".")return new ArrayBuffer(0);const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}function A2(){function e(t){return C2(t)}return{...Mm,ArrayBuffer:e,BigInt:t=>BigInt(t),BigInt64Array:t=>new BigInt64Array(e(t)),BigUint64Array:t=>new BigUint64Array(e(t)),Date:t=>new Date(t),Error:t=>{const n=new Error(t.message);return n.name=t.name,n.stack=t.stack,n},Float32Array:t=>new Float32Array(e(t)),Float64Array:t=>new Float64Array(e(t)),Int8Array:t=>new Int8Array(e(t)),Int16Array:t=>new Int16Array(e(t)),Int32Array:t=>new Int32Array(e(t)),Map:t=>new Map(t),RegExp:t=>new RegExp(t.source,t.flags),Set:t=>new Set(t),Uint8Array:t=>new Uint8Array(e(t)),Uint8ClampedArray:t=>new Uint8ClampedArray(e(t)),Uint16Array:t=>new Uint16Array(e(t)),Uint32Array:t=>new Uint32Array(e(t)),Headers:t=>new Headers(t),URL:t=>new URL(t),URLSearchParams:t=>new URLSearchParams(t==="."?"":t),Class:t=>`<class:${ws(t.classId)}>`,Instance:t=>{const n=ws(t.classId),r=t.data,i=r&&typeof r=="object"?{...r}:{value:r},s={[n]:function(){}}[n],a=Object.create(s.prototype);return Object.assign(a,i),a}}}let Vo=null;function Fm(){return Vo||(Vo=A2()),Vo}function rM(e){const t=Bm(e,Fm());return I2(t)}const za="Encrypted";function vd(e){const t={[za]:function(){}}[za],n=Object.create(t.prototype);return Object.defineProperty(n,"__encryptedData",{value:e,enumerable:!1,configurable:!1}),n}function S2(e){var t;return e!==null&&typeof e=="object"&&((t=e.constructor)==null?void 0:t.name)===za}function I2(e){if(!e||typeof e!="object")return e;const n={...e};for(const r of["input","output","metadata","error"])ks(n[r])&&(n[r]=vd(n[r]));if(n.eventData&&typeof n.eventData=="object"){const r={...n.eventData};for(const i of Hm)ks(r[i])&&(r[i]=vd(r[i]));n.eventData=r}return n}const Hm=["result","input","output","metadata","payload"];async function iM(e,t){const{hydrateDataWithKey:n}=await ys(async()=>{const{hydrateDataWithKey:u}=await Promise.resolve().then(()=>w2);return{hydrateDataWithKey:u}},void 0),{importKey:r}=await ys(async()=>{const{importKey:u}=await import("./encryption-8OvC6eoJ.js");return{importKey:u}},[]),i=await r(t),s=Fm();async function a(u,d,c){if(S2(u)){const h=u.__encryptedData;return n(h,d,c)}return u instanceof Uint8Array?n(u,d,c):u}const l={...e};for(const u of["input","output","metadata","error"])u in l&&(l[u]=await a(l[u],s,i));if(l.eventData&&typeof l.eventData=="object"){const u={...l.eventData};for(const d of Hm)d in u&&(u[d]=await a(u[d],s,i));l.eventData=u}return l}var v2=Object.create,Vu=Object.defineProperty,R2=Object.getOwnPropertyDescriptor,Um=Object.getOwnPropertyNames,N2=Object.getPrototypeOf,O2=Object.prototype.hasOwnProperty,Wu=(e,t)=>function(){return t||(0,e[Um(e)[0]])((t={exports:{}}).exports,t),t.exports},L2=(e,t)=>{for(var n in t)Vu(e,n,{get:t[n],enumerable:!0})},D2=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Um(t))!O2.call(e,i)&&i!==n&&Vu(e,i,{get:()=>t[i],enumerable:!(r=R2(t,i))||r.enumerable});return e},P2=(e,t,n)=>(n=e!=null?v2(N2(e)):{},D2(Vu(n,"default",{value:e,enumerable:!0}),e)),M2=Wu({"node_modules/is-object/index.js"(e,t){t.exports=function(r){return typeof r=="object"&&r!==null}}}),B2=Wu({"node_modules/is-window/index.js"(e,t){t.exports=function(n){if(n==null)return!1;var r=Object(n);return r===r.window}}}),F2=Wu({"node_modules/is-dom/index.js"(e,t){var n=M2(),r=B2();function i(s){return!n(s)||!r(window)||typeof window.Node!="function"?!1:typeof s.nodeType=="number"&&typeof s.nodeName=="string"}t.exports=i}}),$a={};L2($a,{chromeDark:()=>H2,chromeLight:()=>U2});var H2={BASE_FONT_FAMILY:"Menlo, monospace",BASE_FONT_SIZE:"11px",BASE_LINE_HEIGHT:1.2,BASE_BACKGROUND_COLOR:"rgb(36, 36, 36)",BASE_COLOR:"rgb(213, 213, 213)",OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES:10,OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES:5,OBJECT_NAME_COLOR:"rgb(227, 110, 236)",OBJECT_VALUE_NULL_COLOR:"rgb(127, 127, 127)",OBJECT_VALUE_UNDEFINED_COLOR:"rgb(127, 127, 127)",OBJECT_VALUE_REGEXP_COLOR:"rgb(233, 63, 59)",OBJECT_VALUE_STRING_COLOR:"rgb(233, 63, 59)",OBJECT_VALUE_SYMBOL_COLOR:"rgb(233, 63, 59)",OBJECT_VALUE_NUMBER_COLOR:"hsl(252, 100%, 75%)",OBJECT_VALUE_BOOLEAN_COLOR:"hsl(252, 100%, 75%)",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"rgb(85, 106, 242)",HTML_TAG_COLOR:"rgb(93, 176, 215)",HTML_TAGNAME_COLOR:"rgb(93, 176, 215)",HTML_TAGNAME_TEXT_TRANSFORM:"lowercase",HTML_ATTRIBUTE_NAME_COLOR:"rgb(155, 187, 220)",HTML_ATTRIBUTE_VALUE_COLOR:"rgb(242, 151, 102)",HTML_COMMENT_COLOR:"rgb(137, 137, 137)",HTML_DOCTYPE_COLOR:"rgb(192, 192, 192)",ARROW_COLOR:"rgb(145, 145, 145)",ARROW_MARGIN_RIGHT:3,ARROW_FONT_SIZE:12,ARROW_ANIMATION_DURATION:"0",TREENODE_FONT_FAMILY:"Menlo, monospace",TREENODE_FONT_SIZE:"11px",TREENODE_LINE_HEIGHT:1.2,TREENODE_PADDING_LEFT:12,TABLE_BORDER_COLOR:"rgb(85, 85, 85)",TABLE_TH_BACKGROUND_COLOR:"rgb(44, 44, 44)",TABLE_TH_HOVER_COLOR:"rgb(48, 48, 48)",TABLE_SORT_ICON_COLOR:"black",TABLE_DATA_BACKGROUND_IMAGE:"linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(51, 139, 255, 0.0980392) 50%, rgba(51, 139, 255, 0.0980392))",TABLE_DATA_BACKGROUND_SIZE:"128px 32px"},U2={BASE_FONT_FAMILY:"Menlo, monospace",BASE_FONT_SIZE:"11px",BASE_LINE_HEIGHT:1.2,BASE_BACKGROUND_COLOR:"white",BASE_COLOR:"black",OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES:10,OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES:5,OBJECT_NAME_COLOR:"rgb(136, 19, 145)",OBJECT_VALUE_NULL_COLOR:"rgb(128, 128, 128)",OBJECT_VALUE_UNDEFINED_COLOR:"rgb(128, 128, 128)",OBJECT_VALUE_REGEXP_COLOR:"rgb(196, 26, 22)",OBJECT_VALUE_STRING_COLOR:"rgb(196, 26, 22)",OBJECT_VALUE_SYMBOL_COLOR:"rgb(196, 26, 22)",OBJECT_VALUE_NUMBER_COLOR:"rgb(28, 0, 207)",OBJECT_VALUE_BOOLEAN_COLOR:"rgb(28, 0, 207)",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"rgb(13, 34, 170)",HTML_TAG_COLOR:"rgb(168, 148, 166)",HTML_TAGNAME_COLOR:"rgb(136, 18, 128)",HTML_TAGNAME_TEXT_TRANSFORM:"lowercase",HTML_ATTRIBUTE_NAME_COLOR:"rgb(153, 69, 0)",HTML_ATTRIBUTE_VALUE_COLOR:"rgb(26, 26, 166)",HTML_COMMENT_COLOR:"rgb(35, 110, 37)",HTML_DOCTYPE_COLOR:"rgb(192, 192, 192)",ARROW_COLOR:"#6e6e6e",ARROW_MARGIN_RIGHT:3,ARROW_FONT_SIZE:12,ARROW_ANIMATION_DURATION:"0",TREENODE_FONT_FAMILY:"Menlo, monospace",TREENODE_FONT_SIZE:"11px",TREENODE_LINE_HEIGHT:1.2,TREENODE_PADDING_LEFT:12,TABLE_BORDER_COLOR:"#aaa",TABLE_TH_BACKGROUND_COLOR:"#eee",TABLE_TH_HOVER_COLOR:"hsla(0, 0%, 90%, 1)",TABLE_SORT_ICON_COLOR:"#6e6e6e",TABLE_DATA_BACKGROUND_IMAGE:"linear-gradient(to bottom, white, white 50%, rgb(234, 243, 255) 50%, rgb(234, 243, 255))",TABLE_DATA_BACKGROUND_SIZE:"128px 32px"},jm=x.createContext([{},()=>{}]),Wo={WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",OUserSelect:"none",userSelect:"none"},Aa=e=>({DOMNodePreview:{htmlOpenTag:{base:{color:e.HTML_TAG_COLOR},tagName:{color:e.HTML_TAGNAME_COLOR,textTransform:e.HTML_TAGNAME_TEXT_TRANSFORM},htmlAttributeName:{color:e.HTML_ATTRIBUTE_NAME_COLOR},htmlAttributeValue:{color:e.HTML_ATTRIBUTE_VALUE_COLOR}},htmlCloseTag:{base:{color:e.HTML_TAG_COLOR},offsetLeft:{marginLeft:-e.TREENODE_PADDING_LEFT},tagName:{color:e.HTML_TAGNAME_COLOR,textTransform:e.HTML_TAGNAME_TEXT_TRANSFORM}},htmlComment:{color:e.HTML_COMMENT_COLOR},htmlDoctype:{color:e.HTML_DOCTYPE_COLOR}},ObjectPreview:{objectDescription:{fontStyle:"italic"},preview:{fontStyle:"italic"},arrayMaxProperties:e.OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES,objectMaxProperties:e.OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES},ObjectName:{base:{color:e.OBJECT_NAME_COLOR},dimmed:{opacity:.6}},ObjectValue:{objectValueNull:{color:e.OBJECT_VALUE_NULL_COLOR},objectValueUndefined:{color:e.OBJECT_VALUE_UNDEFINED_COLOR},objectValueRegExp:{color:e.OBJECT_VALUE_REGEXP_COLOR},objectValueString:{color:e.OBJECT_VALUE_STRING_COLOR},objectValueSymbol:{color:e.OBJECT_VALUE_SYMBOL_COLOR},objectValueNumber:{color:e.OBJECT_VALUE_NUMBER_COLOR},objectValueBoolean:{color:e.OBJECT_VALUE_BOOLEAN_COLOR},objectValueFunctionPrefix:{color:e.OBJECT_VALUE_FUNCTION_PREFIX_COLOR,fontStyle:"italic"},objectValueFunctionName:{fontStyle:"italic"}},TreeView:{treeViewOutline:{padding:0,margin:0,listStyleType:"none"}},TreeNode:{treeNodeBase:{color:e.BASE_COLOR,backgroundColor:e.BASE_BACKGROUND_COLOR,lineHeight:e.TREENODE_LINE_HEIGHT,cursor:"default",boxSizing:"border-box",listStyle:"none",fontFamily:e.TREENODE_FONT_FAMILY,fontSize:e.TREENODE_FONT_SIZE},treeNodePreviewContainer:{},treeNodePlaceholder:{whiteSpace:"pre",fontSize:e.ARROW_FONT_SIZE,marginRight:e.ARROW_MARGIN_RIGHT,...Wo},treeNodeArrow:{base:{color:e.ARROW_COLOR,display:"inline-block",fontSize:e.ARROW_FONT_SIZE,marginRight:e.ARROW_MARGIN_RIGHT,...parseFloat(e.ARROW_ANIMATION_DURATION)>0?{transition:`transform ${e.ARROW_ANIMATION_DURATION} ease 0s`}:{},...Wo},expanded:{WebkitTransform:"rotateZ(90deg)",MozTransform:"rotateZ(90deg)",transform:"rotateZ(90deg)"},collapsed:{WebkitTransform:"rotateZ(0deg)",MozTransform:"rotateZ(0deg)",transform:"rotateZ(0deg)"}},treeNodeChildNodesContainer:{margin:0,paddingLeft:e.TREENODE_PADDING_LEFT}},TableInspector:{base:{color:e.BASE_COLOR,position:"relative",border:`1px solid ${e.TABLE_BORDER_COLOR}`,fontFamily:e.BASE_FONT_FAMILY,fontSize:e.BASE_FONT_SIZE,lineHeight:"120%",boxSizing:"border-box",cursor:"default"}},TableInspectorHeaderContainer:{base:{top:0,height:"17px",left:0,right:0,overflowX:"hidden"},table:{tableLayout:"fixed",borderSpacing:0,borderCollapse:"separate",height:"100%",width:"100%",margin:0}},TableInspectorDataContainer:{tr:{display:"table-row"},td:{boxSizing:"border-box",border:"none",height:"16px",verticalAlign:"top",padding:"1px 4px",WebkitUserSelect:"text",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",lineHeight:"14px"},div:{position:"static",top:"17px",bottom:0,overflowY:"overlay",transform:"translateZ(0)",left:0,right:0,overflowX:"hidden"},table:{positon:"static",left:0,top:0,right:0,bottom:0,borderTop:"0 none transparent",margin:0,backgroundImage:e.TABLE_DATA_BACKGROUND_IMAGE,backgroundSize:e.TABLE_DATA_BACKGROUND_SIZE,tableLayout:"fixed",borderSpacing:0,borderCollapse:"separate",width:"100%",fontSize:e.BASE_FONT_SIZE,lineHeight:"120%"}},TableInspectorTH:{base:{position:"relative",height:"auto",textAlign:"left",backgroundColor:e.TABLE_TH_BACKGROUND_COLOR,borderBottom:`1px solid ${e.TABLE_BORDER_COLOR}`,fontWeight:"normal",verticalAlign:"middle",padding:"0 4px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",lineHeight:"14px",":hover":{backgroundColor:e.TABLE_TH_HOVER_COLOR}},div:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",fontSize:e.BASE_FONT_SIZE,lineHeight:"120%"}},TableInspectorLeftBorder:{none:{borderLeft:"none"},solid:{borderLeft:`1px solid ${e.TABLE_BORDER_COLOR}`}},TableInspectorSortIcon:{display:"block",marginRight:3,width:8,height:7,marginTop:-7,color:e.TABLE_SORT_ICON_COLOR,fontSize:12,...Wo}}),Ol="chromeLight",zm=x.createContext(Aa($a[Ol])),Hs=e=>x.useContext(zm)[e],j2=e=>({theme:n=Ol,...r})=>{const i=x.useMemo(()=>{switch(Object.prototype.toString.call(n)){case"[object String]":return Aa($a[n]);case"[object Object]":return Aa(n);default:return Aa($a[Ol])}},[n]);return F.createElement(zm.Provider,{value:i},F.createElement(e,{...r}))},z2=({expanded:e,styles:t})=>F.createElement("span",{style:{...t.base,...e?t.expanded:t.collapsed}},"▶"),$2=x.memo(e=>{e={expanded:!0,nodeRenderer:({name:d})=>F.createElement("span",null,d),onClick:()=>{},shouldShowArrow:!1,shouldShowPlaceholder:!0,...e};const{expanded:t,onClick:n,children:r,nodeRenderer:i,title:s,shouldShowArrow:a,shouldShowPlaceholder:o}=e,l=Hs("TreeNode"),u=i;return F.createElement("li",{"aria-expanded":t,role:"treeitem",style:l.treeNodeBase,title:s},F.createElement("div",{style:l.treeNodePreviewContainer,onClick:n},a||x.Children.count(r)>0?F.createElement(z2,{expanded:t,styles:l.treeNodeArrow}):o&&F.createElement("span",{style:l.treeNodePlaceholder}," "),F.createElement(u,{...e})),F.createElement("ol",{role:"group",style:l.treeNodeChildNodesContainer},t?r:void 0))}),Va="$",Rd="*";function Sa(e,t){return!t(e).next().done}var V2=e=>Array.from({length:e},(t,n)=>[Va].concat(Array.from({length:n},()=>"*")).join(".")),W2=(e,t,n,r,i)=>{const s=[].concat(V2(r)).concat(n).filter(o=>typeof o=="string"),a=[];return s.forEach(o=>{const l=o.split("."),u=(d,c,h)=>{if(h===l.length){a.push(c);return}const p=l[h];if(h===0)Sa(d,t)&&(p===Va||p===Rd)&&u(d,Va,h+1);else if(p===Rd)for(const{name:m,data:E}of t(d))Sa(E,t)&&u(E,`${c}.${m}`,h+1);else{const m=d[p];Sa(m,t)&&u(m,`${c}.${p}`,h+1)}};u(e,"",0)}),a.reduce((o,l)=>(o[l]=!0,o),{...i})},$m=x.memo(e=>{const{data:t,dataIterator:n,path:r,depth:i,nodeRenderer:s}=e,[a,o]=x.useContext(jm),l=Sa(t,n),u=!!a[r],d=x.useCallback(()=>l&&o(c=>({...c,[r]:!u})),[l,o,r,u]);return F.createElement($2,{expanded:u,onClick:d,shouldShowArrow:l,shouldShowPlaceholder:i>0,nodeRenderer:s,...e},u?[...n(t)].map(({name:c,data:h,...p})=>F.createElement($m,{name:c,data:h,depth:i+1,path:`${r}.${c}`,key:c,dataIterator:n,nodeRenderer:s,...p})):null)}),Y2=x.memo(({name:e,data:t,dataIterator:n,nodeRenderer:r,expandPaths:i,expandLevel:s})=>{const a=Hs("TreeView"),o=x.useState({}),[,l]=o;return x.useLayoutEffect(()=>l(u=>W2(t,n,i,s,u)),[t,n,i,s]),F.createElement(jm.Provider,{value:o},F.createElement("ol",{role:"tree",style:a.treeViewOutline},F.createElement($m,{name:e,data:t,dataIterator:n,depth:0,path:Va,nodeRenderer:r})))}),Dr=({name:e,dimmed:t=!1,styles:n={}})=>{const r=Hs("ObjectName"),i={...r.base,...t?r.dimmed:{},...n};return F.createElement("span",{style:i},e)},Ji=({object:e,styles:t})=>{const n=Hs("ObjectValue"),r=i=>({...n[i],...t});switch(typeof e){case"bigint":return F.createElement("span",{style:r("objectValueNumber")},String(e),"n");case"number":return F.createElement("span",{style:r("objectValueNumber")},String(e));case"string":return F.createElement("span",{style:r("objectValueString")},'"',e,'"');case"boolean":return F.createElement("span",{style:r("objectValueBoolean")},String(e));case"undefined":return F.createElement("span",{style:r("objectValueUndefined")},"undefined");case"object":return e===null?F.createElement("span",{style:r("objectValueNull")},"null"):e instanceof Date?F.createElement("span",null,e.toString()):e instanceof RegExp?F.createElement("span",{style:r("objectValueRegExp")},e.toString()):Array.isArray(e)?F.createElement("span",null,`Array(${e.length})`):e.constructor?typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)?F.createElement("span",null,`Buffer[${e.length}]`):F.createElement("span",null,e.constructor.name):F.createElement("span",null,"Object");case"function":return F.createElement("span",null,F.createElement("span",{style:r("objectValueFunctionPrefix")},"ƒ "),F.createElement("span",{style:r("objectValueFunctionName")},e.name,"()"));case"symbol":return F.createElement("span",{style:r("objectValueSymbol")},e.toString());default:return F.createElement("span",null)}},G2=Object.prototype.hasOwnProperty,q2=Object.prototype.propertyIsEnumerable;function Ll(e,t){const n=Object.getOwnPropertyDescriptor(e,t);if(n.get)try{return n.get()}catch{return n.get}return e[t]}function Nd(e,t){return e.length===0?[]:e.slice(1).reduce((n,r)=>n.concat([t,r]),[e[0]])}var Dl=({data:e})=>{const t=Hs("ObjectPreview"),n=e;if(typeof n!="object"||n===null||n instanceof Date||n instanceof RegExp)return F.createElement(Ji,{object:n});if(Array.isArray(n)){const r=t.arrayMaxProperties,i=n.slice(0,r).map((a,o)=>F.createElement(Ji,{key:o,object:a}));n.length>r&&i.push(F.createElement("span",{key:"ellipsis"},"…"));const s=n.length;return F.createElement(F.Fragment,null,F.createElement("span",{style:t.objectDescription},s===0?"":`(${s}) `),F.createElement("span",{style:t.preview},"[",Nd(i,", "),"]"))}else{const r=t.objectMaxProperties,i=[];for(const a in n)if(G2.call(n,a)){let o;i.length===r-1&&Object.keys(n).length>r&&(o=F.createElement("span",{key:"ellipsis"},"…"));const l=Ll(n,a);if(i.push(F.createElement("span",{key:a},F.createElement(Dr,{name:a||'""'}),": ",F.createElement(Ji,{object:l}),o)),o)break}const s=n.constructor?n.constructor.name:"Object";return F.createElement(F.Fragment,null,F.createElement("span",{style:t.objectDescription},s==="Object"?"":`${s} `),F.createElement("span",{style:t.preview},"{",Nd(i,", "),"}"))}},Pl=({name:e,data:t})=>typeof e=="string"?F.createElement("span",null,F.createElement(Dr,{name:e}),F.createElement("span",null,": "),F.createElement(Dl,{data:t})):F.createElement(Dl,{data:t}),Vm=({name:e,data:t,isNonenumerable:n=!1})=>{const r=t;return F.createElement("span",null,typeof e=="string"?F.createElement(Dr,{name:e,dimmed:n}):F.createElement(Dl,{data:e}),F.createElement("span",null,": "),F.createElement(Ji,{object:r}))},K2=(e,t)=>function*(r){if(!(typeof r=="object"&&r!==null||typeof r=="function"))return;const s=Array.isArray(r);if(!s&&r[Symbol.iterator]){let a=0;for(const o of r){if(Array.isArray(o)&&o.length===2){const[l,u]=o;yield{name:l,data:u}}else yield{name:a.toString(),data:o};a++}}else{const a=Object.getOwnPropertyNames(r);t===!0&&!s?a.sort():typeof t=="function"&&a.sort(t);for(const o of a)if(q2.call(r,o)){const l=Ll(r,o);yield{name:o||'""',data:l}}else if(e){let l;try{l=Ll(r,o)}catch{}l!==void 0&&(yield{name:o,data:l,isNonenumerable:!0})}e&&r!==Object.prototype&&(yield{name:"__proto__",data:Object.getPrototypeOf(r),isNonenumerable:!0})}},X2=({depth:e,name:t,data:n,isNonenumerable:r})=>e===0?F.createElement(Pl,{name:t,data:n}):F.createElement(Vm,{name:t,data:n,isNonenumerable:r}),Q2=({showNonenumerable:e=!1,sortObjectKeys:t,nodeRenderer:n,...r})=>{const i=K2(e,t),s=n||X2;return F.createElement(Y2,{nodeRenderer:s,dataIterator:i,...r})},Z2=j2(Q2);P2(F2());const J2=()=>{const[e,t]=x.useState(()=>typeof document>"u"?!1:document.documentElement.classList.contains("dark"));return x.useEffect(()=>{if(typeof document>"u")return;const n=new MutationObserver(()=>{t(document.documentElement.classList.contains("dark"))});return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},[]),e},Wm={OBJECT_VALUE_DATE_COLOR:"#a21caf"},e_={OBJECT_VALUE_DATE_COLOR:"#e879f9"},Ym={BASE_FONT_SIZE:"11px",BASE_LINE_HEIGHT:1.4,BASE_BACKGROUND_COLOR:"transparent",OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES:10,OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES:5,HTML_TAGNAME_TEXT_TRANSFORM:"lowercase",ARROW_MARGIN_RIGHT:3,ARROW_FONT_SIZE:12,TREENODE_FONT_FAMILY:"var(--font-mono)",TREENODE_FONT_SIZE:"11px",TREENODE_LINE_HEIGHT:1.4,TREENODE_PADDING_LEFT:12,TABLE_DATA_BACKGROUND_IMAGE:"none",TABLE_DATA_BACKGROUND_SIZE:"0"},t_={...Ym,BASE_COLOR:"var(--ds-gray-1000)",OBJECT_NAME_COLOR:"var(--ds-gray-900)",OBJECT_VALUE_STRING_COLOR:"#16a34a",OBJECT_VALUE_SYMBOL_COLOR:"#16a34a",OBJECT_VALUE_NUMBER_COLOR:"#b45309",OBJECT_VALUE_BOOLEAN_COLOR:"#b45309",OBJECT_VALUE_NULL_COLOR:"var(--ds-gray-900)",OBJECT_VALUE_UNDEFINED_COLOR:"var(--ds-gray-500)",OBJECT_VALUE_REGEXP_COLOR:"#dc2626",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"#0891b2",HTML_TAG_COLOR:"var(--ds-gray-500)",HTML_TAGNAME_COLOR:"#0891b2",HTML_ATTRIBUTE_NAME_COLOR:"#b45309",HTML_ATTRIBUTE_VALUE_COLOR:"#16a34a",HTML_COMMENT_COLOR:"var(--ds-gray-400)",HTML_DOCTYPE_COLOR:"var(--ds-gray-400)",ARROW_COLOR:"var(--ds-gray-500)",TABLE_BORDER_COLOR:"var(--ds-gray-300)",TABLE_TH_BACKGROUND_COLOR:"var(--ds-gray-100)",TABLE_TH_HOVER_COLOR:"var(--ds-gray-200)",TABLE_SORT_ICON_COLOR:"var(--ds-gray-500)"},n_={...Ym,BASE_COLOR:"var(--ds-gray-1000)",OBJECT_NAME_COLOR:"var(--ds-gray-900)",OBJECT_VALUE_STRING_COLOR:"#4ade80",OBJECT_VALUE_SYMBOL_COLOR:"#4ade80",OBJECT_VALUE_NUMBER_COLOR:"#facc15",OBJECT_VALUE_BOOLEAN_COLOR:"#facc15",OBJECT_VALUE_NULL_COLOR:"var(--ds-gray-1000)",OBJECT_VALUE_UNDEFINED_COLOR:"var(--ds-gray-500)",OBJECT_VALUE_REGEXP_COLOR:"#f87171",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"#22d3ee",HTML_TAG_COLOR:"var(--ds-gray-500)",HTML_TAGNAME_COLOR:"#22d3ee",HTML_ATTRIBUTE_NAME_COLOR:"#facc15",HTML_ATTRIBUTE_VALUE_COLOR:"#4ade80",HTML_COMMENT_COLOR:"var(--ds-gray-500)",HTML_DOCTYPE_COLOR:"var(--ds-gray-500)",ARROW_COLOR:"var(--ds-gray-500)",TABLE_BORDER_COLOR:"var(--ds-gray-300)",TABLE_TH_BACKGROUND_COLOR:"var(--ds-gray-100)",TABLE_TH_HOVER_COLOR:"var(--ds-gray-200)",TABLE_SORT_ICON_COLOR:"var(--ds-gray-500)"},r_="__workflow_stream_ref__",i_="__workflow_class_instance_ref__";function s_(e){return e!==null&&typeof e=="object"&&"__type"in e&&e.__type===r_}function a_(e){return e!==null&&typeof e=="object"&&"__type"in e&&e.__type===i_}const Gm=x.createContext(void 0);function o_({streamRef:e}){const t=x.useContext(Gm);return g.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono cursor-pointer",style:{backgroundColor:"var(--ds-blue-100)",color:"var(--ds-blue-800)",border:"1px solid var(--ds-blue-300)"},onClick:()=>t==null?void 0:t(e.streamId),title:`View stream: ${e.streamId}`,children:[g.jsx("span",{children:"📡"}),g.jsx("span",{children:e.streamId})]})}const qm=x.createContext(Wm);function l_({depth:e,name:t,data:n,isNonenumerable:r}){var s;const i=x.useContext(qm);if(n!==null&&typeof n=="object"&&((s=n.constructor)==null?void 0:s.name)===za){const a=g.jsxs("span",{style:{color:"var(--ds-gray-600)",fontStyle:"italic"},children:[g.jsx(Lx,{className:"h-3 w-3",style:{display:"inline",verticalAlign:"middle",marginRight:"3px",marginTop:"-1px"}}),"Encrypted"]});return e===0?a:g.jsxs("span",{children:[t!=null&&g.jsx(Dr,{name:t}),t!=null&&g.jsx("span",{children:": "}),a]})}if(s_(n))return g.jsxs("span",{children:[t!=null&&g.jsx(Dr,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsx(o_,{streamRef:n})]});if(a_(n))return e===0?g.jsx(Pl,{name:n.className,data:n.data}):g.jsxs("span",{children:[t!=null&&g.jsx(Dr,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsxs("span",{style:{fontStyle:"italic"},children:[n.className," "]}),g.jsx(Ji,{object:n.data})]});if(n instanceof Date){const a=n.toISOString();return e===0?g.jsx("span",{style:{color:i.OBJECT_VALUE_DATE_COLOR},children:a}):g.jsxs("span",{children:[t!=null&&g.jsx(Dr,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsx("span",{style:{color:i.OBJECT_VALUE_DATE_COLOR},children:a})]})}return e===0?g.jsx(Pl,{name:t,data:n}):g.jsx(Vm,{name:t,data:n,isNonenumerable:r})}function u_({data:e,expandLevel:t=2,name:n,onStreamClick:r}){const i=c_(e),[s,a]=x.useState(t),o=J2(),l=o?e_:Wm;x.useEffect(()=>{a(0)},[]);const u=g.jsx(qm.Provider,{value:l,children:g.jsx(Z2,{data:i,name:n,theme:o?n_:t_,expandLevel:s,nodeRenderer:l_})});return r?g.jsx(Gm.Provider,{value:r,children:u}):u}function c_(e){const t=x.useRef(e);return Ia(t.current,e)||(t.current=e),t.current}function Od(e){return typeof e=="object"&&e!==null}function Ia(e,t,n=new WeakMap){if(Object.is(e,t))return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,l]of e.entries())if(!t.has(o)||!Ia(l,t.get(o),n))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e.values())if(!t.has(o))return!1;return!0}if(!Od(e)||!Od(t))return!1;if(n.get(e)===t)return!0;n.set(e,t);const r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o+=1)if(!Ia(e[o],t[o],n))return!1;return!0}const s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(const o of s)if(!Object.hasOwn(t,o)||!Ia(e[o],t[o],n))return!1;return!0}function d_(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const f_=e=>{switch(e){case"success":return m_;case"info":return b_;case"warning":return g_;case"error":return E_;default:return null}},h_=Array(12).fill(0),p_=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},h_.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),m_=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),g_=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),b_=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),E_=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),T_=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),x_=()=>{const[e,t]=F.useState(document.hidden);return F.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ml=1;class y_{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ml++,a=this.toasts.find(l=>l.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:o,title:r}):l):this.addToast({title:r,...i,dismissible:o,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,a;const o=i.then(async u=>{if(a=["resolve",u],F.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(k_(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,m=typeof c=="object"&&!F.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...m})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!F.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...m})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,h=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!F.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...m})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,p=typeof d=="object"&&!F.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:c,...p})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>o.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Ml++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Wt=new y_,__=(e,t)=>{const n=(t==null?void 0:t.id)||Ml++;return Wt.addToast({title:e,...t,id:n}),n},k_=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",w_=__,C_=()=>Wt.toasts,A_=()=>Wt.getActiveToasts(),sM=Object.assign(w_,{success:Wt.success,info:Wt.info,warning:Wt.warning,error:Wt.error,custom:Wt.custom,message:Wt.message,promise:Wt.promise,dismiss:Wt.dismiss,loading:Wt.loading},{getHistory:C_,getToasts:A_});d_("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function oa(e){return e.label!==void 0}const S_=3,I_="24px",v_="16px",Ld=4e3,R_=356,N_=14,O_=45,L_=200;function On(...e){return e.filter(Boolean).join(" ")}function D_(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const P_=e=>{var t,n,r,i,s,a,o,l,u;const{invert:d,toast:c,unstyled:h,interacting:p,setHeights:m,visibleToasts:E,heights:T,index:b,toasts:y,expanded:k,removeToast:P,defaultRichColors:D,closeButton:v,style:A,cancelButtonStyle:N,actionButtonStyle:z,className:R="",descriptionClassName:W="",duration:j,position:w,gap:L,expandByDefault:M,classNames:H,icons:U,closeButtonAriaLabel:G="Close toast"}=e,[Q,_]=F.useState(null),[se,te]=F.useState(null),[S,ge]=F.useState(!1),[pe,me]=F.useState(!1),[qe,X]=F.useState(!1),[ue,ke]=F.useState(!1),[Me,Ke]=F.useState(!1),[ze,Be]=F.useState(0),[nt,Xe]=F.useState(0),Re=F.useRef(c.duration||j||Ld),$e=F.useRef(null),Ye=F.useRef(null),ut=b===0,Cr=b+1<=E,_t=c.type,Kt=c.dismissible!==!1,Nn=c.className||"",xn=c.descriptionClassName||"",q=F.useMemo(()=>T.findIndex(Ae=>Ae.toastId===c.id)||0,[T,c.id]),ae=F.useMemo(()=>{var Ae;return(Ae=c.closeButton)!=null?Ae:v},[c.closeButton,v]),Ee=F.useMemo(()=>c.duration||j||Ld,[c.duration,j]),we=F.useRef(0),De=F.useRef(0),St=F.useRef(0),vt=F.useRef(null),[yn,Ar]=w.split("-"),nr=F.useMemo(()=>T.reduce((Ae,kt,Nt)=>Nt>=q?Ae:Ae+kt.height,0),[T,q]),Rt=x_(),rr=c.invert||d,Xt=_t==="loading";De.current=F.useMemo(()=>q*L+nr,[q,nr]),F.useEffect(()=>{Re.current=Ee},[Ee]),F.useEffect(()=>{ge(!0)},[]),F.useEffect(()=>{const Ae=Ye.current;if(Ae){const kt=Ae.getBoundingClientRect().height;return Xe(kt),m(Nt=>[{toastId:c.id,height:kt,position:c.position},...Nt]),()=>m(Nt=>Nt.filter(Qt=>Qt.toastId!==c.id))}},[m,c.id]),F.useLayoutEffect(()=>{if(!S)return;const Ae=Ye.current,kt=Ae.style.height;Ae.style.height="auto";const Nt=Ae.getBoundingClientRect().height;Ae.style.height=kt,Xe(Nt),m(Qt=>Qt.find(It=>It.toastId===c.id)?Qt.map(It=>It.toastId===c.id?{...It,height:Nt}:It):[{toastId:c.id,height:Nt,position:c.position},...Qt])},[S,c.title,c.description,m,c.id,c.jsx,c.action,c.cancel]);const ir=F.useCallback(()=>{me(!0),Be(De.current),m(Ae=>Ae.filter(kt=>kt.toastId!==c.id)),setTimeout(()=>{P(c)},L_)},[c,P,m,De]);F.useEffect(()=>{if(c.promise&&_t==="loading"||c.duration===1/0||c.type==="loading")return;let Ae;return k||p||Rt?(()=>{if(St.current<we.current){const Qt=new Date().getTime()-we.current;Re.current=Re.current-Qt}St.current=new Date().getTime()})():(()=>{Re.current!==1/0&&(we.current=new Date().getTime(),Ae=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),ir()},Re.current))})(),()=>clearTimeout(Ae)},[k,p,c,_t,Rt,ir]),F.useEffect(()=>{c.delete&&(ir(),c.onDismiss==null||c.onDismiss.call(c,c))},[ir,c.delete]);function gb(){var Ae;if(U!=null&&U.loading){var kt;return F.createElement("div",{className:On(H==null?void 0:H.loader,c==null||(kt=c.classNames)==null?void 0:kt.loader,"sonner-loader"),"data-visible":_t==="loading"},U.loading)}return F.createElement(p_,{className:On(H==null?void 0:H.loader,c==null||(Ae=c.classNames)==null?void 0:Ae.loader),visible:_t==="loading"})}const bb=c.icon||(U==null?void 0:U[_t])||f_(_t);var Bc,Fc;return F.createElement("li",{tabIndex:0,ref:Ye,className:On(R,Nn,H==null?void 0:H.toast,c==null||(t=c.classNames)==null?void 0:t.toast,H==null?void 0:H.default,H==null?void 0:H[_t],c==null||(n=c.classNames)==null?void 0:n[_t]),"data-sonner-toast":"","data-rich-colors":(Bc=c.richColors)!=null?Bc:D,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":S,"data-promise":!!c.promise,"data-swiped":Me,"data-removed":pe,"data-visible":Cr,"data-y-position":yn,"data-x-position":Ar,"data-index":b,"data-front":ut,"data-swiping":qe,"data-dismissible":Kt,"data-type":_t,"data-invert":rr,"data-swipe-out":ue,"data-swipe-direction":se,"data-expanded":!!(k||M&&S),"data-testid":c.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${pe?ze:De.current}px`,"--initial-height":M?"auto":`${nt}px`,...A,...c.style},onDragEnd:()=>{X(!1),_(null),vt.current=null},onPointerDown:Ae=>{Ae.button!==2&&(Xt||!Kt||($e.current=new Date,Be(De.current),Ae.target.setPointerCapture(Ae.pointerId),Ae.target.tagName!=="BUTTON"&&(X(!0),vt.current={x:Ae.clientX,y:Ae.clientY})))},onPointerUp:()=>{var Ae,kt,Nt;if(ue||!Kt)return;vt.current=null;const Qt=Number(((Ae=Ye.current)==null?void 0:Ae.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Zs=Number(((kt=Ye.current)==null?void 0:kt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),It=new Date().getTime()-((Nt=$e.current)==null?void 0:Nt.getTime()),cn=Q==="x"?Qt:Zs,Js=Math.abs(cn)/It;if(Math.abs(cn)>=O_||Js>.11){Be(De.current),c.onDismiss==null||c.onDismiss.call(c,c),te(Q==="x"?Qt>0?"right":"left":Zs>0?"down":"up"),ir(),ke(!0);return}else{var _n,kn;(_n=Ye.current)==null||_n.style.setProperty("--swipe-amount-x","0px"),(kn=Ye.current)==null||kn.style.setProperty("--swipe-amount-y","0px")}Ke(!1),X(!1),_(null)},onPointerMove:Ae=>{var kt,Nt,Qt;if(!vt.current||!Kt||((kt=window.getSelection())==null?void 0:kt.toString().length)>0)return;const It=Ae.clientY-vt.current.y,cn=Ae.clientX-vt.current.x;var Js;const _n=(Js=e.swipeDirections)!=null?Js:D_(w);!Q&&(Math.abs(cn)>1||Math.abs(It)>1)&&_(Math.abs(cn)>Math.abs(It)?"x":"y");let kn={x:0,y:0};const Hc=Sr=>1/(1.5+Math.abs(Sr)/20);if(Q==="y"){if(_n.includes("top")||_n.includes("bottom"))if(_n.includes("top")&&It<0||_n.includes("bottom")&&It>0)kn.y=It;else{const Sr=It*Hc(It);kn.y=Math.abs(Sr)<Math.abs(It)?Sr:It}}else if(Q==="x"&&(_n.includes("left")||_n.includes("right")))if(_n.includes("left")&&cn<0||_n.includes("right")&&cn>0)kn.x=cn;else{const Sr=cn*Hc(cn);kn.x=Math.abs(Sr)<Math.abs(cn)?Sr:cn}(Math.abs(kn.x)>0||Math.abs(kn.y)>0)&&Ke(!0),(Nt=Ye.current)==null||Nt.style.setProperty("--swipe-amount-x",`${kn.x}px`),(Qt=Ye.current)==null||Qt.style.setProperty("--swipe-amount-y",`${kn.y}px`)}},ae&&!c.jsx&&_t!=="loading"?F.createElement("button",{"aria-label":G,"data-disabled":Xt,"data-close-button":!0,onClick:Xt||!Kt?()=>{}:()=>{ir(),c.onDismiss==null||c.onDismiss.call(c,c)},className:On(H==null?void 0:H.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Fc=U==null?void 0:U.close)!=null?Fc:T_):null,(_t||c.icon||c.promise)&&c.icon!==null&&((U==null?void 0:U[_t])!==null||c.icon)?F.createElement("div",{"data-icon":"",className:On(H==null?void 0:H.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||gb():null,c.type!=="loading"?bb:null):null,F.createElement("div",{"data-content":"",className:On(H==null?void 0:H.content,c==null||(s=c.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:On(H==null?void 0:H.title,c==null||(a=c.classNames)==null?void 0:a.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?F.createElement("div",{"data-description":"",className:On(W,xn,H==null?void 0:H.description,c==null||(o=c.classNames)==null?void 0:o.description)},typeof c.description=="function"?c.description():c.description):null),F.isValidElement(c.cancel)?c.cancel:c.cancel&&oa(c.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||N,onClick:Ae=>{oa(c.cancel)&&Kt&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Ae),ir())},className:On(H==null?void 0:H.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,F.isValidElement(c.action)?c.action:c.action&&oa(c.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||z,onClick:Ae=>{oa(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Ae),!Ae.defaultPrevented&&ir())},className:On(H==null?void 0:H.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Dd(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function M_(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,a=s?"--mobile-offset":"--offset",o=s?v_:I_;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=o:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(o)}),n}const aM=F.forwardRef(function(t,n){const{id:r,invert:i,position:s="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:l,className:u,offset:d,mobileOffset:c,theme:h="light",richColors:p,duration:m,style:E,visibleToasts:T=S_,toastOptions:b,dir:y=Dd(),gap:k=N_,icons:P,containerAriaLabel:D="Notifications"}=t,[v,A]=F.useState([]),N=F.useMemo(()=>r?v.filter(S=>S.toasterId===r):v.filter(S=>!S.toasterId),[v,r]),z=F.useMemo(()=>Array.from(new Set([s].concat(N.filter(S=>S.position).map(S=>S.position)))),[N,s]),[R,W]=F.useState([]),[j,w]=F.useState(!1),[L,M]=F.useState(!1),[H,U]=F.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=F.useRef(null),Q=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=F.useRef(null),se=F.useRef(!1),te=F.useCallback(S=>{A(ge=>{var pe;return(pe=ge.find(me=>me.id===S.id))!=null&&pe.delete||Wt.dismiss(S.id),ge.filter(({id:me})=>me!==S.id)})},[]);return F.useEffect(()=>Wt.subscribe(S=>{if(S.dismiss){requestAnimationFrame(()=>{A(ge=>ge.map(pe=>pe.id===S.id?{...pe,delete:!0}:pe))});return}setTimeout(()=>{Gh.flushSync(()=>{A(ge=>{const pe=ge.findIndex(me=>me.id===S.id);return pe!==-1?[...ge.slice(0,pe),{...ge[pe],...S},...ge.slice(pe+1)]:[S,...ge]})})})}),[v]),F.useEffect(()=>{if(h!=="system"){U(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const S=window.matchMedia("(prefers-color-scheme: dark)");try{S.addEventListener("change",({matches:ge})=>{U(ge?"dark":"light")})}catch{S.addListener(({matches:pe})=>{try{U(pe?"dark":"light")}catch(me){console.error(me)}})}},[h]),F.useEffect(()=>{v.length<=1&&w(!1)},[v]),F.useEffect(()=>{const S=ge=>{var pe;if(a.every(X=>ge[X]||ge.code===X)){var qe;w(!0),(qe=G.current)==null||qe.focus()}ge.code==="Escape"&&(document.activeElement===G.current||(pe=G.current)!=null&&pe.contains(document.activeElement))&&w(!1)};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[a]),F.useEffect(()=>{if(G.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,se.current=!1)}},[G.current]),F.createElement("section",{ref:n,"aria-label":`${D} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((S,ge)=>{var pe;const[me,qe]=S.split("-");return N.length?F.createElement("ol",{key:S,dir:y==="auto"?Dd():y,tabIndex:-1,ref:G,className:u,"data-sonner-toaster":!0,"data-sonner-theme":H,"data-y-position":me,"data-x-position":qe,style:{"--front-toast-height":`${((pe=R[0])==null?void 0:pe.height)||0}px`,"--width":`${R_}px`,"--gap":`${k}px`,...E,...M_(d,c)},onBlur:X=>{se.current&&!X.currentTarget.contains(X.relatedTarget)&&(se.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||se.current||(se.current=!0,_.current=X.relatedTarget)},onMouseEnter:()=>w(!0),onMouseMove:()=>w(!0),onMouseLeave:()=>{L||w(!1)},onDragEnd:()=>w(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},N.filter(X=>!X.position&&ge===0||X.position===S).map((X,ue)=>{var ke,Me;return F.createElement(P_,{key:X.id,icons:P,index:ue,toast:X,defaultRichColors:p,duration:(ke=b==null?void 0:b.duration)!=null?ke:m,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:i,visibleToasts:T,closeButton:(Me=b==null?void 0:b.closeButton)!=null?Me:l,interacting:L,position:S,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:te,toasts:N.filter(Ke=>Ke.position==X.position),heights:R.filter(Ke=>Ke.position==X.position),setHeights:W,expandByDefault:o,gap:k,expanded:j,swipeDirections:t.swipeDirections})})):null}))});function Pd({className:e,style:t,...n}){return g.jsx("div",{...n,className:Dx("rounded-md",e),style:{backgroundColor:"var(--ds-gray-200)",...t}})}const Us=(function(e){if(e==null)return U_;if(typeof e=="function")return go(e);if(typeof e=="object")return Array.isArray(e)?B_(e):F_(e);if(typeof e=="string")return H_(e);throw new Error("Expected function, string, or object as test")});function B_(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Us(e[n]);return go(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function F_(e){const t=e;return go(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function H_(e){return go(t);function t(n){return n&&n.type===e}}function go(e){return t;function t(n,r,i){return!!(j_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function U_(){return!0}function j_(e){return e!==null&&typeof e=="object"&&"type"in e}const Km=[],Yi=!0,Bl=!1,Gi="skip";function z_(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Us(i),a=r?-1:1;o(e,void 0,[])();function o(l,u,d){const c=l&&typeof l=="object"?l:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Km,m,E,T;if((!t||s(l,u,d[d.length-1]||void 0))&&(p=$_(n(l,d)),p[0]===Bl))return p;if("children"in l&&l.children){const b=l;if(b.children&&p[0]!==Gi)for(E=(r?b.children.length:-1)+a,T=d.concat(b);E>-1&&E<b.children.length;){const y=b.children[E];if(m=o(y,E,T)(),m[0]===Bl)return m;E=typeof m[1]=="number"?m[1]:E+a}}return p}}}function $_(e){return Array.isArray(e)?e:typeof e=="number"?[Yi,e]:e==null?Km:[e]}function Er(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),z_(e,s,o,i);function o(l,u){const d=u[u.length-1],c=d?d.children.indexOf(l):void 0;return a(l,c,d)}}const Ei={indicator:"indicator",textOnly:"text-only",remove:"remove"};function V_({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:s="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:o=Ei.indicator,imageBlockPolicy:l=Ei.indicator}){const u=t.length&&!t.every(c=>c==="*"),d=n.length&&!n.every(c=>c==="*");if(!e&&(u||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=X_(e,t,n,r,i,s,a,o,l);Xm(c),Er(c,h)}}function Md(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 W_(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Y_=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),G_=new Set(["javascript:","data:","file:","vbscript:"]);function Bd(e,t,n,r=!1,i=!1,s=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&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 d=e.substring(5);if(d&&d.length>0&&d!=="invalid")return e}}catch{return null}return null}const a=Md(e,n);if(!a||G_.has(a.protocol)||!(Y_.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const l=W_(e);return a&&t.some(u=>{const d=Md(u,n);return!d||d.origin!==a.origin?!1:a.href.startsWith(d.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 Xm(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Xm(t)}}const Yo=Symbol("node-seen");function q_(e,t,n){return t===Ei.remove?{type:"remove"}:t===Ei.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 K_(e,t,n){if(t===Ei.remove)return{type:"remove"};if(t===Ei.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 X_=(e,t,n,r,i,s,a,o,l)=>{const u=(d,c,h)=>{if(d.type!=="element"||d[Yo])return Yi;if(d.tagName==="a"){const p=Bd(d.properties.href,t,e,!1,!1,i);if(p===null){if(d[Yo]=!0,Er(d,u),h&&typeof c=="number"){const m=q_(d,o,a);if(m.type==="remove")return h.children.splice(c,1),[Gi,c];h.children[c]=m.element}return Gi}else return d.properties.href=p,d.properties.target="_blank",d.properties.rel="noopener noreferrer",Yi}if(d.tagName==="img"){const p=Bd(d.properties.src,n,e,r,!0,i);if(p===null){if(d[Yo]=!0,Er(d,u),h&&typeof c=="number"){const m=K_(d,l,s);if(m.type==="remove")return h.children.splice(c,1),[Gi,c];h.children[c]=m.element}return Gi}else return d.properties.src=p,Yi}return Yi};return u},Qm=-1,bo=0,es=1,Wa=2,Yu=3,Gu=4,qu=5,Ku=6,Zm=7,Jm=8,Fd=typeof self=="object"?self:globalThis,Q_=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case bo:case Qm:return n(a,i);case es:{const o=n([],i);for(const l of a)o.push(r(l));return o}case Wa:{const o=n({},i);for(const[l,u]of a)o[r(l)]=r(u);return o}case Yu:return n(new Date(a),i);case Gu:{const{source:o,flags:l}=a;return n(new RegExp(o,l),i)}case qu:{const o=n(new Map,i);for(const[l,u]of a)o.set(r(l),r(u));return o}case Ku:{const o=n(new Set,i);for(const l of a)o.add(r(l));return o}case Zm:{const{name:o,message:l}=a;return n(new Fd[o](l),i)}case Jm:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new Fd[s](a),i)};return r},Hd=e=>Q_(new Map,e)(0),ti="",{toString:Z_}={},{keys:J_}=Object,Li=e=>{const t=typeof e;if(t!=="object"||!e)return[bo,t];const n=Z_.call(e).slice(8,-1);switch(n){case"Array":return[es,ti];case"Object":return[Wa,ti];case"Date":return[Yu,ti];case"RegExp":return[Gu,ti];case"Map":return[qu,ti];case"Set":return[Ku,ti];case"DataView":return[es,n]}return n.includes("Array")?[es,n]:n.includes("Error")?[Zm,n]:[Wa,n]},la=([e,t])=>e===bo&&(t==="function"||t==="symbol"),ek=(e,t,n,r)=>{const i=(a,o)=>{const l=r.push(a)-1;return n.set(o,l),l},s=a=>{if(n.has(a))return n.get(a);let[o,l]=Li(a);switch(o){case bo:{let d=a;switch(l){case"bigint":o=Jm,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return i([Qm],a)}return i([o,d],a)}case es:{if(l){let h=a;return l==="DataView"?h=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(a)),i([l,[...h]],a)}const d=[],c=i([o,d],a);for(const h of a)d.push(s(h));return c}case Wa:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],c=i([o,d],a);for(const h of J_(a))(e||!la(Li(a[h])))&&d.push([s(h),s(a[h])]);return c}case Yu:return i([o,a.toISOString()],a);case Gu:{const{source:d,flags:c}=a;return i([o,{source:d,flags:c}],a)}case qu:{const d=[],c=i([o,d],a);for(const[h,p]of a)(e||!(la(Li(h))||la(Li(p))))&&d.push([s(h),s(p)]);return c}case Ku:{const d=[],c=i([o,d],a);for(const h of a)(e||!la(Li(h)))&&d.push(s(h));return c}}const{message:u}=a;return i([o,{name:l,message:u}],a)};return s},Ud=(e,{json:t,lossy:n}={})=>{const r=[];return ek(!(t||n),!!t,new Map,r)(e),r},jr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Hd(Ud(e,t)):structuredClone(e):(e,t)=>Hd(Ud(e,t));let js=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};js.prototype.normal={};js.prototype.property={};js.prototype.space=void 0;function e0(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new js(n,r,t)}function Cs(e){return e.toLowerCase()}let qt=class{constructor(t,n){this.attribute=n,this.property=t}};qt.prototype.attribute="";qt.prototype.booleanish=!1;qt.prototype.boolean=!1;qt.prototype.commaOrSpaceSeparated=!1;qt.prototype.commaSeparated=!1;qt.prototype.defined=!1;qt.prototype.mustUseProperty=!1;qt.prototype.number=!1;qt.prototype.overloadedBoolean=!1;qt.prototype.property="";qt.prototype.spaceSeparated=!1;qt.prototype.space=void 0;let tk=0;const Se=Xr(),pt=Xr(),Fl=Xr(),ne=Xr(),et=Xr(),hi=Xr(),Jt=Xr();function Xr(){return 2**++tk}const Hl=Object.freeze(Object.defineProperty({__proto__:null,boolean:Se,booleanish:pt,commaOrSpaceSeparated:Jt,commaSeparated:hi,number:ne,overloadedBoolean:Fl,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),Go=Object.keys(Hl);let Xu=class extends qt{constructor(t,n,r,i){let s=-1;if(super(t,n),jd(this,"space",i),typeof r=="number")for(;++s<Go.length;){const a=Go[s];jd(this,Go[s],(r&Hl[a])===Hl[a])}}};Xu.prototype.defined=!0;function jd(e,t,n){n&&(e[t]=n)}function Ci(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Xu(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Cs(r)]=r,n[Cs(s.attribute)]=r}return new js(t,n,e.space)}const t0=Ci({properties:{ariaActiveDescendant:null,ariaAtomic:pt,ariaAutoComplete:null,ariaBusy:pt,ariaChecked:pt,ariaColCount:ne,ariaColIndex:ne,ariaColSpan:ne,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:pt,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:pt,ariaFlowTo:et,ariaGrabbed:pt,ariaHasPopup:null,ariaHidden:pt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:ne,ariaLive:null,ariaModal:pt,ariaMultiLine:pt,ariaMultiSelectable:pt,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:ne,ariaPressed:pt,ariaReadOnly:pt,ariaRelevant:null,ariaRequired:pt,ariaRoleDescription:et,ariaRowCount:ne,ariaRowIndex:ne,ariaRowSpan:ne,ariaSelected:pt,ariaSetSize:ne,ariaSort:null,ariaValueMax:ne,ariaValueMin:ne,ariaValueNow:ne,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function n0(e,t){return t in e?e[t]:t}function r0(e,t){return n0(e,t.toLowerCase())}const nk=Ci({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:hi,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:Se,allowPaymentRequest:Se,allowUserMedia:Se,alt:null,as:null,async:Se,autoCapitalize:null,autoComplete:et,autoFocus:Se,autoPlay:Se,blocking:et,capture:null,charSet:null,checked:Se,cite:null,className:et,cols:ne,colSpan:null,content:null,contentEditable:pt,controls:Se,controlsList:et,coords:ne|hi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Se,defer:Se,dir:null,dirName:null,disabled:Se,download:Fl,draggable:pt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Se,formTarget:null,headers:et,height:ne,hidden:Fl,high:ne,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:Se,inputMode:null,integrity:null,is:null,isMap:Se,itemId:null,itemProp:et,itemRef:et,itemScope:Se,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Se,low:ne,manifest:null,max:null,maxLength:ne,media:null,method:null,min:null,minLength:ne,multiple:Se,muted:Se,name:null,nonce:null,noModule:Se,noValidate:Se,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:Se,optimum:ne,pattern:null,ping:et,placeholder:null,playsInline:Se,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Se,referrerPolicy:null,rel:et,required:Se,reversed:Se,rows:ne,rowSpan:ne,sandbox:et,scope:null,scoped:Se,seamless:Se,selected:Se,shadowRootClonable:Se,shadowRootDelegatesFocus:Se,shadowRootMode:null,shape:null,size:ne,sizes:null,slot:null,span:ne,spellCheck:pt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ne,step:null,style:null,tabIndex:ne,target:null,title:null,translate:null,type:null,typeMustMatch:Se,useMap:null,value:pt,width:ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:ne,borderColor:null,bottomMargin:ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Se,declare:Se,event:null,face:null,frame:null,frameBorder:null,hSpace:ne,leftMargin:ne,link:null,longDesc:null,lowSrc:null,marginHeight:ne,marginWidth:ne,noResize:Se,noHref:Se,noShade:Se,noWrap:Se,object:null,profile:null,prompt:null,rev:null,rightMargin:ne,rules:null,scheme:null,scrolling:pt,standby:null,summary:null,text:null,topMargin:ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ne,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Se,disableRemotePlayback:Se,prefix:null,property:null,results:ne,security:null,unselectable:null},space:"html",transform:r0}),rk=Ci({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",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:Jt,accentHeight:ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ne,amplitude:ne,arabicForm:null,ascent:ne,attributeName:null,attributeType:null,azimuth:ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ne,by:null,calcMode:null,capHeight:ne,className:et,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:ne,diffuseConstant:ne,direction:null,display:null,dur:null,divisor:ne,dominantBaseline:null,download:Se,dx:null,dy:null,edgeMode:null,editable:null,elevation:ne,enableBackground:null,end:null,event:null,exponent:ne,externalResourcesRequired:null,fill:null,fillOpacity:ne,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:hi,g2:hi,glyphName:hi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ne,horizOriginX:ne,horizOriginY:ne,id:null,ideographic:ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ne,k:ne,k1:ne,k2:ne,k3:ne,k4:ne,kernelMatrix:Jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ne,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:ne,overlineThickness:ne,paintOrder:null,panose1:null,path:null,pathLength:ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ne,pointsAtY:ne,pointsAtZ:ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jt,rev:Jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jt,requiredFeatures:Jt,requiredFonts:Jt,requiredFormats:Jt,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:ne,specularExponent:ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ne,strikethroughThickness:ne,string:null,stroke:null,strokeDashArray:Jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ne,strokeOpacity:ne,strokeWidth:null,style:null,surfaceScale:ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jt,tabIndex:ne,tableValues:null,target:null,targetX:ne,targetY:ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ne,underlineThickness:ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ne,values:null,vAlphabetic:ne,vMathematical:ne,vectorEffect:null,vHanging:ne,vIdeographic:ne,version:null,vertAdvY:ne,vertOriginX:ne,vertOriginY:ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:n0}),i0=Ci({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()}}),s0=Ci({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:r0}),a0=Ci({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ik={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"},sk=/[A-Z]/g,zd=/-[a-z]/g,ak=/^data[-\w.:]+$/i;function Qu(e,t){const n=Cs(t);let r=t,i=qt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ak.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(zd,lk);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!zd.test(s)){let a=s.replace(sk,ok);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Xu}return new i(r,t)}function ok(e){return"-"+e.toLowerCase()}function lk(e){return e.charAt(1).toUpperCase()}const Eo=e0([t0,nk,i0,s0,a0],"html"),Ai=e0([t0,rk,i0,s0,a0],"svg");function $d(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function o0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Vd=/[#.]/g;function uk(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){Vd.lastIndex=i;const o=Vd.exec(n),l=n.slice(i,o?o.index:n.length);l&&(s?s==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:a=l,i+=l.length),o&&(s=o[0],i++)}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 l0(e){return e.join(" ").trim()}function u0(e,t,n){const r=n?hk(n):void 0;function i(s,a,...o){let l;if(s==null){l={type:"root",children:[]};const u=a;o.unshift(u)}else{l=uk(s,t);const u=l.tagName.toLowerCase(),d=r?r.get(u):void 0;if(l.tagName=d||u,ck(a))o.unshift(a);else for(const[c,h]of Object.entries(a))dk(e,l.properties,c,h)}for(const u of o)Ul(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function ck(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 i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function dk(e,t,n,r){const i=Qu(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Wd(r):i.commaSeparated?s=$d(r):i.commaOrSpaceSeparated?s=Wd($d(r).join(" ")):s=Yd(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?fk(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(Yd(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Ul(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)Ul(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ul(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Yd(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Cs(n)===Cs(t)))return!0}return n}function fk(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function hk(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const pk=["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"],mk=u0(Eo,"div"),gk=u0(Ai,"g",pk);function bk(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const l=Gd(t,n[a-1]);o=l===-1?t.length+1:l+1,n[a]=o}if(o>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const o=n[n.length-1],l=Gd(t,o),u=l===-1?t.length+1:l+1;if(o===u)break;n.push(u)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function Gd(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
53
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Pr={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/"},c0={}.hasOwnProperty,Ek=Object.prototype;function Tk(e,t){const n=t||{};return Zu({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ai:Eo,verbose:n.verbose||!1},e)}function Zu(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},va(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:d0(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=bk(s),o=a.toPoint(0),l=a.toPoint(s.length);n.position={start:o,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},va(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},va(e,r,n),n}default:return n=xk(e,t),n}}function d0(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Zu(e,t[n]);r.push(i)}return r}function xk(e,t){const n=e.schema;e.schema=t.namespaceURI===Pr.svg?Ai:Eo;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],l=(o.prefix?o.prefix+":":"")+o.name;c0.call(Ek,l)||(i[l]=o.value)}const a=(e.schema.space==="svg"?gk:mk)(t.tagName,i,d0(e,t.childNodes));if(va(e,t,a),a.tagName==="template"){const o=t,l=o.sourceCodeLocation,u=l&&l.startTag&&li(l.startTag),d=l&&l.endTag&&li(l.endTag),c=Zu(e,o.content);u&&d&&e.file&&(c.position={start:u.end,end:d.start}),a.content=c}return e.schema=n,a}function va(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=yk(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function yk(e,t,n){const r=li(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)c0.call(n.attrs,a)&&(s[Qu(e.schema,a).property]=li(n.attrs[a]));n.startTag;const o=li(n.startTag),l=n.endTag?li(n.endTag):void 0,u={opening:o};l&&(u.closing=l),u.properties=s,t.data={position:u}}}return r}function li(e){const t=qd({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=qd({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function qd(e){return e.line&&e.column?e:void 0}class zs{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}zs.prototype.property={};zs.prototype.normal={};zs.prototype.space=null;function f0(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new zs(n,r,t)}function jl(e){return e.toLowerCase()}class Tn{constructor(t,n){this.property=t,this.attribute=n}}Tn.prototype.space=null;Tn.prototype.boolean=!1;Tn.prototype.booleanish=!1;Tn.prototype.overloadedBoolean=!1;Tn.prototype.number=!1;Tn.prototype.commaSeparated=!1;Tn.prototype.spaceSeparated=!1;Tn.prototype.commaOrSpaceSeparated=!1;Tn.prototype.mustUseProperty=!1;Tn.prototype.defined=!1;let _k=0;const Ce=Qr(),mt=Qr(),h0=Qr(),re=Qr(),tt=Qr(),pi=Qr(),en=Qr();function Qr(){return 2**++_k}const zl=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ce,booleanish:mt,commaOrSpaceSeparated:en,commaSeparated:pi,number:re,overloadedBoolean:h0,spaceSeparated:tt},Symbol.toStringTag,{value:"Module"})),qo=Object.keys(zl);class Ju extends Tn{constructor(t,n,r,i){let s=-1;if(super(t,n),Kd(this,"space",i),typeof r=="number")for(;++s<qo.length;){const a=qo[s];Kd(this,qo[s],(r&zl[a])===zl[a])}}}Ju.prototype.defined=!0;function Kd(e,t,n){n&&(e[t]=n)}const kk={}.hasOwnProperty;function Si(e){const t={},n={};let r;for(r in e.properties)if(kk.call(e.properties,r)){const i=e.properties[r],s=new Ju(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[jl(r)]=r,n[jl(s.attribute)]=r}return new zs(t,n,e.space)}const p0=Si({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),m0=Si({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function g0(e,t){return t in e?e[t]:t}function b0(e,t){return g0(e,t.toLowerCase())}const E0=Si({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:b0,properties:{xmlns:null,xmlnsXLink:null}}),T0=Si({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:mt,ariaAutoComplete:null,ariaBusy:mt,ariaChecked:mt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:tt,ariaCurrent:null,ariaDescribedBy:tt,ariaDetails:null,ariaDisabled:mt,ariaDropEffect:tt,ariaErrorMessage:null,ariaExpanded:mt,ariaFlowTo:tt,ariaGrabbed:mt,ariaHasPopup:null,ariaHidden:mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tt,ariaLevel:re,ariaLive:null,ariaModal:mt,ariaMultiLine:mt,ariaMultiSelectable:mt,ariaOrientation:null,ariaOwns:tt,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:mt,ariaReadOnly:mt,ariaRelevant:null,ariaRequired:mt,ariaRoleDescription:tt,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:mt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null}}),wk=Si({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:b0,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pi,acceptCharset:tt,accessKey:tt,action:null,allow:null,allowFullScreen:Ce,allowPaymentRequest:Ce,allowUserMedia:Ce,alt:null,as:null,async:Ce,autoCapitalize:null,autoComplete:tt,autoFocus:Ce,autoPlay:Ce,blocking:tt,capture:null,charSet:null,checked:Ce,cite:null,className:tt,cols:re,colSpan:null,content:null,contentEditable:mt,controls:Ce,controlsList:tt,coords:re|pi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ce,defer:Ce,dir:null,dirName:null,disabled:Ce,download:h0,draggable:mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ce,formTarget:null,headers:tt,height:re,hidden:Ce,high:re,href:null,hrefLang:null,htmlFor:tt,httpEquiv:tt,id:null,imageSizes:null,imageSrcSet:null,inert:Ce,inputMode:null,integrity:null,is:null,isMap:Ce,itemId:null,itemProp:tt,itemRef:tt,itemScope:Ce,itemType:tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ce,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Ce,muted:Ce,name:null,nonce:null,noModule:Ce,noValidate:Ce,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:Ce,optimum:re,pattern:null,ping:tt,placeholder:null,playsInline:Ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ce,referrerPolicy:null,rel:tt,required:Ce,reversed:Ce,rows:re,rowSpan:re,sandbox:tt,scope:null,scoped:Ce,seamless:Ce,selected:Ce,shadowRootClonable:Ce,shadowRootDelegatesFocus:Ce,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Ce,useMap:null,value:mt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tt,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ce,declare:Ce,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Ce,noHref:Ce,noShade:Ce,noWrap:Ce,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:mt,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ce,disableRemotePlayback:Ce,prefix:null,property:null,results:re,security:null,unselectable:null}}),Ck=Si({space:"svg",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",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"},transform:g0,properties:{about:en,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:tt,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:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,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:pi,g2:pi,glyphName:pi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:en,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,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:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:en,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:en,rev:en,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:en,requiredFeatures:en,requiredFonts:en,requiredFormats:en,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:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:en,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:en,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:en,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Ak=/^data[-\w.:]+$/i,Xd=/-[a-z]/g,Sk=/[A-Z]/g;function Ik(e,t){const n=jl(t);let r=t,i=Tn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ak.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Xd,Rk);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Xd.test(s)){let a=s.replace(Sk,vk);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Ju}return new i(r,t)}function vk(e){return"-"+e.toLowerCase()}function Rk(e){return e.charAt(1).toUpperCase()}const Nk=f0([m0,p0,E0,T0,wk],"html"),x0=f0([m0,p0,E0,T0,Ck],"svg"),Qd={}.hasOwnProperty;function y0(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const o=r.handlers;if(i&&Qd.call(i,e)){const l=String(i[e]);a=Qd.call(o,l)?o[l]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ok={},Lk={}.hasOwnProperty,_0=y0("type",{handlers:{root:Pk,element:Uk,text:Fk,comment:Hk,doctype:Bk}});function Dk(e,t){const r=(t||Ok).space;return _0(e,r==="svg"?x0:Nk)}function Pk(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ec(e.children,n,t),Ii(e,n),n}function Mk(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ec(e.children,n,t),Ii(e,n),n}function Bk(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ii(e,t),t}function Fk(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ii(e,t),t}function Hk(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ii(e,t),t}function Uk(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=x0);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&Lk.call(e.properties,s)){const l=jk(r,s,e.properties[s]);l&&i.push(l)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Pr[a],childNodes:[],parentNode:null};return o.childNodes=ec(e.children,o,r),Ii(e,o),e.tagName==="template"&&e.content&&(o.content=Mk(e.content,r)),o}function jk(e,t,n){const r=Ik(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?o0(n):l0(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Pr[r.space]}return i}function ec(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=_0(e[r],n);s.parentNode=t,i.push(s)}return i}function Ii(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 zk=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],$k=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]),at="�";var C;(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"})(C||(C={}));const $t={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function k0(e){return e>=55296&&e<=57343}function Vk(e){return e>=56320&&e<=57343}function Wk(e,t){return(e-55296)*1024+9216+t}function w0(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function C0(e){return e>=64976&&e<=65007||$k.has(e)}var Y;(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"})(Y||(Y={}));const Yk=65536;class Gk{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=Yk,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:i,offset:s}=this,a=i+n,o=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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(Vk(n))return this.pos++,this._addGap(),Wk(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,C.EOF;return this._err(Y.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,C.EOF;const r=this.html.charCodeAt(n);return r===C.CARRIAGE_RETURN?C.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,C.EOF;let t=this.html.charCodeAt(this.pos);return t===C.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,C.LINE_FEED):t===C.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,k0(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===C.LINE_FEED||t===C.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){w0(t)?this._err(Y.controlCharacterInInputStream):C0(t)&&this._err(Y.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Oe;(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"})(Oe||(Oe={}));function A0(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 qk=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୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢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;怳Ādp໩໮uct;戏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ǣጓ\0጖y;䐎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Ā;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀ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Ā;e᜚᜜lƀ;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\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩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ↄⅪ←ٖ↛ǰ↉\0↎proø₞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;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\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\0⹻m;櫳;櫽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))),Kk=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 Xk(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Kk.get(e))!==null&&t!==void 0?t:e}var At;(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"})(At||(At={}));const Qk=32;var hr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(hr||(hr={}));function $l(e){return e>=At.ZERO&&e<=At.NINE}function Zk(e){return e>=At.UPPER_A&&e<=At.UPPER_F||e>=At.LOWER_A&&e<=At.LOWER_F}function Jk(e){return e>=At.UPPER_A&&e<=At.UPPER_Z||e>=At.LOWER_A&&e<=At.LOWER_Z||$l(e)}function ew(e){return e===At.EQUALS||Jk(e)}var wt;(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"})(wt||(wt={}));var Qn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Qn||(Qn={}));class tw{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Qn.Strict}startEntity(t){this.decodeMode=t,this.state=wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case wt.EntityStart:return t.charCodeAt(n)===At.NUM?(this.state=wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=wt.NamedEntity,this.stateNamedEntity(t,n));case wt.NumericStart:return this.stateNumericStart(t,n);case wt.NumericDecimal:return this.stateNumericDecimal(t,n);case wt.NumericHex:return this.stateNumericHex(t,n);case wt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Qk)===At.LOWER_X?(this.state=wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=wt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if($l(i)||Zk(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if($l(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,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===At.SEMI)this.consumed+=1;else if(this.decodeMode===Qn.Strict)return 0;return this.emitCodePoint(Xk(this.result),this.consumed),this.errors&&(t!==At.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&hr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=nw(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Qn.Attribute&&(s===0||ew(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&hr.VALUE_LENGTH)>>14,s!==0){if(a===At.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Qn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&hr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~hr.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case wt.NamedEntity:return this.result!==0&&(this.decodeMode!==Qn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case wt.NumericDecimal:return this.emitNumericEntity(0,2);case wt.NumericHex:return this.emitNumericEntity(0,3);case wt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case wt.EntityStart:return 0}}}function nw(e,t,n,r){const i=(t&hr.BRANCH_LENGTH)>>7,s=t&hr.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const l=r-s;return l<0||l>=i?-1:e[n+l]-1}let a=n,o=a+i-1;for(;a<=o;){const l=a+o>>>1,u=e[l];if(u<r)a=l+1;else if(u>r)o=l-1;else return e[l+i]}return-1}var Z;(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/"})(Z||(Z={}));var Mr;(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"})(Mr||(Mr={}));var dn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(dn||(dn={}));var $;(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"})($||($={}));var f;(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"})(f||(f={}));const rw=new Map([[$.A,f.A],[$.ADDRESS,f.ADDRESS],[$.ANNOTATION_XML,f.ANNOTATION_XML],[$.APPLET,f.APPLET],[$.AREA,f.AREA],[$.ARTICLE,f.ARTICLE],[$.ASIDE,f.ASIDE],[$.B,f.B],[$.BASE,f.BASE],[$.BASEFONT,f.BASEFONT],[$.BGSOUND,f.BGSOUND],[$.BIG,f.BIG],[$.BLOCKQUOTE,f.BLOCKQUOTE],[$.BODY,f.BODY],[$.BR,f.BR],[$.BUTTON,f.BUTTON],[$.CAPTION,f.CAPTION],[$.CENTER,f.CENTER],[$.CODE,f.CODE],[$.COL,f.COL],[$.COLGROUP,f.COLGROUP],[$.DD,f.DD],[$.DESC,f.DESC],[$.DETAILS,f.DETAILS],[$.DIALOG,f.DIALOG],[$.DIR,f.DIR],[$.DIV,f.DIV],[$.DL,f.DL],[$.DT,f.DT],[$.EM,f.EM],[$.EMBED,f.EMBED],[$.FIELDSET,f.FIELDSET],[$.FIGCAPTION,f.FIGCAPTION],[$.FIGURE,f.FIGURE],[$.FONT,f.FONT],[$.FOOTER,f.FOOTER],[$.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[$.FORM,f.FORM],[$.FRAME,f.FRAME],[$.FRAMESET,f.FRAMESET],[$.H1,f.H1],[$.H2,f.H2],[$.H3,f.H3],[$.H4,f.H4],[$.H5,f.H5],[$.H6,f.H6],[$.HEAD,f.HEAD],[$.HEADER,f.HEADER],[$.HGROUP,f.HGROUP],[$.HR,f.HR],[$.HTML,f.HTML],[$.I,f.I],[$.IMG,f.IMG],[$.IMAGE,f.IMAGE],[$.INPUT,f.INPUT],[$.IFRAME,f.IFRAME],[$.KEYGEN,f.KEYGEN],[$.LABEL,f.LABEL],[$.LI,f.LI],[$.LINK,f.LINK],[$.LISTING,f.LISTING],[$.MAIN,f.MAIN],[$.MALIGNMARK,f.MALIGNMARK],[$.MARQUEE,f.MARQUEE],[$.MATH,f.MATH],[$.MENU,f.MENU],[$.META,f.META],[$.MGLYPH,f.MGLYPH],[$.MI,f.MI],[$.MO,f.MO],[$.MN,f.MN],[$.MS,f.MS],[$.MTEXT,f.MTEXT],[$.NAV,f.NAV],[$.NOBR,f.NOBR],[$.NOFRAMES,f.NOFRAMES],[$.NOEMBED,f.NOEMBED],[$.NOSCRIPT,f.NOSCRIPT],[$.OBJECT,f.OBJECT],[$.OL,f.OL],[$.OPTGROUP,f.OPTGROUP],[$.OPTION,f.OPTION],[$.P,f.P],[$.PARAM,f.PARAM],[$.PLAINTEXT,f.PLAINTEXT],[$.PRE,f.PRE],[$.RB,f.RB],[$.RP,f.RP],[$.RT,f.RT],[$.RTC,f.RTC],[$.RUBY,f.RUBY],[$.S,f.S],[$.SCRIPT,f.SCRIPT],[$.SEARCH,f.SEARCH],[$.SECTION,f.SECTION],[$.SELECT,f.SELECT],[$.SOURCE,f.SOURCE],[$.SMALL,f.SMALL],[$.SPAN,f.SPAN],[$.STRIKE,f.STRIKE],[$.STRONG,f.STRONG],[$.STYLE,f.STYLE],[$.SUB,f.SUB],[$.SUMMARY,f.SUMMARY],[$.SUP,f.SUP],[$.TABLE,f.TABLE],[$.TBODY,f.TBODY],[$.TEMPLATE,f.TEMPLATE],[$.TEXTAREA,f.TEXTAREA],[$.TFOOT,f.TFOOT],[$.TD,f.TD],[$.TH,f.TH],[$.THEAD,f.THEAD],[$.TITLE,f.TITLE],[$.TR,f.TR],[$.TRACK,f.TRACK],[$.TT,f.TT],[$.U,f.U],[$.UL,f.UL],[$.SVG,f.SVG],[$.VAR,f.VAR],[$.WBR,f.WBR],[$.XMP,f.XMP]]);function vi(e){var t;return(t=rw.get(e))!==null&&t!==void 0?t:f.UNKNOWN}const ee=f,iw={[Z.HTML]:new Set([ee.ADDRESS,ee.APPLET,ee.AREA,ee.ARTICLE,ee.ASIDE,ee.BASE,ee.BASEFONT,ee.BGSOUND,ee.BLOCKQUOTE,ee.BODY,ee.BR,ee.BUTTON,ee.CAPTION,ee.CENTER,ee.COL,ee.COLGROUP,ee.DD,ee.DETAILS,ee.DIR,ee.DIV,ee.DL,ee.DT,ee.EMBED,ee.FIELDSET,ee.FIGCAPTION,ee.FIGURE,ee.FOOTER,ee.FORM,ee.FRAME,ee.FRAMESET,ee.H1,ee.H2,ee.H3,ee.H4,ee.H5,ee.H6,ee.HEAD,ee.HEADER,ee.HGROUP,ee.HR,ee.HTML,ee.IFRAME,ee.IMG,ee.INPUT,ee.LI,ee.LINK,ee.LISTING,ee.MAIN,ee.MARQUEE,ee.MENU,ee.META,ee.NAV,ee.NOEMBED,ee.NOFRAMES,ee.NOSCRIPT,ee.OBJECT,ee.OL,ee.P,ee.PARAM,ee.PLAINTEXT,ee.PRE,ee.SCRIPT,ee.SECTION,ee.SELECT,ee.SOURCE,ee.STYLE,ee.SUMMARY,ee.TABLE,ee.TBODY,ee.TD,ee.TEMPLATE,ee.TEXTAREA,ee.TFOOT,ee.TH,ee.THEAD,ee.TITLE,ee.TR,ee.TRACK,ee.UL,ee.WBR,ee.XMP]),[Z.MATHML]:new Set([ee.MI,ee.MO,ee.MN,ee.MS,ee.MTEXT,ee.ANNOTATION_XML]),[Z.SVG]:new Set([ee.TITLE,ee.FOREIGN_OBJECT,ee.DESC]),[Z.XLINK]:new Set,[Z.XML]:new Set,[Z.XMLNS]:new Set},Vl=new Set([ee.H1,ee.H2,ee.H3,ee.H4,ee.H5,ee.H6]);$.STYLE,$.SCRIPT,$.XMP,$.IFRAME,$.NOEMBED,$.NOFRAMES,$.PLAINTEXT;var I;(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"})(I||(I={}));const ht={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function sw(e){return e>=C.DIGIT_0&&e<=C.DIGIT_9}function qi(e){return e>=C.LATIN_CAPITAL_A&&e<=C.LATIN_CAPITAL_Z}function aw(e){return e>=C.LATIN_SMALL_A&&e<=C.LATIN_SMALL_Z}function ur(e){return aw(e)||qi(e)}function Zd(e){return ur(e)||sw(e)}function ua(e){return e+32}function S0(e){return e===C.SPACE||e===C.LINE_FEED||e===C.TABULATION||e===C.FORM_FEED}function Jd(e){return S0(e)||e===C.SOLIDUS||e===C.GREATER_THAN_SIGN}function ow(e){return e===C.NULL?Y.nullCharacterReference:e>1114111?Y.characterReferenceOutsideUnicodeRange:k0(e)?Y.surrogateCharacterReference:C0(e)?Y.noncharacterCharacterReference:w0(e)||e===C.CARRIAGE_RETURN?Y.controlCharacterReference:null}class lw{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=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Gk(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new tw(qk,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Y.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Y.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=ow(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.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:Oe.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Oe.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Oe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Oe.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(A0(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Y.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=vi(t.tagName),t.type===Oe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Y.endTagWithAttributes),t.selfClosing&&this._err(Y.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 Oe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Oe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Oe.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:Oe.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=S0(t)?Oe.WHITESPACE_CHARACTER:t===C.NULL?Oe.NULL_CHARACTER:Oe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Oe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Qn.Attribute:Qn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitCodePoint(t);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case C.AMPERSAND:{this._startCharacterReference();break}case C.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case C.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ur(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case C.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case C.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case C.QUESTION_MARK:{this._err(Y.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case C.EOF:{this._err(Y.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Y.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ur(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case C.GREATER_THAN_SIGN:{this._err(Y.missingEndTagName),this.state=I.DATA;break}case C.EOF:{this._err(Y.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Y.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.tagName+=at;break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(qi(t)?ua(t):t)}}_stateRcdataLessThanSign(t){t===C.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ur(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case C.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case C.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===C.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ur(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case C.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case C.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ur(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===C.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===C.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===C.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ur(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ur(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith($t.SCRIPT,!1)&&Jd(this.preprocessor.peek($t.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<$t.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===C.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith($t.SCRIPT,!1)&&Jd(this.preprocessor.peek($t.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<$t.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._err(Y.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:{this._err(Y.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.name+=at;break}default:this.currentAttr.name+=String.fromCodePoint(qi(t)?ua(t):t)}}_stateAfterAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case C.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case C.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=at;break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case C.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=at;break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=at;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:case C.EQUALS_SIGN:case C.GRAVE_ACCENT:{this._err(Y.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this._err(Y.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case C.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this._err(Y.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case C.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.data+=at;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch($t.DASH_DASH,!0)?(this._createCommentToken($t.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch($t.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation($t.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch($t.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(Y.cdataInHtmlContent),this._createCommentToken($t.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Y.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case C.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case C.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.data+=at;break}case C.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case C.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case C.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===C.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===C.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==C.GREATER_THAN_SIGN&&t!==C.EOF&&this._err(Y.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case C.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case C.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case C.HYPHEN_MINUS:{n.data+="-";break}case C.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case C.GREATER_THAN_SIGN:{this._err(Y.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case C.EOF:{this._err(Y.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(qi(t))this._createDoctypeToken(String.fromCharCode(ua(t))),this.state=I.DOCTYPE_NAME;else switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.NULL:{this._err(Y.unexpectedNullCharacter),this._createDoctypeToken(at),this.state=I.DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.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=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.name+=at;break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(qi(t)?ua(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch($t.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch($t.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Y.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(Y.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(Y.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.publicId+=at;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.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 C.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.publicId+=at;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.QUOTATION_MARK:{this._err(Y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(Y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(Y.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(Y.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.systemId+=at;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.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 C.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.systemId+=at;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.NULL:{this._err(Y.unexpectedNullCharacter);break}case C.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case C.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case C.EOF:{this._err(Y.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===C.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case C.GREATER_THAN_SIGN:{this.state=I.DATA;break}case C.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.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(C.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Zd(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Zd(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===C.SEMICOLON&&this._err(Y.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const I0=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),ef=new Set([...I0,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),Ya=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),uw=new Set([...Ya,f.OL,f.UL]),cw=new Set([...Ya,f.BUTTON]),tf=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),nf=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),dw=new Set([f.TR,f.TEMPLATE,f.HTML]),fw=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),hw=new Set([f.TABLE,f.TEMPLATE,f.HTML]),pw=new Set([f.TD,f.TH]);class mw{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=f.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===f.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Z.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 i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===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])!==Z.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(Vl,Z.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pw,Z.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(hw,Z.HTML)}clearBackToTableBodyContext(){this.clearBackTo(fw,Z.HTML)}clearBackToTableRowContext(){this.clearBackTo(dw,Z.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]===f.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]===f.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case Z.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case Z.SVG:{if(nf.has(i))return!1;break}case Z.MATHML:{if(tf.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ya)}hasInListItemScope(t){return this.hasInDynamicScope(t,uw)}hasInButtonScope(t){return this.hasInDynamicScope(t,cw)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Z.HTML:{if(Vl.has(n))return!0;if(Ya.has(n))return!1;break}case Z.SVG:{if(nf.has(n))return!1;break}case Z.MATHML:{if(tf.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Z.HTML)switch(this.tagIDs[n]){case t:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Z.HTML)switch(this.tagIDs[t]){case f.TBODY:case f.THEAD:case f.TFOOT:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Z.HTML)switch(this.tagIDs[n]){case t:return!0;case f.OPTION:case f.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&I0.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ef.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ef.has(this.currentTagId);)this.pop()}}const Ko=3;var Bn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Bn||(Bn={}));const rf={type:Bn.Marker};class gw{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Bn.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===s&&this.treeAdapter.getNamespaceURI(u)===a){const d=this.treeAdapter.getAttrList(u);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Ko)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Ko)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(l=>i.get(l.name)===l.value)&&(s+=1,s>=Ko&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(rf)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Bn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Bn.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(rf);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Bn.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Bn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Bn.Element&&n.element===t)}}const cr={createDocument(){return{nodeName:"#document",mode:dn.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 i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};cr.appendChild(e,s)}},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(cr.isTextNode(n)){n.value+=t;return}}cr.appendChild(e,cr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&cr.isTextNode(r)?r.value+=t:cr.insertBefore(e,cr.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}}},v0="html",bw="about:legacy-compat",Ew="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",R0=["+//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//"],Tw=[...R0,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],xw=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),N0=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],yw=[...N0,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function sf(e,t){return t.some(n=>e.startsWith(n))}function _w(e){return e.name===v0&&e.publicId===null&&(e.systemId===null||e.systemId===bw)}function kw(e){if(e.name!==v0)return dn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Ew)return dn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),xw.has(n))return dn.QUIRKS;let r=t===null?Tw:R0;if(sf(n,r))return dn.QUIRKS;if(r=t===null?N0:yw,sf(n,r))return dn.LIMITED_QUIRKS}return dn.NO_QUIRKS}const af={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},ww="definitionurl",Cw="definitionURL",Aw=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])),Sw=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Z.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Z.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Z.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Z.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Z.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Z.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Z.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Z.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Z.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Z.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Z.XMLNS}]]),Iw=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])),vw=new Set([f.B,f.BIG,f.BLOCKQUOTE,f.BODY,f.BR,f.CENTER,f.CODE,f.DD,f.DIV,f.DL,f.DT,f.EM,f.EMBED,f.H1,f.H2,f.H3,f.H4,f.H5,f.H6,f.HEAD,f.HR,f.I,f.IMG,f.LI,f.LISTING,f.MENU,f.META,f.NOBR,f.OL,f.P,f.PRE,f.RUBY,f.S,f.SMALL,f.SPAN,f.STRONG,f.STRIKE,f.SUB,f.SUP,f.TABLE,f.TT,f.U,f.UL,f.VAR]);function Rw(e){const t=e.tagID;return t===f.FONT&&e.attrs.some(({name:r})=>r===Mr.COLOR||r===Mr.SIZE||r===Mr.FACE)||vw.has(t)}function O0(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===ww){e.attrs[t].name=Cw;break}}function L0(e){for(let t=0;t<e.attrs.length;t++){const n=Aw.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function tc(e){for(let t=0;t<e.attrs.length;t++){const n=Sw.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 Nw(e){const t=Iw.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=vi(e.tagName))}function Ow(e,t){return t===Z.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}function Lw(e,t,n){if(t===Z.MATHML&&e===f.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Mr.ENCODING){const i=n[r].value.toLowerCase();return i===af.TEXT_HTML||i===af.APPLICATION_XML}}return t===Z.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}function Dw(e,t,n,r){return(!r||r===Z.HTML)&&Lw(e,t,n)||(!r||r===Z.MATHML)&&Ow(e,t)}const Pw="hidden",Mw=8,Bw=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 Fw={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},D0=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),of={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:cr,onParseError:null};class lf{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,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={...of,...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 lw(this.options,this),this.activeFormattingElements=new gw(this.treeAdapter),this.fragmentContextID=r?vi(this.treeAdapter.getTagName(r)):f.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new mw(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={...of,...n};t??(t=r.treeAdapter.createElement($.TEMPLATE,Z.HTML,[]));const i=r.treeAdapter.createElement("documentmock",Z.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===f.TEMPLATE&&s.tmplInsertionModeStack.unshift(O.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:Fw,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===Z.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,Z.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=ht.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)===$.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Z.HTML))switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:{this.tokenizer.state=ht.RCDATA;break}case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:{this.tokenizer.state=ht.RAWTEXT;break}case f.SCRIPT:{this.tokenizer.state=ht.SCRIPT_DATA;break}case f.PLAINTEXT:{this.tokenizer.state=ht.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));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,Z.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,Z.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($.HTML,Z.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,f.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 i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:l,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:u,endOffset:d})}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,i=this.treeAdapter.getTagName(t),s=n.type===Oe.END_TAG&&i===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,s)}}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===f.SVG&&this.treeAdapter.getTagName(n)===$.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===Z.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===f.MGLYPH||t.tagID===f.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,Z.HTML)}_processToken(t){switch(t.type){case Oe.CHARACTER:{this.onCharacter(t);break}case Oe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Oe.COMMENT:{this.onComment(t);break}case Oe.DOCTYPE:{this.onDoctype(t);break}case Oe.START_TAG:{this._processStartTag(t);break}case Oe.END_TAG:{this.onEndTag(t);break}case Oe.EOF:{this.onEof(t);break}case Oe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return Dw(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Bn.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=O.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case f.TR:{this.insertionMode=O.IN_ROW;return}case f.TBODY:case f.THEAD:case f.TFOOT:{this.insertionMode=O.IN_TABLE_BODY;return}case f.CAPTION:{this.insertionMode=O.IN_CAPTION;return}case f.COLGROUP:{this.insertionMode=O.IN_COLUMN_GROUP;return}case f.TABLE:{this.insertionMode=O.IN_TABLE;return}case f.BODY:{this.insertionMode=O.IN_BODY;return}case f.FRAMESET:{this.insertionMode=O.IN_FRAMESET;return}case f.SELECT:{this._resetInsertionModeForSelect(t);return}case f.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case f.HTML:{this.insertionMode=this.headElement?O.AFTER_HEAD:O.BEFORE_HEAD;return}case f.TD:case f.TH:{if(t>0){this.insertionMode=O.IN_CELL;return}break}case f.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===f.TEMPLATE)break;if(r===f.TABLE){this.insertionMode=O.IN_SELECT_IN_TABLE;return}}this.insertionMode=O.IN_SELECT}_isElementCausesFosterParenting(t){return D0.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 f.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===Z.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case f.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 iw[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pA(this,t);return}switch(this.insertionMode){case O.INITIAL:{Di(this,t);break}case O.BEFORE_HTML:{ts(this,t);break}case O.BEFORE_HEAD:{ns(this,t);break}case O.IN_HEAD:{rs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{is(this,t);break}case O.AFTER_HEAD:{ss(this,t);break}case O.IN_BODY:case O.IN_CAPTION:case O.IN_CELL:case O.IN_TEMPLATE:{M0(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:{Xo(this,t);break}case O.IN_TABLE_TEXT:{z0(this,t);break}case O.IN_COLUMN_GROUP:{Ga(this,t);break}case O.AFTER_BODY:{qa(this,t);break}case O.AFTER_AFTER_BODY:{Ra(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){hA(this,t);return}switch(this.insertionMode){case O.INITIAL:{Di(this,t);break}case O.BEFORE_HTML:{ts(this,t);break}case O.BEFORE_HEAD:{ns(this,t);break}case O.IN_HEAD:{rs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{is(this,t);break}case O.AFTER_HEAD:{ss(this,t);break}case O.TEXT:{this._insertCharacters(t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Xo(this,t);break}case O.IN_COLUMN_GROUP:{Ga(this,t);break}case O.AFTER_BODY:{qa(this,t);break}case O.AFTER_AFTER_BODY:{Ra(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Wl(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:{Wl(this,t);break}case O.IN_TABLE_TEXT:{Pi(this,t);break}case O.AFTER_BODY:{Ww(this,t);break}case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{Yw(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case O.INITIAL:{Gw(this,t);break}case O.BEFORE_HEAD:case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:{this._err(t,Y.misplacedDoctype);break}case O.IN_TABLE_TEXT:{Pi(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Y.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?mA(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{Di(this,t);break}case O.BEFORE_HTML:{qw(this,t);break}case O.BEFORE_HEAD:{Xw(this,t);break}case O.IN_HEAD:{Rn(this,t);break}case O.IN_HEAD_NO_SCRIPT:{Jw(this,t);break}case O.AFTER_HEAD:{tC(this,t);break}case O.IN_BODY:{Mt(this,t);break}case O.IN_TABLE:{Ti(this,t);break}case O.IN_TABLE_TEXT:{Pi(this,t);break}case O.IN_CAPTION:{QC(this,t);break}case O.IN_COLUMN_GROUP:{ic(this,t);break}case O.IN_TABLE_BODY:{yo(this,t);break}case O.IN_ROW:{_o(this,t);break}case O.IN_CELL:{eA(this,t);break}case O.IN_SELECT:{W0(this,t);break}case O.IN_SELECT_IN_TABLE:{nA(this,t);break}case O.IN_TEMPLATE:{iA(this,t);break}case O.AFTER_BODY:{aA(this,t);break}case O.IN_FRAMESET:{oA(this,t);break}case O.AFTER_FRAMESET:{uA(this,t);break}case O.AFTER_AFTER_BODY:{dA(this,t);break}case O.AFTER_AFTER_FRAMESET:{fA(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?gA(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{Di(this,t);break}case O.BEFORE_HTML:{Kw(this,t);break}case O.BEFORE_HEAD:{Qw(this,t);break}case O.IN_HEAD:{Zw(this,t);break}case O.IN_HEAD_NO_SCRIPT:{eC(this,t);break}case O.AFTER_HEAD:{nC(this,t);break}case O.IN_BODY:{xo(this,t);break}case O.TEXT:{jC(this,t);break}case O.IN_TABLE:{As(this,t);break}case O.IN_TABLE_TEXT:{Pi(this,t);break}case O.IN_CAPTION:{ZC(this,t);break}case O.IN_COLUMN_GROUP:{JC(this,t);break}case O.IN_TABLE_BODY:{Yl(this,t);break}case O.IN_ROW:{V0(this,t);break}case O.IN_CELL:{tA(this,t);break}case O.IN_SELECT:{Y0(this,t);break}case O.IN_SELECT_IN_TABLE:{rA(this,t);break}case O.IN_TEMPLATE:{sA(this,t);break}case O.AFTER_BODY:{q0(this,t);break}case O.IN_FRAMESET:{lA(this,t);break}case O.AFTER_FRAMESET:{cA(this,t);break}case O.AFTER_AFTER_BODY:{Ra(this,t);break}}}onEof(t){switch(this.insertionMode){case O.INITIAL:{Di(this,t);break}case O.BEFORE_HTML:{ts(this,t);break}case O.BEFORE_HEAD:{ns(this,t);break}case O.IN_HEAD:{rs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{is(this,t);break}case O.AFTER_HEAD:{ss(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:{U0(this,t);break}case O.TEXT:{zC(this,t);break}case O.IN_TABLE_TEXT:{Pi(this,t);break}case O.IN_TEMPLATE:{G0(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:{rc(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===C.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:{P0(this,t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Xo(this,t);break}case O.IN_TABLE_TEXT:{j0(this,t);break}}}}function Hw(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):H0(e,t),n}function Uw(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function jw(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),l=o&&s>=Bw;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=zw(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function zw(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 $w(e,t,n){const r=e.treeAdapter.getTagName(t),i=vi(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===f.TEMPLATE&&s===Z.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Vw(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function nc(e,t){for(let n=0;n<Mw;n++){const r=Hw(e,t);if(!r)break;const i=Uw(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=jw(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&$w(e,a,s),Vw(e,i,r)}}function Wl(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ww(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Yw(e,t){e._appendCommentNode(t,e.document)}function rc(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],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function Gw(e,t){e._setDocumentType(t);const n=t.forceQuirks?dn.QUIRKS:kw(t);_w(t)||e._err(t,Y.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=O.BEFORE_HTML}function Di(e,t){e._err(t,Y.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,dn.QUIRKS),e.insertionMode=O.BEFORE_HTML,e._processToken(t)}function qw(e,t){t.tagID===f.HTML?(e._insertElement(t,Z.HTML),e.insertionMode=O.BEFORE_HEAD):ts(e,t)}function Kw(e,t){const n=t.tagID;(n===f.HTML||n===f.HEAD||n===f.BODY||n===f.BR)&&ts(e,t)}function ts(e,t){e._insertFakeRootElement(),e.insertionMode=O.BEFORE_HEAD,e._processToken(t)}function Xw(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.HEAD:{e._insertElement(t,Z.HTML),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD;break}default:ns(e,t)}}function Qw(e,t){const n=t.tagID;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?ns(e,t):e._err(t,Y.endTagWithoutMatchingOpenElement)}function ns(e,t){e._insertFakeElement($.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD,e._processToken(t)}function Rn(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:{e._appendElement(t,Z.HTML),t.ackSelfClosing=!0;break}case f.TITLE:{e._switchToTextParsing(t,ht.RCDATA);break}case f.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ht.RAWTEXT):(e._insertElement(t,Z.HTML),e.insertionMode=O.IN_HEAD_NO_SCRIPT);break}case f.NOFRAMES:case f.STYLE:{e._switchToTextParsing(t,ht.RAWTEXT);break}case f.SCRIPT:{e._switchToTextParsing(t,ht.SCRIPT_DATA);break}case f.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=O.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(O.IN_TEMPLATE);break}case f.HEAD:{e._err(t,Y.misplacedStartTagForHeadElement);break}default:rs(e,t)}}function Zw(e,t){switch(t.tagID){case f.HEAD:{e.openElements.pop(),e.insertionMode=O.AFTER_HEAD;break}case f.BODY:case f.BR:case f.HTML:{rs(e,t);break}case f.TEMPLATE:{Zr(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function Zr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,Y.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Y.endTagWithoutMatchingOpenElement)}function rs(e,t){e.openElements.pop(),e.insertionMode=O.AFTER_HEAD,e._processToken(t)}function Jw(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:{Rn(e,t);break}case f.NOSCRIPT:{e._err(t,Y.nestedNoscriptInHead);break}default:is(e,t)}}function eC(e,t){switch(t.tagID){case f.NOSCRIPT:{e.openElements.pop(),e.insertionMode=O.IN_HEAD;break}case f.BR:{is(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function is(e,t){const n=t.type===Oe.EOF?Y.openElementsLeftAfterEof:Y.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=O.IN_HEAD,e._processToken(t)}function tC(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.BODY:{e._insertElement(t,Z.HTML),e.framesetOk=!1,e.insertionMode=O.IN_BODY;break}case f.FRAMESET:{e._insertElement(t,Z.HTML),e.insertionMode=O.IN_FRAMESET;break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{e._err(t,Y.abandonedHeadElementChild),e.openElements.push(e.headElement,f.HEAD),Rn(e,t),e.openElements.remove(e.headElement);break}case f.HEAD:{e._err(t,Y.misplacedStartTagForHeadElement);break}default:ss(e,t)}}function nC(e,t){switch(t.tagID){case f.BODY:case f.HTML:case f.BR:{ss(e,t);break}case f.TEMPLATE:{Zr(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function ss(e,t){e._insertFakeElement($.BODY,f.BODY),e.insertionMode=O.IN_BODY,To(e,t)}function To(e,t){switch(t.type){case Oe.CHARACTER:{M0(e,t);break}case Oe.WHITESPACE_CHARACTER:{P0(e,t);break}case Oe.COMMENT:{Wl(e,t);break}case Oe.START_TAG:{Mt(e,t);break}case Oe.END_TAG:{xo(e,t);break}case Oe.EOF:{U0(e,t);break}}}function P0(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function M0(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function rC(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function iC(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function sC(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_FRAMESET)}function aC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML)}function oC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Vl.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Z.HTML)}function lC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function uC(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML),n||(e.formElement=e.openElements.current))}function cC(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===f.LI&&i===f.LI||(n===f.DD||n===f.DT)&&(i===f.DD||i===f.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==f.ADDRESS&&i!==f.DIV&&i!==f.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML)}function dC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML),e.tokenizer.state=ht.PLAINTEXT}function fC(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML),e.framesetOk=!1}function hC(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName($.A);n&&(nc(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mC(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(nc(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Z.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function bC(e,t){e.treeAdapter.getDocumentMode(e.document)!==dn.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML),e.framesetOk=!1,e.insertionMode=O.IN_TABLE}function B0(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Z.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function F0(e){const t=A0(e,Mr.TYPE);return t!=null&&t.toLowerCase()===Pw}function EC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Z.HTML),F0(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function TC(e,t){e._appendElement(t,Z.HTML),t.ackSelfClosing=!0}function xC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,Z.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function yC(e,t){t.tagName=$.IMG,t.tagID=f.IMG,B0(e,t)}function _C(e,t){e._insertElement(t,Z.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ht.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=O.TEXT}function kC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ht.RAWTEXT)}function wC(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ht.RAWTEXT)}function uf(e,t){e._switchToTextParsing(t,ht.RAWTEXT)}function CC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Z.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 AC(e,t){e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML)}function SC(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Z.HTML)}function IC(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,Z.HTML)}function vC(e,t){e._reconstructActiveFormattingElements(),O0(t),tc(t),t.selfClosing?e._appendElement(t,Z.MATHML):e._insertElement(t,Z.MATHML),t.ackSelfClosing=!0}function RC(e,t){e._reconstructActiveFormattingElements(),L0(t),tc(t),t.selfClosing?e._appendElement(t,Z.SVG):e._insertElement(t,Z.SVG),t.ackSelfClosing=!0}function cf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML)}function Mt(e,t){switch(t.tagID){case f.I:case f.S:case f.B:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.SMALL:case f.STRIKE:case f.STRONG:{pC(e,t);break}case f.A:{hC(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{oC(e,t);break}case f.P:case f.DL:case f.OL:case f.UL:case f.DIV:case f.DIR:case f.NAV:case f.MAIN:case f.MENU:case f.ASIDE:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.DETAILS:case f.ADDRESS:case f.ARTICLE:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{aC(e,t);break}case f.LI:case f.DD:case f.DT:{cC(e,t);break}case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:{B0(e,t);break}case f.HR:{xC(e,t);break}case f.RB:case f.RTC:{SC(e,t);break}case f.RT:case f.RP:{IC(e,t);break}case f.PRE:case f.LISTING:{lC(e,t);break}case f.XMP:{kC(e,t);break}case f.SVG:{RC(e,t);break}case f.HTML:{rC(e,t);break}case f.BASE:case f.LINK:case f.META:case f.STYLE:case f.TITLE:case f.SCRIPT:case f.BGSOUND:case f.BASEFONT:case f.TEMPLATE:{Rn(e,t);break}case f.BODY:{iC(e,t);break}case f.FORM:{uC(e,t);break}case f.NOBR:{mC(e,t);break}case f.MATH:{vC(e,t);break}case f.TABLE:{bC(e,t);break}case f.INPUT:{EC(e,t);break}case f.PARAM:case f.TRACK:case f.SOURCE:{TC(e,t);break}case f.IMAGE:{yC(e,t);break}case f.BUTTON:{fC(e,t);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{gC(e,t);break}case f.IFRAME:{wC(e,t);break}case f.SELECT:{CC(e,t);break}case f.OPTION:case f.OPTGROUP:{AC(e,t);break}case f.NOEMBED:case f.NOFRAMES:{uf(e,t);break}case f.FRAMESET:{sC(e,t);break}case f.TEXTAREA:{_C(e,t);break}case f.NOSCRIPT:{e.options.scriptingEnabled?uf(e,t):cf(e,t);break}case f.PLAINTEXT:{dC(e,t);break}case f.COL:case f.TH:case f.TD:case f.TR:case f.HEAD:case f.FRAME:case f.TBODY:case f.TFOOT:case f.THEAD:case f.CAPTION:case f.COLGROUP:break;default:cf(e,t)}}function NC(e,t){if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=O.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function OC(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=O.AFTER_BODY,q0(e,t))}function LC(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function DC(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):n&&e.openElements.remove(n))}function PC(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement($.P,f.P),e._closePElement()}function MC(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}function BC(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function FC(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function HC(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function UC(e){e._reconstructActiveFormattingElements(),e._insertFakeElement($.BR,f.BR),e.openElements.pop(),e.framesetOk=!1}function H0(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function xo(e,t){switch(t.tagID){case f.A:case f.B:case f.I:case f.S:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.NOBR:case f.SMALL:case f.STRIKE:case f.STRONG:{nc(e,t);break}case f.P:{PC(e);break}case f.DL:case f.UL:case f.OL:case f.DIR:case f.DIV:case f.NAV:case f.PRE:case f.MAIN:case f.MENU:case f.ASIDE:case f.BUTTON:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.ADDRESS:case f.ARTICLE:case f.DETAILS:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.LISTING:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{LC(e,t);break}case f.LI:{MC(e);break}case f.DD:case f.DT:{BC(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{FC(e);break}case f.BR:{UC(e);break}case f.BODY:{NC(e,t);break}case f.HTML:{OC(e,t);break}case f.FORM:{DC(e);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{HC(e,t);break}case f.TEMPLATE:{Zr(e,t);break}default:H0(e,t)}}function U0(e,t){e.tmplInsertionModeStack.length>0?G0(e,t):rc(e,t)}function jC(e,t){var n;t.tagID===f.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function zC(e,t){e._err(t,Y.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Xo(e,t){if(e.openElements.currentTagId!==void 0&&D0.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 Oe.CHARACTER:{z0(e,t);break}case Oe.WHITESPACE_CHARACTER:{j0(e,t);break}}else $s(e,t)}function $C(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_CAPTION}function VC(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_COLUMN_GROUP}function WC(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement($.COLGROUP,f.COLGROUP),e.insertionMode=O.IN_COLUMN_GROUP,ic(e,t)}function YC(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_TABLE_BODY}function GC(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement($.TBODY,f.TBODY),e.insertionMode=O.IN_TABLE_BODY,yo(e,t)}function qC(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function KC(e,t){F0(t)?e._appendElement(t,Z.HTML):$s(e,t),t.ackSelfClosing=!0}function XC(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Z.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ti(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:{GC(e,t);break}case f.STYLE:case f.SCRIPT:case f.TEMPLATE:{Rn(e,t);break}case f.COL:{WC(e,t);break}case f.FORM:{XC(e,t);break}case f.TABLE:{qC(e,t);break}case f.TBODY:case f.TFOOT:case f.THEAD:{YC(e,t);break}case f.INPUT:{KC(e,t);break}case f.CAPTION:{$C(e,t);break}case f.COLGROUP:{VC(e,t);break}default:$s(e,t)}}function As(e,t){switch(t.tagID){case f.TABLE:{e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break}case f.TEMPLATE:{Zr(e,t);break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:$s(e,t)}}function $s(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,To(e,t),e.fosterParentingEnabled=n}function j0(e,t){e.pendingCharacterTokens.push(t)}function z0(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Pi(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)$s(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const $0=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function QC(e,t){const n=t.tagID;$0.has(n)?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,Ti(e,t)):Mt(e,t)}function ZC(e,t){const n=t.tagID;switch(n){case f.CAPTION:case f.TABLE:{e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,n===f.TABLE&&As(e,t));break}case f.BODY:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:xo(e,t)}}function ic(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.COL:{e._appendElement(t,Z.HTML),t.ackSelfClosing=!0;break}case f.TEMPLATE:{Rn(e,t);break}default:Ga(e,t)}}function JC(e,t){switch(t.tagID){case f.COLGROUP:{e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case f.TEMPLATE:{Zr(e,t);break}case f.COL:break;default:Ga(e,t)}}function Ga(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE,e._processToken(t))}function yo(e,t){switch(t.tagID){case f.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_ROW;break}case f.TH:case f.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement($.TR,f.TR),e.insertionMode=O.IN_ROW,_o(e,t);break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,Ti(e,t));break}default:Ti(e,t)}}function Yl(e,t){const n=t.tagID;switch(t.tagID){case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case f.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,As(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:case f.TR:break;default:As(e,t)}}function _o(e,t){switch(t.tagID){case f.TH:case f.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_CELL,e.activeFormattingElements.insertMarker();break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,yo(e,t));break}default:Ti(e,t)}}function V0(e,t){switch(t.tagID){case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY);break}case f.TABLE:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,Yl(e,t));break}case f.TBODY:case f.TFOOT:case f.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,Yl(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:break;default:As(e,t)}}function eA(e,t){const n=t.tagID;$0.has(n)?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),_o(e,t)):Mt(e,t)}function tA(e,t){const n=t.tagID;switch(n){case f.TD:case f.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_ROW);break}case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),V0(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:xo(e,t)}}function W0(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,Z.HTML);break}case f.OPTGROUP:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Z.HTML);break}case f.HR:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Z.HTML),t.ackSelfClosing=!0;break}case f.INPUT:case f.KEYGEN:case f.TEXTAREA:case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),t.tagID!==f.SELECT&&e._processStartTag(t));break}case f.SCRIPT:case f.TEMPLATE:{Rn(e,t);break}}}function Y0(e,t){switch(t.tagID){case f.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===f.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop();break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop();break}case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode());break}case f.TEMPLATE:{Zr(e,t);break}}}function nA(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processStartTag(t)):W0(e,t)}function rA(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Y0(e,t)}function iA(e,t){switch(t.tagID){case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{Rn(e,t);break}case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.tmplInsertionModeStack[0]=O.IN_TABLE,e.insertionMode=O.IN_TABLE,Ti(e,t);break}case f.COL:{e.tmplInsertionModeStack[0]=O.IN_COLUMN_GROUP,e.insertionMode=O.IN_COLUMN_GROUP,ic(e,t);break}case f.TR:{e.tmplInsertionModeStack[0]=O.IN_TABLE_BODY,e.insertionMode=O.IN_TABLE_BODY,yo(e,t);break}case f.TD:case f.TH:{e.tmplInsertionModeStack[0]=O.IN_ROW,e.insertionMode=O.IN_ROW,_o(e,t);break}default:e.tmplInsertionModeStack[0]=O.IN_BODY,e.insertionMode=O.IN_BODY,Mt(e,t)}}function sA(e,t){t.tagID===f.TEMPLATE&&Zr(e,t)}function G0(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):rc(e,t)}function aA(e,t){t.tagID===f.HTML?Mt(e,t):qa(e,t)}function q0(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=O.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===f.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 qa(e,t)}function qa(e,t){e.insertionMode=O.IN_BODY,To(e,t)}function oA(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.FRAMESET:{e._insertElement(t,Z.HTML);break}case f.FRAME:{e._appendElement(t,Z.HTML),t.ackSelfClosing=!0;break}case f.NOFRAMES:{Rn(e,t);break}}}function lA(e,t){t.tagID===f.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==f.FRAMESET&&(e.insertionMode=O.AFTER_FRAMESET))}function uA(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.NOFRAMES:{Rn(e,t);break}}}function cA(e,t){t.tagID===f.HTML&&(e.insertionMode=O.AFTER_AFTER_FRAMESET)}function dA(e,t){t.tagID===f.HTML?Mt(e,t):Ra(e,t)}function Ra(e,t){e.insertionMode=O.IN_BODY,To(e,t)}function fA(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.NOFRAMES:{Rn(e,t);break}}}function hA(e,t){t.chars=at,e._insertCharacters(t)}function pA(e,t){e._insertCharacters(t),e.framesetOk=!1}function K0(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Z.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function mA(e,t){if(Rw(t))K0(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Z.MATHML?O0(t):r===Z.SVG&&(Nw(t),L0(t)),tc(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function gA(e,t){if(t.tagID===f.P||t.tagID===f.BR){K0(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)===Z.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}$.AREA,$.BASE,$.BASEFONT,$.BGSOUND,$.BR,$.COL,$.EMBED,$.FRAME,$.HR,$.IMG,$.INPUT,$.KEYGEN,$.LINK,$.META,$.PARAM,$.SOURCE,$.TRACK,$.WBR;const ko=X0("end"),Wn=X0("start");function X0(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 Q0(e){const t=Wn(e),n=ko(e);if(t&&n)return{start:t,end:n}}const bA=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,EA=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),df={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Z0(e,t){const n=IA(e),r=y0("type",{handlers:{root:TA,element:xA,text:yA,comment:eg,doctype:_A,raw:wA},unknown:CA}),i={parser:n?new lf(df):lf.getFragmentParser(void 0,df),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),Ri(i,Wn());const s=n?i.parser.document:i.parser.getFragment(),a=Tk(s,{file:i.options.file});return i.stitches&&Er(a,"comment",function(o,l,u){const d=o;if(d.value.stitch&&u&&l!==void 0){const c=u.children;return c[l]=d.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function J0(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function TA(e,t){J0(e.children,t)}function xA(e,t){AA(e,t),J0(e.children,t),SA(e,t)}function yA(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Oe.CHARACTER,chars:e.value,location:Vs(e)};Ri(t,Wn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _A(e,t){const n={type:Oe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Vs(e)};Ri(t,Wn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function kA(e,t){t.stitches=!0;const n=vA(e);if("children"in e&&"children"in n){const r=Z0({type:"root",children:e.children},t.options);n.children=r.children}eg({type:"comment",value:{stitch:n}},t)}function eg(e,t){const n=e.value,r={type:Oe.COMMENT,data:n,location:Vs(e)};Ri(t,Wn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function wA(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,tg(t,Wn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(bA,"&lt;$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 CA(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))kA(n,t);else{let r="";throw EA.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 Ri(e,t){tg(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=ht.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 tg(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 AA(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ht.PLAINTEXT)return;Ri(t,Wn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Pr.html;i===Pr.html&&n==="svg"&&(i=Pr.svg);const s=Dk({...e,children:[]},{space:i===Pr.svg?"svg":"html"}),a={type:Oe.START_TAG,tagName:n,tagID:vi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:Vs(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function SA(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&zk.includes(n)||t.parser.tokenizer.state===ht.PLAINTEXT)return;Ri(t,ko(e));const r={type:Oe.END_TAG,tagName:n,tagID:vi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Vs(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ht.RCDATA||t.parser.tokenizer.state===ht.RAWTEXT||t.parser.tokenizer.state===ht.SCRIPT_DATA)&&(t.parser.tokenizer.state=ht.DATA)}function IA(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Vs(e){const t=Wn(e)||{line:void 0,column:void 0,offset:void 0},n=ko(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 vA(e){return"children"in e?jr({...e,children:[]}):jr(e)}function Gl(e){return function(t,n){return Z0(t,{...e,file:n})}}const vr=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],as={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...vr,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...vr],h2:[["className","sr-only"]],img:[...vr,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...vr,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...vr],table:[...vr],ul:[...vr,["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"]},dr={}.hasOwnProperty;function RA(e,t){let n={type:"root",children:[]};const r={schema:t?{...as,...t}:as,stack:[]},i=ng(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function ng(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return NA(e,n);case"doctype":return OA(e,n);case"element":return LA(e,n);case"root":return DA(e,n);case"text":return PA(e,n)}}}function NA(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),s={type:"comment",value:r<0?n:n.slice(0,r)};return Ws(s,t),s}}function OA(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ws(n,t),n}}function LA(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=rg(e,t.children),i=MA(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&dr.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let l=-1;for(s=!1;++l<o.length;)e.stack.includes(o[l])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:i,children:r};return Ws(a,t),a}function DA(e,t){const r={type:"root",children:rg(e,t.children)};return Ws(r,t),r}function PA(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ws(r,t),r}function rg(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=ng(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function MA(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&dr.call(r,n)?r[n]:void 0,a=r&&dr.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},l={};let u;for(u in o)if(dr.call(o,u)){const d=o[u];let c=ff(e,hf(s,u),u,d);c==null&&(c=ff(e,hf(a,u),u,d)),c!=null&&(l[u]=c)}if(i&&dr.call(i,n)){const d=i[n];for(u in d)dr.call(d,u)&&!dr.call(l,u)&&(l[u]=d[u])}return l}function ff(e,t,n,r){return t?Array.isArray(r)?BA(e,t,n,r):ig(e,t,n,r):void 0}function BA(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=ig(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function ig(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&FA(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){i=!0;break}}else if(a===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function FA(e,t,n){const r=e.schema.protocols&&dr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),s=i.indexOf(":"),a=i.indexOf("?"),o=i.indexOf("#"),l=i.indexOf("/");if(s<0||l>-1&&s>l||a>-1&&s>a||o>-1&&s>o)return!0;let u=-1;for(;++u<r.length;){const d=r[u];if(s===d.length&&i.slice(0,d.length)===d)return!0}return!1}function Ws(e,t){const n=Q0(t);t.data&&(e.data=jr(t.data)),n&&(e.position=n)}function hf(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function sg(e){return function(t){return RA(t,e)}}function pf(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ut=wr(/[A-Za-z]/),Dt=wr(/[\dA-Za-z]/),HA=wr(/[#-'*+\--9=?A-Z^-~]/);function Ka(e){return e!==null&&(e<32||e===127)}const ql=wr(/\d/),UA=wr(/[\dA-Fa-f]/),jA=wr(/[!-/:-@[-`{-~]/);function be(e){return e!==null&&e<-2}function Je(e){return e!==null&&(e<0||e===32)}function Le(e){return e===-2||e===-1||e===32}const wo=wr(new RegExp("\\p{P}|\\p{S}","u")),zr=wr(/\s/);function wr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zA(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const ag=[],$A=!0,mf=!1,og="skip";function lg(e,t,n,r){let i;i=t;const s=Us(i),a=1;o(e,void 0,[])();function o(l,u,d){const c=l&&typeof l=="object"?l:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=ag,m,E,T;if(s(l,u,d[d.length-1]||void 0)&&(p=VA(n(l,d)),p[0]===mf))return p;if("children"in l&&l.children){const b=l;if(b.children&&p[0]!==og)for(E=-1+a,T=d.concat(b);E>-1&&E<b.children.length;){const y=b.children[E];if(m=o(y,E,T)(),m[0]===mf)return m;E=typeof m[1]=="number"?m[1]:E+a}}return p}}}function VA(e){return Array.isArray(e)?e:typeof e=="number"?[$A,e]:e==null?ag:[e]}function WA(e,t,n){const i=Us((n||{}).ignore||[]),s=YA(t);let a=-1;for(;++a<s.length;)lg(e,"text",o);function o(u,d){let c=-1,h;for(;++c<d.length;){const p=d[c],m=h?h.children:void 0;if(i(p,m?m.indexOf(p):void 0,h))return;h=p}if(h)return l(u,d)}function l(u,d){const c=d[d.length-1],h=s[a][0],p=s[a][1];let m=0;const T=c.children.indexOf(u);let b=!1,y=[];h.lastIndex=0;let k=h.exec(u.value);for(;k;){const P=k.index,D={index:k.index,input:k.input,stack:[...d,u]};let v=p(...k,D);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?h.lastIndex=P+1:(m!==P&&y.push({type:"text",value:u.value.slice(m,P)}),Array.isArray(v)?y.push(...v):v&&y.push(v),m=P+k[0].length,b=!0),!h.global)break;k=h.exec(u.value)}return b?(m<u.value.length&&y.push({type:"text",value:u.value.slice(m)}),c.children.splice(T,1,...y)):y=[u],T+y.length}}function YA(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 i=n[r];t.push([GA(i[0]),qA(i[1])])}return t}function GA(e){return typeof e=="string"?new RegExp(zA(e),"g"):e}function qA(e){return typeof e=="function"?e:function(){return e}}const Qo="phrasing",Zo=["autolink","link","image","label"];function KA(){return{transforms:[nS],enter:{literalAutolink:QA,literalAutolinkEmail:Jo,literalAutolinkHttp:Jo,literalAutolinkWww:Jo},exit:{literalAutolink:tS,literalAutolinkEmail:eS,literalAutolinkHttp:ZA,literalAutolinkWww:JA}}}function XA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Qo,notInConstruct:Zo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Qo,notInConstruct:Zo},{character:":",before:"[ps]",after:"\\/",inConstruct:Qo,notInConstruct:Zo}]}}function QA(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Jo(e){this.config.enter.autolinkProtocol.call(this,e)}function ZA(e){this.config.exit.autolinkProtocol.call(this,e)}function JA(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 eS(e){this.config.exit.autolinkEmail.call(this,e)}function tS(e){this.exit(e)}function nS(e){WA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),iS]],{ignore:["link","linkReference"]})}function rS(e,t,n,r,i){let s="";if(!ug(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!sS(n)))return!1;const a=aS(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function iS(e,t,n,r){return!ug(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function sS(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 aS(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 i=pf(e,"(");let s=pf(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function ug(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||zr(n)||wo(n))&&(!t||n!==47)}function An(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}cg.peek=mS;function oS(){this.buffer()}function lS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function uS(){this.buffer()}function cS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function dS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=An(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fS(e){this.exit(e)}function hS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=An(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pS(e){this.exit(e)}function mS(){return"["}function cg(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function gS(){return{enter:{gfmFootnoteCallString:oS,gfmFootnoteCall:lS,gfmFootnoteDefinitionLabelString:uS,gfmFootnoteDefinition:cS},exit:{gfmFootnoteCallString:dS,gfmFootnoteCall:fS,gfmFootnoteDefinitionLabelString:hS,gfmFootnoteDefinition:pS}}}function bS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:cg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const u=s.enter("footnoteDefinition"),d=s.enter("label");return l+=o.move(s.safe(s.associationId(r),{before:l,after:"]"})),d(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?`
54
- `:" ")+s.indentLines(s.containerFlow(r,o.current()),t?dg:ES))),u(),l}}function ES(e,t,n){return t===0?e:dg(e,t,n)}function dg(e,t,n){return(n?"":" ")+e}const TS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];fg.peek=wS;function xS(){return{canContainEols:["delete"],enter:{strikethrough:_S},exit:{strikethrough:kS}}}function yS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:TS}],handlers:{delete:fg}}}function _S(e){this.enter({type:"delete",children:[]},e)}function kS(e){this.exit(e)}function fg(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function wS(){return"~"}function CS(e){return e.length}function AS(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||CS,s=[],a=[],o=[],l=[];let u=0,d=-1;for(;++d<e.length;){const E=[],T=[];let b=-1;for(e[d].length>u&&(u=e[d].length);++b<e[d].length;){const y=SS(e[d][b]);if(n.alignDelimiters!==!1){const k=i(y);T[b]=k,(l[b]===void 0||k>l[b])&&(l[b]=k)}E.push(y)}a[d]=E,o[d]=T}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)s[c]=gf(r[c]);else{const E=gf(r);for(;++c<u;)s[c]=E}c=-1;const h=[],p=[];for(;++c<u;){const E=s[c];let T="",b="";E===99?(T=":",b=":"):E===108?T=":":E===114&&(b=":");let y=n.alignDelimiters===!1?1:Math.max(1,l[c]-T.length-b.length);const k=T+"-".repeat(y)+b;n.alignDelimiters!==!1&&(y=T.length+y+b.length,y>l[c]&&(l[c]=y),p[c]=y),h[c]=k}a.splice(1,0,h),o.splice(1,0,p),d=-1;const m=[];for(;++d<a.length;){const E=a[d],T=o[d];c=-1;const b=[];for(;++c<u;){const y=E[c]||"";let k="",P="";if(n.alignDelimiters!==!1){const D=l[c]-(T[c]||0),v=s[c];v===114?k=" ".repeat(D):v===99?D%2?(k=" ".repeat(D/2+.5),P=" ".repeat(D/2-.5)):(k=" ".repeat(D/2),P=k):P=" ".repeat(D)}n.delimiterStart!==!1&&!c&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&y==="")&&(n.delimiterStart!==!1||c)&&b.push(" "),n.alignDelimiters!==!1&&b.push(k),b.push(y),n.alignDelimiters!==!1&&b.push(P),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&b.push("|")}m.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return m.join(`
55
- `)}function SS(e){return e==null?"":String(e)}function gf(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 IS(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),vS);return i(),a}function vS(e,t,n){return">"+(n?"":" ")+e}function RS(e,t){return bf(e,t.inConstruct,!0)&&!bf(e,t.notInConstruct,!1)}function bf(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 Ef(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
56
- `&&RS(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
57
- `}function NS(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function OS(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 LS(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 DS(e,t,n,r){const i=LS(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(OS(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(s,PS);return c(),h}const o=n.createTracker(r),l=i.repeat(Math.max(NS(s,i)+1,3)),u=n.enter("codeFenced");let d=o.move(l);if(e.lang){const c=n.enter(`codeFencedLang${a}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${a}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
52
+ */const Lx=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Dx=Kp("lock",Lx);function Px(...e){return Nu(Pt(e))}const ia=new Intl.NumberFormat(void 0,{maximumFractionDigits:2}),_a=1e3,Vi=60*_a,Wi=60*Vi,ld=24*Wi;function on(e,t=!1){if(e===0)return"0";if(e<_a)return`${ia.format(e)}ms`;if(e<Vi)return`${ia.format(e/_a)}s`;if(t)return e<Wi?`${ia.format(e/Vi)}m`:`${ia.format(e/Wi)}h`;const n=Math.floor(e/ld),r=Math.floor(e%ld/Wi),i=Math.floor(e%Wi/Vi),s=Math.floor(e%Vi/_a),a=[];return n>0&&a.push(`${n}d`),r>0&&a.push(`${r}h`),i>0&&a.push(`${i}m`),r<=1&&(s>0||a.length===0)&&a.push(`${s}s`),a.join(" ")}function sM(e){return e.endsWith("//doStreamStep")}function aM(e){if(!Array.isArray(e)||e.length===0)return null;const t=e[0];return!Array.isArray(t)||!t.every(n=>n&&typeof n=="object"&&"role"in n)?null:t}const fo=0,yr=1,ki=2,Xp=4;function ud(e){return()=>e}function Mx(e){e()}function Qp(e,t){return n=>e(t(n))}function cd(e,t){return()=>e(t)}function Bx(e,t){return n=>e(t,n)}function Ou(e){return e!==void 0}function Fx(...e){return()=>{e.map(Mx)}}function wi(){}function ho(e,t){return t(e),e}function Hx(e,t){return t(e)}function st(...e){return e}function Ge(e,t){return e(yr,t)}function Ie(e,t){e(fo,t)}function Lu(e){e(ki)}function lt(e){return e(Xp)}function he(e,t){return Ge(e,Bx(t,fo))}function Cn(e,t){const n=e(yr,r=>{n(),t(r)});return n}function dd(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Zp(e,t){return e===t}function it(e=Zp){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function xe(e){return t=>n=>{e(n)&&t(n)}}function le(e){return t=>Qp(t,e)}function Bn(e){return t=>()=>{t(e)}}function J(e,...t){const n=Ux(...t);return((r,i)=>{switch(r){case ki:Lu(e);return;case yr:return Ge(e,n(i))}})}function Un(e,t){return n=>r=>{n(t=e(t,r))}}function Ur(e){return t=>n=>{e>0?e--:t(n)}}function Zn(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function ve(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((s,a)=>{const o=Math.pow(2,a);Ge(s,l=>{const u=n;n=n|o,t[a]=l,u!==i&&n===i&&r&&(r(),r=null)})}),s=>a=>{const o=()=>{s([a].concat(t))};n===i?o():r=o}}function Ux(...e){return t=>e.reduceRight(Hx,t)}function jx(e){let t,n;const r=()=>t==null?void 0:t();return function(i,s){switch(i){case yr:return s?n===s?void 0:(r(),n=s,t=Ge(e,s),t):(r(),wi);case ki:r(),n=null;return}}}function ie(e){let t=e;const n=He();return((r,i)=>{switch(r){case fo:t=i;break;case yr:{i(t);break}case Xp:return t}return n(r,i)})}function Lt(e,t){return ho(ie(t),n=>he(e,n))}function He(){const e=[];return((t,n)=>{switch(t){case fo:e.slice().forEach(r=>{r(n)});return;case ki:e.splice(0,e.length);return;case yr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function ln(e){return ho(He(),t=>he(e,t))}function We(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:zx(),singleton:n}}const zx=()=>Symbol();function $x(e){const t=new Map,n=({constructor:r,dependencies:i,id:s,singleton:a})=>{if(a&&t.has(s))return t.get(s);const o=r(i.map(l=>n(l)));return a&&t.set(s,o),o};return n(e)}function gt(...e){const t=He(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((s,a)=>{const o=Math.pow(2,a);Ge(s,l=>{n[a]=l,r=r|o,r===i&&Ie(t,n)})}),function(s,a){switch(s){case ki:{Lu(t);return}case yr:return r===i&&a(n),Ge(t,a)}}}function Te(e,t=Zp){return J(e,it(t))}function Sl(...e){return function(t,n){switch(t){case ki:return;case yr:return Fx(...e.map(r=>Ge(r,n)))}}}var Gt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Gt||{});const Vx={0:"debug",3:"error",1:"log",2:"warn"},Wx=()=>typeof globalThis>"u"?window:globalThis,_r=We(()=>{const e=ie(3);return{log:ie((t,n,r=1)=>{var i;const s=(i=Wx().VIRTUOSO_LOG_LEVEL)!=null?i:lt(e);r>=s&&console[Vx[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function qr(e,t,n){return Du(e,t,n).callbackRef}function Du(e,t,n){const r=F.useRef(null);let i=a=>{};const s=F.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const o=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?o():requestAnimationFrame(o)}):null,[e,n]);return i=a=>{a&&t?(s==null||s.observe(a),r.current=a):(r.current&&(s==null||s.unobserve(r.current)),r.current=null)},{callbackRef:i,ref:r}}function Yx(e,t,n,r,i,s,a,o,l){const u=F.useCallback(d=>{const c=Gx(d.children,t,o?"offsetWidth":"offsetHeight",i);let h=d.parentElement;for(;!h.dataset.virtuosoScroller;)h=h.parentElement;const p=h.lastElementChild.dataset.viewportType==="window";let m;p&&(m=h.ownerDocument.defaultView);const E=a?o?a.scrollLeft:a.scrollTop:p?o?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:o?h.scrollLeft:h.scrollTop,T=a?o?a.scrollWidth:a.scrollHeight:p?o?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:o?h.scrollWidth:h.scrollHeight,b=a?o?a.offsetWidth:a.offsetHeight:p?o?m.innerWidth:m.innerHeight:o?h.offsetWidth:h.offsetHeight;r({scrollHeight:T,scrollTop:Math.max(E,0),viewportHeight:b}),s==null||s(o?fd("column-gap",getComputedStyle(d).columnGap,i):fd("row-gap",getComputedStyle(d).rowGap,i)),c!==null&&e(c)},[e,t,i,s,a,r,o]);return Du(u,n,l)}function Gx(e,t,n,r){const i=e.length;if(i===0)return null;const s=[];for(let a=0;a<i;a++){const o=e.item(a);if(o.dataset.index===void 0)continue;const l=parseInt(o.dataset.index),u=parseFloat(o.dataset.knownSize),d=t(o,n);if(d===0&&r("Zero-sized element, this should not happen",{child:o},Gt.ERROR),d===u)continue;const c=s[s.length-1];s.length===0||c.size!==d||c.endIndex!==l-1?s.push({endIndex:l,size:d,startIndex:l}):s[s.length-1].endIndex++}return s}function fd(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Gt.WARN),t==="normal"?0:parseInt(t??"0",10)}function Jp(e,t,n){const r=F.useRef(null),i=F.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const u=l.getBoundingClientRect(),d=u.width;let c,h;if(t){const p=t.getBoundingClientRect(),m=u.top-p.top;h=p.height-Math.max(0,m),c=m+t.scrollTop}else{const p=a.current.ownerDocument.defaultView;h=p.innerHeight-Math.max(0,u.top),c=u.top+p.scrollY}r.current={offsetTop:c,visibleHeight:h,visibleWidth:d},e(r.current)},[e,t]),{callbackRef:s,ref:a}=Du(i,!0,n),o=F.useCallback(()=>{i(a.current)},[i,a]);return F.useEffect(()=>{var l;if(t){t.addEventListener("scroll",o);const u=new ResizeObserver(()=>{requestAnimationFrame(o)});return u.observe(t),()=>{t.removeEventListener("scroll",o),u.unobserve(t)}}else{const u=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return u==null||u.addEventListener("scroll",o),u==null||u.addEventListener("resize",o),()=>{u==null||u.removeEventListener("scroll",o),u==null||u.removeEventListener("resize",o)}}},[o,t,a]),s}const zt=We(()=>{const e=He(),t=He(),n=ie(0),r=He(),i=ie(0),s=He(),a=He(),o=ie(0),l=ie(0),u=ie(0),d=ie(0),c=He(),h=He(),p=ie(!1),m=ie(!1),E=ie(!1);return he(J(e,le(({scrollTop:T})=>T)),t),he(J(e,le(({scrollHeight:T})=>T)),a),he(t,i),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:d,headerHeight:o,horizontalDirection:m,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:c,scrollTop:t,skipAnimationFrameInResizeObserver:E,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:s}},[],{singleton:!0}),ps={lvl:0};function em(e,t){const n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]);const s=[];for(let a=1;a<n;a++){const{index:o,value:l}=t(e[a]);s.push({end:o-1,start:r,value:i}),r=o,i=l}return s.push({end:1/0,start:r,value:i}),s}function Ze(e){return e===ps}function ms(e,t){if(!Ze(e))return t===e.k?e.v:t<e.k?ms(e.l,t):ms(e.r,t)}function Rn(e,t,n="k"){if(Ze(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Rn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Rn(e.l,t,n)}function rn(e,t,n){return Ze(e)?rm(t,n,1):t===e.k?xt(e,{k:t,v:n}):t<e.k?hd(xt(e,{l:rn(e.l,t,n)})):hd(xt(e,{r:rn(e.r,t,n)}))}function di(){return ps}function fi(e,t,n){if(Ze(e))return[];const r=Rn(e,t)[0];return qx(vl(e,r,n))}function Il(e,t){if(Ze(e))return ps;const{k:n,l:r,r:i}=e;if(t===n){if(Ze(r))return i;if(Ze(i))return r;{const[s,a]=nm(r);return ka(xt(e,{k:s,l:tm(r),v:a}))}}else return t<n?ka(xt(e,{l:Il(r,t)})):ka(xt(e,{r:Il(i,t)}))}function Lr(e){return Ze(e)?[]:[...Lr(e.l),{k:e.k,v:e.v},...Lr(e.r)]}function vl(e,t,n){if(Ze(e))return[];const{k:r,l:i,r:s,v:a}=e;let o=[];return r>t&&(o=o.concat(vl(i,t,n))),r>=t&&r<=n&&o.push({k:r,v:a}),r<=n&&(o=o.concat(vl(s,t,n))),o}function ka(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Fo(t))return im(xt(e,{lvl:n-1}));if(!Ze(t)&&!Ze(t.r))return xt(t.r,{l:xt(t,{r:t.r.l}),lvl:n,r:xt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Fo(e))return Rl(xt(e,{lvl:n-1}));if(!Ze(r)&&!Ze(r.l)){const i=r.l,s=Fo(i)?r.lvl-1:r.lvl;return xt(i,{l:xt(e,{lvl:n-1,r:i.l}),lvl:i.lvl+1,r:Rl(xt(r,{l:i.r,lvl:s}))})}else throw new Error("Unexpected empty nodes")}}function xt(e,t){return rm(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function tm(e){return Ze(e.r)?e.l:ka(xt(e,{r:tm(e.r)}))}function Fo(e){return Ze(e)||e.lvl>e.r.lvl}function nm(e){return Ze(e.r)?[e.k,e.v]:nm(e.r)}function rm(e,t,n,r=ps,i=ps){return{k:e,l:r,lvl:n,r:i,v:t}}function hd(e){return Rl(im(e))}function im(e){const{l:t}=e;return!Ze(t)&&t.lvl===e.lvl?xt(t,{r:xt(e,{l:t.r})}):e}function Rl(e){const{lvl:t,r:n}=e;return!Ze(n)&&!Ze(n.r)&&n.lvl===t&&n.r.lvl===t?xt(n,{l:xt(e,{r:n.l}),lvl:t+1}):e}function qx(e){return em(e,({k:t,v:n})=>({index:t,value:n}))}function sm(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function gs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Pu=We(()=>({recalcInProgress:ie(!1)}),[],{singleton:!0});function am(e,t,n){return e[Ua(e,t,n)]}function Ua(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const s=Math.floor((r+i)/2),a=e[s],o=n(a,t);if(o===0)return s;if(o===-1){if(i-r<2)return s-1;i=s-1}else{if(i===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Kx(e,t,n,r){const i=Ua(e,t,r),s=Ua(e,n,r,i);return e.slice(i,s+1)}function br(e,t){return Math.round(e.getBoundingClientRect()[t])}function po(e){return!Ze(e.groupOffsetTree)}function Mu({index:e},t){return t===e?0:t<e?-1:1}function Xx(){return{groupIndices:[],groupOffsetTree:di(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:di()}}function Qx(e,t){let n=Ze(e)?0:1/0;for(const r of t){const{endIndex:i,size:s,startIndex:a}=r;if(n=Math.min(n,a),Ze(e)){e=rn(e,0,s);continue}const o=fi(e,a-1,i+1);if(o.some(iy(r)))continue;let l=!1,u=!1;for(const{end:d,start:c,value:h}of o)l?(i>=c||s===h)&&(e=Il(e,c)):(u=h!==s,l=!0),d>i&&i>=c&&h!==s&&(e=rn(e,i+1,h));u&&(e=rn(e,a,s))}return[e,n]}function Zx(e){return typeof e.groupIndex<"u"}function Jx({offset:e},t){return t===e?0:t<e?-1:1}function bs(e,t,n){if(t.length===0)return 0;const{index:r,offset:i,size:s}=am(t,e,Mu),a=e-r,o=s*a+(a-1)*n+i;return o>0?o+n:o}function om(e,t){if(!po(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function lm(e,t,n){if(Zx(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=om(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function ey(e,t,n,r=0){return r>0&&(t=Math.max(t,am(e,r,Mu).offset)),em(Kx(e,t,n,Jx),ry)}function ty(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Gt.DEBUG);const s=e.sizeTree;let a=s,o=0;if(n.length>0&&Ze(s)&&t.length===2){const h=t[0].size,p=t[1].size;a=n.reduce((m,E)=>rn(rn(m,E,h),E+1,p),a)}else[a,o]=Qx(a,t);if(a===s)return e;const{lastIndex:l,lastOffset:u,lastSize:d,offsetTree:c}=Nl(e.offsetTree,o,a,i);return{groupIndices:n,groupOffsetTree:n.reduce((h,p)=>rn(h,p,bs(p,c,i)),di()),lastIndex:l,lastOffset:u,lastSize:d,offsetTree:c,sizeTree:a}}function ny(e){return Lr(e).map(({k:t,v:n},r,i)=>{const s=i[r+1];return{endIndex:s?s.k-1:1/0,size:n,startIndex:t}})}function pd(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Nl(e,t,n,r){let i=e,s=0,a=0,o=0,l=0;if(t!==0){l=Ua(i,t-1,Mu),o=i[l].offset;const u=Rn(n,t-1);s=u[0],a=u[1],i.length&&i[l].size===Rn(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}else i=[];for(const{start:u,value:d}of fi(n,t,1/0)){const c=u-s,h=c*a+o+c*r;i.push({index:u,offset:h,size:d}),s=u,o=h,a=d}return{lastIndex:s,lastOffset:o,lastSize:a,offsetTree:i}}function ry(e){return{index:e.index,value:e}}function iy(e){const{endIndex:t,size:n,startIndex:r}=e;return i=>i.start===r&&(i.end===t||i.end===1/0)&&i.value===n}const sy={offsetHeight:"height",offsetWidth:"width"},Vn=We(([{log:e},{recalcInProgress:t}])=>{const n=He(),r=He(),i=Lt(r,0),s=He(),a=He(),o=ie(0),l=ie([]),u=ie(void 0),d=ie(void 0),c=ie(void 0),h=ie(void 0),p=ie((A,N)=>br(A,sy[N])),m=ie(void 0),E=ie(0),T=Xx(),b=Lt(J(n,ve(l,e,E),Un(ty,T),it()),T),y=Lt(J(l,it(),Un((A,N)=>({current:N,prev:A.current}),{current:[],prev:[]}),le(({prev:A})=>A)),[]);he(J(l,xe(A=>A.length>0),ve(b,E),le(([A,N,z])=>{const R=A.reduce((W,j,w)=>rn(W,j,bs(j,N.offsetTree,z)||w),di());return{...N,groupIndices:A,groupOffsetTree:R}})),b),he(J(r,ve(b),xe(([A,{lastIndex:N}])=>A<N),le(([A,{lastIndex:N,lastSize:z}])=>[{endIndex:N,size:z,startIndex:A}])),n),he(u,d);const k=Lt(J(u,le(A=>A===void 0)),!0);he(J(d,xe(A=>A!==void 0&&Ze(lt(b).sizeTree)),le(A=>{const N=lt(c),z=lt(l).length>0;return N?z?[{endIndex:0,size:N,startIndex:0},{endIndex:1,size:A,startIndex:1}]:[]:[{endIndex:0,size:A,startIndex:0}]})),n),he(J(h,xe(A=>A!==void 0&&A.length>0&&Ze(lt(b).sizeTree)),le(A=>{const N=[];let z=A[0],R=0;for(let W=1;W<A.length;W++){const j=A[W];j!==z&&(N.push({endIndex:W-1,size:z,startIndex:R}),z=j,R=W)}return N.push({endIndex:A.length-1,size:z,startIndex:R}),N})),n),he(J(l,ve(c,d),xe(([,A,N])=>A!==void 0&&N!==void 0),le(([A,N,z])=>{const R=[];for(let W=0;W<A.length;W++){const j=A[W],w=A[W+1];R.push({startIndex:j,endIndex:j,size:N}),w!==void 0&&R.push({startIndex:j+1,endIndex:w-1,size:z})}return R})),n);const P=ln(J(n,ve(b),Un(({sizes:A},[N,z])=>({changed:z!==A,sizes:z}),{changed:!1,sizes:T}),le(A=>A.changed)));Ge(J(o,Un((A,N)=>({diff:A.prev-N,prev:N}),{diff:0,prev:0}),le(A=>A.diff)),A=>{const{groupIndices:N}=lt(b);if(A>0)Ie(t,!0),Ie(s,A+pd(A,N));else if(A<0){const z=lt(y);z.length>0&&(A-=pd(-A,z)),Ie(a,A)}}),Ge(J(o,ve(e)),([A,N])=>{A<0&&N("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:o},Gt.ERROR)});const D=ln(s);he(J(s,ve(b),le(([A,N])=>{const z=N.groupIndices.length>0,R=[],W=N.lastSize;if(z){const j=ms(N.sizeTree,0);let w=0,L=0;for(;w<A;){const H=N.groupIndices[L],U=N.groupIndices.length===L+1?1/0:N.groupIndices[L+1]-H-1;R.push({endIndex:H,size:j,startIndex:H}),R.push({endIndex:H+1+U-1,size:W,startIndex:H+1}),L++,w+=U+1}const M=Lr(N.sizeTree);return w!==A&&M.shift(),M.reduce((H,{k:U,v:G})=>{let Q=H.ranges;return H.prevSize!==0&&(Q=[...H.ranges,{endIndex:U+A-1,size:H.prevSize,startIndex:H.prevIndex}]),{prevIndex:U+A,prevSize:G,ranges:Q}},{prevIndex:A,prevSize:0,ranges:R}).ranges}return Lr(N.sizeTree).reduce((j,{k:w,v:L})=>({prevIndex:w+A,prevSize:L,ranges:[...j.ranges,{endIndex:w+A-1,size:j.prevSize,startIndex:j.prevIndex}]}),{prevIndex:0,prevSize:W,ranges:[]}).ranges})),n);const v=ln(J(a,ve(b,E),le(([A,{offsetTree:N},z])=>{const R=-A;return bs(R,N,z)})));return he(J(a,ve(b,E),le(([A,N,z])=>{if(N.groupIndices.length>0){if(Ze(N.sizeTree))return N;let R=di();const W=lt(y);let j=0,w=0,L=0;for(;j<-A;){L=W[w];const M=W[w+1]-L-1;w++,j+=M+1}if(R=Lr(N.sizeTree).reduce((M,{k:H,v:U})=>rn(M,Math.max(0,H+A),U),R),j!==-A){const M=ms(N.sizeTree,L);R=rn(R,0,M);const H=Rn(N.sizeTree,-A+1)[1];R=rn(R,1,H)}return{...N,sizeTree:R,...Nl(N.offsetTree,0,R,z)}}else{const R=Lr(N.sizeTree).reduce((W,{k:j,v:w})=>rn(W,Math.max(0,j+A),w),di());return{...N,sizeTree:R,...Nl(N.offsetTree,0,R,z)}}})),b),{beforeUnshiftWith:D,data:m,defaultItemSize:d,firstItemIndex:o,fixedItemSize:u,fixedGroupSize:c,gap:E,groupIndices:l,heightEstimates:h,itemSize:p,listRefresh:P,shiftWith:a,shiftWithOffset:v,sizeRanges:n,sizes:b,statefulTotalCount:i,totalCount:r,trackItemSizes:k,unshiftWith:s}},st(_r,Pu),{singleton:!0});function ay(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const um=We(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{const s=He(),a=He(),o=ln(J(s,le(ay)));return he(J(o,le(l=>l.totalCount)),n),he(J(o,le(l=>l.groupIndices)),e),he(J(gt(i,t,r),xe(([l,u])=>po(u)),le(([l,u,d])=>Rn(u.groupOffsetTree,Math.max(l-d,0),"v")[0]),it(),le(l=>[l])),a),{groupCounts:s,topItemsIndexes:a}},st(Vn,zt)),kr=We(([{log:e}])=>{const t=ie(!1),n=ln(J(t,xe(r=>r),it()));return Ge(t,r=>{r&&lt(e)("props updated",{},Gt.DEBUG)}),{didMount:n,propsReady:t}},st(_r),{singleton:!0}),oy=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function cm(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!oy)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ms=We(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:s,footerHeight:a,headerHeight:o,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:d,viewportHeight:c},{log:h}])=>{const p=He(),m=He(),E=ie(0);let T=null,b=null,y=null;function k(){T&&(T(),T=null),y&&(y(),y=null),b&&(clearTimeout(b),b=null),Ie(l,!1)}return he(J(p,ve(n,c,r,E,o,a,h),ve(e,s,i),le(([[P,D,v,A,N,z,R,W],j,w,L])=>{const M=cm(P),{align:H,behavior:U,offset:G}=M,Q=A-1,_=lm(M,D,Q);let se=bs(_,D.offsetTree,j)+z;H==="end"?(se+=w+Rn(D.sizeTree,_)[1]-v+L,_===Q&&(se+=R)):H==="center"?se+=(w+Rn(D.sizeTree,_)[1]-v+L)/2:se-=N,G&&(se+=G);const te=S=>{k(),S?(W("retrying to scroll to",{location:P},Gt.DEBUG),Ie(p,P)):(Ie(m,!0),W("list did not change, scroll successful",{},Gt.DEBUG))};if(k(),U==="smooth"){let S=!1;y=Ge(t,ge=>{S=S||ge}),T=Cn(d,()=>{te(S)})}else T=Cn(J(t,ly(150)),te);return b=setTimeout(()=>{k()},1200),Ie(l,!0),W("scrolling from index to",{behavior:U,index:_,top:se},Gt.DEBUG),{behavior:U,top:se}})),u),{scrollTargetReached:m,scrollToIndex:p,topListHeight:E}},st(Vn,zt,_r),{singleton:!0});function ly(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Bu(e,t){e==0?t():requestAnimationFrame(()=>{Bu(e-1,t)})}function Fu(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Bs=We(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:s},{didMount:a}])=>{const o=ie(!0),l=ie(0),u=ie(!0);return he(J(a,ve(l),xe(([d,c])=>!!c),Bn(!1)),o),he(J(a,ve(l),xe(([d,c])=>!!c),Bn(!1)),u),Ge(J(gt(t,a),ve(o,n,e,u),xe(([[,d],c,{sizeTree:h},p,m])=>d&&(!Ze(h)||Ou(p))&&!c&&!m),ve(l)),([,d])=>{Cn(i,()=>{Ie(u,!0)}),Bu(4,()=>{Cn(r,()=>{Ie(o,!0)}),Ie(s,d)})}),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:o}},st(Vn,zt,Ms,kr),{singleton:!0});function dm(e,t){return Math.abs(e-t)<1.01}const Es="up",Qi="down",uy="none",cy={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},dy=0,Fs=We(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:s}])=>{const a=ie(!1),o=ie(!0),l=He(),u=He(),d=ie(4),c=ie(dy),h=Lt(J(Sl(J(Te(i),Ur(1),Bn(!0)),J(Te(i),Ur(1),Bn(!1),dd(100))),it()),!1),p=Lt(J(Sl(J(n,Bn(!0)),J(n,Bn(!1),dd(200))),it()),!1);he(J(gt(Te(i),Te(c)),le(([y,k])=>y<=k),it()),o),he(J(o,Zn(50)),u);const m=ln(J(gt(r,Te(s),Te(t),Te(e),Te(d)),Un((y,[{scrollHeight:k,scrollTop:P},D,v,A,N])=>{const z=P+D-k>-N,R={scrollHeight:k,scrollTop:P,viewportHeight:D};if(z){let j,w;return P>y.state.scrollTop?(j="SCROLLED_DOWN",w=y.state.scrollTop-P):(j="SIZE_DECREASED",w=y.state.scrollTop-P||y.scrollTopDelta),{atBottom:!0,atBottomBecause:j,scrollTopDelta:w,state:R}}let W;return R.scrollHeight>y.state.scrollHeight?W="SIZE_INCREASED":D<y.state.viewportHeight?W="VIEWPORT_HEIGHT_DECREASING":P<y.state.scrollTop?W="SCROLLING_UPWARDS":W="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:W,state:R}},cy),it((y,k)=>y&&y.atBottom===k.atBottom))),E=Lt(J(r,Un((y,{scrollHeight:k,scrollTop:P,viewportHeight:D})=>{if(dm(y.scrollHeight,k))return{changed:!1,jump:0,scrollHeight:k,scrollTop:P};{const v=k-(P+D)<1;return y.scrollTop!==P&&v?{changed:!0,jump:y.scrollTop-P,scrollHeight:k,scrollTop:P}:{changed:!0,jump:0,scrollHeight:k,scrollTop:P}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),xe(y=>y.changed),le(y=>y.jump)),0);he(J(m,le(y=>y.atBottom)),a),he(J(a,Zn(50)),l);const T=ie(Qi);he(J(r,le(({scrollTop:y})=>y),it(),Un((y,k)=>lt(p)?{direction:y.direction,prevScrollTop:k}:{direction:k<y.prevScrollTop?Es:Qi,prevScrollTop:k},{direction:Qi,prevScrollTop:0}),le(y=>y.direction)),T),he(J(r,Zn(50),Bn(uy)),T);const b=ie(0);return he(J(h,xe(y=>!y),Bn(0)),b),he(J(i,Zn(100),ve(h),xe(([y,k])=>k),Un(([y,k],[P])=>[k,P],[0,0]),le(([y,k])=>k-y)),b),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:d,atTopStateChange:u,atTopThreshold:c,isAtBottom:a,isAtTop:o,isScrolling:h,lastJumpDueToItemResize:E,scrollDirection:T,scrollVelocity:b}},st(zt)),Ts="top",xs="bottom",md="none";function gd(e,t,n){return typeof e=="number"?n===Es&&t===Ts||n===Qi&&t===xs?e:0:n===Es?t===Ts?e.main:e.reverse:t===xs?e.main:e.reverse}function bd(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const Hu=We(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{const s=He(),a=ie(0),o=ie(0),l=ie(0),u=Lt(J(gt(Te(r),Te(i),Te(n),Te(s,gs),Te(l),Te(a),Te(t),Te(e),Te(o)),le(([d,c,h,[p,m],E,T,b,y,k])=>{const P=d-y,D=T+b,v=Math.max(h-P,0);let A=md;const N=bd(k,Ts),z=bd(k,xs);return p-=y,p+=h+b,m+=h+b,m-=y,p>d+D-N&&(A=Es),m<d-v+c+z&&(A=Qi),A!==md?[Math.max(P-h-gd(E,Ts,A)-N,0),P-v-b+c+gd(E,xs,A)+z]:null}),xe(d=>d!=null),it(gs)),[0,0]);return{increaseViewportBy:o,listBoundary:s,overscan:l,topListHeight:a,visibleRange:u}},st(zt),{singleton:!0});function fy(e,t,n){if(po(t)){const r=om(e,t);return[{index:Rn(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const Ho={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function wa(e,t,n,r,i,s){const{lastIndex:a,lastOffset:o,lastSize:l}=i;let u=0,d=0;if(e.length>0){u=e[0].offset;const E=e[e.length-1];d=E.offset+E.size}const c=n-a,h=o+c*l+(c-1)*r,p=u,m=h-d;return{bottom:d,firstItemIndex:s,items:Ed(e,i,s),offsetBottom:m,offsetTop:u,top:p,topItems:Ed(t,i,s),topListHeight:t.reduce((E,T)=>T.size+E,0),totalCount:n}}function fm(e,t,n,r,i,s){let a=0;if(n.groupIndices.length>0)for(const d of n.groupIndices){if(d-a>=e)break;a++}const o=e+a,l=Fu(t,o),u=Array.from({length:o}).map((d,c)=>({data:s[c+l],index:c+l,offset:0,size:0}));return wa(u,[],o,i,n,r)}function Ed(e,t,n){if(e.length===0)return[];if(!po(t))return e.map(u=>({...u,index:u.index+n,originalIndex:u.index}));const r=e[0].index,i=e[e.length-1].index,s=[],a=fi(t.groupOffsetTree,r,i);let o,l=0;for(const u of e){(!o||o.end<u.index)&&(o=a.shift(),l=t.groupIndices.indexOf(o.start));let d;u.index===o.start?d={index:l,type:"group"}:d={groupIndex:l,index:u.index-(l+1)+n},s.push({...d,data:u.data,offset:u.offset,originalIndex:u.index,size:u.size})}return s}function Td(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const Kr=We(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},s,{listBoundary:a,topListHeight:o,visibleRange:l},{initialTopMostItemIndex:u,scrolledToInitialItem:d},{topListHeight:c},h,{didMount:p},{recalcInProgress:m}])=>{const E=ie([]),T=ie(0),b=He(),y=ie(0);he(s.topItemsIndexes,E);const k=Lt(J(gt(p,m,Te(l,gs),Te(i),Te(r),Te(u),d,Te(E),Te(t),Te(n),Te(y),e),xe(([A,N,,z,,,,,,,,R])=>{const W=R&&R.length!==z;return A&&!N&&!W}),le(([,,[A,N],z,R,W,j,w,L,M,H,U])=>{var G,Q,_,se;const te=R,{offsetTree:S,sizeTree:ge}=te,pe=lt(T);if(z===0)return{...Ho,totalCount:z};if(A===0&&N===0)return pe===0?{...Ho,totalCount:z}:fm(pe,W,R,L,M,U||[]);if(Ze(ge))return pe>0?null:wa(fy(Fu(W,z),te,U),[],z,M,te,L);const me=[];if(w.length>0){const ze=w[0],Be=w[w.length-1];let nt=0;for(const Xe of fi(ge,ze,Be)){const Re=Xe.value,$e=Math.max(Xe.start,ze),Ye=Math.min(Xe.end,Be);for(let ut=$e;ut<=Ye;ut++)me.push({data:U==null?void 0:U[ut],index:ut,offset:nt,size:Re}),nt+=Re}}if(!j)return wa([],me,z,M,te,L);const qe=w.length>0?w[w.length-1]+1:0,X=ey(S,A,N,qe);if(X.length===0)return null;const ue=z-1,ke=ho([],ze=>{for(const Be of X){const nt=Be.value;let Xe=nt.offset,Re=Be.start;const $e=nt.size;if(nt.offset<A){Re+=Math.floor((A-nt.offset+M)/($e+M));const ut=Re-Be.start;Xe+=ut*$e+ut*M}Re<qe&&(Xe+=(qe-Re)*$e,Re=qe);const Ye=Math.min(Be.end,ue);for(let ut=Re;ut<=Ye&&!(Xe>=N);ut++)ze.push({data:U==null?void 0:U[ut],index:ut,offset:Xe,size:$e}),Xe+=$e+M}}),Me=Td(H,Ts),Ke=Td(H,xs);if(ke.length>0&&(Me>0||Ke>0)){const ze=ke[0],Be=ke[ke.length-1];if(Me>0&&ze.index>qe){const nt=Math.min(Me,ze.index-qe),Xe=[];let Re=ze.offset;for(let $e=ze.index-1;$e>=ze.index-nt;$e--){const Ye=(Q=(G=fi(ge,$e,$e)[0])==null?void 0:G.value)!=null?Q:ze.size;Re-=Ye+M,Xe.unshift({data:U==null?void 0:U[$e],index:$e,offset:Re,size:Ye})}ke.unshift(...Xe)}if(Ke>0&&Be.index<ue){const nt=Math.min(Ke,ue-Be.index);let Xe=Be.offset+Be.size+M;for(let Re=Be.index+1;Re<=Be.index+nt;Re++){const $e=(se=(_=fi(ge,Re,Re)[0])==null?void 0:_.value)!=null?se:Be.size;ke.push({data:U==null?void 0:U[Re],index:Re,offset:Xe,size:$e}),Xe+=$e+M}}}return wa(ke,me,z,M,te,L)}),xe(A=>A!==null),it()),Ho);he(J(e,xe(Ou),le(A=>A==null?void 0:A.length)),i),he(J(k,le(A=>A.topListHeight)),c),he(c,o),he(J(k,le(A=>[A.top,A.bottom])),a),he(J(k,le(A=>A.items)),b);const P=ln(J(k,xe(({items:A})=>A.length>0),ve(i,e),xe(([{items:A},N])=>A[A.length-1].originalIndex===N-1),le(([,A,N])=>[A-1,N]),it(gs),le(([A])=>A))),D=ln(J(k,Zn(200),xe(({items:A,topItems:N})=>A.length>0&&A[0].originalIndex===N.length),le(({items:A})=>A[0].index),it())),v=ln(J(k,xe(({items:A})=>A.length>0),le(({items:A})=>{let N=0,z=A.length-1;for(;A[N].type==="group"&&N<z;)N++;for(;A[z].type==="group"&&z>N;)z--;return{endIndex:A[z].index,startIndex:A[N].index}}),it(sm)));return{endReached:P,initialItemCount:T,itemsRendered:b,listState:k,minOverscanItemCount:y,rangeChanged:v,startReached:D,topItemsIndexes:E,...h}},st(Vn,um,Hu,Bs,Ms,Fs,kr,Pu),{singleton:!0}),hm=We(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{const s=He(),a=Lt(J(gt(n,e,r,t,i),le(([o,l,u,d,c])=>o+l+u+d+c.offsetBottom+c.bottom)),0);return he(Te(a),s),{totalListHeight:a,totalListHeightChanged:s}},st(zt,Kr),{singleton:!0}),hy=We(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ie(!1),r=Lt(J(gt(n,e,t),xe(([i])=>i),le(([,i,s])=>Math.max(0,i-s)),Zn(0),it()),0);return{alignToBottom:n,paddingTopAddition:r}},st(zt,hm),{singleton:!0}),pm=We(()=>({context:ie(null)})),py=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:s,viewportTop:a})=>t<a?{...i,align:n??"start",behavior:r}:e>s?{...i,align:n??"end",behavior:r}:null,mm=We(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:s,scrollingInProgress:a,scrollTop:o,viewportHeight:l},{scrollToIndex:u}])=>{const d=He();return he(J(d,ve(t,l,n,s,i,r,o),ve(e),le(([[c,h,p,m,E,T,b,y],k])=>{const{align:P,behavior:D,calculateViewLocation:v=py,done:A,...N}=c,z=lm(c,h,m-1),R=bs(z,h.offsetTree,k)+E+T,W=R+Rn(h.sizeTree,z)[1],j=y+T,w=y+p-b,L=v({itemBottom:W,itemTop:R,locationParams:{align:P,behavior:D,...N},viewportBottom:w,viewportTop:j});return L?A&&Cn(J(a,xe(M=>!M),Ur(lt(a)?1:2)),A):A==null||A(),L}),xe(c=>c!==null)),u),{scrollIntoView:d}},st(Vn,zt,Ms,Kr,_r),{singleton:!0});function xd(e){return e?e==="smooth"?"smooth":"auto":!1}const my=(e,t)=>typeof e=="function"?xd(e(t)):t&&xd(e),gy=We(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:s},{scrollToIndex:a},{scrolledToInitialItem:o},{didMount:l,propsReady:u},{log:d},{scrollingInProgress:c},{context:h},{scrollIntoView:p}])=>{const m=ie(!1),E=He();let T=null;function b(D){Ie(a,{align:"end",behavior:D,index:"LAST"})}Ge(J(gt(J(Te(t),Ur(1)),l),ve(Te(m),s,o,c),le(([[D,v],A,N,z,R])=>{let W=v&&z,j="auto";return W&&(j=my(A,N||R),W=W&&!!j),{followOutputBehavior:j,shouldFollow:W,totalCount:D}}),xe(({shouldFollow:D})=>D)),({followOutputBehavior:D,totalCount:v})=>{T&&(T(),T=null),lt(n)?requestAnimationFrame(()=>{lt(d)("following output to ",{totalCount:v},Gt.DEBUG),b(D)}):T=Cn(e,()=>{lt(d)("following output to ",{totalCount:v},Gt.DEBUG),b(D),T=null})});function y(D){const v=Cn(i,A=>{D&&!A.atBottom&&A.notAtBottomBecause==="SIZE_INCREASED"&&!T&&(lt(d)("scrolling to bottom due to increased size",{},Gt.DEBUG),b("auto"))});setTimeout(v,100)}Ge(J(gt(Te(m),t,u),xe(([D,,v])=>D&&v),Un(({value:D},[,v])=>({refreshed:D===v,value:v}),{refreshed:!1,value:0}),xe(({refreshed:D})=>D),ve(m,t)),([,D])=>{lt(o)&&y(D!==!1)}),Ge(E,()=>{y(lt(m)!==!1)}),Ge(gt(Te(m),i),([D,v])=>{D&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&b("auto")});const k=ie(null),P=He();return he(Sl(J(Te(r),le(D=>{var v;return(v=D==null?void 0:D.length)!=null?v:0})),J(Te(t))),P),Ge(J(gt(J(P,Ur(1)),l),ve(Te(k),o,c,h),le(([[D,v],A,N,z,R])=>v&&N&&(A==null?void 0:A({context:R,totalCount:D,scrollingInProgress:z}))),xe(D=>!!D),Zn(0)),D=>{T&&(T(),T=null),lt(n)?requestAnimationFrame(()=>{lt(d)("scrolling into view",{}),Ie(p,D)}):T=Cn(e,()=>{lt(d)("scrolling into view",{}),Ie(p,D),T=null})}),{autoscrollToBottom:E,followOutput:m,scrollIntoViewOnChange:k}},st(Vn,Fs,Ms,Bs,kr,_r,zt,pm,mm)),by=We(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:s,listState:a},{didMount:o}])=>(he(J(o,ve(s),xe(([,l])=>l!==0),ve(i,r,t,n,e),le(([[,l],u,d,c,h,p=[]])=>fm(l,u,d,c,h,p))),a),{}),st(Vn,Bs,Kr,kr),{singleton:!0}),Ey=We(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ie(0);return Ge(J(e,ve(r),xe(([,i])=>i!==0),le(([,i])=>({top:i}))),i=>{Cn(J(n,Ur(1),xe(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Ie(t,i)})})}),{initialScrollTop:r}},st(kr,zt,Kr),{singleton:!0}),gm=We(([{scrollVelocity:e}])=>{const t=ie(!1),n=He(),r=ie(!1);return he(J(e,ve(r,t,n),xe(([i,s])=>!!s),le(([i,s,a,o])=>{const{enter:l,exit:u}=s;if(a){if(u(i,o))return!1}else if(l(i,o))return!0;return a}),it()),t),Ge(J(gt(t,e,n),ve(r)),([[i,s,a],o])=>{i&&o&&o.change&&o.change(s,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},st(Fs),{singleton:!0}),Uu=We(([{scrollContainerState:e,scrollTo:t}])=>{const n=He(),r=He(),i=He(),s=ie(!1),a=ie(void 0);return he(J(gt(n,r),le(([{scrollHeight:o,scrollTop:l,viewportHeight:u},{offsetTop:d}])=>({scrollHeight:o,scrollTop:Math.max(0,l-d),viewportHeight:u}))),e),he(J(t,ve(r),le(([o,{offsetTop:l}])=>({...o,top:o.top+l}))),i),{customScrollParent:a,useWindowScroll:s,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},st(zt)),Ty=We(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:s},{useWindowScroll:a,windowScrollContainerState:o,windowViewportRect:l}])=>{const u=He(),d=ie(void 0),c=ie(null),h=ie(null);return he(o,c),he(l,h),Ge(J(u,ve(t,r,a,c,h,n)),([p,m,E,T,b,y,k])=>{const P=ny(m.sizeTree);T&&b!==null&&y!==null&&(E=b.scrollTop-y.offsetTop),E-=k,p({ranges:P,scrollTop:E})}),he(J(d,xe(Ou),le(xy)),i),he(J(s,ve(d),xe(([,p])=>p!==void 0),it(),le(([,p])=>p.ranges)),e),{getState:u,restoreStateFrom:d}},st(Vn,zt,Bs,kr,Uu));function xy(e){return{align:"start",index:0,offset:e.scrollTop}}const yy=We(([{topItemsIndexes:e}])=>{const t=ie(0);return he(J(t,xe(n=>n>=0),le(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},st(Kr));function bm(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const _y=bm(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),ky=We(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:s,lastJumpDueToItemResize:a,scrollDirection:o},{listState:l},{beforeUnshiftWith:u,gap:d,shiftWithOffset:c,sizes:h},{log:p},{recalcInProgress:m}])=>{const E=ln(J(l,ve(a),Un(([,b,y,k],[{bottom:P,items:D,offsetBottom:v,totalCount:A},N])=>{const z=P+v;let R=0;return y===A&&b.length>0&&D.length>0&&(D[0].originalIndex===0&&b[0].originalIndex===0||(R=z-k,R!==0&&(R+=N))),[R,D,A,z]},[0,[],0,0]),xe(([b])=>b!==0),ve(r,o,n,i,p,m),xe(([,b,y,k,,,P])=>!P&&!k&&b!==0&&y===Es),le(([[b],,,,,y])=>(y("Upward scrolling compensation",{amount:b},Gt.DEBUG),b))));function T(b){b>0?(Ie(t,{behavior:"auto",top:-b}),Ie(e,0)):(Ie(e,0),Ie(t,{behavior:"auto",top:-b}))}return Ge(J(E,ve(e,s)),([b,y,k])=>{k&&_y()?Ie(e,y-b):T(-b)}),Ge(J(gt(Lt(s,!1),e,m),xe(([b,y,k])=>!b&&!k&&y!==0),le(([b,y])=>y),Zn(1)),T),he(J(c,le(b=>({top:-b}))),t),Ge(J(u,ve(h,d),le(([b,{groupIndices:y,lastSize:k,sizeTree:P},D])=>{function v(A){return A*(k+D)}if(y.length===0)return v(b);{let A=0;const N=ms(P,0);let z=0,R=0;for(;z<b;){z++,A+=N;let W=y.length===R+1?1/0:y[R+1]-y[R]-1;z+W>b&&(A-=N,W=b-z+1),z+=W,A+=v(W),R++}return A}})),b=>{Ie(e,b),requestAnimationFrame(()=>{Ie(t,{top:b}),requestAnimationFrame(()=>{Ie(e,0),Ie(m,!1)})})}),{deviation:e}},st(zt,Fs,Kr,Vn,_r,Pu)),wy=We(([e,t,n,r,i,s,a,o,l,u,d])=>({...e,...t,...n,...r,...i,...s,...a,...o,...l,...u,...d}),st(Hu,by,kr,gm,hm,Ey,hy,Uu,mm,_r,pm)),Em=We(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:s,groupIndices:a,heightEstimates:o,itemSize:l,sizeRanges:u,sizes:d,statefulTotalCount:c,totalCount:h,trackItemSizes:p},{initialItemFinalLocationReached:m,initialTopMostItemIndex:E,scrolledToInitialItem:T},b,y,k,P,{scrollToIndex:D},v,{topItemCount:A},{groupCounts:N},z])=>{const{listState:R,minOverscanItemCount:W,topItemsIndexes:j,rangeChanged:w,...L}=P;return he(w,z.scrollSeekRangeChanged),he(J(z.windowViewportRect,le(M=>M.visibleHeight)),b.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:s,groupCounts:N,heightEstimates:o,initialItemFinalLocationReached:m,initialTopMostItemIndex:E,scrolledToInitialItem:T,sizeRanges:u,topItemCount:A,topItemsIndexes:j,totalCount:h,...k,groupIndices:a,itemSize:l,listState:R,minOverscanItemCount:W,scrollToIndex:D,statefulTotalCount:c,trackItemSizes:p,rangeChanged:w,...L,...z,...b,sizes:d,...y}},st(Vn,Bs,zt,Ty,gy,Kr,Ms,ky,yy,um,wy));function Cy(e,t){const n={},r={};let i=0;const s=e.length;for(;i<s;)r[e[i]]=1,i+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const sa=typeof document<"u"?F.useLayoutEffect:F.useEffect;function Tm(e,t,n){const r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),o=F.createContext({});function l(T,b){T.propsReady&&Ie(T.propsReady,!1);for(const y of r){const k=T[t.required[y]];Ie(k,b[y])}for(const y of i)if(y in b){const k=T[t.optional[y]];Ie(k,b[y])}T.propsReady&&Ie(T.propsReady,!0)}function u(T){return s.reduce((b,y)=>(b[y]=k=>{const P=T[t.methods[y]];Ie(P,k)},b),{})}function d(T){return a.reduce((b,y)=>(b[y]=jx(T[t.events[y]]),b),{})}const c=F.forwardRef((T,b)=>{const{children:y,...k}=T,[P]=F.useState(()=>ho($x(e),A=>{l(A,k)})),[D]=F.useState(cd(d,P));sa(()=>{for(const A of a)A in k&&Ge(D[A],k[A]);return()=>{Object.values(D).map(Lu)}},[k,D,P]),sa(()=>{l(P,k)}),F.useImperativeHandle(b,ud(u(P)));const v=n;return g.jsx(o.Provider,{value:P,children:n?g.jsx(v,{...Cy([...r,...i,...a],k),children:y}):y})}),h=T=>{const b=F.useContext(o);return F.useCallback(y=>{Ie(b[T],y)},[b,T])},p=T=>{const b=F.useContext(o)[T],y=F.useCallback(k=>Ge(b,k),[b]);return F.useSyncExternalStore(y,()=>lt(b),()=>lt(b))},m=T=>{const b=F.useContext(o)[T],[y,k]=F.useState(cd(lt,b));return sa(()=>Ge(b,P=>{P!==y&&k(ud(P))}),[b,y]),y},E=F.version.startsWith("18")?p:m;return{Component:c,useEmitter:(T,b)=>{const y=F.useContext(o)[T];sa(()=>Ge(y,b),[b,y])},useEmitterValue:E,usePublisher:h}}const xm=F.createContext(void 0),ym=F.createContext(void 0),_m=typeof document<"u"?F.useLayoutEffect:F.useEffect;function Uo(e){return"self"in e}function Ay(e){return"body"in e}function km(e,t,n,r=wi,i,s){const a=F.useRef(null),o=F.useRef(null),l=F.useRef(null),u=F.useCallback(h=>{let p,m,E;const T=h.target;if(Ay(T)||Uo(T)){const y=Uo(T)?T:T.defaultView;E=s?y.scrollX:y.scrollY,p=s?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,m=s?y.innerWidth:y.innerHeight}else E=s?T.scrollLeft:T.scrollTop,p=s?T.scrollWidth:T.scrollHeight,m=s?T.offsetWidth:T.offsetHeight;const b=()=>{e({scrollHeight:p,scrollTop:Math.max(E,0),viewportHeight:m})};h.suppressFlushSync?b():qh.flushSync(b),o.current!==null&&(E===o.current||E<=0||E===p-m)&&(o.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,s]);F.useEffect(()=>{const h=i||a.current;return r(i||a.current),u({suppressFlushSync:!0,target:h}),h.addEventListener("scroll",u,{passive:!0}),()=>{r(null),h.removeEventListener("scroll",u)}},[a,u,n,r,i]);function d(h){const p=a.current;if(!p||(s?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const m=h.behavior==="smooth";let E,T,b;Uo(p)?(T=Math.max(br(p.document.documentElement,s?"width":"height"),s?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),E=s?p.innerWidth:p.innerHeight,b=s?window.scrollX:window.scrollY):(T=p[s?"scrollWidth":"scrollHeight"],E=br(p,s?"width":"height"),b=p[s?"scrollLeft":"scrollTop"]);const y=T-E;if(h.top=Math.ceil(Math.max(Math.min(y,h.top),0)),dm(E,T)||h.top===b){e({scrollHeight:T,scrollTop:b,viewportHeight:E}),m&&t(!0);return}m?(o.current=h.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,o.current=null,t(!0)},1e3)):o.current=null,s&&(h={behavior:h.behavior,left:h.top}),p.scrollTo(h)}function c(h){s&&(h={behavior:h.behavior,left:h.top}),a.current.scrollBy(h)}return{scrollByCallback:c,scrollerRef:a,scrollToCallback:d}}const jo="-webkit-sticky",yd="sticky",ju=bm(()=>{if(typeof document>"u")return yd;const e=document.createElement("div");return e.style.position=jo,e.style.position===jo?jo:yd});function zu(e){return e}const Sy=We(()=>{const e=ie(o=>`Item ${o}`),t=ie(o=>`Group ${o}`),n=ie({}),r=ie(zu),i=ie("div"),s=ie(wi),a=(o,l=null)=>Lt(J(n,le(u=>u[o]),it()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:i,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),Iy=We(([e,t])=>({...e,...t}),st(Em,Sy)),vy=({height:e})=>g.jsx("div",{style:{height:e}}),Ry={overflowAnchor:"none",position:ju(),zIndex:1},wm={overflowAnchor:"none"},Ny={...wm,display:"inline-block",height:"100%"},_d=F.memo(function({showTopList:e=!1}){const t=_e("listState"),n=gn("sizeRanges"),r=_e("useWindowScroll"),i=_e("customScrollParent"),s=gn("windowScrollContainerState"),a=gn("scrollContainerState"),o=i||r?s:a,l=_e("itemContent"),u=_e("context"),d=_e("groupContent"),c=_e("trackItemSizes"),h=_e("itemSize"),p=_e("log"),m=gn("gap"),E=_e("horizontalDirection"),{callbackRef:T}=Yx(n,h,c,e?wi:o,p,m,i,E,_e("skipAnimationFrameInResizeObserver")),[b,y]=F.useState(0);$u("deviation",L=>{b!==L&&y(L)});const k=_e("EmptyPlaceholder"),P=_e("ScrollSeekPlaceholder")||vy,D=_e("ListComponent"),v=_e("ItemComponent"),A=_e("GroupComponent"),N=_e("computeItemKey"),z=_e("isSeeking"),R=_e("groupIndices").length>0,W=_e("alignToBottom"),j=_e("initialItemFinalLocationReached"),w=e?{}:{boxSizing:"border-box",...E?{display:"inline-block",height:"100%",marginLeft:b!==0?b:W?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:b!==0?b:W?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...j?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&k?g.jsx(k,{...Ot(k,u)}):g.jsx(D,{...Ot(D,u),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:T,style:w,children:(e?t.topItems:t.items).map(L=>{const M=L.originalIndex,H=N(M+t.firstItemIndex,L.data,u);return z?x.createElement(P,{...Ot(P,u),height:L.size,index:L.index,key:H,type:L.type||"item",...L.type==="group"?{}:{groupIndex:L.groupIndex}}):L.type==="group"?x.createElement(A,{...Ot(A,u),"data-index":M,"data-item-index":L.index,"data-known-size":L.size,key:H,style:Ry},d(L.index,u)):x.createElement(v,{...Ot(v,u),...Py(v,L.data),"data-index":M,"data-item-group-index":L.groupIndex,"data-item-index":L.index,"data-known-size":L.size,key:H,style:E?Ny:wm},R?l(L.index,L.groupIndex,L.data,u):l(L.index,L.data,u))})})}),Oy={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ly={outline:"none",overflowX:"auto",position:"relative"},mo=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),Dy={position:ju(),top:0,width:"100%",zIndex:1};function Ot(e,t){if(typeof e!="string")return{context:t}}function Py(e,t){return{item:typeof e=="string"?void 0:t}}const My=F.memo(function(){const e=_e("HeaderComponent"),t=gn("headerHeight"),n=_e("HeaderFooterTag"),r=qr(F.useMemo(()=>s=>{t(br(s,"height"))},[t]),!0,_e("skipAnimationFrameInResizeObserver")),i=_e("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Ot(e,i)})}):null}),By=F.memo(function(){const e=_e("FooterComponent"),t=gn("footerHeight"),n=_e("HeaderFooterTag"),r=qr(F.useMemo(()=>s=>{t(br(s,"height"))},[t]),!0,_e("skipAnimationFrameInResizeObserver")),i=_e("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Ot(e,i)})}):null});function Cm({useEmitter:e,useEmitterValue:t,usePublisher:n}){return F.memo(function({children:r,style:i,context:s,...a}){const o=n("scrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),d=t("scrollerRef"),c=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:m}=km(o,u,l,d,void 0,c);return e("scrollTo",m),e("scrollBy",h),g.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...c?Ly:Oy,...i},tabIndex:0,...a,...Ot(l,s),children:r})})}function Am({useEmitter:e,useEmitterValue:t,usePublisher:n}){return F.memo(function({children:r,style:i,context:s,...a}){const o=n("windowScrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),d=t("totalListHeight"),c=t("deviation"),h=t("customScrollParent"),p=F.useRef(null),m=t("scrollerRef"),{scrollByCallback:E,scrollerRef:T,scrollToCallback:b}=km(o,u,l,m,h);return _m(()=>{var y;return T.current=h||((y=p.current)==null?void 0:y.ownerDocument.defaultView),()=>{T.current=null}},[T,h]),e("windowScrollTo",b),e("scrollBy",E),g.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...d!==0?{height:d+c}:{}},...a,...Ot(l,s),children:r})})}const Fy=({children:e})=>{const t=F.useContext(xm),n=gn("viewportHeight"),r=gn("fixedItemHeight"),i=_e("alignToBottom"),s=_e("horizontalDirection"),a=F.useMemo(()=>Qp(n,l=>br(l,s?"width":"height")),[n,s]),o=qr(a,!0,_e("skipAnimationFrameInResizeObserver"));return F.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:o,style:mo(i),children:e})},Hy=({children:e})=>{const t=F.useContext(xm),n=gn("windowViewportRect"),r=gn("fixedItemHeight"),i=_e("customScrollParent"),s=Jp(n,i,_e("skipAnimationFrameInResizeObserver")),a=_e("alignToBottom");return F.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:s,style:mo(a),children:e})},Uy=({children:e})=>{const t=_e("TopItemListComponent")||"div",n=_e("headerHeight"),r={...Dy,marginTop:`${n}px`},i=_e("context");return g.jsx(t,{style:r,...Ot(t,i),children:e})},jy=F.memo(function(e){const t=_e("useWindowScroll"),n=_e("topItemsIndexes").length>0,r=_e("customScrollParent"),i=_e("context");return g.jsxs(r||t?Vy:$y,{...e,context:i,children:[n&&g.jsx(Uy,{children:g.jsx(_d,{showTopList:!0})}),g.jsxs(r||t?Hy:Fy,{children:[g.jsx(My,{}),g.jsx(_d,{}),g.jsx(By,{})]})]})}),{Component:zy,useEmitter:$u,useEmitterValue:_e,usePublisher:gn}=Tm(Iy,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},jy),$y=Cm({useEmitter:$u,useEmitterValue:_e,usePublisher:gn}),Vy=Am({useEmitter:$u,useEmitterValue:_e,usePublisher:gn}),Wy=zy,Yy=We(()=>{const e=ie(u=>g.jsxs("td",{children:["Item $",u]})),t=ie(null),n=ie(u=>g.jsxs("td",{colSpan:1e3,children:["Group ",u]})),r=ie(null),i=ie(null),s=ie({}),a=ie(zu),o=ie(wi),l=(u,d=null)=>Lt(J(s,le(c=>c[u]),it()),d);return{components:s,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}});st(Em,Yy);ju();const kd={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},Gy={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:wd,floor:ja,max:Zi,min:zo,round:Cd}=Math;function Ad(e,t,n){return Array.from({length:t-e+1}).map((r,i)=>({data:n===null?null:n[i+e],index:i+e}))}function qy(e){return{...Gy,items:e}}function aa(e,t){return e&&e.width===t.width&&e.height===t.height}function Ky(e,t){return e&&e.column===t.column&&e.row===t.row}const Xy=We(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:s,scrollBy:a,scrollContainerState:o,scrollTo:l,scrollTop:u,smoothScrollTargetReached:d,viewportHeight:c},h,p,{didMount:m,propsReady:E},{customScrollParent:T,useWindowScroll:b,windowScrollContainerState:y,windowScrollTo:k,windowViewportRect:P},D])=>{const v=ie(0),A=ie(0),N=ie(kd),z=ie({height:0,width:0}),R=ie({height:0,width:0}),W=He(),j=He(),w=ie(0),L=ie(null),M=ie({column:0,row:0}),H=He(),U=He(),G=ie(!1),Q=ie(0),_=ie(!0),se=ie(!1),te=ie(!1);Ge(J(m,ve(Q),xe(([X,ue])=>!!ue)),()=>{Ie(_,!1)}),Ge(J(gt(m,_,R,z,Q,se),xe(([X,ue,ke,Me,,Ke])=>X&&!ue&&ke.height!==0&&Me.height!==0&&!Ke)),([,,,,X])=>{Ie(se,!0),Bu(1,()=>{Ie(W,X)}),Cn(J(u),()=>{Ie(t,[0,0]),Ie(_,!0)})}),he(J(U,xe(X=>X!=null&&X.scrollTop>0),Bn(0)),A),Ge(J(m,ve(U),xe(([,X])=>X!=null)),([,X])=>{X&&(Ie(z,X.viewport),Ie(R,X.item),Ie(M,X.gap),X.scrollTop>0&&(Ie(G,!0),Cn(J(u,Ur(1)),ue=>{Ie(G,!1)}),Ie(l,{top:X.scrollTop})))}),he(J(z,le(({height:X})=>X)),c),he(J(gt(Te(z,aa),Te(R,aa),Te(M,(X,ue)=>X&&X.column===ue.column&&X.row===ue.row),Te(u)),le(([X,ue,ke,Me])=>({gap:ke,item:ue,scrollTop:Me,viewport:X}))),H),he(J(gt(Te(v),r,Te(M,Ky),Te(R,aa),Te(z,aa),Te(L),Te(A),Te(G),Te(_),Te(Q)),xe(([,,,,,,,X])=>!X),le(([X,[ue,ke],Me,Ke,ze,Be,nt,,Xe,Re])=>{const{column:$e,row:Ye}=Me,{height:ut,width:Cr}=Ke,{width:_t}=ze;if(nt===0&&(X===0||_t===0))return kd;if(Cr===0){const St=Fu(Re,X),vt=St+Math.max(nt-1,0);return qy(Ad(St,vt,Be))}const Kt=Sm(_t,Cr,$e);let On,xn;Xe?ue===0&&ke===0&&nt>0?(On=0,xn=nt-1):(On=Kt*ja((ue+Ye)/(ut+Ye)),xn=Kt*wd((ke+Ye)/(ut+Ye))-1,xn=zo(X-1,Zi(xn,Kt-1)),On=zo(xn,Zi(0,On))):(On=0,xn=-1);const q=Ad(On,xn,Be),{bottom:ae,top:Ee}=Sd(ze,Me,Ke,q),we=wd(X/Kt),De=we*ut+(we-1)*Ye-ae;return{bottom:ae,itemHeight:ut,items:q,itemWidth:Cr,offsetBottom:De,offsetTop:Ee,top:Ee}})),N),he(J(L,xe(X=>X!==null),le(X=>X.length)),v),he(J(gt(z,R,N,M),xe(([X,ue,{items:ke}])=>ke.length>0&&ue.height!==0&&X.height!==0),le(([X,ue,{items:ke},Me])=>{const{bottom:Ke,top:ze}=Sd(X,Me,ue,ke);return[ze,Ke]}),it(gs)),t);const S=ie(!1);he(J(u,ve(S),le(([X,ue])=>ue||X!==0)),S);const ge=ln(J(gt(N,v),xe(([{items:X}])=>X.length>0),ve(S),xe(([[X,ue],ke])=>{const Me=X.items[X.items.length-1].index===ue-1;return(ke||X.bottom>0&&X.itemHeight>0&&X.offsetBottom===0&&X.items.length===ue)&&Me}),le(([[,X]])=>X-1),it())),pe=ln(J(Te(N),xe(({items:X})=>X.length>0&&X[0].index===0),Bn(0),it())),me=ln(J(Te(N),ve(G),xe(([{items:X},ue])=>X.length>0&&!ue),le(([{items:X}])=>({endIndex:X[X.length-1].index,startIndex:X[0].index})),it(sm),Zn(0)));he(me,p.scrollSeekRangeChanged),he(J(W,ve(z,R,v,M),le(([X,ue,ke,Me,Ke])=>{const ze=cm(X),{align:Be,behavior:nt,offset:Xe}=ze;let Re=ze.index;Re==="LAST"&&(Re=Me-1),Re=Zi(0,Re,zo(Me-1,Re));let $e=Ol(ue,Ke,ke,Re);return Be==="end"?$e=Cd($e-ue.height+ke.height):Be==="center"&&($e=Cd($e-ue.height/2+ke.height/2)),Xe&&($e+=Xe),{behavior:nt,top:$e}})),l);const qe=Lt(J(N,le(X=>X.offsetBottom+X.bottom)),0);return he(J(P,le(X=>({height:X.visibleHeight,width:X.visibleWidth}))),z),{customScrollParent:T,data:L,deviation:w,footerHeight:i,gap:M,headerHeight:s,increaseViewportBy:e,initialItemCount:A,itemDimensions:R,overscan:n,restoreStateFrom:U,scrollBy:a,scrollContainerState:o,scrollHeight:j,scrollTo:l,scrollToIndex:W,scrollTop:u,smoothScrollTargetReached:d,totalCount:v,useWindowScroll:b,viewportDimensions:z,windowScrollContainerState:y,windowScrollTo:k,windowViewportRect:P,...p,gridState:N,horizontalDirection:te,initialTopMostItemIndex:Q,totalListHeight:qe,...h,endReached:ge,propsReady:E,rangeChanged:me,startReached:pe,stateChanged:H,stateRestoreInProgress:G,...D}},st(Hu,zt,Fs,gm,kr,Uu,_r));function Sm(e,t,n){return Zi(1,ja((e+n)/(ja(t)+n)))}function Sd(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};const s=Ol(e,t,n,r[0].index);return{bottom:Ol(e,t,n,r[r.length-1].index)+i,top:s}}function Ol(e,t,n,r){const i=Sm(e.width,n.width,t.column),s=ja(r/i),a=s*n.height+Zi(0,s-1)*t.row;return a>0?a+t.row:a}const Qy=We(()=>{const e=ie(c=>`Item ${c}`),t=ie({}),n=ie(null),r=ie("virtuoso-grid-item"),i=ie("virtuoso-grid-list"),s=ie(zu),a=ie("div"),o=ie(wi),l=(c,h=null)=>Lt(J(t,le(p=>p[c]),it()),h),u=ie(!1),d=ie(!1);return he(Te(d),u),{components:t,computeItemKey:s,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:i,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:d,ScrollerComponent:l("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),Zy=We(([e,t])=>({...e,...t}),st(Xy,Qy)),Jy=F.memo(function(){const e=ot("gridState"),t=ot("listClassName"),n=ot("itemClassName"),r=ot("itemContent"),i=ot("computeItemKey"),s=ot("isSeeking"),a=bn("scrollHeight"),o=ot("ItemComponent"),l=ot("ListComponent"),u=ot("ScrollSeekPlaceholder"),d=ot("context"),c=bn("itemDimensions"),h=bn("gap"),p=ot("log"),m=ot("stateRestoreInProgress"),E=bn("reportReadyState"),T=qr(F.useMemo(()=>b=>{const y=b.parentElement.parentElement.scrollHeight;a(y);const k=b.firstChild;if(k){const{height:P,width:D}=k.getBoundingClientRect();c({height:P,width:D})}h({column:Id("column-gap",getComputedStyle(b).columnGap,p),row:Id("row-gap",getComputedStyle(b).rowGap,p)})},[a,c,h,p]),!0,!1);return _m(()=>{e.itemHeight>0&&e.itemWidth>0&&E(!0)},[e]),m?null:g.jsx(l,{className:t,ref:T,...Ot(l,d),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(b=>{const y=i(b.index,b.data,d);return s?g.jsx(u,{...Ot(u,d),height:e.itemHeight,index:b.index,width:e.itemWidth},y):x.createElement(o,{...Ot(o,d),className:n,"data-index":b.index,key:y},r(b.index,b.data,d))})})}),e2=F.memo(function(){const e=ot("HeaderComponent"),t=bn("headerHeight"),n=ot("headerFooterTag"),r=qr(F.useMemo(()=>s=>{t(br(s,"height"))},[t]),!0,!1),i=ot("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Ot(e,i)})}):null}),t2=F.memo(function(){const e=ot("FooterComponent"),t=bn("footerHeight"),n=ot("headerFooterTag"),r=qr(F.useMemo(()=>s=>{t(br(s,"height"))},[t]),!0,!1),i=ot("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...Ot(e,i)})}):null}),n2=({children:e})=>{const t=F.useContext(ym),n=bn("itemDimensions"),r=bn("viewportDimensions"),i=qr(F.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]),!0,!1);return F.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),g.jsx("div",{ref:i,style:mo(!1),children:e})},r2=({children:e})=>{const t=F.useContext(ym),n=bn("windowViewportRect"),r=bn("itemDimensions"),i=ot("customScrollParent"),s=Jp(n,i,!1);return F.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),g.jsx("div",{ref:s,style:mo(!1),children:e})},i2=F.memo(function({...e}){const t=ot("useWindowScroll"),n=ot("customScrollParent"),r=n||t?a2:s2,i=n||t?r2:n2,s=ot("context");return g.jsx(r,{...e,...Ot(r,s),children:g.jsxs(i,{children:[g.jsx(e2,{}),g.jsx(Jy,{}),g.jsx(t2,{})]})})}),{useEmitter:Im,useEmitterValue:ot,usePublisher:bn}=Tm(Zy,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},i2),s2=Cm({useEmitter:Im,useEmitterValue:ot,usePublisher:bn}),a2=Am({useEmitter:Im,useEmitterValue:ot,usePublisher:bn});function Id(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Gt.WARN),t==="normal"?0:parseInt(t??"0",10)}const o2="modulepreload",l2=function(e){return"/"+e},vd={},ys=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let a=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=a(n.map(u=>{if(u=l2(u),u in vd)return;vd[u]=!0;const d=u.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":o2,d||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),d)return new Promise((p,m)=>{h.addEventListener("load",p),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return t().catch(s)})};function u2(e){const t=d2(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let i=0;i<n.byteLength;i++)r.setUint8(i,t.charCodeAt(i));return n}const c2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function d2(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let i=0;i<e.length;i++)n<<=6,n|=c2.indexOf(e[i]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const f2=-1,h2=-2,p2=-3,m2=-4,g2=-5,b2=-6,E2=-7;function T2(e,t){return vm(JSON.parse(e),t)}function vm(e,t){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);let i=null;function s(a,o=!1){if(a===f2)return;if(a===p2)return NaN;if(a===m2)return 1/0;if(a===g2)return-1/0;if(a===b2)return-0;if(o||typeof a!="number")throw new Error("Invalid input");if(a in r)return r[a];const l=n[a];if(!l||typeof l!="object")r[a]=l;else if(Array.isArray(l))if(typeof l[0]=="string"){const u=l[0],d=t&&Object.hasOwn(t,u)?t[u]:void 0;if(d){let c=l[1];if(typeof c!="number"&&(c=n.push(l[1])-1),i??(i=new Set),i.has(c))throw new Error("Invalid circular reference");return i.add(c),r[a]=d(s(c)),i.delete(c),r[a]}switch(u){case"Date":r[a]=new Date(l[1]);break;case"Set":const c=new Set;r[a]=c;for(let m=1;m<l.length;m+=1)c.add(s(l[m]));break;case"Map":const h=new Map;r[a]=h;for(let m=1;m<l.length;m+=2)h.set(s(l[m]),s(l[m+1]));break;case"RegExp":r[a]=new RegExp(l[1],l[2]);break;case"Object":r[a]=Object(l[1]);break;case"BigInt":r[a]=BigInt(l[1]);break;case"null":const p=Object.create(null);r[a]=p;for(let m=1;m<l.length;m+=2)p[l[m]]=s(l[m+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{if(n[l[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const m=globalThis[u],E=s(l[1]),T=new m(E);r[a]=l[2]!==void 0?T.subarray(l[2],l[3]):T;break}case"ArrayBuffer":{const m=l[1];if(typeof m!="string")throw new Error("Invalid ArrayBuffer encoding");const E=u2(m);r[a]=E;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const m=u.slice(9);r[a]=Temporal[m].from(l[1]);break}case"URL":{const m=new URL(l[1]);r[a]=m;break}case"URLSearchParams":{const m=new URLSearchParams(l[1]);r[a]=m;break}default:throw new Error(`Unknown type ${u}`)}}else if(l[0]===E2){const u=l[1],d=new Array(u);r[a]=d;for(let c=2;c<l.length;c+=2){const h=l[c];d[h]=s(l[c+1])}}else{const u=new Array(l.length);r[a]=u;for(let d=0;d<l.length;d+=1){const c=l[d];c!==h2&&(u[d]=s(c))}}else{const u={};r[a]=u;for(const d of Object.keys(l)){if(d==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const c=l[d];u[d]=s(c)}}return r[a]}return s(0)}const _s={DEVALUE_V1:"devl",ENCRYPTED:"encr"},oi=4;new TextEncoder;const Rm=new TextDecoder;function Vu(e){if(!(e instanceof Uint8Array))return{format:_s.DEVALUE_V1,payload:new TextEncoder().encode(JSON.stringify(e))};if(e.length<oi)throw new Error(`Data too short to contain format prefix: expected at least ${oi} bytes, got ${e.length}`);const t=e.subarray(0,oi),n=Rm.decode(t),r=Object.values(_s);if(!r.includes(n))throw new Error(`Unknown serialization format: "${n}". Known formats: ${r.join(", ")}`);const i=e.subarray(oi);return{format:n,payload:i}}function ks(e){return!(e instanceof Uint8Array)||e.length<oi?!1:Rm.decode(e.subarray(0,oi))===_s.ENCRYPTED}function sn(e,t){if(e instanceof Uint8Array){if(ks(e))return e;const{format:n,payload:r}=Vu(e);if(n===_s.DEVALUE_V1){const i=new TextDecoder().decode(r);return T2(i,t)}throw new Error(`Unsupported serialization format: ${n}`)}return Array.isArray(e)?vm(e,t):e}async function x2(e,t,n){if(e instanceof Uint8Array&&ks(e)&&n){const{decrypt:r}=await ys(async()=>{const{decrypt:a}=await import("./encryption-8OvC6eoJ.js");return{decrypt:a}},[]),{payload:i}=Vu(e),s=await r(n,i);return sn(s,t)}return sn(e,t)}const $o="strm_",Nm="__workflow_stream_ref__",Om="__workflow_class_instance_ref__";class Lm{constructor(t,n,r){Ve(this,"className");Ve(this,"classId");Ve(this,"data");Ve(this,"__type",Om);this.className=t,this.classId=n,this.data=r}toJSON(){return{__type:this.__type,className:this.className,classId:this.classId,data:this.data}}}const Ca=e=>{let t;if("name"in e){const n=String(e.name);n.startsWith($o)?t=n:t=`${$o}${n}`}else t=`${$o}null`;return{__type:Nm,streamId:t}},Dm=e=>!e||typeof e!="object"?"null":"stepId"in e?`<step:${e.stepId}>`:"<function>",ws=e=>{if(!e)return"Unknown";const t=e.split("/");return t[t.length-1]||e},Pm=e=>new Lm(ws(e.classId),e.classId,e.data),Mm=e=>`<class:${ws(e.classId)}>`,Bm={ReadableStream:Ca,WritableStream:Ca,TransformStream:Ca,StepFunction:Dm,Instance:Pm,Class:Mm};function y2(e,t){let n=e.input,r=e.output;if(e.input!=null)try{n=sn(e.input,t)}catch{}if(e.output!=null)try{r=sn(e.output,t)}catch{}return{...e,input:n,output:r}}function _2(e,t){let n=e.input,r=e.output;if(e.input!=null)try{n=sn(e.input,t)}catch{}if(e.output!=null)try{r=sn(e.output,t)}catch{}return{...e,input:n,output:r}}function k2(e,t){if(!e.eventData)return e;const n={...e.eventData};if("result"in n&&n.result!=null)try{n.result=sn(n.result,t)}catch{}if("input"in n&&n.input!=null)try{n.input=sn(n.input,t)}catch{}if("output"in n&&n.output!=null)try{n.output=sn(n.output,t)}catch{}if("metadata"in n&&n.metadata!=null)try{n.metadata=sn(n.metadata,t)}catch{}if("payload"in n&&n.payload!=null)try{n.payload=sn(n.payload,t)}catch{}return{...e,eventData:n}}function w2(e,t){if(e.metadata==null)return e;let n=e.metadata;try{n=sn(e.metadata,t)}catch{}return{...e,metadata:n}}function Fm(e,t){if(!e)return e;let n;if("stepId"in e?n=y2(e,t):"hookId"in e?n=w2(e,t):"eventId"in e?n=k2(e,t):n=_2(e,t),"executionContext"in n){const{executionContext:r,...i}=n,s=r&&typeof r=="object"&&"workflowCoreVersion"in r?r.workflowCoreVersion:void 0;return s?{...i,workflowCoreVersion:s}:i}return n}const C2=Object.freeze(Object.defineProperty({__proto__:null,CLASS_INSTANCE_REF_TYPE:Om,ClassInstanceRef:Lm,STREAM_REF_TYPE:Nm,SerializationFormat:_s,decodeFormatPrefix:Vu,extractClassName:ws,hydrateData:sn,hydrateDataWithKey:x2,hydrateResourceIO:Fm,isEncryptedData:ks,observabilityRevivers:Bm,serializedClassToString:Mm,serializedInstanceToRef:Pm,serializedStepFunctionToString:Dm,streamToStreamRef:Ca},Symbol.toStringTag,{value:"Module"}));function A2(e){if(e===""||e===".")return new ArrayBuffer(0);const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}function S2(){function e(t){return A2(t)}return{...Bm,ArrayBuffer:e,BigInt:t=>BigInt(t),BigInt64Array:t=>new BigInt64Array(e(t)),BigUint64Array:t=>new BigUint64Array(e(t)),Date:t=>new Date(t),Error:t=>{const n=new Error(t.message);return n.name=t.name,n.stack=t.stack,n},Float32Array:t=>new Float32Array(e(t)),Float64Array:t=>new Float64Array(e(t)),Int8Array:t=>new Int8Array(e(t)),Int16Array:t=>new Int16Array(e(t)),Int32Array:t=>new Int32Array(e(t)),Map:t=>new Map(t),RegExp:t=>new RegExp(t.source,t.flags),Set:t=>new Set(t),Uint8Array:t=>new Uint8Array(e(t)),Uint8ClampedArray:t=>new Uint8ClampedArray(e(t)),Uint16Array:t=>new Uint16Array(e(t)),Uint32Array:t=>new Uint32Array(e(t)),Headers:t=>new Headers(t),URL:t=>new URL(t),URLSearchParams:t=>new URLSearchParams(t==="."?"":t),Class:t=>`<class:${ws(t.classId)}>`,Instance:t=>{const n=ws(t.classId),r=t.data,i=r&&typeof r=="object"?{...r}:{value:r},s={[n]:function(){}}[n],a=Object.create(s.prototype);return Object.assign(a,i),a}}}let Vo=null;function Hm(){return Vo||(Vo=S2()),Vo}function oM(e){const t=Fm(e,Hm());return v2(t)}const za="Encrypted";function Rd(e){const t={[za]:function(){}}[za],n=Object.create(t.prototype);return Object.defineProperty(n,"__encryptedData",{value:e,enumerable:!1,configurable:!1}),n}function I2(e){var t;return e!==null&&typeof e=="object"&&((t=e.constructor)==null?void 0:t.name)===za}function v2(e){if(!e||typeof e!="object")return e;const n={...e};for(const r of["input","output","metadata","error"])ks(n[r])&&(n[r]=Rd(n[r]));if(n.eventData&&typeof n.eventData=="object"){const r={...n.eventData};for(const i of Um)ks(r[i])&&(r[i]=Rd(r[i]));n.eventData=r}return n}const Um=["result","input","output","metadata","payload"];async function lM(e,t){const{hydrateDataWithKey:n}=await ys(async()=>{const{hydrateDataWithKey:u}=await Promise.resolve().then(()=>C2);return{hydrateDataWithKey:u}},void 0),{importKey:r}=await ys(async()=>{const{importKey:u}=await import("./encryption-8OvC6eoJ.js");return{importKey:u}},[]),i=await r(t),s=Hm();async function a(u,d,c){if(I2(u)){const h=u.__encryptedData;return n(h,d,c)}return u instanceof Uint8Array?n(u,d,c):u}const l={...e};for(const u of["input","output","metadata","error"])u in l&&(l[u]=await a(l[u],s,i));if(l.eventData&&typeof l.eventData=="object"){const u={...l.eventData};for(const d of Um)d in u&&(u[d]=await a(u[d],s,i));l.eventData=u}return l}var R2=Object.create,Wu=Object.defineProperty,N2=Object.getOwnPropertyDescriptor,jm=Object.getOwnPropertyNames,O2=Object.getPrototypeOf,L2=Object.prototype.hasOwnProperty,Yu=(e,t)=>function(){return t||(0,e[jm(e)[0]])((t={exports:{}}).exports,t),t.exports},D2=(e,t)=>{for(var n in t)Wu(e,n,{get:t[n],enumerable:!0})},P2=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jm(t))!L2.call(e,i)&&i!==n&&Wu(e,i,{get:()=>t[i],enumerable:!(r=N2(t,i))||r.enumerable});return e},M2=(e,t,n)=>(n=e!=null?R2(O2(e)):{},P2(Wu(n,"default",{value:e,enumerable:!0}),e)),B2=Yu({"node_modules/is-object/index.js"(e,t){t.exports=function(r){return typeof r=="object"&&r!==null}}}),F2=Yu({"node_modules/is-window/index.js"(e,t){t.exports=function(n){if(n==null)return!1;var r=Object(n);return r===r.window}}}),H2=Yu({"node_modules/is-dom/index.js"(e,t){var n=B2(),r=F2();function i(s){return!n(s)||!r(window)||typeof window.Node!="function"?!1:typeof s.nodeType=="number"&&typeof s.nodeName=="string"}t.exports=i}}),$a={};D2($a,{chromeDark:()=>U2,chromeLight:()=>j2});var U2={BASE_FONT_FAMILY:"Menlo, monospace",BASE_FONT_SIZE:"11px",BASE_LINE_HEIGHT:1.2,BASE_BACKGROUND_COLOR:"rgb(36, 36, 36)",BASE_COLOR:"rgb(213, 213, 213)",OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES:10,OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES:5,OBJECT_NAME_COLOR:"rgb(227, 110, 236)",OBJECT_VALUE_NULL_COLOR:"rgb(127, 127, 127)",OBJECT_VALUE_UNDEFINED_COLOR:"rgb(127, 127, 127)",OBJECT_VALUE_REGEXP_COLOR:"rgb(233, 63, 59)",OBJECT_VALUE_STRING_COLOR:"rgb(233, 63, 59)",OBJECT_VALUE_SYMBOL_COLOR:"rgb(233, 63, 59)",OBJECT_VALUE_NUMBER_COLOR:"hsl(252, 100%, 75%)",OBJECT_VALUE_BOOLEAN_COLOR:"hsl(252, 100%, 75%)",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"rgb(85, 106, 242)",HTML_TAG_COLOR:"rgb(93, 176, 215)",HTML_TAGNAME_COLOR:"rgb(93, 176, 215)",HTML_TAGNAME_TEXT_TRANSFORM:"lowercase",HTML_ATTRIBUTE_NAME_COLOR:"rgb(155, 187, 220)",HTML_ATTRIBUTE_VALUE_COLOR:"rgb(242, 151, 102)",HTML_COMMENT_COLOR:"rgb(137, 137, 137)",HTML_DOCTYPE_COLOR:"rgb(192, 192, 192)",ARROW_COLOR:"rgb(145, 145, 145)",ARROW_MARGIN_RIGHT:3,ARROW_FONT_SIZE:12,ARROW_ANIMATION_DURATION:"0",TREENODE_FONT_FAMILY:"Menlo, monospace",TREENODE_FONT_SIZE:"11px",TREENODE_LINE_HEIGHT:1.2,TREENODE_PADDING_LEFT:12,TABLE_BORDER_COLOR:"rgb(85, 85, 85)",TABLE_TH_BACKGROUND_COLOR:"rgb(44, 44, 44)",TABLE_TH_HOVER_COLOR:"rgb(48, 48, 48)",TABLE_SORT_ICON_COLOR:"black",TABLE_DATA_BACKGROUND_IMAGE:"linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(51, 139, 255, 0.0980392) 50%, rgba(51, 139, 255, 0.0980392))",TABLE_DATA_BACKGROUND_SIZE:"128px 32px"},j2={BASE_FONT_FAMILY:"Menlo, monospace",BASE_FONT_SIZE:"11px",BASE_LINE_HEIGHT:1.2,BASE_BACKGROUND_COLOR:"white",BASE_COLOR:"black",OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES:10,OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES:5,OBJECT_NAME_COLOR:"rgb(136, 19, 145)",OBJECT_VALUE_NULL_COLOR:"rgb(128, 128, 128)",OBJECT_VALUE_UNDEFINED_COLOR:"rgb(128, 128, 128)",OBJECT_VALUE_REGEXP_COLOR:"rgb(196, 26, 22)",OBJECT_VALUE_STRING_COLOR:"rgb(196, 26, 22)",OBJECT_VALUE_SYMBOL_COLOR:"rgb(196, 26, 22)",OBJECT_VALUE_NUMBER_COLOR:"rgb(28, 0, 207)",OBJECT_VALUE_BOOLEAN_COLOR:"rgb(28, 0, 207)",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"rgb(13, 34, 170)",HTML_TAG_COLOR:"rgb(168, 148, 166)",HTML_TAGNAME_COLOR:"rgb(136, 18, 128)",HTML_TAGNAME_TEXT_TRANSFORM:"lowercase",HTML_ATTRIBUTE_NAME_COLOR:"rgb(153, 69, 0)",HTML_ATTRIBUTE_VALUE_COLOR:"rgb(26, 26, 166)",HTML_COMMENT_COLOR:"rgb(35, 110, 37)",HTML_DOCTYPE_COLOR:"rgb(192, 192, 192)",ARROW_COLOR:"#6e6e6e",ARROW_MARGIN_RIGHT:3,ARROW_FONT_SIZE:12,ARROW_ANIMATION_DURATION:"0",TREENODE_FONT_FAMILY:"Menlo, monospace",TREENODE_FONT_SIZE:"11px",TREENODE_LINE_HEIGHT:1.2,TREENODE_PADDING_LEFT:12,TABLE_BORDER_COLOR:"#aaa",TABLE_TH_BACKGROUND_COLOR:"#eee",TABLE_TH_HOVER_COLOR:"hsla(0, 0%, 90%, 1)",TABLE_SORT_ICON_COLOR:"#6e6e6e",TABLE_DATA_BACKGROUND_IMAGE:"linear-gradient(to bottom, white, white 50%, rgb(234, 243, 255) 50%, rgb(234, 243, 255))",TABLE_DATA_BACKGROUND_SIZE:"128px 32px"},zm=x.createContext([{},()=>{}]),Wo={WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",OUserSelect:"none",userSelect:"none"},Aa=e=>({DOMNodePreview:{htmlOpenTag:{base:{color:e.HTML_TAG_COLOR},tagName:{color:e.HTML_TAGNAME_COLOR,textTransform:e.HTML_TAGNAME_TEXT_TRANSFORM},htmlAttributeName:{color:e.HTML_ATTRIBUTE_NAME_COLOR},htmlAttributeValue:{color:e.HTML_ATTRIBUTE_VALUE_COLOR}},htmlCloseTag:{base:{color:e.HTML_TAG_COLOR},offsetLeft:{marginLeft:-e.TREENODE_PADDING_LEFT},tagName:{color:e.HTML_TAGNAME_COLOR,textTransform:e.HTML_TAGNAME_TEXT_TRANSFORM}},htmlComment:{color:e.HTML_COMMENT_COLOR},htmlDoctype:{color:e.HTML_DOCTYPE_COLOR}},ObjectPreview:{objectDescription:{fontStyle:"italic"},preview:{fontStyle:"italic"},arrayMaxProperties:e.OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES,objectMaxProperties:e.OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES},ObjectName:{base:{color:e.OBJECT_NAME_COLOR},dimmed:{opacity:.6}},ObjectValue:{objectValueNull:{color:e.OBJECT_VALUE_NULL_COLOR},objectValueUndefined:{color:e.OBJECT_VALUE_UNDEFINED_COLOR},objectValueRegExp:{color:e.OBJECT_VALUE_REGEXP_COLOR},objectValueString:{color:e.OBJECT_VALUE_STRING_COLOR},objectValueSymbol:{color:e.OBJECT_VALUE_SYMBOL_COLOR},objectValueNumber:{color:e.OBJECT_VALUE_NUMBER_COLOR},objectValueBoolean:{color:e.OBJECT_VALUE_BOOLEAN_COLOR},objectValueFunctionPrefix:{color:e.OBJECT_VALUE_FUNCTION_PREFIX_COLOR,fontStyle:"italic"},objectValueFunctionName:{fontStyle:"italic"}},TreeView:{treeViewOutline:{padding:0,margin:0,listStyleType:"none"}},TreeNode:{treeNodeBase:{color:e.BASE_COLOR,backgroundColor:e.BASE_BACKGROUND_COLOR,lineHeight:e.TREENODE_LINE_HEIGHT,cursor:"default",boxSizing:"border-box",listStyle:"none",fontFamily:e.TREENODE_FONT_FAMILY,fontSize:e.TREENODE_FONT_SIZE},treeNodePreviewContainer:{},treeNodePlaceholder:{whiteSpace:"pre",fontSize:e.ARROW_FONT_SIZE,marginRight:e.ARROW_MARGIN_RIGHT,...Wo},treeNodeArrow:{base:{color:e.ARROW_COLOR,display:"inline-block",fontSize:e.ARROW_FONT_SIZE,marginRight:e.ARROW_MARGIN_RIGHT,...parseFloat(e.ARROW_ANIMATION_DURATION)>0?{transition:`transform ${e.ARROW_ANIMATION_DURATION} ease 0s`}:{},...Wo},expanded:{WebkitTransform:"rotateZ(90deg)",MozTransform:"rotateZ(90deg)",transform:"rotateZ(90deg)"},collapsed:{WebkitTransform:"rotateZ(0deg)",MozTransform:"rotateZ(0deg)",transform:"rotateZ(0deg)"}},treeNodeChildNodesContainer:{margin:0,paddingLeft:e.TREENODE_PADDING_LEFT}},TableInspector:{base:{color:e.BASE_COLOR,position:"relative",border:`1px solid ${e.TABLE_BORDER_COLOR}`,fontFamily:e.BASE_FONT_FAMILY,fontSize:e.BASE_FONT_SIZE,lineHeight:"120%",boxSizing:"border-box",cursor:"default"}},TableInspectorHeaderContainer:{base:{top:0,height:"17px",left:0,right:0,overflowX:"hidden"},table:{tableLayout:"fixed",borderSpacing:0,borderCollapse:"separate",height:"100%",width:"100%",margin:0}},TableInspectorDataContainer:{tr:{display:"table-row"},td:{boxSizing:"border-box",border:"none",height:"16px",verticalAlign:"top",padding:"1px 4px",WebkitUserSelect:"text",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",lineHeight:"14px"},div:{position:"static",top:"17px",bottom:0,overflowY:"overlay",transform:"translateZ(0)",left:0,right:0,overflowX:"hidden"},table:{positon:"static",left:0,top:0,right:0,bottom:0,borderTop:"0 none transparent",margin:0,backgroundImage:e.TABLE_DATA_BACKGROUND_IMAGE,backgroundSize:e.TABLE_DATA_BACKGROUND_SIZE,tableLayout:"fixed",borderSpacing:0,borderCollapse:"separate",width:"100%",fontSize:e.BASE_FONT_SIZE,lineHeight:"120%"}},TableInspectorTH:{base:{position:"relative",height:"auto",textAlign:"left",backgroundColor:e.TABLE_TH_BACKGROUND_COLOR,borderBottom:`1px solid ${e.TABLE_BORDER_COLOR}`,fontWeight:"normal",verticalAlign:"middle",padding:"0 4px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",lineHeight:"14px",":hover":{backgroundColor:e.TABLE_TH_HOVER_COLOR}},div:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",fontSize:e.BASE_FONT_SIZE,lineHeight:"120%"}},TableInspectorLeftBorder:{none:{borderLeft:"none"},solid:{borderLeft:`1px solid ${e.TABLE_BORDER_COLOR}`}},TableInspectorSortIcon:{display:"block",marginRight:3,width:8,height:7,marginTop:-7,color:e.TABLE_SORT_ICON_COLOR,fontSize:12,...Wo}}),Ll="chromeLight",$m=x.createContext(Aa($a[Ll])),Hs=e=>x.useContext($m)[e],z2=e=>({theme:n=Ll,...r})=>{const i=x.useMemo(()=>{switch(Object.prototype.toString.call(n)){case"[object String]":return Aa($a[n]);case"[object Object]":return Aa(n);default:return Aa($a[Ll])}},[n]);return F.createElement($m.Provider,{value:i},F.createElement(e,{...r}))},$2=({expanded:e,styles:t})=>F.createElement("span",{style:{...t.base,...e?t.expanded:t.collapsed}},"▶"),V2=x.memo(e=>{e={expanded:!0,nodeRenderer:({name:d})=>F.createElement("span",null,d),onClick:()=>{},shouldShowArrow:!1,shouldShowPlaceholder:!0,...e};const{expanded:t,onClick:n,children:r,nodeRenderer:i,title:s,shouldShowArrow:a,shouldShowPlaceholder:o}=e,l=Hs("TreeNode"),u=i;return F.createElement("li",{"aria-expanded":t,role:"treeitem",style:l.treeNodeBase,title:s},F.createElement("div",{style:l.treeNodePreviewContainer,onClick:n},a||x.Children.count(r)>0?F.createElement($2,{expanded:t,styles:l.treeNodeArrow}):o&&F.createElement("span",{style:l.treeNodePlaceholder}," "),F.createElement(u,{...e})),F.createElement("ol",{role:"group",style:l.treeNodeChildNodesContainer},t?r:void 0))}),Va="$",Nd="*";function Sa(e,t){return!t(e).next().done}var W2=e=>Array.from({length:e},(t,n)=>[Va].concat(Array.from({length:n},()=>"*")).join(".")),Y2=(e,t,n,r,i)=>{const s=[].concat(W2(r)).concat(n).filter(o=>typeof o=="string"),a=[];return s.forEach(o=>{const l=o.split("."),u=(d,c,h)=>{if(h===l.length){a.push(c);return}const p=l[h];if(h===0)Sa(d,t)&&(p===Va||p===Nd)&&u(d,Va,h+1);else if(p===Nd)for(const{name:m,data:E}of t(d))Sa(E,t)&&u(E,`${c}.${m}`,h+1);else{const m=d[p];Sa(m,t)&&u(m,`${c}.${p}`,h+1)}};u(e,"",0)}),a.reduce((o,l)=>(o[l]=!0,o),{...i})},Vm=x.memo(e=>{const{data:t,dataIterator:n,path:r,depth:i,nodeRenderer:s}=e,[a,o]=x.useContext(zm),l=Sa(t,n),u=!!a[r],d=x.useCallback(()=>l&&o(c=>({...c,[r]:!u})),[l,o,r,u]);return F.createElement(V2,{expanded:u,onClick:d,shouldShowArrow:l,shouldShowPlaceholder:i>0,nodeRenderer:s,...e},u?[...n(t)].map(({name:c,data:h,...p})=>F.createElement(Vm,{name:c,data:h,depth:i+1,path:`${r}.${c}`,key:c,dataIterator:n,nodeRenderer:s,...p})):null)}),G2=x.memo(({name:e,data:t,dataIterator:n,nodeRenderer:r,expandPaths:i,expandLevel:s})=>{const a=Hs("TreeView"),o=x.useState({}),[,l]=o;return x.useLayoutEffect(()=>l(u=>Y2(t,n,i,s,u)),[t,n,i,s]),F.createElement(zm.Provider,{value:o},F.createElement("ol",{role:"tree",style:a.treeViewOutline},F.createElement(Vm,{name:e,data:t,dataIterator:n,depth:0,path:Va,nodeRenderer:r})))}),Dr=({name:e,dimmed:t=!1,styles:n={}})=>{const r=Hs("ObjectName"),i={...r.base,...t?r.dimmed:{},...n};return F.createElement("span",{style:i},e)},Ji=({object:e,styles:t})=>{const n=Hs("ObjectValue"),r=i=>({...n[i],...t});switch(typeof e){case"bigint":return F.createElement("span",{style:r("objectValueNumber")},String(e),"n");case"number":return F.createElement("span",{style:r("objectValueNumber")},String(e));case"string":return F.createElement("span",{style:r("objectValueString")},'"',e,'"');case"boolean":return F.createElement("span",{style:r("objectValueBoolean")},String(e));case"undefined":return F.createElement("span",{style:r("objectValueUndefined")},"undefined");case"object":return e===null?F.createElement("span",{style:r("objectValueNull")},"null"):e instanceof Date?F.createElement("span",null,e.toString()):e instanceof RegExp?F.createElement("span",{style:r("objectValueRegExp")},e.toString()):Array.isArray(e)?F.createElement("span",null,`Array(${e.length})`):e.constructor?typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)?F.createElement("span",null,`Buffer[${e.length}]`):F.createElement("span",null,e.constructor.name):F.createElement("span",null,"Object");case"function":return F.createElement("span",null,F.createElement("span",{style:r("objectValueFunctionPrefix")},"ƒ "),F.createElement("span",{style:r("objectValueFunctionName")},e.name,"()"));case"symbol":return F.createElement("span",{style:r("objectValueSymbol")},e.toString());default:return F.createElement("span",null)}},q2=Object.prototype.hasOwnProperty,K2=Object.prototype.propertyIsEnumerable;function Dl(e,t){const n=Object.getOwnPropertyDescriptor(e,t);if(n.get)try{return n.get()}catch{return n.get}return e[t]}function Od(e,t){return e.length===0?[]:e.slice(1).reduce((n,r)=>n.concat([t,r]),[e[0]])}var Pl=({data:e})=>{const t=Hs("ObjectPreview"),n=e;if(typeof n!="object"||n===null||n instanceof Date||n instanceof RegExp)return F.createElement(Ji,{object:n});if(Array.isArray(n)){const r=t.arrayMaxProperties,i=n.slice(0,r).map((a,o)=>F.createElement(Ji,{key:o,object:a}));n.length>r&&i.push(F.createElement("span",{key:"ellipsis"},"…"));const s=n.length;return F.createElement(F.Fragment,null,F.createElement("span",{style:t.objectDescription},s===0?"":`(${s}) `),F.createElement("span",{style:t.preview},"[",Od(i,", "),"]"))}else{const r=t.objectMaxProperties,i=[];for(const a in n)if(q2.call(n,a)){let o;i.length===r-1&&Object.keys(n).length>r&&(o=F.createElement("span",{key:"ellipsis"},"…"));const l=Dl(n,a);if(i.push(F.createElement("span",{key:a},F.createElement(Dr,{name:a||'""'}),": ",F.createElement(Ji,{object:l}),o)),o)break}const s=n.constructor?n.constructor.name:"Object";return F.createElement(F.Fragment,null,F.createElement("span",{style:t.objectDescription},s==="Object"?"":`${s} `),F.createElement("span",{style:t.preview},"{",Od(i,", "),"}"))}},Ml=({name:e,data:t})=>typeof e=="string"?F.createElement("span",null,F.createElement(Dr,{name:e}),F.createElement("span",null,": "),F.createElement(Pl,{data:t})):F.createElement(Pl,{data:t}),Wm=({name:e,data:t,isNonenumerable:n=!1})=>{const r=t;return F.createElement("span",null,typeof e=="string"?F.createElement(Dr,{name:e,dimmed:n}):F.createElement(Pl,{data:e}),F.createElement("span",null,": "),F.createElement(Ji,{object:r}))},X2=(e,t)=>function*(r){if(!(typeof r=="object"&&r!==null||typeof r=="function"))return;const s=Array.isArray(r);if(!s&&r[Symbol.iterator]){let a=0;for(const o of r){if(Array.isArray(o)&&o.length===2){const[l,u]=o;yield{name:l,data:u}}else yield{name:a.toString(),data:o};a++}}else{const a=Object.getOwnPropertyNames(r);t===!0&&!s?a.sort():typeof t=="function"&&a.sort(t);for(const o of a)if(K2.call(r,o)){const l=Dl(r,o);yield{name:o||'""',data:l}}else if(e){let l;try{l=Dl(r,o)}catch{}l!==void 0&&(yield{name:o,data:l,isNonenumerable:!0})}e&&r!==Object.prototype&&(yield{name:"__proto__",data:Object.getPrototypeOf(r),isNonenumerable:!0})}},Q2=({depth:e,name:t,data:n,isNonenumerable:r})=>e===0?F.createElement(Ml,{name:t,data:n}):F.createElement(Wm,{name:t,data:n,isNonenumerable:r}),Z2=({showNonenumerable:e=!1,sortObjectKeys:t,nodeRenderer:n,...r})=>{const i=X2(e,t),s=n||Q2;return F.createElement(G2,{nodeRenderer:s,dataIterator:i,...r})},J2=z2(Z2);M2(H2());const e_=()=>{const[e,t]=x.useState(()=>typeof document>"u"?!1:document.documentElement.classList.contains("dark"));return x.useEffect(()=>{if(typeof document>"u")return;const n=new MutationObserver(()=>{t(document.documentElement.classList.contains("dark"))});return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},[]),e},Ym={OBJECT_VALUE_DATE_COLOR:"#a21caf"},t_={OBJECT_VALUE_DATE_COLOR:"#e879f9"},Gm={BASE_FONT_SIZE:"11px",BASE_LINE_HEIGHT:1.4,BASE_BACKGROUND_COLOR:"transparent",OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES:10,OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES:5,HTML_TAGNAME_TEXT_TRANSFORM:"lowercase",ARROW_MARGIN_RIGHT:3,ARROW_FONT_SIZE:12,TREENODE_FONT_FAMILY:"var(--font-mono)",TREENODE_FONT_SIZE:"11px",TREENODE_LINE_HEIGHT:1.4,TREENODE_PADDING_LEFT:12,TABLE_DATA_BACKGROUND_IMAGE:"none",TABLE_DATA_BACKGROUND_SIZE:"0"},n_={...Gm,BASE_COLOR:"var(--ds-gray-1000)",OBJECT_NAME_COLOR:"var(--ds-gray-900)",OBJECT_VALUE_STRING_COLOR:"#16a34a",OBJECT_VALUE_SYMBOL_COLOR:"#16a34a",OBJECT_VALUE_NUMBER_COLOR:"#b45309",OBJECT_VALUE_BOOLEAN_COLOR:"#b45309",OBJECT_VALUE_NULL_COLOR:"var(--ds-gray-900)",OBJECT_VALUE_UNDEFINED_COLOR:"var(--ds-gray-500)",OBJECT_VALUE_REGEXP_COLOR:"#dc2626",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"#0891b2",HTML_TAG_COLOR:"var(--ds-gray-500)",HTML_TAGNAME_COLOR:"#0891b2",HTML_ATTRIBUTE_NAME_COLOR:"#b45309",HTML_ATTRIBUTE_VALUE_COLOR:"#16a34a",HTML_COMMENT_COLOR:"var(--ds-gray-400)",HTML_DOCTYPE_COLOR:"var(--ds-gray-400)",ARROW_COLOR:"var(--ds-gray-500)",TABLE_BORDER_COLOR:"var(--ds-gray-300)",TABLE_TH_BACKGROUND_COLOR:"var(--ds-gray-100)",TABLE_TH_HOVER_COLOR:"var(--ds-gray-200)",TABLE_SORT_ICON_COLOR:"var(--ds-gray-500)"},r_={...Gm,BASE_COLOR:"var(--ds-gray-1000)",OBJECT_NAME_COLOR:"var(--ds-gray-900)",OBJECT_VALUE_STRING_COLOR:"#4ade80",OBJECT_VALUE_SYMBOL_COLOR:"#4ade80",OBJECT_VALUE_NUMBER_COLOR:"#facc15",OBJECT_VALUE_BOOLEAN_COLOR:"#facc15",OBJECT_VALUE_NULL_COLOR:"var(--ds-gray-1000)",OBJECT_VALUE_UNDEFINED_COLOR:"var(--ds-gray-500)",OBJECT_VALUE_REGEXP_COLOR:"#f87171",OBJECT_VALUE_FUNCTION_PREFIX_COLOR:"#22d3ee",HTML_TAG_COLOR:"var(--ds-gray-500)",HTML_TAGNAME_COLOR:"#22d3ee",HTML_ATTRIBUTE_NAME_COLOR:"#facc15",HTML_ATTRIBUTE_VALUE_COLOR:"#4ade80",HTML_COMMENT_COLOR:"var(--ds-gray-500)",HTML_DOCTYPE_COLOR:"var(--ds-gray-500)",ARROW_COLOR:"var(--ds-gray-500)",TABLE_BORDER_COLOR:"var(--ds-gray-300)",TABLE_TH_BACKGROUND_COLOR:"var(--ds-gray-100)",TABLE_TH_HOVER_COLOR:"var(--ds-gray-200)",TABLE_SORT_ICON_COLOR:"var(--ds-gray-500)"},i_="__workflow_stream_ref__",s_="__workflow_class_instance_ref__";function a_(e){return e!==null&&typeof e=="object"&&"__type"in e&&e.__type===i_}function o_(e){return e!==null&&typeof e=="object"&&"__type"in e&&e.__type===s_}const qm=x.createContext(void 0);function l_({streamRef:e}){const t=x.useContext(qm);return g.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono cursor-pointer",style:{backgroundColor:"var(--ds-blue-100)",color:"var(--ds-blue-800)",border:"1px solid var(--ds-blue-300)"},onClick:()=>t==null?void 0:t(e.streamId),title:`View stream: ${e.streamId}`,children:[g.jsx("span",{children:"📡"}),g.jsx("span",{children:e.streamId})]})}const Km=x.createContext(Ym);function u_({depth:e,name:t,data:n,isNonenumerable:r}){var s;const i=x.useContext(Km);if(n!==null&&typeof n=="object"&&((s=n.constructor)==null?void 0:s.name)===za){const a=g.jsxs("span",{style:{color:"var(--ds-gray-600)",fontStyle:"italic"},children:[g.jsx(Dx,{className:"h-3 w-3",style:{display:"inline",verticalAlign:"middle",marginRight:"3px",marginTop:"-1px"}}),"Encrypted"]});return e===0?a:g.jsxs("span",{children:[t!=null&&g.jsx(Dr,{name:t}),t!=null&&g.jsx("span",{children:": "}),a]})}if(a_(n))return g.jsxs("span",{children:[t!=null&&g.jsx(Dr,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsx(l_,{streamRef:n})]});if(o_(n))return e===0?g.jsx(Ml,{name:n.className,data:n.data}):g.jsxs("span",{children:[t!=null&&g.jsx(Dr,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsxs("span",{style:{fontStyle:"italic"},children:[n.className," "]}),g.jsx(Ji,{object:n.data})]});if(n instanceof Date){const a=n.toISOString();return e===0?g.jsx("span",{style:{color:i.OBJECT_VALUE_DATE_COLOR},children:a}):g.jsxs("span",{children:[t!=null&&g.jsx(Dr,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsx("span",{style:{color:i.OBJECT_VALUE_DATE_COLOR},children:a})]})}return e===0?g.jsx(Ml,{name:t,data:n}):g.jsx(Wm,{name:t,data:n,isNonenumerable:r})}function c_({data:e,expandLevel:t=2,name:n,onStreamClick:r}){const i=d_(e),[s,a]=x.useState(t),o=e_(),l=o?t_:Ym;x.useEffect(()=>{a(0)},[]);const u=g.jsx(Km.Provider,{value:l,children:g.jsx(J2,{data:i,name:n,theme:o?r_:n_,expandLevel:s,nodeRenderer:u_})});return r?g.jsx(qm.Provider,{value:r,children:u}):u}function d_(e){const t=x.useRef(e);return Ia(t.current,e)||(t.current=e),t.current}function Ld(e){return typeof e=="object"&&e!==null}function Ia(e,t,n=new WeakMap){if(Object.is(e,t))return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,l]of e.entries())if(!t.has(o)||!Ia(l,t.get(o),n))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e.values())if(!t.has(o))return!1;return!0}if(!Ld(e)||!Ld(t))return!1;if(n.get(e)===t)return!0;n.set(e,t);const r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o+=1)if(!Ia(e[o],t[o],n))return!1;return!0}const s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(const o of s)if(!Object.hasOwn(t,o)||!Ia(e[o],t[o],n))return!1;return!0}function f_(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const h_=e=>{switch(e){case"success":return g_;case"info":return E_;case"warning":return b_;case"error":return T_;default:return null}},p_=Array(12).fill(0),m_=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},p_.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),g_=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),b_=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),E_=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),T_=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),x_=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),y_=()=>{const[e,t]=F.useState(document.hidden);return F.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Bl=1;class __{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Bl++,a=this.toasts.find(l=>l.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:o,title:r}):l):this.addToast({title:r,...i,dismissible:o,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,a;const o=i.then(async u=>{if(a=["resolve",u],F.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(w_(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,m=typeof c=="object"&&!F.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...m})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!F.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...m})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,h=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!F.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...m})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,p=typeof d=="object"&&!F.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:c,...p})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>o.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Bl++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Wt=new __,k_=(e,t)=>{const n=(t==null?void 0:t.id)||Bl++;return Wt.addToast({title:e,...t,id:n}),n},w_=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",C_=k_,A_=()=>Wt.toasts,S_=()=>Wt.getActiveToasts(),Yo=Object.assign(C_,{success:Wt.success,info:Wt.info,warning:Wt.warning,error:Wt.error,custom:Wt.custom,message:Wt.message,promise:Wt.promise,dismiss:Wt.dismiss,loading:Wt.loading},{getHistory:A_,getToasts:S_});f_("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function oa(e){return e.label!==void 0}const I_=3,v_="24px",R_="16px",Dd=4e3,N_=356,O_=14,L_=45,D_=200;function Ln(...e){return e.filter(Boolean).join(" ")}function P_(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const M_=e=>{var t,n,r,i,s,a,o,l,u;const{invert:d,toast:c,unstyled:h,interacting:p,setHeights:m,visibleToasts:E,heights:T,index:b,toasts:y,expanded:k,removeToast:P,defaultRichColors:D,closeButton:v,style:A,cancelButtonStyle:N,actionButtonStyle:z,className:R="",descriptionClassName:W="",duration:j,position:w,gap:L,expandByDefault:M,classNames:H,icons:U,closeButtonAriaLabel:G="Close toast"}=e,[Q,_]=F.useState(null),[se,te]=F.useState(null),[S,ge]=F.useState(!1),[pe,me]=F.useState(!1),[qe,X]=F.useState(!1),[ue,ke]=F.useState(!1),[Me,Ke]=F.useState(!1),[ze,Be]=F.useState(0),[nt,Xe]=F.useState(0),Re=F.useRef(c.duration||j||Dd),$e=F.useRef(null),Ye=F.useRef(null),ut=b===0,Cr=b+1<=E,_t=c.type,Kt=c.dismissible!==!1,On=c.className||"",xn=c.descriptionClassName||"",q=F.useMemo(()=>T.findIndex(Ae=>Ae.toastId===c.id)||0,[T,c.id]),ae=F.useMemo(()=>{var Ae;return(Ae=c.closeButton)!=null?Ae:v},[c.closeButton,v]),Ee=F.useMemo(()=>c.duration||j||Dd,[c.duration,j]),we=F.useRef(0),De=F.useRef(0),St=F.useRef(0),vt=F.useRef(null),[yn,Ar]=w.split("-"),nr=F.useMemo(()=>T.reduce((Ae,kt,Nt)=>Nt>=q?Ae:Ae+kt.height,0),[T,q]),Rt=y_(),rr=c.invert||d,Xt=_t==="loading";De.current=F.useMemo(()=>q*L+nr,[q,nr]),F.useEffect(()=>{Re.current=Ee},[Ee]),F.useEffect(()=>{ge(!0)},[]),F.useEffect(()=>{const Ae=Ye.current;if(Ae){const kt=Ae.getBoundingClientRect().height;return Xe(kt),m(Nt=>[{toastId:c.id,height:kt,position:c.position},...Nt]),()=>m(Nt=>Nt.filter(Qt=>Qt.toastId!==c.id))}},[m,c.id]),F.useLayoutEffect(()=>{if(!S)return;const Ae=Ye.current,kt=Ae.style.height;Ae.style.height="auto";const Nt=Ae.getBoundingClientRect().height;Ae.style.height=kt,Xe(Nt),m(Qt=>Qt.find(It=>It.toastId===c.id)?Qt.map(It=>It.toastId===c.id?{...It,height:Nt}:It):[{toastId:c.id,height:Nt,position:c.position},...Qt])},[S,c.title,c.description,m,c.id,c.jsx,c.action,c.cancel]);const ir=F.useCallback(()=>{me(!0),Be(De.current),m(Ae=>Ae.filter(kt=>kt.toastId!==c.id)),setTimeout(()=>{P(c)},D_)},[c,P,m,De]);F.useEffect(()=>{if(c.promise&&_t==="loading"||c.duration===1/0||c.type==="loading")return;let Ae;return k||p||Rt?(()=>{if(St.current<we.current){const Qt=new Date().getTime()-we.current;Re.current=Re.current-Qt}St.current=new Date().getTime()})():(()=>{Re.current!==1/0&&(we.current=new Date().getTime(),Ae=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),ir()},Re.current))})(),()=>clearTimeout(Ae)},[k,p,c,_t,Rt,ir]),F.useEffect(()=>{c.delete&&(ir(),c.onDismiss==null||c.onDismiss.call(c,c))},[ir,c.delete]);function bb(){var Ae;if(U!=null&&U.loading){var kt;return F.createElement("div",{className:Ln(H==null?void 0:H.loader,c==null||(kt=c.classNames)==null?void 0:kt.loader,"sonner-loader"),"data-visible":_t==="loading"},U.loading)}return F.createElement(m_,{className:Ln(H==null?void 0:H.loader,c==null||(Ae=c.classNames)==null?void 0:Ae.loader),visible:_t==="loading"})}const Eb=c.icon||(U==null?void 0:U[_t])||h_(_t);var Fc,Hc;return F.createElement("li",{tabIndex:0,ref:Ye,className:Ln(R,On,H==null?void 0:H.toast,c==null||(t=c.classNames)==null?void 0:t.toast,H==null?void 0:H.default,H==null?void 0:H[_t],c==null||(n=c.classNames)==null?void 0:n[_t]),"data-sonner-toast":"","data-rich-colors":(Fc=c.richColors)!=null?Fc:D,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":S,"data-promise":!!c.promise,"data-swiped":Me,"data-removed":pe,"data-visible":Cr,"data-y-position":yn,"data-x-position":Ar,"data-index":b,"data-front":ut,"data-swiping":qe,"data-dismissible":Kt,"data-type":_t,"data-invert":rr,"data-swipe-out":ue,"data-swipe-direction":se,"data-expanded":!!(k||M&&S),"data-testid":c.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${pe?ze:De.current}px`,"--initial-height":M?"auto":`${nt}px`,...A,...c.style},onDragEnd:()=>{X(!1),_(null),vt.current=null},onPointerDown:Ae=>{Ae.button!==2&&(Xt||!Kt||($e.current=new Date,Be(De.current),Ae.target.setPointerCapture(Ae.pointerId),Ae.target.tagName!=="BUTTON"&&(X(!0),vt.current={x:Ae.clientX,y:Ae.clientY})))},onPointerUp:()=>{var Ae,kt,Nt;if(ue||!Kt)return;vt.current=null;const Qt=Number(((Ae=Ye.current)==null?void 0:Ae.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Zs=Number(((kt=Ye.current)==null?void 0:kt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),It=new Date().getTime()-((Nt=$e.current)==null?void 0:Nt.getTime()),cn=Q==="x"?Qt:Zs,Js=Math.abs(cn)/It;if(Math.abs(cn)>=L_||Js>.11){Be(De.current),c.onDismiss==null||c.onDismiss.call(c,c),te(Q==="x"?Qt>0?"right":"left":Zs>0?"down":"up"),ir(),ke(!0);return}else{var _n,kn;(_n=Ye.current)==null||_n.style.setProperty("--swipe-amount-x","0px"),(kn=Ye.current)==null||kn.style.setProperty("--swipe-amount-y","0px")}Ke(!1),X(!1),_(null)},onPointerMove:Ae=>{var kt,Nt,Qt;if(!vt.current||!Kt||((kt=window.getSelection())==null?void 0:kt.toString().length)>0)return;const It=Ae.clientY-vt.current.y,cn=Ae.clientX-vt.current.x;var Js;const _n=(Js=e.swipeDirections)!=null?Js:P_(w);!Q&&(Math.abs(cn)>1||Math.abs(It)>1)&&_(Math.abs(cn)>Math.abs(It)?"x":"y");let kn={x:0,y:0};const Uc=Sr=>1/(1.5+Math.abs(Sr)/20);if(Q==="y"){if(_n.includes("top")||_n.includes("bottom"))if(_n.includes("top")&&It<0||_n.includes("bottom")&&It>0)kn.y=It;else{const Sr=It*Uc(It);kn.y=Math.abs(Sr)<Math.abs(It)?Sr:It}}else if(Q==="x"&&(_n.includes("left")||_n.includes("right")))if(_n.includes("left")&&cn<0||_n.includes("right")&&cn>0)kn.x=cn;else{const Sr=cn*Uc(cn);kn.x=Math.abs(Sr)<Math.abs(cn)?Sr:cn}(Math.abs(kn.x)>0||Math.abs(kn.y)>0)&&Ke(!0),(Nt=Ye.current)==null||Nt.style.setProperty("--swipe-amount-x",`${kn.x}px`),(Qt=Ye.current)==null||Qt.style.setProperty("--swipe-amount-y",`${kn.y}px`)}},ae&&!c.jsx&&_t!=="loading"?F.createElement("button",{"aria-label":G,"data-disabled":Xt,"data-close-button":!0,onClick:Xt||!Kt?()=>{}:()=>{ir(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Ln(H==null?void 0:H.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Hc=U==null?void 0:U.close)!=null?Hc:x_):null,(_t||c.icon||c.promise)&&c.icon!==null&&((U==null?void 0:U[_t])!==null||c.icon)?F.createElement("div",{"data-icon":"",className:Ln(H==null?void 0:H.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||bb():null,c.type!=="loading"?Eb:null):null,F.createElement("div",{"data-content":"",className:Ln(H==null?void 0:H.content,c==null||(s=c.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:Ln(H==null?void 0:H.title,c==null||(a=c.classNames)==null?void 0:a.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?F.createElement("div",{"data-description":"",className:Ln(W,xn,H==null?void 0:H.description,c==null||(o=c.classNames)==null?void 0:o.description)},typeof c.description=="function"?c.description():c.description):null),F.isValidElement(c.cancel)?c.cancel:c.cancel&&oa(c.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||N,onClick:Ae=>{oa(c.cancel)&&Kt&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Ae),ir())},className:Ln(H==null?void 0:H.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,F.isValidElement(c.action)?c.action:c.action&&oa(c.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||z,onClick:Ae=>{oa(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Ae),!Ae.defaultPrevented&&ir())},className:Ln(H==null?void 0:H.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Pd(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function B_(e,t){const n={};return[e,t].forEach((r,i)=>{const s=i===1,a=s?"--mobile-offset":"--offset",o=s?R_:v_;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=o:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(o)}),n}const uM=F.forwardRef(function(t,n){const{id:r,invert:i,position:s="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:l,className:u,offset:d,mobileOffset:c,theme:h="light",richColors:p,duration:m,style:E,visibleToasts:T=I_,toastOptions:b,dir:y=Pd(),gap:k=O_,icons:P,containerAriaLabel:D="Notifications"}=t,[v,A]=F.useState([]),N=F.useMemo(()=>r?v.filter(S=>S.toasterId===r):v.filter(S=>!S.toasterId),[v,r]),z=F.useMemo(()=>Array.from(new Set([s].concat(N.filter(S=>S.position).map(S=>S.position)))),[N,s]),[R,W]=F.useState([]),[j,w]=F.useState(!1),[L,M]=F.useState(!1),[H,U]=F.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=F.useRef(null),Q=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=F.useRef(null),se=F.useRef(!1),te=F.useCallback(S=>{A(ge=>{var pe;return(pe=ge.find(me=>me.id===S.id))!=null&&pe.delete||Wt.dismiss(S.id),ge.filter(({id:me})=>me!==S.id)})},[]);return F.useEffect(()=>Wt.subscribe(S=>{if(S.dismiss){requestAnimationFrame(()=>{A(ge=>ge.map(pe=>pe.id===S.id?{...pe,delete:!0}:pe))});return}setTimeout(()=>{qh.flushSync(()=>{A(ge=>{const pe=ge.findIndex(me=>me.id===S.id);return pe!==-1?[...ge.slice(0,pe),{...ge[pe],...S},...ge.slice(pe+1)]:[S,...ge]})})})}),[v]),F.useEffect(()=>{if(h!=="system"){U(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const S=window.matchMedia("(prefers-color-scheme: dark)");try{S.addEventListener("change",({matches:ge})=>{U(ge?"dark":"light")})}catch{S.addListener(({matches:pe})=>{try{U(pe?"dark":"light")}catch(me){console.error(me)}})}},[h]),F.useEffect(()=>{v.length<=1&&w(!1)},[v]),F.useEffect(()=>{const S=ge=>{var pe;if(a.every(X=>ge[X]||ge.code===X)){var qe;w(!0),(qe=G.current)==null||qe.focus()}ge.code==="Escape"&&(document.activeElement===G.current||(pe=G.current)!=null&&pe.contains(document.activeElement))&&w(!1)};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[a]),F.useEffect(()=>{if(G.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,se.current=!1)}},[G.current]),F.createElement("section",{ref:n,"aria-label":`${D} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((S,ge)=>{var pe;const[me,qe]=S.split("-");return N.length?F.createElement("ol",{key:S,dir:y==="auto"?Pd():y,tabIndex:-1,ref:G,className:u,"data-sonner-toaster":!0,"data-sonner-theme":H,"data-y-position":me,"data-x-position":qe,style:{"--front-toast-height":`${((pe=R[0])==null?void 0:pe.height)||0}px`,"--width":`${N_}px`,"--gap":`${k}px`,...E,...B_(d,c)},onBlur:X=>{se.current&&!X.currentTarget.contains(X.relatedTarget)&&(se.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||se.current||(se.current=!0,_.current=X.relatedTarget)},onMouseEnter:()=>w(!0),onMouseMove:()=>w(!0),onMouseLeave:()=>{L||w(!1)},onDragEnd:()=>w(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},N.filter(X=>!X.position&&ge===0||X.position===S).map((X,ue)=>{var ke,Me;return F.createElement(M_,{key:X.id,icons:P,index:ue,toast:X,defaultRichColors:p,duration:(ke=b==null?void 0:b.duration)!=null?ke:m,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:i,visibleToasts:T,closeButton:(Me=b==null?void 0:b.closeButton)!=null?Me:l,interacting:L,position:S,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:te,toasts:N.filter(Ke=>Ke.position==X.position),heights:R.filter(Ke=>Ke.position==X.position),setHeights:W,expandByDefault:o,gap:k,expanded:j,swipeDirections:t.swipeDirections})})):null}))}),F_={success:(e,t)=>Yo.success(e,t),error:(e,t)=>Yo.error(e,t),info:(e,t)=>Yo.info(e,t)},H_=x.createContext(F_);function cM(){return x.useContext(H_)}function Md({className:e,style:t,...n}){return g.jsx("div",{...n,className:Px("rounded-md",e),style:{backgroundColor:"var(--ds-gray-200)",...t}})}const Us=(function(e){if(e==null)return $_;if(typeof e=="function")return go(e);if(typeof e=="object")return Array.isArray(e)?U_(e):j_(e);if(typeof e=="string")return z_(e);throw new Error("Expected function, string, or object as test")});function U_(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Us(e[n]);return go(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function j_(e){const t=e;return go(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function z_(e){return go(t);function t(n){return n&&n.type===e}}function go(e){return t;function t(n,r,i){return!!(V_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $_(){return!0}function V_(e){return e!==null&&typeof e=="object"&&"type"in e}const Xm=[],Yi=!0,Fl=!1,Gi="skip";function W_(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Us(i),a=r?-1:1;o(e,void 0,[])();function o(l,u,d){const c=l&&typeof l=="object"?l:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Xm,m,E,T;if((!t||s(l,u,d[d.length-1]||void 0))&&(p=Y_(n(l,d)),p[0]===Fl))return p;if("children"in l&&l.children){const b=l;if(b.children&&p[0]!==Gi)for(E=(r?b.children.length:-1)+a,T=d.concat(b);E>-1&&E<b.children.length;){const y=b.children[E];if(m=o(y,E,T)(),m[0]===Fl)return m;E=typeof m[1]=="number"?m[1]:E+a}}return p}}}function Y_(e){return Array.isArray(e)?e:typeof e=="number"?[Yi,e]:e==null?Xm:[e]}function Er(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),W_(e,s,o,i);function o(l,u){const d=u[u.length-1],c=d?d.children.indexOf(l):void 0;return a(l,c,d)}}const Ei={indicator:"indicator",textOnly:"text-only",remove:"remove"};function G_({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:s="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:o=Ei.indicator,imageBlockPolicy:l=Ei.indicator}){const u=t.length&&!t.every(c=>c==="*"),d=n.length&&!n.every(c=>c==="*");if(!e&&(u||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=J_(e,t,n,r,i,s,a,o,l);Qm(c),Er(c,h)}}function Bd(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 q_(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const K_=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),X_=new Set(["javascript:","data:","file:","vbscript:"]);function Fd(e,t,n,r=!1,i=!1,s=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&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 d=e.substring(5);if(d&&d.length>0&&d!=="invalid")return e}}catch{return null}return null}const a=Bd(e,n);if(!a||X_.has(a.protocol)||!(K_.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const l=q_(e);return a&&t.some(u=>{const d=Bd(u,n);return!d||d.origin!==a.origin?!1:a.href.startsWith(d.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 Qm(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Qm(t)}}const Go=Symbol("node-seen");function Q_(e,t,n){return t===Ei.remove?{type:"remove"}:t===Ei.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 Z_(e,t,n){if(t===Ei.remove)return{type:"remove"};if(t===Ei.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 J_=(e,t,n,r,i,s,a,o,l)=>{const u=(d,c,h)=>{if(d.type!=="element"||d[Go])return Yi;if(d.tagName==="a"){const p=Fd(d.properties.href,t,e,!1,!1,i);if(p===null){if(d[Go]=!0,Er(d,u),h&&typeof c=="number"){const m=Q_(d,o,a);if(m.type==="remove")return h.children.splice(c,1),[Gi,c];h.children[c]=m.element}return Gi}else return d.properties.href=p,d.properties.target="_blank",d.properties.rel="noopener noreferrer",Yi}if(d.tagName==="img"){const p=Fd(d.properties.src,n,e,r,!0,i);if(p===null){if(d[Go]=!0,Er(d,u),h&&typeof c=="number"){const m=Z_(d,l,s);if(m.type==="remove")return h.children.splice(c,1),[Gi,c];h.children[c]=m.element}return Gi}else return d.properties.src=p,Yi}return Yi};return u},Zm=-1,bo=0,es=1,Wa=2,Gu=3,qu=4,Ku=5,Xu=6,Jm=7,e0=8,Hd=typeof self=="object"?self:globalThis,ek=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case bo:case Zm:return n(a,i);case es:{const o=n([],i);for(const l of a)o.push(r(l));return o}case Wa:{const o=n({},i);for(const[l,u]of a)o[r(l)]=r(u);return o}case Gu:return n(new Date(a),i);case qu:{const{source:o,flags:l}=a;return n(new RegExp(o,l),i)}case Ku:{const o=n(new Map,i);for(const[l,u]of a)o.set(r(l),r(u));return o}case Xu:{const o=n(new Set,i);for(const l of a)o.add(r(l));return o}case Jm:{const{name:o,message:l}=a;return n(new Hd[o](l),i)}case e0:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new Hd[s](a),i)};return r},Ud=e=>ek(new Map,e)(0),ti="",{toString:tk}={},{keys:nk}=Object,Li=e=>{const t=typeof e;if(t!=="object"||!e)return[bo,t];const n=tk.call(e).slice(8,-1);switch(n){case"Array":return[es,ti];case"Object":return[Wa,ti];case"Date":return[Gu,ti];case"RegExp":return[qu,ti];case"Map":return[Ku,ti];case"Set":return[Xu,ti];case"DataView":return[es,n]}return n.includes("Array")?[es,n]:n.includes("Error")?[Jm,n]:[Wa,n]},la=([e,t])=>e===bo&&(t==="function"||t==="symbol"),rk=(e,t,n,r)=>{const i=(a,o)=>{const l=r.push(a)-1;return n.set(o,l),l},s=a=>{if(n.has(a))return n.get(a);let[o,l]=Li(a);switch(o){case bo:{let d=a;switch(l){case"bigint":o=e0,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return i([Zm],a)}return i([o,d],a)}case es:{if(l){let h=a;return l==="DataView"?h=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(a)),i([l,[...h]],a)}const d=[],c=i([o,d],a);for(const h of a)d.push(s(h));return c}case Wa:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],c=i([o,d],a);for(const h of nk(a))(e||!la(Li(a[h])))&&d.push([s(h),s(a[h])]);return c}case Gu:return i([o,a.toISOString()],a);case qu:{const{source:d,flags:c}=a;return i([o,{source:d,flags:c}],a)}case Ku:{const d=[],c=i([o,d],a);for(const[h,p]of a)(e||!(la(Li(h))||la(Li(p))))&&d.push([s(h),s(p)]);return c}case Xu:{const d=[],c=i([o,d],a);for(const h of a)(e||!la(Li(h)))&&d.push(s(h));return c}}const{message:u}=a;return i([o,{name:l,message:u}],a)};return s},jd=(e,{json:t,lossy:n}={})=>{const r=[];return rk(!(t||n),!!t,new Map,r)(e),r},jr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ud(jd(e,t)):structuredClone(e):(e,t)=>Ud(jd(e,t));let js=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};js.prototype.normal={};js.prototype.property={};js.prototype.space=void 0;function t0(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new js(n,r,t)}function Cs(e){return e.toLowerCase()}let qt=class{constructor(t,n){this.attribute=n,this.property=t}};qt.prototype.attribute="";qt.prototype.booleanish=!1;qt.prototype.boolean=!1;qt.prototype.commaOrSpaceSeparated=!1;qt.prototype.commaSeparated=!1;qt.prototype.defined=!1;qt.prototype.mustUseProperty=!1;qt.prototype.number=!1;qt.prototype.overloadedBoolean=!1;qt.prototype.property="";qt.prototype.spaceSeparated=!1;qt.prototype.space=void 0;let ik=0;const Se=Xr(),pt=Xr(),Hl=Xr(),ne=Xr(),et=Xr(),hi=Xr(),Jt=Xr();function Xr(){return 2**++ik}const Ul=Object.freeze(Object.defineProperty({__proto__:null,boolean:Se,booleanish:pt,commaOrSpaceSeparated:Jt,commaSeparated:hi,number:ne,overloadedBoolean:Hl,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),qo=Object.keys(Ul);let Qu=class extends qt{constructor(t,n,r,i){let s=-1;if(super(t,n),zd(this,"space",i),typeof r=="number")for(;++s<qo.length;){const a=qo[s];zd(this,qo[s],(r&Ul[a])===Ul[a])}}};Qu.prototype.defined=!0;function zd(e,t,n){n&&(e[t]=n)}function Ci(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Qu(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Cs(r)]=r,n[Cs(s.attribute)]=r}return new js(t,n,e.space)}const n0=Ci({properties:{ariaActiveDescendant:null,ariaAtomic:pt,ariaAutoComplete:null,ariaBusy:pt,ariaChecked:pt,ariaColCount:ne,ariaColIndex:ne,ariaColSpan:ne,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:pt,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:pt,ariaFlowTo:et,ariaGrabbed:pt,ariaHasPopup:null,ariaHidden:pt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:ne,ariaLive:null,ariaModal:pt,ariaMultiLine:pt,ariaMultiSelectable:pt,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:ne,ariaPressed:pt,ariaReadOnly:pt,ariaRelevant:null,ariaRequired:pt,ariaRoleDescription:et,ariaRowCount:ne,ariaRowIndex:ne,ariaRowSpan:ne,ariaSelected:pt,ariaSetSize:ne,ariaSort:null,ariaValueMax:ne,ariaValueMin:ne,ariaValueNow:ne,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function r0(e,t){return t in e?e[t]:t}function i0(e,t){return r0(e,t.toLowerCase())}const sk=Ci({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:hi,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:Se,allowPaymentRequest:Se,allowUserMedia:Se,alt:null,as:null,async:Se,autoCapitalize:null,autoComplete:et,autoFocus:Se,autoPlay:Se,blocking:et,capture:null,charSet:null,checked:Se,cite:null,className:et,cols:ne,colSpan:null,content:null,contentEditable:pt,controls:Se,controlsList:et,coords:ne|hi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Se,defer:Se,dir:null,dirName:null,disabled:Se,download:Hl,draggable:pt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Se,formTarget:null,headers:et,height:ne,hidden:Hl,high:ne,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:Se,inputMode:null,integrity:null,is:null,isMap:Se,itemId:null,itemProp:et,itemRef:et,itemScope:Se,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Se,low:ne,manifest:null,max:null,maxLength:ne,media:null,method:null,min:null,minLength:ne,multiple:Se,muted:Se,name:null,nonce:null,noModule:Se,noValidate:Se,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:Se,optimum:ne,pattern:null,ping:et,placeholder:null,playsInline:Se,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Se,referrerPolicy:null,rel:et,required:Se,reversed:Se,rows:ne,rowSpan:ne,sandbox:et,scope:null,scoped:Se,seamless:Se,selected:Se,shadowRootClonable:Se,shadowRootDelegatesFocus:Se,shadowRootMode:null,shape:null,size:ne,sizes:null,slot:null,span:ne,spellCheck:pt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ne,step:null,style:null,tabIndex:ne,target:null,title:null,translate:null,type:null,typeMustMatch:Se,useMap:null,value:pt,width:ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:ne,borderColor:null,bottomMargin:ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Se,declare:Se,event:null,face:null,frame:null,frameBorder:null,hSpace:ne,leftMargin:ne,link:null,longDesc:null,lowSrc:null,marginHeight:ne,marginWidth:ne,noResize:Se,noHref:Se,noShade:Se,noWrap:Se,object:null,profile:null,prompt:null,rev:null,rightMargin:ne,rules:null,scheme:null,scrolling:pt,standby:null,summary:null,text:null,topMargin:ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ne,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Se,disableRemotePlayback:Se,prefix:null,property:null,results:ne,security:null,unselectable:null},space:"html",transform:i0}),ak=Ci({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",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:Jt,accentHeight:ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ne,amplitude:ne,arabicForm:null,ascent:ne,attributeName:null,attributeType:null,azimuth:ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ne,by:null,calcMode:null,capHeight:ne,className:et,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:ne,diffuseConstant:ne,direction:null,display:null,dur:null,divisor:ne,dominantBaseline:null,download:Se,dx:null,dy:null,edgeMode:null,editable:null,elevation:ne,enableBackground:null,end:null,event:null,exponent:ne,externalResourcesRequired:null,fill:null,fillOpacity:ne,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:hi,g2:hi,glyphName:hi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ne,horizOriginX:ne,horizOriginY:ne,id:null,ideographic:ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ne,k:ne,k1:ne,k2:ne,k3:ne,k4:ne,kernelMatrix:Jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ne,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:ne,overlineThickness:ne,paintOrder:null,panose1:null,path:null,pathLength:ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ne,pointsAtY:ne,pointsAtZ:ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jt,rev:Jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jt,requiredFeatures:Jt,requiredFonts:Jt,requiredFormats:Jt,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:ne,specularExponent:ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ne,strikethroughThickness:ne,string:null,stroke:null,strokeDashArray:Jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ne,strokeOpacity:ne,strokeWidth:null,style:null,surfaceScale:ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jt,tabIndex:ne,tableValues:null,target:null,targetX:ne,targetY:ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ne,underlineThickness:ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ne,values:null,vAlphabetic:ne,vMathematical:ne,vectorEffect:null,vHanging:ne,vIdeographic:ne,version:null,vertAdvY:ne,vertOriginX:ne,vertOriginY:ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:r0}),s0=Ci({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()}}),a0=Ci({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:i0}),o0=Ci({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ok={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"},lk=/[A-Z]/g,$d=/-[a-z]/g,uk=/^data[-\w.:]+$/i;function Zu(e,t){const n=Cs(t);let r=t,i=qt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uk.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace($d,dk);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!$d.test(s)){let a=s.replace(lk,ck);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Qu}return new i(r,t)}function ck(e){return"-"+e.toLowerCase()}function dk(e){return e.charAt(1).toUpperCase()}const Eo=t0([n0,sk,s0,a0,o0],"html"),Ai=t0([n0,ak,s0,a0,o0],"svg");function Vd(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function l0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Wd=/[#.]/g;function fk(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){Wd.lastIndex=i;const o=Wd.exec(n),l=n.slice(i,o?o.index:n.length);l&&(s?s==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:a=l,i+=l.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function Yd(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function u0(e){return e.join(" ").trim()}function c0(e,t,n){const r=n?gk(n):void 0;function i(s,a,...o){let l;if(s==null){l={type:"root",children:[]};const u=a;o.unshift(u)}else{l=fk(s,t);const u=l.tagName.toLowerCase(),d=r?r.get(u):void 0;if(l.tagName=d||u,hk(a))o.unshift(a);else for(const[c,h]of Object.entries(a))pk(e,l.properties,c,h)}for(const u of o)jl(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function hk(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 i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function pk(e,t,n,r){const i=Zu(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Yd(r):i.commaSeparated?s=Vd(r):i.commaOrSpaceSeparated?s=Yd(Vd(r).join(" ")):s=Gd(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?mk(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(Gd(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function jl(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)jl(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?jl(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Gd(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Cs(n)===Cs(t)))return!0}return n}function mk(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function gk(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const bk=["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"],Ek=c0(Eo,"div"),Tk=c0(Ai,"g",bk);function xk(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const l=qd(t,n[a-1]);o=l===-1?t.length+1:l+1,n[a]=o}if(o>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const o=n[n.length-1],l=qd(t,o),u=l===-1?t.length+1:l+1;if(o===u)break;n.push(u)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function qd(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
53
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Pr={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/"},d0={}.hasOwnProperty,yk=Object.prototype;function _k(e,t){const n=t||{};return Ju({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ai:Eo,verbose:n.verbose||!1},e)}function Ju(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},va(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:f0(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=xk(s),o=a.toPoint(0),l=a.toPoint(s.length);n.position={start:o,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},va(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},va(e,r,n),n}default:return n=kk(e,t),n}}function f0(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ju(e,t[n]);r.push(i)}return r}function kk(e,t){const n=e.schema;e.schema=t.namespaceURI===Pr.svg?Ai:Eo;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],l=(o.prefix?o.prefix+":":"")+o.name;d0.call(yk,l)||(i[l]=o.value)}const a=(e.schema.space==="svg"?Tk:Ek)(t.tagName,i,f0(e,t.childNodes));if(va(e,t,a),a.tagName==="template"){const o=t,l=o.sourceCodeLocation,u=l&&l.startTag&&li(l.startTag),d=l&&l.endTag&&li(l.endTag),c=Ju(e,o.content);u&&d&&e.file&&(c.position={start:u.end,end:d.start}),a.content=c}return e.schema=n,a}function va(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=wk(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function wk(e,t,n){const r=li(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)d0.call(n.attrs,a)&&(s[Zu(e.schema,a).property]=li(n.attrs[a]));n.startTag;const o=li(n.startTag),l=n.endTag?li(n.endTag):void 0,u={opening:o};l&&(u.closing=l),u.properties=s,t.data={position:u}}}return r}function li(e){const t=Kd({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Kd({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Kd(e){return e.line&&e.column?e:void 0}class zs{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}zs.prototype.property={};zs.prototype.normal={};zs.prototype.space=null;function h0(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new zs(n,r,t)}function zl(e){return e.toLowerCase()}class Tn{constructor(t,n){this.property=t,this.attribute=n}}Tn.prototype.space=null;Tn.prototype.boolean=!1;Tn.prototype.booleanish=!1;Tn.prototype.overloadedBoolean=!1;Tn.prototype.number=!1;Tn.prototype.commaSeparated=!1;Tn.prototype.spaceSeparated=!1;Tn.prototype.commaOrSpaceSeparated=!1;Tn.prototype.mustUseProperty=!1;Tn.prototype.defined=!1;let Ck=0;const Ce=Qr(),mt=Qr(),p0=Qr(),re=Qr(),tt=Qr(),pi=Qr(),en=Qr();function Qr(){return 2**++Ck}const $l=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ce,booleanish:mt,commaOrSpaceSeparated:en,commaSeparated:pi,number:re,overloadedBoolean:p0,spaceSeparated:tt},Symbol.toStringTag,{value:"Module"})),Ko=Object.keys($l);class ec extends Tn{constructor(t,n,r,i){let s=-1;if(super(t,n),Xd(this,"space",i),typeof r=="number")for(;++s<Ko.length;){const a=Ko[s];Xd(this,Ko[s],(r&$l[a])===$l[a])}}}ec.prototype.defined=!0;function Xd(e,t,n){n&&(e[t]=n)}const Ak={}.hasOwnProperty;function Si(e){const t={},n={};let r;for(r in e.properties)if(Ak.call(e.properties,r)){const i=e.properties[r],s=new ec(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[zl(r)]=r,n[zl(s.attribute)]=r}return new zs(t,n,e.space)}const m0=Si({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),g0=Si({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function b0(e,t){return t in e?e[t]:t}function E0(e,t){return b0(e,t.toLowerCase())}const T0=Si({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:E0,properties:{xmlns:null,xmlnsXLink:null}}),x0=Si({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:mt,ariaAutoComplete:null,ariaBusy:mt,ariaChecked:mt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:tt,ariaCurrent:null,ariaDescribedBy:tt,ariaDetails:null,ariaDisabled:mt,ariaDropEffect:tt,ariaErrorMessage:null,ariaExpanded:mt,ariaFlowTo:tt,ariaGrabbed:mt,ariaHasPopup:null,ariaHidden:mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tt,ariaLevel:re,ariaLive:null,ariaModal:mt,ariaMultiLine:mt,ariaMultiSelectable:mt,ariaOrientation:null,ariaOwns:tt,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:mt,ariaReadOnly:mt,ariaRelevant:null,ariaRequired:mt,ariaRoleDescription:tt,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:mt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null}}),Sk=Si({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:E0,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pi,acceptCharset:tt,accessKey:tt,action:null,allow:null,allowFullScreen:Ce,allowPaymentRequest:Ce,allowUserMedia:Ce,alt:null,as:null,async:Ce,autoCapitalize:null,autoComplete:tt,autoFocus:Ce,autoPlay:Ce,blocking:tt,capture:null,charSet:null,checked:Ce,cite:null,className:tt,cols:re,colSpan:null,content:null,contentEditable:mt,controls:Ce,controlsList:tt,coords:re|pi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ce,defer:Ce,dir:null,dirName:null,disabled:Ce,download:p0,draggable:mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ce,formTarget:null,headers:tt,height:re,hidden:Ce,high:re,href:null,hrefLang:null,htmlFor:tt,httpEquiv:tt,id:null,imageSizes:null,imageSrcSet:null,inert:Ce,inputMode:null,integrity:null,is:null,isMap:Ce,itemId:null,itemProp:tt,itemRef:tt,itemScope:Ce,itemType:tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ce,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Ce,muted:Ce,name:null,nonce:null,noModule:Ce,noValidate:Ce,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:Ce,optimum:re,pattern:null,ping:tt,placeholder:null,playsInline:Ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ce,referrerPolicy:null,rel:tt,required:Ce,reversed:Ce,rows:re,rowSpan:re,sandbox:tt,scope:null,scoped:Ce,seamless:Ce,selected:Ce,shadowRootClonable:Ce,shadowRootDelegatesFocus:Ce,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Ce,useMap:null,value:mt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tt,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ce,declare:Ce,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Ce,noHref:Ce,noShade:Ce,noWrap:Ce,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:mt,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ce,disableRemotePlayback:Ce,prefix:null,property:null,results:re,security:null,unselectable:null}}),Ik=Si({space:"svg",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",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"},transform:b0,properties:{about:en,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:tt,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:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,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:pi,g2:pi,glyphName:pi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:en,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,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:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:en,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:en,rev:en,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:en,requiredFeatures:en,requiredFonts:en,requiredFormats:en,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:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:en,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:en,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:en,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),vk=/^data[-\w.:]+$/i,Qd=/-[a-z]/g,Rk=/[A-Z]/g;function Nk(e,t){const n=zl(t);let r=t,i=Tn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vk.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Qd,Lk);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Qd.test(s)){let a=s.replace(Rk,Ok);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=ec}return new i(r,t)}function Ok(e){return"-"+e.toLowerCase()}function Lk(e){return e.charAt(1).toUpperCase()}const Dk=h0([g0,m0,T0,x0,Sk],"html"),y0=h0([g0,m0,T0,x0,Ik],"svg"),Zd={}.hasOwnProperty;function _0(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const o=r.handlers;if(i&&Zd.call(i,e)){const l=String(i[e]);a=Zd.call(o,l)?o[l]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Pk={},Mk={}.hasOwnProperty,k0=_0("type",{handlers:{root:Fk,element:$k,text:jk,comment:zk,doctype:Uk}});function Bk(e,t){const r=(t||Pk).space;return k0(e,r==="svg"?y0:Dk)}function Fk(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=tc(e.children,n,t),Ii(e,n),n}function Hk(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=tc(e.children,n,t),Ii(e,n),n}function Uk(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ii(e,t),t}function jk(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ii(e,t),t}function zk(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ii(e,t),t}function $k(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=y0);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&Mk.call(e.properties,s)){const l=Vk(r,s,e.properties[s]);l&&i.push(l)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Pr[a],childNodes:[],parentNode:null};return o.childNodes=tc(e.children,o,r),Ii(e,o),e.tagName==="template"&&e.content&&(o.content=Hk(e.content,r)),o}function Vk(e,t,n){const r=Nk(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?l0(n):u0(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Pr[r.space]}return i}function tc(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=k0(e[r],n);s.parentNode=t,i.push(s)}return i}function Ii(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 Wk=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Yk=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]),at="�";var C;(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"})(C||(C={}));const $t={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function w0(e){return e>=55296&&e<=57343}function Gk(e){return e>=56320&&e<=57343}function qk(e,t){return(e-55296)*1024+9216+t}function C0(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function A0(e){return e>=64976&&e<=65007||Yk.has(e)}var Y;(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"})(Y||(Y={}));const Kk=65536;class Xk{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=Kk,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:i,offset:s}=this,a=i+n,o=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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(Gk(n))return this.pos++,this._addGap(),qk(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,C.EOF;return this._err(Y.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,C.EOF;const r=this.html.charCodeAt(n);return r===C.CARRIAGE_RETURN?C.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,C.EOF;let t=this.html.charCodeAt(this.pos);return t===C.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,C.LINE_FEED):t===C.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,w0(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===C.LINE_FEED||t===C.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){C0(t)?this._err(Y.controlCharacterInInputStream):A0(t)&&this._err(Y.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Oe;(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"})(Oe||(Oe={}));function S0(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 Qk=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୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢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;怳Ādp໩໮uct;戏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ǣጓ\0጖y;䐎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Ā;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀ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Ā;e᜚᜜lƀ;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\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩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ↄⅪ←ٖ↛ǰ↉\0↎proø₞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;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\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\0⹻m;櫳;櫽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))),Zk=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 Jk(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Zk.get(e))!==null&&t!==void 0?t:e}var At;(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"})(At||(At={}));const ew=32;var hr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(hr||(hr={}));function Vl(e){return e>=At.ZERO&&e<=At.NINE}function tw(e){return e>=At.UPPER_A&&e<=At.UPPER_F||e>=At.LOWER_A&&e<=At.LOWER_F}function nw(e){return e>=At.UPPER_A&&e<=At.UPPER_Z||e>=At.LOWER_A&&e<=At.LOWER_Z||Vl(e)}function rw(e){return e===At.EQUALS||nw(e)}var wt;(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"})(wt||(wt={}));var Qn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Qn||(Qn={}));class iw{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Qn.Strict}startEntity(t){this.decodeMode=t,this.state=wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case wt.EntityStart:return t.charCodeAt(n)===At.NUM?(this.state=wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=wt.NamedEntity,this.stateNamedEntity(t,n));case wt.NumericStart:return this.stateNumericStart(t,n);case wt.NumericDecimal:return this.stateNumericDecimal(t,n);case wt.NumericHex:return this.stateNumericHex(t,n);case wt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|ew)===At.LOWER_X?(this.state=wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=wt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Vl(i)||tw(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Vl(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,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===At.SEMI)this.consumed+=1;else if(this.decodeMode===Qn.Strict)return 0;return this.emitCodePoint(Jk(this.result),this.consumed),this.errors&&(t!==At.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&hr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=sw(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Qn.Attribute&&(s===0||rw(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&hr.VALUE_LENGTH)>>14,s!==0){if(a===At.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Qn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&hr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~hr.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case wt.NamedEntity:return this.result!==0&&(this.decodeMode!==Qn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case wt.NumericDecimal:return this.emitNumericEntity(0,2);case wt.NumericHex:return this.emitNumericEntity(0,3);case wt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case wt.EntityStart:return 0}}}function sw(e,t,n,r){const i=(t&hr.BRANCH_LENGTH)>>7,s=t&hr.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const l=r-s;return l<0||l>=i?-1:e[n+l]-1}let a=n,o=a+i-1;for(;a<=o;){const l=a+o>>>1,u=e[l];if(u<r)a=l+1;else if(u>r)o=l-1;else return e[l+i]}return-1}var Z;(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/"})(Z||(Z={}));var Mr;(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"})(Mr||(Mr={}));var dn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(dn||(dn={}));var $;(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"})($||($={}));var f;(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"})(f||(f={}));const aw=new Map([[$.A,f.A],[$.ADDRESS,f.ADDRESS],[$.ANNOTATION_XML,f.ANNOTATION_XML],[$.APPLET,f.APPLET],[$.AREA,f.AREA],[$.ARTICLE,f.ARTICLE],[$.ASIDE,f.ASIDE],[$.B,f.B],[$.BASE,f.BASE],[$.BASEFONT,f.BASEFONT],[$.BGSOUND,f.BGSOUND],[$.BIG,f.BIG],[$.BLOCKQUOTE,f.BLOCKQUOTE],[$.BODY,f.BODY],[$.BR,f.BR],[$.BUTTON,f.BUTTON],[$.CAPTION,f.CAPTION],[$.CENTER,f.CENTER],[$.CODE,f.CODE],[$.COL,f.COL],[$.COLGROUP,f.COLGROUP],[$.DD,f.DD],[$.DESC,f.DESC],[$.DETAILS,f.DETAILS],[$.DIALOG,f.DIALOG],[$.DIR,f.DIR],[$.DIV,f.DIV],[$.DL,f.DL],[$.DT,f.DT],[$.EM,f.EM],[$.EMBED,f.EMBED],[$.FIELDSET,f.FIELDSET],[$.FIGCAPTION,f.FIGCAPTION],[$.FIGURE,f.FIGURE],[$.FONT,f.FONT],[$.FOOTER,f.FOOTER],[$.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[$.FORM,f.FORM],[$.FRAME,f.FRAME],[$.FRAMESET,f.FRAMESET],[$.H1,f.H1],[$.H2,f.H2],[$.H3,f.H3],[$.H4,f.H4],[$.H5,f.H5],[$.H6,f.H6],[$.HEAD,f.HEAD],[$.HEADER,f.HEADER],[$.HGROUP,f.HGROUP],[$.HR,f.HR],[$.HTML,f.HTML],[$.I,f.I],[$.IMG,f.IMG],[$.IMAGE,f.IMAGE],[$.INPUT,f.INPUT],[$.IFRAME,f.IFRAME],[$.KEYGEN,f.KEYGEN],[$.LABEL,f.LABEL],[$.LI,f.LI],[$.LINK,f.LINK],[$.LISTING,f.LISTING],[$.MAIN,f.MAIN],[$.MALIGNMARK,f.MALIGNMARK],[$.MARQUEE,f.MARQUEE],[$.MATH,f.MATH],[$.MENU,f.MENU],[$.META,f.META],[$.MGLYPH,f.MGLYPH],[$.MI,f.MI],[$.MO,f.MO],[$.MN,f.MN],[$.MS,f.MS],[$.MTEXT,f.MTEXT],[$.NAV,f.NAV],[$.NOBR,f.NOBR],[$.NOFRAMES,f.NOFRAMES],[$.NOEMBED,f.NOEMBED],[$.NOSCRIPT,f.NOSCRIPT],[$.OBJECT,f.OBJECT],[$.OL,f.OL],[$.OPTGROUP,f.OPTGROUP],[$.OPTION,f.OPTION],[$.P,f.P],[$.PARAM,f.PARAM],[$.PLAINTEXT,f.PLAINTEXT],[$.PRE,f.PRE],[$.RB,f.RB],[$.RP,f.RP],[$.RT,f.RT],[$.RTC,f.RTC],[$.RUBY,f.RUBY],[$.S,f.S],[$.SCRIPT,f.SCRIPT],[$.SEARCH,f.SEARCH],[$.SECTION,f.SECTION],[$.SELECT,f.SELECT],[$.SOURCE,f.SOURCE],[$.SMALL,f.SMALL],[$.SPAN,f.SPAN],[$.STRIKE,f.STRIKE],[$.STRONG,f.STRONG],[$.STYLE,f.STYLE],[$.SUB,f.SUB],[$.SUMMARY,f.SUMMARY],[$.SUP,f.SUP],[$.TABLE,f.TABLE],[$.TBODY,f.TBODY],[$.TEMPLATE,f.TEMPLATE],[$.TEXTAREA,f.TEXTAREA],[$.TFOOT,f.TFOOT],[$.TD,f.TD],[$.TH,f.TH],[$.THEAD,f.THEAD],[$.TITLE,f.TITLE],[$.TR,f.TR],[$.TRACK,f.TRACK],[$.TT,f.TT],[$.U,f.U],[$.UL,f.UL],[$.SVG,f.SVG],[$.VAR,f.VAR],[$.WBR,f.WBR],[$.XMP,f.XMP]]);function vi(e){var t;return(t=aw.get(e))!==null&&t!==void 0?t:f.UNKNOWN}const ee=f,ow={[Z.HTML]:new Set([ee.ADDRESS,ee.APPLET,ee.AREA,ee.ARTICLE,ee.ASIDE,ee.BASE,ee.BASEFONT,ee.BGSOUND,ee.BLOCKQUOTE,ee.BODY,ee.BR,ee.BUTTON,ee.CAPTION,ee.CENTER,ee.COL,ee.COLGROUP,ee.DD,ee.DETAILS,ee.DIR,ee.DIV,ee.DL,ee.DT,ee.EMBED,ee.FIELDSET,ee.FIGCAPTION,ee.FIGURE,ee.FOOTER,ee.FORM,ee.FRAME,ee.FRAMESET,ee.H1,ee.H2,ee.H3,ee.H4,ee.H5,ee.H6,ee.HEAD,ee.HEADER,ee.HGROUP,ee.HR,ee.HTML,ee.IFRAME,ee.IMG,ee.INPUT,ee.LI,ee.LINK,ee.LISTING,ee.MAIN,ee.MARQUEE,ee.MENU,ee.META,ee.NAV,ee.NOEMBED,ee.NOFRAMES,ee.NOSCRIPT,ee.OBJECT,ee.OL,ee.P,ee.PARAM,ee.PLAINTEXT,ee.PRE,ee.SCRIPT,ee.SECTION,ee.SELECT,ee.SOURCE,ee.STYLE,ee.SUMMARY,ee.TABLE,ee.TBODY,ee.TD,ee.TEMPLATE,ee.TEXTAREA,ee.TFOOT,ee.TH,ee.THEAD,ee.TITLE,ee.TR,ee.TRACK,ee.UL,ee.WBR,ee.XMP]),[Z.MATHML]:new Set([ee.MI,ee.MO,ee.MN,ee.MS,ee.MTEXT,ee.ANNOTATION_XML]),[Z.SVG]:new Set([ee.TITLE,ee.FOREIGN_OBJECT,ee.DESC]),[Z.XLINK]:new Set,[Z.XML]:new Set,[Z.XMLNS]:new Set},Wl=new Set([ee.H1,ee.H2,ee.H3,ee.H4,ee.H5,ee.H6]);$.STYLE,$.SCRIPT,$.XMP,$.IFRAME,$.NOEMBED,$.NOFRAMES,$.PLAINTEXT;var I;(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"})(I||(I={}));const ht={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function lw(e){return e>=C.DIGIT_0&&e<=C.DIGIT_9}function qi(e){return e>=C.LATIN_CAPITAL_A&&e<=C.LATIN_CAPITAL_Z}function uw(e){return e>=C.LATIN_SMALL_A&&e<=C.LATIN_SMALL_Z}function ur(e){return uw(e)||qi(e)}function Jd(e){return ur(e)||lw(e)}function ua(e){return e+32}function I0(e){return e===C.SPACE||e===C.LINE_FEED||e===C.TABULATION||e===C.FORM_FEED}function ef(e){return I0(e)||e===C.SOLIDUS||e===C.GREATER_THAN_SIGN}function cw(e){return e===C.NULL?Y.nullCharacterReference:e>1114111?Y.characterReferenceOutsideUnicodeRange:w0(e)?Y.surrogateCharacterReference:A0(e)?Y.noncharacterCharacterReference:C0(e)||e===C.CARRIAGE_RETURN?Y.controlCharacterReference:null}class dw{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=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Xk(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new iw(Qk,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Y.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Y.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=cw(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.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:Oe.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Oe.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Oe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Oe.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(S0(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Y.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=vi(t.tagName),t.type===Oe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Y.endTagWithAttributes),t.selfClosing&&this._err(Y.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 Oe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Oe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Oe.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:Oe.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=I0(t)?Oe.WHITESPACE_CHARACTER:t===C.NULL?Oe.NULL_CHARACTER:Oe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Oe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Qn.Attribute:Qn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitCodePoint(t);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case C.AMPERSAND:{this._startCharacterReference();break}case C.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case C.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ur(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case C.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case C.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case C.QUESTION_MARK:{this._err(Y.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case C.EOF:{this._err(Y.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Y.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ur(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case C.GREATER_THAN_SIGN:{this._err(Y.missingEndTagName),this.state=I.DATA;break}case C.EOF:{this._err(Y.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Y.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.tagName+=at;break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(qi(t)?ua(t):t)}}_stateRcdataLessThanSign(t){t===C.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ur(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case C.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case C.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===C.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ur(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case C.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case C.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ur(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===C.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===C.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===C.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ur(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ur(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith($t.SCRIPT,!1)&&ef(this.preprocessor.peek($t.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<$t.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(at);break}case C.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===C.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith($t.SCRIPT,!1)&&ef(this.preprocessor.peek($t.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<$t.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._err(Y.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:{this._err(Y.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.name+=at;break}default:this.currentAttr.name+=String.fromCodePoint(qi(t)?ua(t):t)}}_stateAfterAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case C.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case C.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=at;break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case C.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=at;break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=at;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:case C.EQUALS_SIGN:case C.GRAVE_ACCENT:{this._err(Y.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this._err(Y.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case C.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(Y.eofInTag),this._emitEOFToken();break}default:this._err(Y.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case C.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.data+=at;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch($t.DASH_DASH,!0)?(this._createCommentToken($t.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch($t.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation($t.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch($t.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(Y.cdataInHtmlContent),this._createCommentToken($t.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Y.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case C.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case C.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.data+=at;break}case C.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case C.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case C.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===C.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===C.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==C.GREATER_THAN_SIGN&&t!==C.EOF&&this._err(Y.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case C.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case C.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case C.HYPHEN_MINUS:{n.data+="-";break}case C.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case C.GREATER_THAN_SIGN:{this._err(Y.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(Y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case C.EOF:{this._err(Y.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(qi(t))this._createDoctypeToken(String.fromCharCode(ua(t))),this.state=I.DOCTYPE_NAME;else switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.NULL:{this._err(Y.unexpectedNullCharacter),this._createDoctypeToken(at),this.state=I.DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.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=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.name+=at;break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(qi(t)?ua(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch($t.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch($t.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Y.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(Y.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(Y.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.publicId+=at;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.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 C.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.publicId+=at;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case C.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.QUOTATION_MARK:{this._err(Y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(Y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(Y.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(Y.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(Y.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.systemId+=at;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.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 C.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(Y.unexpectedNullCharacter),n.systemId+=at;break}case C.GREATER_THAN_SIGN:{this._err(Y.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.EOF:{this._err(Y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Y.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case C.NULL:{this._err(Y.unexpectedNullCharacter);break}case C.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case C.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case C.EOF:{this._err(Y.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===C.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case C.GREATER_THAN_SIGN:{this.state=I.DATA;break}case C.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.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(C.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Jd(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Jd(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===C.SEMICOLON&&this._err(Y.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const v0=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),tf=new Set([...v0,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),Ya=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),fw=new Set([...Ya,f.OL,f.UL]),hw=new Set([...Ya,f.BUTTON]),nf=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),rf=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),pw=new Set([f.TR,f.TEMPLATE,f.HTML]),mw=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),gw=new Set([f.TABLE,f.TEMPLATE,f.HTML]),bw=new Set([f.TD,f.TH]);class Ew{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=f.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===f.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Z.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 i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===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])!==Z.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(Wl,Z.HTML)}popUntilTableCellPopped(){this.popUntilPopped(bw,Z.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(gw,Z.HTML)}clearBackToTableBodyContext(){this.clearBackTo(mw,Z.HTML)}clearBackToTableRowContext(){this.clearBackTo(pw,Z.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]===f.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]===f.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case Z.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case Z.SVG:{if(rf.has(i))return!1;break}case Z.MATHML:{if(nf.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ya)}hasInListItemScope(t){return this.hasInDynamicScope(t,fw)}hasInButtonScope(t){return this.hasInDynamicScope(t,hw)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Z.HTML:{if(Wl.has(n))return!0;if(Ya.has(n))return!1;break}case Z.SVG:{if(rf.has(n))return!1;break}case Z.MATHML:{if(nf.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Z.HTML)switch(this.tagIDs[n]){case t:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Z.HTML)switch(this.tagIDs[t]){case f.TBODY:case f.THEAD:case f.TFOOT:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Z.HTML)switch(this.tagIDs[n]){case t:return!0;case f.OPTION:case f.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&v0.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&tf.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&tf.has(this.currentTagId);)this.pop()}}const Xo=3;var Fn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Fn||(Fn={}));const sf={type:Fn.Marker};class Tw{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Fn.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===s&&this.treeAdapter.getNamespaceURI(u)===a){const d=this.treeAdapter.getAttrList(u);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Xo)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Xo)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(l=>i.get(l.name)===l.value)&&(s+=1,s>=Xo&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(sf)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Fn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Fn.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(sf);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Fn.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Fn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Fn.Element&&n.element===t)}}const cr={createDocument(){return{nodeName:"#document",mode:dn.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 i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};cr.appendChild(e,s)}},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(cr.isTextNode(n)){n.value+=t;return}}cr.appendChild(e,cr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&cr.isTextNode(r)?r.value+=t:cr.insertBefore(e,cr.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}}},R0="html",xw="about:legacy-compat",yw="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",N0=["+//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//"],_w=[...N0,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],kw=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),O0=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],ww=[...O0,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function af(e,t){return t.some(n=>e.startsWith(n))}function Cw(e){return e.name===R0&&e.publicId===null&&(e.systemId===null||e.systemId===xw)}function Aw(e){if(e.name!==R0)return dn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===yw)return dn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),kw.has(n))return dn.QUIRKS;let r=t===null?_w:N0;if(af(n,r))return dn.QUIRKS;if(r=t===null?O0:ww,af(n,r))return dn.LIMITED_QUIRKS}return dn.NO_QUIRKS}const of={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Sw="definitionurl",Iw="definitionURL",vw=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])),Rw=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Z.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Z.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Z.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Z.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Z.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Z.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Z.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Z.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Z.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Z.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Z.XMLNS}]]),Nw=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])),Ow=new Set([f.B,f.BIG,f.BLOCKQUOTE,f.BODY,f.BR,f.CENTER,f.CODE,f.DD,f.DIV,f.DL,f.DT,f.EM,f.EMBED,f.H1,f.H2,f.H3,f.H4,f.H5,f.H6,f.HEAD,f.HR,f.I,f.IMG,f.LI,f.LISTING,f.MENU,f.META,f.NOBR,f.OL,f.P,f.PRE,f.RUBY,f.S,f.SMALL,f.SPAN,f.STRONG,f.STRIKE,f.SUB,f.SUP,f.TABLE,f.TT,f.U,f.UL,f.VAR]);function Lw(e){const t=e.tagID;return t===f.FONT&&e.attrs.some(({name:r})=>r===Mr.COLOR||r===Mr.SIZE||r===Mr.FACE)||Ow.has(t)}function L0(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Sw){e.attrs[t].name=Iw;break}}function D0(e){for(let t=0;t<e.attrs.length;t++){const n=vw.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function nc(e){for(let t=0;t<e.attrs.length;t++){const n=Rw.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 Dw(e){const t=Nw.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=vi(e.tagName))}function Pw(e,t){return t===Z.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}function Mw(e,t,n){if(t===Z.MATHML&&e===f.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Mr.ENCODING){const i=n[r].value.toLowerCase();return i===of.TEXT_HTML||i===of.APPLICATION_XML}}return t===Z.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}function Bw(e,t,n,r){return(!r||r===Z.HTML)&&Mw(e,t,n)||(!r||r===Z.MATHML)&&Pw(e,t)}const Fw="hidden",Hw=8,Uw=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 jw={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},P0=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),lf={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:cr,onParseError:null};class uf{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,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={...lf,...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 dw(this.options,this),this.activeFormattingElements=new Tw(this.treeAdapter),this.fragmentContextID=r?vi(this.treeAdapter.getTagName(r)):f.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Ew(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={...lf,...n};t??(t=r.treeAdapter.createElement($.TEMPLATE,Z.HTML,[]));const i=r.treeAdapter.createElement("documentmock",Z.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===f.TEMPLATE&&s.tmplInsertionModeStack.unshift(O.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:jw,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===Z.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,Z.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=ht.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)===$.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Z.HTML))switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:{this.tokenizer.state=ht.RCDATA;break}case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:{this.tokenizer.state=ht.RAWTEXT;break}case f.SCRIPT:{this.tokenizer.state=ht.SCRIPT_DATA;break}case f.PLAINTEXT:{this.tokenizer.state=ht.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));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,Z.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,Z.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($.HTML,Z.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,f.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 i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:l,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:u,endOffset:d})}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,i=this.treeAdapter.getTagName(t),s=n.type===Oe.END_TAG&&i===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,s)}}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===f.SVG&&this.treeAdapter.getTagName(n)===$.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===Z.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===f.MGLYPH||t.tagID===f.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,Z.HTML)}_processToken(t){switch(t.type){case Oe.CHARACTER:{this.onCharacter(t);break}case Oe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Oe.COMMENT:{this.onComment(t);break}case Oe.DOCTYPE:{this.onDoctype(t);break}case Oe.START_TAG:{this._processStartTag(t);break}case Oe.END_TAG:{this.onEndTag(t);break}case Oe.EOF:{this.onEof(t);break}case Oe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return Bw(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Fn.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=O.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case f.TR:{this.insertionMode=O.IN_ROW;return}case f.TBODY:case f.THEAD:case f.TFOOT:{this.insertionMode=O.IN_TABLE_BODY;return}case f.CAPTION:{this.insertionMode=O.IN_CAPTION;return}case f.COLGROUP:{this.insertionMode=O.IN_COLUMN_GROUP;return}case f.TABLE:{this.insertionMode=O.IN_TABLE;return}case f.BODY:{this.insertionMode=O.IN_BODY;return}case f.FRAMESET:{this.insertionMode=O.IN_FRAMESET;return}case f.SELECT:{this._resetInsertionModeForSelect(t);return}case f.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case f.HTML:{this.insertionMode=this.headElement?O.AFTER_HEAD:O.BEFORE_HEAD;return}case f.TD:case f.TH:{if(t>0){this.insertionMode=O.IN_CELL;return}break}case f.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===f.TEMPLATE)break;if(r===f.TABLE){this.insertionMode=O.IN_SELECT_IN_TABLE;return}}this.insertionMode=O.IN_SELECT}_isElementCausesFosterParenting(t){return P0.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 f.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===Z.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case f.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 ow[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){bA(this,t);return}switch(this.insertionMode){case O.INITIAL:{Di(this,t);break}case O.BEFORE_HTML:{ts(this,t);break}case O.BEFORE_HEAD:{ns(this,t);break}case O.IN_HEAD:{rs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{is(this,t);break}case O.AFTER_HEAD:{ss(this,t);break}case O.IN_BODY:case O.IN_CAPTION:case O.IN_CELL:case O.IN_TEMPLATE:{B0(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:{Qo(this,t);break}case O.IN_TABLE_TEXT:{$0(this,t);break}case O.IN_COLUMN_GROUP:{Ga(this,t);break}case O.AFTER_BODY:{qa(this,t);break}case O.AFTER_AFTER_BODY:{Ra(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gA(this,t);return}switch(this.insertionMode){case O.INITIAL:{Di(this,t);break}case O.BEFORE_HTML:{ts(this,t);break}case O.BEFORE_HEAD:{ns(this,t);break}case O.IN_HEAD:{rs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{is(this,t);break}case O.AFTER_HEAD:{ss(this,t);break}case O.TEXT:{this._insertCharacters(t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Qo(this,t);break}case O.IN_COLUMN_GROUP:{Ga(this,t);break}case O.AFTER_BODY:{qa(this,t);break}case O.AFTER_AFTER_BODY:{Ra(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Yl(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:{Yl(this,t);break}case O.IN_TABLE_TEXT:{Pi(this,t);break}case O.AFTER_BODY:{qw(this,t);break}case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{Kw(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case O.INITIAL:{Xw(this,t);break}case O.BEFORE_HEAD:case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:{this._err(t,Y.misplacedDoctype);break}case O.IN_TABLE_TEXT:{Pi(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Y.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?EA(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{Di(this,t);break}case O.BEFORE_HTML:{Qw(this,t);break}case O.BEFORE_HEAD:{Jw(this,t);break}case O.IN_HEAD:{Nn(this,t);break}case O.IN_HEAD_NO_SCRIPT:{nC(this,t);break}case O.AFTER_HEAD:{iC(this,t);break}case O.IN_BODY:{Mt(this,t);break}case O.IN_TABLE:{Ti(this,t);break}case O.IN_TABLE_TEXT:{Pi(this,t);break}case O.IN_CAPTION:{eA(this,t);break}case O.IN_COLUMN_GROUP:{sc(this,t);break}case O.IN_TABLE_BODY:{yo(this,t);break}case O.IN_ROW:{_o(this,t);break}case O.IN_CELL:{rA(this,t);break}case O.IN_SELECT:{Y0(this,t);break}case O.IN_SELECT_IN_TABLE:{sA(this,t);break}case O.IN_TEMPLATE:{oA(this,t);break}case O.AFTER_BODY:{uA(this,t);break}case O.IN_FRAMESET:{cA(this,t);break}case O.AFTER_FRAMESET:{fA(this,t);break}case O.AFTER_AFTER_BODY:{pA(this,t);break}case O.AFTER_AFTER_FRAMESET:{mA(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?TA(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{Di(this,t);break}case O.BEFORE_HTML:{Zw(this,t);break}case O.BEFORE_HEAD:{eC(this,t);break}case O.IN_HEAD:{tC(this,t);break}case O.IN_HEAD_NO_SCRIPT:{rC(this,t);break}case O.AFTER_HEAD:{sC(this,t);break}case O.IN_BODY:{xo(this,t);break}case O.TEXT:{VC(this,t);break}case O.IN_TABLE:{As(this,t);break}case O.IN_TABLE_TEXT:{Pi(this,t);break}case O.IN_CAPTION:{tA(this,t);break}case O.IN_COLUMN_GROUP:{nA(this,t);break}case O.IN_TABLE_BODY:{Gl(this,t);break}case O.IN_ROW:{W0(this,t);break}case O.IN_CELL:{iA(this,t);break}case O.IN_SELECT:{G0(this,t);break}case O.IN_SELECT_IN_TABLE:{aA(this,t);break}case O.IN_TEMPLATE:{lA(this,t);break}case O.AFTER_BODY:{K0(this,t);break}case O.IN_FRAMESET:{dA(this,t);break}case O.AFTER_FRAMESET:{hA(this,t);break}case O.AFTER_AFTER_BODY:{Ra(this,t);break}}}onEof(t){switch(this.insertionMode){case O.INITIAL:{Di(this,t);break}case O.BEFORE_HTML:{ts(this,t);break}case O.BEFORE_HEAD:{ns(this,t);break}case O.IN_HEAD:{rs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{is(this,t);break}case O.AFTER_HEAD:{ss(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:{j0(this,t);break}case O.TEXT:{WC(this,t);break}case O.IN_TABLE_TEXT:{Pi(this,t);break}case O.IN_TEMPLATE:{q0(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:{ic(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===C.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:{M0(this,t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Qo(this,t);break}case O.IN_TABLE_TEXT:{z0(this,t);break}}}}function zw(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):U0(e,t),n}function $w(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Vw(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),l=o&&s>=Uw;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=Ww(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Ww(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 Yw(e,t,n){const r=e.treeAdapter.getTagName(t),i=vi(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===f.TEMPLATE&&s===Z.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Gw(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function rc(e,t){for(let n=0;n<Hw;n++){const r=zw(e,t);if(!r)break;const i=$w(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=Vw(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&Yw(e,a,s),Gw(e,i,r)}}function Yl(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function qw(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Kw(e,t){e._appendCommentNode(t,e.document)}function ic(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],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function Xw(e,t){e._setDocumentType(t);const n=t.forceQuirks?dn.QUIRKS:Aw(t);Cw(t)||e._err(t,Y.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=O.BEFORE_HTML}function Di(e,t){e._err(t,Y.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,dn.QUIRKS),e.insertionMode=O.BEFORE_HTML,e._processToken(t)}function Qw(e,t){t.tagID===f.HTML?(e._insertElement(t,Z.HTML),e.insertionMode=O.BEFORE_HEAD):ts(e,t)}function Zw(e,t){const n=t.tagID;(n===f.HTML||n===f.HEAD||n===f.BODY||n===f.BR)&&ts(e,t)}function ts(e,t){e._insertFakeRootElement(),e.insertionMode=O.BEFORE_HEAD,e._processToken(t)}function Jw(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.HEAD:{e._insertElement(t,Z.HTML),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD;break}default:ns(e,t)}}function eC(e,t){const n=t.tagID;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?ns(e,t):e._err(t,Y.endTagWithoutMatchingOpenElement)}function ns(e,t){e._insertFakeElement($.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD,e._processToken(t)}function Nn(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:{e._appendElement(t,Z.HTML),t.ackSelfClosing=!0;break}case f.TITLE:{e._switchToTextParsing(t,ht.RCDATA);break}case f.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ht.RAWTEXT):(e._insertElement(t,Z.HTML),e.insertionMode=O.IN_HEAD_NO_SCRIPT);break}case f.NOFRAMES:case f.STYLE:{e._switchToTextParsing(t,ht.RAWTEXT);break}case f.SCRIPT:{e._switchToTextParsing(t,ht.SCRIPT_DATA);break}case f.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=O.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(O.IN_TEMPLATE);break}case f.HEAD:{e._err(t,Y.misplacedStartTagForHeadElement);break}default:rs(e,t)}}function tC(e,t){switch(t.tagID){case f.HEAD:{e.openElements.pop(),e.insertionMode=O.AFTER_HEAD;break}case f.BODY:case f.BR:case f.HTML:{rs(e,t);break}case f.TEMPLATE:{Zr(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function Zr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,Y.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Y.endTagWithoutMatchingOpenElement)}function rs(e,t){e.openElements.pop(),e.insertionMode=O.AFTER_HEAD,e._processToken(t)}function nC(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:{Nn(e,t);break}case f.NOSCRIPT:{e._err(t,Y.nestedNoscriptInHead);break}default:is(e,t)}}function rC(e,t){switch(t.tagID){case f.NOSCRIPT:{e.openElements.pop(),e.insertionMode=O.IN_HEAD;break}case f.BR:{is(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function is(e,t){const n=t.type===Oe.EOF?Y.openElementsLeftAfterEof:Y.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=O.IN_HEAD,e._processToken(t)}function iC(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.BODY:{e._insertElement(t,Z.HTML),e.framesetOk=!1,e.insertionMode=O.IN_BODY;break}case f.FRAMESET:{e._insertElement(t,Z.HTML),e.insertionMode=O.IN_FRAMESET;break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{e._err(t,Y.abandonedHeadElementChild),e.openElements.push(e.headElement,f.HEAD),Nn(e,t),e.openElements.remove(e.headElement);break}case f.HEAD:{e._err(t,Y.misplacedStartTagForHeadElement);break}default:ss(e,t)}}function sC(e,t){switch(t.tagID){case f.BODY:case f.HTML:case f.BR:{ss(e,t);break}case f.TEMPLATE:{Zr(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function ss(e,t){e._insertFakeElement($.BODY,f.BODY),e.insertionMode=O.IN_BODY,To(e,t)}function To(e,t){switch(t.type){case Oe.CHARACTER:{B0(e,t);break}case Oe.WHITESPACE_CHARACTER:{M0(e,t);break}case Oe.COMMENT:{Yl(e,t);break}case Oe.START_TAG:{Mt(e,t);break}case Oe.END_TAG:{xo(e,t);break}case Oe.EOF:{j0(e,t);break}}}function M0(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function B0(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function aC(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function oC(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function lC(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_FRAMESET)}function uC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML)}function cC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Wl.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Z.HTML)}function dC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function fC(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML),n||(e.formElement=e.openElements.current))}function hC(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===f.LI&&i===f.LI||(n===f.DD||n===f.DT)&&(i===f.DD||i===f.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==f.ADDRESS&&i!==f.DIV&&i!==f.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML)}function pC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML),e.tokenizer.state=ht.PLAINTEXT}function mC(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML),e.framesetOk=!1}function gC(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName($.A);n&&(rc(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function EC(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(rc(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Z.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function xC(e,t){e.treeAdapter.getDocumentMode(e.document)!==dn.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,Z.HTML),e.framesetOk=!1,e.insertionMode=O.IN_TABLE}function F0(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Z.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function H0(e){const t=S0(e,Mr.TYPE);return t!=null&&t.toLowerCase()===Fw}function yC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Z.HTML),H0(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function _C(e,t){e._appendElement(t,Z.HTML),t.ackSelfClosing=!0}function kC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,Z.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function wC(e,t){t.tagName=$.IMG,t.tagID=f.IMG,F0(e,t)}function CC(e,t){e._insertElement(t,Z.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ht.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=O.TEXT}function AC(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ht.RAWTEXT)}function SC(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ht.RAWTEXT)}function cf(e,t){e._switchToTextParsing(t,ht.RAWTEXT)}function IC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Z.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 vC(e,t){e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML)}function RC(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Z.HTML)}function NC(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,Z.HTML)}function OC(e,t){e._reconstructActiveFormattingElements(),L0(t),nc(t),t.selfClosing?e._appendElement(t,Z.MATHML):e._insertElement(t,Z.MATHML),t.ackSelfClosing=!0}function LC(e,t){e._reconstructActiveFormattingElements(),D0(t),nc(t),t.selfClosing?e._appendElement(t,Z.SVG):e._insertElement(t,Z.SVG),t.ackSelfClosing=!0}function df(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Z.HTML)}function Mt(e,t){switch(t.tagID){case f.I:case f.S:case f.B:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.SMALL:case f.STRIKE:case f.STRONG:{bC(e,t);break}case f.A:{gC(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{cC(e,t);break}case f.P:case f.DL:case f.OL:case f.UL:case f.DIV:case f.DIR:case f.NAV:case f.MAIN:case f.MENU:case f.ASIDE:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.DETAILS:case f.ADDRESS:case f.ARTICLE:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{uC(e,t);break}case f.LI:case f.DD:case f.DT:{hC(e,t);break}case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:{F0(e,t);break}case f.HR:{kC(e,t);break}case f.RB:case f.RTC:{RC(e,t);break}case f.RT:case f.RP:{NC(e,t);break}case f.PRE:case f.LISTING:{dC(e,t);break}case f.XMP:{AC(e,t);break}case f.SVG:{LC(e,t);break}case f.HTML:{aC(e,t);break}case f.BASE:case f.LINK:case f.META:case f.STYLE:case f.TITLE:case f.SCRIPT:case f.BGSOUND:case f.BASEFONT:case f.TEMPLATE:{Nn(e,t);break}case f.BODY:{oC(e,t);break}case f.FORM:{fC(e,t);break}case f.NOBR:{EC(e,t);break}case f.MATH:{OC(e,t);break}case f.TABLE:{xC(e,t);break}case f.INPUT:{yC(e,t);break}case f.PARAM:case f.TRACK:case f.SOURCE:{_C(e,t);break}case f.IMAGE:{wC(e,t);break}case f.BUTTON:{mC(e,t);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{TC(e,t);break}case f.IFRAME:{SC(e,t);break}case f.SELECT:{IC(e,t);break}case f.OPTION:case f.OPTGROUP:{vC(e,t);break}case f.NOEMBED:case f.NOFRAMES:{cf(e,t);break}case f.FRAMESET:{lC(e,t);break}case f.TEXTAREA:{CC(e,t);break}case f.NOSCRIPT:{e.options.scriptingEnabled?cf(e,t):df(e,t);break}case f.PLAINTEXT:{pC(e,t);break}case f.COL:case f.TH:case f.TD:case f.TR:case f.HEAD:case f.FRAME:case f.TBODY:case f.TFOOT:case f.THEAD:case f.CAPTION:case f.COLGROUP:break;default:df(e,t)}}function DC(e,t){if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=O.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function PC(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=O.AFTER_BODY,K0(e,t))}function MC(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function BC(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):n&&e.openElements.remove(n))}function FC(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement($.P,f.P),e._closePElement()}function HC(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}function UC(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function jC(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zC(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function $C(e){e._reconstructActiveFormattingElements(),e._insertFakeElement($.BR,f.BR),e.openElements.pop(),e.framesetOk=!1}function U0(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function xo(e,t){switch(t.tagID){case f.A:case f.B:case f.I:case f.S:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.NOBR:case f.SMALL:case f.STRIKE:case f.STRONG:{rc(e,t);break}case f.P:{FC(e);break}case f.DL:case f.UL:case f.OL:case f.DIR:case f.DIV:case f.NAV:case f.PRE:case f.MAIN:case f.MENU:case f.ASIDE:case f.BUTTON:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.ADDRESS:case f.ARTICLE:case f.DETAILS:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.LISTING:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{MC(e,t);break}case f.LI:{HC(e);break}case f.DD:case f.DT:{UC(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{jC(e);break}case f.BR:{$C(e);break}case f.BODY:{DC(e,t);break}case f.HTML:{PC(e,t);break}case f.FORM:{BC(e);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{zC(e,t);break}case f.TEMPLATE:{Zr(e,t);break}default:U0(e,t)}}function j0(e,t){e.tmplInsertionModeStack.length>0?q0(e,t):ic(e,t)}function VC(e,t){var n;t.tagID===f.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function WC(e,t){e._err(t,Y.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Qo(e,t){if(e.openElements.currentTagId!==void 0&&P0.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 Oe.CHARACTER:{$0(e,t);break}case Oe.WHITESPACE_CHARACTER:{z0(e,t);break}}else $s(e,t)}function YC(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_CAPTION}function GC(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_COLUMN_GROUP}function qC(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement($.COLGROUP,f.COLGROUP),e.insertionMode=O.IN_COLUMN_GROUP,sc(e,t)}function KC(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_TABLE_BODY}function XC(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement($.TBODY,f.TBODY),e.insertionMode=O.IN_TABLE_BODY,yo(e,t)}function QC(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ZC(e,t){H0(t)?e._appendElement(t,Z.HTML):$s(e,t),t.ackSelfClosing=!0}function JC(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Z.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ti(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:{XC(e,t);break}case f.STYLE:case f.SCRIPT:case f.TEMPLATE:{Nn(e,t);break}case f.COL:{qC(e,t);break}case f.FORM:{JC(e,t);break}case f.TABLE:{QC(e,t);break}case f.TBODY:case f.TFOOT:case f.THEAD:{KC(e,t);break}case f.INPUT:{ZC(e,t);break}case f.CAPTION:{YC(e,t);break}case f.COLGROUP:{GC(e,t);break}default:$s(e,t)}}function As(e,t){switch(t.tagID){case f.TABLE:{e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break}case f.TEMPLATE:{Zr(e,t);break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:$s(e,t)}}function $s(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,To(e,t),e.fosterParentingEnabled=n}function z0(e,t){e.pendingCharacterTokens.push(t)}function $0(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Pi(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)$s(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const V0=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function eA(e,t){const n=t.tagID;V0.has(n)?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,Ti(e,t)):Mt(e,t)}function tA(e,t){const n=t.tagID;switch(n){case f.CAPTION:case f.TABLE:{e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,n===f.TABLE&&As(e,t));break}case f.BODY:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:xo(e,t)}}function sc(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.COL:{e._appendElement(t,Z.HTML),t.ackSelfClosing=!0;break}case f.TEMPLATE:{Nn(e,t);break}default:Ga(e,t)}}function nA(e,t){switch(t.tagID){case f.COLGROUP:{e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case f.TEMPLATE:{Zr(e,t);break}case f.COL:break;default:Ga(e,t)}}function Ga(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE,e._processToken(t))}function yo(e,t){switch(t.tagID){case f.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_ROW;break}case f.TH:case f.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement($.TR,f.TR),e.insertionMode=O.IN_ROW,_o(e,t);break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,Ti(e,t));break}default:Ti(e,t)}}function Gl(e,t){const n=t.tagID;switch(t.tagID){case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case f.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,As(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:case f.TR:break;default:As(e,t)}}function _o(e,t){switch(t.tagID){case f.TH:case f.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Z.HTML),e.insertionMode=O.IN_CELL,e.activeFormattingElements.insertMarker();break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,yo(e,t));break}default:Ti(e,t)}}function W0(e,t){switch(t.tagID){case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY);break}case f.TABLE:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,Gl(e,t));break}case f.TBODY:case f.TFOOT:case f.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,Gl(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:break;default:As(e,t)}}function rA(e,t){const n=t.tagID;V0.has(n)?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),_o(e,t)):Mt(e,t)}function iA(e,t){const n=t.tagID;switch(n){case f.TD:case f.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_ROW);break}case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),W0(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:xo(e,t)}}function Y0(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,Z.HTML);break}case f.OPTGROUP:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Z.HTML);break}case f.HR:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Z.HTML),t.ackSelfClosing=!0;break}case f.INPUT:case f.KEYGEN:case f.TEXTAREA:case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),t.tagID!==f.SELECT&&e._processStartTag(t));break}case f.SCRIPT:case f.TEMPLATE:{Nn(e,t);break}}}function G0(e,t){switch(t.tagID){case f.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===f.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop();break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop();break}case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode());break}case f.TEMPLATE:{Zr(e,t);break}}}function sA(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Y0(e,t)}function aA(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e.onEndTag(t)):G0(e,t)}function oA(e,t){switch(t.tagID){case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{Nn(e,t);break}case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.tmplInsertionModeStack[0]=O.IN_TABLE,e.insertionMode=O.IN_TABLE,Ti(e,t);break}case f.COL:{e.tmplInsertionModeStack[0]=O.IN_COLUMN_GROUP,e.insertionMode=O.IN_COLUMN_GROUP,sc(e,t);break}case f.TR:{e.tmplInsertionModeStack[0]=O.IN_TABLE_BODY,e.insertionMode=O.IN_TABLE_BODY,yo(e,t);break}case f.TD:case f.TH:{e.tmplInsertionModeStack[0]=O.IN_ROW,e.insertionMode=O.IN_ROW,_o(e,t);break}default:e.tmplInsertionModeStack[0]=O.IN_BODY,e.insertionMode=O.IN_BODY,Mt(e,t)}}function lA(e,t){t.tagID===f.TEMPLATE&&Zr(e,t)}function q0(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ic(e,t)}function uA(e,t){t.tagID===f.HTML?Mt(e,t):qa(e,t)}function K0(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=O.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===f.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 qa(e,t)}function qa(e,t){e.insertionMode=O.IN_BODY,To(e,t)}function cA(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.FRAMESET:{e._insertElement(t,Z.HTML);break}case f.FRAME:{e._appendElement(t,Z.HTML),t.ackSelfClosing=!0;break}case f.NOFRAMES:{Nn(e,t);break}}}function dA(e,t){t.tagID===f.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==f.FRAMESET&&(e.insertionMode=O.AFTER_FRAMESET))}function fA(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.NOFRAMES:{Nn(e,t);break}}}function hA(e,t){t.tagID===f.HTML&&(e.insertionMode=O.AFTER_AFTER_FRAMESET)}function pA(e,t){t.tagID===f.HTML?Mt(e,t):Ra(e,t)}function Ra(e,t){e.insertionMode=O.IN_BODY,To(e,t)}function mA(e,t){switch(t.tagID){case f.HTML:{Mt(e,t);break}case f.NOFRAMES:{Nn(e,t);break}}}function gA(e,t){t.chars=at,e._insertCharacters(t)}function bA(e,t){e._insertCharacters(t),e.framesetOk=!1}function X0(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Z.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function EA(e,t){if(Lw(t))X0(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Z.MATHML?L0(t):r===Z.SVG&&(Dw(t),D0(t)),nc(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function TA(e,t){if(t.tagID===f.P||t.tagID===f.BR){X0(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)===Z.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}$.AREA,$.BASE,$.BASEFONT,$.BGSOUND,$.BR,$.COL,$.EMBED,$.FRAME,$.HR,$.IMG,$.INPUT,$.KEYGEN,$.LINK,$.META,$.PARAM,$.SOURCE,$.TRACK,$.WBR;const ko=Q0("end"),Wn=Q0("start");function Q0(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 Z0(e){const t=Wn(e),n=ko(e);if(t&&n)return{start:t,end:n}}const xA=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,yA=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ff={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function J0(e,t){const n=NA(e),r=_0("type",{handlers:{root:_A,element:kA,text:wA,comment:tg,doctype:CA,raw:SA},unknown:IA}),i={parser:n?new uf(ff):uf.getFragmentParser(void 0,ff),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),Ri(i,Wn());const s=n?i.parser.document:i.parser.getFragment(),a=_k(s,{file:i.options.file});return i.stitches&&Er(a,"comment",function(o,l,u){const d=o;if(d.value.stitch&&u&&l!==void 0){const c=u.children;return c[l]=d.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function eg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function _A(e,t){eg(e.children,t)}function kA(e,t){vA(e,t),eg(e.children,t),RA(e,t)}function wA(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Oe.CHARACTER,chars:e.value,location:Vs(e)};Ri(t,Wn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function CA(e,t){const n={type:Oe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Vs(e)};Ri(t,Wn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function AA(e,t){t.stitches=!0;const n=OA(e);if("children"in e&&"children"in n){const r=J0({type:"root",children:e.children},t.options);n.children=r.children}tg({type:"comment",value:{stitch:n}},t)}function tg(e,t){const n=e.value,r={type:Oe.COMMENT,data:n,location:Vs(e)};Ri(t,Wn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function SA(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,ng(t,Wn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(xA,"&lt;$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 IA(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))AA(n,t);else{let r="";throw yA.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 Ri(e,t){ng(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=ht.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 ng(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 vA(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ht.PLAINTEXT)return;Ri(t,Wn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Pr.html;i===Pr.html&&n==="svg"&&(i=Pr.svg);const s=Bk({...e,children:[]},{space:i===Pr.svg?"svg":"html"}),a={type:Oe.START_TAG,tagName:n,tagID:vi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:Vs(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function RA(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Wk.includes(n)||t.parser.tokenizer.state===ht.PLAINTEXT)return;Ri(t,ko(e));const r={type:Oe.END_TAG,tagName:n,tagID:vi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Vs(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ht.RCDATA||t.parser.tokenizer.state===ht.RAWTEXT||t.parser.tokenizer.state===ht.SCRIPT_DATA)&&(t.parser.tokenizer.state=ht.DATA)}function NA(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Vs(e){const t=Wn(e)||{line:void 0,column:void 0,offset:void 0},n=ko(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 OA(e){return"children"in e?jr({...e,children:[]}):jr(e)}function ql(e){return function(t,n){return J0(t,{...e,file:n})}}const vr=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],as={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...vr,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...vr],h2:[["className","sr-only"]],img:[...vr,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...vr,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...vr],table:[...vr],ul:[...vr,["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"]},dr={}.hasOwnProperty;function LA(e,t){let n={type:"root",children:[]};const r={schema:t?{...as,...t}:as,stack:[]},i=rg(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function rg(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return DA(e,n);case"doctype":return PA(e,n);case"element":return MA(e,n);case"root":return BA(e,n);case"text":return FA(e,n)}}}function DA(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),s={type:"comment",value:r<0?n:n.slice(0,r)};return Ws(s,t),s}}function PA(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ws(n,t),n}}function MA(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ig(e,t.children),i=HA(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&dr.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let l=-1;for(s=!1;++l<o.length;)e.stack.includes(o[l])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:i,children:r};return Ws(a,t),a}function BA(e,t){const r={type:"root",children:ig(e,t.children)};return Ws(r,t),r}function FA(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ws(r,t),r}function ig(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=rg(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function HA(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&dr.call(r,n)?r[n]:void 0,a=r&&dr.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},l={};let u;for(u in o)if(dr.call(o,u)){const d=o[u];let c=hf(e,pf(s,u),u,d);c==null&&(c=hf(e,pf(a,u),u,d)),c!=null&&(l[u]=c)}if(i&&dr.call(i,n)){const d=i[n];for(u in d)dr.call(d,u)&&!dr.call(l,u)&&(l[u]=d[u])}return l}function hf(e,t,n,r){return t?Array.isArray(r)?UA(e,t,n,r):sg(e,t,n,r):void 0}function UA(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=sg(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function sg(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&jA(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){i=!0;break}}else if(a===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function jA(e,t,n){const r=e.schema.protocols&&dr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),s=i.indexOf(":"),a=i.indexOf("?"),o=i.indexOf("#"),l=i.indexOf("/");if(s<0||l>-1&&s>l||a>-1&&s>a||o>-1&&s>o)return!0;let u=-1;for(;++u<r.length;){const d=r[u];if(s===d.length&&i.slice(0,d.length)===d)return!0}return!1}function Ws(e,t){const n=Z0(t);t.data&&(e.data=jr(t.data)),n&&(e.position=n)}function pf(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function ag(e){return function(t){return LA(t,e)}}function mf(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ut=wr(/[A-Za-z]/),Dt=wr(/[\dA-Za-z]/),zA=wr(/[#-'*+\--9=?A-Z^-~]/);function Ka(e){return e!==null&&(e<32||e===127)}const Kl=wr(/\d/),$A=wr(/[\dA-Fa-f]/),VA=wr(/[!-/:-@[-`{-~]/);function be(e){return e!==null&&e<-2}function Je(e){return e!==null&&(e<0||e===32)}function Le(e){return e===-2||e===-1||e===32}const wo=wr(new RegExp("\\p{P}|\\p{S}","u")),zr=wr(/\s/);function wr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function WA(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const og=[],YA=!0,gf=!1,lg="skip";function ug(e,t,n,r){let i;i=t;const s=Us(i),a=1;o(e,void 0,[])();function o(l,u,d){const c=l&&typeof l=="object"?l:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=og,m,E,T;if(s(l,u,d[d.length-1]||void 0)&&(p=GA(n(l,d)),p[0]===gf))return p;if("children"in l&&l.children){const b=l;if(b.children&&p[0]!==lg)for(E=-1+a,T=d.concat(b);E>-1&&E<b.children.length;){const y=b.children[E];if(m=o(y,E,T)(),m[0]===gf)return m;E=typeof m[1]=="number"?m[1]:E+a}}return p}}}function GA(e){return Array.isArray(e)?e:typeof e=="number"?[YA,e]:e==null?og:[e]}function qA(e,t,n){const i=Us((n||{}).ignore||[]),s=KA(t);let a=-1;for(;++a<s.length;)ug(e,"text",o);function o(u,d){let c=-1,h;for(;++c<d.length;){const p=d[c],m=h?h.children:void 0;if(i(p,m?m.indexOf(p):void 0,h))return;h=p}if(h)return l(u,d)}function l(u,d){const c=d[d.length-1],h=s[a][0],p=s[a][1];let m=0;const T=c.children.indexOf(u);let b=!1,y=[];h.lastIndex=0;let k=h.exec(u.value);for(;k;){const P=k.index,D={index:k.index,input:k.input,stack:[...d,u]};let v=p(...k,D);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?h.lastIndex=P+1:(m!==P&&y.push({type:"text",value:u.value.slice(m,P)}),Array.isArray(v)?y.push(...v):v&&y.push(v),m=P+k[0].length,b=!0),!h.global)break;k=h.exec(u.value)}return b?(m<u.value.length&&y.push({type:"text",value:u.value.slice(m)}),c.children.splice(T,1,...y)):y=[u],T+y.length}}function KA(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 i=n[r];t.push([XA(i[0]),QA(i[1])])}return t}function XA(e){return typeof e=="string"?new RegExp(WA(e),"g"):e}function QA(e){return typeof e=="function"?e:function(){return e}}const Zo="phrasing",Jo=["autolink","link","image","label"];function ZA(){return{transforms:[sS],enter:{literalAutolink:eS,literalAutolinkEmail:el,literalAutolinkHttp:el,literalAutolinkWww:el},exit:{literalAutolink:iS,literalAutolinkEmail:rS,literalAutolinkHttp:tS,literalAutolinkWww:nS}}}function JA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zo,notInConstruct:Jo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zo,notInConstruct:Jo},{character:":",before:"[ps]",after:"\\/",inConstruct:Zo,notInConstruct:Jo}]}}function eS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function el(e){this.config.enter.autolinkProtocol.call(this,e)}function tS(e){this.config.exit.autolinkProtocol.call(this,e)}function nS(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 rS(e){this.config.exit.autolinkEmail.call(this,e)}function iS(e){this.exit(e)}function sS(e){qA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aS],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),oS]],{ignore:["link","linkReference"]})}function aS(e,t,n,r,i){let s="";if(!cg(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!lS(n)))return!1;const a=uS(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function oS(e,t,n,r){return!cg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lS(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 uS(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 i=mf(e,"(");let s=mf(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function cg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||zr(n)||wo(n))&&(!t||n!==47)}function An(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}dg.peek=ES;function cS(){this.buffer()}function dS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function fS(){this.buffer()}function hS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function pS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=An(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mS(e){this.exit(e)}function gS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=An(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bS(e){this.exit(e)}function ES(){return"["}function dg(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function TS(){return{enter:{gfmFootnoteCallString:cS,gfmFootnoteCall:dS,gfmFootnoteDefinitionLabelString:fS,gfmFootnoteDefinition:hS},exit:{gfmFootnoteCallString:pS,gfmFootnoteCall:mS,gfmFootnoteDefinitionLabelString:gS,gfmFootnoteDefinition:bS}}}function xS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:dg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const u=s.enter("footnoteDefinition"),d=s.enter("label");return l+=o.move(s.safe(s.associationId(r),{before:l,after:"]"})),d(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?`
54
+ `:" ")+s.indentLines(s.containerFlow(r,o.current()),t?fg:yS))),u(),l}}function yS(e,t,n){return t===0?e:fg(e,t,n)}function fg(e,t,n){return(n?"":" ")+e}const _S=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];hg.peek=SS;function kS(){return{canContainEols:["delete"],enter:{strikethrough:CS},exit:{strikethrough:AS}}}function wS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_S}],handlers:{delete:hg}}}function CS(e){this.enter({type:"delete",children:[]},e)}function AS(e){this.exit(e)}function hg(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function SS(){return"~"}function IS(e){return e.length}function vS(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||IS,s=[],a=[],o=[],l=[];let u=0,d=-1;for(;++d<e.length;){const E=[],T=[];let b=-1;for(e[d].length>u&&(u=e[d].length);++b<e[d].length;){const y=RS(e[d][b]);if(n.alignDelimiters!==!1){const k=i(y);T[b]=k,(l[b]===void 0||k>l[b])&&(l[b]=k)}E.push(y)}a[d]=E,o[d]=T}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)s[c]=bf(r[c]);else{const E=bf(r);for(;++c<u;)s[c]=E}c=-1;const h=[],p=[];for(;++c<u;){const E=s[c];let T="",b="";E===99?(T=":",b=":"):E===108?T=":":E===114&&(b=":");let y=n.alignDelimiters===!1?1:Math.max(1,l[c]-T.length-b.length);const k=T+"-".repeat(y)+b;n.alignDelimiters!==!1&&(y=T.length+y+b.length,y>l[c]&&(l[c]=y),p[c]=y),h[c]=k}a.splice(1,0,h),o.splice(1,0,p),d=-1;const m=[];for(;++d<a.length;){const E=a[d],T=o[d];c=-1;const b=[];for(;++c<u;){const y=E[c]||"";let k="",P="";if(n.alignDelimiters!==!1){const D=l[c]-(T[c]||0),v=s[c];v===114?k=" ".repeat(D):v===99?D%2?(k=" ".repeat(D/2+.5),P=" ".repeat(D/2-.5)):(k=" ".repeat(D/2),P=k):P=" ".repeat(D)}n.delimiterStart!==!1&&!c&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&y==="")&&(n.delimiterStart!==!1||c)&&b.push(" "),n.alignDelimiters!==!1&&b.push(k),b.push(y),n.alignDelimiters!==!1&&b.push(P),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&b.push("|")}m.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return m.join(`
55
+ `)}function RS(e){return e==null?"":String(e)}function bf(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 NS(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),OS);return i(),a}function OS(e,t,n){return">"+(n?"":" ")+e}function LS(e,t){return Ef(e,t.inConstruct,!0)&&!Ef(e,t.notInConstruct,!1)}function Ef(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 Tf(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
56
+ `&&LS(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
57
+ `}function DS(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function PS(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 MS(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 BS(e,t,n,r){const i=MS(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(PS(e,n)){const c=n.enter("codeIndented"),h=n.indentLines(s,FS);return c(),h}const o=n.createTracker(r),l=i.repeat(Math.max(DS(s,i)+1,3)),u=n.enter("codeFenced");let d=o.move(l);if(e.lang){const c=n.enter(`codeFencedLang${a}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${a}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
58
58
  `,encode:["`"],...o.current()})),c()}return d+=o.move(`
59
59
  `),s&&(d+=o.move(s+`
60
- `)),d+=o.move(l),u(),d}function PS(e,t,n){return(n?"":" ")+e}function sc(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 MS(e,t,n,r){const i=sc(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=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("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
61
- `,...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),a(),u}function BS(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 Ss(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xi(e){if(e===null||Je(e)||zr(e))return 1;if(wo(e))return 2}function Xa(e,t,n){const r=xi(e),i=xi(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}hg.peek=FS;function hg(e,t,n,r){const i=BS(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const u=l.charCodeAt(0),d=Xa(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=Ss(u)+l.slice(1));const c=l.charCodeAt(l.length-1),h=Xa(r.after.charCodeAt(0),c,i);h.inside&&(l=l.slice(0,-1)+Ss(c));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},o+l+p}function FS(e,t,n){return n.options.emphasis||"*"}const HS={};function ac(e,t){const n=HS,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return pg(e,r,i)}function pg(e,t,n){if(US(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 Tf(e.children,t,n)}return Array.isArray(e)?Tf(e,t,n):""}function Tf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=pg(e[i],t,n);return r.join("")}function US(e){return!!(e&&typeof e=="object")}function jS(e,t){let n=!1;return Er(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Bl}),!!((!e.depth||e.depth<3)&&ac(e)&&(t.options.setext||n))}function zS(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(jS(e,n)){const d=n.enter("headingSetext"),c=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:`
60
+ `)),d+=o.move(l),u(),d}function FS(e,t,n){return(n?"":" ")+e}function ac(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 HS(e,t,n,r){const i=ac(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=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("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
61
+ `,...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),a(),u}function US(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 Ss(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xi(e){if(e===null||Je(e)||zr(e))return 1;if(wo(e))return 2}function Xa(e,t,n){const r=xi(e),i=xi(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}pg.peek=jS;function pg(e,t,n,r){const i=US(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const u=l.charCodeAt(0),d=Xa(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=Ss(u)+l.slice(1));const c=l.charCodeAt(l.length-1),h=Xa(r.after.charCodeAt(0),c,i);h.inside&&(l=l.slice(0,-1)+Ss(c));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},o+l+p}function jS(e,t,n){return n.options.emphasis||"*"}const zS={};function oc(e,t){const n=zS,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mg(e,r,i)}function mg(e,t,n){if($S(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 xf(e.children,t,n)}return Array.isArray(e)?xf(e,t,n):""}function xf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=mg(e[i],t,n);return r.join("")}function $S(e){return!!(e&&typeof e=="object")}function VS(e,t){let n=!1;return Er(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Fl}),!!((!e.depth||e.depth<3)&&oc(e)&&(t.options.setext||n))}function WS(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(VS(e,n)){const d=n.enter("headingSetext"),c=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:`
62
62
  `,after:`
63
63
  `});return c(),d(),h+`
64
64
  `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
65
65
  `))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),l=n.enter("phrasing");s.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
66
- `,...s.current()});return/^[\t ]/.test(u)&&(u=Ss(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),o(),u}mg.peek=$S;function mg(e){return e.value||""}function $S(){return"<"}gg.peek=VS;function gg(e,t,n,r){const i=sc(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=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("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),a(),u}function VS(){return"!"}bg.peek=WS;function bg(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const u=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!u||u!==c?l+=o.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function WS(){return"!"}Eg.peek=YS;function Eg(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let l;if(a.atBreak)for(;l=o.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 i+r+i}function YS(){return"`"}function Tg(e,t){const n=ac(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))}xg.peek=GS;function xg(e,t,n,r){const i=sc(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,l;if(Tg(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let c=a.move("<");return c+=a.move(n.containerPhrasing(e,{before:c,after:">",...a.current()})),c+=a.move(">"),o(),n.stack=d,c}o=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${s}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),o(),u}function GS(e,t,n){return Tg(e,n)?"<":"["}yg.peek=qS;function yg(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!u||u!==c?l+=o.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function qS(){return"["}function oc(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 KS(e){const t=oc(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 XS(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 _g(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 QS(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?XS(n):oc(n);const o=e.ordered?a==="."?")":".":KS(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.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),_g(n)===a&&d){let c=-1;for(;++c<e.children.length;){const h=e.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),u}function ZS(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 JS(e,t,n,r){const i=ZS(n);let s=n.bulletCurrent||oc(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),d);return l(),u;function d(c,h,p){return h?(p?"":" ".repeat(a))+c:(p?s:s+" ".repeat(a-s.length))+c}}function eI(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const tI=Us(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function nI(e,t,n,r){return(e.children.some(function(a){return tI(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function rI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}kg.peek=iI;function kg(e,t,n,r){const i=rI(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const u=l.charCodeAt(0),d=Xa(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=Ss(u)+l.slice(1));const c=l.charCodeAt(l.length-1),h=Xa(r.after.charCodeAt(0),c,i);h.inside&&(l=l.slice(0,-1)+Ss(c));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},o+l+p}function iI(e,t,n){return n.options.strong||"*"}function sI(e,t,n,r){return n.safe(e.value,r)}function aI(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 oI(e,t,n){const r=(_g(n)+(n.options.ruleSpaces?" ":"")).repeat(aI(n));return n.options.ruleSpaces?r.slice(0,-1):r}const wg={blockquote:IS,break:Ef,code:DS,definition:MS,emphasis:hg,hardBreak:Ef,heading:zS,html:mg,image:gg,imageReference:bg,inlineCode:Eg,link:xg,linkReference:yg,list:QS,listItem:JS,paragraph:eI,root:nI,strong:kg,text:sI,thematicBreak:oI},xf=document.createElement("i");function lc(e){const t="&"+e+";";xf.innerHTML=t;const n=xf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Cg(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 lI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uI(e){return e.replace(lI,cI)}function cI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Cg(n.slice(s?2:1),s?16:10)}return lc(n)||e}function dI(){return{enter:{table:fI,tableData:yf,tableHeader:yf,tableRow:pI},exit:{codeText:mI,table:hI,tableData:el,tableHeader:el,tableRow:el}}}function fI(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 hI(e){this.exit(e),this.data.inTable=void 0}function pI(e){this.enter({type:"tableRow",children:[]},e)}function el(e){this.exit(e)}function yf(e){this.enter({type:"tableCell",children:[]},e)}function mI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,gI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function gI(e,t){return t==="|"?t:e}function bI(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
66
+ `,...s.current()});return/^[\t ]/.test(u)&&(u=Ss(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),o(),u}gg.peek=YS;function gg(e){return e.value||""}function YS(){return"<"}bg.peek=GS;function bg(e,t,n,r){const i=ac(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=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("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),a(),u}function GS(){return"!"}Eg.peek=qS;function Eg(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const u=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!u||u!==c?l+=o.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function qS(){return"!"}Tg.peek=KS;function Tg(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let l;if(a.atBreak)for(;l=o.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 i+r+i}function KS(){return"`"}function xg(e,t){const n=oc(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))}yg.peek=XS;function yg(e,t,n,r){const i=ac(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,l;if(xg(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let c=a.move("<");return c+=a.move(n.containerPhrasing(e,{before:c,after:">",...a.current()})),c+=a.move(">"),o(),n.stack=d,c}o=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${s}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),o(),u}function XS(e,t,n){return xg(e,n)?"<":"["}_g.peek=QS;function _g(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!u||u!==c?l+=o.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function QS(){return"["}function lc(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 ZS(e){const t=lc(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 JS(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 kg(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 eI(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?JS(n):lc(n);const o=e.ordered?a==="."?")":".":ZS(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.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),kg(n)===a&&d){let c=-1;for(;++c<e.children.length;){const h=e.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),u}function tI(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 nI(e,t,n,r){const i=tI(n);let s=n.bulletCurrent||lc(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),d);return l(),u;function d(c,h,p){return h?(p?"":" ".repeat(a))+c:(p?s:s+" ".repeat(a-s.length))+c}}function rI(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const iI=Us(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function sI(e,t,n,r){return(e.children.some(function(a){return iI(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function aI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}wg.peek=oI;function wg(e,t,n,r){const i=aI(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const u=l.charCodeAt(0),d=Xa(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=Ss(u)+l.slice(1));const c=l.charCodeAt(l.length-1),h=Xa(r.after.charCodeAt(0),c,i);h.inside&&(l=l.slice(0,-1)+Ss(c));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},o+l+p}function oI(e,t,n){return n.options.strong||"*"}function lI(e,t,n,r){return n.safe(e.value,r)}function uI(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 cI(e,t,n){const r=(kg(n)+(n.options.ruleSpaces?" ":"")).repeat(uI(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Cg={blockquote:NS,break:Tf,code:BS,definition:HS,emphasis:pg,hardBreak:Tf,heading:WS,html:gg,image:bg,imageReference:Eg,inlineCode:Tg,link:yg,linkReference:_g,list:eI,listItem:nI,paragraph:rI,root:sI,strong:wg,text:lI,thematicBreak:cI},yf=document.createElement("i");function uc(e){const t="&"+e+";";yf.innerHTML=t;const n=yf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ag(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 dI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fI(e){return e.replace(dI,hI)}function hI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Ag(n.slice(s?2:1),s?16:10)}return uc(n)||e}function pI(){return{enter:{table:mI,tableData:_f,tableHeader:_f,tableRow:bI},exit:{codeText:EI,table:gI,tableData:tl,tableHeader:tl,tableRow:tl}}}function mI(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 gI(e){this.exit(e),this.data.inTable=void 0}function bI(e){this.enter({type:"tableRow",children:[]},e)}function tl(e){this.exit(e)}function _f(e){this.enter({type:"tableCell",children:[]},e)}function EI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,TI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function TI(e,t){return t==="|"?t:e}function xI(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
67
67
  `,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:o}};function a(p,m,E,T){return u(d(p,E,T),p.align)}function o(p,m,E,T){const b=c(p,E,T),y=u([b]);return y.slice(0,y.indexOf(`
68
- `))}function l(p,m,E,T){const b=E.enter("tableCell"),y=E.enter("phrasing"),k=E.containerPhrasing(p,{...T,before:s,after:s});return y(),b(),k}function u(p,m){return AS(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function d(p,m,E){const T=p.children;let b=-1;const y=[],k=m.enter("table");for(;++b<T.length;)y[b]=c(T[b],m,E);return k(),y}function c(p,m,E){const T=p.children;let b=-1;const y=[],k=m.enter("tableRow");for(;++b<T.length;)y[b]=l(T[b],p,m,E);return k(),y}function h(p,m,E){let T=wg.inlineCode(p,m,E);return E.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function EI(){return{exit:{taskListCheckValueChecked:_f,taskListCheckValueUnchecked:_f,paragraph:xI}}}function TI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:yI}}}function _f(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function xI(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 i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;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 yI(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let l=wg.listItem(e,t,n,{...r,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(d){return d+a}}function _I(){return[KA(),gS(),xS(),dI(),EI()]}function kI(e){return{extensions:[XA(),bS(e),yS(),bI(e),TI()]}}function un(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i: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);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function fn(e,t){return e.length>0?(un(e,e.length,0,t),e):t}const kf={}.hasOwnProperty;function Ag(e){const t={};let n=-1;for(;++n<e.length;)wI(t,e[n]);return t}function wI(e,t){let n;for(n in t){const i=(kf.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){kf.call(i,a)||(i[a]=[]);const o=s[a];CI(i[a],Array.isArray(o)?o:o?[o]:[])}}}function CI(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);un(e,0,0,r)}const AI={tokenize:OI,partial:!0},Sg={tokenize:LI,partial:!0},Ig={tokenize:DI,partial:!0},vg={tokenize:PI,partial:!0},SI={tokenize:MI,partial:!0},Rg={name:"wwwAutolink",tokenize:RI,previous:Og},Ng={name:"protocolAutolink",tokenize:NI,previous:Lg},tr={name:"emailAutolink",tokenize:vI,previous:Dg},Yn={};function II(){return{text:Yn}}let Rr=48;for(;Rr<123;)Yn[Rr]=tr,Rr++,Rr===58?Rr=65:Rr===91&&(Rr=97);Yn[43]=tr;Yn[45]=tr;Yn[46]=tr;Yn[95]=tr;Yn[72]=[tr,Ng];Yn[104]=[tr,Ng];Yn[87]=[tr,Rg];Yn[119]=[tr,Rg];function vI(e,t,n){const r=this;let i,s;return a;function a(c){return!Kl(c)||!Dg.call(r,r.previous)||uc(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(c))}function o(c){return Kl(c)?(e.consume(c),o):c===64?(e.consume(c),l):n(c)}function l(c){return c===46?e.check(SI,d,u)(c):c===45||c===95||Dt(c)?(s=!0,e.consume(c),l):d(c)}function u(c){return e.consume(c),i=!0,l}function d(c){return s&&i&&Ut(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function RI(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Og.call(r,r.previous)||uc(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(AI,e.attempt(Sg,e.attempt(Ig,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function NI(e,t,n){const r=this;let i="",s=!1;return a;function a(c){return(c===72||c===104)&&Lg.call(r,r.previous)&&!uc(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),o):n(c)}function o(c){if(Ut(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),o;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),l}return n(c)}function l(c){return c===47?(e.consume(c),s?u:(s=!0,l)):n(c)}function u(c){return c===null||Ka(c)||Je(c)||zr(c)||wo(c)?n(c):e.attempt(Sg,e.attempt(Ig,d),n)(c)}function d(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function OI(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function LI(e,t,n){let r,i,s;return a;function a(u){return u===46||u===95?e.check(vg,l,o)(u):u===null||Je(u)||zr(u)||u!==45&&wo(u)?l(u):(s=!0,e.consume(u),a)}function o(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function l(u){return i||r||!s?n(u):t(u)}}function DI(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(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(vg,t,s)(a):a===null||Je(a)||zr(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function PI(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||Je(o)||zr(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Je(o)||zr(o)?t(o):r(o)}function s(o){return Ut(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):Ut(o)?(e.consume(o),a):n(o)}}function MI(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Dt(s)?n(s):t(s)}}function Og(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Je(e)}function Lg(e){return!Ut(e)}function Dg(e){return!(e===47||Kl(e))}function Kl(e){return e===43||e===45||e===46||e===95||Dt(e)}function uc(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 Ni(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&Dt(e.charCodeAt(n+1))&&Dt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Co(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Xl={name:"attention",resolveAll:BI,tokenize:FI};function BI(e,t){let n=-1,r,i,s,a,o,l,u,d;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 c={...e[r][1].end},h={...e[n][1].start};wf(c,-l),wf(h,l),a={type:l>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=fn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=fn(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),u=fn(u,Co(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=fn(u,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=fn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,un(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function FI(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=xi(r);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const u=e.exit("attentionSequence"),d=xi(l),c=!d||d===2&&i||n.includes(l),h=!i||i===2&&d||n.includes(r);return u._open=!!(s===42?c:c&&(i||!h)),u._close=!!(s===42?h:h&&(d||!c)),t(l)}}function wf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const HI={name:"autolink",tokenize:UI};function UI(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return Ut(p)?(e.consume(p),a):p===64?n(p):u(p)}function a(p){return p===43||p===45||p===46||Dt(p)?(r=1,o(p)):u(p)}function o(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Dt(p))&&r++<32?(e.consume(p),o):(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||Ka(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),d):HA(p)?(e.consume(p),u):n(p)}function d(p){return Dt(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,d):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||Dt(p))&&r++<63){const m=p===45?h:c;return e.consume(p),m}return n(p)}}function Ue(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return Le(l)?(e.enter(n),o(l)):t(l)}function o(l){return Le(l)&&s++<i?(e.consume(l),o):(e.exit(n),t(l))}}const Ys={partial:!0,tokenize:jI};function jI(e,t,n){return r;function r(s){return Le(s)?Ue(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||be(s)?t(s):n(s)}}const Pg={continuation:{tokenize:$I},exit:VI,name:"blockQuote",tokenize:zI};function zI(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return Le(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function $I(e,t,n){const r=this;return i;function i(a){return Le(a)?Ue(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Pg,t,n)(a)}}function VI(e){e.exit("blockQuote")}const Mg={name:"characterEscape",tokenize:WI};function WI(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return jA(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Bg={name:"characterReference",tokenize:YI};function YI(e,t,n){const r=this;let i=0,s,a;return o;function o(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),l}function l(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,a=Dt,d(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=UA,d):(e.enter("characterReferenceValue"),s=7,a=ql,d(c))}function d(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return a===Dt&&!lc(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(c)&&i++<s?(e.consume(c),d):n(c)}}const Cf={partial:!0,tokenize:qI},Af={concrete:!0,name:"codeFenced",tokenize:GI};function GI(e,t,n){const r=this,i={partial:!0,tokenize:D};let s=0,a=0,o;return l;function l(v){return u(v)}function u(v){const A=r.events[r.events.length-1];return s=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,o=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(v)}function d(v){return v===o?(a++,e.consume(v),d):a<3?n(v):(e.exit("codeFencedFenceSequence"),Le(v)?Ue(e,c,"whitespace")(v):c(v))}function c(v){return v===null||be(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check(Cf,E,P)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===null||be(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(v)):Le(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ue(e,p,"whitespace")(v)):v===96&&v===o?n(v):(e.consume(v),h)}function p(v){return v===null||be(v)?c(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||be(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(v)):v===96&&v===o?n(v):(e.consume(v),m)}function E(v){return e.attempt(i,P,T)(v)}function T(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),b}function b(v){return s>0&&Le(v)?Ue(e,y,"linePrefix",s+1)(v):y(v)}function y(v){return v===null||be(v)?e.check(Cf,E,P)(v):(e.enter("codeFlowValue"),k(v))}function k(v){return v===null||be(v)?(e.exit("codeFlowValue"),y(v)):(e.consume(v),k)}function P(v){return e.exit("codeFenced"),t(v)}function D(v,A,N){let z=0;return R;function R(M){return v.enter("lineEnding"),v.consume(M),v.exit("lineEnding"),W}function W(M){return v.enter("codeFencedFence"),Le(M)?Ue(v,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):j(M)}function j(M){return M===o?(v.enter("codeFencedFenceSequence"),w(M)):N(M)}function w(M){return M===o?(z++,v.consume(M),w):z>=a?(v.exit("codeFencedFenceSequence"),Le(M)?Ue(v,L,"whitespace")(M):L(M)):N(M)}function L(M){return M===null||be(M)?(v.exit("codeFencedFence"),A(M)):N(M)}}}function qI(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const tl={name:"codeIndented",tokenize:XI},KI={partial:!0,tokenize:QI};function XI(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ue(e,s,"linePrefix",5)(u)}function s(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):be(u)?e.attempt(KI,a,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||be(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),t(u)}}function QI(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):be(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ue(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):be(a)?i(a):n(a)}}const ZI={name:"codeText",previous:e3,resolve:JI,tokenize:t3};function JI(e){let t=e.length-4,n=3,r,i;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;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function e3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function t3(e,t,n){let r=0,i,s;return a;function a(c){return e.enter("codeText"),e.enter("codeTextSequence"),o(c)}function o(c){return c===96?(e.consume(c),r++,o):(e.exit("codeTextSequence"),l(c))}function l(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),l):c===96?(s=e.enter("codeTextSequence"),i=0,d(c)):be(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||be(c)?(e.exit("codeTextData"),l(c)):(e.consume(c),u)}function d(c){return c===96?(e.consume(c),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(s.type="codeTextData",u(c))}}class n3{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 i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Mi(this.left,r),s.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),Mi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Mi(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);Mi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Mi(this.left,n.reverse())}}}function Mi(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 Fg(e){const t={};let n=-1,r,i,s,a,o,l,u;const d=new n3(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,r3(d,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return un(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function r3(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],u={};let d,c,h=-1,p=n,m=0,E=0;const T=[E];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),c&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<o.length;)o[h][0]==="exit"&&o[h-1][0]==="enter"&&o[h][1].type===o[h-1][1].type&&o[h][1].start.line!==o[h][1].end.line&&(E=h+1,T.push(E),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):T.pop(),h=T.length;h--;){const b=o.slice(T[h],T[h+1]),y=s.pop();l.push([y,y+b.length-1]),e.splice(y,2,b)}for(l.reverse(),h=-1;++h<l.length;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const i3={resolve:a3,tokenize:o3},s3={partial:!0,tokenize:l3};function a3(e){return Fg(e),e}function o3(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):be(o)?e.check(s3,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function l3(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ue(e,s,"linePrefix")}function s(a){if(a===null||be(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Hg(e,t,n,r,i,s,a,o,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return c;function c(b){return b===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(b),e.exit(s),h):b===null||b===32||b===41||Ka(b)?n(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),E(b))}function h(b){return b===62?(e.enter(s),e.consume(b),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===62?(e.exit("chunkString"),e.exit(o),h(b)):b===null||b===60||be(b)?n(b):(e.consume(b),b===92?m:p)}function m(b){return b===60||b===62||b===92?(e.consume(b),p):p(b)}function E(b){return!d&&(b===null||b===41||Je(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(b)):d<u&&b===40?(e.consume(b),d++,E):b===41?(e.consume(b),d--,E):b===null||b===32||b===40||Ka(b)?n(b):(e.consume(b),b===92?T:E)}function T(b){return b===40||b===41||b===92?(e.consume(b),E):E(b)}}function Ug(e,t,n,r,i,s){const a=this;let o=0,l;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),d}function d(p){return o>999||p===null||p===91||p===93&&!l||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):be(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||be(p)||o++>999?(e.exit("chunkString"),d(p)):(e.consume(p),l||(l=!Le(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),o++,c):c(p)}}function jg(e,t,n,r,i,s){let a;return o;function o(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),a=h===40?41:h,l):n(h)}function l(h){return h===a?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),u(h))}function u(h){return h===a?(e.exit(s),l(a)):h===null?n(h):be(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ue(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===a||h===null||be(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:d)}function c(h){return h===a||h===92?(e.consume(h),d):d(h)}}function os(e,t){let n;return r;function r(i){return be(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Le(i)?Ue(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const u3={name:"definition",tokenize:d3},c3={partial:!0,tokenize:f3};function d3(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return Ug.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=An(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 Je(p)?os(e,u)(p):u(p)}function u(p){return Hg(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(c3,c,c)(p)}function c(p){return Le(p)?Ue(e,h,"whitespace")(p):h(p)}function h(p){return p===null||be(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function f3(e,t,n){return r;function r(o){return Je(o)?os(e,i)(o):n(o)}function i(o){return jg(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Le(o)?Ue(e,a,"whitespace")(o):a(o)}function a(o){return o===null||be(o)?t(o):n(o)}}const h3={name:"hardBreakEscape",tokenize:p3};function p3(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return be(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const m3={name:"headingAtx",resolve:g3,tokenize:b3};function g3(e,t){let n=e.length-2,r=3,i,s;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&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},un(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function b3(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Je(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||be(d)?(e.exit("atxHeading"),t(d)):Le(d)?Ue(e,o,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||Je(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const E3=["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"],Sf=["pre","script","style","textarea"],T3={concrete:!0,name:"htmlFlow",resolveTo:_3,tokenize:k3},x3={partial:!0,tokenize:C3},y3={partial:!0,tokenize:w3};function _3(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 k3(e,t,n){const r=this;let i,s,a,o,l;return u;function u(S){return d(S)}function d(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),c}function c(S){return S===33?(e.consume(S),h):S===47?(e.consume(S),s=!0,E):S===63?(e.consume(S),i=3,r.interrupt?t:_):Ut(S)?(e.consume(S),a=String.fromCharCode(S),T):n(S)}function h(S){return S===45?(e.consume(S),i=2,p):S===91?(e.consume(S),i=5,o=0,m):Ut(S)?(e.consume(S),i=4,r.interrupt?t:_):n(S)}function p(S){return S===45?(e.consume(S),r.interrupt?t:_):n(S)}function m(S){const ge="CDATA[";return S===ge.charCodeAt(o++)?(e.consume(S),o===ge.length?r.interrupt?t:j:m):n(S)}function E(S){return Ut(S)?(e.consume(S),a=String.fromCharCode(S),T):n(S)}function T(S){if(S===null||S===47||S===62||Je(S)){const ge=S===47,pe=a.toLowerCase();return!ge&&!s&&Sf.includes(pe)?(i=1,r.interrupt?t(S):j(S)):E3.includes(a.toLowerCase())?(i=6,ge?(e.consume(S),b):r.interrupt?t(S):j(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):s?y(S):k(S))}return S===45||Dt(S)?(e.consume(S),a+=String.fromCharCode(S),T):n(S)}function b(S){return S===62?(e.consume(S),r.interrupt?t:j):n(S)}function y(S){return Le(S)?(e.consume(S),y):R(S)}function k(S){return S===47?(e.consume(S),R):S===58||S===95||Ut(S)?(e.consume(S),P):Le(S)?(e.consume(S),k):R(S)}function P(S){return S===45||S===46||S===58||S===95||Dt(S)?(e.consume(S),P):D(S)}function D(S){return S===61?(e.consume(S),v):Le(S)?(e.consume(S),D):k(S)}function v(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,A):Le(S)?(e.consume(S),v):N(S)}function A(S){return S===l?(e.consume(S),l=null,z):S===null||be(S)?n(S):(e.consume(S),A)}function N(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||Je(S)?D(S):(e.consume(S),N)}function z(S){return S===47||S===62||Le(S)?k(S):n(S)}function R(S){return S===62?(e.consume(S),W):n(S)}function W(S){return S===null||be(S)?j(S):Le(S)?(e.consume(S),W):n(S)}function j(S){return S===45&&i===2?(e.consume(S),H):S===60&&i===1?(e.consume(S),U):S===62&&i===4?(e.consume(S),se):S===63&&i===3?(e.consume(S),_):S===93&&i===5?(e.consume(S),Q):be(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(x3,te,w)(S)):S===null||be(S)?(e.exit("htmlFlowData"),w(S)):(e.consume(S),j)}function w(S){return e.check(y3,L,te)(S)}function L(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),M}function M(S){return S===null||be(S)?w(S):(e.enter("htmlFlowData"),j(S))}function H(S){return S===45?(e.consume(S),_):j(S)}function U(S){return S===47?(e.consume(S),a="",G):j(S)}function G(S){if(S===62){const ge=a.toLowerCase();return Sf.includes(ge)?(e.consume(S),se):j(S)}return Ut(S)&&a.length<8?(e.consume(S),a+=String.fromCharCode(S),G):j(S)}function Q(S){return S===93?(e.consume(S),_):j(S)}function _(S){return S===62?(e.consume(S),se):S===45&&i===2?(e.consume(S),_):j(S)}function se(S){return S===null||be(S)?(e.exit("htmlFlowData"),te(S)):(e.consume(S),se)}function te(S){return e.exit("htmlFlow"),t(S)}}function w3(e,t,n){const r=this;return i;function i(a){return be(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function C3(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ys,t,n)}}const A3={name:"htmlText",tokenize:S3};function S3(e,t,n){const r=this;let i,s,a;return o;function o(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),l}function l(_){return _===33?(e.consume(_),u):_===47?(e.consume(_),D):_===63?(e.consume(_),k):Ut(_)?(e.consume(_),N):n(_)}function u(_){return _===45?(e.consume(_),d):_===91?(e.consume(_),s=0,m):Ut(_)?(e.consume(_),y):n(_)}function d(_){return _===45?(e.consume(_),p):n(_)}function c(_){return _===null?n(_):_===45?(e.consume(_),h):be(_)?(a=c,U(_)):(e.consume(_),c)}function h(_){return _===45?(e.consume(_),p):c(_)}function p(_){return _===62?H(_):_===45?h(_):c(_)}function m(_){const se="CDATA[";return _===se.charCodeAt(s++)?(e.consume(_),s===se.length?E:m):n(_)}function E(_){return _===null?n(_):_===93?(e.consume(_),T):be(_)?(a=E,U(_)):(e.consume(_),E)}function T(_){return _===93?(e.consume(_),b):E(_)}function b(_){return _===62?H(_):_===93?(e.consume(_),b):E(_)}function y(_){return _===null||_===62?H(_):be(_)?(a=y,U(_)):(e.consume(_),y)}function k(_){return _===null?n(_):_===63?(e.consume(_),P):be(_)?(a=k,U(_)):(e.consume(_),k)}function P(_){return _===62?H(_):k(_)}function D(_){return Ut(_)?(e.consume(_),v):n(_)}function v(_){return _===45||Dt(_)?(e.consume(_),v):A(_)}function A(_){return be(_)?(a=A,U(_)):Le(_)?(e.consume(_),A):H(_)}function N(_){return _===45||Dt(_)?(e.consume(_),N):_===47||_===62||Je(_)?z(_):n(_)}function z(_){return _===47?(e.consume(_),H):_===58||_===95||Ut(_)?(e.consume(_),R):be(_)?(a=z,U(_)):Le(_)?(e.consume(_),z):H(_)}function R(_){return _===45||_===46||_===58||_===95||Dt(_)?(e.consume(_),R):W(_)}function W(_){return _===61?(e.consume(_),j):be(_)?(a=W,U(_)):Le(_)?(e.consume(_),W):z(_)}function j(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),i=_,w):be(_)?(a=j,U(_)):Le(_)?(e.consume(_),j):(e.consume(_),L)}function w(_){return _===i?(e.consume(_),i=void 0,M):_===null?n(_):be(_)?(a=w,U(_)):(e.consume(_),w)}function L(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Je(_)?z(_):(e.consume(_),L)}function M(_){return _===47||_===62||Je(_)?z(_):n(_)}function H(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function U(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),G}function G(_){return Le(_)?Ue(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):Q(_)}function Q(_){return e.enter("htmlTextData"),a(_)}}const cc={name:"labelEnd",resolveAll:N3,resolveTo:O3,tokenize:L3},I3={tokenize:D3},v3={tokenize:P3},R3={tokenize:M3};function N3(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 i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&un(e,0,e.length,n),e}function O3(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",u,t]],o=fn(o,e.slice(s+1,s+r+3)),o=fn(o,[["enter",d,t]]),o=fn(o,Co(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=fn(o,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),o=fn(o,e.slice(a+1)),o=fn(o,[["exit",l,t]]),un(e,s,e.length,o),e}function L3(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(h){return s?s._inactive?c(h):(a=r.parser.defined.includes(An(r.sliceSerialize({start:s.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(I3,d,a?d:c)(h):h===91?e.attempt(v3,d,a?u:c)(h):a?d(h):c(h)}function u(h){return e.attempt(R3,d,c)(h)}function d(h){return t(h)}function c(h){return s._balanced=!0,n(h)}}function D3(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Je(c)?os(e,s)(c):s(c)}function s(c){return c===41?d(c):Hg(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function a(c){return Je(c)?os(e,l)(c):d(c)}function o(c){return n(c)}function l(c){return c===34||c===39||c===40?jg(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function u(c){return Je(c)?os(e,d)(c):d(c)}function d(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function P3(e,t,n){const r=this;return i;function i(o){return Ug.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(An(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function M3(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const B3={name:"labelStartImage",resolveAll:cc.resolveAll,tokenize:F3};function F3(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const H3={name:"labelStartLink",resolveAll:cc.resolveAll,tokenize:U3};function U3(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const nl={name:"lineEnding",tokenize:j3};function j3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ue(e,t,"linePrefix")}}const Na={name:"thematicBreak",tokenize:z3};function z3(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||be(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Le(u)?Ue(e,o,"whitespace")(u):o(u))}}const Vt={continuation:{tokenize:Y3},exit:q3,name:"list",tokenize:W3},$3={partial:!0,tokenize:K3},V3={partial:!0,tokenize:G3};function W3(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ql(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Na,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 ql(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(Ys,r.interrupt?n:d,e.attempt($3,h,c))}function d(p){return r.containerState.initialBlankLine=!0,s++,h(p)}function c(p){return Le(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Y3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ys,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ue(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!Le(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(V3,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ue(e,e.attempt(Vt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function G3(e,t,n){const r=this;return Ue(e,i,"listItemIndent",r.containerState.size+1);function i(s){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(s):n(s)}}function q3(e){e.exit(this.containerState.type)}function K3(e,t,n){const r=this;return Ue(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!Le(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const If={name:"setextUnderline",resolveTo:X3,tokenize:Q3};function X3(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Q3(e,t,n){const r=this;let i;return s;function s(u){let d=r.events.length,c;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){c=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),Le(u)?Ue(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||be(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Z3={tokenize:av,partial:!0};function J3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:rv,continuation:{tokenize:iv},exit:sv}},text:{91:{name:"gfmFootnoteCall",tokenize:nv},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ev,resolveTo:tv}}}}function ev(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][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 o;function o(l){if(!a||!a._balanced)return n(l);const u=An(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function tv(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)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function nv(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),l}function l(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(s>999||c===93&&!a||c===null||c===91||Je(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(An(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Je(c)||(a=!0),s++,e.consume(c),c===92?d:u}function d(c){return c===91||c===92||c===93?(e.consume(c),s++,u):u(c)}}function rv(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(m)}function d(m){if(a>999||m===93&&!o||m===null||m===91||Je(m))return n(m);if(m===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return s=An(r.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Je(m)||(o=!0),a++,e.consume(m),m===92?c:d}function c(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ue(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function iv(e,t,n){return e.check(Ys,t,e.attempt(Z3,t,n))}function sv(e){e.exit("gfmFootnoteDefinition")}function av(e,t,n){const r=this;return Ue(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function ov(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){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 d={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},c={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",d,o],["enter",a[u][1],o],["exit",a[u][1],o],["enter",c,o]],p=o.parser.constructs.insideSpan.null;p&&un(h,h.length,0,Co(p,a.slice(u+1,l),o)),un(h,h.length,0,[["exit",c,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",d,o]]),un(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 s(a,o,l){const u=this.previous,d=this.events;let c=0;return h;function h(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const E=xi(u);if(m===126)return c>1?l(m):(a.consume(m),c++,p);if(c<2&&!n)return l(m);const T=a.exit("strikethroughSequenceTemporary"),b=xi(m);return T._open=!b||b===2&&!!E,T._close=!E||E===2&&!!b,o(m)}}}class lv{constructor(){this.map=[]}add(t,n,r){uv(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[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 i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function uv(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function cv(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function dv(){return{flow:{null:{name:"table",tokenize:fv,resolveAll:hv}}}}function fv(e,t,n){const r=this;let i=0,s=0,a;return o;function o(R){let W=r.events.length-1;for(;W>-1;){const L=r.events[W][1].type;if(L==="lineEnding"||L==="linePrefix")W--;else break}const j=W>-1?r.events[W][1].type:null,w=j==="tableHead"||j==="tableRow"?v:l;return w===v&&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,s+=1),d(R)}function d(R){return R===null?n(R):be(R)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),p):n(R):Le(R)?Ue(e,d,"whitespace")(R):(s+=1,a&&(a=!1,i+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),c(R)))}function c(R){return R===null||R===124||Je(R)?(e.exit("data"),d(R)):(e.consume(R),R===92?h:c)}function h(R){return R===92||R===124?(e.consume(R),c):c(R)}function p(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),a=!1,Le(R)?Ue(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):m(R))}function m(R){return R===45||R===58?T(R):R===124?(a=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),E):D(R)}function E(R){return Le(R)?Ue(e,T,"whitespace")(R):T(R)}function T(R){return R===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),b):R===45?(s+=1,b(R)):R===null||be(R)?P(R):D(R)}function b(R){return R===45?(e.enter("tableDelimiterFiller"),y(R)):D(R)}function y(R){return R===45?(e.consume(R),y):R===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(R))}function k(R){return Le(R)?Ue(e,P,"whitespace")(R):P(R)}function P(R){return R===124?m(R):R===null||be(R)?!a||i!==s?D(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):D(R)}function D(R){return n(R)}function v(R){return e.enter("tableRow"),A(R)}function A(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),A):R===null||be(R)?(e.exit("tableRow"),t(R)):Le(R)?Ue(e,A,"whitespace")(R):(e.enter("data"),N(R))}function N(R){return R===null||R===124||Je(R)?(e.exit("data"),A(R)):(e.consume(R),R===92?z:N)}function z(R){return R===92||R===124?(e.consume(R),N):N(R)}}function hv(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,u,d,c;const h=new lv;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(o=!1,l!==0&&(vf(h,t,l,u,d),d=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",d,t]])),i=m.type==="tableDelimiterRow"?2:d?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],c=ca(h,t,s,i,void 0,c),s=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],c=ca(h,t,s,i,void 0,c)),s=a,a=[s[1],n,0,0])):m.type==="tableHead"?(o=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],c=ca(h,t,s,i,n,c)):a[1]!==0&&(c=ca(h,t,a,i,n,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&vf(h,t,l,u,d),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=cv(t.events,n))}return e}function ca(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},si(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=si(t.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const u=si(t.events,n[2]),d=si(t.events,n[3]),c={type:o,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",c,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 m=n[2]+1,E=n[3]-n[2]-1;e.add(m,E,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(s.end=Object.assign({},si(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function vf(e,t,n,r,i){const s=[],a=si(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function si(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const pv={name:"tasklistCheck",tokenize:gv};function mv(){return{text:{91:pv}}}function gv(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Je(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"),o):n(l)}function o(l){return be(l)?t(l):Le(l)?e.check({tokenize:bv},t,n)(l):n(l)}}function bv(e,t,n){return Ue(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Ev(e){return Ag([II(),J3(),ov(e),dv(),mv()])}const Tv={};function xv(e){const t=this,n=e||Tv,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Ev(n)),s.push(_I()),a.push(kI(n))}var yv=Object.defineProperty,_v=Object.defineProperties,kv=Object.getOwnPropertyDescriptors,Rf=Object.getOwnPropertySymbols,wv=Object.prototype.hasOwnProperty,Cv=Object.prototype.propertyIsEnumerable,Nf=(e,t,n)=>t in e?yv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zg=(e,t)=>{for(var n in t||(t={}))wv.call(t,n)&&Nf(e,n,t[n]);if(Rf)for(var n of Rf(t))Cv.call(t,n)&&Nf(e,n,t[n]);return e},$g=(e,t)=>_v(e,kv(t)),Av=/(\*\*)([^*]*\*?)$/,Sv=/(__)([^_]*?)$/,Iv=/(\*\*\*)([^*]*?)$/,vv=/(\*)([^*]*?)$/,Rv=/(_)([^_]*?)$/,Nv=/(`)([^`]*?)$/,Ov=/(~~)([^~]*?)$/,Jr=/^[\s_~*`]*$/,Vg=/^[\s]*[-*+][\s]+$/,Lv=/[\p{L}\p{N}_]/u,Dv=/^```[^`\n]*```?$/,Pv=/^\*{4,}$/,Mv=/(__)([^_]+)_$/,Bv=/(~~)([^~]+)~$/,Of=/~~/g,Tr=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:Lv.test(e)},Is=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},Fv=(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},Wg=(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},Ao=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},Hv=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
69
- `)return!1}return!1},Yg=(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]==="]"?Hv(e,t):!1;if(e[n]===`
70
- `)return!1}return!1},Uv=(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]===`
71
- `)return!1}return!1},dc=(e,t,n)=>{let r=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
68
+ `))}function l(p,m,E,T){const b=E.enter("tableCell"),y=E.enter("phrasing"),k=E.containerPhrasing(p,{...T,before:s,after:s});return y(),b(),k}function u(p,m){return vS(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function d(p,m,E){const T=p.children;let b=-1;const y=[],k=m.enter("table");for(;++b<T.length;)y[b]=c(T[b],m,E);return k(),y}function c(p,m,E){const T=p.children;let b=-1;const y=[],k=m.enter("tableRow");for(;++b<T.length;)y[b]=l(T[b],p,m,E);return k(),y}function h(p,m,E){let T=Cg.inlineCode(p,m,E);return E.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function yI(){return{exit:{taskListCheckValueChecked:kf,taskListCheckValueUnchecked:kf,paragraph:kI}}}function _I(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:wI}}}function kf(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function kI(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 i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;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 wI(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let l=Cg.listItem(e,t,n,{...r,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(d){return d+a}}function CI(){return[ZA(),TS(),kS(),pI(),yI()]}function AI(e){return{extensions:[JA(),xS(e),wS(),xI(e),_I()]}}function un(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i: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);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function fn(e,t){return e.length>0?(un(e,e.length,0,t),e):t}const wf={}.hasOwnProperty;function Sg(e){const t={};let n=-1;for(;++n<e.length;)SI(t,e[n]);return t}function SI(e,t){let n;for(n in t){const i=(wf.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){wf.call(i,a)||(i[a]=[]);const o=s[a];II(i[a],Array.isArray(o)?o:o?[o]:[])}}}function II(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);un(e,0,0,r)}const vI={tokenize:PI,partial:!0},Ig={tokenize:MI,partial:!0},vg={tokenize:BI,partial:!0},Rg={tokenize:FI,partial:!0},RI={tokenize:HI,partial:!0},Ng={name:"wwwAutolink",tokenize:LI,previous:Lg},Og={name:"protocolAutolink",tokenize:DI,previous:Dg},tr={name:"emailAutolink",tokenize:OI,previous:Pg},Yn={};function NI(){return{text:Yn}}let Rr=48;for(;Rr<123;)Yn[Rr]=tr,Rr++,Rr===58?Rr=65:Rr===91&&(Rr=97);Yn[43]=tr;Yn[45]=tr;Yn[46]=tr;Yn[95]=tr;Yn[72]=[tr,Og];Yn[104]=[tr,Og];Yn[87]=[tr,Ng];Yn[119]=[tr,Ng];function OI(e,t,n){const r=this;let i,s;return a;function a(c){return!Xl(c)||!Pg.call(r,r.previous)||cc(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(c))}function o(c){return Xl(c)?(e.consume(c),o):c===64?(e.consume(c),l):n(c)}function l(c){return c===46?e.check(RI,d,u)(c):c===45||c===95||Dt(c)?(s=!0,e.consume(c),l):d(c)}function u(c){return e.consume(c),i=!0,l}function d(c){return s&&i&&Ut(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function LI(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Lg.call(r,r.previous)||cc(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(vI,e.attempt(Ig,e.attempt(vg,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function DI(e,t,n){const r=this;let i="",s=!1;return a;function a(c){return(c===72||c===104)&&Dg.call(r,r.previous)&&!cc(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),o):n(c)}function o(c){if(Ut(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),o;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(c),l}return n(c)}function l(c){return c===47?(e.consume(c),s?u:(s=!0,l)):n(c)}function u(c){return c===null||Ka(c)||Je(c)||zr(c)||wo(c)?n(c):e.attempt(Ig,e.attempt(vg,d),n)(c)}function d(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function PI(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function MI(e,t,n){let r,i,s;return a;function a(u){return u===46||u===95?e.check(Rg,l,o)(u):u===null||Je(u)||zr(u)||u!==45&&wo(u)?l(u):(s=!0,e.consume(u),a)}function o(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function l(u){return i||r||!s?n(u):t(u)}}function BI(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(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(Rg,t,s)(a):a===null||Je(a)||zr(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function FI(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||Je(o)||zr(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Je(o)||zr(o)?t(o):r(o)}function s(o){return Ut(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):Ut(o)?(e.consume(o),a):n(o)}}function HI(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Dt(s)?n(s):t(s)}}function Lg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Je(e)}function Dg(e){return!Ut(e)}function Pg(e){return!(e===47||Xl(e))}function Xl(e){return e===43||e===45||e===46||e===95||Dt(e)}function cc(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 Ni(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&Dt(e.charCodeAt(n+1))&&Dt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Co(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Ql={name:"attention",resolveAll:UI,tokenize:jI};function UI(e,t){let n=-1,r,i,s,a,o,l,u,d;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 c={...e[r][1].end},h={...e[n][1].start};Cf(c,-l),Cf(h,l),a={type:l>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=fn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=fn(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),u=fn(u,Co(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=fn(u,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=fn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,un(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function jI(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=xi(r);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const u=e.exit("attentionSequence"),d=xi(l),c=!d||d===2&&i||n.includes(l),h=!i||i===2&&d||n.includes(r);return u._open=!!(s===42?c:c&&(i||!h)),u._close=!!(s===42?h:h&&(d||!c)),t(l)}}function Cf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const zI={name:"autolink",tokenize:$I};function $I(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return Ut(p)?(e.consume(p),a):p===64?n(p):u(p)}function a(p){return p===43||p===45||p===46||Dt(p)?(r=1,o(p)):u(p)}function o(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Dt(p))&&r++<32?(e.consume(p),o):(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||Ka(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),d):zA(p)?(e.consume(p),u):n(p)}function d(p){return Dt(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,d):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||Dt(p))&&r++<63){const m=p===45?h:c;return e.consume(p),m}return n(p)}}function Ue(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return Le(l)?(e.enter(n),o(l)):t(l)}function o(l){return Le(l)&&s++<i?(e.consume(l),o):(e.exit(n),t(l))}}const Ys={partial:!0,tokenize:VI};function VI(e,t,n){return r;function r(s){return Le(s)?Ue(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||be(s)?t(s):n(s)}}const Mg={continuation:{tokenize:YI},exit:GI,name:"blockQuote",tokenize:WI};function WI(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return Le(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function YI(e,t,n){const r=this;return i;function i(a){return Le(a)?Ue(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Mg,t,n)(a)}}function GI(e){e.exit("blockQuote")}const Bg={name:"characterEscape",tokenize:qI};function qI(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return VA(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Fg={name:"characterReference",tokenize:KI};function KI(e,t,n){const r=this;let i=0,s,a;return o;function o(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),l}function l(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,a=Dt,d(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=$A,d):(e.enter("characterReferenceValue"),s=7,a=Kl,d(c))}function d(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return a===Dt&&!uc(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(c)&&i++<s?(e.consume(c),d):n(c)}}const Af={partial:!0,tokenize:QI},Sf={concrete:!0,name:"codeFenced",tokenize:XI};function XI(e,t,n){const r=this,i={partial:!0,tokenize:D};let s=0,a=0,o;return l;function l(v){return u(v)}function u(v){const A=r.events[r.events.length-1];return s=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,o=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(v)}function d(v){return v===o?(a++,e.consume(v),d):a<3?n(v):(e.exit("codeFencedFenceSequence"),Le(v)?Ue(e,c,"whitespace")(v):c(v))}function c(v){return v===null||be(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check(Af,E,P)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===null||be(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(v)):Le(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ue(e,p,"whitespace")(v)):v===96&&v===o?n(v):(e.consume(v),h)}function p(v){return v===null||be(v)?c(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||be(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(v)):v===96&&v===o?n(v):(e.consume(v),m)}function E(v){return e.attempt(i,P,T)(v)}function T(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),b}function b(v){return s>0&&Le(v)?Ue(e,y,"linePrefix",s+1)(v):y(v)}function y(v){return v===null||be(v)?e.check(Af,E,P)(v):(e.enter("codeFlowValue"),k(v))}function k(v){return v===null||be(v)?(e.exit("codeFlowValue"),y(v)):(e.consume(v),k)}function P(v){return e.exit("codeFenced"),t(v)}function D(v,A,N){let z=0;return R;function R(M){return v.enter("lineEnding"),v.consume(M),v.exit("lineEnding"),W}function W(M){return v.enter("codeFencedFence"),Le(M)?Ue(v,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):j(M)}function j(M){return M===o?(v.enter("codeFencedFenceSequence"),w(M)):N(M)}function w(M){return M===o?(z++,v.consume(M),w):z>=a?(v.exit("codeFencedFenceSequence"),Le(M)?Ue(v,L,"whitespace")(M):L(M)):N(M)}function L(M){return M===null||be(M)?(v.exit("codeFencedFence"),A(M)):N(M)}}}function QI(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const nl={name:"codeIndented",tokenize:JI},ZI={partial:!0,tokenize:e3};function JI(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ue(e,s,"linePrefix",5)(u)}function s(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):be(u)?e.attempt(ZI,a,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||be(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),t(u)}}function e3(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):be(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ue(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):be(a)?i(a):n(a)}}const t3={name:"codeText",previous:r3,resolve:n3,tokenize:i3};function n3(e){let t=e.length-4,n=3,r,i;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;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function r3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function i3(e,t,n){let r=0,i,s;return a;function a(c){return e.enter("codeText"),e.enter("codeTextSequence"),o(c)}function o(c){return c===96?(e.consume(c),r++,o):(e.exit("codeTextSequence"),l(c))}function l(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),l):c===96?(s=e.enter("codeTextSequence"),i=0,d(c)):be(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||be(c)?(e.exit("codeTextData"),l(c)):(e.consume(c),u)}function d(c){return c===96?(e.consume(c),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(s.type="codeTextData",u(c))}}class s3{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 i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Mi(this.left,r),s.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),Mi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Mi(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);Mi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Mi(this.left,n.reverse())}}}function Mi(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 Hg(e){const t={};let n=-1,r,i,s,a,o,l,u;const d=new s3(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,a3(d,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return un(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function a3(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],u={};let d,c,h=-1,p=n,m=0,E=0;const T=[E];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),c&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<o.length;)o[h][0]==="exit"&&o[h-1][0]==="enter"&&o[h][1].type===o[h-1][1].type&&o[h][1].start.line!==o[h][1].end.line&&(E=h+1,T.push(E),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):T.pop(),h=T.length;h--;){const b=o.slice(T[h],T[h+1]),y=s.pop();l.push([y,y+b.length-1]),e.splice(y,2,b)}for(l.reverse(),h=-1;++h<l.length;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const o3={resolve:u3,tokenize:c3},l3={partial:!0,tokenize:d3};function u3(e){return Hg(e),e}function c3(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):be(o)?e.check(l3,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function d3(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ue(e,s,"linePrefix")}function s(a){if(a===null||be(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Ug(e,t,n,r,i,s,a,o,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return c;function c(b){return b===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(b),e.exit(s),h):b===null||b===32||b===41||Ka(b)?n(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),E(b))}function h(b){return b===62?(e.enter(s),e.consume(b),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===62?(e.exit("chunkString"),e.exit(o),h(b)):b===null||b===60||be(b)?n(b):(e.consume(b),b===92?m:p)}function m(b){return b===60||b===62||b===92?(e.consume(b),p):p(b)}function E(b){return!d&&(b===null||b===41||Je(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(b)):d<u&&b===40?(e.consume(b),d++,E):b===41?(e.consume(b),d--,E):b===null||b===32||b===40||Ka(b)?n(b):(e.consume(b),b===92?T:E)}function T(b){return b===40||b===41||b===92?(e.consume(b),E):E(b)}}function jg(e,t,n,r,i,s){const a=this;let o=0,l;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),d}function d(p){return o>999||p===null||p===91||p===93&&!l||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):be(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||be(p)||o++>999?(e.exit("chunkString"),d(p)):(e.consume(p),l||(l=!Le(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),o++,c):c(p)}}function zg(e,t,n,r,i,s){let a;return o;function o(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),a=h===40?41:h,l):n(h)}function l(h){return h===a?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),u(h))}function u(h){return h===a?(e.exit(s),l(a)):h===null?n(h):be(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ue(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===a||h===null||be(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:d)}function c(h){return h===a||h===92?(e.consume(h),d):d(h)}}function os(e,t){let n;return r;function r(i){return be(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Le(i)?Ue(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const f3={name:"definition",tokenize:p3},h3={partial:!0,tokenize:m3};function p3(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return jg.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=An(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 Je(p)?os(e,u)(p):u(p)}function u(p){return Ug(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(h3,c,c)(p)}function c(p){return Le(p)?Ue(e,h,"whitespace")(p):h(p)}function h(p){return p===null||be(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function m3(e,t,n){return r;function r(o){return Je(o)?os(e,i)(o):n(o)}function i(o){return zg(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Le(o)?Ue(e,a,"whitespace")(o):a(o)}function a(o){return o===null||be(o)?t(o):n(o)}}const g3={name:"hardBreakEscape",tokenize:b3};function b3(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return be(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const E3={name:"headingAtx",resolve:T3,tokenize:x3};function T3(e,t){let n=e.length-2,r=3,i,s;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&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},un(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function x3(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Je(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||be(d)?(e.exit("atxHeading"),t(d)):Le(d)?Ue(e,o,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||Je(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const y3=["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"],If=["pre","script","style","textarea"],_3={concrete:!0,name:"htmlFlow",resolveTo:C3,tokenize:A3},k3={partial:!0,tokenize:I3},w3={partial:!0,tokenize:S3};function C3(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 A3(e,t,n){const r=this;let i,s,a,o,l;return u;function u(S){return d(S)}function d(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),c}function c(S){return S===33?(e.consume(S),h):S===47?(e.consume(S),s=!0,E):S===63?(e.consume(S),i=3,r.interrupt?t:_):Ut(S)?(e.consume(S),a=String.fromCharCode(S),T):n(S)}function h(S){return S===45?(e.consume(S),i=2,p):S===91?(e.consume(S),i=5,o=0,m):Ut(S)?(e.consume(S),i=4,r.interrupt?t:_):n(S)}function p(S){return S===45?(e.consume(S),r.interrupt?t:_):n(S)}function m(S){const ge="CDATA[";return S===ge.charCodeAt(o++)?(e.consume(S),o===ge.length?r.interrupt?t:j:m):n(S)}function E(S){return Ut(S)?(e.consume(S),a=String.fromCharCode(S),T):n(S)}function T(S){if(S===null||S===47||S===62||Je(S)){const ge=S===47,pe=a.toLowerCase();return!ge&&!s&&If.includes(pe)?(i=1,r.interrupt?t(S):j(S)):y3.includes(a.toLowerCase())?(i=6,ge?(e.consume(S),b):r.interrupt?t(S):j(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):s?y(S):k(S))}return S===45||Dt(S)?(e.consume(S),a+=String.fromCharCode(S),T):n(S)}function b(S){return S===62?(e.consume(S),r.interrupt?t:j):n(S)}function y(S){return Le(S)?(e.consume(S),y):R(S)}function k(S){return S===47?(e.consume(S),R):S===58||S===95||Ut(S)?(e.consume(S),P):Le(S)?(e.consume(S),k):R(S)}function P(S){return S===45||S===46||S===58||S===95||Dt(S)?(e.consume(S),P):D(S)}function D(S){return S===61?(e.consume(S),v):Le(S)?(e.consume(S),D):k(S)}function v(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,A):Le(S)?(e.consume(S),v):N(S)}function A(S){return S===l?(e.consume(S),l=null,z):S===null||be(S)?n(S):(e.consume(S),A)}function N(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||Je(S)?D(S):(e.consume(S),N)}function z(S){return S===47||S===62||Le(S)?k(S):n(S)}function R(S){return S===62?(e.consume(S),W):n(S)}function W(S){return S===null||be(S)?j(S):Le(S)?(e.consume(S),W):n(S)}function j(S){return S===45&&i===2?(e.consume(S),H):S===60&&i===1?(e.consume(S),U):S===62&&i===4?(e.consume(S),se):S===63&&i===3?(e.consume(S),_):S===93&&i===5?(e.consume(S),Q):be(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(k3,te,w)(S)):S===null||be(S)?(e.exit("htmlFlowData"),w(S)):(e.consume(S),j)}function w(S){return e.check(w3,L,te)(S)}function L(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),M}function M(S){return S===null||be(S)?w(S):(e.enter("htmlFlowData"),j(S))}function H(S){return S===45?(e.consume(S),_):j(S)}function U(S){return S===47?(e.consume(S),a="",G):j(S)}function G(S){if(S===62){const ge=a.toLowerCase();return If.includes(ge)?(e.consume(S),se):j(S)}return Ut(S)&&a.length<8?(e.consume(S),a+=String.fromCharCode(S),G):j(S)}function Q(S){return S===93?(e.consume(S),_):j(S)}function _(S){return S===62?(e.consume(S),se):S===45&&i===2?(e.consume(S),_):j(S)}function se(S){return S===null||be(S)?(e.exit("htmlFlowData"),te(S)):(e.consume(S),se)}function te(S){return e.exit("htmlFlow"),t(S)}}function S3(e,t,n){const r=this;return i;function i(a){return be(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function I3(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ys,t,n)}}const v3={name:"htmlText",tokenize:R3};function R3(e,t,n){const r=this;let i,s,a;return o;function o(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),l}function l(_){return _===33?(e.consume(_),u):_===47?(e.consume(_),D):_===63?(e.consume(_),k):Ut(_)?(e.consume(_),N):n(_)}function u(_){return _===45?(e.consume(_),d):_===91?(e.consume(_),s=0,m):Ut(_)?(e.consume(_),y):n(_)}function d(_){return _===45?(e.consume(_),p):n(_)}function c(_){return _===null?n(_):_===45?(e.consume(_),h):be(_)?(a=c,U(_)):(e.consume(_),c)}function h(_){return _===45?(e.consume(_),p):c(_)}function p(_){return _===62?H(_):_===45?h(_):c(_)}function m(_){const se="CDATA[";return _===se.charCodeAt(s++)?(e.consume(_),s===se.length?E:m):n(_)}function E(_){return _===null?n(_):_===93?(e.consume(_),T):be(_)?(a=E,U(_)):(e.consume(_),E)}function T(_){return _===93?(e.consume(_),b):E(_)}function b(_){return _===62?H(_):_===93?(e.consume(_),b):E(_)}function y(_){return _===null||_===62?H(_):be(_)?(a=y,U(_)):(e.consume(_),y)}function k(_){return _===null?n(_):_===63?(e.consume(_),P):be(_)?(a=k,U(_)):(e.consume(_),k)}function P(_){return _===62?H(_):k(_)}function D(_){return Ut(_)?(e.consume(_),v):n(_)}function v(_){return _===45||Dt(_)?(e.consume(_),v):A(_)}function A(_){return be(_)?(a=A,U(_)):Le(_)?(e.consume(_),A):H(_)}function N(_){return _===45||Dt(_)?(e.consume(_),N):_===47||_===62||Je(_)?z(_):n(_)}function z(_){return _===47?(e.consume(_),H):_===58||_===95||Ut(_)?(e.consume(_),R):be(_)?(a=z,U(_)):Le(_)?(e.consume(_),z):H(_)}function R(_){return _===45||_===46||_===58||_===95||Dt(_)?(e.consume(_),R):W(_)}function W(_){return _===61?(e.consume(_),j):be(_)?(a=W,U(_)):Le(_)?(e.consume(_),W):z(_)}function j(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),i=_,w):be(_)?(a=j,U(_)):Le(_)?(e.consume(_),j):(e.consume(_),L)}function w(_){return _===i?(e.consume(_),i=void 0,M):_===null?n(_):be(_)?(a=w,U(_)):(e.consume(_),w)}function L(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Je(_)?z(_):(e.consume(_),L)}function M(_){return _===47||_===62||Je(_)?z(_):n(_)}function H(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function U(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),G}function G(_){return Le(_)?Ue(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):Q(_)}function Q(_){return e.enter("htmlTextData"),a(_)}}const dc={name:"labelEnd",resolveAll:D3,resolveTo:P3,tokenize:M3},N3={tokenize:B3},O3={tokenize:F3},L3={tokenize:H3};function D3(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 i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&un(e,0,e.length,n),e}function P3(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",u,t]],o=fn(o,e.slice(s+1,s+r+3)),o=fn(o,[["enter",d,t]]),o=fn(o,Co(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=fn(o,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),o=fn(o,e.slice(a+1)),o=fn(o,[["exit",l,t]]),un(e,s,e.length,o),e}function M3(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(h){return s?s._inactive?c(h):(a=r.parser.defined.includes(An(r.sliceSerialize({start:s.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(N3,d,a?d:c)(h):h===91?e.attempt(O3,d,a?u:c)(h):a?d(h):c(h)}function u(h){return e.attempt(L3,d,c)(h)}function d(h){return t(h)}function c(h){return s._balanced=!0,n(h)}}function B3(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Je(c)?os(e,s)(c):s(c)}function s(c){return c===41?d(c):Ug(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function a(c){return Je(c)?os(e,l)(c):d(c)}function o(c){return n(c)}function l(c){return c===34||c===39||c===40?zg(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function u(c){return Je(c)?os(e,d)(c):d(c)}function d(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function F3(e,t,n){const r=this;return i;function i(o){return jg.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(An(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function H3(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const U3={name:"labelStartImage",resolveAll:dc.resolveAll,tokenize:j3};function j3(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const z3={name:"labelStartLink",resolveAll:dc.resolveAll,tokenize:$3};function $3(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const rl={name:"lineEnding",tokenize:V3};function V3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ue(e,t,"linePrefix")}}const Na={name:"thematicBreak",tokenize:W3};function W3(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||be(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Le(u)?Ue(e,o,"whitespace")(u):o(u))}}const Vt={continuation:{tokenize:K3},exit:Q3,name:"list",tokenize:q3},Y3={partial:!0,tokenize:Z3},G3={partial:!0,tokenize:X3};function q3(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Kl(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Na,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 Kl(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(Ys,r.interrupt?n:d,e.attempt(Y3,h,c))}function d(p){return r.containerState.initialBlankLine=!0,s++,h(p)}function c(p){return Le(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function K3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ys,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ue(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!Le(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(G3,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ue(e,e.attempt(Vt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function X3(e,t,n){const r=this;return Ue(e,i,"listItemIndent",r.containerState.size+1);function i(s){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(s):n(s)}}function Q3(e){e.exit(this.containerState.type)}function Z3(e,t,n){const r=this;return Ue(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!Le(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const vf={name:"setextUnderline",resolveTo:J3,tokenize:ev};function J3(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function ev(e,t,n){const r=this;let i;return s;function s(u){let d=r.events.length,c;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){c=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),Le(u)?Ue(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||be(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const tv={tokenize:uv,partial:!0};function nv(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:av,continuation:{tokenize:ov},exit:lv}},text:{91:{name:"gfmFootnoteCall",tokenize:sv},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rv,resolveTo:iv}}}}function rv(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][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 o;function o(l){if(!a||!a._balanced)return n(l);const u=An(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function iv(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)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function sv(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),l}function l(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(s>999||c===93&&!a||c===null||c===91||Je(c))return n(c);if(c===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(An(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Je(c)||(a=!0),s++,e.consume(c),c===92?d:u}function d(c){return c===91||c===92||c===93?(e.consume(c),s++,u):u(c)}}function av(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(m)}function d(m){if(a>999||m===93&&!o||m===null||m===91||Je(m))return n(m);if(m===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return s=An(r.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Je(m)||(o=!0),a++,e.consume(m),m===92?c:d}function c(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ue(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function ov(e,t,n){return e.check(Ys,t,e.attempt(tv,t,n))}function lv(e){e.exit("gfmFootnoteDefinition")}function uv(e,t,n){const r=this;return Ue(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function cv(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){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 d={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},c={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",d,o],["enter",a[u][1],o],["exit",a[u][1],o],["enter",c,o]],p=o.parser.constructs.insideSpan.null;p&&un(h,h.length,0,Co(p,a.slice(u+1,l),o)),un(h,h.length,0,[["exit",c,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",d,o]]),un(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 s(a,o,l){const u=this.previous,d=this.events;let c=0;return h;function h(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const E=xi(u);if(m===126)return c>1?l(m):(a.consume(m),c++,p);if(c<2&&!n)return l(m);const T=a.exit("strikethroughSequenceTemporary"),b=xi(m);return T._open=!b||b===2&&!!E,T._close=!E||E===2&&!!b,o(m)}}}class dv{constructor(){this.map=[]}add(t,n,r){fv(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[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 i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function fv(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function hv(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function pv(){return{flow:{null:{name:"table",tokenize:mv,resolveAll:gv}}}}function mv(e,t,n){const r=this;let i=0,s=0,a;return o;function o(R){let W=r.events.length-1;for(;W>-1;){const L=r.events[W][1].type;if(L==="lineEnding"||L==="linePrefix")W--;else break}const j=W>-1?r.events[W][1].type:null,w=j==="tableHead"||j==="tableRow"?v:l;return w===v&&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,s+=1),d(R)}function d(R){return R===null?n(R):be(R)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),p):n(R):Le(R)?Ue(e,d,"whitespace")(R):(s+=1,a&&(a=!1,i+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),c(R)))}function c(R){return R===null||R===124||Je(R)?(e.exit("data"),d(R)):(e.consume(R),R===92?h:c)}function h(R){return R===92||R===124?(e.consume(R),c):c(R)}function p(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),a=!1,Le(R)?Ue(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):m(R))}function m(R){return R===45||R===58?T(R):R===124?(a=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),E):D(R)}function E(R){return Le(R)?Ue(e,T,"whitespace")(R):T(R)}function T(R){return R===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),b):R===45?(s+=1,b(R)):R===null||be(R)?P(R):D(R)}function b(R){return R===45?(e.enter("tableDelimiterFiller"),y(R)):D(R)}function y(R){return R===45?(e.consume(R),y):R===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(R))}function k(R){return Le(R)?Ue(e,P,"whitespace")(R):P(R)}function P(R){return R===124?m(R):R===null||be(R)?!a||i!==s?D(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):D(R)}function D(R){return n(R)}function v(R){return e.enter("tableRow"),A(R)}function A(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),A):R===null||be(R)?(e.exit("tableRow"),t(R)):Le(R)?Ue(e,A,"whitespace")(R):(e.enter("data"),N(R))}function N(R){return R===null||R===124||Je(R)?(e.exit("data"),A(R)):(e.consume(R),R===92?z:N)}function z(R){return R===92||R===124?(e.consume(R),N):N(R)}}function gv(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,u,d,c;const h=new dv;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(o=!1,l!==0&&(Rf(h,t,l,u,d),d=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",d,t]])),i=m.type==="tableDelimiterRow"?2:d?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],c=ca(h,t,s,i,void 0,c),s=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],c=ca(h,t,s,i,void 0,c)),s=a,a=[s[1],n,0,0])):m.type==="tableHead"?(o=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],c=ca(h,t,s,i,n,c)):a[1]!==0&&(c=ca(h,t,a,i,n,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Rf(h,t,l,u,d),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=hv(t.events,n))}return e}function ca(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},si(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=si(t.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const u=si(t.events,n[2]),d=si(t.events,n[3]),c={type:o,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",c,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 m=n[2]+1,E=n[3]-n[2]-1;e.add(m,E,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(s.end=Object.assign({},si(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Rf(e,t,n,r,i){const s=[],a=si(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function si(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bv={name:"tasklistCheck",tokenize:Tv};function Ev(){return{text:{91:bv}}}function Tv(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Je(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"),o):n(l)}function o(l){return be(l)?t(l):Le(l)?e.check({tokenize:xv},t,n)(l):n(l)}}function xv(e,t,n){return Ue(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function yv(e){return Sg([NI(),nv(),cv(e),pv(),Ev()])}const _v={};function kv(e){const t=this,n=e||_v,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(yv(n)),s.push(CI()),a.push(AI(n))}var wv=Object.defineProperty,Cv=Object.defineProperties,Av=Object.getOwnPropertyDescriptors,Nf=Object.getOwnPropertySymbols,Sv=Object.prototype.hasOwnProperty,Iv=Object.prototype.propertyIsEnumerable,Of=(e,t,n)=>t in e?wv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$g=(e,t)=>{for(var n in t||(t={}))Sv.call(t,n)&&Of(e,n,t[n]);if(Nf)for(var n of Nf(t))Iv.call(t,n)&&Of(e,n,t[n]);return e},Vg=(e,t)=>Cv(e,Av(t)),vv=/(\*\*)([^*]*\*?)$/,Rv=/(__)([^_]*?)$/,Nv=/(\*\*\*)([^*]*?)$/,Ov=/(\*)([^*]*?)$/,Lv=/(_)([^_]*?)$/,Dv=/(`)([^`]*?)$/,Pv=/(~~)([^~]*?)$/,Jr=/^[\s_~*`]*$/,Wg=/^[\s]*[-*+][\s]+$/,Mv=/[\p{L}\p{N}_]/u,Bv=/^```[^`\n]*```?$/,Fv=/^\*{4,}$/,Hv=/(__)([^_]+)_$/,Uv=/(~~)([^~]+)~$/,Lf=/~~/g,Tr=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:Mv.test(e)},Is=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},jv=(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},Yg=(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},Ao=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},zv=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
69
+ `)return!1}return!1},Gg=(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]==="]"?zv(e,t):!1;if(e[n]===`
70
+ `)return!1}return!1},$v=(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]===`
71
+ `)return!1}return!1},fc=(e,t,n)=>{let r=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
72
72
  `){r=l+1;break}let i=e.length;for(let l=t;l<e.length;l+=1)if(e[l]===`
73
- `){i=l;break}let s=e.substring(r,i),a=0,o=!1;for(let l of s)if(l===n)a+=1;else if(l!==" "&&l!==" "){o=!0;break}return a>=3&&!o},jv=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,zv=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(jv,(t,n,r,i)=>Is(e,i)?t:`${n}\\>${r}`),$v=(e,t,n,r)=>n==="\\"||e.includes("$")&&Ao(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Tr(n)&&Tr(r)||(!n||n===" "||n===" "||n===`
73
+ `){i=l;break}let s=e.substring(r,i),a=0,o=!1;for(let l of s)if(l===n)a+=1;else if(l!==" "&&l!==" "){o=!0;break}return a>=3&&!o},Vv=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Wv=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Vv,(t,n,r,i)=>Is(e,i)?t:`${n}\\>${r}`),Yv=(e,t,n,r)=>n==="\\"||e.includes("$")&&Ao(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Tr(n)&&Tr(r)||(!n||n===" "||n===" "||n===`
74
74
  `)&&(!r||r===" "||r===" "||r===`
75
- `)),Gg=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";$v(e,i,s,a)||(t+=1)}return t},Vv=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Ao(e,t)||Yg(e,t)||Uv(e,t)||n==="_"||r==="_"||n&&r&&Tr(n)&&Tr(r)),Wv=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";Vv(e,i,s,a)||(t+=1)}return t},Yv=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},fc=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},Lf=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},Gv=(e,t,n)=>{if(!t||Jr.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
76
- `),i=r===-1?0:r+1,s=e.substring(i,n);return Vg.test(s)&&t.includes(`
77
- `)?!0:dc(e,n,"*")},qv=e=>{let t=e.match(Av);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Is(e,r)||Gv(e,n,r)?e:fc(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Kv=(e,t,n)=>{if(!t||Jr.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
78
- `),i=r===-1?0:r+1,s=e.substring(i,n);return Vg.test(s)&&t.includes(`
79
- `)?!0:dc(e,n,"_")},Xv=e=>{let t=e.match(Sv);if(!t){let i=e.match(Mv);if(i){let s=e.lastIndexOf(i[1]);if(!Is(e,s)&&Lf(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Is(e,r)||Kv(e,n,r)?e:Lf(e)%2===1?`${e}__`:e},Qv=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]!=="\\"&&!Ao(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
75
+ `)),qg=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";Yv(e,i,s,a)||(t+=1)}return t},Gv=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Ao(e,t)||Gg(e,t)||$v(e,t)||n==="_"||r==="_"||n&&r&&Tr(n)&&Tr(r)),qv=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";Gv(e,i,s,a)||(t+=1)}return t},Kv=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},hc=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},Df=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},Xv=(e,t,n)=>{if(!t||Jr.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
76
+ `),i=r===-1?0:r+1,s=e.substring(i,n);return Wg.test(s)&&t.includes(`
77
+ `)?!0:fc(e,n,"*")},Qv=e=>{let t=e.match(vv);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Is(e,r)||Xv(e,n,r)?e:hc(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Zv=(e,t,n)=>{if(!t||Jr.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
78
+ `),i=r===-1?0:r+1,s=e.substring(i,n);return Wg.test(s)&&t.includes(`
79
+ `)?!0:fc(e,n,"_")},Jv=e=>{let t=e.match(Rv);if(!t){let i=e.match(Hv);if(i){let s=e.lastIndexOf(i[1]);if(!Is(e,s)&&Df(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Is(e,r)||Zv(e,n,r)?e:Df(e)%2===1?`${e}__`:e},eR=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]!=="\\"&&!Ao(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
80
80
  `)&&(!i||i===" "||i===" "||i===`
81
- `)||r&&i&&Tr(r)&&Tr(i))continue;return n}}return-1},Zv=e=>{if(!e.match(vv))return e;let t=Qv(e);if(t===-1)return e;let n=e.substring(t+1);return!n||Jr.test(n)?e:Gg(e)%2===1?`${e}*`:e},qg=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]!=="\\"&&!Ao(e,n)&&!Yg(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&Tr(r)&&Tr(i))continue;return n}}return-1},Jv=e=>{let t=e.length;for(;t>0&&e[t-1]===`
82
- `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},eR=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(fc(t)%2!==1)return null;let n=t.indexOf("**"),r=qg(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},tR=e=>{if(!e.match(Rv))return e;let t=qg(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Jr.test(n))return e;if(Wv(e)%2===1){let r=eR(e);return r!==null?r:Jv(e)}return e},nR=e=>{let t=fc(e),n=Gg(e);return t%2===0&&n%2===0},rR=(e,t,n)=>!t||Jr.test(t)||Is(e,n)?!0:dc(e,n,"*"),iR=e=>{if(Pv.test(e))return e;let t=e.match(Iv);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return rR(e,n,r)?e:Yv(e)%2===1?nR(e)?e:`${e}***`:e},vs=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},sR=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},aR=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!sR(e,n)&&(t+=1);return t},oR=/<[a-zA-Z/][^>]*$/,lR=e=>{let t=e.match(oR);return!t||t.index===void 0||vs(e,t.index)?e:e.substring(0,t.index).trimEnd()},uR=e=>!e.match(Dv)||e.includes(`
83
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,cR=e=>(e.match(/```/g)||[]).length%2===1,dR=e=>{let t=uR(e);if(t!==null)return t;let n=e.match(Nv);if(n&&!cR(e)){let r=n[2];if(!r||Jr.test(r))return e;if(aR(e)%2===1)return`${e}\``}return e},fR=(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)==="```",hR=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!fR(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},pR=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
81
+ `)||r&&i&&Tr(r)&&Tr(i))continue;return n}}return-1},tR=e=>{if(!e.match(Ov))return e;let t=eR(e);if(t===-1)return e;let n=e.substring(t+1);return!n||Jr.test(n)?e:qg(e)%2===1?`${e}*`:e},Kg=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]!=="\\"&&!Ao(e,n)&&!Gg(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&Tr(r)&&Tr(i))continue;return n}}return-1},nR=e=>{let t=e.length;for(;t>0&&e[t-1]===`
82
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},rR=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(hc(t)%2!==1)return null;let n=t.indexOf("**"),r=Kg(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},iR=e=>{if(!e.match(Lv))return e;let t=Kg(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Jr.test(n))return e;if(qv(e)%2===1){let r=rR(e);return r!==null?r:nR(e)}return e},sR=e=>{let t=hc(e),n=qg(e);return t%2===0&&n%2===0},aR=(e,t,n)=>!t||Jr.test(t)||Is(e,n)?!0:fc(e,n,"*"),oR=e=>{if(Fv.test(e))return e;let t=e.match(Nv);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return aR(e,n,r)?e:Kv(e)%2===1?sR(e)?e:`${e}***`:e},vs=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},lR=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},uR=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!lR(e,n)&&(t+=1);return t},cR=/<[a-zA-Z/][^>]*$/,dR=e=>{let t=e.match(cR);return!t||t.index===void 0||vs(e,t.index)?e:e.substring(0,t.index).trimEnd()},fR=e=>!e.match(Bv)||e.includes(`
83
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,hR=e=>(e.match(/```/g)||[]).length%2===1,pR=e=>{let t=fR(e);if(t!==null)return t;let n=e.match(Dv);if(n&&!hR(e)){let r=n[2];if(!r||Jr.test(r))return e;if(uR(e)%2===1)return`${e}\``}return e},mR=(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)==="```",gR=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!mR(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},bR=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
84
84
  `,t)!==-1&&!e.endsWith(`
85
85
  `)?`${e}
86
- $$`:`${e}$$`},mR=e=>hR(e)%2===0?e:pR(e),gR=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=Fv(e,t);if(r===-1||vs(e,r))return null;let i=r>0&&e[r-1]==="!",s=i?r-1:r,a=e.substring(0,s);if(i)return a;let o=e.substring(r+1,t);return n==="text-only"?`${a}${o}`:`${a}[${o}](streamdown:incomplete-link)`},Df=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!vs(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Wg(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},bR=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=Df(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(Wg(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=Df(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},Kg=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!vs(e,n)){let r=gR(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!vs(e,r)){let i=bR(e,r,t);if(i!==null)return i}return e},ER=/^-{1,2}$/,TR=/^[\s]*-{1,2}[\s]+$/,xR=/^={1,2}$/,yR=/^[\s]*={1,2}[\s]+$/,_R=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
87
- `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(ER.test(i)&&!n.match(TR)){let s=r.split(`
88
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(xR.test(i)&&!n.match(yR)){let s=r.split(`
89
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},kR=e=>{var t,n;let r=e.match(Ov);if(r){let i=r[2];if(!i||Jr.test(i))return e;if(((t=e.match(Of))==null?void 0:t.length)%2===1)return`${e}~~`}else if(e.match(Bv)&&((n=e.match(Of))==null?void 0:n.length)%2===1)return`${e}~`;return e},rl=e=>e!==!1,tn={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},wR=[{handler:{name:"comparisonOperators",handle:zv,priority:tn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:lR,priority:tn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:_R,priority:tn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Kg,priority:tn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:iR,priority:tn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:qv,priority:tn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Xv,priority:tn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Zv,priority:tn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:tR,priority:tn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:dR,priority:tn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:kR,priority:tn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:mR,priority:tn.KATEX},optionKey:"katex"}],CR=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return wR.filter(({handler:r,optionKey:i})=>r.name==="links"?rl(e==null?void 0:e.links)||rl(e==null?void 0:e.images):rl(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:$g(zg({},r),{handle:s=>Kg(s,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},AR=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=CR(t),s=((n=t==null?void 0:t.handlers)!=null?n:[]).map(o=>{var l;return{handler:$g(zg({},o),{priority:(l=o.priority)!=null?l:tn.DEFAULT}),earlyReturn:void 0}}),a=[...i,...s].sort((o,l)=>{var u,d;return((u=o.handler.priority)!=null?u:0)-((d=l.handler.priority)!=null?d:0)});for(let{handler:o,earlyReturn:l}of a)if(r=o.handle(r),l!=null&&l(r))return r;return r},SR=AR;const IR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,RR={};function Pf(e,t){return(RR.jsx?vR:IR).test(e)}const NR=/[ \t\n\f\r]/g;function OR(e){return typeof e=="object"?e.type==="text"?Mf(e.value):!1:Mf(e)}function Mf(e){return e.replace(NR,"")===""}var ni={},il,Bf;function LR(){if(Bf)return il;Bf=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
90
- `,u="/",d="*",c="",h="comment",p="declaration";il=function(E,T){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];T=T||{};var b=1,y=1;function k(w){var L=w.match(t);L&&(b+=L.length);var M=w.lastIndexOf(l);y=~M?w.length-M:y+w.length}function P(){var w={line:b,column:y};return function(L){return L.position=new D(w),N(),L}}function D(w){this.start=w,this.end={line:b,column:y},this.source=T.source}D.prototype.content=E;function v(w){var L=new Error(T.source+":"+b+":"+y+": "+w);if(L.reason=w,L.filename=T.source,L.line=b,L.column=y,L.source=E,!T.silent)throw L}function A(w){var L=w.exec(E);if(L){var M=L[0];return k(M),E=E.slice(M.length),L}}function N(){A(n)}function z(w){var L;for(w=w||[];L=R();)L!==!1&&w.push(L);return w}function R(){var w=P();if(!(u!=E.charAt(0)||d!=E.charAt(1))){for(var L=2;c!=E.charAt(L)&&(d!=E.charAt(L)||u!=E.charAt(L+1));)++L;if(L+=2,c===E.charAt(L-1))return v("End of comment missing");var M=E.slice(2,L-2);return y+=2,k(M),E=E.slice(L),y+=2,w({type:h,comment:M})}}function W(){var w=P(),L=A(r);if(L){if(R(),!A(i))return v("property missing ':'");var M=A(s),H=w({type:p,property:m(L[0].replace(e,c)),value:M?m(M[0].replace(e,c)):c});return A(a),H}}function j(){var w=[];z(w);for(var L;L=W();)L!==!1&&(w.push(L),z(w));return w}return N(),j()};function m(E){return E?E.replace(o,c):c}return il}var Ff;function DR(){if(Ff)return ni;Ff=1;var e=ni&&ni.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ni,"__esModule",{value:!0}),ni.default=n;var t=e(LR());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var a=(0,t.default)(r),o=typeof i=="function";return a.forEach(function(l){if(l.type==="declaration"){var u=l.property,d=l.value;o?i(u,d,l):d&&(s=s||{},s[u]=d)}}),s}return ni}var Bi={},Hf;function PR(){if(Hf)return Bi;Hf=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(u){return!u||n.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},o=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),s(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,o):u=u.replace(r,o),u.replace(t,a))};return Bi.camelCase=l,Bi}var Fi,Uf;function MR(){if(Uf)return Fi;Uf=1;var e=Fi&&Fi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(DR()),n=PR();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(o,l){o&&l&&(a[(0,n.camelCase)(o,s)]=l)}),a}return r.default=r,Fi=r,Fi}var BR=MR();const FR=qh(BR);function ls(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jf(e.position):"start"in e||"end"in e?jf(e):"line"in e||"column"in e?Ql(e):""}function Ql(e){return zf(e&&e.line)+":"+zf(e&&e.column)}function jf(e){return Ql(e&&e.start)+"-"+Ql(e&&e.end)}function zf(e){return e&&typeof e=="number"?e:1}class Bt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=ls(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}Bt.prototype.file="";Bt.prototype.name="";Bt.prototype.reason="";Bt.prototype.message="";Bt.prototype.stack="";Bt.prototype.column=void 0;Bt.prototype.line=void 0;Bt.prototype.ancestors=void 0;Bt.prototype.cause=void 0;Bt.prototype.fatal=void 0;Bt.prototype.place=void 0;Bt.prototype.ruleId=void 0;Bt.prototype.source=void 0;const hc={}.hasOwnProperty,HR=new Map,UR=/[A-Z]/g,jR=new Set(["table","tbody","thead","tfoot","tr"]),zR=new Set(["td","th"]),Xg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $R(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=QR(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=XR(n,t.jsx,t.jsxs)}const i={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"?Ai:Eo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Qg(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Qg(e,t,n){if(t.type==="element")return VR(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return WR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return GR(e,t,n);if(t.type==="mdxjsEsm")return YR(e,t);if(t.type==="root")return qR(e,t,n);if(t.type==="text")return KR(e,t)}function VR(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ai,e.schema=i),e.ancestors.push(t);const s=Jg(e,t.tagName,!1),a=ZR(e,t);let o=mc(e,t);return jR.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!OR(l):!0})),Zg(e,a,s,t),pc(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function WR(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)}Rs(e,t.position)}function YR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Rs(e,t.position)}function GR(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ai,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Jg(e,t.name,!0),a=JR(e,t),o=mc(e,t);return Zg(e,a,s,t),pc(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function qR(e,t,n){const r={};return pc(r,mc(e,t)),e.create(t,e.Fragment,r,n)}function KR(e,t){return t.value}function Zg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function XR(e,t,n){return r;function r(i,s,a,o){const u=Array.isArray(a.children)?n:t;return o?u(s,a,o):u(s,a)}}function QR(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=Wn(r);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function ZR(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&hc.call(t.properties,i)){const s=eN(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&zR.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function JR(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Rs(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else Rs(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function mc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:HR;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const o=Qg(e,s,a);o!==void 0&&n.push(o)}return n}function eN(e,t,n){const r=Qu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?o0(n):l0(n)),r.property==="style"){let i=typeof n=="object"?n:tN(e,String(n));return e.stylePropertyNameCase==="css"&&(i=nN(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ik[r.property]||r.property:r.attribute,n]}}function tN(e,t){try{return FR(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Bt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Xg+"#cannot-parse-style-attribute",i}}function Jg(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=Pf(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=Pf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return hc.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Rs(e)}function Rs(e,t){const n=new Bt("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=Xg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nN(e){const t={};let n;for(n in e)hc.call(e,n)&&(t[rN(n)]=e[n]);return t}function rN(e){let t=e.replace(UR,iN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function iN(e){return"-"+e.toLowerCase()}const sl={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"]},sN={tokenize:aN};function aN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ue(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return be(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const oN={tokenize:lN},$f={tokenize:uN};function lN(e){const t=this,n=[];let r=0,i,s,a;return o;function o(k){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,l,u)(k)}return u(k)}function l(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const P=t.events.length;let D=P,v;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){v=t.events[D][1].end;break}b(r);let A=P;for(;A<t.events.length;)t.events[A][1].end={...v},A++;return un(t.events,D+1,0,t.events.slice(P)),t.events.length=A,u(k)}return o(k)}function u(k){if(r===n.length){if(!i)return h(k);if(i.currentConstruct&&i.currentConstruct.concrete)return m(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($f,d,c)(k)}function d(k){return i&&y(),b(r),h(k)}function c(k){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(k)}function h(k){return t.containerState={},e.attempt($f,p,m)(k)}function p(k){return r++,n.push([t.currentConstruct,t.containerState]),h(k)}function m(k){if(k===null){i&&y(),b(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),E(k)}function E(k){if(k===null){T(e.exit("chunkFlow"),!0),b(0),e.consume(k);return}return be(k)?(e.consume(k),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(k),E)}function T(k,P){const D=t.sliceStream(k);if(P&&D.push(null),k.previous=s,s&&(s.next=k),s=k,i.defineSkip(k.start),i.write(D),t.parser.lazy[k.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<a&&(!i.events[v][1].end||i.events[v][1].end.offset>a))return;const A=t.events.length;let N=A,z,R;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(z){R=t.events[N][1].end;break}z=!0}for(b(r),v=A;v<t.events.length;)t.events[v][1].end={...R},v++;un(t.events,N+1,0,t.events.slice(A)),t.events.length=v}}function b(k){let P=n.length;for(;P-- >k;){const D=n[P];t.containerState=D[1],D[0].exit.call(t,e)}n.length=k}function y(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function uN(e,t,n){return Ue(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const cN={tokenize:dN};function dN(e){const t=this,n=e.attempt(Ys,r,e.attempt(this.parser.constructs.flowInitial,i,Ue(e,e.attempt(this.parser.constructs.flow,i,e.attempt(i3,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const fN={resolveAll:t1()},hN=e1("string"),pN=e1("text");function e1(e){return{resolveAll:t1(e==="text"?mN:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(d){return u(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),s(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const c=i[d];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function t1(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function mN(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],i=t.sliceStream(r);let s=i.length,a=-1,o=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)l=!0,o++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},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 gN={42:Vt,43:Vt,45:Vt,48:Vt,49:Vt,50:Vt,51:Vt,52:Vt,53:Vt,54:Vt,55:Vt,56:Vt,57:Vt,62:Pg},bN={91:u3},EN={[-2]:tl,[-1]:tl,32:tl},TN={35:m3,42:Na,45:[If,Na],60:T3,61:If,95:Na,96:Af,126:Af},xN={38:Bg,92:Mg},yN={[-5]:nl,[-4]:nl,[-3]:nl,33:B3,38:Bg,42:Xl,60:[HI,A3],91:H3,92:[h3,Mg],93:cc,95:Xl,96:ZI},_N={null:[Xl,fN]},kN={null:[42,95]},wN={null:[]},CN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:kN,contentInitial:bN,disable:wN,document:gN,flow:TN,flowInitial:EN,insideSpan:_N,string:xN,text:yN},Symbol.toStringTag,{value:"Module"}));function AN(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 i={},s=[];let a=[],o=[];const l={attempt:A(D),check:A(v),consume:y,enter:k,exit:P,interrupt:A(v,{interrupt:!0})},u={code:null,containerState:{},defineSkip:E,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let d=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function c(W){return a=fn(a,W),T(),a[a.length-1]!==null?[]:(N(t,0),u.events=Co(s,u.events,u),u.events)}function h(W,j){return IN(p(W),j)}function p(W){return SN(a,W)}function m(){const{_bufferIndex:W,_index:j,line:w,column:L,offset:M}=r;return{_bufferIndex:W,_index:j,line:w,column:L,offset:M}}function E(W){i[W.line]=W.column,R()}function T(){let W;for(;r._index<a.length;){const j=a[r._index];if(typeof j=="string")for(W=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===W&&r._bufferIndex<j.length;)b(j.charCodeAt(r._bufferIndex));else b(j)}}function b(W){d=d(W)}function y(W){be(W)?(r.line++,r.column=1,r.offset+=W===-3?2:1,R()):W!==-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=W}function k(W,j){const w=j||{};return w.type=W,w.start=m(),u.events.push(["enter",w,u]),o.push(w),w}function P(W){const j=o.pop();return j.end=m(),u.events.push(["exit",j,u]),j}function D(W,j){N(W,j.from)}function v(W,j){j.restore()}function A(W,j){return w;function w(L,M,H){let U,G,Q,_;return Array.isArray(L)?te(L):"tokenize"in L?te([L]):se(L);function se(me){return qe;function qe(X){const ue=X!==null&&me[X],ke=X!==null&&me.null,Me=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(ke)?ke:ke?[ke]:[]];return te(Me)(X)}}function te(me){return U=me,G=0,me.length===0?H:S(me[G])}function S(me){return qe;function qe(X){return _=z(),Q=me,me.partial||(u.currentConstruct=me),me.name&&u.parser.constructs.disable.null.includes(me.name)?pe():me.tokenize.call(j?Object.assign(Object.create(u),j):u,l,ge,pe)(X)}}function ge(me){return W(Q,_),M}function pe(me){return _.restore(),++G<U.length?S(U[G]):H}}}function N(W,j){W.resolveAll&&!s.includes(W)&&s.push(W),W.resolve&&un(u.events,j,u.events.length-j,W.resolve(u.events.slice(j),u)),W.resolveTo&&(u.events=W.resolveTo(u.events,u))}function z(){const W=m(),j=u.previous,w=u.currentConstruct,L=u.events.length,M=Array.from(o);return{from:L,restore:H};function H(){r=W,u.previous=j,u.currentConstruct=w,u.events.length=L,o=M,R()}}function R(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function SN(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function IN(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
86
+ $$`:`${e}$$`},ER=e=>gR(e)%2===0?e:bR(e),TR=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=jv(e,t);if(r===-1||vs(e,r))return null;let i=r>0&&e[r-1]==="!",s=i?r-1:r,a=e.substring(0,s);if(i)return a;let o=e.substring(r+1,t);return n==="text-only"?`${a}${o}`:`${a}[${o}](streamdown:incomplete-link)`},Pf=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!vs(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Yg(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},xR=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=Pf(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(Yg(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=Pf(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},Xg=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!vs(e,n)){let r=TR(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!vs(e,r)){let i=xR(e,r,t);if(i!==null)return i}return e},yR=/^-{1,2}$/,_R=/^[\s]*-{1,2}[\s]+$/,kR=/^={1,2}$/,wR=/^[\s]*={1,2}[\s]+$/,CR=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
87
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(yR.test(i)&&!n.match(_R)){let s=r.split(`
88
+ `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(kR.test(i)&&!n.match(wR)){let s=r.split(`
89
+ `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},AR=e=>{var t,n;let r=e.match(Pv);if(r){let i=r[2];if(!i||Jr.test(i))return e;if(((t=e.match(Lf))==null?void 0:t.length)%2===1)return`${e}~~`}else if(e.match(Uv)&&((n=e.match(Lf))==null?void 0:n.length)%2===1)return`${e}~`;return e},il=e=>e!==!1,tn={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},SR=[{handler:{name:"comparisonOperators",handle:Wv,priority:tn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:dR,priority:tn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:CR,priority:tn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Xg,priority:tn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:oR,priority:tn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:Qv,priority:tn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Jv,priority:tn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:tR,priority:tn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:iR,priority:tn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:pR,priority:tn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:AR,priority:tn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:ER,priority:tn.KATEX},optionKey:"katex"}],IR=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return SR.filter(({handler:r,optionKey:i})=>r.name==="links"?il(e==null?void 0:e.links)||il(e==null?void 0:e.images):il(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Vg($g({},r),{handle:s=>Xg(s,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},vR=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=IR(t),s=((n=t==null?void 0:t.handlers)!=null?n:[]).map(o=>{var l;return{handler:Vg($g({},o),{priority:(l=o.priority)!=null?l:tn.DEFAULT}),earlyReturn:void 0}}),a=[...i,...s].sort((o,l)=>{var u,d;return((u=o.handler.priority)!=null?u:0)-((d=l.handler.priority)!=null?d:0)});for(let{handler:o,earlyReturn:l}of a)if(r=o.handle(r),l!=null&&l(r))return r;return r},RR=vR;const NR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LR={};function Mf(e,t){return(LR.jsx?OR:NR).test(e)}const DR=/[ \t\n\f\r]/g;function PR(e){return typeof e=="object"?e.type==="text"?Bf(e.value):!1:Bf(e)}function Bf(e){return e.replace(DR,"")===""}var ni={},sl,Ff;function MR(){if(Ff)return sl;Ff=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
90
+ `,u="/",d="*",c="",h="comment",p="declaration";sl=function(E,T){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];T=T||{};var b=1,y=1;function k(w){var L=w.match(t);L&&(b+=L.length);var M=w.lastIndexOf(l);y=~M?w.length-M:y+w.length}function P(){var w={line:b,column:y};return function(L){return L.position=new D(w),N(),L}}function D(w){this.start=w,this.end={line:b,column:y},this.source=T.source}D.prototype.content=E;function v(w){var L=new Error(T.source+":"+b+":"+y+": "+w);if(L.reason=w,L.filename=T.source,L.line=b,L.column=y,L.source=E,!T.silent)throw L}function A(w){var L=w.exec(E);if(L){var M=L[0];return k(M),E=E.slice(M.length),L}}function N(){A(n)}function z(w){var L;for(w=w||[];L=R();)L!==!1&&w.push(L);return w}function R(){var w=P();if(!(u!=E.charAt(0)||d!=E.charAt(1))){for(var L=2;c!=E.charAt(L)&&(d!=E.charAt(L)||u!=E.charAt(L+1));)++L;if(L+=2,c===E.charAt(L-1))return v("End of comment missing");var M=E.slice(2,L-2);return y+=2,k(M),E=E.slice(L),y+=2,w({type:h,comment:M})}}function W(){var w=P(),L=A(r);if(L){if(R(),!A(i))return v("property missing ':'");var M=A(s),H=w({type:p,property:m(L[0].replace(e,c)),value:M?m(M[0].replace(e,c)):c});return A(a),H}}function j(){var w=[];z(w);for(var L;L=W();)L!==!1&&(w.push(L),z(w));return w}return N(),j()};function m(E){return E?E.replace(o,c):c}return sl}var Hf;function BR(){if(Hf)return ni;Hf=1;var e=ni&&ni.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ni,"__esModule",{value:!0}),ni.default=n;var t=e(MR());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var a=(0,t.default)(r),o=typeof i=="function";return a.forEach(function(l){if(l.type==="declaration"){var u=l.property,d=l.value;o?i(u,d,l):d&&(s=s||{},s[u]=d)}}),s}return ni}var Bi={},Uf;function FR(){if(Uf)return Bi;Uf=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(u){return!u||n.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},o=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),s(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,o):u=u.replace(r,o),u.replace(t,a))};return Bi.camelCase=l,Bi}var Fi,jf;function HR(){if(jf)return Fi;jf=1;var e=Fi&&Fi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(BR()),n=FR();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(o,l){o&&l&&(a[(0,n.camelCase)(o,s)]=l)}),a}return r.default=r,Fi=r,Fi}var UR=HR();const jR=Kh(UR);function ls(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zf(e.position):"start"in e||"end"in e?zf(e):"line"in e||"column"in e?Zl(e):""}function Zl(e){return $f(e&&e.line)+":"+$f(e&&e.column)}function zf(e){return Zl(e&&e.start)+"-"+Zl(e&&e.end)}function $f(e){return e&&typeof e=="number"?e:1}class Bt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=ls(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}Bt.prototype.file="";Bt.prototype.name="";Bt.prototype.reason="";Bt.prototype.message="";Bt.prototype.stack="";Bt.prototype.column=void 0;Bt.prototype.line=void 0;Bt.prototype.ancestors=void 0;Bt.prototype.cause=void 0;Bt.prototype.fatal=void 0;Bt.prototype.place=void 0;Bt.prototype.ruleId=void 0;Bt.prototype.source=void 0;const pc={}.hasOwnProperty,zR=new Map,$R=/[A-Z]/g,VR=new Set(["table","tbody","thead","tfoot","tr"]),WR=new Set(["td","th"]),Qg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function YR(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=eN(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=JR(n,t.jsx,t.jsxs)}const i={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"?Ai:Eo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Zg(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Zg(e,t,n){if(t.type==="element")return GR(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return qR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return XR(e,t,n);if(t.type==="mdxjsEsm")return KR(e,t);if(t.type==="root")return QR(e,t,n);if(t.type==="text")return ZR(e,t)}function GR(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ai,e.schema=i),e.ancestors.push(t);const s=e1(e,t.tagName,!1),a=tN(e,t);let o=gc(e,t);return VR.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!PR(l):!0})),Jg(e,a,s,t),mc(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function qR(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)}Rs(e,t.position)}function KR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Rs(e,t.position)}function XR(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ai,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:e1(e,t.name,!0),a=nN(e,t),o=gc(e,t);return Jg(e,a,s,t),mc(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function QR(e,t,n){const r={};return mc(r,gc(e,t)),e.create(t,e.Fragment,r,n)}function ZR(e,t){return t.value}function Jg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function mc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function JR(e,t,n){return r;function r(i,s,a,o){const u=Array.isArray(a.children)?n:t;return o?u(s,a,o):u(s,a)}}function eN(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=Wn(r);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function tN(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&pc.call(t.properties,i)){const s=rN(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&WR.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function nN(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Rs(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else Rs(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function gc(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:zR;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const o=Zg(e,s,a);o!==void 0&&n.push(o)}return n}function rN(e,t,n){const r=Zu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?l0(n):u0(n)),r.property==="style"){let i=typeof n=="object"?n:iN(e,String(n));return e.stylePropertyNameCase==="css"&&(i=sN(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ok[r.property]||r.property:r.attribute,n]}}function iN(e,t){try{return jR(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Bt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Qg+"#cannot-parse-style-attribute",i}}function e1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=Mf(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=Mf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return pc.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Rs(e)}function Rs(e,t){const n=new Bt("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=Qg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function sN(e){const t={};let n;for(n in e)pc.call(e,n)&&(t[aN(n)]=e[n]);return t}function aN(e){let t=e.replace($R,oN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function oN(e){return"-"+e.toLowerCase()}const al={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"]},lN={tokenize:uN};function uN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ue(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return be(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const cN={tokenize:dN},Vf={tokenize:fN};function dN(e){const t=this,n=[];let r=0,i,s,a;return o;function o(k){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,l,u)(k)}return u(k)}function l(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const P=t.events.length;let D=P,v;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){v=t.events[D][1].end;break}b(r);let A=P;for(;A<t.events.length;)t.events[A][1].end={...v},A++;return un(t.events,D+1,0,t.events.slice(P)),t.events.length=A,u(k)}return o(k)}function u(k){if(r===n.length){if(!i)return h(k);if(i.currentConstruct&&i.currentConstruct.concrete)return m(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vf,d,c)(k)}function d(k){return i&&y(),b(r),h(k)}function c(k){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(k)}function h(k){return t.containerState={},e.attempt(Vf,p,m)(k)}function p(k){return r++,n.push([t.currentConstruct,t.containerState]),h(k)}function m(k){if(k===null){i&&y(),b(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),E(k)}function E(k){if(k===null){T(e.exit("chunkFlow"),!0),b(0),e.consume(k);return}return be(k)?(e.consume(k),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(k),E)}function T(k,P){const D=t.sliceStream(k);if(P&&D.push(null),k.previous=s,s&&(s.next=k),s=k,i.defineSkip(k.start),i.write(D),t.parser.lazy[k.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<a&&(!i.events[v][1].end||i.events[v][1].end.offset>a))return;const A=t.events.length;let N=A,z,R;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(z){R=t.events[N][1].end;break}z=!0}for(b(r),v=A;v<t.events.length;)t.events[v][1].end={...R},v++;un(t.events,N+1,0,t.events.slice(A)),t.events.length=v}}function b(k){let P=n.length;for(;P-- >k;){const D=n[P];t.containerState=D[1],D[0].exit.call(t,e)}n.length=k}function y(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function fN(e,t,n){return Ue(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const hN={tokenize:pN};function pN(e){const t=this,n=e.attempt(Ys,r,e.attempt(this.parser.constructs.flowInitial,i,Ue(e,e.attempt(this.parser.constructs.flow,i,e.attempt(o3,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const mN={resolveAll:n1()},gN=t1("string"),bN=t1("text");function t1(e){return{resolveAll:n1(e==="text"?EN:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(d){return u(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),s(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const c=i[d];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function n1(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function EN(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],i=t.sliceStream(r);let s=i.length,a=-1,o=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)l=!0,o++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},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 TN={42:Vt,43:Vt,45:Vt,48:Vt,49:Vt,50:Vt,51:Vt,52:Vt,53:Vt,54:Vt,55:Vt,56:Vt,57:Vt,62:Mg},xN={91:f3},yN={[-2]:nl,[-1]:nl,32:nl},_N={35:E3,42:Na,45:[vf,Na],60:_3,61:vf,95:Na,96:Sf,126:Sf},kN={38:Fg,92:Bg},wN={[-5]:rl,[-4]:rl,[-3]:rl,33:U3,38:Fg,42:Ql,60:[zI,v3],91:z3,92:[g3,Bg],93:dc,95:Ql,96:t3},CN={null:[Ql,mN]},AN={null:[42,95]},SN={null:[]},IN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:AN,contentInitial:xN,disable:SN,document:TN,flow:_N,flowInitial:yN,insideSpan:CN,string:kN,text:wN},Symbol.toStringTag,{value:"Module"}));function vN(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 i={},s=[];let a=[],o=[];const l={attempt:A(D),check:A(v),consume:y,enter:k,exit:P,interrupt:A(v,{interrupt:!0})},u={code:null,containerState:{},defineSkip:E,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let d=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function c(W){return a=fn(a,W),T(),a[a.length-1]!==null?[]:(N(t,0),u.events=Co(s,u.events,u),u.events)}function h(W,j){return NN(p(W),j)}function p(W){return RN(a,W)}function m(){const{_bufferIndex:W,_index:j,line:w,column:L,offset:M}=r;return{_bufferIndex:W,_index:j,line:w,column:L,offset:M}}function E(W){i[W.line]=W.column,R()}function T(){let W;for(;r._index<a.length;){const j=a[r._index];if(typeof j=="string")for(W=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===W&&r._bufferIndex<j.length;)b(j.charCodeAt(r._bufferIndex));else b(j)}}function b(W){d=d(W)}function y(W){be(W)?(r.line++,r.column=1,r.offset+=W===-3?2:1,R()):W!==-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=W}function k(W,j){const w=j||{};return w.type=W,w.start=m(),u.events.push(["enter",w,u]),o.push(w),w}function P(W){const j=o.pop();return j.end=m(),u.events.push(["exit",j,u]),j}function D(W,j){N(W,j.from)}function v(W,j){j.restore()}function A(W,j){return w;function w(L,M,H){let U,G,Q,_;return Array.isArray(L)?te(L):"tokenize"in L?te([L]):se(L);function se(me){return qe;function qe(X){const ue=X!==null&&me[X],ke=X!==null&&me.null,Me=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(ke)?ke:ke?[ke]:[]];return te(Me)(X)}}function te(me){return U=me,G=0,me.length===0?H:S(me[G])}function S(me){return qe;function qe(X){return _=z(),Q=me,me.partial||(u.currentConstruct=me),me.name&&u.parser.constructs.disable.null.includes(me.name)?pe():me.tokenize.call(j?Object.assign(Object.create(u),j):u,l,ge,pe)(X)}}function ge(me){return W(Q,_),M}function pe(me){return _.restore(),++G<U.length?S(U[G]):H}}}function N(W,j){W.resolveAll&&!s.includes(W)&&s.push(W),W.resolve&&un(u.events,j,u.events.length-j,W.resolve(u.events.slice(j),u)),W.resolveTo&&(u.events=W.resolveTo(u.events,u))}function z(){const W=m(),j=u.previous,w=u.currentConstruct,L=u.events.length,M=Array.from(o);return{from:L,restore:H};function H(){r=W,u.previous=j,u.currentConstruct=w,u.events.length=L,o=M,R()}}function R(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function RN(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function NN(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
91
91
  `;break}case-3:{a=`\r
92
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function vN(e){const r={constructs:Ag([CN,...(e||{}).extensions||[]]),content:i(sN),defined:[],document:i(oN),flow:i(cN),lazy:{},string:i(hN),text:i(pN)};return r;function i(s){return a;function a(o){return AN(r,s,o)}}}function RN(e){for(;!Fg(e););return e}const Vf=/[\0\t\n\r]/g;function NN(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const l=[];let u,d,c,h,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),c=0,t="",n&&(s.charCodeAt(0)===65279&&c++,n=void 0);c<s.length;){if(Vf.lastIndex=c,u=Vf.exec(s),h=u&&u.index!==void 0?u.index:s.length,p=s.charCodeAt(h),!u){t=s.slice(c);break}if(p===10&&c===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),c<h&&(l.push(s.slice(c,h)),e+=h-c),p){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const n1={}.hasOwnProperty;function ON(e,t,n){return typeof t!="string"&&(n=t,t=void 0),LN(n)(RN(vN(n).document().write(NN()(e,t,!0))))}function LN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ye),autolinkProtocol:z,autolinkEmail:z,atxHeading:s(nt),blockQuote:s(ke),characterEscape:z,characterReference:z,codeFenced:s(Me),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Me,a),codeText:s(Ke,a),codeTextData:z,data:z,codeFlowValue:z,definition:s(ze),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Be),hardBreakEscape:s(Xe),hardBreakTrailing:s(Xe),htmlFlow:s(Re,a),htmlFlowData:z,htmlText:s(Re,a),htmlTextData:z,image:s($e),label:a,link:s(Ye),listItem:s(Cr),listItemValue:h,listOrdered:s(ut,c),listUnordered:s(ut),paragraph:s(_t),reference:S,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(nt),strong:s(Kt),thematicBreak:s(xn)},exit:{atxHeading:l(),atxHeadingSequence:D,autolink:l(),autolinkEmail:ue,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:me,characterReference:qe,codeFenced:l(T),codeFencedFence:E,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:R,codeIndented:l(b),codeText:l(M),codeTextData:R,data:R,definition:l(),definitionDestinationString:P,definitionLabelString:y,definitionTitleString:k,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(w),htmlFlowData:R,htmlText:l(L),htmlTextData:R,image:l(U),label:Q,labelText:G,lineEnding:W,link:l(H),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ge,resourceDestinationString:_,resourceTitleString:se,resource:te,setextHeading:l(N),setextHeadingLineSequence:A,setextHeadingText:v,strong:l(),thematicBreak:l()}};r1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(q){let ae={type:"root",children:[]};const Ee={stack:[ae],tokenStack:[],config:t,enter:o,exit:u,buffer:a,resume:d,data:n},we=[];let De=-1;for(;++De<q.length;)if(q[De][1].type==="listOrdered"||q[De][1].type==="listUnordered")if(q[De][0]==="enter")we.push(De);else{const St=we.pop();De=i(q,St,De)}for(De=-1;++De<q.length;){const St=t[q[De][0]];n1.call(St,q[De][1].type)&&St[q[De][1].type].call(Object.assign({sliceSerialize:q[De][2].sliceSerialize},Ee),q[De][1])}if(Ee.tokenStack.length>0){const St=Ee.tokenStack[Ee.tokenStack.length-1];(St[1]||Wf).call(Ee,void 0,St[0])}for(ae.position={start:or(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:or(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},De=-1;++De<t.transforms.length;)ae=t.transforms[De](ae)||ae;return ae}function i(q,ae,Ee){let we=ae-1,De=-1,St=!1,vt,yn,Ar,nr;for(;++we<=Ee;){const Rt=q[we];switch(Rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Rt[0]==="enter"?De++:De--,nr=void 0;break}case"lineEndingBlank":{Rt[0]==="enter"&&(vt&&!nr&&!De&&!Ar&&(Ar=we),nr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:nr=void 0}if(!De&&Rt[0]==="enter"&&Rt[1].type==="listItemPrefix"||De===-1&&Rt[0]==="exit"&&(Rt[1].type==="listUnordered"||Rt[1].type==="listOrdered")){if(vt){let rr=we;for(yn=void 0;rr--;){const Xt=q[rr];if(Xt[1].type==="lineEnding"||Xt[1].type==="lineEndingBlank"){if(Xt[0]==="exit")continue;yn&&(q[yn][1].type="lineEndingBlank",St=!0),Xt[1].type="lineEnding",yn=rr}else if(!(Xt[1].type==="linePrefix"||Xt[1].type==="blockQuotePrefix"||Xt[1].type==="blockQuotePrefixWhitespace"||Xt[1].type==="blockQuoteMarker"||Xt[1].type==="listItemIndent"))break}Ar&&(!yn||Ar<yn)&&(vt._spread=!0),vt.end=Object.assign({},yn?q[yn][1].start:Rt[1].end),q.splice(yn||we,0,["exit",vt,Rt[2]]),we++,Ee++}if(Rt[1].type==="listItemPrefix"){const rr={type:"listItem",_spread:!1,start:Object.assign({},Rt[1].start),end:void 0};vt=rr,q.splice(we,0,["enter",rr,Rt[2]]),we++,Ee++,Ar=void 0,nr=!0}}}return q[ae][1]._spread=St,Ee}function s(q,ae){return Ee;function Ee(we){o.call(this,q(we),we),ae&&ae.call(this,we)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(q,ae,Ee){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([ae,Ee||void 0]),q.position={start:or(ae.start),end:void 0}}function l(q){return ae;function ae(Ee){q&&q.call(this,Ee),u.call(this,Ee)}}function u(q,ae){const Ee=this.stack.pop(),we=this.tokenStack.pop();if(we)we[0].type!==q.type&&(ae?ae.call(this,q,we[0]):(we[1]||Wf).call(this,q,we[0]));else throw new Error("Cannot close `"+q.type+"` ("+ls({start:q.start,end:q.end})+"): it’s not open");Ee.position.end=or(q.end)}function d(){return ac(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(q){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function p(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=q}function m(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=q}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q.replace(/(\r?\n|\r)$/g,"")}function y(q){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ae,Ee.identifier=An(this.sliceSerialize(q)).toLowerCase()}function k(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.title=q}function P(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.url=q}function D(q){const ae=this.stack[this.stack.length-1];if(!ae.depth){const Ee=this.sliceSerialize(q).length;ae.depth=Ee}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function A(q){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function z(q){const Ee=this.stack[this.stack.length-1].children;let we=Ee[Ee.length-1];(!we||we.type!=="text")&&(we=Nn(),we.position={start:or(q.start),end:void 0},Ee.push(we)),this.stack.push(we)}function R(q){const ae=this.stack.pop();ae.value+=this.sliceSerialize(q),ae.position.end=or(q.end)}function W(q){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ee=ae.children[ae.children.length-1];Ee.position.end=or(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(z.call(this,q),R.call(this,q))}function j(){this.data.atHardBreak=!0}function w(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q}function L(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q}function M(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q}function H(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=ae,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function U(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=ae,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function G(q){const ae=this.sliceSerialize(q),Ee=this.stack[this.stack.length-2];Ee.label=uI(ae),Ee.identifier=An(ae).toLowerCase()}function Q(){const q=this.stack[this.stack.length-1],ae=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){const we=q.children;Ee.children=we}else Ee.alt=ae}function _(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.url=q}function se(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.title=q}function te(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function ge(q){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ae,Ee.identifier=An(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function pe(q){this.data.characterReferenceType=q.type}function me(q){const ae=this.sliceSerialize(q),Ee=this.data.characterReferenceType;let we;Ee?(we=Cg(ae,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):we=lc(ae);const De=this.stack[this.stack.length-1];De.value+=we}function qe(q){const ae=this.stack.pop();ae.position.end=or(q.end)}function X(q){R.call(this,q);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(q)}function ue(q){R.call(this,q);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(q)}function ke(){return{type:"blockquote",children:[]}}function Me(){return{type:"code",lang:null,meta:null,value:""}}function Ke(){return{type:"inlineCode",value:""}}function ze(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Be(){return{type:"emphasis",children:[]}}function nt(){return{type:"heading",depth:0,children:[]}}function Xe(){return{type:"break"}}function Re(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function Ye(){return{type:"link",title:null,url:"",children:[]}}function ut(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function Cr(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function _t(){return{type:"paragraph",children:[]}}function Kt(){return{type:"strong",children:[]}}function Nn(){return{type:"text",value:""}}function xn(){return{type:"thematicBreak"}}}function or(e){return{line:e.line,column:e.column,offset:e.offset}}function r1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?r1(e,r):DN(e,r)}}function DN(e,t){let n;for(n in t)if(n1.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 Wf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ls({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ls({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ls({start:t.start,end:t.end})+") is still open")}function PN(e){const t=this;t.parser=n;function n(r){return ON(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function MN(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 BN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
93
- `}]}function FN(e,t){const n=t.value?t.value+`
94
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);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 HN(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UN(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ni(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),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 zN(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 $N(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function i1(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 i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function VN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return i1(e,t);const i={src:Ni(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function WN(e,t){const n={src:Ni(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 YN(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 GN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return i1(e,t);const i={href:Ni(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function qN(e,t){const n={href:Ni(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 KN(e,t,n){const r=e.all(t),i=n?XN(n):s1(t),s={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let c;d&&d.type==="element"&&d.tagName==="p"?c=d:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
92
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function ON(e){const r={constructs:Sg([IN,...(e||{}).extensions||[]]),content:i(lN),defined:[],document:i(cN),flow:i(hN),lazy:{},string:i(gN),text:i(bN)};return r;function i(s){return a;function a(o){return vN(r,s,o)}}}function LN(e){for(;!Hg(e););return e}const Wf=/[\0\t\n\r]/g;function DN(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const l=[];let u,d,c,h,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),c=0,t="",n&&(s.charCodeAt(0)===65279&&c++,n=void 0);c<s.length;){if(Wf.lastIndex=c,u=Wf.exec(s),h=u&&u.index!==void 0?u.index:s.length,p=s.charCodeAt(h),!u){t=s.slice(c);break}if(p===10&&c===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),c<h&&(l.push(s.slice(c,h)),e+=h-c),p){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const r1={}.hasOwnProperty;function PN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),MN(n)(LN(ON(n).document().write(DN()(e,t,!0))))}function MN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ye),autolinkProtocol:z,autolinkEmail:z,atxHeading:s(nt),blockQuote:s(ke),characterEscape:z,characterReference:z,codeFenced:s(Me),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Me,a),codeText:s(Ke,a),codeTextData:z,data:z,codeFlowValue:z,definition:s(ze),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Be),hardBreakEscape:s(Xe),hardBreakTrailing:s(Xe),htmlFlow:s(Re,a),htmlFlowData:z,htmlText:s(Re,a),htmlTextData:z,image:s($e),label:a,link:s(Ye),listItem:s(Cr),listItemValue:h,listOrdered:s(ut,c),listUnordered:s(ut),paragraph:s(_t),reference:S,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(nt),strong:s(Kt),thematicBreak:s(xn)},exit:{atxHeading:l(),atxHeadingSequence:D,autolink:l(),autolinkEmail:ue,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:me,characterReference:qe,codeFenced:l(T),codeFencedFence:E,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:R,codeIndented:l(b),codeText:l(M),codeTextData:R,data:R,definition:l(),definitionDestinationString:P,definitionLabelString:y,definitionTitleString:k,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(w),htmlFlowData:R,htmlText:l(L),htmlTextData:R,image:l(U),label:Q,labelText:G,lineEnding:W,link:l(H),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ge,resourceDestinationString:_,resourceTitleString:se,resource:te,setextHeading:l(N),setextHeadingLineSequence:A,setextHeadingText:v,strong:l(),thematicBreak:l()}};i1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(q){let ae={type:"root",children:[]};const Ee={stack:[ae],tokenStack:[],config:t,enter:o,exit:u,buffer:a,resume:d,data:n},we=[];let De=-1;for(;++De<q.length;)if(q[De][1].type==="listOrdered"||q[De][1].type==="listUnordered")if(q[De][0]==="enter")we.push(De);else{const St=we.pop();De=i(q,St,De)}for(De=-1;++De<q.length;){const St=t[q[De][0]];r1.call(St,q[De][1].type)&&St[q[De][1].type].call(Object.assign({sliceSerialize:q[De][2].sliceSerialize},Ee),q[De][1])}if(Ee.tokenStack.length>0){const St=Ee.tokenStack[Ee.tokenStack.length-1];(St[1]||Yf).call(Ee,void 0,St[0])}for(ae.position={start:or(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:or(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},De=-1;++De<t.transforms.length;)ae=t.transforms[De](ae)||ae;return ae}function i(q,ae,Ee){let we=ae-1,De=-1,St=!1,vt,yn,Ar,nr;for(;++we<=Ee;){const Rt=q[we];switch(Rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Rt[0]==="enter"?De++:De--,nr=void 0;break}case"lineEndingBlank":{Rt[0]==="enter"&&(vt&&!nr&&!De&&!Ar&&(Ar=we),nr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:nr=void 0}if(!De&&Rt[0]==="enter"&&Rt[1].type==="listItemPrefix"||De===-1&&Rt[0]==="exit"&&(Rt[1].type==="listUnordered"||Rt[1].type==="listOrdered")){if(vt){let rr=we;for(yn=void 0;rr--;){const Xt=q[rr];if(Xt[1].type==="lineEnding"||Xt[1].type==="lineEndingBlank"){if(Xt[0]==="exit")continue;yn&&(q[yn][1].type="lineEndingBlank",St=!0),Xt[1].type="lineEnding",yn=rr}else if(!(Xt[1].type==="linePrefix"||Xt[1].type==="blockQuotePrefix"||Xt[1].type==="blockQuotePrefixWhitespace"||Xt[1].type==="blockQuoteMarker"||Xt[1].type==="listItemIndent"))break}Ar&&(!yn||Ar<yn)&&(vt._spread=!0),vt.end=Object.assign({},yn?q[yn][1].start:Rt[1].end),q.splice(yn||we,0,["exit",vt,Rt[2]]),we++,Ee++}if(Rt[1].type==="listItemPrefix"){const rr={type:"listItem",_spread:!1,start:Object.assign({},Rt[1].start),end:void 0};vt=rr,q.splice(we,0,["enter",rr,Rt[2]]),we++,Ee++,Ar=void 0,nr=!0}}}return q[ae][1]._spread=St,Ee}function s(q,ae){return Ee;function Ee(we){o.call(this,q(we),we),ae&&ae.call(this,we)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(q,ae,Ee){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([ae,Ee||void 0]),q.position={start:or(ae.start),end:void 0}}function l(q){return ae;function ae(Ee){q&&q.call(this,Ee),u.call(this,Ee)}}function u(q,ae){const Ee=this.stack.pop(),we=this.tokenStack.pop();if(we)we[0].type!==q.type&&(ae?ae.call(this,q,we[0]):(we[1]||Yf).call(this,q,we[0]));else throw new Error("Cannot close `"+q.type+"` ("+ls({start:q.start,end:q.end})+"): it’s not open");Ee.position.end=or(q.end)}function d(){return oc(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(q){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function p(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=q}function m(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=q}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q.replace(/(\r?\n|\r)$/g,"")}function y(q){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ae,Ee.identifier=An(this.sliceSerialize(q)).toLowerCase()}function k(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.title=q}function P(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.url=q}function D(q){const ae=this.stack[this.stack.length-1];if(!ae.depth){const Ee=this.sliceSerialize(q).length;ae.depth=Ee}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function A(q){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function z(q){const Ee=this.stack[this.stack.length-1].children;let we=Ee[Ee.length-1];(!we||we.type!=="text")&&(we=On(),we.position={start:or(q.start),end:void 0},Ee.push(we)),this.stack.push(we)}function R(q){const ae=this.stack.pop();ae.value+=this.sliceSerialize(q),ae.position.end=or(q.end)}function W(q){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ee=ae.children[ae.children.length-1];Ee.position.end=or(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(z.call(this,q),R.call(this,q))}function j(){this.data.atHardBreak=!0}function w(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q}function L(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q}function M(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.value=q}function H(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=ae,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function U(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=ae,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function G(q){const ae=this.sliceSerialize(q),Ee=this.stack[this.stack.length-2];Ee.label=fI(ae),Ee.identifier=An(ae).toLowerCase()}function Q(){const q=this.stack[this.stack.length-1],ae=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){const we=q.children;Ee.children=we}else Ee.alt=ae}function _(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.url=q}function se(){const q=this.resume(),ae=this.stack[this.stack.length-1];ae.title=q}function te(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function ge(q){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ae,Ee.identifier=An(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function pe(q){this.data.characterReferenceType=q.type}function me(q){const ae=this.sliceSerialize(q),Ee=this.data.characterReferenceType;let we;Ee?(we=Ag(ae,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):we=uc(ae);const De=this.stack[this.stack.length-1];De.value+=we}function qe(q){const ae=this.stack.pop();ae.position.end=or(q.end)}function X(q){R.call(this,q);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(q)}function ue(q){R.call(this,q);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(q)}function ke(){return{type:"blockquote",children:[]}}function Me(){return{type:"code",lang:null,meta:null,value:""}}function Ke(){return{type:"inlineCode",value:""}}function ze(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Be(){return{type:"emphasis",children:[]}}function nt(){return{type:"heading",depth:0,children:[]}}function Xe(){return{type:"break"}}function Re(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function Ye(){return{type:"link",title:null,url:"",children:[]}}function ut(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function Cr(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function _t(){return{type:"paragraph",children:[]}}function Kt(){return{type:"strong",children:[]}}function On(){return{type:"text",value:""}}function xn(){return{type:"thematicBreak"}}}function or(e){return{line:e.line,column:e.column,offset:e.offset}}function i1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?i1(e,r):BN(e,r)}}function BN(e,t){let n;for(n in t)if(r1.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 Yf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ls({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ls({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ls({start:t.start,end:t.end})+") is still open")}function FN(e){const t=this;t.parser=n;function n(r){return PN(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function HN(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 UN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
93
+ `}]}function jN(e,t){const n=t.value?t.value+`
94
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);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 zN(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $N(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ni(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),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 WN(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 YN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function s1(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 i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function GN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return s1(e,t);const i={src:Ni(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function qN(e,t){const n={src:Ni(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 KN(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 XN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return s1(e,t);const i={href:Ni(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function QN(e,t){const n={href:Ni(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 ZN(e,t,n){const r=e.all(t),i=n?JN(n):a1(t),s={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let c;d&&d.type==="element"&&d.tagName==="p"?c=d:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
95
95
  `}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
96
- `});const u={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,u),e.applyData(t,u)}function XN(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=s1(n[r])}return t}function s1(e){const t=e.spread;return t??e.children.length>1}function QN(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];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 s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function ZN(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function eO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tO(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Wn(t.children[1]),l=ko(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function nO(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<o;){const c=t.children[l],h={},p=a?a[l]:void 0;p&&(h.align=p);let m={type:"element",tagName:s,properties:h,children:[]};c&&(m.children=e.all(c),e.patch(c,m),m=e.applyData(c,m)),u.push(m)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function rO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Yf=9,Gf=32;function iO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(qf(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(qf(t.slice(i),i>0,!1)),s.join("")}function qf(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Yf||s===Gf;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Yf||s===Gf;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function sO(e,t){const n={type:"text",value:iO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function aO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const oO={blockquote:MN,break:BN,code:FN,delete:HN,emphasis:UN,footnoteReference:jN,heading:zN,html:$N,imageReference:VN,image:WN,inlineCode:YN,linkReference:GN,link:qN,listItem:KN,list:QN,paragraph:ZN,root:JN,strong:eO,table:tO,tableCell:rO,tableRow:nO,text:sO,thematicBreak:aO,toml:da,yaml:da,definition:da,footnoteDefinition:da};function da(){}function lO(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 uO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function cO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||lO,r=e.options.footnoteBackLabel||uO,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const d=e.all(u),c=String(u.identifier).toUpperCase(),h=Ni(c.toLowerCase());let p=0;const m=[],E=e.footnoteCounts.get(c);for(;E!==void 0&&++p<=E;){m.length>0&&m.push({type:"text",value:" "});let y=typeof n=="string"?n:n(l,p);typeof y=="string"&&(y={type:"text",value:y}),m.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(y)?y:[y]})}const T=d[d.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const y=T.children[T.children.length-1];y&&y.type==="text"?y.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...m)}else d.push(...m);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...jr(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
96
+ `});const u={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,u),e.applyData(t,u)}function JN(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=a1(n[r])}return t}function a1(e){const t=e.spread;return t??e.children.length>1}function eO(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];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 s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function tO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function rO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iO(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Wn(t.children[1]),l=ko(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function sO(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<o;){const c=t.children[l],h={},p=a?a[l]:void 0;p&&(h.align=p);let m={type:"element",tagName:s,properties:h,children:[]};c&&(m.children=e.all(c),e.patch(c,m),m=e.applyData(c,m)),u.push(m)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function aO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Gf=9,qf=32;function oO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Kf(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Kf(t.slice(i),i>0,!1)),s.join("")}function Kf(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Gf||s===qf;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Gf||s===qf;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function lO(e,t){const n={type:"text",value:oO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function uO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const cO={blockquote:HN,break:UN,code:jN,delete:zN,emphasis:$N,footnoteReference:VN,heading:WN,html:YN,imageReference:GN,image:qN,inlineCode:KN,linkReference:XN,link:QN,listItem:ZN,list:eO,paragraph:tO,root:nO,strong:rO,table:iO,tableCell:aO,tableRow:sO,text:lO,thematicBreak:uO,toml:da,yaml:da,definition:da,footnoteDefinition:da};function da(){}function dO(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 fO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function hO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||dO,r=e.options.footnoteBackLabel||fO,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const d=e.all(u),c=String(u.identifier).toUpperCase(),h=Ni(c.toLowerCase());let p=0;const m=[],E=e.footnoteCounts.get(c);for(;E!==void 0&&++p<=E;){m.length>0&&m.push({type:"text",value:" "});let y=typeof n=="string"?n:n(l,p);typeof y=="string"&&(y={type:"text",value:y}),m.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(y)?y:[y]})}const T=d[d.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const y=T.children[T.children.length-1];y&&y.type==="text"?y.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...m)}else d.push(...m);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...jr(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
97
97
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
98
- `}]}}const Zl={}.hasOwnProperty,dO={};function fO(e,t){const n=t||dO,r=new Map,i=new Map,s=new Map,a={...oO,...n.handlers},o={all:u,applyData:pO,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:n,patch:hO,wrap:gO};return Er(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?r:i,h=String(d.identifier).toUpperCase();c.has(h)||c.set(h,d)}}),o;function l(d,c){const h=d.type,p=o.handlers[h];if(Zl.call(o.handlers,h)&&p)return p(o,d,c);if(o.options.passThrough&&o.options.passThrough.includes(h)){if("children"in d){const{children:E,...T}=d,b=jr(T);return b.children=o.all(d),b}return jr(d)}return(o.options.unknownHandler||mO)(o,d,c)}function u(d){const c=[];if("children"in d){const h=d.children;let p=-1;for(;++p<h.length;){const m=o.one(h[p],d);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Kf(m.value)),!Array.isArray(m)&&m.type==="element")){const E=m.children[0];E&&E.type==="text"&&(E.value=Kf(E.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function hO(e,t){e.position&&(t.position=Q0(e))}function pO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=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"&&s&&Object.assign(n.properties,jr(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function mO(e,t){const n=t.data||{},r="value"in t&&!(Zl.call(n,"hProperties")||Zl.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 gO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
98
+ `}]}}const Jl={}.hasOwnProperty,pO={};function mO(e,t){const n=t||pO,r=new Map,i=new Map,s=new Map,a={...cO,...n.handlers},o={all:u,applyData:bO,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:n,patch:gO,wrap:TO};return Er(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?r:i,h=String(d.identifier).toUpperCase();c.has(h)||c.set(h,d)}}),o;function l(d,c){const h=d.type,p=o.handlers[h];if(Jl.call(o.handlers,h)&&p)return p(o,d,c);if(o.options.passThrough&&o.options.passThrough.includes(h)){if("children"in d){const{children:E,...T}=d,b=jr(T);return b.children=o.all(d),b}return jr(d)}return(o.options.unknownHandler||EO)(o,d,c)}function u(d){const c=[];if("children"in d){const h=d.children;let p=-1;for(;++p<h.length;){const m=o.one(h[p],d);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Xf(m.value)),!Array.isArray(m)&&m.type==="element")){const E=m.children[0];E&&E.type==="text"&&(E.value=Xf(E.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function gO(e,t){e.position&&(t.position=Z0(e))}function bO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=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"&&s&&Object.assign(n.properties,jr(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function EO(e,t){const n=t.data||{},r="value"in t&&!(Jl.call(n,"hProperties")||Jl.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 TO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
99
99
  `});++r<e.length;)r&&n.push({type:"text",value:`
100
100
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
101
- `}),n}function Kf(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Xf(e,t){const n=fO(e,t),r=n.one(e,void 0),i=cO(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
102
- `},i),s}function bO(e,t){return e&&"run"in e?async function(n,r){const i=Xf(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Xf(n,{file:r,...e||t})}}function Qf(e){if(e)throw e}var al,Zf;function EO(){if(Zf)return al;Zf=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},s=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!c)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},a=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},o=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return al=function l(){var u,d,c,h,p,m,E=arguments[0],T=1,b=arguments.length,y=!1;for(typeof E=="boolean"&&(y=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});T<b;++T)if(u=arguments[T],u!=null)for(d in u)c=o(E,d),h=o(u,d),E!==h&&(y&&h&&(s(h)||(p=i(h)))?(p?(p=!1,m=c&&i(c)?c:[]):m=c&&s(c)?c:{},a(E,{name:d,newValue:l(y,m,h)})):typeof h<"u"&&a(E,{name:d,newValue:h}));return E},al}var TO=EO();const ol=qh(TO);function Jl(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 xO(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...u){const d=e[++s];let c=-1;if(l){a(l);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,d?yO(d,o)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function yO(e,t){let n;return r;function r(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(u){const d=u;if(o&&n)throw d;return i(d)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const Dn={basename:_O,dirname:kO,extname:wO,join:CO,sep:"/"};function _O(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Gs(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function kO(e){if(Gs(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 wO(e){Gs(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function CO(...e){let t=-1,n;for(;++t<e.length;)Gs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":AO(n)}function AO(e){Gs(e);const t=e.codePointAt(0)===47;let n=SO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function SO(e,t){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===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("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function Gs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const IO={cwd:vO};function vO(){return"/"}function eu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function RO(e){if(typeof e=="string")e=new URL(e);else if(!eu(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 NO(e)}function NO(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 i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ll=["history","path","basename","stem","extname","dirname"];class OO{constructor(t){let n;t?eu(t)?n={path:t}:typeof t=="string"||LO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":IO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ll.length;){const s=ll[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)ll.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Dn.basename(this.path):void 0}set basename(t){cl(t,"basename"),ul(t,"basename"),this.path=Dn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Dn.dirname(this.path):void 0}set dirname(t){Jf(this.basename,"dirname"),this.path=Dn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Dn.extname(this.path):void 0}set extname(t){if(ul(t,"extname"),Jf(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=Dn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){eu(t)&&(t=RO(t)),cl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Dn.basename(this.path,this.extname):void 0}set stem(t){cl(t,"stem"),ul(t,"stem"),this.path=Dn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Bt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ul(e,t){if(e&&e.includes(Dn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dn.sep+"`")}function cl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Jf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function LO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const DO=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),PO={}.hasOwnProperty;class gc extends DO{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=xO()}copy(){const t=new gc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ol(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(hl("data",this.frozen),this.namespace[t]=n,this):PO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(hl("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 i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=fa(t),r=this.parser||this.Parser;return dl("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),dl("process",this.parser||this.Parser),fl("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=fa(t),l=r.parse(o);r.run(l,o,function(d,c,h){if(d||!c||!h)return u(d);const p=c,m=r.stringify(p,h);FO(m)?h.value=m:h.result=m,u(d,h)});function u(d,c){d||!c?a(d):s?s(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),dl("processSync",this.parser||this.Parser),fl("processSync",this.compiler||this.Compiler),this.process(t,i),th("processSync","process",n),r;function i(s,a){n=!0,Qf(s),r=a}}run(t,n,r){eh(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const l=fa(n);i.run(t,l,u);function u(d,c,h){const p=c||t;d?o(d):a?a(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),th("runSync","run",r),i;function s(a,o){Qf(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=fa(n),i=this.compiler||this.Compiler;return fl("stringify",i),eh(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(hl("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...c]=u;l(d,c)}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");o(u.plugins),u.settings&&(i.settings=ol(!0,i.settings,u.settings))}function o(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const c=u[d];s(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===u){h=c;break}if(h===-1)r.push([u,...d]);else if(d.length>0){let[p,...m]=d;const E=r[h][1];Jl(E)&&Jl(p)&&(p=ol(!0,E,p)),r[h]=[u,p,...m]}}}}const MO=new gc().freeze();function dl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hl(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 eh(e){if(!Jl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function th(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fa(e){return BO(e)?e:new OO(e)}function BO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function FO(e){return typeof e=="string"||HO(e)}function HO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function bc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ei=bc();function a1(e){ei=e}var Or={exec:()=>null};function je(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(jt.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var UO=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),jt={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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,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)}}>`)},jO=/^(?:[ \t]*(?:\n|$))+/,zO=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$O=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,qs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,VO=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ec=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,o1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,l1=je(o1).replace(/bull/g,Ec).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(),WO=je(o1).replace(/bull/g,Ec).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(),Tc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,YO=/^[^\n]+/,xc=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,GO=je(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",xc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qO=je(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ec).getRegex(),So="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",yc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,KO=je("^ {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",yc).replace("tag",So).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),u1=je(Tc).replace("hr",qs).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",So).getRegex(),XO=je(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",u1).getRegex(),_c={blockquote:XO,code:zO,def:GO,fences:$O,heading:VO,hr:qs,html:KO,lheading:l1,list:qO,newline:jO,paragraph:u1,table:Or,text:YO},nh=je("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",qs).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",So).getRegex(),QO={..._c,lheading:WO,table:nh,paragraph:je(Tc).replace("hr",qs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",nh).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",So).getRegex()},ZO={..._c,html:je(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yc).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:Or,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:je(Tc).replace("hr",qs).replace("heading",` *#{1,6} *[^
103
- ]`).replace("lheading",l1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},JO=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,eL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,c1=/^( {2,}|\\)\n(?!\s*$)/,tL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Io=/[\p{P}\p{S}]/u,kc=/[\s\p{P}\p{S}]/u,d1=/[^\s\p{P}\p{S}]/u,nL=je(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,kc).getRegex(),f1=/(?!~)[\p{P}\p{S}]/u,rL=/(?!~)[\s\p{P}\p{S}]/u,iL=/(?:[^\s\p{P}\p{S}]|~)/u,h1=/(?![*_])[\p{P}\p{S}]/u,sL=/(?![*_])[\s\p{P}\p{S}]/u,aL=/(?:[^\s\p{P}\p{S}]|[*_])/u,oL=je(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",UO?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),p1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,lL=je(p1,"u").replace(/punct/g,Io).getRegex(),uL=je(p1,"u").replace(/punct/g,f1).getRegex(),m1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cL=je(m1,"gu").replace(/notPunctSpace/g,d1).replace(/punctSpace/g,kc).replace(/punct/g,Io).getRegex(),dL=je(m1,"gu").replace(/notPunctSpace/g,iL).replace(/punctSpace/g,rL).replace(/punct/g,f1).getRegex(),fL=je("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,d1).replace(/punctSpace/g,kc).replace(/punct/g,Io).getRegex(),hL=je(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,h1).getRegex(),pL="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",mL=je(pL,"gu").replace(/notPunctSpace/g,aL).replace(/punctSpace/g,sL).replace(/punct/g,h1).getRegex(),gL=je(/\\(punct)/,"gu").replace(/punct/g,Io).getRegex(),bL=je(/^<(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(),EL=je(yc).replace("(?:-->|$)","-->").getRegex(),TL=je("^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",EL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,xL=je(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Qa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),g1=je(/^!?\[(label)\]\[(ref)\]/).replace("label",Qa).replace("ref",xc).getRegex(),b1=je(/^!?\[(ref)\](?:\[\])?/).replace("ref",xc).getRegex(),yL=je("reflink|nolink(?!\\()","g").replace("reflink",g1).replace("nolink",b1).getRegex(),rh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,wc={_backpedal:Or,anyPunctuation:gL,autolink:bL,blockSkip:oL,br:c1,code:eL,del:Or,delLDelim:Or,delRDelim:Or,emStrongLDelim:lL,emStrongRDelimAst:cL,emStrongRDelimUnd:fL,escape:JO,link:xL,nolink:b1,punctuation:nL,reflink:g1,reflinkSearch:yL,tag:TL,text:tL,url:Or},_L={...wc,link:je(/^!?\[(label)\]\((.*?)\)/).replace("label",Qa).getRegex(),reflink:je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Qa).getRegex()},tu={...wc,emStrongRDelimAst:dL,emStrongLDelim:uL,delLDelim:hL,delRDelim:mL,url:je(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",rh).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:je(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",rh).getRegex()},kL={...tu,br:je(c1).replace("{2,}","*").getRegex(),text:je(tu.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ha={normal:_c,gfm:QO,pedantic:ZO},Hi={normal:wc,gfm:tu,breaks:kL,pedantic:_L},wL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ih=e=>wL[e];function Kn(e,t){if(t){if(jt.escapeTest.test(e))return e.replace(jt.escapeReplace,ih)}else if(jt.escapeTestNoEncode.test(e))return e.replace(jt.escapeReplaceNoEncode,ih);return e}function sh(e){try{e=encodeURI(e).replace(jt.percentDecode,"%")}catch{return null}return e}function ah(e,t){var s;let n=e.replace(jt.findPipe,(a,o,l)=>{let u=!1,d=o;for(;--d>=0&&l[d]==="\\";)u=!u;return u?"|":" |"}),r=n.split(jt.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((s=r.at(-1))!=null&&s.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(jt.slashPipe,"|");return r}function Ui(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function CL(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 AL(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function oh(e,t,n,r,i){let s=t.href,a=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:a,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function SL(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
101
+ `}),n}function Xf(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Qf(e,t){const n=mO(e,t),r=n.one(e,void 0),i=hO(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
102
+ `},i),s}function xO(e,t){return e&&"run"in e?async function(n,r){const i=Qf(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Qf(n,{file:r,...e||t})}}function Zf(e){if(e)throw e}var ol,Jf;function yO(){if(Jf)return ol;Jf=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},s=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!c)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},a=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},o=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return ol=function l(){var u,d,c,h,p,m,E=arguments[0],T=1,b=arguments.length,y=!1;for(typeof E=="boolean"&&(y=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});T<b;++T)if(u=arguments[T],u!=null)for(d in u)c=o(E,d),h=o(u,d),E!==h&&(y&&h&&(s(h)||(p=i(h)))?(p?(p=!1,m=c&&i(c)?c:[]):m=c&&s(c)?c:{},a(E,{name:d,newValue:l(y,m,h)})):typeof h<"u"&&a(E,{name:d,newValue:h}));return E},ol}var _O=yO();const ll=Kh(_O);function eu(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 kO(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...u){const d=e[++s];let c=-1;if(l){a(l);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,d?wO(d,o)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function wO(e,t){let n;return r;function r(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(u){const d=u;if(o&&n)throw d;return i(d)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const Pn={basename:CO,dirname:AO,extname:SO,join:IO,sep:"/"};function CO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Gs(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function AO(e){if(Gs(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 SO(e){Gs(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function IO(...e){let t=-1,n;for(;++t<e.length;)Gs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vO(n)}function vO(e){Gs(e);const t=e.codePointAt(0)===47;let n=RO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function RO(e,t){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===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("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function Gs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const NO={cwd:OO};function OO(){return"/"}function tu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function LO(e){if(typeof e=="string")e=new URL(e);else if(!tu(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 DO(e)}function DO(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 i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ul=["history","path","basename","stem","extname","dirname"];class PO{constructor(t){let n;t?tu(t)?n={path:t}:typeof t=="string"||MO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":NO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ul.length;){const s=ul[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)ul.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Pn.basename(this.path):void 0}set basename(t){dl(t,"basename"),cl(t,"basename"),this.path=Pn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Pn.dirname(this.path):void 0}set dirname(t){eh(this.basename,"dirname"),this.path=Pn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Pn.extname(this.path):void 0}set extname(t){if(cl(t,"extname"),eh(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=Pn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tu(t)&&(t=LO(t)),dl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Pn.basename(this.path,this.extname):void 0}set stem(t){dl(t,"stem"),cl(t,"stem"),this.path=Pn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Bt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function cl(e,t){if(e&&e.includes(Pn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Pn.sep+"`")}function dl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function eh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function MO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BO=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),FO={}.hasOwnProperty;class bc extends BO{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=kO()}copy(){const t=new bc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ll(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(pl("data",this.frozen),this.namespace[t]=n,this):FO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(pl("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 i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=fa(t),r=this.parser||this.Parser;return fl("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),fl("process",this.parser||this.Parser),hl("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=fa(t),l=r.parse(o);r.run(l,o,function(d,c,h){if(d||!c||!h)return u(d);const p=c,m=r.stringify(p,h);jO(m)?h.value=m:h.result=m,u(d,h)});function u(d,c){d||!c?a(d):s?s(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),fl("processSync",this.parser||this.Parser),hl("processSync",this.compiler||this.Compiler),this.process(t,i),nh("processSync","process",n),r;function i(s,a){n=!0,Zf(s),r=a}}run(t,n,r){th(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const l=fa(n);i.run(t,l,u);function u(d,c,h){const p=c||t;d?o(d):a?a(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),nh("runSync","run",r),i;function s(a,o){Zf(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=fa(n),i=this.compiler||this.Compiler;return hl("stringify",i),th(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(pl("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...c]=u;l(d,c)}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");o(u.plugins),u.settings&&(i.settings=ll(!0,i.settings,u.settings))}function o(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const c=u[d];s(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let c=-1,h=-1;for(;++c<r.length;)if(r[c][0]===u){h=c;break}if(h===-1)r.push([u,...d]);else if(d.length>0){let[p,...m]=d;const E=r[h][1];eu(E)&&eu(p)&&(p=ll(!0,E,p)),r[h]=[u,p,...m]}}}}const HO=new bc().freeze();function fl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function pl(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 th(e){if(!eu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function nh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fa(e){return UO(e)?e:new PO(e)}function UO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function jO(e){return typeof e=="string"||zO(e)}function zO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Ec(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ei=Ec();function o1(e){ei=e}var Or={exec:()=>null};function je(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(jt.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var $O=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),jt={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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,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)}}>`)},VO=/^(?:[ \t]*(?:\n|$))+/,WO=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,YO=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,qs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,GO=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Tc=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,l1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,u1=je(l1).replace(/bull/g,Tc).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(),qO=je(l1).replace(/bull/g,Tc).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(),xc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,KO=/^[^\n]+/,yc=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,XO=je(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",yc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),QO=je(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Tc).getRegex(),So="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",_c=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ZO=je("^ {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",_c).replace("tag",So).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),c1=je(xc).replace("hr",qs).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",So).getRegex(),JO=je(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",c1).getRegex(),kc={blockquote:JO,code:WO,def:XO,fences:YO,heading:GO,hr:qs,html:ZO,lheading:u1,list:QO,newline:VO,paragraph:c1,table:Or,text:KO},rh=je("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",qs).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",So).getRegex(),eL={...kc,lheading:qO,table:rh,paragraph:je(xc).replace("hr",qs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rh).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",So).getRegex()},tL={...kc,html:je(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_c).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:Or,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:je(xc).replace("hr",qs).replace("heading",` *#{1,6} *[^
103
+ ]`).replace("lheading",u1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},nL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,d1=/^( {2,}|\\)\n(?!\s*$)/,iL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Io=/[\p{P}\p{S}]/u,wc=/[\s\p{P}\p{S}]/u,f1=/[^\s\p{P}\p{S}]/u,sL=je(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,wc).getRegex(),h1=/(?!~)[\p{P}\p{S}]/u,aL=/(?!~)[\s\p{P}\p{S}]/u,oL=/(?:[^\s\p{P}\p{S}]|~)/u,p1=/(?![*_])[\p{P}\p{S}]/u,lL=/(?![*_])[\s\p{P}\p{S}]/u,uL=/(?:[^\s\p{P}\p{S}]|[*_])/u,cL=je(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",$O?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),m1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,dL=je(m1,"u").replace(/punct/g,Io).getRegex(),fL=je(m1,"u").replace(/punct/g,h1).getRegex(),g1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hL=je(g1,"gu").replace(/notPunctSpace/g,f1).replace(/punctSpace/g,wc).replace(/punct/g,Io).getRegex(),pL=je(g1,"gu").replace(/notPunctSpace/g,oL).replace(/punctSpace/g,aL).replace(/punct/g,h1).getRegex(),mL=je("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,f1).replace(/punctSpace/g,wc).replace(/punct/g,Io).getRegex(),gL=je(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,p1).getRegex(),bL="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",EL=je(bL,"gu").replace(/notPunctSpace/g,uL).replace(/punctSpace/g,lL).replace(/punct/g,p1).getRegex(),TL=je(/\\(punct)/,"gu").replace(/punct/g,Io).getRegex(),xL=je(/^<(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(),yL=je(_c).replace("(?:-->|$)","-->").getRegex(),_L=je("^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",yL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,kL=je(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Qa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),b1=je(/^!?\[(label)\]\[(ref)\]/).replace("label",Qa).replace("ref",yc).getRegex(),E1=je(/^!?\[(ref)\](?:\[\])?/).replace("ref",yc).getRegex(),wL=je("reflink|nolink(?!\\()","g").replace("reflink",b1).replace("nolink",E1).getRegex(),ih=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Cc={_backpedal:Or,anyPunctuation:TL,autolink:xL,blockSkip:cL,br:d1,code:rL,del:Or,delLDelim:Or,delRDelim:Or,emStrongLDelim:dL,emStrongRDelimAst:hL,emStrongRDelimUnd:mL,escape:nL,link:kL,nolink:E1,punctuation:sL,reflink:b1,reflinkSearch:wL,tag:_L,text:iL,url:Or},CL={...Cc,link:je(/^!?\[(label)\]\((.*?)\)/).replace("label",Qa).getRegex(),reflink:je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Qa).getRegex()},nu={...Cc,emStrongRDelimAst:pL,emStrongLDelim:fL,delLDelim:gL,delRDelim:EL,url:je(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ih).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:je(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ih).getRegex()},AL={...nu,br:je(d1).replace("{2,}","*").getRegex(),text:je(nu.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ha={normal:kc,gfm:eL,pedantic:tL},Hi={normal:Cc,gfm:nu,breaks:AL,pedantic:CL},SL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},sh=e=>SL[e];function Kn(e,t){if(t){if(jt.escapeTest.test(e))return e.replace(jt.escapeReplace,sh)}else if(jt.escapeTestNoEncode.test(e))return e.replace(jt.escapeReplaceNoEncode,sh);return e}function ah(e){try{e=encodeURI(e).replace(jt.percentDecode,"%")}catch{return null}return e}function oh(e,t){var s;let n=e.replace(jt.findPipe,(a,o,l)=>{let u=!1,d=o;for(;--d>=0&&l[d]==="\\";)u=!u;return u?"|":" |"}),r=n.split(jt.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((s=r.at(-1))!=null&&s.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(jt.slashPipe,"|");return r}function Ui(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function IL(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 vL(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function lh(e,t,n,r,i){let s=t.href,a=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:a,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function RL(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
104
104
  `).map(s=>{let a=s.match(n.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=i.length?s.slice(i.length):s}).join(`
105
105
  `)}var Za=class{constructor(e){Ve(this,"options");Ve(this,"rules");Ve(this,"lexer");this.options=e||ei}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:Ui(n,`
106
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=SL(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=Ui(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:Ui(t[0],`
106
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=RL(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=Ui(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:Ui(t[0],`
107
107
  `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Ui(t[0],`
108
108
  `).split(`
109
109
  `),r="",i="",s=[];for(;n.length>0;){let a=!1,o=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))o.push(n[l]),a=!0;else if(!a)o.push(n[l]);else break;n=n.slice(l);let u=o.join(`
@@ -115,16 +115,16 @@ ${d}`:d;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
115
115
  `),E=this.blockquote(m);s[s.length-1]=E,r=r.substring(0,r.length-p.raw.length)+E.raw,i=i.substring(0,i.length-p.text.length)+E.text;break}else if((h==null?void 0:h.type)==="list"){let p=h,m=p.raw+`
116
116
  `+n.join(`
117
117
  `),E=this.list(m);s[s.length-1]=E,r=r.substring(0,r.length-h.raw.length)+E.raw,i=i.substring(0,i.length-p.raw.length)+E.raw,n=m.substring(s.at(-1).raw.length).split(`
118
- `);continue}}return{type:"blockquote",raw:r,tokens:s,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),l=!1;for(;e;){let d=!1,c="",h="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let p=AL(t[2].split(`
118
+ `);continue}}return{type:"blockquote",raw:r,tokens:s,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),l=!1;for(;e;){let d=!1,c="",h="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let p=vL(t[2].split(`
119
119
  `,1)[0],t[1].length),m=e.split(`
120
120
  `,1)[0],E=!p.trim(),T=0;if(this.options.pedantic?(T=2,h=p.trimStart()):E?T=t[1].length+1:(T=p.search(this.rules.other.nonSpaceChar),T=T>4?1:T,h=p.slice(T),T+=t[1].length),E&&this.rules.other.blankLine.test(m)&&(c+=m+`
121
121
  `,e=e.substring(m.length+1),d=!0),!d){let b=this.rules.other.nextBulletRegex(T),y=this.rules.other.hrRegex(T),k=this.rules.other.fencesBeginRegex(T),P=this.rules.other.headingBeginRegex(T),D=this.rules.other.htmlBeginRegex(T),v=this.rules.other.blockquoteBeginRegex(T);for(;e;){let A=e.split(`
122
122
  `,1)[0],N;if(m=A,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),N=m):N=m.replace(this.rules.other.tabCharGlobal," "),k.test(m)||P.test(m)||D.test(m)||v.test(m)||b.test(m)||y.test(m))break;if(N.search(this.rules.other.nonSpaceChar)>=T||!m.trim())h+=`
123
123
  `+N.slice(T);else{if(E||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(p)||P.test(p)||y.test(p))break;h+=`
124
124
  `+m}E=!m.trim(),c+=A+`
125
- `,e=e.substring(A.length+1),p=N.slice(T)}}a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(l=!0)),a.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),a.raw+=c}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 d of a.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),((n=d.tokens[0])==null?void 0:n.type)==="text"||((r=d.tokens[0])==null?void 0:r.type)==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.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 c=this.rules.other.listTaskCheckbox.exec(d.raw);if(c){let h={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};d.checked=h.checked,a.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=h.raw+d.tokens[0].raw,d.tokens[0].text=h.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(h)):d.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):d.tokens.unshift(h)}}if(!a.loose){let c=d.tokens.filter(p=>p.type==="space"),h=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=h}}if(a.loose)for(let d of a.items){d.loose=!0;for(let c of d.tokens)c.type==="text"&&(c.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"):"",i=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:i}}}table(e){var a;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ah(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(a=t[3])!=null&&a.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
126
- `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<n.length;o++)s.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:s.align[o]});for(let o of i)s.rows.push(ah(o,s.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[u]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
127
- `?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 s=Ui(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=CL(t[2],"()");if(s===-2)return;if(s>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[3])}else i=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)),oh(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.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," "),i=t[r.toLowerCase()];if(!i){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return oh(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,a,o=i,l=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let d=[...r[0]][0].length,c=e.slice(0,i+r.index+d+a);if(Math.min(i,a)%2){let p=c.slice(1,-1);return{type:"em",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}let h=c.slice(2,-2);return{type:"strong",raw:c,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),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(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 i=[...r[0]].length-1,s,a,o=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s||(a=[...s].length,a!==i))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let u=[...r[0]][0].length,d=e.slice(0,i+r.index+u+a),c=d.slice(i,-i);return{type:"del",raw:d,text:c,tokens:this.lexer.inlineTokens(c)}}}}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,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let s;do s=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(s!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,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}}}},hn=class nu{constructor(t){Ve(this,"tokens");Ve(this,"options");Ve(this,"state");Ve(this,"inlineQueue");Ve(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ei,this.options.tokenizer=this.options.tokenizer||new Za,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:jt,block:ha.normal,inline:Hi.normal};this.options.pedantic?(n.block=ha.pedantic,n.inline=Hi.pedantic):this.options.gfm&&(n.block=ha.gfm,this.options.breaks?n.inline=Hi.breaks:n.inline=Hi.gfm),this.tokenizer.rules=n}static get rules(){return{block:ha,inline:Hi}}static lex(t,n){return new nu(n).lex(t)}static lexInline(t,n){return new nu(n).inlineTokens(t)}lex(t){t=t.replace(jt.carriageReturn,`
125
+ `,e=e.substring(A.length+1),p=N.slice(T)}}a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(l=!0)),a.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),a.raw+=c}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 d of a.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),((n=d.tokens[0])==null?void 0:n.type)==="text"||((r=d.tokens[0])==null?void 0:r.type)==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.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 c=this.rules.other.listTaskCheckbox.exec(d.raw);if(c){let h={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};d.checked=h.checked,a.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=h.raw+d.tokens[0].raw,d.tokens[0].text=h.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(h)):d.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):d.tokens.unshift(h)}}if(!a.loose){let c=d.tokens.filter(p=>p.type==="space"),h=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=h}}if(a.loose)for(let d of a.items){d.loose=!0;for(let c of d.tokens)c.type==="text"&&(c.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"):"",i=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:i}}}table(e){var a;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=oh(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(a=t[3])!=null&&a.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
126
+ `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<n.length;o++)s.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:s.align[o]});for(let o of i)s.rows.push(oh(o,s.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[u]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
127
+ `?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 s=Ui(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=IL(t[2],"()");if(s===-2)return;if(s>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[3])}else i=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)),lh(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.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," "),i=t[r.toLowerCase()];if(!i){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return lh(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,a,o=i,l=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let d=[...r[0]][0].length,c=e.slice(0,i+r.index+d+a);if(Math.min(i,a)%2){let p=c.slice(1,-1);return{type:"em",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}let h=c.slice(2,-2);return{type:"strong",raw:c,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),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(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 i=[...r[0]].length-1,s,a,o=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s||(a=[...s].length,a!==i))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let u=[...r[0]][0].length,d=e.slice(0,i+r.index+u+a),c=d.slice(i,-i);return{type:"del",raw:d,text:c,tokens:this.lexer.inlineTokens(c)}}}}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,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let s;do s=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(s!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,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}}}},hn=class ru{constructor(t){Ve(this,"tokens");Ve(this,"options");Ve(this,"state");Ve(this,"inlineQueue");Ve(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ei,this.options.tokenizer=this.options.tokenizer||new Za,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:jt,block:ha.normal,inline:Hi.normal};this.options.pedantic?(n.block=ha.pedantic,n.inline=Hi.pedantic):this.options.gfm&&(n.block=ha.gfm,this.options.breaks?n.inline=Hi.breaks:n.inline=Hi.gfm),this.tokenizer.rules=n}static get rules(){return{block:ha,inline:Hi}}static lex(t,n){return new ru(n).lex(t)}static lexInline(t,n){return new ru(n).inlineTokens(t)}lex(t){t=t.replace(jt.carriageReturn,`
128
128
  `),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 i,s,a;for(this.options.pedantic&&(t=t.replace(jt.tabCharGlobal," ").replace(jt.spaceLine,""));t;){let o;if((s=(i=this.options.extensions)==null?void 0:i.block)!=null&&s.some(u=>(o=u.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let u=n.at(-1);o.raw.length===1&&u!==void 0?u.raw+=`
129
129
  `:n.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.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(`
130
130
  `)?"":`
@@ -156,17 +156,17 @@ ${this.parser.parse(e)}</blockquote>
156
156
  `}tablerow({text:e}){return`<tr>
157
157
  ${e}</tr>
158
158
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
159
- `}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>${Kn(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),i=sh(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+Kn(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=sh(e);if(i===null)return Kn(n);e=i;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${Kn(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Kn(e.text)}},Cc=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},wn=class ru{constructor(t){Ve(this,"options");Ve(this,"renderer");Ve(this,"textRenderer");this.options=t||ei,this.options.renderer=this.options.renderer||new Ja,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Cc}static parse(t,n){return new ru(n).parse(t)}static parseInline(t,n){return new ru(n).parseInline(t)}parse(t){var r,i;let n="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[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 o=a;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let l='Token with "'+o.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 i,s;let r="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&s[o.type]){let u=this.options.extensions.renderers[o.type].call({parser:this},o);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=u||"";continue}}let l=o;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}},xa,Ki=(xa=class{constructor(e){Ve(this,"options");Ve(this,"block");this.options=e||ei}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?hn.lex:hn.lexInline}provideParser(){return this.block?wn.parse:wn.parseInline}},Ve(xa,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ve(xa,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),xa),IL=class{constructor(...e){Ve(this,"defaults",bc());Ve(this,"options",this.setOptions);Ve(this,"parse",this.parseMarkdown(!0));Ve(this,"parseInline",this.parseMarkdown(!1));Ve(this,"Parser",wn);Ve(this,"Renderer",Ja);Ve(this,"TextRenderer",Cc);Ve(this,"Lexer",hn);Ve(this,"Tokenizer",Za);Ve(this,"Hooks",Ki);this.use(...e)}walkTokens(e,t){var r,i;let n=[];for(let s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{let a=s;for(let o of a.header)n=n.concat(this.walkTokens(o.tokens,t));for(let o of a.rows)for(let l of o)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{let a=s;n=n.concat(this.walkTokens(a.items,t));break}default:{let a=s;(i=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&i[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let l=a[o].flat(1/0);n=n.concat(this.walkTokens(l,t))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:t.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 s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new Ja(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=n.renderer[a],l=i[a];i[a]=(...u)=>{let d=o.apply(i,u);return d===!1&&(d=l.apply(i,u)),d||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Za(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=n.tokenizer[a],l=i[a];i[a]=(...u)=>{let d=o.apply(i,u);return d===!1&&(d=l.apply(i,u)),d}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new Ki;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=n.hooks[a],l=i[a];Ki.passThroughHooks.has(s)?i[a]=u=>{if(this.defaults.async&&Ki.passThroughHooksRespectAsync.has(s))return(async()=>{let c=await o.call(i,u);return l.call(i,c)})();let d=o.call(i,u);return l.call(i,d)}:i[a]=(...u)=>{if(this.defaults.async)return(async()=>{let c=await o.apply(i,u);return c===!1&&(c=await l.apply(i,u)),c})();let d=o.apply(i,u);return d===!1&&(d=l.apply(i,u)),d}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),i&&(o=o.concat(i.call(this,a))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return hn.lex(e,t??this.defaults)}parser(e,t){return wn.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return s(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 t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer():e?hn.lex:hn.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser():e?wn.parse:wn.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(s);try{i.hooks&&(t=i.hooks.preprocess(t));let a=(i.hooks?i.hooks.provideLexer():e?hn.lex:hn.lexInline)(t,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser():e?wn.parse:wn.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return s(a)}}}onError(e,t){return n=>{if(n.message+=`
160
- Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+Kn(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},$r=new IL;function Qe(e,t){return $r.parse(e,t)}Qe.options=Qe.setOptions=function(e){return $r.setOptions(e),Qe.defaults=$r.defaults,a1(Qe.defaults),Qe};Qe.getDefaults=bc;Qe.defaults=ei;Qe.use=function(...e){return $r.use(...e),Qe.defaults=$r.defaults,a1(Qe.defaults),Qe};Qe.walkTokens=function(e,t){return $r.walkTokens(e,t)};Qe.parseInline=$r.parseInline;Qe.Parser=wn;Qe.parser=wn.parse;Qe.Renderer=Ja;Qe.TextRenderer=Cc;Qe.Lexer=hn;Qe.lexer=hn.lex;Qe.Tokenizer=Za;Qe.Hooks=Ki;Qe.parse=Qe;Qe.options;Qe.setOptions;Qe.use;Qe.walkTokens;Qe.parseInline;wn.parse;hn.lex;var vL=300,RL="300px",NL=500;function OL(e={}){let{immediate:t=!1,debounceDelay:n=vL,rootMargin:r=RL,idleTimeout:i=NL}=e,[s,a]=x.useState(!1),o=x.useRef(null),l=x.useRef(null),u=x.useRef(null),d=x.useMemo(()=>p=>{let m=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),c=x.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(p,m)=>window.requestIdleCallback(p,m):d,[d]),h=x.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return x.useEffect(()=>{if(t){a(!0);return}let p=o.current;if(!p)return;l.current&&(clearTimeout(l.current),l.current=null),u.current&&(h(u.current),u.current=null);let m=()=>{l.current&&(clearTimeout(l.current),l.current=null),u.current&&(h(u.current),u.current=null)},E=k=>{u.current=c(P=>{P.timeRemaining()>0||P.didTimeout?(a(!0),k.disconnect()):u.current=c(()=>{a(!0),k.disconnect()},{timeout:i/2})},{timeout:i})},T=k=>{m(),l.current=window.setTimeout(()=>{var P,D;let v=k.takeRecords();(v.length===0||(D=(P=v.at(-1))==null?void 0:P.isIntersecting)!=null&&D)&&E(k)},n)},b=(k,P)=>{k.isIntersecting?T(P):m()},y=new IntersectionObserver(k=>{for(let P of k)b(P,y)},{rootMargin:r,threshold:0});return y.observe(p),()=>{l.current&&clearTimeout(l.current),u.current&&h(u.current),y.disconnect()}},[t,n,r,i,h,c]),{shouldRender:s,containerRef:o}}var E1=/\s/,LL=/^\s+$/,DL=new Set(["code","pre","svg","math","annotation"]),PL=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",ML=e=>e.some(t=>PL(t)&&DL.has(t.tagName)),BL=e=>{let t=[],n="",r=!1;for(let i of e){let s=E1.test(i);s!==r&&n&&(t.push(n),n=""),n+=i,r=s}return n&&t.push(n),t},FL=e=>{let t=[],n="";for(let r of e)E1.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},HL=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),UL=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(ML(t))return og;let i=r,s=i.children.indexOf(e);if(s===-1)return;let a=e.value;if(!a.trim())return;let o=(n.sep==="char"?FL(a):BL(a)).map(l=>LL.test(l)?{type:"text",value:l}:HL(l,n.animation,n.duration,n.easing));return i.children.splice(s,1,...o),s+o.length};function iu(e){var t,n,r,i;let s={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:(i=e==null?void 0:e.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>a=>{lg(a,"text",(o,l)=>UL(o,l,s))}}}iu();var T1=x.createContext(!1),jL=()=>x.useContext(T1),ye=(...e)=>Ru(Pt(e)),mi=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i)},zL=ye("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"),$L=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),s=n.slice(r+1).trim();i&&s&&(t[i]=s)}}return t},VL=x.memo(({children:e,result:t,language:n,className:r,...i})=>{let s=x.useMemo(()=>{let a={};return t.bg&&(a["--sdm-bg"]=t.bg),t.fg&&(a["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(a,$L(t.rootStyle)),a},[t.bg,t.fg,t.rootStyle]);return g.jsx("div",{className:ye(r,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...i,children:g.jsx("pre",{className:ye(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:s,children:g.jsx("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((a,o)=>g.jsx("span",{className:zL,children:a.map((l,u)=>{let d={},c=!!l.bgColor;if(l.color&&(d["--sdm-c"]=l.color),l.bgColor&&(d["--sdm-tbg"]=l.bgColor),l.htmlStyle)for(let[h,p]of Object.entries(l.htmlStyle))h==="color"?d["--sdm-c"]=p:h==="background-color"?(d["--sdm-tbg"]=p,c=!0):d[h]=p;return g.jsx("span",{className:ye("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:d,...l.htmlAttrs,children:l.content},u)})},o))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),WL=({className:e,language:t,style:n,isIncomplete:r,...i})=>g.jsx("div",{className:ye("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},...i}),x1=x.createContext({code:""}),y1=()=>x.useContext(x1),YL=({language:e})=>g.jsx("div",{className:"flex h-8 items-center text-muted-foreground text-xs","data-language":e,"data-streamdown":"code-block-header",children:g.jsx("span",{className:"ml-1 font-mono lowercase",children:e})}),GL=/\n+$/,qL=x.lazy(()=>ys(()=>import("./highlighted-body-B3W2YXNL-Zd0qPYE7.js"),__vite__mapDeps([0,1])).then(e=>({default:e.HighlightedCodeBlockBody}))),KL=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,...s})=>{let a=x.useMemo(()=>e.replace(GL,""),[e]),o=x.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:a.split(`
161
- `).map(l=>[{content:l,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[a]);return g.jsx(x1.Provider,{value:{code:e},children:g.jsxs(WL,{isIncomplete:i,language:t,children:[g.jsx(YL,{language:t}),r?g.jsx("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:g.jsx("div",{className:"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,g.jsx(x.Suspense,{fallback:g.jsx(VL,{className:n,language:t,result:o,...s}),children:g.jsx(qL,{className:n,code:a,language:t,raw:o,...s})})]})})},Ac=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),Sc=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),vo=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),XL=e=>g.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[g.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),QL=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),ZL=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),_1=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),lh=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),JL=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),e6=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),uh=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let[o,l]=x.useState(!1),u=x.useRef(0),{code:d}=y1(),{isAnimating:c}=x.useContext(En),h=s??d,p=async()=>{var E;if(typeof window>"u"||!((E=navigator==null?void 0:navigator.clipboard)!=null&&E.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(h),l(!0),e==null||e(),u.current=window.setTimeout(()=>l(!1),n))}catch(T){t==null||t(T)}};x.useEffect(()=>()=>{window.clearTimeout(u.current)},[]);let m=o?Ac:Sc;return g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:c,onClick:p,title:"Copy Code",type:"button",...a,children:r??g.jsx(m,{size:14})})},ch={"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"},t6=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let{code:o}=y1(),{isAnimating:l}=x.useContext(En),u=s??o,d=`file.${n&&n in ch?ch[n]:"txt"}`,c="text/plain",h=()=>{try{mi(d,u,c),e==null||e()}catch(p){t==null||t(p)}};return g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:l,onClick:h,title:"Download file",type:"button",...a,children:r??g.jsx(vo,{size:14})})},n6=()=>g.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[g.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),g.jsx("div",{className:"flex w-full items-center justify-center p-4",children:g.jsx(XL,{className:"size-4 animate-spin"})})]}),r6=/\.[^/.]+$/,i6=({node:e,className:t,src:n,alt:r,onLoad:i,onError:s,...a})=>{let o=x.useRef(null),[l,u]=x.useState(!1),[d,c]=x.useState(!1),h=a.width!=null||a.height!=null,p=(l||h)&&!d,m=d&&!h;x.useEffect(()=>{let y=o.current;if(y!=null&&y.complete){let k=y.naturalWidth>0;u(k),c(!k)}},[]);let E=x.useCallback(y=>{u(!0),c(!1),i==null||i(y)},[i]),T=x.useCallback(y=>{u(!1),c(!0),s==null||s(y)},[s]),b=async()=>{if(n)try{let y=await(await fetch(n)).blob(),k=new URL(n,window.location.origin).pathname.split("/").pop()||"",P=k.split(".").pop(),D=k.includes(".")&&P!==void 0&&P.length<=4,v="";if(D)v=k;else{let A=y.type,N="png";A.includes("jpeg")||A.includes("jpg")?N="jpg":A.includes("png")?N="png":A.includes("svg")?N="svg":A.includes("gif")?N="gif":A.includes("webp")&&(N="webp"),v=`${(r||k||"image").replace(r6,"")}.${N}`}mi(v,y,y.type)}catch{window.open(n,"_blank")}};return n?g.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[g.jsx("img",{alt:r,className:ye("max-w-full rounded-lg",m&&"hidden",t),"data-streamdown":"image",onError:T,onLoad:E,ref:o,src:n,...a}),m&&g.jsx("span",{className:"text-muted-foreground text-xs italic","data-streamdown":"image-fallback",children:"Image not available"}),g.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),p&&g.jsx("button",{className:ye("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:b,title:"Download image",type:"button",children:g.jsx(vo,{size:14})})]}):null},us=0,s6=()=>{us+=1,us===1&&(document.body.style.overflow="hidden")},a6=()=>{us=Math.max(0,us-1),us===0&&(document.body.style.overflow="")},o6=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,s]=x.useState(!1),a=x.useCallback(async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3)}catch{}},[e]),o=x.useCallback(()=>{r(),n()},[r,n]);return x.useEffect(()=>{if(t){s6();let l=u=>{u.key==="Escape"&&n()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),a6()}}},[t,n]),t?g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:l=>{l.key==="Escape"&&n()},role:"button",tabIndex:0,children:g.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:l=>l.stopPropagation(),onKeyDown:l=>l.stopPropagation(),role:"presentation",children:[g.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:g.jsx(_1,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(lh,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:ye("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"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:a,type:"button",children:i?g.jsxs(g.Fragment,{children:[g.jsx(Ac,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Sc,{size:14}),g.jsx("span",{children:"Copy link"})]})}),g.jsxs("button",{className:"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:o,type:"button",children:[g.jsx(lh,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},su=x.createContext(null),k1=()=>x.useContext(su),cM=()=>{var e;let t=k1();return(e=t==null?void 0:t.code)!=null?e:null},Ic=()=>{var e;let t=k1();return(e=t==null?void 0:t.mermaid)!=null?e:null},l6=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,s)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let l=document.createElement("canvas"),u=o.width*r,d=o.height*r;l.width=u,l.height=d;let c=l.getContext("2d");if(!c){s(new Error("Failed to create 2D canvas context for PNG export"));return}c.drawImage(o,0,0,u,d),l.toBlob(h=>{if(!h){s(new Error("Failed to create PNG blob"));return}i(h)},"image/png")},o.onerror=()=>s(new Error("Failed to load SVG image")),o.src=a})},u6=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let[a,o]=x.useState(!1),l=x.useRef(null),{isAnimating:u}=x.useContext(En),d=Ic(),c=async h=>{try{if(h==="mmd"){mi("diagram.mmd",e,"text/plain"),o(!1),r==null||r(h);return}if(!d){s==null||s(new Error("Mermaid plugin not available"));return}let p=d.getMermaid(i),m=e.split("").reduce((b,y)=>(b<<5)-b+y.charCodeAt(0)|0,0),E=`mermaid-${Math.abs(m)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:T}=await p.render(E,e);if(!T){s==null||s(new Error("SVG not found. Please wait for the diagram to render."));return}if(h==="svg"){mi("diagram.svg",T,"image/svg+xml"),o(!1),r==null||r(h);return}if(h==="png"){let b=await l6(T);mi("diagram.png",b,"image/png"),r==null||r(h),o(!1);return}}catch(p){s==null||s(p)}};return x.useEffect(()=>{let h=p=>{let m=p.composedPath();l.current&&!m.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[]),g.jsxs("div",{className:"relative",ref:l,children:[g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:u,onClick:()=>o(!a),title:"Download diagram",type:"button",children:t??g.jsx(vo,{size:14})}),a?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},cs=0,c6=()=>{cs+=1,cs===1&&(document.body.style.overflow="hidden")},d6=()=>{cs=Math.max(0,cs-1),cs===0&&(document.body.style.overflow="")},f6=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let[a,o]=x.useState(!1),{isAnimating:l,controls:u}=x.useContext(En),d=(()=>{if(typeof u=="boolean")return u;let h=u.mermaid;return h===!1?!1:h===!0||h===void 0?!0:h.panZoom!==!1})(),c=()=>{o(!a)};return x.useEffect(()=>{if(a){c6();let h=p=>{p.key==="Escape"&&o(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),d6()}}},[a]),x.useEffect(()=>{a?n==null||n():r&&r()},[a,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:l,onClick:c,title:"View fullscreen",type:"button",...s,children:g.jsx(QL,{size:14})}),a?Eu.createPortal(g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:c,onKeyDown:h=>{h.key==="Escape"&&c()},role:"button",tabIndex:0,children:[g.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:c,title:"Exit fullscreen",type:"button",children:g.jsx(_1,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:g.jsx(Z1,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:d})})]}),document.body):null]})},w1=e=>{var t,n;let r=[],i=[],s=e.querySelectorAll("thead th");for(let o of s)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let o of a){let l=[],u=o.querySelectorAll("td");for(let d of u)l.push(((n=d.textContent)==null?void 0:n.trim())||"");i.push(l)}return{headers:r,rows:i}},C1=e=>{let{headers:t,rows:n}=e,r=o=>{let l=!1,u=!1;for(let d of o){if(d==='"'){l=!0,u=!0;break}(d===","||d===`
159
+ `}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>${Kn(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),i=ah(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+Kn(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ah(e);if(i===null)return Kn(n);e=i;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${Kn(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Kn(e.text)}},Ac=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},wn=class iu{constructor(t){Ve(this,"options");Ve(this,"renderer");Ve(this,"textRenderer");this.options=t||ei,this.options.renderer=this.options.renderer||new Ja,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ac}static parse(t,n){return new iu(n).parse(t)}static parseInline(t,n){return new iu(n).parseInline(t)}parse(t){var r,i;let n="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[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 o=a;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let l='Token with "'+o.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 i,s;let r="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&s[o.type]){let u=this.options.extensions.renderers[o.type].call({parser:this},o);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=u||"";continue}}let l=o;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}},xa,Ki=(xa=class{constructor(e){Ve(this,"options");Ve(this,"block");this.options=e||ei}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?hn.lex:hn.lexInline}provideParser(){return this.block?wn.parse:wn.parseInline}},Ve(xa,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ve(xa,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),xa),NL=class{constructor(...e){Ve(this,"defaults",Ec());Ve(this,"options",this.setOptions);Ve(this,"parse",this.parseMarkdown(!0));Ve(this,"parseInline",this.parseMarkdown(!1));Ve(this,"Parser",wn);Ve(this,"Renderer",Ja);Ve(this,"TextRenderer",Ac);Ve(this,"Lexer",hn);Ve(this,"Tokenizer",Za);Ve(this,"Hooks",Ki);this.use(...e)}walkTokens(e,t){var r,i;let n=[];for(let s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{let a=s;for(let o of a.header)n=n.concat(this.walkTokens(o.tokens,t));for(let o of a.rows)for(let l of o)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{let a=s;n=n.concat(this.walkTokens(a.items,t));break}default:{let a=s;(i=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&i[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let l=a[o].flat(1/0);n=n.concat(this.walkTokens(l,t))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:t.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 s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new Ja(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=n.renderer[a],l=i[a];i[a]=(...u)=>{let d=o.apply(i,u);return d===!1&&(d=l.apply(i,u)),d||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Za(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=n.tokenizer[a],l=i[a];i[a]=(...u)=>{let d=o.apply(i,u);return d===!1&&(d=l.apply(i,u)),d}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new Ki;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=n.hooks[a],l=i[a];Ki.passThroughHooks.has(s)?i[a]=u=>{if(this.defaults.async&&Ki.passThroughHooksRespectAsync.has(s))return(async()=>{let c=await o.call(i,u);return l.call(i,c)})();let d=o.call(i,u);return l.call(i,d)}:i[a]=(...u)=>{if(this.defaults.async)return(async()=>{let c=await o.apply(i,u);return c===!1&&(c=await l.apply(i,u)),c})();let d=o.apply(i,u);return d===!1&&(d=l.apply(i,u)),d}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),i&&(o=o.concat(i.call(this,a))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return hn.lex(e,t??this.defaults)}parser(e,t){return wn.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return s(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 t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer():e?hn.lex:hn.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser():e?wn.parse:wn.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(s);try{i.hooks&&(t=i.hooks.preprocess(t));let a=(i.hooks?i.hooks.provideLexer():e?hn.lex:hn.lexInline)(t,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser():e?wn.parse:wn.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return s(a)}}}onError(e,t){return n=>{if(n.message+=`
160
+ Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+Kn(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},$r=new NL;function Qe(e,t){return $r.parse(e,t)}Qe.options=Qe.setOptions=function(e){return $r.setOptions(e),Qe.defaults=$r.defaults,o1(Qe.defaults),Qe};Qe.getDefaults=Ec;Qe.defaults=ei;Qe.use=function(...e){return $r.use(...e),Qe.defaults=$r.defaults,o1(Qe.defaults),Qe};Qe.walkTokens=function(e,t){return $r.walkTokens(e,t)};Qe.parseInline=$r.parseInline;Qe.Parser=wn;Qe.parser=wn.parse;Qe.Renderer=Ja;Qe.TextRenderer=Ac;Qe.Lexer=hn;Qe.lexer=hn.lex;Qe.Tokenizer=Za;Qe.Hooks=Ki;Qe.parse=Qe;Qe.options;Qe.setOptions;Qe.use;Qe.walkTokens;Qe.parseInline;wn.parse;hn.lex;var OL=300,LL="300px",DL=500;function PL(e={}){let{immediate:t=!1,debounceDelay:n=OL,rootMargin:r=LL,idleTimeout:i=DL}=e,[s,a]=x.useState(!1),o=x.useRef(null),l=x.useRef(null),u=x.useRef(null),d=x.useMemo(()=>p=>{let m=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),c=x.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(p,m)=>window.requestIdleCallback(p,m):d,[d]),h=x.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return x.useEffect(()=>{if(t){a(!0);return}let p=o.current;if(!p)return;l.current&&(clearTimeout(l.current),l.current=null),u.current&&(h(u.current),u.current=null);let m=()=>{l.current&&(clearTimeout(l.current),l.current=null),u.current&&(h(u.current),u.current=null)},E=k=>{u.current=c(P=>{P.timeRemaining()>0||P.didTimeout?(a(!0),k.disconnect()):u.current=c(()=>{a(!0),k.disconnect()},{timeout:i/2})},{timeout:i})},T=k=>{m(),l.current=window.setTimeout(()=>{var P,D;let v=k.takeRecords();(v.length===0||(D=(P=v.at(-1))==null?void 0:P.isIntersecting)!=null&&D)&&E(k)},n)},b=(k,P)=>{k.isIntersecting?T(P):m()},y=new IntersectionObserver(k=>{for(let P of k)b(P,y)},{rootMargin:r,threshold:0});return y.observe(p),()=>{l.current&&clearTimeout(l.current),u.current&&h(u.current),y.disconnect()}},[t,n,r,i,h,c]),{shouldRender:s,containerRef:o}}var T1=/\s/,ML=/^\s+$/,BL=new Set(["code","pre","svg","math","annotation"]),FL=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",HL=e=>e.some(t=>FL(t)&&BL.has(t.tagName)),UL=e=>{let t=[],n="",r=!1;for(let i of e){let s=T1.test(i);s!==r&&n&&(t.push(n),n=""),n+=i,r=s}return n&&t.push(n),t},jL=e=>{let t=[],n="";for(let r of e)T1.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},zL=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),$L=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(HL(t))return lg;let i=r,s=i.children.indexOf(e);if(s===-1)return;let a=e.value;if(!a.trim())return;let o=(n.sep==="char"?jL(a):UL(a)).map(l=>ML.test(l)?{type:"text",value:l}:zL(l,n.animation,n.duration,n.easing));return i.children.splice(s,1,...o),s+o.length};function su(e){var t,n,r,i;let s={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:(i=e==null?void 0:e.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>a=>{ug(a,"text",(o,l)=>$L(o,l,s))}}}su();var x1=x.createContext(!1),VL=()=>x.useContext(x1),ye=(...e)=>Nu(Pt(e)),mi=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i)},WL=ye("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"),YL=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),s=n.slice(r+1).trim();i&&s&&(t[i]=s)}}return t},GL=x.memo(({children:e,result:t,language:n,className:r,...i})=>{let s=x.useMemo(()=>{let a={};return t.bg&&(a["--sdm-bg"]=t.bg),t.fg&&(a["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(a,YL(t.rootStyle)),a},[t.bg,t.fg,t.rootStyle]);return g.jsx("div",{className:ye(r,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...i,children:g.jsx("pre",{className:ye(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:s,children:g.jsx("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((a,o)=>g.jsx("span",{className:WL,children:a.map((l,u)=>{let d={},c=!!l.bgColor;if(l.color&&(d["--sdm-c"]=l.color),l.bgColor&&(d["--sdm-tbg"]=l.bgColor),l.htmlStyle)for(let[h,p]of Object.entries(l.htmlStyle))h==="color"?d["--sdm-c"]=p:h==="background-color"?(d["--sdm-tbg"]=p,c=!0):d[h]=p;return g.jsx("span",{className:ye("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:d,...l.htmlAttrs,children:l.content},u)})},o))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),qL=({className:e,language:t,style:n,isIncomplete:r,...i})=>g.jsx("div",{className:ye("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},...i}),y1=x.createContext({code:""}),_1=()=>x.useContext(y1),KL=({language:e})=>g.jsx("div",{className:"flex h-8 items-center text-muted-foreground text-xs","data-language":e,"data-streamdown":"code-block-header",children:g.jsx("span",{className:"ml-1 font-mono lowercase",children:e})}),XL=/\n+$/,QL=x.lazy(()=>ys(()=>import("./highlighted-body-B3W2YXNL-BdpKyd6t.js"),__vite__mapDeps([0,1])).then(e=>({default:e.HighlightedCodeBlockBody}))),ZL=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,...s})=>{let a=x.useMemo(()=>e.replace(XL,""),[e]),o=x.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:a.split(`
161
+ `).map(l=>[{content:l,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[a]);return g.jsx(y1.Provider,{value:{code:e},children:g.jsxs(qL,{isIncomplete:i,language:t,children:[g.jsx(KL,{language:t}),r?g.jsx("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:g.jsx("div",{className:"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,g.jsx(x.Suspense,{fallback:g.jsx(GL,{className:n,language:t,result:o,...s}),children:g.jsx(QL,{className:n,code:a,language:t,raw:o,...s})})]})})},Sc=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),Ic=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),vo=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),JL=e=>g.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[g.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),e6=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),t6=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),k1=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),uh=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),n6=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),r6=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),ch=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let[o,l]=x.useState(!1),u=x.useRef(0),{code:d}=_1(),{isAnimating:c}=x.useContext(En),h=s??d,p=async()=>{var E;if(typeof window>"u"||!((E=navigator==null?void 0:navigator.clipboard)!=null&&E.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(h),l(!0),e==null||e(),u.current=window.setTimeout(()=>l(!1),n))}catch(T){t==null||t(T)}};x.useEffect(()=>()=>{window.clearTimeout(u.current)},[]);let m=o?Sc:Ic;return g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:c,onClick:p,title:"Copy Code",type:"button",...a,children:r??g.jsx(m,{size:14})})},dh={"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"},i6=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let{code:o}=_1(),{isAnimating:l}=x.useContext(En),u=s??o,d=`file.${n&&n in dh?dh[n]:"txt"}`,c="text/plain",h=()=>{try{mi(d,u,c),e==null||e()}catch(p){t==null||t(p)}};return g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:l,onClick:h,title:"Download file",type:"button",...a,children:r??g.jsx(vo,{size:14})})},s6=()=>g.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[g.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),g.jsx("div",{className:"flex w-full items-center justify-center p-4",children:g.jsx(JL,{className:"size-4 animate-spin"})})]}),a6=/\.[^/.]+$/,o6=({node:e,className:t,src:n,alt:r,onLoad:i,onError:s,...a})=>{let o=x.useRef(null),[l,u]=x.useState(!1),[d,c]=x.useState(!1),h=a.width!=null||a.height!=null,p=(l||h)&&!d,m=d&&!h;x.useEffect(()=>{let y=o.current;if(y!=null&&y.complete){let k=y.naturalWidth>0;u(k),c(!k)}},[]);let E=x.useCallback(y=>{u(!0),c(!1),i==null||i(y)},[i]),T=x.useCallback(y=>{u(!1),c(!0),s==null||s(y)},[s]),b=async()=>{if(n)try{let y=await(await fetch(n)).blob(),k=new URL(n,window.location.origin).pathname.split("/").pop()||"",P=k.split(".").pop(),D=k.includes(".")&&P!==void 0&&P.length<=4,v="";if(D)v=k;else{let A=y.type,N="png";A.includes("jpeg")||A.includes("jpg")?N="jpg":A.includes("png")?N="png":A.includes("svg")?N="svg":A.includes("gif")?N="gif":A.includes("webp")&&(N="webp"),v=`${(r||k||"image").replace(a6,"")}.${N}`}mi(v,y,y.type)}catch{window.open(n,"_blank")}};return n?g.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[g.jsx("img",{alt:r,className:ye("max-w-full rounded-lg",m&&"hidden",t),"data-streamdown":"image",onError:T,onLoad:E,ref:o,src:n,...a}),m&&g.jsx("span",{className:"text-muted-foreground text-xs italic","data-streamdown":"image-fallback",children:"Image not available"}),g.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),p&&g.jsx("button",{className:ye("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:b,title:"Download image",type:"button",children:g.jsx(vo,{size:14})})]}):null},us=0,l6=()=>{us+=1,us===1&&(document.body.style.overflow="hidden")},u6=()=>{us=Math.max(0,us-1),us===0&&(document.body.style.overflow="")},c6=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,s]=x.useState(!1),a=x.useCallback(async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3)}catch{}},[e]),o=x.useCallback(()=>{r(),n()},[r,n]);return x.useEffect(()=>{if(t){l6();let l=u=>{u.key==="Escape"&&n()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),u6()}}},[t,n]),t?g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:l=>{l.key==="Escape"&&n()},role:"button",tabIndex:0,children:g.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:l=>l.stopPropagation(),onKeyDown:l=>l.stopPropagation(),role:"presentation",children:[g.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:g.jsx(k1,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(uh,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:ye("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"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:a,type:"button",children:i?g.jsxs(g.Fragment,{children:[g.jsx(Sc,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Ic,{size:14}),g.jsx("span",{children:"Copy link"})]})}),g.jsxs("button",{className:"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:o,type:"button",children:[g.jsx(uh,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},au=x.createContext(null),w1=()=>x.useContext(au),pM=()=>{var e;let t=w1();return(e=t==null?void 0:t.code)!=null?e:null},vc=()=>{var e;let t=w1();return(e=t==null?void 0:t.mermaid)!=null?e:null},d6=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,s)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let l=document.createElement("canvas"),u=o.width*r,d=o.height*r;l.width=u,l.height=d;let c=l.getContext("2d");if(!c){s(new Error("Failed to create 2D canvas context for PNG export"));return}c.drawImage(o,0,0,u,d),l.toBlob(h=>{if(!h){s(new Error("Failed to create PNG blob"));return}i(h)},"image/png")},o.onerror=()=>s(new Error("Failed to load SVG image")),o.src=a})},f6=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let[a,o]=x.useState(!1),l=x.useRef(null),{isAnimating:u}=x.useContext(En),d=vc(),c=async h=>{try{if(h==="mmd"){mi("diagram.mmd",e,"text/plain"),o(!1),r==null||r(h);return}if(!d){s==null||s(new Error("Mermaid plugin not available"));return}let p=d.getMermaid(i),m=e.split("").reduce((b,y)=>(b<<5)-b+y.charCodeAt(0)|0,0),E=`mermaid-${Math.abs(m)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:T}=await p.render(E,e);if(!T){s==null||s(new Error("SVG not found. Please wait for the diagram to render."));return}if(h==="svg"){mi("diagram.svg",T,"image/svg+xml"),o(!1),r==null||r(h);return}if(h==="png"){let b=await d6(T);mi("diagram.png",b,"image/png"),r==null||r(h),o(!1);return}}catch(p){s==null||s(p)}};return x.useEffect(()=>{let h=p=>{let m=p.composedPath();l.current&&!m.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[]),g.jsxs("div",{className:"relative",ref:l,children:[g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:u,onClick:()=>o(!a),title:"Download diagram",type:"button",children:t??g.jsx(vo,{size:14})}),a?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},cs=0,h6=()=>{cs+=1,cs===1&&(document.body.style.overflow="hidden")},p6=()=>{cs=Math.max(0,cs-1),cs===0&&(document.body.style.overflow="")},m6=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let[a,o]=x.useState(!1),{isAnimating:l,controls:u}=x.useContext(En),d=(()=>{if(typeof u=="boolean")return u;let h=u.mermaid;return h===!1?!1:h===!0||h===void 0?!0:h.panZoom!==!1})(),c=()=>{o(!a)};return x.useEffect(()=>{if(a){h6();let h=p=>{p.key==="Escape"&&o(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),p6()}}},[a]),x.useEffect(()=>{a?n==null||n():r&&r()},[a,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:l,onClick:c,title:"View fullscreen",type:"button",...s,children:g.jsx(e6,{size:14})}),a?Tu.createPortal(g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:c,onKeyDown:h=>{h.key==="Escape"&&c()},role:"button",tabIndex:0,children:[g.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:c,title:"Exit fullscreen",type:"button",children:g.jsx(k1,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:g.jsx(J1,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:d})})]}),document.body):null]})},C1=e=>{var t,n;let r=[],i=[],s=e.querySelectorAll("thead th");for(let o of s)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let o of a){let l=[],u=o.querySelectorAll("td");for(let d of u)l.push(((n=d.textContent)==null?void 0:n.trim())||"");i.push(l)}return{headers:r,rows:i}},A1=e=>{let{headers:t,rows:n}=e,r=o=>{let l=!1,u=!1;for(let d of o){if(d==='"'){l=!0,u=!0;break}(d===","||d===`
162
162
  `)&&(l=!0)}return l?u?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(","),a+=1);for(let o of n)s[a]=o.map(r).join(","),a+=1;return s.join(`
163
- `)},h6=e=>{let{headers:t,rows:n}=e,r=o=>{let l=!1;for(let d of o)if(d===" "||d===`
163
+ `)},g6=e=>{let{headers:t,rows:n}=e,r=o=>{let l=!1;for(let d of o)if(d===" "||d===`
164
164
  `||d==="\r"){l=!0;break}if(!l)return o;let u=[];for(let d of o)d===" "?u.push("\\t"):d===`
165
165
  `?u.push("\\n"):d==="\r"?u.push("\\r"):u.push(d);return u.join("")},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(" "),a+=1);for(let o of n)s[a]=o.map(r).join(" "),a+=1;return s.join(`
166
- `)},pl=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},au=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,s=t.map(o=>pl(o));r[i]=`| ${s.join(" | ")} |`,i+=1;let a=new Array(t.length);for(let o=0;o<t.length;o+=1)a[o]="---";r[i]=`| ${a.join(" | ")} |`,i+=1;for(let o of n)if(o.length<t.length){let l=new Array(t.length);for(let u=0;u<t.length;u+=1)l[u]=u<o.length?pl(o[u]):"";r[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=o.map(u=>pl(u));r[i]=`| ${l.join(" | ")} |`,i+=1}return r.join(`
167
- `)},p6=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[s,a]=x.useState(!1),[o,l]=x.useState(!1),u=x.useRef(null),d=x.useRef(0),{isAnimating:c}=x.useContext(En),h=async m=>{var E,T;if(typeof window>"u"||!((E=navigator==null?void 0:navigator.clipboard)!=null&&E.write)){r==null||r(new Error("Clipboard API not available"));return}try{let b=(T=u.current)==null?void 0:T.closest('[data-streamdown="table-wrapper"]'),y=b==null?void 0:b.querySelector("table");if(!y){r==null||r(new Error("Table not found"));return}let k=w1(y),P=({csv:C1,tsv:h6,md:au}[m]||au)(k),D=new ClipboardItem({"text/plain":new Blob([P],{type:"text/plain"}),"text/html":new Blob([y.outerHTML],{type:"text/html"})});await navigator.clipboard.write([D]),l(!0),a(!1),n==null||n(m),d.current=window.setTimeout(()=>l(!1),i)}catch(b){r==null||r(b)}};x.useEffect(()=>{let m=E=>{let T=E.composedPath();u.current&&!T.includes(u.current)&&a(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m),window.clearTimeout(d.current)}},[]);let p=o?Ac:Sc;return g.jsxs("div",{className:"relative",ref:u,children:[g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>a(!s),title:"Copy table",type:"button",children:e??g.jsx(p,{size:14})}),s?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("md"),title:"Copy table as Markdown",type:"button",children:"Markdown"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},m6=({children:e,className:t,onDownload:n,onError:r})=>{let[i,s]=x.useState(!1),a=x.useRef(null),{isAnimating:o}=x.useContext(En),l=u=>{var d;try{let c=(d=a.current)==null?void 0:d.closest('[data-streamdown="table-wrapper"]'),h=c==null?void 0:c.querySelector("table");if(!h){r==null||r(new Error("Table not found"));return}let p=w1(h),m=u==="csv"?C1(p):au(p);mi(`table.${u==="csv"?"csv":"md"}`,m,u==="csv"?"text/csv":"text/markdown"),s(!1),n==null||n(u)}catch(c){r==null||r(c)}};return x.useEffect(()=>{let u=d=>{let c=d.composedPath();a.current&&!c.includes(a.current)&&s(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[]),g.jsxs("div",{className:"relative",ref:a,children:[g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>s(!i),title:"Download table",type:"button",children:e??g.jsx(vo,{size:14})}),i?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},g6=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(p6,{}),g.jsx(m6,{})]}):null,g.jsx("div",{className:"border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background",children:g.jsx("table",{className:ye("w-full divide-y divide-border",t),"data-streamdown":"table",...r,children:e})})]}),b6=x.lazy(()=>ys(()=>Promise.resolve().then(()=>qP),void 0).then(e=>({default:e.Mermaid}))),E6=/language-([^\s]+)/;function Ro(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,s=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(s==null?void 0:s.line)&&(i==null?void 0:i.column)===(s==null?void 0:s.column)}function dt(e,t){return e.className===t.className&&Ro(e.node,t.node)}var ou=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,pa=(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},vc=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:ye("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>dt(e,t));vc.displayName="MarkdownOl";var A1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:ye("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&Ro(e.node,t.node));A1.displayName="MarkdownLi";var S1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:ye("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>dt(e,t));S1.displayName="MarkdownUl";var I1=x.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:ye("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>dt(e,t));I1.displayName="MarkdownHr";var v1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:ye("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>dt(e,t));v1.displayName="MarkdownStrong";var T6=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:s}=x.useContext(En),[a,o]=x.useState(!1),l=n==="streamdown:incomplete-link",u=x.useCallback(async p=>{if(!(!(s!=null&&s.enabled&&n)||l)){if(p.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[s,n,l]),d=x.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),c=x.useCallback(()=>{o(!1)},[]),h={url:n??"",isOpen:a,onClose:c,onConfirm:d};return s!=null&&s.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:ye("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:u,type:"button",children:e}),s.renderModal?s.renderModal(h):g.jsx(o6,{...h})]}):g.jsx("a",{className:ye("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},R1=x.memo(T6,(e,t)=>dt(e,t)&&e.href===t.href);R1.displayName="MarkdownA";var N1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:ye("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>dt(e,t));N1.displayName="MarkdownH1";var O1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:ye("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>dt(e,t));O1.displayName="MarkdownH2";var L1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:ye("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>dt(e,t));L1.displayName="MarkdownH3";var D1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:ye("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>dt(e,t));D1.displayName="MarkdownH4";var P1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:ye("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>dt(e,t));P1.displayName="MarkdownH5";var M1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:ye("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>dt(e,t));M1.displayName="MarkdownH6";var B1=x.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=x.useContext(En),s=ou(i,"table");return g.jsx(g6,{className:t,showControls:s,...r,children:e})},(e,t)=>dt(e,t));B1.displayName="MarkdownTable";var F1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:ye("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>dt(e,t));F1.displayName="MarkdownThead";var H1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:ye("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>dt(e,t));H1.displayName="MarkdownTbody";var U1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:ye("border-border",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>dt(e,t));U1.displayName="MarkdownTr";var j1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:ye("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>dt(e,t));j1.displayName="MarkdownTh";var z1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:ye("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>dt(e,t));z1.displayName="MarkdownTd";var $1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:ye("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>dt(e,t));$1.displayName="MarkdownBlockquote";var V1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:ye("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>dt(e,t));V1.displayName="MarkdownSup";var W1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:ye("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>dt(e,t));W1.displayName="MarkdownSub";var Y1=x.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=a=>{var o,l;if(!x.isValidElement(a))return!1;let u=Array.isArray(a.props.children)?a.props.children:[a.props.children],d=!1,c=!1;for(let h of u)if(h){if(typeof h=="string")h.trim()!==""&&(d=!0);else if(x.isValidElement(h))if(((o=h.props)==null?void 0:o["data-footnote-backref"])!==void 0)c=!0;else{let p=Array.isArray(h.props.children)?h.props.children:[h.props.children];for(let m of p){if(typeof m=="string"&&m.trim()!==""){d=!0;break}if(x.isValidElement(m)&&((l=m.props)==null?void 0:l["data-footnote-backref"])===void 0){d=!0;break}}}}return c&&!d},s=Array.isArray(e)?e.map(a=>{if(!x.isValidElement(a))return a;if(a.type===vc){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(l=>!i(l));return o.length===0?null:{...a,props:{...a.props,children:o}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?g.jsx("section",{className:t,...r,children:s}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>dt(e,t));Y1.displayName="MarkdownSection";var x6=({node:e,className:t,children:n,...r})=>{var i;let s=!("data-block"in r),{mermaid:a,controls:o}=x.useContext(En),l=Ic(),u=jL();if(s)return g.jsx("code",{className:ye("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let d=t==null?void 0:t.match(E6),c=(i=d==null?void 0:d.at(1))!=null?i:"",h="";if(x.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?h=n.props.children:typeof n=="string"&&(h=n),c==="mermaid"&&l){let m=ou(o,"mermaid"),E=pa(o,"download"),T=pa(o,"copy"),b=pa(o,"fullscreen"),y=pa(o,"panZoom"),k=m&&(E||T||b);return g.jsx(x.Suspense,{fallback:g.jsx(n6,{}),children:g.jsxs("div",{className:ye("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:[g.jsx("div",{className:"flex h-8 items-center text-muted-foreground text-xs",children:g.jsx("span",{className:"ml-1 font-mono lowercase",children:"mermaid"})}),k?g.jsx("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:g.jsxs("div",{className:"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:[E?g.jsx(u6,{chart:h,config:a==null?void 0:a.config}):null,T?g.jsx(uh,{code:h}):null,b?g.jsx(f6,{chart:h,config:a==null?void 0:a.config}):null]})}):null,g.jsx("div",{className:"rounded-md border border-border bg-background",children:g.jsx(b6,{chart:h,config:a==null?void 0:a.config,showControls:y})})]})})}let p=ou(o,"code");return g.jsx(KL,{className:t,code:h,isIncomplete:u,language:c,children:p?g.jsxs(g.Fragment,{children:[g.jsx(t6,{code:h,language:c}),g.jsx(uh,{})]}):null})},G1=x.memo(x6,(e,t)=>e.className===t.className&&Ro(e.node,t.node));G1.displayName="MarkdownCode";var q1=x.memo(i6,(e,t)=>e.className===t.className&&Ro(e.node,t.node));q1.displayName="MarkdownImg";var K1=x.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&x.isValidElement(r[0])){let i=r[0].props.node,s=i==null?void 0:i.tagName;if(s==="img")return g.jsx(g.Fragment,{children:e});if(s==="code"&&"data-block"in r[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{...n,children:e})},(e,t)=>dt(e,t));K1.displayName="MarkdownParagraph";var y6={ol:vc,li:A1,ul:S1,hr:I1,strong:v1,a:R1,h1:N1,h2:O1,h3:L1,h4:D1,h5:P1,h6:M1,table:B1,thead:F1,tbody:H1,tr:U1,th:j1,td:z1,blockquote:$1,code:G1,img:q1,pre:({children:e})=>x.isValidElement(e)?x.cloneElement(e,{"data-block":"true"}):e,sup:V1,sub:W1,p:K1,section:Y1},_6=/^[ \t]{0,3}(`{3,}|~{3,})/,k6=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,dh=e=>{let t=e.split(`
168
- `),n=null,r=0;for(let i of t){let s=_6.exec(i);if(n===null){if(s){let a=s[1];n=a[0],r=a.length}}else if(s){let a=s[1],o=a[0],l=a.length;o===n&&l>=r&&(n=null,r=0)}}return n!==null},w6=e=>{let t=e.split(`
169
- `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&k6.test(r))return!0}return!1},C6=()=>e=>{Er(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},fh=[],hh={allowDangerousHtml:!0},ma=new WeakMap,A6=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,i=e.remarkRehypeOptions;if(!(n||r||i)){let d="default";return this.keyCache.set(e,d),d}let s=d=>{if(!d||d.length===0)return"";let c="";for(let h=0;h<d.length;h+=1){let p=d[h];if(h>0&&(c+=","),Array.isArray(p)){let[m,E]=p;if(typeof m=="function"){let T=ma.get(m);T||(T=m.name,ma.set(m,T)),c+=T}else c+=String(m);c+=":",c+=JSON.stringify(E)}else if(typeof p=="function"){let m=ma.get(p);m||(m=p.name,ma.set(p,m)),c+=m}else c+=String(p)}return c},a=s(n),o=s(r),l=i?JSON.stringify(i):"",u=`${o}::${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()}},ph=new A6,X1=e=>{let t=S6(e),n=e.children||"";return D6(t.runSync(t.parse(n),n),e)},S6=e=>{let t=ph.get(e);if(t)return t;let n=v6(e);return ph.set(e,n),n},I6=e=>e.some(t=>Array.isArray(t)?t[0]===Gl:t===Gl),v6=e=>{let t=e.rehypePlugins||fh,n=e.remarkPlugins||fh,r=I6(t)?n:[...n,C6],i=e.remarkRehypeOptions?{...hh,...e.remarkRehypeOptions}:hh;return MO().use(PN).use(r).use(bO,i).use(t)},R6=e=>e,N6=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},O6=(e,t)=>{var n;for(let r in sl)if(Object.hasOwn(sl,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],s=sl[r];(s===null||s.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},L6=(e,t,n,r,i,s)=>{let a=!1;return r?a=!r.includes(e.tagName):i&&(a=i.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,n)),a},D6=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:s,unwrapDisallowed:a,urlTransform:o}=t;if(n||r||i||s||o){let l=o||R6;Er(e,(u,d,c)=>{if(u.type==="raw"&&c&&typeof d=="number")return N6(c,d,s,u.value),d;if(u.type==="element"&&(O6(u,l),L6(u,d,c,r,i,n)&&c&&typeof d=="number"))return a&&u.children?c.children.splice(d,1,...u.children):c.children.splice(d,1),d})}return $R(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},P6=/\[\^[\w-]{1,200}\](?!:)/,M6=/\[\^[\w-]{1,200}\]:/,B6=/<(\w+)[\s>]/,F6=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),mh=new Map,gh=new Map,H6=e=>{let t=e.toLowerCase(),n=mh.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return mh.set(t,r),r},U6=e=>{let t=e.toLowerCase(),n=gh.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return gh.set(t,r),r},bh=(e,t)=>{if(F6.has(t.toLowerCase()))return 0;let n=e.match(H6(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Eh=(e,t)=>{let n=e.match(U6(t));return n?n.length:0},j6=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},z6=e=>{let t=P6.test(e),n=M6.test(e);if(t||n)return[e];let r=hn.lex(e,{gfm:!0}),i=[],s=[],a=!1;for(let o of r){let l=o.raw,u=i.length;if(s.length>0){i[u-1]+=l;let d=s.at(-1),c=bh(l,d),h=Eh(l,d);for(let p=0;p<c;p+=1)s.push(d);for(let p=0;p<h;p+=1)s.length>0&&s.at(-1)===d&&s.pop();continue}if(o.type==="html"&&o.block){let d=l.match(B6);if(d){let c=d[1],h=bh(l,c),p=Eh(l,c);h>p&&s.push(c)}}if(u>0&&!a){let d=i[u-1];if(j6(d)%2===1){i[u-1]=d+l;continue}}i.push(l),o.type!=="space"&&(a=o.type==="code")}return i},$6=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(s,a,o,l)=>{let u=o.replace(/\n\n/g,`
166
+ `)},ml=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},ou=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,s=t.map(o=>ml(o));r[i]=`| ${s.join(" | ")} |`,i+=1;let a=new Array(t.length);for(let o=0;o<t.length;o+=1)a[o]="---";r[i]=`| ${a.join(" | ")} |`,i+=1;for(let o of n)if(o.length<t.length){let l=new Array(t.length);for(let u=0;u<t.length;u+=1)l[u]=u<o.length?ml(o[u]):"";r[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=o.map(u=>ml(u));r[i]=`| ${l.join(" | ")} |`,i+=1}return r.join(`
167
+ `)},b6=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[s,a]=x.useState(!1),[o,l]=x.useState(!1),u=x.useRef(null),d=x.useRef(0),{isAnimating:c}=x.useContext(En),h=async m=>{var E,T;if(typeof window>"u"||!((E=navigator==null?void 0:navigator.clipboard)!=null&&E.write)){r==null||r(new Error("Clipboard API not available"));return}try{let b=(T=u.current)==null?void 0:T.closest('[data-streamdown="table-wrapper"]'),y=b==null?void 0:b.querySelector("table");if(!y){r==null||r(new Error("Table not found"));return}let k=C1(y),P=({csv:A1,tsv:g6,md:ou}[m]||ou)(k),D=new ClipboardItem({"text/plain":new Blob([P],{type:"text/plain"}),"text/html":new Blob([y.outerHTML],{type:"text/html"})});await navigator.clipboard.write([D]),l(!0),a(!1),n==null||n(m),d.current=window.setTimeout(()=>l(!1),i)}catch(b){r==null||r(b)}};x.useEffect(()=>{let m=E=>{let T=E.composedPath();u.current&&!T.includes(u.current)&&a(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m),window.clearTimeout(d.current)}},[]);let p=o?Sc:Ic;return g.jsxs("div",{className:"relative",ref:u,children:[g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>a(!s),title:"Copy table",type:"button",children:e??g.jsx(p,{size:14})}),s?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("md"),title:"Copy table as Markdown",type:"button",children:"Markdown"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},E6=({children:e,className:t,onDownload:n,onError:r})=>{let[i,s]=x.useState(!1),a=x.useRef(null),{isAnimating:o}=x.useContext(En),l=u=>{var d;try{let c=(d=a.current)==null?void 0:d.closest('[data-streamdown="table-wrapper"]'),h=c==null?void 0:c.querySelector("table");if(!h){r==null||r(new Error("Table not found"));return}let p=C1(h),m=u==="csv"?A1(p):ou(p);mi(`table.${u==="csv"?"csv":"md"}`,m,u==="csv"?"text/csv":"text/markdown"),s(!1),n==null||n(u)}catch(c){r==null||r(c)}};return x.useEffect(()=>{let u=d=>{let c=d.composedPath();a.current&&!c.includes(a.current)&&s(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[]),g.jsxs("div",{className:"relative",ref:a,children:[g.jsx("button",{className:ye("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>s(!i),title:"Download table",type:"button",children:e??g.jsx(vo,{size:14})}),i?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},T6=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(b6,{}),g.jsx(E6,{})]}):null,g.jsx("div",{className:"border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background",children:g.jsx("table",{className:ye("w-full divide-y divide-border",t),"data-streamdown":"table",...r,children:e})})]}),x6=x.lazy(()=>ys(()=>Promise.resolve().then(()=>ZP),void 0).then(e=>({default:e.Mermaid}))),y6=/language-([^\s]+)/;function Ro(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,s=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(s==null?void 0:s.line)&&(i==null?void 0:i.column)===(s==null?void 0:s.column)}function dt(e,t){return e.className===t.className&&Ro(e.node,t.node)}var lu=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,pa=(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},Rc=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:ye("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>dt(e,t));Rc.displayName="MarkdownOl";var S1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:ye("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&Ro(e.node,t.node));S1.displayName="MarkdownLi";var I1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:ye("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>dt(e,t));I1.displayName="MarkdownUl";var v1=x.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:ye("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>dt(e,t));v1.displayName="MarkdownHr";var R1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:ye("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>dt(e,t));R1.displayName="MarkdownStrong";var _6=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:s}=x.useContext(En),[a,o]=x.useState(!1),l=n==="streamdown:incomplete-link",u=x.useCallback(async p=>{if(!(!(s!=null&&s.enabled&&n)||l)){if(p.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[s,n,l]),d=x.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),c=x.useCallback(()=>{o(!1)},[]),h={url:n??"",isOpen:a,onClose:c,onConfirm:d};return s!=null&&s.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:ye("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:u,type:"button",children:e}),s.renderModal?s.renderModal(h):g.jsx(c6,{...h})]}):g.jsx("a",{className:ye("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},N1=x.memo(_6,(e,t)=>dt(e,t)&&e.href===t.href);N1.displayName="MarkdownA";var O1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:ye("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>dt(e,t));O1.displayName="MarkdownH1";var L1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:ye("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>dt(e,t));L1.displayName="MarkdownH2";var D1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:ye("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>dt(e,t));D1.displayName="MarkdownH3";var P1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:ye("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>dt(e,t));P1.displayName="MarkdownH4";var M1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:ye("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>dt(e,t));M1.displayName="MarkdownH5";var B1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:ye("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>dt(e,t));B1.displayName="MarkdownH6";var F1=x.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=x.useContext(En),s=lu(i,"table");return g.jsx(T6,{className:t,showControls:s,...r,children:e})},(e,t)=>dt(e,t));F1.displayName="MarkdownTable";var H1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:ye("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>dt(e,t));H1.displayName="MarkdownThead";var U1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:ye("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>dt(e,t));U1.displayName="MarkdownTbody";var j1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:ye("border-border",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>dt(e,t));j1.displayName="MarkdownTr";var z1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:ye("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>dt(e,t));z1.displayName="MarkdownTh";var $1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:ye("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>dt(e,t));$1.displayName="MarkdownTd";var V1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:ye("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>dt(e,t));V1.displayName="MarkdownBlockquote";var W1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:ye("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>dt(e,t));W1.displayName="MarkdownSup";var Y1=x.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:ye("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>dt(e,t));Y1.displayName="MarkdownSub";var G1=x.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=a=>{var o,l;if(!x.isValidElement(a))return!1;let u=Array.isArray(a.props.children)?a.props.children:[a.props.children],d=!1,c=!1;for(let h of u)if(h){if(typeof h=="string")h.trim()!==""&&(d=!0);else if(x.isValidElement(h))if(((o=h.props)==null?void 0:o["data-footnote-backref"])!==void 0)c=!0;else{let p=Array.isArray(h.props.children)?h.props.children:[h.props.children];for(let m of p){if(typeof m=="string"&&m.trim()!==""){d=!0;break}if(x.isValidElement(m)&&((l=m.props)==null?void 0:l["data-footnote-backref"])===void 0){d=!0;break}}}}return c&&!d},s=Array.isArray(e)?e.map(a=>{if(!x.isValidElement(a))return a;if(a.type===Rc){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(l=>!i(l));return o.length===0?null:{...a,props:{...a.props,children:o}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?g.jsx("section",{className:t,...r,children:s}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>dt(e,t));G1.displayName="MarkdownSection";var k6=({node:e,className:t,children:n,...r})=>{var i;let s=!("data-block"in r),{mermaid:a,controls:o}=x.useContext(En),l=vc(),u=VL();if(s)return g.jsx("code",{className:ye("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let d=t==null?void 0:t.match(y6),c=(i=d==null?void 0:d.at(1))!=null?i:"",h="";if(x.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?h=n.props.children:typeof n=="string"&&(h=n),c==="mermaid"&&l){let m=lu(o,"mermaid"),E=pa(o,"download"),T=pa(o,"copy"),b=pa(o,"fullscreen"),y=pa(o,"panZoom"),k=m&&(E||T||b);return g.jsx(x.Suspense,{fallback:g.jsx(s6,{}),children:g.jsxs("div",{className:ye("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:[g.jsx("div",{className:"flex h-8 items-center text-muted-foreground text-xs",children:g.jsx("span",{className:"ml-1 font-mono lowercase",children:"mermaid"})}),k?g.jsx("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:g.jsxs("div",{className:"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:[E?g.jsx(f6,{chart:h,config:a==null?void 0:a.config}):null,T?g.jsx(ch,{code:h}):null,b?g.jsx(m6,{chart:h,config:a==null?void 0:a.config}):null]})}):null,g.jsx("div",{className:"rounded-md border border-border bg-background",children:g.jsx(x6,{chart:h,config:a==null?void 0:a.config,showControls:y})})]})})}let p=lu(o,"code");return g.jsx(ZL,{className:t,code:h,isIncomplete:u,language:c,children:p?g.jsxs(g.Fragment,{children:[g.jsx(i6,{code:h,language:c}),g.jsx(ch,{})]}):null})},q1=x.memo(k6,(e,t)=>e.className===t.className&&Ro(e.node,t.node));q1.displayName="MarkdownCode";var K1=x.memo(o6,(e,t)=>e.className===t.className&&Ro(e.node,t.node));K1.displayName="MarkdownImg";var X1=x.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&x.isValidElement(r[0])){let i=r[0].props.node,s=i==null?void 0:i.tagName;if(s==="img")return g.jsx(g.Fragment,{children:e});if(s==="code"&&"data-block"in r[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{...n,children:e})},(e,t)=>dt(e,t));X1.displayName="MarkdownParagraph";var w6={ol:Rc,li:S1,ul:I1,hr:v1,strong:R1,a:N1,h1:O1,h2:L1,h3:D1,h4:P1,h5:M1,h6:B1,table:F1,thead:H1,tbody:U1,tr:j1,th:z1,td:$1,blockquote:V1,code:q1,img:K1,pre:({children:e})=>x.isValidElement(e)?x.cloneElement(e,{"data-block":"true"}):e,sup:W1,sub:Y1,p:X1,section:G1},C6=/^[ \t]{0,3}(`{3,}|~{3,})/,A6=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,fh=e=>{let t=e.split(`
168
+ `),n=null,r=0;for(let i of t){let s=C6.exec(i);if(n===null){if(s){let a=s[1];n=a[0],r=a.length}}else if(s){let a=s[1],o=a[0],l=a.length;o===n&&l>=r&&(n=null,r=0)}}return n!==null},S6=e=>{let t=e.split(`
169
+ `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&A6.test(r))return!0}return!1},I6=()=>e=>{Er(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},hh=[],ph={allowDangerousHtml:!0},ma=new WeakMap,v6=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,i=e.remarkRehypeOptions;if(!(n||r||i)){let d="default";return this.keyCache.set(e,d),d}let s=d=>{if(!d||d.length===0)return"";let c="";for(let h=0;h<d.length;h+=1){let p=d[h];if(h>0&&(c+=","),Array.isArray(p)){let[m,E]=p;if(typeof m=="function"){let T=ma.get(m);T||(T=m.name,ma.set(m,T)),c+=T}else c+=String(m);c+=":",c+=JSON.stringify(E)}else if(typeof p=="function"){let m=ma.get(p);m||(m=p.name,ma.set(p,m)),c+=m}else c+=String(p)}return c},a=s(n),o=s(r),l=i?JSON.stringify(i):"",u=`${o}::${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()}},mh=new v6,Q1=e=>{let t=R6(e),n=e.children||"";return B6(t.runSync(t.parse(n),n),e)},R6=e=>{let t=mh.get(e);if(t)return t;let n=O6(e);return mh.set(e,n),n},N6=e=>e.some(t=>Array.isArray(t)?t[0]===ql:t===ql),O6=e=>{let t=e.rehypePlugins||hh,n=e.remarkPlugins||hh,r=N6(t)?n:[...n,I6],i=e.remarkRehypeOptions?{...ph,...e.remarkRehypeOptions}:ph;return HO().use(FN).use(r).use(xO,i).use(t)},L6=e=>e,D6=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},P6=(e,t)=>{var n;for(let r in al)if(Object.hasOwn(al,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],s=al[r];(s===null||s.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},M6=(e,t,n,r,i,s)=>{let a=!1;return r?a=!r.includes(e.tagName):i&&(a=i.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,n)),a},B6=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:s,unwrapDisallowed:a,urlTransform:o}=t;if(n||r||i||s||o){let l=o||L6;Er(e,(u,d,c)=>{if(u.type==="raw"&&c&&typeof d=="number")return D6(c,d,s,u.value),d;if(u.type==="element"&&(P6(u,l),M6(u,d,c,r,i,n)&&c&&typeof d=="number"))return a&&u.children?c.children.splice(d,1,...u.children):c.children.splice(d,1),d})}return YR(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},F6=/\[\^[\w-]{1,200}\](?!:)/,H6=/\[\^[\w-]{1,200}\]:/,U6=/<(\w+)[\s>]/,j6=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),gh=new Map,bh=new Map,z6=e=>{let t=e.toLowerCase(),n=gh.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return gh.set(t,r),r},$6=e=>{let t=e.toLowerCase(),n=bh.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return bh.set(t,r),r},Eh=(e,t)=>{if(j6.has(t.toLowerCase()))return 0;let n=e.match(z6(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Th=(e,t)=>{let n=e.match($6(t));return n?n.length:0},V6=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},W6=e=>{let t=F6.test(e),n=H6.test(e);if(t||n)return[e];let r=hn.lex(e,{gfm:!0}),i=[],s=[],a=!1;for(let o of r){let l=o.raw,u=i.length;if(s.length>0){i[u-1]+=l;let d=s.at(-1),c=Eh(l,d),h=Th(l,d);for(let p=0;p<c;p+=1)s.push(d);for(let p=0;p<h;p+=1)s.length>0&&s.at(-1)===d&&s.pop();continue}if(o.type==="html"&&o.block){let d=l.match(U6);if(d){let c=d[1],h=Eh(l,c),p=Th(l,c);h>p&&s.push(c)}}if(u>0&&!a){let d=i[u-1];if(V6(d)%2===1){i[u-1]=d+l;continue}}i.push(l),o.type!=="space"&&(a=o.type==="code")}return i},Y6=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(s,a,o,l)=>{let u=o.replace(/\n\n/g,`
170
170
  <!---->
171
- `);return a+u+l})}return n},V6=/^[ \t]*<[\w!/?-]/,W6=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,Y6=e=>typeof e!="string"||e.length===0||!V6.test(e)?e:e.replace(W6,"$1"),Th,xh,Oa={...as,protocols:{...as.protocols,href:[...(xh=(Th=as.protocols)==null?void 0:Th.href)!=null?xh:[],"tel"]}},lu={raw:Gl,sanitize:[sg,Oa],harden:[V_,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},G6={gfm:[xv,{}]},yh=Object.values(lu),q6=Object.values(G6),K6={block:" ▋",circle:" ●"},X6={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},En=x.createContext(X6),Q1=x.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,...s})=>{let a=typeof e=="string"&&n?Y6(e):e;return g.jsx(T1.Provider,{value:i,children:g.jsx(X1,{...s,children:a})})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete)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(i=>{var s,a;return((s=e.components)==null?void 0:s[i])!==((a=t.components)==null?void 0:a[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Q1.displayName="Block";var Q6=["github-light","github-dark"],Z6=x.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:r=!1,components:i,rehypePlugins:s=yh,remarkPlugins:a=q6,className:o,shikiTheme:l=Q6,mermaid:u,controls:d=!0,isAnimating:c=!1,animated:h,BlockComponent:p=Q1,parseMarkdownIntoBlocksFn:m=z6,caret:E,plugins:T,remend:b,linkSafety:y={enabled:!0},allowedTags:k,...P})=>{let D=x.useId(),[v,A]=x.useTransition(),N=x.useMemo(()=>k?Object.keys(k):[],[k]),z=x.useMemo(()=>{if(typeof e!="string")return"";let te=t==="streaming"&&n?SR(e,b):e;return N.length>0&&(te=$6(te,N)),te},[e,t,n,b,N]),R=x.useMemo(()=>m(z),[z,m]),[W,j]=x.useState(R);x.useEffect(()=>{t==="streaming"?A(()=>{j(R)}):j(R)},[R,t]);let w=t==="streaming"?W:R,L=x.useMemo(()=>w.map((te,S)=>`${D}-${S}`),[w.length,D]),M=x.useMemo(()=>h?h===!0?iu():iu(h):null,[h]),H=x.useMemo(()=>{var te,S;return{shikiTheme:(S=(te=T==null?void 0:T.code)==null?void 0:te.getThemes())!=null?S:l,controls:d,isAnimating:c,mode:t,mermaid:u,linkSafety:y}},[l,d,c,t,u,y,T==null?void 0:T.code]),U=x.useMemo(()=>({...y6,...i}),[i]),G=x.useMemo(()=>{let te=[];return T!=null&&T.cjk&&(te=[...te,...T.cjk.remarkPluginsBefore]),te=[...te,...a],T!=null&&T.cjk&&(te=[...te,...T.cjk.remarkPluginsAfter]),T!=null&&T.math&&(te=[...te,T.math.remarkPlugin]),te},[a,T==null?void 0:T.math,T==null?void 0:T.cjk]),Q=x.useMemo(()=>{var te;let S=s;if(k&&Object.keys(k).length>0&&s===yh){let ge={...Oa,tagNames:[...(te=Oa.tagNames)!=null?te:[],...Object.keys(k)],attributes:{...Oa.attributes,...k}};S=[lu.raw,[sg,ge],lu.harden]}return T!=null&&T.math&&(S=[...S,T.math.rehypePlugin]),M&&c&&(S=[...S,M.rehypePlugin]),S},[s,T==null?void 0:T.math,M,c,k]),_=x.useMemo(()=>{if(!c||w.length===0)return!1;let te=w.at(-1);return dh(te)||w6(te)},[c,w]),se=x.useMemo(()=>E&&c&&!_?{"--streamdown-caret":`"${K6[E]}"`}:void 0,[E,c,_]);return t==="static"?g.jsx(su.Provider,{value:T??null,children:g.jsx(En.Provider,{value:H,children:g.jsx("div",{className:ye("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",o),children:g.jsx(X1,{components:U,rehypePlugins:Q,remarkPlugins:G,...P,children:z})})})}):g.jsx(su.Provider,{value:T??null,children:g.jsx(En.Provider,{value:H,children:g.jsxs("div",{className:ye("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",E&&!_?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,o),style:se,children:[w.length===0&&E&&c&&g.jsx("span",{}),w.map((te,S)=>{let ge=S===w.length-1,pe=c&&ge&&dh(te);return g.jsx(p,{components:U,content:te,index:S,isIncomplete:pe,rehypePlugins:Q,remarkPlugins:G,shouldNormalizeHtmlIndentation:r,shouldParseIncompleteMarkdown:n,...P},L[S])})]})})})},(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.normalizeHtmlIndentation===t.normalizeHtmlIndentation);Z6.displayName="Streamdown";var J6=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:s=!0,initialZoom:a=1,fullscreen:o=!1})=>{let l=x.useRef(null),u=x.useRef(null),[d,c]=x.useState(a),[h,p]=x.useState({x:0,y:0}),[m,E]=x.useState(!1),[T,b]=x.useState({x:0,y:0}),[y,k]=x.useState({x:0,y:0}),P=x.useCallback(j=>{c(w=>Math.max(n,Math.min(r,w+j)))},[n,r]),D=x.useCallback(()=>{P(i)},[P,i]),v=x.useCallback(()=>{P(-i)},[P,i]),A=x.useCallback(()=>{c(a),p({x:0,y:0})},[a]),N=x.useCallback(j=>{j.preventDefault();let w=j.deltaY>0?-i:i;P(w)},[P,i]),z=x.useCallback(j=>{if(j.button!==0||j.isPrimary===!1)return;E(!0),b({x:j.clientX,y:j.clientY}),k(h);let w=j.currentTarget;w instanceof HTMLElement&&w.setPointerCapture(j.pointerId)},[h]),R=x.useCallback(j=>{if(!m)return;j.preventDefault();let w=j.clientX-T.x,L=j.clientY-T.y;p({x:y.x+w,y:y.y+L})},[m,T,y]),W=x.useCallback(j=>{E(!1);let w=j.currentTarget;w instanceof HTMLElement&&w.releasePointerCapture(j.pointerId)},[]);return x.useEffect(()=>{let j=l.current;if(j)return j.addEventListener("wheel",N,{passive:!1}),()=>{j.removeEventListener("wheel",N)}},[N]),x.useEffect(()=>{let j=u.current;if(j&&m)return document.body.style.userSelect="none",j.addEventListener("pointermove",R,{passive:!1}),j.addEventListener("pointerup",W),j.addEventListener("pointercancel",W),()=>{document.body.style.userSelect="",j.removeEventListener("pointermove",R),j.removeEventListener("pointerup",W),j.removeEventListener("pointercancel",W)}},[m,R,W]),g.jsxs("div",{className:ye("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:l,style:{cursor:m?"grabbing":"grab"},children:[s?g.jsxs("div",{className:ye("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",o?"bottom-4 left-4":"bottom-2 left-2"),children:[g.jsx("button",{className:"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:d>=r,onClick:D,title:"Zoom in",type:"button",children:g.jsx(JL,{size:16})}),g.jsx("button",{className:"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:d<=n,onClick:v,title:"Zoom out",type:"button",children:g.jsx(e6,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:A,title:"Reset zoom and pan",type:"button",children:g.jsx(ZL,{size:16})})]}):null,g.jsx("div",{className:ye("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:z,ref:u,role:"application",style:{transform:`translate(${h.x}px, ${h.y}px) scale(${d})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Z1=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[s,a]=x.useState(null),[o,l]=x.useState(!1),[u,d]=x.useState(""),[c,h]=x.useState(""),[p,m]=x.useState(0),{mermaid:E}=x.useContext(En),T=Ic(),b=E==null?void 0:E.errorComponent,{shouldRender:y,containerRef:k}=OL({immediate:r});if(x.useEffect(()=>{if(y){if(!T){a("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{a(null),l(!0);let D=T.getMermaid(n),v=e.split("").reduce((z,R)=>(z<<5)-z+R.charCodeAt(0)|0,0),A=`mermaid-${Math.abs(v)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await D.render(A,e);d(N),h(N)}catch(D){if(!(c||u)){let v=D instanceof Error?D.message:"Failed to render Mermaid chart";a(v)}}finally{l(!1)}})()}},[e,n,p,y,T]),!(y||u||c))return g.jsx("div",{className:ye("my-4 min-h-[200px]",t),ref:k});if(o&&!u&&!c)return g.jsx("div",{className:ye("my-4 flex justify-center p-4",t),ref:k,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(s&&!u&&!c){let D=()=>m(v=>v+1);return b?g.jsx("div",{ref:k,children:g.jsx(b,{chart:e,error:s,retry:D})}):g.jsxs("div",{className:ye("rounded-md bg-red-50 p-4",t),ref:k,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",s]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let P=u||c;return g.jsx("div",{className:ye("size-full",t),"data-streamdown":"mermaid",ref:k,children:g.jsx(J6,{className:ye(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:ye("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:P},role:"img"})})})};const e4=40,t4=8,ai=56,eo=8,Ns=2,pr=24,No=24,dM=8,n4=()=>{if(!("document"in globalThis))return 0;const e=400,t=document.createElement("div");t.style.width=`${e}px`,t.style.height=`${e}px`,t.style.overflow="scroll",document.body.appendChild(t);const n=e-t.scrollWidth;return t.remove(),n},Rc={root:{startTime:0,endTime:1,duration:1,depth:0,children:[]},spanMap:{},resourceMap:{},filter:"",selected:null,baseScale:1,scaleRatio:1,scale:1,width:640,height:480,timelineWidth:640,timelineHeight:480,panelWidth:380,panelHeight:480,scrollbarWidth:0,timelineRef:{current:null},scrollSnapshotRef:{current:void 0},memoCacheRef:{current:new Map},getQuickLinks:()=>[],withPanel:!1,isMobile:!1},_h=e=>(e.timelineWidth-e.scrollbarWidth)/e.root.duration,Nc=x.createContext({state:Rc,dispatch:()=>{}});Nc.displayName="TraceViewerContext";const ft=(e,t)=>{var n;switch(t.type){case"setRoot":return e.scrollSnapshotRef.current=void 0,e.memoCacheRef.current.clear(),ft({...e,root:t.root,spanMap:t.spanMap,resourceMap:Object.fromEntries(t.resources.map(({name:r,attributes:i})=>[r,i]))},{type:"detectBaseScale"});case"setSize":{const r=t.height-ai-e4-3*t4,i=e.withPanel&&t.width<=768;let s={...e,width:t.width,height:t.height,timelineWidth:t.width-+!!(e.selected&&e.withPanel&&!i)*e.panelWidth,timelineHeight:r,panelHeight:r,isMobile:i};return s.width!==e.width&&(s=ft(s,{type:"detectBaseScale"})),s}case"setPanelWidth":{const r=Math.max(240,Math.min(t.width,e.width-240)),i=e.withPanel&&e.selected&&!e.isMobile?e.width-r:e.width;return ft({...e,timelineWidth:i,panelWidth:r},{type:"detectBaseScale"})}case"setFilter":return{...e,filter:t.filter};case"deselect":return ft({...e,selected:null,timelineWidth:e.width},{type:"detectBaseScale"});case"select":{const r=e.spanMap[t.id];return r?ft({...e,selected:r,timelineWidth:e.width-(e.withPanel&&!e.isMobile?e.panelWidth:0)},{type:"detectBaseScale"}):e}case"escape":return e.selected?ft(e,{type:"deselect"}):ft(e,{type:"resetScale"});case"toggleSelection":{let r=e;return e.selected&&(r=ft(r,{type:"deselect"})),((n=e.selected)==null?void 0:n.span.spanId)===t.id?r:ft(r,{type:"select",id:t.id})}case"detectBaseScale":{const r=(e.timelineWidth-e.scrollbarWidth)/e.root.duration;return ft({...e,baseScale:r,scale:r*e.scaleRatio},{type:"minScale"})}case"setScale":return{...e,scaleRatio:t.scale,scale:e.baseScale*t.scale};case"resetScale":return ft(e,{type:"scaleToRange",t1:e.root.startTime,t2:e.root.endTime});case"scaleToNode":{const r=e.spanMap[t.id];return r?ft(ft(e,{type:"setScale",scale:(e.width-e.scrollbarWidth-(e.withPanel&&!e.isMobile?e.panelWidth:0))/r.duration/e.baseScale}),{type:"setScrollSnapshot",anchorT:r.startTime-e.root.startTime,anchorX:0}):e}case"scaleToRange":{const r=Math.abs(t.t1-t.t2);return ft(ft(e,{type:"setScale",scale:(e.width-e.scrollbarWidth-(e.selected&&e.withPanel?e.panelWidth:0))/r/e.baseScale}),{type:"setScrollSnapshot",anchorT:Math.min(t.t1,t.t2)-e.root.startTime,anchorX:0})}case"adjustScaleRatio":{let{scaleRatio:r}=e;switch(t.direction){case-1:r*=.8;break;case 1:r*=1.25;break;default:r=1;break}const i=e.timelineRef.current;if(!i)return console.warn("timelineRef is null"),e;const{clientWidth:s,scrollLeft:a}=i;return ft(ft({...e,scaleRatio:r,scale:e.baseScale*r},{type:"minScale"}),{type:"setScrollSnapshot",anchorT:(a+s*.5)/e.scale,anchorX:s*.5})}case"trackpadScale":{const r=_h(e)/e.baseScale,i=Math.max(r,e.scaleRatio*(1+.2*Math.sign(t.delta)*Math.sqrt(Math.abs(t.delta))));return ft({...e,scaleRatio:i,scale:e.baseScale*i},{type:"setScrollSnapshot",anchorT:t.anchorT,anchorX:t.anchorX})}case"minScale":{const r=_h(e);return e.scale>=r?e:{...e,scale:r,scaleRatio:r/e.baseScale}}case"setScrollSnapshot":{const r=e.timelineRef.current;if(!r)return e;const{anchorT:i,anchorX:s}=t,a=i*e.scale-s,{scrollTop:o}=r,l=(o-No-eo)/(pr+Ns),u=l+Math.ceil(e.timelineHeight/(pr+Ns));return e.scrollSnapshotRef.current={anchorT:i,anchorX:s,scrollLeft:a,scrollTop:o,startTime:e.root.startTime+a/e.scale,endTime:e.root.startTime+(a+e.timelineWidth)/e.scale,startRow:l,endRow:u,scale:e.scale},e}case"setWithPanel":{if(e.withPanel===t.withPanel)return e;const r=t.withPanel&&e.selected&&!e.isMobile?e.width-e.panelWidth:e.width;return ft({...e,withPanel:t.withPanel,timelineWidth:r},{type:"detectBaseScale"})}case"forceRender":return e.memoCacheRef.current.set("",{}),{...e};case"updateRoot":return e.memoCacheRef.current.set("",{}),ft({...e,root:t.root,spanMap:t.spanMap,resourceMap:Object.fromEntries(t.resources.map(({name:r,attributes:i})=>[r,i]))},{type:"detectBaseScale"})}};function fM({getQuickLinks:e,withPanel:t=!1,children:n,customSpanClassNameFunc:r,customSpanEventClassNameFunc:i,customPanelComponent:s=null}){const a=x.useRef(null),o=x.useRef(void 0),l=x.useRef(e);l.current=e;const u=x.useRef(new Map),d=x.useRef(new Map),[c,h]=x.useReducer(ft,Rc,m=>({...m,scrollbarWidth:n4(),timelineRef:a,scrollSnapshotRef:o,customSpanClassNameFunc:r,customSpanEventClassNameFunc:i,memoCacheRef:u,withPanel:t,getQuickLinks:E=>{var k;const T=E.spanId,b=d.current.get(T);if(b)return b;const y=((k=l.current)==null?void 0:k.call(l,E))||[];return d.current.set(T,y),y}}));x.useEffect(()=>h({type:"setWithPanel",withPanel:t}),[t]);const p=x.useMemo(()=>({state:c,dispatch:h}),[c,h]);return g.jsx(J1.Provider,{value:s,children:g.jsx(Nc.Provider,{value:p,children:n})})}const Oo=()=>x.useContext(Nc),J1=x.createContext(null),r4=()=>x.useContext(J1),i4="_traceNode_1fmf2_1",s4="_childRow_1fmf2_5",a4="_spanNode_1fmf2_11",o4="_huge_1fmf2_31",l4="_spanName_1fmf2_34",u4="_spanSpacer_1fmf2_40",c4="_spanDuration_1fmf2_44",d4="_small_1fmf2_62",f4="_xHover_1fmf2_62",h4="_spanNodeEvent_1fmf2_118",p4="_eventDiamond_1fmf2_124",m4="_customEventColor_1fmf2_140",g4="_hoverInfo_1fmf2_145",b4="_eventName_1fmf2_149",E4="_eventTimestamp_1fmf2_153",T4="_alignStart_1fmf2_174",x4="_alignEnd_1fmf2_178",y4="_colorVercel_1fmf2_205",_4="_color0_1fmf2_213",k4="_color1_1fmf2_220",w4="_color2_1fmf2_227",C4="_color3_1fmf2_234",A4="_color4_1fmf2_241",S4="_colorHighlight_1fmf2_248",I4="_unlit_1fmf2_256",v4="_mapContainer_1fmf2_262",R4="_spanDetailPanel_1fmf2_329",N4="_spanDetailPanelResizer_1fmf2_338",O4="_spanDetailPanelTop_1fmf2_353",L4="_spanDetailPanelBody_1fmf2_362",D4="_spanDetailPanelTopInfo_1fmf2_375",P4="_spanNameDetailPanel_1fmf2_389",M4="_spanDetailPanelTruncatedHeading_1fmf2_395",B4="_spanDetailPanelName_1fmf2_405",F4="_spanDetailPanelDuration_1fmf2_416",H4="_spanDetailPanelCorner_1fmf2_427",U4="_spanDetailPanelCornerInner_1fmf2_437",j4="_spanDetailPanelCloseVerticalRule_1fmf2_445",z4="_spanDetailPanelClose_1fmf2_445",$4="_spanDetailPanelAttribute_1fmf2_467",V4="_spanDetailPanelAttributeKey_1fmf2_484",W4="_spanDetailPanelAttributeValue_1fmf2_492",Y4="_spanDetailPanelQuickLink_1fmf2_503",G4="_spanDetailPanelQuickLinkLabel_1fmf2_506",q4="_detailGroup_1fmf2_519",K4="_expanded_1fmf2_533",X4="_collapsed_1fmf2_534",Q4="_ancestorGroup_1fmf2_535",Z4="_detailHeading_1fmf2_539",J4="_buttonLink_1fmf2_562",eD="_note_1fmf2_581",tD="_skeleton_1fmf2_589",nD="_skeletonRounded_1fmf2_595",rD="_detailHeadingIcon_1fmf2_599",iD="_infraSpanDescription_1fmf2_603",sD="_ancestorNode_1fmf2_613",aD="_ancestorText_1fmf2_629",oD="_ancestorName_1fmf2_639",lD="_ancestorDuration_1fmf2_644",uD="_ancestorLineContainer_1fmf2_649",cD="_ancestorLine_1fmf2_649",dD="_zoomButtonGroup_1fmf2_701",fD="_zoomButton_1fmf2_701",hD="_divider_1fmf2_751",pD="_markersContainer_1fmf2_758",mD="_markers_1fmf2_758",gD="_marker_1fmf2_758",bD="_notch_1fmf2_792",ED="_markerLabel_1fmf2_798",TD="_markerClockTime_1fmf2_807",xD="_eventMarkersContainer_1fmf2_816",yD="_eventMarkers_1fmf2_816",_D="_eventMarker_1fmf2_816",kD="_cursorMarkerStickyParent_1fmf2_839",wD="_cursorMarkerLabelContainer_1fmf2_848",CD="_cursorMarkerLabel_1fmf2_848",AD="_cursorMarkerContainer_1fmf2_898",SD="_cursorMarker_1fmf2_839",ID="_cursorSelection_1fmf2_916",vD="_traceViewer_1fmf2_966",RD="_mapCanvas_1fmf2_972",ND="_zoomButtonTraceViewer_1fmf2_988",OD="_timeline_1fmf2_1011",LD="_searchBar_1fmf2_1019",DD="_searchInput_1fmf2_1031",PD="_searchInputLabel_1fmf2_1038",MD="_searchInputPrefix_1fmf2_1063",BD="_mapThumb_1fmf2_1101",FD="_spanDetailPanelTraceViewer_1fmf2_1115",HD="_traceViewerContent_1fmf2_1134",UD="_inert_1fmf2_1144",jD="_hidden_1fmf2_1180",zD="_mobile_1fmf2_1184",$D="_spanRunning_1fmf2_1194",VD="_spanPending_1fmf2_1195",WD="_spanCompleted_1fmf2_1203",YD="_spanCancelled_1fmf2_1211",GD="_spanFailed_1fmf2_1219",qD="_spanPendingStriped_1fmf2_1228",KD="_hasQueuedTime_1fmf2_1242",XD="_spanSleep_1fmf2_1254",QD="_spanHook_1fmf2_1263",ZD="_segmentLayer_1fmf2_1275",JD="_segment_1fmf2_1275",e5="_segmentLabel_1fmf2_1291",t5="_segmentTag_1fmf2_1306",n5="_segQueued_1fmf2_1314",r5="_segRunning_1fmf2_1325",i5="_segFailed_1fmf2_1330",s5="_segRetrying_1fmf2_1335",a5="_segSucceeded_1fmf2_1346",o5="_segWaiting_1fmf2_1351",l5="_segSleeping_1fmf2_1362",u5="_segReceived_1fmf2_1367",c5="_boundaryMarker_1fmf2_1372",d5="_boundaryLine_1fmf2_1373",f5="_hasSegments_1fmf2_1395",h5="_eventFailed_1fmf2_1432",p5="_eventRetrying_1fmf2_1441",m5="_eventHook_1fmf2_1450",g5="_eventDefault_1fmf2_1459",oe={traceNode:i4,childRow:s4,spanNode:a4,huge:o4,spanName:l4,spanSpacer:u4,spanDuration:c4,small:d4,xHover:f4,spanNodeEvent:h4,eventDiamond:p4,customEventColor:m4,hoverInfo:g4,eventName:b4,eventTimestamp:E4,alignStart:T4,alignEnd:x4,colorVercel:y4,color0:_4,color1:k4,color2:w4,color3:C4,color4:A4,colorHighlight:S4,unlit:I4,mapContainer:v4,spanDetailPanel:R4,spanDetailPanelResizer:N4,spanDetailPanelTop:O4,spanDetailPanelBody:L4,spanDetailPanelTopInfo:D4,spanNameDetailPanel:P4,spanDetailPanelTruncatedHeading:M4,spanDetailPanelName:B4,spanDetailPanelDuration:F4,spanDetailPanelCorner:H4,spanDetailPanelCornerInner:U4,spanDetailPanelCloseVerticalRule:j4,spanDetailPanelClose:z4,spanDetailPanelAttribute:$4,spanDetailPanelAttributeKey:V4,spanDetailPanelAttributeValue:W4,spanDetailPanelQuickLink:Y4,spanDetailPanelQuickLinkLabel:G4,detailGroup:q4,expanded:K4,collapsed:X4,ancestorGroup:Q4,detailHeading:Z4,buttonLink:J4,note:eD,skeleton:tD,skeletonRounded:nD,detailHeadingIcon:rD,infraSpanDescription:iD,ancestorNode:sD,ancestorText:aD,ancestorName:oD,ancestorDuration:lD,ancestorLineContainer:uD,ancestorLine:cD,zoomButtonGroup:dD,"zoom-buttons-fade-in":"_zoom-buttons-fade-in_1fmf2_1",zoomButton:fD,divider:hD,markersContainer:pD,markers:mD,marker:gD,notch:bD,markerLabel:ED,markerClockTime:TD,eventMarkersContainer:xD,eventMarkers:yD,eventMarker:_D,cursorMarkerStickyParent:kD,cursorMarkerLabelContainer:wD,cursorMarkerLabel:CD,cursorMarkerContainer:AD,cursorMarker:SD,cursorSelection:ID,traceViewer:vD,"span-skeleton":"_span-skeleton_1fmf2_1",mapCanvas:RD,zoomButtonTraceViewer:ND,timeline:OD,searchBar:LD,searchInput:DD,searchInputLabel:PD,searchInputPrefix:MD,mapThumb:BD,spanDetailPanelTraceViewer:FD,traceViewerContent:HD,inert:UD,hidden:jD,mobile:zD,spanRunning:$D,spanPending:VD,spanCompleted:WD,spanCancelled:YD,spanFailed:GD,spanPendingStriped:qD,hasQueuedTime:KD,spanSleep:XD,spanHook:QD,segmentLayer:ZD,segment:JD,segmentLabel:e5,segmentTag:t5,segQueued:n5,segRunning:r5,segFailed:i5,segRetrying:s5,segSucceeded:a5,segWaiting:o5,segSleeping:l5,segReceived:u5,boundaryMarker:c5,boundaryLine:d5,hasSegments:f5,eventFailed:h5,eventRetrying:p5,eventHook:m5,eventDefault:g5};function ga([e,t]){return e*1e3+t/1e6}function hM(e){return[Math.floor(e/1e3),e%1e3*1e3]}const pM=e=>on(e,!0),kh=new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2});function mM(e){return e>=1e3?`${kh.format(e/1e3)}s`:`${kh.format(e)}ms`}function gM(e){const t=new Date(e),n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),i=String(t.getSeconds()).padStart(2,"0"),s=String(t.getMilliseconds()).padStart(3,"0");return`${n}:${r}:${i}.${s}`}const b5={queued:"segQueued",running:"segRunning",failed:"segFailed",retrying:"segRetrying",succeeded:"segSucceeded",waiting:"segWaiting",sleeping:"segSleeping",received:"segReceived"};function E5(e){return Math.max(0,Math.min(1,e))}function jn(e,t,n){return n<=0?0:E5((e-t)/n)}function Ks(e){return[...e].sort((t,n)=>t.timestamp-n.timestamp)}function T5(e){const t=e.events?Ks(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const s=t.filter(l=>["step_started","step_retrying","step_failed","step_completed"].includes(l.event.name)).map(l=>({time:l.timestamp,type:l.event.name}));if(s.length===0)return i.push({startFraction:0,endFraction:1,status:"running"}),i;const a=s[0],o=jn(a.time,n,r);o>.001&&i.push({startFraction:0,endFraction:o,status:"queued"});for(let l=0;l<s.length;l++){const u=s[l],d=jn(u.time,n,r),c=s[l+1],h=c?jn(c.time,n,r):1;if(u.type==="step_started")if(l===s.length-1)i.push({startFraction:d,endFraction:1,status:"succeeded"});else{const m=c.type,E=m==="step_retrying"||m==="step_failed"?"failed":m==="step_completed"?"succeeded":"running";i.push({startFraction:d,endFraction:h,status:E})}else u.type==="step_retrying"?i.push({startFraction:d,endFraction:h,status:"retrying"}):u.type==="step_failed"?d<.999&&i.push({startFraction:d,endFraction:1,status:"failed"}):u.type}return i}function x5(e){const t=e.events?Ks(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const s=t.find(u=>u.event.name==="hook_received"),a=t.find(u=>u.event.name==="hook_disposed");if(!s&&!a)return i.push({startFraction:0,endFraction:1,status:"waiting"}),i;const o=s?jn(s.timestamp,n,r):null,l=a?jn(a.timestamp,n,r):null;if(o!==null&&o>.001?i.push({startFraction:0,endFraction:o,status:"waiting"}):o===null&&l!==null&&i.push({startFraction:0,endFraction:l,status:"waiting"}),o!==null){const u=l??1;i.push({startFraction:o,endFraction:u,status:"received"})}return l!==null&&l<.999&&i.push({startFraction:l,endFraction:1,status:"succeeded"}),i}function y5(e){const t=e.events?Ks(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const s=t.find(o=>o.event.name==="wait_completed");if(!s)return i.push({startFraction:0,endFraction:1,status:"sleeping"}),i;const a=jn(s.timestamp,n,r);return a>.001&&i.push({startFraction:0,endFraction:a,status:"sleeping"}),i.push({startFraction:a,endFraction:1,status:"succeeded"}),i}function _5(e){const t=e.events?Ks(e.events):[],{startTime:n,duration:r,activeStartTime:i}=e,s=[];if(r<=0)return s;const a=t.find(u=>u.event.name==="run_failed"),o=t.find(u=>u.event.name==="run_completed");let l=0;if(i&&i>n){const u=jn(i,n,r);u>.001&&(s.push({startFraction:0,endFraction:u,status:"queued"}),l=u)}if(a){const u=jn(a.timestamp,n,r);u>l+.001&&s.push({startFraction:l,endFraction:u,status:"running"}),s.push({startFraction:u,endFraction:1,status:"failed"})}else if(o){const u=jn(o.timestamp,n,r);u>l+.001&&s.push({startFraction:l,endFraction:u,status:"running"}),s.push({startFraction:u,endFraction:1,status:"succeeded"})}else s.push({startFraction:l,endFraction:1,status:"running"});return s}const k5={step_started:"Started",step_retrying:"Retrying",step_failed:"Failed",hook_created:"Created",hook_received:"Received",hook_disposed:"Resolved",wait_created:"Sleep started",wait_completed:"Sleep completed",run_completed:"Completed",run_failed:"Run failed",step_completed:"Completed"};function ba(e,t){const n=e.events?Ks(e.events):[],{startTime:r,duration:i}=e;if(i<=0)return[];const s=[];for(const a of n){if(!t.includes(a.event.name))continue;const o=jn(a.timestamp,r,i);o<.01||o>.99||s.push({fraction:o,label:k5[a.event.name]??a.event.name,offsetMs:a.timestamp-r})}return s}function eb(e,t){switch(e){case"step":return{segments:T5(t),boundaries:ba(t,["step_started","step_retrying","step_failed","step_completed"])};case"hook":return{segments:x5(t),boundaries:ba(t,["hook_created","hook_received","hook_disposed"])};case"sleep":return{segments:y5(t),boundaries:ba(t,["wait_created","wait_completed"])};case"run":return{segments:_5(t),boundaries:ba(t,["run_completed","run_failed"])};default:return{segments:[],boundaries:[]}}}function w5(e){return e.isInstrumentationHint?"Get Started":on(e.duration)}const tb={queued:"Queued",running:"",failed:"Failed",retrying:"Retry wait",succeeded:"Executed",waiting:"Waiting",sleeping:"Sleeping",received:"Received"};function C5({segments:e,spanDuration:t}){return e.length===0?null:g.jsx("div",{className:oe.segmentLayer,children:e.map((n,r)=>{const i=oe[b5[n.status]],s=(n.endFraction-n.startFraction)*t,a=tb[n.status],o={left:`${n.startFraction*100}%`,width:`${(n.endFraction-n.startFraction)*100}%`};return g.jsx("div",{className:`${oe.segment} ${String(i)}`,style:o,title:a?`${a} ${on(s)}`:on(s)},`seg-${n.status}-${String(r)}`)})})}function A5(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r],s=tb[i.status];if(!s)continue;let a=(i.endFraction-i.startFraction)*t;if(a<1&&(i.status==="succeeded"||i.status==="failed")&&r>0){const o=e[r-1];o.status==="running"&&(a=(o.endFraction-o.startFraction)*t)}a<1||n.push({label:s,duration:on(a)})}return n}function nb({node:e,layout:t,durationMs:n,segmentTags:r}){const i=e.isInstrumentationHint?w5(e):on(n??e.duration);if(t.isSmall&&!t.isHovered)return null;const s=r&&r.length>0&&(t.isHovered||t.width>200);return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:oe.spanName,children:[e.label||e.span.name,s?r.map((a,o)=>g.jsxs("span",{className:oe.segmentTag,children:[" · ",a.label," ",a.duration]},o)):null]}),t.isHuge?g.jsx("span",{className:oe.spanSpacer}):null,t.isHovered||t.width>128?g.jsx("span",{className:oe.spanDuration,children:i}):null]})}function S5({node:e,layout:t}){return g.jsx(nb,{node:e,layout:t})}function Lo({resourceType:e,node:t,layout:n,durationMs:r}){const i=r??t.duration,{segments:s}=eb(e,t),a=A5(s,i);return g.jsxs(g.Fragment,{children:[g.jsx(C5,{segments:s,spanDuration:i}),g.jsx(nb,{durationMs:i,node:t,layout:n,segmentTags:a})]})}function I5(e){return g.jsx(Lo,{resourceType:"run",...e})}function v5(e){return g.jsx(Lo,{resourceType:"step",...e})}function R5(e){return g.jsx(Lo,{resourceType:"hook",...e})}function N5(e){return g.jsx(Lo,{resourceType:"sleep",...e})}function O5({resourceType:e,...t}){switch(e){case"run":return g.jsx(I5,{...t});case"step":return g.jsx(v5,{...t});case"hook":return g.jsx(R5,{...t});case"sleep":return g.jsx(N5,{...t});default:return g.jsx(S5,{...t})}}const L5=4;function D5(e){var n;const t=(n=e.span.attributes)==null?void 0:n.resource;return t==="run"||t==="step"||t==="hook"||t==="sleep"?t:"default"}function P5(e){return e<64}function M5(e){return e>=500}function B5(e,t){return e.isHovered&&!t&&e.isHighlighted!==!1}function F5(e,t,n,r){if(!r)return!1;let i=t.duration,s=t.endTime;const a=n.current;return a&&(i=a.endTime-a.startTime,s=a.endTime),s-e.startTime<.25*i}function Xs(e,t,n,r){const i=(e.startTime-t.startTime)*n;let s=No+(pr+Ns)*e.row;const a=e.duration*n,o=Math.max(a,L5);let l=pr;const u=M5(a),d=P5(a),c=B5(e,u),h=c||!!e.isSelected;d&&!h&&(l*=.4,s+=(pr-l)*.5);const p=F5(e,t,r,h);return{width:o,actualWidth:a,height:l,top:s,left:i,isSmall:d,isHuge:u,isHovered:c,isExpanded:h,isNearRightSide:p}}function H5(e,t,n,r){return Xs(e,t,n,r)}function U5(e,t,n,r){return Xs(e,t,n,r)}function j5(e,t,n,r){return Xs(e,t,n,r)}function z5(e,t,n,r){return Xs(e,t,n,r)}function $5(e,t,n,r,i){switch(e){case"run":return H5(t,n,r,i);case"step":return U5(t,n,r,i);case"hook":return j5(t,n,r,i);case"sleep":return z5(t,n,r,i);default:return Xs(t,n,r,i)}}const Oc=e=>e.isVercel?String(oe.colorVercel):String(oe[`color${e.resourceIndex%5}`]);function V5(e,t){const n=t.events;if(n!=null&&n.length)switch(e){case"hook":for(let r=n.length;r--;)if(n[r].event.name==="hook_disposed")return n[r].timestamp;return;case"sleep":for(let r=n.length;r--;)if(n[r].event.name==="wait_completed")return n[r].timestamp;return;case"run":for(let r=n.length;r--;){const i=n[r].event.name;if(i==="run_completed"||i==="run_failed"||i==="run_cancelled")return n[r].timestamp}return;case"step":for(let r=n.length;r--;){const i=n[r].event.name;if(i==="step_completed"||i==="step_failed")return n[r].timestamp;if(i==="step_started"||i==="step_retrying")return}return;default:return}}const bM=x.memo(function({root:t,scale:n,spans:r,isLive:i=!1,scrollSnapshotRef:s,cache:a,customSpanClassNameFunc:o,customSpanEventClassNameFunc:l}){return r.map(u=>g.jsx(Y5,{cacheKey:a.get(u.span.spanId),customSpanEventClassNameFunc:l,customSpanClassNameFunc:o,node:u,root:t,scale:n,traceIsLive:i,scrollSnapshotRef:s},u.span.spanId))});function W5(e,t,n,r){const i=e.isExpanded;return{"--span-width":`${Math.max(e.actualWidth,1)}px`,minWidth:i?e.width:void 0,width:i?void 0:e.width,height:e.height,maxWidth:i&&!e.isNearRightSide?(n.endTime-t.startTime)*r:void 0,containIntrinsicWidth:i?void 0:e.width,containIntrinsicHeight:e.height,left:e.isNearRightSide?void 0:e.left,right:e.isNearRightSide?(n.endTime-t.endTime)*r:void 0,top:e.top}}const Y5=x.memo(function({node:t,root:n,scale:r,traceIsLive:i=!1,scrollSnapshotRef:s,customSpanClassNameFunc:a,customSpanEventClassNameFunc:o}){var H;const l=x.useRef(null);x.useEffect(()=>(t.ref=l,()=>{t.ref=void 0}),[t]);const{span:u}=t,d=D5(t),[c,h]=x.useState(0),p=a?a(t):"",m=d!=="default",E=(H=u.attributes)==null?void 0:H.data,T=V5(d,t),b=T!=null,k=(d==="hook"?!!(E!=null&&E.disposedAt):!!(E!=null&&E.completedAt))||b,P=i&&m&&!k;x.useEffect(()=>{if(!P)return;h(Date.now());const U=setInterval(()=>{h(Date.now())},250);return()=>clearInterval(U)},[P]);const D=ga(u.startTime),v=ga(u.endTime),A=ga(u.duration),N=u.activeStartTime?ga(u.activeStartTime):void 0,z=T!=null?Math.max(0,T-D):P?Math.max(0,(c||Date.now())-D):A,R=t.isInstrumentationHint?"Get Started":on(z),W={...t,startTime:D,endTime:v,duration:A,activeStartTime:N},j=P?{...W,duration:z,endTime:D+z}:W,w=m&&eb(d,j).segments.length>0,L=$5(d,j,n,r,s);if(P){const G=z*r,Q=Math.max(G,4);L.actualWidth=G,L.width=Q,L.isSmall=G<64,L.isHuge=G>=500,L.isSmall||(L.height=pr,L.top=No+(pr+Ns)*j.row)}x.useEffect(()=>{if(!P||!l.current)return;let U=0;const G=()=>{const Q=l.current;if(!Q)return;const _=Date.now()-D,se=Math.max(_*r,2);Q.style.width=`${se}px`,Q.style.setProperty("--span-width",`${se}px`),U=requestAnimationFrame(G)};return U=requestAnimationFrame(G),()=>cancelAnimationFrame(U)},[P,D,r]);const M=j;return g.jsxs(g.Fragment,{children:[g.jsx("button",{"aria-label":`${u.name} - ${R}`,className:Pt(oe.spanNode,L.isHuge&&oe.huge,L.isSmall&&oe.small,L.isExpanded&&oe.xHover,t.isHighlighted?oe.colorHighlight:Oc(t),t.isHighlighted===!1&&oe.unlit,p,w&&oe.hasSegments),"data-span-id":u.spanId,"data-start-time":j.startTime-n.startTime,"data-right-side":L.isNearRightSide,"data-selected":t.isSelected?"":void 0,ref:l,style:W5(L,j,n,r),type:"button",children:g.jsx(O5,{durationMs:z,resourceType:d,node:M,layout:L})}),j.events&&!L.isSmall?j.events.map(U=>g.jsx(q5,{customSpanEventClassNameFunc:o,event:U,node:j,root:n,scale:r,asBoundary:m},U.key)):null]})}),G5={step_started:"Started",step_retrying:"Retrying",step_failed:"Failed",hook_created:"Created",hook_received:"Received",hook_disposed:"Resolved",wait_created:"Sleep started",wait_completed:"Sleep completed",run_started:"Started",run_completed:"Completed",run_failed:"Run failed",step_completed:"Completed"},q5=x.memo(function({event:t,node:n,root:r,scale:i,customSpanEventClassNameFunc:s,asBoundary:a=!1}){const o=x.useRef(null);x.useEffect(()=>(t.ref=o,()=>{t.ref=void 0}),[t]);const{event:{name:l}}=t,u=on(t.timestamp-r.startTime),d=a?G5[l]??l:l,c=a&&(l==="step_started"||l==="run_started"||l==="step_retrying"),h=a&&(l==="step_completed"||l==="run_completed");let p=null,m=null;if((c||h)&&n.events){const k=[...n.events].sort((D,v)=>D.timestamp-v.timestamp),P=k.findIndex(D=>D.key===t.key);if(h){let D=null;for(let v=P-1;v>=0;v--)if(k[v].event.name==="step_started"){D=k[v].timestamp;break}D!==null&&(p=on(t.timestamp-D),m="Executed")}else{const D=k[P+1],v=D?D.timestamp:n.endTime;p=on(v-t.timestamp),m=l==="step_retrying"?"Waited":"Executed"}}const E=(t.timestamp-r.startTime)*i,T=No+(pr+Ns)*n.row,b=n.duration<=0||(t.timestamp-n.startTime)/n.duration<.5,y=s?s(t):"";return g.jsxs("div",{title:p?`${d} ${u}
172
- ${m} ${p}`:`${d} ${u}`,className:Pt(oe.spanNodeEvent,y,a&&oe.boundaryMarker,n.isHighlighted?oe.colorHighlight:Oc(n),n.isHighlighted===!1&&oe.unlit),"data-hovered":t.isHovered,ref:o,style:{left:E,top:T},children:[g.jsx("div",{className:Pt(oe.hoverInfo,b?oe.alignStart:oe.alignEnd),children:a?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:oe.eventName,children:d}),g.jsx("span",{className:oe.eventTimestamp,children:u}),p?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:oe.eventName,children:m}),g.jsx("span",{className:oe.eventTimestamp,children:p})]}):null]}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:oe.eventName,children:l}),g.jsx("span",{className:oe.eventTimestamp,children:u})]})}),a?g.jsx("div",{className:oe.boundaryLine}):g.jsx("div",{className:oe.eventDiamond})]})}),rb={"gray-700":"var(--ds-gray-700)","gray-900":"var(--ds-gray-900)"};function K5({size:e=16,color:t="gray-700"}){const n={color:rb[t]||t};return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:n,"aria-hidden":!0,children:[g.jsx("title",{children:"Cross"}),g.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function X5({size:e=16}){return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,className:oe.detailHeadingIcon,children:[g.jsx("title",{children:"Chevron Down"}),g.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Q5({size:e=16,color:t="gray-900"}){const n={color:rb[t]||t};return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:n,"aria-hidden":!0,children:[g.jsx("title",{children:"External Small"}),g.jsx("path",{d:"M14 4h6m0 0v6m0-6L10 14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M20 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function Z5(e){const{as:t,className:n,href:r,children:i,...s}=e;return(t||"a")==="span"||!r?g.jsx("span",{className:n,...s,children:i}):g.jsx("a",{className:n,href:r,...s,children:i})}function J5(e){const{className:t,children:n,size:r,...i}=e;return g.jsx("a",{...i,className:Pt(oe.buttonLink,t),children:n})}function eP({children:e,className:t}){return g.jsx("div",{className:Pt(oe.note,t),children:e})}function wh({width:e,height:t,rounded:n}){return g.jsx("span",{className:Pt(oe.skeleton,n&&oe.skeletonRounded),style:{width:e,height:t},"aria-hidden":!0})}const Ch=e=>`${(100*e).toFixed(3)}%`,Ah=(e,t)=>e<t?-1:e>t?1:0,Sh=e=>{const t={};for(const[r,i]of Object.entries(e)){const s=r.indexOf(".");let a="",o="";s!==-1?(a=r.substring(0,s),o=r.substring(s+1)):o=r;let l=t[a];l||(l={prefix:a,attributes:[]},t[a]=l),l.attributes.push({key:r,suffix:o,value:String(i)})}const n=Array.from(Object.values(t)).sort((r,i)=>Ah(r.prefix,i.prefix));for(const r of n)r.attributes.sort((i,s)=>Ah(i.suffix,s.suffix));return n},tP=(e,t)=>{const n=[];if(!t)return n;for(let r=t;"parent"in r;r=r.parent)n.unshift(r);return n},nP=()=>{var d;const{state:{root:e,selected:t,resourceMap:n,getQuickLinks:r},dispatch:i}=Oo(),s=x.useMemo(()=>tP(e,t),[e,t]),a=x.useMemo(()=>Sh((t==null?void 0:t.span.attributes)??{}),[t]),o=x.useMemo(()=>{const c=t==null?void 0:t.span.resource;if(!c)return[];const h=n[c];return h?Sh(h):[]},[n,t]);if(!t)return null;const{span:l}=t,u=ib(t);return g.jsxs(g.Fragment,{children:[t.isVercel?g.jsx(aP,{node:t}):null,t.isInstrumentationHint?g.jsx(cP,{}):null,!t.isInstrumentationHint&&s.length?g.jsx(fr,{className:oe.ancestorGroup,name:"Location",children:s.map(c=>g.jsxs("button",{className:oe.ancestorNode,onClick:()=>i({type:"select",id:c.span.spanId}),type:"button",children:[g.jsxs("div",{className:oe.ancestorText,children:[g.jsx("span",{className:oe.ancestorName,children:c.label||c.span.name}),g.jsx("span",{className:oe.ancestorDuration,children:on(c.duration)})]}),g.jsx("span",{"aria-hidden":!0,className:oe.ancestorLineContainer,children:g.jsx("span",{className:Pt(oe.ancestorLine,Oc(c)),style:{left:Ch((c.startTime-e.startTime)/e.duration),width:Ch(c.duration/e.duration)}})})]},`${t.span.spanId}.${c.span.spanId}`))}):null,u?g.jsx(oP,{getQuickLinks:r,span:t.span}):null,(d=t.events)!=null&&d.length?g.jsx(fr,{name:"Events",children:t.events.map(c=>g.jsxs(x.Fragment,{children:[g.jsxs("dl",{className:oe.spanDetailPanelAttribute,children:[g.jsx("dt",{className:oe.spanDetailPanelAttributeKey,children:c.event.name}),g.jsx("dd",{className:oe.spanDetailPanelAttributeValue,children:on(c.timestamp-e.startTime)})]}),Object.entries(c.event.attributes).map(([h,p])=>g.jsx(ji,{name:`${c.event.name}.${h}`,value:p},h))]},c.key))}):null,a.length?g.jsx(fr,{name:"Attributes",children:a.map(c=>g.jsx(x.Fragment,{children:c.attributes.map(({key:h,value:p})=>g.jsx(ji,{name:h,value:p},h))},c.prefix))}):null,o.length?g.jsx(fr,{name:"Resource",children:o.map(c=>g.jsx(x.Fragment,{children:c.attributes.map(({key:h,value:p})=>g.jsx(ji,{name:h,value:p},h))},c.prefix))}):null,t.isInstrumentationHint?null:g.jsxs(fr,{name:"Library",children:[g.jsx(ji,{name:"name",value:l.library.name}),l.library.version?g.jsx(ji,{name:"version",value:l.library.version}):null]})]})};function EM({attached:e=!1}){const{state:{selected:t,isMobile:n},dispatch:r}=Oo(),i=r4();if(!t)return null;const{span:s}=t;return g.jsxs("div",{className:Pt(oe.spanDetailPanel,n&&oe.mobile),children:[e&&!n?g.jsx(dP,{}):null,g.jsx("div",{className:oe.spanDetailPanelTop,children:g.jsxs("div",{className:oe.spanDetailPanelTopInfo,children:[g.jsx("span",{className:oe.spanDetailPanelName,title:s.name,children:s.name}),g.jsxs("div",{className:oe.spanDetailPanelCorner,children:[t.isInstrumentationHint?null:g.jsx("span",{className:oe.spanDetailPanelDuration,children:on(t.duration)}),g.jsx("div",{className:oe.spanDetailPanelCloseVerticalRule}),g.jsx("button",{"aria-label":"Close Span Details",className:oe.spanDetailPanelClose,onClick:()=>r({type:"deselect"}),type:"button",children:g.jsx(K5,{color:"gray-700",size:20})})]})]})}),g.jsx("div",{className:Pt("flex gap-3",oe.spanDetailPanelBody),children:i||g.jsx(nP,{})})]})}const Ih="vc-trace-span-exp:";function fr({name:e,className:t="",children:n}){const[r,i]=x.useState(()=>"localStorage"in globalThis?localStorage.getItem(`${Ih}${e}`)!=="0":!0),s=x.useCallback(()=>{i(a=>{const o=!a;return localStorage.setItem(`${Ih}${e}`,String(Number(o))),o})},[e]);return g.jsxs("div",{className:Pt(oe.detailGroup,r?oe.expanded:oe.collapsed,t),children:[g.jsxs("button",{className:oe.detailHeading,onClick:s,type:"button",children:[g.jsx("span",{children:e}),g.jsx(X5,{})]}),r?n:null]})}const rP=new Set(["OPTIONS","HEAD","GET","PUT","POST","DELETE"]),iP={"Resolve Deployment":"How long it took Vercel's routing layer to retrieve details for the deployment.","Resolve Cache":"How long it took Vercel's routing layer to check for a cached function invocation.","Resolve Route":"How long it took Vercel's routing layer to resolve routing rules, including redirects and rewrites.","Invoke Middleware":"How long it took this middleware to start and run user code.","Invoke Function":"How long it took this Vercel Function to start and run user code.",waitUntil:"How long it took to run user code inside of waitUntil.","Start VM":"How long it took to start the Virtual Machine which contains the Vercel Function.","Spawn Node.js":"How long it took the Virtual Machine to start the Node.js runtime.","Spawn Python":"How long it took the Virtual Machine to start the Python runtime.","Init User Code":"How long it took to import the user code and run any globally-scoped code."},vh=new Set(["Start VM","Spawn Node.js","Spawn Python","Init User Code"]),Rh=e=>{if(!e||!("span"in e))return null;const t=e.span.attributes,n=t["vercel.region"]||t["vercel.function.region"];return n?String(n):null},sP=e=>{const{name:t}=e.span,n=Rh(e),r=Rh(e.parent);return e.span.attributes["vercel.middleware.internal"]==="true"?"The Vercel Toolbar created this middleware.":vh.has(t)||t==="Invoke Function"&&e.children.some(i=>vh.has(i.span.name))?"This function encountered a cold start.":n&&r&&n!==r?"This request was routed across regions.":null},ib=e=>{if(!e.isVercel)return!1;const{name:t}=e.span,n=t.indexOf(" ");if(n===-1)return!1;const r=t.substring(0,n);return rP.has(r)};function aP({node:e}){const{name:t}=e.span;let n=iP[t];if(!n&&ib(e)&&(n="How long it took for Vercel to process the request and send the response."),!n)return null;const r=sP(e);return g.jsx(fr,{name:"What is this?",children:g.jsxs("div",{className:oe.infraSpanDescription,children:[g.jsx("span",{children:n}),r&&g.jsx(eP,{children:r})]})})}const oP=x.memo(function({getQuickLinks:t,span:n}){const r=t(n);return r.length?g.jsx(fr,{name:"Links",children:r.map(({key:i,value:s})=>g.jsx(uP,{link:s,name:i},i))}):null});function lP(e){const[t,n]=x.useState({}),r=e.__resolvedValue!==void 0||e.__rejectedValue!==void 0;return x.useEffect(()=>{r||e.then(i=>{e.__resolvedValue=i}).catch(i=>{e.__rejectedValue=i}).finally(()=>n({}))},[e,r]),e.__resolvedValue}function uP({name:e,link:t}){const n=lP(t);return g.jsxs(Z5,{as:n?void 0:"span",className:Pt(oe.spanDetailPanelAttribute,oe.spanDetailPanelQuickLink),href:(n==null?void 0:n.href)||"",children:[g.jsx("span",{className:oe.spanDetailPanelAttributeKey,children:e}),g.jsx("span",{className:Pt(oe.spanDetailPanelAttributeValue,oe.spanDetailPanelQuickLinkLabel),children:n?g.jsxs(g.Fragment,{children:[n.label,n.icon||g.jsx(Q5,{color:"gray-900"})]}):g.jsxs(g.Fragment,{children:[g.jsx(wh,{height:18,width:32+e.length*8}),g.jsx(wh,{height:18,rounded:!0,width:18})]})})]})}function cP(){return g.jsx(fr,{name:"What is this?",children:g.jsxs("div",{className:oe.infraSpanDescription,children:[g.jsx("span",{children:"You can visualize your application's spans alongside Vercel's spans in this viewer."}),g.jsx(J5,{href:"https://vercel.com/docs/session-tracing#adding-custom-spans",size:"small",target:"_blank",children:"Get Started"})]})})}function ji({name:e,value:t}){return g.jsxs("dl",{className:oe.spanDetailPanelAttribute,children:[g.jsx("dt",{className:oe.spanDetailPanelAttributeKey,children:e}),g.jsx("dd",{className:oe.spanDetailPanelAttributeValue,title:String(t),children:String(t)})]})}function dP(){const{state:{panelWidth:e},dispatch:t}=Oo(),n=x.useRef({start:{x:0,width:e},x:0,width:e,isHeld:!1});n.current.width=e;const r=x.useCallback(s=>{if(s.pointerType!=="mouse")return;s.preventDefault();const a=n.current;a.start.x=s.clientX,a.x=s.clientX,a.start.width=a.width,a.isHeld=!0},[]),i=x.useCallback(()=>{t({type:"setPanelWidth",width:Rc.panelWidth})},[t]);return x.useEffect(()=>{let s=0;const a=()=>{const u=n.current,d=u.start.width+u.start.x-u.x;t({type:"setPanelWidth",width:d})},o=u=>{n.current.isHeld&&(u.preventDefault(),n.current.x=u.clientX,cancelAnimationFrame(s),s=requestAnimationFrame(a))},l=()=>{n.current.isHeld=!1};return window.addEventListener("pointermove",o),window.addEventListener("pointerup",l),()=>{window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",l)}},[t]),g.jsx("div",{"aria-hidden":!0,className:oe.spanDetailPanelResizer,onDoubleClick:i,onPointerDown:r})}function fP(e){const t=x.useRef({});return{setStyle:x.useCallback((r,i)=>{if(t.current[r]=i,!!e.current){if(!i){e.current.style.removeProperty(r);return}e.current.style.setProperty(r,i)}},[e]),styleRef:t,style:{...t.current}}}const hP=()=>"devicePixelRatio"in globalThis&&globalThis.devicePixelRatio||1,pP=()=>{const[e,t]=x.useState(1);return x.useLayoutEffect(()=>{const n=()=>t(hP()),r=matchMedia(`(resolution: ${e}dppx)`);return r.addEventListener("change",n),n(),()=>{r.removeEventListener("change",n)}},[e]),e},zi=eo,TM=x.memo(function({timelineRef:t,rows:n,scale:r}){const{state:{root:i,baseScale:s,timelineWidth:a,width:o,scrollbarWidth:l}}=Oo(),u=o+eo*2,d=pP(),c=x.useRef(null),h=x.useRef(null),p=o/(o-l)*Math.min(o/a,s/r),m=Math.min(o,(a-l)*p);x.useEffect(()=>{let y=!1,k=0,P;const D=w=>{var L;return!!((L=c.current)!=null&&L.contains(w))};let v=0;const A=()=>{if(!y||!P)return;const w=t.current;if(!w)return;const L=k-m*.5-P.left;w.scrollLeft=L/p},N=w=>{({clientX:k}=w),cancelAnimationFrame(v),v=requestAnimationFrame(A)},z=w=>{var L;D(w.target)&&(y=!0,P=(L=c.current)==null?void 0:L.getBoundingClientRect(),N(w))},R=()=>{y=!1,P=void 0},W=w=>{D(w.target)&&w.cancelable&&w.preventDefault()},j=w=>{y&&w.cancelable&&w.preventDefault()};return window.addEventListener("pointerdown",z),window.addEventListener("pointermove",N),window.addEventListener("pointerup",R),window.addEventListener("blur",R),window.addEventListener("touchstart",W,{passive:!1}),window.addEventListener("touchmove",j,{passive:!1}),()=>{window.removeEventListener("pointerdown",z),window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",R),window.removeEventListener("blur",R),window.removeEventListener("touchstart",W),window.removeEventListener("touchmove",j),cancelAnimationFrame(v)}},[t,p,m]),x.useEffect(()=>{const y=h.current,k=y==null?void 0:y.getContext("2d");if(!y||!k)return;const D=requestAnimationFrame(()=>{k.resetTransform(),k.clearRect(0,0,y.width,y.height),k.scale(d,d);const v=1,A=3,N=(u-zi*2)/i.duration;k.fillStyle="#ccc",k.beginPath();for(const z of n)for(const R of z){const W=zi-v+(v+A)*R.row;if(W>=ai-A-zi)break;const j=zi+(R.startTime-i.startTime)*N,w=R.duration*N;k.roundRect(j,W,w,A,A)}k.fill()});return()=>cancelAnimationFrame(D)},[d,i,u,n]);const E=x.useRef(null),{style:T,setStyle:b}=fP(E);return x.useLayoutEffect(()=>{const y=t.current;if(!y)return;let k=0;const P=()=>{b("transform",`translateX(${zi+y.scrollLeft*p}px)`)};P();const D=()=>{cancelAnimationFrame(k),k=requestAnimationFrame(P)};return y.addEventListener("scroll",D),()=>{cancelAnimationFrame(k),y.removeEventListener("scroll",D)}},[t,p,b]),g.jsxs("div",{className:oe.mapContainer,ref:c,style:{width:m>0?u:"100%",height:ai},children:[g.jsx("canvas",{className:oe.mapCanvas,height:ai*d,ref:h,style:{width:u,height:ai},width:u*d}),g.jsx("div",{className:oe.mapThumb,ref:E,style:{transform:T.transform,width:m>0?m:`calc(100% - ${eo*2}px)`,top:2,height:ai-4}})]})});function mP(e){try{const t=JSON.parse(e);return typeof t=="string"?t:JSON.stringify(t,null,2)}catch{return e}}function gP(e){try{return JSON.parse(e)}catch{return e}}const bP=F.memo(function({chunk:t,index:n}){const r=gP(t.text);return g.jsxs("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)"},children:[g.jsxs("span",{className:"select-none mr-2",style:{color:"var(--ds-gray-500)"},children:["[",n,"]"]}),typeof r=="string"?g.jsx("span",{className:"whitespace-pre-wrap break-words",style:{color:"var(--ds-gray-1000)"},children:mP(r)}):g.jsx(u_,{data:r,expandLevel:1})]})});function EP(){return g.jsxs("div",{className:"flex flex-col gap-3 animate-in fade-in",children:[g.jsx(Pd,{style:{width:120,height:16,borderRadius:4}}),[1,2,3,4].map(e=>g.jsx(Pd,{style:{height:56,borderRadius:6}},e))]})}function xM({streamId:e,chunks:t,isLive:n,error:r,isLoading:i,onScrollEnd:s}){const a=x.useRef(null),o=x.useRef(0);return x.useEffect(()=>{var l;t.length>o.current&&t.length>0&&((l=a.current)==null||l.scrollToIndex({index:t.length-1,align:"end"})),o.current=t.length},[t.length]),i&&t.length===0?g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(EP,{})}):g.jsxs("div",{className:"flex flex-col h-full",children:[n&&g.jsxs("div",{className:"flex items-center gap-1.5 mb-2 px-1",children:[g.jsx("span",{className:"inline-block w-2 h-2 rounded-full",style:{backgroundColor:"var(--ds-green-600)"}}),g.jsx("span",{className:"text-xs",style:{color:"var(--ds-green-700)"},children:"Live"})]}),t.length>0&&g.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[g.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--ds-gray-900)"},children:"Stream Chunks"}),g.jsxs("span",{className:"text-xs tabular-nums",style:{color:"var(--ds-gray-600)"},children:["(",t.length,")"]})]}),g.jsx("div",{className:"flex-1 min-h-0",children:r?g.jsxs("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-red-300)",backgroundColor:"var(--ds-red-100)",color:"var(--ds-red-700)"},children:[g.jsx("div",{children:"Error reading stream:"}),g.jsx("div",{children:r})]}):t.length===0?g.jsx("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-600)"},children:n?"Waiting for stream data...":"Stream is empty"}):g.jsx(Vy,{ref:a,totalCount:t.length,overscan:10,endReached:()=>s==null?void 0:s(),itemContent:l=>g.jsx("div",{style:{paddingBottom:8},children:g.jsx(bP,{chunk:t[l],index:l})}),style:{flex:1,minHeight:0}})})]})}const yM=10;function sb(...e){return Ru(Pt(e))}const _M=5e3;function kM(e,t,n){return n?`Page ${e} of ${t}+`:`Page ${e} of ${t}`}const wM=MT,CM=BT,TP=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(Np,{ref:r,sideOffset:t,className:sb("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));TP.displayName=Np.displayName;const ab=x.createContext(null);function AM({children:e,serverConfig:t}){const n={serverConfig:t};return g.jsx(ab.Provider,{value:n,children:e})}function SM(){const e=x.useContext(ab);if(!e)throw new Error("useServerConfig must be used within a ServerConfigProvider");return e}function Nh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ob(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Nh(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Nh(e[i],null)}}}}function IM(...e){return x.useCallback(ob(...e),e)}var lb=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),s=i.find(yP);if(s){const a=s.props.children,o=i.map(l=>l===s?x.Children.count(a)>1?x.Children.only(null):x.isValidElement(a)?a.props.children:null:l);return g.jsx(uu,{...r,ref:t,children:x.isValidElement(a)?x.cloneElement(a,void 0,o):null})}return g.jsx(uu,{...r,ref:t,children:n})});lb.displayName="Slot";var uu=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=kP(n);return x.cloneElement(n,{..._P(r,n.props),ref:t?ob(t,i):i})}return x.Children.count(n)>1?x.Children.only(null):null});uu.displayName="SlotClone";var xP=({children:e})=>g.jsx(g.Fragment,{children:e});function yP(e){return x.isValidElement(e)&&e.type===xP}function _P(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{s(...o),i(...o)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function kP(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Oh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Lh=Pt,wP=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Lh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],c=s==null?void 0:s[u];if(d===null)return null;const h=Oh(d)||Oh(c);return i[u][h]}),o=n&&Object.entries(n).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:h,...p}=d;return Object.entries(p).every(m=>{let[E,T]=m;return Array.isArray(T)?T.includes({...s,...o}[E]):{...s,...o}[E]===T})?[...u,c,h]:u},[]);return Lh(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},CP=wP("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),AP=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const a=r?lb:"button";return g.jsx(a,{className:sb(CP({variant:t,size:n,className:e})),ref:s,...i})});AP.displayName="Button";let cu;try{cu=new TextDecoder}catch{}let de,Br,K=0;const SP=105,IP=57342,vP=57343,Dh=57337,Ph=6,ri={};let $i=11281e4,qn=1681e4,Pe={},ct,to,no=0,Os=0,yt,pn,bt=[],du=[],Yt,Ht,Xi,Mh={useRecords:!1,mapsAsObjects:!0},Ls=!1,ub=2;try{new Function("")}catch{ub=1/0}class Ds{constructor(t){if(t&&((t.keyMap||t._keyMap)&&!t.useRecords&&(t.useRecords=!1,t.mapsAsObjects=!0),t.useRecords===!1&&t.mapsAsObjects===void 0&&(t.mapsAsObjects=!0),t.getStructures&&(t.getShared=t.getStructures),t.getShared&&!t.structures&&((t.structures=[]).uninitialized=!0),t.keyMap)){this.mapKey=new Map;for(let[n,r]of Object.entries(t.keyMap))this.mapKey.set(r,n)}Object.assign(this,t)}decodeKey(t){return this.keyMap&&this.mapKey.get(t)||t}encodeKey(t){return this.keyMap&&this.keyMap.hasOwnProperty(t)?this.keyMap[t]:t}encodeKeys(t){if(!this._keyMap)return t;let n=new Map;for(let[r,i]of Object.entries(t))n.set(this._keyMap.hasOwnProperty(r)?this._keyMap[r]:r,i);return n}decodeKeys(t){if(!this._keyMap||t.constructor.name!="Map")return t;if(!this._mapKey){this._mapKey=new Map;for(let[r,i]of Object.entries(this._keyMap))this._mapKey.set(i,r)}let n={};return t.forEach((r,i)=>n[mn(this._mapKey.has(i)?this._mapKey.get(i):i)]=r),n}mapDecode(t,n){let r=this.decode(t);if(this._keyMap)switch(r.constructor.name){case"Array":return r.map(i=>this.decodeKeys(i))}return r}decode(t,n){if(de)return hb(()=>(mu(),this?this.decode(t,n):Ds.prototype.decode.call(Mh,t,n)));Br=n>-1?n:t.length,K=0,Os=0,to=null,yt=null,de=t;try{Ht=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength))}catch(r){throw de=null,t instanceof Uint8Array?r:new Error("Source must be a Uint8Array or Buffer but was a "+(t&&typeof t=="object"?t.constructor.name:typeof t))}if(this instanceof Ds){if(Pe=this,Yt=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return ct=this.structures,Ea();(!ct||ct.length>0)&&(ct=[])}else Pe=Mh,(!ct||ct.length>0)&&(ct=[]),Yt=null;return Ea()}decodeMultiple(t,n){let r,i=0;try{let s=t.length;Ls=!0;let a=this?this.decode(t,s):Pc.decode(t,s);if(n){if(n(a)===!1)return;for(;K<s;)if(i=K,n(Ea())===!1)return}else{for(r=[a];K<s;)i=K,r.push(Ea());return r}}catch(s){throw s.lastPosition=i,s.values=r,s}finally{Ls=!1,mu()}}}function Ea(){try{let e=Fe();if(yt){if(K>=yt.postBundlePosition){let t=new Error("Unexpected bundle position");throw t.incomplete=!0,t}K=yt.postBundlePosition,yt=null}if(K==Br)ct=null,de=null,pn&&(pn=null);else if(K>Br){let t=new Error("Unexpected end of CBOR data");throw t.incomplete=!0,t}else if(!Ls)throw new Error("Data read, but end of buffer not reached");return e}catch(e){throw mu(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function Fe(){let e=de[K++],t=e>>5;if(e=e&31,e>23)switch(e){case 24:e=de[K++];break;case 25:if(t==7)return LP();e=Ht.getUint16(K),K+=2;break;case 26:if(t==7){let n=Ht.getFloat32(K);if(Pe.useFloat32>2){let r=Dc[(de[K]&127)<<1|de[K+1]>>7];return K+=4,(r*n+(n>0?.5:-.5)>>0)/r}return K+=4,n}e=Ht.getUint32(K),K+=4;break;case 27:if(t==7){let n=Ht.getFloat64(K);return K+=8,n}if(t>1){if(Ht.getUint32(K)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=Ht.getUint32(K+4)}else Pe.int64AsNumber?(e=Ht.getUint32(K)*4294967296,e+=Ht.getUint32(K+4)):e=Ht.getBigUint64(K);K+=8;break;case 31:switch(t){case 2:case 3:throw new Error("Indefinite length not supported for byte or text strings");case 4:let n=[],r,i=0;for(;(r=Fe())!=ri;){if(i>=$i)throw new Error(`Array length exceeds ${$i}`);n[i++]=r}return t==4?n:t==3?n.join(""):Buffer.concat(n);case 5:let s;if(Pe.mapsAsObjects){let a={},o=0;if(Pe.keyMap)for(;(s=Fe())!=ri;){if(o++>=qn)throw new Error(`Property count exceeds ${qn}`);a[mn(Pe.decodeKey(s))]=Fe()}else for(;(s=Fe())!=ri;){if(o++>=qn)throw new Error(`Property count exceeds ${qn}`);a[mn(s)]=Fe()}return a}else{Xi&&(Pe.mapsAsObjects=!0,Xi=!1);let a=new Map;if(Pe.keyMap){let o=0;for(;(s=Fe())!=ri;){if(o++>=qn)throw new Error(`Map size exceeds ${qn}`);a.set(Pe.decodeKey(s),Fe())}}else{let o=0;for(;(s=Fe())!=ri;){if(o++>=qn)throw new Error(`Map size exceeds ${qn}`);a.set(s,Fe())}}return a}case 7:return ri;default:throw new Error("Invalid major type for indefinite length "+t)}default:throw new Error("Unknown token "+e)}switch(t){case 0:return e;case 1:return~e;case 2:return OP(e);case 3:if(Os>=K)return to.slice(K-no,(K+=e)-no);if(Os==0&&Br<140&&e<32){let i=e<16?cb(e):NP(e);if(i!=null)return i}return RP(e);case 4:if(e>=$i)throw new Error(`Array length exceeds ${$i}`);let n=new Array(e);for(let i=0;i<e;i++)n[i]=Fe();return n;case 5:if(e>=qn)throw new Error(`Map size exceeds ${$i}`);if(Pe.mapsAsObjects){let i={};if(Pe.keyMap)for(let s=0;s<e;s++)i[mn(Pe.decodeKey(Fe()))]=Fe();else for(let s=0;s<e;s++)i[mn(Fe())]=Fe();return i}else{Xi&&(Pe.mapsAsObjects=!0,Xi=!1);let i=new Map;if(Pe.keyMap)for(let s=0;s<e;s++)i.set(Pe.decodeKey(Fe()),Fe());else for(let s=0;s<e;s++)i.set(Fe(),Fe());return i}case 6:if(e>=Dh){let i=ct[e&8191];if(i)return i.read||(i.read=fu(i)),i.read();if(e<65536){if(e==vP){let s=ui(),a=Fe(),o=Fe();pu(a,o);let l={};if(Pe.keyMap)for(let u=2;u<s;u++){let d=Pe.decodeKey(o[u-2]);l[mn(d)]=Fe()}else for(let u=2;u<s;u++){let d=o[u-2];l[mn(d)]=Fe()}return l}else if(e==IP){let s=ui(),a=Fe();for(let o=2;o<s;o++)pu(a++,Fe());return Fe()}else if(e==Dh)return HP();if(Pe.getShared&&(Lc(),i=ct[e&8191],i))return i.read||(i.read=fu(i)),i.read()}}let r=bt[e];if(r)return r.handlesRead?r(Fe):r(Fe());{let i=Fe();for(let s=0;s<du.length;s++){let a=du[s](e,i);if(a!==void 0)return a}return new Vr(i,e)}case 7:switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case 31:default:let i=(Yt||Nr())[e];if(i!==void 0)return i;throw new Error("Unknown token "+e)}default:if(isNaN(e)){let i=new Error("Unexpected end of CBOR data");throw i.incomplete=!0,i}throw new Error("Unknown CBOR token "+e)}}const Bh=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function fu(e){if(!e)throw new Error("Structure is required in record definition");function t(){let n=de[K++];if(n=n&31,n>23)switch(n){case 24:n=de[K++];break;case 25:n=Ht.getUint16(K),K+=2;break;case 26:n=Ht.getUint32(K),K+=4;break;default:throw new Error("Expected array header, but got "+de[K-1])}let r=this.compiledReader;for(;r;){if(r.propertyCount===n)return r(Fe);r=r.next}if(this.slowReads++>=ub){let s=this.length==n?this:this.slice(0,n);return r=Pe.keyMap?new Function("r","return {"+s.map(a=>Pe.decodeKey(a)).map(a=>Bh.test(a)?mn(a)+":r()":"["+JSON.stringify(a)+"]:r()").join(",")+"}"):new Function("r","return {"+s.map(a=>Bh.test(a)?mn(a)+":r()":"["+JSON.stringify(a)+"]:r()").join(",")+"}"),this.compiledReader&&(r.next=this.compiledReader),r.propertyCount=n,this.compiledReader=r,r(Fe)}let i={};if(Pe.keyMap)for(let s=0;s<n;s++)i[mn(Pe.decodeKey(this[s]))]=Fe();else for(let s=0;s<n;s++)i[mn(this[s])]=Fe();return i}return e.slowReads=0,t}function mn(e){if(typeof e=="string")return e==="__proto__"?"__proto_":e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return e.toString();if(e==null)return e+"";throw new Error("Invalid property name type "+typeof e)}let RP=hu;function hu(e){let t;if(e<16&&(t=cb(e)))return t;if(e>64&&cu)return cu.decode(de.subarray(K,K+=e));const n=K+e,r=[];for(t="";K<n;){const i=de[K++];if((i&128)===0)r.push(i);else if((i&224)===192){const s=de[K++]&63;r.push((i&31)<<6|s)}else if((i&240)===224){const s=de[K++]&63,a=de[K++]&63;r.push((i&31)<<12|s<<6|a)}else if((i&248)===240){const s=de[K++]&63,a=de[K++]&63,o=de[K++]&63;let l=(i&7)<<18|s<<12|a<<6|o;l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|l&1023),r.push(l)}else r.push(i);r.length>=4096&&(t+=Ct.apply(String,r),r.length=0)}return r.length>0&&(t+=Ct.apply(String,r)),t}let Ct=String.fromCharCode;function NP(e){let t=K,n=new Array(e);for(let r=0;r<e;r++){const i=de[K++];if((i&128)>0){K=t;return}n[r]=i}return Ct.apply(String,n)}function cb(e){if(e<4)if(e<2){if(e===0)return"";{let t=de[K++];if((t&128)>1){K-=1;return}return Ct(t)}}else{let t=de[K++],n=de[K++];if((t&128)>0||(n&128)>0){K-=2;return}if(e<3)return Ct(t,n);let r=de[K++];if((r&128)>0){K-=3;return}return Ct(t,n,r)}else{let t=de[K++],n=de[K++],r=de[K++],i=de[K++];if((t&128)>0||(n&128)>0||(r&128)>0||(i&128)>0){K-=4;return}if(e<6){if(e===4)return Ct(t,n,r,i);{let s=de[K++];if((s&128)>0){K-=5;return}return Ct(t,n,r,i,s)}}else if(e<8){let s=de[K++],a=de[K++];if((s&128)>0||(a&128)>0){K-=6;return}if(e<7)return Ct(t,n,r,i,s,a);let o=de[K++];if((o&128)>0){K-=7;return}return Ct(t,n,r,i,s,a,o)}else{let s=de[K++],a=de[K++],o=de[K++],l=de[K++];if((s&128)>0||(a&128)>0||(o&128)>0||(l&128)>0){K-=8;return}if(e<10){if(e===8)return Ct(t,n,r,i,s,a,o,l);{let u=de[K++];if((u&128)>0){K-=9;return}return Ct(t,n,r,i,s,a,o,l,u)}}else if(e<12){let u=de[K++],d=de[K++];if((u&128)>0||(d&128)>0){K-=10;return}if(e<11)return Ct(t,n,r,i,s,a,o,l,u,d);let c=de[K++];if((c&128)>0){K-=11;return}return Ct(t,n,r,i,s,a,o,l,u,d,c)}else{let u=de[K++],d=de[K++],c=de[K++],h=de[K++];if((u&128)>0||(d&128)>0||(c&128)>0||(h&128)>0){K-=12;return}if(e<14){if(e===12)return Ct(t,n,r,i,s,a,o,l,u,d,c,h);{let p=de[K++];if((p&128)>0){K-=13;return}return Ct(t,n,r,i,s,a,o,l,u,d,c,h,p)}}else{let p=de[K++],m=de[K++];if((p&128)>0||(m&128)>0){K-=14;return}if(e<15)return Ct(t,n,r,i,s,a,o,l,u,d,c,h,p,m);let E=de[K++];if((E&128)>0){K-=15;return}return Ct(t,n,r,i,s,a,o,l,u,d,c,h,p,m,E)}}}}}function OP(e){return Pe.copyBuffers?Uint8Array.prototype.slice.call(de,K,K+=e):de.subarray(K,K+=e)}let db=new Float32Array(1),Ta=new Uint8Array(db.buffer,0,4);function LP(){let e=de[K++],t=de[K++],n=(e&127)>>2;if(n===31)return t||e&3?NaN:e&128?-1/0:1/0;if(n===0){let r=((e&3)<<8|t)/16777216;return e&128?-r:r}return Ta[3]=e&128|(n>>1)+56,Ta[2]=(e&7)<<5|t>>3,Ta[1]=t<<5,Ta[0]=0,db[0]}new Array(4096);class Vr{constructor(t,n){this.value=t,this.tag=n}}bt[0]=e=>new Date(e);bt[1]=e=>new Date(Math.round(e*1e3));bt[2]=e=>{let t=BigInt(0);for(let n=0,r=e.byteLength;n<r;n++)t=BigInt(e[n])+(t<<BigInt(8));return t};bt[3]=e=>BigInt(-1)-bt[2](e);bt[4]=e=>+(e[1]+"e"+e[0]);bt[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));const pu=(e,t)=>{e=e-57344;let n=ct[e];n&&n.isShared&&((ct.restoreStructures||(ct.restoreStructures=[]))[e]=n),ct[e]=t,t.read=fu(t)};bt[SP]=e=>{let t=e.length,n=e[1];pu(e[0],n);let r={};for(let i=2;i<t;i++){let s=n[i-2];r[mn(s)]=e[i]}return r};bt[14]=e=>yt?yt[0].slice(yt.position0,yt.position0+=e):new Vr(e,14);bt[15]=e=>yt?yt[1].slice(yt.position1,yt.position1+=e):new Vr(e,15);let DP={Error,RegExp};bt[27]=e=>(DP[e[0]]||Error)(e[1],e[2]);const fb=e=>{if(de[K++]!=132){let n=new Error("Packed values structure must be followed by a 4 element array");throw de.length<K&&(n.incomplete=!0),n}let t=e();if(!t||!t.length){let n=new Error("Packed values structure must be followed by a 4 element array");throw n.incomplete=!0,n}return Yt=Yt?t.concat(Yt.slice(t.length)):t,Yt.prefixes=e(),Yt.suffixes=e(),e()};fb.handlesRead=!0;bt[51]=fb;bt[Ph]=e=>{if(!Yt)if(Pe.getShared)Lc();else return new Vr(e,Ph);if(typeof e=="number")return Yt[16+(e>=0?2*e:-2*e-1)];let t=new Error("No support for non-integer packed references yet");throw e===void 0&&(t.incomplete=!0),t};bt[28]=e=>{pn||(pn=new Map,pn.id=0);let t=pn.id++,n=K,r=de[K],i;r>>5==4?i=[]:i={};let s={target:i};pn.set(t,s);let a=e();return s.used?(Object.getPrototypeOf(i)!==Object.getPrototypeOf(a)&&(K=n,i=a,pn.set(t,{target:i}),a=e()),Object.assign(i,a)):(s.target=a,a)};bt[28].handlesRead=!0;bt[29]=e=>{let t=pn.get(e);return t.used=!0,t.target};bt[258]=e=>new Set(e);(bt[259]=e=>(Pe.mapsAsObjects&&(Pe.mapsAsObjects=!1,Xi=!0),e())).handlesRead=!0;function ii(e,t){return typeof e=="string"?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function Nr(){if(!Yt)if(Pe.getShared)Lc();else throw new Error("No packed values available");return Yt}const PP=1399353956;du.push((e,t)=>{if(e>=225&&e<=255)return ii(Nr().prefixes[e-224],t);if(e>=28704&&e<=32767)return ii(Nr().prefixes[e-28672],t);if(e>=1879052288&&e<=2147483647)return ii(Nr().prefixes[e-1879048192],t);if(e>=216&&e<=223)return ii(t,Nr().suffixes[e-216]);if(e>=27647&&e<=28671)return ii(t,Nr().suffixes[e-27639]);if(e>=1811940352&&e<=1879048191)return ii(t,Nr().suffixes[e-1811939328]);if(e==PP)return{packedValues:Yt,structures:ct.slice(0),version:t};if(e==55799)return t});const MP=new Uint8Array(new Uint16Array([1]).buffer)[0]==1,Fh=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],BP=[64,68,69,70,71,72,77,78,79,85,86];for(let e=0;e<Fh.length;e++)FP(Fh[e],BP[e]);function FP(e,t){let n="get"+e.name.slice(0,-5),r;typeof e=="function"?r=e.BYTES_PER_ELEMENT:e=null;for(let i=0;i<2;i++){if(!i&&r==1)continue;let s=r==2?1:r==4?2:r==8?3:0;bt[i?t:t-4]=r==1||i==MP?a=>{if(!e)throw new Error("Could not find typed array for code "+t);return!Pe.copyBuffers&&(r===1||r===2&&!(a.byteOffset&1)||r===4&&!(a.byteOffset&3)||r===8&&!(a.byteOffset&7))?new e(a.buffer,a.byteOffset,a.byteLength>>s):new e(Uint8Array.prototype.slice.call(a,0).buffer)}:a=>{if(!e)throw new Error("Could not find typed array for code "+t);let o=new DataView(a.buffer,a.byteOffset,a.byteLength),l=a.length>>s,u=new e(l),d=o[n];for(let c=0;c<l;c++)u[c]=d.call(o,c<<s,i);return u}}}function HP(){let e=ui(),t=K+Fe();for(let r=2;r<e;r++){let i=ui();K+=i}let n=K;return K=t,yt=[hu(ui()),hu(ui())],yt.position0=0,yt.position1=0,yt.postBundlePosition=K,K=n,Fe()}function ui(){let e=de[K++]&31;if(e>23)switch(e){case 24:e=de[K++];break;case 25:e=Ht.getUint16(K),K+=2;break;case 26:e=Ht.getUint32(K),K+=4;break}return e}function Lc(){if(Pe.getShared){let e=hb(()=>(de=null,Pe.getShared()))||{},t=e.structures||[];Pe.sharedVersion=e.version,Yt=Pe.sharedValues=e.packedValues,ct===!0?Pe.structures=ct=t:ct.splice.apply(ct,[0,t.length].concat(t))}}function hb(e){let t=Br,n=K,r=no,i=Os,s=to,a=pn,o=yt,l=new Uint8Array(de.slice(0,Br)),u=ct,d=Pe,c=Ls,h=e();return Br=t,K=n,no=r,Os=i,to=s,pn=a,yt=o,de=l,Ls=c,ct=u,Pe=d,Ht=new DataView(de.buffer,de.byteOffset,de.byteLength),h}function mu(){de=null,pn=null,ct=null}const Dc=new Array(147);for(let e=0;e<256;e++)Dc[e]=+("1e"+Math.floor(45.15-e*.30103));let Pc=new Ds({useRecords:!1});const Hh=Pc.decode;Pc.decodeMultiple;let La;try{La=new TextEncoder}catch{}let gu,pb;const Do=typeof globalThis=="object"&&globalThis.Buffer,Qs=typeof Do<"u",ml=Qs?Do.allocUnsafeSlow:Uint8Array,Uh=Qs?Do:Uint8Array,jh=256,zh=Qs?4294967296:2144337920;let gl,V,rt,B=0,lr,Tt=null;const UP=61440,jP=/[\u0080-\uFFFF]/,Zt=Symbol("record-id");class zP extends Ds{constructor(t){super(t),this.offset=0;let n,r,i,s,a;t=t||{};let o=Uh.prototype.utf8Write?function(w,L,M){return V.utf8Write(w,L,M)}:La&&La.encodeInto?function(w,L){return La.encodeInto(w,V.subarray(L)).written}:!1,l=this,u=t.structures||t.saveStructures,d=t.maxSharedStructures;if(d==null&&(d=u?128:0),d>8190)throw new Error("Maximum maxSharedStructure is 8190");let c=t.sequential;c&&(d=0),this.structures||(this.structures=[]),this.saveStructures&&(this.saveShared=this.saveStructures);let h,p,m=t.sharedValues,E;if(m){E=Object.create(null);for(let w=0,L=m.length;w<L;w++)E[m[w]]=w}let T=[],b=0,y=0;this.mapEncode=function(w,L){if(this._keyMap&&!this._mapped)switch(w.constructor.name){case"Array":w=w.map(M=>this.encodeKeys(M));break}return this.encode(w,L)},this.encode=function(w,L){if(V||(V=new ml(8192),rt=new DataView(V.buffer,0,8192),B=0),lr=V.length-10,lr-B<2048?(V=new ml(V.length),rt=new DataView(V.buffer,0,V.length),lr=V.length-10,B=0):L===Wh&&(B=B+7&2147483640),n=B,l.useSelfDescribedHeader&&(rt.setUint32(B,3654940416),B+=3),a=l.structuredClone?new Map:null,l.bundleStrings&&typeof w!="string"?(Tt=[],Tt.size=1/0):Tt=null,r=l.structures,r){if(r.uninitialized){let H=l.getShared()||{};l.structures=r=H.structures||[],l.sharedVersion=H.version;let U=l.sharedValues=H.packedValues;if(U){E={};for(let G=0,Q=U.length;G<Q;G++)E[U[G]]=G}}let M=r.length;if(M>d&&!c&&(M=d),!r.transitions){r.transitions=Object.create(null);for(let H=0;H<M;H++){let U=r[H];if(!U)continue;let G,Q=r.transitions;for(let _=0,se=U.length;_<se;_++){Q[Zt]===void 0&&(Q[Zt]=H);let te=U[_];G=Q[te],G||(G=Q[te]=Object.create(null)),Q=G}Q[Zt]=H|1048576}}c||(r.nextId=M)}if(i&&(i=!1),s=r||[],p=E,t.pack){let M=new Map;if(M.values=[],M.encoder=l,M.maxValues=t.maxPrivatePackedValues||(E?16:1/0),M.objectMap=E||!1,M.samplingPackedValues=h,Da(w,M),M.values.length>0){V[B++]=216,V[B++]=51,Pn(4);let H=M.values;k(H),Pn(0),Pn(0),p=Object.create(E||null);for(let U=0,G=H.length;U<G;U++)p[H[U]]=U}}gl=L&El;try{if(gl)return;if(k(w),Tt&&Vh(n,k),l.offset=B,a&&a.idsToInsert){B+=a.idsToInsert.length*2,B>lr&&D(B),l.offset=B;let M=WP(V.subarray(n,B),a.idsToInsert);return a=null,M}return L&Wh?(V.start=n,V.end=B,V):V.subarray(n,B)}finally{if(r){if(y<10&&y++,r.length>d&&(r.length=d),b>1e4)r.transitions=null,y=0,b=0,T.length>0&&(T=[]);else if(T.length>0&&!c){for(let M=0,H=T.length;M<H;M++)T[M][Zt]=void 0;T=[]}}if(i&&l.saveShared){l.structures.length>d&&(l.structures=l.structures.slice(0,d));let M=V.subarray(n,B);return l.updateSharedData()===!1?l.encode(w):M}L&GP&&(B=n)}},this.findCommonStringsToPack=()=>(h=new Map,E||(E=Object.create(null)),w=>{let L=w&&w.threshold||4,M=this.pack?w.maxPrivatePackedValues||16:0;m||(m=this.sharedValues=[]);for(let[H,U]of h)U.count>L&&(E[H]=M++,m.push(H),i=!0);for(;this.saveShared&&this.updateSharedData()===!1;);h=null});const k=w=>{B>lr&&(V=D(B));var L=typeof w,M;if(L==="string"){if(p){let Q=p[w];if(Q>=0){Q<16?V[B++]=Q+224:(V[B++]=198,Q&1?k(15-Q>>1):k(Q-16>>1));return}else if(h&&!t.pack){let _=h.get(w);_?_.count++:h.set(w,{count:1})}}let H=w.length;if(Tt&&H>=4&&H<1024){if((Tt.size+=H)>UP){let _,se=(Tt[0]?Tt[0].length*3+Tt[1].length:0)+10;B+se>lr&&(V=D(B+se)),V[B++]=217,V[B++]=223,V[B++]=249,V[B++]=Tt.position?132:130,V[B++]=26,_=B-n,B+=4,Tt.position&&Vh(n,k),Tt=["",""],Tt.size=0,Tt.position=_}let Q=jP.test(w);Tt[Q?0:1]+=w,V[B++]=Q?206:207,k(H);return}let U;H<32?U=1:H<256?U=2:H<65536?U=3:U=5;let G=H*3;if(B+G>lr&&(V=D(B+G)),H<64||!o){let Q,_,se,te=B+U;for(Q=0;Q<H;Q++)_=w.charCodeAt(Q),_<128?V[te++]=_:_<2048?(V[te++]=_>>6|192,V[te++]=_&63|128):(_&64512)===55296&&((se=w.charCodeAt(Q+1))&64512)===56320?(_=65536+((_&1023)<<10)+(se&1023),Q++,V[te++]=_>>18|240,V[te++]=_>>12&63|128,V[te++]=_>>6&63|128,V[te++]=_&63|128):(V[te++]=_>>12|224,V[te++]=_>>6&63|128,V[te++]=_&63|128);M=te-B-U}else M=o(w,B+U,G);M<24?V[B++]=96|M:M<256?(U<2&&V.copyWithin(B+2,B+1,B+1+M),V[B++]=120,V[B++]=M):M<65536?(U<3&&V.copyWithin(B+3,B+2,B+2+M),V[B++]=121,V[B++]=M>>8,V[B++]=M&255):(U<5&&V.copyWithin(B+5,B+3,B+3+M),V[B++]=122,rt.setUint32(B,M),B+=4),B+=M}else if(L==="number")if(!this.alwaysUseFloat&&w>>>0===w)w<24?V[B++]=w:w<256?(V[B++]=24,V[B++]=w):w<65536?(V[B++]=25,V[B++]=w>>8,V[B++]=w&255):(V[B++]=26,rt.setUint32(B,w),B+=4);else if(!this.alwaysUseFloat&&w>>0===w)w>=-24?V[B++]=31-w:w>=-256?(V[B++]=56,V[B++]=~w):w>=-65536?(V[B++]=57,rt.setUint16(B,~w),B+=2):(V[B++]=58,rt.setUint32(B,~w),B+=4);else{let H;if((H=this.useFloat32)>0&&w<4294967296&&w>=-2147483648){V[B++]=250,rt.setFloat32(B,w);let U;if(H<4||(U=w*Dc[(V[B]&127)<<1|V[B+1]>>7])>>0===U){B+=4;return}else B--}V[B++]=251,rt.setFloat64(B,w),B+=8}else if(L==="object")if(!w)V[B++]=246;else{if(a){let U=a.get(w);if(U){if(V[B++]=216,V[B++]=29,V[B++]=25,!U.references){let G=a.idsToInsert||(a.idsToInsert=[]);U.references=[],G.push(U)}U.references.push(B-n),B+=2;return}else a.set(w,{offset:B-n})}let H=w.constructor;if(H===Object)P(w);else if(H===Array){M=w.length,M<24?V[B++]=128|M:Pn(M);for(let U=0;U<M;U++)k(w[U])}else if(H===Map)if((this.mapsAsObjects?this.useTag259ForMaps!==!1:this.useTag259ForMaps)&&(V[B++]=217,V[B++]=1,V[B++]=3),M=w.size,M<24?V[B++]=160|M:M<256?(V[B++]=184,V[B++]=M):M<65536?(V[B++]=185,V[B++]=M>>8,V[B++]=M&255):(V[B++]=186,rt.setUint32(B,M),B+=4),l.keyMap)for(let[U,G]of w)k(l.encodeKey(U)),k(G);else for(let[U,G]of w)k(U),k(G);else{for(let U=0,G=gu.length;U<G;U++){let Q=pb[U];if(w instanceof Q){let _=gu[U],se=_.tag;se==null&&(se=_.getTag&&_.getTag.call(this,w)),se<24?V[B++]=192|se:se<256?(V[B++]=216,V[B++]=se):se<65536?(V[B++]=217,V[B++]=se>>8,V[B++]=se&255):se>-1&&(V[B++]=218,rt.setUint32(B,se),B+=4),_.encode.call(this,w,k,D);return}}if(w[Symbol.iterator]){if(gl){let U=new Error("Iterable should be serialized as iterator");throw U.iteratorNotHandled=!0,U}V[B++]=159;for(let U of w)k(U);V[B++]=255;return}if(w[Symbol.asyncIterator]||bl(w)){let U=new Error("Iterable/blob should be serialized as iterator");throw U.iteratorNotHandled=!0,U}if(this.useToJSON&&w.toJSON){const U=w.toJSON();if(U!==w)return k(U)}P(w)}}else if(L==="boolean")V[B++]=w?245:244;else if(L==="bigint"){if(w<BigInt(1)<<BigInt(64)&&w>=0)V[B++]=27,rt.setBigUint64(B,w);else if(w>-(BigInt(1)<<BigInt(64))&&w<0)V[B++]=59,rt.setBigUint64(B,-w-BigInt(1));else if(this.largeBigIntToFloat)V[B++]=251,rt.setFloat64(B,Number(w));else{w>=BigInt(0)?V[B++]=194:(V[B++]=195,w=BigInt(-1)-w);let H=[];for(;w;)H.push(Number(w&BigInt(255))),w>>=BigInt(8);bu(new Uint8Array(H.reverse()),D);return}B+=8}else if(L==="undefined")V[B++]=247;else throw new Error("Unknown type: "+L)},P=this.useRecords===!1?this.variableMapSize?w=>{let L=Object.keys(w),M=Object.values(w),H=L.length;if(H<24?V[B++]=160|H:H<256?(V[B++]=184,V[B++]=H):H<65536?(V[B++]=185,V[B++]=H>>8,V[B++]=H&255):(V[B++]=186,rt.setUint32(B,H),B+=4),l.keyMap)for(let U=0;U<H;U++)k(l.encodeKey(L[U])),k(M[U]);else for(let U=0;U<H;U++)k(L[U]),k(M[U])}:w=>{V[B++]=185;let L=B-n;B+=2;let M=0;if(l.keyMap)for(let H in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(H))&&(k(l.encodeKey(H)),k(w[H]),M++);else for(let H in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(H))&&(k(H),k(w[H]),M++);V[L+++n]=M>>8,V[L+n]=M&255}:(w,L)=>{let M,H=s.transitions||(s.transitions=Object.create(null)),U=0,G=0,Q,_;if(this.keyMap){_=Object.keys(w).map(te=>this.encodeKey(te)),G=_.length;for(let te=0;te<G;te++){let S=_[te];M=H[S],M||(M=H[S]=Object.create(null),U++),H=M}}else for(let te in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(te))&&(M=H[te],M||(H[Zt]&1048576&&(Q=H[Zt]&65535),M=H[te]=Object.create(null),U++),H=M,G++);let se=H[Zt];if(se!==void 0)se&=65535,V[B++]=217,V[B++]=se>>8|224,V[B++]=se&255;else if(_||(_=H.__keys__||(H.__keys__=Object.keys(w))),Q===void 0?(se=s.nextId++,se||(se=0,s.nextId=1),se>=jh&&(s.nextId=(se=d)+1)):se=Q,s[se]=_,se<d){V[B++]=217,V[B++]=se>>8|224,V[B++]=se&255,H=s.transitions;for(let te=0;te<G;te++)(H[Zt]===void 0||H[Zt]&1048576)&&(H[Zt]=se),H=H[_[te]];H[Zt]=se|1048576,i=!0}else{if(H[Zt]=se,rt.setUint32(B,3655335680),B+=3,U&&(b+=y*U),T.length>=jh-d&&(T.shift()[Zt]=void 0),T.push(H),Pn(G+2),k(57344+se),k(_),L)return;for(let te in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(te))&&k(w[te]);return}if(G<24?V[B++]=128|G:Pn(G),!L)for(let te in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(te))&&k(w[te])},D=w=>{let L;if(w>16777216){if(w-n>zh)throw new Error("Encoded buffer would be larger than maximum buffer size");L=Math.min(zh,Math.round(Math.max((w-n)*(w>67108864?1.25:2),4194304)/4096)*4096)}else L=(Math.max(w-n<<2,V.length-1)>>12)+1<<12;let M=new ml(L);return rt=new DataView(M.buffer,0,L),V.copy?V.copy(M,0,n,w):M.set(V.slice(n,w)),B-=n,n=0,lr=M.length-10,V=M};let v=100,A=1e3;this.encodeAsIterable=function(w,L){return W(w,L,N)},this.encodeAsAsyncIterable=function(w,L){return W(w,L,j)};function*N(w,L,M){let H=w.constructor;if(H===Object){let U=l.useRecords!==!1;U?P(w,!0):$h(Object.keys(w).length,160);for(let G in w){let Q=w[G];U||k(G),Q&&typeof Q=="object"?L[G]?yield*N(Q,L[G]):yield*z(Q,L,G):k(Q)}}else if(H===Array){let U=w.length;Pn(U);for(let G=0;G<U;G++){let Q=w[G];Q&&(typeof Q=="object"||B-n>v)?L.element?yield*N(Q,L.element):yield*z(Q,L,"element"):k(Q)}}else if(w[Symbol.iterator]&&!w.buffer){V[B++]=159;for(let U of w)U&&(typeof U=="object"||B-n>v)?L.element?yield*N(U,L.element):yield*z(U,L,"element"):k(U);V[B++]=255}else bl(w)?($h(w.size,64),yield V.subarray(n,B),yield w,R()):w[Symbol.asyncIterator]?(V[B++]=159,yield V.subarray(n,B),yield w,R(),V[B++]=255):k(w);M&&B>n?yield V.subarray(n,B):B-n>v&&(yield V.subarray(n,B),R())}function*z(w,L,M){let H=B-n;try{k(w),B-n>v&&(yield V.subarray(n,B),R())}catch(U){if(U.iteratorNotHandled)L[M]={},B=n+H,yield*N.call(this,w,L[M]);else throw U}}function R(){v=A,l.encode(null,El)}function W(w,L,M){return L&&L.chunkThreshold?v=A=L.chunkThreshold:v=100,w&&typeof w=="object"?(l.encode(null,El),M(w,l.iterateProperties||(l.iterateProperties={}),!0)):[l.encode(w)]}async function*j(w,L){for(let M of N(w,L,!0)){let H=M.constructor;if(H===Uh||H===Uint8Array)yield M;else if(bl(M)){let U=M.stream().getReader(),G;for(;!(G=await U.read()).done;)yield G.value}else if(M[Symbol.asyncIterator])for await(let U of M)R(),U?yield*j(U,L.async||(L.async={})):yield l.encode(U);else yield M}}}useBuffer(t){V=t,rt=new DataView(V.buffer,V.byteOffset,V.byteLength),B=0}clearSharedData(){this.structures&&(this.structures=[]),this.sharedValues&&(this.sharedValues=void 0)}updateSharedData(){let t=this.sharedVersion||0;this.sharedVersion=t+1;let n=this.structures.slice(0),r=new mb(n,this.sharedValues,this.sharedVersion),i=this.saveShared(r,s=>(s&&s.version||0)==t);return i===!1?(r=this.getShared()||{},this.structures=r.structures||[],this.sharedValues=r.packedValues,this.sharedVersion=r.version,this.structures.nextId=this.structures.length):n.forEach((s,a)=>this.structures[a]=s),i}}function $h(e,t){e<24?V[B++]=t|e:e<256?(V[B++]=t|24,V[B++]=e):e<65536?(V[B++]=t|25,V[B++]=e>>8,V[B++]=e&255):(V[B++]=t|26,rt.setUint32(B,e),B+=4)}class mb{constructor(t,n,r){this.structures=t,this.packedValues=n,this.version=r}}function Pn(e){e<24?V[B++]=128|e:e<256?(V[B++]=152,V[B++]=e):e<65536?(V[B++]=153,V[B++]=e>>8,V[B++]=e&255):(V[B++]=154,rt.setUint32(B,e),B+=4)}const $P=typeof Blob>"u"?function(){}:Blob;function bl(e){if(e instanceof $P)return!0;let t=e[Symbol.toStringTag];return t==="Blob"||t==="File"}function Da(e,t){switch(typeof e){case"string":if(e.length>3){if(t.objectMap[e]>-1||t.values.length>=t.maxValues)return;let r=t.get(e);if(r)++r.count==2&&t.values.push(e);else if(t.set(e,{count:1}),t.samplingPackedValues){let i=t.samplingPackedValues.get(e);i?i.count++:t.samplingPackedValues.set(e,{count:1})}}break;case"object":if(e)if(e instanceof Array)for(let r=0,i=e.length;r<i;r++)Da(e[r],t);else{let r=!t.encoder.useRecords;for(var n in e)e.hasOwnProperty(n)&&(r&&Da(n,t),Da(e[n],t))}break;case"function":console.log(e)}}const VP=new Uint8Array(new Uint16Array([1]).buffer)[0]==1;pb=[Date,Set,Error,RegExp,Vr,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?function(){}:BigInt64Array,Float32Array,Float64Array,mb];gu=[{tag:1,encode(e,t){let n=e.getTime()/1e3;(this.useTimestamp32||e.getMilliseconds()===0)&&n>=0&&n<4294967296?(V[B++]=26,rt.setUint32(B,n),B+=4):(V[B++]=251,rt.setFloat64(B,n),B+=8)}},{tag:258,encode(e,t){let n=Array.from(e);t(n)}},{tag:27,encode(e,t){t([e.name,e.message])}},{tag:27,encode(e,t){t(["RegExp",e.source,e.flags])}},{getTag(e){return e.tag},encode(e,t){t(e.value)}},{encode(e,t,n){bu(e,n)}},{getTag(e){if(e.constructor===Uint8Array&&(this.tagUint8Array||Qs&&this.tagUint8Array!==!1))return 64},encode(e,t,n){bu(e,n)}},Ln(68,1),Ln(69,2),Ln(70,4),Ln(71,8),Ln(72,1),Ln(77,2),Ln(78,4),Ln(79,8),Ln(85,4),Ln(86,8),{encode(e,t){let n=e.packedValues||[],r=e.structures||[];if(n.values.length>0){V[B++]=216,V[B++]=51,Pn(4);let i=n.values;t(i),Pn(0),Pn(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let s=0,a=i.length;s<a;s++)packedObjectMap[i[s]]=s}if(r){rt.setUint32(B,3655335424),B+=3;let i=r.slice(0);i.unshift(57344),i.push(new Vr(e.version,1399353956)),t(i)}else t(new Vr(e.version,1399353956))}}];function Ln(e,t){return!VP&&t>1&&(e-=4),{tag:e,encode:function(r,i){let s=r.byteLength,a=r.byteOffset||0,o=r.buffer||r;i(Qs?Do.from(o,a,s):new Uint8Array(o,a,s))}}}function bu(e,t){let n=e.byteLength;n<24?V[B++]=64+n:n<256?(V[B++]=88,V[B++]=n):n<65536?(V[B++]=89,V[B++]=n>>8,V[B++]=n&255):(V[B++]=90,rt.setUint32(B,n),B+=4),B+n>=V.length&&t(B+n),V.set(e.buffer?e:new Uint8Array(e),B),B+=n}function WP(e,t){let n,r=t.length*2,i=e.length-r;t.sort((s,a)=>s.offset>a.offset?1:-1);for(let s=0;s<t.length;s++){let a=t[s];a.id=s;for(let o of a.references)e[o++]=s>>8,e[o]=s&255}for(;n=t.pop();){let s=n.offset;e.copyWithin(s+r,s,i),r-=2;let a=s+r;e[a++]=216,e[a++]=28,i=s}return e}function Vh(e,t){rt.setUint32(Tt.position+e,B-Tt.position-e+1);let n=Tt;Tt=null,t(n[0]),t(n[1])}let Mc=new zP({useRecords:!1});const YP=Mc.encode;Mc.encodeAsIterable;Mc.encodeAsAsyncIterable;const Wh=512,GP=1024,El=2048;async function Ft(e,t){var i;const n=await fetch("/api/rpc",{method:"POST",headers:{"Content-Type":"application/cbor",Accept:"application/cbor"},body:new Uint8Array(YP({method:e,params:t??{}}))});if(!n.ok){try{const s=await n.arrayBuffer(),a=Hh(new Uint8Array(s));if((i=a==null?void 0:a.error)!=null&&i.message)throw new Error(a.error.message)}catch(s){if(s instanceof Error&&s.message!==`RPC call ${e} failed`)throw s}throw new Error(`RPC call ${e} failed: ${n.status} ${n.statusText}`)}const r=await n.arrayBuffer();return Hh(new Uint8Array(r))}async function vM(e,t){return Ft("fetchRuns",{worldEnv:e,params:t})}async function RM(e,t,n="all"){return Ft("fetchRun",{worldEnv:e,runId:t,resolveData:n})}async function NM(e,t,n,r="all"){return Ft("fetchStep",{worldEnv:e,runId:t,stepId:n,resolveData:r})}async function OM(e,t,n){return Ft("fetchEvents",{worldEnv:e,runId:t,params:n})}async function LM(e,t,n,r="all"){return Ft("fetchEvent",{worldEnv:e,runId:t,eventId:n,resolveData:r})}async function DM(e,t){return Ft("fetchHooks",{worldEnv:e,params:t})}async function PM(e,t,n="all"){return Ft("fetchHook",{worldEnv:e,hookId:t,resolveData:n})}async function MM(e,t){return Ft("cancelRun",{worldEnv:e,runId:t})}async function BM(e,t,n){return Ft("recreateRun",{worldEnv:e,runId:t,deploymentId:n})}async function FM(e,t){return Ft("reenqueueRun",{worldEnv:e,runId:t})}async function HM(e,t,n){return Ft("wakeUpRun",{worldEnv:e,runId:t,options:n})}async function UM(e,t,n){return Ft("resumeHook",{worldEnv:e,token:t,payload:n})}async function jM(e,t){return Ft("fetchStreams",{worldEnv:e,runId:t})}async function zM(e){return Ft("fetchWorkflowsManifest",{worldEnv:e})}async function $M(e,t,n){return Ft("runHealthCheck",{worldEnv:e,endpoint:t,options:n})}async function VM(e,t){return Ft("getEncryptionKeyForRun",{worldEnv:e,runId:t})}const qP=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Z1},Symbol.toStringTag,{value:"Module"}));export{oe as $,aT as A,AP as B,oT as C,yM as D,RM as E,kp as F,ZP as G,S2 as H,Pd as I,on as J,cM as K,eM as L,u_ as M,Gm as N,tM as O,Yr as P,VL as Q,En as R,AM as S,wM as T,nM as U,gT as V,Lx as W,Pt as X,Vy as Y,Oo as Z,Z6 as _,CM as a,pM as a0,gM as a1,fP as a2,eo as a3,mM as a4,No as a5,pr as a6,Ns as a7,e4 as a8,ga as a9,ob as aA,jE as aB,$E as aC,VE as aD,YE as aE,GE as aF,KE as aG,qE as aH,WE as aI,NE as aJ,MM as aK,FM as aL,HM as aM,UM as aN,BM as aO,zM as aP,hM as aa,dM as ab,ai as ac,t4 as ad,TM as ae,bM as af,EM as ag,fM as ah,iM as ai,rM as aj,PM as ak,NM as al,jM as am,lb as an,xP as ao,CP as ap,$u as aq,_s as ar,sn as as,A2 as at,_M as au,LM as av,VM as aw,xM as ax,Dx as ay,wP as az,TP as b,qp as c,sb as d,aM as e,yT as f,Fr as g,vM as h,DM as i,kM as j,OM as k,ro as l,Wr as m,pp as n,Xh as o,Xn as p,Hb as q,$M as r,yb as s,sM as t,SM as u,Jh as v,hT as w,sT as x,lT as y,IM as z};
171
+ `);return a+u+l})}return n},G6=/^[ \t]*<[\w!/?-]/,q6=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,K6=e=>typeof e!="string"||e.length===0||!G6.test(e)?e:e.replace(q6,"$1"),xh,yh,Oa={...as,protocols:{...as.protocols,href:[...(yh=(xh=as.protocols)==null?void 0:xh.href)!=null?yh:[],"tel"]}},uu={raw:ql,sanitize:[ag,Oa],harden:[G_,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},X6={gfm:[kv,{}]},_h=Object.values(uu),Q6=Object.values(X6),Z6={block:" ▋",circle:" ●"},J6={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},En=x.createContext(J6),Z1=x.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,...s})=>{let a=typeof e=="string"&&n?K6(e):e;return g.jsx(x1.Provider,{value:i,children:g.jsx(Q1,{...s,children:a})})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete)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(i=>{var s,a;return((s=e.components)==null?void 0:s[i])!==((a=t.components)==null?void 0:a[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Z1.displayName="Block";var e4=["github-light","github-dark"],t4=x.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:r=!1,components:i,rehypePlugins:s=_h,remarkPlugins:a=Q6,className:o,shikiTheme:l=e4,mermaid:u,controls:d=!0,isAnimating:c=!1,animated:h,BlockComponent:p=Z1,parseMarkdownIntoBlocksFn:m=W6,caret:E,plugins:T,remend:b,linkSafety:y={enabled:!0},allowedTags:k,...P})=>{let D=x.useId(),[v,A]=x.useTransition(),N=x.useMemo(()=>k?Object.keys(k):[],[k]),z=x.useMemo(()=>{if(typeof e!="string")return"";let te=t==="streaming"&&n?RR(e,b):e;return N.length>0&&(te=Y6(te,N)),te},[e,t,n,b,N]),R=x.useMemo(()=>m(z),[z,m]),[W,j]=x.useState(R);x.useEffect(()=>{t==="streaming"?A(()=>{j(R)}):j(R)},[R,t]);let w=t==="streaming"?W:R,L=x.useMemo(()=>w.map((te,S)=>`${D}-${S}`),[w.length,D]),M=x.useMemo(()=>h?h===!0?su():su(h):null,[h]),H=x.useMemo(()=>{var te,S;return{shikiTheme:(S=(te=T==null?void 0:T.code)==null?void 0:te.getThemes())!=null?S:l,controls:d,isAnimating:c,mode:t,mermaid:u,linkSafety:y}},[l,d,c,t,u,y,T==null?void 0:T.code]),U=x.useMemo(()=>({...w6,...i}),[i]),G=x.useMemo(()=>{let te=[];return T!=null&&T.cjk&&(te=[...te,...T.cjk.remarkPluginsBefore]),te=[...te,...a],T!=null&&T.cjk&&(te=[...te,...T.cjk.remarkPluginsAfter]),T!=null&&T.math&&(te=[...te,T.math.remarkPlugin]),te},[a,T==null?void 0:T.math,T==null?void 0:T.cjk]),Q=x.useMemo(()=>{var te;let S=s;if(k&&Object.keys(k).length>0&&s===_h){let ge={...Oa,tagNames:[...(te=Oa.tagNames)!=null?te:[],...Object.keys(k)],attributes:{...Oa.attributes,...k}};S=[uu.raw,[ag,ge],uu.harden]}return T!=null&&T.math&&(S=[...S,T.math.rehypePlugin]),M&&c&&(S=[...S,M.rehypePlugin]),S},[s,T==null?void 0:T.math,M,c,k]),_=x.useMemo(()=>{if(!c||w.length===0)return!1;let te=w.at(-1);return fh(te)||S6(te)},[c,w]),se=x.useMemo(()=>E&&c&&!_?{"--streamdown-caret":`"${Z6[E]}"`}:void 0,[E,c,_]);return t==="static"?g.jsx(au.Provider,{value:T??null,children:g.jsx(En.Provider,{value:H,children:g.jsx("div",{className:ye("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",o),children:g.jsx(Q1,{components:U,rehypePlugins:Q,remarkPlugins:G,...P,children:z})})})}):g.jsx(au.Provider,{value:T??null,children:g.jsx(En.Provider,{value:H,children:g.jsxs("div",{className:ye("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",E&&!_?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,o),style:se,children:[w.length===0&&E&&c&&g.jsx("span",{}),w.map((te,S)=>{let ge=S===w.length-1,pe=c&&ge&&fh(te);return g.jsx(p,{components:U,content:te,index:S,isIncomplete:pe,rehypePlugins:Q,remarkPlugins:G,shouldNormalizeHtmlIndentation:r,shouldParseIncompleteMarkdown:n,...P},L[S])})]})})})},(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.normalizeHtmlIndentation===t.normalizeHtmlIndentation);t4.displayName="Streamdown";var n4=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:s=!0,initialZoom:a=1,fullscreen:o=!1})=>{let l=x.useRef(null),u=x.useRef(null),[d,c]=x.useState(a),[h,p]=x.useState({x:0,y:0}),[m,E]=x.useState(!1),[T,b]=x.useState({x:0,y:0}),[y,k]=x.useState({x:0,y:0}),P=x.useCallback(j=>{c(w=>Math.max(n,Math.min(r,w+j)))},[n,r]),D=x.useCallback(()=>{P(i)},[P,i]),v=x.useCallback(()=>{P(-i)},[P,i]),A=x.useCallback(()=>{c(a),p({x:0,y:0})},[a]),N=x.useCallback(j=>{j.preventDefault();let w=j.deltaY>0?-i:i;P(w)},[P,i]),z=x.useCallback(j=>{if(j.button!==0||j.isPrimary===!1)return;E(!0),b({x:j.clientX,y:j.clientY}),k(h);let w=j.currentTarget;w instanceof HTMLElement&&w.setPointerCapture(j.pointerId)},[h]),R=x.useCallback(j=>{if(!m)return;j.preventDefault();let w=j.clientX-T.x,L=j.clientY-T.y;p({x:y.x+w,y:y.y+L})},[m,T,y]),W=x.useCallback(j=>{E(!1);let w=j.currentTarget;w instanceof HTMLElement&&w.releasePointerCapture(j.pointerId)},[]);return x.useEffect(()=>{let j=l.current;if(j)return j.addEventListener("wheel",N,{passive:!1}),()=>{j.removeEventListener("wheel",N)}},[N]),x.useEffect(()=>{let j=u.current;if(j&&m)return document.body.style.userSelect="none",j.addEventListener("pointermove",R,{passive:!1}),j.addEventListener("pointerup",W),j.addEventListener("pointercancel",W),()=>{document.body.style.userSelect="",j.removeEventListener("pointermove",R),j.removeEventListener("pointerup",W),j.removeEventListener("pointercancel",W)}},[m,R,W]),g.jsxs("div",{className:ye("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:l,style:{cursor:m?"grabbing":"grab"},children:[s?g.jsxs("div",{className:ye("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",o?"bottom-4 left-4":"bottom-2 left-2"),children:[g.jsx("button",{className:"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:d>=r,onClick:D,title:"Zoom in",type:"button",children:g.jsx(n6,{size:16})}),g.jsx("button",{className:"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:d<=n,onClick:v,title:"Zoom out",type:"button",children:g.jsx(r6,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:A,title:"Reset zoom and pan",type:"button",children:g.jsx(t6,{size:16})})]}):null,g.jsx("div",{className:ye("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:z,ref:u,role:"application",style:{transform:`translate(${h.x}px, ${h.y}px) scale(${d})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},J1=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[s,a]=x.useState(null),[o,l]=x.useState(!1),[u,d]=x.useState(""),[c,h]=x.useState(""),[p,m]=x.useState(0),{mermaid:E}=x.useContext(En),T=vc(),b=E==null?void 0:E.errorComponent,{shouldRender:y,containerRef:k}=PL({immediate:r});if(x.useEffect(()=>{if(y){if(!T){a("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{a(null),l(!0);let D=T.getMermaid(n),v=e.split("").reduce((z,R)=>(z<<5)-z+R.charCodeAt(0)|0,0),A=`mermaid-${Math.abs(v)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await D.render(A,e);d(N),h(N)}catch(D){if(!(c||u)){let v=D instanceof Error?D.message:"Failed to render Mermaid chart";a(v)}}finally{l(!1)}})()}},[e,n,p,y,T]),!(y||u||c))return g.jsx("div",{className:ye("my-4 min-h-[200px]",t),ref:k});if(o&&!u&&!c)return g.jsx("div",{className:ye("my-4 flex justify-center p-4",t),ref:k,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(s&&!u&&!c){let D=()=>m(v=>v+1);return b?g.jsx("div",{ref:k,children:g.jsx(b,{chart:e,error:s,retry:D})}):g.jsxs("div",{className:ye("rounded-md bg-red-50 p-4",t),ref:k,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",s]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let P=u||c;return g.jsx("div",{className:ye("size-full",t),"data-streamdown":"mermaid",ref:k,children:g.jsx(n4,{className:ye(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:ye("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:P},role:"img"})})})};const r4=40,i4=8,ai=56,eo=8,Ns=2,pr=24,No=24,mM=8,s4=()=>{if(!("document"in globalThis))return 0;const e=400,t=document.createElement("div");t.style.width=`${e}px`,t.style.height=`${e}px`,t.style.overflow="scroll",document.body.appendChild(t);const n=e-t.scrollWidth;return t.remove(),n},Nc={root:{startTime:0,endTime:1,duration:1,depth:0,children:[]},spanMap:{},resourceMap:{},filter:"",selected:null,baseScale:1,scaleRatio:1,scale:1,width:640,height:480,timelineWidth:640,timelineHeight:480,panelWidth:380,panelHeight:480,scrollbarWidth:0,timelineRef:{current:null},scrollSnapshotRef:{current:void 0},memoCacheRef:{current:new Map},getQuickLinks:()=>[],withPanel:!1,isMobile:!1},kh=e=>(e.timelineWidth-e.scrollbarWidth)/e.root.duration,Oc=x.createContext({state:Nc,dispatch:()=>{}});Oc.displayName="TraceViewerContext";const ft=(e,t)=>{var n;switch(t.type){case"setRoot":return e.scrollSnapshotRef.current=void 0,e.memoCacheRef.current.clear(),ft({...e,root:t.root,spanMap:t.spanMap,resourceMap:Object.fromEntries(t.resources.map(({name:r,attributes:i})=>[r,i]))},{type:"detectBaseScale"});case"setSize":{const r=t.height-ai-r4-3*i4,i=e.withPanel&&t.width<=768;let s={...e,width:t.width,height:t.height,timelineWidth:t.width-+!!(e.selected&&e.withPanel&&!i)*e.panelWidth,timelineHeight:r,panelHeight:r,isMobile:i};return s.width!==e.width&&(s=ft(s,{type:"detectBaseScale"})),s}case"setPanelWidth":{const r=Math.max(240,Math.min(t.width,e.width-240)),i=e.withPanel&&e.selected&&!e.isMobile?e.width-r:e.width;return ft({...e,timelineWidth:i,panelWidth:r},{type:"detectBaseScale"})}case"setFilter":return{...e,filter:t.filter};case"deselect":return ft({...e,selected:null,timelineWidth:e.width},{type:"detectBaseScale"});case"select":{const r=e.spanMap[t.id];return r?ft({...e,selected:r,timelineWidth:e.width-(e.withPanel&&!e.isMobile?e.panelWidth:0)},{type:"detectBaseScale"}):e}case"escape":return e.selected?ft(e,{type:"deselect"}):ft(e,{type:"resetScale"});case"toggleSelection":{let r=e;return e.selected&&(r=ft(r,{type:"deselect"})),((n=e.selected)==null?void 0:n.span.spanId)===t.id?r:ft(r,{type:"select",id:t.id})}case"detectBaseScale":{const r=(e.timelineWidth-e.scrollbarWidth)/e.root.duration;return ft({...e,baseScale:r,scale:r*e.scaleRatio},{type:"minScale"})}case"setScale":return{...e,scaleRatio:t.scale,scale:e.baseScale*t.scale};case"resetScale":return ft(e,{type:"scaleToRange",t1:e.root.startTime,t2:e.root.endTime});case"scaleToNode":{const r=e.spanMap[t.id];return r?ft(ft(e,{type:"setScale",scale:(e.width-e.scrollbarWidth-(e.withPanel&&!e.isMobile?e.panelWidth:0))/r.duration/e.baseScale}),{type:"setScrollSnapshot",anchorT:r.startTime-e.root.startTime,anchorX:0}):e}case"scaleToRange":{const r=Math.abs(t.t1-t.t2);return ft(ft(e,{type:"setScale",scale:(e.width-e.scrollbarWidth-(e.selected&&e.withPanel?e.panelWidth:0))/r/e.baseScale}),{type:"setScrollSnapshot",anchorT:Math.min(t.t1,t.t2)-e.root.startTime,anchorX:0})}case"adjustScaleRatio":{let{scaleRatio:r}=e;switch(t.direction){case-1:r*=.8;break;case 1:r*=1.25;break;default:r=1;break}const i=e.timelineRef.current;if(!i)return console.warn("timelineRef is null"),e;const{clientWidth:s,scrollLeft:a}=i;return ft(ft({...e,scaleRatio:r,scale:e.baseScale*r},{type:"minScale"}),{type:"setScrollSnapshot",anchorT:(a+s*.5)/e.scale,anchorX:s*.5})}case"trackpadScale":{const r=kh(e)/e.baseScale,i=Math.max(r,e.scaleRatio*(1+.2*Math.sign(t.delta)*Math.sqrt(Math.abs(t.delta))));return ft({...e,scaleRatio:i,scale:e.baseScale*i},{type:"setScrollSnapshot",anchorT:t.anchorT,anchorX:t.anchorX})}case"minScale":{const r=kh(e);return e.scale>=r?e:{...e,scale:r,scaleRatio:r/e.baseScale}}case"setScrollSnapshot":{const r=e.timelineRef.current;if(!r)return e;const{anchorT:i,anchorX:s}=t,a=i*e.scale-s,{scrollTop:o}=r,l=(o-No-eo)/(pr+Ns),u=l+Math.ceil(e.timelineHeight/(pr+Ns));return e.scrollSnapshotRef.current={anchorT:i,anchorX:s,scrollLeft:a,scrollTop:o,startTime:e.root.startTime+a/e.scale,endTime:e.root.startTime+(a+e.timelineWidth)/e.scale,startRow:l,endRow:u,scale:e.scale},e}case"setWithPanel":{if(e.withPanel===t.withPanel)return e;const r=t.withPanel&&e.selected&&!e.isMobile?e.width-e.panelWidth:e.width;return ft({...e,withPanel:t.withPanel,timelineWidth:r},{type:"detectBaseScale"})}case"forceRender":return e.memoCacheRef.current.set("",{}),{...e};case"updateRoot":return e.memoCacheRef.current.set("",{}),ft({...e,root:t.root,spanMap:t.spanMap,resourceMap:Object.fromEntries(t.resources.map(({name:r,attributes:i})=>[r,i]))},{type:"detectBaseScale"})}};function gM({getQuickLinks:e,withPanel:t=!1,children:n,customSpanClassNameFunc:r,customSpanEventClassNameFunc:i,customPanelComponent:s=null}){const a=x.useRef(null),o=x.useRef(void 0),l=x.useRef(e);l.current=e;const u=x.useRef(new Map),d=x.useRef(new Map),[c,h]=x.useReducer(ft,Nc,m=>({...m,scrollbarWidth:s4(),timelineRef:a,scrollSnapshotRef:o,customSpanClassNameFunc:r,customSpanEventClassNameFunc:i,memoCacheRef:u,withPanel:t,getQuickLinks:E=>{var k;const T=E.spanId,b=d.current.get(T);if(b)return b;const y=((k=l.current)==null?void 0:k.call(l,E))||[];return d.current.set(T,y),y}}));x.useEffect(()=>h({type:"setWithPanel",withPanel:t}),[t]);const p=x.useMemo(()=>({state:c,dispatch:h}),[c,h]);return g.jsx(eb.Provider,{value:s,children:g.jsx(Oc.Provider,{value:p,children:n})})}const Oo=()=>x.useContext(Oc),eb=x.createContext(null),a4=()=>x.useContext(eb),o4="_traceNode_1fmf2_1",l4="_childRow_1fmf2_5",u4="_spanNode_1fmf2_11",c4="_huge_1fmf2_31",d4="_spanName_1fmf2_34",f4="_spanSpacer_1fmf2_40",h4="_spanDuration_1fmf2_44",p4="_small_1fmf2_62",m4="_xHover_1fmf2_62",g4="_spanNodeEvent_1fmf2_118",b4="_eventDiamond_1fmf2_124",E4="_customEventColor_1fmf2_140",T4="_hoverInfo_1fmf2_145",x4="_eventName_1fmf2_149",y4="_eventTimestamp_1fmf2_153",_4="_alignStart_1fmf2_174",k4="_alignEnd_1fmf2_178",w4="_colorVercel_1fmf2_205",C4="_color0_1fmf2_213",A4="_color1_1fmf2_220",S4="_color2_1fmf2_227",I4="_color3_1fmf2_234",v4="_color4_1fmf2_241",R4="_colorHighlight_1fmf2_248",N4="_unlit_1fmf2_256",O4="_mapContainer_1fmf2_262",L4="_spanDetailPanel_1fmf2_329",D4="_spanDetailPanelResizer_1fmf2_338",P4="_spanDetailPanelTop_1fmf2_353",M4="_spanDetailPanelBody_1fmf2_362",B4="_spanDetailPanelTopInfo_1fmf2_375",F4="_spanNameDetailPanel_1fmf2_389",H4="_spanDetailPanelTruncatedHeading_1fmf2_395",U4="_spanDetailPanelName_1fmf2_405",j4="_spanDetailPanelDuration_1fmf2_416",z4="_spanDetailPanelCorner_1fmf2_427",$4="_spanDetailPanelCornerInner_1fmf2_437",V4="_spanDetailPanelCloseVerticalRule_1fmf2_445",W4="_spanDetailPanelClose_1fmf2_445",Y4="_spanDetailPanelAttribute_1fmf2_467",G4="_spanDetailPanelAttributeKey_1fmf2_484",q4="_spanDetailPanelAttributeValue_1fmf2_492",K4="_spanDetailPanelQuickLink_1fmf2_503",X4="_spanDetailPanelQuickLinkLabel_1fmf2_506",Q4="_detailGroup_1fmf2_519",Z4="_expanded_1fmf2_533",J4="_collapsed_1fmf2_534",eD="_ancestorGroup_1fmf2_535",tD="_detailHeading_1fmf2_539",nD="_buttonLink_1fmf2_562",rD="_note_1fmf2_581",iD="_skeleton_1fmf2_589",sD="_skeletonRounded_1fmf2_595",aD="_detailHeadingIcon_1fmf2_599",oD="_infraSpanDescription_1fmf2_603",lD="_ancestorNode_1fmf2_613",uD="_ancestorText_1fmf2_629",cD="_ancestorName_1fmf2_639",dD="_ancestorDuration_1fmf2_644",fD="_ancestorLineContainer_1fmf2_649",hD="_ancestorLine_1fmf2_649",pD="_zoomButtonGroup_1fmf2_701",mD="_zoomButton_1fmf2_701",gD="_divider_1fmf2_751",bD="_markersContainer_1fmf2_758",ED="_markers_1fmf2_758",TD="_marker_1fmf2_758",xD="_notch_1fmf2_792",yD="_markerLabel_1fmf2_798",_D="_markerClockTime_1fmf2_807",kD="_eventMarkersContainer_1fmf2_816",wD="_eventMarkers_1fmf2_816",CD="_eventMarker_1fmf2_816",AD="_cursorMarkerStickyParent_1fmf2_839",SD="_cursorMarkerLabelContainer_1fmf2_848",ID="_cursorMarkerLabel_1fmf2_848",vD="_cursorMarkerContainer_1fmf2_898",RD="_cursorMarker_1fmf2_839",ND="_cursorSelection_1fmf2_916",OD="_traceViewer_1fmf2_966",LD="_mapCanvas_1fmf2_972",DD="_zoomButtonTraceViewer_1fmf2_988",PD="_timeline_1fmf2_1011",MD="_searchBar_1fmf2_1019",BD="_searchInput_1fmf2_1031",FD="_searchInputLabel_1fmf2_1038",HD="_searchInputPrefix_1fmf2_1063",UD="_mapThumb_1fmf2_1101",jD="_spanDetailPanelTraceViewer_1fmf2_1115",zD="_traceViewerContent_1fmf2_1134",$D="_inert_1fmf2_1144",VD="_hidden_1fmf2_1180",WD="_mobile_1fmf2_1184",YD="_spanRunning_1fmf2_1194",GD="_spanPending_1fmf2_1195",qD="_spanCompleted_1fmf2_1203",KD="_spanCancelled_1fmf2_1211",XD="_spanFailed_1fmf2_1219",QD="_spanPendingStriped_1fmf2_1228",ZD="_hasQueuedTime_1fmf2_1242",JD="_spanSleep_1fmf2_1254",e5="_spanHook_1fmf2_1263",t5="_segmentLayer_1fmf2_1275",n5="_segment_1fmf2_1275",r5="_segmentLabel_1fmf2_1291",i5="_segmentTag_1fmf2_1306",s5="_segQueued_1fmf2_1314",a5="_segRunning_1fmf2_1325",o5="_segFailed_1fmf2_1330",l5="_segRetrying_1fmf2_1335",u5="_segSucceeded_1fmf2_1346",c5="_segWaiting_1fmf2_1351",d5="_segSleeping_1fmf2_1362",f5="_segReceived_1fmf2_1367",h5="_boundaryMarker_1fmf2_1372",p5="_boundaryLine_1fmf2_1373",m5="_hasSegments_1fmf2_1395",g5="_eventFailed_1fmf2_1432",b5="_eventRetrying_1fmf2_1441",E5="_eventHook_1fmf2_1450",T5="_eventDefault_1fmf2_1459",oe={traceNode:o4,childRow:l4,spanNode:u4,huge:c4,spanName:d4,spanSpacer:f4,spanDuration:h4,small:p4,xHover:m4,spanNodeEvent:g4,eventDiamond:b4,customEventColor:E4,hoverInfo:T4,eventName:x4,eventTimestamp:y4,alignStart:_4,alignEnd:k4,colorVercel:w4,color0:C4,color1:A4,color2:S4,color3:I4,color4:v4,colorHighlight:R4,unlit:N4,mapContainer:O4,spanDetailPanel:L4,spanDetailPanelResizer:D4,spanDetailPanelTop:P4,spanDetailPanelBody:M4,spanDetailPanelTopInfo:B4,spanNameDetailPanel:F4,spanDetailPanelTruncatedHeading:H4,spanDetailPanelName:U4,spanDetailPanelDuration:j4,spanDetailPanelCorner:z4,spanDetailPanelCornerInner:$4,spanDetailPanelCloseVerticalRule:V4,spanDetailPanelClose:W4,spanDetailPanelAttribute:Y4,spanDetailPanelAttributeKey:G4,spanDetailPanelAttributeValue:q4,spanDetailPanelQuickLink:K4,spanDetailPanelQuickLinkLabel:X4,detailGroup:Q4,expanded:Z4,collapsed:J4,ancestorGroup:eD,detailHeading:tD,buttonLink:nD,note:rD,skeleton:iD,skeletonRounded:sD,detailHeadingIcon:aD,infraSpanDescription:oD,ancestorNode:lD,ancestorText:uD,ancestorName:cD,ancestorDuration:dD,ancestorLineContainer:fD,ancestorLine:hD,zoomButtonGroup:pD,"zoom-buttons-fade-in":"_zoom-buttons-fade-in_1fmf2_1",zoomButton:mD,divider:gD,markersContainer:bD,markers:ED,marker:TD,notch:xD,markerLabel:yD,markerClockTime:_D,eventMarkersContainer:kD,eventMarkers:wD,eventMarker:CD,cursorMarkerStickyParent:AD,cursorMarkerLabelContainer:SD,cursorMarkerLabel:ID,cursorMarkerContainer:vD,cursorMarker:RD,cursorSelection:ND,traceViewer:OD,"span-skeleton":"_span-skeleton_1fmf2_1",mapCanvas:LD,zoomButtonTraceViewer:DD,timeline:PD,searchBar:MD,searchInput:BD,searchInputLabel:FD,searchInputPrefix:HD,mapThumb:UD,spanDetailPanelTraceViewer:jD,traceViewerContent:zD,inert:$D,hidden:VD,mobile:WD,spanRunning:YD,spanPending:GD,spanCompleted:qD,spanCancelled:KD,spanFailed:XD,spanPendingStriped:QD,hasQueuedTime:ZD,spanSleep:JD,spanHook:e5,segmentLayer:t5,segment:n5,segmentLabel:r5,segmentTag:i5,segQueued:s5,segRunning:a5,segFailed:o5,segRetrying:l5,segSucceeded:u5,segWaiting:c5,segSleeping:d5,segReceived:f5,boundaryMarker:h5,boundaryLine:p5,hasSegments:m5,eventFailed:g5,eventRetrying:b5,eventHook:E5,eventDefault:T5};function ga([e,t]){return e*1e3+t/1e6}function bM(e){return[Math.floor(e/1e3),e%1e3*1e3]}const EM=e=>on(e,!0),wh=new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2});function TM(e){return e>=1e3?`${wh.format(e/1e3)}s`:`${wh.format(e)}ms`}function xM(e){const t=new Date(e),n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),i=String(t.getSeconds()).padStart(2,"0"),s=String(t.getMilliseconds()).padStart(3,"0");return`${n}:${r}:${i}.${s}`}const x5={queued:"segQueued",running:"segRunning",failed:"segFailed",retrying:"segRetrying",succeeded:"segSucceeded",waiting:"segWaiting",sleeping:"segSleeping",received:"segReceived"};function y5(e){return Math.max(0,Math.min(1,e))}function Sn(e,t,n){return n<=0?0:y5((e-t)/n)}function Ks(e){return[...e].sort((t,n)=>t.timestamp-n.timestamp)}function _5(e){const t=e.events?Ks(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const s=t.filter(l=>["step_started","step_retrying","step_failed","step_completed"].includes(l.event.name)).map(l=>({time:l.timestamp,type:l.event.name}));if(s.length===0)return i.push({startFraction:0,endFraction:1,status:"running"}),i;const a=s[0],o=Sn(a.time,n,r);o>.001&&i.push({startFraction:0,endFraction:o,status:"queued"});for(let l=0;l<s.length;l++){const u=s[l],d=Sn(u.time,n,r),c=s[l+1],h=c?Sn(c.time,n,r):1;if(u.type==="step_started")if(l===s.length-1)i.push({startFraction:d,endFraction:1,status:"succeeded"});else{const m=c.type,E=m==="step_retrying"||m==="step_failed"?"failed":m==="step_completed"?"succeeded":"running";i.push({startFraction:d,endFraction:h,status:E})}else u.type==="step_retrying"?i.push({startFraction:d,endFraction:h,status:"retrying"}):u.type==="step_failed"?d<.999&&i.push({startFraction:d,endFraction:1,status:"failed"}):u.type}return i}function k5(e){const t=e.events?Ks(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const s=t.find(u=>u.event.name==="hook_received"),a=t.find(u=>u.event.name==="hook_disposed");if(!s&&!a)return i.push({startFraction:0,endFraction:1,status:"waiting"}),i;const o=s?Sn(s.timestamp,n,r):null,l=a?Sn(a.timestamp,n,r):null;if(o!==null&&o>.001?i.push({startFraction:0,endFraction:o,status:"waiting"}):o===null&&l!==null&&i.push({startFraction:0,endFraction:l,status:"waiting"}),o!==null){const u=l??1;i.push({startFraction:o,endFraction:u,status:"received"})}return l!==null&&l<.999&&i.push({startFraction:l,endFraction:1,status:"succeeded"}),i}function w5(e){const t=e.events?Ks(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const s=t.find(o=>o.event.name==="wait_completed");if(!s)return i.push({startFraction:0,endFraction:1,status:"sleeping"}),i;const a=Sn(s.timestamp,n,r);return a>.001&&i.push({startFraction:0,endFraction:a,status:"sleeping"}),i.push({startFraction:a,endFraction:1,status:"succeeded"}),i}function C5(e){var d;const t=e.events?Ks(e.events):[],{startTime:n,duration:r,activeStartTime:i}=e,s=[];if(r<=0)return s;if(!t.some(c=>c.event.name==="run_created")){const c=(d=e.span.attributes)==null?void 0:d.data,h=c==null?void 0:c.status;return A5(n,r,i,h)}const o=t.find(c=>c.event.name==="run_failed"),l=t.find(c=>c.event.name==="run_completed");let u=0;if(i&&i>n){const c=Sn(i,n,r);c>.001&&(s.push({startFraction:0,endFraction:c,status:"queued"}),u=c)}if(o){const c=Sn(o.timestamp,n,r);c>u+.001&&s.push({startFraction:u,endFraction:c,status:"running"}),s.push({startFraction:c,endFraction:1,status:"failed"})}else if(l){const c=Sn(l.timestamp,n,r);c>u+.001&&s.push({startFraction:u,endFraction:c,status:"running"}),s.push({startFraction:c,endFraction:1,status:"succeeded"})}else s.push({startFraction:u,endFraction:1,status:"running"});return s}function A5(e,t,n,r){const i=[];let s=0;if(n&&n>e){const a=Sn(n,e,t);a>.001&&(i.push({startFraction:0,endFraction:a,status:"queued"}),s=a)}return r==="failed"?i.push({startFraction:s,endFraction:1,status:"failed"}):r==="completed"||r==="cancelled"?i.push({startFraction:s,endFraction:1,status:"succeeded"}):i.push({startFraction:s,endFraction:1,status:"running"}),i}const S5={step_started:"Started",step_retrying:"Retrying",step_failed:"Failed",hook_created:"Created",hook_received:"Received",hook_disposed:"Resolved",wait_created:"Sleep started",wait_completed:"Sleep completed",run_completed:"Completed",run_failed:"Run failed",step_completed:"Completed"};function ba(e,t){const n=e.events?Ks(e.events):[],{startTime:r,duration:i}=e;if(i<=0)return[];const s=[];for(const a of n){if(!t.includes(a.event.name))continue;const o=Sn(a.timestamp,r,i);o<.01||o>.99||s.push({fraction:o,label:S5[a.event.name]??a.event.name,offsetMs:a.timestamp-r})}return s}function tb(e,t){switch(e){case"step":return{segments:_5(t),boundaries:ba(t,["step_started","step_retrying","step_failed","step_completed"])};case"hook":return{segments:k5(t),boundaries:ba(t,["hook_created","hook_received","hook_disposed"])};case"sleep":return{segments:w5(t),boundaries:ba(t,["wait_created","wait_completed"])};case"run":return{segments:C5(t),boundaries:ba(t,["run_completed","run_failed"])};default:return{segments:[],boundaries:[]}}}function I5(e){return e.isInstrumentationHint?"Get Started":on(e.duration)}const nb={queued:"Queued",running:"",failed:"Failed",retrying:"Retry wait",succeeded:"Executed",waiting:"Waiting",sleeping:"Sleeping",received:"Received"};function v5({segments:e,spanDuration:t}){return e.length===0?null:g.jsx("div",{className:oe.segmentLayer,children:e.map((n,r)=>{const i=oe[x5[n.status]],s=(n.endFraction-n.startFraction)*t,a=nb[n.status],o={left:`${n.startFraction*100}%`,width:`${(n.endFraction-n.startFraction)*100}%`};return g.jsx("div",{className:`${oe.segment} ${String(i)}`,style:o,title:a?`${a} ${on(s)}`:on(s)},`seg-${n.status}-${String(r)}`)})})}function R5(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r],s=nb[i.status];if(!s)continue;let a=(i.endFraction-i.startFraction)*t;if(a<1&&(i.status==="succeeded"||i.status==="failed")&&r>0){const o=e[r-1];o.status==="running"&&(a=(o.endFraction-o.startFraction)*t)}a<1||n.push({label:s,duration:on(a)})}return n}function rb({node:e,layout:t,durationMs:n,segmentTags:r}){const i=e.isInstrumentationHint?I5(e):on(n??e.duration);if(t.isSmall&&!t.isHovered)return null;const s=r&&r.length>0&&(t.isHovered||t.width>200);return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:oe.spanName,children:[e.label||e.span.name,s?r.map((a,o)=>g.jsxs("span",{className:oe.segmentTag,children:[" · ",a.label," ",a.duration]},o)):null]}),t.isHuge?g.jsx("span",{className:oe.spanSpacer}):null,t.isHovered||t.width>128?g.jsx("span",{className:oe.spanDuration,children:i}):null]})}function N5({node:e,layout:t}){return g.jsx(rb,{node:e,layout:t})}function Lo({resourceType:e,node:t,layout:n,durationMs:r}){const i=r??t.duration,{segments:s}=tb(e,t),a=R5(s,i);return g.jsxs(g.Fragment,{children:[g.jsx(v5,{segments:s,spanDuration:i}),g.jsx(rb,{durationMs:i,node:t,layout:n,segmentTags:a})]})}function O5(e){return g.jsx(Lo,{resourceType:"run",...e})}function L5(e){return g.jsx(Lo,{resourceType:"step",...e})}function D5(e){return g.jsx(Lo,{resourceType:"hook",...e})}function P5(e){return g.jsx(Lo,{resourceType:"sleep",...e})}function M5({resourceType:e,...t}){switch(e){case"run":return g.jsx(O5,{...t});case"step":return g.jsx(L5,{...t});case"hook":return g.jsx(D5,{...t});case"sleep":return g.jsx(P5,{...t});default:return g.jsx(N5,{...t})}}const B5=4;function F5(e){var n;const t=(n=e.span.attributes)==null?void 0:n.resource;return t==="run"||t==="step"||t==="hook"||t==="sleep"?t:"default"}function H5(e){return e<64}function U5(e){return e>=500}function j5(e,t){return e.isHovered&&!t&&e.isHighlighted!==!1}function z5(e,t,n,r){if(!r)return!1;let i=t.duration,s=t.endTime;const a=n.current;return a&&(i=a.endTime-a.startTime,s=a.endTime),s-e.startTime<.25*i}function Xs(e,t,n,r){const i=(e.startTime-t.startTime)*n;let s=No+(pr+Ns)*e.row;const a=e.duration*n,o=Math.max(a,B5);let l=pr;const u=U5(a),d=H5(a),c=j5(e,u),h=c||!!e.isSelected;d&&!h&&(l*=.4,s+=(pr-l)*.5);const p=z5(e,t,r,h);return{width:o,actualWidth:a,height:l,top:s,left:i,isSmall:d,isHuge:u,isHovered:c,isExpanded:h,isNearRightSide:p}}function $5(e,t,n,r){return Xs(e,t,n,r)}function V5(e,t,n,r){return Xs(e,t,n,r)}function W5(e,t,n,r){return Xs(e,t,n,r)}function Y5(e,t,n,r){return Xs(e,t,n,r)}function G5(e,t,n,r,i){switch(e){case"run":return $5(t,n,r,i);case"step":return V5(t,n,r,i);case"hook":return W5(t,n,r,i);case"sleep":return Y5(t,n,r,i);default:return Xs(t,n,r,i)}}const Lc=e=>e.isVercel?String(oe.colorVercel):String(oe[`color${e.resourceIndex%5}`]);function q5(e,t){const n=t.events;if(n!=null&&n.length)switch(e){case"hook":for(let r=n.length;r--;)if(n[r].event.name==="hook_disposed")return n[r].timestamp;return;case"sleep":for(let r=n.length;r--;)if(n[r].event.name==="wait_completed")return n[r].timestamp;return;case"run":for(let r=n.length;r--;){const i=n[r].event.name;if(i==="run_completed"||i==="run_failed"||i==="run_cancelled")return n[r].timestamp}return;case"step":for(let r=n.length;r--;){const i=n[r].event.name;if(i==="step_completed"||i==="step_failed")return n[r].timestamp;if(i==="step_started"||i==="step_retrying")return}return;default:return}}const yM=x.memo(function({root:t,scale:n,spans:r,isLive:i=!1,scrollSnapshotRef:s,cache:a,customSpanClassNameFunc:o,customSpanEventClassNameFunc:l}){return r.map(u=>g.jsx(X5,{cacheKey:a.get(u.span.spanId),customSpanEventClassNameFunc:l,customSpanClassNameFunc:o,node:u,root:t,scale:n,traceIsLive:i,scrollSnapshotRef:s},u.span.spanId))});function K5(e,t,n,r){const i=e.isExpanded;return{"--span-width":`${Math.max(e.actualWidth,1)}px`,minWidth:i?e.width:void 0,width:i?void 0:e.width,height:e.height,maxWidth:i&&!e.isNearRightSide?(n.endTime-t.startTime)*r:void 0,containIntrinsicWidth:i?void 0:e.width,containIntrinsicHeight:e.height,left:e.isNearRightSide?void 0:e.left,right:e.isNearRightSide?(n.endTime-t.endTime)*r:void 0,top:e.top}}const X5=x.memo(function({node:t,root:n,scale:r,traceIsLive:i=!1,scrollSnapshotRef:s,customSpanClassNameFunc:a,customSpanEventClassNameFunc:o}){var H;const l=x.useRef(null);x.useEffect(()=>(t.ref=l,()=>{t.ref=void 0}),[t]);const{span:u}=t,d=F5(t),[c,h]=x.useState(0),p=a?a(t):"",m=d!=="default",E=(H=u.attributes)==null?void 0:H.data,T=q5(d,t),b=T!=null,k=(d==="hook"?!!(E!=null&&E.disposedAt):!!(E!=null&&E.completedAt))||b,P=i&&m&&!k;x.useEffect(()=>{if(!P)return;h(Date.now());const U=setInterval(()=>{h(Date.now())},250);return()=>clearInterval(U)},[P]);const D=ga(u.startTime),v=ga(u.endTime),A=ga(u.duration),N=u.activeStartTime?ga(u.activeStartTime):void 0,z=T!=null?Math.max(0,T-D):P?Math.max(0,(c||Date.now())-D):A,R=t.isInstrumentationHint?"Get Started":on(z),W={...t,startTime:D,endTime:v,duration:A,activeStartTime:N},j=P?{...W,duration:z,endTime:D+z}:W,w=m&&tb(d,j).segments.length>0,L=G5(d,j,n,r,s);if(P){const G=z*r,Q=Math.max(G,4);L.actualWidth=G,L.width=Q,L.isSmall=G<64,L.isHuge=G>=500,L.isSmall||(L.height=pr,L.top=No+(pr+Ns)*j.row)}x.useEffect(()=>{if(!P||!l.current)return;let U=0;const G=()=>{const Q=l.current;if(!Q)return;const _=Date.now()-D,se=Math.max(_*r,2);Q.style.width=`${se}px`,Q.style.setProperty("--span-width",`${se}px`),U=requestAnimationFrame(G)};return U=requestAnimationFrame(G),()=>cancelAnimationFrame(U)},[P,D,r]);const M=j;return g.jsxs(g.Fragment,{children:[g.jsx("button",{"aria-label":`${u.name} - ${R}`,className:Pt(oe.spanNode,L.isHuge&&oe.huge,L.isSmall&&oe.small,L.isExpanded&&oe.xHover,t.isHighlighted?oe.colorHighlight:Lc(t),t.isHighlighted===!1&&oe.unlit,p,w&&oe.hasSegments),"data-span-id":u.spanId,"data-start-time":j.startTime-n.startTime,"data-right-side":L.isNearRightSide,"data-selected":t.isSelected?"":void 0,ref:l,style:K5(L,j,n,r),type:"button",children:g.jsx(M5,{durationMs:z,resourceType:d,node:M,layout:L})}),j.events&&!L.isSmall?j.events.map(U=>g.jsx(Z5,{customSpanEventClassNameFunc:o,event:U,node:j,root:n,scale:r,asBoundary:m},U.key)):null]})}),Q5={step_started:"Started",step_retrying:"Retrying",step_failed:"Failed",hook_created:"Created",hook_received:"Received",hook_disposed:"Resolved",wait_created:"Sleep started",wait_completed:"Sleep completed",run_started:"Started",run_completed:"Completed",run_failed:"Run failed",step_completed:"Completed"},Z5=x.memo(function({event:t,node:n,root:r,scale:i,customSpanEventClassNameFunc:s,asBoundary:a=!1}){const o=x.useRef(null);x.useEffect(()=>(t.ref=o,()=>{t.ref=void 0}),[t]);const{event:{name:l}}=t,u=on(t.timestamp-r.startTime),d=a?Q5[l]??l:l,c=a&&(l==="step_started"||l==="run_started"||l==="step_retrying"),h=a&&(l==="step_completed"||l==="run_completed");let p=null,m=null;if((c||h)&&n.events){const k=[...n.events].sort((D,v)=>D.timestamp-v.timestamp),P=k.findIndex(D=>D.key===t.key);if(h){let D=null;for(let v=P-1;v>=0;v--)if(k[v].event.name==="step_started"){D=k[v].timestamp;break}D!==null&&(p=on(t.timestamp-D),m="Executed")}else{const D=k[P+1],v=D?D.timestamp:n.endTime;p=on(v-t.timestamp),m=l==="step_retrying"?"Waited":"Executed"}}const E=(t.timestamp-r.startTime)*i,T=No+(pr+Ns)*n.row,b=n.duration<=0||(t.timestamp-n.startTime)/n.duration<.5,y=s?s(t):"";return g.jsxs("div",{title:p?`${d} ${u}
172
+ ${m} ${p}`:`${d} ${u}`,className:Pt(oe.spanNodeEvent,y,a&&oe.boundaryMarker,n.isHighlighted?oe.colorHighlight:Lc(n),n.isHighlighted===!1&&oe.unlit),"data-hovered":t.isHovered,ref:o,style:{left:E,top:T},children:[g.jsx("div",{className:Pt(oe.hoverInfo,b?oe.alignStart:oe.alignEnd),children:a?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:oe.eventName,children:d}),g.jsx("span",{className:oe.eventTimestamp,children:u}),p?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:oe.eventName,children:m}),g.jsx("span",{className:oe.eventTimestamp,children:p})]}):null]}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:oe.eventName,children:l}),g.jsx("span",{className:oe.eventTimestamp,children:u})]})}),a?g.jsx("div",{className:oe.boundaryLine}):g.jsx("div",{className:oe.eventDiamond})]})}),ib={"gray-700":"var(--ds-gray-700)","gray-900":"var(--ds-gray-900)"};function J5({size:e=16,color:t="gray-700"}){const n={color:ib[t]||t};return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:n,"aria-hidden":!0,children:[g.jsx("title",{children:"Cross"}),g.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function eP({size:e=16}){return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,className:oe.detailHeadingIcon,children:[g.jsx("title",{children:"Chevron Down"}),g.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function tP({size:e=16,color:t="gray-900"}){const n={color:ib[t]||t};return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",style:n,"aria-hidden":!0,children:[g.jsx("title",{children:"External Small"}),g.jsx("path",{d:"M14 4h6m0 0v6m0-6L10 14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M20 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function nP(e){const{as:t,className:n,href:r,children:i,...s}=e;return(t||"a")==="span"||!r?g.jsx("span",{className:n,...s,children:i}):g.jsx("a",{className:n,href:r,...s,children:i})}function rP(e){const{className:t,children:n,size:r,...i}=e;return g.jsx("a",{...i,className:Pt(oe.buttonLink,t),children:n})}function iP({children:e,className:t}){return g.jsx("div",{className:Pt(oe.note,t),children:e})}function Ch({width:e,height:t,rounded:n}){return g.jsx("span",{className:Pt(oe.skeleton,n&&oe.skeletonRounded),style:{width:e,height:t},"aria-hidden":!0})}const Ah=e=>`${(100*e).toFixed(3)}%`,Sh=(e,t)=>e<t?-1:e>t?1:0,Ih=e=>{const t={};for(const[r,i]of Object.entries(e)){const s=r.indexOf(".");let a="",o="";s!==-1?(a=r.substring(0,s),o=r.substring(s+1)):o=r;let l=t[a];l||(l={prefix:a,attributes:[]},t[a]=l),l.attributes.push({key:r,suffix:o,value:String(i)})}const n=Array.from(Object.values(t)).sort((r,i)=>Sh(r.prefix,i.prefix));for(const r of n)r.attributes.sort((i,s)=>Sh(i.suffix,s.suffix));return n},sP=(e,t)=>{const n=[];if(!t)return n;for(let r=t;"parent"in r;r=r.parent)n.unshift(r);return n},aP=()=>{var d;const{state:{root:e,selected:t,resourceMap:n,getQuickLinks:r},dispatch:i}=Oo(),s=x.useMemo(()=>sP(e,t),[e,t]),a=x.useMemo(()=>Ih((t==null?void 0:t.span.attributes)??{}),[t]),o=x.useMemo(()=>{const c=t==null?void 0:t.span.resource;if(!c)return[];const h=n[c];return h?Ih(h):[]},[n,t]);if(!t)return null;const{span:l}=t,u=sb(t);return g.jsxs(g.Fragment,{children:[t.isVercel?g.jsx(cP,{node:t}):null,t.isInstrumentationHint?g.jsx(pP,{}):null,!t.isInstrumentationHint&&s.length?g.jsx(fr,{className:oe.ancestorGroup,name:"Location",children:s.map(c=>g.jsxs("button",{className:oe.ancestorNode,onClick:()=>i({type:"select",id:c.span.spanId}),type:"button",children:[g.jsxs("div",{className:oe.ancestorText,children:[g.jsx("span",{className:oe.ancestorName,children:c.label||c.span.name}),g.jsx("span",{className:oe.ancestorDuration,children:on(c.duration)})]}),g.jsx("span",{"aria-hidden":!0,className:oe.ancestorLineContainer,children:g.jsx("span",{className:Pt(oe.ancestorLine,Lc(c)),style:{left:Ah((c.startTime-e.startTime)/e.duration),width:Ah(c.duration/e.duration)}})})]},`${t.span.spanId}.${c.span.spanId}`))}):null,u?g.jsx(dP,{getQuickLinks:r,span:t.span}):null,(d=t.events)!=null&&d.length?g.jsx(fr,{name:"Events",children:t.events.map(c=>g.jsxs(x.Fragment,{children:[g.jsxs("dl",{className:oe.spanDetailPanelAttribute,children:[g.jsx("dt",{className:oe.spanDetailPanelAttributeKey,children:c.event.name}),g.jsx("dd",{className:oe.spanDetailPanelAttributeValue,children:on(c.timestamp-e.startTime)})]}),Object.entries(c.event.attributes).map(([h,p])=>g.jsx(ji,{name:`${c.event.name}.${h}`,value:p},h))]},c.key))}):null,a.length?g.jsx(fr,{name:"Attributes",children:a.map(c=>g.jsx(x.Fragment,{children:c.attributes.map(({key:h,value:p})=>g.jsx(ji,{name:h,value:p},h))},c.prefix))}):null,o.length?g.jsx(fr,{name:"Resource",children:o.map(c=>g.jsx(x.Fragment,{children:c.attributes.map(({key:h,value:p})=>g.jsx(ji,{name:h,value:p},h))},c.prefix))}):null,t.isInstrumentationHint?null:g.jsxs(fr,{name:"Library",children:[g.jsx(ji,{name:"name",value:l.library.name}),l.library.version?g.jsx(ji,{name:"version",value:l.library.version}):null]})]})};function _M({attached:e=!1}){const{state:{selected:t,isMobile:n},dispatch:r}=Oo(),i=a4();if(!t)return null;const{span:s}=t;return g.jsxs("div",{className:Pt(oe.spanDetailPanel,n&&oe.mobile),children:[e&&!n?g.jsx(mP,{}):null,g.jsx("div",{className:oe.spanDetailPanelTop,children:g.jsxs("div",{className:oe.spanDetailPanelTopInfo,children:[g.jsx("span",{className:oe.spanDetailPanelName,title:s.name,children:s.name}),g.jsxs("div",{className:oe.spanDetailPanelCorner,children:[t.isInstrumentationHint?null:g.jsx("span",{className:oe.spanDetailPanelDuration,children:on(t.duration)}),g.jsx("div",{className:oe.spanDetailPanelCloseVerticalRule}),g.jsx("button",{"aria-label":"Close Span Details",className:oe.spanDetailPanelClose,onClick:()=>r({type:"deselect"}),type:"button",children:g.jsx(J5,{color:"gray-700",size:20})})]})]})}),g.jsx("div",{className:Pt("flex gap-3",oe.spanDetailPanelBody),children:i||g.jsx(aP,{})})]})}const vh="vc-trace-span-exp:";function fr({name:e,className:t="",children:n}){const[r,i]=x.useState(()=>"localStorage"in globalThis?localStorage.getItem(`${vh}${e}`)!=="0":!0),s=x.useCallback(()=>{i(a=>{const o=!a;return localStorage.setItem(`${vh}${e}`,String(Number(o))),o})},[e]);return g.jsxs("div",{className:Pt(oe.detailGroup,r?oe.expanded:oe.collapsed,t),children:[g.jsxs("button",{className:oe.detailHeading,onClick:s,type:"button",children:[g.jsx("span",{children:e}),g.jsx(eP,{})]}),r?n:null]})}const oP=new Set(["OPTIONS","HEAD","GET","PUT","POST","DELETE"]),lP={"Resolve Deployment":"How long it took Vercel's routing layer to retrieve details for the deployment.","Resolve Cache":"How long it took Vercel's routing layer to check for a cached function invocation.","Resolve Route":"How long it took Vercel's routing layer to resolve routing rules, including redirects and rewrites.","Invoke Middleware":"How long it took this middleware to start and run user code.","Invoke Function":"How long it took this Vercel Function to start and run user code.",waitUntil:"How long it took to run user code inside of waitUntil.","Start VM":"How long it took to start the Virtual Machine which contains the Vercel Function.","Spawn Node.js":"How long it took the Virtual Machine to start the Node.js runtime.","Spawn Python":"How long it took the Virtual Machine to start the Python runtime.","Init User Code":"How long it took to import the user code and run any globally-scoped code."},Rh=new Set(["Start VM","Spawn Node.js","Spawn Python","Init User Code"]),Nh=e=>{if(!e||!("span"in e))return null;const t=e.span.attributes,n=t["vercel.region"]||t["vercel.function.region"];return n?String(n):null},uP=e=>{const{name:t}=e.span,n=Nh(e),r=Nh(e.parent);return e.span.attributes["vercel.middleware.internal"]==="true"?"The Vercel Toolbar created this middleware.":Rh.has(t)||t==="Invoke Function"&&e.children.some(i=>Rh.has(i.span.name))?"This function encountered a cold start.":n&&r&&n!==r?"This request was routed across regions.":null},sb=e=>{if(!e.isVercel)return!1;const{name:t}=e.span,n=t.indexOf(" ");if(n===-1)return!1;const r=t.substring(0,n);return oP.has(r)};function cP({node:e}){const{name:t}=e.span;let n=lP[t];if(!n&&sb(e)&&(n="How long it took for Vercel to process the request and send the response."),!n)return null;const r=uP(e);return g.jsx(fr,{name:"What is this?",children:g.jsxs("div",{className:oe.infraSpanDescription,children:[g.jsx("span",{children:n}),r&&g.jsx(iP,{children:r})]})})}const dP=x.memo(function({getQuickLinks:t,span:n}){const r=t(n);return r.length?g.jsx(fr,{name:"Links",children:r.map(({key:i,value:s})=>g.jsx(hP,{link:s,name:i},i))}):null});function fP(e){const[t,n]=x.useState({}),r=e.__resolvedValue!==void 0||e.__rejectedValue!==void 0;return x.useEffect(()=>{r||e.then(i=>{e.__resolvedValue=i}).catch(i=>{e.__rejectedValue=i}).finally(()=>n({}))},[e,r]),e.__resolvedValue}function hP({name:e,link:t}){const n=fP(t);return g.jsxs(nP,{as:n?void 0:"span",className:Pt(oe.spanDetailPanelAttribute,oe.spanDetailPanelQuickLink),href:(n==null?void 0:n.href)||"",children:[g.jsx("span",{className:oe.spanDetailPanelAttributeKey,children:e}),g.jsx("span",{className:Pt(oe.spanDetailPanelAttributeValue,oe.spanDetailPanelQuickLinkLabel),children:n?g.jsxs(g.Fragment,{children:[n.label,n.icon||g.jsx(tP,{color:"gray-900"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Ch,{height:18,width:32+e.length*8}),g.jsx(Ch,{height:18,rounded:!0,width:18})]})})]})}function pP(){return g.jsx(fr,{name:"What is this?",children:g.jsxs("div",{className:oe.infraSpanDescription,children:[g.jsx("span",{children:"You can visualize your application's spans alongside Vercel's spans in this viewer."}),g.jsx(rP,{href:"https://vercel.com/docs/session-tracing#adding-custom-spans",size:"small",target:"_blank",children:"Get Started"})]})})}function ji({name:e,value:t}){return g.jsxs("dl",{className:oe.spanDetailPanelAttribute,children:[g.jsx("dt",{className:oe.spanDetailPanelAttributeKey,children:e}),g.jsx("dd",{className:oe.spanDetailPanelAttributeValue,title:String(t),children:String(t)})]})}function mP(){const{state:{panelWidth:e},dispatch:t}=Oo(),n=x.useRef({start:{x:0,width:e},x:0,width:e,isHeld:!1});n.current.width=e;const r=x.useCallback(s=>{if(s.pointerType!=="mouse")return;s.preventDefault();const a=n.current;a.start.x=s.clientX,a.x=s.clientX,a.start.width=a.width,a.isHeld=!0},[]),i=x.useCallback(()=>{t({type:"setPanelWidth",width:Nc.panelWidth})},[t]);return x.useEffect(()=>{let s=0;const a=()=>{const u=n.current,d=u.start.width+u.start.x-u.x;t({type:"setPanelWidth",width:d})},o=u=>{n.current.isHeld&&(u.preventDefault(),n.current.x=u.clientX,cancelAnimationFrame(s),s=requestAnimationFrame(a))},l=()=>{n.current.isHeld=!1};return window.addEventListener("pointermove",o),window.addEventListener("pointerup",l),()=>{window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",l)}},[t]),g.jsx("div",{"aria-hidden":!0,className:oe.spanDetailPanelResizer,onDoubleClick:i,onPointerDown:r})}function gP(e){const t=x.useRef({});return{setStyle:x.useCallback((r,i)=>{if(t.current[r]=i,!!e.current){if(!i){e.current.style.removeProperty(r);return}e.current.style.setProperty(r,i)}},[e]),styleRef:t,style:{...t.current}}}const bP=()=>"devicePixelRatio"in globalThis&&globalThis.devicePixelRatio||1,EP=()=>{const[e,t]=x.useState(1);return x.useLayoutEffect(()=>{const n=()=>t(bP()),r=matchMedia(`(resolution: ${e}dppx)`);return r.addEventListener("change",n),n(),()=>{r.removeEventListener("change",n)}},[e]),e},zi=eo,kM=x.memo(function({timelineRef:t,rows:n,scale:r}){const{state:{root:i,baseScale:s,timelineWidth:a,width:o,scrollbarWidth:l}}=Oo(),u=o+eo*2,d=EP(),c=x.useRef(null),h=x.useRef(null),p=o/(o-l)*Math.min(o/a,s/r),m=Math.min(o,(a-l)*p);x.useEffect(()=>{let y=!1,k=0,P;const D=w=>{var L;return!!((L=c.current)!=null&&L.contains(w))};let v=0;const A=()=>{if(!y||!P)return;const w=t.current;if(!w)return;const L=k-m*.5-P.left;w.scrollLeft=L/p},N=w=>{({clientX:k}=w),cancelAnimationFrame(v),v=requestAnimationFrame(A)},z=w=>{var L;D(w.target)&&(y=!0,P=(L=c.current)==null?void 0:L.getBoundingClientRect(),N(w))},R=()=>{y=!1,P=void 0},W=w=>{D(w.target)&&w.cancelable&&w.preventDefault()},j=w=>{y&&w.cancelable&&w.preventDefault()};return window.addEventListener("pointerdown",z),window.addEventListener("pointermove",N),window.addEventListener("pointerup",R),window.addEventListener("blur",R),window.addEventListener("touchstart",W,{passive:!1}),window.addEventListener("touchmove",j,{passive:!1}),()=>{window.removeEventListener("pointerdown",z),window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",R),window.removeEventListener("blur",R),window.removeEventListener("touchstart",W),window.removeEventListener("touchmove",j),cancelAnimationFrame(v)}},[t,p,m]),x.useEffect(()=>{const y=h.current,k=y==null?void 0:y.getContext("2d");if(!y||!k)return;const D=requestAnimationFrame(()=>{k.resetTransform(),k.clearRect(0,0,y.width,y.height),k.scale(d,d);const v=1,A=3,N=(u-zi*2)/i.duration;k.fillStyle="#ccc",k.beginPath();for(const z of n)for(const R of z){const W=zi-v+(v+A)*R.row;if(W>=ai-A-zi)break;const j=zi+(R.startTime-i.startTime)*N,w=R.duration*N;k.roundRect(j,W,w,A,A)}k.fill()});return()=>cancelAnimationFrame(D)},[d,i,u,n]);const E=x.useRef(null),{style:T,setStyle:b}=gP(E);return x.useLayoutEffect(()=>{const y=t.current;if(!y)return;let k=0;const P=()=>{b("transform",`translateX(${zi+y.scrollLeft*p}px)`)};P();const D=()=>{cancelAnimationFrame(k),k=requestAnimationFrame(P)};return y.addEventListener("scroll",D),()=>{cancelAnimationFrame(k),y.removeEventListener("scroll",D)}},[t,p,b]),g.jsxs("div",{className:oe.mapContainer,ref:c,style:{width:m>0?u:"100%",height:ai},children:[g.jsx("canvas",{className:oe.mapCanvas,height:ai*d,ref:h,style:{width:u,height:ai},width:u*d}),g.jsx("div",{className:oe.mapThumb,ref:E,style:{transform:T.transform,width:m>0?m:`calc(100% - ${eo*2}px)`,top:2,height:ai-4}})]})});function TP(e){try{const t=JSON.parse(e);return typeof t=="string"?t:JSON.stringify(t,null,2)}catch{return e}}function xP(e){try{return JSON.parse(e)}catch{return e}}const yP=F.memo(function({chunk:t,index:n}){const r=xP(t.text);return g.jsxs("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)"},children:[g.jsxs("span",{className:"select-none mr-2",style:{color:"var(--ds-gray-500)"},children:["[",n,"]"]}),typeof r=="string"?g.jsx("span",{className:"whitespace-pre-wrap break-words",style:{color:"var(--ds-gray-1000)"},children:TP(r)}):g.jsx(c_,{data:r,expandLevel:1})]})});function _P(){return g.jsxs("div",{className:"flex flex-col gap-3 animate-in fade-in",children:[g.jsx(Md,{style:{width:120,height:16,borderRadius:4}}),[1,2,3,4].map(e=>g.jsx(Md,{style:{height:56,borderRadius:6}},e))]})}function wM({streamId:e,chunks:t,isLive:n,error:r,isLoading:i,onScrollEnd:s}){const a=x.useRef(null),o=x.useRef(0);return x.useEffect(()=>{var l;t.length>o.current&&t.length>0&&((l=a.current)==null||l.scrollToIndex({index:t.length-1,align:"end"})),o.current=t.length},[t.length]),i&&t.length===0?g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(_P,{})}):g.jsxs("div",{className:"flex flex-col h-full",children:[n&&g.jsxs("div",{className:"flex items-center gap-1.5 mb-2 px-1",children:[g.jsx("span",{className:"inline-block w-2 h-2 rounded-full",style:{backgroundColor:"var(--ds-green-600)"}}),g.jsx("span",{className:"text-xs",style:{color:"var(--ds-green-700)"},children:"Live"})]}),t.length>0&&g.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[g.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--ds-gray-900)"},children:"Stream Chunks"}),g.jsxs("span",{className:"text-xs tabular-nums",style:{color:"var(--ds-gray-600)"},children:["(",t.length,")"]})]}),g.jsx("div",{className:"flex-1 min-h-0",children:r?g.jsxs("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-red-300)",backgroundColor:"var(--ds-red-100)",color:"var(--ds-red-700)"},children:[g.jsx("div",{children:"Error reading stream:"}),g.jsx("div",{children:r})]}):t.length===0?g.jsx("div",{className:"text-[11px] rounded-md border p-3",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-600)"},children:n?"Waiting for stream data...":"Stream is empty"}):g.jsx(Wy,{ref:a,totalCount:t.length,overscan:10,endReached:()=>s==null?void 0:s(),itemContent:l=>g.jsx("div",{style:{paddingBottom:8},children:g.jsx(yP,{chunk:t[l],index:l})}),style:{flex:1,minHeight:0}})})]})}const CM=10;function ab(...e){return Nu(Pt(e))}const AM=5e3;function SM(e,t,n){return n?`Page ${e} of ${t}+`:`Page ${e} of ${t}`}const IM=BT,vM=FT,kP=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(Op,{ref:r,sideOffset:t,className:ab("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));kP.displayName=Op.displayName;const ob=x.createContext(null);function RM({children:e,serverConfig:t}){const n={serverConfig:t};return g.jsx(ob.Provider,{value:n,children:e})}function NM(){const e=x.useContext(ob);if(!e)throw new Error("useServerConfig must be used within a ServerConfigProvider");return e}function Oh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lb(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Oh(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Oh(e[i],null)}}}}function OM(...e){return x.useCallback(lb(...e),e)}var ub=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),s=i.find(CP);if(s){const a=s.props.children,o=i.map(l=>l===s?x.Children.count(a)>1?x.Children.only(null):x.isValidElement(a)?a.props.children:null:l);return g.jsx(cu,{...r,ref:t,children:x.isValidElement(a)?x.cloneElement(a,void 0,o):null})}return g.jsx(cu,{...r,ref:t,children:n})});ub.displayName="Slot";var cu=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=SP(n);return x.cloneElement(n,{...AP(r,n.props),ref:t?lb(t,i):i})}return x.Children.count(n)>1?x.Children.only(null):null});cu.displayName="SlotClone";var wP=({children:e})=>g.jsx(g.Fragment,{children:e});function CP(e){return x.isValidElement(e)&&e.type===wP}function AP(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{s(...o),i(...o)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function SP(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Lh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dh=Pt,IP=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Dh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],c=s==null?void 0:s[u];if(d===null)return null;const h=Lh(d)||Lh(c);return i[u][h]}),o=n&&Object.entries(n).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:h,...p}=d;return Object.entries(p).every(m=>{let[E,T]=m;return Array.isArray(T)?T.includes({...s,...o}[E]):{...s,...o}[E]===T})?[...u,c,h]:u},[]);return Dh(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},vP=IP("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),RP=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const a=r?ub:"button";return g.jsx(a,{className:ab(vP({variant:t,size:n,className:e})),ref:s,...i})});RP.displayName="Button";let du;try{du=new TextDecoder}catch{}let de,Br,K=0;const NP=105,OP=57342,LP=57343,Ph=57337,Mh=6,ri={};let $i=11281e4,qn=1681e4,Pe={},ct,to,no=0,Os=0,yt,pn,bt=[],fu=[],Yt,Ht,Xi,Bh={useRecords:!1,mapsAsObjects:!0},Ls=!1,cb=2;try{new Function("")}catch{cb=1/0}class Ds{constructor(t){if(t&&((t.keyMap||t._keyMap)&&!t.useRecords&&(t.useRecords=!1,t.mapsAsObjects=!0),t.useRecords===!1&&t.mapsAsObjects===void 0&&(t.mapsAsObjects=!0),t.getStructures&&(t.getShared=t.getStructures),t.getShared&&!t.structures&&((t.structures=[]).uninitialized=!0),t.keyMap)){this.mapKey=new Map;for(let[n,r]of Object.entries(t.keyMap))this.mapKey.set(r,n)}Object.assign(this,t)}decodeKey(t){return this.keyMap&&this.mapKey.get(t)||t}encodeKey(t){return this.keyMap&&this.keyMap.hasOwnProperty(t)?this.keyMap[t]:t}encodeKeys(t){if(!this._keyMap)return t;let n=new Map;for(let[r,i]of Object.entries(t))n.set(this._keyMap.hasOwnProperty(r)?this._keyMap[r]:r,i);return n}decodeKeys(t){if(!this._keyMap||t.constructor.name!="Map")return t;if(!this._mapKey){this._mapKey=new Map;for(let[r,i]of Object.entries(this._keyMap))this._mapKey.set(i,r)}let n={};return t.forEach((r,i)=>n[mn(this._mapKey.has(i)?this._mapKey.get(i):i)]=r),n}mapDecode(t,n){let r=this.decode(t);if(this._keyMap)switch(r.constructor.name){case"Array":return r.map(i=>this.decodeKeys(i))}return r}decode(t,n){if(de)return pb(()=>(gu(),this?this.decode(t,n):Ds.prototype.decode.call(Bh,t,n)));Br=n>-1?n:t.length,K=0,Os=0,to=null,yt=null,de=t;try{Ht=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength))}catch(r){throw de=null,t instanceof Uint8Array?r:new Error("Source must be a Uint8Array or Buffer but was a "+(t&&typeof t=="object"?t.constructor.name:typeof t))}if(this instanceof Ds){if(Pe=this,Yt=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return ct=this.structures,Ea();(!ct||ct.length>0)&&(ct=[])}else Pe=Bh,(!ct||ct.length>0)&&(ct=[]),Yt=null;return Ea()}decodeMultiple(t,n){let r,i=0;try{let s=t.length;Ls=!0;let a=this?this.decode(t,s):Mc.decode(t,s);if(n){if(n(a)===!1)return;for(;K<s;)if(i=K,n(Ea())===!1)return}else{for(r=[a];K<s;)i=K,r.push(Ea());return r}}catch(s){throw s.lastPosition=i,s.values=r,s}finally{Ls=!1,gu()}}}function Ea(){try{let e=Fe();if(yt){if(K>=yt.postBundlePosition){let t=new Error("Unexpected bundle position");throw t.incomplete=!0,t}K=yt.postBundlePosition,yt=null}if(K==Br)ct=null,de=null,pn&&(pn=null);else if(K>Br){let t=new Error("Unexpected end of CBOR data");throw t.incomplete=!0,t}else if(!Ls)throw new Error("Data read, but end of buffer not reached");return e}catch(e){throw gu(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function Fe(){let e=de[K++],t=e>>5;if(e=e&31,e>23)switch(e){case 24:e=de[K++];break;case 25:if(t==7)return BP();e=Ht.getUint16(K),K+=2;break;case 26:if(t==7){let n=Ht.getFloat32(K);if(Pe.useFloat32>2){let r=Pc[(de[K]&127)<<1|de[K+1]>>7];return K+=4,(r*n+(n>0?.5:-.5)>>0)/r}return K+=4,n}e=Ht.getUint32(K),K+=4;break;case 27:if(t==7){let n=Ht.getFloat64(K);return K+=8,n}if(t>1){if(Ht.getUint32(K)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=Ht.getUint32(K+4)}else Pe.int64AsNumber?(e=Ht.getUint32(K)*4294967296,e+=Ht.getUint32(K+4)):e=Ht.getBigUint64(K);K+=8;break;case 31:switch(t){case 2:case 3:throw new Error("Indefinite length not supported for byte or text strings");case 4:let n=[],r,i=0;for(;(r=Fe())!=ri;){if(i>=$i)throw new Error(`Array length exceeds ${$i}`);n[i++]=r}return t==4?n:t==3?n.join(""):Buffer.concat(n);case 5:let s;if(Pe.mapsAsObjects){let a={},o=0;if(Pe.keyMap)for(;(s=Fe())!=ri;){if(o++>=qn)throw new Error(`Property count exceeds ${qn}`);a[mn(Pe.decodeKey(s))]=Fe()}else for(;(s=Fe())!=ri;){if(o++>=qn)throw new Error(`Property count exceeds ${qn}`);a[mn(s)]=Fe()}return a}else{Xi&&(Pe.mapsAsObjects=!0,Xi=!1);let a=new Map;if(Pe.keyMap){let o=0;for(;(s=Fe())!=ri;){if(o++>=qn)throw new Error(`Map size exceeds ${qn}`);a.set(Pe.decodeKey(s),Fe())}}else{let o=0;for(;(s=Fe())!=ri;){if(o++>=qn)throw new Error(`Map size exceeds ${qn}`);a.set(s,Fe())}}return a}case 7:return ri;default:throw new Error("Invalid major type for indefinite length "+t)}default:throw new Error("Unknown token "+e)}switch(t){case 0:return e;case 1:return~e;case 2:return MP(e);case 3:if(Os>=K)return to.slice(K-no,(K+=e)-no);if(Os==0&&Br<140&&e<32){let i=e<16?db(e):PP(e);if(i!=null)return i}return DP(e);case 4:if(e>=$i)throw new Error(`Array length exceeds ${$i}`);let n=new Array(e);for(let i=0;i<e;i++)n[i]=Fe();return n;case 5:if(e>=qn)throw new Error(`Map size exceeds ${$i}`);if(Pe.mapsAsObjects){let i={};if(Pe.keyMap)for(let s=0;s<e;s++)i[mn(Pe.decodeKey(Fe()))]=Fe();else for(let s=0;s<e;s++)i[mn(Fe())]=Fe();return i}else{Xi&&(Pe.mapsAsObjects=!0,Xi=!1);let i=new Map;if(Pe.keyMap)for(let s=0;s<e;s++)i.set(Pe.decodeKey(Fe()),Fe());else for(let s=0;s<e;s++)i.set(Fe(),Fe());return i}case 6:if(e>=Ph){let i=ct[e&8191];if(i)return i.read||(i.read=hu(i)),i.read();if(e<65536){if(e==LP){let s=ui(),a=Fe(),o=Fe();mu(a,o);let l={};if(Pe.keyMap)for(let u=2;u<s;u++){let d=Pe.decodeKey(o[u-2]);l[mn(d)]=Fe()}else for(let u=2;u<s;u++){let d=o[u-2];l[mn(d)]=Fe()}return l}else if(e==OP){let s=ui(),a=Fe();for(let o=2;o<s;o++)mu(a++,Fe());return Fe()}else if(e==Ph)return $P();if(Pe.getShared&&(Dc(),i=ct[e&8191],i))return i.read||(i.read=hu(i)),i.read()}}let r=bt[e];if(r)return r.handlesRead?r(Fe):r(Fe());{let i=Fe();for(let s=0;s<fu.length;s++){let a=fu[s](e,i);if(a!==void 0)return a}return new Vr(i,e)}case 7:switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case 31:default:let i=(Yt||Nr())[e];if(i!==void 0)return i;throw new Error("Unknown token "+e)}default:if(isNaN(e)){let i=new Error("Unexpected end of CBOR data");throw i.incomplete=!0,i}throw new Error("Unknown CBOR token "+e)}}const Fh=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function hu(e){if(!e)throw new Error("Structure is required in record definition");function t(){let n=de[K++];if(n=n&31,n>23)switch(n){case 24:n=de[K++];break;case 25:n=Ht.getUint16(K),K+=2;break;case 26:n=Ht.getUint32(K),K+=4;break;default:throw new Error("Expected array header, but got "+de[K-1])}let r=this.compiledReader;for(;r;){if(r.propertyCount===n)return r(Fe);r=r.next}if(this.slowReads++>=cb){let s=this.length==n?this:this.slice(0,n);return r=Pe.keyMap?new Function("r","return {"+s.map(a=>Pe.decodeKey(a)).map(a=>Fh.test(a)?mn(a)+":r()":"["+JSON.stringify(a)+"]:r()").join(",")+"}"):new Function("r","return {"+s.map(a=>Fh.test(a)?mn(a)+":r()":"["+JSON.stringify(a)+"]:r()").join(",")+"}"),this.compiledReader&&(r.next=this.compiledReader),r.propertyCount=n,this.compiledReader=r,r(Fe)}let i={};if(Pe.keyMap)for(let s=0;s<n;s++)i[mn(Pe.decodeKey(this[s]))]=Fe();else for(let s=0;s<n;s++)i[mn(this[s])]=Fe();return i}return e.slowReads=0,t}function mn(e){if(typeof e=="string")return e==="__proto__"?"__proto_":e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return e.toString();if(e==null)return e+"";throw new Error("Invalid property name type "+typeof e)}let DP=pu;function pu(e){let t;if(e<16&&(t=db(e)))return t;if(e>64&&du)return du.decode(de.subarray(K,K+=e));const n=K+e,r=[];for(t="";K<n;){const i=de[K++];if((i&128)===0)r.push(i);else if((i&224)===192){const s=de[K++]&63;r.push((i&31)<<6|s)}else if((i&240)===224){const s=de[K++]&63,a=de[K++]&63;r.push((i&31)<<12|s<<6|a)}else if((i&248)===240){const s=de[K++]&63,a=de[K++]&63,o=de[K++]&63;let l=(i&7)<<18|s<<12|a<<6|o;l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|l&1023),r.push(l)}else r.push(i);r.length>=4096&&(t+=Ct.apply(String,r),r.length=0)}return r.length>0&&(t+=Ct.apply(String,r)),t}let Ct=String.fromCharCode;function PP(e){let t=K,n=new Array(e);for(let r=0;r<e;r++){const i=de[K++];if((i&128)>0){K=t;return}n[r]=i}return Ct.apply(String,n)}function db(e){if(e<4)if(e<2){if(e===0)return"";{let t=de[K++];if((t&128)>1){K-=1;return}return Ct(t)}}else{let t=de[K++],n=de[K++];if((t&128)>0||(n&128)>0){K-=2;return}if(e<3)return Ct(t,n);let r=de[K++];if((r&128)>0){K-=3;return}return Ct(t,n,r)}else{let t=de[K++],n=de[K++],r=de[K++],i=de[K++];if((t&128)>0||(n&128)>0||(r&128)>0||(i&128)>0){K-=4;return}if(e<6){if(e===4)return Ct(t,n,r,i);{let s=de[K++];if((s&128)>0){K-=5;return}return Ct(t,n,r,i,s)}}else if(e<8){let s=de[K++],a=de[K++];if((s&128)>0||(a&128)>0){K-=6;return}if(e<7)return Ct(t,n,r,i,s,a);let o=de[K++];if((o&128)>0){K-=7;return}return Ct(t,n,r,i,s,a,o)}else{let s=de[K++],a=de[K++],o=de[K++],l=de[K++];if((s&128)>0||(a&128)>0||(o&128)>0||(l&128)>0){K-=8;return}if(e<10){if(e===8)return Ct(t,n,r,i,s,a,o,l);{let u=de[K++];if((u&128)>0){K-=9;return}return Ct(t,n,r,i,s,a,o,l,u)}}else if(e<12){let u=de[K++],d=de[K++];if((u&128)>0||(d&128)>0){K-=10;return}if(e<11)return Ct(t,n,r,i,s,a,o,l,u,d);let c=de[K++];if((c&128)>0){K-=11;return}return Ct(t,n,r,i,s,a,o,l,u,d,c)}else{let u=de[K++],d=de[K++],c=de[K++],h=de[K++];if((u&128)>0||(d&128)>0||(c&128)>0||(h&128)>0){K-=12;return}if(e<14){if(e===12)return Ct(t,n,r,i,s,a,o,l,u,d,c,h);{let p=de[K++];if((p&128)>0){K-=13;return}return Ct(t,n,r,i,s,a,o,l,u,d,c,h,p)}}else{let p=de[K++],m=de[K++];if((p&128)>0||(m&128)>0){K-=14;return}if(e<15)return Ct(t,n,r,i,s,a,o,l,u,d,c,h,p,m);let E=de[K++];if((E&128)>0){K-=15;return}return Ct(t,n,r,i,s,a,o,l,u,d,c,h,p,m,E)}}}}}function MP(e){return Pe.copyBuffers?Uint8Array.prototype.slice.call(de,K,K+=e):de.subarray(K,K+=e)}let fb=new Float32Array(1),Ta=new Uint8Array(fb.buffer,0,4);function BP(){let e=de[K++],t=de[K++],n=(e&127)>>2;if(n===31)return t||e&3?NaN:e&128?-1/0:1/0;if(n===0){let r=((e&3)<<8|t)/16777216;return e&128?-r:r}return Ta[3]=e&128|(n>>1)+56,Ta[2]=(e&7)<<5|t>>3,Ta[1]=t<<5,Ta[0]=0,fb[0]}new Array(4096);class Vr{constructor(t,n){this.value=t,this.tag=n}}bt[0]=e=>new Date(e);bt[1]=e=>new Date(Math.round(e*1e3));bt[2]=e=>{let t=BigInt(0);for(let n=0,r=e.byteLength;n<r;n++)t=BigInt(e[n])+(t<<BigInt(8));return t};bt[3]=e=>BigInt(-1)-bt[2](e);bt[4]=e=>+(e[1]+"e"+e[0]);bt[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));const mu=(e,t)=>{e=e-57344;let n=ct[e];n&&n.isShared&&((ct.restoreStructures||(ct.restoreStructures=[]))[e]=n),ct[e]=t,t.read=hu(t)};bt[NP]=e=>{let t=e.length,n=e[1];mu(e[0],n);let r={};for(let i=2;i<t;i++){let s=n[i-2];r[mn(s)]=e[i]}return r};bt[14]=e=>yt?yt[0].slice(yt.position0,yt.position0+=e):new Vr(e,14);bt[15]=e=>yt?yt[1].slice(yt.position1,yt.position1+=e):new Vr(e,15);let FP={Error,RegExp};bt[27]=e=>(FP[e[0]]||Error)(e[1],e[2]);const hb=e=>{if(de[K++]!=132){let n=new Error("Packed values structure must be followed by a 4 element array");throw de.length<K&&(n.incomplete=!0),n}let t=e();if(!t||!t.length){let n=new Error("Packed values structure must be followed by a 4 element array");throw n.incomplete=!0,n}return Yt=Yt?t.concat(Yt.slice(t.length)):t,Yt.prefixes=e(),Yt.suffixes=e(),e()};hb.handlesRead=!0;bt[51]=hb;bt[Mh]=e=>{if(!Yt)if(Pe.getShared)Dc();else return new Vr(e,Mh);if(typeof e=="number")return Yt[16+(e>=0?2*e:-2*e-1)];let t=new Error("No support for non-integer packed references yet");throw e===void 0&&(t.incomplete=!0),t};bt[28]=e=>{pn||(pn=new Map,pn.id=0);let t=pn.id++,n=K,r=de[K],i;r>>5==4?i=[]:i={};let s={target:i};pn.set(t,s);let a=e();return s.used?(Object.getPrototypeOf(i)!==Object.getPrototypeOf(a)&&(K=n,i=a,pn.set(t,{target:i}),a=e()),Object.assign(i,a)):(s.target=a,a)};bt[28].handlesRead=!0;bt[29]=e=>{let t=pn.get(e);return t.used=!0,t.target};bt[258]=e=>new Set(e);(bt[259]=e=>(Pe.mapsAsObjects&&(Pe.mapsAsObjects=!1,Xi=!0),e())).handlesRead=!0;function ii(e,t){return typeof e=="string"?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function Nr(){if(!Yt)if(Pe.getShared)Dc();else throw new Error("No packed values available");return Yt}const HP=1399353956;fu.push((e,t)=>{if(e>=225&&e<=255)return ii(Nr().prefixes[e-224],t);if(e>=28704&&e<=32767)return ii(Nr().prefixes[e-28672],t);if(e>=1879052288&&e<=2147483647)return ii(Nr().prefixes[e-1879048192],t);if(e>=216&&e<=223)return ii(t,Nr().suffixes[e-216]);if(e>=27647&&e<=28671)return ii(t,Nr().suffixes[e-27639]);if(e>=1811940352&&e<=1879048191)return ii(t,Nr().suffixes[e-1811939328]);if(e==HP)return{packedValues:Yt,structures:ct.slice(0),version:t};if(e==55799)return t});const UP=new Uint8Array(new Uint16Array([1]).buffer)[0]==1,Hh=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],jP=[64,68,69,70,71,72,77,78,79,85,86];for(let e=0;e<Hh.length;e++)zP(Hh[e],jP[e]);function zP(e,t){let n="get"+e.name.slice(0,-5),r;typeof e=="function"?r=e.BYTES_PER_ELEMENT:e=null;for(let i=0;i<2;i++){if(!i&&r==1)continue;let s=r==2?1:r==4?2:r==8?3:0;bt[i?t:t-4]=r==1||i==UP?a=>{if(!e)throw new Error("Could not find typed array for code "+t);return!Pe.copyBuffers&&(r===1||r===2&&!(a.byteOffset&1)||r===4&&!(a.byteOffset&3)||r===8&&!(a.byteOffset&7))?new e(a.buffer,a.byteOffset,a.byteLength>>s):new e(Uint8Array.prototype.slice.call(a,0).buffer)}:a=>{if(!e)throw new Error("Could not find typed array for code "+t);let o=new DataView(a.buffer,a.byteOffset,a.byteLength),l=a.length>>s,u=new e(l),d=o[n];for(let c=0;c<l;c++)u[c]=d.call(o,c<<s,i);return u}}}function $P(){let e=ui(),t=K+Fe();for(let r=2;r<e;r++){let i=ui();K+=i}let n=K;return K=t,yt=[pu(ui()),pu(ui())],yt.position0=0,yt.position1=0,yt.postBundlePosition=K,K=n,Fe()}function ui(){let e=de[K++]&31;if(e>23)switch(e){case 24:e=de[K++];break;case 25:e=Ht.getUint16(K),K+=2;break;case 26:e=Ht.getUint32(K),K+=4;break}return e}function Dc(){if(Pe.getShared){let e=pb(()=>(de=null,Pe.getShared()))||{},t=e.structures||[];Pe.sharedVersion=e.version,Yt=Pe.sharedValues=e.packedValues,ct===!0?Pe.structures=ct=t:ct.splice.apply(ct,[0,t.length].concat(t))}}function pb(e){let t=Br,n=K,r=no,i=Os,s=to,a=pn,o=yt,l=new Uint8Array(de.slice(0,Br)),u=ct,d=Pe,c=Ls,h=e();return Br=t,K=n,no=r,Os=i,to=s,pn=a,yt=o,de=l,Ls=c,ct=u,Pe=d,Ht=new DataView(de.buffer,de.byteOffset,de.byteLength),h}function gu(){de=null,pn=null,ct=null}const Pc=new Array(147);for(let e=0;e<256;e++)Pc[e]=+("1e"+Math.floor(45.15-e*.30103));let Mc=new Ds({useRecords:!1});const Uh=Mc.decode;Mc.decodeMultiple;let La;try{La=new TextEncoder}catch{}let bu,mb;const Do=typeof globalThis=="object"&&globalThis.Buffer,Qs=typeof Do<"u",gl=Qs?Do.allocUnsafeSlow:Uint8Array,jh=Qs?Do:Uint8Array,zh=256,$h=Qs?4294967296:2144337920;let bl,V,rt,B=0,lr,Tt=null;const VP=61440,WP=/[\u0080-\uFFFF]/,Zt=Symbol("record-id");class YP extends Ds{constructor(t){super(t),this.offset=0;let n,r,i,s,a;t=t||{};let o=jh.prototype.utf8Write?function(w,L,M){return V.utf8Write(w,L,M)}:La&&La.encodeInto?function(w,L){return La.encodeInto(w,V.subarray(L)).written}:!1,l=this,u=t.structures||t.saveStructures,d=t.maxSharedStructures;if(d==null&&(d=u?128:0),d>8190)throw new Error("Maximum maxSharedStructure is 8190");let c=t.sequential;c&&(d=0),this.structures||(this.structures=[]),this.saveStructures&&(this.saveShared=this.saveStructures);let h,p,m=t.sharedValues,E;if(m){E=Object.create(null);for(let w=0,L=m.length;w<L;w++)E[m[w]]=w}let T=[],b=0,y=0;this.mapEncode=function(w,L){if(this._keyMap&&!this._mapped)switch(w.constructor.name){case"Array":w=w.map(M=>this.encodeKeys(M));break}return this.encode(w,L)},this.encode=function(w,L){if(V||(V=new gl(8192),rt=new DataView(V.buffer,0,8192),B=0),lr=V.length-10,lr-B<2048?(V=new gl(V.length),rt=new DataView(V.buffer,0,V.length),lr=V.length-10,B=0):L===Yh&&(B=B+7&2147483640),n=B,l.useSelfDescribedHeader&&(rt.setUint32(B,3654940416),B+=3),a=l.structuredClone?new Map:null,l.bundleStrings&&typeof w!="string"?(Tt=[],Tt.size=1/0):Tt=null,r=l.structures,r){if(r.uninitialized){let H=l.getShared()||{};l.structures=r=H.structures||[],l.sharedVersion=H.version;let U=l.sharedValues=H.packedValues;if(U){E={};for(let G=0,Q=U.length;G<Q;G++)E[U[G]]=G}}let M=r.length;if(M>d&&!c&&(M=d),!r.transitions){r.transitions=Object.create(null);for(let H=0;H<M;H++){let U=r[H];if(!U)continue;let G,Q=r.transitions;for(let _=0,se=U.length;_<se;_++){Q[Zt]===void 0&&(Q[Zt]=H);let te=U[_];G=Q[te],G||(G=Q[te]=Object.create(null)),Q=G}Q[Zt]=H|1048576}}c||(r.nextId=M)}if(i&&(i=!1),s=r||[],p=E,t.pack){let M=new Map;if(M.values=[],M.encoder=l,M.maxValues=t.maxPrivatePackedValues||(E?16:1/0),M.objectMap=E||!1,M.samplingPackedValues=h,Da(w,M),M.values.length>0){V[B++]=216,V[B++]=51,Mn(4);let H=M.values;k(H),Mn(0),Mn(0),p=Object.create(E||null);for(let U=0,G=H.length;U<G;U++)p[H[U]]=U}}bl=L&Tl;try{if(bl)return;if(k(w),Tt&&Wh(n,k),l.offset=B,a&&a.idsToInsert){B+=a.idsToInsert.length*2,B>lr&&D(B),l.offset=B;let M=KP(V.subarray(n,B),a.idsToInsert);return a=null,M}return L&Yh?(V.start=n,V.end=B,V):V.subarray(n,B)}finally{if(r){if(y<10&&y++,r.length>d&&(r.length=d),b>1e4)r.transitions=null,y=0,b=0,T.length>0&&(T=[]);else if(T.length>0&&!c){for(let M=0,H=T.length;M<H;M++)T[M][Zt]=void 0;T=[]}}if(i&&l.saveShared){l.structures.length>d&&(l.structures=l.structures.slice(0,d));let M=V.subarray(n,B);return l.updateSharedData()===!1?l.encode(w):M}L&QP&&(B=n)}},this.findCommonStringsToPack=()=>(h=new Map,E||(E=Object.create(null)),w=>{let L=w&&w.threshold||4,M=this.pack?w.maxPrivatePackedValues||16:0;m||(m=this.sharedValues=[]);for(let[H,U]of h)U.count>L&&(E[H]=M++,m.push(H),i=!0);for(;this.saveShared&&this.updateSharedData()===!1;);h=null});const k=w=>{B>lr&&(V=D(B));var L=typeof w,M;if(L==="string"){if(p){let Q=p[w];if(Q>=0){Q<16?V[B++]=Q+224:(V[B++]=198,Q&1?k(15-Q>>1):k(Q-16>>1));return}else if(h&&!t.pack){let _=h.get(w);_?_.count++:h.set(w,{count:1})}}let H=w.length;if(Tt&&H>=4&&H<1024){if((Tt.size+=H)>VP){let _,se=(Tt[0]?Tt[0].length*3+Tt[1].length:0)+10;B+se>lr&&(V=D(B+se)),V[B++]=217,V[B++]=223,V[B++]=249,V[B++]=Tt.position?132:130,V[B++]=26,_=B-n,B+=4,Tt.position&&Wh(n,k),Tt=["",""],Tt.size=0,Tt.position=_}let Q=WP.test(w);Tt[Q?0:1]+=w,V[B++]=Q?206:207,k(H);return}let U;H<32?U=1:H<256?U=2:H<65536?U=3:U=5;let G=H*3;if(B+G>lr&&(V=D(B+G)),H<64||!o){let Q,_,se,te=B+U;for(Q=0;Q<H;Q++)_=w.charCodeAt(Q),_<128?V[te++]=_:_<2048?(V[te++]=_>>6|192,V[te++]=_&63|128):(_&64512)===55296&&((se=w.charCodeAt(Q+1))&64512)===56320?(_=65536+((_&1023)<<10)+(se&1023),Q++,V[te++]=_>>18|240,V[te++]=_>>12&63|128,V[te++]=_>>6&63|128,V[te++]=_&63|128):(V[te++]=_>>12|224,V[te++]=_>>6&63|128,V[te++]=_&63|128);M=te-B-U}else M=o(w,B+U,G);M<24?V[B++]=96|M:M<256?(U<2&&V.copyWithin(B+2,B+1,B+1+M),V[B++]=120,V[B++]=M):M<65536?(U<3&&V.copyWithin(B+3,B+2,B+2+M),V[B++]=121,V[B++]=M>>8,V[B++]=M&255):(U<5&&V.copyWithin(B+5,B+3,B+3+M),V[B++]=122,rt.setUint32(B,M),B+=4),B+=M}else if(L==="number")if(!this.alwaysUseFloat&&w>>>0===w)w<24?V[B++]=w:w<256?(V[B++]=24,V[B++]=w):w<65536?(V[B++]=25,V[B++]=w>>8,V[B++]=w&255):(V[B++]=26,rt.setUint32(B,w),B+=4);else if(!this.alwaysUseFloat&&w>>0===w)w>=-24?V[B++]=31-w:w>=-256?(V[B++]=56,V[B++]=~w):w>=-65536?(V[B++]=57,rt.setUint16(B,~w),B+=2):(V[B++]=58,rt.setUint32(B,~w),B+=4);else{let H;if((H=this.useFloat32)>0&&w<4294967296&&w>=-2147483648){V[B++]=250,rt.setFloat32(B,w);let U;if(H<4||(U=w*Pc[(V[B]&127)<<1|V[B+1]>>7])>>0===U){B+=4;return}else B--}V[B++]=251,rt.setFloat64(B,w),B+=8}else if(L==="object")if(!w)V[B++]=246;else{if(a){let U=a.get(w);if(U){if(V[B++]=216,V[B++]=29,V[B++]=25,!U.references){let G=a.idsToInsert||(a.idsToInsert=[]);U.references=[],G.push(U)}U.references.push(B-n),B+=2;return}else a.set(w,{offset:B-n})}let H=w.constructor;if(H===Object)P(w);else if(H===Array){M=w.length,M<24?V[B++]=128|M:Mn(M);for(let U=0;U<M;U++)k(w[U])}else if(H===Map)if((this.mapsAsObjects?this.useTag259ForMaps!==!1:this.useTag259ForMaps)&&(V[B++]=217,V[B++]=1,V[B++]=3),M=w.size,M<24?V[B++]=160|M:M<256?(V[B++]=184,V[B++]=M):M<65536?(V[B++]=185,V[B++]=M>>8,V[B++]=M&255):(V[B++]=186,rt.setUint32(B,M),B+=4),l.keyMap)for(let[U,G]of w)k(l.encodeKey(U)),k(G);else for(let[U,G]of w)k(U),k(G);else{for(let U=0,G=bu.length;U<G;U++){let Q=mb[U];if(w instanceof Q){let _=bu[U],se=_.tag;se==null&&(se=_.getTag&&_.getTag.call(this,w)),se<24?V[B++]=192|se:se<256?(V[B++]=216,V[B++]=se):se<65536?(V[B++]=217,V[B++]=se>>8,V[B++]=se&255):se>-1&&(V[B++]=218,rt.setUint32(B,se),B+=4),_.encode.call(this,w,k,D);return}}if(w[Symbol.iterator]){if(bl){let U=new Error("Iterable should be serialized as iterator");throw U.iteratorNotHandled=!0,U}V[B++]=159;for(let U of w)k(U);V[B++]=255;return}if(w[Symbol.asyncIterator]||El(w)){let U=new Error("Iterable/blob should be serialized as iterator");throw U.iteratorNotHandled=!0,U}if(this.useToJSON&&w.toJSON){const U=w.toJSON();if(U!==w)return k(U)}P(w)}}else if(L==="boolean")V[B++]=w?245:244;else if(L==="bigint"){if(w<BigInt(1)<<BigInt(64)&&w>=0)V[B++]=27,rt.setBigUint64(B,w);else if(w>-(BigInt(1)<<BigInt(64))&&w<0)V[B++]=59,rt.setBigUint64(B,-w-BigInt(1));else if(this.largeBigIntToFloat)V[B++]=251,rt.setFloat64(B,Number(w));else{w>=BigInt(0)?V[B++]=194:(V[B++]=195,w=BigInt(-1)-w);let H=[];for(;w;)H.push(Number(w&BigInt(255))),w>>=BigInt(8);Eu(new Uint8Array(H.reverse()),D);return}B+=8}else if(L==="undefined")V[B++]=247;else throw new Error("Unknown type: "+L)},P=this.useRecords===!1?this.variableMapSize?w=>{let L=Object.keys(w),M=Object.values(w),H=L.length;if(H<24?V[B++]=160|H:H<256?(V[B++]=184,V[B++]=H):H<65536?(V[B++]=185,V[B++]=H>>8,V[B++]=H&255):(V[B++]=186,rt.setUint32(B,H),B+=4),l.keyMap)for(let U=0;U<H;U++)k(l.encodeKey(L[U])),k(M[U]);else for(let U=0;U<H;U++)k(L[U]),k(M[U])}:w=>{V[B++]=185;let L=B-n;B+=2;let M=0;if(l.keyMap)for(let H in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(H))&&(k(l.encodeKey(H)),k(w[H]),M++);else for(let H in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(H))&&(k(H),k(w[H]),M++);V[L+++n]=M>>8,V[L+n]=M&255}:(w,L)=>{let M,H=s.transitions||(s.transitions=Object.create(null)),U=0,G=0,Q,_;if(this.keyMap){_=Object.keys(w).map(te=>this.encodeKey(te)),G=_.length;for(let te=0;te<G;te++){let S=_[te];M=H[S],M||(M=H[S]=Object.create(null),U++),H=M}}else for(let te in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(te))&&(M=H[te],M||(H[Zt]&1048576&&(Q=H[Zt]&65535),M=H[te]=Object.create(null),U++),H=M,G++);let se=H[Zt];if(se!==void 0)se&=65535,V[B++]=217,V[B++]=se>>8|224,V[B++]=se&255;else if(_||(_=H.__keys__||(H.__keys__=Object.keys(w))),Q===void 0?(se=s.nextId++,se||(se=0,s.nextId=1),se>=zh&&(s.nextId=(se=d)+1)):se=Q,s[se]=_,se<d){V[B++]=217,V[B++]=se>>8|224,V[B++]=se&255,H=s.transitions;for(let te=0;te<G;te++)(H[Zt]===void 0||H[Zt]&1048576)&&(H[Zt]=se),H=H[_[te]];H[Zt]=se|1048576,i=!0}else{if(H[Zt]=se,rt.setUint32(B,3655335680),B+=3,U&&(b+=y*U),T.length>=zh-d&&(T.shift()[Zt]=void 0),T.push(H),Mn(G+2),k(57344+se),k(_),L)return;for(let te in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(te))&&k(w[te]);return}if(G<24?V[B++]=128|G:Mn(G),!L)for(let te in w)(typeof w.hasOwnProperty!="function"||w.hasOwnProperty(te))&&k(w[te])},D=w=>{let L;if(w>16777216){if(w-n>$h)throw new Error("Encoded buffer would be larger than maximum buffer size");L=Math.min($h,Math.round(Math.max((w-n)*(w>67108864?1.25:2),4194304)/4096)*4096)}else L=(Math.max(w-n<<2,V.length-1)>>12)+1<<12;let M=new gl(L);return rt=new DataView(M.buffer,0,L),V.copy?V.copy(M,0,n,w):M.set(V.slice(n,w)),B-=n,n=0,lr=M.length-10,V=M};let v=100,A=1e3;this.encodeAsIterable=function(w,L){return W(w,L,N)},this.encodeAsAsyncIterable=function(w,L){return W(w,L,j)};function*N(w,L,M){let H=w.constructor;if(H===Object){let U=l.useRecords!==!1;U?P(w,!0):Vh(Object.keys(w).length,160);for(let G in w){let Q=w[G];U||k(G),Q&&typeof Q=="object"?L[G]?yield*N(Q,L[G]):yield*z(Q,L,G):k(Q)}}else if(H===Array){let U=w.length;Mn(U);for(let G=0;G<U;G++){let Q=w[G];Q&&(typeof Q=="object"||B-n>v)?L.element?yield*N(Q,L.element):yield*z(Q,L,"element"):k(Q)}}else if(w[Symbol.iterator]&&!w.buffer){V[B++]=159;for(let U of w)U&&(typeof U=="object"||B-n>v)?L.element?yield*N(U,L.element):yield*z(U,L,"element"):k(U);V[B++]=255}else El(w)?(Vh(w.size,64),yield V.subarray(n,B),yield w,R()):w[Symbol.asyncIterator]?(V[B++]=159,yield V.subarray(n,B),yield w,R(),V[B++]=255):k(w);M&&B>n?yield V.subarray(n,B):B-n>v&&(yield V.subarray(n,B),R())}function*z(w,L,M){let H=B-n;try{k(w),B-n>v&&(yield V.subarray(n,B),R())}catch(U){if(U.iteratorNotHandled)L[M]={},B=n+H,yield*N.call(this,w,L[M]);else throw U}}function R(){v=A,l.encode(null,Tl)}function W(w,L,M){return L&&L.chunkThreshold?v=A=L.chunkThreshold:v=100,w&&typeof w=="object"?(l.encode(null,Tl),M(w,l.iterateProperties||(l.iterateProperties={}),!0)):[l.encode(w)]}async function*j(w,L){for(let M of N(w,L,!0)){let H=M.constructor;if(H===jh||H===Uint8Array)yield M;else if(El(M)){let U=M.stream().getReader(),G;for(;!(G=await U.read()).done;)yield G.value}else if(M[Symbol.asyncIterator])for await(let U of M)R(),U?yield*j(U,L.async||(L.async={})):yield l.encode(U);else yield M}}}useBuffer(t){V=t,rt=new DataView(V.buffer,V.byteOffset,V.byteLength),B=0}clearSharedData(){this.structures&&(this.structures=[]),this.sharedValues&&(this.sharedValues=void 0)}updateSharedData(){let t=this.sharedVersion||0;this.sharedVersion=t+1;let n=this.structures.slice(0),r=new gb(n,this.sharedValues,this.sharedVersion),i=this.saveShared(r,s=>(s&&s.version||0)==t);return i===!1?(r=this.getShared()||{},this.structures=r.structures||[],this.sharedValues=r.packedValues,this.sharedVersion=r.version,this.structures.nextId=this.structures.length):n.forEach((s,a)=>this.structures[a]=s),i}}function Vh(e,t){e<24?V[B++]=t|e:e<256?(V[B++]=t|24,V[B++]=e):e<65536?(V[B++]=t|25,V[B++]=e>>8,V[B++]=e&255):(V[B++]=t|26,rt.setUint32(B,e),B+=4)}class gb{constructor(t,n,r){this.structures=t,this.packedValues=n,this.version=r}}function Mn(e){e<24?V[B++]=128|e:e<256?(V[B++]=152,V[B++]=e):e<65536?(V[B++]=153,V[B++]=e>>8,V[B++]=e&255):(V[B++]=154,rt.setUint32(B,e),B+=4)}const GP=typeof Blob>"u"?function(){}:Blob;function El(e){if(e instanceof GP)return!0;let t=e[Symbol.toStringTag];return t==="Blob"||t==="File"}function Da(e,t){switch(typeof e){case"string":if(e.length>3){if(t.objectMap[e]>-1||t.values.length>=t.maxValues)return;let r=t.get(e);if(r)++r.count==2&&t.values.push(e);else if(t.set(e,{count:1}),t.samplingPackedValues){let i=t.samplingPackedValues.get(e);i?i.count++:t.samplingPackedValues.set(e,{count:1})}}break;case"object":if(e)if(e instanceof Array)for(let r=0,i=e.length;r<i;r++)Da(e[r],t);else{let r=!t.encoder.useRecords;for(var n in e)e.hasOwnProperty(n)&&(r&&Da(n,t),Da(e[n],t))}break;case"function":console.log(e)}}const qP=new Uint8Array(new Uint16Array([1]).buffer)[0]==1;mb=[Date,Set,Error,RegExp,Vr,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?function(){}:BigInt64Array,Float32Array,Float64Array,gb];bu=[{tag:1,encode(e,t){let n=e.getTime()/1e3;(this.useTimestamp32||e.getMilliseconds()===0)&&n>=0&&n<4294967296?(V[B++]=26,rt.setUint32(B,n),B+=4):(V[B++]=251,rt.setFloat64(B,n),B+=8)}},{tag:258,encode(e,t){let n=Array.from(e);t(n)}},{tag:27,encode(e,t){t([e.name,e.message])}},{tag:27,encode(e,t){t(["RegExp",e.source,e.flags])}},{getTag(e){return e.tag},encode(e,t){t(e.value)}},{encode(e,t,n){Eu(e,n)}},{getTag(e){if(e.constructor===Uint8Array&&(this.tagUint8Array||Qs&&this.tagUint8Array!==!1))return 64},encode(e,t,n){Eu(e,n)}},Dn(68,1),Dn(69,2),Dn(70,4),Dn(71,8),Dn(72,1),Dn(77,2),Dn(78,4),Dn(79,8),Dn(85,4),Dn(86,8),{encode(e,t){let n=e.packedValues||[],r=e.structures||[];if(n.values.length>0){V[B++]=216,V[B++]=51,Mn(4);let i=n.values;t(i),Mn(0),Mn(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let s=0,a=i.length;s<a;s++)packedObjectMap[i[s]]=s}if(r){rt.setUint32(B,3655335424),B+=3;let i=r.slice(0);i.unshift(57344),i.push(new Vr(e.version,1399353956)),t(i)}else t(new Vr(e.version,1399353956))}}];function Dn(e,t){return!qP&&t>1&&(e-=4),{tag:e,encode:function(r,i){let s=r.byteLength,a=r.byteOffset||0,o=r.buffer||r;i(Qs?Do.from(o,a,s):new Uint8Array(o,a,s))}}}function Eu(e,t){let n=e.byteLength;n<24?V[B++]=64+n:n<256?(V[B++]=88,V[B++]=n):n<65536?(V[B++]=89,V[B++]=n>>8,V[B++]=n&255):(V[B++]=90,rt.setUint32(B,n),B+=4),B+n>=V.length&&t(B+n),V.set(e.buffer?e:new Uint8Array(e),B),B+=n}function KP(e,t){let n,r=t.length*2,i=e.length-r;t.sort((s,a)=>s.offset>a.offset?1:-1);for(let s=0;s<t.length;s++){let a=t[s];a.id=s;for(let o of a.references)e[o++]=s>>8,e[o]=s&255}for(;n=t.pop();){let s=n.offset;e.copyWithin(s+r,s,i),r-=2;let a=s+r;e[a++]=216,e[a++]=28,i=s}return e}function Wh(e,t){rt.setUint32(Tt.position+e,B-Tt.position-e+1);let n=Tt;Tt=null,t(n[0]),t(n[1])}let Bc=new YP({useRecords:!1});const XP=Bc.encode;Bc.encodeAsIterable;Bc.encodeAsAsyncIterable;const Yh=512,QP=1024,Tl=2048;async function Ft(e,t){var i;const n=await fetch("/api/rpc",{method:"POST",headers:{"Content-Type":"application/cbor",Accept:"application/cbor"},body:new Uint8Array(XP({method:e,params:t??{}}))});if(!n.ok){try{const s=await n.arrayBuffer(),a=Uh(new Uint8Array(s));if((i=a==null?void 0:a.error)!=null&&i.message)throw new Error(a.error.message)}catch(s){if(s instanceof Error&&s.message!==`RPC call ${e} failed`)throw s}throw new Error(`RPC call ${e} failed: ${n.status} ${n.statusText}`)}const r=await n.arrayBuffer();return Uh(new Uint8Array(r))}async function LM(e,t){return Ft("fetchRuns",{worldEnv:e,params:t})}async function DM(e,t,n="all"){return Ft("fetchRun",{worldEnv:e,runId:t,resolveData:n})}async function PM(e,t,n,r="all"){return Ft("fetchStep",{worldEnv:e,runId:t,stepId:n,resolveData:r})}async function MM(e,t,n){return Ft("fetchEvents",{worldEnv:e,runId:t,params:n})}async function BM(e,t,n,r="all"){return Ft("fetchEvent",{worldEnv:e,runId:t,eventId:n,resolveData:r})}async function FM(e,t){return Ft("fetchHooks",{worldEnv:e,params:t})}async function HM(e,t,n="all"){return Ft("fetchHook",{worldEnv:e,hookId:t,resolveData:n})}async function UM(e,t){return Ft("cancelRun",{worldEnv:e,runId:t})}async function jM(e,t,n){return Ft("recreateRun",{worldEnv:e,runId:t,deploymentId:n})}async function zM(e,t){return Ft("reenqueueRun",{worldEnv:e,runId:t})}async function $M(e,t,n){return Ft("wakeUpRun",{worldEnv:e,runId:t,options:n})}async function VM(e,t,n){return Ft("resumeHook",{worldEnv:e,token:t,payload:n})}async function WM(e,t){return Ft("fetchStreams",{worldEnv:e,runId:t})}async function YM(e){return Ft("fetchWorkflowsManifest",{worldEnv:e})}async function GM(e,t,n){return Ft("runHealthCheck",{worldEnv:e,endpoint:t,options:n})}async function qM(e,t){return Ft("getEncryptionKeyForRun",{worldEnv:e,runId:t})}const ZP=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:J1},Symbol.toStringTag,{value:"Module"}));export{Oo as $,oT as A,RP as B,lT as C,CM as D,OM as E,DM as F,wp as G,nM as H,Md as I,I2 as J,pM as K,iM as L,on as M,c_ as N,qm as O,Yr as P,GL as Q,En as R,RM as S,IM as T,sM as U,bT as V,aM as W,Dx as X,Wy as Y,Pt as Z,t4 as _,vM as a,oe as a0,EM as a1,xM as a2,gP as a3,eo as a4,TM as a5,No as a6,pr as a7,Ns as a8,r4 as a9,IP as aA,lb as aB,zE as aC,VE as aD,WE as aE,GE as aF,qE as aG,XE as aH,KE as aI,YE as aJ,OE as aK,UM as aL,zM as aM,$M as aN,VM as aO,jM as aP,YM as aQ,ga as aa,bM as ab,mM as ac,ai as ad,i4 as ae,kM as af,yM as ag,_M as ah,gM as ai,lM as aj,oM as ak,HM as al,PM as am,WM as an,ub as ao,wP as ap,vP as aq,Vu as ar,_s as as,sn as at,S2 as au,AM as av,BM as aw,qM as ax,wM as ay,Px as az,kP as b,Kp as c,ab as d,uM as e,_T as f,Fr as g,cM as h,LM as i,FM as j,SM as k,MM as l,ro as m,Wr as n,mp as o,Qh as p,Xn as q,GM as r,Ub as s,Yo as t,NM as u,_b as v,ep as w,pT as x,aT as y,uT as z};