@workflow/web 4.1.0-beta.36 → 4.1.0-beta.37

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 (20) hide show
  1. package/build/client/assets/encryption-8OvC6eoJ.js +1 -0
  2. package/build/client/assets/{highlighted-body-B3W2YXNL-DCpvexQb.js → highlighted-body-B3W2YXNL-BO6bNJzI.js} +1 -1
  3. package/build/client/assets/{home-DrlgsY_n.js → home-bWDrLREI.js} +1 -1
  4. package/build/client/assets/{manifest-5132e9b8.js → manifest-daa82ff1.js} +1 -1
  5. package/build/client/assets/{mermaid-3ZIDBTTL-Ddgw_y0p.js → mermaid-3ZIDBTTL-CJ6mkUFN.js} +71 -66
  6. package/build/client/assets/{root-DKF4DBnS.js → root-Ckv-c9_b.js} +1 -1
  7. package/build/client/assets/run-detail-EcdnCjQk.js +41 -0
  8. package/build/client/assets/{use-workflow-graph-CUAynhYD.js → use-workflow-graph-JKiMb5g6.js} +1 -1
  9. package/build/server/assets/{app-BMiBNdAl.js → app-CatvtWxS.js} +1 -1
  10. package/build/server/assets/{highlighted-body-B3W2YXNL-CzB1YMLj.js → highlighted-body-B3W2YXNL-DoOhy3wX.js} +2 -2
  11. package/build/server/assets/{mermaid-3ZIDBTTL-Dqygs4_q.js → mermaid-3ZIDBTTL-uuxw6-ur.js} +2 -2
  12. package/build/server/assets/{server-build-Up-_dwCR.js → server-build-XXW48t5z.js} +1633 -1198
  13. package/build/server/assets/{token-DbisGEEb.js → token-C58qysN7.js} +3 -3
  14. package/build/server/assets/{token-lkNtm8QO.js → token-CLFHo1Az.js} +2 -2
  15. package/build/server/assets/{token-util-DNmL7drj.js → token-util-C6iVpF77.js} +2 -2
  16. package/build/server/assets/{token-util-pehEj9SJ.js → token-util-CbxhzlWz.js} +1 -1
  17. package/build/server/assets/{token-util-BtczqLw5.js → token-util-CcopqG1U.js} +2 -2
  18. package/build/server/index.js +1 -1
  19. package/package.json +6 -6
  20. package/build/client/assets/run-detail-DKgwr7Ee.js +0 -36
@@ -1,105 +1,110 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-B3W2YXNL-DCpvexQb.js","assets/index-DklpUtP3.js"])))=>i.map(i=>d[i]);
2
- var Tm=Object.defineProperty;var xm=(e,t,n)=>t in e?Tm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ne=(e,t,n)=>xm(e,typeof t!="symbol"?t+"":t,n);import{r as b,j as g,f as $o,D as Md,R as j,A as ym,G as Bd}from"./index-DklpUtP3.js";function dn(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 Jl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fd(...e){return t=>{let n=!1;const r=e.map(i=>{const a=Jl(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():Jl(e[i],null)}}}}function Zn(...e){return b.useCallback(Fd(...e),e)}function Ov(e,t){const n=b.createContext(t),r=a=>{const{children:s,...o}=a,l=b.useMemo(()=>o,Object.values(o));return g.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function i(a){const s=b.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Hd(e,t=[]){let n=[];function r(a,s){const o=b.createContext(s),l=n.length;n=[...n,s];const u=c=>{var _;const{scope:p,children:h,...m}=c,E=((_=p==null?void 0:p[e])==null?void 0:_[l])||o,k=b.useMemo(()=>m,Object.values(m));return g.jsx(E.Provider,{value:k,children:h})};u.displayName=a+"Provider";function d(c,p){var E;const h=((E=p==null?void 0:p[e])==null?void 0:E[l])||o,m=b.useContext(h);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,d]}const i=()=>{const a=n.map(s=>b.createContext(s));return function(o){const l=(o==null?void 0:o[e])||a;return b.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[r,_m(i,...t)]}function _m(...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(a){const s=r.reduce((o,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...o,...c}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function km(e){const t=Am(e),n=b.forwardRef((r,i)=>{const{children:a,...s}=r,o=b.Children.toArray(a),l=o.find(wm);if(l){const u=l.props.children,d=o.map(c=>c===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:c);return g.jsx(t,{...s,ref:i,children:b.isValidElement(u)?b.cloneElement(u,void 0,d):null})}return g.jsx(t,{...s,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function Am(e){const t=b.forwardRef((n,r)=>{const{children:i,...a}=n;if(b.isValidElement(i)){const s=Nm(i),o=Sm(a,i.props);return i.type!==b.Fragment&&(o.ref=r?Fd(r,s):s),b.cloneElement(i,o)}return b.Children.count(i)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ud=Symbol("radix.slottable");function Cm(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ud,t}function wm(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ud}function Sm(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...o)=>{const l=a(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Nm(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 Im=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],er=Im.reduce((e,t)=>{const n=km(`Primitive.${t}`),r=b.forwardRef((i,a)=>{const{asChild:s,...o}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...o,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Om(e,t){e&&$o.flushSync(()=>e.dispatchEvent(t))}function Ha(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Rm(e,t=globalThis==null?void 0:globalThis.document){const n=Ha(e);b.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 Lm="DismissableLayer",Gs="dismissableLayer.update",vm="dismissableLayer.pointerDownOutside",Dm="dismissableLayer.focusOutside",Zl,jd=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zd=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:o,...l}=e,u=b.useContext(jd),[d,c]=b.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=b.useState({}),m=Zn(t,V=>c(V)),E=Array.from(u.layers),[k]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),_=E.indexOf(k),N=d?E.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,F=N>=_,H=Bm(V=>{const U=V.target,Q=[...u.branches].some(R=>R.contains(U));!F||Q||(i==null||i(V),s==null||s(V),V.defaultPrevented||o==null||o())},p),I=Fm(V=>{const U=V.target;[...u.branches].some(R=>R.contains(U))||(a==null||a(V),s==null||s(V),V.defaultPrevented||o==null||o())},p);return Rm(V=>{N===u.layers.size-1&&(r==null||r(V),!V.defaultPrevented&&o&&(V.preventDefault(),o()))},p),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Zl=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),eu(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Zl)}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),eu())},[d,u]),b.useEffect(()=>{const V=()=>h({});return document.addEventListener(Gs,V),()=>document.removeEventListener(Gs,V)},[]),g.jsx(er.div,{...l,ref:m,style:{pointerEvents:w?F?"auto":"none":void 0,...e.style},onFocusCapture:dn(e.onFocusCapture,I.onFocusCapture),onBlurCapture:dn(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:dn(e.onPointerDownCapture,H.onPointerDownCapture)})});zd.displayName=Lm;var Pm="DismissableLayerBranch",Mm=b.forwardRef((e,t)=>{const n=b.useContext(jd),r=b.useRef(null),i=Zn(t,r);return b.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),g.jsx(er.div,{...e,ref:i})});Mm.displayName=Pm;function Bm(e,t=globalThis==null?void 0:globalThis.document){const n=Ha(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const a=o=>{if(o.target&&!r.current){let l=function(){$d(vm,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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Fm(e,t=globalThis==null?void 0:globalThis.document){const n=Ha(e),r=b.useRef(!1);return b.useEffect(()=>{const i=a=>{a.target&&!r.current&&$d(Dm,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function eu(){const e=new CustomEvent(Gs);document.dispatchEvent(e)}function $d(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Om(i,a):i.dispatchEvent(a)}var qn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Hm=Md[" useId ".trim().toString()]||(()=>{}),Um=0;function jm(e){const[t,n]=b.useState(Hm());return qn(()=>{n(r=>r??String(Um++))},[e]),t?`radix-${t}`:""}const zm=["top","right","bottom","left"],On=Math.min,St=Math.max,xa=Math.round,$i=Math.floor,tn=e=>({x:e,y:e}),$m={left:"right",right:"left",bottom:"top",top:"bottom"},Vm={start:"end",end:"start"};function Ks(e,t,n){return St(e,On(t,n))}function hn(e,t){return typeof e=="function"?e(t):e}function pn(e){return e.split("-")[0]}function Sr(e){return e.split("-")[1]}function Vo(e){return e==="x"?"y":"x"}function Wo(e){return e==="y"?"height":"width"}const Wm=new Set(["top","bottom"]);function en(e){return Wm.has(pn(e))?"y":"x"}function Yo(e){return Vo(en(e))}function Ym(e,t,n){n===void 0&&(n=!1);const r=Sr(e),i=Yo(e),a=Wo(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ya(s)),[s,ya(s)]}function qm(e){const t=ya(e);return[Xs(e),t,Xs(t)]}function Xs(e){return e.replace(/start|end/g,t=>Vm[t])}const tu=["left","right"],nu=["right","left"],Gm=["top","bottom"],Km=["bottom","top"];function Xm(e,t,n){switch(e){case"top":case"bottom":return n?t?nu:tu:t?tu:nu;case"left":case"right":return t?Gm:Km;default:return[]}}function Qm(e,t,n,r){const i=Sr(e);let a=Xm(pn(e),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(Xs)))),a}function ya(e){return e.replace(/left|right|bottom|top/g,t=>$m[t])}function Jm(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vd(e){return typeof e!="number"?Jm(e):{top:e,right:e,bottom:e,left:e}}function _a(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 ru(e,t,n){let{reference:r,floating:i}=e;const a=en(t),s=Yo(t),o=Wo(s),l=pn(t),u=a==="y",d=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,p=r[o]/2-i[o]/2;let h;switch(l){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-i.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Sr(t)){case"start":h[s]-=p*(n&&u?-1:1);break;case"end":h[s]+=p*(n&&u?-1:1);break}return h}const Zm=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,o=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:c}=ru(u,r,l),p=r,h={},m=0;for(let E=0;E<o.length;E++){const{name:k,fn:_}=o[E],{x:N,y:w,data:F,reset:H}=await _({x:d,y:c,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});d=N??d,c=w??c,h={...h,[k]:{...h[k],...F}},H&&m<=50&&(m++,typeof H=="object"&&(H.placement&&(p=H.placement),H.rects&&(u=H.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):H.rects),{x:d,y:c}=ru(u,p,l)),E=-1)}return{x:d,y:c,placement:p,strategy:i,middlewareData:h}};async function hi(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:s,elements:o,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:p=!1,padding:h=0}=hn(t,e),m=Vd(h),k=o[p?c==="floating"?"reference":"floating":c],_=_a(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(k)))==null||n?k:k.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:l})),N=c==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),F=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},H=_a(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:N,offsetParent:w,strategy:l}):N);return{top:(_.top-H.top+m.top)/F.y,bottom:(H.bottom-_.bottom+m.bottom)/F.y,left:(_.left-H.left+m.left)/F.x,right:(H.right-_.right+m.right)/F.x}}const eg=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:s,elements:o,middlewareData:l}=t,{element:u,padding:d=0}=hn(e,t)||{};if(u==null)return{};const c=Vd(d),p={x:n,y:r},h=Yo(i),m=Wo(h),E=await s.getDimensions(u),k=h==="y",_=k?"top":"left",N=k?"bottom":"right",w=k?"clientHeight":"clientWidth",F=a.reference[m]+a.reference[h]-p[h]-a.floating[m],H=p[h]-a.reference[h],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let V=I?I[w]:0;(!V||!await(s.isElement==null?void 0:s.isElement(I)))&&(V=o.floating[w]||a.floating[m]);const U=F/2-H/2,Q=V/2-E[m]/2-1,R=On(c[_],Q),K=On(c[N],Q),z=R,y=V-E[m]-K,L=V/2-E[m]/2+U,v=Ks(z,L,y),D=!l.arrow&&Sr(i)!=null&&L!==v&&a.reference[m]/2-(L<z?R:K)-E[m]/2<0,P=D?L<z?L-z:L-y:0;return{[h]:p[h]+P,data:{[h]:v,centerOffset:L-v-P,...D&&{alignmentOffset:P}},reset:D}}}),tg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:o,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:E=!0,...k}=hn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const _=pn(i),N=en(o),w=pn(o)===o,F=await(l.isRTL==null?void 0:l.isRTL(u.floating)),H=p||(w||!E?[ya(o)]:qm(o)),I=m!=="none";!p&&I&&H.push(...Qm(o,E,m,F));const V=[o,...H],U=await hi(t,k),Q=[];let R=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&Q.push(U[_]),c){const L=Ym(i,s,F);Q.push(U[L[0]],U[L[1]])}if(R=[...R,{placement:i,overflows:Q}],!Q.every(L=>L<=0)){var K,z;const L=(((K=a.flip)==null?void 0:K.index)||0)+1,v=V[L];if(v&&(!(c==="alignment"?N!==en(v):!1)||R.every(q=>en(q.placement)===N?q.overflows[0]>0:!0)))return{data:{index:L,overflows:R},reset:{placement:v}};let D=(z=R.filter(P=>P.overflows[0]<=0).sort((P,q)=>P.overflows[1]-q.overflows[1])[0])==null?void 0:z.placement;if(!D)switch(h){case"bestFit":{var y;const P=(y=R.filter(q=>{if(I){const J=en(q.placement);return J===N||J==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(J=>J>0).reduce((J,T)=>J+T,0)]).sort((q,J)=>q[1]-J[1])[0])==null?void 0:y[0];P&&(D=P);break}case"initialPlacement":D=o;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function iu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function au(e){return zm.some(t=>e[t]>=0)}const ng=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=hn(e,t);switch(r){case"referenceHidden":{const a=await hi(t,{...i,elementContext:"reference"}),s=iu(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:au(s)}}}case"escaped":{const a=await hi(t,{...i,altBoundary:!0}),s=iu(a,n.floating);return{data:{escapedOffsets:s,escaped:au(s)}}}default:return{}}}}},Wd=new Set(["left","top"]);async function rg(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=pn(n),o=Sr(n),l=en(n)==="y",u=Wd.has(s)?-1:1,d=a&&l?-1:1,c=hn(t,e);let{mainAxis:p,crossAxis:h,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"&&(h=o==="end"?m*-1:m),l?{x:h*d,y:p*u}:{x:p*u,y:h*d}}const ig=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:s,middlewareData:o}=t,l=await rg(t,e);return s===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:s}}}}},ag=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:o={fn:k=>{let{x:_,y:N}=k;return{x:_,y:N}}},...l}=hn(e,t),u={x:n,y:r},d=await hi(t,l),c=en(pn(i)),p=Vo(c);let h=u[p],m=u[c];if(a){const k=p==="y"?"top":"left",_=p==="y"?"bottom":"right",N=h+d[k],w=h-d[_];h=Ks(N,h,w)}if(s){const k=c==="y"?"top":"left",_=c==="y"?"bottom":"right",N=m+d[k],w=m-d[_];m=Ks(N,m,w)}const E=o.fn({...t,[p]:h,[c]:m});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[p]:a,[c]:s}}}}}},sg=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:s}=t,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=hn(e,t),d={x:n,y:r},c=en(i),p=Vo(c);let h=d[p],m=d[c];const E=hn(o,t),k=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(l){const w=p==="y"?"height":"width",F=a.reference[p]-a.floating[w]+k.mainAxis,H=a.reference[p]+a.reference[w]-k.mainAxis;h<F?h=F:h>H&&(h=H)}if(u){var _,N;const w=p==="y"?"width":"height",F=Wd.has(pn(i)),H=a.reference[c]-a.floating[w]+(F&&((_=s.offset)==null?void 0:_[c])||0)+(F?0:k.crossAxis),I=a.reference[c]+a.reference[w]+(F?0:((N=s.offset)==null?void 0:N[c])||0)-(F?k.crossAxis:0);m<H?m=H:m>I&&(m=I)}return{[p]:h,[c]:m}}}},og=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:s,elements:o}=t,{apply:l=()=>{},...u}=hn(e,t),d=await hi(t,u),c=pn(i),p=Sr(i),h=en(i)==="y",{width:m,height:E}=a.floating;let k,_;c==="top"||c==="bottom"?(k=c,_=p===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(_=c,k=p==="end"?"top":"bottom");const N=E-d.top-d.bottom,w=m-d.left-d.right,F=On(E-d[k],N),H=On(m-d[_],w),I=!t.middlewareData.shift;let V=F,U=H;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(V=N),I&&!p){const R=St(d.left,0),K=St(d.right,0),z=St(d.top,0),y=St(d.bottom,0);h?U=m-2*(R!==0||K!==0?R+K:St(d.left,d.right)):V=E-2*(z!==0||y!==0?z+y:St(d.top,d.bottom))}await l({...t,availableWidth:U,availableHeight:V});const Q=await s.getDimensions(o.floating);return m!==Q.width||E!==Q.height?{reset:{rects:!0}}:{}}}};function Ua(){return typeof window<"u"}function Nr(e){return Yd(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function an(e){var t;return(t=(Yd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yd(e){return Ua()?e instanceof Node||e instanceof Nt(e).Node:!1}function Vt(e){return Ua()?e instanceof Element||e instanceof Nt(e).Element:!1}function rn(e){return Ua()?e instanceof HTMLElement||e instanceof Nt(e).HTMLElement:!1}function su(e){return!Ua()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}const lg=new Set(["inline","contents"]);function wi(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!lg.has(i)}const ug=new Set(["table","td","th"]);function cg(e){return ug.has(Nr(e))}const dg=[":popover-open",":modal"];function ja(e){return dg.some(t=>{try{return e.matches(t)}catch{return!1}})}const fg=["transform","translate","scale","rotate","perspective"],hg=["transform","translate","scale","rotate","perspective","filter"],pg=["paint","layout","strict","content"];function qo(e){const t=Go(),n=Vt(e)?Wt(e):e;return fg.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)||hg.some(r=>(n.willChange||"").includes(r))||pg.some(r=>(n.contain||"").includes(r))}function mg(e){let t=Rn(e);for(;rn(t)&&!_r(t);){if(qo(t))return t;if(ja(t))return null;t=Rn(t)}return null}function Go(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gg=new Set(["html","body","#document"]);function _r(e){return gg.has(Nr(e))}function Wt(e){return Nt(e).getComputedStyle(e)}function za(e){return Vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rn(e){if(Nr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||su(e)&&e.host||an(e);return su(t)?t.host:t}function qd(e){const t=Rn(e);return _r(t)?e.ownerDocument?e.ownerDocument.body:e.body:rn(t)&&wi(t)?t:qd(t)}function pi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=qd(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),s=Nt(i);if(a){const o=Qs(s);return t.concat(s,s.visualViewport||[],wi(i)?i:[],o&&n?pi(o):[])}return t.concat(i,pi(i,[],n))}function Qs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gd(e){const t=Wt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=rn(e),a=i?e.offsetWidth:n,s=i?e.offsetHeight:r,o=xa(n)!==a||xa(r)!==s;return o&&(n=a,r=s),{width:n,height:r,$:o}}function Ko(e){return Vt(e)?e:e.contextElement}function br(e){const t=Ko(e);if(!rn(t))return tn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Gd(t);let s=(a?xa(n.width):n.width)/r,o=(a?xa(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const bg=tn(0);function Kd(e){const t=Nt(e);return!Go()||!t.visualViewport?bg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Eg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nt(e)?!1:t}function Gn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Ko(e);let s=tn(1);t&&(r?Vt(r)&&(s=br(r)):s=br(e));const o=Eg(a,n,r)?Kd(a):tn(0);let l=(i.left+o.x)/s.x,u=(i.top+o.y)/s.y,d=i.width/s.x,c=i.height/s.y;if(a){const p=Nt(a),h=r&&Vt(r)?Nt(r):r;let m=p,E=Qs(m);for(;E&&r&&h!==m;){const k=br(E),_=E.getBoundingClientRect(),N=Wt(E),w=_.left+(E.clientLeft+parseFloat(N.paddingLeft))*k.x,F=_.top+(E.clientTop+parseFloat(N.paddingTop))*k.y;l*=k.x,u*=k.y,d*=k.x,c*=k.y,l+=w,u+=F,m=Nt(E),E=Qs(m)}}return _a({width:d,height:c,x:l,y:u})}function $a(e,t){const n=za(e).scrollLeft;return t?t.left+n:Gn(an(e)).left+n}function Xd(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-$a(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Tg(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",s=an(r),o=t?ja(t.floating):!1;if(r===s||o&&a)return n;let l={scrollLeft:0,scrollTop:0},u=tn(1);const d=tn(0),c=rn(r);if((c||!c&&!a)&&((Nr(r)!=="body"||wi(s))&&(l=za(r)),rn(r))){const h=Gn(r);u=br(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const p=s&&!c&&!a?Xd(s,l):tn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function xg(e){return Array.from(e.getClientRects())}function yg(e){const t=an(e),n=za(e),r=e.ownerDocument.body,i=St(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=St(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+$a(e);const o=-n.scrollTop;return Wt(r).direction==="rtl"&&(s+=St(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:s,y:o}}const ou=25;function _g(e,t){const n=Nt(e),r=an(e),i=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;const d=Go();(!d||d&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const u=$a(r);if(u<=0){const d=r.ownerDocument,c=d.body,p=getComputedStyle(c),h=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(r.clientWidth-c.clientWidth-h);m<=ou&&(a-=m)}else u<=ou&&(a+=u);return{width:a,height:s,x:o,y:l}}const kg=new Set(["absolute","fixed"]);function Ag(e,t){const n=Gn(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=rn(e)?br(e):tn(1),s=e.clientWidth*a.x,o=e.clientHeight*a.y,l=i*a.x,u=r*a.y;return{width:s,height:o,x:l,y:u}}function lu(e,t,n){let r;if(t==="viewport")r=_g(e,n);else if(t==="document")r=yg(an(e));else if(Vt(t))r=Ag(t,n);else{const i=Kd(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return _a(r)}function Qd(e,t){const n=Rn(e);return n===t||!Vt(n)||_r(n)?!1:Wt(n).position==="fixed"||Qd(n,t)}function Cg(e,t){const n=t.get(e);if(n)return n;let r=pi(e,[],!1).filter(o=>Vt(o)&&Nr(o)!=="body"),i=null;const a=Wt(e).position==="fixed";let s=a?Rn(e):e;for(;Vt(s)&&!_r(s);){const o=Wt(s),l=qo(s);!l&&o.position==="fixed"&&(i=null),(a?!l&&!i:!l&&o.position==="static"&&!!i&&kg.has(i.position)||wi(s)&&!l&&Qd(e,s))?r=r.filter(d=>d!==s):i=o,s=Rn(s)}return t.set(e,r),r}function wg(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?ja(t)?[]:Cg(t,this._c):[].concat(n),r],o=s[0],l=s.reduce((u,d)=>{const c=lu(t,d,i);return u.top=St(c.top,u.top),u.right=On(c.right,u.right),u.bottom=On(c.bottom,u.bottom),u.left=St(c.left,u.left),u},lu(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Sg(e){const{width:t,height:n}=Gd(e);return{width:t,height:n}}function Ng(e,t,n){const r=rn(t),i=an(t),a=n==="fixed",s=Gn(e,!0,a,t);let o={scrollLeft:0,scrollTop:0};const l=tn(0);function u(){l.x=$a(i)}if(r||!r&&!a)if((Nr(t)!=="body"||wi(i))&&(o=za(t)),r){const h=Gn(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&u();a&&!r&&i&&u();const d=i&&!r&&!a?Xd(i,o):tn(0),c=s.left+o.scrollLeft-l.x-d.x,p=s.top+o.scrollTop-l.y-d.y;return{x:c,y:p,width:s.width,height:s.height}}function ms(e){return Wt(e).position==="static"}function uu(e,t){if(!rn(e)||Wt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return an(e)===n&&(n=n.ownerDocument.body),n}function Jd(e,t){const n=Nt(e);if(ja(e))return n;if(!rn(e)){let i=Rn(e);for(;i&&!_r(i);){if(Vt(i)&&!ms(i))return i;i=Rn(i)}return n}let r=uu(e,t);for(;r&&cg(r)&&ms(r);)r=uu(r,t);return r&&_r(r)&&ms(r)&&!qo(r)?n:r||mg(e)||n}const Ig=async function(e){const t=this.getOffsetParent||Jd,n=this.getDimensions,r=await n(e.floating);return{reference:Ng(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Og(e){return Wt(e).direction==="rtl"}const Rg={convertOffsetParentRelativeRectToViewportRelativeRect:Tg,getDocumentElement:an,getClippingRect:wg,getOffsetParent:Jd,getElementRects:Ig,getClientRects:xg,getDimensions:Sg,getScale:br,isElement:Vt,isRTL:Og};function Zd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lg(e,t){let n=null,r;const i=an(e);function a(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function s(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:d,top:c,width:p,height:h}=u;if(o||t(),!p||!h)return;const m=$i(c),E=$i(i.clientWidth-(d+p)),k=$i(i.clientHeight-(c+h)),_=$i(d),w={rootMargin:-m+"px "+-E+"px "+-k+"px "+-_+"px",threshold:St(0,On(1,l))||1};let F=!0;function H(I){const V=I[0].intersectionRatio;if(V!==l){if(!F)return s();V?s(!1,V):r=setTimeout(()=>{s(!1,1e-7)},1e3)}V===1&&!Zd(u,e.getBoundingClientRect())&&s(),F=!1}try{n=new IntersectionObserver(H,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(H,w)}n.observe(e)}return s(!0),a}function vg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ko(e),d=i||a?[...u?pi(u):[],...pi(t)]:[];d.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),a&&_.addEventListener("resize",n)});const c=u&&o?Lg(u,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(_=>{let[N]=_;N&&N.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let m,E=l?Gn(e):null;l&&k();function k(){const _=Gn(e);E&&!Zd(E,_)&&n(),E=_,m=requestAnimationFrame(k)}return n(),()=>{var _;d.forEach(N=>{i&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),c==null||c(),(_=h)==null||_.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const Dg=ig,Pg=ag,Mg=tg,Bg=og,Fg=ng,cu=eg,Hg=sg,Ug=(e,t,n)=>{const r=new Map,i={platform:Rg,...n},a={...i.platform,_c:r};return Zm(e,t,{...i,platform:a})};var jg=typeof document<"u",zg=function(){},ua=jg?b.useLayoutEffect:zg;function ka(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(!ka(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 a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!ka(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ef(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function du(e,t){const n=ef(e);return Math.round(t*n)/n}function gs(e){const t=b.useRef(e);return ua(()=>{t.current=e}),t}function $g(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:o=!0,whileElementsMounted:l,open:u}=e,[d,c]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=b.useState(r);ka(p,r)||h(r);const[m,E]=b.useState(null),[k,_]=b.useState(null),N=b.useCallback(q=>{q!==I.current&&(I.current=q,E(q))},[]),w=b.useCallback(q=>{q!==V.current&&(V.current=q,_(q))},[]),F=a||m,H=s||k,I=b.useRef(null),V=b.useRef(null),U=b.useRef(d),Q=l!=null,R=gs(l),K=gs(i),z=gs(u),y=b.useCallback(()=>{if(!I.current||!V.current)return;const q={placement:t,strategy:n,middleware:p};K.current&&(q.platform=K.current),Ug(I.current,V.current,q).then(J=>{const T={...J,isPositioned:z.current!==!1};L.current&&!ka(U.current,T)&&(U.current=T,$o.flushSync(()=>{c(T)}))})},[p,t,n,K,z]);ua(()=>{u===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,c(q=>({...q,isPositioned:!1})))},[u]);const L=b.useRef(!1);ua(()=>(L.current=!0,()=>{L.current=!1}),[]),ua(()=>{if(F&&(I.current=F),H&&(V.current=H),F&&H){if(R.current)return R.current(F,H,y);y()}},[F,H,y,R,Q]);const v=b.useMemo(()=>({reference:I,floating:V,setReference:N,setFloating:w}),[N,w]),D=b.useMemo(()=>({reference:F,floating:H}),[F,H]),P=b.useMemo(()=>{const q={position:n,left:0,top:0};if(!D.floating)return q;const J=du(D.floating,d.x),T=du(D.floating,d.y);return o?{...q,transform:"translate("+J+"px, "+T+"px)",...ef(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:T}},[n,o,D.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:y,refs:v,elements:D,floatingStyles:P}),[d,y,v,D,P])}const Vg=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?cu({element:r.current,padding:i}).fn(n):{}:r?cu({element:r,padding:i}).fn(n):{}}}},Wg=(e,t)=>({...Dg(e),options:[e,t]}),Yg=(e,t)=>({...Pg(e),options:[e,t]}),qg=(e,t)=>({...Hg(e),options:[e,t]}),Gg=(e,t)=>({...Mg(e),options:[e,t]}),Kg=(e,t)=>({...Bg(e),options:[e,t]}),Xg=(e,t)=>({...Fg(e),options:[e,t]}),Qg=(e,t)=>({...Vg(e),options:[e,t]});var Jg="Arrow",tf=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return g.jsx(er.svg,{...a,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"})})});tf.displayName=Jg;var Zg=tf;function e1(e){const[t,n]=b.useState(void 0);return qn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,o;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,o=u.blockSize}else s=e.offsetWidth,o=e.offsetHeight;n({width:s,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Xo="Popper",[nf,rf]=Hd(Xo),[t1,af]=nf(Xo),sf=e=>{const{__scopePopper:t,children:n}=e,[r,i]=b.useState(null);return g.jsx(t1,{scope:t,anchor:r,onAnchorChange:i,children:n})};sf.displayName=Xo;var of="PopperAnchor",lf=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=af(of,n),s=b.useRef(null),o=Zn(t,s),l=b.useRef(null);return b.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:g.jsx(er.div,{...i,ref:o})});lf.displayName=of;var Qo="PopperContent",[n1,r1]=nf(Qo),uf=b.forwardRef((e,t)=>{var He,be,ke,Xe,Qe,et;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:m,...E}=e,k=af(Qo,n),[_,N]=b.useState(null),w=Zn(t,Tt=>N(Tt)),[F,H]=b.useState(null),I=e1(F),V=(I==null?void 0:I.width)??0,U=(I==null?void 0:I.height)??0,Q=r+(a!=="center"?"-"+a:""),R=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},K=Array.isArray(u)?u:[u],z=K.length>0,y={padding:R,boundary:K.filter(a1),altBoundary:z},{refs:L,floatingStyles:v,placement:D,isPositioned:P,middlewareData:q}=$g({strategy:"fixed",placement:Q,whileElementsMounted:(...Tt)=>vg(...Tt,{animationFrame:h==="always"}),elements:{reference:k.anchor},middleware:[Wg({mainAxis:i+U,alignmentAxis:s}),l&&Yg({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?qg():void 0,...y}),l&&Gg({...y}),Kg({...y,apply:({elements:Tt,rects:xt,availableWidth:or,availableHeight:Mn})=>{const{width:qt,height:lr}=xt.reference,Je=Tt.floating.style;Je.setProperty("--radix-popper-available-width",`${or}px`),Je.setProperty("--radix-popper-available-height",`${Mn}px`),Je.setProperty("--radix-popper-anchor-width",`${qt}px`),Je.setProperty("--radix-popper-anchor-height",`${lr}px`)}}),F&&Qg({element:F,padding:o}),s1({arrowWidth:V,arrowHeight:U}),p&&Xg({strategy:"referenceHidden",...y})]}),[J,T]=ff(D),ie=Ha(m);qn(()=>{P&&(ie==null||ie())},[P,ie]);const te=(He=q.arrow)==null?void 0:He.x,C=(be=q.arrow)==null?void 0:be.y,he=((ke=q.arrow)==null?void 0:ke.centerOffset)!==0,[ue,de]=b.useState();return qn(()=>{_&&de(window.getComputedStyle(_).zIndex)},[_]),g.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...v,transform:P?v.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(Xe=q.transformOrigin)==null?void 0:Xe.x,(Qe=q.transformOrigin)==null?void 0:Qe.y].join(" "),...((et=q.hide)==null?void 0:et.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(n1,{scope:n,placedSide:J,onArrowChange:H,arrowX:te,arrowY:C,shouldHideArrow:he,children:g.jsx(er.div,{"data-side":J,"data-align":T,...E,ref:w,style:{...E.style,animation:P?void 0:"none"}})})})});uf.displayName=Qo;var cf="PopperArrow",i1={top:"bottom",right:"left",bottom:"top",left:"right"},df=b.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=r1(cf,r),s=i1[a.placedSide];return g.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:g.jsx(Zg,{...i,ref:n,style:{...i.style,display:"block"}})})});df.displayName=cf;function a1(e){return e!==null}var s1=e=>({name:"transformOrigin",options:e,fn(t){var k,_,N;const{placement:n,rects:r,middlewareData:i}=t,s=((k=i.arrow)==null?void 0:k.centerOffset)!==0,o=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,d]=ff(n),c={start:"0%",center:"50%",end:"100%"}[d],p=(((_=i.arrow)==null?void 0:_.x)??0)+o/2,h=(((N=i.arrow)==null?void 0:N.y)??0)+l/2;let m="",E="";return u==="bottom"?(m=s?c:`${p}px`,E=`${-l}px`):u==="top"?(m=s?c:`${p}px`,E=`${r.floating.height+l}px`):u==="right"?(m=`${-l}px`,E=s?c:`${h}px`):u==="left"&&(m=`${r.floating.width+l}px`,E=s?c:`${h}px`),{data:{x:m,y:E}}}});function ff(e){const[t,n="center"]=e.split("-");return[t,n]}var o1=sf,l1=lf,u1=uf,c1=df;function d1(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var hf=e=>{const{present:t,children:n}=e,r=f1(t),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),a=Zn(r.ref,h1(i));return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:a}):null};hf.displayName="Presence";function f1(e){const[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef("none"),s=e?"mounted":"unmounted",[o,l]=d1(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Vi(r.current);a.current=o==="mounted"?u:"none"},[o]),qn(()=>{const u=r.current,d=i.current;if(d!==e){const p=a.current,h=Vi(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),qn(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=h=>{const E=Vi(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&E&&(l("ANIMATION_END"),!i.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},p=h=>{h.target===t&&(a.current=Vi(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Vi(e){return(e==null?void 0:e.animationName)||"none"}function h1(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 p1=Md[" useInsertionEffect ".trim().toString()]||qn;function m1({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,s]=g1({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:i;{const d=b.useRef(e!==void 0);b.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=b.useCallback(d=>{var c;if(o){const p=b1(d)?d(e):d;p!==e&&((c=s.current)==null||c.call(s,p))}else a(d)},[o,e,a,s]);return[l,u]}function g1({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return p1(()=>{a.current=t},[t]),b.useEffect(()=>{var s;i.current!==n&&((s=a.current)==null||s.call(a,n),i.current=n)},[n,i]),[n,r,a]}function b1(e){return typeof e=="function"}var E1=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"}),T1="VisuallyHidden",pf=b.forwardRef((e,t)=>g.jsx(er.span,{...e,ref:t,style:{...E1,...e.style}}));pf.displayName=T1;var x1=pf,[Va]=Hd("Tooltip",[rf]),Wa=rf(),mf="TooltipProvider",y1=700,Js="tooltip.open",[_1,Jo]=Va(mf),k1=e=>{const{__scopeTooltip:t,delayDuration:n=y1,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,s=b.useRef(!0),o=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),g.jsx(_1,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:o,onPointerInTransitChange:b.useCallback(u=>{o.current=u},[]),disableHoverableContent:i,children:a})};k1.displayName=mf;var mi="Tooltip",[A1,Ya]=Va(mi),gf=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:s,delayDuration:o}=e,l=Jo(mi,e.__scopeTooltip),u=Wa(t),[d,c]=b.useState(null),p=jm(),h=b.useRef(0),m=s??l.disableHoverableContent,E=o??l.delayDuration,k=b.useRef(!1),[_,N]=m1({prop:r,defaultProp:i??!1,onChange:V=>{V?(l.onOpen(),document.dispatchEvent(new CustomEvent(Js))):l.onClose(),a==null||a(V)},caller:mi}),w=b.useMemo(()=>_?k.current?"delayed-open":"instant-open":"closed",[_]),F=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,k.current=!1,N(!0)},[N]),H=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,N(!1)},[N]),I=b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{k.current=!0,N(!0),h.current=0},E)},[E,N]);return b.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),g.jsx(o1,{...u,children:g.jsx(A1,{scope:t,contentId:p,open:_,stateAttribute:w,trigger:d,onTriggerChange:c,onTriggerEnter:b.useCallback(()=>{l.isOpenDelayedRef.current?I():F()},[l.isOpenDelayedRef,I,F]),onTriggerLeave:b.useCallback(()=>{m?H():(window.clearTimeout(h.current),h.current=0)},[H,m]),onOpen:F,onClose:H,disableHoverableContent:m,children:n})})};gf.displayName=mi;var Zs="TooltipTrigger",bf=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Ya(Zs,n),a=Jo(Zs,n),s=Wa(n),o=b.useRef(null),l=Zn(t,o,i.onTriggerChange),u=b.useRef(!1),d=b.useRef(!1),c=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),g.jsx(l1,{asChild:!0,...s,children:g.jsx(er.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:dn(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:dn(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:dn(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:dn(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:dn(e.onBlur,i.onClose),onClick:dn(e.onClick,i.onClose)})})});bf.displayName=Zs;var C1="TooltipPortal",[Rv,w1]=Va(C1,{forceMount:void 0}),kr="TooltipContent",Ef=b.forwardRef((e,t)=>{const n=w1(kr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,s=Ya(kr,e.__scopeTooltip);return g.jsx(hf,{present:r||s.open,children:s.disableHoverableContent?g.jsx(Tf,{side:i,...a,ref:t}):g.jsx(S1,{side:i,...a,ref:t})})}),S1=b.forwardRef((e,t)=>{const n=Ya(kr,e.__scopeTooltip),r=Jo(kr,e.__scopeTooltip),i=b.useRef(null),a=Zn(t,i),[s,o]=b.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:c}=r,p=b.useCallback(()=>{o(null),c(!1)},[c]),h=b.useCallback((m,E)=>{const k=m.currentTarget,_={x:m.clientX,y:m.clientY},N=L1(_,k.getBoundingClientRect()),w=v1(_,N),F=D1(E.getBoundingClientRect()),H=M1([...w,...F]);o(H),c(!0)},[c]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(l&&d){const m=k=>h(k,d),E=k=>h(k,l);return l.addEventListener("pointerleave",m),d.addEventListener("pointerleave",E),()=>{l.removeEventListener("pointerleave",m),d.removeEventListener("pointerleave",E)}}},[l,d,h,p]),b.useEffect(()=>{if(s){const m=E=>{const k=E.target,_={x:E.clientX,y:E.clientY},N=(l==null?void 0:l.contains(k))||(d==null?void 0:d.contains(k)),w=!P1(_,s);N?p():w&&(p(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,d,s,u,p]),g.jsx(Tf,{...e,ref:a})}),[N1,I1]=Va(mi,{isInside:!1}),O1=Cm("TooltipContent"),Tf=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...o}=e,l=Ya(kr,n),u=Wa(n),{onClose:d}=l;return b.useEffect(()=>(document.addEventListener(Js,d),()=>document.removeEventListener(Js,d)),[d]),b.useEffect(()=>{if(l.trigger){const c=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),g.jsx(zd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:g.jsxs(u1,{"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(O1,{children:r}),g.jsx(N1,{scope:n,isInside:!0,children:g.jsx(x1,{id:l.contentId,role:"tooltip",children:i||r})})]})})});Ef.displayName=kr;var xf="TooltipArrow",R1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Wa(n);return I1(xf,n).isInside?null:g.jsx(c1,{...i,...r,ref:t})});R1.displayName=xf;function L1(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function v1(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 D1(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 P1(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const o=t[a],l=t[s],u=o.x,d=o.y,c=l.x,p=l.y;d>r!=p>r&&n<(c-u)*(r-d)/(p-d)+u&&(i=!i)}return i}function M1(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),B1(t)}function B1(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 a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.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 a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.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 F1=gf,H1=bf,yf=Ef;function _f(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=_f(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function it(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_f(e))&&(r&&(r+=" "),r+=t);return r}const U1=(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},j1=(e,t)=>({classGroupId:e,validator:t}),kf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Aa="-",fu=[],z1="arbitrary..",$1=e=>{const t=W1(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return V1(s);const o=s.split(Aa),l=o[0]===""&&o.length>1?1:0;return Af(o,l,t)},getConflictingClassGroupIds:(s,o)=>{if(o){const l=r[s],u=n[s];return l?u?U1(u,l):l:u||fu}return n[s]||fu}}},Af=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const u=Af(e,t+1,a);if(u)return u}const s=n.validators;if(s===null)return;const o=t===0?e.join(Aa):e.slice(t).join(Aa),l=s.length;for(let u=0;u<l;u++){const d=s[u];if(d.validator(o))return d.classGroupId}},V1=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?z1+r:void 0})(),W1=e=>{const{theme:t,classGroups:n}=e;return Y1(n,t)},Y1=(e,t)=>{const n=kf();for(const r in e){const i=e[r];Zo(i,n,r,t)}return n},Zo=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const s=e[a];q1(s,t,n,r)}},q1=(e,t,n,r)=>{if(typeof e=="string"){G1(e,t,n);return}if(typeof e=="function"){K1(e,t,n,r);return}X1(e,t,n,r)},G1=(e,t,n)=>{const r=e===""?t:Cf(t,e);r.classGroupId=n},K1=(e,t,n,r)=>{if(Q1(e)){Zo(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(j1(n,e))},X1=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let s=0;s<a;s++){const[o,l]=i[s];Zo(l,Cf(t,o),n,r)}},Cf=(e,t)=>{let n=e;const r=t.split(Aa),i=r.length;for(let a=0;a<i;a++){const s=r[a];let o=n.nextPart.get(s);o||(o=kf(),n.nextPart.set(s,o)),n=o}return n},Q1=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,J1=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,s)=>{n[a]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let s=n[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return i(a,s),s},set(a,s){a in n?n[a]=s:i(a,s)}}},eo="!",hu=":",Z1=[],pu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),eb=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let s=0,o=0,l=0,u;const d=i.length;for(let E=0;E<d;E++){const k=i[E];if(s===0&&o===0){if(k===hu){a.push(i.slice(l,E)),l=E+1;continue}if(k==="/"){u=E;continue}}k==="["?s++:k==="]"?s--:k==="("?o++:k===")"&&o--}const c=a.length===0?i:i.slice(l);let p=c,h=!1;c.endsWith(eo)?(p=c.slice(0,-1),h=!0):c.startsWith(eo)&&(p=c.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return pu(a,h,p,m)};if(t){const i=t+hu,a=r;r=s=>s.startsWith(i)?a(s.slice(i.length)):pu(Z1,!1,s,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},tb=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const s=n[a],o=s[0]==="[",l=t.has(s);o||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},nb=e=>({cache:J1(e.cacheSize),parseClassName:eb(e),sortModifiers:tb(e),...$1(e)}),rb=/\s+/,ib=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,s=[],o=e.trim().split(rb);let l="";for(let u=o.length-1;u>=0;u-=1){const d=o[u],{isExternal:c,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:E}=n(d);if(c){l=d+(l.length>0?" "+l:l);continue}let k=!!E,_=r(k?m.substring(0,E):m);if(!_){if(!k){l=d+(l.length>0?" "+l:l);continue}if(_=r(m),!_){l=d+(l.length>0?" "+l:l);continue}k=!1}const N=p.length===0?"":p.length===1?p[0]:a(p).join(":"),w=h?N+eo:N,F=w+_;if(s.indexOf(F)>-1)continue;s.push(F);const H=i(_,k);for(let I=0;I<H.length;++I){const V=H[I];s.push(w+V)}l=d+(l.length>0?" "+l:l)}return l},ab=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=wf(n))&&(i&&(i+=" "),i+=r);return i},wf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=wf(e[r]))&&(n&&(n+=" "),n+=t);return n},sb=(e,...t)=>{let n,r,i,a;const s=l=>{const u=t.reduce((d,c)=>c(d),e());return n=nb(u),r=n.cache.get,i=n.cache.set,a=o,o(l)},o=l=>{const u=r(l);if(u)return u;const d=ib(l,n);return i(l,d),d};return a=s,(...l)=>a(ab(...l))},ob=[],$e=e=>{const t=n=>n[e]||ob;return t.isThemeGetter=!0,t},Sf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lb=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ub=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cb=/\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$/,db=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xn=e=>lb.test(e),Te=e=>!!e&&!Number.isNaN(Number(e)),yn=e=>!!e&&Number.isInteger(Number(e)),bs=e=>e.endsWith("%")&&Te(e.slice(0,-1)),ln=e=>ub.test(e),If=()=>!0,pb=e=>cb.test(e)&&!db.test(e),el=()=>!1,mb=e=>fb.test(e),gb=e=>hb.test(e),bb=e=>!ae(e)&&!oe(e),Eb=e=>Dn(e,Lf,el),ae=e=>Sf.test(e),Hn=e=>Dn(e,vf,pb),mu=e=>Dn(e,wb,Te),Tb=e=>Dn(e,Pf,If),xb=e=>Dn(e,Df,el),gu=e=>Dn(e,Of,el),yb=e=>Dn(e,Rf,gb),Wi=e=>Dn(e,Mf,mb),oe=e=>Nf.test(e),Mr=e=>tr(e,vf),_b=e=>tr(e,Df),bu=e=>tr(e,Of),kb=e=>tr(e,Lf),Ab=e=>tr(e,Rf),Yi=e=>tr(e,Mf,!0),Cb=e=>tr(e,Pf,!0),Dn=(e,t,n)=>{const r=Sf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},tr=(e,t,n=!1)=>{const r=Nf.exec(e);return r?r[1]?t(r[1]):n:!1},Of=e=>e==="position"||e==="percentage",Rf=e=>e==="image"||e==="url",Lf=e=>e==="length"||e==="size"||e==="bg-size",vf=e=>e==="length",wb=e=>e==="number",Df=e=>e==="family-name",Pf=e=>e==="number"||e==="weight",Mf=e=>e==="shadow",Sb=()=>{const e=$e("color"),t=$e("font"),n=$e("text"),r=$e("font-weight"),i=$e("tracking"),a=$e("leading"),s=$e("breakpoint"),o=$e("container"),l=$e("spacing"),u=$e("radius"),d=$e("shadow"),c=$e("inset-shadow"),p=$e("text-shadow"),h=$e("drop-shadow"),m=$e("blur"),E=$e("perspective"),k=$e("aspect"),_=$e("ease"),N=$e("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],H=()=>[...F(),oe,ae],I=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],U=()=>[oe,ae,l],Q=()=>[xn,"full","auto",...U()],R=()=>[yn,"none","subgrid",oe,ae],K=()=>["auto",{span:["full",yn,oe,ae]},yn,oe,ae],z=()=>[yn,"auto",oe,ae],y=()=>["auto","min","max","fr",oe,ae],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],v=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...U()],P=()=>[xn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],q=()=>[xn,"screen","full","dvw","lvw","svw","min","max","fit",...U()],J=()=>[xn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],T=()=>[e,oe,ae],ie=()=>[...F(),bu,gu,{position:[oe,ae]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",kb,Eb,{size:[oe,ae]}],he=()=>[bs,Mr,Hn],ue=()=>["","none","full",u,oe,ae],de=()=>["",Te,Mr,Hn],He=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ke=()=>[Te,bs,bu,gu],Xe=()=>["","none",m,oe,ae],Qe=()=>["none",Te,oe,ae],et=()=>["none",Te,oe,ae],Tt=()=>[Te,oe,ae],xt=()=>[xn,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ln],breakpoint:[ln],color:[If],container:[ln],"drop-shadow":[ln],ease:["in","out","in-out"],font:[bb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ln],shadow:[ln],spacing:["px",Te],text:[ln],"text-shadow":[ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xn,ae,oe,k]}],container:["container"],columns:[{columns:[Te,ae,oe,o]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:H()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[yn,"auto",oe,ae]}],basis:[{basis:[xn,"full","auto",o,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,xn,"auto","initial","none",ae]}],grow:[{grow:["",Te,oe,ae]}],shrink:[{shrink:["",Te,oe,ae]}],order:[{order:[yn,"first","last","none",oe,ae]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":y()}],"auto-rows":[{"auto-rows":y()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...v(),"normal"]}],"justify-self":[{"justify-self":["auto",...v()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...v(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...v(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...v(),"baseline"]}],"place-self":[{"place-self":["auto",...v()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...J()]}],"min-block-size":[{"min-block":["auto",...J()]}],"max-block-size":[{"max-block":["none",...J()]}],w:[{w:[o,"screen",...P()]}],"min-w":[{"min-w":[o,"screen","none",...P()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,Mr,Hn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Cb,Tb]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bs,ae]}],"font-family":[{font:[_b,xb,t]}],"font-features":[{"font-features":[ae]}],"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,oe,ae]}],"line-clamp":[{"line-clamp":[Te,"none",oe,mu]}],leading:[{leading:[a,...U()]}],"list-image":[{"list-image":["none",oe,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...He(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",oe,Hn]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[Te,"auto",oe,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,ae]}],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",oe,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yn,oe,ae],radial:["",oe,ae],conic:[yn,oe,ae]},Ab,yb]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:he()}],"gradient-via-pos":[{via:he()}],"gradient-to-pos":[{to:he()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...He(),"hidden","none"]}],"divide-style":[{divide:[...He(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...He(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,oe,ae]}],"outline-w":[{outline:["",Te,Mr,Hn]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",d,Yi,Wi]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",c,Yi,Wi]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[Te,Hn]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",p,Yi,Wi]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[Te,oe,ae]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":ke()}],"mask-image-linear-to-pos":[{"mask-linear-to":ke()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ke()}],"mask-image-t-to-pos":[{"mask-t-to":ke()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ke()}],"mask-image-r-to-pos":[{"mask-r-to":ke()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ke()}],"mask-image-b-to-pos":[{"mask-b-to":ke()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ke()}],"mask-image-l-to-pos":[{"mask-l-to":ke()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ke()}],"mask-image-x-to-pos":[{"mask-x-to":ke()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ke()}],"mask-image-y-to-pos":[{"mask-y-to":ke()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[oe,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":ke()}],"mask-image-radial-to-pos":[{"mask-radial-to":ke()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":F()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":ke()}],"mask-image-conic-to-pos":[{"mask-conic-to":ke()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,ae]}],filter:[{filter:["","none",oe,ae]}],blur:[{blur:Xe()}],brightness:[{brightness:[Te,oe,ae]}],contrast:[{contrast:[Te,oe,ae]}],"drop-shadow":[{"drop-shadow":["","none",h,Yi,Wi]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",Te,oe,ae]}],"hue-rotate":[{"hue-rotate":[Te,oe,ae]}],invert:[{invert:["",Te,oe,ae]}],saturate:[{saturate:[Te,oe,ae]}],sepia:[{sepia:["",Te,oe,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,ae]}],"backdrop-blur":[{"backdrop-blur":Xe()}],"backdrop-brightness":[{"backdrop-brightness":[Te,oe,ae]}],"backdrop-contrast":[{"backdrop-contrast":[Te,oe,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,oe,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,oe,ae]}],"backdrop-invert":[{"backdrop-invert":["",Te,oe,ae]}],"backdrop-opacity":[{"backdrop-opacity":[Te,oe,ae]}],"backdrop-saturate":[{"backdrop-saturate":[Te,oe,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,oe,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",oe,ae]}],ease:[{ease:["linear","initial",_,oe,ae]}],delay:[{delay:[Te,oe,ae]}],animate:[{animate:["none",N,oe,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,oe,ae]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:et()}],"scale-x":[{"scale-x":et()}],"scale-y":[{"scale-y":et()}],"scale-z":[{"scale-z":et()}],"scale-3d":["scale-3d"],skew:[{skew:Tt()}],"skew-x":[{"skew-x":Tt()}],"skew-y":[{"skew-y":Tt()}],transform:[{transform:[oe,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:H()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xt()}],"translate-x":[{"translate-x":xt()}],"translate-y":[{"translate-y":xt()}],"translate-z":[{"translate-z":xt()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",oe,ae]}],"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":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",oe,ae]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[Te,Mr,Hn,mu]}],stroke:[{stroke:["none",...T()]}],"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"]}},tl=sb(Sb);/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-B3W2YXNL-BO6bNJzI.js","assets/index-DklpUtP3.js"])))=>i.map(i=>d[i]);
2
+ var Mm=Object.defineProperty;var Bm=(e,t,n)=>t in e?Mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ne=(e,t,n)=>Bm(e,typeof t!="symbol"?t+"":t,n);import{r as b,j as g,f as Go,D as $d,R as j,A as Fm,G as Vd}from"./index-DklpUtP3.js";function dn(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 iu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wd(...e){return t=>{let n=!1;const r=e.map(i=>{const a=iu(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():iu(e[i],null)}}}}function er(...e){return b.useCallback(Wd(...e),e)}function Yv(e,t){const n=b.createContext(t),r=a=>{const{children:s,...o}=a,l=b.useMemo(()=>o,Object.values(o));return g.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function i(a){const s=b.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Yd(e,t=[]){let n=[];function r(a,s){const o=b.createContext(s),l=n.length;n=[...n,s];const u=c=>{var _;const{scope:p,children:h,...m}=c,E=((_=p==null?void 0:p[e])==null?void 0:_[l])||o,k=b.useMemo(()=>m,Object.values(m));return g.jsx(E.Provider,{value:k,children:h})};u.displayName=a+"Provider";function d(c,p){var E;const h=((E=p==null?void 0:p[e])==null?void 0:E[l])||o,m=b.useContext(h);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,d]}const i=()=>{const a=n.map(s=>b.createContext(s));return function(o){const l=(o==null?void 0:o[e])||a;return b.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[r,Hm(i,...t)]}function Hm(...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(a){const s=r.reduce((o,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...o,...c}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Um(e){const t=jm(e),n=b.forwardRef((r,i)=>{const{children:a,...s}=r,o=b.Children.toArray(a),l=o.find($m);if(l){const u=l.props.children,d=o.map(c=>c===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:c);return g.jsx(t,{...s,ref:i,children:b.isValidElement(u)?b.cloneElement(u,void 0,d):null})}return g.jsx(t,{...s,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function jm(e){const t=b.forwardRef((n,r)=>{const{children:i,...a}=n;if(b.isValidElement(i)){const s=Wm(i),o=Vm(a,i.props);return i.type!==b.Fragment&&(o.ref=r?Wd(r,s):s),b.cloneElement(i,o)}return b.Children.count(i)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qd=Symbol("radix.slottable");function zm(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=qd,t}function $m(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qd}function Vm(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...o)=>{const l=a(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Wm(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 Ym=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tr=Ym.reduce((e,t)=>{const n=Um(`Primitive.${t}`),r=b.forwardRef((i,a)=>{const{asChild:s,...o}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...o,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qm(e,t){e&&Go.flushSync(()=>e.dispatchEvent(t))}function Wa(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Gm(e,t=globalThis==null?void 0:globalThis.document){const n=Wa(e);b.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 Km="DismissableLayer",eo="dismissableLayer.update",Xm="dismissableLayer.pointerDownOutside",Qm="dismissableLayer.focusOutside",au,Gd=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kd=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:o,...l}=e,u=b.useContext(Gd),[d,c]=b.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=b.useState({}),m=er(t,V=>c(V)),E=Array.from(u.layers),[k]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),_=E.indexOf(k),N=d?E.indexOf(d):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,F=N>=_,H=eg(V=>{const U=V.target,Q=[...u.branches].some(O=>O.contains(U));!F||Q||(i==null||i(V),s==null||s(V),V.defaultPrevented||o==null||o())},p),I=tg(V=>{const U=V.target;[...u.branches].some(O=>O.contains(U))||(a==null||a(V),s==null||s(V),V.defaultPrevented||o==null||o())},p);return Gm(V=>{N===u.layers.size-1&&(r==null||r(V),!V.defaultPrevented&&o&&(V.preventDefault(),o()))},p),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(au=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),su(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=au)}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),su())},[d,u]),b.useEffect(()=>{const V=()=>h({});return document.addEventListener(eo,V),()=>document.removeEventListener(eo,V)},[]),g.jsx(tr.div,{...l,ref:m,style:{pointerEvents:C?F?"auto":"none":void 0,...e.style},onFocusCapture:dn(e.onFocusCapture,I.onFocusCapture),onBlurCapture:dn(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:dn(e.onPointerDownCapture,H.onPointerDownCapture)})});Kd.displayName=Km;var Jm="DismissableLayerBranch",Zm=b.forwardRef((e,t)=>{const n=b.useContext(Gd),r=b.useRef(null),i=er(t,r);return b.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),g.jsx(tr.div,{...e,ref:i})});Zm.displayName=Jm;function eg(e,t=globalThis==null?void 0:globalThis.document){const n=Wa(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const a=o=>{if(o.target&&!r.current){let l=function(){Xd(Xm,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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function tg(e,t=globalThis==null?void 0:globalThis.document){const n=Wa(e),r=b.useRef(!1);return b.useEffect(()=>{const i=a=>{a.target&&!r.current&&Xd(Qm,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function su(){const e=new CustomEvent(eo);document.dispatchEvent(e)}function Xd(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?qm(i,a):i.dispatchEvent(a)}var Gn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},ng=$d[" useId ".trim().toString()]||(()=>{}),rg=0;function ig(e){const[t,n]=b.useState(ng());return Gn(()=>{n(r=>r??String(rg++))},[e]),t?`radix-${t}`:""}const ag=["top","right","bottom","left"],Rn=Math.min,St=Math.max,wa=Math.round,Gi=Math.floor,tn=e=>({x:e,y:e}),sg={left:"right",right:"left",bottom:"top",top:"bottom"},og={start:"end",end:"start"};function to(e,t,n){return St(e,Rn(t,n))}function hn(e,t){return typeof e=="function"?e(t):e}function pn(e){return e.split("-")[0]}function Nr(e){return e.split("-")[1]}function Ko(e){return e==="x"?"y":"x"}function Xo(e){return e==="y"?"height":"width"}const lg=new Set(["top","bottom"]);function en(e){return lg.has(pn(e))?"y":"x"}function Qo(e){return Ko(en(e))}function ug(e,t,n){n===void 0&&(n=!1);const r=Nr(e),i=Qo(e),a=Xo(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Ca(s)),[s,Ca(s)]}function cg(e){const t=Ca(e);return[no(e),t,no(t)]}function no(e){return e.replace(/start|end/g,t=>og[t])}const ou=["left","right"],lu=["right","left"],dg=["top","bottom"],fg=["bottom","top"];function hg(e,t,n){switch(e){case"top":case"bottom":return n?t?lu:ou:t?ou:lu;case"left":case"right":return t?dg:fg;default:return[]}}function pg(e,t,n,r){const i=Nr(e);let a=hg(pn(e),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(no)))),a}function Ca(e){return e.replace(/left|right|bottom|top/g,t=>sg[t])}function mg(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qd(e){return typeof e!="number"?mg(e):{top:e,right:e,bottom:e,left:e}}function Sa(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 uu(e,t,n){let{reference:r,floating:i}=e;const a=en(t),s=Qo(t),o=Xo(s),l=pn(t),u=a==="y",d=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,p=r[o]/2-i[o]/2;let h;switch(l){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-i.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Nr(t)){case"start":h[s]-=p*(n&&u?-1:1);break;case"end":h[s]+=p*(n&&u?-1:1);break}return h}const gg=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,o=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:c}=uu(u,r,l),p=r,h={},m=0;for(let E=0;E<o.length;E++){const{name:k,fn:_}=o[E],{x:N,y:C,data:F,reset:H}=await _({x:d,y:c,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});d=N??d,c=C??c,h={...h,[k]:{...h[k],...F}},H&&m<=50&&(m++,typeof H=="object"&&(H.placement&&(p=H.placement),H.rects&&(u=H.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):H.rects),{x:d,y:c}=uu(u,p,l)),E=-1)}return{x:d,y:c,placement:p,strategy:i,middlewareData:h}};async function pi(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:s,elements:o,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:p=!1,padding:h=0}=hn(t,e),m=Qd(h),k=o[p?c==="floating"?"reference":"floating":c],_=Sa(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(k)))==null||n?k:k.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:l})),N=c==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),F=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},H=Sa(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:N,offsetParent:C,strategy:l}):N);return{top:(_.top-H.top+m.top)/F.y,bottom:(H.bottom-_.bottom+m.bottom)/F.y,left:(_.left-H.left+m.left)/F.x,right:(H.right-_.right+m.right)/F.x}}const bg=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:s,elements:o,middlewareData:l}=t,{element:u,padding:d=0}=hn(e,t)||{};if(u==null)return{};const c=Qd(d),p={x:n,y:r},h=Qo(i),m=Xo(h),E=await s.getDimensions(u),k=h==="y",_=k?"top":"left",N=k?"bottom":"right",C=k?"clientHeight":"clientWidth",F=a.reference[m]+a.reference[h]-p[h]-a.floating[m],H=p[h]-a.reference[h],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let V=I?I[C]:0;(!V||!await(s.isElement==null?void 0:s.isElement(I)))&&(V=o.floating[C]||a.floating[m]);const U=F/2-H/2,Q=V/2-E[m]/2-1,O=Rn(c[_],Q),K=Rn(c[N],Q),z=O,x=V-E[m]-K,L=V/2-E[m]/2+U,v=to(z,L,x),D=!l.arrow&&Nr(i)!=null&&L!==v&&a.reference[m]/2-(L<z?O:K)-E[m]/2<0,P=D?L<z?L-z:L-x:0;return{[h]:p[h]+P,data:{[h]:v,centerOffset:L-v-P,...D&&{alignmentOffset:P}},reset:D}}}),Eg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:o,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:E=!0,...k}=hn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const _=pn(i),N=en(o),C=pn(o)===o,F=await(l.isRTL==null?void 0:l.isRTL(u.floating)),H=p||(C||!E?[Ca(o)]:cg(o)),I=m!=="none";!p&&I&&H.push(...pg(o,E,m,F));const V=[o,...H],U=await pi(t,k),Q=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&Q.push(U[_]),c){const L=ug(i,s,F);Q.push(U[L[0]],U[L[1]])}if(O=[...O,{placement:i,overflows:Q}],!Q.every(L=>L<=0)){var K,z;const L=(((K=a.flip)==null?void 0:K.index)||0)+1,v=V[L];if(v&&(!(c==="alignment"?N!==en(v):!1)||O.every(q=>en(q.placement)===N?q.overflows[0]>0:!0)))return{data:{index:L,overflows:O},reset:{placement:v}};let D=(z=O.filter(P=>P.overflows[0]<=0).sort((P,q)=>P.overflows[1]-q.overflows[1])[0])==null?void 0:z.placement;if(!D)switch(h){case"bestFit":{var x;const P=(x=O.filter(q=>{if(I){const J=en(q.placement);return J===N||J==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(J=>J>0).reduce((J,T)=>J+T,0)]).sort((q,J)=>q[1]-J[1])[0])==null?void 0:x[0];P&&(D=P);break}case"initialPlacement":D=o;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function cu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function du(e){return ag.some(t=>e[t]>=0)}const Tg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=hn(e,t);switch(r){case"referenceHidden":{const a=await pi(t,{...i,elementContext:"reference"}),s=cu(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:du(s)}}}case"escaped":{const a=await pi(t,{...i,altBoundary:!0}),s=cu(a,n.floating);return{data:{escapedOffsets:s,escaped:du(s)}}}default:return{}}}}},Jd=new Set(["left","top"]);async function yg(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=pn(n),o=Nr(n),l=en(n)==="y",u=Jd.has(s)?-1:1,d=a&&l?-1:1,c=hn(t,e);let{mainAxis:p,crossAxis:h,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"&&(h=o==="end"?m*-1:m),l?{x:h*d,y:p*u}:{x:p*u,y:h*d}}const xg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:s,middlewareData:o}=t,l=await yg(t,e);return s===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:s}}}}},_g=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:o={fn:k=>{let{x:_,y:N}=k;return{x:_,y:N}}},...l}=hn(e,t),u={x:n,y:r},d=await pi(t,l),c=en(pn(i)),p=Ko(c);let h=u[p],m=u[c];if(a){const k=p==="y"?"top":"left",_=p==="y"?"bottom":"right",N=h+d[k],C=h-d[_];h=to(N,h,C)}if(s){const k=c==="y"?"top":"left",_=c==="y"?"bottom":"right",N=m+d[k],C=m-d[_];m=to(N,m,C)}const E=o.fn({...t,[p]:h,[c]:m});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[p]:a,[c]:s}}}}}},kg=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:s}=t,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=hn(e,t),d={x:n,y:r},c=en(i),p=Ko(c);let h=d[p],m=d[c];const E=hn(o,t),k=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(l){const C=p==="y"?"height":"width",F=a.reference[p]-a.floating[C]+k.mainAxis,H=a.reference[p]+a.reference[C]-k.mainAxis;h<F?h=F:h>H&&(h=H)}if(u){var _,N;const C=p==="y"?"width":"height",F=Jd.has(pn(i)),H=a.reference[c]-a.floating[C]+(F&&((_=s.offset)==null?void 0:_[c])||0)+(F?0:k.crossAxis),I=a.reference[c]+a.reference[C]+(F?0:((N=s.offset)==null?void 0:N[c])||0)-(F?k.crossAxis:0);m<H?m=H:m>I&&(m=I)}return{[p]:h,[c]:m}}}},Ag=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:s,elements:o}=t,{apply:l=()=>{},...u}=hn(e,t),d=await pi(t,u),c=pn(i),p=Nr(i),h=en(i)==="y",{width:m,height:E}=a.floating;let k,_;c==="top"||c==="bottom"?(k=c,_=p===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(_=c,k=p==="end"?"top":"bottom");const N=E-d.top-d.bottom,C=m-d.left-d.right,F=Rn(E-d[k],N),H=Rn(m-d[_],C),I=!t.middlewareData.shift;let V=F,U=H;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(V=N),I&&!p){const O=St(d.left,0),K=St(d.right,0),z=St(d.top,0),x=St(d.bottom,0);h?U=m-2*(O!==0||K!==0?O+K:St(d.left,d.right)):V=E-2*(z!==0||x!==0?z+x:St(d.top,d.bottom))}await l({...t,availableWidth:U,availableHeight:V});const Q=await s.getDimensions(o.floating);return m!==Q.width||E!==Q.height?{reset:{rects:!0}}:{}}}};function Ya(){return typeof window<"u"}function Ir(e){return Zd(e)?(e.nodeName||"").toLowerCase():"#document"}function It(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function an(e){var t;return(t=(Zd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Zd(e){return Ya()?e instanceof Node||e instanceof It(e).Node:!1}function Wt(e){return Ya()?e instanceof Element||e instanceof It(e).Element:!1}function rn(e){return Ya()?e instanceof HTMLElement||e instanceof It(e).HTMLElement:!1}function fu(e){return!Ya()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof It(e).ShadowRoot}const wg=new Set(["inline","contents"]);function Oi(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!wg.has(i)}const Cg=new Set(["table","td","th"]);function Sg(e){return Cg.has(Ir(e))}const Ng=[":popover-open",":modal"];function qa(e){return Ng.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ig=["transform","translate","scale","rotate","perspective"],Rg=["transform","translate","scale","rotate","perspective","filter"],Og=["paint","layout","strict","content"];function Jo(e){const t=Zo(),n=Wt(e)?Yt(e):e;return Ig.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)||Rg.some(r=>(n.willChange||"").includes(r))||Og.some(r=>(n.contain||"").includes(r))}function Lg(e){let t=On(e);for(;rn(t)&&!kr(t);){if(Jo(t))return t;if(qa(t))return null;t=On(t)}return null}function Zo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vg=new Set(["html","body","#document"]);function kr(e){return vg.has(Ir(e))}function Yt(e){return It(e).getComputedStyle(e)}function Ga(e){return Wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function On(e){if(Ir(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fu(e)&&e.host||an(e);return fu(t)?t.host:t}function ef(e){const t=On(e);return kr(t)?e.ownerDocument?e.ownerDocument.body:e.body:rn(t)&&Oi(t)?t:ef(t)}function mi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ef(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),s=It(i);if(a){const o=ro(s);return t.concat(s,s.visualViewport||[],Oi(i)?i:[],o&&n?mi(o):[])}return t.concat(i,mi(i,[],n))}function ro(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tf(e){const t=Yt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=rn(e),a=i?e.offsetWidth:n,s=i?e.offsetHeight:r,o=wa(n)!==a||wa(r)!==s;return o&&(n=a,r=s),{width:n,height:r,$:o}}function el(e){return Wt(e)?e:e.contextElement}function Tr(e){const t=el(e);if(!rn(t))return tn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=tf(t);let s=(a?wa(n.width):n.width)/r,o=(a?wa(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const Dg=tn(0);function nf(e){const t=It(e);return!Zo()||!t.visualViewport?Dg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==It(e)?!1:t}function Kn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=el(e);let s=tn(1);t&&(r?Wt(r)&&(s=Tr(r)):s=Tr(e));const o=Pg(a,n,r)?nf(a):tn(0);let l=(i.left+o.x)/s.x,u=(i.top+o.y)/s.y,d=i.width/s.x,c=i.height/s.y;if(a){const p=It(a),h=r&&Wt(r)?It(r):r;let m=p,E=ro(m);for(;E&&r&&h!==m;){const k=Tr(E),_=E.getBoundingClientRect(),N=Yt(E),C=_.left+(E.clientLeft+parseFloat(N.paddingLeft))*k.x,F=_.top+(E.clientTop+parseFloat(N.paddingTop))*k.y;l*=k.x,u*=k.y,d*=k.x,c*=k.y,l+=C,u+=F,m=It(E),E=ro(m)}}return Sa({width:d,height:c,x:l,y:u})}function Ka(e,t){const n=Ga(e).scrollLeft;return t?t.left+n:Kn(an(e)).left+n}function rf(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ka(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Mg(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",s=an(r),o=t?qa(t.floating):!1;if(r===s||o&&a)return n;let l={scrollLeft:0,scrollTop:0},u=tn(1);const d=tn(0),c=rn(r);if((c||!c&&!a)&&((Ir(r)!=="body"||Oi(s))&&(l=Ga(r)),rn(r))){const h=Kn(r);u=Tr(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const p=s&&!c&&!a?rf(s,l):tn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function Bg(e){return Array.from(e.getClientRects())}function Fg(e){const t=an(e),n=Ga(e),r=e.ownerDocument.body,i=St(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=St(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ka(e);const o=-n.scrollTop;return Yt(r).direction==="rtl"&&(s+=St(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:s,y:o}}const hu=25;function Hg(e,t){const n=It(e),r=an(e),i=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;const d=Zo();(!d||d&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const u=Ka(r);if(u<=0){const d=r.ownerDocument,c=d.body,p=getComputedStyle(c),h=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(r.clientWidth-c.clientWidth-h);m<=hu&&(a-=m)}else u<=hu&&(a+=u);return{width:a,height:s,x:o,y:l}}const Ug=new Set(["absolute","fixed"]);function jg(e,t){const n=Kn(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=rn(e)?Tr(e):tn(1),s=e.clientWidth*a.x,o=e.clientHeight*a.y,l=i*a.x,u=r*a.y;return{width:s,height:o,x:l,y:u}}function pu(e,t,n){let r;if(t==="viewport")r=Hg(e,n);else if(t==="document")r=Fg(an(e));else if(Wt(t))r=jg(t,n);else{const i=nf(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Sa(r)}function af(e,t){const n=On(e);return n===t||!Wt(n)||kr(n)?!1:Yt(n).position==="fixed"||af(n,t)}function zg(e,t){const n=t.get(e);if(n)return n;let r=mi(e,[],!1).filter(o=>Wt(o)&&Ir(o)!=="body"),i=null;const a=Yt(e).position==="fixed";let s=a?On(e):e;for(;Wt(s)&&!kr(s);){const o=Yt(s),l=Jo(s);!l&&o.position==="fixed"&&(i=null),(a?!l&&!i:!l&&o.position==="static"&&!!i&&Ug.has(i.position)||Oi(s)&&!l&&af(e,s))?r=r.filter(d=>d!==s):i=o,s=On(s)}return t.set(e,r),r}function $g(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?qa(t)?[]:zg(t,this._c):[].concat(n),r],o=s[0],l=s.reduce((u,d)=>{const c=pu(t,d,i);return u.top=St(c.top,u.top),u.right=Rn(c.right,u.right),u.bottom=Rn(c.bottom,u.bottom),u.left=St(c.left,u.left),u},pu(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Vg(e){const{width:t,height:n}=tf(e);return{width:t,height:n}}function Wg(e,t,n){const r=rn(t),i=an(t),a=n==="fixed",s=Kn(e,!0,a,t);let o={scrollLeft:0,scrollTop:0};const l=tn(0);function u(){l.x=Ka(i)}if(r||!r&&!a)if((Ir(t)!=="body"||Oi(i))&&(o=Ga(t)),r){const h=Kn(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&u();a&&!r&&i&&u();const d=i&&!r&&!a?rf(i,o):tn(0),c=s.left+o.scrollLeft-l.x-d.x,p=s.top+o.scrollTop-l.y-d.y;return{x:c,y:p,width:s.width,height:s.height}}function xs(e){return Yt(e).position==="static"}function mu(e,t){if(!rn(e)||Yt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return an(e)===n&&(n=n.ownerDocument.body),n}function sf(e,t){const n=It(e);if(qa(e))return n;if(!rn(e)){let i=On(e);for(;i&&!kr(i);){if(Wt(i)&&!xs(i))return i;i=On(i)}return n}let r=mu(e,t);for(;r&&Sg(r)&&xs(r);)r=mu(r,t);return r&&kr(r)&&xs(r)&&!Jo(r)?n:r||Lg(e)||n}const Yg=async function(e){const t=this.getOffsetParent||sf,n=this.getDimensions,r=await n(e.floating);return{reference:Wg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qg(e){return Yt(e).direction==="rtl"}const Gg={convertOffsetParentRelativeRectToViewportRelativeRect:Mg,getDocumentElement:an,getClippingRect:$g,getOffsetParent:sf,getElementRects:Yg,getClientRects:Bg,getDimensions:Vg,getScale:Tr,isElement:Wt,isRTL:qg};function of(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kg(e,t){let n=null,r;const i=an(e);function a(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function s(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:d,top:c,width:p,height:h}=u;if(o||t(),!p||!h)return;const m=Gi(c),E=Gi(i.clientWidth-(d+p)),k=Gi(i.clientHeight-(c+h)),_=Gi(d),C={rootMargin:-m+"px "+-E+"px "+-k+"px "+-_+"px",threshold:St(0,Rn(1,l))||1};let F=!0;function H(I){const V=I[0].intersectionRatio;if(V!==l){if(!F)return s();V?s(!1,V):r=setTimeout(()=>{s(!1,1e-7)},1e3)}V===1&&!of(u,e.getBoundingClientRect())&&s(),F=!1}try{n=new IntersectionObserver(H,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(H,C)}n.observe(e)}return s(!0),a}function Xg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=el(e),d=i||a?[...u?mi(u):[],...mi(t)]:[];d.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),a&&_.addEventListener("resize",n)});const c=u&&o?Kg(u,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(_=>{let[N]=_;N&&N.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let m,E=l?Kn(e):null;l&&k();function k(){const _=Kn(e);E&&!of(E,_)&&n(),E=_,m=requestAnimationFrame(k)}return n(),()=>{var _;d.forEach(N=>{i&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),c==null||c(),(_=h)==null||_.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const Qg=xg,Jg=_g,Zg=Eg,e1=Ag,t1=Tg,gu=bg,n1=kg,r1=(e,t,n)=>{const r=new Map,i={platform:Gg,...n},a={...i.platform,_c:r};return gg(e,t,{...i,platform:a})};var i1=typeof document<"u",a1=function(){},ha=i1?b.useLayoutEffect:a1;function Na(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(!Na(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 a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Na(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function lf(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bu(e,t){const n=lf(e);return Math.round(t*n)/n}function _s(e){const t=b.useRef(e);return ha(()=>{t.current=e}),t}function s1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:o=!0,whileElementsMounted:l,open:u}=e,[d,c]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=b.useState(r);Na(p,r)||h(r);const[m,E]=b.useState(null),[k,_]=b.useState(null),N=b.useCallback(q=>{q!==I.current&&(I.current=q,E(q))},[]),C=b.useCallback(q=>{q!==V.current&&(V.current=q,_(q))},[]),F=a||m,H=s||k,I=b.useRef(null),V=b.useRef(null),U=b.useRef(d),Q=l!=null,O=_s(l),K=_s(i),z=_s(u),x=b.useCallback(()=>{if(!I.current||!V.current)return;const q={placement:t,strategy:n,middleware:p};K.current&&(q.platform=K.current),r1(I.current,V.current,q).then(J=>{const T={...J,isPositioned:z.current!==!1};L.current&&!Na(U.current,T)&&(U.current=T,Go.flushSync(()=>{c(T)}))})},[p,t,n,K,z]);ha(()=>{u===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,c(q=>({...q,isPositioned:!1})))},[u]);const L=b.useRef(!1);ha(()=>(L.current=!0,()=>{L.current=!1}),[]),ha(()=>{if(F&&(I.current=F),H&&(V.current=H),F&&H){if(O.current)return O.current(F,H,x);x()}},[F,H,x,O,Q]);const v=b.useMemo(()=>({reference:I,floating:V,setReference:N,setFloating:C}),[N,C]),D=b.useMemo(()=>({reference:F,floating:H}),[F,H]),P=b.useMemo(()=>{const q={position:n,left:0,top:0};if(!D.floating)return q;const J=bu(D.floating,d.x),T=bu(D.floating,d.y);return o?{...q,transform:"translate("+J+"px, "+T+"px)",...lf(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:T}},[n,o,D.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:x,refs:v,elements:D,floatingStyles:P}),[d,x,v,D,P])}const o1=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?gu({element:r.current,padding:i}).fn(n):{}:r?gu({element:r,padding:i}).fn(n):{}}}},l1=(e,t)=>({...Qg(e),options:[e,t]}),u1=(e,t)=>({...Jg(e),options:[e,t]}),c1=(e,t)=>({...n1(e),options:[e,t]}),d1=(e,t)=>({...Zg(e),options:[e,t]}),f1=(e,t)=>({...e1(e),options:[e,t]}),h1=(e,t)=>({...t1(e),options:[e,t]}),p1=(e,t)=>({...o1(e),options:[e,t]});var m1="Arrow",uf=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return g.jsx(tr.svg,{...a,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"})})});uf.displayName=m1;var g1=uf;function b1(e){const[t,n]=b.useState(void 0);return Gn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,o;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,o=u.blockSize}else s=e.offsetWidth,o=e.offsetHeight;n({width:s,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var tl="Popper",[cf,df]=Yd(tl),[E1,ff]=cf(tl),hf=e=>{const{__scopePopper:t,children:n}=e,[r,i]=b.useState(null);return g.jsx(E1,{scope:t,anchor:r,onAnchorChange:i,children:n})};hf.displayName=tl;var pf="PopperAnchor",mf=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=ff(pf,n),s=b.useRef(null),o=er(t,s),l=b.useRef(null);return b.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:g.jsx(tr.div,{...i,ref:o})});mf.displayName=pf;var nl="PopperContent",[T1,y1]=cf(nl),gf=b.forwardRef((e,t)=>{var He,be,ke,Xe,Qe,tt;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:m,...E}=e,k=ff(nl,n),[_,N]=b.useState(null),C=er(t,Tt=>N(Tt)),[F,H]=b.useState(null),I=b1(F),V=(I==null?void 0:I.width)??0,U=(I==null?void 0:I.height)??0,Q=r+(a!=="center"?"-"+a:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},K=Array.isArray(u)?u:[u],z=K.length>0,x={padding:O,boundary:K.filter(_1),altBoundary:z},{refs:L,floatingStyles:v,placement:D,isPositioned:P,middlewareData:q}=s1({strategy:"fixed",placement:Q,whileElementsMounted:(...Tt)=>Xg(...Tt,{animationFrame:h==="always"}),elements:{reference:k.anchor},middleware:[l1({mainAxis:i+U,alignmentAxis:s}),l&&u1({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?c1():void 0,...x}),l&&d1({...x}),f1({...x,apply:({elements:Tt,rects:yt,availableWidth:lr,availableHeight:Mn})=>{const{width:Gt,height:ur}=yt.reference,Je=Tt.floating.style;Je.setProperty("--radix-popper-available-width",`${lr}px`),Je.setProperty("--radix-popper-available-height",`${Mn}px`),Je.setProperty("--radix-popper-anchor-width",`${Gt}px`),Je.setProperty("--radix-popper-anchor-height",`${ur}px`)}}),F&&p1({element:F,padding:o}),k1({arrowWidth:V,arrowHeight:U}),p&&h1({strategy:"referenceHidden",...x})]}),[J,T]=Tf(D),ie=Wa(m);Gn(()=>{P&&(ie==null||ie())},[P,ie]);const te=(He=q.arrow)==null?void 0:He.x,w=(be=q.arrow)==null?void 0:be.y,he=((ke=q.arrow)==null?void 0:ke.centerOffset)!==0,[ue,de]=b.useState();return Gn(()=>{_&&de(window.getComputedStyle(_).zIndex)},[_]),g.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...v,transform:P?v.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(Xe=q.transformOrigin)==null?void 0:Xe.x,(Qe=q.transformOrigin)==null?void 0:Qe.y].join(" "),...((tt=q.hide)==null?void 0:tt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(T1,{scope:n,placedSide:J,onArrowChange:H,arrowX:te,arrowY:w,shouldHideArrow:he,children:g.jsx(tr.div,{"data-side":J,"data-align":T,...E,ref:C,style:{...E.style,animation:P?void 0:"none"}})})})});gf.displayName=nl;var bf="PopperArrow",x1={top:"bottom",right:"left",bottom:"top",left:"right"},Ef=b.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=y1(bf,r),s=x1[a.placedSide];return g.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:g.jsx(g1,{...i,ref:n,style:{...i.style,display:"block"}})})});Ef.displayName=bf;function _1(e){return e!==null}var k1=e=>({name:"transformOrigin",options:e,fn(t){var k,_,N;const{placement:n,rects:r,middlewareData:i}=t,s=((k=i.arrow)==null?void 0:k.centerOffset)!==0,o=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,d]=Tf(n),c={start:"0%",center:"50%",end:"100%"}[d],p=(((_=i.arrow)==null?void 0:_.x)??0)+o/2,h=(((N=i.arrow)==null?void 0:N.y)??0)+l/2;let m="",E="";return u==="bottom"?(m=s?c:`${p}px`,E=`${-l}px`):u==="top"?(m=s?c:`${p}px`,E=`${r.floating.height+l}px`):u==="right"?(m=`${-l}px`,E=s?c:`${h}px`):u==="left"&&(m=`${r.floating.width+l}px`,E=s?c:`${h}px`),{data:{x:m,y:E}}}});function Tf(e){const[t,n="center"]=e.split("-");return[t,n]}var A1=hf,w1=mf,C1=gf,S1=Ef;function N1(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var yf=e=>{const{present:t,children:n}=e,r=I1(t),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),a=er(r.ref,R1(i));return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:a}):null};yf.displayName="Presence";function I1(e){const[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef("none"),s=e?"mounted":"unmounted",[o,l]=N1(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Ki(r.current);a.current=o==="mounted"?u:"none"},[o]),Gn(()=>{const u=r.current,d=i.current;if(d!==e){const p=a.current,h=Ki(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Gn(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=h=>{const E=Ki(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&E&&(l("ANIMATION_END"),!i.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},p=h=>{h.target===t&&(a.current=Ki(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ki(e){return(e==null?void 0:e.animationName)||"none"}function R1(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 O1=$d[" useInsertionEffect ".trim().toString()]||Gn;function L1({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,s]=v1({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:i;{const d=b.useRef(e!==void 0);b.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=b.useCallback(d=>{var c;if(o){const p=D1(d)?d(e):d;p!==e&&((c=s.current)==null||c.call(s,p))}else a(d)},[o,e,a,s]);return[l,u]}function v1({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return O1(()=>{a.current=t},[t]),b.useEffect(()=>{var s;i.current!==n&&((s=a.current)==null||s.call(a,n),i.current=n)},[n,i]),[n,r,a]}function D1(e){return typeof e=="function"}var P1=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"}),M1="VisuallyHidden",xf=b.forwardRef((e,t)=>g.jsx(tr.span,{...e,ref:t,style:{...P1,...e.style}}));xf.displayName=M1;var B1=xf,[Xa]=Yd("Tooltip",[df]),Qa=df(),_f="TooltipProvider",F1=700,io="tooltip.open",[H1,rl]=Xa(_f),U1=e=>{const{__scopeTooltip:t,delayDuration:n=F1,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,s=b.useRef(!0),o=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),g.jsx(H1,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:o,onPointerInTransitChange:b.useCallback(u=>{o.current=u},[]),disableHoverableContent:i,children:a})};U1.displayName=_f;var gi="Tooltip",[j1,Ja]=Xa(gi),kf=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:s,delayDuration:o}=e,l=rl(gi,e.__scopeTooltip),u=Qa(t),[d,c]=b.useState(null),p=ig(),h=b.useRef(0),m=s??l.disableHoverableContent,E=o??l.delayDuration,k=b.useRef(!1),[_,N]=L1({prop:r,defaultProp:i??!1,onChange:V=>{V?(l.onOpen(),document.dispatchEvent(new CustomEvent(io))):l.onClose(),a==null||a(V)},caller:gi}),C=b.useMemo(()=>_?k.current?"delayed-open":"instant-open":"closed",[_]),F=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,k.current=!1,N(!0)},[N]),H=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,N(!1)},[N]),I=b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{k.current=!0,N(!0),h.current=0},E)},[E,N]);return b.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),g.jsx(A1,{...u,children:g.jsx(j1,{scope:t,contentId:p,open:_,stateAttribute:C,trigger:d,onTriggerChange:c,onTriggerEnter:b.useCallback(()=>{l.isOpenDelayedRef.current?I():F()},[l.isOpenDelayedRef,I,F]),onTriggerLeave:b.useCallback(()=>{m?H():(window.clearTimeout(h.current),h.current=0)},[H,m]),onOpen:F,onClose:H,disableHoverableContent:m,children:n})})};kf.displayName=gi;var ao="TooltipTrigger",Af=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Ja(ao,n),a=rl(ao,n),s=Qa(n),o=b.useRef(null),l=er(t,o,i.onTriggerChange),u=b.useRef(!1),d=b.useRef(!1),c=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),g.jsx(w1,{asChild:!0,...s,children:g.jsx(tr.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:dn(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:dn(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:dn(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:dn(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:dn(e.onBlur,i.onClose),onClick:dn(e.onClick,i.onClose)})})});Af.displayName=ao;var z1="TooltipPortal",[qv,$1]=Xa(z1,{forceMount:void 0}),Ar="TooltipContent",wf=b.forwardRef((e,t)=>{const n=$1(Ar,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,s=Ja(Ar,e.__scopeTooltip);return g.jsx(yf,{present:r||s.open,children:s.disableHoverableContent?g.jsx(Cf,{side:i,...a,ref:t}):g.jsx(V1,{side:i,...a,ref:t})})}),V1=b.forwardRef((e,t)=>{const n=Ja(Ar,e.__scopeTooltip),r=rl(Ar,e.__scopeTooltip),i=b.useRef(null),a=er(t,i),[s,o]=b.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:c}=r,p=b.useCallback(()=>{o(null),c(!1)},[c]),h=b.useCallback((m,E)=>{const k=m.currentTarget,_={x:m.clientX,y:m.clientY},N=K1(_,k.getBoundingClientRect()),C=X1(_,N),F=Q1(E.getBoundingClientRect()),H=Z1([...C,...F]);o(H),c(!0)},[c]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(l&&d){const m=k=>h(k,d),E=k=>h(k,l);return l.addEventListener("pointerleave",m),d.addEventListener("pointerleave",E),()=>{l.removeEventListener("pointerleave",m),d.removeEventListener("pointerleave",E)}}},[l,d,h,p]),b.useEffect(()=>{if(s){const m=E=>{const k=E.target,_={x:E.clientX,y:E.clientY},N=(l==null?void 0:l.contains(k))||(d==null?void 0:d.contains(k)),C=!J1(_,s);N?p():C&&(p(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,d,s,u,p]),g.jsx(Cf,{...e,ref:a})}),[W1,Y1]=Xa(gi,{isInside:!1}),q1=zm("TooltipContent"),Cf=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...o}=e,l=Ja(Ar,n),u=Qa(n),{onClose:d}=l;return b.useEffect(()=>(document.addEventListener(io,d),()=>document.removeEventListener(io,d)),[d]),b.useEffect(()=>{if(l.trigger){const c=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),g.jsx(Kd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:g.jsxs(C1,{"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(q1,{children:r}),g.jsx(W1,{scope:n,isInside:!0,children:g.jsx(B1,{id:l.contentId,role:"tooltip",children:i||r})})]})})});wf.displayName=Ar;var Sf="TooltipArrow",G1=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Qa(n);return Y1(Sf,n).isInside?null:g.jsx(S1,{...i,...r,ref:t})});G1.displayName=Sf;function K1(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function X1(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 Q1(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 J1(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const o=t[a],l=t[s],u=o.x,d=o.y,c=l.x,p=l.y;d>r!=p>r&&n<(c-u)*(r-d)/(p-d)+u&&(i=!i)}return i}function Z1(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),eb(t)}function eb(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 a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.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 a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.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 tb=kf,nb=Af,Nf=wf;function If(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=If(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function at(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=If(e))&&(r&&(r+=" "),r+=t);return r}const rb=(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},ib=(e,t)=>({classGroupId:e,validator:t}),Rf=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ia="-",Eu=[],ab="arbitrary..",sb=e=>{const t=lb(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return ob(s);const o=s.split(Ia),l=o[0]===""&&o.length>1?1:0;return Of(o,l,t)},getConflictingClassGroupIds:(s,o)=>{if(o){const l=r[s],u=n[s];return l?u?rb(u,l):l:u||Eu}return n[s]||Eu}}},Of=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const u=Of(e,t+1,a);if(u)return u}const s=n.validators;if(s===null)return;const o=t===0?e.join(Ia):e.slice(t).join(Ia),l=s.length;for(let u=0;u<l;u++){const d=s[u];if(d.validator(o))return d.classGroupId}},ob=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?ab+r:void 0})(),lb=e=>{const{theme:t,classGroups:n}=e;return ub(n,t)},ub=(e,t)=>{const n=Rf();for(const r in e){const i=e[r];il(i,n,r,t)}return n},il=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const s=e[a];cb(s,t,n,r)}},cb=(e,t,n,r)=>{if(typeof e=="string"){db(e,t,n);return}if(typeof e=="function"){fb(e,t,n,r);return}hb(e,t,n,r)},db=(e,t,n)=>{const r=e===""?t:Lf(t,e);r.classGroupId=n},fb=(e,t,n,r)=>{if(pb(e)){il(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ib(n,e))},hb=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let s=0;s<a;s++){const[o,l]=i[s];il(l,Lf(t,o),n,r)}},Lf=(e,t)=>{let n=e;const r=t.split(Ia),i=r.length;for(let a=0;a<i;a++){const s=r[a];let o=n.nextPart.get(s);o||(o=Rf(),n.nextPart.set(s,o)),n=o}return n},pb=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,mb=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,s)=>{n[a]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let s=n[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return i(a,s),s},set(a,s){a in n?n[a]=s:i(a,s)}}},so="!",Tu=":",gb=[],yu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),bb=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let s=0,o=0,l=0,u;const d=i.length;for(let E=0;E<d;E++){const k=i[E];if(s===0&&o===0){if(k===Tu){a.push(i.slice(l,E)),l=E+1;continue}if(k==="/"){u=E;continue}}k==="["?s++:k==="]"?s--:k==="("?o++:k===")"&&o--}const c=a.length===0?i:i.slice(l);let p=c,h=!1;c.endsWith(so)?(p=c.slice(0,-1),h=!0):c.startsWith(so)&&(p=c.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return yu(a,h,p,m)};if(t){const i=t+Tu,a=r;r=s=>s.startsWith(i)?a(s.slice(i.length)):yu(gb,!1,s,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},Eb=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const s=n[a],o=s[0]==="[",l=t.has(s);o||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},Tb=e=>({cache:mb(e.cacheSize),parseClassName:bb(e),sortModifiers:Eb(e),...sb(e)}),yb=/\s+/,xb=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,s=[],o=e.trim().split(yb);let l="";for(let u=o.length-1;u>=0;u-=1){const d=o[u],{isExternal:c,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:E}=n(d);if(c){l=d+(l.length>0?" "+l:l);continue}let k=!!E,_=r(k?m.substring(0,E):m);if(!_){if(!k){l=d+(l.length>0?" "+l:l);continue}if(_=r(m),!_){l=d+(l.length>0?" "+l:l);continue}k=!1}const N=p.length===0?"":p.length===1?p[0]:a(p).join(":"),C=h?N+so:N,F=C+_;if(s.indexOf(F)>-1)continue;s.push(F);const H=i(_,k);for(let I=0;I<H.length;++I){const V=H[I];s.push(C+V)}l=d+(l.length>0?" "+l:l)}return l},_b=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=vf(n))&&(i&&(i+=" "),i+=r);return i},vf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=vf(e[r]))&&(n&&(n+=" "),n+=t);return n},kb=(e,...t)=>{let n,r,i,a;const s=l=>{const u=t.reduce((d,c)=>c(d),e());return n=Tb(u),r=n.cache.get,i=n.cache.set,a=o,o(l)},o=l=>{const u=r(l);if(u)return u;const d=xb(l,n);return i(l,d),d};return a=s,(...l)=>a(_b(...l))},Ab=[],$e=e=>{const t=n=>n[e]||Ab;return t.isThemeGetter=!0,t},Df=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wb=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Cb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sb=/\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$/,Nb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ib=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yn=e=>wb.test(e),Te=e=>!!e&&!Number.isNaN(Number(e)),xn=e=>!!e&&Number.isInteger(Number(e)),ks=e=>e.endsWith("%")&&Te(e.slice(0,-1)),ln=e=>Cb.test(e),Mf=()=>!0,Ob=e=>Sb.test(e)&&!Nb.test(e),al=()=>!1,Lb=e=>Ib.test(e),vb=e=>Rb.test(e),Db=e=>!ae(e)&&!oe(e),Pb=e=>Dn(e,Hf,al),ae=e=>Df.test(e),Hn=e=>Dn(e,Uf,Ob),xu=e=>Dn(e,$b,Te),Mb=e=>Dn(e,zf,Mf),Bb=e=>Dn(e,jf,al),_u=e=>Dn(e,Bf,al),Fb=e=>Dn(e,Ff,vb),Xi=e=>Dn(e,$f,Lb),oe=e=>Pf.test(e),Br=e=>nr(e,Uf),Hb=e=>nr(e,jf),ku=e=>nr(e,Bf),Ub=e=>nr(e,Hf),jb=e=>nr(e,Ff),Qi=e=>nr(e,$f,!0),zb=e=>nr(e,zf,!0),Dn=(e,t,n)=>{const r=Df.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},nr=(e,t,n=!1)=>{const r=Pf.exec(e);return r?r[1]?t(r[1]):n:!1},Bf=e=>e==="position"||e==="percentage",Ff=e=>e==="image"||e==="url",Hf=e=>e==="length"||e==="size"||e==="bg-size",Uf=e=>e==="length",$b=e=>e==="number",jf=e=>e==="family-name",zf=e=>e==="number"||e==="weight",$f=e=>e==="shadow",Vb=()=>{const e=$e("color"),t=$e("font"),n=$e("text"),r=$e("font-weight"),i=$e("tracking"),a=$e("leading"),s=$e("breakpoint"),o=$e("container"),l=$e("spacing"),u=$e("radius"),d=$e("shadow"),c=$e("inset-shadow"),p=$e("text-shadow"),h=$e("drop-shadow"),m=$e("blur"),E=$e("perspective"),k=$e("aspect"),_=$e("ease"),N=$e("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],H=()=>[...F(),oe,ae],I=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],U=()=>[oe,ae,l],Q=()=>[yn,"full","auto",...U()],O=()=>[xn,"none","subgrid",oe,ae],K=()=>["auto",{span:["full",xn,oe,ae]},xn,oe,ae],z=()=>[xn,"auto",oe,ae],x=()=>["auto","min","max","fr",oe,ae],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],v=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...U()],P=()=>[yn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],q=()=>[yn,"screen","full","dvw","lvw","svw","min","max","fit",...U()],J=()=>[yn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],T=()=>[e,oe,ae],ie=()=>[...F(),ku,_u,{position:[oe,ae]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],w=()=>["auto","cover","contain",Ub,Pb,{size:[oe,ae]}],he=()=>[ks,Br,Hn],ue=()=>["","none","full",u,oe,ae],de=()=>["",Te,Br,Hn],He=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ke=()=>[Te,ks,ku,_u],Xe=()=>["","none",m,oe,ae],Qe=()=>["none",Te,oe,ae],tt=()=>["none",Te,oe,ae],Tt=()=>[Te,oe,ae],yt=()=>[yn,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ln],breakpoint:[ln],color:[Mf],container:[ln],"drop-shadow":[ln],ease:["in","out","in-out"],font:[Db],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ln],shadow:[ln],spacing:["px",Te],text:[ln],"text-shadow":[ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yn,ae,oe,k]}],container:["container"],columns:[{columns:[Te,ae,oe,o]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:H()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[xn,"auto",oe,ae]}],basis:[{basis:[yn,"full","auto",o,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,yn,"auto","initial","none",ae]}],grow:[{grow:["",Te,oe,ae]}],shrink:[{shrink:["",Te,oe,ae]}],order:[{order:[xn,"first","last","none",oe,ae]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":x()}],"auto-rows":[{"auto-rows":x()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...v(),"normal"]}],"justify-self":[{"justify-self":["auto",...v()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...v(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...v(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...v(),"baseline"]}],"place-self":[{"place-self":["auto",...v()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...J()]}],"min-block-size":[{"min-block":["auto",...J()]}],"max-block-size":[{"max-block":["none",...J()]}],w:[{w:[o,"screen",...P()]}],"min-w":[{"min-w":[o,"screen","none",...P()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,Br,Hn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,zb,Mb]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ks,ae]}],"font-family":[{font:[Hb,Bb,t]}],"font-features":[{"font-features":[ae]}],"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,oe,ae]}],"line-clamp":[{"line-clamp":[Te,"none",oe,xu]}],leading:[{leading:[a,...U()]}],"list-image":[{"list-image":["none",oe,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...He(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",oe,Hn]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[Te,"auto",oe,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,ae]}],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",oe,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:w()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xn,oe,ae],radial:["",oe,ae],conic:[xn,oe,ae]},jb,Fb]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:he()}],"gradient-via-pos":[{via:he()}],"gradient-to-pos":[{to:he()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...He(),"hidden","none"]}],"divide-style":[{divide:[...He(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...He(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,oe,ae]}],"outline-w":[{outline:["",Te,Br,Hn]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",d,Qi,Xi]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",c,Qi,Xi]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[Te,Hn]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",p,Qi,Xi]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[Te,oe,ae]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":ke()}],"mask-image-linear-to-pos":[{"mask-linear-to":ke()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ke()}],"mask-image-t-to-pos":[{"mask-t-to":ke()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ke()}],"mask-image-r-to-pos":[{"mask-r-to":ke()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ke()}],"mask-image-b-to-pos":[{"mask-b-to":ke()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ke()}],"mask-image-l-to-pos":[{"mask-l-to":ke()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ke()}],"mask-image-x-to-pos":[{"mask-x-to":ke()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ke()}],"mask-image-y-to-pos":[{"mask-y-to":ke()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[oe,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":ke()}],"mask-image-radial-to-pos":[{"mask-radial-to":ke()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":F()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":ke()}],"mask-image-conic-to-pos":[{"mask-conic-to":ke()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:w()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,ae]}],filter:[{filter:["","none",oe,ae]}],blur:[{blur:Xe()}],brightness:[{brightness:[Te,oe,ae]}],contrast:[{contrast:[Te,oe,ae]}],"drop-shadow":[{"drop-shadow":["","none",h,Qi,Xi]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",Te,oe,ae]}],"hue-rotate":[{"hue-rotate":[Te,oe,ae]}],invert:[{invert:["",Te,oe,ae]}],saturate:[{saturate:[Te,oe,ae]}],sepia:[{sepia:["",Te,oe,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,ae]}],"backdrop-blur":[{"backdrop-blur":Xe()}],"backdrop-brightness":[{"backdrop-brightness":[Te,oe,ae]}],"backdrop-contrast":[{"backdrop-contrast":[Te,oe,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,oe,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,oe,ae]}],"backdrop-invert":[{"backdrop-invert":["",Te,oe,ae]}],"backdrop-opacity":[{"backdrop-opacity":[Te,oe,ae]}],"backdrop-saturate":[{"backdrop-saturate":[Te,oe,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,oe,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",oe,ae]}],ease:[{ease:["linear","initial",_,oe,ae]}],delay:[{delay:[Te,oe,ae]}],animate:[{animate:["none",N,oe,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,oe,ae]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:tt()}],"scale-x":[{"scale-x":tt()}],"scale-y":[{"scale-y":tt()}],"scale-z":[{"scale-z":tt()}],"scale-3d":["scale-3d"],skew:[{skew:Tt()}],"skew-x":[{"skew-x":Tt()}],"skew-y":[{"skew-y":Tt()}],transform:[{transform:[oe,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:H()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:yt()}],"translate-x":[{"translate-x":yt()}],"translate-y":[{"translate-y":yt()}],"translate-z":[{"translate-z":yt()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",oe,ae]}],"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":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",oe,ae]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[Te,Br,Hn,xu]}],stroke:[{stroke:["none",...T()]}],"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"]}},sl=kb(Vb);/**
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 Bf=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
7
+ */const Vf=(...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 Nb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
12
+ */const Wb=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 Ib=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
17
+ */const Yb=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 Eu=e=>{const t=Ib(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
22
+ */const Au=e=>{const t=Yb(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 Ob={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 qb={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 Rb=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
32
+ */const Gb=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 Lb=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:s,...o},l)=>b.createElement("svg",{ref:l,...Ob,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Bf("lucide",i),...!a&&!Rb(o)&&{"aria-hidden":"true"},...o},[...s.map(([u,d])=>b.createElement(u,d)),...Array.isArray(a)?a:[a]]));/**
37
+ */const Kb=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:s,...o},l)=>b.createElement("svg",{ref:l,...qb,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Vf("lucide",i),...!a&&!Gb(o)&&{"aria-hidden":"true"},...o},[...s.map(([u,d])=>b.createElement(u,d)),...Array.isArray(a)?a:[a]]));/**
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 vb=(e,t)=>{const n=b.forwardRef(({className:r,...i},a)=>b.createElement(Lb,{ref:a,iconNode:t,className:Bf(`lucide-${Nb(Eu(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Eu(e),n};/**
42
+ */const Wf=(e,t)=>{const n=b.forwardRef(({className:r,...i},a)=>b.createElement(Kb,{ref:a,iconNode:t,className:Vf(`lucide-${Wb(Au(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Au(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 Db=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Lv=vb("loader-circle",Db);function Pb(...e){return tl(it(e))}const qi=new Intl.NumberFormat(void 0,{maximumFractionDigits:2}),ca=1e3,Gr=60*ca,Kr=60*Gr,Tu=24*Kr;function It(e,t=!1){if(e===0)return"0";if(e<ca)return`${qi.format(e)}ms`;if(e<Gr)return`${qi.format(e/ca)}s`;if(t)return e<Kr?`${qi.format(e/Gr)}m`:`${qi.format(e/Kr)}h`;const n=Math.floor(e/Tu),r=Math.floor(e%Tu/Kr),i=Math.floor(e%Kr/Gr),a=Math.floor(e%Gr/ca),s=[];return n>0&&s.push(`${n}d`),r>0&&s.push(`${r}h`),i>0&&s.push(`${i}m`),r<=1&&(a>0||s.length===0)&&s.push(`${a}s`),s.join(" ")}function vv(e){return e.endsWith("//doStreamStep")}function Dv(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}var Mb=Object.create,nl=Object.defineProperty,Bb=Object.getOwnPropertyDescriptor,Ff=Object.getOwnPropertyNames,Fb=Object.getPrototypeOf,Hb=Object.prototype.hasOwnProperty,rl=(e,t)=>function(){return t||(0,e[Ff(e)[0]])((t={exports:{}}).exports,t),t.exports},Ub=(e,t)=>{for(var n in t)nl(e,n,{get:t[n],enumerable:!0})},jb=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ff(t))!Hb.call(e,i)&&i!==n&&nl(e,i,{get:()=>t[i],enumerable:!(r=Bb(t,i))||r.enumerable});return e},zb=(e,t,n)=>(n=e!=null?Mb(Fb(e)):{},jb(nl(n,"default",{value:e,enumerable:!0}),e)),$b=rl({"node_modules/is-object/index.js"(e,t){t.exports=function(r){return typeof r=="object"&&r!==null}}}),Vb=rl({"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}}}),Wb=rl({"node_modules/is-dom/index.js"(e,t){var n=$b(),r=Vb();function i(a){return!n(a)||!r(window)||typeof window.Node!="function"?!1:typeof a.nodeType=="number"&&typeof a.nodeName=="string"}t.exports=i}}),Ca={};Ub(Ca,{chromeDark:()=>Yb,chromeLight:()=>qb});var Yb={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"},qb={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"},Hf=b.createContext([{},()=>{}]),Es={WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",OUserSelect:"none",userSelect:"none"},da=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,...Es},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`}:{},...Es},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,...Es}}),to="chromeLight",Uf=b.createContext(da(Ca[to])),Si=e=>b.useContext(Uf)[e],Gb=e=>({theme:n=to,...r})=>{const i=b.useMemo(()=>{switch(Object.prototype.toString.call(n)){case"[object String]":return da(Ca[n]);case"[object Object]":return da(n);default:return da(Ca[to])}},[n]);return j.createElement(Uf.Provider,{value:i},j.createElement(e,{...r}))},Kb=({expanded:e,styles:t})=>j.createElement("span",{style:{...t.base,...e?t.expanded:t.collapsed}},"▶"),Xb=b.memo(e=>{e={expanded:!0,nodeRenderer:({name:d})=>j.createElement("span",null,d),onClick:()=>{},shouldShowArrow:!1,shouldShowPlaceholder:!0,...e};const{expanded:t,onClick:n,children:r,nodeRenderer:i,title:a,shouldShowArrow:s,shouldShowPlaceholder:o}=e,l=Si("TreeNode"),u=i;return j.createElement("li",{"aria-expanded":t,role:"treeitem",style:l.treeNodeBase,title:a},j.createElement("div",{style:l.treeNodePreviewContainer,onClick:n},s||b.Children.count(r)>0?j.createElement(Kb,{expanded:t,styles:l.treeNodeArrow}):o&&j.createElement("span",{style:l.treeNodePlaceholder}," "),j.createElement(u,{...e})),j.createElement("ol",{role:"group",style:l.treeNodeChildNodesContainer},t?r:void 0))}),wa="$",xu="*";function fa(e,t){return!t(e).next().done}var Qb=e=>Array.from({length:e},(t,n)=>[wa].concat(Array.from({length:n},()=>"*")).join(".")),Jb=(e,t,n,r,i)=>{const a=[].concat(Qb(r)).concat(n).filter(o=>typeof o=="string"),s=[];return a.forEach(o=>{const l=o.split("."),u=(d,c,p)=>{if(p===l.length){s.push(c);return}const h=l[p];if(p===0)fa(d,t)&&(h===wa||h===xu)&&u(d,wa,p+1);else if(h===xu)for(const{name:m,data:E}of t(d))fa(E,t)&&u(E,`${c}.${m}`,p+1);else{const m=d[h];fa(m,t)&&u(m,`${c}.${h}`,p+1)}};u(e,"",0)}),s.reduce((o,l)=>(o[l]=!0,o),{...i})},jf=b.memo(e=>{const{data:t,dataIterator:n,path:r,depth:i,nodeRenderer:a}=e,[s,o]=b.useContext(Hf),l=fa(t,n),u=!!s[r],d=b.useCallback(()=>l&&o(c=>({...c,[r]:!u})),[l,o,r,u]);return j.createElement(Xb,{expanded:u,onClick:d,shouldShowArrow:l,shouldShowPlaceholder:i>0,nodeRenderer:a,...e},u?[...n(t)].map(({name:c,data:p,...h})=>j.createElement(jf,{name:c,data:p,depth:i+1,path:`${r}.${c}`,key:c,dataIterator:n,nodeRenderer:a,...h})):null)}),Zb=b.memo(({name:e,data:t,dataIterator:n,nodeRenderer:r,expandPaths:i,expandLevel:a})=>{const s=Si("TreeView"),o=b.useState({}),[,l]=o;return b.useLayoutEffect(()=>l(u=>Jb(t,n,i,a,u)),[t,n,i,a]),j.createElement(Hf.Provider,{value:o},j.createElement("ol",{role:"tree",style:s.treeViewOutline},j.createElement(jf,{name:e,data:t,dataIterator:n,depth:0,path:wa,nodeRenderer:r})))}),Er=({name:e,dimmed:t=!1,styles:n={}})=>{const r=Si("ObjectName"),i={...r.base,...t?r.dimmed:{},...n};return j.createElement("span",{style:i},e)},ti=({object:e,styles:t})=>{const n=Si("ObjectValue"),r=i=>({...n[i],...t});switch(typeof e){case"bigint":return j.createElement("span",{style:r("objectValueNumber")},String(e),"n");case"number":return j.createElement("span",{style:r("objectValueNumber")},String(e));case"string":return j.createElement("span",{style:r("objectValueString")},'"',e,'"');case"boolean":return j.createElement("span",{style:r("objectValueBoolean")},String(e));case"undefined":return j.createElement("span",{style:r("objectValueUndefined")},"undefined");case"object":return e===null?j.createElement("span",{style:r("objectValueNull")},"null"):e instanceof Date?j.createElement("span",null,e.toString()):e instanceof RegExp?j.createElement("span",{style:r("objectValueRegExp")},e.toString()):Array.isArray(e)?j.createElement("span",null,`Array(${e.length})`):e.constructor?typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)?j.createElement("span",null,`Buffer[${e.length}]`):j.createElement("span",null,e.constructor.name):j.createElement("span",null,"Object");case"function":return j.createElement("span",null,j.createElement("span",{style:r("objectValueFunctionPrefix")},"ƒ "),j.createElement("span",{style:r("objectValueFunctionName")},e.name,"()"));case"symbol":return j.createElement("span",{style:r("objectValueSymbol")},e.toString());default:return j.createElement("span",null)}},eE=Object.prototype.hasOwnProperty,tE=Object.prototype.propertyIsEnumerable;function no(e,t){const n=Object.getOwnPropertyDescriptor(e,t);if(n.get)try{return n.get()}catch{return n.get}return e[t]}function yu(e,t){return e.length===0?[]:e.slice(1).reduce((n,r)=>n.concat([t,r]),[e[0]])}var ro=({data:e})=>{const t=Si("ObjectPreview"),n=e;if(typeof n!="object"||n===null||n instanceof Date||n instanceof RegExp)return j.createElement(ti,{object:n});if(Array.isArray(n)){const r=t.arrayMaxProperties,i=n.slice(0,r).map((s,o)=>j.createElement(ti,{key:o,object:s}));n.length>r&&i.push(j.createElement("span",{key:"ellipsis"},"…"));const a=n.length;return j.createElement(j.Fragment,null,j.createElement("span",{style:t.objectDescription},a===0?"":`(${a}) `),j.createElement("span",{style:t.preview},"[",yu(i,", "),"]"))}else{const r=t.objectMaxProperties,i=[];for(const s in n)if(eE.call(n,s)){let o;i.length===r-1&&Object.keys(n).length>r&&(o=j.createElement("span",{key:"ellipsis"},"…"));const l=no(n,s);if(i.push(j.createElement("span",{key:s},j.createElement(Er,{name:s||'""'}),": ",j.createElement(ti,{object:l}),o)),o)break}const a=n.constructor?n.constructor.name:"Object";return j.createElement(j.Fragment,null,j.createElement("span",{style:t.objectDescription},a==="Object"?"":`${a} `),j.createElement("span",{style:t.preview},"{",yu(i,", "),"}"))}},io=({name:e,data:t})=>typeof e=="string"?j.createElement("span",null,j.createElement(Er,{name:e}),j.createElement("span",null,": "),j.createElement(ro,{data:t})):j.createElement(ro,{data:t}),zf=({name:e,data:t,isNonenumerable:n=!1})=>{const r=t;return j.createElement("span",null,typeof e=="string"?j.createElement(Er,{name:e,dimmed:n}):j.createElement(ro,{data:e}),j.createElement("span",null,": "),j.createElement(ti,{object:r}))},nE=(e,t)=>function*(r){if(!(typeof r=="object"&&r!==null||typeof r=="function"))return;const a=Array.isArray(r);if(!a&&r[Symbol.iterator]){let s=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:s.toString(),data:o};s++}}else{const s=Object.getOwnPropertyNames(r);t===!0&&!a?s.sort():typeof t=="function"&&s.sort(t);for(const o of s)if(tE.call(r,o)){const l=no(r,o);yield{name:o||'""',data:l}}else if(e){let l;try{l=no(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})}},rE=({depth:e,name:t,data:n,isNonenumerable:r})=>e===0?j.createElement(io,{name:t,data:n}):j.createElement(zf,{name:t,data:n,isNonenumerable:r}),iE=({showNonenumerable:e=!1,sortObjectKeys:t,nodeRenderer:n,...r})=>{const i=nE(e,t),a=n||rE;return j.createElement(Zb,{nodeRenderer:a,dataIterator:i,...r})},aE=Gb(iE);zb(Wb());const sE=()=>{const[e,t]=b.useState(()=>typeof document>"u"?!1:document.documentElement.classList.contains("dark"));return b.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},$f={OBJECT_VALUE_DATE_COLOR:"#a21caf"},oE={OBJECT_VALUE_DATE_COLOR:"#e879f9"},Vf={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"},lE={...Vf,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)"},uE={...Vf,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)"},cE="__workflow_stream_ref__",dE="__workflow_class_instance_ref__";function fE(e){return e!==null&&typeof e=="object"&&"__type"in e&&e.__type===cE}function hE(e){return e!==null&&typeof e=="object"&&"__type"in e&&e.__type===dE}const Wf=b.createContext(void 0);function pE({streamRef:e}){const t=b.useContext(Wf);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 Yf=b.createContext($f);function mE({depth:e,name:t,data:n,isNonenumerable:r}){const i=b.useContext(Yf);if(fE(n))return g.jsxs("span",{children:[t!=null&&g.jsx(Er,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsx(pE,{streamRef:n})]});if(hE(n))return e===0?g.jsx(io,{name:n.className,data:n.data}):g.jsxs("span",{children:[t!=null&&g.jsx(Er,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsxs("span",{style:{fontStyle:"italic"},children:[n.className," "]}),g.jsx(ti,{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(Er,{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(io,{name:t,data:n}):g.jsx(zf,{name:t,data:n,isNonenumerable:r})}function gE({data:e,expandLevel:t=2,name:n,onStreamClick:r}){const i=bE(e),[a,s]=b.useState(t),o=sE(),l=o?oE:$f;b.useEffect(()=>{s(0)},[]);const u=g.jsx(Yf.Provider,{value:l,children:g.jsx(aE,{data:i,name:n,theme:o?uE:lE,expandLevel:a,nodeRenderer:mE})});return r?g.jsx(Wf.Provider,{value:r,children:u}):u}function bE(e){const t=b.useRef(e);return ha(t.current,e)||(t.current=e),t.current}function _u(e){return typeof e=="object"&&e!==null}function ha(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)||!ha(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(!_u(e)||!_u(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(!ha(e[o],t[o],n))return!1;return!0}const a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(const o of a)if(!Object.prototype.hasOwnProperty.call(t,o)||!ha(e[o],t[o],n))return!1;return!0}function EE(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 TE=e=>{switch(e){case"success":return _E;case"info":return AE;case"warning":return kE;case"error":return CE;default:return null}},xE=Array(12).fill(0),yE=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},xE.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),_E=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),kE=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.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"})),AE=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),CE=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),wE=j.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"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),SE=()=>{const[e,t]=j.useState(document.hidden);return j.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let ao=1;class NE{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,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:ao++,s=this.toasts.find(l=>l.id===a),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:o,title:r}):l):this.addToast({title:r,...i,dismissible:o,id:a}),a},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 a=r!==void 0,s;const o=i.then(async u=>{if(s=["resolve",u],j.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(OE(u)&&!u.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,m=typeof c=="object"&&!j.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...m})}else if(u instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!j.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...m})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!j.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...m})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){a=!1;const d=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,h=typeof d=="object"&&!j.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:c,...h})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>o.then(()=>s[0]==="reject"?d(s[1]):u(s[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)||ao++;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 gt=new NE,IE=(e,t)=>{const n=(t==null?void 0:t.id)||ao++;return gt.addToast({title:e,...t,id:n}),n},OE=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",RE=IE,LE=()=>gt.toasts,vE=()=>gt.getActiveToasts(),Pv=Object.assign(RE,{success:gt.success,info:gt.info,warning:gt.warning,error:gt.error,custom:gt.custom,message:gt.message,promise:gt.promise,dismiss:gt.dismiss,loading:gt.loading},{getHistory:LE,getToasts:vE});EE("[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 Gi(e){return e.label!==void 0}const DE=3,PE="24px",ME="16px",ku=4e3,BE=356,FE=14,HE=45,UE=200;function Gt(...e){return e.filter(Boolean).join(" ")}function jE(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const zE=e=>{var t,n,r,i,a,s,o,l,u;const{invert:d,toast:c,unstyled:p,interacting:h,setHeights:m,visibleToasts:E,heights:k,index:_,toasts:N,expanded:w,removeToast:F,defaultRichColors:H,closeButton:I,style:V,cancelButtonStyle:U,actionButtonStyle:Q,className:R="",descriptionClassName:K="",duration:z,position:y,gap:L,expandByDefault:v,classNames:D,icons:P,closeButtonAriaLabel:q="Close toast"}=e,[J,T]=j.useState(null),[ie,te]=j.useState(null),[C,he]=j.useState(!1),[ue,de]=j.useState(!1),[He,be]=j.useState(!1),[ke,Xe]=j.useState(!1),[Qe,et]=j.useState(!1),[Tt,xt]=j.useState(0),[or,Mn]=j.useState(0),qt=j.useRef(c.duration||z||ku),lr=j.useRef(null),Je=j.useRef(null),Ui=_===0,fs=_+1<=E,lt=c.type,gn=c.dismissible!==!1,hs=c.className||"",ps=c.descriptionClassName||"",W=j.useMemo(()=>k.findIndex(me=>me.toastId===c.id)||0,[k,c.id]),ne=j.useMemo(()=>{var me;return(me=c.closeButton)!=null?me:I},[c.closeButton,I]),fe=j.useMemo(()=>c.duration||z||ku,[c.duration,z]),Ee=j.useRef(0),Ce=j.useRef(0),ft=j.useRef(0),ht=j.useRef(null),[Ht,Bn]=y.split("-"),bn=j.useMemo(()=>k.reduce((me,Ye,nt)=>nt>=W?me:me+Ye.height,0),[k,W]),tt=SE(),En=c.invert||d,yt=lt==="loading";Ce.current=j.useMemo(()=>W*L+bn,[W,bn]),j.useEffect(()=>{qt.current=fe},[fe]),j.useEffect(()=>{he(!0)},[]),j.useEffect(()=>{const me=Je.current;if(me){const Ye=me.getBoundingClientRect().height;return Mn(Ye),m(nt=>[{toastId:c.id,height:Ye,position:c.position},...nt]),()=>m(nt=>nt.filter(_t=>_t.toastId!==c.id))}},[m,c.id]),j.useLayoutEffect(()=>{if(!C)return;const me=Je.current,Ye=me.style.height;me.style.height="auto";const nt=me.getBoundingClientRect().height;me.style.height=Ye,Mn(nt),m(_t=>_t.find(Ze=>Ze.toastId===c.id)?_t.map(Ze=>Ze.toastId===c.id?{...Ze,height:nt}:Ze):[{toastId:c.id,height:nt,position:c.position},..._t])},[C,c.title,c.description,m,c.id,c.jsx,c.action,c.cancel]);const Tn=j.useCallback(()=>{de(!0),xt(Ce.current),m(me=>me.filter(Ye=>Ye.toastId!==c.id)),setTimeout(()=>{F(c)},UE)},[c,F,m,Ce]);j.useEffect(()=>{if(c.promise&&lt==="loading"||c.duration===1/0||c.type==="loading")return;let me;return w||h||tt?(()=>{if(ft.current<Ee.current){const _t=new Date().getTime()-Ee.current;qt.current=qt.current-_t}ft.current=new Date().getTime()})():(()=>{qt.current!==1/0&&(Ee.current=new Date().getTime(),me=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Tn()},qt.current))})(),()=>clearTimeout(me)},[w,h,c,lt,tt,Tn]),j.useEffect(()=>{c.delete&&(Tn(),c.onDismiss==null||c.onDismiss.call(c,c))},[Tn,c.delete]);function bm(){var me;if(P!=null&&P.loading){var Ye;return j.createElement("div",{className:Gt(D==null?void 0:D.loader,c==null||(Ye=c.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":lt==="loading"},P.loading)}return j.createElement(yE,{className:Gt(D==null?void 0:D.loader,c==null||(me=c.classNames)==null?void 0:me.loader),visible:lt==="loading"})}const Em=c.icon||(P==null?void 0:P[lt])||TE(lt);var Kl,Xl;return j.createElement("li",{tabIndex:0,ref:Je,className:Gt(R,hs,D==null?void 0:D.toast,c==null||(t=c.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[lt],c==null||(n=c.classNames)==null?void 0:n[lt]),"data-sonner-toast":"","data-rich-colors":(Kl=c.richColors)!=null?Kl:H,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":C,"data-promise":!!c.promise,"data-swiped":Qe,"data-removed":ue,"data-visible":fs,"data-y-position":Ht,"data-x-position":Bn,"data-index":_,"data-front":Ui,"data-swiping":He,"data-dismissible":gn,"data-type":lt,"data-invert":En,"data-swipe-out":ke,"data-swipe-direction":ie,"data-expanded":!!(w||v&&C),"data-testid":c.testId,style:{"--index":_,"--toasts-before":_,"--z-index":N.length-_,"--offset":`${ue?Tt:Ce.current}px`,"--initial-height":v?"auto":`${or}px`,...V,...c.style},onDragEnd:()=>{be(!1),T(null),ht.current=null},onPointerDown:me=>{me.button!==2&&(yt||!gn||(lr.current=new Date,xt(Ce.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(be(!0),ht.current={x:me.clientX,y:me.clientY})))},onPointerUp:()=>{var me,Ye,nt;if(ke||!gn)return;ht.current=null;const _t=Number(((me=Je.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ji=Number(((Ye=Je.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ze=new Date().getTime()-((nt=lr.current)==null?void 0:nt.getTime()),Rt=J==="x"?_t:ji,zi=Math.abs(Rt)/Ze;if(Math.abs(Rt)>=HE||zi>.11){xt(Ce.current),c.onDismiss==null||c.onDismiss.call(c,c),te(J==="x"?_t>0?"right":"left":ji>0?"down":"up"),Tn(),Xe(!0);return}else{var Ut,jt;(Ut=Je.current)==null||Ut.style.setProperty("--swipe-amount-x","0px"),(jt=Je.current)==null||jt.style.setProperty("--swipe-amount-y","0px")}et(!1),be(!1),T(null)},onPointerMove:me=>{var Ye,nt,_t;if(!ht.current||!gn||((Ye=window.getSelection())==null?void 0:Ye.toString().length)>0)return;const Ze=me.clientY-ht.current.y,Rt=me.clientX-ht.current.x;var zi;const Ut=(zi=e.swipeDirections)!=null?zi:jE(y);!J&&(Math.abs(Rt)>1||Math.abs(Ze)>1)&&T(Math.abs(Rt)>Math.abs(Ze)?"x":"y");let jt={x:0,y:0};const Ql=Fn=>1/(1.5+Math.abs(Fn)/20);if(J==="y"){if(Ut.includes("top")||Ut.includes("bottom"))if(Ut.includes("top")&&Ze<0||Ut.includes("bottom")&&Ze>0)jt.y=Ze;else{const Fn=Ze*Ql(Ze);jt.y=Math.abs(Fn)<Math.abs(Ze)?Fn:Ze}}else if(J==="x"&&(Ut.includes("left")||Ut.includes("right")))if(Ut.includes("left")&&Rt<0||Ut.includes("right")&&Rt>0)jt.x=Rt;else{const Fn=Rt*Ql(Rt);jt.x=Math.abs(Fn)<Math.abs(Rt)?Fn:Rt}(Math.abs(jt.x)>0||Math.abs(jt.y)>0)&&et(!0),(nt=Je.current)==null||nt.style.setProperty("--swipe-amount-x",`${jt.x}px`),(_t=Je.current)==null||_t.style.setProperty("--swipe-amount-y",`${jt.y}px`)}},ne&&!c.jsx&&lt!=="loading"?j.createElement("button",{"aria-label":q,"data-disabled":yt,"data-close-button":!0,onClick:yt||!gn?()=>{}:()=>{Tn(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Gt(D==null?void 0:D.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Xl=P==null?void 0:P.close)!=null?Xl:wE):null,(lt||c.icon||c.promise)&&c.icon!==null&&((P==null?void 0:P[lt])!==null||c.icon)?j.createElement("div",{"data-icon":"",className:Gt(D==null?void 0:D.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||bm():null,c.type!=="loading"?Em:null):null,j.createElement("div",{"data-content":"",className:Gt(D==null?void 0:D.content,c==null||(a=c.classNames)==null?void 0:a.content)},j.createElement("div",{"data-title":"",className:Gt(D==null?void 0:D.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?j.createElement("div",{"data-description":"",className:Gt(K,ps,D==null?void 0:D.description,c==null||(o=c.classNames)==null?void 0:o.description)},typeof c.description=="function"?c.description():c.description):null),j.isValidElement(c.cancel)?c.cancel:c.cancel&&Gi(c.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||U,onClick:me=>{Gi(c.cancel)&&gn&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,me),Tn())},className:Gt(D==null?void 0:D.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,j.isValidElement(c.action)?c.action:c.action&&Gi(c.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||Q,onClick:me=>{Gi(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,me),!me.defaultPrevented&&Tn())},className:Gt(D==null?void 0:D.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Au(){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 $E(e,t){const n={};return[e,t].forEach((r,i)=>{const a=i===1,s=a?"--mobile-offset":"--offset",o=a?ME:PE;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${s}-${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[`${s}-${u}`]=o:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(o)}),n}const Mv=j.forwardRef(function(t,n){const{id:r,invert:i,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:l,className:u,offset:d,mobileOffset:c,theme:p="light",richColors:h,duration:m,style:E,visibleToasts:k=DE,toastOptions:_,dir:N=Au(),gap:w=FE,icons:F,containerAriaLabel:H="Notifications"}=t,[I,V]=j.useState([]),U=j.useMemo(()=>r?I.filter(C=>C.toasterId===r):I.filter(C=>!C.toasterId),[I,r]),Q=j.useMemo(()=>Array.from(new Set([a].concat(U.filter(C=>C.position).map(C=>C.position)))),[U,a]),[R,K]=j.useState([]),[z,y]=j.useState(!1),[L,v]=j.useState(!1),[D,P]=j.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=j.useRef(null),J=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=j.useRef(null),ie=j.useRef(!1),te=j.useCallback(C=>{V(he=>{var ue;return(ue=he.find(de=>de.id===C.id))!=null&&ue.delete||gt.dismiss(C.id),he.filter(({id:de})=>de!==C.id)})},[]);return j.useEffect(()=>gt.subscribe(C=>{if(C.dismiss){requestAnimationFrame(()=>{V(he=>he.map(ue=>ue.id===C.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{ym.flushSync(()=>{V(he=>{const ue=he.findIndex(de=>de.id===C.id);return ue!==-1?[...he.slice(0,ue),{...he[ue],...C},...he.slice(ue+1)]:[C,...he]})})})}),[I]),j.useEffect(()=>{if(p!=="system"){P(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),typeof window>"u")return;const C=window.matchMedia("(prefers-color-scheme: dark)");try{C.addEventListener("change",({matches:he})=>{P(he?"dark":"light")})}catch{C.addListener(({matches:ue})=>{try{P(ue?"dark":"light")}catch(de){console.error(de)}})}},[p]),j.useEffect(()=>{I.length<=1&&y(!1)},[I]),j.useEffect(()=>{const C=he=>{var ue;if(s.every(be=>he[be]||he.code===be)){var He;y(!0),(He=q.current)==null||He.focus()}he.code==="Escape"&&(document.activeElement===q.current||(ue=q.current)!=null&&ue.contains(document.activeElement))&&y(!1)};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[s]),j.useEffect(()=>{if(q.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,ie.current=!1)}},[q.current]),j.createElement("section",{ref:n,"aria-label":`${H} ${J}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((C,he)=>{var ue;const[de,He]=C.split("-");return U.length?j.createElement("ol",{key:C,dir:N==="auto"?Au():N,tabIndex:-1,ref:q,className:u,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":de,"data-x-position":He,style:{"--front-toast-height":`${((ue=R[0])==null?void 0:ue.height)||0}px`,"--width":`${BE}px`,"--gap":`${w}px`,...E,...$E(d,c)},onBlur:be=>{ie.current&&!be.currentTarget.contains(be.relatedTarget)&&(ie.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||ie.current||(ie.current=!0,T.current=be.relatedTarget)},onMouseEnter:()=>y(!0),onMouseMove:()=>y(!0),onMouseLeave:()=>{L||y(!1)},onDragEnd:()=>y(!1),onPointerDown:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||v(!0)},onPointerUp:()=>v(!1)},U.filter(be=>!be.position&&he===0||be.position===C).map((be,ke)=>{var Xe,Qe;return j.createElement(zE,{key:be.id,icons:F,index:ke,toast:be,defaultRichColors:h,duration:(Xe=_==null?void 0:_.duration)!=null?Xe:m,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:i,visibleToasts:k,closeButton:(Qe=_==null?void 0:_.closeButton)!=null?Qe:l,interacting:L,position:C,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:te,toasts:U.filter(et=>et.position==be.position),heights:R.filter(et=>et.position==be.position),setHeights:K,expandByDefault:o,gap:w,expanded:z,swipeDirections:t.swipeDirections})})):null}))});function Cu({className:e,style:t,...n}){return g.jsx("div",{...n,className:Pb("rounded-md",e),style:{backgroundColor:"var(--ds-gray-200)",...t}})}const VE="modulepreload",WE=function(e){return"/"+e},wu={},qf=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=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=s(n.map(u=>{if(u=WE(u),u in wu)return;wu[u]=!0;const d=u.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":VE,d||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),d)return new Promise((h,m)=>{p.addEventListener("load",h),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})},Ni=(function(e){if(e==null)return KE;if(typeof e=="function")return qa(e);if(typeof e=="object")return Array.isArray(e)?YE(e):qE(e);if(typeof e=="string")return GE(e);throw new Error("Expected function, string, or object as test")});function YE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ni(e[n]);return qa(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function qE(e){const t=e;return qa(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function GE(e){return qa(t);function t(n){return n&&n.type===e}}function qa(e){return t;function t(n,r,i){return!!(XE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function KE(){return!0}function XE(e){return e!==null&&typeof e=="object"&&"type"in e}const Gf=[],Xr=!0,so=!1,Qr="skip";function QE(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Ni(i),s=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 h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Gf,m,E,k;if((!t||a(l,u,d[d.length-1]||void 0))&&(h=JE(n(l,d)),h[0]===so))return h;if("children"in l&&l.children){const _=l;if(_.children&&h[0]!==Qr)for(E=(r?_.children.length:-1)+s,k=d.concat(_);E>-1&&E<_.children.length;){const N=_.children[E];if(m=o(N,E,k)(),m[0]===so)return m;E=typeof m[1]=="number"?m[1]:E+s}}return h}}}function JE(e){return Array.isArray(e)?e:typeof e=="number"?[Xr,e]:e==null?Gf:[e]}function Ln(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),QE(e,a,o,i);function o(l,u){const d=u[u.length-1],c=d?d.children.indexOf(l):void 0;return s(l,c,d)}}const Ar={indicator:"indicator",textOnly:"text-only",remove:"remove"};function ZE({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:o=Ar.indicator,imageBlockPolicy:l=Ar.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 p=aT(e,t,n,r,i,a,s,o,l);Kf(c),Ln(c,p)}}function Su(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 eT(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const tT=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),nT=new Set(["javascript:","data:","file:","vbscript:"]);function Nu(e,t,n,r=!1,i=!1,a=[]){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 s=Su(e,n);if(!s||nT.has(s.protocol)||!(tT.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const l=eT(e);return s&&t.some(u=>{const d=Su(u,n);return!d||d.origin!==s.origin?!1:s.href.startsWith(d.href)})?l?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:l?s.pathname+s.search+s.hash:s.href:null}function Kf(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Kf(t)}}const Ts=Symbol("node-seen");function rT(e,t,n){return t===Ar.remove?{type:"remove"}:t===Ar.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 iT(e,t,n){if(t===Ar.remove)return{type:"remove"};if(t===Ar.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 aT=(e,t,n,r,i,a,s,o,l)=>{const u=(d,c,p)=>{if(d.type!=="element"||d[Ts])return Xr;if(d.tagName==="a"){const h=Nu(d.properties.href,t,e,!1,!1,i);if(h===null){if(d[Ts]=!0,Ln(d,u),p&&typeof c=="number"){const m=rT(d,o,s);if(m.type==="remove")return p.children.splice(c,1),[Qr,c];p.children[c]=m.element}return Qr}else return d.properties.href=h,d.properties.target="_blank",d.properties.rel="noopener noreferrer",Xr}if(d.tagName==="img"){const h=Nu(d.properties.src,n,e,r,!0,i);if(h===null){if(d[Ts]=!0,Ln(d,u),p&&typeof c=="number"){const m=iT(d,l,a);if(m.type==="remove")return p.children.splice(c,1),[Qr,c];p.children[c]=m.element}return Qr}else return d.properties.src=h,Xr}return Xr};return u},Xf=-1,Ga=0,ni=1,Sa=2,il=3,al=4,sl=5,ol=6,Qf=7,Jf=8,Iu=typeof self=="object"?self:globalThis,sT=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case Ga:case Xf:return n(s,i);case ni:{const o=n([],i);for(const l of s)o.push(r(l));return o}case Sa:{const o=n({},i);for(const[l,u]of s)o[r(l)]=r(u);return o}case il:return n(new Date(s),i);case al:{const{source:o,flags:l}=s;return n(new RegExp(o,l),i)}case sl:{const o=n(new Map,i);for(const[l,u]of s)o.set(r(l),r(u));return o}case ol:{const o=n(new Set,i);for(const l of s)o.add(r(l));return o}case Qf:{const{name:o,message:l}=s;return n(new Iu[o](l),i)}case Jf:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(new Iu[a](s),i)};return r},Ou=e=>sT(new Map,e)(0),ur="",{toString:oT}={},{keys:lT}=Object,Br=e=>{const t=typeof e;if(t!=="object"||!e)return[Ga,t];const n=oT.call(e).slice(8,-1);switch(n){case"Array":return[ni,ur];case"Object":return[Sa,ur];case"Date":return[il,ur];case"RegExp":return[al,ur];case"Map":return[sl,ur];case"Set":return[ol,ur];case"DataView":return[ni,n]}return n.includes("Array")?[ni,n]:n.includes("Error")?[Qf,n]:[Sa,n]},Ki=([e,t])=>e===Ga&&(t==="function"||t==="symbol"),uT=(e,t,n,r)=>{const i=(s,o)=>{const l=r.push(s)-1;return n.set(o,l),l},a=s=>{if(n.has(s))return n.get(s);let[o,l]=Br(s);switch(o){case Ga:{let d=s;switch(l){case"bigint":o=Jf,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return i([Xf],s)}return i([o,d],s)}case ni:{if(l){let p=s;return l==="DataView"?p=new Uint8Array(s.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(s)),i([l,[...p]],s)}const d=[],c=i([o,d],s);for(const p of s)d.push(a(p));return c}case Sa:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],c=i([o,d],s);for(const p of lT(s))(e||!Ki(Br(s[p])))&&d.push([a(p),a(s[p])]);return c}case il:return i([o,s.toISOString()],s);case al:{const{source:d,flags:c}=s;return i([o,{source:d,flags:c}],s)}case sl:{const d=[],c=i([o,d],s);for(const[p,h]of s)(e||!(Ki(Br(p))||Ki(Br(h))))&&d.push([a(p),a(h)]);return c}case ol:{const d=[],c=i([o,d],s);for(const p of s)(e||!Ki(Br(p)))&&d.push(a(p));return c}}const{message:u}=s;return i([o,{name:l,message:u}],s)};return a},Ru=(e,{json:t,lossy:n}={})=>{const r=[];return uT(!(t||n),!!t,new Map,r)(e),r},Kn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ou(Ru(e,t)):structuredClone(e):(e,t)=>Ou(Ru(e,t));let Ii=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ii.prototype.normal={};Ii.prototype.property={};Ii.prototype.space=void 0;function Zf(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ii(n,r,t)}function gi(e){return e.toLowerCase()}let Et=class{constructor(t,n){this.attribute=n,this.property=t}};Et.prototype.attribute="";Et.prototype.booleanish=!1;Et.prototype.boolean=!1;Et.prototype.commaOrSpaceSeparated=!1;Et.prototype.commaSeparated=!1;Et.prototype.defined=!1;Et.prototype.mustUseProperty=!1;Et.prototype.number=!1;Et.prototype.overloadedBoolean=!1;Et.prototype.property="";Et.prototype.spaceSeparated=!1;Et.prototype.space=void 0;let cT=0;const ge=nr(),Ue=nr(),oo=nr(),Z=nr(),Re=nr(),Tr=nr(),At=nr();function nr(){return 2**++cT}const lo=Object.freeze(Object.defineProperty({__proto__:null,boolean:ge,booleanish:Ue,commaOrSpaceSeparated:At,commaSeparated:Tr,number:Z,overloadedBoolean:oo,spaceSeparated:Re},Symbol.toStringTag,{value:"Module"})),xs=Object.keys(lo);let ll=class extends Et{constructor(t,n,r,i){let a=-1;if(super(t,n),Lu(this,"space",i),typeof r=="number")for(;++a<xs.length;){const s=xs[a];Lu(this,xs[a],(r&lo[s])===lo[s])}}};ll.prototype.defined=!0;function Lu(e,t,n){n&&(e[t]=n)}function Ir(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new ll(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gi(r)]=r,n[gi(a.attribute)]=r}return new Ii(t,n,e.space)}const eh=Ir({properties:{ariaActiveDescendant:null,ariaAtomic:Ue,ariaAutoComplete:null,ariaBusy:Ue,ariaChecked:Ue,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Re,ariaCurrent:null,ariaDescribedBy:Re,ariaDetails:null,ariaDisabled:Ue,ariaDropEffect:Re,ariaErrorMessage:null,ariaExpanded:Ue,ariaFlowTo:Re,ariaGrabbed:Ue,ariaHasPopup:null,ariaHidden:Ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Re,ariaLevel:Z,ariaLive:null,ariaModal:Ue,ariaMultiLine:Ue,ariaMultiSelectable:Ue,ariaOrientation:null,ariaOwns:Re,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:Ue,ariaReadOnly:Ue,ariaRelevant:null,ariaRequired:Ue,ariaRoleDescription:Re,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:Ue,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function th(e,t){return t in e?e[t]:t}function nh(e,t){return th(e,t.toLowerCase())}const dT=Ir({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tr,acceptCharset:Re,accessKey:Re,action:null,allow:null,allowFullScreen:ge,allowPaymentRequest:ge,allowUserMedia:ge,alt:null,as:null,async:ge,autoCapitalize:null,autoComplete:Re,autoFocus:ge,autoPlay:ge,blocking:Re,capture:null,charSet:null,checked:ge,cite:null,className:Re,cols:Z,colSpan:null,content:null,contentEditable:Ue,controls:ge,controlsList:Re,coords:Z|Tr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ge,defer:ge,dir:null,dirName:null,disabled:ge,download:oo,draggable:Ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ge,formTarget:null,headers:Re,height:Z,hidden:oo,high:Z,href:null,hrefLang:null,htmlFor:Re,httpEquiv:Re,id:null,imageSizes:null,imageSrcSet:null,inert:ge,inputMode:null,integrity:null,is:null,isMap:ge,itemId:null,itemProp:Re,itemRef:Re,itemScope:ge,itemType:Re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ge,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:ge,muted:ge,name:null,nonce:null,noModule:ge,noValidate:ge,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:ge,optimum:Z,pattern:null,ping:Re,placeholder:null,playsInline:ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ge,referrerPolicy:null,rel:Re,required:ge,reversed:ge,rows:Z,rowSpan:Z,sandbox:Re,scope:null,scoped:ge,seamless:ge,selected:ge,shadowRootClonable:ge,shadowRootDelegatesFocus:ge,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:Ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:ge,useMap:null,value:Ue,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Re,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ge,declare:ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:ge,noHref:ge,noShade:ge,noWrap:ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:Ue,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ge,disableRemotePlayback:ge,prefix:null,property:null,results:Z,security:null,unselectable:null},space:"html",transform:nh}),fT=Ir({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:At,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Re,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Tr,g2:Tr,glyphName:Tr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:At,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:At,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:At,rev:At,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:At,requiredFeatures:At,requiredFonts:At,requiredFormats:At,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:At,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:At,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:At,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:th}),rh=Ir({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()}}),ih=Ir({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:nh}),ah=Ir({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),hT={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"},pT=/[A-Z]/g,vu=/-[a-z]/g,mT=/^data[-\w.:]+$/i;function ul(e,t){const n=gi(t);let r=t,i=Et;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&mT.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(vu,bT);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!vu.test(a)){let s=a.replace(pT,gT);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ll}return new i(r,t)}function gT(e){return"-"+e.toLowerCase()}function bT(e){return e.charAt(1).toUpperCase()}const Ka=Zf([eh,dT,rh,ih,ah],"html"),Or=Zf([eh,fT,rh,ih,ah],"svg");function Du(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function sh(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Pu=/[#.]/g;function ET(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Pu.lastIndex=i;const o=Pu.exec(n),l=n.slice(i,o?o.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,i+=l.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Mu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function oh(e){return e.join(" ").trim()}function lh(e,t,n){const r=n?_T(n):void 0;function i(a,s,...o){let l;if(a==null){l={type:"root",children:[]};const u=s;o.unshift(u)}else{l=ET(a,t);const u=l.tagName.toLowerCase(),d=r?r.get(u):void 0;if(l.tagName=d||u,TT(s))o.unshift(s);else for(const[c,p]of Object.entries(s))xT(e,l.properties,c,p)}for(const u of o)uo(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function TT(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 a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function xT(e,t,n,r){const i=ul(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Mu(r):i.commaSeparated?a=Du(r):i.commaOrSpaceSeparated?a=Mu(Du(r).join(" ")):a=Bu(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?yT(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(Bu(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function uo(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)uo(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?uo(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Bu(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||gi(n)===gi(t)))return!0}return n}function yT(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function _T(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const kT=["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"],AT=lh(Ka,"div"),CT=lh(Or,"g",kT);function wT(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const l=Fu(t,n[s-1]);o=l===-1?t.length+1:l+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],l=Fu(t,o),u=l===-1?t.length+1:l+1;if(o===u)break;n.push(u)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Fu(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
48
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Vn={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/"},uh={}.hasOwnProperty,ST=Object.prototype;function NT(e,t){const n=t||{};return cl({file:n.file||void 0,location:!1,schema:n.space==="svg"?Or:Ka,verbose:n.verbose||!1},e)}function cl(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},pa(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:ch(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=wT(a),o=s.toPoint(0),l=s.toPoint(a.length);n.position={start:o,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},pa(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},pa(e,r,n),n}default:return n=IT(e,t),n}}function ch(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=cl(e,t[n]);r.push(i)}return r}function IT(e,t){const n=e.schema;e.schema=t.namespaceURI===Vn.svg?Or:Ka;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],l=(o.prefix?o.prefix+":":"")+o.name;uh.call(ST,l)||(i[l]=o.value)}const s=(e.schema.space==="svg"?CT:AT)(t.tagName,i,ch(e,t.childNodes));if(pa(e,t,s),s.tagName==="template"){const o=t,l=o.sourceCodeLocation,u=l&&l.startTag&&mr(l.startTag),d=l&&l.endTag&&mr(l.endTag),c=cl(e,o.content);u&&d&&e.file&&(c.position={start:u.end,end:d.start}),s.content=c}return e.schema=n,s}function pa(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=OT(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function OT(e,t,n){const r=mr(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 a={};let s;if(n.attrs)for(s in n.attrs)uh.call(n.attrs,s)&&(a[ul(e.schema,s).property]=mr(n.attrs[s]));n.startTag;const o=mr(n.startTag),l=n.endTag?mr(n.endTag):void 0,u={opening:o};l&&(u.closing=l),u.properties=a,t.data={position:u}}}return r}function mr(e){const t=Hu({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Hu({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Hu(e){return e.line&&e.column?e:void 0}class Oi{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Oi.prototype.property={};Oi.prototype.normal={};Oi.prototype.space=null;function dh(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 Oi(n,r,t)}function co(e){return e.toLowerCase()}class Ft{constructor(t,n){this.property=t,this.attribute=n}}Ft.prototype.space=null;Ft.prototype.boolean=!1;Ft.prototype.booleanish=!1;Ft.prototype.overloadedBoolean=!1;Ft.prototype.number=!1;Ft.prototype.commaSeparated=!1;Ft.prototype.spaceSeparated=!1;Ft.prototype.commaOrSpaceSeparated=!1;Ft.prototype.mustUseProperty=!1;Ft.prototype.defined=!1;let RT=0;const pe=rr(),je=rr(),fh=rr(),ee=rr(),Le=rr(),xr=rr(),Ct=rr();function rr(){return 2**++RT}const fo=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:je,commaOrSpaceSeparated:Ct,commaSeparated:xr,number:ee,overloadedBoolean:fh,spaceSeparated:Le},Symbol.toStringTag,{value:"Module"})),ys=Object.keys(fo);class dl extends Ft{constructor(t,n,r,i){let a=-1;if(super(t,n),Uu(this,"space",i),typeof r=="number")for(;++a<ys.length;){const s=ys[a];Uu(this,ys[a],(r&fo[s])===fo[s])}}}dl.prototype.defined=!0;function Uu(e,t,n){n&&(e[t]=n)}const LT={}.hasOwnProperty;function Rr(e){const t={},n={};let r;for(r in e.properties)if(LT.call(e.properties,r)){const i=e.properties[r],a=new dl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[co(r)]=r,n[co(a.attribute)]=r}return new Oi(t,n,e.space)}const hh=Rr({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}}),ph=Rr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function mh(e,t){return t in e?e[t]:t}function gh(e,t){return mh(e,t.toLowerCase())}const bh=Rr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:gh,properties:{xmlns:null,xmlnsXLink:null}}),Eh=Rr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:je,ariaAutoComplete:null,ariaBusy:je,ariaChecked:je,ariaColCount:ee,ariaColIndex:ee,ariaColSpan:ee,ariaControls:Le,ariaCurrent:null,ariaDescribedBy:Le,ariaDetails:null,ariaDisabled:je,ariaDropEffect:Le,ariaErrorMessage:null,ariaExpanded:je,ariaFlowTo:Le,ariaGrabbed:je,ariaHasPopup:null,ariaHidden:je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Le,ariaLevel:ee,ariaLive:null,ariaModal:je,ariaMultiLine:je,ariaMultiSelectable:je,ariaOrientation:null,ariaOwns:Le,ariaPlaceholder:null,ariaPosInSet:ee,ariaPressed:je,ariaReadOnly:je,ariaRelevant:null,ariaRequired:je,ariaRoleDescription:Le,ariaRowCount:ee,ariaRowIndex:ee,ariaRowSpan:ee,ariaSelected:je,ariaSetSize:ee,ariaSort:null,ariaValueMax:ee,ariaValueMin:ee,ariaValueNow:ee,ariaValueText:null,role:null}}),vT=Rr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:gh,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xr,acceptCharset:Le,accessKey:Le,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:Le,autoFocus:pe,autoPlay:pe,blocking:Le,capture:null,charSet:null,checked:pe,cite:null,className:Le,cols:ee,colSpan:null,content:null,contentEditable:je,controls:pe,controlsList:Le,coords:ee|xr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:fh,draggable:je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Le,height:ee,hidden:pe,high:ee,href:null,hrefLang:null,htmlFor:Le,httpEquiv:Le,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:Le,itemRef:Le,itemScope:pe,itemType:Le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:ee,manifest:null,max:null,maxLength:ee,media:null,method:null,min:null,minLength:ee,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,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:pe,optimum:ee,pattern:null,ping:Le,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:Le,required:pe,reversed:pe,rows:ee,rowSpan:ee,sandbox:Le,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:ee,sizes:null,slot:null,span:ee,spellCheck:je,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ee,step:null,style:null,tabIndex:ee,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:je,width:ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Le,axis:null,background:null,bgColor:null,border:ee,borderColor:null,bottomMargin:ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:ee,leftMargin:ee,link:null,longDesc:null,lowSrc:null,marginHeight:ee,marginWidth:ee,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:ee,rules:null,scheme:null,scrolling:je,standby:null,summary:null,text:null,topMargin:ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:ee,security:null,unselectable:null}}),DT=Rr({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:mh,properties:{about:Ct,accentHeight:ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ee,amplitude:ee,arabicForm:null,ascent:ee,attributeName:null,attributeType:null,azimuth:ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ee,by:null,calcMode:null,capHeight:ee,className:Le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ee,diffuseConstant:ee,direction:null,display:null,dur:null,divisor:ee,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ee,enableBackground:null,end:null,event:null,exponent:ee,externalResourcesRequired:null,fill:null,fillOpacity:ee,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:xr,g2:xr,glyphName:xr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ee,horizOriginX:ee,horizOriginY:ee,id:null,ideographic:ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ee,k:ee,k1:ee,k2:ee,k3:ee,k4:ee,kernelMatrix:Ct,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ee,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:ee,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:ee,overlineThickness:ee,paintOrder:null,panose1:null,path:null,pathLength:ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ee,pointsAtY:ee,pointsAtZ:ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ct,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ct,rev:Ct,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ct,requiredFeatures:Ct,requiredFonts:Ct,requiredFormats:Ct,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ee,specularExponent:ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ee,strikethroughThickness:ee,string:null,stroke:null,strokeDashArray:Ct,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ee,strokeOpacity:ee,strokeWidth:null,style:null,surfaceScale:ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ct,tabIndex:ee,tableValues:null,target:null,targetX:ee,targetY:ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ct,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ee,underlineThickness:ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ee,values:null,vAlphabetic:ee,vMathematical:ee,vectorEffect:null,vHanging:ee,vIdeographic:ee,version:null,vertAdvY:ee,vertOriginX:ee,vertOriginY:ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),PT=/^data[-\w.:]+$/i,ju=/-[a-z]/g,MT=/[A-Z]/g;function BT(e,t){const n=co(t);let r=t,i=Ft;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&PT.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ju,HT);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ju.test(a)){let s=a.replace(MT,FT);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=dl}return new i(r,t)}function FT(e){return"-"+e.toLowerCase()}function HT(e){return e.charAt(1).toUpperCase()}const UT=dh([ph,hh,bh,Eh,vT],"html"),Th=dh([ph,hh,bh,Eh,DT],"svg"),zu={}.hasOwnProperty;function xh(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&zu.call(i,e)){const l=String(i[e]);s=zu.call(o,l)?o[l]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const jT={},zT={}.hasOwnProperty,yh=xh("type",{handlers:{root:VT,element:KT,text:qT,comment:GT,doctype:YT}});function $T(e,t){const r=(t||jT).space;return yh(e,r==="svg"?Th:UT)}function VT(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=fl(e.children,n,t),Lr(e,n),n}function WT(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=fl(e.children,n,t),Lr(e,n),n}function YT(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Lr(e,t),t}function qT(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Lr(e,t),t}function GT(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Lr(e,t),t}function KT(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Th);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&zT.call(e.properties,a)){const l=XT(r,a,e.properties[a]);l&&i.push(l)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Vn[s],childNodes:[],parentNode:null};return o.childNodes=fl(e.children,o,r),Lr(e,o),e.tagName==="template"&&e.content&&(o.content=WT(e.content,r)),o}function XT(e,t,n){const r=BT(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?sh(n):oh(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Vn[r.space]}return i}function fl(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=yh(e[r],n);a.parentNode=t,i.push(a)}return i}function Lr(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 QT=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],JT=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]),De="�";var x;(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"})(x||(x={}));const pt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function _h(e){return e>=55296&&e<=57343}function ZT(e){return e>=56320&&e<=57343}function ex(e,t){return(e-55296)*1024+9216+t}function kh(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ah(e){return e>=64976&&e<=65007||JT.has(e)}var $;(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"})($||($={}));const tx=65536;class nx{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=tx,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:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,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(ZT(n))return this.pos++,this._addGap(),ex(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,x.EOF;return this._err($.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,x.EOF;const r=this.html.charCodeAt(n);return r===x.CARRIAGE_RETURN?x.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,x.EOF;let t=this.html.charCodeAt(this.pos);return t===x.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,x.LINE_FEED):t===x.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,_h(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===x.LINE_FEED||t===x.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){kh(t)?this._err($.controlCharacterInInputStream):Ah(t)&&this._err($.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var xe;(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"})(xe||(xe={}));function Ch(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 rx=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))),ix=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 ax(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=ix.get(e))!==null&&t!==void 0?t:e}var Ke;(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"})(Ke||(Ke={}));const sx=32;var Nn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Nn||(Nn={}));function ho(e){return e>=Ke.ZERO&&e<=Ke.NINE}function ox(e){return e>=Ke.UPPER_A&&e<=Ke.UPPER_F||e>=Ke.LOWER_A&&e<=Ke.LOWER_F}function lx(e){return e>=Ke.UPPER_A&&e<=Ke.UPPER_Z||e>=Ke.LOWER_A&&e<=Ke.LOWER_Z||ho(e)}function ux(e){return e===Ke.EQUALS||lx(e)}var qe;(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"})(qe||(qe={}));var fn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(fn||(fn={}));class cx{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=qe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=fn.Strict}startEntity(t){this.decodeMode=t,this.state=qe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case qe.EntityStart:return t.charCodeAt(n)===Ke.NUM?(this.state=qe.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=qe.NamedEntity,this.stateNamedEntity(t,n));case qe.NumericStart:return this.stateNumericStart(t,n);case qe.NumericDecimal:return this.stateNumericDecimal(t,n);case qe.NumericHex:return this.stateNumericHex(t,n);case qe.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|sx)===Ke.LOWER_X?(this.state=qe.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=qe.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ho(i)||ox(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(ho(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===Ke.SEMI)this.consumed+=1;else if(this.decodeMode===fn.Strict)return 0;return this.emitCodePoint(ax(this.result),this.consumed),this.errors&&(t!==Ke.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&Nn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=dx(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===fn.Attribute&&(a===0||ux(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&Nn.VALUE_LENGTH)>>14,a!==0){if(s===Ke.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==fn.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]&Nn.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]&~Nn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case qe.NamedEntity:return this.result!==0&&(this.decodeMode!==fn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case qe.NumericDecimal:return this.emitNumericEntity(0,2);case qe.NumericHex:return this.emitNumericEntity(0,3);case qe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case qe.EntityStart:return 0}}}function dx(e,t,n,r){const i=(t&Nn.BRANCH_LENGTH)>>7,a=t&Nn.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const l=r-a;return l<0||l>=i?-1:e[n+l]-1}let s=n,o=s+i-1;for(;s<=o;){const l=s+o>>>1,u=e[l];if(u<r)s=l+1;else if(u>r)o=l-1;else return e[l+i]}return-1}var G;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(G||(G={}));var Wn;(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"})(Wn||(Wn={}));var Lt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Lt||(Lt={}));var M;(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"})(M||(M={}));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 fx=new Map([[M.A,f.A],[M.ADDRESS,f.ADDRESS],[M.ANNOTATION_XML,f.ANNOTATION_XML],[M.APPLET,f.APPLET],[M.AREA,f.AREA],[M.ARTICLE,f.ARTICLE],[M.ASIDE,f.ASIDE],[M.B,f.B],[M.BASE,f.BASE],[M.BASEFONT,f.BASEFONT],[M.BGSOUND,f.BGSOUND],[M.BIG,f.BIG],[M.BLOCKQUOTE,f.BLOCKQUOTE],[M.BODY,f.BODY],[M.BR,f.BR],[M.BUTTON,f.BUTTON],[M.CAPTION,f.CAPTION],[M.CENTER,f.CENTER],[M.CODE,f.CODE],[M.COL,f.COL],[M.COLGROUP,f.COLGROUP],[M.DD,f.DD],[M.DESC,f.DESC],[M.DETAILS,f.DETAILS],[M.DIALOG,f.DIALOG],[M.DIR,f.DIR],[M.DIV,f.DIV],[M.DL,f.DL],[M.DT,f.DT],[M.EM,f.EM],[M.EMBED,f.EMBED],[M.FIELDSET,f.FIELDSET],[M.FIGCAPTION,f.FIGCAPTION],[M.FIGURE,f.FIGURE],[M.FONT,f.FONT],[M.FOOTER,f.FOOTER],[M.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[M.FORM,f.FORM],[M.FRAME,f.FRAME],[M.FRAMESET,f.FRAMESET],[M.H1,f.H1],[M.H2,f.H2],[M.H3,f.H3],[M.H4,f.H4],[M.H5,f.H5],[M.H6,f.H6],[M.HEAD,f.HEAD],[M.HEADER,f.HEADER],[M.HGROUP,f.HGROUP],[M.HR,f.HR],[M.HTML,f.HTML],[M.I,f.I],[M.IMG,f.IMG],[M.IMAGE,f.IMAGE],[M.INPUT,f.INPUT],[M.IFRAME,f.IFRAME],[M.KEYGEN,f.KEYGEN],[M.LABEL,f.LABEL],[M.LI,f.LI],[M.LINK,f.LINK],[M.LISTING,f.LISTING],[M.MAIN,f.MAIN],[M.MALIGNMARK,f.MALIGNMARK],[M.MARQUEE,f.MARQUEE],[M.MATH,f.MATH],[M.MENU,f.MENU],[M.META,f.META],[M.MGLYPH,f.MGLYPH],[M.MI,f.MI],[M.MO,f.MO],[M.MN,f.MN],[M.MS,f.MS],[M.MTEXT,f.MTEXT],[M.NAV,f.NAV],[M.NOBR,f.NOBR],[M.NOFRAMES,f.NOFRAMES],[M.NOEMBED,f.NOEMBED],[M.NOSCRIPT,f.NOSCRIPT],[M.OBJECT,f.OBJECT],[M.OL,f.OL],[M.OPTGROUP,f.OPTGROUP],[M.OPTION,f.OPTION],[M.P,f.P],[M.PARAM,f.PARAM],[M.PLAINTEXT,f.PLAINTEXT],[M.PRE,f.PRE],[M.RB,f.RB],[M.RP,f.RP],[M.RT,f.RT],[M.RTC,f.RTC],[M.RUBY,f.RUBY],[M.S,f.S],[M.SCRIPT,f.SCRIPT],[M.SEARCH,f.SEARCH],[M.SECTION,f.SECTION],[M.SELECT,f.SELECT],[M.SOURCE,f.SOURCE],[M.SMALL,f.SMALL],[M.SPAN,f.SPAN],[M.STRIKE,f.STRIKE],[M.STRONG,f.STRONG],[M.STYLE,f.STYLE],[M.SUB,f.SUB],[M.SUMMARY,f.SUMMARY],[M.SUP,f.SUP],[M.TABLE,f.TABLE],[M.TBODY,f.TBODY],[M.TEMPLATE,f.TEMPLATE],[M.TEXTAREA,f.TEXTAREA],[M.TFOOT,f.TFOOT],[M.TD,f.TD],[M.TH,f.TH],[M.THEAD,f.THEAD],[M.TITLE,f.TITLE],[M.TR,f.TR],[M.TRACK,f.TRACK],[M.TT,f.TT],[M.U,f.U],[M.UL,f.UL],[M.SVG,f.SVG],[M.VAR,f.VAR],[M.WBR,f.WBR],[M.XMP,f.XMP]]);function vr(e){var t;return(t=fx.get(e))!==null&&t!==void 0?t:f.UNKNOWN}const X=f,hx={[G.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[G.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[G.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[G.XLINK]:new Set,[G.XML]:new Set,[G.XMLNS]:new Set},po=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);M.STYLE,M.SCRIPT,M.XMP,M.IFRAME,M.NOEMBED,M.NOFRAMES,M.PLAINTEXT;var A;(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"})(A||(A={}));const Fe={DATA:A.DATA,RCDATA:A.RCDATA,RAWTEXT:A.RAWTEXT,SCRIPT_DATA:A.SCRIPT_DATA,PLAINTEXT:A.PLAINTEXT,CDATA_SECTION:A.CDATA_SECTION};function px(e){return e>=x.DIGIT_0&&e<=x.DIGIT_9}function Jr(e){return e>=x.LATIN_CAPITAL_A&&e<=x.LATIN_CAPITAL_Z}function mx(e){return e>=x.LATIN_SMALL_A&&e<=x.LATIN_SMALL_Z}function An(e){return mx(e)||Jr(e)}function $u(e){return An(e)||px(e)}function Xi(e){return e+32}function wh(e){return e===x.SPACE||e===x.LINE_FEED||e===x.TABULATION||e===x.FORM_FEED}function Vu(e){return wh(e)||e===x.SOLIDUS||e===x.GREATER_THAN_SIGN}function gx(e){return e===x.NULL?$.nullCharacterReference:e>1114111?$.characterReferenceOutsideUnicodeRange:_h(e)?$.surrogateCharacterReference:Ah(e)?$.noncharacterCharacterReference:kh(e)||e===x.CARRIAGE_RETURN?$.controlCharacterReference:null}class bx{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=A.DATA,this.returnState=A.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new nx(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new cx(rx,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err($.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err($.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=gx(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:xe.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:xe.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:xe.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(Ch(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($.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=vr(t.tagName),t.type===xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err($.endTagWithAttributes),t.selfClosing&&this._err($.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 xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case xe.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:xe.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=wh(t)?xe.WHITESPACE_CHARACTER:t===x.NULL?xe.NULL_CHARACTER:xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=A.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?fn.Attribute:fn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===A.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case A.DATA:{this._stateData(t);break}case A.RCDATA:{this._stateRcdata(t);break}case A.RAWTEXT:{this._stateRawtext(t);break}case A.SCRIPT_DATA:{this._stateScriptData(t);break}case A.PLAINTEXT:{this._statePlaintext(t);break}case A.TAG_OPEN:{this._stateTagOpen(t);break}case A.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case A.TAG_NAME:{this._stateTagName(t);break}case A.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case A.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case A.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case A.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case A.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case A.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case A.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case A.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case A.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case A.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case A.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case A.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case A.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case A.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case A.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case A.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case A.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case A.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case A.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case A.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case A.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case A.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case A.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case A.BOGUS_COMMENT:{this._stateBogusComment(t);break}case A.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case A.COMMENT_START:{this._stateCommentStart(t);break}case A.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case A.COMMENT:{this._stateComment(t);break}case A.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case A.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case A.COMMENT_END:{this._stateCommentEnd(t);break}case A.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case A.DOCTYPE:{this._stateDoctype(t);break}case A.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case A.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case A.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case A.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case A.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case A.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case A.CDATA_SECTION:{this._stateCdataSection(t);break}case A.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case A.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case A.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case A.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case x.LESS_THAN_SIGN:{this.state=A.TAG_OPEN;break}case x.AMPERSAND:{this._startCharacterReference();break}case x.NULL:{this._err($.unexpectedNullCharacter),this._emitCodePoint(t);break}case x.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case x.AMPERSAND:{this._startCharacterReference();break}case x.LESS_THAN_SIGN:{this.state=A.RCDATA_LESS_THAN_SIGN;break}case x.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case x.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case x.LESS_THAN_SIGN:{this.state=A.RAWTEXT_LESS_THAN_SIGN;break}case x.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case x.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case x.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_LESS_THAN_SIGN;break}case x.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case x.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case x.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case x.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(An(t))this._createStartTagToken(),this.state=A.TAG_NAME,this._stateTagName(t);else switch(t){case x.EXCLAMATION_MARK:{this.state=A.MARKUP_DECLARATION_OPEN;break}case x.SOLIDUS:{this.state=A.END_TAG_OPEN;break}case x.QUESTION_MARK:{this._err($.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t);break}case x.EOF:{this._err($.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err($.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=A.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(An(t))this._createEndTagToken(),this.state=A.TAG_NAME,this._stateTagName(t);else switch(t){case x.GREATER_THAN_SIGN:{this._err($.missingEndTagName),this.state=A.DATA;break}case x.EOF:{this._err($.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err($.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:{this.state=A.BEFORE_ATTRIBUTE_NAME;break}case x.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case x.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case x.NULL:{this._err($.unexpectedNullCharacter),n.tagName+=De;break}case x.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Jr(t)?Xi(t):t)}}_stateRcdataLessThanSign(t){t===x.SOLIDUS?this.state=A.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){An(t)?(this.state=A.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=A.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 x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=A.BEFORE_ATTRIBUTE_NAME,!1;case x.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=A.SELF_CLOSING_START_TAG,!1;case x.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=A.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===x.SOLIDUS?this.state=A.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){An(t)?(this.state=A.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case x.SOLIDUS:{this.state=A.SCRIPT_DATA_END_TAG_OPEN;break}case x.EXCLAMATION_MARK:{this.state=A.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=A.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){An(t)?(this.state=A.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===x.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===x.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case x.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case x.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case x.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case x.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case x.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case x.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case x.NULL:{this._err($.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars(De);break}case x.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case x.HYPHEN_MINUS:{this._emitChars("-");break}case x.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case x.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case x.NULL:{this._err($.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars(De);break}case x.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===x.SOLIDUS?this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:An(t)?(this._emitChars("<"),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){An(t)?(this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(pt.SCRIPT,!1)&&Vu(this.preprocessor.peek(pt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case x.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case x.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case x.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case x.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case x.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case x.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case x.NULL:{this._err($.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(De);break}case x.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case x.HYPHEN_MINUS:{this._emitChars("-");break}case x.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case x.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case x.NULL:{this._err($.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(De);break}case x.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===x.SOLIDUS?(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(pt.SCRIPT,!1)&&Vu(this.preprocessor.peek(pt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:break;case x.SOLIDUS:case x.GREATER_THAN_SIGN:case x.EOF:{this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case x.EQUALS_SIGN:{this._err($.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=A.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:case x.SOLIDUS:case x.GREATER_THAN_SIGN:case x.EOF:{this._leaveAttrName(),this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case x.EQUALS_SIGN:{this._leaveAttrName(),this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case x.QUOTATION_MARK:case x.APOSTROPHE:case x.LESS_THAN_SIGN:{this._err($.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case x.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.name+=De;break}default:this.currentAttr.name+=String.fromCodePoint(Jr(t)?Xi(t):t)}}_stateAfterAttributeName(t){switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:break;case x.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case x.EQUALS_SIGN:{this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case x.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case x.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:break;case x.QUOTATION_MARK:{this.state=A.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case x.APOSTROPHE:{this.state=A.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case x.GREATER_THAN_SIGN:{this._err($.missingAttributeValue),this.state=A.DATA,this.emitCurrentTagToken();break}default:this.state=A.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case x.QUOTATION_MARK:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case x.AMPERSAND:{this._startCharacterReference();break}case x.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=De;break}case x.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case x.APOSTROPHE:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case x.AMPERSAND:{this._startCharacterReference();break}case x.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=De;break}case x.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case x.AMPERSAND:{this._startCharacterReference();break}case x.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case x.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=De;break}case x.QUOTATION_MARK:case x.APOSTROPHE:case x.LESS_THAN_SIGN:case x.EQUALS_SIGN:case x.GRAVE_ACCENT:{this._err($.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case x.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case x.SOLIDUS:{this._leaveAttrValue(),this.state=A.SELF_CLOSING_START_TAG;break}case x.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case x.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._err($.missingWhitespaceBetweenAttributes),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case x.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=A.DATA,this.emitCurrentTagToken();break}case x.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._err($.unexpectedSolidusInTag),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case x.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case x.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case x.NULL:{this._err($.unexpectedNullCharacter),n.data+=De;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(pt.DASH_DASH,!0)?(this._createCommentToken(pt.DASH_DASH.length+1),this.state=A.COMMENT_START):this._consumeSequenceIfMatch(pt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(pt.DOCTYPE.length+1),this.state=A.DOCTYPE):this._consumeSequenceIfMatch(pt.CDATA_START,!0)?this.inForeignNode?this.state=A.CDATA_SECTION:(this._err($.cdataInHtmlContent),this._createCommentToken(pt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=A.BOGUS_COMMENT):this._ensureHibernation()||(this._err($.incorrectlyOpenedComment),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case x.HYPHEN_MINUS:{this.state=A.COMMENT_START_DASH;break}case x.GREATER_THAN_SIGN:{this._err($.abruptClosingOfEmptyComment),this.state=A.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=A.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case x.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case x.GREATER_THAN_SIGN:{this._err($.abruptClosingOfEmptyComment),this.state=A.DATA,this.emitCurrentComment(n);break}case x.EOF:{this._err($.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case x.HYPHEN_MINUS:{this.state=A.COMMENT_END_DASH;break}case x.LESS_THAN_SIGN:{n.data+="<",this.state=A.COMMENT_LESS_THAN_SIGN;break}case x.NULL:{this._err($.unexpectedNullCharacter),n.data+=De;break}case x.EOF:{this._err($.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case x.EXCLAMATION_MARK:{n.data+="!",this.state=A.COMMENT_LESS_THAN_SIGN_BANG;break}case x.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=A.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===x.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=A.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===x.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=A.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==x.GREATER_THAN_SIGN&&t!==x.EOF&&this._err($.nestedComment),this.state=A.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case x.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case x.EOF:{this._err($.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case x.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case x.EXCLAMATION_MARK:{this.state=A.COMMENT_END_BANG;break}case x.HYPHEN_MINUS:{n.data+="-";break}case x.EOF:{this._err($.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=A.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case x.HYPHEN_MINUS:{n.data+="--!",this.state=A.COMMENT_END_DASH;break}case x.GREATER_THAN_SIGN:{this._err($.incorrectlyClosedComment),this.state=A.DATA,this.emitCurrentComment(n);break}case x.EOF:{this._err($.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=A.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_NAME;break}case x.GREATER_THAN_SIGN:{this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case x.EOF:{this._err($.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingWhitespaceBeforeDoctypeName),this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Jr(t))this._createDoctypeToken(String.fromCharCode(Xi(t))),this.state=A.DOCTYPE_NAME;else switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:break;case x.NULL:{this._err($.unexpectedNullCharacter),this._createDoctypeToken(De),this.state=A.DOCTYPE_NAME;break}case x.GREATER_THAN_SIGN:{this._err($.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case x.EOF:{this._err($.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=A.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:{this.state=A.AFTER_DOCTYPE_NAME;break}case x.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case x.NULL:{this._err($.unexpectedNullCharacter),n.name+=De;break}case x.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Jr(t)?Xi(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:break;case x.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case x.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(pt.PUBLIC,!1)?this.state=A.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(pt.SYSTEM,!1)?this.state=A.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err($.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case x.QUOTATION_MARK:{this._err($.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case x.APOSTROPHE:{this._err($.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case x.GREATER_THAN_SIGN:{this._err($.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case x.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:break;case x.QUOTATION_MARK:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case x.APOSTROPHE:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case x.GREATER_THAN_SIGN:{this._err($.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case x.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case x.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case x.NULL:{this._err($.unexpectedNullCharacter),n.publicId+=De;break}case x.GREATER_THAN_SIGN:{this._err($.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case x.EOF:{this._err($.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 x.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case x.NULL:{this._err($.unexpectedNullCharacter),n.publicId+=De;break}case x.GREATER_THAN_SIGN:{this._err($.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case x.EOF:{this._err($.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 x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:{this.state=A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case x.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case x.QUOTATION_MARK:{this._err($.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case x.APOSTROPHE:{this._err($.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case x.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:break;case x.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case x.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case x.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case x.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case x.QUOTATION_MARK:{this._err($.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case x.APOSTROPHE:{this._err($.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case x.GREATER_THAN_SIGN:{this._err($.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case x.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:break;case x.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case x.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case x.GREATER_THAN_SIGN:{this._err($.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case x.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case x.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case x.NULL:{this._err($.unexpectedNullCharacter),n.systemId+=De;break}case x.GREATER_THAN_SIGN:{this._err($.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case x.EOF:{this._err($.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 x.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case x.NULL:{this._err($.unexpectedNullCharacter),n.systemId+=De;break}case x.GREATER_THAN_SIGN:{this._err($.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case x.EOF:{this._err($.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 x.SPACE:case x.LINE_FEED:case x.TABULATION:case x.FORM_FEED:break;case x.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case x.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case x.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case x.NULL:{this._err($.unexpectedNullCharacter);break}case x.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case x.RIGHT_SQUARE_BRACKET:{this.state=A.CDATA_SECTION_BRACKET;break}case x.EOF:{this._err($.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===x.RIGHT_SQUARE_BRACKET?this.state=A.CDATA_SECTION_END:(this._emitChars("]"),this.state=A.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case x.GREATER_THAN_SIGN:{this.state=A.DATA;break}case x.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=A.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(x.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&$u(this.preprocessor.peek(1))?A.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){$u(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===x.SEMICOLON&&this._err($.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Sh=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),Wu=new Set([...Sh,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),Na=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),Ex=new Set([...Na,f.OL,f.UL]),Tx=new Set([...Na,f.BUTTON]),Yu=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),qu=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),xx=new Set([f.TR,f.TEMPLATE,f.HTML]),yx=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),_x=new Set([f.TABLE,f.TEMPLATE,f.HTML]),kx=new Set([f.TD,f.TH]);class Ax{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)===G.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const 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])!==G.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(po,G.HTML)}popUntilTableCellPopped(){this.popUntilPopped(kx,G.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(_x,G.HTML)}clearBackToTableBodyContext(){this.clearBackTo(yx,G.HTML)}clearBackToTableRowContext(){this.clearBackTo(xx,G.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===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 G.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case G.SVG:{if(qu.has(i))return!1;break}case G.MATHML:{if(Yu.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Na)}hasInListItemScope(t){return this.hasInDynamicScope(t,Ex)}hasInButtonScope(t){return this.hasInDynamicScope(t,Tx)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case G.HTML:{if(po.has(n))return!0;if(Na.has(n))return!1;break}case G.SVG:{if(qu.has(n))return!1;break}case G.MATHML:{if(Yu.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===G.HTML)switch(this.tagIDs[n]){case t:return!0;case 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])===G.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])===G.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&&Sh.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Wu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Wu.has(this.currentTagId);)this.pop()}}const _s=3;var Jt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Jt||(Jt={}));const Gu={type:Jt.Marker};class Cx{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Jt.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===a&&this.treeAdapter.getNamespaceURI(u)===s){const d=this.treeAdapter.getAttrList(u);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<_s)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<_s)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(l=>i.get(l.name)===l.value)&&(a+=1,a>=_s&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Gu)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Jt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Jt.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(Gu);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Jt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Jt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Jt.Element&&n.element===t)}}const Cn={createDocument(){return{nodeName:"#document",mode:Lt.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(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Cn.appendChild(e,a)}},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(Cn.isTextNode(n)){n.value+=t;return}}Cn.appendChild(e,Cn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Cn.isTextNode(r)?r.value+=t:Cn.insertBefore(e,Cn.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}}},Nh="html",wx="about:legacy-compat",Sx="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Ih=["+//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//"],Nx=[...Ih,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Ix=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Oh=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Ox=[...Oh,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ku(e,t){return t.some(n=>e.startsWith(n))}function Rx(e){return e.name===Nh&&e.publicId===null&&(e.systemId===null||e.systemId===wx)}function Lx(e){if(e.name!==Nh)return Lt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Sx)return Lt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Ix.has(n))return Lt.QUIRKS;let r=t===null?Nx:Ih;if(Ku(n,r))return Lt.QUIRKS;if(r=t===null?Oh:Ox,Ku(n,r))return Lt.LIMITED_QUIRKS}return Lt.NO_QUIRKS}const Xu={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},vx="definitionurl",Dx="definitionURL",Px=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])),Mx=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:G.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:G.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:G.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:G.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:G.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:G.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:G.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:G.XML}],["xml:space",{prefix:"xml",name:"space",namespace:G.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:G.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:G.XMLNS}]]),Bx=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])),Fx=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 Hx(e){const t=e.tagID;return t===f.FONT&&e.attrs.some(({name:r})=>r===Wn.COLOR||r===Wn.SIZE||r===Wn.FACE)||Fx.has(t)}function Rh(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===vx){e.attrs[t].name=Dx;break}}function Lh(e){for(let t=0;t<e.attrs.length;t++){const n=Px.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function hl(e){for(let t=0;t<e.attrs.length;t++){const n=Mx.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 Ux(e){const t=Bx.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=vr(e.tagName))}function jx(e,t){return t===G.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}function zx(e,t,n){if(t===G.MATHML&&e===f.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Wn.ENCODING){const i=n[r].value.toLowerCase();return i===Xu.TEXT_HTML||i===Xu.APPLICATION_XML}}return t===G.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}function $x(e,t,n,r){return(!r||r===G.HTML)&&zx(e,t,n)||(!r||r===G.MATHML)&&jx(e,t)}const Vx="hidden",Wx=8,Yx=3;var S;(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"})(S||(S={}));const qx={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},vh=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),Qu={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Cn,onParseError:null};class Ju{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=S.INITIAL,this.originalInsertionMode=S.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={...Qu,...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 bx(this.options,this),this.activeFormattingElements=new Cx(this.treeAdapter),this.fragmentContextID=r?vr(this.treeAdapter.getTagName(r)):f.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Ax(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={...Qu,...n};t??(t=r.treeAdapter.createElement(M.TEMPLATE,G.HTML,[]));const i=r.treeAdapter.createElement("documentmock",G.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===f.TEMPLATE&&a.tmplInsertionModeStack.unshift(S.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}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 a=(i=t.location)!==null&&i!==void 0?i:qx,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.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 a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===G.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,G.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=S.TEXT}switchToPlaintextParsing(){this.insertionMode=S.TEXT,this.originalInsertionMode=S.IN_BODY,this.tokenizer.state=Fe.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)===M.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==G.HTML))switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:{this.tokenizer.state=Fe.RCDATA;break}case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:{this.tokenizer.state=Fe.RAWTEXT;break}case f.SCRIPT:{this.tokenizer.state=Fe.SCRIPT_DATA;break}case f.PLAINTEXT:{this.tokenizer.state=Fe.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 s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,G.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,G.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(M.HTML,G.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),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:l,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,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),a=n.type===xe.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,a)}}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)===M.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===G.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===f.MGLYPH||t.tagID===f.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,G.HTML)}_processToken(t){switch(t.type){case xe.CHARACTER:{this.onCharacter(t);break}case xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case xe.COMMENT:{this.onComment(t);break}case xe.DOCTYPE:{this.onDoctype(t);break}case xe.START_TAG:{this._processStartTag(t);break}case xe.END_TAG:{this.onEndTag(t);break}case xe.EOF:{this.onEof(t);break}case xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return $x(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Jt.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=S.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=S.IN_ROW;return}case f.TBODY:case f.THEAD:case f.TFOOT:{this.insertionMode=S.IN_TABLE_BODY;return}case f.CAPTION:{this.insertionMode=S.IN_CAPTION;return}case f.COLGROUP:{this.insertionMode=S.IN_COLUMN_GROUP;return}case f.TABLE:{this.insertionMode=S.IN_TABLE;return}case f.BODY:{this.insertionMode=S.IN_BODY;return}case f.FRAMESET:{this.insertionMode=S.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?S.AFTER_HEAD:S.BEFORE_HEAD;return}case f.TD:case f.TH:{if(t>0){this.insertionMode=S.IN_CELL;return}break}case f.HEAD:{if(t>0){this.insertionMode=S.IN_HEAD;return}break}}this.insertionMode=S.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=S.IN_SELECT_IN_TABLE;return}}this.insertionMode=S.IN_SELECT}_isElementCausesFosterParenting(t){return vh.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)===G.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 hx[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){k2(this,t);return}switch(this.insertionMode){case S.INITIAL:{Fr(this,t);break}case S.BEFORE_HTML:{ri(this,t);break}case S.BEFORE_HEAD:{ii(this,t);break}case S.IN_HEAD:{ai(this,t);break}case S.IN_HEAD_NO_SCRIPT:{si(this,t);break}case S.AFTER_HEAD:{oi(this,t);break}case S.IN_BODY:case S.IN_CAPTION:case S.IN_CELL:case S.IN_TEMPLATE:{Ph(this,t);break}case S.TEXT:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case S.IN_TABLE:case S.IN_TABLE_BODY:case S.IN_ROW:{ks(this,t);break}case S.IN_TABLE_TEXT:{jh(this,t);break}case S.IN_COLUMN_GROUP:{Ia(this,t);break}case S.AFTER_BODY:{Oa(this,t);break}case S.AFTER_AFTER_BODY:{ma(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){_2(this,t);return}switch(this.insertionMode){case S.INITIAL:{Fr(this,t);break}case S.BEFORE_HTML:{ri(this,t);break}case S.BEFORE_HEAD:{ii(this,t);break}case S.IN_HEAD:{ai(this,t);break}case S.IN_HEAD_NO_SCRIPT:{si(this,t);break}case S.AFTER_HEAD:{oi(this,t);break}case S.TEXT:{this._insertCharacters(t);break}case S.IN_TABLE:case S.IN_TABLE_BODY:case S.IN_ROW:{ks(this,t);break}case S.IN_COLUMN_GROUP:{Ia(this,t);break}case S.AFTER_BODY:{Oa(this,t);break}case S.AFTER_AFTER_BODY:{ma(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){mo(this,t);return}switch(this.insertionMode){case S.INITIAL:case S.BEFORE_HTML:case S.BEFORE_HEAD:case S.IN_HEAD:case S.IN_HEAD_NO_SCRIPT:case S.AFTER_HEAD:case S.IN_BODY:case S.IN_TABLE:case S.IN_CAPTION:case S.IN_COLUMN_GROUP:case S.IN_TABLE_BODY:case S.IN_ROW:case S.IN_CELL:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:case S.IN_TEMPLATE:case S.IN_FRAMESET:case S.AFTER_FRAMESET:{mo(this,t);break}case S.IN_TABLE_TEXT:{Hr(this,t);break}case S.AFTER_BODY:{ey(this,t);break}case S.AFTER_AFTER_BODY:case S.AFTER_AFTER_FRAMESET:{ty(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case S.INITIAL:{ny(this,t);break}case S.BEFORE_HEAD:case S.IN_HEAD:case S.IN_HEAD_NO_SCRIPT:case S.AFTER_HEAD:{this._err(t,$.misplacedDoctype);break}case S.IN_TABLE_TEXT:{Hr(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,$.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?A2(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case S.INITIAL:{Fr(this,t);break}case S.BEFORE_HTML:{ry(this,t);break}case S.BEFORE_HEAD:{ay(this,t);break}case S.IN_HEAD:{Yt(this,t);break}case S.IN_HEAD_NO_SCRIPT:{ly(this,t);break}case S.AFTER_HEAD:{cy(this,t);break}case S.IN_BODY:{at(this,t);break}case S.IN_TABLE:{Cr(this,t);break}case S.IN_TABLE_TEXT:{Hr(this,t);break}case S.IN_CAPTION:{s2(this,t);break}case S.IN_COLUMN_GROUP:{gl(this,t);break}case S.IN_TABLE_BODY:{Ja(this,t);break}case S.IN_ROW:{Za(this,t);break}case S.IN_CELL:{u2(this,t);break}case S.IN_SELECT:{Vh(this,t);break}case S.IN_SELECT_IN_TABLE:{d2(this,t);break}case S.IN_TEMPLATE:{h2(this,t);break}case S.AFTER_BODY:{m2(this,t);break}case S.IN_FRAMESET:{g2(this,t);break}case S.AFTER_FRAMESET:{E2(this,t);break}case S.AFTER_AFTER_BODY:{x2(this,t);break}case S.AFTER_AFTER_FRAMESET:{y2(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?C2(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case S.INITIAL:{Fr(this,t);break}case S.BEFORE_HTML:{iy(this,t);break}case S.BEFORE_HEAD:{sy(this,t);break}case S.IN_HEAD:{oy(this,t);break}case S.IN_HEAD_NO_SCRIPT:{uy(this,t);break}case S.AFTER_HEAD:{dy(this,t);break}case S.IN_BODY:{Qa(this,t);break}case S.TEXT:{Xy(this,t);break}case S.IN_TABLE:{bi(this,t);break}case S.IN_TABLE_TEXT:{Hr(this,t);break}case S.IN_CAPTION:{o2(this,t);break}case S.IN_COLUMN_GROUP:{l2(this,t);break}case S.IN_TABLE_BODY:{go(this,t);break}case S.IN_ROW:{$h(this,t);break}case S.IN_CELL:{c2(this,t);break}case S.IN_SELECT:{Wh(this,t);break}case S.IN_SELECT_IN_TABLE:{f2(this,t);break}case S.IN_TEMPLATE:{p2(this,t);break}case S.AFTER_BODY:{qh(this,t);break}case S.IN_FRAMESET:{b2(this,t);break}case S.AFTER_FRAMESET:{T2(this,t);break}case S.AFTER_AFTER_BODY:{ma(this,t);break}}}onEof(t){switch(this.insertionMode){case S.INITIAL:{Fr(this,t);break}case S.BEFORE_HTML:{ri(this,t);break}case S.BEFORE_HEAD:{ii(this,t);break}case S.IN_HEAD:{ai(this,t);break}case S.IN_HEAD_NO_SCRIPT:{si(this,t);break}case S.AFTER_HEAD:{oi(this,t);break}case S.IN_BODY:case S.IN_TABLE:case S.IN_CAPTION:case S.IN_COLUMN_GROUP:case S.IN_TABLE_BODY:case S.IN_ROW:case S.IN_CELL:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:{Hh(this,t);break}case S.TEXT:{Qy(this,t);break}case S.IN_TABLE_TEXT:{Hr(this,t);break}case S.IN_TEMPLATE:{Yh(this,t);break}case S.AFTER_BODY:case S.IN_FRAMESET:case S.AFTER_FRAMESET:case S.AFTER_AFTER_BODY:case S.AFTER_AFTER_FRAMESET:{ml(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===x.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 S.IN_HEAD:case S.IN_HEAD_NO_SCRIPT:case S.AFTER_HEAD:case S.TEXT:case S.IN_COLUMN_GROUP:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:case S.IN_FRAMESET:case S.AFTER_FRAMESET:{this._insertCharacters(t);break}case S.IN_BODY:case S.IN_CAPTION:case S.IN_CELL:case S.IN_TEMPLATE:case S.AFTER_BODY:case S.AFTER_AFTER_BODY:case S.AFTER_AFTER_FRAMESET:{Dh(this,t);break}case S.IN_TABLE:case S.IN_TABLE_BODY:case S.IN_ROW:{ks(this,t);break}case S.IN_TABLE_TEXT:{Uh(this,t);break}}}}function Gx(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):Fh(e,t),n}function Kx(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 Xx(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),l=o&&a>=Yx;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=Qx(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Qx(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 Jx(e,t,n){const r=e.treeAdapter.getTagName(t),i=vr(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===f.TEMPLATE&&a===G.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Zx(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function pl(e,t){for(let n=0;n<Wx;n++){const r=Gx(e,t);if(!r)break;const i=Kx(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Xx(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&Jx(e,s,a),Zx(e,i,r)}}function mo(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function ey(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ty(e,t){e._appendCommentNode(t,e.document)}function ml(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 a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function ny(e,t){e._setDocumentType(t);const n=t.forceQuirks?Lt.QUIRKS:Lx(t);Rx(t)||e._err(t,$.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=S.BEFORE_HTML}function Fr(e,t){e._err(t,$.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Lt.QUIRKS),e.insertionMode=S.BEFORE_HTML,e._processToken(t)}function ry(e,t){t.tagID===f.HTML?(e._insertElement(t,G.HTML),e.insertionMode=S.BEFORE_HEAD):ri(e,t)}function iy(e,t){const n=t.tagID;(n===f.HTML||n===f.HEAD||n===f.BODY||n===f.BR)&&ri(e,t)}function ri(e,t){e._insertFakeRootElement(),e.insertionMode=S.BEFORE_HEAD,e._processToken(t)}function ay(e,t){switch(t.tagID){case f.HTML:{at(e,t);break}case f.HEAD:{e._insertElement(t,G.HTML),e.headElement=e.openElements.current,e.insertionMode=S.IN_HEAD;break}default:ii(e,t)}}function sy(e,t){const n=t.tagID;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?ii(e,t):e._err(t,$.endTagWithoutMatchingOpenElement)}function ii(e,t){e._insertFakeElement(M.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=S.IN_HEAD,e._processToken(t)}function Yt(e,t){switch(t.tagID){case f.HTML:{at(e,t);break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case f.TITLE:{e._switchToTextParsing(t,Fe.RCDATA);break}case f.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Fe.RAWTEXT):(e._insertElement(t,G.HTML),e.insertionMode=S.IN_HEAD_NO_SCRIPT);break}case f.NOFRAMES:case f.STYLE:{e._switchToTextParsing(t,Fe.RAWTEXT);break}case f.SCRIPT:{e._switchToTextParsing(t,Fe.SCRIPT_DATA);break}case f.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=S.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(S.IN_TEMPLATE);break}case f.HEAD:{e._err(t,$.misplacedStartTagForHeadElement);break}default:ai(e,t)}}function oy(e,t){switch(t.tagID){case f.HEAD:{e.openElements.pop(),e.insertionMode=S.AFTER_HEAD;break}case f.BODY:case f.BR:case f.HTML:{ai(e,t);break}case f.TEMPLATE:{ir(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function ir(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,$.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,$.endTagWithoutMatchingOpenElement)}function ai(e,t){e.openElements.pop(),e.insertionMode=S.AFTER_HEAD,e._processToken(t)}function ly(e,t){switch(t.tagID){case f.HTML:{at(e,t);break}case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:{Yt(e,t);break}case f.NOSCRIPT:{e._err(t,$.nestedNoscriptInHead);break}default:si(e,t)}}function uy(e,t){switch(t.tagID){case f.NOSCRIPT:{e.openElements.pop(),e.insertionMode=S.IN_HEAD;break}case f.BR:{si(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function si(e,t){const n=t.type===xe.EOF?$.openElementsLeftAfterEof:$.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=S.IN_HEAD,e._processToken(t)}function cy(e,t){switch(t.tagID){case f.HTML:{at(e,t);break}case f.BODY:{e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=S.IN_BODY;break}case f.FRAMESET:{e._insertElement(t,G.HTML),e.insertionMode=S.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,$.abandonedHeadElementChild),e.openElements.push(e.headElement,f.HEAD),Yt(e,t),e.openElements.remove(e.headElement);break}case f.HEAD:{e._err(t,$.misplacedStartTagForHeadElement);break}default:oi(e,t)}}function dy(e,t){switch(t.tagID){case f.BODY:case f.HTML:case f.BR:{oi(e,t);break}case f.TEMPLATE:{ir(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function oi(e,t){e._insertFakeElement(M.BODY,f.BODY),e.insertionMode=S.IN_BODY,Xa(e,t)}function Xa(e,t){switch(t.type){case xe.CHARACTER:{Ph(e,t);break}case xe.WHITESPACE_CHARACTER:{Dh(e,t);break}case xe.COMMENT:{mo(e,t);break}case xe.START_TAG:{at(e,t);break}case xe.END_TAG:{Qa(e,t);break}case xe.EOF:{Hh(e,t);break}}}function Dh(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ph(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function fy(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function hy(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function py(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,G.HTML),e.insertionMode=S.IN_FRAMESET)}function my(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function gy(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&po.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,G.HTML)}function by(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ey(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,G.HTML),n||(e.formElement=e.openElements.current))}function Ty(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,G.HTML)}function xy(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.tokenizer.state=Fe.PLAINTEXT}function yy(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1}function _y(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(M.A);n&&(pl(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ky(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ay(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(pl(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Cy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function wy(e,t){e.treeAdapter.getDocumentMode(e.document)!==Lt.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=S.IN_TABLE}function Mh(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Bh(e){const t=Ch(e,Wn.TYPE);return t!=null&&t.toLowerCase()===Vx}function Sy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),Bh(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Ny(e,t){e._appendElement(t,G.HTML),t.ackSelfClosing=!0}function Iy(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Oy(e,t){t.tagName=M.IMG,t.tagID=f.IMG,Mh(e,t)}function Ry(e,t){e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Fe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=S.TEXT}function Ly(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Fe.RAWTEXT)}function vy(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Fe.RAWTEXT)}function Zu(e,t){e._switchToTextParsing(t,Fe.RAWTEXT)}function Dy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===S.IN_TABLE||e.insertionMode===S.IN_CAPTION||e.insertionMode===S.IN_TABLE_BODY||e.insertionMode===S.IN_ROW||e.insertionMode===S.IN_CELL?S.IN_SELECT_IN_TABLE:S.IN_SELECT}function Py(e,t){e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function My(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,G.HTML)}function By(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,G.HTML)}function Fy(e,t){e._reconstructActiveFormattingElements(),Rh(t),hl(t),t.selfClosing?e._appendElement(t,G.MATHML):e._insertElement(t,G.MATHML),t.ackSelfClosing=!0}function Hy(e,t){e._reconstructActiveFormattingElements(),Lh(t),hl(t),t.selfClosing?e._appendElement(t,G.SVG):e._insertElement(t,G.SVG),t.ackSelfClosing=!0}function ec(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function at(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:{ky(e,t);break}case f.A:{_y(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{gy(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:{my(e,t);break}case f.LI:case f.DD:case f.DT:{Ty(e,t);break}case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:{Mh(e,t);break}case f.HR:{Iy(e,t);break}case f.RB:case f.RTC:{My(e,t);break}case f.RT:case f.RP:{By(e,t);break}case f.PRE:case f.LISTING:{by(e,t);break}case f.XMP:{Ly(e,t);break}case f.SVG:{Hy(e,t);break}case f.HTML:{fy(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:{Yt(e,t);break}case f.BODY:{hy(e,t);break}case f.FORM:{Ey(e,t);break}case f.NOBR:{Ay(e,t);break}case f.MATH:{Fy(e,t);break}case f.TABLE:{wy(e,t);break}case f.INPUT:{Sy(e,t);break}case f.PARAM:case f.TRACK:case f.SOURCE:{Ny(e,t);break}case f.IMAGE:{Oy(e,t);break}case f.BUTTON:{yy(e,t);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{Cy(e,t);break}case f.IFRAME:{vy(e,t);break}case f.SELECT:{Dy(e,t);break}case f.OPTION:case f.OPTGROUP:{Py(e,t);break}case f.NOEMBED:case f.NOFRAMES:{Zu(e,t);break}case f.FRAMESET:{py(e,t);break}case f.TEXTAREA:{Ry(e,t);break}case f.NOSCRIPT:{e.options.scriptingEnabled?Zu(e,t):ec(e,t);break}case f.PLAINTEXT:{xy(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:ec(e,t)}}function Uy(e,t){if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=S.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function jy(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=S.AFTER_BODY,qh(e,t))}function zy(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function $y(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 Vy(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(M.P,f.P),e._closePElement()}function Wy(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}function Yy(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function qy(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Gy(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Ky(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(M.BR,f.BR),e.openElements.pop(),e.framesetOk=!1}function Fh(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function Qa(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:{pl(e,t);break}case f.P:{Vy(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:{zy(e,t);break}case f.LI:{Wy(e);break}case f.DD:case f.DT:{Yy(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{qy(e);break}case f.BR:{Ky(e);break}case f.BODY:{Uy(e,t);break}case f.HTML:{jy(e,t);break}case f.FORM:{$y(e);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{Gy(e,t);break}case f.TEMPLATE:{ir(e,t);break}default:Fh(e,t)}}function Hh(e,t){e.tmplInsertionModeStack.length>0?Yh(e,t):ml(e,t)}function Xy(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 Qy(e,t){e._err(t,$.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ks(e,t){if(e.openElements.currentTagId!==void 0&&vh.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=S.IN_TABLE_TEXT,t.type){case xe.CHARACTER:{jh(e,t);break}case xe.WHITESPACE_CHARACTER:{Uh(e,t);break}}else Ri(e,t)}function Jy(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,G.HTML),e.insertionMode=S.IN_CAPTION}function Zy(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=S.IN_COLUMN_GROUP}function e2(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(M.COLGROUP,f.COLGROUP),e.insertionMode=S.IN_COLUMN_GROUP,gl(e,t)}function t2(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=S.IN_TABLE_BODY}function n2(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(M.TBODY,f.TBODY),e.insertionMode=S.IN_TABLE_BODY,Ja(e,t)}function r2(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function i2(e,t){Bh(t)?e._appendElement(t,G.HTML):Ri(e,t),t.ackSelfClosing=!0}function a2(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,G.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Cr(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:{n2(e,t);break}case f.STYLE:case f.SCRIPT:case f.TEMPLATE:{Yt(e,t);break}case f.COL:{e2(e,t);break}case f.FORM:{a2(e,t);break}case f.TABLE:{r2(e,t);break}case f.TBODY:case f.TFOOT:case f.THEAD:{t2(e,t);break}case f.INPUT:{i2(e,t);break}case f.CAPTION:{Jy(e,t);break}case f.COLGROUP:{Zy(e,t);break}default:Ri(e,t)}}function bi(e,t){switch(t.tagID){case f.TABLE:{e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break}case f.TEMPLATE:{ir(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:Ri(e,t)}}function Ri(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Xa(e,t),e.fosterParentingEnabled=n}function Uh(e,t){e.pendingCharacterTokens.push(t)}function jh(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Hr(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ri(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const zh=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function s2(e,t){const n=t.tagID;zh.has(n)?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=S.IN_TABLE,Cr(e,t)):at(e,t)}function o2(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=S.IN_TABLE,n===f.TABLE&&bi(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:Qa(e,t)}}function gl(e,t){switch(t.tagID){case f.HTML:{at(e,t);break}case f.COL:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case f.TEMPLATE:{Yt(e,t);break}default:Ia(e,t)}}function l2(e,t){switch(t.tagID){case f.COLGROUP:{e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=S.IN_TABLE);break}case f.TEMPLATE:{ir(e,t);break}case f.COL:break;default:Ia(e,t)}}function Ia(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=S.IN_TABLE,e._processToken(t))}function Ja(e,t){switch(t.tagID){case f.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,G.HTML),e.insertionMode=S.IN_ROW;break}case f.TH:case f.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(M.TR,f.TR),e.insertionMode=S.IN_ROW,Za(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=S.IN_TABLE,Cr(e,t));break}default:Cr(e,t)}}function go(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=S.IN_TABLE);break}case f.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=S.IN_TABLE,bi(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:bi(e,t)}}function Za(e,t){switch(t.tagID){case f.TH:case f.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,G.HTML),e.insertionMode=S.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=S.IN_TABLE_BODY,Ja(e,t));break}default:Cr(e,t)}}function $h(e,t){switch(t.tagID){case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=S.IN_TABLE_BODY);break}case f.TABLE:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=S.IN_TABLE_BODY,go(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=S.IN_TABLE_BODY,go(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:bi(e,t)}}function u2(e,t){const n=t.tagID;zh.has(n)?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),Za(e,t)):at(e,t)}function c2(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=S.IN_ROW);break}case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),$h(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:Qa(e,t)}}function Vh(e,t){switch(t.tagID){case f.HTML:{at(e,t);break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,G.HTML);break}case f.OPTGROUP:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,G.HTML);break}case f.HR:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,G.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:{Yt(e,t);break}}}function Wh(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:{ir(e,t);break}}}function d2(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)):Vh(e,t)}function f2(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)):Wh(e,t)}function h2(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:{Yt(e,t);break}case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.tmplInsertionModeStack[0]=S.IN_TABLE,e.insertionMode=S.IN_TABLE,Cr(e,t);break}case f.COL:{e.tmplInsertionModeStack[0]=S.IN_COLUMN_GROUP,e.insertionMode=S.IN_COLUMN_GROUP,gl(e,t);break}case f.TR:{e.tmplInsertionModeStack[0]=S.IN_TABLE_BODY,e.insertionMode=S.IN_TABLE_BODY,Ja(e,t);break}case f.TD:case f.TH:{e.tmplInsertionModeStack[0]=S.IN_ROW,e.insertionMode=S.IN_ROW,Za(e,t);break}default:e.tmplInsertionModeStack[0]=S.IN_BODY,e.insertionMode=S.IN_BODY,at(e,t)}}function p2(e,t){t.tagID===f.TEMPLATE&&ir(e,t)}function Yh(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ml(e,t)}function m2(e,t){t.tagID===f.HTML?at(e,t):Oa(e,t)}function qh(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=S.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 Oa(e,t)}function Oa(e,t){e.insertionMode=S.IN_BODY,Xa(e,t)}function g2(e,t){switch(t.tagID){case f.HTML:{at(e,t);break}case f.FRAMESET:{e._insertElement(t,G.HTML);break}case f.FRAME:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case f.NOFRAMES:{Yt(e,t);break}}}function b2(e,t){t.tagID===f.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==f.FRAMESET&&(e.insertionMode=S.AFTER_FRAMESET))}function E2(e,t){switch(t.tagID){case f.HTML:{at(e,t);break}case f.NOFRAMES:{Yt(e,t);break}}}function T2(e,t){t.tagID===f.HTML&&(e.insertionMode=S.AFTER_AFTER_FRAMESET)}function x2(e,t){t.tagID===f.HTML?at(e,t):ma(e,t)}function ma(e,t){e.insertionMode=S.IN_BODY,Xa(e,t)}function y2(e,t){switch(t.tagID){case f.HTML:{at(e,t);break}case f.NOFRAMES:{Yt(e,t);break}}}function _2(e,t){t.chars=De,e._insertCharacters(t)}function k2(e,t){e._insertCharacters(t),e.framesetOk=!1}function Gh(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==G.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function A2(e,t){if(Hx(t))Gh(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===G.MATHML?Rh(t):r===G.SVG&&(Ux(t),Lh(t)),hl(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function C2(e,t){if(t.tagID===f.P||t.tagID===f.BR){Gh(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===G.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}M.AREA,M.BASE,M.BASEFONT,M.BGSOUND,M.BR,M.COL,M.EMBED,M.FRAME,M.HR,M.IMG,M.INPUT,M.KEYGEN,M.LINK,M.META,M.PARAM,M.SOURCE,M.TRACK,M.WBR;const es=Kh("end"),sn=Kh("start");function Kh(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 Xh(e){const t=sn(e),n=es(e);if(t&&n)return{start:t,end:n}}const w2=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,S2=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),tc={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Qh(e,t){const n=B2(e),r=xh("type",{handlers:{root:N2,element:I2,text:O2,comment:Zh,doctype:R2,raw:v2},unknown:D2}),i={parser:n?new Ju(tc):Ju.getFragmentParser(void 0,tc),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),Dr(i,sn());const a=n?i.parser.document:i.parser.getFragment(),s=NT(a,{file:i.options.file});return i.stitches&&Ln(s,"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}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Jh(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function N2(e,t){Jh(e.children,t)}function I2(e,t){P2(e,t),Jh(e.children,t),M2(e,t)}function O2(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:xe.CHARACTER,chars:e.value,location:Li(e)};Dr(t,sn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function R2(e,t){const n={type:xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Li(e)};Dr(t,sn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function L2(e,t){t.stitches=!0;const n=F2(e);if("children"in e&&"children"in n){const r=Qh({type:"root",children:e.children},t.options);n.children=r.children}Zh({type:"comment",value:{stitch:n}},t)}function Zh(e,t){const n=e.value,r={type:xe.COMMENT,data:n,location:Li(e)};Dr(t,sn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function v2(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,ep(t,sn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(w2,"&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 D2(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))L2(n,t);else{let r="";throw S2.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 Dr(e,t){ep(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=Fe.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 ep(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 P2(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Fe.PLAINTEXT)return;Dr(t,sn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Vn.html;i===Vn.html&&n==="svg"&&(i=Vn.svg);const a=$T({...e,children:[]},{space:i===Vn.svg?"svg":"html"}),s={type:xe.START_TAG,tagName:n,tagID:vr(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Li(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function M2(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&QT.includes(n)||t.parser.tokenizer.state===Fe.PLAINTEXT)return;Dr(t,es(e));const r={type:xe.END_TAG,tagName:n,tagID:vr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Li(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Fe.RCDATA||t.parser.tokenizer.state===Fe.RAWTEXT||t.parser.tokenizer.state===Fe.SCRIPT_DATA)&&(t.parser.tokenizer.state=Fe.DATA)}function B2(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Li(e){const t=sn(e)||{line:void 0,column:void 0,offset:void 0},n=es(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 F2(e){return"children"in e?Kn({...e,children:[]}):Kn(e)}function bo(e){return function(t,n){return Qh(t,{...e,file:n})}}const Un=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],li={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Un,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Un],h2:[["className","sr-only"]],img:[...Un,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Un,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Un],table:[...Un],ul:[...Un,["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"]},wn={}.hasOwnProperty;function H2(e,t){let n={type:"root",children:[]};const r={schema:t?{...li,...t}:li,stack:[]},i=tp(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function tp(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return U2(e,n);case"doctype":return j2(e,n);case"element":return z2(e,n);case"root":return $2(e,n);case"text":return V2(e,n)}}}function U2(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return vi(a,t),a}}function j2(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return vi(n,t),n}}function z2(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=np(e,t.children),i=W2(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&wn.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let l=-1;for(a=!1;++l<o.length;)e.stack.includes(o[l])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return vi(s,t),s}function $2(e,t){const r={type:"root",children:np(e,t.children)};return vi(r,t),r}function V2(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return vi(r,t),r}function np(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=tp(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function W2(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&wn.call(r,n)?r[n]:void 0,s=r&&wn.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},l={};let u;for(u in o)if(wn.call(o,u)){const d=o[u];let c=nc(e,rc(a,u),u,d);c==null&&(c=nc(e,rc(s,u),u,d)),c!=null&&(l[u]=c)}if(i&&wn.call(i,n)){const d=i[n];for(u in d)wn.call(d,u)&&!wn.call(l,u)&&(l[u]=d[u])}return l}function nc(e,t,n,r){return t?Array.isArray(r)?Y2(e,t,n,r):rp(e,t,n,r):void 0}function Y2(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=rp(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function rp(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&q2(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===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 q2(e,t,n){const r=e.schema.protocols&&wn.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),o=i.indexOf("#"),l=i.indexOf("/");if(a<0||l>-1&&a>l||s>-1&&a>s||o>-1&&a>o)return!0;let u=-1;for(;++u<r.length;){const d=r[u];if(a===d.length&&i.slice(0,d.length)===d)return!0}return!1}function vi(e,t){const n=Xh(t);t.data&&(e.data=Kn(t.data)),n&&(e.position=n)}function rc(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function ip(e){return function(t){return H2(t,e)}}function ic(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 ct=Pn(/[A-Za-z]/),rt=Pn(/[\dA-Za-z]/),G2=Pn(/[#-'*+\--9=?A-Z^-~]/);function Ra(e){return e!==null&&(e<32||e===127)}const Eo=Pn(/\d/),K2=Pn(/[\dA-Fa-f]/),X2=Pn(/[!-/:-@[-`{-~]/);function le(e){return e!==null&&e<-2}function Oe(e){return e!==null&&(e<0||e===32)}function ye(e){return e===-2||e===-1||e===32}const ts=Pn(new RegExp("\\p{P}|\\p{S}","u")),Xn=Pn(/\s/);function Pn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Q2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const ap=[],J2=!0,ac=!1,sp="skip";function op(e,t,n,r){let i;i=t;const a=Ni(i),s=1;o(e,void 0,[])();function o(l,u,d){const c=l&&typeof l=="object"?l:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=ap,m,E,k;if(a(l,u,d[d.length-1]||void 0)&&(h=Z2(n(l,d)),h[0]===ac))return h;if("children"in l&&l.children){const _=l;if(_.children&&h[0]!==sp)for(E=-1+s,k=d.concat(_);E>-1&&E<_.children.length;){const N=_.children[E];if(m=o(N,E,k)(),m[0]===ac)return m;E=typeof m[1]=="number"?m[1]:E+s}}return h}}}function Z2(e){return Array.isArray(e)?e:typeof e=="number"?[J2,e]:e==null?ap:[e]}function e_(e,t,n){const i=Ni((n||{}).ignore||[]),a=t_(t);let s=-1;for(;++s<a.length;)op(e,"text",o);function o(u,d){let c=-1,p;for(;++c<d.length;){const h=d[c],m=p?p.children:void 0;if(i(h,m?m.indexOf(h):void 0,p))return;p=h}if(p)return l(u,d)}function l(u,d){const c=d[d.length-1],p=a[s][0],h=a[s][1];let m=0;const k=c.children.indexOf(u);let _=!1,N=[];p.lastIndex=0;let w=p.exec(u.value);for(;w;){const F=w.index,H={index:w.index,input:w.input,stack:[...d,u]};let I=h(...w,H);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?p.lastIndex=F+1:(m!==F&&N.push({type:"text",value:u.value.slice(m,F)}),Array.isArray(I)?N.push(...I):I&&N.push(I),m=F+w[0].length,_=!0),!p.global)break;w=p.exec(u.value)}return _?(m<u.value.length&&N.push({type:"text",value:u.value.slice(m)}),c.children.splice(k,1,...N)):N=[u],k+N.length}}function t_(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([n_(i[0]),r_(i[1])])}return t}function n_(e){return typeof e=="string"?new RegExp(Q2(e),"g"):e}function r_(e){return typeof e=="function"?e:function(){return e}}const As="phrasing",Cs=["autolink","link","image","label"];function i_(){return{transforms:[d_],enter:{literalAutolink:s_,literalAutolinkEmail:ws,literalAutolinkHttp:ws,literalAutolinkWww:ws},exit:{literalAutolink:c_,literalAutolinkEmail:u_,literalAutolinkHttp:o_,literalAutolinkWww:l_}}}function a_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:As,notInConstruct:Cs},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:As,notInConstruct:Cs},{character:":",before:"[ps]",after:"\\/",inConstruct:As,notInConstruct:Cs}]}}function s_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ws(e){this.config.enter.autolinkProtocol.call(this,e)}function o_(e){this.config.exit.autolinkProtocol.call(this,e)}function l_(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 u_(e){this.config.exit.autolinkEmail.call(this,e)}function c_(e){this.exit(e)}function d_(e){e_(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,f_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),h_]],{ignore:["link","linkReference"]})}function f_(e,t,n,r,i){let a="";if(!lp(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!p_(n)))return!1;const s=m_(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function h_(e,t,n,r){return!lp(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function p_(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 m_(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=ic(e,"(");let a=ic(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function lp(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xn(n)||ts(n))&&(!t||n!==47)}function $t(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}up.peek=A_;function g_(){this.buffer()}function b_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function E_(){this.buffer()}function T_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function x_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=$t(this.sliceSerialize(e)).toLowerCase(),n.label=t}function y_(e){this.exit(e)}function __(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=$t(this.sliceSerialize(e)).toLowerCase(),n.label=t}function k_(e){this.exit(e)}function A_(){return"["}function up(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function C_(){return{enter:{gfmFootnoteCallString:g_,gfmFootnoteCall:b_,gfmFootnoteDefinitionLabelString:E_,gfmFootnoteDefinition:T_},exit:{gfmFootnoteCallString:x_,gfmFootnoteCall:y_,gfmFootnoteDefinitionLabelString:__,gfmFootnoteDefinition:k_}}}function w_(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:up},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let l=o.move("[^");const u=a.enter("footnoteDefinition"),d=a.enter("label");return l+=o.move(a.safe(a.associationId(r),{before:l,after:"]"})),d(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?`
49
- `:" ")+a.indentLines(a.containerFlow(r,o.current()),t?cp:S_))),u(),l}}function S_(e,t,n){return t===0?e:cp(e,t,n)}function cp(e,t,n){return(n?"":" ")+e}const N_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];dp.peek=v_;function I_(){return{canContainEols:["delete"],enter:{strikethrough:R_},exit:{strikethrough:L_}}}function O_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:N_}],handlers:{delete:dp}}}function R_(e){this.enter({type:"delete",children:[]},e)}function L_(e){this.exit(e)}function dp(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function v_(){return"~"}function D_(e){return e.length}function P_(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||D_,a=[],s=[],o=[],l=[];let u=0,d=-1;for(;++d<e.length;){const E=[],k=[];let _=-1;for(e[d].length>u&&(u=e[d].length);++_<e[d].length;){const N=M_(e[d][_]);if(n.alignDelimiters!==!1){const w=i(N);k[_]=w,(l[_]===void 0||w>l[_])&&(l[_]=w)}E.push(N)}s[d]=E,o[d]=k}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)a[c]=sc(r[c]);else{const E=sc(r);for(;++c<u;)a[c]=E}c=-1;const p=[],h=[];for(;++c<u;){const E=a[c];let k="",_="";E===99?(k=":",_=":"):E===108?k=":":E===114&&(_=":");let N=n.alignDelimiters===!1?1:Math.max(1,l[c]-k.length-_.length);const w=k+"-".repeat(N)+_;n.alignDelimiters!==!1&&(N=k.length+N+_.length,N>l[c]&&(l[c]=N),h[c]=N),p[c]=w}s.splice(1,0,p),o.splice(1,0,h),d=-1;const m=[];for(;++d<s.length;){const E=s[d],k=o[d];c=-1;const _=[];for(;++c<u;){const N=E[c]||"";let w="",F="";if(n.alignDelimiters!==!1){const H=l[c]-(k[c]||0),I=a[c];I===114?w=" ".repeat(H):I===99?H%2?(w=" ".repeat(H/2+.5),F=" ".repeat(H/2-.5)):(w=" ".repeat(H/2),F=w):F=" ".repeat(H)}n.delimiterStart!==!1&&!c&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||c)&&_.push(" "),n.alignDelimiters!==!1&&_.push(w),_.push(N),n.alignDelimiters!==!1&&_.push(F),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&_.push("|")}m.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return m.join(`
50
- `)}function M_(e){return e==null?"":String(e)}function sc(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 B_(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),F_);return i(),s}function F_(e,t,n){return">"+(n?"":" ")+e}function H_(e,t){return oc(e,t.inConstruct,!0)&&!oc(e,t.notInConstruct,!1)}function oc(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 lc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
51
- `&&H_(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
52
- `}function U_(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function j_(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 z_(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 $_(e,t,n,r){const i=z_(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(j_(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(a,V_);return c(),p}const o=n.createTracker(r),l=i.repeat(Math.max(U_(a,i)+1,3)),u=n.enter("codeFenced");let d=o.move(l);if(e.lang){const c=n.enter(`codeFencedLang${s}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${s}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
47
+ */const Xb=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Gv=Wf("loader-circle",Xb);/**
48
+ * @license lucide-react v0.575.0 - ISC
49
+ *
50
+ * This source code is licensed under the ISC license.
51
+ * See the LICENSE file in the root directory of this source tree.
52
+ */const Qb=[["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"}]],Jb=Wf("lock",Qb);function Zb(...e){return sl(at(e))}const Ji=new Intl.NumberFormat(void 0,{maximumFractionDigits:2}),pa=1e3,Kr=60*pa,Xr=60*Kr,wu=24*Xr;function Rt(e,t=!1){if(e===0)return"0";if(e<pa)return`${Ji.format(e)}ms`;if(e<Kr)return`${Ji.format(e/pa)}s`;if(t)return e<Xr?`${Ji.format(e/Kr)}m`:`${Ji.format(e/Xr)}h`;const n=Math.floor(e/wu),r=Math.floor(e%wu/Xr),i=Math.floor(e%Xr/Kr),a=Math.floor(e%Kr/pa),s=[];return n>0&&s.push(`${n}d`),r>0&&s.push(`${r}h`),i>0&&s.push(`${i}m`),r<=1&&(a>0||s.length===0)&&s.push(`${a}s`),s.join(" ")}function Kv(e){return e.endsWith("//doStreamStep")}function Xv(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}var eE=Object.create,ol=Object.defineProperty,tE=Object.getOwnPropertyDescriptor,Yf=Object.getOwnPropertyNames,nE=Object.getPrototypeOf,rE=Object.prototype.hasOwnProperty,ll=(e,t)=>function(){return t||(0,e[Yf(e)[0]])((t={exports:{}}).exports,t),t.exports},iE=(e,t)=>{for(var n in t)ol(e,n,{get:t[n],enumerable:!0})},aE=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Yf(t))!rE.call(e,i)&&i!==n&&ol(e,i,{get:()=>t[i],enumerable:!(r=tE(t,i))||r.enumerable});return e},sE=(e,t,n)=>(n=e!=null?eE(nE(e)):{},aE(ol(n,"default",{value:e,enumerable:!0}),e)),oE=ll({"node_modules/is-object/index.js"(e,t){t.exports=function(r){return typeof r=="object"&&r!==null}}}),lE=ll({"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}}}),uE=ll({"node_modules/is-dom/index.js"(e,t){var n=oE(),r=lE();function i(a){return!n(a)||!r(window)||typeof window.Node!="function"?!1:typeof a.nodeType=="number"&&typeof a.nodeName=="string"}t.exports=i}}),Ra={};iE(Ra,{chromeDark:()=>cE,chromeLight:()=>dE});var cE={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"},dE={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"},qf=b.createContext([{},()=>{}]),As={WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",OUserSelect:"none",userSelect:"none"},ma=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,...As},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`}:{},...As},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,...As}}),oo="chromeLight",Gf=b.createContext(ma(Ra[oo])),Li=e=>b.useContext(Gf)[e],fE=e=>({theme:n=oo,...r})=>{const i=b.useMemo(()=>{switch(Object.prototype.toString.call(n)){case"[object String]":return ma(Ra[n]);case"[object Object]":return ma(n);default:return ma(Ra[oo])}},[n]);return j.createElement(Gf.Provider,{value:i},j.createElement(e,{...r}))},hE=({expanded:e,styles:t})=>j.createElement("span",{style:{...t.base,...e?t.expanded:t.collapsed}},"▶"),pE=b.memo(e=>{e={expanded:!0,nodeRenderer:({name:d})=>j.createElement("span",null,d),onClick:()=>{},shouldShowArrow:!1,shouldShowPlaceholder:!0,...e};const{expanded:t,onClick:n,children:r,nodeRenderer:i,title:a,shouldShowArrow:s,shouldShowPlaceholder:o}=e,l=Li("TreeNode"),u=i;return j.createElement("li",{"aria-expanded":t,role:"treeitem",style:l.treeNodeBase,title:a},j.createElement("div",{style:l.treeNodePreviewContainer,onClick:n},s||b.Children.count(r)>0?j.createElement(hE,{expanded:t,styles:l.treeNodeArrow}):o&&j.createElement("span",{style:l.treeNodePlaceholder}," "),j.createElement(u,{...e})),j.createElement("ol",{role:"group",style:l.treeNodeChildNodesContainer},t?r:void 0))}),Oa="$",Cu="*";function ga(e,t){return!t(e).next().done}var mE=e=>Array.from({length:e},(t,n)=>[Oa].concat(Array.from({length:n},()=>"*")).join(".")),gE=(e,t,n,r,i)=>{const a=[].concat(mE(r)).concat(n).filter(o=>typeof o=="string"),s=[];return a.forEach(o=>{const l=o.split("."),u=(d,c,p)=>{if(p===l.length){s.push(c);return}const h=l[p];if(p===0)ga(d,t)&&(h===Oa||h===Cu)&&u(d,Oa,p+1);else if(h===Cu)for(const{name:m,data:E}of t(d))ga(E,t)&&u(E,`${c}.${m}`,p+1);else{const m=d[h];ga(m,t)&&u(m,`${c}.${h}`,p+1)}};u(e,"",0)}),s.reduce((o,l)=>(o[l]=!0,o),{...i})},Kf=b.memo(e=>{const{data:t,dataIterator:n,path:r,depth:i,nodeRenderer:a}=e,[s,o]=b.useContext(qf),l=ga(t,n),u=!!s[r],d=b.useCallback(()=>l&&o(c=>({...c,[r]:!u})),[l,o,r,u]);return j.createElement(pE,{expanded:u,onClick:d,shouldShowArrow:l,shouldShowPlaceholder:i>0,nodeRenderer:a,...e},u?[...n(t)].map(({name:c,data:p,...h})=>j.createElement(Kf,{name:c,data:p,depth:i+1,path:`${r}.${c}`,key:c,dataIterator:n,nodeRenderer:a,...h})):null)}),bE=b.memo(({name:e,data:t,dataIterator:n,nodeRenderer:r,expandPaths:i,expandLevel:a})=>{const s=Li("TreeView"),o=b.useState({}),[,l]=o;return b.useLayoutEffect(()=>l(u=>gE(t,n,i,a,u)),[t,n,i,a]),j.createElement(qf.Provider,{value:o},j.createElement("ol",{role:"tree",style:s.treeViewOutline},j.createElement(Kf,{name:e,data:t,dataIterator:n,depth:0,path:Oa,nodeRenderer:r})))}),Vn=({name:e,dimmed:t=!1,styles:n={}})=>{const r=Li("ObjectName"),i={...r.base,...t?r.dimmed:{},...n};return j.createElement("span",{style:i},e)},ni=({object:e,styles:t})=>{const n=Li("ObjectValue"),r=i=>({...n[i],...t});switch(typeof e){case"bigint":return j.createElement("span",{style:r("objectValueNumber")},String(e),"n");case"number":return j.createElement("span",{style:r("objectValueNumber")},String(e));case"string":return j.createElement("span",{style:r("objectValueString")},'"',e,'"');case"boolean":return j.createElement("span",{style:r("objectValueBoolean")},String(e));case"undefined":return j.createElement("span",{style:r("objectValueUndefined")},"undefined");case"object":return e===null?j.createElement("span",{style:r("objectValueNull")},"null"):e instanceof Date?j.createElement("span",null,e.toString()):e instanceof RegExp?j.createElement("span",{style:r("objectValueRegExp")},e.toString()):Array.isArray(e)?j.createElement("span",null,`Array(${e.length})`):e.constructor?typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)?j.createElement("span",null,`Buffer[${e.length}]`):j.createElement("span",null,e.constructor.name):j.createElement("span",null,"Object");case"function":return j.createElement("span",null,j.createElement("span",{style:r("objectValueFunctionPrefix")},"ƒ "),j.createElement("span",{style:r("objectValueFunctionName")},e.name,"()"));case"symbol":return j.createElement("span",{style:r("objectValueSymbol")},e.toString());default:return j.createElement("span",null)}},EE=Object.prototype.hasOwnProperty,TE=Object.prototype.propertyIsEnumerable;function lo(e,t){const n=Object.getOwnPropertyDescriptor(e,t);if(n.get)try{return n.get()}catch{return n.get}return e[t]}function Su(e,t){return e.length===0?[]:e.slice(1).reduce((n,r)=>n.concat([t,r]),[e[0]])}var uo=({data:e})=>{const t=Li("ObjectPreview"),n=e;if(typeof n!="object"||n===null||n instanceof Date||n instanceof RegExp)return j.createElement(ni,{object:n});if(Array.isArray(n)){const r=t.arrayMaxProperties,i=n.slice(0,r).map((s,o)=>j.createElement(ni,{key:o,object:s}));n.length>r&&i.push(j.createElement("span",{key:"ellipsis"},"…"));const a=n.length;return j.createElement(j.Fragment,null,j.createElement("span",{style:t.objectDescription},a===0?"":`(${a}) `),j.createElement("span",{style:t.preview},"[",Su(i,", "),"]"))}else{const r=t.objectMaxProperties,i=[];for(const s in n)if(EE.call(n,s)){let o;i.length===r-1&&Object.keys(n).length>r&&(o=j.createElement("span",{key:"ellipsis"},"…"));const l=lo(n,s);if(i.push(j.createElement("span",{key:s},j.createElement(Vn,{name:s||'""'}),": ",j.createElement(ni,{object:l}),o)),o)break}const a=n.constructor?n.constructor.name:"Object";return j.createElement(j.Fragment,null,j.createElement("span",{style:t.objectDescription},a==="Object"?"":`${a} `),j.createElement("span",{style:t.preview},"{",Su(i,", "),"}"))}},co=({name:e,data:t})=>typeof e=="string"?j.createElement("span",null,j.createElement(Vn,{name:e}),j.createElement("span",null,": "),j.createElement(uo,{data:t})):j.createElement(uo,{data:t}),Xf=({name:e,data:t,isNonenumerable:n=!1})=>{const r=t;return j.createElement("span",null,typeof e=="string"?j.createElement(Vn,{name:e,dimmed:n}):j.createElement(uo,{data:e}),j.createElement("span",null,": "),j.createElement(ni,{object:r}))},yE=(e,t)=>function*(r){if(!(typeof r=="object"&&r!==null||typeof r=="function"))return;const a=Array.isArray(r);if(!a&&r[Symbol.iterator]){let s=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:s.toString(),data:o};s++}}else{const s=Object.getOwnPropertyNames(r);t===!0&&!a?s.sort():typeof t=="function"&&s.sort(t);for(const o of s)if(TE.call(r,o)){const l=lo(r,o);yield{name:o||'""',data:l}}else if(e){let l;try{l=lo(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})}},xE=({depth:e,name:t,data:n,isNonenumerable:r})=>e===0?j.createElement(co,{name:t,data:n}):j.createElement(Xf,{name:t,data:n,isNonenumerable:r}),_E=({showNonenumerable:e=!1,sortObjectKeys:t,nodeRenderer:n,...r})=>{const i=yE(e,t),a=n||xE;return j.createElement(bE,{nodeRenderer:a,dataIterator:i,...r})},kE=fE(_E);sE(uE());const AE=()=>{const[e,t]=b.useState(()=>typeof document>"u"?!1:document.documentElement.classList.contains("dark"));return b.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},wE="modulepreload",CE=function(e){return"/"+e},Nu={},bi=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=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=s(n.map(u=>{if(u=CE(u),u in Nu)return;Nu[u]=!0;const d=u.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":wE,d||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),d)return new Promise((h,m)=>{p.addEventListener("load",h),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})};function SE(e){const t=IE(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 NE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function IE(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|=NE.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 RE=-1,OE=-2,LE=-3,vE=-4,DE=-5,PE=-6,ME=-7;function BE(e,t){return Qf(JSON.parse(e),t)}function Qf(e,t){if(typeof e=="number")return a(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 a(s,o=!1){if(s===RE)return;if(s===LE)return NaN;if(s===vE)return 1/0;if(s===DE)return-1/0;if(s===PE)return-0;if(o||typeof s!="number")throw new Error("Invalid input");if(s in r)return r[s];const l=n[s];if(!l||typeof l!="object")r[s]=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[s]=d(a(c)),i.delete(c),r[s]}switch(u){case"Date":r[s]=new Date(l[1]);break;case"Set":const c=new Set;r[s]=c;for(let m=1;m<l.length;m+=1)c.add(a(l[m]));break;case"Map":const p=new Map;r[s]=p;for(let m=1;m<l.length;m+=2)p.set(a(l[m]),a(l[m+1]));break;case"RegExp":r[s]=new RegExp(l[1],l[2]);break;case"Object":r[s]=Object(l[1]);break;case"BigInt":r[s]=BigInt(l[1]);break;case"null":const h=Object.create(null);r[s]=h;for(let m=1;m<l.length;m+=2)h[l[m]]=a(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=a(l[1]),k=new m(E);r[s]=l[2]!==void 0?k.subarray(l[2],l[3]):k;break}case"ArrayBuffer":{const m=l[1];if(typeof m!="string")throw new Error("Invalid ArrayBuffer encoding");const E=SE(m);r[s]=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[s]=Temporal[m].from(l[1]);break}case"URL":{const m=new URL(l[1]);r[s]=m;break}case"URLSearchParams":{const m=new URLSearchParams(l[1]);r[s]=m;break}default:throw new Error(`Unknown type ${u}`)}}else if(l[0]===ME){const u=l[1],d=new Array(u);r[s]=d;for(let c=2;c<l.length;c+=2){const p=l[c];d[p]=a(l[c+1])}}else{const u=new Array(l.length);r[s]=u;for(let d=0;d<l.length;d+=1){const c=l[d];c!==OE&&(u[d]=a(c))}}else{const u={};r[s]=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]=a(c)}}return r[s]}return a(0)}const Ei={DEVALUE_V1:"devl",ENCRYPTED:"encr"},gr=4;new TextEncoder;const Jf=new TextDecoder;function ul(e){if(!(e instanceof Uint8Array))return{format:Ei.DEVALUE_V1,payload:new TextEncoder().encode(JSON.stringify(e))};if(e.length<gr)throw new Error(`Data too short to contain format prefix: expected at least ${gr} bytes, got ${e.length}`);const t=e.subarray(0,gr),n=Jf.decode(t),r=Object.values(Ei);if(!r.includes(n))throw new Error(`Unknown serialization format: "${n}". Known formats: ${r.join(", ")}`);const i=e.subarray(gr);return{format:n,payload:i}}function Ti(e){return!(e instanceof Uint8Array)||e.length<gr?!1:Jf.decode(e.subarray(0,gr))===Ei.ENCRYPTED}function Nt(e,t){if(e instanceof Uint8Array){if(Ti(e))return e;const{format:n,payload:r}=ul(e);if(n===Ei.DEVALUE_V1){const i=new TextDecoder().decode(r);return BE(i,t)}throw new Error(`Unsupported serialization format: ${n}`)}return Array.isArray(e)?Qf(e,t):e}async function FE(e,t,n){if(e instanceof Uint8Array&&Ti(e)&&n){const{decrypt:r}=await bi(async()=>{const{decrypt:s}=await import("./encryption-8OvC6eoJ.js");return{decrypt:s}},[]),{payload:i}=ul(e),a=await r(n,i);return Nt(a,t)}return Nt(e,t)}const ws="strm_",Zf="__workflow_stream_ref__",eh="__workflow_class_instance_ref__";class th{constructor(t,n,r){Ne(this,"className");Ne(this,"classId");Ne(this,"data");Ne(this,"__type",eh);this.className=t,this.classId=n,this.data=r}toJSON(){return{__type:this.__type,className:this.className,classId:this.classId,data:this.data}}}const ba=e=>{let t;if("name"in e){const n=String(e.name);n.startsWith(ws)?t=n:t=`${ws}${n}`}else t=`${ws}null`;return{__type:Zf,streamId:t}},nh=e=>!e||typeof e!="object"?"null":"stepId"in e?`<step:${e.stepId}>`:"<function>",yi=e=>{if(!e)return"Unknown";const t=e.split("/");return t[t.length-1]||e},rh=e=>new th(yi(e.classId),e.classId,e.data),ih=e=>`<class:${yi(e.classId)}>`,ah={ReadableStream:ba,WritableStream:ba,TransformStream:ba,StepFunction:nh,Instance:rh,Class:ih};function HE(e,t){let n=e.input,r=e.output;if(e.input!=null)try{n=Nt(e.input,t)}catch{}if(e.output!=null)try{r=Nt(e.output,t)}catch{}return{...e,input:n,output:r}}function UE(e,t){let n=e.input,r=e.output;if(e.input!=null)try{n=Nt(e.input,t)}catch{}if(e.output!=null)try{r=Nt(e.output,t)}catch{}return{...e,input:n,output:r}}function jE(e,t){if(!e.eventData)return e;const n={...e.eventData};if("result"in n&&n.result!=null)try{n.result=Nt(n.result,t)}catch{}if("input"in n&&n.input!=null)try{n.input=Nt(n.input,t)}catch{}if("output"in n&&n.output!=null)try{n.output=Nt(n.output,t)}catch{}if("metadata"in n&&n.metadata!=null)try{n.metadata=Nt(n.metadata,t)}catch{}if("payload"in n&&n.payload!=null)try{n.payload=Nt(n.payload,t)}catch{}return{...e,eventData:n}}function zE(e,t){if(e.metadata==null)return e;let n=e.metadata;try{n=Nt(e.metadata,t)}catch{}return{...e,metadata:n}}function sh(e,t){if(!e)return e;let n;if("stepId"in e?n=HE(e,t):"hookId"in e?n=zE(e,t):"eventId"in e?n=jE(e,t):n=UE(e,t),"executionContext"in n){const{executionContext:r,...i}=n,a=r&&typeof r=="object"&&"workflowCoreVersion"in r?r.workflowCoreVersion:void 0;return a?{...i,workflowCoreVersion:a}:i}return n}const $E=Object.freeze(Object.defineProperty({__proto__:null,CLASS_INSTANCE_REF_TYPE:eh,ClassInstanceRef:th,STREAM_REF_TYPE:Zf,SerializationFormat:Ei,decodeFormatPrefix:ul,extractClassName:yi,hydrateData:Nt,hydrateDataWithKey:FE,hydrateResourceIO:sh,isEncryptedData:Ti,observabilityRevivers:ah,serializedClassToString:ih,serializedInstanceToRef:rh,serializedStepFunctionToString:nh,streamToStreamRef:ba},Symbol.toStringTag,{value:"Module"}));function VE(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 WE(){function e(t){return VE(t)}return{...ah,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:${yi(t.classId)}>`,Instance:t=>{const n=yi(t.classId),r=t.data,i=r&&typeof r=="object"?{...r}:{value:r},a={[n]:function(){}}[n],s=Object.create(a.prototype);return Object.assign(s,i),s}}}let Cs=null;function oh(){return Cs||(Cs=WE()),Cs}function Qv(e){const t=sh(e,oh());return qE(t)}const La="Encrypted";function Iu(e){const t={[La]:function(){}}[La],n=Object.create(t.prototype);return Object.defineProperty(n,"__encryptedData",{value:e,enumerable:!1,configurable:!1}),n}function YE(e){var t;return e!==null&&typeof e=="object"&&((t=e.constructor)==null?void 0:t.name)===La}function qE(e){if(!e||typeof e!="object")return e;const n={...e};for(const r of["input","output","metadata","error"])Ti(n[r])&&(n[r]=Iu(n[r]));if(n.eventData&&typeof n.eventData=="object"){const r={...n.eventData};for(const i of lh)Ti(r[i])&&(r[i]=Iu(r[i]));n.eventData=r}return n}const lh=["result","input","output","metadata","payload"];async function Jv(e,t){const{hydrateDataWithKey:n}=await bi(async()=>{const{hydrateDataWithKey:u}=await Promise.resolve().then(()=>$E);return{hydrateDataWithKey:u}},void 0),{importKey:r}=await bi(async()=>{const{importKey:u}=await import("./encryption-8OvC6eoJ.js");return{importKey:u}},[]),i=await r(t),a=oh();async function s(u,d,c){if(YE(u)){const p=u.__encryptedData;return n(p,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 s(l[u],a,i));if(l.eventData&&typeof l.eventData=="object"){const u={...l.eventData};for(const d of lh)d in u&&(u[d]=await s(u[d],a,i));l.eventData=u}return l}const uh={OBJECT_VALUE_DATE_COLOR:"#a21caf"},GE={OBJECT_VALUE_DATE_COLOR:"#e879f9"},ch={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"},KE={...ch,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)"},XE={...ch,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)"},QE="__workflow_stream_ref__",JE="__workflow_class_instance_ref__";function ZE(e){return e!==null&&typeof e=="object"&&"__type"in e&&e.__type===QE}function eT(e){return e!==null&&typeof e=="object"&&"__type"in e&&e.__type===JE}const dh=b.createContext(void 0);function tT({streamRef:e}){const t=b.useContext(dh);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 fh=b.createContext(uh);function nT({depth:e,name:t,data:n,isNonenumerable:r}){var a;const i=b.useContext(fh);if(n!==null&&typeof n=="object"&&((a=n.constructor)==null?void 0:a.name)===La){const s=g.jsxs("span",{style:{color:"var(--ds-gray-600)",fontStyle:"italic"},children:[g.jsx(Jb,{className:"h-3 w-3",style:{display:"inline",verticalAlign:"middle",marginRight:"3px",marginTop:"-1px"}}),"Encrypted"]});return e===0?s:g.jsxs("span",{children:[t!=null&&g.jsx(Vn,{name:t}),t!=null&&g.jsx("span",{children:": "}),s]})}if(ZE(n))return g.jsxs("span",{children:[t!=null&&g.jsx(Vn,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsx(tT,{streamRef:n})]});if(eT(n))return e===0?g.jsx(co,{name:n.className,data:n.data}):g.jsxs("span",{children:[t!=null&&g.jsx(Vn,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsxs("span",{style:{fontStyle:"italic"},children:[n.className," "]}),g.jsx(ni,{object:n.data})]});if(n instanceof Date){const s=n.toISOString();return e===0?g.jsx("span",{style:{color:i.OBJECT_VALUE_DATE_COLOR},children:s}):g.jsxs("span",{children:[t!=null&&g.jsx(Vn,{name:t}),t!=null&&g.jsx("span",{children:": "}),g.jsx("span",{style:{color:i.OBJECT_VALUE_DATE_COLOR},children:s})]})}return e===0?g.jsx(co,{name:t,data:n}):g.jsx(Xf,{name:t,data:n,isNonenumerable:r})}function rT({data:e,expandLevel:t=2,name:n,onStreamClick:r}){const i=iT(e),[a,s]=b.useState(t),o=AE(),l=o?GE:uh;b.useEffect(()=>{s(0)},[]);const u=g.jsx(fh.Provider,{value:l,children:g.jsx(kE,{data:i,name:n,theme:o?XE:KE,expandLevel:a,nodeRenderer:nT})});return r?g.jsx(dh.Provider,{value:r,children:u}):u}function iT(e){const t=b.useRef(e);return Ea(t.current,e)||(t.current=e),t.current}function Ru(e){return typeof e=="object"&&e!==null}function Ea(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)||!Ea(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(!Ru(e)||!Ru(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(!Ea(e[o],t[o],n))return!1;return!0}const a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(const o of a)if(!Object.hasOwn(t,o)||!Ea(e[o],t[o],n))return!1;return!0}function aT(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 sT=e=>{switch(e){case"success":return uT;case"info":return dT;case"warning":return cT;case"error":return fT;default:return null}},oT=Array(12).fill(0),lT=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},oT.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),uT=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),cT=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.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"})),dT=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),fT=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),hT=j.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"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),pT=()=>{const[e,t]=j.useState(document.hidden);return j.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let fo=1;class mT{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,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:fo++,s=this.toasts.find(l=>l.id===a),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:o,title:r}):l):this.addToast({title:r,...i,dismissible:o,id:a}),a},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 a=r!==void 0,s;const o=i.then(async u=>{if(s=["resolve",u],j.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(bT(u)&&!u.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,m=typeof c=="object"&&!j.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...m})}else if(u instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!j.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...m})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!j.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...m})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){a=!1;const d=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,h=typeof d=="object"&&!j.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:c,...h})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>o.then(()=>s[0]==="reject"?d(s[1]):u(s[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)||fo++;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 gt=new mT,gT=(e,t)=>{const n=(t==null?void 0:t.id)||fo++;return gt.addToast({title:e,...t,id:n}),n},bT=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ET=gT,TT=()=>gt.toasts,yT=()=>gt.getActiveToasts(),Zv=Object.assign(ET,{success:gt.success,info:gt.info,warning:gt.warning,error:gt.error,custom:gt.custom,message:gt.message,promise:gt.promise,dismiss:gt.dismiss,loading:gt.loading},{getHistory:TT,getToasts:yT});aT("[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 Zi(e){return e.label!==void 0}const xT=3,_T="24px",kT="16px",Ou=4e3,AT=356,wT=14,CT=45,ST=200;function Kt(...e){return e.filter(Boolean).join(" ")}function NT(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const IT=e=>{var t,n,r,i,a,s,o,l,u;const{invert:d,toast:c,unstyled:p,interacting:h,setHeights:m,visibleToasts:E,heights:k,index:_,toasts:N,expanded:C,removeToast:F,defaultRichColors:H,closeButton:I,style:V,cancelButtonStyle:U,actionButtonStyle:Q,className:O="",descriptionClassName:K="",duration:z,position:x,gap:L,expandByDefault:v,classNames:D,icons:P,closeButtonAriaLabel:q="Close toast"}=e,[J,T]=j.useState(null),[ie,te]=j.useState(null),[w,he]=j.useState(!1),[ue,de]=j.useState(!1),[He,be]=j.useState(!1),[ke,Xe]=j.useState(!1),[Qe,tt]=j.useState(!1),[Tt,yt]=j.useState(0),[lr,Mn]=j.useState(0),Gt=j.useRef(c.duration||z||Ou),ur=j.useRef(null),Je=j.useRef(null),Wi=_===0,Es=_+1<=E,lt=c.type,gn=c.dismissible!==!1,Ts=c.className||"",ys=c.descriptionClassName||"",W=j.useMemo(()=>k.findIndex(me=>me.toastId===c.id)||0,[k,c.id]),ne=j.useMemo(()=>{var me;return(me=c.closeButton)!=null?me:I},[c.closeButton,I]),fe=j.useMemo(()=>c.duration||z||Ou,[c.duration,z]),Ee=j.useRef(0),we=j.useRef(0),ft=j.useRef(0),ht=j.useRef(null),[Ut,Bn]=x.split("-"),bn=j.useMemo(()=>k.reduce((me,Ye,rt)=>rt>=W?me:me+Ye.height,0),[k,W]),nt=pT(),En=c.invert||d,xt=lt==="loading";we.current=j.useMemo(()=>W*L+bn,[W,bn]),j.useEffect(()=>{Gt.current=fe},[fe]),j.useEffect(()=>{he(!0)},[]),j.useEffect(()=>{const me=Je.current;if(me){const Ye=me.getBoundingClientRect().height;return Mn(Ye),m(rt=>[{toastId:c.id,height:Ye,position:c.position},...rt]),()=>m(rt=>rt.filter(_t=>_t.toastId!==c.id))}},[m,c.id]),j.useLayoutEffect(()=>{if(!w)return;const me=Je.current,Ye=me.style.height;me.style.height="auto";const rt=me.getBoundingClientRect().height;me.style.height=Ye,Mn(rt),m(_t=>_t.find(Ze=>Ze.toastId===c.id)?_t.map(Ze=>Ze.toastId===c.id?{...Ze,height:rt}:Ze):[{toastId:c.id,height:rt,position:c.position},..._t])},[w,c.title,c.description,m,c.id,c.jsx,c.action,c.cancel]);const Tn=j.useCallback(()=>{de(!0),yt(we.current),m(me=>me.filter(Ye=>Ye.toastId!==c.id)),setTimeout(()=>{F(c)},ST)},[c,F,m,we]);j.useEffect(()=>{if(c.promise&&lt==="loading"||c.duration===1/0||c.type==="loading")return;let me;return C||h||nt?(()=>{if(ft.current<Ee.current){const _t=new Date().getTime()-Ee.current;Gt.current=Gt.current-_t}ft.current=new Date().getTime()})():(()=>{Gt.current!==1/0&&(Ee.current=new Date().getTime(),me=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Tn()},Gt.current))})(),()=>clearTimeout(me)},[C,h,c,lt,nt,Tn]),j.useEffect(()=>{c.delete&&(Tn(),c.onDismiss==null||c.onDismiss.call(c,c))},[Tn,c.delete]);function Dm(){var me;if(P!=null&&P.loading){var Ye;return j.createElement("div",{className:Kt(D==null?void 0:D.loader,c==null||(Ye=c.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":lt==="loading"},P.loading)}return j.createElement(lT,{className:Kt(D==null?void 0:D.loader,c==null||(me=c.classNames)==null?void 0:me.loader),visible:lt==="loading"})}const Pm=c.icon||(P==null?void 0:P[lt])||sT(lt);var tu,nu;return j.createElement("li",{tabIndex:0,ref:Je,className:Kt(O,Ts,D==null?void 0:D.toast,c==null||(t=c.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[lt],c==null||(n=c.classNames)==null?void 0:n[lt]),"data-sonner-toast":"","data-rich-colors":(tu=c.richColors)!=null?tu:H,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":w,"data-promise":!!c.promise,"data-swiped":Qe,"data-removed":ue,"data-visible":Es,"data-y-position":Ut,"data-x-position":Bn,"data-index":_,"data-front":Wi,"data-swiping":He,"data-dismissible":gn,"data-type":lt,"data-invert":En,"data-swipe-out":ke,"data-swipe-direction":ie,"data-expanded":!!(C||v&&w),"data-testid":c.testId,style:{"--index":_,"--toasts-before":_,"--z-index":N.length-_,"--offset":`${ue?Tt:we.current}px`,"--initial-height":v?"auto":`${lr}px`,...V,...c.style},onDragEnd:()=>{be(!1),T(null),ht.current=null},onPointerDown:me=>{me.button!==2&&(xt||!gn||(ur.current=new Date,yt(we.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(be(!0),ht.current={x:me.clientX,y:me.clientY})))},onPointerUp:()=>{var me,Ye,rt;if(ke||!gn)return;ht.current=null;const _t=Number(((me=Je.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Yi=Number(((Ye=Je.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ze=new Date().getTime()-((rt=ur.current)==null?void 0:rt.getTime()),Lt=J==="x"?_t:Yi,qi=Math.abs(Lt)/Ze;if(Math.abs(Lt)>=CT||qi>.11){yt(we.current),c.onDismiss==null||c.onDismiss.call(c,c),te(J==="x"?_t>0?"right":"left":Yi>0?"down":"up"),Tn(),Xe(!0);return}else{var jt,zt;(jt=Je.current)==null||jt.style.setProperty("--swipe-amount-x","0px"),(zt=Je.current)==null||zt.style.setProperty("--swipe-amount-y","0px")}tt(!1),be(!1),T(null)},onPointerMove:me=>{var Ye,rt,_t;if(!ht.current||!gn||((Ye=window.getSelection())==null?void 0:Ye.toString().length)>0)return;const Ze=me.clientY-ht.current.y,Lt=me.clientX-ht.current.x;var qi;const jt=(qi=e.swipeDirections)!=null?qi:NT(x);!J&&(Math.abs(Lt)>1||Math.abs(Ze)>1)&&T(Math.abs(Lt)>Math.abs(Ze)?"x":"y");let zt={x:0,y:0};const ru=Fn=>1/(1.5+Math.abs(Fn)/20);if(J==="y"){if(jt.includes("top")||jt.includes("bottom"))if(jt.includes("top")&&Ze<0||jt.includes("bottom")&&Ze>0)zt.y=Ze;else{const Fn=Ze*ru(Ze);zt.y=Math.abs(Fn)<Math.abs(Ze)?Fn:Ze}}else if(J==="x"&&(jt.includes("left")||jt.includes("right")))if(jt.includes("left")&&Lt<0||jt.includes("right")&&Lt>0)zt.x=Lt;else{const Fn=Lt*ru(Lt);zt.x=Math.abs(Fn)<Math.abs(Lt)?Fn:Lt}(Math.abs(zt.x)>0||Math.abs(zt.y)>0)&&tt(!0),(rt=Je.current)==null||rt.style.setProperty("--swipe-amount-x",`${zt.x}px`),(_t=Je.current)==null||_t.style.setProperty("--swipe-amount-y",`${zt.y}px`)}},ne&&!c.jsx&&lt!=="loading"?j.createElement("button",{"aria-label":q,"data-disabled":xt,"data-close-button":!0,onClick:xt||!gn?()=>{}:()=>{Tn(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Kt(D==null?void 0:D.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(nu=P==null?void 0:P.close)!=null?nu:hT):null,(lt||c.icon||c.promise)&&c.icon!==null&&((P==null?void 0:P[lt])!==null||c.icon)?j.createElement("div",{"data-icon":"",className:Kt(D==null?void 0:D.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Dm():null,c.type!=="loading"?Pm:null):null,j.createElement("div",{"data-content":"",className:Kt(D==null?void 0:D.content,c==null||(a=c.classNames)==null?void 0:a.content)},j.createElement("div",{"data-title":"",className:Kt(D==null?void 0:D.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?j.createElement("div",{"data-description":"",className:Kt(K,ys,D==null?void 0:D.description,c==null||(o=c.classNames)==null?void 0:o.description)},typeof c.description=="function"?c.description():c.description):null),j.isValidElement(c.cancel)?c.cancel:c.cancel&&Zi(c.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||U,onClick:me=>{Zi(c.cancel)&&gn&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,me),Tn())},className:Kt(D==null?void 0:D.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,j.isValidElement(c.action)?c.action:c.action&&Zi(c.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||Q,onClick:me=>{Zi(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,me),!me.defaultPrevented&&Tn())},className:Kt(D==null?void 0:D.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Lu(){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 RT(e,t){const n={};return[e,t].forEach((r,i)=>{const a=i===1,s=a?"--mobile-offset":"--offset",o=a?kT:_T;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${s}-${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[`${s}-${u}`]=o:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(o)}),n}const e4=j.forwardRef(function(t,n){const{id:r,invert:i,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:l,className:u,offset:d,mobileOffset:c,theme:p="light",richColors:h,duration:m,style:E,visibleToasts:k=xT,toastOptions:_,dir:N=Lu(),gap:C=wT,icons:F,containerAriaLabel:H="Notifications"}=t,[I,V]=j.useState([]),U=j.useMemo(()=>r?I.filter(w=>w.toasterId===r):I.filter(w=>!w.toasterId),[I,r]),Q=j.useMemo(()=>Array.from(new Set([a].concat(U.filter(w=>w.position).map(w=>w.position)))),[U,a]),[O,K]=j.useState([]),[z,x]=j.useState(!1),[L,v]=j.useState(!1),[D,P]=j.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=j.useRef(null),J=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=j.useRef(null),ie=j.useRef(!1),te=j.useCallback(w=>{V(he=>{var ue;return(ue=he.find(de=>de.id===w.id))!=null&&ue.delete||gt.dismiss(w.id),he.filter(({id:de})=>de!==w.id)})},[]);return j.useEffect(()=>gt.subscribe(w=>{if(w.dismiss){requestAnimationFrame(()=>{V(he=>he.map(ue=>ue.id===w.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{Fm.flushSync(()=>{V(he=>{const ue=he.findIndex(de=>de.id===w.id);return ue!==-1?[...he.slice(0,ue),{...he[ue],...w},...he.slice(ue+1)]:[w,...he]})})})}),[I]),j.useEffect(()=>{if(p!=="system"){P(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),typeof window>"u")return;const w=window.matchMedia("(prefers-color-scheme: dark)");try{w.addEventListener("change",({matches:he})=>{P(he?"dark":"light")})}catch{w.addListener(({matches:ue})=>{try{P(ue?"dark":"light")}catch(de){console.error(de)}})}},[p]),j.useEffect(()=>{I.length<=1&&x(!1)},[I]),j.useEffect(()=>{const w=he=>{var ue;if(s.every(be=>he[be]||he.code===be)){var He;x(!0),(He=q.current)==null||He.focus()}he.code==="Escape"&&(document.activeElement===q.current||(ue=q.current)!=null&&ue.contains(document.activeElement))&&x(!1)};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[s]),j.useEffect(()=>{if(q.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,ie.current=!1)}},[q.current]),j.createElement("section",{ref:n,"aria-label":`${H} ${J}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((w,he)=>{var ue;const[de,He]=w.split("-");return U.length?j.createElement("ol",{key:w,dir:N==="auto"?Lu():N,tabIndex:-1,ref:q,className:u,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":de,"data-x-position":He,style:{"--front-toast-height":`${((ue=O[0])==null?void 0:ue.height)||0}px`,"--width":`${AT}px`,"--gap":`${C}px`,...E,...RT(d,c)},onBlur:be=>{ie.current&&!be.currentTarget.contains(be.relatedTarget)&&(ie.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||ie.current||(ie.current=!0,T.current=be.relatedTarget)},onMouseEnter:()=>x(!0),onMouseMove:()=>x(!0),onMouseLeave:()=>{L||x(!1)},onDragEnd:()=>x(!1),onPointerDown:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||v(!0)},onPointerUp:()=>v(!1)},U.filter(be=>!be.position&&he===0||be.position===w).map((be,ke)=>{var Xe,Qe;return j.createElement(IT,{key:be.id,icons:F,index:ke,toast:be,defaultRichColors:h,duration:(Xe=_==null?void 0:_.duration)!=null?Xe:m,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:i,visibleToasts:k,closeButton:(Qe=_==null?void 0:_.closeButton)!=null?Qe:l,interacting:L,position:w,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:te,toasts:U.filter(tt=>tt.position==be.position),heights:O.filter(tt=>tt.position==be.position),setHeights:K,expandByDefault:o,gap:C,expanded:z,swipeDirections:t.swipeDirections})})):null}))});function vu({className:e,style:t,...n}){return g.jsx("div",{...n,className:Zb("rounded-md",e),style:{backgroundColor:"var(--ds-gray-200)",...t}})}const vi=(function(e){if(e==null)return DT;if(typeof e=="function")return Za(e);if(typeof e=="object")return Array.isArray(e)?OT(e):LT(e);if(typeof e=="string")return vT(e);throw new Error("Expected function, string, or object as test")});function OT(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vi(e[n]);return Za(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function LT(e){const t=e;return Za(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function vT(e){return Za(t);function t(n){return n&&n.type===e}}function Za(e){return t;function t(n,r,i){return!!(PT(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function DT(){return!0}function PT(e){return e!==null&&typeof e=="object"&&"type"in e}const hh=[],Qr=!0,ho=!1,Jr="skip";function MT(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=vi(i),s=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 h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=hh,m,E,k;if((!t||a(l,u,d[d.length-1]||void 0))&&(h=BT(n(l,d)),h[0]===ho))return h;if("children"in l&&l.children){const _=l;if(_.children&&h[0]!==Jr)for(E=(r?_.children.length:-1)+s,k=d.concat(_);E>-1&&E<_.children.length;){const N=_.children[E];if(m=o(N,E,k)(),m[0]===ho)return m;E=typeof m[1]=="number"?m[1]:E+s}}return h}}}function BT(e){return Array.isArray(e)?e:typeof e=="number"?[Qr,e]:e==null?hh:[e]}function Ln(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),MT(e,a,o,i);function o(l,u){const d=u[u.length-1],c=d?d.children.indexOf(l):void 0;return s(l,c,d)}}const wr={indicator:"indicator",textOnly:"text-only",remove:"remove"};function FT({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:o=wr.indicator,imageBlockPolicy:l=wr.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 p=VT(e,t,n,r,i,a,s,o,l);ph(c),Ln(c,p)}}function Du(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 HT(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const UT=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),jT=new Set(["javascript:","data:","file:","vbscript:"]);function Pu(e,t,n,r=!1,i=!1,a=[]){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 s=Du(e,n);if(!s||jT.has(s.protocol)||!(UT.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const l=HT(e);return s&&t.some(u=>{const d=Du(u,n);return!d||d.origin!==s.origin?!1:s.href.startsWith(d.href)})?l?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:l?s.pathname+s.search+s.hash:s.href:null}function ph(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)ph(t)}}const Ss=Symbol("node-seen");function zT(e,t,n){return t===wr.remove?{type:"remove"}:t===wr.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function $T(e,t,n){if(t===wr.remove)return{type:"remove"};if(t===wr.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const VT=(e,t,n,r,i,a,s,o,l)=>{const u=(d,c,p)=>{if(d.type!=="element"||d[Ss])return Qr;if(d.tagName==="a"){const h=Pu(d.properties.href,t,e,!1,!1,i);if(h===null){if(d[Ss]=!0,Ln(d,u),p&&typeof c=="number"){const m=zT(d,o,s);if(m.type==="remove")return p.children.splice(c,1),[Jr,c];p.children[c]=m.element}return Jr}else return d.properties.href=h,d.properties.target="_blank",d.properties.rel="noopener noreferrer",Qr}if(d.tagName==="img"){const h=Pu(d.properties.src,n,e,r,!0,i);if(h===null){if(d[Ss]=!0,Ln(d,u),p&&typeof c=="number"){const m=$T(d,l,a);if(m.type==="remove")return p.children.splice(c,1),[Jr,c];p.children[c]=m.element}return Jr}else return d.properties.src=h,Qr}return Qr};return u},mh=-1,es=0,ri=1,va=2,cl=3,dl=4,fl=5,hl=6,gh=7,bh=8,Mu=typeof self=="object"?self:globalThis,WT=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case es:case mh:return n(s,i);case ri:{const o=n([],i);for(const l of s)o.push(r(l));return o}case va:{const o=n({},i);for(const[l,u]of s)o[r(l)]=r(u);return o}case cl:return n(new Date(s),i);case dl:{const{source:o,flags:l}=s;return n(new RegExp(o,l),i)}case fl:{const o=n(new Map,i);for(const[l,u]of s)o.set(r(l),r(u));return o}case hl:{const o=n(new Set,i);for(const l of s)o.add(r(l));return o}case gh:{const{name:o,message:l}=s;return n(new Mu[o](l),i)}case bh:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(new Mu[a](s),i)};return r},Bu=e=>WT(new Map,e)(0),cr="",{toString:YT}={},{keys:qT}=Object,Fr=e=>{const t=typeof e;if(t!=="object"||!e)return[es,t];const n=YT.call(e).slice(8,-1);switch(n){case"Array":return[ri,cr];case"Object":return[va,cr];case"Date":return[cl,cr];case"RegExp":return[dl,cr];case"Map":return[fl,cr];case"Set":return[hl,cr];case"DataView":return[ri,n]}return n.includes("Array")?[ri,n]:n.includes("Error")?[gh,n]:[va,n]},ea=([e,t])=>e===es&&(t==="function"||t==="symbol"),GT=(e,t,n,r)=>{const i=(s,o)=>{const l=r.push(s)-1;return n.set(o,l),l},a=s=>{if(n.has(s))return n.get(s);let[o,l]=Fr(s);switch(o){case es:{let d=s;switch(l){case"bigint":o=bh,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return i([mh],s)}return i([o,d],s)}case ri:{if(l){let p=s;return l==="DataView"?p=new Uint8Array(s.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(s)),i([l,[...p]],s)}const d=[],c=i([o,d],s);for(const p of s)d.push(a(p));return c}case va:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],c=i([o,d],s);for(const p of qT(s))(e||!ea(Fr(s[p])))&&d.push([a(p),a(s[p])]);return c}case cl:return i([o,s.toISOString()],s);case dl:{const{source:d,flags:c}=s;return i([o,{source:d,flags:c}],s)}case fl:{const d=[],c=i([o,d],s);for(const[p,h]of s)(e||!(ea(Fr(p))||ea(Fr(h))))&&d.push([a(p),a(h)]);return c}case hl:{const d=[],c=i([o,d],s);for(const p of s)(e||!ea(Fr(p)))&&d.push(a(p));return c}}const{message:u}=s;return i([o,{name:l,message:u}],s)};return a},Fu=(e,{json:t,lossy:n}={})=>{const r=[];return GT(!(t||n),!!t,new Map,r)(e),r},Xn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Bu(Fu(e,t)):structuredClone(e):(e,t)=>Bu(Fu(e,t));let Di=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Di.prototype.normal={};Di.prototype.property={};Di.prototype.space=void 0;function Eh(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Di(n,r,t)}function xi(e){return e.toLowerCase()}let Et=class{constructor(t,n){this.attribute=n,this.property=t}};Et.prototype.attribute="";Et.prototype.booleanish=!1;Et.prototype.boolean=!1;Et.prototype.commaOrSpaceSeparated=!1;Et.prototype.commaSeparated=!1;Et.prototype.defined=!1;Et.prototype.mustUseProperty=!1;Et.prototype.number=!1;Et.prototype.overloadedBoolean=!1;Et.prototype.property="";Et.prototype.spaceSeparated=!1;Et.prototype.space=void 0;let KT=0;const ge=rr(),Ue=rr(),po=rr(),Z=rr(),Oe=rr(),yr=rr(),At=rr();function rr(){return 2**++KT}const mo=Object.freeze(Object.defineProperty({__proto__:null,boolean:ge,booleanish:Ue,commaOrSpaceSeparated:At,commaSeparated:yr,number:Z,overloadedBoolean:po,spaceSeparated:Oe},Symbol.toStringTag,{value:"Module"})),Ns=Object.keys(mo);let pl=class extends Et{constructor(t,n,r,i){let a=-1;if(super(t,n),Hu(this,"space",i),typeof r=="number")for(;++a<Ns.length;){const s=Ns[a];Hu(this,Ns[a],(r&mo[s])===mo[s])}}};pl.prototype.defined=!0;function Hu(e,t,n){n&&(e[t]=n)}function Rr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new pl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[xi(r)]=r,n[xi(a.attribute)]=r}return new Di(t,n,e.space)}const Th=Rr({properties:{ariaActiveDescendant:null,ariaAtomic:Ue,ariaAutoComplete:null,ariaBusy:Ue,ariaChecked:Ue,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:Ue,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:Ue,ariaFlowTo:Oe,ariaGrabbed:Ue,ariaHasPopup:null,ariaHidden:Ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:Z,ariaLive:null,ariaModal:Ue,ariaMultiLine:Ue,ariaMultiSelectable:Ue,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:Ue,ariaReadOnly:Ue,ariaRelevant:null,ariaRequired:Ue,ariaRoleDescription:Oe,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:Ue,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function yh(e,t){return t in e?e[t]:t}function xh(e,t){return yh(e,t.toLowerCase())}const XT=Rr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yr,acceptCharset:Oe,accessKey:Oe,action:null,allow:null,allowFullScreen:ge,allowPaymentRequest:ge,allowUserMedia:ge,alt:null,as:null,async:ge,autoCapitalize:null,autoComplete:Oe,autoFocus:ge,autoPlay:ge,blocking:Oe,capture:null,charSet:null,checked:ge,cite:null,className:Oe,cols:Z,colSpan:null,content:null,contentEditable:Ue,controls:ge,controlsList:Oe,coords:Z|yr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ge,defer:ge,dir:null,dirName:null,disabled:ge,download:po,draggable:Ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ge,formTarget:null,headers:Oe,height:Z,hidden:po,high:Z,href:null,hrefLang:null,htmlFor:Oe,httpEquiv:Oe,id:null,imageSizes:null,imageSrcSet:null,inert:ge,inputMode:null,integrity:null,is:null,isMap:ge,itemId:null,itemProp:Oe,itemRef:Oe,itemScope:ge,itemType:Oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ge,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:ge,muted:ge,name:null,nonce:null,noModule:ge,noValidate:ge,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:ge,optimum:Z,pattern:null,ping:Oe,placeholder:null,playsInline:ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ge,referrerPolicy:null,rel:Oe,required:ge,reversed:ge,rows:Z,rowSpan:Z,sandbox:Oe,scope:null,scoped:ge,seamless:ge,selected:ge,shadowRootClonable:ge,shadowRootDelegatesFocus:ge,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:Ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:ge,useMap:null,value:Ue,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ge,declare:ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:ge,noHref:ge,noShade:ge,noWrap:ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:Ue,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ge,disableRemotePlayback:ge,prefix:null,property:null,results:Z,security:null,unselectable:null},space:"html",transform:xh}),QT=Rr({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:At,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Oe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:yr,g2:yr,glyphName:yr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:At,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:At,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:At,rev:At,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:At,requiredFeatures:At,requiredFonts:At,requiredFormats:At,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:At,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:At,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:At,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yh}),_h=Rr({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()}}),kh=Rr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:xh}),Ah=Rr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),JT={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"},ZT=/[A-Z]/g,Uu=/-[a-z]/g,ey=/^data[-\w.:]+$/i;function ml(e,t){const n=xi(t);let r=t,i=Et;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ey.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Uu,ny);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Uu.test(a)){let s=a.replace(ZT,ty);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=pl}return new i(r,t)}function ty(e){return"-"+e.toLowerCase()}function ny(e){return e.charAt(1).toUpperCase()}const ts=Eh([Th,XT,_h,kh,Ah],"html"),Or=Eh([Th,QT,_h,kh,Ah],"svg");function ju(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function wh(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zu=/[#.]/g;function ry(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){zu.lastIndex=i;const o=zu.exec(n),l=n.slice(i,o?o.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,i+=l.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function $u(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ch(e){return e.join(" ").trim()}function Sh(e,t,n){const r=n?oy(n):void 0;function i(a,s,...o){let l;if(a==null){l={type:"root",children:[]};const u=s;o.unshift(u)}else{l=ry(a,t);const u=l.tagName.toLowerCase(),d=r?r.get(u):void 0;if(l.tagName=d||u,iy(s))o.unshift(s);else for(const[c,p]of Object.entries(s))ay(e,l.properties,c,p)}for(const u of o)go(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function iy(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 a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function ay(e,t,n,r){const i=ml(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=$u(r):i.commaSeparated?a=ju(r):i.commaOrSpaceSeparated?a=$u(ju(r).join(" ")):a=Vu(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?sy(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(Vu(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function go(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)go(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?go(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Vu(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||xi(n)===xi(t)))return!0}return n}function sy(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function oy(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const ly=["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"],uy=Sh(ts,"div"),cy=Sh(Or,"g",ly);function dy(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const l=Wu(t,n[s-1]);o=l===-1?t.length+1:l+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],l=Wu(t,o),u=l===-1?t.length+1:l+1;if(o===u)break;n.push(u)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Wu(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 Wn={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/"},Nh={}.hasOwnProperty,fy=Object.prototype;function hy(e,t){const n=t||{};return gl({file:n.file||void 0,location:!1,schema:n.space==="svg"?Or:ts,verbose:n.verbose||!1},e)}function gl(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ta(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:Ih(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=dy(a),o=s.toPoint(0),l=s.toPoint(a.length);n.position={start:o,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Ta(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ta(e,r,n),n}default:return n=py(e,t),n}}function Ih(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=gl(e,t[n]);r.push(i)}return r}function py(e,t){const n=e.schema;e.schema=t.namespaceURI===Wn.svg?Or:ts;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],l=(o.prefix?o.prefix+":":"")+o.name;Nh.call(fy,l)||(i[l]=o.value)}const s=(e.schema.space==="svg"?cy:uy)(t.tagName,i,Ih(e,t.childNodes));if(Ta(e,t,s),s.tagName==="template"){const o=t,l=o.sourceCodeLocation,u=l&&l.startTag&&br(l.startTag),d=l&&l.endTag&&br(l.endTag),c=gl(e,o.content);u&&d&&e.file&&(c.position={start:u.end,end:d.start}),s.content=c}return e.schema=n,s}function Ta(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=my(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function my(e,t,n){const r=br(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 a={};let s;if(n.attrs)for(s in n.attrs)Nh.call(n.attrs,s)&&(a[ml(e.schema,s).property]=br(n.attrs[s]));n.startTag;const o=br(n.startTag),l=n.endTag?br(n.endTag):void 0,u={opening:o};l&&(u.closing=l),u.properties=a,t.data={position:u}}}return r}function br(e){const t=Yu({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Yu({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Yu(e){return e.line&&e.column?e:void 0}class Pi{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Pi.prototype.property={};Pi.prototype.normal={};Pi.prototype.space=null;function Rh(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 Pi(n,r,t)}function bo(e){return e.toLowerCase()}class Ht{constructor(t,n){this.property=t,this.attribute=n}}Ht.prototype.space=null;Ht.prototype.boolean=!1;Ht.prototype.booleanish=!1;Ht.prototype.overloadedBoolean=!1;Ht.prototype.number=!1;Ht.prototype.commaSeparated=!1;Ht.prototype.spaceSeparated=!1;Ht.prototype.commaOrSpaceSeparated=!1;Ht.prototype.mustUseProperty=!1;Ht.prototype.defined=!1;let gy=0;const pe=ir(),je=ir(),Oh=ir(),ee=ir(),Le=ir(),xr=ir(),wt=ir();function ir(){return 2**++gy}const Eo=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:je,commaOrSpaceSeparated:wt,commaSeparated:xr,number:ee,overloadedBoolean:Oh,spaceSeparated:Le},Symbol.toStringTag,{value:"Module"})),Is=Object.keys(Eo);class bl extends Ht{constructor(t,n,r,i){let a=-1;if(super(t,n),qu(this,"space",i),typeof r=="number")for(;++a<Is.length;){const s=Is[a];qu(this,Is[a],(r&Eo[s])===Eo[s])}}}bl.prototype.defined=!0;function qu(e,t,n){n&&(e[t]=n)}const by={}.hasOwnProperty;function Lr(e){const t={},n={};let r;for(r in e.properties)if(by.call(e.properties,r)){const i=e.properties[r],a=new bl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[bo(r)]=r,n[bo(a.attribute)]=r}return new Pi(t,n,e.space)}const Lh=Lr({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}}),vh=Lr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Dh(e,t){return t in e?e[t]:t}function Ph(e,t){return Dh(e,t.toLowerCase())}const Mh=Lr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ph,properties:{xmlns:null,xmlnsXLink:null}}),Bh=Lr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:je,ariaAutoComplete:null,ariaBusy:je,ariaChecked:je,ariaColCount:ee,ariaColIndex:ee,ariaColSpan:ee,ariaControls:Le,ariaCurrent:null,ariaDescribedBy:Le,ariaDetails:null,ariaDisabled:je,ariaDropEffect:Le,ariaErrorMessage:null,ariaExpanded:je,ariaFlowTo:Le,ariaGrabbed:je,ariaHasPopup:null,ariaHidden:je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Le,ariaLevel:ee,ariaLive:null,ariaModal:je,ariaMultiLine:je,ariaMultiSelectable:je,ariaOrientation:null,ariaOwns:Le,ariaPlaceholder:null,ariaPosInSet:ee,ariaPressed:je,ariaReadOnly:je,ariaRelevant:null,ariaRequired:je,ariaRoleDescription:Le,ariaRowCount:ee,ariaRowIndex:ee,ariaRowSpan:ee,ariaSelected:je,ariaSetSize:ee,ariaSort:null,ariaValueMax:ee,ariaValueMin:ee,ariaValueNow:ee,ariaValueText:null,role:null}}),Ey=Lr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ph,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xr,acceptCharset:Le,accessKey:Le,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:Le,autoFocus:pe,autoPlay:pe,blocking:Le,capture:null,charSet:null,checked:pe,cite:null,className:Le,cols:ee,colSpan:null,content:null,contentEditable:je,controls:pe,controlsList:Le,coords:ee|xr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:Oh,draggable:je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Le,height:ee,hidden:pe,high:ee,href:null,hrefLang:null,htmlFor:Le,httpEquiv:Le,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:Le,itemRef:Le,itemScope:pe,itemType:Le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:ee,manifest:null,max:null,maxLength:ee,media:null,method:null,min:null,minLength:ee,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,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:pe,optimum:ee,pattern:null,ping:Le,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:Le,required:pe,reversed:pe,rows:ee,rowSpan:ee,sandbox:Le,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:ee,sizes:null,slot:null,span:ee,spellCheck:je,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ee,step:null,style:null,tabIndex:ee,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:je,width:ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Le,axis:null,background:null,bgColor:null,border:ee,borderColor:null,bottomMargin:ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:ee,leftMargin:ee,link:null,longDesc:null,lowSrc:null,marginHeight:ee,marginWidth:ee,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:ee,rules:null,scheme:null,scrolling:je,standby:null,summary:null,text:null,topMargin:ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:ee,security:null,unselectable:null}}),Ty=Lr({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:Dh,properties:{about:wt,accentHeight:ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ee,amplitude:ee,arabicForm:null,ascent:ee,attributeName:null,attributeType:null,azimuth:ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ee,by:null,calcMode:null,capHeight:ee,className:Le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ee,diffuseConstant:ee,direction:null,display:null,dur:null,divisor:ee,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ee,enableBackground:null,end:null,event:null,exponent:ee,externalResourcesRequired:null,fill:null,fillOpacity:ee,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:xr,g2:xr,glyphName:xr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ee,horizOriginX:ee,horizOriginY:ee,id:null,ideographic:ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ee,k:ee,k1:ee,k2:ee,k3:ee,k4:ee,kernelMatrix:wt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ee,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:ee,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:ee,overlineThickness:ee,paintOrder:null,panose1:null,path:null,pathLength:ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ee,pointsAtY:ee,pointsAtZ:ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wt,rev:wt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wt,requiredFeatures:wt,requiredFonts:wt,requiredFormats:wt,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:ee,specularExponent:ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ee,strikethroughThickness:ee,string:null,stroke:null,strokeDashArray:wt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ee,strokeOpacity:ee,strokeWidth:null,style:null,surfaceScale:ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wt,tabIndex:ee,tableValues:null,target:null,targetX:ee,targetY:ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ee,underlineThickness:ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ee,values:null,vAlphabetic:ee,vMathematical:ee,vectorEffect:null,vHanging:ee,vIdeographic:ee,version:null,vertAdvY:ee,vertOriginX:ee,vertOriginY:ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),yy=/^data[-\w.:]+$/i,Gu=/-[a-z]/g,xy=/[A-Z]/g;function _y(e,t){const n=bo(t);let r=t,i=Ht;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yy.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Gu,Ay);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Gu.test(a)){let s=a.replace(xy,ky);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=bl}return new i(r,t)}function ky(e){return"-"+e.toLowerCase()}function Ay(e){return e.charAt(1).toUpperCase()}const wy=Rh([vh,Lh,Mh,Bh,Ey],"html"),Fh=Rh([vh,Lh,Mh,Bh,Ty],"svg"),Ku={}.hasOwnProperty;function Hh(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&Ku.call(i,e)){const l=String(i[e]);s=Ku.call(o,l)?o[l]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Cy={},Sy={}.hasOwnProperty,Uh=Hh("type",{handlers:{root:Iy,element:Dy,text:Ly,comment:vy,doctype:Oy}});function Ny(e,t){const r=(t||Cy).space;return Uh(e,r==="svg"?Fh:wy)}function Iy(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=El(e.children,n,t),vr(e,n),n}function Ry(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=El(e.children,n,t),vr(e,n),n}function Oy(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return vr(e,t),t}function Ly(e){const t={nodeName:"#text",value:e.value,parentNode:null};return vr(e,t),t}function vy(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return vr(e,t),t}function Dy(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Fh);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Sy.call(e.properties,a)){const l=Py(r,a,e.properties[a]);l&&i.push(l)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Wn[s],childNodes:[],parentNode:null};return o.childNodes=El(e.children,o,r),vr(e,o),e.tagName==="template"&&e.content&&(o.content=Ry(e.content,r)),o}function Py(e,t,n){const r=_y(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?wh(n):Ch(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Wn[r.space]}return i}function El(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=Uh(e[r],n);a.parentNode=t,i.push(a)}return i}function vr(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 My=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],By=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]),De="�";var y;(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"})(y||(y={}));const pt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function jh(e){return e>=55296&&e<=57343}function Fy(e){return e>=56320&&e<=57343}function Hy(e,t){return(e-55296)*1024+9216+t}function zh(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function $h(e){return e>=64976&&e<=65007||By.has(e)}var $;(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"})($||($={}));const Uy=65536;class jy{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=Uy,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:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,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(Fy(n))return this.pos++,this._addGap(),Hy(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,y.EOF;return this._err($.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,y.EOF;const r=this.html.charCodeAt(n);return r===y.CARRIAGE_RETURN?y.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,y.EOF;let t=this.html.charCodeAt(this.pos);return t===y.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,y.LINE_FEED):t===y.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,jh(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===y.LINE_FEED||t===y.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){zh(t)?this._err($.controlCharacterInInputStream):$h(t)&&this._err($.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ye;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ye||(ye={}));function Vh(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 zy=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))),$y=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 Vy(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=$y.get(e))!==null&&t!==void 0?t:e}var Ke;(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"})(Ke||(Ke={}));const Wy=32;var Nn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Nn||(Nn={}));function To(e){return e>=Ke.ZERO&&e<=Ke.NINE}function Yy(e){return e>=Ke.UPPER_A&&e<=Ke.UPPER_F||e>=Ke.LOWER_A&&e<=Ke.LOWER_F}function qy(e){return e>=Ke.UPPER_A&&e<=Ke.UPPER_Z||e>=Ke.LOWER_A&&e<=Ke.LOWER_Z||To(e)}function Gy(e){return e===Ke.EQUALS||qy(e)}var qe;(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"})(qe||(qe={}));var fn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(fn||(fn={}));class Ky{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=qe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=fn.Strict}startEntity(t){this.decodeMode=t,this.state=qe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case qe.EntityStart:return t.charCodeAt(n)===Ke.NUM?(this.state=qe.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=qe.NamedEntity,this.stateNamedEntity(t,n));case qe.NumericStart:return this.stateNumericStart(t,n);case qe.NumericDecimal:return this.stateNumericDecimal(t,n);case qe.NumericHex:return this.stateNumericHex(t,n);case qe.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Wy)===Ke.LOWER_X?(this.state=qe.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=qe.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(To(i)||Yy(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(To(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===Ke.SEMI)this.consumed+=1;else if(this.decodeMode===fn.Strict)return 0;return this.emitCodePoint(Vy(this.result),this.consumed),this.errors&&(t!==Ke.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&Nn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Xy(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===fn.Attribute&&(a===0||Gy(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&Nn.VALUE_LENGTH)>>14,a!==0){if(s===Ke.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==fn.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]&Nn.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]&~Nn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case qe.NamedEntity:return this.result!==0&&(this.decodeMode!==fn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case qe.NumericDecimal:return this.emitNumericEntity(0,2);case qe.NumericHex:return this.emitNumericEntity(0,3);case qe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case qe.EntityStart:return 0}}}function Xy(e,t,n,r){const i=(t&Nn.BRANCH_LENGTH)>>7,a=t&Nn.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const l=r-a;return l<0||l>=i?-1:e[n+l]-1}let s=n,o=s+i-1;for(;s<=o;){const l=s+o>>>1,u=e[l];if(u<r)s=l+1;else if(u>r)o=l-1;else return e[l+i]}return-1}var G;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(G||(G={}));var Yn;(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"})(Yn||(Yn={}));var vt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(vt||(vt={}));var M;(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"})(M||(M={}));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 Qy=new Map([[M.A,f.A],[M.ADDRESS,f.ADDRESS],[M.ANNOTATION_XML,f.ANNOTATION_XML],[M.APPLET,f.APPLET],[M.AREA,f.AREA],[M.ARTICLE,f.ARTICLE],[M.ASIDE,f.ASIDE],[M.B,f.B],[M.BASE,f.BASE],[M.BASEFONT,f.BASEFONT],[M.BGSOUND,f.BGSOUND],[M.BIG,f.BIG],[M.BLOCKQUOTE,f.BLOCKQUOTE],[M.BODY,f.BODY],[M.BR,f.BR],[M.BUTTON,f.BUTTON],[M.CAPTION,f.CAPTION],[M.CENTER,f.CENTER],[M.CODE,f.CODE],[M.COL,f.COL],[M.COLGROUP,f.COLGROUP],[M.DD,f.DD],[M.DESC,f.DESC],[M.DETAILS,f.DETAILS],[M.DIALOG,f.DIALOG],[M.DIR,f.DIR],[M.DIV,f.DIV],[M.DL,f.DL],[M.DT,f.DT],[M.EM,f.EM],[M.EMBED,f.EMBED],[M.FIELDSET,f.FIELDSET],[M.FIGCAPTION,f.FIGCAPTION],[M.FIGURE,f.FIGURE],[M.FONT,f.FONT],[M.FOOTER,f.FOOTER],[M.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[M.FORM,f.FORM],[M.FRAME,f.FRAME],[M.FRAMESET,f.FRAMESET],[M.H1,f.H1],[M.H2,f.H2],[M.H3,f.H3],[M.H4,f.H4],[M.H5,f.H5],[M.H6,f.H6],[M.HEAD,f.HEAD],[M.HEADER,f.HEADER],[M.HGROUP,f.HGROUP],[M.HR,f.HR],[M.HTML,f.HTML],[M.I,f.I],[M.IMG,f.IMG],[M.IMAGE,f.IMAGE],[M.INPUT,f.INPUT],[M.IFRAME,f.IFRAME],[M.KEYGEN,f.KEYGEN],[M.LABEL,f.LABEL],[M.LI,f.LI],[M.LINK,f.LINK],[M.LISTING,f.LISTING],[M.MAIN,f.MAIN],[M.MALIGNMARK,f.MALIGNMARK],[M.MARQUEE,f.MARQUEE],[M.MATH,f.MATH],[M.MENU,f.MENU],[M.META,f.META],[M.MGLYPH,f.MGLYPH],[M.MI,f.MI],[M.MO,f.MO],[M.MN,f.MN],[M.MS,f.MS],[M.MTEXT,f.MTEXT],[M.NAV,f.NAV],[M.NOBR,f.NOBR],[M.NOFRAMES,f.NOFRAMES],[M.NOEMBED,f.NOEMBED],[M.NOSCRIPT,f.NOSCRIPT],[M.OBJECT,f.OBJECT],[M.OL,f.OL],[M.OPTGROUP,f.OPTGROUP],[M.OPTION,f.OPTION],[M.P,f.P],[M.PARAM,f.PARAM],[M.PLAINTEXT,f.PLAINTEXT],[M.PRE,f.PRE],[M.RB,f.RB],[M.RP,f.RP],[M.RT,f.RT],[M.RTC,f.RTC],[M.RUBY,f.RUBY],[M.S,f.S],[M.SCRIPT,f.SCRIPT],[M.SEARCH,f.SEARCH],[M.SECTION,f.SECTION],[M.SELECT,f.SELECT],[M.SOURCE,f.SOURCE],[M.SMALL,f.SMALL],[M.SPAN,f.SPAN],[M.STRIKE,f.STRIKE],[M.STRONG,f.STRONG],[M.STYLE,f.STYLE],[M.SUB,f.SUB],[M.SUMMARY,f.SUMMARY],[M.SUP,f.SUP],[M.TABLE,f.TABLE],[M.TBODY,f.TBODY],[M.TEMPLATE,f.TEMPLATE],[M.TEXTAREA,f.TEXTAREA],[M.TFOOT,f.TFOOT],[M.TD,f.TD],[M.TH,f.TH],[M.THEAD,f.THEAD],[M.TITLE,f.TITLE],[M.TR,f.TR],[M.TRACK,f.TRACK],[M.TT,f.TT],[M.U,f.U],[M.UL,f.UL],[M.SVG,f.SVG],[M.VAR,f.VAR],[M.WBR,f.WBR],[M.XMP,f.XMP]]);function Dr(e){var t;return(t=Qy.get(e))!==null&&t!==void 0?t:f.UNKNOWN}const X=f,Jy={[G.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[G.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[G.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[G.XLINK]:new Set,[G.XML]:new Set,[G.XMLNS]:new Set},yo=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);M.STYLE,M.SCRIPT,M.XMP,M.IFRAME,M.NOEMBED,M.NOFRAMES,M.PLAINTEXT;var A;(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"})(A||(A={}));const Fe={DATA:A.DATA,RCDATA:A.RCDATA,RAWTEXT:A.RAWTEXT,SCRIPT_DATA:A.SCRIPT_DATA,PLAINTEXT:A.PLAINTEXT,CDATA_SECTION:A.CDATA_SECTION};function Zy(e){return e>=y.DIGIT_0&&e<=y.DIGIT_9}function Zr(e){return e>=y.LATIN_CAPITAL_A&&e<=y.LATIN_CAPITAL_Z}function ex(e){return e>=y.LATIN_SMALL_A&&e<=y.LATIN_SMALL_Z}function An(e){return ex(e)||Zr(e)}function Xu(e){return An(e)||Zy(e)}function ta(e){return e+32}function Wh(e){return e===y.SPACE||e===y.LINE_FEED||e===y.TABULATION||e===y.FORM_FEED}function Qu(e){return Wh(e)||e===y.SOLIDUS||e===y.GREATER_THAN_SIGN}function tx(e){return e===y.NULL?$.nullCharacterReference:e>1114111?$.characterReferenceOutsideUnicodeRange:jh(e)?$.surrogateCharacterReference:$h(e)?$.noncharacterCharacterReference:zh(e)||e===y.CARRIAGE_RETURN?$.controlCharacterReference:null}class nx{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=A.DATA,this.returnState=A.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new jy(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ky(zy,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err($.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err($.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=tx(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:ye.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ye.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ye.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ye.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Vh(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($.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=Dr(t.tagName),t.type===ye.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err($.endTagWithAttributes),t.selfClosing&&this._err($.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case ye.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ye.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ye.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:ye.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Wh(t)?ye.WHITESPACE_CHARACTER:t===y.NULL?ye.NULL_CHARACTER:ye.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ye.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=A.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?fn.Attribute:fn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===A.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case A.DATA:{this._stateData(t);break}case A.RCDATA:{this._stateRcdata(t);break}case A.RAWTEXT:{this._stateRawtext(t);break}case A.SCRIPT_DATA:{this._stateScriptData(t);break}case A.PLAINTEXT:{this._statePlaintext(t);break}case A.TAG_OPEN:{this._stateTagOpen(t);break}case A.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case A.TAG_NAME:{this._stateTagName(t);break}case A.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case A.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case A.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case A.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case A.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case A.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case A.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case A.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case A.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case A.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case A.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case A.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case A.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case A.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case A.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case A.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case A.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case A.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case A.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case A.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case A.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case A.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case A.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case A.BOGUS_COMMENT:{this._stateBogusComment(t);break}case A.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case A.COMMENT_START:{this._stateCommentStart(t);break}case A.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case A.COMMENT:{this._stateComment(t);break}case A.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case A.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case A.COMMENT_END:{this._stateCommentEnd(t);break}case A.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case A.DOCTYPE:{this._stateDoctype(t);break}case A.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case A.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case A.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case A.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case A.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case A.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case A.CDATA_SECTION:{this._stateCdataSection(t);break}case A.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case A.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case A.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case A.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case y.LESS_THAN_SIGN:{this.state=A.TAG_OPEN;break}case y.AMPERSAND:{this._startCharacterReference();break}case y.NULL:{this._err($.unexpectedNullCharacter),this._emitCodePoint(t);break}case y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case y.AMPERSAND:{this._startCharacterReference();break}case y.LESS_THAN_SIGN:{this.state=A.RCDATA_LESS_THAN_SIGN;break}case y.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case y.LESS_THAN_SIGN:{this.state=A.RAWTEXT_LESS_THAN_SIGN;break}case y.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case y.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_LESS_THAN_SIGN;break}case y.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case y.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(An(t))this._createStartTagToken(),this.state=A.TAG_NAME,this._stateTagName(t);else switch(t){case y.EXCLAMATION_MARK:{this.state=A.MARKUP_DECLARATION_OPEN;break}case y.SOLIDUS:{this.state=A.END_TAG_OPEN;break}case y.QUESTION_MARK:{this._err($.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t);break}case y.EOF:{this._err($.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err($.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=A.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(An(t))this._createEndTagToken(),this.state=A.TAG_NAME,this._stateTagName(t);else switch(t){case y.GREATER_THAN_SIGN:{this._err($.missingEndTagName),this.state=A.DATA;break}case y.EOF:{this._err($.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err($.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=A.BEFORE_ATTRIBUTE_NAME;break}case y.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case y.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case y.NULL:{this._err($.unexpectedNullCharacter),n.tagName+=De;break}case y.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Zr(t)?ta(t):t)}}_stateRcdataLessThanSign(t){t===y.SOLIDUS?this.state=A.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){An(t)?(this.state=A.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=A.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 y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=A.BEFORE_ATTRIBUTE_NAME,!1;case y.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=A.SELF_CLOSING_START_TAG,!1;case y.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=A.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===y.SOLIDUS?this.state=A.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){An(t)?(this.state=A.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case y.SOLIDUS:{this.state=A.SCRIPT_DATA_END_TAG_OPEN;break}case y.EXCLAMATION_MARK:{this.state=A.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=A.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){An(t)?(this.state=A.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===y.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===y.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case y.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case y.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case y.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case y.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case y.NULL:{this._err($.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars(De);break}case y.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case y.HYPHEN_MINUS:{this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case y.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case y.NULL:{this._err($.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars(De);break}case y.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===y.SOLIDUS?this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:An(t)?(this._emitChars("<"),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){An(t)?(this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(pt.SCRIPT,!1)&&Qu(this.preprocessor.peek(pt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case y.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case y.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(De);break}case y.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case y.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case y.NULL:{this._err($.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(De);break}case y.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case y.HYPHEN_MINUS:{this._emitChars("-");break}case y.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case y.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case y.NULL:{this._err($.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(De);break}case y.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===y.SOLIDUS?(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(pt.SCRIPT,!1)&&Qu(this.preprocessor.peek(pt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.SOLIDUS:case y.GREATER_THAN_SIGN:case y.EOF:{this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case y.EQUALS_SIGN:{this._err($.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=A.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:case y.SOLIDUS:case y.GREATER_THAN_SIGN:case y.EOF:{this._leaveAttrName(),this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case y.EQUALS_SIGN:{this._leaveAttrName(),this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case y.QUOTATION_MARK:case y.APOSTROPHE:case y.LESS_THAN_SIGN:{this._err($.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case y.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.name+=De;break}default:this.currentAttr.name+=String.fromCodePoint(Zr(t)?ta(t):t)}}_stateAfterAttributeName(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case y.EQUALS_SIGN:{this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case y.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case y.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.QUOTATION_MARK:{this.state=A.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case y.APOSTROPHE:{this.state=A.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case y.GREATER_THAN_SIGN:{this._err($.missingAttributeValue),this.state=A.DATA,this.emitCurrentTagToken();break}default:this.state=A.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case y.QUOTATION_MARK:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case y.AMPERSAND:{this._startCharacterReference();break}case y.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=De;break}case y.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case y.APOSTROPHE:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case y.AMPERSAND:{this._startCharacterReference();break}case y.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=De;break}case y.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case y.AMPERSAND:{this._startCharacterReference();break}case y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case y.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=De;break}case y.QUOTATION_MARK:case y.APOSTROPHE:case y.LESS_THAN_SIGN:case y.EQUALS_SIGN:case y.GRAVE_ACCENT:{this._err($.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case y.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case y.SOLIDUS:{this._leaveAttrValue(),this.state=A.SELF_CLOSING_START_TAG;break}case y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case y.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._err($.missingWhitespaceBetweenAttributes),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case y.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=A.DATA,this.emitCurrentTagToken();break}case y.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._err($.unexpectedSolidusInTag),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case y.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case y.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case y.NULL:{this._err($.unexpectedNullCharacter),n.data+=De;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(pt.DASH_DASH,!0)?(this._createCommentToken(pt.DASH_DASH.length+1),this.state=A.COMMENT_START):this._consumeSequenceIfMatch(pt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(pt.DOCTYPE.length+1),this.state=A.DOCTYPE):this._consumeSequenceIfMatch(pt.CDATA_START,!0)?this.inForeignNode?this.state=A.CDATA_SECTION:(this._err($.cdataInHtmlContent),this._createCommentToken(pt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=A.BOGUS_COMMENT):this._ensureHibernation()||(this._err($.incorrectlyOpenedComment),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case y.HYPHEN_MINUS:{this.state=A.COMMENT_START_DASH;break}case y.GREATER_THAN_SIGN:{this._err($.abruptClosingOfEmptyComment),this.state=A.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=A.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case y.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case y.GREATER_THAN_SIGN:{this._err($.abruptClosingOfEmptyComment),this.state=A.DATA,this.emitCurrentComment(n);break}case y.EOF:{this._err($.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case y.HYPHEN_MINUS:{this.state=A.COMMENT_END_DASH;break}case y.LESS_THAN_SIGN:{n.data+="<",this.state=A.COMMENT_LESS_THAN_SIGN;break}case y.NULL:{this._err($.unexpectedNullCharacter),n.data+=De;break}case y.EOF:{this._err($.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case y.EXCLAMATION_MARK:{n.data+="!",this.state=A.COMMENT_LESS_THAN_SIGN_BANG;break}case y.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=A.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===y.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=A.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===y.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=A.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==y.GREATER_THAN_SIGN&&t!==y.EOF&&this._err($.nestedComment),this.state=A.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case y.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case y.EOF:{this._err($.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case y.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case y.EXCLAMATION_MARK:{this.state=A.COMMENT_END_BANG;break}case y.HYPHEN_MINUS:{n.data+="-";break}case y.EOF:{this._err($.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=A.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case y.HYPHEN_MINUS:{n.data+="--!",this.state=A.COMMENT_END_DASH;break}case y.GREATER_THAN_SIGN:{this._err($.incorrectlyClosedComment),this.state=A.DATA,this.emitCurrentComment(n);break}case y.EOF:{this._err($.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=A.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_NAME;break}case y.GREATER_THAN_SIGN:{this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case y.EOF:{this._err($.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingWhitespaceBeforeDoctypeName),this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Zr(t))this._createDoctypeToken(String.fromCharCode(ta(t))),this.state=A.DOCTYPE_NAME;else switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.NULL:{this._err($.unexpectedNullCharacter),this._createDoctypeToken(De),this.state=A.DOCTYPE_NAME;break}case y.GREATER_THAN_SIGN:{this._err($.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case y.EOF:{this._err($.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=A.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=A.AFTER_DOCTYPE_NAME;break}case y.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case y.NULL:{this._err($.unexpectedNullCharacter),n.name+=De;break}case y.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Zr(t)?ta(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case y.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(pt.PUBLIC,!1)?this.state=A.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(pt.SYSTEM,!1)?this.state=A.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err($.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case y.QUOTATION_MARK:{this._err($.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{this._err($.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case y.GREATER_THAN_SIGN:{this._err($.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case y.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.QUOTATION_MARK:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case y.GREATER_THAN_SIGN:{this._err($.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case y.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case y.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case y.NULL:{this._err($.unexpectedNullCharacter),n.publicId+=De;break}case y.GREATER_THAN_SIGN:{this._err($.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case y.EOF:{this._err($.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 y.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case y.NULL:{this._err($.unexpectedNullCharacter),n.publicId+=De;break}case y.GREATER_THAN_SIGN:{this._err($.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case y.EOF:{this._err($.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 y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case y.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case y.QUOTATION_MARK:{this._err($.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{this._err($.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case y.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case y.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case y.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case y.QUOTATION_MARK:{this._err($.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{this._err($.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case y.GREATER_THAN_SIGN:{this._err($.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case y.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case y.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case y.GREATER_THAN_SIGN:{this._err($.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case y.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case y.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case y.NULL:{this._err($.unexpectedNullCharacter),n.systemId+=De;break}case y.GREATER_THAN_SIGN:{this._err($.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case y.EOF:{this._err($.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 y.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case y.NULL:{this._err($.unexpectedNullCharacter),n.systemId+=De;break}case y.GREATER_THAN_SIGN:{this._err($.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case y.EOF:{this._err($.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 y.SPACE:case y.LINE_FEED:case y.TABULATION:case y.FORM_FEED:break;case y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case y.EOF:{this._err($.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err($.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case y.NULL:{this._err($.unexpectedNullCharacter);break}case y.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case y.RIGHT_SQUARE_BRACKET:{this.state=A.CDATA_SECTION_BRACKET;break}case y.EOF:{this._err($.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===y.RIGHT_SQUARE_BRACKET?this.state=A.CDATA_SECTION_END:(this._emitChars("]"),this.state=A.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case y.GREATER_THAN_SIGN:{this.state=A.DATA;break}case y.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=A.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(y.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Xu(this.preprocessor.peek(1))?A.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Xu(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===y.SEMICOLON&&this._err($.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Yh=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),Ju=new Set([...Yh,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),Da=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),rx=new Set([...Da,f.OL,f.UL]),ix=new Set([...Da,f.BUTTON]),Zu=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),ec=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),ax=new Set([f.TR,f.TEMPLATE,f.HTML]),sx=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),ox=new Set([f.TABLE,f.TEMPLATE,f.HTML]),lx=new Set([f.TD,f.TH]);class ux{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)===G.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const 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])!==G.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(yo,G.HTML)}popUntilTableCellPopped(){this.popUntilPopped(lx,G.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(ox,G.HTML)}clearBackToTableBodyContext(){this.clearBackTo(sx,G.HTML)}clearBackToTableRowContext(){this.clearBackTo(ax,G.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===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 G.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case G.SVG:{if(ec.has(i))return!1;break}case G.MATHML:{if(Zu.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Da)}hasInListItemScope(t){return this.hasInDynamicScope(t,rx)}hasInButtonScope(t){return this.hasInDynamicScope(t,ix)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case G.HTML:{if(yo.has(n))return!0;if(Da.has(n))return!1;break}case G.SVG:{if(ec.has(n))return!1;break}case G.MATHML:{if(Zu.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===G.HTML)switch(this.tagIDs[n]){case t:return!0;case 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])===G.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])===G.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&&Yh.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ju.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ju.has(this.currentTagId);)this.pop()}}const Rs=3;var Zt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Zt||(Zt={}));const tc={type:Zt.Marker};class cx{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Zt.Marker)break;const{element:u}=l;if(this.treeAdapter.getTagName(u)===a&&this.treeAdapter.getNamespaceURI(u)===s){const d=this.treeAdapter.getAttrList(u);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Rs)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Rs)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(l=>i.get(l.name)===l.value)&&(a+=1,a>=Rs&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(tc)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Zt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Zt.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(tc);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Zt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Zt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Zt.Element&&n.element===t)}}const wn={createDocument(){return{nodeName:"#document",mode:vt.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(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};wn.appendChild(e,a)}},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(wn.isTextNode(n)){n.value+=t;return}}wn.appendChild(e,wn.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&wn.isTextNode(r)?r.value+=t:wn.insertBefore(e,wn.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}}},qh="html",dx="about:legacy-compat",fx="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Gh=["+//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//"],hx=[...Gh,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],px=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Kh=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],mx=[...Kh,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function nc(e,t){return t.some(n=>e.startsWith(n))}function gx(e){return e.name===qh&&e.publicId===null&&(e.systemId===null||e.systemId===dx)}function bx(e){if(e.name!==qh)return vt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===fx)return vt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),px.has(n))return vt.QUIRKS;let r=t===null?hx:Gh;if(nc(n,r))return vt.QUIRKS;if(r=t===null?Kh:mx,nc(n,r))return vt.LIMITED_QUIRKS}return vt.NO_QUIRKS}const rc={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Ex="definitionurl",Tx="definitionURL",yx=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])),xx=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:G.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:G.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:G.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:G.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:G.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:G.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:G.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:G.XML}],["xml:space",{prefix:"xml",name:"space",namespace:G.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:G.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:G.XMLNS}]]),_x=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])),kx=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 Ax(e){const t=e.tagID;return t===f.FONT&&e.attrs.some(({name:r})=>r===Yn.COLOR||r===Yn.SIZE||r===Yn.FACE)||kx.has(t)}function Xh(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Ex){e.attrs[t].name=Tx;break}}function Qh(e){for(let t=0;t<e.attrs.length;t++){const n=yx.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Tl(e){for(let t=0;t<e.attrs.length;t++){const n=xx.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 wx(e){const t=_x.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Dr(e.tagName))}function Cx(e,t){return t===G.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}function Sx(e,t,n){if(t===G.MATHML&&e===f.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Yn.ENCODING){const i=n[r].value.toLowerCase();return i===rc.TEXT_HTML||i===rc.APPLICATION_XML}}return t===G.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}function Nx(e,t,n,r){return(!r||r===G.HTML)&&Sx(e,t,n)||(!r||r===G.MATHML)&&Cx(e,t)}const Ix="hidden",Rx=8,Ox=3;var S;(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"})(S||(S={}));const Lx={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Jh=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),ic={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:wn,onParseError:null};class ac{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=S.INITIAL,this.originalInsertionMode=S.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={...ic,...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 nx(this.options,this),this.activeFormattingElements=new cx(this.treeAdapter),this.fragmentContextID=r?Dr(this.treeAdapter.getTagName(r)):f.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new ux(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={...ic,...n};t??(t=r.treeAdapter.createElement(M.TEMPLATE,G.HTML,[]));const i=r.treeAdapter.createElement("documentmock",G.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===f.TEMPLATE&&a.tmplInsertionModeStack.unshift(S.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}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 a=(i=t.location)!==null&&i!==void 0?i:Lx,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.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 a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===G.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,G.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=S.TEXT}switchToPlaintextParsing(){this.insertionMode=S.TEXT,this.originalInsertionMode=S.IN_BODY,this.tokenizer.state=Fe.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)===M.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==G.HTML))switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:{this.tokenizer.state=Fe.RCDATA;break}case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:{this.tokenizer.state=Fe.RAWTEXT;break}case f.SCRIPT:{this.tokenizer.state=Fe.SCRIPT_DATA;break}case f.PLAINTEXT:{this.tokenizer.state=Fe.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 s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,G.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,G.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(M.HTML,G.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),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:l,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,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),a=n.type===ye.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,a)}}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)===M.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===G.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===f.MGLYPH||t.tagID===f.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,G.HTML)}_processToken(t){switch(t.type){case ye.CHARACTER:{this.onCharacter(t);break}case ye.NULL_CHARACTER:{this.onNullCharacter(t);break}case ye.COMMENT:{this.onComment(t);break}case ye.DOCTYPE:{this.onDoctype(t);break}case ye.START_TAG:{this._processStartTag(t);break}case ye.END_TAG:{this.onEndTag(t);break}case ye.EOF:{this.onEof(t);break}case ye.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return Nx(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Zt.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=S.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=S.IN_ROW;return}case f.TBODY:case f.THEAD:case f.TFOOT:{this.insertionMode=S.IN_TABLE_BODY;return}case f.CAPTION:{this.insertionMode=S.IN_CAPTION;return}case f.COLGROUP:{this.insertionMode=S.IN_COLUMN_GROUP;return}case f.TABLE:{this.insertionMode=S.IN_TABLE;return}case f.BODY:{this.insertionMode=S.IN_BODY;return}case f.FRAMESET:{this.insertionMode=S.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?S.AFTER_HEAD:S.BEFORE_HEAD;return}case f.TD:case f.TH:{if(t>0){this.insertionMode=S.IN_CELL;return}break}case f.HEAD:{if(t>0){this.insertionMode=S.IN_HEAD;return}break}}this.insertionMode=S.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=S.IN_SELECT_IN_TABLE;return}}this.insertionMode=S.IN_SELECT}_isElementCausesFosterParenting(t){return Jh.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)===G.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 Jy[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){l_(this,t);return}switch(this.insertionMode){case S.INITIAL:{Hr(this,t);break}case S.BEFORE_HTML:{ii(this,t);break}case S.BEFORE_HEAD:{ai(this,t);break}case S.IN_HEAD:{si(this,t);break}case S.IN_HEAD_NO_SCRIPT:{oi(this,t);break}case S.AFTER_HEAD:{li(this,t);break}case S.IN_BODY:case S.IN_CAPTION:case S.IN_CELL:case S.IN_TEMPLATE:{ep(this,t);break}case S.TEXT:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case S.IN_TABLE:case S.IN_TABLE_BODY:case S.IN_ROW:{Os(this,t);break}case S.IN_TABLE_TEXT:{sp(this,t);break}case S.IN_COLUMN_GROUP:{Pa(this,t);break}case S.AFTER_BODY:{Ma(this,t);break}case S.AFTER_AFTER_BODY:{ya(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){o_(this,t);return}switch(this.insertionMode){case S.INITIAL:{Hr(this,t);break}case S.BEFORE_HTML:{ii(this,t);break}case S.BEFORE_HEAD:{ai(this,t);break}case S.IN_HEAD:{si(this,t);break}case S.IN_HEAD_NO_SCRIPT:{oi(this,t);break}case S.AFTER_HEAD:{li(this,t);break}case S.TEXT:{this._insertCharacters(t);break}case S.IN_TABLE:case S.IN_TABLE_BODY:case S.IN_ROW:{Os(this,t);break}case S.IN_COLUMN_GROUP:{Pa(this,t);break}case S.AFTER_BODY:{Ma(this,t);break}case S.AFTER_AFTER_BODY:{ya(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){xo(this,t);return}switch(this.insertionMode){case S.INITIAL:case S.BEFORE_HTML:case S.BEFORE_HEAD:case S.IN_HEAD:case S.IN_HEAD_NO_SCRIPT:case S.AFTER_HEAD:case S.IN_BODY:case S.IN_TABLE:case S.IN_CAPTION:case S.IN_COLUMN_GROUP:case S.IN_TABLE_BODY:case S.IN_ROW:case S.IN_CELL:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:case S.IN_TEMPLATE:case S.IN_FRAMESET:case S.AFTER_FRAMESET:{xo(this,t);break}case S.IN_TABLE_TEXT:{Ur(this,t);break}case S.AFTER_BODY:{Hx(this,t);break}case S.AFTER_AFTER_BODY:case S.AFTER_AFTER_FRAMESET:{Ux(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case S.INITIAL:{jx(this,t);break}case S.BEFORE_HEAD:case S.IN_HEAD:case S.IN_HEAD_NO_SCRIPT:case S.AFTER_HEAD:{this._err(t,$.misplacedDoctype);break}case S.IN_TABLE_TEXT:{Ur(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,$.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?u_(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case S.INITIAL:{Hr(this,t);break}case S.BEFORE_HTML:{zx(this,t);break}case S.BEFORE_HEAD:{Vx(this,t);break}case S.IN_HEAD:{qt(this,t);break}case S.IN_HEAD_NO_SCRIPT:{qx(this,t);break}case S.AFTER_HEAD:{Kx(this,t);break}case S.IN_BODY:{st(this,t);break}case S.IN_TABLE:{Cr(this,t);break}case S.IN_TABLE_TEXT:{Ur(this,t);break}case S.IN_CAPTION:{W2(this,t);break}case S.IN_COLUMN_GROUP:{_l(this,t);break}case S.IN_TABLE_BODY:{is(this,t);break}case S.IN_ROW:{as(this,t);break}case S.IN_CELL:{G2(this,t);break}case S.IN_SELECT:{up(this,t);break}case S.IN_SELECT_IN_TABLE:{X2(this,t);break}case S.IN_TEMPLATE:{J2(this,t);break}case S.AFTER_BODY:{e_(this,t);break}case S.IN_FRAMESET:{t_(this,t);break}case S.AFTER_FRAMESET:{r_(this,t);break}case S.AFTER_AFTER_BODY:{a_(this,t);break}case S.AFTER_AFTER_FRAMESET:{s_(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?c_(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case S.INITIAL:{Hr(this,t);break}case S.BEFORE_HTML:{$x(this,t);break}case S.BEFORE_HEAD:{Wx(this,t);break}case S.IN_HEAD:{Yx(this,t);break}case S.IN_HEAD_NO_SCRIPT:{Gx(this,t);break}case S.AFTER_HEAD:{Xx(this,t);break}case S.IN_BODY:{rs(this,t);break}case S.TEXT:{P2(this,t);break}case S.IN_TABLE:{_i(this,t);break}case S.IN_TABLE_TEXT:{Ur(this,t);break}case S.IN_CAPTION:{Y2(this,t);break}case S.IN_COLUMN_GROUP:{q2(this,t);break}case S.IN_TABLE_BODY:{_o(this,t);break}case S.IN_ROW:{lp(this,t);break}case S.IN_CELL:{K2(this,t);break}case S.IN_SELECT:{cp(this,t);break}case S.IN_SELECT_IN_TABLE:{Q2(this,t);break}case S.IN_TEMPLATE:{Z2(this,t);break}case S.AFTER_BODY:{fp(this,t);break}case S.IN_FRAMESET:{n_(this,t);break}case S.AFTER_FRAMESET:{i_(this,t);break}case S.AFTER_AFTER_BODY:{ya(this,t);break}}}onEof(t){switch(this.insertionMode){case S.INITIAL:{Hr(this,t);break}case S.BEFORE_HTML:{ii(this,t);break}case S.BEFORE_HEAD:{ai(this,t);break}case S.IN_HEAD:{si(this,t);break}case S.IN_HEAD_NO_SCRIPT:{oi(this,t);break}case S.AFTER_HEAD:{li(this,t);break}case S.IN_BODY:case S.IN_TABLE:case S.IN_CAPTION:case S.IN_COLUMN_GROUP:case S.IN_TABLE_BODY:case S.IN_ROW:case S.IN_CELL:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:{ip(this,t);break}case S.TEXT:{M2(this,t);break}case S.IN_TABLE_TEXT:{Ur(this,t);break}case S.IN_TEMPLATE:{dp(this,t);break}case S.AFTER_BODY:case S.IN_FRAMESET:case S.AFTER_FRAMESET:case S.AFTER_AFTER_BODY:case S.AFTER_AFTER_FRAMESET:{xl(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===y.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 S.IN_HEAD:case S.IN_HEAD_NO_SCRIPT:case S.AFTER_HEAD:case S.TEXT:case S.IN_COLUMN_GROUP:case S.IN_SELECT:case S.IN_SELECT_IN_TABLE:case S.IN_FRAMESET:case S.AFTER_FRAMESET:{this._insertCharacters(t);break}case S.IN_BODY:case S.IN_CAPTION:case S.IN_CELL:case S.IN_TEMPLATE:case S.AFTER_BODY:case S.AFTER_AFTER_BODY:case S.AFTER_AFTER_FRAMESET:{Zh(this,t);break}case S.IN_TABLE:case S.IN_TABLE_BODY:case S.IN_ROW:{Os(this,t);break}case S.IN_TABLE_TEXT:{ap(this,t);break}}}}function vx(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):rp(e,t),n}function Dx(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 Px(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),l=o&&a>=Ox;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=Mx(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Mx(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 Bx(e,t,n){const r=e.treeAdapter.getTagName(t),i=Dr(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===f.TEMPLATE&&a===G.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Fx(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function yl(e,t){for(let n=0;n<Rx;n++){const r=vx(e,t);if(!r)break;const i=Dx(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Px(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&Bx(e,s,a),Fx(e,i,r)}}function xo(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Hx(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Ux(e,t){e._appendCommentNode(t,e.document)}function xl(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 a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function jx(e,t){e._setDocumentType(t);const n=t.forceQuirks?vt.QUIRKS:bx(t);gx(t)||e._err(t,$.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=S.BEFORE_HTML}function Hr(e,t){e._err(t,$.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,vt.QUIRKS),e.insertionMode=S.BEFORE_HTML,e._processToken(t)}function zx(e,t){t.tagID===f.HTML?(e._insertElement(t,G.HTML),e.insertionMode=S.BEFORE_HEAD):ii(e,t)}function $x(e,t){const n=t.tagID;(n===f.HTML||n===f.HEAD||n===f.BODY||n===f.BR)&&ii(e,t)}function ii(e,t){e._insertFakeRootElement(),e.insertionMode=S.BEFORE_HEAD,e._processToken(t)}function Vx(e,t){switch(t.tagID){case f.HTML:{st(e,t);break}case f.HEAD:{e._insertElement(t,G.HTML),e.headElement=e.openElements.current,e.insertionMode=S.IN_HEAD;break}default:ai(e,t)}}function Wx(e,t){const n=t.tagID;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?ai(e,t):e._err(t,$.endTagWithoutMatchingOpenElement)}function ai(e,t){e._insertFakeElement(M.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=S.IN_HEAD,e._processToken(t)}function qt(e,t){switch(t.tagID){case f.HTML:{st(e,t);break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case f.TITLE:{e._switchToTextParsing(t,Fe.RCDATA);break}case f.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Fe.RAWTEXT):(e._insertElement(t,G.HTML),e.insertionMode=S.IN_HEAD_NO_SCRIPT);break}case f.NOFRAMES:case f.STYLE:{e._switchToTextParsing(t,Fe.RAWTEXT);break}case f.SCRIPT:{e._switchToTextParsing(t,Fe.SCRIPT_DATA);break}case f.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=S.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(S.IN_TEMPLATE);break}case f.HEAD:{e._err(t,$.misplacedStartTagForHeadElement);break}default:si(e,t)}}function Yx(e,t){switch(t.tagID){case f.HEAD:{e.openElements.pop(),e.insertionMode=S.AFTER_HEAD;break}case f.BODY:case f.BR:case f.HTML:{si(e,t);break}case f.TEMPLATE:{ar(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function ar(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,$.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,$.endTagWithoutMatchingOpenElement)}function si(e,t){e.openElements.pop(),e.insertionMode=S.AFTER_HEAD,e._processToken(t)}function qx(e,t){switch(t.tagID){case f.HTML:{st(e,t);break}case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:{qt(e,t);break}case f.NOSCRIPT:{e._err(t,$.nestedNoscriptInHead);break}default:oi(e,t)}}function Gx(e,t){switch(t.tagID){case f.NOSCRIPT:{e.openElements.pop(),e.insertionMode=S.IN_HEAD;break}case f.BR:{oi(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function oi(e,t){const n=t.type===ye.EOF?$.openElementsLeftAfterEof:$.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=S.IN_HEAD,e._processToken(t)}function Kx(e,t){switch(t.tagID){case f.HTML:{st(e,t);break}case f.BODY:{e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=S.IN_BODY;break}case f.FRAMESET:{e._insertElement(t,G.HTML),e.insertionMode=S.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,$.abandonedHeadElementChild),e.openElements.push(e.headElement,f.HEAD),qt(e,t),e.openElements.remove(e.headElement);break}case f.HEAD:{e._err(t,$.misplacedStartTagForHeadElement);break}default:li(e,t)}}function Xx(e,t){switch(t.tagID){case f.BODY:case f.HTML:case f.BR:{li(e,t);break}case f.TEMPLATE:{ar(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function li(e,t){e._insertFakeElement(M.BODY,f.BODY),e.insertionMode=S.IN_BODY,ns(e,t)}function ns(e,t){switch(t.type){case ye.CHARACTER:{ep(e,t);break}case ye.WHITESPACE_CHARACTER:{Zh(e,t);break}case ye.COMMENT:{xo(e,t);break}case ye.START_TAG:{st(e,t);break}case ye.END_TAG:{rs(e,t);break}case ye.EOF:{ip(e,t);break}}}function Zh(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ep(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Qx(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Jx(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Zx(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,G.HTML),e.insertionMode=S.IN_FRAMESET)}function e2(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function t2(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&yo.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,G.HTML)}function n2(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function r2(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,G.HTML),n||(e.formElement=e.openElements.current))}function i2(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,G.HTML)}function a2(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.tokenizer.state=Fe.PLAINTEXT}function s2(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1}function o2(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(M.A);n&&(yl(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function l2(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function u2(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(yl(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function c2(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function d2(e,t){e.treeAdapter.getDocumentMode(e.document)!==vt.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=S.IN_TABLE}function tp(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function np(e){const t=Vh(e,Yn.TYPE);return t!=null&&t.toLowerCase()===Ix}function f2(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),np(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function h2(e,t){e._appendElement(t,G.HTML),t.ackSelfClosing=!0}function p2(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function m2(e,t){t.tagName=M.IMG,t.tagID=f.IMG,tp(e,t)}function g2(e,t){e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Fe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=S.TEXT}function b2(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Fe.RAWTEXT)}function E2(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Fe.RAWTEXT)}function sc(e,t){e._switchToTextParsing(t,Fe.RAWTEXT)}function T2(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===S.IN_TABLE||e.insertionMode===S.IN_CAPTION||e.insertionMode===S.IN_TABLE_BODY||e.insertionMode===S.IN_ROW||e.insertionMode===S.IN_CELL?S.IN_SELECT_IN_TABLE:S.IN_SELECT}function y2(e,t){e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function x2(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,G.HTML)}function _2(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,G.HTML)}function k2(e,t){e._reconstructActiveFormattingElements(),Xh(t),Tl(t),t.selfClosing?e._appendElement(t,G.MATHML):e._insertElement(t,G.MATHML),t.ackSelfClosing=!0}function A2(e,t){e._reconstructActiveFormattingElements(),Qh(t),Tl(t),t.selfClosing?e._appendElement(t,G.SVG):e._insertElement(t,G.SVG),t.ackSelfClosing=!0}function oc(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function st(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:{l2(e,t);break}case f.A:{o2(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{t2(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:{e2(e,t);break}case f.LI:case f.DD:case f.DT:{i2(e,t);break}case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:{tp(e,t);break}case f.HR:{p2(e,t);break}case f.RB:case f.RTC:{x2(e,t);break}case f.RT:case f.RP:{_2(e,t);break}case f.PRE:case f.LISTING:{n2(e,t);break}case f.XMP:{b2(e,t);break}case f.SVG:{A2(e,t);break}case f.HTML:{Qx(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:{qt(e,t);break}case f.BODY:{Jx(e,t);break}case f.FORM:{r2(e,t);break}case f.NOBR:{u2(e,t);break}case f.MATH:{k2(e,t);break}case f.TABLE:{d2(e,t);break}case f.INPUT:{f2(e,t);break}case f.PARAM:case f.TRACK:case f.SOURCE:{h2(e,t);break}case f.IMAGE:{m2(e,t);break}case f.BUTTON:{s2(e,t);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{c2(e,t);break}case f.IFRAME:{E2(e,t);break}case f.SELECT:{T2(e,t);break}case f.OPTION:case f.OPTGROUP:{y2(e,t);break}case f.NOEMBED:case f.NOFRAMES:{sc(e,t);break}case f.FRAMESET:{Zx(e,t);break}case f.TEXTAREA:{g2(e,t);break}case f.NOSCRIPT:{e.options.scriptingEnabled?sc(e,t):oc(e,t);break}case f.PLAINTEXT:{a2(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:oc(e,t)}}function w2(e,t){if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=S.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function C2(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=S.AFTER_BODY,fp(e,t))}function S2(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function N2(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 I2(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(M.P,f.P),e._closePElement()}function R2(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}function O2(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function L2(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function v2(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function D2(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(M.BR,f.BR),e.openElements.pop(),e.framesetOk=!1}function rp(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function rs(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:{yl(e,t);break}case f.P:{I2(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:{S2(e,t);break}case f.LI:{R2(e);break}case f.DD:case f.DT:{O2(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{L2(e);break}case f.BR:{D2(e);break}case f.BODY:{w2(e,t);break}case f.HTML:{C2(e,t);break}case f.FORM:{N2(e);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{v2(e,t);break}case f.TEMPLATE:{ar(e,t);break}default:rp(e,t)}}function ip(e,t){e.tmplInsertionModeStack.length>0?dp(e,t):xl(e,t)}function P2(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 M2(e,t){e._err(t,$.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Os(e,t){if(e.openElements.currentTagId!==void 0&&Jh.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=S.IN_TABLE_TEXT,t.type){case ye.CHARACTER:{sp(e,t);break}case ye.WHITESPACE_CHARACTER:{ap(e,t);break}}else Mi(e,t)}function B2(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,G.HTML),e.insertionMode=S.IN_CAPTION}function F2(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=S.IN_COLUMN_GROUP}function H2(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(M.COLGROUP,f.COLGROUP),e.insertionMode=S.IN_COLUMN_GROUP,_l(e,t)}function U2(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=S.IN_TABLE_BODY}function j2(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(M.TBODY,f.TBODY),e.insertionMode=S.IN_TABLE_BODY,is(e,t)}function z2(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function $2(e,t){np(t)?e._appendElement(t,G.HTML):Mi(e,t),t.ackSelfClosing=!0}function V2(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,G.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Cr(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:{j2(e,t);break}case f.STYLE:case f.SCRIPT:case f.TEMPLATE:{qt(e,t);break}case f.COL:{H2(e,t);break}case f.FORM:{V2(e,t);break}case f.TABLE:{z2(e,t);break}case f.TBODY:case f.TFOOT:case f.THEAD:{U2(e,t);break}case f.INPUT:{$2(e,t);break}case f.CAPTION:{B2(e,t);break}case f.COLGROUP:{F2(e,t);break}default:Mi(e,t)}}function _i(e,t){switch(t.tagID){case f.TABLE:{e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break}case f.TEMPLATE:{ar(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:Mi(e,t)}}function Mi(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ns(e,t),e.fosterParentingEnabled=n}function ap(e,t){e.pendingCharacterTokens.push(t)}function sp(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ur(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Mi(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const op=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function W2(e,t){const n=t.tagID;op.has(n)?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=S.IN_TABLE,Cr(e,t)):st(e,t)}function Y2(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=S.IN_TABLE,n===f.TABLE&&_i(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:rs(e,t)}}function _l(e,t){switch(t.tagID){case f.HTML:{st(e,t);break}case f.COL:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case f.TEMPLATE:{qt(e,t);break}default:Pa(e,t)}}function q2(e,t){switch(t.tagID){case f.COLGROUP:{e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=S.IN_TABLE);break}case f.TEMPLATE:{ar(e,t);break}case f.COL:break;default:Pa(e,t)}}function Pa(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=S.IN_TABLE,e._processToken(t))}function is(e,t){switch(t.tagID){case f.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,G.HTML),e.insertionMode=S.IN_ROW;break}case f.TH:case f.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(M.TR,f.TR),e.insertionMode=S.IN_ROW,as(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=S.IN_TABLE,Cr(e,t));break}default:Cr(e,t)}}function _o(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=S.IN_TABLE);break}case f.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=S.IN_TABLE,_i(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:_i(e,t)}}function as(e,t){switch(t.tagID){case f.TH:case f.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,G.HTML),e.insertionMode=S.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=S.IN_TABLE_BODY,is(e,t));break}default:Cr(e,t)}}function lp(e,t){switch(t.tagID){case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=S.IN_TABLE_BODY);break}case f.TABLE:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=S.IN_TABLE_BODY,_o(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=S.IN_TABLE_BODY,_o(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:_i(e,t)}}function G2(e,t){const n=t.tagID;op.has(n)?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),as(e,t)):st(e,t)}function K2(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=S.IN_ROW);break}case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),lp(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:rs(e,t)}}function up(e,t){switch(t.tagID){case f.HTML:{st(e,t);break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,G.HTML);break}case f.OPTGROUP:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,G.HTML);break}case f.HR:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,G.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:{qt(e,t);break}}}function cp(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:{ar(e,t);break}}}function X2(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)):up(e,t)}function Q2(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)):cp(e,t)}function J2(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:{qt(e,t);break}case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.tmplInsertionModeStack[0]=S.IN_TABLE,e.insertionMode=S.IN_TABLE,Cr(e,t);break}case f.COL:{e.tmplInsertionModeStack[0]=S.IN_COLUMN_GROUP,e.insertionMode=S.IN_COLUMN_GROUP,_l(e,t);break}case f.TR:{e.tmplInsertionModeStack[0]=S.IN_TABLE_BODY,e.insertionMode=S.IN_TABLE_BODY,is(e,t);break}case f.TD:case f.TH:{e.tmplInsertionModeStack[0]=S.IN_ROW,e.insertionMode=S.IN_ROW,as(e,t);break}default:e.tmplInsertionModeStack[0]=S.IN_BODY,e.insertionMode=S.IN_BODY,st(e,t)}}function Z2(e,t){t.tagID===f.TEMPLATE&&ar(e,t)}function dp(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):xl(e,t)}function e_(e,t){t.tagID===f.HTML?st(e,t):Ma(e,t)}function fp(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=S.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 Ma(e,t)}function Ma(e,t){e.insertionMode=S.IN_BODY,ns(e,t)}function t_(e,t){switch(t.tagID){case f.HTML:{st(e,t);break}case f.FRAMESET:{e._insertElement(t,G.HTML);break}case f.FRAME:{e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break}case f.NOFRAMES:{qt(e,t);break}}}function n_(e,t){t.tagID===f.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==f.FRAMESET&&(e.insertionMode=S.AFTER_FRAMESET))}function r_(e,t){switch(t.tagID){case f.HTML:{st(e,t);break}case f.NOFRAMES:{qt(e,t);break}}}function i_(e,t){t.tagID===f.HTML&&(e.insertionMode=S.AFTER_AFTER_FRAMESET)}function a_(e,t){t.tagID===f.HTML?st(e,t):ya(e,t)}function ya(e,t){e.insertionMode=S.IN_BODY,ns(e,t)}function s_(e,t){switch(t.tagID){case f.HTML:{st(e,t);break}case f.NOFRAMES:{qt(e,t);break}}}function o_(e,t){t.chars=De,e._insertCharacters(t)}function l_(e,t){e._insertCharacters(t),e.framesetOk=!1}function hp(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==G.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function u_(e,t){if(Ax(t))hp(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===G.MATHML?Xh(t):r===G.SVG&&(wx(t),Qh(t)),Tl(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function c_(e,t){if(t.tagID===f.P||t.tagID===f.BR){hp(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===G.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}M.AREA,M.BASE,M.BASEFONT,M.BGSOUND,M.BR,M.COL,M.EMBED,M.FRAME,M.HR,M.IMG,M.INPUT,M.KEYGEN,M.LINK,M.META,M.PARAM,M.SOURCE,M.TRACK,M.WBR;const ss=pp("end"),sn=pp("start");function pp(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 mp(e){const t=sn(e),n=ss(e);if(t&&n)return{start:t,end:n}}const d_=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,f_=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),lc={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function gp(e,t){const n=__(e),r=Hh("type",{handlers:{root:h_,element:p_,text:m_,comment:Ep,doctype:g_,raw:E_},unknown:T_}),i={parser:n?new ac(lc):ac.getFragmentParser(void 0,lc),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),Pr(i,sn());const a=n?i.parser.document:i.parser.getFragment(),s=hy(a,{file:i.options.file});return i.stitches&&Ln(s,"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}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function bp(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function h_(e,t){bp(e.children,t)}function p_(e,t){y_(e,t),bp(e.children,t),x_(e,t)}function m_(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ye.CHARACTER,chars:e.value,location:Bi(e)};Pr(t,sn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function g_(e,t){const n={type:ye.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Bi(e)};Pr(t,sn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function b_(e,t){t.stitches=!0;const n=k_(e);if("children"in e&&"children"in n){const r=gp({type:"root",children:e.children},t.options);n.children=r.children}Ep({type:"comment",value:{stitch:n}},t)}function Ep(e,t){const n=e.value,r={type:ye.COMMENT,data:n,location:Bi(e)};Pr(t,sn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function E_(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,Tp(t,sn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(d_,"&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 T_(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))b_(n,t);else{let r="";throw f_.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 Pr(e,t){Tp(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=Fe.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 Tp(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 y_(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Fe.PLAINTEXT)return;Pr(t,sn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Wn.html;i===Wn.html&&n==="svg"&&(i=Wn.svg);const a=Ny({...e,children:[]},{space:i===Wn.svg?"svg":"html"}),s={type:ye.START_TAG,tagName:n,tagID:Dr(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Bi(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function x_(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&My.includes(n)||t.parser.tokenizer.state===Fe.PLAINTEXT)return;Pr(t,ss(e));const r={type:ye.END_TAG,tagName:n,tagID:Dr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Bi(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Fe.RCDATA||t.parser.tokenizer.state===Fe.RAWTEXT||t.parser.tokenizer.state===Fe.SCRIPT_DATA)&&(t.parser.tokenizer.state=Fe.DATA)}function __(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Bi(e){const t=sn(e)||{line:void 0,column:void 0,offset:void 0},n=ss(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 k_(e){return"children"in e?Xn({...e,children:[]}):Xn(e)}function ko(e){return function(t,n){return gp(t,{...e,file:n})}}const Un=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ui={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Un,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Un],h2:[["className","sr-only"]],img:[...Un,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Un,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Un],table:[...Un],ul:[...Un,["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"]},Cn={}.hasOwnProperty;function A_(e,t){let n={type:"root",children:[]};const r={schema:t?{...ui,...t}:ui,stack:[]},i=yp(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function yp(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return w_(e,n);case"doctype":return C_(e,n);case"element":return S_(e,n);case"root":return N_(e,n);case"text":return I_(e,n)}}}function w_(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Fi(a,t),a}}function C_(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Fi(n,t),n}}function S_(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=xp(e,t.children),i=R_(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Cn.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let l=-1;for(a=!1;++l<o.length;)e.stack.includes(o[l])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return Fi(s,t),s}function N_(e,t){const r={type:"root",children:xp(e,t.children)};return Fi(r,t),r}function I_(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Fi(r,t),r}function xp(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=yp(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function R_(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Cn.call(r,n)?r[n]:void 0,s=r&&Cn.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},l={};let u;for(u in o)if(Cn.call(o,u)){const d=o[u];let c=uc(e,cc(a,u),u,d);c==null&&(c=uc(e,cc(s,u),u,d)),c!=null&&(l[u]=c)}if(i&&Cn.call(i,n)){const d=i[n];for(u in d)Cn.call(d,u)&&!Cn.call(l,u)&&(l[u]=d[u])}return l}function uc(e,t,n,r){return t?Array.isArray(r)?O_(e,t,n,r):_p(e,t,n,r):void 0}function O_(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=_p(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function _p(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&L_(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===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 L_(e,t,n){const r=e.schema.protocols&&Cn.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),o=i.indexOf("#"),l=i.indexOf("/");if(a<0||l>-1&&a>l||s>-1&&a>s||o>-1&&a>o)return!0;let u=-1;for(;++u<r.length;){const d=r[u];if(a===d.length&&i.slice(0,d.length)===d)return!0}return!1}function Fi(e,t){const n=mp(t);t.data&&(e.data=Xn(t.data)),n&&(e.position=n)}function cc(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function kp(e){return function(t){return A_(t,e)}}function dc(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 ct=Pn(/[A-Za-z]/),it=Pn(/[\dA-Za-z]/),v_=Pn(/[#-'*+\--9=?A-Z^-~]/);function Ba(e){return e!==null&&(e<32||e===127)}const Ao=Pn(/\d/),D_=Pn(/[\dA-Fa-f]/),P_=Pn(/[!-/:-@[-`{-~]/);function le(e){return e!==null&&e<-2}function Re(e){return e!==null&&(e<0||e===32)}function xe(e){return e===-2||e===-1||e===32}const os=Pn(new RegExp("\\p{P}|\\p{S}","u")),Qn=Pn(/\s/);function Pn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function M_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Ap=[],B_=!0,fc=!1,wp="skip";function Cp(e,t,n,r){let i;i=t;const a=vi(i),s=1;o(e,void 0,[])();function o(l,u,d){const c=l&&typeof l=="object"?l:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Ap,m,E,k;if(a(l,u,d[d.length-1]||void 0)&&(h=F_(n(l,d)),h[0]===fc))return h;if("children"in l&&l.children){const _=l;if(_.children&&h[0]!==wp)for(E=-1+s,k=d.concat(_);E>-1&&E<_.children.length;){const N=_.children[E];if(m=o(N,E,k)(),m[0]===fc)return m;E=typeof m[1]=="number"?m[1]:E+s}}return h}}}function F_(e){return Array.isArray(e)?e:typeof e=="number"?[B_,e]:e==null?Ap:[e]}function H_(e,t,n){const i=vi((n||{}).ignore||[]),a=U_(t);let s=-1;for(;++s<a.length;)Cp(e,"text",o);function o(u,d){let c=-1,p;for(;++c<d.length;){const h=d[c],m=p?p.children:void 0;if(i(h,m?m.indexOf(h):void 0,p))return;p=h}if(p)return l(u,d)}function l(u,d){const c=d[d.length-1],p=a[s][0],h=a[s][1];let m=0;const k=c.children.indexOf(u);let _=!1,N=[];p.lastIndex=0;let C=p.exec(u.value);for(;C;){const F=C.index,H={index:C.index,input:C.input,stack:[...d,u]};let I=h(...C,H);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?p.lastIndex=F+1:(m!==F&&N.push({type:"text",value:u.value.slice(m,F)}),Array.isArray(I)?N.push(...I):I&&N.push(I),m=F+C[0].length,_=!0),!p.global)break;C=p.exec(u.value)}return _?(m<u.value.length&&N.push({type:"text",value:u.value.slice(m)}),c.children.splice(k,1,...N)):N=[u],k+N.length}}function U_(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([j_(i[0]),z_(i[1])])}return t}function j_(e){return typeof e=="string"?new RegExp(M_(e),"g"):e}function z_(e){return typeof e=="function"?e:function(){return e}}const Ls="phrasing",vs=["autolink","link","image","label"];function $_(){return{transforms:[X_],enter:{literalAutolink:W_,literalAutolinkEmail:Ds,literalAutolinkHttp:Ds,literalAutolinkWww:Ds},exit:{literalAutolink:K_,literalAutolinkEmail:G_,literalAutolinkHttp:Y_,literalAutolinkWww:q_}}}function V_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ls,notInConstruct:vs},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ls,notInConstruct:vs},{character:":",before:"[ps]",after:"\\/",inConstruct:Ls,notInConstruct:vs}]}}function W_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ds(e){this.config.enter.autolinkProtocol.call(this,e)}function Y_(e){this.config.exit.autolinkProtocol.call(this,e)}function q_(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 G_(e){this.config.exit.autolinkEmail.call(this,e)}function K_(e){this.exit(e)}function X_(e){H_(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Q_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),J_]],{ignore:["link","linkReference"]})}function Q_(e,t,n,r,i){let a="";if(!Sp(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Z_(n)))return!1;const s=ek(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function J_(e,t,n,r){return!Sp(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Z_(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 ek(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=dc(e,"(");let a=dc(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Sp(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Qn(n)||os(n))&&(!t||n!==47)}function Vt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Np.peek=uk;function tk(){this.buffer()}function nk(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function rk(){this.buffer()}function ik(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ak(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sk(e){this.exit(e)}function ok(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lk(e){this.exit(e)}function uk(){return"["}function Np(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function ck(){return{enter:{gfmFootnoteCallString:tk,gfmFootnoteCall:nk,gfmFootnoteDefinitionLabelString:rk,gfmFootnoteDefinition:ik},exit:{gfmFootnoteCallString:ak,gfmFootnoteCall:sk,gfmFootnoteDefinitionLabelString:ok,gfmFootnoteDefinition:lk}}}function dk(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Np},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let l=o.move("[^");const u=a.enter("footnoteDefinition"),d=a.enter("label");return l+=o.move(a.safe(a.associationId(r),{before:l,after:"]"})),d(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?`
54
+ `:" ")+a.indentLines(a.containerFlow(r,o.current()),t?Ip:fk))),u(),l}}function fk(e,t,n){return t===0?e:Ip(e,t,n)}function Ip(e,t,n){return(n?"":" ")+e}const hk=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Rp.peek=Ek;function pk(){return{canContainEols:["delete"],enter:{strikethrough:gk},exit:{strikethrough:bk}}}function mk(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:hk}],handlers:{delete:Rp}}}function gk(e){this.enter({type:"delete",children:[]},e)}function bk(e){this.exit(e)}function Rp(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Ek(){return"~"}function Tk(e){return e.length}function yk(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Tk,a=[],s=[],o=[],l=[];let u=0,d=-1;for(;++d<e.length;){const E=[],k=[];let _=-1;for(e[d].length>u&&(u=e[d].length);++_<e[d].length;){const N=xk(e[d][_]);if(n.alignDelimiters!==!1){const C=i(N);k[_]=C,(l[_]===void 0||C>l[_])&&(l[_]=C)}E.push(N)}s[d]=E,o[d]=k}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)a[c]=hc(r[c]);else{const E=hc(r);for(;++c<u;)a[c]=E}c=-1;const p=[],h=[];for(;++c<u;){const E=a[c];let k="",_="";E===99?(k=":",_=":"):E===108?k=":":E===114&&(_=":");let N=n.alignDelimiters===!1?1:Math.max(1,l[c]-k.length-_.length);const C=k+"-".repeat(N)+_;n.alignDelimiters!==!1&&(N=k.length+N+_.length,N>l[c]&&(l[c]=N),h[c]=N),p[c]=C}s.splice(1,0,p),o.splice(1,0,h),d=-1;const m=[];for(;++d<s.length;){const E=s[d],k=o[d];c=-1;const _=[];for(;++c<u;){const N=E[c]||"";let C="",F="";if(n.alignDelimiters!==!1){const H=l[c]-(k[c]||0),I=a[c];I===114?C=" ".repeat(H):I===99?H%2?(C=" ".repeat(H/2+.5),F=" ".repeat(H/2-.5)):(C=" ".repeat(H/2),F=C):F=" ".repeat(H)}n.delimiterStart!==!1&&!c&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||c)&&_.push(" "),n.alignDelimiters!==!1&&_.push(C),_.push(N),n.alignDelimiters!==!1&&_.push(F),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&_.push("|")}m.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return m.join(`
55
+ `)}function xk(e){return e==null?"":String(e)}function hc(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 _k(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),kk);return i(),s}function kk(e,t,n){return">"+(n?"":" ")+e}function Ak(e,t){return pc(e,t.inConstruct,!0)&&!pc(e,t.notInConstruct,!1)}function pc(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 mc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
56
+ `&&Ak(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
57
+ `}function wk(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function Ck(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 Sk(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 Nk(e,t,n,r){const i=Sk(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Ck(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(a,Ik);return c(),p}const o=n.createTracker(r),l=i.repeat(Math.max(wk(a,i)+1,3)),u=n.enter("codeFenced");let d=o.move(l);if(e.lang){const c=n.enter(`codeFencedLang${s}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${s}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
53
58
  `,encode:["`"],...o.current()})),c()}return d+=o.move(`
54
59
  `),a&&(d+=o.move(a+`
55
- `)),d+=o.move(l),u(),d}function V_(e,t,n){return(n?"":" ")+e}function bl(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 W_(e,t,n,r){const i=bl(n),a=i==='"'?"Quote":"Apostrophe",s=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?" ":`
56
- `,...l.current()}))),o(),e.title&&(o=n.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),s(),u}function Y_(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 Ei(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wr(e){if(e===null||Oe(e)||Xn(e))return 1;if(ts(e))return 2}function La(e,t,n){const r=wr(e),i=wr(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}}fp.peek=q_;function fp(e,t,n,r){const i=Y_(n),a=n.enter("emphasis"),s=n.createTracker(r),o=s.move(i);let l=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const u=l.charCodeAt(0),d=La(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=Ei(u)+l.slice(1));const c=l.charCodeAt(l.length-1),p=La(r.after.charCodeAt(0),c,i);p.inside&&(l=l.slice(0,-1)+Ei(c));const h=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+l+h}function q_(e,t,n){return n.options.emphasis||"*"}const G_={};function El(e,t){const n=G_,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return hp(e,r,i)}function hp(e,t,n){if(K_(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 uc(e.children,t,n)}return Array.isArray(e)?uc(e,t,n):""}function uc(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=hp(e[i],t,n);return r.join("")}function K_(e){return!!(e&&typeof e=="object")}function X_(e,t){let n=!1;return Ln(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,so}),!!((!e.depth||e.depth<3)&&El(e)&&(t.options.setext||n))}function Q_(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(X_(e,n)){const d=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
60
+ `)),d+=o.move(l),u(),d}function Ik(e,t,n){return(n?"":" ")+e}function kl(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 Rk(e,t,n,r){const i=kl(n),a=i==='"'?"Quote":"Apostrophe",s=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${a}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),s(),u}function Ok(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 ki(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Sr(e){if(e===null||Re(e)||Qn(e))return 1;if(os(e))return 2}function Fa(e,t,n){const r=Sr(e),i=Sr(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}}Op.peek=Lk;function Op(e,t,n,r){const i=Ok(n),a=n.enter("emphasis"),s=n.createTracker(r),o=s.move(i);let l=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const u=l.charCodeAt(0),d=Fa(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=ki(u)+l.slice(1));const c=l.charCodeAt(l.length-1),p=Fa(r.after.charCodeAt(0),c,i);p.inside&&(l=l.slice(0,-1)+ki(c));const h=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+l+h}function Lk(e,t,n){return n.options.emphasis||"*"}const vk={};function Al(e,t){const n=vk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Lp(e,r,i)}function Lp(e,t,n){if(Dk(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 gc(e.children,t,n)}return Array.isArray(e)?gc(e,t,n):""}function gc(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Lp(e[i],t,n);return r.join("")}function Dk(e){return!!(e&&typeof e=="object")}function Pk(e,t){let n=!1;return Ln(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ho}),!!((!e.depth||e.depth<3)&&Al(e)&&(t.options.setext||n))}function Mk(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Pk(e,n)){const d=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
57
62
  `,after:`
58
63
  `});return c(),d(),p+`
59
64
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
60
65
  `))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),l=n.enter("phrasing");a.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
61
- `,...a.current()});return/^[\t ]/.test(u)&&(u=Ei(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),l(),o(),u}pp.peek=J_;function pp(e){return e.value||""}function J_(){return"<"}mp.peek=Z_;function mp(e,t,n,r){const i=bl(n),a=i==='"'?"Quote":"Apostrophe",s=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${a}`),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(")"),s(),u}function Z_(){return"!"}gp.peek=ek;function gp(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=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+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!u||u!==c?l+=o.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function ek(){return"!"}bp.peek=tk;function bp(e,t,n){let r=e.value||"",i="`",a=-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+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);let l;if(s.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 tk(){return"`"}function Ep(e,t){const n=El(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))}Tp.peek=nk;function Tp(e,t,n,r){const i=bl(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,l;if(Ep(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let c=s.move("<");return c+=s.move(n.containerPhrasing(e,{before:c,after:">",...s.current()})),c+=s.move(">"),o(),n.stack=d,c}o=n.enter("link"),l=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),l()),u+=s.move(")"),o(),u}function nk(e,t,n){return Ep(e,n)?"<":"["}xp.peek=rk;function xp(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=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+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!u||u!==c?l+=o.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function rk(){return"["}function Tl(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 ik(e){const t=Tl(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 ak(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 yp(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 sk(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?ak(n):Tl(n);const o=e.ordered?s==="."?")":".":ik(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&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),yp(n)===s&&d){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=o),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),u}function ok(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 lk(e,t,n,r){const i=ok(n);let a=n.bulletCurrent||Tl(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),d);return l(),u;function d(c,p,h){return p?(h?"":" ".repeat(s))+c:(h?a:a+" ".repeat(s-a.length))+c}}function uk(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const ck=Ni(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function dk(e,t,n,r){return(e.children.some(function(s){return ck(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function fk(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}_p.peek=hk;function _p(e,t,n,r){const i=fk(n),a=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let l=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const u=l.charCodeAt(0),d=La(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=Ei(u)+l.slice(1));const c=l.charCodeAt(l.length-1),p=La(r.after.charCodeAt(0),c,i);p.inside&&(l=l.slice(0,-1)+Ei(c));const h=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+l+h}function hk(e,t,n){return n.options.strong||"*"}function pk(e,t,n,r){return n.safe(e.value,r)}function mk(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 gk(e,t,n){const r=(yp(n)+(n.options.ruleSpaces?" ":"")).repeat(mk(n));return n.options.ruleSpaces?r.slice(0,-1):r}const kp={blockquote:B_,break:lc,code:$_,definition:W_,emphasis:fp,hardBreak:lc,heading:Q_,html:pp,image:mp,imageReference:gp,inlineCode:bp,link:Tp,linkReference:xp,list:sk,listItem:lk,paragraph:uk,root:dk,strong:_p,text:pk,thematicBreak:gk},cc=document.createElement("i");function xl(e){const t="&"+e+";";cc.innerHTML=t;const n=cc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ap(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 bk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ek(e){return e.replace(bk,Tk)}function Tk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Ap(n.slice(a?2:1),a?16:10)}return xl(n)||e}function xk(){return{enter:{table:yk,tableData:dc,tableHeader:dc,tableRow:kk},exit:{codeText:Ak,table:_k,tableData:Ss,tableHeader:Ss,tableRow:Ss}}}function yk(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 _k(e){this.exit(e),this.data.inTable=void 0}function kk(e){this.enter({type:"tableRow",children:[]},e)}function Ss(e){this.exit(e)}function dc(e){this.enter({type:"tableCell",children:[]},e)}function Ak(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ck));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ck(e,t){return t==="|"?t:e}function wk(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
66
+ `,...a.current()});return/^[\t ]/.test(u)&&(u=ki(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),l(),o(),u}vp.peek=Bk;function vp(e){return e.value||""}function Bk(){return"<"}Dp.peek=Fk;function Dp(e,t,n,r){const i=kl(n),a=i==='"'?"Quote":"Apostrophe",s=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${a}`),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(")"),s(),u}function Fk(){return"!"}Pp.peek=Hk;function Pp(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=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+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!u||u!==c?l+=o.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function Hk(){return"!"}Mp.peek=Uk;function Mp(e,t,n){let r=e.value||"",i="`",a=-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+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);let l;if(s.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 Uk(){return"`"}function Bp(e,t){const n=Al(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))}Fp.peek=jk;function Fp(e,t,n,r){const i=kl(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,l;if(Bp(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let c=s.move("<");return c+=s.move(n.containerPhrasing(e,{before:c,after:">",...s.current()})),c+=s.move(">"),o(),n.stack=d,c}o=n.enter("link"),l=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),l()),u+=s.move(")"),o(),u}function jk(e,t,n){return Bp(e,n)?"<":"["}Hp.peek=zk;function Hp(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=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+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const c=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!u||u!==c?l+=o.move(c+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function zk(){return"["}function wl(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 $k(e){const t=wl(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 Vk(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 Up(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 Wk(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Vk(n):wl(n);const o=e.ordered?s==="."?")":".":$k(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&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),Up(n)===s&&d){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=o),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),u}function Yk(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 qk(e,t,n,r){const i=Yk(n);let a=n.bulletCurrent||wl(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),d);return l(),u;function d(c,p,h){return p?(h?"":" ".repeat(s))+c:(h?a:a+" ".repeat(s-a.length))+c}}function Gk(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const Kk=vi(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Xk(e,t,n,r){return(e.children.some(function(s){return Kk(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Qk(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}jp.peek=Jk;function jp(e,t,n,r){const i=Qk(n),a=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let l=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const u=l.charCodeAt(0),d=Fa(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=ki(u)+l.slice(1));const c=l.charCodeAt(l.length-1),p=Fa(r.after.charCodeAt(0),c,i);p.inside&&(l=l.slice(0,-1)+ki(c));const h=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+l+h}function Jk(e,t,n){return n.options.strong||"*"}function Zk(e,t,n,r){return n.safe(e.value,r)}function eA(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 tA(e,t,n){const r=(Up(n)+(n.options.ruleSpaces?" ":"")).repeat(eA(n));return n.options.ruleSpaces?r.slice(0,-1):r}const zp={blockquote:_k,break:mc,code:Nk,definition:Rk,emphasis:Op,hardBreak:mc,heading:Mk,html:vp,image:Dp,imageReference:Pp,inlineCode:Mp,link:Fp,linkReference:Hp,list:Wk,listItem:qk,paragraph:Gk,root:Xk,strong:jp,text:Zk,thematicBreak:tA},bc=document.createElement("i");function Cl(e){const t="&"+e+";";bc.innerHTML=t;const n=bc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function $p(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 nA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rA(e){return e.replace(nA,iA)}function iA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return $p(n.slice(a?2:1),a?16:10)}return Cl(n)||e}function aA(){return{enter:{table:sA,tableData:Ec,tableHeader:Ec,tableRow:lA},exit:{codeText:uA,table:oA,tableData:Ps,tableHeader:Ps,tableRow:Ps}}}function sA(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 oA(e){this.exit(e),this.data.inTable=void 0}function lA(e){this.enter({type:"tableRow",children:[]},e)}function Ps(e){this.exit(e)}function Ec(e){this.enter({type:"tableCell",children:[]},e)}function uA(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cA));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cA(e,t){return t==="|"?t:e}function dA(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
62
67
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:l,tableRow:o}};function s(h,m,E,k){return u(d(h,E,k),h.align)}function o(h,m,E,k){const _=c(h,E,k),N=u([_]);return N.slice(0,N.indexOf(`
63
- `))}function l(h,m,E,k){const _=E.enter("tableCell"),N=E.enter("phrasing"),w=E.containerPhrasing(h,{...k,before:a,after:a});return N(),_(),w}function u(h,m){return P_(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function d(h,m,E){const k=h.children;let _=-1;const N=[],w=m.enter("table");for(;++_<k.length;)N[_]=c(k[_],m,E);return w(),N}function c(h,m,E){const k=h.children;let _=-1;const N=[],w=m.enter("tableRow");for(;++_<k.length;)N[_]=l(k[_],h,m,E);return w(),N}function p(h,m,E){let k=kp.inlineCode(h,m,E);return E.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function Sk(){return{exit:{taskListCheckValueChecked:fc,taskListCheckValueUnchecked:fc,paragraph:Ik}}}function Nk(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ok}}}function fc(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Ik(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 a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===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 Ok(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let l=kp.listItem(e,t,n,{...r,...o.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(d){return d+s}}function Rk(){return[i_(),C_(),I_(),xk(),Sk()]}function Lk(e){return{extensions:[a_(),w_(e),O_(),wk(e),Nk()]}}function Ot(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function vt(e,t){return e.length>0?(Ot(e,e.length,0,t),e):t}const hc={}.hasOwnProperty;function Cp(e){const t={};let n=-1;for(;++n<e.length;)vk(t,e[n]);return t}function vk(e,t){let n;for(n in t){const i=(hc.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){hc.call(i,s)||(i[s]=[]);const o=a[s];Dk(i[s],Array.isArray(o)?o:o?[o]:[])}}}function Dk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ot(e,0,0,r)}const Pk={tokenize:jk,partial:!0},wp={tokenize:zk,partial:!0},Sp={tokenize:$k,partial:!0},Np={tokenize:Vk,partial:!0},Mk={tokenize:Wk,partial:!0},Ip={name:"wwwAutolink",tokenize:Hk,previous:Rp},Op={name:"protocolAutolink",tokenize:Uk,previous:Lp},mn={name:"emailAutolink",tokenize:Fk,previous:vp},on={};function Bk(){return{text:on}}let jn=48;for(;jn<123;)on[jn]=mn,jn++,jn===58?jn=65:jn===91&&(jn=97);on[43]=mn;on[45]=mn;on[46]=mn;on[95]=mn;on[72]=[mn,Op];on[104]=[mn,Op];on[87]=[mn,Ip];on[119]=[mn,Ip];function Fk(e,t,n){const r=this;let i,a;return s;function s(c){return!To(c)||!vp.call(r,r.previous)||yl(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(c))}function o(c){return To(c)?(e.consume(c),o):c===64?(e.consume(c),l):n(c)}function l(c){return c===46?e.check(Mk,d,u)(c):c===45||c===95||rt(c)?(a=!0,e.consume(c),l):d(c)}function u(c){return e.consume(c),i=!0,l}function d(c){return a&&i&&ct(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function Hk(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Rp.call(r,r.previous)||yl(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Pk,e.attempt(wp,e.attempt(Sp,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function Uk(e,t,n){const r=this;let i="",a=!1;return s;function s(c){return(c===72||c===104)&&Lp.call(r,r.previous)&&!yl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),o):n(c)}function o(c){if(ct(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),o;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),l}return n(c)}function l(c){return c===47?(e.consume(c),a?u:(a=!0,l)):n(c)}function u(c){return c===null||Ra(c)||Oe(c)||Xn(c)||ts(c)?n(c):e.attempt(wp,e.attempt(Sp,d),n)(c)}function d(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function jk(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function zk(e,t,n){let r,i,a;return s;function s(u){return u===46||u===95?e.check(Np,l,o)(u):u===null||Oe(u)||Xn(u)||u!==45&&ts(u)?l(u):(a=!0,e.consume(u),s)}function o(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function l(u){return i||r||!a?n(u):t(u)}}function $k(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Np,t,a)(s):s===null||Oe(s)||Xn(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function Vk(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),a):o===93?(e.consume(o),i):o===60||o===null||Oe(o)||Xn(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Oe(o)||Xn(o)?t(o):r(o)}function a(o){return ct(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):ct(o)?(e.consume(o),s):n(o)}}function Wk(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return rt(a)?n(a):t(a)}}function Rp(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Oe(e)}function Lp(e){return!ct(e)}function vp(e){return!(e===47||To(e))}function To(e){return e===43||e===45||e===46||e===95||rt(e)}function yl(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 Pr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&rt(e.charCodeAt(n+1))&&rt(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ns(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const xo={name:"attention",resolveAll:Yk,tokenize:qk};function Yk(e,t){let n=-1,r,i,a,s,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},p={...e[n][1].start};pc(c,-l),pc(p,l),s={type:l>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=vt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=vt(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),u=vt(u,ns(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=vt(u,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=vt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ot(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 qk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=wr(r);let a;return s;function s(l){return a=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===a)return e.consume(l),o;const u=e.exit("attentionSequence"),d=wr(l),c=!d||d===2&&i||n.includes(l),p=!i||i===2&&d||n.includes(r);return u._open=!!(a===42?c:c&&(i||!p)),u._close=!!(a===42?p:p&&(d||!c)),t(l)}}function pc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Gk={name:"autolink",tokenize:Kk};function Kk(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return ct(h)?(e.consume(h),s):h===64?n(h):u(h)}function s(h){return h===43||h===45||h===46||rt(h)?(r=1,o(h)):u(h)}function o(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||rt(h))&&r++<32?(e.consume(h),o):(r=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Ra(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),d):G2(h)?(e.consume(h),u):n(h)}function d(h){return rt(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||rt(h))&&r++<63){const m=h===45?p:c;return e.consume(h),m}return n(h)}}function we(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return ye(l)?(e.enter(n),o(l)):t(l)}function o(l){return ye(l)&&a++<i?(e.consume(l),o):(e.exit(n),t(l))}}const Di={partial:!0,tokenize:Xk};function Xk(e,t,n){return r;function r(a){return ye(a)?we(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||le(a)?t(a):n(a)}}const Dp={continuation:{tokenize:Jk},exit:Zk,name:"blockQuote",tokenize:Qk};function Qk(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return ye(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Jk(e,t,n){const r=this;return i;function i(s){return ye(s)?we(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Dp,t,n)(s)}}function Zk(e){e.exit("blockQuote")}const Pp={name:"characterEscape",tokenize:eA};function eA(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return X2(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Mp={name:"characterReference",tokenize:tA};function tA(e,t,n){const r=this;let i=0,a,s;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"),a=31,s=rt,d(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=K2,d):(e.enter("characterReferenceValue"),a=7,s=Eo,d(c))}function d(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return s===rt&&!xl(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(c)&&i++<a?(e.consume(c),d):n(c)}}const mc={partial:!0,tokenize:rA},gc={concrete:!0,name:"codeFenced",tokenize:nA};function nA(e,t,n){const r=this,i={partial:!0,tokenize:H};let a=0,s=0,o;return l;function l(I){return u(I)}function u(I){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,o=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(I)}function d(I){return I===o?(s++,e.consume(I),d):s<3?n(I):(e.exit("codeFencedFenceSequence"),ye(I)?we(e,c,"whitespace")(I):c(I))}function c(I){return I===null||le(I)?(e.exit("codeFencedFence"),r.interrupt?t(I):e.check(mc,E,F)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(I))}function p(I){return I===null||le(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(I)):ye(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),we(e,h,"whitespace")(I)):I===96&&I===o?n(I):(e.consume(I),p)}function h(I){return I===null||le(I)?c(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(I))}function m(I){return I===null||le(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(I)):I===96&&I===o?n(I):(e.consume(I),m)}function E(I){return e.attempt(i,F,k)(I)}function k(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),_}function _(I){return a>0&&ye(I)?we(e,N,"linePrefix",a+1)(I):N(I)}function N(I){return I===null||le(I)?e.check(mc,E,F)(I):(e.enter("codeFlowValue"),w(I))}function w(I){return I===null||le(I)?(e.exit("codeFlowValue"),N(I)):(e.consume(I),w)}function F(I){return e.exit("codeFenced"),t(I)}function H(I,V,U){let Q=0;return R;function R(v){return I.enter("lineEnding"),I.consume(v),I.exit("lineEnding"),K}function K(v){return I.enter("codeFencedFence"),ye(v)?we(I,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):z(v)}function z(v){return v===o?(I.enter("codeFencedFenceSequence"),y(v)):U(v)}function y(v){return v===o?(Q++,I.consume(v),y):Q>=s?(I.exit("codeFencedFenceSequence"),ye(v)?we(I,L,"whitespace")(v):L(v)):U(v)}function L(v){return v===null||le(v)?(I.exit("codeFencedFence"),V(v)):U(v)}}}function rA(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ns={name:"codeIndented",tokenize:aA},iA={partial:!0,tokenize:sA};function aA(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),we(e,a,"linePrefix",5)(u)}function a(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):le(u)?e.attempt(iA,s,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||le(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),t(u)}}function sA(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):le(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):we(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):le(s)?i(s):n(s)}}const oA={name:"codeText",previous:uA,resolve:lA,tokenize:cA};function lA(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 uA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function cA(e,t,n){let r=0,i,a;return s;function s(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?(a=e.enter("codeTextSequence"),i=0,d(c)):le(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||le(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)):(a.type="codeTextData",u(c))}}class dA{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 a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ur(this.left,r),a.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),Ur(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ur(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);Ur(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ur(this.left,n.reverse())}}}function Ur(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 Bp(e){const t={};let n=-1,r,i,a,s,o,l,u;const d=new dA(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,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,fA(d,n)),n=t[n],u=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=d.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[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 Ot(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function fA(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,l=[],u={};let d,c,p=-1,h=n,m=0,E=0;const k=[E];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),c&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(E=p+1,k.push(E),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):k.pop(),p=k.length;p--;){const _=o.slice(k[p],k[p+1]),N=a.pop();l.push([N,N+_.length-1]),e.splice(N,2,_)}for(l.reverse(),p=-1;++p<l.length;)u[m+l[p][0]]=m+l[p][1],m+=l[p][1]-l[p][0]-1;return u}const hA={resolve:mA,tokenize:gA},pA={partial:!0,tokenize:bA};function mA(e){return Bp(e),e}function gA(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?a(o):le(o)?e.check(pA,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function bA(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),we(e,a,"linePrefix")}function a(s){if(s===null||le(s))return n(s);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(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Fp(e,t,n,r,i,a,s,o,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return c;function c(_){return _===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Ra(_)?n(_):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),E(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===62?(e.exit("chunkString"),e.exit(o),p(_)):_===null||_===60||le(_)?n(_):(e.consume(_),_===92?m:h)}function m(_){return _===60||_===62||_===92?(e.consume(_),h):h(_)}function E(_){return!d&&(_===null||_===41||Oe(_))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(_)):d<u&&_===40?(e.consume(_),d++,E):_===41?(e.consume(_),d--,E):_===null||_===32||_===40||Ra(_)?n(_):(e.consume(_),_===92?k:E)}function k(_){return _===40||_===41||_===92?(e.consume(_),E):E(_)}}function Hp(e,t,n,r,i,a){const s=this;let o=0,l;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),d}function d(h){return o>999||h===null||h===91||h===93&&!l||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):le(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||le(h)||o++>999?(e.exit("chunkString"),d(h)):(e.consume(h),l||(l=!ye(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),o++,c):c(h)}}function Up(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,l):n(p)}function l(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),u(p))}function u(p){return p===s?(e.exit(a),l(s)):p===null?n(p):le(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),we(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||le(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:d)}function c(p){return p===s||p===92?(e.consume(p),d):d(p)}}function ui(e,t){let n;return r;function r(i){return le(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ye(i)?we(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const EA={name:"definition",tokenize:xA},TA={partial:!0,tokenize:yA};function xA(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return Hp.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=$t(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return Oe(h)?ui(e,u)(h):u(h)}function u(h){return Fp(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(TA,c,c)(h)}function c(h){return ye(h)?we(e,p,"whitespace")(h):p(h)}function p(h){return h===null||le(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function yA(e,t,n){return r;function r(o){return Oe(o)?ui(e,i)(o):n(o)}function i(o){return Up(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return ye(o)?we(e,s,"whitespace")(o):s(o)}function s(o){return o===null||le(o)?t(o):n(o)}}const _A={name:"hardBreakEscape",tokenize:kA};function kA(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const AA={name:"headingAtx",resolve:CA,tokenize:wA};function CA(e,t){let n=e.length-2,r=3,i,a;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},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ot(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function wA(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||Oe(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||le(d)?(e.exit("atxHeading"),t(d)):ye(d)?we(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||Oe(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const SA=["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"],bc=["pre","script","style","textarea"],NA={concrete:!0,name:"htmlFlow",resolveTo:RA,tokenize:LA},IA={partial:!0,tokenize:DA},OA={partial:!0,tokenize:vA};function RA(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 LA(e,t,n){const r=this;let i,a,s,o,l;return u;function u(C){return d(C)}function d(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),c}function c(C){return C===33?(e.consume(C),p):C===47?(e.consume(C),a=!0,E):C===63?(e.consume(C),i=3,r.interrupt?t:T):ct(C)?(e.consume(C),s=String.fromCharCode(C),k):n(C)}function p(C){return C===45?(e.consume(C),i=2,h):C===91?(e.consume(C),i=5,o=0,m):ct(C)?(e.consume(C),i=4,r.interrupt?t:T):n(C)}function h(C){return C===45?(e.consume(C),r.interrupt?t:T):n(C)}function m(C){const he="CDATA[";return C===he.charCodeAt(o++)?(e.consume(C),o===he.length?r.interrupt?t:z:m):n(C)}function E(C){return ct(C)?(e.consume(C),s=String.fromCharCode(C),k):n(C)}function k(C){if(C===null||C===47||C===62||Oe(C)){const he=C===47,ue=s.toLowerCase();return!he&&!a&&bc.includes(ue)?(i=1,r.interrupt?t(C):z(C)):SA.includes(s.toLowerCase())?(i=6,he?(e.consume(C),_):r.interrupt?t(C):z(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):a?N(C):w(C))}return C===45||rt(C)?(e.consume(C),s+=String.fromCharCode(C),k):n(C)}function _(C){return C===62?(e.consume(C),r.interrupt?t:z):n(C)}function N(C){return ye(C)?(e.consume(C),N):R(C)}function w(C){return C===47?(e.consume(C),R):C===58||C===95||ct(C)?(e.consume(C),F):ye(C)?(e.consume(C),w):R(C)}function F(C){return C===45||C===46||C===58||C===95||rt(C)?(e.consume(C),F):H(C)}function H(C){return C===61?(e.consume(C),I):ye(C)?(e.consume(C),H):w(C)}function I(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),l=C,V):ye(C)?(e.consume(C),I):U(C)}function V(C){return C===l?(e.consume(C),l=null,Q):C===null||le(C)?n(C):(e.consume(C),V)}function U(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Oe(C)?H(C):(e.consume(C),U)}function Q(C){return C===47||C===62||ye(C)?w(C):n(C)}function R(C){return C===62?(e.consume(C),K):n(C)}function K(C){return C===null||le(C)?z(C):ye(C)?(e.consume(C),K):n(C)}function z(C){return C===45&&i===2?(e.consume(C),D):C===60&&i===1?(e.consume(C),P):C===62&&i===4?(e.consume(C),ie):C===63&&i===3?(e.consume(C),T):C===93&&i===5?(e.consume(C),J):le(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(IA,te,y)(C)):C===null||le(C)?(e.exit("htmlFlowData"),y(C)):(e.consume(C),z)}function y(C){return e.check(OA,L,te)(C)}function L(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),v}function v(C){return C===null||le(C)?y(C):(e.enter("htmlFlowData"),z(C))}function D(C){return C===45?(e.consume(C),T):z(C)}function P(C){return C===47?(e.consume(C),s="",q):z(C)}function q(C){if(C===62){const he=s.toLowerCase();return bc.includes(he)?(e.consume(C),ie):z(C)}return ct(C)&&s.length<8?(e.consume(C),s+=String.fromCharCode(C),q):z(C)}function J(C){return C===93?(e.consume(C),T):z(C)}function T(C){return C===62?(e.consume(C),ie):C===45&&i===2?(e.consume(C),T):z(C)}function ie(C){return C===null||le(C)?(e.exit("htmlFlowData"),te(C)):(e.consume(C),ie)}function te(C){return e.exit("htmlFlow"),t(C)}}function vA(e,t,n){const r=this;return i;function i(s){return le(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function DA(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Di,t,n)}}const PA={name:"htmlText",tokenize:MA};function MA(e,t,n){const r=this;let i,a,s;return o;function o(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),l}function l(T){return T===33?(e.consume(T),u):T===47?(e.consume(T),H):T===63?(e.consume(T),w):ct(T)?(e.consume(T),U):n(T)}function u(T){return T===45?(e.consume(T),d):T===91?(e.consume(T),a=0,m):ct(T)?(e.consume(T),N):n(T)}function d(T){return T===45?(e.consume(T),h):n(T)}function c(T){return T===null?n(T):T===45?(e.consume(T),p):le(T)?(s=c,P(T)):(e.consume(T),c)}function p(T){return T===45?(e.consume(T),h):c(T)}function h(T){return T===62?D(T):T===45?p(T):c(T)}function m(T){const ie="CDATA[";return T===ie.charCodeAt(a++)?(e.consume(T),a===ie.length?E:m):n(T)}function E(T){return T===null?n(T):T===93?(e.consume(T),k):le(T)?(s=E,P(T)):(e.consume(T),E)}function k(T){return T===93?(e.consume(T),_):E(T)}function _(T){return T===62?D(T):T===93?(e.consume(T),_):E(T)}function N(T){return T===null||T===62?D(T):le(T)?(s=N,P(T)):(e.consume(T),N)}function w(T){return T===null?n(T):T===63?(e.consume(T),F):le(T)?(s=w,P(T)):(e.consume(T),w)}function F(T){return T===62?D(T):w(T)}function H(T){return ct(T)?(e.consume(T),I):n(T)}function I(T){return T===45||rt(T)?(e.consume(T),I):V(T)}function V(T){return le(T)?(s=V,P(T)):ye(T)?(e.consume(T),V):D(T)}function U(T){return T===45||rt(T)?(e.consume(T),U):T===47||T===62||Oe(T)?Q(T):n(T)}function Q(T){return T===47?(e.consume(T),D):T===58||T===95||ct(T)?(e.consume(T),R):le(T)?(s=Q,P(T)):ye(T)?(e.consume(T),Q):D(T)}function R(T){return T===45||T===46||T===58||T===95||rt(T)?(e.consume(T),R):K(T)}function K(T){return T===61?(e.consume(T),z):le(T)?(s=K,P(T)):ye(T)?(e.consume(T),K):Q(T)}function z(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),i=T,y):le(T)?(s=z,P(T)):ye(T)?(e.consume(T),z):(e.consume(T),L)}function y(T){return T===i?(e.consume(T),i=void 0,v):T===null?n(T):le(T)?(s=y,P(T)):(e.consume(T),y)}function L(T){return T===null||T===34||T===39||T===60||T===61||T===96?n(T):T===47||T===62||Oe(T)?Q(T):(e.consume(T),L)}function v(T){return T===47||T===62||Oe(T)?Q(T):n(T)}function D(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):n(T)}function P(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),q}function q(T){return ye(T)?we(e,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):J(T)}function J(T){return e.enter("htmlTextData"),s(T)}}const _l={name:"labelEnd",resolveAll:UA,resolveTo:jA,tokenize:zA},BA={tokenize:$A},FA={tokenize:VA},HA={tokenize:WA};function UA(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&&Ot(e,0,e.length,n),e}function jA(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",l,t],["enter",u,t]],o=vt(o,e.slice(a+1,a+r+3)),o=vt(o,[["enter",d,t]]),o=vt(o,ns(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=vt(o,[["exit",d,t],e[s-2],e[s-1],["exit",u,t]]),o=vt(o,e.slice(s+1)),o=vt(o,[["exit",l,t]]),Ot(e,a,e.length,o),e}function zA(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(p){return a?a._inactive?c(p):(s=r.parser.defined.includes($t(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(BA,d,s?d:c)(p):p===91?e.attempt(FA,d,s?u:c)(p):s?d(p):c(p)}function u(p){return e.attempt(HA,d,c)(p)}function d(p){return t(p)}function c(p){return a._balanced=!0,n(p)}}function $A(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 Oe(c)?ui(e,a)(c):a(c)}function a(c){return c===41?d(c):Fp(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function s(c){return Oe(c)?ui(e,l)(c):d(c)}function o(c){return n(c)}function l(c){return c===34||c===39||c===40?Up(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function u(c){return Oe(c)?ui(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 VA(e,t,n){const r=this;return i;function i(o){return Hp.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes($t(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function WA(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const YA={name:"labelStartImage",resolveAll:_l.resolveAll,tokenize:qA};function qA(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const GA={name:"labelStartLink",resolveAll:_l.resolveAll,tokenize:KA};function KA(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Is={name:"lineEnding",tokenize:XA};function XA(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),we(e,t,"linePrefix")}}const ga={name:"thematicBreak",tokenize:QA};function QA(e,t,n){let r=0,i;return a;function a(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||le(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),ye(u)?we(e,o,"whitespace")(u):o(u))}}const mt={continuation:{tokenize:tC},exit:rC,name:"list",tokenize:eC},JA={partial:!0,tokenize:iC},ZA={partial:!0,tokenize:nC};function eC(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Eo(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(ga,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return Eo(h)&&++s<10?(e.consume(h),l):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Di,r.interrupt?n:d,e.attempt(JA,p,c))}function d(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function c(h){return ye(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function tC(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Di,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,we(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!ye(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ZA,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,we(e,e.attempt(mt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function nC(e,t,n){const r=this;return we(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function rC(e){e.exit(this.containerState.type)}function iC(e,t,n){const r=this;return we(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!ye(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Ec={name:"setextUnderline",resolveTo:aC,tokenize:sC};function aC(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function sC(e,t,n){const r=this;let i;return a;function a(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,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),ye(u)?we(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||le(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const oC={tokenize:mC,partial:!0};function lC(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:fC,continuation:{tokenize:hC},exit:pC}},text:{91:{name:"gfmFootnoteCall",tokenize:dC},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uC,resolveTo:cC}}}}function uC(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=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(!s||!s._balanced)return n(l);const u=$t(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function cC(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 a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function dC(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;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(a>999||c===93&&!s||c===null||c===91||Oe(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes($t(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Oe(c)||(s=!0),a++,e.consume(c),c===92?d:u}function d(c){return c===91||c===92||c===93?(e.consume(c),a++,u):u(c)}}function fC(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=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(s>999||m===93&&!o||m===null||m===91||Oe(m))return n(m);if(m===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return a=$t(r.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Oe(m)||(o=!0),s++,e.consume(m),m===92?c:d}function c(m){return m===91||m===92||m===93?(e.consume(m),s++,d):d(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),we(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function hC(e,t,n){return e.check(Di,t,e.attempt(oC,t,n))}function pC(e){e.exit("gfmFootnoteDefinition")}function mC(e,t,n){const r=this;return we(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function gC(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let u=l;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[l][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[l][1].end)},c={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[l][1].start)},p=[["enter",d,o],["enter",s[u][1],o],["exit",s[u][1],o],["enter",c,o]],h=o.parser.constructs.insideSpan.null;h&&Ot(p,p.length,0,ns(h,s.slice(u+1,l),o)),Ot(p,p.length,0,[["exit",c,o],["enter",s[l][1],o],["exit",s[l][1],o],["exit",d,o]]),Ot(s,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function a(s,o,l){const u=this.previous,d=this.events;let c=0;return p;function p(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(s.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const E=wr(u);if(m===126)return c>1?l(m):(s.consume(m),c++,h);if(c<2&&!n)return l(m);const k=s.exit("strikethroughSequenceTemporary"),_=wr(m);return k._open=!_||_===2&&!!E,k._close=!E||E===2&&!!_,o(m)}}}class bC{constructor(){this.map=[]}add(t,n,r){EC(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[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 a of i)t.push(a);i=r.pop()}this.map.length=0}}function EC(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 TC(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 a=r.length-1;r[a]=r[a]==="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 xC(){return{flow:{null:{name:"table",tokenize:yC,resolveAll:_C}}}}function yC(e,t,n){const r=this;let i=0,a=0,s;return o;function o(R){let K=r.events.length-1;for(;K>-1;){const L=r.events[K][1].type;if(L==="lineEnding"||L==="linePrefix")K--;else break}const z=K>-1?r.events[K][1].type:null,y=z==="tableHead"||z==="tableRow"?I:l;return y===I&&r.parser.lazy[r.now().line]?n(R):y(R)}function l(R){return e.enter("tableHead"),e.enter("tableRow"),u(R)}function u(R){return R===124||(s=!0,a+=1),d(R)}function d(R){return R===null?n(R):le(R)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),h):n(R):ye(R)?we(e,d,"whitespace")(R):(a+=1,s&&(s=!1,i+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),c(R)))}function c(R){return R===null||R===124||Oe(R)?(e.exit("data"),d(R)):(e.consume(R),R===92?p:c)}function p(R){return R===92||R===124?(e.consume(R),c):c(R)}function h(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),s=!1,ye(R)?we(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):m(R))}function m(R){return R===45||R===58?k(R):R===124?(s=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),E):H(R)}function E(R){return ye(R)?we(e,k,"whitespace")(R):k(R)}function k(R){return R===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),_):R===45?(a+=1,_(R)):R===null||le(R)?F(R):H(R)}function _(R){return R===45?(e.enter("tableDelimiterFiller"),N(R)):H(R)}function N(R){return R===45?(e.consume(R),N):R===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(R))}function w(R){return ye(R)?we(e,F,"whitespace")(R):F(R)}function F(R){return R===124?m(R):R===null||le(R)?!s||i!==a?H(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):H(R)}function H(R){return n(R)}function I(R){return e.enter("tableRow"),V(R)}function V(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),V):R===null||le(R)?(e.exit("tableRow"),t(R)):ye(R)?we(e,V,"whitespace")(R):(e.enter("data"),U(R))}function U(R){return R===null||R===124||Oe(R)?(e.exit("data"),V(R)):(e.consume(R),R===92?Q:U)}function Q(R){return R===92||R===124?(e.consume(R),U):U(R)}}function _C(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,l=0,u,d,c;const p=new bC;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(o=!1,l!==0&&(Tc(p,t,l,u,d),d=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.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,s[2]===0&&(a[1]!==0&&(s[0]=s[1],c=Qi(p,t,a,i,void 0,c),a=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],c=Qi(p,t,a,i,void 0,c)),a=s,s=[a[1],n,0,0])):m.type==="tableHead"?(o=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,a[1]!==0?(s[0]=s[1],c=Qi(p,t,a,i,n,c)):s[1]!==0&&(c=Qi(p,t,s,i,n,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(l!==0&&Tc(p,t,l,u,d),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=TC(t.events,n))}return e}function Qi(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},hr(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=hr(t.events,n[1]);if(a={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const u=hr(t.events,n[2]),d=hr(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 p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[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&&(a.end=Object.assign({},hr(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Tc(e,t,n,r,i){const a=[],s=hr(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function hr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const kC={name:"tasklistCheck",tokenize:CC};function AC(){return{text:{91:kC}}}function CC(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"),a)}function a(l){return Oe(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return le(l)?t(l):ye(l)?e.check({tokenize:wC},t,n)(l):n(l)}}function wC(e,t,n){return we(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function SC(e){return Cp([Bk(),lC(),gC(e),xC(),AC()])}const NC={};function IC(e){const t=this,n=e||NC,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(SC(n)),a.push(Rk()),s.push(Lk(n))}var OC=Object.defineProperty,RC=Object.defineProperties,LC=Object.getOwnPropertyDescriptors,xc=Object.getOwnPropertySymbols,vC=Object.prototype.hasOwnProperty,DC=Object.prototype.propertyIsEnumerable,yc=(e,t,n)=>t in e?OC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jp=(e,t)=>{for(var n in t||(t={}))vC.call(t,n)&&yc(e,n,t[n]);if(xc)for(var n of xc(t))DC.call(t,n)&&yc(e,n,t[n]);return e},zp=(e,t)=>RC(e,LC(t)),PC=/(\*\*)([^*]*\*?)$/,MC=/(__)([^_]*?)$/,BC=/(\*\*\*)([^*]*?)$/,FC=/(\*)([^*]*?)$/,HC=/(_)([^_]*?)$/,UC=/(`)([^`]*?)$/,jC=/(~~)([^~]*?)$/,ar=/^[\s_~*`]*$/,$p=/^[\s]*[-*+][\s]+$/,zC=/[\p{L}\p{N}_]/u,$C=/^```[^`\n]*```?$/,VC=/^\*{4,}$/,WC=/(__)([^_]+)_$/,YC=/(~~)([^~]+)~$/,_c=/~~/g,vn=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:zC.test(e)},Ti=(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},qC=(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},Vp=(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},rs=(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},GC=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
64
- `)return!1}return!1},Wp=(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]==="]"?GC(e,t):!1;if(e[n]===`
65
- `)return!1}return!1},KC=(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]===`
66
- `)return!1}return!1},kl=(e,t,n)=>{let r=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
68
+ `))}function l(h,m,E,k){const _=E.enter("tableCell"),N=E.enter("phrasing"),C=E.containerPhrasing(h,{...k,before:a,after:a});return N(),_(),C}function u(h,m){return yk(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function d(h,m,E){const k=h.children;let _=-1;const N=[],C=m.enter("table");for(;++_<k.length;)N[_]=c(k[_],m,E);return C(),N}function c(h,m,E){const k=h.children;let _=-1;const N=[],C=m.enter("tableRow");for(;++_<k.length;)N[_]=l(k[_],h,m,E);return C(),N}function p(h,m,E){let k=zp.inlineCode(h,m,E);return E.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function fA(){return{exit:{taskListCheckValueChecked:Tc,taskListCheckValueUnchecked:Tc,paragraph:pA}}}function hA(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:mA}}}function Tc(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function pA(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 a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===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 mA(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let l=zp.listItem(e,t,n,{...r,...o.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(d){return d+s}}function gA(){return[$_(),ck(),pk(),aA(),fA()]}function bA(e){return{extensions:[V_(),dk(e),mk(),dA(e),hA()]}}function Ot(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Dt(e,t){return e.length>0?(Ot(e,e.length,0,t),e):t}const yc={}.hasOwnProperty;function Vp(e){const t={};let n=-1;for(;++n<e.length;)EA(t,e[n]);return t}function EA(e,t){let n;for(n in t){const i=(yc.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){yc.call(i,s)||(i[s]=[]);const o=a[s];TA(i[s],Array.isArray(o)?o:o?[o]:[])}}}function TA(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ot(e,0,0,r)}const yA={tokenize:CA,partial:!0},Wp={tokenize:SA,partial:!0},Yp={tokenize:NA,partial:!0},qp={tokenize:IA,partial:!0},xA={tokenize:RA,partial:!0},Gp={name:"wwwAutolink",tokenize:AA,previous:Xp},Kp={name:"protocolAutolink",tokenize:wA,previous:Qp},mn={name:"emailAutolink",tokenize:kA,previous:Jp},on={};function _A(){return{text:on}}let jn=48;for(;jn<123;)on[jn]=mn,jn++,jn===58?jn=65:jn===91&&(jn=97);on[43]=mn;on[45]=mn;on[46]=mn;on[95]=mn;on[72]=[mn,Kp];on[104]=[mn,Kp];on[87]=[mn,Gp];on[119]=[mn,Gp];function kA(e,t,n){const r=this;let i,a;return s;function s(c){return!wo(c)||!Jp.call(r,r.previous)||Sl(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(c))}function o(c){return wo(c)?(e.consume(c),o):c===64?(e.consume(c),l):n(c)}function l(c){return c===46?e.check(xA,d,u)(c):c===45||c===95||it(c)?(a=!0,e.consume(c),l):d(c)}function u(c){return e.consume(c),i=!0,l}function d(c){return a&&i&&ct(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function AA(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Xp.call(r,r.previous)||Sl(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(yA,e.attempt(Wp,e.attempt(Yp,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function wA(e,t,n){const r=this;let i="",a=!1;return s;function s(c){return(c===72||c===104)&&Qp.call(r,r.previous)&&!Sl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),o):n(c)}function o(c){if(ct(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),o;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),l}return n(c)}function l(c){return c===47?(e.consume(c),a?u:(a=!0,l)):n(c)}function u(c){return c===null||Ba(c)||Re(c)||Qn(c)||os(c)?n(c):e.attempt(Wp,e.attempt(Yp,d),n)(c)}function d(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function CA(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function SA(e,t,n){let r,i,a;return s;function s(u){return u===46||u===95?e.check(qp,l,o)(u):u===null||Re(u)||Qn(u)||u!==45&&os(u)?l(u):(a=!0,e.consume(u),s)}function o(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function l(u){return i||r||!a?n(u):t(u)}}function NA(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(qp,t,a)(s):s===null||Re(s)||Qn(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function IA(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),a):o===93?(e.consume(o),i):o===60||o===null||Re(o)||Qn(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Re(o)||Qn(o)?t(o):r(o)}function a(o){return ct(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):ct(o)?(e.consume(o),s):n(o)}}function RA(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return it(a)?n(a):t(a)}}function Xp(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Re(e)}function Qp(e){return!ct(e)}function Jp(e){return!(e===47||wo(e))}function wo(e){return e===43||e===45||e===46||e===95||it(e)}function Sl(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 Mr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&it(e.charCodeAt(n+1))&&it(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ls(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Co={name:"attention",resolveAll:OA,tokenize:LA};function OA(e,t){let n=-1,r,i,a,s,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},p={...e[n][1].start};xc(c,-l),xc(p,l),s={type:l>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Dt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Dt(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),u=Dt(u,ls(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Dt(u,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Dt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ot(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 LA(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Sr(r);let a;return s;function s(l){return a=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===a)return e.consume(l),o;const u=e.exit("attentionSequence"),d=Sr(l),c=!d||d===2&&i||n.includes(l),p=!i||i===2&&d||n.includes(r);return u._open=!!(a===42?c:c&&(i||!p)),u._close=!!(a===42?p:p&&(d||!c)),t(l)}}function xc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vA={name:"autolink",tokenize:DA};function DA(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return ct(h)?(e.consume(h),s):h===64?n(h):u(h)}function s(h){return h===43||h===45||h===46||it(h)?(r=1,o(h)):u(h)}function o(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||it(h))&&r++<32?(e.consume(h),o):(r=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Ba(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),d):v_(h)?(e.consume(h),u):n(h)}function d(h){return it(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||it(h))&&r++<63){const m=h===45?p:c;return e.consume(h),m}return n(h)}}function Ce(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return xe(l)?(e.enter(n),o(l)):t(l)}function o(l){return xe(l)&&a++<i?(e.consume(l),o):(e.exit(n),t(l))}}const Hi={partial:!0,tokenize:PA};function PA(e,t,n){return r;function r(a){return xe(a)?Ce(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||le(a)?t(a):n(a)}}const Zp={continuation:{tokenize:BA},exit:FA,name:"blockQuote",tokenize:MA};function MA(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return xe(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function BA(e,t,n){const r=this;return i;function i(s){return xe(s)?Ce(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Zp,t,n)(s)}}function FA(e){e.exit("blockQuote")}const e0={name:"characterEscape",tokenize:HA};function HA(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return P_(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const t0={name:"characterReference",tokenize:UA};function UA(e,t,n){const r=this;let i=0,a,s;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"),a=31,s=it,d(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=D_,d):(e.enter("characterReferenceValue"),a=7,s=Ao,d(c))}function d(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return s===it&&!Cl(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(c)&&i++<a?(e.consume(c),d):n(c)}}const _c={partial:!0,tokenize:zA},kc={concrete:!0,name:"codeFenced",tokenize:jA};function jA(e,t,n){const r=this,i={partial:!0,tokenize:H};let a=0,s=0,o;return l;function l(I){return u(I)}function u(I){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,o=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(I)}function d(I){return I===o?(s++,e.consume(I),d):s<3?n(I):(e.exit("codeFencedFenceSequence"),xe(I)?Ce(e,c,"whitespace")(I):c(I))}function c(I){return I===null||le(I)?(e.exit("codeFencedFence"),r.interrupt?t(I):e.check(_c,E,F)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(I))}function p(I){return I===null||le(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(I)):xe(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ce(e,h,"whitespace")(I)):I===96&&I===o?n(I):(e.consume(I),p)}function h(I){return I===null||le(I)?c(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(I))}function m(I){return I===null||le(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(I)):I===96&&I===o?n(I):(e.consume(I),m)}function E(I){return e.attempt(i,F,k)(I)}function k(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),_}function _(I){return a>0&&xe(I)?Ce(e,N,"linePrefix",a+1)(I):N(I)}function N(I){return I===null||le(I)?e.check(_c,E,F)(I):(e.enter("codeFlowValue"),C(I))}function C(I){return I===null||le(I)?(e.exit("codeFlowValue"),N(I)):(e.consume(I),C)}function F(I){return e.exit("codeFenced"),t(I)}function H(I,V,U){let Q=0;return O;function O(v){return I.enter("lineEnding"),I.consume(v),I.exit("lineEnding"),K}function K(v){return I.enter("codeFencedFence"),xe(v)?Ce(I,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):z(v)}function z(v){return v===o?(I.enter("codeFencedFenceSequence"),x(v)):U(v)}function x(v){return v===o?(Q++,I.consume(v),x):Q>=s?(I.exit("codeFencedFenceSequence"),xe(v)?Ce(I,L,"whitespace")(v):L(v)):U(v)}function L(v){return v===null||le(v)?(I.exit("codeFencedFence"),V(v)):U(v)}}}function zA(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ms={name:"codeIndented",tokenize:VA},$A={partial:!0,tokenize:WA};function VA(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ce(e,a,"linePrefix",5)(u)}function a(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):le(u)?e.attempt($A,s,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||le(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),t(u)}}function WA(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):le(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ce(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):le(s)?i(s):n(s)}}const YA={name:"codeText",previous:GA,resolve:qA,tokenize:KA};function qA(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 GA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function KA(e,t,n){let r=0,i,a;return s;function s(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?(a=e.enter("codeTextSequence"),i=0,d(c)):le(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||le(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)):(a.type="codeTextData",u(c))}}class XA{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 a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&jr(this.left,r),a.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),jr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),jr(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);jr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);jr(this.left,n.reverse())}}}function jr(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 n0(e){const t={};let n=-1,r,i,a,s,o,l,u;const d=new XA(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,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,QA(d,n)),n=t[n],u=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=d.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[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 Ot(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function QA(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,l=[],u={};let d,c,p=-1,h=n,m=0,E=0;const k=[E];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),c&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(E=p+1,k.push(E),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):k.pop(),p=k.length;p--;){const _=o.slice(k[p],k[p+1]),N=a.pop();l.push([N,N+_.length-1]),e.splice(N,2,_)}for(l.reverse(),p=-1;++p<l.length;)u[m+l[p][0]]=m+l[p][1],m+=l[p][1]-l[p][0]-1;return u}const JA={resolve:ew,tokenize:tw},ZA={partial:!0,tokenize:nw};function ew(e){return n0(e),e}function tw(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?a(o):le(o)?e.check(ZA,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function nw(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ce(e,a,"linePrefix")}function a(s){if(s===null||le(s))return n(s);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(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function r0(e,t,n,r,i,a,s,o,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return c;function c(_){return _===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Ba(_)?n(_):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),E(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===62?(e.exit("chunkString"),e.exit(o),p(_)):_===null||_===60||le(_)?n(_):(e.consume(_),_===92?m:h)}function m(_){return _===60||_===62||_===92?(e.consume(_),h):h(_)}function E(_){return!d&&(_===null||_===41||Re(_))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(_)):d<u&&_===40?(e.consume(_),d++,E):_===41?(e.consume(_),d--,E):_===null||_===32||_===40||Ba(_)?n(_):(e.consume(_),_===92?k:E)}function k(_){return _===40||_===41||_===92?(e.consume(_),E):E(_)}}function i0(e,t,n,r,i,a){const s=this;let o=0,l;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),d}function d(h){return o>999||h===null||h===91||h===93&&!l||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):le(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||le(h)||o++>999?(e.exit("chunkString"),d(h)):(e.consume(h),l||(l=!xe(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),o++,c):c(h)}}function a0(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,l):n(p)}function l(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),u(p))}function u(p){return p===s?(e.exit(a),l(s)):p===null?n(p):le(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ce(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||le(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:d)}function c(p){return p===s||p===92?(e.consume(p),d):d(p)}}function ci(e,t){let n;return r;function r(i){return le(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):xe(i)?Ce(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const rw={name:"definition",tokenize:aw},iw={partial:!0,tokenize:sw};function aw(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return i0.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=Vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return Re(h)?ci(e,u)(h):u(h)}function u(h){return r0(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(iw,c,c)(h)}function c(h){return xe(h)?Ce(e,p,"whitespace")(h):p(h)}function p(h){return h===null||le(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function sw(e,t,n){return r;function r(o){return Re(o)?ci(e,i)(o):n(o)}function i(o){return a0(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return xe(o)?Ce(e,s,"whitespace")(o):s(o)}function s(o){return o===null||le(o)?t(o):n(o)}}const ow={name:"hardBreakEscape",tokenize:lw};function lw(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const uw={name:"headingAtx",resolve:cw,tokenize:dw};function cw(e,t){let n=e.length-2,r=3,i,a;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},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ot(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function dw(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||Re(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||le(d)?(e.exit("atxHeading"),t(d)):xe(d)?Ce(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||Re(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const fw=["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"],Ac=["pre","script","style","textarea"],hw={concrete:!0,name:"htmlFlow",resolveTo:gw,tokenize:bw},pw={partial:!0,tokenize:Tw},mw={partial:!0,tokenize:Ew};function gw(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 bw(e,t,n){const r=this;let i,a,s,o,l;return u;function u(w){return d(w)}function d(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),c}function c(w){return w===33?(e.consume(w),p):w===47?(e.consume(w),a=!0,E):w===63?(e.consume(w),i=3,r.interrupt?t:T):ct(w)?(e.consume(w),s=String.fromCharCode(w),k):n(w)}function p(w){return w===45?(e.consume(w),i=2,h):w===91?(e.consume(w),i=5,o=0,m):ct(w)?(e.consume(w),i=4,r.interrupt?t:T):n(w)}function h(w){return w===45?(e.consume(w),r.interrupt?t:T):n(w)}function m(w){const he="CDATA[";return w===he.charCodeAt(o++)?(e.consume(w),o===he.length?r.interrupt?t:z:m):n(w)}function E(w){return ct(w)?(e.consume(w),s=String.fromCharCode(w),k):n(w)}function k(w){if(w===null||w===47||w===62||Re(w)){const he=w===47,ue=s.toLowerCase();return!he&&!a&&Ac.includes(ue)?(i=1,r.interrupt?t(w):z(w)):fw.includes(s.toLowerCase())?(i=6,he?(e.consume(w),_):r.interrupt?t(w):z(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):a?N(w):C(w))}return w===45||it(w)?(e.consume(w),s+=String.fromCharCode(w),k):n(w)}function _(w){return w===62?(e.consume(w),r.interrupt?t:z):n(w)}function N(w){return xe(w)?(e.consume(w),N):O(w)}function C(w){return w===47?(e.consume(w),O):w===58||w===95||ct(w)?(e.consume(w),F):xe(w)?(e.consume(w),C):O(w)}function F(w){return w===45||w===46||w===58||w===95||it(w)?(e.consume(w),F):H(w)}function H(w){return w===61?(e.consume(w),I):xe(w)?(e.consume(w),H):C(w)}function I(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),l=w,V):xe(w)?(e.consume(w),I):U(w)}function V(w){return w===l?(e.consume(w),l=null,Q):w===null||le(w)?n(w):(e.consume(w),V)}function U(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Re(w)?H(w):(e.consume(w),U)}function Q(w){return w===47||w===62||xe(w)?C(w):n(w)}function O(w){return w===62?(e.consume(w),K):n(w)}function K(w){return w===null||le(w)?z(w):xe(w)?(e.consume(w),K):n(w)}function z(w){return w===45&&i===2?(e.consume(w),D):w===60&&i===1?(e.consume(w),P):w===62&&i===4?(e.consume(w),ie):w===63&&i===3?(e.consume(w),T):w===93&&i===5?(e.consume(w),J):le(w)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(pw,te,x)(w)):w===null||le(w)?(e.exit("htmlFlowData"),x(w)):(e.consume(w),z)}function x(w){return e.check(mw,L,te)(w)}function L(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),v}function v(w){return w===null||le(w)?x(w):(e.enter("htmlFlowData"),z(w))}function D(w){return w===45?(e.consume(w),T):z(w)}function P(w){return w===47?(e.consume(w),s="",q):z(w)}function q(w){if(w===62){const he=s.toLowerCase();return Ac.includes(he)?(e.consume(w),ie):z(w)}return ct(w)&&s.length<8?(e.consume(w),s+=String.fromCharCode(w),q):z(w)}function J(w){return w===93?(e.consume(w),T):z(w)}function T(w){return w===62?(e.consume(w),ie):w===45&&i===2?(e.consume(w),T):z(w)}function ie(w){return w===null||le(w)?(e.exit("htmlFlowData"),te(w)):(e.consume(w),ie)}function te(w){return e.exit("htmlFlow"),t(w)}}function Ew(e,t,n){const r=this;return i;function i(s){return le(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Tw(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Hi,t,n)}}const yw={name:"htmlText",tokenize:xw};function xw(e,t,n){const r=this;let i,a,s;return o;function o(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),l}function l(T){return T===33?(e.consume(T),u):T===47?(e.consume(T),H):T===63?(e.consume(T),C):ct(T)?(e.consume(T),U):n(T)}function u(T){return T===45?(e.consume(T),d):T===91?(e.consume(T),a=0,m):ct(T)?(e.consume(T),N):n(T)}function d(T){return T===45?(e.consume(T),h):n(T)}function c(T){return T===null?n(T):T===45?(e.consume(T),p):le(T)?(s=c,P(T)):(e.consume(T),c)}function p(T){return T===45?(e.consume(T),h):c(T)}function h(T){return T===62?D(T):T===45?p(T):c(T)}function m(T){const ie="CDATA[";return T===ie.charCodeAt(a++)?(e.consume(T),a===ie.length?E:m):n(T)}function E(T){return T===null?n(T):T===93?(e.consume(T),k):le(T)?(s=E,P(T)):(e.consume(T),E)}function k(T){return T===93?(e.consume(T),_):E(T)}function _(T){return T===62?D(T):T===93?(e.consume(T),_):E(T)}function N(T){return T===null||T===62?D(T):le(T)?(s=N,P(T)):(e.consume(T),N)}function C(T){return T===null?n(T):T===63?(e.consume(T),F):le(T)?(s=C,P(T)):(e.consume(T),C)}function F(T){return T===62?D(T):C(T)}function H(T){return ct(T)?(e.consume(T),I):n(T)}function I(T){return T===45||it(T)?(e.consume(T),I):V(T)}function V(T){return le(T)?(s=V,P(T)):xe(T)?(e.consume(T),V):D(T)}function U(T){return T===45||it(T)?(e.consume(T),U):T===47||T===62||Re(T)?Q(T):n(T)}function Q(T){return T===47?(e.consume(T),D):T===58||T===95||ct(T)?(e.consume(T),O):le(T)?(s=Q,P(T)):xe(T)?(e.consume(T),Q):D(T)}function O(T){return T===45||T===46||T===58||T===95||it(T)?(e.consume(T),O):K(T)}function K(T){return T===61?(e.consume(T),z):le(T)?(s=K,P(T)):xe(T)?(e.consume(T),K):Q(T)}function z(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),i=T,x):le(T)?(s=z,P(T)):xe(T)?(e.consume(T),z):(e.consume(T),L)}function x(T){return T===i?(e.consume(T),i=void 0,v):T===null?n(T):le(T)?(s=x,P(T)):(e.consume(T),x)}function L(T){return T===null||T===34||T===39||T===60||T===61||T===96?n(T):T===47||T===62||Re(T)?Q(T):(e.consume(T),L)}function v(T){return T===47||T===62||Re(T)?Q(T):n(T)}function D(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):n(T)}function P(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),q}function q(T){return xe(T)?Ce(e,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):J(T)}function J(T){return e.enter("htmlTextData"),s(T)}}const Nl={name:"labelEnd",resolveAll:ww,resolveTo:Cw,tokenize:Sw},_w={tokenize:Nw},kw={tokenize:Iw},Aw={tokenize:Rw};function ww(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&&Ot(e,0,e.length,n),e}function Cw(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",l,t],["enter",u,t]],o=Dt(o,e.slice(a+1,a+r+3)),o=Dt(o,[["enter",d,t]]),o=Dt(o,ls(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=Dt(o,[["exit",d,t],e[s-2],e[s-1],["exit",u,t]]),o=Dt(o,e.slice(s+1)),o=Dt(o,[["exit",l,t]]),Ot(e,a,e.length,o),e}function Sw(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(p){return a?a._inactive?c(p):(s=r.parser.defined.includes(Vt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(_w,d,s?d:c)(p):p===91?e.attempt(kw,d,s?u:c)(p):s?d(p):c(p)}function u(p){return e.attempt(Aw,d,c)(p)}function d(p){return t(p)}function c(p){return a._balanced=!0,n(p)}}function Nw(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 Re(c)?ci(e,a)(c):a(c)}function a(c){return c===41?d(c):r0(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function s(c){return Re(c)?ci(e,l)(c):d(c)}function o(c){return n(c)}function l(c){return c===34||c===39||c===40?a0(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function u(c){return Re(c)?ci(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 Iw(e,t,n){const r=this;return i;function i(o){return i0.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(Vt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function Rw(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Ow={name:"labelStartImage",resolveAll:Nl.resolveAll,tokenize:Lw};function Lw(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const vw={name:"labelStartLink",resolveAll:Nl.resolveAll,tokenize:Dw};function Dw(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Bs={name:"lineEnding",tokenize:Pw};function Pw(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ce(e,t,"linePrefix")}}const xa={name:"thematicBreak",tokenize:Mw};function Mw(e,t,n){let r=0,i;return a;function a(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||le(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),xe(u)?Ce(e,o,"whitespace")(u):o(u))}}const mt={continuation:{tokenize:Uw},exit:zw,name:"list",tokenize:Hw},Bw={partial:!0,tokenize:$w},Fw={partial:!0,tokenize:jw};function Hw(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Ao(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(xa,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return Ao(h)&&++s<10?(e.consume(h),l):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Hi,r.interrupt?n:d,e.attempt(Bw,p,c))}function d(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function c(h){return xe(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Uw(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Hi,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!xe(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Fw,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(e,e.attempt(mt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function jw(e,t,n){const r=this;return Ce(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function zw(e){e.exit(this.containerState.type)}function $w(e,t,n){const r=this;return Ce(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!xe(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const wc={name:"setextUnderline",resolveTo:Vw,tokenize:Ww};function Vw(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Ww(e,t,n){const r=this;let i;return a;function a(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,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),xe(u)?Ce(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||le(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Yw={tokenize:eC,partial:!0};function qw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Qw,continuation:{tokenize:Jw},exit:Zw}},text:{91:{name:"gfmFootnoteCall",tokenize:Xw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Gw,resolveTo:Kw}}}}function Gw(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=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(!s||!s._balanced)return n(l);const u=Vt(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Kw(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 a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Xw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;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(a>999||c===93&&!s||c===null||c===91||Re(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Vt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Re(c)||(s=!0),a++,e.consume(c),c===92?d:u}function d(c){return c===91||c===92||c===93?(e.consume(c),a++,u):u(c)}}function Qw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=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(s>999||m===93&&!o||m===null||m===91||Re(m))return n(m);if(m===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return a=Vt(r.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Re(m)||(o=!0),s++,e.consume(m),m===92?c:d}function c(m){return m===91||m===92||m===93?(e.consume(m),s++,d):d(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),Ce(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function Jw(e,t,n){return e.check(Hi,t,e.attempt(Yw,t,n))}function Zw(e){e.exit("gfmFootnoteDefinition")}function eC(e,t,n){const r=this;return Ce(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function tC(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let u=l;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[l][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[l][1].end)},c={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[l][1].start)},p=[["enter",d,o],["enter",s[u][1],o],["exit",s[u][1],o],["enter",c,o]],h=o.parser.constructs.insideSpan.null;h&&Ot(p,p.length,0,ls(h,s.slice(u+1,l),o)),Ot(p,p.length,0,[["exit",c,o],["enter",s[l][1],o],["exit",s[l][1],o],["exit",d,o]]),Ot(s,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function a(s,o,l){const u=this.previous,d=this.events;let c=0;return p;function p(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(s.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const E=Sr(u);if(m===126)return c>1?l(m):(s.consume(m),c++,h);if(c<2&&!n)return l(m);const k=s.exit("strikethroughSequenceTemporary"),_=Sr(m);return k._open=!_||_===2&&!!E,k._close=!E||E===2&&!!_,o(m)}}}class nC{constructor(){this.map=[]}add(t,n,r){rC(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[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 a of i)t.push(a);i=r.pop()}this.map.length=0}}function rC(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 iC(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 a=r.length-1;r[a]=r[a]==="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 aC(){return{flow:{null:{name:"table",tokenize:sC,resolveAll:oC}}}}function sC(e,t,n){const r=this;let i=0,a=0,s;return o;function o(O){let K=r.events.length-1;for(;K>-1;){const L=r.events[K][1].type;if(L==="lineEnding"||L==="linePrefix")K--;else break}const z=K>-1?r.events[K][1].type:null,x=z==="tableHead"||z==="tableRow"?I:l;return x===I&&r.parser.lazy[r.now().line]?n(O):x(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),u(O)}function u(O){return O===124||(s=!0,a+=1),d(O)}function d(O){return O===null?n(O):le(O)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),h):n(O):xe(O)?Ce(e,d,"whitespace")(O):(a+=1,s&&(s=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),c(O)))}function c(O){return O===null||O===124||Re(O)?(e.exit("data"),d(O)):(e.consume(O),O===92?p:c)}function p(O){return O===92||O===124?(e.consume(O),c):c(O)}function h(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),s=!1,xe(O)?Ce(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):m(O))}function m(O){return O===45||O===58?k(O):O===124?(s=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),E):H(O)}function E(O){return xe(O)?Ce(e,k,"whitespace")(O):k(O)}function k(O){return O===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),_):O===45?(a+=1,_(O)):O===null||le(O)?F(O):H(O)}function _(O){return O===45?(e.enter("tableDelimiterFiller"),N(O)):H(O)}function N(O){return O===45?(e.consume(O),N):O===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(O))}function C(O){return xe(O)?Ce(e,F,"whitespace")(O):F(O)}function F(O){return O===124?m(O):O===null||le(O)?!s||i!==a?H(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):H(O)}function H(O){return n(O)}function I(O){return e.enter("tableRow"),V(O)}function V(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),V):O===null||le(O)?(e.exit("tableRow"),t(O)):xe(O)?Ce(e,V,"whitespace")(O):(e.enter("data"),U(O))}function U(O){return O===null||O===124||Re(O)?(e.exit("data"),V(O)):(e.consume(O),O===92?Q:U)}function Q(O){return O===92||O===124?(e.consume(O),U):U(O)}}function oC(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,l=0,u,d,c;const p=new nC;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(o=!1,l!==0&&(Cc(p,t,l,u,d),d=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.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,s[2]===0&&(a[1]!==0&&(s[0]=s[1],c=na(p,t,a,i,void 0,c),a=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],c=na(p,t,a,i,void 0,c)),a=s,s=[a[1],n,0,0])):m.type==="tableHead"?(o=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,a[1]!==0?(s[0]=s[1],c=na(p,t,a,i,n,c)):s[1]!==0&&(c=na(p,t,s,i,n,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(l!==0&&Cc(p,t,l,u,d),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=iC(t.events,n))}return e}function na(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},pr(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=pr(t.events,n[1]);if(a={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const u=pr(t.events,n[2]),d=pr(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 p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[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&&(a.end=Object.assign({},pr(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Cc(e,t,n,r,i){const a=[],s=pr(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function pr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lC={name:"tasklistCheck",tokenize:cC};function uC(){return{text:{91:lC}}}function cC(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"),a)}function a(l){return Re(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return le(l)?t(l):xe(l)?e.check({tokenize:dC},t,n)(l):n(l)}}function dC(e,t,n){return Ce(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function fC(e){return Vp([_A(),qw(),tC(e),aC(),uC()])}const hC={};function pC(e){const t=this,n=e||hC,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(fC(n)),a.push(gA()),s.push(bA(n))}var mC=Object.defineProperty,gC=Object.defineProperties,bC=Object.getOwnPropertyDescriptors,Sc=Object.getOwnPropertySymbols,EC=Object.prototype.hasOwnProperty,TC=Object.prototype.propertyIsEnumerable,Nc=(e,t,n)=>t in e?mC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s0=(e,t)=>{for(var n in t||(t={}))EC.call(t,n)&&Nc(e,n,t[n]);if(Sc)for(var n of Sc(t))TC.call(t,n)&&Nc(e,n,t[n]);return e},o0=(e,t)=>gC(e,bC(t)),yC=/(\*\*)([^*]*\*?)$/,xC=/(__)([^_]*?)$/,_C=/(\*\*\*)([^*]*?)$/,kC=/(\*)([^*]*?)$/,AC=/(_)([^_]*?)$/,wC=/(`)([^`]*?)$/,CC=/(~~)([^~]*?)$/,sr=/^[\s_~*`]*$/,l0=/^[\s]*[-*+][\s]+$/,SC=/[\p{L}\p{N}_]/u,NC=/^```[^`\n]*```?$/,IC=/^\*{4,}$/,RC=/(__)([^_]+)_$/,OC=/(~~)([^~]+)~$/,Ic=/~~/g,vn=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:SC.test(e)},Ai=(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},LC=(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},u0=(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},us=(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},vC=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
69
+ `)return!1}return!1},c0=(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]==="]"?vC(e,t):!1;if(e[n]===`
70
+ `)return!1}return!1},DC=(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},Il=(e,t,n)=>{let r=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
67
72
  `){r=l+1;break}let i=e.length;for(let l=t;l<e.length;l+=1)if(e[l]===`
68
- `){i=l;break}let a=e.substring(r,i),s=0,o=!1;for(let l of a)if(l===n)s+=1;else if(l!==" "&&l!==" "){o=!0;break}return s>=3&&!o},XC=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,QC=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(XC,(t,n,r,i)=>Ti(e,i)?t:`${n}\\>${r}`),JC=(e,t,n,r)=>n==="\\"||e.includes("$")&&rs(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&vn(n)&&vn(r)||(!n||n===" "||n===" "||n===`
73
+ `){i=l;break}let a=e.substring(r,i),s=0,o=!1;for(let l of a)if(l===n)s+=1;else if(l!==" "&&l!==" "){o=!0;break}return s>=3&&!o},PC=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,MC=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(PC,(t,n,r,i)=>Ai(e,i)?t:`${n}\\>${r}`),BC=(e,t,n,r)=>n==="\\"||e.includes("$")&&us(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&vn(n)&&vn(r)||(!n||n===" "||n===" "||n===`
69
74
  `)&&(!r||r===" "||r===" "||r===`
70
- `)),Yp=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 a=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";JC(e,i,a,s)||(t+=1)}return t},ZC=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&rs(e,t)||Wp(e,t)||KC(e,t)||n==="_"||r==="_"||n&&r&&vn(n)&&vn(r)),ew=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 a=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";ZC(e,i,a,s)||(t+=1)}return t},tw=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},Al=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},kc=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},nw=(e,t,n)=>{if(!t||ar.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
71
- `),i=r===-1?0:r+1,a=e.substring(i,n);return $p.test(a)&&t.includes(`
72
- `)?!0:kl(e,n,"*")},rw=e=>{let t=e.match(PC);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Ti(e,r)||nw(e,n,r)?e:Al(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},iw=(e,t,n)=>{if(!t||ar.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
73
- `),i=r===-1?0:r+1,a=e.substring(i,n);return $p.test(a)&&t.includes(`
74
- `)?!0:kl(e,n,"_")},aw=e=>{let t=e.match(MC);if(!t){let i=e.match(WC);if(i){let a=e.lastIndexOf(i[1]);if(!Ti(e,a)&&kc(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Ti(e,r)||iw(e,n,r)?e:kc(e)%2===1?`${e}__`:e},sw=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]!=="\\"&&!rs(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
75
+ `)),d0=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 a=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";BC(e,i,a,s)||(t+=1)}return t},FC=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&us(e,t)||c0(e,t)||DC(e,t)||n==="_"||r==="_"||n&&r&&vn(n)&&vn(r)),HC=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 a=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";FC(e,i,a,s)||(t+=1)}return t},UC=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},Rl=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},Rc=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},jC=(e,t,n)=>{if(!t||sr.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
76
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return l0.test(a)&&t.includes(`
77
+ `)?!0:Il(e,n,"*")},zC=e=>{let t=e.match(yC);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Ai(e,r)||jC(e,n,r)?e:Rl(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},$C=(e,t,n)=>{if(!t||sr.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
78
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return l0.test(a)&&t.includes(`
79
+ `)?!0:Il(e,n,"_")},VC=e=>{let t=e.match(xC);if(!t){let i=e.match(RC);if(i){let a=e.lastIndexOf(i[1]);if(!Ai(e,a)&&Rc(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Ai(e,r)||$C(e,n,r)?e:Rc(e)%2===1?`${e}__`:e},WC=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]!=="\\"&&!us(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
75
80
  `)&&(!i||i===" "||i===" "||i===`
76
- `)||r&&i&&vn(r)&&vn(i))continue;return n}}return-1},ow=e=>{if(!e.match(FC))return e;let t=sw(e);if(t===-1)return e;let n=e.substring(t+1);return!n||ar.test(n)?e:Yp(e)%2===1?`${e}*`:e},qp=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]!=="\\"&&!rs(e,n)&&!Wp(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&vn(r)&&vn(i))continue;return n}}return-1},lw=e=>{let t=e.length;for(;t>0&&e[t-1]===`
77
- `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},uw=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Al(t)%2!==1)return null;let n=t.indexOf("**"),r=qp(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},cw=e=>{if(!e.match(HC))return e;let t=qp(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||ar.test(n))return e;if(ew(e)%2===1){let r=uw(e);return r!==null?r:lw(e)}return e},dw=e=>{let t=Al(e),n=Yp(e);return t%2===0&&n%2===0},fw=(e,t,n)=>!t||ar.test(t)||Ti(e,n)?!0:kl(e,n,"*"),hw=e=>{if(VC.test(e))return e;let t=e.match(BC);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return fw(e,n,r)?e:tw(e)%2===1?dw(e)?e:`${e}***`:e},xi=(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},pw=(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},mw=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!pw(e,n)&&(t+=1);return t},gw=/<[a-zA-Z/][^>]*$/,bw=e=>{let t=e.match(gw);return!t||t.index===void 0||xi(e,t.index)?e:e.substring(0,t.index).trimEnd()},Ew=e=>!e.match($C)||e.includes(`
78
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Tw=e=>(e.match(/```/g)||[]).length%2===1,xw=e=>{let t=Ew(e);if(t!==null)return t;let n=e.match(UC);if(n&&!Tw(e)){let r=n[2];if(!r||ar.test(r))return e;if(mw(e)%2===1)return`${e}\``}return e},yw=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",_w=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!yw(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},kw=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
81
+ `)||r&&i&&vn(r)&&vn(i))continue;return n}}return-1},YC=e=>{if(!e.match(kC))return e;let t=WC(e);if(t===-1)return e;let n=e.substring(t+1);return!n||sr.test(n)?e:d0(e)%2===1?`${e}*`:e},f0=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]!=="\\"&&!us(e,n)&&!c0(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&vn(r)&&vn(i))continue;return n}}return-1},qC=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}_`},GC=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Rl(t)%2!==1)return null;let n=t.indexOf("**"),r=f0(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},KC=e=>{if(!e.match(AC))return e;let t=f0(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||sr.test(n))return e;if(HC(e)%2===1){let r=GC(e);return r!==null?r:qC(e)}return e},XC=e=>{let t=Rl(e),n=d0(e);return t%2===0&&n%2===0},QC=(e,t,n)=>!t||sr.test(t)||Ai(e,n)?!0:Il(e,n,"*"),JC=e=>{if(IC.test(e))return e;let t=e.match(_C);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return QC(e,n,r)?e:UC(e)%2===1?XC(e)?e:`${e}***`:e},wi=(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},ZC=(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},eS=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!ZC(e,n)&&(t+=1);return t},tS=/<[a-zA-Z/][^>]*$/,nS=e=>{let t=e.match(tS);return!t||t.index===void 0||wi(e,t.index)?e:e.substring(0,t.index).trimEnd()},rS=e=>!e.match(NC)||e.includes(`
83
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,iS=e=>(e.match(/```/g)||[]).length%2===1,aS=e=>{let t=rS(e);if(t!==null)return t;let n=e.match(wC);if(n&&!iS(e)){let r=n[2];if(!r||sr.test(r))return e;if(eS(e)%2===1)return`${e}\``}return e},sS=(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)==="```",oS=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!sS(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},lS=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
79
84
  `,t)!==-1&&!e.endsWith(`
80
85
  `)?`${e}
81
- $$`:`${e}$$`},Aw=e=>_w(e)%2===0?e:kw(e),Cw=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=qC(e,t);if(r===-1||xi(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let o=e.substring(r+1,t);return n==="text-only"?`${s}${o}`:`${s}[${o}](streamdown:incomplete-link)`},Ac=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!xi(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Vp(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},ww=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=Ac(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}if(Vp(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=Ac(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}return null},Gp=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!xi(e,n)){let r=Cw(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!xi(e,r)){let i=ww(e,r,t);if(i!==null)return i}return e},Sw=/^-{1,2}$/,Nw=/^[\s]*-{1,2}[\s]+$/,Iw=/^={1,2}$/,Ow=/^[\s]*={1,2}[\s]+$/,Rw=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
82
- `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(Sw.test(i)&&!n.match(Nw)){let a=r.split(`
83
- `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(Iw.test(i)&&!n.match(Ow)){let a=r.split(`
84
- `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},Lw=e=>{var t,n;let r=e.match(jC);if(r){let i=r[2];if(!i||ar.test(i))return e;if(((t=e.match(_c))==null?void 0:t.length)%2===1)return`${e}~~`}else if(e.match(YC)&&((n=e.match(_c))==null?void 0:n.length)%2===1)return`${e}~`;return e},Os=e=>e!==!1,wt={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},vw=[{handler:{name:"comparisonOperators",handle:QC,priority:wt.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:bw,priority:wt.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Rw,priority:wt.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Gp,priority:wt.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:hw,priority:wt.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:rw,priority:wt.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:aw,priority:wt.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:ow,priority:wt.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:cw,priority:wt.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:xw,priority:wt.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Lw,priority:wt.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:Aw,priority:wt.KATEX},optionKey:"katex"}],Dw=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return vw.filter(({handler:r,optionKey:i})=>r.name==="links"?Os(e==null?void 0:e.links)||Os(e==null?void 0:e.images):Os(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:zp(jp({},r),{handle:a=>Gp(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},Pw=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=Dw(t),a=((n=t==null?void 0:t.handlers)!=null?n:[]).map(o=>{var l;return{handler:zp(jp({},o),{priority:(l=o.priority)!=null?l:wt.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].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 s)if(r=o.handle(r),l!=null&&l(r))return r;return r},Mw=Pw;const Bw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hw={};function Cc(e,t){return(Hw.jsx?Fw:Bw).test(e)}const Uw=/[ \t\n\f\r]/g;function jw(e){return typeof e=="object"?e.type==="text"?wc(e.value):!1:wc(e)}function wc(e){return e.replace(Uw,"")===""}var cr={},Rs,Sc;function zw(){if(Sc)return Rs;Sc=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
85
- `,u="/",d="*",c="",p="comment",h="declaration";Rs=function(E,k){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];k=k||{};var _=1,N=1;function w(y){var L=y.match(t);L&&(_+=L.length);var v=y.lastIndexOf(l);N=~v?y.length-v:N+y.length}function F(){var y={line:_,column:N};return function(L){return L.position=new H(y),U(),L}}function H(y){this.start=y,this.end={line:_,column:N},this.source=k.source}H.prototype.content=E;function I(y){var L=new Error(k.source+":"+_+":"+N+": "+y);if(L.reason=y,L.filename=k.source,L.line=_,L.column=N,L.source=E,!k.silent)throw L}function V(y){var L=y.exec(E);if(L){var v=L[0];return w(v),E=E.slice(v.length),L}}function U(){V(n)}function Q(y){var L;for(y=y||[];L=R();)L!==!1&&y.push(L);return y}function R(){var y=F();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 I("End of comment missing");var v=E.slice(2,L-2);return N+=2,w(v),E=E.slice(L),N+=2,y({type:p,comment:v})}}function K(){var y=F(),L=V(r);if(L){if(R(),!V(i))return I("property missing ':'");var v=V(a),D=y({type:h,property:m(L[0].replace(e,c)),value:v?m(v[0].replace(e,c)):c});return V(s),D}}function z(){var y=[];Q(y);for(var L;L=K();)L!==!1&&(y.push(L),Q(y));return y}return U(),z()};function m(E){return E?E.replace(o,c):c}return Rs}var Nc;function $w(){if(Nc)return cr;Nc=1;var e=cr&&cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cr,"__esModule",{value:!0}),cr.default=n;var t=e(zw());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),o=typeof i=="function";return s.forEach(function(l){if(l.type==="declaration"){var u=l.property,d=l.value;o?i(u,d,l):d&&(a=a||{},a[u]=d)}}),a}return cr}var jr={},Ic;function Vw(){if(Ic)return jr;Ic=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(u){return!u||n.test(u)||e.test(u)},s=function(u,d){return d.toUpperCase()},o=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),a(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,o):u=u.replace(r,o),u.replace(t,s))};return jr.camelCase=l,jr}var zr,Oc;function Ww(){if(Oc)return zr;Oc=1;var e=zr&&zr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e($w()),n=Vw();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(o,l){o&&l&&(s[(0,n.camelCase)(o,a)]=l)}),s}return r.default=r,zr=r,zr}var Yw=Ww();const qw=Bd(Yw);function ci(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rc(e.position):"start"in e||"end"in e?Rc(e):"line"in e||"column"in e?yo(e):""}function yo(e){return Lc(e&&e.line)+":"+Lc(e&&e.column)}function Rc(e){return yo(e&&e.start)+"-"+yo(e&&e.end)}function Lc(e){return e&&typeof e=="number"?e:1}class st extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=ci(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}st.prototype.file="";st.prototype.name="";st.prototype.reason="";st.prototype.message="";st.prototype.stack="";st.prototype.column=void 0;st.prototype.line=void 0;st.prototype.ancestors=void 0;st.prototype.cause=void 0;st.prototype.fatal=void 0;st.prototype.place=void 0;st.prototype.ruleId=void 0;st.prototype.source=void 0;const Cl={}.hasOwnProperty,Gw=new Map,Kw=/[A-Z]/g,Xw=new Set(["table","tbody","thead","tfoot","tr"]),Qw=new Set(["td","th"]),Kp="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jw(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=sS(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=aS(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"?Or:Ka,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Xp(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Xp(e,t,n){if(t.type==="element")return Zw(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return eS(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nS(e,t,n);if(t.type==="mdxjsEsm")return tS(e,t);if(t.type==="root")return rS(e,t,n);if(t.type==="text")return iS(e,t)}function Zw(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Or,e.schema=i),e.ancestors.push(t);const a=Jp(e,t.tagName,!1),s=oS(e,t);let o=Sl(e,t);return Xw.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!jw(l):!0})),Qp(e,s,a,t),wl(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function eS(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)}yi(e,t.position)}function tS(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);yi(e,t.position)}function nS(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Or,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Jp(e,t.name,!0),s=lS(e,t),o=Sl(e,t);return Qp(e,s,a,t),wl(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function rS(e,t,n){const r={};return wl(r,Sl(e,t)),e.create(t,e.Fragment,r,n)}function iS(e,t){return t.value}function Qp(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function wl(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function aS(e,t,n){return r;function r(i,a,s,o){const u=Array.isArray(s.children)?n:t;return o?u(a,s,o):u(a,s)}}function sS(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),l=sn(r);return t(i,a,s,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function oS(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Cl.call(t.properties,i)){const a=uS(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&Qw.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function lS(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else yi(e,t.position);else{const i=r.name;let a;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,a=e.evaluater.evaluateExpression(o.expression)}else yi(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Sl(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Gw;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const u=i.get(l)||0;s=l+"-"+u,i.set(l,u+1)}}const o=Xp(e,a,s);o!==void 0&&n.push(o)}return n}function uS(e,t,n){const r=ul(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?sh(n):oh(n)),r.property==="style"){let i=typeof n=="object"?n:cS(e,String(n));return e.stylePropertyNameCase==="css"&&(i=dS(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?hT[r.property]||r.property:r.attribute,n]}}function cS(e,t){try{return qw(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new st("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=Kp+"#cannot-parse-style-attribute",i}}function Jp(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=Cc(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=Cc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Cl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);yi(e)}function yi(e,t){const n=new st("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=Kp+"#cannot-handle-mdx-estrees-without-createevaluater",n}function dS(e){const t={};let n;for(n in e)Cl.call(e,n)&&(t[fS(n)]=e[n]);return t}function fS(e){let t=e.replace(Kw,hS);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function hS(e){return"-"+e.toLowerCase()}const Ls={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"]},pS={tokenize:mS};function mS(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"),we(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return le(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const gS={tokenize:bS},vc={tokenize:ES};function bS(e){const t=this,n=[];let r=0,i,a,s;return o;function o(w){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,l,u)(w)}return u(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&N();const F=t.events.length;let H=F,I;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){I=t.events[H][1].end;break}_(r);let V=F;for(;V<t.events.length;)t.events[V][1].end={...I},V++;return Ot(t.events,H+1,0,t.events.slice(F)),t.events.length=V,u(w)}return o(w)}function u(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(vc,d,c)(w)}function d(w){return i&&N(),_(r),p(w)}function c(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(w)}function p(w){return t.containerState={},e.attempt(vc,h,m)(w)}function h(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function m(w){if(w===null){i&&N(),_(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),E(w)}function E(w){if(w===null){k(e.exit("chunkFlow"),!0),_(0),e.consume(w);return}return le(w)?(e.consume(w),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(w),E)}function k(w,F){const H=t.sliceStream(w);if(F&&H.push(null),w.previous=a,a&&(a.next=w),a=w,i.defineSkip(w.start),i.write(H),t.parser.lazy[w.start.line]){let I=i.events.length;for(;I--;)if(i.events[I][1].start.offset<s&&(!i.events[I][1].end||i.events[I][1].end.offset>s))return;const V=t.events.length;let U=V,Q,R;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(Q){R=t.events[U][1].end;break}Q=!0}for(_(r),I=V;I<t.events.length;)t.events[I][1].end={...R},I++;Ot(t.events,U+1,0,t.events.slice(V)),t.events.length=I}}function _(w){let F=n.length;for(;F-- >w;){const H=n[F];t.containerState=H[1],H[0].exit.call(t,e)}n.length=w}function N(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ES(e,t,n){return we(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const TS={tokenize:xS};function xS(e){const t=this,n=e.attempt(Di,r,e.attempt(this.parser.constructs.flowInitial,i,we(e,e.attempt(this.parser.constructs.flow,i,e.attempt(hA,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const yS={resolveAll:e0()},_S=Zp("string"),kS=Zp("text");function Zp(e){return{resolveAll:e0(e==="text"?AS:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(d){return u(d)?a(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"),a(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const c=i[d];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function e0(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function AS(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 a=i.length,s=-1,o=0,l;for(;a--;){const u=i[a];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(u===-2)l=!0,o++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,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 CS={42:mt,43:mt,45:mt,48:mt,49:mt,50:mt,51:mt,52:mt,53:mt,54:mt,55:mt,56:mt,57:mt,62:Dp},wS={91:EA},SS={[-2]:Ns,[-1]:Ns,32:Ns},NS={35:AA,42:ga,45:[Ec,ga],60:NA,61:Ec,95:ga,96:gc,126:gc},IS={38:Mp,92:Pp},OS={[-5]:Is,[-4]:Is,[-3]:Is,33:YA,38:Mp,42:xo,60:[Gk,PA],91:GA,92:[_A,Pp],93:_l,95:xo,96:oA},RS={null:[xo,yS]},LS={null:[42,95]},vS={null:[]},DS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:LS,contentInitial:wS,disable:vS,document:CS,flow:NS,flowInitial:SS,insideSpan:RS,string:IS,text:OS},Symbol.toStringTag,{value:"Module"}));function PS(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={},a=[];let s=[],o=[];const l={attempt:V(H),check:V(I),consume:N,enter:w,exit:F,interrupt:V(I,{interrupt:!0})},u={code:null,containerState:{},defineSkip:E,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let d=t.tokenize.call(u,l);return t.resolveAll&&a.push(t),u;function c(K){return s=vt(s,K),k(),s[s.length-1]!==null?[]:(U(t,0),u.events=ns(a,u.events,u),u.events)}function p(K,z){return BS(h(K),z)}function h(K){return MS(s,K)}function m(){const{_bufferIndex:K,_index:z,line:y,column:L,offset:v}=r;return{_bufferIndex:K,_index:z,line:y,column:L,offset:v}}function E(K){i[K.line]=K.column,R()}function k(){let K;for(;r._index<s.length;){const z=s[r._index];if(typeof z=="string")for(K=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===K&&r._bufferIndex<z.length;)_(z.charCodeAt(r._bufferIndex));else _(z)}}function _(K){d=d(K)}function N(K){le(K)?(r.line++,r.column=1,r.offset+=K===-3?2:1,R()):K!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=K}function w(K,z){const y=z||{};return y.type=K,y.start=m(),u.events.push(["enter",y,u]),o.push(y),y}function F(K){const z=o.pop();return z.end=m(),u.events.push(["exit",z,u]),z}function H(K,z){U(K,z.from)}function I(K,z){z.restore()}function V(K,z){return y;function y(L,v,D){let P,q,J,T;return Array.isArray(L)?te(L):"tokenize"in L?te([L]):ie(L);function ie(de){return He;function He(be){const ke=be!==null&&de[be],Xe=be!==null&&de.null,Qe=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Xe)?Xe:Xe?[Xe]:[]];return te(Qe)(be)}}function te(de){return P=de,q=0,de.length===0?D:C(de[q])}function C(de){return He;function He(be){return T=Q(),J=de,de.partial||(u.currentConstruct=de),de.name&&u.parser.constructs.disable.null.includes(de.name)?ue():de.tokenize.call(z?Object.assign(Object.create(u),z):u,l,he,ue)(be)}}function he(de){return K(J,T),v}function ue(de){return T.restore(),++q<P.length?C(P[q]):D}}}function U(K,z){K.resolveAll&&!a.includes(K)&&a.push(K),K.resolve&&Ot(u.events,z,u.events.length-z,K.resolve(u.events.slice(z),u)),K.resolveTo&&(u.events=K.resolveTo(u.events,u))}function Q(){const K=m(),z=u.previous,y=u.currentConstruct,L=u.events.length,v=Array.from(o);return{from:L,restore:D};function D(){r=K,u.previous=z,u.currentConstruct=y,u.events.length=L,o=v,R()}}function R(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function MS(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function BS(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
86
+ $$`:`${e}$$`},uS=e=>oS(e)%2===0?e:lS(e),cS=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=LC(e,t);if(r===-1||wi(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let o=e.substring(r+1,t);return n==="text-only"?`${s}${o}`:`${s}[${o}](streamdown:incomplete-link)`},Oc=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!wi(e,n)){if(n>0&&e[n-1]==="!")continue;let r=u0(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},dS=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=Oc(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}if(u0(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=Oc(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}return null},h0=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!wi(e,n)){let r=cS(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!wi(e,r)){let i=dS(e,r,t);if(i!==null)return i}return e},fS=/^-{1,2}$/,hS=/^[\s]*-{1,2}[\s]+$/,pS=/^={1,2}$/,mS=/^[\s]*={1,2}[\s]+$/,gS=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(fS.test(i)&&!n.match(hS)){let a=r.split(`
88
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(pS.test(i)&&!n.match(mS)){let a=r.split(`
89
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},bS=e=>{var t,n;let r=e.match(CC);if(r){let i=r[2];if(!i||sr.test(i))return e;if(((t=e.match(Ic))==null?void 0:t.length)%2===1)return`${e}~~`}else if(e.match(OC)&&((n=e.match(Ic))==null?void 0:n.length)%2===1)return`${e}~`;return e},Fs=e=>e!==!1,Ct={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},ES=[{handler:{name:"comparisonOperators",handle:MC,priority:Ct.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:nS,priority:Ct.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:gS,priority:Ct.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:h0,priority:Ct.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:JC,priority:Ct.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:zC,priority:Ct.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:VC,priority:Ct.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:YC,priority:Ct.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:KC,priority:Ct.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:aS,priority:Ct.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:bS,priority:Ct.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:uS,priority:Ct.KATEX},optionKey:"katex"}],TS=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return ES.filter(({handler:r,optionKey:i})=>r.name==="links"?Fs(e==null?void 0:e.links)||Fs(e==null?void 0:e.images):Fs(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:o0(s0({},r),{handle:a=>h0(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},yS=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=TS(t),a=((n=t==null?void 0:t.handlers)!=null?n:[]).map(o=>{var l;return{handler:o0(s0({},o),{priority:(l=o.priority)!=null?l:Ct.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].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 s)if(r=o.handle(r),l!=null&&l(r))return r;return r},xS=yS;const _S=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,AS={};function Lc(e,t){return(AS.jsx?kS:_S).test(e)}const wS=/[ \t\n\f\r]/g;function CS(e){return typeof e=="object"?e.type==="text"?vc(e.value):!1:vc(e)}function vc(e){return e.replace(wS,"")===""}var dr={},Hs,Dc;function SS(){if(Dc)return Hs;Dc=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
90
+ `,u="/",d="*",c="",p="comment",h="declaration";Hs=function(E,k){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];k=k||{};var _=1,N=1;function C(x){var L=x.match(t);L&&(_+=L.length);var v=x.lastIndexOf(l);N=~v?x.length-v:N+x.length}function F(){var x={line:_,column:N};return function(L){return L.position=new H(x),U(),L}}function H(x){this.start=x,this.end={line:_,column:N},this.source=k.source}H.prototype.content=E;function I(x){var L=new Error(k.source+":"+_+":"+N+": "+x);if(L.reason=x,L.filename=k.source,L.line=_,L.column=N,L.source=E,!k.silent)throw L}function V(x){var L=x.exec(E);if(L){var v=L[0];return C(v),E=E.slice(v.length),L}}function U(){V(n)}function Q(x){var L;for(x=x||[];L=O();)L!==!1&&x.push(L);return x}function O(){var x=F();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 I("End of comment missing");var v=E.slice(2,L-2);return N+=2,C(v),E=E.slice(L),N+=2,x({type:p,comment:v})}}function K(){var x=F(),L=V(r);if(L){if(O(),!V(i))return I("property missing ':'");var v=V(a),D=x({type:h,property:m(L[0].replace(e,c)),value:v?m(v[0].replace(e,c)):c});return V(s),D}}function z(){var x=[];Q(x);for(var L;L=K();)L!==!1&&(x.push(L),Q(x));return x}return U(),z()};function m(E){return E?E.replace(o,c):c}return Hs}var Pc;function NS(){if(Pc)return dr;Pc=1;var e=dr&&dr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(dr,"__esModule",{value:!0}),dr.default=n;var t=e(SS());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),o=typeof i=="function";return s.forEach(function(l){if(l.type==="declaration"){var u=l.property,d=l.value;o?i(u,d,l):d&&(a=a||{},a[u]=d)}}),a}return dr}var zr={},Mc;function IS(){if(Mc)return zr;Mc=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(u){return!u||n.test(u)||e.test(u)},s=function(u,d){return d.toUpperCase()},o=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),a(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,o):u=u.replace(r,o),u.replace(t,s))};return zr.camelCase=l,zr}var $r,Bc;function RS(){if(Bc)return $r;Bc=1;var e=$r&&$r.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(NS()),n=IS();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(o,l){o&&l&&(s[(0,n.camelCase)(o,a)]=l)}),s}return r.default=r,$r=r,$r}var OS=RS();const LS=Vd(OS);function di(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fc(e.position):"start"in e||"end"in e?Fc(e):"line"in e||"column"in e?So(e):""}function So(e){return Hc(e&&e.line)+":"+Hc(e&&e.column)}function Fc(e){return So(e&&e.start)+"-"+So(e&&e.end)}function Hc(e){return e&&typeof e=="number"?e:1}class ot extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=di(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}ot.prototype.file="";ot.prototype.name="";ot.prototype.reason="";ot.prototype.message="";ot.prototype.stack="";ot.prototype.column=void 0;ot.prototype.line=void 0;ot.prototype.ancestors=void 0;ot.prototype.cause=void 0;ot.prototype.fatal=void 0;ot.prototype.place=void 0;ot.prototype.ruleId=void 0;ot.prototype.source=void 0;const Ol={}.hasOwnProperty,vS=new Map,DS=/[A-Z]/g,PS=new Set(["table","tbody","thead","tfoot","tr"]),MS=new Set(["td","th"]),p0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function BS(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=WS(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=VS(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"?Or:ts,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=m0(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function m0(e,t,n){if(t.type==="element")return FS(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return HS(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jS(e,t,n);if(t.type==="mdxjsEsm")return US(e,t);if(t.type==="root")return zS(e,t,n);if(t.type==="text")return $S(e,t)}function FS(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Or,e.schema=i),e.ancestors.push(t);const a=b0(e,t.tagName,!1),s=YS(e,t);let o=vl(e,t);return PS.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!CS(l):!0})),g0(e,s,a,t),Ll(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function HS(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)}Ci(e,t.position)}function US(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ci(e,t.position)}function jS(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Or,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:b0(e,t.name,!0),s=qS(e,t),o=vl(e,t);return g0(e,s,a,t),Ll(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function zS(e,t,n){const r={};return Ll(r,vl(e,t)),e.create(t,e.Fragment,r,n)}function $S(e,t){return t.value}function g0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ll(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function VS(e,t,n){return r;function r(i,a,s,o){const u=Array.isArray(s.children)?n:t;return o?u(a,s,o):u(a,s)}}function WS(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),l=sn(r);return t(i,a,s,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function YS(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ol.call(t.properties,i)){const a=GS(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&MS.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function qS(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Ci(e,t.position);else{const i=r.name;let a;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,a=e.evaluater.evaluateExpression(o.expression)}else Ci(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function vl(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:vS;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const u=i.get(l)||0;s=l+"-"+u,i.set(l,u+1)}}const o=m0(e,a,s);o!==void 0&&n.push(o)}return n}function GS(e,t,n){const r=ml(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?wh(n):Ch(n)),r.property==="style"){let i=typeof n=="object"?n:KS(e,String(n));return e.stylePropertyNameCase==="css"&&(i=XS(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?JT[r.property]||r.property:r.attribute,n]}}function KS(e,t){try{return LS(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ot("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=p0+"#cannot-parse-style-attribute",i}}function b0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=Lc(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=Lc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ol.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ci(e)}function Ci(e,t){const n=new ot("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=p0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function XS(e){const t={};let n;for(n in e)Ol.call(e,n)&&(t[QS(n)]=e[n]);return t}function QS(e){let t=e.replace(DS,JS);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function JS(e){return"-"+e.toLowerCase()}const Us={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"]},ZS={tokenize:e3};function e3(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"),Ce(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return le(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const t3={tokenize:n3},Uc={tokenize:r3};function n3(e){const t=this,n=[];let r=0,i,a,s;return o;function o(C){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,l,u)(C)}return u(C)}function l(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&N();const F=t.events.length;let H=F,I;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){I=t.events[H][1].end;break}_(r);let V=F;for(;V<t.events.length;)t.events[V][1].end={...I},V++;return Ot(t.events,H+1,0,t.events.slice(F)),t.events.length=V,u(C)}return o(C)}function u(C){if(r===n.length){if(!i)return p(C);if(i.currentConstruct&&i.currentConstruct.concrete)return m(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Uc,d,c)(C)}function d(C){return i&&N(),_(r),p(C)}function c(C){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(C)}function p(C){return t.containerState={},e.attempt(Uc,h,m)(C)}function h(C){return r++,n.push([t.currentConstruct,t.containerState]),p(C)}function m(C){if(C===null){i&&N(),_(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),E(C)}function E(C){if(C===null){k(e.exit("chunkFlow"),!0),_(0),e.consume(C);return}return le(C)?(e.consume(C),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(C),E)}function k(C,F){const H=t.sliceStream(C);if(F&&H.push(null),C.previous=a,a&&(a.next=C),a=C,i.defineSkip(C.start),i.write(H),t.parser.lazy[C.start.line]){let I=i.events.length;for(;I--;)if(i.events[I][1].start.offset<s&&(!i.events[I][1].end||i.events[I][1].end.offset>s))return;const V=t.events.length;let U=V,Q,O;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(Q){O=t.events[U][1].end;break}Q=!0}for(_(r),I=V;I<t.events.length;)t.events[I][1].end={...O},I++;Ot(t.events,U+1,0,t.events.slice(V)),t.events.length=I}}function _(C){let F=n.length;for(;F-- >C;){const H=n[F];t.containerState=H[1],H[0].exit.call(t,e)}n.length=C}function N(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function r3(e,t,n){return Ce(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const i3={tokenize:a3};function a3(e){const t=this,n=e.attempt(Hi,r,e.attempt(this.parser.constructs.flowInitial,i,Ce(e,e.attempt(this.parser.constructs.flow,i,e.attempt(JA,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const s3={resolveAll:T0()},o3=E0("string"),l3=E0("text");function E0(e){return{resolveAll:T0(e==="text"?u3:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(d){return u(d)?a(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"),a(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const c=i[d];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function T0(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function u3(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 a=i.length,s=-1,o=0,l;for(;a--;){const u=i[a];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(u===-2)l=!0,o++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,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 c3={42:mt,43:mt,45:mt,48:mt,49:mt,50:mt,51:mt,52:mt,53:mt,54:mt,55:mt,56:mt,57:mt,62:Zp},d3={91:rw},f3={[-2]:Ms,[-1]:Ms,32:Ms},h3={35:uw,42:xa,45:[wc,xa],60:hw,61:wc,95:xa,96:kc,126:kc},p3={38:t0,92:e0},m3={[-5]:Bs,[-4]:Bs,[-3]:Bs,33:Ow,38:t0,42:Co,60:[vA,yw],91:vw,92:[ow,e0],93:Nl,95:Co,96:YA},g3={null:[Co,s3]},b3={null:[42,95]},E3={null:[]},T3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:b3,contentInitial:d3,disable:E3,document:c3,flow:h3,flowInitial:f3,insideSpan:g3,string:p3,text:m3},Symbol.toStringTag,{value:"Module"}));function y3(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={},a=[];let s=[],o=[];const l={attempt:V(H),check:V(I),consume:N,enter:C,exit:F,interrupt:V(I,{interrupt:!0})},u={code:null,containerState:{},defineSkip:E,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let d=t.tokenize.call(u,l);return t.resolveAll&&a.push(t),u;function c(K){return s=Dt(s,K),k(),s[s.length-1]!==null?[]:(U(t,0),u.events=ls(a,u.events,u),u.events)}function p(K,z){return _3(h(K),z)}function h(K){return x3(s,K)}function m(){const{_bufferIndex:K,_index:z,line:x,column:L,offset:v}=r;return{_bufferIndex:K,_index:z,line:x,column:L,offset:v}}function E(K){i[K.line]=K.column,O()}function k(){let K;for(;r._index<s.length;){const z=s[r._index];if(typeof z=="string")for(K=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===K&&r._bufferIndex<z.length;)_(z.charCodeAt(r._bufferIndex));else _(z)}}function _(K){d=d(K)}function N(K){le(K)?(r.line++,r.column=1,r.offset+=K===-3?2:1,O()):K!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=K}function C(K,z){const x=z||{};return x.type=K,x.start=m(),u.events.push(["enter",x,u]),o.push(x),x}function F(K){const z=o.pop();return z.end=m(),u.events.push(["exit",z,u]),z}function H(K,z){U(K,z.from)}function I(K,z){z.restore()}function V(K,z){return x;function x(L,v,D){let P,q,J,T;return Array.isArray(L)?te(L):"tokenize"in L?te([L]):ie(L);function ie(de){return He;function He(be){const ke=be!==null&&de[be],Xe=be!==null&&de.null,Qe=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Xe)?Xe:Xe?[Xe]:[]];return te(Qe)(be)}}function te(de){return P=de,q=0,de.length===0?D:w(de[q])}function w(de){return He;function He(be){return T=Q(),J=de,de.partial||(u.currentConstruct=de),de.name&&u.parser.constructs.disable.null.includes(de.name)?ue():de.tokenize.call(z?Object.assign(Object.create(u),z):u,l,he,ue)(be)}}function he(de){return K(J,T),v}function ue(de){return T.restore(),++q<P.length?w(P[q]):D}}}function U(K,z){K.resolveAll&&!a.includes(K)&&a.push(K),K.resolve&&Ot(u.events,z,u.events.length-z,K.resolve(u.events.slice(z),u)),K.resolveTo&&(u.events=K.resolveTo(u.events,u))}function Q(){const K=m(),z=u.previous,x=u.currentConstruct,L=u.events.length,v=Array.from(o);return{from:L,restore:D};function D(){r=K,u.previous=z,u.currentConstruct=x,u.events.length=L,o=v,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function x3(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function _3(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
86
91
  `;break}case-3:{s=`\r
87
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function FS(e){const r={constructs:Cp([DS,...(e||{}).extensions||[]]),content:i(pS),defined:[],document:i(gS),flow:i(TS),lazy:{},string:i(_S),text:i(kS)};return r;function i(a){return s;function s(o){return PS(r,a,o)}}}function HS(e){for(;!Bp(e););return e}const Dc=/[\0\t\n\r]/g;function US(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const l=[];let u,d,c,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),c=0,t="",n&&(a.charCodeAt(0)===65279&&c++,n=void 0);c<a.length;){if(Dc.lastIndex=c,u=Dc.exec(a),p=u&&u.index!==void 0?u.index:a.length,h=a.charCodeAt(p),!u){t=a.slice(c);break}if(h===10&&c===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),c<p&&(l.push(a.slice(c,p)),e+=p-c),h){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=p+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const t0={}.hasOwnProperty;function jS(e,t,n){return typeof t!="string"&&(n=t,t=void 0),zS(n)(HS(FS(n).document().write(US()(e,t,!0))))}function zS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Je),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:a(or),blockQuote:a(Xe),characterEscape:Q,characterReference:Q,codeFenced:a(Qe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Qe,s),codeText:a(et,s),codeTextData:Q,data:Q,codeFlowValue:Q,definition:a(Tt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(xt),hardBreakEscape:a(Mn),hardBreakTrailing:a(Mn),htmlFlow:a(qt,s),htmlFlowData:Q,htmlText:a(qt,s),htmlTextData:Q,image:a(lr),label:s,link:a(Je),listItem:a(fs),listItemValue:p,listOrdered:a(Ui,c),listUnordered:a(Ui),paragraph:a(lt),reference:C,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(or),strong:a(gn),thematicBreak:a(ps)},exit:{atxHeading:l(),atxHeadingSequence:H,autolink:l(),autolinkEmail:ke,autolinkProtocol:be,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:de,characterReference:He,codeFenced:l(k),codeFencedFence:E,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:R,codeIndented:l(_),codeText:l(v),codeTextData:R,data:R,definition:l(),definitionDestinationString:F,definitionLabelString:N,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(z),hardBreakTrailing:l(z),htmlFlow:l(y),htmlFlowData:R,htmlText:l(L),htmlTextData:R,image:l(P),label:J,labelText:q,lineEnding:K,link:l(D),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:he,resourceDestinationString:T,resourceTitleString:ie,resource:te,setextHeading:l(U),setextHeadingLineSequence:V,setextHeadingText:I,strong:l(),thematicBreak:l()}};n0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let ne={type:"root",children:[]};const fe={stack:[ne],tokenStack:[],config:t,enter:o,exit:u,buffer:s,resume:d,data:n},Ee=[];let Ce=-1;for(;++Ce<W.length;)if(W[Ce][1].type==="listOrdered"||W[Ce][1].type==="listUnordered")if(W[Ce][0]==="enter")Ee.push(Ce);else{const ft=Ee.pop();Ce=i(W,ft,Ce)}for(Ce=-1;++Ce<W.length;){const ft=t[W[Ce][0]];t0.call(ft,W[Ce][1].type)&&ft[W[Ce][1].type].call(Object.assign({sliceSerialize:W[Ce][2].sliceSerialize},fe),W[Ce][1])}if(fe.tokenStack.length>0){const ft=fe.tokenStack[fe.tokenStack.length-1];(ft[1]||Pc).call(fe,void 0,ft[0])}for(ne.position={start:_n(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:_n(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},Ce=-1;++Ce<t.transforms.length;)ne=t.transforms[Ce](ne)||ne;return ne}function i(W,ne,fe){let Ee=ne-1,Ce=-1,ft=!1,ht,Ht,Bn,bn;for(;++Ee<=fe;){const tt=W[Ee];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Ce++:Ce--,bn=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(ht&&!bn&&!Ce&&!Bn&&(Bn=Ee),bn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:bn=void 0}if(!Ce&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Ce===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(ht){let En=Ee;for(Ht=void 0;En--;){const yt=W[En];if(yt[1].type==="lineEnding"||yt[1].type==="lineEndingBlank"){if(yt[0]==="exit")continue;Ht&&(W[Ht][1].type="lineEndingBlank",ft=!0),yt[1].type="lineEnding",Ht=En}else if(!(yt[1].type==="linePrefix"||yt[1].type==="blockQuotePrefix"||yt[1].type==="blockQuotePrefixWhitespace"||yt[1].type==="blockQuoteMarker"||yt[1].type==="listItemIndent"))break}Bn&&(!Ht||Bn<Ht)&&(ht._spread=!0),ht.end=Object.assign({},Ht?W[Ht][1].start:tt[1].end),W.splice(Ht||Ee,0,["exit",ht,tt[2]]),Ee++,fe++}if(tt[1].type==="listItemPrefix"){const En={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};ht=En,W.splice(Ee,0,["enter",En,tt[2]]),Ee++,fe++,Bn=void 0,bn=!0}}}return W[ne][1]._spread=ft,fe}function a(W,ne){return fe;function fe(Ee){o.call(this,W(Ee),Ee),ne&&ne.call(this,Ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(W,ne,fe){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([ne,fe||void 0]),W.position={start:_n(ne.start),end:void 0}}function l(W){return ne;function ne(fe){W&&W.call(this,fe),u.call(this,fe)}}function u(W,ne){const fe=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==W.type&&(ne?ne.call(this,W,Ee[0]):(Ee[1]||Pc).call(this,W,Ee[0]));else throw new Error("Cannot close `"+W.type+"` ("+ci({start:W.start,end:W.end})+"): it’s not open");fe.position.end=_n(W.end)}function d(){return El(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(W){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function h(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=W}function m(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=W}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W.replace(/(\r?\n|\r)$/g,"")}function N(W){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.label=ne,fe.identifier=$t(this.sliceSerialize(W)).toLowerCase()}function w(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.title=W}function F(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.url=W}function H(W){const ne=this.stack[this.stack.length-1];if(!ne.depth){const fe=this.sliceSerialize(W).length;ne.depth=fe}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function V(W){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(W){const fe=this.stack[this.stack.length-1].children;let Ee=fe[fe.length-1];(!Ee||Ee.type!=="text")&&(Ee=hs(),Ee.position={start:_n(W.start),end:void 0},fe.push(Ee)),this.stack.push(Ee)}function R(W){const ne=this.stack.pop();ne.value+=this.sliceSerialize(W),ne.position.end=_n(W.end)}function K(W){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const fe=ne.children[ne.children.length-1];fe.position.end=_n(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(Q.call(this,W),R.call(this,W))}function z(){this.data.atHardBreak=!0}function y(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function L(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function v(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function D(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ne,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function P(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ne,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function q(W){const ne=this.sliceSerialize(W),fe=this.stack[this.stack.length-2];fe.label=Ek(ne),fe.identifier=$t(ne).toLowerCase()}function J(){const W=this.stack[this.stack.length-1],ne=this.resume(),fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,fe.type==="link"){const Ee=W.children;fe.children=Ee}else fe.alt=ne}function T(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.url=W}function ie(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.title=W}function te(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function he(W){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.label=ne,fe.identifier=$t(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function ue(W){this.data.characterReferenceType=W.type}function de(W){const ne=this.sliceSerialize(W),fe=this.data.characterReferenceType;let Ee;fe?(Ee=Ap(ne,fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=xl(ne);const Ce=this.stack[this.stack.length-1];Ce.value+=Ee}function He(W){const ne=this.stack.pop();ne.position.end=_n(W.end)}function be(W){R.call(this,W);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(W)}function ke(W){R.call(this,W);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(W)}function Xe(){return{type:"blockquote",children:[]}}function Qe(){return{type:"code",lang:null,meta:null,value:""}}function et(){return{type:"inlineCode",value:""}}function Tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xt(){return{type:"emphasis",children:[]}}function or(){return{type:"heading",depth:0,children:[]}}function Mn(){return{type:"break"}}function qt(){return{type:"html",value:""}}function lr(){return{type:"image",title:null,url:"",alt:null}}function Je(){return{type:"link",title:null,url:"",children:[]}}function Ui(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function fs(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function lt(){return{type:"paragraph",children:[]}}function gn(){return{type:"strong",children:[]}}function hs(){return{type:"text",value:""}}function ps(){return{type:"thematicBreak"}}}function _n(e){return{line:e.line,column:e.column,offset:e.offset}}function n0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?n0(e,r):$S(e,r)}}function $S(e,t){let n;for(n in t)if(t0.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 Pc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ci({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ci({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ci({start:t.start,end:t.end})+") is still open")}function VS(e){const t=this;t.parser=n;function n(r){return jS(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function WS(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 YS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
88
- `}]}function qS(e,t){const n=t.value?t.value+`
89
- `:"",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 GS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Pr(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+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(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function QS(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 JS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function r0(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),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function ZS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return r0(e,t);const i={src:Pr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function e3(e,t){const n={src:Pr(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 t3(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 n3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return r0(e,t);const i={href:Pr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function r3(e,t){const n={href:Pr(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 i3(e,t,n){const r=e.all(t),i=n?a3(n):i0(t),a={},s=[];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:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
92
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function k3(e){const r={constructs:Vp([T3,...(e||{}).extensions||[]]),content:i(ZS),defined:[],document:i(t3),flow:i(i3),lazy:{},string:i(o3),text:i(l3)};return r;function i(a){return s;function s(o){return y3(r,a,o)}}}function A3(e){for(;!n0(e););return e}const jc=/[\0\t\n\r]/g;function w3(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const l=[];let u,d,c,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),c=0,t="",n&&(a.charCodeAt(0)===65279&&c++,n=void 0);c<a.length;){if(jc.lastIndex=c,u=jc.exec(a),p=u&&u.index!==void 0?u.index:a.length,h=a.charCodeAt(p),!u){t=a.slice(c);break}if(h===10&&c===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),c<p&&(l.push(a.slice(c,p)),e+=p-c),h){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=p+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const y0={}.hasOwnProperty;function C3(e,t,n){return typeof t!="string"&&(n=t,t=void 0),S3(n)(A3(k3(n).document().write(w3()(e,t,!0))))}function S3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Je),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:a(lr),blockQuote:a(Xe),characterEscape:Q,characterReference:Q,codeFenced:a(Qe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Qe,s),codeText:a(tt,s),codeTextData:Q,data:Q,codeFlowValue:Q,definition:a(Tt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(yt),hardBreakEscape:a(Mn),hardBreakTrailing:a(Mn),htmlFlow:a(Gt,s),htmlFlowData:Q,htmlText:a(Gt,s),htmlTextData:Q,image:a(ur),label:s,link:a(Je),listItem:a(Es),listItemValue:p,listOrdered:a(Wi,c),listUnordered:a(Wi),paragraph:a(lt),reference:w,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(lr),strong:a(gn),thematicBreak:a(ys)},exit:{atxHeading:l(),atxHeadingSequence:H,autolink:l(),autolinkEmail:ke,autolinkProtocol:be,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:de,characterReference:He,codeFenced:l(k),codeFencedFence:E,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:O,codeIndented:l(_),codeText:l(v),codeTextData:O,data:O,definition:l(),definitionDestinationString:F,definitionLabelString:N,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(z),hardBreakTrailing:l(z),htmlFlow:l(x),htmlFlowData:O,htmlText:l(L),htmlTextData:O,image:l(P),label:J,labelText:q,lineEnding:K,link:l(D),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:he,resourceDestinationString:T,resourceTitleString:ie,resource:te,setextHeading:l(U),setextHeadingLineSequence:V,setextHeadingText:I,strong:l(),thematicBreak:l()}};x0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let ne={type:"root",children:[]};const fe={stack:[ne],tokenStack:[],config:t,enter:o,exit:u,buffer:s,resume:d,data:n},Ee=[];let we=-1;for(;++we<W.length;)if(W[we][1].type==="listOrdered"||W[we][1].type==="listUnordered")if(W[we][0]==="enter")Ee.push(we);else{const ft=Ee.pop();we=i(W,ft,we)}for(we=-1;++we<W.length;){const ft=t[W[we][0]];y0.call(ft,W[we][1].type)&&ft[W[we][1].type].call(Object.assign({sliceSerialize:W[we][2].sliceSerialize},fe),W[we][1])}if(fe.tokenStack.length>0){const ft=fe.tokenStack[fe.tokenStack.length-1];(ft[1]||zc).call(fe,void 0,ft[0])}for(ne.position={start:_n(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:_n(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},we=-1;++we<t.transforms.length;)ne=t.transforms[we](ne)||ne;return ne}function i(W,ne,fe){let Ee=ne-1,we=-1,ft=!1,ht,Ut,Bn,bn;for(;++Ee<=fe;){const nt=W[Ee];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?we++:we--,bn=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(ht&&!bn&&!we&&!Bn&&(Bn=Ee),bn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:bn=void 0}if(!we&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||we===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(ht){let En=Ee;for(Ut=void 0;En--;){const xt=W[En];if(xt[1].type==="lineEnding"||xt[1].type==="lineEndingBlank"){if(xt[0]==="exit")continue;Ut&&(W[Ut][1].type="lineEndingBlank",ft=!0),xt[1].type="lineEnding",Ut=En}else if(!(xt[1].type==="linePrefix"||xt[1].type==="blockQuotePrefix"||xt[1].type==="blockQuotePrefixWhitespace"||xt[1].type==="blockQuoteMarker"||xt[1].type==="listItemIndent"))break}Bn&&(!Ut||Bn<Ut)&&(ht._spread=!0),ht.end=Object.assign({},Ut?W[Ut][1].start:nt[1].end),W.splice(Ut||Ee,0,["exit",ht,nt[2]]),Ee++,fe++}if(nt[1].type==="listItemPrefix"){const En={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};ht=En,W.splice(Ee,0,["enter",En,nt[2]]),Ee++,fe++,Bn=void 0,bn=!0}}}return W[ne][1]._spread=ft,fe}function a(W,ne){return fe;function fe(Ee){o.call(this,W(Ee),Ee),ne&&ne.call(this,Ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(W,ne,fe){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([ne,fe||void 0]),W.position={start:_n(ne.start),end:void 0}}function l(W){return ne;function ne(fe){W&&W.call(this,fe),u.call(this,fe)}}function u(W,ne){const fe=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==W.type&&(ne?ne.call(this,W,Ee[0]):(Ee[1]||zc).call(this,W,Ee[0]));else throw new Error("Cannot close `"+W.type+"` ("+di({start:W.start,end:W.end})+"): it’s not open");fe.position.end=_n(W.end)}function d(){return Al(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(W){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function h(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=W}function m(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=W}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W.replace(/(\r?\n|\r)$/g,"")}function N(W){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.label=ne,fe.identifier=Vt(this.sliceSerialize(W)).toLowerCase()}function C(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.title=W}function F(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.url=W}function H(W){const ne=this.stack[this.stack.length-1];if(!ne.depth){const fe=this.sliceSerialize(W).length;ne.depth=fe}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function V(W){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(W){const fe=this.stack[this.stack.length-1].children;let Ee=fe[fe.length-1];(!Ee||Ee.type!=="text")&&(Ee=Ts(),Ee.position={start:_n(W.start),end:void 0},fe.push(Ee)),this.stack.push(Ee)}function O(W){const ne=this.stack.pop();ne.value+=this.sliceSerialize(W),ne.position.end=_n(W.end)}function K(W){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const fe=ne.children[ne.children.length-1];fe.position.end=_n(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(Q.call(this,W),O.call(this,W))}function z(){this.data.atHardBreak=!0}function x(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function L(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function v(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.value=W}function D(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ne,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function P(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ne,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function q(W){const ne=this.sliceSerialize(W),fe=this.stack[this.stack.length-2];fe.label=rA(ne),fe.identifier=Vt(ne).toLowerCase()}function J(){const W=this.stack[this.stack.length-1],ne=this.resume(),fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,fe.type==="link"){const Ee=W.children;fe.children=Ee}else fe.alt=ne}function T(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.url=W}function ie(){const W=this.resume(),ne=this.stack[this.stack.length-1];ne.title=W}function te(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function he(W){const ne=this.resume(),fe=this.stack[this.stack.length-1];fe.label=ne,fe.identifier=Vt(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function ue(W){this.data.characterReferenceType=W.type}function de(W){const ne=this.sliceSerialize(W),fe=this.data.characterReferenceType;let Ee;fe?(Ee=$p(ne,fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=Cl(ne);const we=this.stack[this.stack.length-1];we.value+=Ee}function He(W){const ne=this.stack.pop();ne.position.end=_n(W.end)}function be(W){O.call(this,W);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(W)}function ke(W){O.call(this,W);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(W)}function Xe(){return{type:"blockquote",children:[]}}function Qe(){return{type:"code",lang:null,meta:null,value:""}}function tt(){return{type:"inlineCode",value:""}}function Tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function yt(){return{type:"emphasis",children:[]}}function lr(){return{type:"heading",depth:0,children:[]}}function Mn(){return{type:"break"}}function Gt(){return{type:"html",value:""}}function ur(){return{type:"image",title:null,url:"",alt:null}}function Je(){return{type:"link",title:null,url:"",children:[]}}function Wi(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function Es(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function lt(){return{type:"paragraph",children:[]}}function gn(){return{type:"strong",children:[]}}function Ts(){return{type:"text",value:""}}function ys(){return{type:"thematicBreak"}}}function _n(e){return{line:e.line,column:e.column,offset:e.offset}}function x0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?x0(e,r):N3(e,r)}}function N3(e,t){let n;for(n in t)if(y0.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 zc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+di({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+di({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+di({start:t.start,end:t.end})+") is still open")}function I3(e){const t=this;t.parser=n;function n(r){return C3(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function R3(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 O3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
93
+ `}]}function L3(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 v3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function D3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function P3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Mr(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+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(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function M3(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 B3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function _0(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),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function F3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return _0(e,t);const i={src:Mr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function H3(e,t){const n={src:Mr(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 U3(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 j3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return _0(e,t);const i={href:Mr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function z3(e,t){const n={href:Mr(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 $3(e,t,n){const r=e.all(t),i=n?V3(n):k0(t),a={},s=[];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:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
90
95
  `}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
91
- `});const u={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,u),e.applyData(t,u)}function a3(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=i0(n[r])}return t}function i0(e){const t=e.spread;return t??e.children.length>1}function s3(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 s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function o3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function l3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function u3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function c3(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=sn(t.children[1]),l=es(t.children[t.children.length-1]);o&&l&&(s.position={start:o,end:l}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function d3(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let l=-1;const u=[];for(;++l<o;){const c=t.children[l],p={},h=s?s[l]:void 0;h&&(p.align=h);let m={type:"element",tagName:a,properties:p,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 f3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Mc=9,Bc=32;function h3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Fc(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Fc(t.slice(i),i>0,!1)),a.join("")}function Fc(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Mc||a===Bc;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Mc||a===Bc;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function p3(e,t){const n={type:"text",value:h3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function m3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const g3={blockquote:WS,break:YS,code:qS,delete:GS,emphasis:KS,footnoteReference:XS,heading:QS,html:JS,imageReference:ZS,image:e3,inlineCode:t3,linkReference:n3,link:r3,listItem:i3,list:s3,paragraph:o3,root:l3,strong:u3,table:c3,tableCell:f3,tableRow:d3,text:p3,thematicBreak:m3,toml:Ji,yaml:Ji,definition:Ji,footnoteDefinition:Ji};function Ji(){}function b3(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 E3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function T3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||b3,r=e.options.footnoteBackLabel||E3,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=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(),p=Pr(c.toLowerCase());let h=0;const m=[],E=e.footnoteCounts.get(c);for(;E!==void 0&&++h<=E;){m.length>0&&m.push({type:"text",value:" "});let N=typeof n=="string"?n:n(l,h);typeof N=="string"&&(N={type:"text",value:N}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const k=d[d.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const N=k.children[k.children.length-1];N&&N.type==="text"?N.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...m)}else d.push(...m);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,_),o.push(_)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Kn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
96
+ `});const u={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,u),e.applyData(t,u)}function V3(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=k0(n[r])}return t}function k0(e){const t=e.spread;return t??e.children.length>1}function W3(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 s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Y3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function q3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function G3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function K3(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=sn(t.children[1]),l=ss(t.children[t.children.length-1]);o&&l&&(s.position={start:o,end:l}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function X3(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let l=-1;const u=[];for(;++l<o;){const c=t.children[l],p={},h=s?s[l]:void 0;h&&(p.align=h);let m={type:"element",tagName:a,properties:p,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 Q3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const $c=9,Vc=32;function J3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Wc(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Wc(t.slice(i),i>0,!1)),a.join("")}function Wc(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===$c||a===Vc;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===$c||a===Vc;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Z3(e,t){const n={type:"text",value:J3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function eN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const tN={blockquote:R3,break:O3,code:L3,delete:v3,emphasis:D3,footnoteReference:P3,heading:M3,html:B3,imageReference:F3,image:H3,inlineCode:U3,linkReference:j3,link:z3,listItem:$3,list:W3,paragraph:Y3,root:q3,strong:G3,table:K3,tableCell:Q3,tableRow:X3,text:Z3,thematicBreak:eN,toml:ra,yaml:ra,definition:ra,footnoteDefinition:ra};function ra(){}function nN(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 rN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function iN(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||nN,r=e.options.footnoteBackLabel||rN,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=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(),p=Mr(c.toLowerCase());let h=0;const m=[],E=e.footnoteCounts.get(c);for(;E!==void 0&&++h<=E;){m.length>0&&m.push({type:"text",value:" "});let N=typeof n=="string"?n:n(l,h);typeof N=="string"&&(N={type:"text",value:N}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const k=d[d.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const N=k.children[k.children.length-1];N&&N.type==="text"?N.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...m)}else d.push(...m);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,_),o.push(_)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Xn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
92
97
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
93
- `}]}}const _o={}.hasOwnProperty,x3={};function y3(e,t){const n=t||x3,r=new Map,i=new Map,a=new Map,s={...g3,...n.handlers},o={all:u,applyData:k3,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:l,options:n,patch:_3,wrap:C3};return Ln(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();c.has(p)||c.set(p,d)}}),o;function l(d,c){const p=d.type,h=o.handlers[p];if(_o.call(o.handlers,p)&&h)return h(o,d,c);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in d){const{children:E,...k}=d,_=Kn(k);return _.children=o.all(d),_}return Kn(d)}return(o.options.unknownHandler||A3)(o,d,c)}function u(d){const c=[];if("children"in d){const p=d.children;let h=-1;for(;++h<p.length;){const m=o.one(p[h],d);if(m){if(h&&p[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Hc(m.value)),!Array.isArray(m)&&m.type==="element")){const E=m.children[0];E&&E.type==="text"&&(E.value=Hc(E.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function _3(e,t){e.position&&(t.position=Xh(e))}function k3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,Kn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function A3(e,t){const n=t.data||{},r="value"in t&&!(_o.call(n,"hProperties")||_o.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 C3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
98
+ `}]}}const No={}.hasOwnProperty,aN={};function sN(e,t){const n=t||aN,r=new Map,i=new Map,a=new Map,s={...tN,...n.handlers},o={all:u,applyData:lN,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:l,options:n,patch:oN,wrap:cN};return Ln(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();c.has(p)||c.set(p,d)}}),o;function l(d,c){const p=d.type,h=o.handlers[p];if(No.call(o.handlers,p)&&h)return h(o,d,c);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in d){const{children:E,...k}=d,_=Xn(k);return _.children=o.all(d),_}return Xn(d)}return(o.options.unknownHandler||uN)(o,d,c)}function u(d){const c=[];if("children"in d){const p=d.children;let h=-1;for(;++h<p.length;){const m=o.one(p[h],d);if(m){if(h&&p[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Yc(m.value)),!Array.isArray(m)&&m.type==="element")){const E=m.children[0];E&&E.type==="text"&&(E.value=Yc(E.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function oN(e,t){e.position&&(t.position=mp(e))}function lN(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,Xn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function uN(e,t){const n=t.data||{},r="value"in t&&!(No.call(n,"hProperties")||No.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 cN(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
94
99
  `});++r<e.length;)r&&n.push({type:"text",value:`
95
100
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
96
- `}),n}function Hc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Uc(e,t){const n=y3(e,t),r=n.one(e,void 0),i=T3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
97
- `},i),a}function w3(e,t){return e&&"run"in e?async function(n,r){const i=Uc(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Uc(n,{file:r,...e||t})}}function jc(e){if(e)throw e}var vs,zc;function S3(){if(zc)return vs;zc=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]"},a=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 p;for(p in u);return typeof p>"u"||e.call(u,p)},s=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 vs=function l(){var u,d,c,p,h,m,E=arguments[0],k=1,_=arguments.length,N=!1;for(typeof E=="boolean"&&(N=E,E=arguments[1]||{},k=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});k<_;++k)if(u=arguments[k],u!=null)for(d in u)c=o(E,d),p=o(u,d),E!==p&&(N&&p&&(a(p)||(h=i(p)))?(h?(h=!1,m=c&&i(c)?c:[]):m=c&&a(c)?c:{},s(E,{name:d,newValue:l(N,m,p)})):typeof p<"u"&&s(E,{name:d,newValue:p}));return E},vs}var N3=S3();const Ds=Bd(N3);function ko(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 I3(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(l,...u){const d=e[++a];let c=-1;if(l){s(l);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,d?O3(d,o)(...u):s(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 O3(e,t){let n;return r;function r(...s){const o=e.length>s.length;let l;o&&s.push(i);try{l=e.apply(this,s)}catch(u){const d=u;if(o&&n)throw d;return i(d)}o||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const Xt={basename:R3,dirname:L3,extname:v3,join:D3,sep:"/"};function R3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pi(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function L3(e){if(Pi(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 v3(e){Pi(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function D3(...e){let t=-1,n;for(;++t<e.length;)Pi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":P3(n)}function P3(e){Pi(e);const t=e.codePointAt(0)===47;let n=M3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function M3(e,t){let n="",r=0,i=-1,a=0,s=-1,o,l;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===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=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function Pi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const B3={cwd:F3};function F3(){return"/"}function Ao(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function H3(e){if(typeof e=="string")e=new URL(e);else if(!Ao(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 U3(e)}function U3(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 Ps=["history","path","basename","stem","extname","dirname"];class j3{constructor(t){let n;t?Ao(t)?n={path:t}:typeof t=="string"||z3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":B3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ps.length;){const a=Ps[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Ps.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Xt.basename(this.path):void 0}set basename(t){Bs(t,"basename"),Ms(t,"basename"),this.path=Xt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Xt.dirname(this.path):void 0}set dirname(t){$c(this.basename,"dirname"),this.path=Xt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Xt.extname(this.path):void 0}set extname(t){if(Ms(t,"extname"),$c(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=Xt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ao(t)&&(t=H3(t)),Bs(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Xt.basename(this.path,this.extname):void 0}set stem(t){Bs(t,"stem"),Ms(t,"stem"),this.path=Xt.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 st(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 Ms(e,t){if(e&&e.includes(Xt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Xt.sep+"`")}function Bs(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function $c(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function z3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $3=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),V3={}.hasOwnProperty;class Nl extends $3{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=I3()}copy(){const t=new Nl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ds(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Us("data",this.frozen),this.namespace[t]=n,this):V3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Us("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=Zi(t),r=this.parser||this.Parser;return Fs("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Fs("process",this.parser||this.Parser),Hs("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=Zi(t),l=r.parse(o);r.run(l,o,function(d,c,p){if(d||!c||!p)return u(d);const h=c,m=r.stringify(h,p);q3(m)?p.value=m:p.result=m,u(d,p)});function u(d,c){d||!c?s(d):a?a(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Fs("processSync",this.parser||this.Parser),Hs("processSync",this.compiler||this.Compiler),this.process(t,i),Wc("processSync","process",n),r;function i(a,s){n=!0,jc(a),r=s}}run(t,n,r){Vc(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const l=Zi(n);i.run(t,l,u);function u(d,c,p){const h=c||t;d?o(d):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Wc("runSync","run",r),i;function a(s,o){jc(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=Zi(n),i=this.compiler||this.Compiler;return Hs("stringify",i),Vc(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Us("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...c]=u;l(d,c)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(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=Ds(!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];a(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===u){p=c;break}if(p===-1)r.push([u,...d]);else if(d.length>0){let[h,...m]=d;const E=r[p][1];ko(E)&&ko(h)&&(h=Ds(!0,E,h)),r[p]=[u,h,...m]}}}}const W3=new Nl().freeze();function Fs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Hs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Us(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 Vc(e){if(!ko(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Wc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Zi(e){return Y3(e)?e:new j3(e)}function Y3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function q3(e){return typeof e=="string"||G3(e)}function G3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Il(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var sr=Il();function a0(e){sr=e}var $n={exec:()=>null};function Se(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(dt.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var K3=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),dt={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)}}>`)},X3=/^(?:[ \t]*(?:\n|$))+/,Q3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,J3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Mi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Z3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ol=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,s0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,o0=Se(s0).replace(/bull/g,Ol).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(),eN=Se(s0).replace(/bull/g,Ol).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(),Rl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,tN=/^[^\n]+/,Ll=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,nN=Se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ll).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rN=Se(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ol).getRegex(),is="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",vl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,iN=Se("^ {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",vl).replace("tag",is).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),l0=Se(Rl).replace("hr",Mi).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",is).getRegex(),aN=Se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",l0).getRegex(),Dl={blockquote:aN,code:Q3,def:nN,fences:J3,heading:Z3,hr:Mi,html:iN,lheading:o0,list:rN,newline:X3,paragraph:l0,table:$n,text:tN},Yc=Se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Mi).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",is).getRegex(),sN={...Dl,lheading:eN,table:Yc,paragraph:Se(Rl).replace("hr",Mi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Yc).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",is).getRegex()},oN={...Dl,html:Se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",vl).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:$n,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Se(Rl).replace("hr",Mi).replace("heading",` *#{1,6} *[^
98
- ]`).replace("lheading",o0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lN=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,uN=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,u0=/^( {2,}|\\)\n(?!\s*$)/,cN=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,as=/[\p{P}\p{S}]/u,Pl=/[\s\p{P}\p{S}]/u,c0=/[^\s\p{P}\p{S}]/u,dN=Se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Pl).getRegex(),d0=/(?!~)[\p{P}\p{S}]/u,fN=/(?!~)[\s\p{P}\p{S}]/u,hN=/(?:[^\s\p{P}\p{S}]|~)/u,f0=/(?![*_])[\p{P}\p{S}]/u,pN=/(?![*_])[\s\p{P}\p{S}]/u,mN=/(?:[^\s\p{P}\p{S}]|[*_])/u,gN=Se(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",K3?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),h0=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,bN=Se(h0,"u").replace(/punct/g,as).getRegex(),EN=Se(h0,"u").replace(/punct/g,d0).getRegex(),p0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",TN=Se(p0,"gu").replace(/notPunctSpace/g,c0).replace(/punctSpace/g,Pl).replace(/punct/g,as).getRegex(),xN=Se(p0,"gu").replace(/notPunctSpace/g,hN).replace(/punctSpace/g,fN).replace(/punct/g,d0).getRegex(),yN=Se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,c0).replace(/punctSpace/g,Pl).replace(/punct/g,as).getRegex(),_N=Se(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,f0).getRegex(),kN="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",AN=Se(kN,"gu").replace(/notPunctSpace/g,mN).replace(/punctSpace/g,pN).replace(/punct/g,f0).getRegex(),CN=Se(/\\(punct)/,"gu").replace(/punct/g,as).getRegex(),wN=Se(/^<(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(),SN=Se(vl).replace("(?:-->|$)","-->").getRegex(),NN=Se("^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",SN).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),va=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,IN=Se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",va).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),m0=Se(/^!?\[(label)\]\[(ref)\]/).replace("label",va).replace("ref",Ll).getRegex(),g0=Se(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ll).getRegex(),ON=Se("reflink|nolink(?!\\()","g").replace("reflink",m0).replace("nolink",g0).getRegex(),qc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ml={_backpedal:$n,anyPunctuation:CN,autolink:wN,blockSkip:gN,br:u0,code:uN,del:$n,delLDelim:$n,delRDelim:$n,emStrongLDelim:bN,emStrongRDelimAst:TN,emStrongRDelimUnd:yN,escape:lN,link:IN,nolink:g0,punctuation:dN,reflink:m0,reflinkSearch:ON,tag:NN,text:cN,url:$n},RN={...Ml,link:Se(/^!?\[(label)\]\((.*?)\)/).replace("label",va).getRegex(),reflink:Se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",va).getRegex()},Co={...Ml,emStrongRDelimAst:xN,emStrongLDelim:EN,delLDelim:_N,delRDelim:AN,url:Se(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",qc).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:Se(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",qc).getRegex()},LN={...Co,br:Se(u0).replace("{2,}","*").getRegex(),text:Se(Co.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ea={normal:Dl,gfm:sN,pedantic:oN},$r={normal:Ml,gfm:Co,breaks:LN,pedantic:RN},vN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Gc=e=>vN[e];function cn(e,t){if(t){if(dt.escapeTest.test(e))return e.replace(dt.escapeReplace,Gc)}else if(dt.escapeTestNoEncode.test(e))return e.replace(dt.escapeReplaceNoEncode,Gc);return e}function Kc(e){try{e=encodeURI(e).replace(dt.percentDecode,"%")}catch{return null}return e}function Xc(e,t){var a;let n=e.replace(dt.findPipe,(s,o,l)=>{let u=!1,d=o;for(;--d>=0&&l[d]==="\\";)u=!u;return u?"|":" |"}),r=n.split(dt.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((a=r.at(-1))!=null&&a.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(dt.slashPipe,"|");return r}function Vr(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 DN(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 PN(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let a=4-n%4;r+=" ".repeat(a),n+=a}else r+=i,n++;return r}function Qc(e,t,n,r,i){let a=t.href,s=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:a,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function MN(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 Yc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qc(e,t){const n=sN(e,t),r=n.one(e,void 0),i=iN(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
102
+ `},i),a}function dN(e,t){return e&&"run"in e?async function(n,r){const i=qc(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qc(n,{file:r,...e||t})}}function Gc(e){if(e)throw e}var js,Kc;function fN(){if(Kc)return js;Kc=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]"},a=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 p;for(p in u);return typeof p>"u"||e.call(u,p)},s=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 js=function l(){var u,d,c,p,h,m,E=arguments[0],k=1,_=arguments.length,N=!1;for(typeof E=="boolean"&&(N=E,E=arguments[1]||{},k=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});k<_;++k)if(u=arguments[k],u!=null)for(d in u)c=o(E,d),p=o(u,d),E!==p&&(N&&p&&(a(p)||(h=i(p)))?(h?(h=!1,m=c&&i(c)?c:[]):m=c&&a(c)?c:{},s(E,{name:d,newValue:l(N,m,p)})):typeof p<"u"&&s(E,{name:d,newValue:p}));return E},js}var hN=fN();const zs=Vd(hN);function Io(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 pN(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(l,...u){const d=e[++a];let c=-1;if(l){s(l);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,d?mN(d,o)(...u):s(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 mN(e,t){let n;return r;function r(...s){const o=e.length>s.length;let l;o&&s.push(i);try{l=e.apply(this,s)}catch(u){const d=u;if(o&&n)throw d;return i(d)}o||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const Qt={basename:gN,dirname:bN,extname:EN,join:TN,sep:"/"};function gN(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ui(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function bN(e){if(Ui(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 EN(e){Ui(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function TN(...e){let t=-1,n;for(;++t<e.length;)Ui(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":yN(n)}function yN(e){Ui(e);const t=e.codePointAt(0)===47;let n=xN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function xN(e,t){let n="",r=0,i=-1,a=0,s=-1,o,l;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===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=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function Ui(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _N={cwd:kN};function kN(){return"/"}function Ro(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function AN(e){if(typeof e=="string")e=new URL(e);else if(!Ro(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 wN(e)}function wN(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 $s=["history","path","basename","stem","extname","dirname"];class CN{constructor(t){let n;t?Ro(t)?n={path:t}:typeof t=="string"||SN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_N.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$s.length;){const a=$s[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)$s.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Qt.basename(this.path):void 0}set basename(t){Ws(t,"basename"),Vs(t,"basename"),this.path=Qt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Qt.dirname(this.path):void 0}set dirname(t){Xc(this.basename,"dirname"),this.path=Qt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Qt.extname(this.path):void 0}set extname(t){if(Vs(t,"extname"),Xc(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=Qt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ro(t)&&(t=AN(t)),Ws(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Qt.basename(this.path,this.extname):void 0}set stem(t){Ws(t,"stem"),Vs(t,"stem"),this.path=Qt.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 ot(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 Vs(e,t){if(e&&e.includes(Qt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qt.sep+"`")}function Ws(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Xc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function SN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NN=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),IN={}.hasOwnProperty;class Dl extends NN{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=pN()}copy(){const t=new Dl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(zs(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Gs("data",this.frozen),this.namespace[t]=n,this):IN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gs("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=ia(t),r=this.parser||this.Parser;return Ys("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ys("process",this.parser||this.Parser),qs("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=ia(t),l=r.parse(o);r.run(l,o,function(d,c,p){if(d||!c||!p)return u(d);const h=c,m=r.stringify(h,p);LN(m)?p.value=m:p.result=m,u(d,p)});function u(d,c){d||!c?s(d):a?a(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Ys("processSync",this.parser||this.Parser),qs("processSync",this.compiler||this.Compiler),this.process(t,i),Jc("processSync","process",n),r;function i(a,s){n=!0,Gc(a),r=s}}run(t,n,r){Qc(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const l=ia(n);i.run(t,l,u);function u(d,c,p){const h=c||t;d?o(d):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Jc("runSync","run",r),i;function a(s,o){Gc(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=ia(n),i=this.compiler||this.Compiler;return qs("stringify",i),Qc(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Gs("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...c]=u;l(d,c)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(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=zs(!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];a(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===u){p=c;break}if(p===-1)r.push([u,...d]);else if(d.length>0){let[h,...m]=d;const E=r[p][1];Io(E)&&Io(h)&&(h=zs(!0,E,h)),r[p]=[u,h,...m]}}}}const RN=new Dl().freeze();function Ys(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gs(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 Qc(e){if(!Io(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Jc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ia(e){return ON(e)?e:new CN(e)}function ON(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function LN(e){return typeof e=="string"||vN(e)}function vN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Pl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var or=Pl();function A0(e){or=e}var $n={exec:()=>null};function Se(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(dt.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var DN=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),dt={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)}}>`)},PN=/^(?:[ \t]*(?:\n|$))+/,MN=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,BN=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ji=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,FN=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ml=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,w0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,C0=Se(w0).replace(/bull/g,Ml).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(),HN=Se(w0).replace(/bull/g,Ml).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(),Bl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,UN=/^[^\n]+/,Fl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,jN=Se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Fl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zN=Se(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ml).getRegex(),cs="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",Hl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$N=Se("^ {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",Hl).replace("tag",cs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),S0=Se(Bl).replace("hr",ji).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",cs).getRegex(),VN=Se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",S0).getRegex(),Ul={blockquote:VN,code:MN,def:jN,fences:BN,heading:FN,hr:ji,html:$N,lheading:C0,list:zN,newline:PN,paragraph:S0,table:$n,text:UN},Zc=Se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ji).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",cs).getRegex(),WN={...Ul,lheading:HN,table:Zc,paragraph:Se(Bl).replace("hr",ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zc).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",cs).getRegex()},YN={...Ul,html:Se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Hl).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:$n,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Se(Bl).replace("hr",ji).replace("heading",` *#{1,6} *[^
103
+ ]`).replace("lheading",C0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},qN=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,GN=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,N0=/^( {2,}|\\)\n(?!\s*$)/,KN=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ds=/[\p{P}\p{S}]/u,jl=/[\s\p{P}\p{S}]/u,I0=/[^\s\p{P}\p{S}]/u,XN=Se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,jl).getRegex(),R0=/(?!~)[\p{P}\p{S}]/u,QN=/(?!~)[\s\p{P}\p{S}]/u,JN=/(?:[^\s\p{P}\p{S}]|~)/u,O0=/(?![*_])[\p{P}\p{S}]/u,ZN=/(?![*_])[\s\p{P}\p{S}]/u,eI=/(?:[^\s\p{P}\p{S}]|[*_])/u,tI=Se(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",DN?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),L0=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nI=Se(L0,"u").replace(/punct/g,ds).getRegex(),rI=Se(L0,"u").replace(/punct/g,R0).getRegex(),v0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",iI=Se(v0,"gu").replace(/notPunctSpace/g,I0).replace(/punctSpace/g,jl).replace(/punct/g,ds).getRegex(),aI=Se(v0,"gu").replace(/notPunctSpace/g,JN).replace(/punctSpace/g,QN).replace(/punct/g,R0).getRegex(),sI=Se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,I0).replace(/punctSpace/g,jl).replace(/punct/g,ds).getRegex(),oI=Se(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,O0).getRegex(),lI="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",uI=Se(lI,"gu").replace(/notPunctSpace/g,eI).replace(/punctSpace/g,ZN).replace(/punct/g,O0).getRegex(),cI=Se(/\\(punct)/,"gu").replace(/punct/g,ds).getRegex(),dI=Se(/^<(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(),fI=Se(Hl).replace("(?:-->|$)","-->").getRegex(),hI=Se("^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",fI).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ha=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,pI=Se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ha).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),D0=Se(/^!?\[(label)\]\[(ref)\]/).replace("label",Ha).replace("ref",Fl).getRegex(),P0=Se(/^!?\[(ref)\](?:\[\])?/).replace("ref",Fl).getRegex(),mI=Se("reflink|nolink(?!\\()","g").replace("reflink",D0).replace("nolink",P0).getRegex(),ed=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,zl={_backpedal:$n,anyPunctuation:cI,autolink:dI,blockSkip:tI,br:N0,code:GN,del:$n,delLDelim:$n,delRDelim:$n,emStrongLDelim:nI,emStrongRDelimAst:iI,emStrongRDelimUnd:sI,escape:qN,link:pI,nolink:P0,punctuation:XN,reflink:D0,reflinkSearch:mI,tag:hI,text:KN,url:$n},gI={...zl,link:Se(/^!?\[(label)\]\((.*?)\)/).replace("label",Ha).getRegex(),reflink:Se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ha).getRegex()},Oo={...zl,emStrongRDelimAst:aI,emStrongLDelim:rI,delLDelim:oI,delRDelim:uI,url:Se(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ed).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:Se(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ed).getRegex()},bI={...Oo,br:Se(N0).replace("{2,}","*").getRegex(),text:Se(Oo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},aa={normal:Ul,gfm:WN,pedantic:YN},Vr={normal:zl,gfm:Oo,breaks:bI,pedantic:gI},EI={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},td=e=>EI[e];function cn(e,t){if(t){if(dt.escapeTest.test(e))return e.replace(dt.escapeReplace,td)}else if(dt.escapeTestNoEncode.test(e))return e.replace(dt.escapeReplaceNoEncode,td);return e}function nd(e){try{e=encodeURI(e).replace(dt.percentDecode,"%")}catch{return null}return e}function rd(e,t){var a;let n=e.replace(dt.findPipe,(s,o,l)=>{let u=!1,d=o;for(;--d>=0&&l[d]==="\\";)u=!u;return u?"|":" |"}),r=n.split(dt.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((a=r.at(-1))!=null&&a.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(dt.slashPipe,"|");return r}function Wr(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 TI(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 yI(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let a=4-n%4;r+=" ".repeat(a),n+=a}else r+=i,n++;return r}function id(e,t,n,r,i){let a=t.href,s=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:a,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function xI(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
99
104
  `).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
100
- `)}var Da=class{constructor(e){Ne(this,"options");Ne(this,"rules");Ne(this,"lexer");this.options=e||sr}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:Vr(n,`
101
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=MN(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=Vr(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:Vr(t[0],`
102
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Vr(t[0],`
105
+ `)}var Ua=class{constructor(e){Ne(this,"options");Ne(this,"rules");Ne(this,"lexer");this.options=e||or}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:Wr(n,`
106
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=xI(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=Wr(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:Wr(t[0],`
107
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Wr(t[0],`
103
108
  `).split(`
104
109
  `),r="",i="",a=[];for(;n.length>0;){let s=!1,o=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))o.push(n[l]),s=!0;else if(!s)o.push(n[l]);else break;n=n.slice(l);let u=o.join(`
105
110
  `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
@@ -110,16 +115,16 @@ ${d}`:d;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
110
115
  `),E=this.blockquote(m);a[a.length-1]=E,r=r.substring(0,r.length-h.raw.length)+E.raw,i=i.substring(0,i.length-h.text.length)+E.text;break}else if((p==null?void 0:p.type)==="list"){let h=p,m=h.raw+`
111
116
  `+n.join(`
112
117
  `),E=this.list(m);a[a.length-1]=E,r=r.substring(0,r.length-p.raw.length)+E.raw,i=i.substring(0,i.length-h.raw.length)+E.raw,n=m.substring(a.at(-1).raw.length).split(`
113
- `);continue}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),l=!1;for(;e;){let d=!1,c="",p="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let h=PN(t[2].split(`
118
+ `);continue}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),l=!1;for(;e;){let d=!1,c="",p="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let h=yI(t[2].split(`
114
119
  `,1)[0],t[1].length),m=e.split(`
115
120
  `,1)[0],E=!h.trim(),k=0;if(this.options.pedantic?(k=2,p=h.trimStart()):E?k=t[1].length+1:(k=h.search(this.rules.other.nonSpaceChar),k=k>4?1:k,p=h.slice(k),k+=t[1].length),E&&this.rules.other.blankLine.test(m)&&(c+=m+`
116
- `,e=e.substring(m.length+1),d=!0),!d){let _=this.rules.other.nextBulletRegex(k),N=this.rules.other.hrRegex(k),w=this.rules.other.fencesBeginRegex(k),F=this.rules.other.headingBeginRegex(k),H=this.rules.other.htmlBeginRegex(k),I=this.rules.other.blockquoteBeginRegex(k);for(;e;){let V=e.split(`
117
- `,1)[0],U;if(m=V,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),U=m):U=m.replace(this.rules.other.tabCharGlobal," "),w.test(m)||F.test(m)||H.test(m)||I.test(m)||_.test(m)||N.test(m))break;if(U.search(this.rules.other.nonSpaceChar)>=k||!m.trim())p+=`
118
- `+U.slice(k);else{if(E||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(h)||F.test(h)||N.test(h))break;p+=`
121
+ `,e=e.substring(m.length+1),d=!0),!d){let _=this.rules.other.nextBulletRegex(k),N=this.rules.other.hrRegex(k),C=this.rules.other.fencesBeginRegex(k),F=this.rules.other.headingBeginRegex(k),H=this.rules.other.htmlBeginRegex(k),I=this.rules.other.blockquoteBeginRegex(k);for(;e;){let V=e.split(`
122
+ `,1)[0],U;if(m=V,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),U=m):U=m.replace(this.rules.other.tabCharGlobal," "),C.test(m)||F.test(m)||H.test(m)||I.test(m)||_.test(m)||N.test(m))break;if(U.search(this.rules.other.nonSpaceChar)>=k||!m.trim())p+=`
123
+ `+U.slice(k);else{if(E||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(h)||F.test(h)||N.test(h))break;p+=`
119
124
  `+m}E=!m.trim(),c+=V+`
120
- `,e=e.substring(V.length+1),h=U.slice(k)}}s.loose||(l?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(l=!0)),s.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),s.raw+=c}let u=s.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let d of s.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 p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(d.raw);if(c){let p={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};d.checked=p.checked,s.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=p.raw+d.tokens[0].raw,d.tokens[0].text=p.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(p)):d.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):d.tokens.unshift(p)}}if(!s.loose){let c=d.tokens.filter(h=>h.type==="space"),p=c.length>0&&c.some(h=>this.rules.other.anyLine.test(h.raw));s.loose=p}}if(s.loose)for(let d of s.items){d.loose=!0;for(let c of d.tokens)c.type==="text"&&(c.type="paragraph")}return s}}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 s;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Xc(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
121
- `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?a.align.push("right"):this.rules.other.tableAlignCenter.test(o)?a.align.push("center"):this.rules.other.tableAlignLeft.test(o)?a.align.push("left"):a.align.push(null);for(let o=0;o<n.length;o++)a.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:a.align[o]});for(let o of i)a.rows.push(Xc(o,a.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[u]})));return a}}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)===`
122
- `?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 a=Vr(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=DN(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[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)),Qc(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 a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Qc(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,a,s,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(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){o+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){l+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+l);let d=[...r[0]][0].length,c=e.slice(0,i+r.index+d+s);if(Math.min(i,s)%2){let h=c.slice(1,-1);return{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}}let p=c.slice(2,-2);return{type:"strong",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}}}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,a,s,o=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(s=[...a].length,s!==i))continue;if(r[3]||r[4]){o+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o);let u=[...r[0]][0].length,d=e.slice(0,i+r.index+u+s),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 a;do a=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(a!==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}}}},Dt=class wo{constructor(t){Ne(this,"tokens");Ne(this,"options");Ne(this,"state");Ne(this,"inlineQueue");Ne(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||sr,this.options.tokenizer=this.options.tokenizer||new Da,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:dt,block:ea.normal,inline:$r.normal};this.options.pedantic?(n.block=ea.pedantic,n.inline=$r.pedantic):this.options.gfm&&(n.block=ea.gfm,this.options.breaks?n.inline=$r.breaks:n.inline=$r.gfm),this.tokenizer.rules=n}static get rules(){return{block:ea,inline:$r}}static lex(t,n){return new wo(n).lex(t)}static lexInline(t,n){return new wo(n).inlineTokens(t)}lex(t){t=t.replace(dt.carriageReturn,`
125
+ `,e=e.substring(V.length+1),h=U.slice(k)}}s.loose||(l?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(l=!0)),s.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),s.raw+=c}let u=s.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let d of s.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 p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(d.raw);if(c){let p={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};d.checked=p.checked,s.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=p.raw+d.tokens[0].raw,d.tokens[0].text=p.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(p)):d.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):d.tokens.unshift(p)}}if(!s.loose){let c=d.tokens.filter(h=>h.type==="space"),p=c.length>0&&c.some(h=>this.rules.other.anyLine.test(h.raw));s.loose=p}}if(s.loose)for(let d of s.items){d.loose=!0;for(let c of d.tokens)c.type==="text"&&(c.type="paragraph")}return s}}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 s;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=rd(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
126
+ `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let o of r)this.rules.other.tableAlignRight.test(o)?a.align.push("right"):this.rules.other.tableAlignCenter.test(o)?a.align.push("center"):this.rules.other.tableAlignLeft.test(o)?a.align.push("left"):a.align.push(null);for(let o=0;o<n.length;o++)a.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:a.align[o]});for(let o of i)a.rows.push(rd(o,a.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[u]})));return a}}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 a=Wr(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=TI(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[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)),id(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 a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return id(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,a,s,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(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){o+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){l+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+l);let d=[...r[0]][0].length,c=e.slice(0,i+r.index+d+s);if(Math.min(i,s)%2){let h=c.slice(1,-1);return{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}}let p=c.slice(2,-2);return{type:"strong",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}}}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,a,s,o=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(s=[...a].length,s!==i))continue;if(r[3]||r[4]){o+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o);let u=[...r[0]][0].length,d=e.slice(0,i+r.index+u+s),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 a;do a=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(a!==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}}}},Pt=class Lo{constructor(t){Ne(this,"tokens");Ne(this,"options");Ne(this,"state");Ne(this,"inlineQueue");Ne(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||or,this.options.tokenizer=this.options.tokenizer||new Ua,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:dt,block:aa.normal,inline:Vr.normal};this.options.pedantic?(n.block=aa.pedantic,n.inline=Vr.pedantic):this.options.gfm&&(n.block=aa.gfm,this.options.breaks?n.inline=Vr.breaks:n.inline=Vr.gfm),this.tokenizer.rules=n}static get rules(){return{block:aa,inline:Vr}}static lex(t,n){return new Lo(n).lex(t)}static lexInline(t,n){return new Lo(n).inlineTokens(t)}lex(t){t=t.replace(dt.carriageReturn,`
123
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,a,s;for(this.options.pedantic&&(t=t.replace(dt.tabCharGlobal," ").replace(dt.spaceLine,""));t;){let o;if((a=(i=this.options.extensions)==null?void 0:i.block)!=null&&a.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+=`
124
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(`
125
130
  `)?"":`
@@ -133,7 +138,7 @@ ${d}`:d;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
133
138
  `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(o),r=l.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
134
139
  `)?"":`
135
140
  `)+o.raw,u.text+=`
136
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(o);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var l,u,d,c,p;let r=t,i=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)h.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((u=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:u.call({lexer:this},r))??r;let s=!1,o="";for(;t;){s||(o=""),s=!1;let h;if((c=(d=this.options.extensions)==null?void 0:d.inline)!=null&&c.some(E=>(h=E.call({lexer:this},t,n))?(t=t.substring(h.raw.length),n.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let E=n.at(-1);h.type==="text"&&(E==null?void 0:E.type)==="text"?(E.raw+=h.raw,E.text+=h.text):n.push(h);continue}if(h=this.tokenizer.emStrong(t,r,o)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.del(t,r,o)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),n.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),n.push(h);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let E=1/0,k=t.slice(1),_;this.options.extensions.startInline.forEach(N=>{_=N.call({lexer:this},k),typeof _=="number"&&_>=0&&(E=Math.min(E,_))}),E<1/0&&E>=0&&(m=t.substring(0,E+1))}if(h=this.tokenizer.inlineText(m)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(o=h.raw.slice(-1)),s=!0;let E=n.at(-1);(E==null?void 0:E.type)==="text"?(E.raw+=h.raw,E.text+=h.text):n.push(h);continue}if(t){let E="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(E);break}else throw new Error(E)}}return n}},Pa=class{constructor(e){Ne(this,"options");Ne(this,"parser");this.options=e||sr}space(e){return""}code({text:e,lang:t,escaped:n}){var a;let r=(a=(t||"").match(dt.notSpaceStart))==null?void 0:a[0],i=e.replace(dt.endingNewline,"")+`
141
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(o);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var l,u,d,c,p;let r=t,i=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)h.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((u=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:u.call({lexer:this},r))??r;let s=!1,o="";for(;t;){s||(o=""),s=!1;let h;if((c=(d=this.options.extensions)==null?void 0:d.inline)!=null&&c.some(E=>(h=E.call({lexer:this},t,n))?(t=t.substring(h.raw.length),n.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let E=n.at(-1);h.type==="text"&&(E==null?void 0:E.type)==="text"?(E.raw+=h.raw,E.text+=h.text):n.push(h);continue}if(h=this.tokenizer.emStrong(t,r,o)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.del(t,r,o)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),n.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),n.push(h);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let E=1/0,k=t.slice(1),_;this.options.extensions.startInline.forEach(N=>{_=N.call({lexer:this},k),typeof _=="number"&&_>=0&&(E=Math.min(E,_))}),E<1/0&&E>=0&&(m=t.substring(0,E+1))}if(h=this.tokenizer.inlineText(m)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(o=h.raw.slice(-1)),s=!0;let E=n.at(-1);(E==null?void 0:E.type)==="text"?(E.raw+=h.raw,E.text+=h.text):n.push(h);continue}if(t){let E="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(E);break}else throw new Error(E)}}return n}},ja=class{constructor(e){Ne(this,"options");Ne(this,"parser");this.options=e||or}space(e){return""}code({text:e,lang:t,escaped:n}){var a;let r=(a=(t||"").match(dt.notSpaceStart))==null?void 0:a[0],i=e.replace(dt.endingNewline,"")+`
137
142
  `;return r?'<pre><code class="language-'+cn(r)+'">'+(n?i:cn(i,!0))+`</code></pre>
138
143
  `:"<pre><code>"+(n?i:cn(i,!0))+`</code></pre>
139
144
  `}blockquote({tokens:e}){return`<blockquote>
@@ -151,17 +156,17 @@ ${this.parser.parse(e)}</blockquote>
151
156
  `}tablerow({text:e}){return`<tr>
152
157
  ${e}</tr>
153
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}>
154
- `}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>${cn(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=Kc(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+cn(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Kc(e);if(i===null)return cn(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${cn(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:cn(e.text)}},Bl=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}},zt=class So{constructor(t){Ne(this,"options");Ne(this,"renderer");Ne(this,"textRenderer");this.options=t||sr,this.options.renderer=this.options.renderer||new Pa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bl}static parse(t,n){return new So(n).parse(t)}static parseInline(t,n){return new So(n).parseInline(t)}parse(t){var r,i;let n="";for(let a=0;a<t.length;a++){let s=t[a];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[s.type]){let l=s,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=s;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,a;let r="";for(let s=0;s<t.length;s++){let o=t[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[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}},la,Zr=(la=class{constructor(e){Ne(this,"options");Ne(this,"block");this.options=e||sr}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Dt.lex:Dt.lexInline}provideParser(){return this.block?zt.parse:zt.parseInline}},Ne(la,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ne(la,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),la),BN=class{constructor(...e){Ne(this,"defaults",Il());Ne(this,"options",this.setOptions);Ne(this,"parse",this.parseMarkdown(!0));Ne(this,"parseInline",this.parseMarkdown(!1));Ne(this,"Parser",zt);Ne(this,"Renderer",Pa);Ne(this,"TextRenderer",Bl);Ne(this,"Lexer",Dt);Ne(this,"Tokenizer",Da);Ne(this,"Hooks",Zr);this.use(...e)}walkTokens(e,t){var r,i;let n=[];for(let a of e)switch(n=n.concat(t.call(this,a)),a.type){case"table":{let s=a;for(let o of s.header)n=n.concat(this.walkTokens(o.tokens,t));for(let o of s.rows)for(let l of o)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{let s=a;n=n.concat(this.walkTokens(s.items,t));break}default:{let s=a;(i=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let l=s[o].flat(1/0);n=n.concat(this.walkTokens(l,t))}):s.tokens&&(n=n.concat(this.walkTokens(s.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 a=t.renderers[i.name];a?t.renderers[i.name]=function(...s){let o=i.renderer.apply(this,s);return o===!1&&(o=a.apply(this,s)),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 a=t[i.level];a?a.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 Pa(this.defaults);for(let a in n.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,o=n.renderer[s],l=i[s];i[s]=(...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 Da(this.defaults);for(let a in n.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,o=n.tokenizer[s],l=i[s];i[s]=(...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 Zr;for(let a in n.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,o=n.hooks[s],l=i[s];Zr.passThroughHooks.has(a)?i[s]=u=>{if(this.defaults.async&&Zr.passThroughHooksRespectAsync.has(a))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[s]=(...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,a=n.walkTokens;r.walkTokens=function(s){let o=[];return o.push(a.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Dt.lex(e,t??this.defaults)}parser(e,t){return zt.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(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 s=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer():e?Dt.lex:Dt.lexInline)(s,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?zt.parse:zt.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer():e?Dt.lex:Dt.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let o=(i.hooks?i.hooks.provideParser():e?zt.parse:zt.parseInline)(s,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(s){return a(s)}}}onError(e,t){return n=>{if(n.message+=`
155
- Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+cn(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Qn=new BN;function Ie(e,t){return Qn.parse(e,t)}Ie.options=Ie.setOptions=function(e){return Qn.setOptions(e),Ie.defaults=Qn.defaults,a0(Ie.defaults),Ie};Ie.getDefaults=Il;Ie.defaults=sr;Ie.use=function(...e){return Qn.use(...e),Ie.defaults=Qn.defaults,a0(Ie.defaults),Ie};Ie.walkTokens=function(e,t){return Qn.walkTokens(e,t)};Ie.parseInline=Qn.parseInline;Ie.Parser=zt;Ie.parser=zt.parse;Ie.Renderer=Pa;Ie.TextRenderer=Bl;Ie.Lexer=Dt;Ie.lexer=Dt.lex;Ie.Tokenizer=Da;Ie.Hooks=Zr;Ie.parse=Ie;Ie.options;Ie.setOptions;Ie.use;Ie.walkTokens;Ie.parseInline;zt.parse;Dt.lex;var FN=300,HN="300px",UN=500;function jN(e={}){let{immediate:t=!1,debounceDelay:n=FN,rootMargin:r=HN,idleTimeout:i=UN}=e,[a,s]=b.useState(!1),o=b.useRef(null),l=b.useRef(null),u=b.useRef(null),d=b.useMemo(()=>h=>{let m=Date.now();return window.setTimeout(()=>{h({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),c=b.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(h,m)=>window.requestIdleCallback(h,m):d,[d]),p=b.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?h=>window.cancelIdleCallback(h):h=>{clearTimeout(h)},[]);return b.useEffect(()=>{if(t){s(!0);return}let h=o.current;if(!h)return;l.current&&(clearTimeout(l.current),l.current=null),u.current&&(p(u.current),u.current=null);let m=()=>{l.current&&(clearTimeout(l.current),l.current=null),u.current&&(p(u.current),u.current=null)},E=w=>{u.current=c(F=>{F.timeRemaining()>0||F.didTimeout?(s(!0),w.disconnect()):u.current=c(()=>{s(!0),w.disconnect()},{timeout:i/2})},{timeout:i})},k=w=>{m(),l.current=window.setTimeout(()=>{var F,H;let I=w.takeRecords();(I.length===0||(H=(F=I.at(-1))==null?void 0:F.isIntersecting)!=null&&H)&&E(w)},n)},_=(w,F)=>{w.isIntersecting?k(F):m()},N=new IntersectionObserver(w=>{for(let F of w)_(F,N)},{rootMargin:r,threshold:0});return N.observe(h),()=>{l.current&&clearTimeout(l.current),u.current&&p(u.current),N.disconnect()}},[t,n,r,i,p,c]),{shouldRender:a,containerRef:o}}var b0=/\s/,zN=/^\s+$/,$N=new Set(["code","pre","svg","math","annotation"]),VN=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",WN=e=>e.some(t=>VN(t)&&$N.has(t.tagName)),YN=e=>{let t=[],n="",r=!1;for(let i of e){let a=b0.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},qN=e=>{let t=[],n="";for(let r of e)b0.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},GN=(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}]}),KN=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(WN(t))return sp;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let o=(n.sep==="char"?qN(s):YN(s)).map(l=>zN.test(l)?{type:"text",value:l}:GN(l,n.animation,n.duration,n.easing));return i.children.splice(a,1,...o),a+o.length};function No(e){var t,n,r,i;let a={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{op(s,"text",(o,l)=>KN(o,l,a))}}}No();var E0=b.createContext(!1),XN=()=>b.useContext(E0),ce=(...e)=>tl(it(e)),yr=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},QN=ce("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"),JN=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},ZN=b.memo(({children:e,result:t,language:n,className:r,...i})=>{let a=b.useMemo(()=>{let s={};return t.bg&&(s["--sdm-bg"]=t.bg),t.fg&&(s["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(s,JN(t.rootStyle)),s},[t.bg,t.fg,t.rootStyle]);return g.jsx("div",{className:ce(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:ce(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:a,children:g.jsx("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((s,o)=>g.jsx("span",{className:QN,children:s.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[p,h]of Object.entries(l.htmlStyle))p==="color"?d["--sdm-c"]=h:p==="background-color"?(d["--sdm-tbg"]=h,c=!0):d[p]=h;return g.jsx("span",{className:ce("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),eI=({className:e,language:t,style:n,isIncomplete:r,...i})=>g.jsx("div",{className:ce("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}),T0=b.createContext({code:""}),x0=()=>b.useContext(T0),tI=({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})}),nI=/\n+$/,rI=b.lazy(()=>qf(()=>import("./highlighted-body-B3W2YXNL-DCpvexQb.js"),__vite__mapDeps([0,1])).then(e=>({default:e.HighlightedCodeBlockBody}))),iI=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,...a})=>{let s=b.useMemo(()=>e.replace(nI,""),[e]),o=b.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:s.split(`
156
- `).map(l=>[{content:l,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[s]);return g.jsx(T0.Provider,{value:{code:e},children:g.jsxs(eI,{isIncomplete:i,language:t,children:[g.jsx(tI,{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(b.Suspense,{fallback:g.jsx(ZN,{className:n,language:t,result:o,...a}),children:g.jsx(rI,{className:n,code:s,language:t,raw:o,...a})})]})})},Fl=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"})}),Hl=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"})}),ss=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"})}),aI=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"})]}),sI=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"})}),oI=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"})}),y0=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"})}),Jc=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"})}),lI=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"})}),uI=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"})}),Zc=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[o,l]=b.useState(!1),u=b.useRef(0),{code:d}=x0(),{isAnimating:c}=b.useContext(Bt),p=a??d,h=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(p),l(!0),e==null||e(),u.current=window.setTimeout(()=>l(!1),n))}catch(k){t==null||t(k)}};b.useEffect(()=>()=>{window.clearTimeout(u.current)},[]);let m=o?Fl:Hl;return g.jsx("button",{className:ce("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:h,title:"Copy Code",type:"button",...s,children:r??g.jsx(m,{size:14})})},ed={"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"},cI=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:o}=x0(),{isAnimating:l}=b.useContext(Bt),u=a??o,d=`file.${n&&n in ed?ed[n]:"txt"}`,c="text/plain",p=()=>{try{yr(d,u,c),e==null||e()}catch(h){t==null||t(h)}};return g.jsx("button",{className:ce("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:p,title:"Download file",type:"button",...s,children:r??g.jsx(ss,{size:14})})},dI=()=>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(aI,{className:"size-4 animate-spin"})})]}),fI=/\.[^/.]+$/,hI=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...s})=>{let o=b.useRef(null),[l,u]=b.useState(!1),[d,c]=b.useState(!1),p=s.width!=null||s.height!=null,h=(l||p)&&!d,m=d&&!p;b.useEffect(()=>{let N=o.current;if(N!=null&&N.complete){let w=N.naturalWidth>0;u(w),c(!w)}},[]);let E=b.useCallback(N=>{u(!0),c(!1),i==null||i(N)},[i]),k=b.useCallback(N=>{u(!1),c(!0),a==null||a(N)},[a]),_=async()=>{if(n)try{let N=await(await fetch(n)).blob(),w=new URL(n,window.location.origin).pathname.split("/").pop()||"",F=w.split(".").pop(),H=w.includes(".")&&F!==void 0&&F.length<=4,I="";if(H)I=w;else{let V=N.type,U="png";V.includes("jpeg")||V.includes("jpg")?U="jpg":V.includes("png")?U="png":V.includes("svg")?U="svg":V.includes("gif")?U="gif":V.includes("webp")&&(U="webp"),I=`${(r||w||"image").replace(fI,"")}.${U}`}yr(I,N,N.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:ce("max-w-full rounded-lg",m&&"hidden",t),"data-streamdown":"image",onError:k,onLoad:E,ref:o,src:n,...s}),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"}),h&&g.jsx("button",{className:ce("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:_,title:"Download image",type:"button",children:g.jsx(ss,{size:14})})]}):null},di=0,pI=()=>{di+=1,di===1&&(document.body.style.overflow="hidden")},mI=()=>{di=Math.max(0,di-1),di===0&&(document.body.style.overflow="")},gI=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=b.useState(!1),s=b.useCallback(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),o=b.useCallback(()=>{r(),n()},[r,n]);return b.useEffect(()=>{if(t){pI();let l=u=>{u.key==="Escape"&&n()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),mI()}}},[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(y0,{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(Jc,{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:ce("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:s,type:"button",children:i?g.jsxs(g.Fragment,{children:[g.jsx(Fl,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Hl,{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(Jc,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},Io=b.createContext(null),_0=()=>b.useContext(Io),Uv=()=>{var e;let t=_0();return(e=t==null?void 0:t.code)!=null?e:null},Ul=()=>{var e;let t=_0();return(e=t==null?void 0:t.mermaid)!=null?e:null},bI=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="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){a(new Error("Failed to create 2D canvas context for PNG export"));return}c.drawImage(o,0,0,u,d),l.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},EI=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,o]=b.useState(!1),l=b.useRef(null),{isAnimating:u}=b.useContext(Bt),d=Ul(),c=async p=>{try{if(p==="mmd"){yr("diagram.mmd",e,"text/plain"),o(!1),r==null||r(p);return}if(!d){a==null||a(new Error("Mermaid plugin not available"));return}let h=d.getMermaid(i),m=e.split("").reduce((_,N)=>(_<<5)-_+N.charCodeAt(0)|0,0),E=`mermaid-${Math.abs(m)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:k}=await h.render(E,e);if(!k){a==null||a(new Error("SVG not found. Please wait for the diagram to render."));return}if(p==="svg"){yr("diagram.svg",k,"image/svg+xml"),o(!1),r==null||r(p);return}if(p==="png"){let _=await bI(k);yr("diagram.png",_,"image/png"),r==null||r(p),o(!1);return}}catch(h){a==null||a(h)}};return b.useEffect(()=>{let p=h=>{let m=h.composedPath();l.current&&!m.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),g.jsxs("div",{className:"relative",ref:l,children:[g.jsx("button",{className:ce("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:u,onClick:()=>o(!s),title:"Download diagram",type:"button",children:t??g.jsx(ss,{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:()=>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]})},fi=0,TI=()=>{fi+=1,fi===1&&(document.body.style.overflow="hidden")},xI=()=>{fi=Math.max(0,fi-1),fi===0&&(document.body.style.overflow="")},yI=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,o]=b.useState(!1),{isAnimating:l,controls:u}=b.useContext(Bt),d=(()=>{if(typeof u=="boolean")return u;let p=u.mermaid;return p===!1?!1:p===!0||p===void 0?!0:p.panZoom!==!1})(),c=()=>{o(!s)};return b.useEffect(()=>{if(s){TI();let p=h=>{h.key==="Escape"&&o(!1)};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),xI()}}},[s]),b.useEffect(()=>{s?n==null||n():r&&r()},[s,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:ce("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",...a,children:g.jsx(sI,{size:14})}),s?$o.createPortal(g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:c,onKeyDown:p=>{p.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(y0,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:g.jsx(Q0,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:d})})]}),document.body):null]})},k0=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let o of a)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let o of s){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}},A0=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>${cn(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=nd(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+cn(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=nd(e);if(i===null)return cn(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${cn(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:cn(e.text)}},$l=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}},$t=class vo{constructor(t){Ne(this,"options");Ne(this,"renderer");Ne(this,"textRenderer");this.options=t||or,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 $l}static parse(t,n){return new vo(n).parse(t)}static parseInline(t,n){return new vo(n).parseInline(t)}parse(t){var r,i;let n="";for(let a=0;a<t.length;a++){let s=t[a];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[s.type]){let l=s,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=s;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,a;let r="";for(let s=0;s<t.length;s++){let o=t[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[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}},fa,ei=(fa=class{constructor(e){Ne(this,"options");Ne(this,"block");this.options=e||or}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Pt.lex:Pt.lexInline}provideParser(){return this.block?$t.parse:$t.parseInline}},Ne(fa,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ne(fa,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),fa),_I=class{constructor(...e){Ne(this,"defaults",Pl());Ne(this,"options",this.setOptions);Ne(this,"parse",this.parseMarkdown(!0));Ne(this,"parseInline",this.parseMarkdown(!1));Ne(this,"Parser",$t);Ne(this,"Renderer",ja);Ne(this,"TextRenderer",$l);Ne(this,"Lexer",Pt);Ne(this,"Tokenizer",Ua);Ne(this,"Hooks",ei);this.use(...e)}walkTokens(e,t){var r,i;let n=[];for(let a of e)switch(n=n.concat(t.call(this,a)),a.type){case"table":{let s=a;for(let o of s.header)n=n.concat(this.walkTokens(o.tokens,t));for(let o of s.rows)for(let l of o)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{let s=a;n=n.concat(this.walkTokens(s.items,t));break}default:{let s=a;(i=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let l=s[o].flat(1/0);n=n.concat(this.walkTokens(l,t))}):s.tokens&&(n=n.concat(this.walkTokens(s.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 a=t.renderers[i.name];a?t.renderers[i.name]=function(...s){let o=i.renderer.apply(this,s);return o===!1&&(o=a.apply(this,s)),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 a=t[i.level];a?a.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 a in n.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,o=n.renderer[s],l=i[s];i[s]=(...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 Ua(this.defaults);for(let a in n.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,o=n.tokenizer[s],l=i[s];i[s]=(...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 ei;for(let a in n.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,o=n.hooks[s],l=i[s];ei.passThroughHooks.has(a)?i[s]=u=>{if(this.defaults.async&&ei.passThroughHooksRespectAsync.has(a))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[s]=(...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,a=n.walkTokens;r.walkTokens=function(s){let o=[];return o.push(a.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Pt.lex(e,t??this.defaults)}parser(e,t){return $t.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(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 s=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer():e?Pt.lex:Pt.lexInline)(s,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?$t.parse:$t.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer():e?Pt.lex:Pt.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let o=(i.hooks?i.hooks.provideParser():e?$t.parse:$t.parseInline)(s,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(s){return a(s)}}}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>"+cn(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Jn=new _I;function Ie(e,t){return Jn.parse(e,t)}Ie.options=Ie.setOptions=function(e){return Jn.setOptions(e),Ie.defaults=Jn.defaults,A0(Ie.defaults),Ie};Ie.getDefaults=Pl;Ie.defaults=or;Ie.use=function(...e){return Jn.use(...e),Ie.defaults=Jn.defaults,A0(Ie.defaults),Ie};Ie.walkTokens=function(e,t){return Jn.walkTokens(e,t)};Ie.parseInline=Jn.parseInline;Ie.Parser=$t;Ie.parser=$t.parse;Ie.Renderer=ja;Ie.TextRenderer=$l;Ie.Lexer=Pt;Ie.lexer=Pt.lex;Ie.Tokenizer=Ua;Ie.Hooks=ei;Ie.parse=Ie;Ie.options;Ie.setOptions;Ie.use;Ie.walkTokens;Ie.parseInline;$t.parse;Pt.lex;var kI=300,AI="300px",wI=500;function CI(e={}){let{immediate:t=!1,debounceDelay:n=kI,rootMargin:r=AI,idleTimeout:i=wI}=e,[a,s]=b.useState(!1),o=b.useRef(null),l=b.useRef(null),u=b.useRef(null),d=b.useMemo(()=>h=>{let m=Date.now();return window.setTimeout(()=>{h({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),c=b.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(h,m)=>window.requestIdleCallback(h,m):d,[d]),p=b.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?h=>window.cancelIdleCallback(h):h=>{clearTimeout(h)},[]);return b.useEffect(()=>{if(t){s(!0);return}let h=o.current;if(!h)return;l.current&&(clearTimeout(l.current),l.current=null),u.current&&(p(u.current),u.current=null);let m=()=>{l.current&&(clearTimeout(l.current),l.current=null),u.current&&(p(u.current),u.current=null)},E=C=>{u.current=c(F=>{F.timeRemaining()>0||F.didTimeout?(s(!0),C.disconnect()):u.current=c(()=>{s(!0),C.disconnect()},{timeout:i/2})},{timeout:i})},k=C=>{m(),l.current=window.setTimeout(()=>{var F,H;let I=C.takeRecords();(I.length===0||(H=(F=I.at(-1))==null?void 0:F.isIntersecting)!=null&&H)&&E(C)},n)},_=(C,F)=>{C.isIntersecting?k(F):m()},N=new IntersectionObserver(C=>{for(let F of C)_(F,N)},{rootMargin:r,threshold:0});return N.observe(h),()=>{l.current&&clearTimeout(l.current),u.current&&p(u.current),N.disconnect()}},[t,n,r,i,p,c]),{shouldRender:a,containerRef:o}}var M0=/\s/,SI=/^\s+$/,NI=new Set(["code","pre","svg","math","annotation"]),II=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",RI=e=>e.some(t=>II(t)&&NI.has(t.tagName)),OI=e=>{let t=[],n="",r=!1;for(let i of e){let a=M0.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},LI=e=>{let t=[],n="";for(let r of e)M0.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},vI=(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}]}),DI=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(RI(t))return wp;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let o=(n.sep==="char"?LI(s):OI(s)).map(l=>SI.test(l)?{type:"text",value:l}:vI(l,n.animation,n.duration,n.easing));return i.children.splice(a,1,...o),a+o.length};function Do(e){var t,n,r,i;let a={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{Cp(s,"text",(o,l)=>DI(o,l,a))}}}Do();var B0=b.createContext(!1),PI=()=>b.useContext(B0),ce=(...e)=>sl(at(e)),_r=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},MI=ce("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"),BI=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},FI=b.memo(({children:e,result:t,language:n,className:r,...i})=>{let a=b.useMemo(()=>{let s={};return t.bg&&(s["--sdm-bg"]=t.bg),t.fg&&(s["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(s,BI(t.rootStyle)),s},[t.bg,t.fg,t.rootStyle]);return g.jsx("div",{className:ce(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:ce(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:a,children:g.jsx("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((s,o)=>g.jsx("span",{className:MI,children:s.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[p,h]of Object.entries(l.htmlStyle))p==="color"?d["--sdm-c"]=h:p==="background-color"?(d["--sdm-tbg"]=h,c=!0):d[p]=h;return g.jsx("span",{className:ce("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),HI=({className:e,language:t,style:n,isIncomplete:r,...i})=>g.jsx("div",{className:ce("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}),F0=b.createContext({code:""}),H0=()=>b.useContext(F0),UI=({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})}),jI=/\n+$/,zI=b.lazy(()=>bi(()=>import("./highlighted-body-B3W2YXNL-BO6bNJzI.js"),__vite__mapDeps([0,1])).then(e=>({default:e.HighlightedCodeBlockBody}))),$I=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,...a})=>{let s=b.useMemo(()=>e.replace(jI,""),[e]),o=b.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:s.split(`
161
+ `).map(l=>[{content:l,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[s]);return g.jsx(F0.Provider,{value:{code:e},children:g.jsxs(HI,{isIncomplete:i,language:t,children:[g.jsx(UI,{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(b.Suspense,{fallback:g.jsx(FI,{className:n,language:t,result:o,...a}),children:g.jsx(zI,{className:n,code:s,language:t,raw:o,...a})})]})})},Vl=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"})}),Wl=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"})}),fs=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"})}),VI=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"})]}),WI=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"})}),YI=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"})}),U0=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"})}),ad=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"})}),qI=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"})}),GI=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"})}),sd=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[o,l]=b.useState(!1),u=b.useRef(0),{code:d}=H0(),{isAnimating:c}=b.useContext(Ft),p=a??d,h=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(p),l(!0),e==null||e(),u.current=window.setTimeout(()=>l(!1),n))}catch(k){t==null||t(k)}};b.useEffect(()=>()=>{window.clearTimeout(u.current)},[]);let m=o?Vl:Wl;return g.jsx("button",{className:ce("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:h,title:"Copy Code",type:"button",...s,children:r??g.jsx(m,{size:14})})},od={"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"},KI=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:o}=H0(),{isAnimating:l}=b.useContext(Ft),u=a??o,d=`file.${n&&n in od?od[n]:"txt"}`,c="text/plain",p=()=>{try{_r(d,u,c),e==null||e()}catch(h){t==null||t(h)}};return g.jsx("button",{className:ce("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:p,title:"Download file",type:"button",...s,children:r??g.jsx(fs,{size:14})})},XI=()=>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(VI,{className:"size-4 animate-spin"})})]}),QI=/\.[^/.]+$/,JI=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...s})=>{let o=b.useRef(null),[l,u]=b.useState(!1),[d,c]=b.useState(!1),p=s.width!=null||s.height!=null,h=(l||p)&&!d,m=d&&!p;b.useEffect(()=>{let N=o.current;if(N!=null&&N.complete){let C=N.naturalWidth>0;u(C),c(!C)}},[]);let E=b.useCallback(N=>{u(!0),c(!1),i==null||i(N)},[i]),k=b.useCallback(N=>{u(!1),c(!0),a==null||a(N)},[a]),_=async()=>{if(n)try{let N=await(await fetch(n)).blob(),C=new URL(n,window.location.origin).pathname.split("/").pop()||"",F=C.split(".").pop(),H=C.includes(".")&&F!==void 0&&F.length<=4,I="";if(H)I=C;else{let V=N.type,U="png";V.includes("jpeg")||V.includes("jpg")?U="jpg":V.includes("png")?U="png":V.includes("svg")?U="svg":V.includes("gif")?U="gif":V.includes("webp")&&(U="webp"),I=`${(r||C||"image").replace(QI,"")}.${U}`}_r(I,N,N.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:ce("max-w-full rounded-lg",m&&"hidden",t),"data-streamdown":"image",onError:k,onLoad:E,ref:o,src:n,...s}),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"}),h&&g.jsx("button",{className:ce("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:_,title:"Download image",type:"button",children:g.jsx(fs,{size:14})})]}):null},fi=0,ZI=()=>{fi+=1,fi===1&&(document.body.style.overflow="hidden")},eR=()=>{fi=Math.max(0,fi-1),fi===0&&(document.body.style.overflow="")},tR=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=b.useState(!1),s=b.useCallback(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),o=b.useCallback(()=>{r(),n()},[r,n]);return b.useEffect(()=>{if(t){ZI();let l=u=>{u.key==="Escape"&&n()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),eR()}}},[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(U0,{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(ad,{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:ce("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:s,type:"button",children:i?g.jsxs(g.Fragment,{children:[g.jsx(Vl,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Wl,{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(ad,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},Po=b.createContext(null),j0=()=>b.useContext(Po),i4=()=>{var e;let t=j0();return(e=t==null?void 0:t.code)!=null?e:null},Yl=()=>{var e;let t=j0();return(e=t==null?void 0:t.mermaid)!=null?e:null},nR=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="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){a(new Error("Failed to create 2D canvas context for PNG export"));return}c.drawImage(o,0,0,u,d),l.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},rR=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,o]=b.useState(!1),l=b.useRef(null),{isAnimating:u}=b.useContext(Ft),d=Yl(),c=async p=>{try{if(p==="mmd"){_r("diagram.mmd",e,"text/plain"),o(!1),r==null||r(p);return}if(!d){a==null||a(new Error("Mermaid plugin not available"));return}let h=d.getMermaid(i),m=e.split("").reduce((_,N)=>(_<<5)-_+N.charCodeAt(0)|0,0),E=`mermaid-${Math.abs(m)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:k}=await h.render(E,e);if(!k){a==null||a(new Error("SVG not found. Please wait for the diagram to render."));return}if(p==="svg"){_r("diagram.svg",k,"image/svg+xml"),o(!1),r==null||r(p);return}if(p==="png"){let _=await nR(k);_r("diagram.png",_,"image/png"),r==null||r(p),o(!1);return}}catch(h){a==null||a(h)}};return b.useEffect(()=>{let p=h=>{let m=h.composedPath();l.current&&!m.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),g.jsxs("div",{className:"relative",ref:l,children:[g.jsx("button",{className:ce("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:u,onClick:()=>o(!s),title:"Download diagram",type:"button",children:t??g.jsx(fs,{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:()=>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]})},hi=0,iR=()=>{hi+=1,hi===1&&(document.body.style.overflow="hidden")},aR=()=>{hi=Math.max(0,hi-1),hi===0&&(document.body.style.overflow="")},sR=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,o]=b.useState(!1),{isAnimating:l,controls:u}=b.useContext(Ft),d=(()=>{if(typeof u=="boolean")return u;let p=u.mermaid;return p===!1?!1:p===!0||p===void 0?!0:p.panZoom!==!1})(),c=()=>{o(!s)};return b.useEffect(()=>{if(s){iR();let p=h=>{h.key==="Escape"&&o(!1)};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),aR()}}},[s]),b.useEffect(()=>{s?n==null||n():r&&r()},[s,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:ce("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",...a,children:g.jsx(WI,{size:14})}),s?Go.createPortal(g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:c,onKeyDown:p=>{p.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(U0,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:g.jsx(gm,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:d})})]}),document.body):null]})},z0=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let o of a)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let o of s){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}},$0=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===`
157
162
  `)&&(l=!0)}return l?u?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(","),s+=1);for(let o of n)a[s]=o.map(r).join(","),s+=1;return a.join(`
158
- `)},_I=e=>{let{headers:t,rows:n}=e,r=o=>{let l=!1;for(let d of o)if(d===" "||d===`
163
+ `)},oR=e=>{let{headers:t,rows:n}=e,r=o=>{let l=!1;for(let d of o)if(d===" "||d===`
159
164
  `||d==="\r"){l=!0;break}if(!l)return o;let u=[];for(let d of o)d===" "?u.push("\\t"):d===`
160
165
  `?u.push("\\n"):d==="\r"?u.push("\\r"):u.push(d);return u.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let o of n)a[s]=o.map(r).join(" "),s+=1;return a.join(`
161
- `)},js=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("")},Oo=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(o=>js(o));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let o=0;o<t.length;o+=1)s[o]="---";r[i]=`| ${s.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?js(o[u]):"";r[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=o.map(u=>js(u));r[i]=`| ${l.join(" | ")} |`,i+=1}return r.join(`
162
- `)},kI=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=b.useState(!1),[o,l]=b.useState(!1),u=b.useRef(null),d=b.useRef(0),{isAnimating:c}=b.useContext(Bt),p=async m=>{var E,k;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 _=(k=u.current)==null?void 0:k.closest('[data-streamdown="table-wrapper"]'),N=_==null?void 0:_.querySelector("table");if(!N){r==null||r(new Error("Table not found"));return}let w=k0(N),F=({csv:A0,tsv:_I,md:Oo}[m]||Oo)(w),H=new ClipboardItem({"text/plain":new Blob([F],{type:"text/plain"}),"text/html":new Blob([N.outerHTML],{type:"text/html"})});await navigator.clipboard.write([H]),l(!0),s(!1),n==null||n(m),d.current=window.setTimeout(()=>l(!1),i)}catch(_){r==null||r(_)}};b.useEffect(()=>{let m=E=>{let k=E.composedPath();u.current&&!k.includes(u.current)&&s(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m),window.clearTimeout(d.current)}},[]);let h=o?Fl:Hl;return g.jsxs("div",{className:"relative",ref:u,children:[g.jsx("button",{className:ce("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??g.jsx(h,{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:()=>p("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:()=>p("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:()=>p("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},AI=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=b.useState(!1),s=b.useRef(null),{isAnimating:o}=b.useContext(Bt),l=u=>{var d;try{let c=(d=s.current)==null?void 0:d.closest('[data-streamdown="table-wrapper"]'),p=c==null?void 0:c.querySelector("table");if(!p){r==null||r(new Error("Table not found"));return}let h=k0(p),m=u==="csv"?A0(h):Oo(h);yr(`table.${u==="csv"?"csv":"md"}`,m,u==="csv"?"text/csv":"text/markdown"),a(!1),n==null||n(u)}catch(c){r==null||r(c)}};return b.useEffect(()=>{let u=d=>{let c=d.composedPath();s.current&&!c.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[]),g.jsxs("div",{className:"relative",ref:s,children:[g.jsx("button",{className:ce("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>a(!i),title:"Download table",type:"button",children:e??g.jsx(ss,{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]})},CI=({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(kI,{}),g.jsx(AI,{})]}):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:ce("w-full divide-y divide-border",t),"data-streamdown":"table",...r,children:e})})]}),wI=b.lazy(()=>qf(()=>Promise.resolve().then(()=>wv),void 0).then(e=>({default:e.Mermaid}))),SI=/language-([^\s]+)/;function os(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,a=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)===(a==null?void 0:a.line)&&(i==null?void 0:i.column)===(a==null?void 0:a.column)}function Me(e,t){return e.className===t.className&&os(e.node,t.node)}var Ro=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,ta=(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},jl=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:ce("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>Me(e,t));jl.displayName="MarkdownOl";var C0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:ce("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&os(e.node,t.node));C0.displayName="MarkdownLi";var w0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:ce("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>Me(e,t));w0.displayName="MarkdownUl";var S0=b.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:ce("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>Me(e,t));S0.displayName="MarkdownHr";var N0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:ce("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>Me(e,t));N0.displayName="MarkdownStrong";var NI=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=b.useContext(Bt),[s,o]=b.useState(!1),l=n==="streamdown:incomplete-link",u=b.useCallback(async h=>{if(!(!(a!=null&&a.enabled&&n)||l)){if(h.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[a,n,l]),d=b.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),c=b.useCallback(()=>{o(!1)},[]),p={url:n??"",isOpen:s,onClose:c,onConfirm:d};return a!=null&&a.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:ce("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:u,type:"button",children:e}),a.renderModal?a.renderModal(p):g.jsx(gI,{...p})]}):g.jsx("a",{className:ce("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},I0=b.memo(NI,(e,t)=>Me(e,t)&&e.href===t.href);I0.displayName="MarkdownA";var O0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:ce("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>Me(e,t));O0.displayName="MarkdownH1";var R0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:ce("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>Me(e,t));R0.displayName="MarkdownH2";var L0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:ce("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>Me(e,t));L0.displayName="MarkdownH3";var v0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:ce("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>Me(e,t));v0.displayName="MarkdownH4";var D0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:ce("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>Me(e,t));D0.displayName="MarkdownH5";var P0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:ce("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>Me(e,t));P0.displayName="MarkdownH6";var M0=b.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=b.useContext(Bt),a=Ro(i,"table");return g.jsx(CI,{className:t,showControls:a,...r,children:e})},(e,t)=>Me(e,t));M0.displayName="MarkdownTable";var B0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:ce("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>Me(e,t));B0.displayName="MarkdownThead";var F0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:ce("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>Me(e,t));F0.displayName="MarkdownTbody";var H0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:ce("border-border",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>Me(e,t));H0.displayName="MarkdownTr";var U0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:ce("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>Me(e,t));U0.displayName="MarkdownTh";var j0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:ce("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>Me(e,t));j0.displayName="MarkdownTd";var z0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:ce("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>Me(e,t));z0.displayName="MarkdownBlockquote";var $0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:ce("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>Me(e,t));$0.displayName="MarkdownSup";var V0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:ce("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>Me(e,t));V0.displayName="MarkdownSub";var W0=b.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var o,l;if(!b.isValidElement(s))return!1;let u=Array.isArray(s.props.children)?s.props.children:[s.props.children],d=!1,c=!1;for(let p of u)if(p){if(typeof p=="string")p.trim()!==""&&(d=!0);else if(b.isValidElement(p))if(((o=p.props)==null?void 0:o["data-footnote-backref"])!==void 0)c=!0;else{let h=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let m of h){if(typeof m=="string"&&m.trim()!==""){d=!0;break}if(b.isValidElement(m)&&((l=m.props)==null?void 0:l["data-footnote-backref"])===void 0){d=!0;break}}}}return c&&!d},a=Array.isArray(e)?e.map(s=>{if(!b.isValidElement(s))return s;if(s.type===jl){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(l=>!i(l));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?g.jsx("section",{className:t,...r,children:a}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>Me(e,t));W0.displayName="MarkdownSection";var II=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:o}=b.useContext(Bt),l=Ul(),u=XN();if(a)return g.jsx("code",{className:ce("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(SI),c=(i=d==null?void 0:d.at(1))!=null?i:"",p="";if(b.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?p=n.props.children:typeof n=="string"&&(p=n),c==="mermaid"&&l){let m=Ro(o,"mermaid"),E=ta(o,"download"),k=ta(o,"copy"),_=ta(o,"fullscreen"),N=ta(o,"panZoom"),w=m&&(E||k||_);return g.jsx(b.Suspense,{fallback:g.jsx(dI,{}),children:g.jsxs("div",{className:ce("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"})}),w?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(EI,{chart:p,config:s==null?void 0:s.config}):null,k?g.jsx(Zc,{code:p}):null,_?g.jsx(yI,{chart:p,config:s==null?void 0:s.config}):null]})}):null,g.jsx("div",{className:"rounded-md border border-border bg-background",children:g.jsx(wI,{chart:p,config:s==null?void 0:s.config,showControls:N})})]})})}let h=Ro(o,"code");return g.jsx(iI,{className:t,code:p,isIncomplete:u,language:c,children:h?g.jsxs(g.Fragment,{children:[g.jsx(cI,{code:p,language:c}),g.jsx(Zc,{})]}):null})},Y0=b.memo(II,(e,t)=>e.className===t.className&&os(e.node,t.node));Y0.displayName="MarkdownCode";var q0=b.memo(hI,(e,t)=>e.className===t.className&&os(e.node,t.node));q0.displayName="MarkdownImg";var G0=b.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&b.isValidElement(r[0])){let i=r[0].props.node,a=i==null?void 0:i.tagName;if(a==="img")return g.jsx(g.Fragment,{children:e});if(a==="code"&&"data-block"in r[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{...n,children:e})},(e,t)=>Me(e,t));G0.displayName="MarkdownParagraph";var OI={ol:jl,li:C0,ul:w0,hr:S0,strong:N0,a:I0,h1:O0,h2:R0,h3:L0,h4:v0,h5:D0,h6:P0,table:M0,thead:B0,tbody:F0,tr:H0,th:U0,td:j0,blockquote:z0,code:Y0,img:q0,pre:({children:e})=>b.isValidElement(e)?b.cloneElement(e,{"data-block":"true"}):e,sup:$0,sub:V0,p:G0,section:W0},RI=/^[ \t]{0,3}(`{3,}|~{3,})/,LI=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,td=e=>{let t=e.split(`
163
- `),n=null,r=0;for(let i of t){let a=RI.exec(i);if(n===null){if(a){let s=a[1];n=s[0],r=s.length}}else if(a){let s=a[1],o=s[0],l=s.length;o===n&&l>=r&&(n=null,r=0)}}return n!==null},vI=e=>{let t=e.split(`
164
- `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&LI.test(r))return!0}return!1},DI=()=>e=>{Ln(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},nd=[],rd={allowDangerousHtml:!0},na=new WeakMap,PI=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 a=d=>{if(!d||d.length===0)return"";let c="";for(let p=0;p<d.length;p+=1){let h=d[p];if(p>0&&(c+=","),Array.isArray(h)){let[m,E]=h;if(typeof m=="function"){let k=na.get(m);k||(k=m.name,na.set(m,k)),c+=k}else c+=String(m);c+=":",c+=JSON.stringify(E)}else if(typeof h=="function"){let m=na.get(h);m||(m=h.name,na.set(h,m)),c+=m}else c+=String(h)}return c},s=a(n),o=a(r),l=i?JSON.stringify(i):"",u=`${o}::${s}::${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()}},id=new PI,K0=e=>{let t=MI(e),n=e.children||"";return $I(t.runSync(t.parse(n),n),e)},MI=e=>{let t=id.get(e);if(t)return t;let n=FI(e);return id.set(e,n),n},BI=e=>e.some(t=>Array.isArray(t)?t[0]===bo:t===bo),FI=e=>{let t=e.rehypePlugins||nd,n=e.remarkPlugins||nd,r=BI(t)?n:[...n,DI],i=e.remarkRehypeOptions?{...rd,...e.remarkRehypeOptions}:rd;return W3().use(VS).use(r).use(w3,i).use(t)},HI=e=>e,UI=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},jI=(e,t)=>{var n;for(let r in Ls)if(Object.hasOwn(Ls,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Ls[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},zI=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},$I=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:o}=t;if(n||r||i||a||o){let l=o||HI;Ln(e,(u,d,c)=>{if(u.type==="raw"&&c&&typeof d=="number")return UI(c,d,a,u.value),d;if(u.type==="element"&&(jI(u,l),zI(u,d,c,r,i,n)&&c&&typeof d=="number"))return s&&u.children?c.children.splice(d,1,...u.children):c.children.splice(d,1),d})}return Jw(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},VI=/\[\^[\w-]{1,200}\](?!:)/,WI=/\[\^[\w-]{1,200}\]:/,YI=/<(\w+)[\s>]/,qI=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ad=new Map,sd=new Map,GI=e=>{let t=e.toLowerCase(),n=ad.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return ad.set(t,r),r},KI=e=>{let t=e.toLowerCase(),n=sd.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return sd.set(t,r),r},od=(e,t)=>{if(qI.has(t.toLowerCase()))return 0;let n=e.match(GI(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},ld=(e,t)=>{let n=e.match(KI(t));return n?n.length:0},XI=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},QI=e=>{let t=VI.test(e),n=WI.test(e);if(t||n)return[e];let r=Dt.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let o of r){let l=o.raw,u=i.length;if(a.length>0){i[u-1]+=l;let d=a.at(-1),c=od(l,d),p=ld(l,d);for(let h=0;h<c;h+=1)a.push(d);for(let h=0;h<p;h+=1)a.length>0&&a.at(-1)===d&&a.pop();continue}if(o.type==="html"&&o.block){let d=l.match(YI);if(d){let c=d[1],p=od(l,c),h=ld(l,c);p>h&&a.push(c)}}if(u>0&&!s){let d=i[u-1];if(XI(d)%2===1){i[u-1]=d+l;continue}}i.push(l),o.type!=="space"&&(s=o.type==="code")}return i},JI=(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,(a,s,o,l)=>{let u=o.replace(/\n\n/g,`
166
+ `)},Ks=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("")},Mo=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(o=>Ks(o));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let o=0;o<t.length;o+=1)s[o]="---";r[i]=`| ${s.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?Ks(o[u]):"";r[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=o.map(u=>Ks(u));r[i]=`| ${l.join(" | ")} |`,i+=1}return r.join(`
167
+ `)},lR=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=b.useState(!1),[o,l]=b.useState(!1),u=b.useRef(null),d=b.useRef(0),{isAnimating:c}=b.useContext(Ft),p=async m=>{var E,k;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 _=(k=u.current)==null?void 0:k.closest('[data-streamdown="table-wrapper"]'),N=_==null?void 0:_.querySelector("table");if(!N){r==null||r(new Error("Table not found"));return}let C=z0(N),F=({csv:$0,tsv:oR,md:Mo}[m]||Mo)(C),H=new ClipboardItem({"text/plain":new Blob([F],{type:"text/plain"}),"text/html":new Blob([N.outerHTML],{type:"text/html"})});await navigator.clipboard.write([H]),l(!0),s(!1),n==null||n(m),d.current=window.setTimeout(()=>l(!1),i)}catch(_){r==null||r(_)}};b.useEffect(()=>{let m=E=>{let k=E.composedPath();u.current&&!k.includes(u.current)&&s(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m),window.clearTimeout(d.current)}},[]);let h=o?Vl:Wl;return g.jsxs("div",{className:"relative",ref:u,children:[g.jsx("button",{className:ce("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??g.jsx(h,{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:()=>p("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:()=>p("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:()=>p("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},uR=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=b.useState(!1),s=b.useRef(null),{isAnimating:o}=b.useContext(Ft),l=u=>{var d;try{let c=(d=s.current)==null?void 0:d.closest('[data-streamdown="table-wrapper"]'),p=c==null?void 0:c.querySelector("table");if(!p){r==null||r(new Error("Table not found"));return}let h=z0(p),m=u==="csv"?$0(h):Mo(h);_r(`table.${u==="csv"?"csv":"md"}`,m,u==="csv"?"text/csv":"text/markdown"),a(!1),n==null||n(u)}catch(c){r==null||r(c)}};return b.useEffect(()=>{let u=d=>{let c=d.composedPath();s.current&&!c.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[]),g.jsxs("div",{className:"relative",ref:s,children:[g.jsx("button",{className:ce("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>a(!i),title:"Download table",type:"button",children:e??g.jsx(fs,{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]})},cR=({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(lR,{}),g.jsx(uR,{})]}):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:ce("w-full divide-y divide-border",t),"data-streamdown":"table",...r,children:e})})]}),dR=b.lazy(()=>bi(()=>Promise.resolve().then(()=>zv),void 0).then(e=>({default:e.Mermaid}))),fR=/language-([^\s]+)/;function hs(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,a=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)===(a==null?void 0:a.line)&&(i==null?void 0:i.column)===(a==null?void 0:a.column)}function Me(e,t){return e.className===t.className&&hs(e.node,t.node)}var Bo=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,sa=(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},ql=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:ce("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>Me(e,t));ql.displayName="MarkdownOl";var V0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:ce("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&hs(e.node,t.node));V0.displayName="MarkdownLi";var W0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:ce("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>Me(e,t));W0.displayName="MarkdownUl";var Y0=b.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:ce("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>Me(e,t));Y0.displayName="MarkdownHr";var q0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:ce("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>Me(e,t));q0.displayName="MarkdownStrong";var hR=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=b.useContext(Ft),[s,o]=b.useState(!1),l=n==="streamdown:incomplete-link",u=b.useCallback(async h=>{if(!(!(a!=null&&a.enabled&&n)||l)){if(h.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[a,n,l]),d=b.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),c=b.useCallback(()=>{o(!1)},[]),p={url:n??"",isOpen:s,onClose:c,onConfirm:d};return a!=null&&a.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:ce("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:u,type:"button",children:e}),a.renderModal?a.renderModal(p):g.jsx(tR,{...p})]}):g.jsx("a",{className:ce("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},G0=b.memo(hR,(e,t)=>Me(e,t)&&e.href===t.href);G0.displayName="MarkdownA";var K0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:ce("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>Me(e,t));K0.displayName="MarkdownH1";var X0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:ce("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>Me(e,t));X0.displayName="MarkdownH2";var Q0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:ce("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>Me(e,t));Q0.displayName="MarkdownH3";var J0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:ce("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>Me(e,t));J0.displayName="MarkdownH4";var Z0=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:ce("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>Me(e,t));Z0.displayName="MarkdownH5";var em=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:ce("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>Me(e,t));em.displayName="MarkdownH6";var tm=b.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=b.useContext(Ft),a=Bo(i,"table");return g.jsx(cR,{className:t,showControls:a,...r,children:e})},(e,t)=>Me(e,t));tm.displayName="MarkdownTable";var nm=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:ce("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>Me(e,t));nm.displayName="MarkdownThead";var rm=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:ce("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>Me(e,t));rm.displayName="MarkdownTbody";var im=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:ce("border-border",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>Me(e,t));im.displayName="MarkdownTr";var am=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:ce("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>Me(e,t));am.displayName="MarkdownTh";var sm=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:ce("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>Me(e,t));sm.displayName="MarkdownTd";var om=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:ce("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>Me(e,t));om.displayName="MarkdownBlockquote";var lm=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:ce("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>Me(e,t));lm.displayName="MarkdownSup";var um=b.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:ce("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>Me(e,t));um.displayName="MarkdownSub";var cm=b.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var o,l;if(!b.isValidElement(s))return!1;let u=Array.isArray(s.props.children)?s.props.children:[s.props.children],d=!1,c=!1;for(let p of u)if(p){if(typeof p=="string")p.trim()!==""&&(d=!0);else if(b.isValidElement(p))if(((o=p.props)==null?void 0:o["data-footnote-backref"])!==void 0)c=!0;else{let h=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let m of h){if(typeof m=="string"&&m.trim()!==""){d=!0;break}if(b.isValidElement(m)&&((l=m.props)==null?void 0:l["data-footnote-backref"])===void 0){d=!0;break}}}}return c&&!d},a=Array.isArray(e)?e.map(s=>{if(!b.isValidElement(s))return s;if(s.type===ql){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(l=>!i(l));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?g.jsx("section",{className:t,...r,children:a}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>Me(e,t));cm.displayName="MarkdownSection";var pR=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:o}=b.useContext(Ft),l=Yl(),u=PI();if(a)return g.jsx("code",{className:ce("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(fR),c=(i=d==null?void 0:d.at(1))!=null?i:"",p="";if(b.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?p=n.props.children:typeof n=="string"&&(p=n),c==="mermaid"&&l){let m=Bo(o,"mermaid"),E=sa(o,"download"),k=sa(o,"copy"),_=sa(o,"fullscreen"),N=sa(o,"panZoom"),C=m&&(E||k||_);return g.jsx(b.Suspense,{fallback:g.jsx(XI,{}),children:g.jsxs("div",{className:ce("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"})}),C?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(rR,{chart:p,config:s==null?void 0:s.config}):null,k?g.jsx(sd,{code:p}):null,_?g.jsx(sR,{chart:p,config:s==null?void 0:s.config}):null]})}):null,g.jsx("div",{className:"rounded-md border border-border bg-background",children:g.jsx(dR,{chart:p,config:s==null?void 0:s.config,showControls:N})})]})})}let h=Bo(o,"code");return g.jsx($I,{className:t,code:p,isIncomplete:u,language:c,children:h?g.jsxs(g.Fragment,{children:[g.jsx(KI,{code:p,language:c}),g.jsx(sd,{})]}):null})},dm=b.memo(pR,(e,t)=>e.className===t.className&&hs(e.node,t.node));dm.displayName="MarkdownCode";var fm=b.memo(JI,(e,t)=>e.className===t.className&&hs(e.node,t.node));fm.displayName="MarkdownImg";var hm=b.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&b.isValidElement(r[0])){let i=r[0].props.node,a=i==null?void 0:i.tagName;if(a==="img")return g.jsx(g.Fragment,{children:e});if(a==="code"&&"data-block"in r[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{...n,children:e})},(e,t)=>Me(e,t));hm.displayName="MarkdownParagraph";var mR={ol:ql,li:V0,ul:W0,hr:Y0,strong:q0,a:G0,h1:K0,h2:X0,h3:Q0,h4:J0,h5:Z0,h6:em,table:tm,thead:nm,tbody:rm,tr:im,th:am,td:sm,blockquote:om,code:dm,img:fm,pre:({children:e})=>b.isValidElement(e)?b.cloneElement(e,{"data-block":"true"}):e,sup:lm,sub:um,p:hm,section:cm},gR=/^[ \t]{0,3}(`{3,}|~{3,})/,bR=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,ld=e=>{let t=e.split(`
168
+ `),n=null,r=0;for(let i of t){let a=gR.exec(i);if(n===null){if(a){let s=a[1];n=s[0],r=s.length}}else if(a){let s=a[1],o=s[0],l=s.length;o===n&&l>=r&&(n=null,r=0)}}return n!==null},ER=e=>{let t=e.split(`
169
+ `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&bR.test(r))return!0}return!1},TR=()=>e=>{Ln(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},ud=[],cd={allowDangerousHtml:!0},oa=new WeakMap,yR=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 a=d=>{if(!d||d.length===0)return"";let c="";for(let p=0;p<d.length;p+=1){let h=d[p];if(p>0&&(c+=","),Array.isArray(h)){let[m,E]=h;if(typeof m=="function"){let k=oa.get(m);k||(k=m.name,oa.set(m,k)),c+=k}else c+=String(m);c+=":",c+=JSON.stringify(E)}else if(typeof h=="function"){let m=oa.get(h);m||(m=h.name,oa.set(h,m)),c+=m}else c+=String(h)}return c},s=a(n),o=a(r),l=i?JSON.stringify(i):"",u=`${o}::${s}::${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()}},dd=new yR,pm=e=>{let t=xR(e),n=e.children||"";return NR(t.runSync(t.parse(n),n),e)},xR=e=>{let t=dd.get(e);if(t)return t;let n=kR(e);return dd.set(e,n),n},_R=e=>e.some(t=>Array.isArray(t)?t[0]===ko:t===ko),kR=e=>{let t=e.rehypePlugins||ud,n=e.remarkPlugins||ud,r=_R(t)?n:[...n,TR],i=e.remarkRehypeOptions?{...cd,...e.remarkRehypeOptions}:cd;return RN().use(I3).use(r).use(dN,i).use(t)},AR=e=>e,wR=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},CR=(e,t)=>{var n;for(let r in Us)if(Object.hasOwn(Us,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Us[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},SR=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},NR=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:o}=t;if(n||r||i||a||o){let l=o||AR;Ln(e,(u,d,c)=>{if(u.type==="raw"&&c&&typeof d=="number")return wR(c,d,a,u.value),d;if(u.type==="element"&&(CR(u,l),SR(u,d,c,r,i,n)&&c&&typeof d=="number"))return s&&u.children?c.children.splice(d,1,...u.children):c.children.splice(d,1),d})}return BS(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},IR=/\[\^[\w-]{1,200}\](?!:)/,RR=/\[\^[\w-]{1,200}\]:/,OR=/<(\w+)[\s>]/,LR=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),fd=new Map,hd=new Map,vR=e=>{let t=e.toLowerCase(),n=fd.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return fd.set(t,r),r},DR=e=>{let t=e.toLowerCase(),n=hd.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return hd.set(t,r),r},pd=(e,t)=>{if(LR.has(t.toLowerCase()))return 0;let n=e.match(vR(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},md=(e,t)=>{let n=e.match(DR(t));return n?n.length:0},PR=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},MR=e=>{let t=IR.test(e),n=RR.test(e);if(t||n)return[e];let r=Pt.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let o of r){let l=o.raw,u=i.length;if(a.length>0){i[u-1]+=l;let d=a.at(-1),c=pd(l,d),p=md(l,d);for(let h=0;h<c;h+=1)a.push(d);for(let h=0;h<p;h+=1)a.length>0&&a.at(-1)===d&&a.pop();continue}if(o.type==="html"&&o.block){let d=l.match(OR);if(d){let c=d[1],p=pd(l,c),h=md(l,c);p>h&&a.push(c)}}if(u>0&&!s){let d=i[u-1];if(PR(d)%2===1){i[u-1]=d+l;continue}}i.push(l),o.type!=="space"&&(s=o.type==="code")}return i},BR=(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,(a,s,o,l)=>{let u=o.replace(/\n\n/g,`
165
170
  <!---->
166
- `);return s+u+l})}return n},ZI=/^[ \t]*<[\w!/?-]/,eO=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,tO=e=>typeof e!="string"||e.length===0||!ZI.test(e)?e:e.replace(eO,"$1"),ud,cd,ba={...li,protocols:{...li.protocols,href:[...(cd=(ud=li.protocols)==null?void 0:ud.href)!=null?cd:[],"tel"]}},Lo={raw:bo,sanitize:[ip,ba],harden:[ZE,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},nO={gfm:[IC,{}]},dd=Object.values(Lo),rO=Object.values(nO),iO={block:" ▋",circle:" ●"},aO={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Bt=b.createContext(aO),X0=b.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,...a})=>{let s=typeof e=="string"&&n?tO(e):e;return g.jsx(E0.Provider,{value:i,children:g.jsx(K0,{...a,children:s})})},(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 a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});X0.displayName="Block";var sO=["github-light","github-dark"],oO=b.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:r=!1,components:i,rehypePlugins:a=dd,remarkPlugins:s=rO,className:o,shikiTheme:l=sO,mermaid:u,controls:d=!0,isAnimating:c=!1,animated:p,BlockComponent:h=X0,parseMarkdownIntoBlocksFn:m=QI,caret:E,plugins:k,remend:_,linkSafety:N={enabled:!0},allowedTags:w,...F})=>{let H=b.useId(),[I,V]=b.useTransition(),U=b.useMemo(()=>w?Object.keys(w):[],[w]),Q=b.useMemo(()=>{if(typeof e!="string")return"";let te=t==="streaming"&&n?Mw(e,_):e;return U.length>0&&(te=JI(te,U)),te},[e,t,n,_,U]),R=b.useMemo(()=>m(Q),[Q,m]),[K,z]=b.useState(R);b.useEffect(()=>{t==="streaming"?V(()=>{z(R)}):z(R)},[R,t]);let y=t==="streaming"?K:R,L=b.useMemo(()=>y.map((te,C)=>`${H}-${C}`),[y.length,H]),v=b.useMemo(()=>p?p===!0?No():No(p):null,[p]),D=b.useMemo(()=>{var te,C;return{shikiTheme:(C=(te=k==null?void 0:k.code)==null?void 0:te.getThemes())!=null?C:l,controls:d,isAnimating:c,mode:t,mermaid:u,linkSafety:N}},[l,d,c,t,u,N,k==null?void 0:k.code]),P=b.useMemo(()=>({...OI,...i}),[i]),q=b.useMemo(()=>{let te=[];return k!=null&&k.cjk&&(te=[...te,...k.cjk.remarkPluginsBefore]),te=[...te,...s],k!=null&&k.cjk&&(te=[...te,...k.cjk.remarkPluginsAfter]),k!=null&&k.math&&(te=[...te,k.math.remarkPlugin]),te},[s,k==null?void 0:k.math,k==null?void 0:k.cjk]),J=b.useMemo(()=>{var te;let C=a;if(w&&Object.keys(w).length>0&&a===dd){let he={...ba,tagNames:[...(te=ba.tagNames)!=null?te:[],...Object.keys(w)],attributes:{...ba.attributes,...w}};C=[Lo.raw,[ip,he],Lo.harden]}return k!=null&&k.math&&(C=[...C,k.math.rehypePlugin]),v&&c&&(C=[...C,v.rehypePlugin]),C},[a,k==null?void 0:k.math,v,c,w]),T=b.useMemo(()=>{if(!c||y.length===0)return!1;let te=y.at(-1);return td(te)||vI(te)},[c,y]),ie=b.useMemo(()=>E&&c&&!T?{"--streamdown-caret":`"${iO[E]}"`}:void 0,[E,c,T]);return t==="static"?g.jsx(Io.Provider,{value:k??null,children:g.jsx(Bt.Provider,{value:D,children:g.jsx("div",{className:ce("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",o),children:g.jsx(K0,{components:P,rehypePlugins:J,remarkPlugins:q,...F,children:Q})})})}):g.jsx(Io.Provider,{value:k??null,children:g.jsx(Bt.Provider,{value:D,children:g.jsxs("div",{className:ce("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",E&&!T?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,o),style:ie,children:[y.length===0&&E&&c&&g.jsx("span",{}),y.map((te,C)=>{let he=C===y.length-1,ue=c&&he&&td(te);return g.jsx(h,{components:P,content:te,index:C,isIncomplete:ue,rehypePlugins:J,remarkPlugins:q,shouldNormalizeHtmlIndentation:r,shouldParseIncompleteMarkdown:n,...F},L[C])})]})})})},(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);oO.displayName="Streamdown";var lO=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let l=b.useRef(null),u=b.useRef(null),[d,c]=b.useState(s),[p,h]=b.useState({x:0,y:0}),[m,E]=b.useState(!1),[k,_]=b.useState({x:0,y:0}),[N,w]=b.useState({x:0,y:0}),F=b.useCallback(z=>{c(y=>Math.max(n,Math.min(r,y+z)))},[n,r]),H=b.useCallback(()=>{F(i)},[F,i]),I=b.useCallback(()=>{F(-i)},[F,i]),V=b.useCallback(()=>{c(s),h({x:0,y:0})},[s]),U=b.useCallback(z=>{z.preventDefault();let y=z.deltaY>0?-i:i;F(y)},[F,i]),Q=b.useCallback(z=>{if(z.button!==0||z.isPrimary===!1)return;E(!0),_({x:z.clientX,y:z.clientY}),w(p);let y=z.currentTarget;y instanceof HTMLElement&&y.setPointerCapture(z.pointerId)},[p]),R=b.useCallback(z=>{if(!m)return;z.preventDefault();let y=z.clientX-k.x,L=z.clientY-k.y;h({x:N.x+y,y:N.y+L})},[m,k,N]),K=b.useCallback(z=>{E(!1);let y=z.currentTarget;y instanceof HTMLElement&&y.releasePointerCapture(z.pointerId)},[]);return b.useEffect(()=>{let z=l.current;if(z)return z.addEventListener("wheel",U,{passive:!1}),()=>{z.removeEventListener("wheel",U)}},[U]),b.useEffect(()=>{let z=u.current;if(z&&m)return document.body.style.userSelect="none",z.addEventListener("pointermove",R,{passive:!1}),z.addEventListener("pointerup",K),z.addEventListener("pointercancel",K),()=>{document.body.style.userSelect="",z.removeEventListener("pointermove",R),z.removeEventListener("pointerup",K),z.removeEventListener("pointercancel",K)}},[m,R,K]),g.jsxs("div",{className:ce("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:l,style:{cursor:m?"grabbing":"grab"},children:[a?g.jsxs("div",{className:ce("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:H,title:"Zoom in",type:"button",children:g.jsx(lI,{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:I,title:"Zoom out",type:"button",children:g.jsx(uI,{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:V,title:"Reset zoom and pan",type:"button",children:g.jsx(oI,{size:16})})]}):null,g.jsx("div",{className:ce("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:Q,ref:u,role:"application",style:{transform:`translate(${p.x}px, ${p.y}px) scale(${d})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Q0=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=b.useState(null),[o,l]=b.useState(!1),[u,d]=b.useState(""),[c,p]=b.useState(""),[h,m]=b.useState(0),{mermaid:E}=b.useContext(Bt),k=Ul(),_=E==null?void 0:E.errorComponent,{shouldRender:N,containerRef:w}=jN({immediate:r});if(b.useEffect(()=>{if(N){if(!k){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),l(!0);let H=k.getMermaid(n),I=e.split("").reduce((Q,R)=>(Q<<5)-Q+R.charCodeAt(0)|0,0),V=`mermaid-${Math.abs(I)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:U}=await H.render(V,e);d(U),p(U)}catch(H){if(!(c||u)){let I=H instanceof Error?H.message:"Failed to render Mermaid chart";s(I)}}finally{l(!1)}})()}},[e,n,h,N,k]),!(N||u||c))return g.jsx("div",{className:ce("my-4 min-h-[200px]",t),ref:w});if(o&&!u&&!c)return g.jsx("div",{className:ce("my-4 flex justify-center p-4",t),ref:w,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(a&&!u&&!c){let H=()=>m(I=>I+1);return _?g.jsx("div",{ref:w,children:g.jsx(_,{chart:e,error:a,retry:H})}):g.jsxs("div",{className:ce("rounded-md bg-red-50 p-4",t),ref:w,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),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 F=u||c;return g.jsx("div",{className:ce("size-full",t),"data-streamdown":"mermaid",ref:w,children:g.jsx(lO,{className:ce(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:ce("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:F},role:"img"})})})};const uO=40,cO=8,pr=56,Ma=8,_i=2,In=24,ls=24,jv=8,dO=()=>{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},zl={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},fd=e=>(e.timelineWidth-e.scrollbarWidth)/e.root.duration,$l=b.createContext({state:zl,dispatch:()=>{}});$l.displayName="TraceViewerContext";const Be=(e,t)=>{var n;switch(t.type){case"setRoot":return e.scrollSnapshotRef.current=void 0,e.memoCacheRef.current.clear(),Be({...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-pr-uO-3*cO,i=e.withPanel&&t.width<=768;let a={...e,width:t.width,height:t.height,timelineWidth:t.width-+!!(e.selected&&e.withPanel&&!i)*e.panelWidth,timelineHeight:r,panelHeight:r,isMobile:i};return a.width!==e.width&&(a=Be(a,{type:"detectBaseScale"})),a}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 Be({...e,timelineWidth:i,panelWidth:r},{type:"detectBaseScale"})}case"setFilter":return{...e,filter:t.filter};case"deselect":return Be({...e,selected:null,timelineWidth:e.width},{type:"detectBaseScale"});case"select":{const r=e.spanMap[t.id];return r?Be({...e,selected:r,timelineWidth:e.width-(e.withPanel&&!e.isMobile?e.panelWidth:0)},{type:"detectBaseScale"}):e}case"escape":return e.selected?Be(e,{type:"deselect"}):Be(e,{type:"resetScale"});case"toggleSelection":{let r=e;return e.selected&&(r=Be(r,{type:"deselect"})),((n=e.selected)==null?void 0:n.span.spanId)===t.id?r:Be(r,{type:"select",id:t.id})}case"detectBaseScale":{const r=(e.timelineWidth-e.scrollbarWidth)/e.root.duration;return Be({...e,baseScale:r,scale:r*e.scaleRatio},{type:"minScale"})}case"setScale":return{...e,scaleRatio:t.scale,scale:e.baseScale*t.scale};case"resetScale":return Be(e,{type:"scaleToRange",t1:e.root.startTime,t2:e.root.endTime});case"scaleToNode":{const r=e.spanMap[t.id];return r?Be(Be(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 Be(Be(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:a,scrollLeft:s}=i;return Be(Be({...e,scaleRatio:r,scale:e.baseScale*r},{type:"minScale"}),{type:"setScrollSnapshot",anchorT:(s+a*.5)/e.scale,anchorX:a*.5})}case"trackpadScale":{const r=fd(e)/e.baseScale,i=Math.max(r,e.scaleRatio*(1+.2*Math.sign(t.delta)*Math.sqrt(Math.abs(t.delta))));return Be({...e,scaleRatio:i,scale:e.baseScale*i},{type:"setScrollSnapshot",anchorT:t.anchorT,anchorX:t.anchorX})}case"minScale":{const r=fd(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:a}=t,s=i*e.scale-a,{scrollTop:o}=r,l=(o-ls-Ma)/(In+_i),u=l+Math.ceil(e.timelineHeight/(In+_i));return e.scrollSnapshotRef.current={anchorT:i,anchorX:a,scrollLeft:s,scrollTop:o,startTime:e.root.startTime+s/e.scale,endTime:e.root.startTime+(s+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 Be({...e,withPanel:t.withPanel,timelineWidth:r},{type:"detectBaseScale"})}case"forceRender":return e.memoCacheRef.current.set("",{}),{...e};case"updateRoot":return e.memoCacheRef.current.set("",{}),Be({...e,root:t.root,spanMap:t.spanMap,resourceMap:Object.fromEntries(t.resources.map(({name:r,attributes:i})=>[r,i]))},{type:"detectBaseScale"})}};function zv({getQuickLinks:e,withPanel:t=!1,children:n,customSpanClassNameFunc:r,customSpanEventClassNameFunc:i,customPanelComponent:a=null}){const s=b.useRef(null),o=b.useRef(void 0),l=b.useRef(e);l.current=e;const u=b.useRef(new Map),d=b.useRef(new Map),[c,p]=b.useReducer(Be,zl,m=>({...m,scrollbarWidth:dO(),timelineRef:s,scrollSnapshotRef:o,customSpanClassNameFunc:r,customSpanEventClassNameFunc:i,memoCacheRef:u,withPanel:t,getQuickLinks:E=>{var w;const k=E.spanId,_=d.current.get(k);if(_)return _;const N=((w=l.current)==null?void 0:w.call(l,E))||[];return d.current.set(k,N),N}}));b.useEffect(()=>p({type:"setWithPanel",withPanel:t}),[t]);const h=b.useMemo(()=>({state:c,dispatch:p}),[c,p]);return g.jsx(J0.Provider,{value:a,children:g.jsx($l.Provider,{value:h,children:n})})}const us=()=>b.useContext($l),J0=b.createContext(null),fO=()=>b.useContext(J0),hO="_traceNode_1fmf2_1",pO="_childRow_1fmf2_5",mO="_spanNode_1fmf2_11",gO="_huge_1fmf2_31",bO="_spanName_1fmf2_34",EO="_spanSpacer_1fmf2_40",TO="_spanDuration_1fmf2_44",xO="_small_1fmf2_62",yO="_xHover_1fmf2_62",_O="_spanNodeEvent_1fmf2_118",kO="_eventDiamond_1fmf2_124",AO="_customEventColor_1fmf2_140",CO="_hoverInfo_1fmf2_145",wO="_eventName_1fmf2_149",SO="_eventTimestamp_1fmf2_153",NO="_alignStart_1fmf2_174",IO="_alignEnd_1fmf2_178",OO="_colorVercel_1fmf2_205",RO="_color0_1fmf2_213",LO="_color1_1fmf2_220",vO="_color2_1fmf2_227",DO="_color3_1fmf2_234",PO="_color4_1fmf2_241",MO="_colorHighlight_1fmf2_248",BO="_unlit_1fmf2_256",FO="_mapContainer_1fmf2_262",HO="_spanDetailPanel_1fmf2_329",UO="_spanDetailPanelResizer_1fmf2_338",jO="_spanDetailPanelTop_1fmf2_353",zO="_spanDetailPanelBody_1fmf2_362",$O="_spanDetailPanelTopInfo_1fmf2_375",VO="_spanNameDetailPanel_1fmf2_389",WO="_spanDetailPanelTruncatedHeading_1fmf2_395",YO="_spanDetailPanelName_1fmf2_405",qO="_spanDetailPanelDuration_1fmf2_416",GO="_spanDetailPanelCorner_1fmf2_427",KO="_spanDetailPanelCornerInner_1fmf2_437",XO="_spanDetailPanelCloseVerticalRule_1fmf2_445",QO="_spanDetailPanelClose_1fmf2_445",JO="_spanDetailPanelAttribute_1fmf2_467",ZO="_spanDetailPanelAttributeKey_1fmf2_484",eR="_spanDetailPanelAttributeValue_1fmf2_492",tR="_spanDetailPanelQuickLink_1fmf2_503",nR="_spanDetailPanelQuickLinkLabel_1fmf2_506",rR="_detailGroup_1fmf2_519",iR="_expanded_1fmf2_533",aR="_collapsed_1fmf2_534",sR="_ancestorGroup_1fmf2_535",oR="_detailHeading_1fmf2_539",lR="_buttonLink_1fmf2_562",uR="_note_1fmf2_581",cR="_skeleton_1fmf2_589",dR="_skeletonRounded_1fmf2_595",fR="_detailHeadingIcon_1fmf2_599",hR="_infraSpanDescription_1fmf2_603",pR="_ancestorNode_1fmf2_613",mR="_ancestorText_1fmf2_629",gR="_ancestorName_1fmf2_639",bR="_ancestorDuration_1fmf2_644",ER="_ancestorLineContainer_1fmf2_649",TR="_ancestorLine_1fmf2_649",xR="_zoomButtonGroup_1fmf2_701",yR="_zoomButton_1fmf2_701",_R="_divider_1fmf2_751",kR="_markersContainer_1fmf2_758",AR="_markers_1fmf2_758",CR="_marker_1fmf2_758",wR="_notch_1fmf2_792",SR="_markerLabel_1fmf2_798",NR="_markerClockTime_1fmf2_807",IR="_eventMarkersContainer_1fmf2_816",OR="_eventMarkers_1fmf2_816",RR="_eventMarker_1fmf2_816",LR="_cursorMarkerStickyParent_1fmf2_839",vR="_cursorMarkerLabelContainer_1fmf2_848",DR="_cursorMarkerLabel_1fmf2_848",PR="_cursorMarkerContainer_1fmf2_898",MR="_cursorMarker_1fmf2_839",BR="_cursorSelection_1fmf2_916",FR="_traceViewer_1fmf2_966",HR="_mapCanvas_1fmf2_972",UR="_zoomButtonTraceViewer_1fmf2_988",jR="_timeline_1fmf2_1011",zR="_searchBar_1fmf2_1019",$R="_searchInput_1fmf2_1031",VR="_searchInputLabel_1fmf2_1038",WR="_searchInputPrefix_1fmf2_1063",YR="_mapThumb_1fmf2_1101",qR="_spanDetailPanelTraceViewer_1fmf2_1115",GR="_traceViewerContent_1fmf2_1134",KR="_inert_1fmf2_1144",XR="_hidden_1fmf2_1180",QR="_mobile_1fmf2_1184",JR="_spanRunning_1fmf2_1194",ZR="_spanPending_1fmf2_1195",e6="_spanCompleted_1fmf2_1203",t6="_spanCancelled_1fmf2_1211",n6="_spanFailed_1fmf2_1219",r6="_spanPendingStriped_1fmf2_1228",i6="_hasQueuedTime_1fmf2_1242",a6="_spanSleep_1fmf2_1254",s6="_spanHook_1fmf2_1263",o6="_segmentLayer_1fmf2_1275",l6="_segment_1fmf2_1275",u6="_segmentLabel_1fmf2_1291",c6="_segmentTag_1fmf2_1306",d6="_segQueued_1fmf2_1314",f6="_segRunning_1fmf2_1325",h6="_segFailed_1fmf2_1330",p6="_segRetrying_1fmf2_1335",m6="_segSucceeded_1fmf2_1346",g6="_segWaiting_1fmf2_1351",b6="_segSleeping_1fmf2_1362",E6="_segReceived_1fmf2_1367",T6="_boundaryMarker_1fmf2_1372",x6="_boundaryLine_1fmf2_1373",y6="_hasSegments_1fmf2_1395",_6="_eventFailed_1fmf2_1432",k6="_eventRetrying_1fmf2_1441",A6="_eventHook_1fmf2_1450",C6="_eventDefault_1fmf2_1459",re={traceNode:hO,childRow:pO,spanNode:mO,huge:gO,spanName:bO,spanSpacer:EO,spanDuration:TO,small:xO,xHover:yO,spanNodeEvent:_O,eventDiamond:kO,customEventColor:AO,hoverInfo:CO,eventName:wO,eventTimestamp:SO,alignStart:NO,alignEnd:IO,colorVercel:OO,color0:RO,color1:LO,color2:vO,color3:DO,color4:PO,colorHighlight:MO,unlit:BO,mapContainer:FO,spanDetailPanel:HO,spanDetailPanelResizer:UO,spanDetailPanelTop:jO,spanDetailPanelBody:zO,spanDetailPanelTopInfo:$O,spanNameDetailPanel:VO,spanDetailPanelTruncatedHeading:WO,spanDetailPanelName:YO,spanDetailPanelDuration:qO,spanDetailPanelCorner:GO,spanDetailPanelCornerInner:KO,spanDetailPanelCloseVerticalRule:XO,spanDetailPanelClose:QO,spanDetailPanelAttribute:JO,spanDetailPanelAttributeKey:ZO,spanDetailPanelAttributeValue:eR,spanDetailPanelQuickLink:tR,spanDetailPanelQuickLinkLabel:nR,detailGroup:rR,expanded:iR,collapsed:aR,ancestorGroup:sR,detailHeading:oR,buttonLink:lR,note:uR,skeleton:cR,skeletonRounded:dR,detailHeadingIcon:fR,infraSpanDescription:hR,ancestorNode:pR,ancestorText:mR,ancestorName:gR,ancestorDuration:bR,ancestorLineContainer:ER,ancestorLine:TR,zoomButtonGroup:xR,"zoom-buttons-fade-in":"_zoom-buttons-fade-in_1fmf2_1",zoomButton:yR,divider:_R,markersContainer:kR,markers:AR,marker:CR,notch:wR,markerLabel:SR,markerClockTime:NR,eventMarkersContainer:IR,eventMarkers:OR,eventMarker:RR,cursorMarkerStickyParent:LR,cursorMarkerLabelContainer:vR,cursorMarkerLabel:DR,cursorMarkerContainer:PR,cursorMarker:MR,cursorSelection:BR,traceViewer:FR,"span-skeleton":"_span-skeleton_1fmf2_1",mapCanvas:HR,zoomButtonTraceViewer:UR,timeline:jR,searchBar:zR,searchInput:$R,searchInputLabel:VR,searchInputPrefix:WR,mapThumb:YR,spanDetailPanelTraceViewer:qR,traceViewerContent:GR,inert:KR,hidden:XR,mobile:QR,spanRunning:JR,spanPending:ZR,spanCompleted:e6,spanCancelled:t6,spanFailed:n6,spanPendingStriped:r6,hasQueuedTime:i6,spanSleep:a6,spanHook:s6,segmentLayer:o6,segment:l6,segmentLabel:u6,segmentTag:c6,segQueued:d6,segRunning:f6,segFailed:h6,segRetrying:p6,segSucceeded:m6,segWaiting:g6,segSleeping:b6,segReceived:E6,boundaryMarker:T6,boundaryLine:x6,hasSegments:y6,eventFailed:_6,eventRetrying:k6,eventHook:A6,eventDefault:C6};function ra([e,t]){return e*1e3+t/1e6}function $v(e){return[Math.floor(e/1e3),e%1e3*1e3]}const Vv=e=>It(e,!0),hd=new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2});function Wv(e){return e>=1e3?`${hd.format(e/1e3)}s`:`${hd.format(e)}ms`}function Yv(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"),a=String(t.getMilliseconds()).padStart(3,"0");return`${n}:${r}:${i}.${a}`}const w6={queued:"segQueued",running:"segRunning",failed:"segFailed",retrying:"segRetrying",succeeded:"segSucceeded",waiting:"segWaiting",sleeping:"segSleeping",received:"segReceived"};function S6(e){return Math.max(0,Math.min(1,e))}function nn(e,t,n){return n<=0?0:S6((e-t)/n)}function Bi(e){return[...e].sort((t,n)=>t.timestamp-n.timestamp)}function N6(e){const t=e.events?Bi(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const a=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(a.length===0)return i.push({startFraction:0,endFraction:1,status:"running"}),i;const s=a[0],o=nn(s.time,n,r);o>.001&&i.push({startFraction:0,endFraction:o,status:"queued"});for(let l=0;l<a.length;l++){const u=a[l],d=nn(u.time,n,r),c=a[l+1],p=c?nn(c.time,n,r):1;if(u.type==="step_started")if(l===a.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:p,status:E})}else u.type==="step_retrying"?i.push({startFraction:d,endFraction:p,status:"retrying"}):u.type==="step_failed"?d<.999&&i.push({startFraction:d,endFraction:1,status:"failed"}):u.type}return i}function I6(e){const t=e.events?Bi(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const a=t.find(u=>u.event.name==="hook_received"),s=t.find(u=>u.event.name==="hook_disposed");if(!a&&!s)return i.push({startFraction:0,endFraction:1,status:"waiting"}),i;const o=a?nn(a.timestamp,n,r):null,l=s?nn(s.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 O6(e){const t=e.events?Bi(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const a=t.find(o=>o.event.name==="wait_completed");if(!a)return i.push({startFraction:0,endFraction:1,status:"sleeping"}),i;const s=nn(a.timestamp,n,r);return s>.001&&i.push({startFraction:0,endFraction:s,status:"sleeping"}),i.push({startFraction:s,endFraction:1,status:"succeeded"}),i}function R6(e){const t=e.events?Bi(e.events):[],{startTime:n,duration:r,activeStartTime:i}=e,a=[];if(r<=0)return a;const s=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=nn(i,n,r);u>.001&&(a.push({startFraction:0,endFraction:u,status:"queued"}),l=u)}if(s){const u=nn(s.timestamp,n,r);u>l+.001&&a.push({startFraction:l,endFraction:u,status:"running"}),a.push({startFraction:u,endFraction:1,status:"failed"})}else if(o){const u=nn(o.timestamp,n,r);u>l+.001&&a.push({startFraction:l,endFraction:u,status:"running"}),a.push({startFraction:u,endFraction:1,status:"succeeded"})}else a.push({startFraction:l,endFraction:1,status:"running"});return a}const L6={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 ia(e,t){const n=e.events?Bi(e.events):[],{startTime:r,duration:i}=e;if(i<=0)return[];const a=[];for(const s of n){if(!t.includes(s.event.name))continue;const o=nn(s.timestamp,r,i);o<.01||o>.99||a.push({fraction:o,label:L6[s.event.name]??s.event.name,offsetMs:s.timestamp-r})}return a}function Z0(e,t){switch(e){case"step":return{segments:N6(t),boundaries:ia(t,["step_started","step_retrying","step_failed","step_completed"])};case"hook":return{segments:I6(t),boundaries:ia(t,["hook_created","hook_received","hook_disposed"])};case"sleep":return{segments:O6(t),boundaries:ia(t,["wait_created","wait_completed"])};case"run":return{segments:R6(t),boundaries:ia(t,["run_completed","run_failed"])};default:return{segments:[],boundaries:[]}}}function v6(e){return e.isInstrumentationHint?"Get Started":It(e.duration)}const em={queued:"Queued",running:"",failed:"Failed",retrying:"Retry wait",succeeded:"Executed",waiting:"Waiting",sleeping:"Sleeping",received:"Received"};function D6({segments:e,spanDuration:t}){return e.length===0?null:g.jsx("div",{className:re.segmentLayer,children:e.map((n,r)=>{const i=re[w6[n.status]],a=(n.endFraction-n.startFraction)*t,s=em[n.status],o={left:`${n.startFraction*100}%`,width:`${(n.endFraction-n.startFraction)*100}%`};return g.jsx("div",{className:`${re.segment} ${String(i)}`,style:o,title:s?`${s} ${It(a)}`:It(a)},`seg-${n.status}-${String(r)}`)})})}function P6(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r],a=em[i.status];if(!a)continue;let s=(i.endFraction-i.startFraction)*t;if(s<1&&(i.status==="succeeded"||i.status==="failed")&&r>0){const o=e[r-1];o.status==="running"&&(s=(o.endFraction-o.startFraction)*t)}s<1||n.push({label:a,duration:It(s)})}return n}function tm({node:e,layout:t,durationMs:n,segmentTags:r}){const i=e.isInstrumentationHint?v6(e):It(n??e.duration);if(t.isSmall&&!t.isHovered)return null;const a=r&&r.length>0&&(t.isHovered||t.width>200);return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:re.spanName,children:[e.label||e.span.name,a?r.map((s,o)=>g.jsxs("span",{className:re.segmentTag,children:[" · ",s.label," ",s.duration]},o)):null]}),t.isHuge?g.jsx("span",{className:re.spanSpacer}):null,t.isHovered||t.width>128?g.jsx("span",{className:re.spanDuration,children:i}):null]})}function M6({node:e,layout:t}){return g.jsx(tm,{node:e,layout:t})}function cs({resourceType:e,node:t,layout:n,durationMs:r}){const i=r??t.duration,{segments:a}=Z0(e,t),s=P6(a,i);return g.jsxs(g.Fragment,{children:[g.jsx(D6,{segments:a,spanDuration:i}),g.jsx(tm,{durationMs:i,node:t,layout:n,segmentTags:s})]})}function B6(e){return g.jsx(cs,{resourceType:"run",...e})}function F6(e){return g.jsx(cs,{resourceType:"step",...e})}function H6(e){return g.jsx(cs,{resourceType:"hook",...e})}function U6(e){return g.jsx(cs,{resourceType:"sleep",...e})}function j6({resourceType:e,...t}){switch(e){case"run":return g.jsx(B6,{...t});case"step":return g.jsx(F6,{...t});case"hook":return g.jsx(H6,{...t});case"sleep":return g.jsx(U6,{...t});default:return g.jsx(M6,{...t})}}const z6=4;function $6(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 V6(e){return e<64}function W6(e){return e>=500}function Y6(e,t){return e.isHovered&&!t&&e.isHighlighted!==!1}function q6(e,t,n,r){if(!r)return!1;let i=t.duration,a=t.endTime;const s=n.current;return s&&(i=s.endTime-s.startTime,a=s.endTime),a-e.startTime<.25*i}function Fi(e,t,n,r){const i=(e.startTime-t.startTime)*n;let a=ls+(In+_i)*e.row;const s=e.duration*n,o=Math.max(s,z6);let l=In;const u=W6(s),d=V6(s),c=Y6(e,u),p=c||!!e.isSelected;d&&!p&&(l*=.4,a+=(In-l)*.5);const h=q6(e,t,r,p);return{width:o,actualWidth:s,height:l,top:a,left:i,isSmall:d,isHuge:u,isHovered:c,isExpanded:p,isNearRightSide:h}}function G6(e,t,n,r){return Fi(e,t,n,r)}function K6(e,t,n,r){return Fi(e,t,n,r)}function X6(e,t,n,r){return Fi(e,t,n,r)}function Q6(e,t,n,r){return Fi(e,t,n,r)}function J6(e,t,n,r,i){switch(e){case"run":return G6(t,n,r,i);case"step":return K6(t,n,r,i);case"hook":return X6(t,n,r,i);case"sleep":return Q6(t,n,r,i);default:return Fi(t,n,r,i)}}const Vl=e=>e.isVercel?String(re.colorVercel):String(re[`color${e.resourceIndex%5}`]);function Z6(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 qv=b.memo(function({root:t,scale:n,spans:r,isLive:i=!1,scrollSnapshotRef:a,cache:s,customSpanClassNameFunc:o,customSpanEventClassNameFunc:l}){return r.map(u=>g.jsx(tL,{cacheKey:s.get(u.span.spanId),customSpanEventClassNameFunc:l,customSpanClassNameFunc:o,node:u,root:t,scale:n,traceIsLive:i,scrollSnapshotRef:a},u.span.spanId))});function eL(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 tL=b.memo(function({node:t,root:n,scale:r,traceIsLive:i=!1,scrollSnapshotRef:a,customSpanClassNameFunc:s,customSpanEventClassNameFunc:o}){var D;const l=b.useRef(null);b.useEffect(()=>(t.ref=l,()=>{t.ref=void 0}),[t]);const{span:u}=t,d=$6(t),[c,p]=b.useState(0),h=s?s(t):"",m=d!=="default",E=(D=u.attributes)==null?void 0:D.data,k=Z6(d,t),_=k!=null,w=(d==="hook"?!!(E!=null&&E.disposedAt):!!(E!=null&&E.completedAt))||_,F=i&&m&&!w;b.useEffect(()=>{if(!F)return;p(Date.now());const P=setInterval(()=>{p(Date.now())},250);return()=>clearInterval(P)},[F]);const H=ra(u.startTime),I=ra(u.endTime),V=ra(u.duration),U=u.activeStartTime?ra(u.activeStartTime):void 0,Q=k!=null?Math.max(0,k-H):F?Math.max(0,(c||Date.now())-H):V,R=t.isInstrumentationHint?"Get Started":It(Q),K={...t,startTime:H,endTime:I,duration:V,activeStartTime:U},z=F?{...K,duration:Q,endTime:H+Q}:K,y=m&&Z0(d,z).segments.length>0,L=J6(d,z,n,r,a);if(F){const q=Q*r,J=Math.max(q,4);L.actualWidth=q,L.width=J,L.isSmall=q<64,L.isHuge=q>=500,L.isSmall||(L.height=In,L.top=ls+(In+_i)*z.row)}b.useEffect(()=>{if(!F||!l.current)return;let P=0;const q=()=>{const J=l.current;if(!J)return;const T=Date.now()-H,ie=Math.max(T*r,2);J.style.width=`${ie}px`,J.style.setProperty("--span-width",`${ie}px`),P=requestAnimationFrame(q)};return P=requestAnimationFrame(q),()=>cancelAnimationFrame(P)},[F,H,r]);const v=z;return g.jsxs(g.Fragment,{children:[g.jsx("button",{"aria-label":`${u.name} - ${R}`,className:it(re.spanNode,L.isHuge&&re.huge,L.isSmall&&re.small,L.isExpanded&&re.xHover,t.isHighlighted?re.colorHighlight:Vl(t),t.isHighlighted===!1&&re.unlit,h,y&&re.hasSegments),"data-span-id":u.spanId,"data-start-time":z.startTime-n.startTime,"data-right-side":L.isNearRightSide,"data-selected":t.isSelected?"":void 0,ref:l,style:eL(L,z,n,r),type:"button",children:g.jsx(j6,{durationMs:Q,resourceType:d,node:v,layout:L})}),z.events&&!L.isSmall?z.events.map(P=>g.jsx(rL,{customSpanEventClassNameFunc:o,event:P,node:z,root:n,scale:r,asBoundary:m},P.key)):null]})}),nL={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"},rL=b.memo(function({event:t,node:n,root:r,scale:i,customSpanEventClassNameFunc:a,asBoundary:s=!1}){const o=b.useRef(null);b.useEffect(()=>(t.ref=o,()=>{t.ref=void 0}),[t]);const{event:{name:l}}=t,u=It(t.timestamp-r.startTime),d=s?nL[l]??l:l,c=s&&(l==="step_started"||l==="run_started"||l==="step_retrying"),p=s&&(l==="step_completed"||l==="run_completed");let h=null,m=null;if((c||p)&&n.events){const w=[...n.events].sort((H,I)=>H.timestamp-I.timestamp),F=w.findIndex(H=>H.key===t.key);if(p){let H=null;for(let I=F-1;I>=0;I--)if(w[I].event.name==="step_started"){H=w[I].timestamp;break}H!==null&&(h=It(t.timestamp-H),m="Executed")}else{const H=w[F+1],I=H?H.timestamp:n.endTime;h=It(I-t.timestamp),m=l==="step_retrying"?"Waited":"Executed"}}const E=(t.timestamp-r.startTime)*i,k=ls+(In+_i)*n.row,_=n.duration<=0||(t.timestamp-n.startTime)/n.duration<.5,N=a?a(t):"";return g.jsxs("div",{title:h?`${d} ${u}
167
- ${m} ${h}`:`${d} ${u}`,className:it(re.spanNodeEvent,N,s&&re.boundaryMarker,n.isHighlighted?re.colorHighlight:Vl(n),n.isHighlighted===!1&&re.unlit),"data-hovered":t.isHovered,ref:o,style:{left:E,top:k},children:[g.jsx("div",{className:it(re.hoverInfo,_?re.alignStart:re.alignEnd),children:s?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:re.eventName,children:d}),g.jsx("span",{className:re.eventTimestamp,children:u}),h?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:re.eventName,children:m}),g.jsx("span",{className:re.eventTimestamp,children:h})]}):null]}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:re.eventName,children:l}),g.jsx("span",{className:re.eventTimestamp,children:u})]})}),s?g.jsx("div",{className:re.boundaryLine}):g.jsx("div",{className:re.eventDiamond})]})}),nm={"gray-700":"var(--ds-gray-700)","gray-900":"var(--ds-gray-900)"};function iL({size:e=16,color:t="gray-700"}){const n={color:nm[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 aL({size:e=16}){return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,className:re.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 sL({size:e=16,color:t="gray-900"}){const n={color:nm[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 oL(e){const{as:t,className:n,href:r,children:i,...a}=e;return(t||"a")==="span"||!r?g.jsx("span",{className:n,...a,children:i}):g.jsx("a",{className:n,href:r,...a,children:i})}function lL(e){const{className:t,children:n,size:r,...i}=e;return g.jsx("a",{...i,className:it(re.buttonLink,t),children:n})}function uL({children:e,className:t}){return g.jsx("div",{className:it(re.note,t),children:e})}function pd({width:e,height:t,rounded:n}){return g.jsx("span",{className:it(re.skeleton,n&&re.skeletonRounded),style:{width:e,height:t},"aria-hidden":!0})}const md=e=>`${(100*e).toFixed(3)}%`,gd=(e,t)=>e<t?-1:e>t?1:0,bd=e=>{const t={};for(const[r,i]of Object.entries(e)){const a=r.indexOf(".");let s="",o="";a!==-1?(s=r.substring(0,a),o=r.substring(a+1)):o=r;let l=t[s];l||(l={prefix:s,attributes:[]},t[s]=l),l.attributes.push({key:r,suffix:o,value:String(i)})}const n=Array.from(Object.values(t)).sort((r,i)=>gd(r.prefix,i.prefix));for(const r of n)r.attributes.sort((i,a)=>gd(i.suffix,a.suffix));return n},cL=(e,t)=>{const n=[];if(!t)return n;for(let r=t;"parent"in r;r=r.parent)n.unshift(r);return n},dL=()=>{var d;const{state:{root:e,selected:t,resourceMap:n,getQuickLinks:r},dispatch:i}=us(),a=b.useMemo(()=>cL(e,t),[e,t]),s=b.useMemo(()=>bd((t==null?void 0:t.span.attributes)??{}),[t]),o=b.useMemo(()=>{const c=t==null?void 0:t.span.resource;if(!c)return[];const p=n[c];return p?bd(p):[]},[n,t]);if(!t)return null;const{span:l}=t,u=rm(t);return g.jsxs(g.Fragment,{children:[t.isVercel?g.jsx(mL,{node:t}):null,t.isInstrumentationHint?g.jsx(TL,{}):null,!t.isInstrumentationHint&&a.length?g.jsx(Sn,{className:re.ancestorGroup,name:"Location",children:a.map(c=>g.jsxs("button",{className:re.ancestorNode,onClick:()=>i({type:"select",id:c.span.spanId}),type:"button",children:[g.jsxs("div",{className:re.ancestorText,children:[g.jsx("span",{className:re.ancestorName,children:c.label||c.span.name}),g.jsx("span",{className:re.ancestorDuration,children:It(c.duration)})]}),g.jsx("span",{"aria-hidden":!0,className:re.ancestorLineContainer,children:g.jsx("span",{className:it(re.ancestorLine,Vl(c)),style:{left:md((c.startTime-e.startTime)/e.duration),width:md(c.duration/e.duration)}})})]},`${t.span.spanId}.${c.span.spanId}`))}):null,u?g.jsx(gL,{getQuickLinks:r,span:t.span}):null,(d=t.events)!=null&&d.length?g.jsx(Sn,{name:"Events",children:t.events.map(c=>g.jsxs(b.Fragment,{children:[g.jsxs("dl",{className:re.spanDetailPanelAttribute,children:[g.jsx("dt",{className:re.spanDetailPanelAttributeKey,children:c.event.name}),g.jsx("dd",{className:re.spanDetailPanelAttributeValue,children:It(c.timestamp-e.startTime)})]}),Object.entries(c.event.attributes).map(([p,h])=>g.jsx(Wr,{name:`${c.event.name}.${p}`,value:h},p))]},c.key))}):null,s.length?g.jsx(Sn,{name:"Attributes",children:s.map(c=>g.jsx(b.Fragment,{children:c.attributes.map(({key:p,value:h})=>g.jsx(Wr,{name:p,value:h},p))},c.prefix))}):null,o.length?g.jsx(Sn,{name:"Resource",children:o.map(c=>g.jsx(b.Fragment,{children:c.attributes.map(({key:p,value:h})=>g.jsx(Wr,{name:p,value:h},p))},c.prefix))}):null,t.isInstrumentationHint?null:g.jsxs(Sn,{name:"Library",children:[g.jsx(Wr,{name:"name",value:l.library.name}),l.library.version?g.jsx(Wr,{name:"version",value:l.library.version}):null]})]})};function Gv({attached:e=!1}){const{state:{selected:t,isMobile:n},dispatch:r}=us(),i=fO();if(!t)return null;const{span:a}=t;return g.jsxs("div",{className:it(re.spanDetailPanel,n&&re.mobile),children:[e&&!n?g.jsx(xL,{}):null,g.jsx("div",{className:re.spanDetailPanelTop,children:g.jsxs("div",{className:re.spanDetailPanelTopInfo,children:[g.jsx("span",{className:re.spanDetailPanelName,title:a.name,children:a.name}),g.jsxs("div",{className:re.spanDetailPanelCorner,children:[t.isInstrumentationHint?null:g.jsx("span",{className:re.spanDetailPanelDuration,children:It(t.duration)}),g.jsx("div",{className:re.spanDetailPanelCloseVerticalRule}),g.jsx("button",{"aria-label":"Close Span Details",className:re.spanDetailPanelClose,onClick:()=>r({type:"deselect"}),type:"button",children:g.jsx(iL,{color:"gray-700",size:20})})]})]})}),g.jsx("div",{className:it("flex gap-3",re.spanDetailPanelBody),children:i||g.jsx(dL,{})})]})}const Ed="vc-trace-span-exp:";function Sn({name:e,className:t="",children:n}){const[r,i]=b.useState(()=>"localStorage"in globalThis?localStorage.getItem(`${Ed}${e}`)!=="0":!0),a=b.useCallback(()=>{i(s=>{const o=!s;return localStorage.setItem(`${Ed}${e}`,String(Number(o))),o})},[e]);return g.jsxs("div",{className:it(re.detailGroup,r?re.expanded:re.collapsed,t),children:[g.jsxs("button",{className:re.detailHeading,onClick:a,type:"button",children:[g.jsx("span",{children:e}),g.jsx(aL,{})]}),r?n:null]})}const fL=new Set(["OPTIONS","HEAD","GET","PUT","POST","DELETE"]),hL={"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."},Td=new Set(["Start VM","Spawn Node.js","Spawn Python","Init User Code"]),xd=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},pL=e=>{const{name:t}=e.span,n=xd(e),r=xd(e.parent);return e.span.attributes["vercel.middleware.internal"]==="true"?"The Vercel Toolbar created this middleware.":Td.has(t)||t==="Invoke Function"&&e.children.some(i=>Td.has(i.span.name))?"This function encountered a cold start.":n&&r&&n!==r?"This request was routed across regions.":null},rm=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 fL.has(r)};function mL({node:e}){const{name:t}=e.span;let n=hL[t];if(!n&&rm(e)&&(n="How long it took for Vercel to process the request and send the response."),!n)return null;const r=pL(e);return g.jsx(Sn,{name:"What is this?",children:g.jsxs("div",{className:re.infraSpanDescription,children:[g.jsx("span",{children:n}),r&&g.jsx(uL,{children:r})]})})}const gL=b.memo(function({getQuickLinks:t,span:n}){const r=t(n);return r.length?g.jsx(Sn,{name:"Links",children:r.map(({key:i,value:a})=>g.jsx(EL,{link:a,name:i},i))}):null});function bL(e){const[t,n]=b.useState({}),r=e.__resolvedValue!==void 0||e.__rejectedValue!==void 0;return b.useEffect(()=>{r||e.then(i=>{e.__resolvedValue=i}).catch(i=>{e.__rejectedValue=i}).finally(()=>n({}))},[e,r]),e.__resolvedValue}function EL({name:e,link:t}){const n=bL(t);return g.jsxs(oL,{as:n?void 0:"span",className:it(re.spanDetailPanelAttribute,re.spanDetailPanelQuickLink),href:(n==null?void 0:n.href)||"",children:[g.jsx("span",{className:re.spanDetailPanelAttributeKey,children:e}),g.jsx("span",{className:it(re.spanDetailPanelAttributeValue,re.spanDetailPanelQuickLinkLabel),children:n?g.jsxs(g.Fragment,{children:[n.label,n.icon||g.jsx(sL,{color:"gray-900"})]}):g.jsxs(g.Fragment,{children:[g.jsx(pd,{height:18,width:32+e.length*8}),g.jsx(pd,{height:18,rounded:!0,width:18})]})})]})}function TL(){return g.jsx(Sn,{name:"What is this?",children:g.jsxs("div",{className:re.infraSpanDescription,children:[g.jsx("span",{children:"You can visualize your application's spans alongside Vercel's spans in this viewer."}),g.jsx(lL,{href:"https://vercel.com/docs/session-tracing#adding-custom-spans",size:"small",target:"_blank",children:"Get Started"})]})})}function Wr({name:e,value:t}){return g.jsxs("dl",{className:re.spanDetailPanelAttribute,children:[g.jsx("dt",{className:re.spanDetailPanelAttributeKey,children:e}),g.jsx("dd",{className:re.spanDetailPanelAttributeValue,title:String(t),children:String(t)})]})}function xL(){const{state:{panelWidth:e},dispatch:t}=us(),n=b.useRef({start:{x:0,width:e},x:0,width:e,isHeld:!1});n.current.width=e;const r=b.useCallback(a=>{if(a.pointerType!=="mouse")return;a.preventDefault();const s=n.current;s.start.x=a.clientX,s.x=a.clientX,s.start.width=s.width,s.isHeld=!0},[]),i=b.useCallback(()=>{t({type:"setPanelWidth",width:zl.panelWidth})},[t]);return b.useEffect(()=>{let a=0;const s=()=>{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(a),a=requestAnimationFrame(s))},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:re.spanDetailPanelResizer,onDoubleClick:i,onPointerDown:r})}function yL(e){const t=b.useRef({});return{setStyle:b.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 _L=()=>"devicePixelRatio"in globalThis&&globalThis.devicePixelRatio||1,kL=()=>{const[e,t]=b.useState(1);return b.useLayoutEffect(()=>{const n=()=>t(_L()),r=matchMedia(`(resolution: ${e}dppx)`);return r.addEventListener("change",n),n(),()=>{r.removeEventListener("change",n)}},[e]),e},Yr=Ma,Kv=b.memo(function({timelineRef:t,rows:n,scale:r}){const{state:{root:i,baseScale:a,timelineWidth:s,width:o,scrollbarWidth:l}}=us(),u=o+Ma*2,d=kL(),c=b.useRef(null),p=b.useRef(null),h=o/(o-l)*Math.min(o/s,a/r),m=Math.min(o,(s-l)*h);b.useEffect(()=>{let N=!1,w=0,F;const H=y=>{var L;return!!((L=c.current)!=null&&L.contains(y))};let I=0;const V=()=>{if(!N||!F)return;const y=t.current;if(!y)return;const L=w-m*.5-F.left;y.scrollLeft=L/h},U=y=>{({clientX:w}=y),cancelAnimationFrame(I),I=requestAnimationFrame(V)},Q=y=>{var L;H(y.target)&&(N=!0,F=(L=c.current)==null?void 0:L.getBoundingClientRect(),U(y))},R=()=>{N=!1,F=void 0},K=y=>{H(y.target)&&y.cancelable&&y.preventDefault()},z=y=>{N&&y.cancelable&&y.preventDefault()};return window.addEventListener("pointerdown",Q),window.addEventListener("pointermove",U),window.addEventListener("pointerup",R),window.addEventListener("blur",R),window.addEventListener("touchstart",K,{passive:!1}),window.addEventListener("touchmove",z,{passive:!1}),()=>{window.removeEventListener("pointerdown",Q),window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",R),window.removeEventListener("blur",R),window.removeEventListener("touchstart",K),window.removeEventListener("touchmove",z),cancelAnimationFrame(I)}},[t,h,m]),b.useEffect(()=>{const N=p.current,w=N==null?void 0:N.getContext("2d");if(!N||!w)return;const H=requestAnimationFrame(()=>{w.resetTransform(),w.clearRect(0,0,N.width,N.height),w.scale(d,d);const I=1,V=3,U=(u-Yr*2)/i.duration;w.fillStyle="#ccc",w.beginPath();for(const Q of n)for(const R of Q){const K=Yr-I+(I+V)*R.row;if(K>=pr-V-Yr)break;const z=Yr+(R.startTime-i.startTime)*U,y=R.duration*U;w.roundRect(z,K,y,V,V)}w.fill()});return()=>cancelAnimationFrame(H)},[d,i,u,n]);const E=b.useRef(null),{style:k,setStyle:_}=yL(E);return b.useLayoutEffect(()=>{const N=t.current;if(!N)return;let w=0;const F=()=>{_("transform",`translateX(${Yr+N.scrollLeft*h}px)`)};F();const H=()=>{cancelAnimationFrame(w),w=requestAnimationFrame(F)};return N.addEventListener("scroll",H),()=>{cancelAnimationFrame(w),N.removeEventListener("scroll",H)}},[t,h,_]),g.jsxs("div",{className:re.mapContainer,ref:c,style:{width:m>0?u:"100%",height:pr},children:[g.jsx("canvas",{className:re.mapCanvas,height:pr*d,ref:p,style:{width:u,height:pr},width:u*d}),g.jsx("div",{className:re.mapThumb,ref:E,style:{transform:k.transform,width:m>0?m:`calc(100% - ${Ma*2}px)`,top:2,height:pr-4}})]})});function AL(e){try{const t=JSON.parse(e);return typeof t=="string"?t:JSON.stringify(t,null,2)}catch{return e}}function CL(e){try{return JSON.parse(e)}catch{return e}}const wL=j.memo(function({chunk:t,index:n}){const r=CL(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:AL(r)}):g.jsx(gE,{data:r,expandLevel:1})]})});function SL(){return g.jsxs("div",{className:"flex flex-col gap-3 animate-in fade-in",children:[g.jsx(Cu,{style:{width:120,height:16,borderRadius:4}}),[1,2,3,4].map(e=>g.jsx(Cu,{style:{height:56,borderRadius:6}},e))]})}function Xv({streamId:e,chunks:t,isLive:n,error:r,isLoading:i}){const[a,s]=b.useState(!1),o=b.useRef(null),l=b.useCallback(()=>{if(o.current){const{scrollTop:u,scrollHeight:d,clientHeight:c}=o.current,p=d-u-c<10;s(!p&&d>c)}},[]);return b.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight),l()},[t.length,l]),i&&t.length===0?g.jsx("div",{className:"flex flex-col h-full pb-4",children:g.jsx(SL,{})}):g.jsxs("div",{className:"flex flex-col h-full pb-4",children:[n&&g.jsxs("div",{className:"flex items-center gap-1.5 mb-3 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.jsxs("div",{className:"relative flex-1 min-h-[200px]",children:[g.jsx("div",{ref:o,onScroll:l,className:"absolute inset-0 overflow-auto flex flex-col gap-2",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"}):t.map((u,d)=>g.jsx(wL,{chunk:u,index:d},`${e}-chunk-${u.id}`))}),a&&g.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-8 pointer-events-none",style:{background:"linear-gradient(to top, var(--ds-background-100), transparent)"}})]})]})}function NL(e){const t=OL(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 IL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function OL(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|=IL.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 RL=-1,LL=-2,vL=-3,DL=-4,PL=-5,ML=-6,BL=-7;function FL(e,t){return im(JSON.parse(e),t)}function im(e,t){if(typeof e=="number")return a(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 a(s,o=!1){if(s===RL)return;if(s===vL)return NaN;if(s===DL)return 1/0;if(s===PL)return-1/0;if(s===ML)return-0;if(o||typeof s!="number")throw new Error("Invalid input");if(s in r)return r[s];const l=n[s];if(!l||typeof l!="object")r[s]=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[s]=d(a(c)),i.delete(c),r[s]}switch(u){case"Date":r[s]=new Date(l[1]);break;case"Set":const c=new Set;r[s]=c;for(let m=1;m<l.length;m+=1)c.add(a(l[m]));break;case"Map":const p=new Map;r[s]=p;for(let m=1;m<l.length;m+=2)p.set(a(l[m]),a(l[m+1]));break;case"RegExp":r[s]=new RegExp(l[1],l[2]);break;case"Object":r[s]=Object(l[1]);break;case"BigInt":r[s]=BigInt(l[1]);break;case"null":const h=Object.create(null);r[s]=h;for(let m=1;m<l.length;m+=2)h[l[m]]=a(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=a(l[1]),k=new m(E);r[s]=l[2]!==void 0?k.subarray(l[2],l[3]):k;break}case"ArrayBuffer":{const m=l[1];if(typeof m!="string")throw new Error("Invalid ArrayBuffer encoding");const E=NL(m);r[s]=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[s]=Temporal[m].from(l[1]);break}case"URL":{const m=new URL(l[1]);r[s]=m;break}case"URLSearchParams":{const m=new URLSearchParams(l[1]);r[s]=m;break}default:throw new Error(`Unknown type ${u}`)}}else if(l[0]===BL){const u=l[1],d=new Array(u);r[s]=d;for(let c=2;c<l.length;c+=2){const p=l[c];d[p]=a(l[c+1])}}else{const u=new Array(l.length);r[s]=u;for(let d=0;d<l.length;d+=1){const c=l[d];c!==LL&&(u[d]=a(c))}}else{const u={};r[s]=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]=a(c)}}return r[s]}return a(0)}const vo={DEVALUE_V1:"devl"},aa=4;new TextEncoder;const HL=new TextDecoder;function UL(e){if(!(e instanceof Uint8Array))return{format:vo.DEVALUE_V1,payload:new TextEncoder().encode(JSON.stringify(e))};if(e.length<aa)throw new Error(`Data too short to contain format prefix: expected at least ${aa} bytes, got ${e.length}`);const t=e.subarray(0,aa),n=HL.decode(t),r=Object.values(vo);if(!r.includes(n))throw new Error(`Unknown serialization format: "${n}". Known formats: ${r.join(", ")}`);const i=e.subarray(aa);return{format:n,payload:i}}function Zt(e,t){if(e instanceof Uint8Array){const{format:n,payload:r}=UL(e);if(n===vo.DEVALUE_V1){const i=new TextDecoder().decode(r);return FL(i,t)}throw new Error(`Unsupported serialization format: ${n}`)}return Array.isArray(e)?im(e,t):e}const zs="strm_",jL="__workflow_stream_ref__",zL="__workflow_class_instance_ref__";class $L{constructor(t,n,r){Ne(this,"className");Ne(this,"classId");Ne(this,"data");Ne(this,"__type",zL);this.className=t,this.classId=n,this.data=r}toJSON(){return{__type:this.__type,className:this.className,classId:this.classId,data:this.data}}}const $s=e=>{let t;if("name"in e){const n=String(e.name);n.startsWith(zs)?t=n:t=`${zs}${n}`}else t=`${zs}null`;return{__type:jL,streamId:t}},VL=e=>!e||typeof e!="object"?"null":"stepId"in e?`<step:${e.stepId}>`:"<function>",am=e=>{if(!e)return"Unknown";const t=e.split("/");return t[t.length-1]||e},WL=e=>new $L(am(e.classId),e.classId,e.data),YL=e=>`<class:${am(e.classId)}>`,Qv={ReadableStream:$s,WritableStream:$s,TransformStream:$s,StepFunction:VL,Instance:WL,Class:YL};function qL(e,t){let n=e.input,r=e.output;if(e.input!=null)try{n=Zt(e.input,t)}catch{}if(e.output!=null)try{r=Zt(e.output,t)}catch{}return{...e,input:n,output:r}}function GL(e,t){let n=e.input,r=e.output;if(e.input!=null)try{n=Zt(e.input,t)}catch{}if(e.output!=null)try{r=Zt(e.output,t)}catch{}return{...e,input:n,output:r}}function KL(e,t){if(!e.eventData)return e;const n={...e.eventData};if("result"in n&&n.result!=null)try{n.result=Zt(n.result,t)}catch{}if("input"in n&&n.input!=null)try{n.input=Zt(n.input,t)}catch{}if("output"in n&&n.output!=null)try{n.output=Zt(n.output,t)}catch{}if("metadata"in n&&n.metadata!=null)try{n.metadata=Zt(n.metadata,t)}catch{}if("payload"in n&&n.payload!=null)try{n.payload=Zt(n.payload,t)}catch{}return{...e,eventData:n}}function XL(e,t){if(e.metadata==null)return e;let n=e.metadata;try{n=Zt(e.metadata,t)}catch{}return{...e,metadata:n}}function Jv(e,t){if(!e)return e;let n;if("stepId"in e?n=qL(e,t):"hookId"in e?n=XL(e,t):"eventId"in e?n=KL(e,t):n=GL(e,t),"executionContext"in n){const{executionContext:r,...i}=n,a=r&&typeof r=="object"&&"workflowCoreVersion"in r?r.workflowCoreVersion:void 0;return a?{...i,workflowCoreVersion:a}:i}return n}const Zv=10;function sm(...e){return tl(it(e))}const e4=5e3;function t4(e,t,n){return n?`Page ${e} of ${t}+`:`Page ${e} of ${t}`}const n4=F1,r4=H1,QL=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(yf,{ref:r,sideOffset:t,className:sm("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}));QL.displayName=yf.displayName;const om=b.createContext(null);function i4({children:e,serverConfig:t}){const n={serverConfig:t};return g.jsx(om.Provider,{value:n,children:e})}function a4(){const e=b.useContext(om);if(!e)throw new Error("useServerConfig must be used within a ServerConfigProvider");return e}function yd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lm(...e){return t=>{let n=!1;const r=e.map(i=>{const a=yd(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():yd(e[i],null)}}}}function s4(...e){return b.useCallback(lm(...e),e)}var um=b.forwardRef((e,t)=>{const{children:n,...r}=e,i=b.Children.toArray(n),a=i.find(ZL);if(a){const s=a.props.children,o=i.map(l=>l===a?b.Children.count(s)>1?b.Children.only(null):b.isValidElement(s)?s.props.children:null:l);return g.jsx(Do,{...r,ref:t,children:b.isValidElement(s)?b.cloneElement(s,void 0,o):null})}return g.jsx(Do,{...r,ref:t,children:n})});um.displayName="Slot";var Do=b.forwardRef((e,t)=>{const{children:n,...r}=e;if(b.isValidElement(n)){const i=tv(n);return b.cloneElement(n,{...ev(r,n.props),ref:t?lm(t,i):i})}return b.Children.count(n)>1?b.Children.only(null):null});Do.displayName="SlotClone";var JL=({children:e})=>g.jsx(g.Fragment,{children:e});function ZL(e){return b.isValidElement(e)&&e.type===JL}function ev(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...o)=>{a(...o),i(...o)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function tv(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 _d=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kd=it,nv=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return kd(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],c=a==null?void 0:a[u];if(d===null)return null;const p=_d(d)||_d(c);return i[u][p]}),o=n&&Object.entries(n).reduce((u,d)=>{let[c,p]=d;return p===void 0||(u[c]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:p,...h}=d;return Object.entries(h).every(m=>{let[E,k]=m;return Array.isArray(k)?k.includes({...a,...o}[E]):{...a,...o}[E]===k})?[...u,c,p]:u},[]);return kd(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},rv=nv("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"}}),iv=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const s=r?um:"button";return g.jsx(s,{className:sm(rv({variant:t,size:n,className:e})),ref:a,...i})});iv.displayName="Button";let Po;try{Po=new TextDecoder}catch{}let se,Yn,Y=0;const av=105,sv=57342,ov=57343,Ad=57337,Cd=6,dr={};let qr=11281e4,un=1681e4,_e={},Pe,Ba,Fa=0,ki=0,We,Pt,ze=[],Mo=[],bt,ut,ei,wd={useRecords:!1,mapsAsObjects:!0},Ai=!1,cm=2;try{new Function("")}catch{cm=1/0}class Ci{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[Mt(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(se)return pm(()=>(Uo(),this?this.decode(t,n):Ci.prototype.decode.call(wd,t,n)));Yn=n>-1?n:t.length,Y=0,ki=0,Ba=null,We=null,se=t;try{ut=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength))}catch(r){throw se=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 Ci){if(_e=this,bt=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return Pe=this.structures,sa();(!Pe||Pe.length>0)&&(Pe=[])}else _e=wd,(!Pe||Pe.length>0)&&(Pe=[]),bt=null;return sa()}decodeMultiple(t,n){let r,i=0;try{let a=t.length;Ai=!0;let s=this?this.decode(t,a):ql.decode(t,a);if(n){if(n(s)===!1)return;for(;Y<a;)if(i=Y,n(sa())===!1)return}else{for(r=[s];Y<a;)i=Y,r.push(sa());return r}}catch(a){throw a.lastPosition=i,a.values=r,a}finally{Ai=!1,Uo()}}}function sa(){try{let e=Ae();if(We){if(Y>=We.postBundlePosition){let t=new Error("Unexpected bundle position");throw t.incomplete=!0,t}Y=We.postBundlePosition,We=null}if(Y==Yn)Pe=null,se=null,Pt&&(Pt=null);else if(Y>Yn){let t=new Error("Unexpected end of CBOR data");throw t.incomplete=!0,t}else if(!Ai)throw new Error("Data read, but end of buffer not reached");return e}catch(e){throw Uo(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function Ae(){let e=se[Y++],t=e>>5;if(e=e&31,e>23)switch(e){case 24:e=se[Y++];break;case 25:if(t==7)return dv();e=ut.getUint16(Y),Y+=2;break;case 26:if(t==7){let n=ut.getFloat32(Y);if(_e.useFloat32>2){let r=Yl[(se[Y]&127)<<1|se[Y+1]>>7];return Y+=4,(r*n+(n>0?.5:-.5)>>0)/r}return Y+=4,n}e=ut.getUint32(Y),Y+=4;break;case 27:if(t==7){let n=ut.getFloat64(Y);return Y+=8,n}if(t>1){if(ut.getUint32(Y)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=ut.getUint32(Y+4)}else _e.int64AsNumber?(e=ut.getUint32(Y)*4294967296,e+=ut.getUint32(Y+4)):e=ut.getBigUint64(Y);Y+=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=Ae())!=dr;){if(i>=qr)throw new Error(`Array length exceeds ${qr}`);n[i++]=r}return t==4?n:t==3?n.join(""):Buffer.concat(n);case 5:let a;if(_e.mapsAsObjects){let s={},o=0;if(_e.keyMap)for(;(a=Ae())!=dr;){if(o++>=un)throw new Error(`Property count exceeds ${un}`);s[Mt(_e.decodeKey(a))]=Ae()}else for(;(a=Ae())!=dr;){if(o++>=un)throw new Error(`Property count exceeds ${un}`);s[Mt(a)]=Ae()}return s}else{ei&&(_e.mapsAsObjects=!0,ei=!1);let s=new Map;if(_e.keyMap){let o=0;for(;(a=Ae())!=dr;){if(o++>=un)throw new Error(`Map size exceeds ${un}`);s.set(_e.decodeKey(a),Ae())}}else{let o=0;for(;(a=Ae())!=dr;){if(o++>=un)throw new Error(`Map size exceeds ${un}`);s.set(a,Ae())}}return s}case 7:return dr;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 cv(e);case 3:if(ki>=Y)return Ba.slice(Y-Fa,(Y+=e)-Fa);if(ki==0&&Yn<140&&e<32){let i=e<16?dm(e):uv(e);if(i!=null)return i}return lv(e);case 4:if(e>=qr)throw new Error(`Array length exceeds ${qr}`);let n=new Array(e);for(let i=0;i<e;i++)n[i]=Ae();return n;case 5:if(e>=un)throw new Error(`Map size exceeds ${qr}`);if(_e.mapsAsObjects){let i={};if(_e.keyMap)for(let a=0;a<e;a++)i[Mt(_e.decodeKey(Ae()))]=Ae();else for(let a=0;a<e;a++)i[Mt(Ae())]=Ae();return i}else{ei&&(_e.mapsAsObjects=!0,ei=!1);let i=new Map;if(_e.keyMap)for(let a=0;a<e;a++)i.set(_e.decodeKey(Ae()),Ae());else for(let a=0;a<e;a++)i.set(Ae(),Ae());return i}case 6:if(e>=Ad){let i=Pe[e&8191];if(i)return i.read||(i.read=Bo(i)),i.read();if(e<65536){if(e==ov){let a=gr(),s=Ae(),o=Ae();Ho(s,o);let l={};if(_e.keyMap)for(let u=2;u<a;u++){let d=_e.decodeKey(o[u-2]);l[Mt(d)]=Ae()}else for(let u=2;u<a;u++){let d=o[u-2];l[Mt(d)]=Ae()}return l}else if(e==sv){let a=gr(),s=Ae();for(let o=2;o<a;o++)Ho(s++,Ae());return Ae()}else if(e==Ad)return bv();if(_e.getShared&&(Wl(),i=Pe[e&8191],i))return i.read||(i.read=Bo(i)),i.read()}}let r=ze[e];if(r)return r.handlesRead?r(Ae):r(Ae());{let i=Ae();for(let a=0;a<Mo.length;a++){let s=Mo[a](e,i);if(s!==void 0)return s}return new Jn(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=(bt||zn())[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 Sd=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function Bo(e){if(!e)throw new Error("Structure is required in record definition");function t(){let n=se[Y++];if(n=n&31,n>23)switch(n){case 24:n=se[Y++];break;case 25:n=ut.getUint16(Y),Y+=2;break;case 26:n=ut.getUint32(Y),Y+=4;break;default:throw new Error("Expected array header, but got "+se[Y-1])}let r=this.compiledReader;for(;r;){if(r.propertyCount===n)return r(Ae);r=r.next}if(this.slowReads++>=cm){let a=this.length==n?this:this.slice(0,n);return r=_e.keyMap?new Function("r","return {"+a.map(s=>_e.decodeKey(s)).map(s=>Sd.test(s)?Mt(s)+":r()":"["+JSON.stringify(s)+"]:r()").join(",")+"}"):new Function("r","return {"+a.map(s=>Sd.test(s)?Mt(s)+":r()":"["+JSON.stringify(s)+"]:r()").join(",")+"}"),this.compiledReader&&(r.next=this.compiledReader),r.propertyCount=n,this.compiledReader=r,r(Ae)}let i={};if(_e.keyMap)for(let a=0;a<n;a++)i[Mt(_e.decodeKey(this[a]))]=Ae();else for(let a=0;a<n;a++)i[Mt(this[a])]=Ae();return i}return e.slowReads=0,t}function Mt(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 lv=Fo;function Fo(e){let t;if(e<16&&(t=dm(e)))return t;if(e>64&&Po)return Po.decode(se.subarray(Y,Y+=e));const n=Y+e,r=[];for(t="";Y<n;){const i=se[Y++];if((i&128)===0)r.push(i);else if((i&224)===192){const a=se[Y++]&63;r.push((i&31)<<6|a)}else if((i&240)===224){const a=se[Y++]&63,s=se[Y++]&63;r.push((i&31)<<12|a<<6|s)}else if((i&248)===240){const a=se[Y++]&63,s=se[Y++]&63,o=se[Y++]&63;let l=(i&7)<<18|a<<12|s<<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+=Ge.apply(String,r),r.length=0)}return r.length>0&&(t+=Ge.apply(String,r)),t}let Ge=String.fromCharCode;function uv(e){let t=Y,n=new Array(e);for(let r=0;r<e;r++){const i=se[Y++];if((i&128)>0){Y=t;return}n[r]=i}return Ge.apply(String,n)}function dm(e){if(e<4)if(e<2){if(e===0)return"";{let t=se[Y++];if((t&128)>1){Y-=1;return}return Ge(t)}}else{let t=se[Y++],n=se[Y++];if((t&128)>0||(n&128)>0){Y-=2;return}if(e<3)return Ge(t,n);let r=se[Y++];if((r&128)>0){Y-=3;return}return Ge(t,n,r)}else{let t=se[Y++],n=se[Y++],r=se[Y++],i=se[Y++];if((t&128)>0||(n&128)>0||(r&128)>0||(i&128)>0){Y-=4;return}if(e<6){if(e===4)return Ge(t,n,r,i);{let a=se[Y++];if((a&128)>0){Y-=5;return}return Ge(t,n,r,i,a)}}else if(e<8){let a=se[Y++],s=se[Y++];if((a&128)>0||(s&128)>0){Y-=6;return}if(e<7)return Ge(t,n,r,i,a,s);let o=se[Y++];if((o&128)>0){Y-=7;return}return Ge(t,n,r,i,a,s,o)}else{let a=se[Y++],s=se[Y++],o=se[Y++],l=se[Y++];if((a&128)>0||(s&128)>0||(o&128)>0||(l&128)>0){Y-=8;return}if(e<10){if(e===8)return Ge(t,n,r,i,a,s,o,l);{let u=se[Y++];if((u&128)>0){Y-=9;return}return Ge(t,n,r,i,a,s,o,l,u)}}else if(e<12){let u=se[Y++],d=se[Y++];if((u&128)>0||(d&128)>0){Y-=10;return}if(e<11)return Ge(t,n,r,i,a,s,o,l,u,d);let c=se[Y++];if((c&128)>0){Y-=11;return}return Ge(t,n,r,i,a,s,o,l,u,d,c)}else{let u=se[Y++],d=se[Y++],c=se[Y++],p=se[Y++];if((u&128)>0||(d&128)>0||(c&128)>0||(p&128)>0){Y-=12;return}if(e<14){if(e===12)return Ge(t,n,r,i,a,s,o,l,u,d,c,p);{let h=se[Y++];if((h&128)>0){Y-=13;return}return Ge(t,n,r,i,a,s,o,l,u,d,c,p,h)}}else{let h=se[Y++],m=se[Y++];if((h&128)>0||(m&128)>0){Y-=14;return}if(e<15)return Ge(t,n,r,i,a,s,o,l,u,d,c,p,h,m);let E=se[Y++];if((E&128)>0){Y-=15;return}return Ge(t,n,r,i,a,s,o,l,u,d,c,p,h,m,E)}}}}}function cv(e){return _e.copyBuffers?Uint8Array.prototype.slice.call(se,Y,Y+=e):se.subarray(Y,Y+=e)}let fm=new Float32Array(1),oa=new Uint8Array(fm.buffer,0,4);function dv(){let e=se[Y++],t=se[Y++],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 oa[3]=e&128|(n>>1)+56,oa[2]=(e&7)<<5|t>>3,oa[1]=t<<5,oa[0]=0,fm[0]}new Array(4096);class Jn{constructor(t,n){this.value=t,this.tag=n}}ze[0]=e=>new Date(e);ze[1]=e=>new Date(Math.round(e*1e3));ze[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};ze[3]=e=>BigInt(-1)-ze[2](e);ze[4]=e=>+(e[1]+"e"+e[0]);ze[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));const Ho=(e,t)=>{e=e-57344;let n=Pe[e];n&&n.isShared&&((Pe.restoreStructures||(Pe.restoreStructures=[]))[e]=n),Pe[e]=t,t.read=Bo(t)};ze[av]=e=>{let t=e.length,n=e[1];Ho(e[0],n);let r={};for(let i=2;i<t;i++){let a=n[i-2];r[Mt(a)]=e[i]}return r};ze[14]=e=>We?We[0].slice(We.position0,We.position0+=e):new Jn(e,14);ze[15]=e=>We?We[1].slice(We.position1,We.position1+=e):new Jn(e,15);let fv={Error,RegExp};ze[27]=e=>(fv[e[0]]||Error)(e[1],e[2]);const hm=e=>{if(se[Y++]!=132){let n=new Error("Packed values structure must be followed by a 4 element array");throw se.length<Y&&(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 bt=bt?t.concat(bt.slice(t.length)):t,bt.prefixes=e(),bt.suffixes=e(),e()};hm.handlesRead=!0;ze[51]=hm;ze[Cd]=e=>{if(!bt)if(_e.getShared)Wl();else return new Jn(e,Cd);if(typeof e=="number")return bt[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};ze[28]=e=>{Pt||(Pt=new Map,Pt.id=0);let t=Pt.id++,n=Y,r=se[Y],i;r>>5==4?i=[]:i={};let a={target:i};Pt.set(t,a);let s=e();return a.used?(Object.getPrototypeOf(i)!==Object.getPrototypeOf(s)&&(Y=n,i=s,Pt.set(t,{target:i}),s=e()),Object.assign(i,s)):(a.target=s,s)};ze[28].handlesRead=!0;ze[29]=e=>{let t=Pt.get(e);return t.used=!0,t.target};ze[258]=e=>new Set(e);(ze[259]=e=>(_e.mapsAsObjects&&(_e.mapsAsObjects=!1,ei=!0),e())).handlesRead=!0;function fr(e,t){return typeof e=="string"?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function zn(){if(!bt)if(_e.getShared)Wl();else throw new Error("No packed values available");return bt}const hv=1399353956;Mo.push((e,t)=>{if(e>=225&&e<=255)return fr(zn().prefixes[e-224],t);if(e>=28704&&e<=32767)return fr(zn().prefixes[e-28672],t);if(e>=1879052288&&e<=2147483647)return fr(zn().prefixes[e-1879048192],t);if(e>=216&&e<=223)return fr(t,zn().suffixes[e-216]);if(e>=27647&&e<=28671)return fr(t,zn().suffixes[e-27639]);if(e>=1811940352&&e<=1879048191)return fr(t,zn().suffixes[e-1811939328]);if(e==hv)return{packedValues:bt,structures:Pe.slice(0),version:t};if(e==55799)return t});const pv=new Uint8Array(new Uint16Array([1]).buffer)[0]==1,Nd=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],mv=[64,68,69,70,71,72,77,78,79,85,86];for(let e=0;e<Nd.length;e++)gv(Nd[e],mv[e]);function gv(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 a=r==2?1:r==4?2:r==8?3:0;ze[i?t:t-4]=r==1||i==pv?s=>{if(!e)throw new Error("Could not find typed array for code "+t);return!_e.copyBuffers&&(r===1||r===2&&!(s.byteOffset&1)||r===4&&!(s.byteOffset&3)||r===8&&!(s.byteOffset&7))?new e(s.buffer,s.byteOffset,s.byteLength>>a):new e(Uint8Array.prototype.slice.call(s,0).buffer)}:s=>{if(!e)throw new Error("Could not find typed array for code "+t);let o=new DataView(s.buffer,s.byteOffset,s.byteLength),l=s.length>>a,u=new e(l),d=o[n];for(let c=0;c<l;c++)u[c]=d.call(o,c<<a,i);return u}}}function bv(){let e=gr(),t=Y+Ae();for(let r=2;r<e;r++){let i=gr();Y+=i}let n=Y;return Y=t,We=[Fo(gr()),Fo(gr())],We.position0=0,We.position1=0,We.postBundlePosition=Y,Y=n,Ae()}function gr(){let e=se[Y++]&31;if(e>23)switch(e){case 24:e=se[Y++];break;case 25:e=ut.getUint16(Y),Y+=2;break;case 26:e=ut.getUint32(Y),Y+=4;break}return e}function Wl(){if(_e.getShared){let e=pm(()=>(se=null,_e.getShared()))||{},t=e.structures||[];_e.sharedVersion=e.version,bt=_e.sharedValues=e.packedValues,Pe===!0?_e.structures=Pe=t:Pe.splice.apply(Pe,[0,t.length].concat(t))}}function pm(e){let t=Yn,n=Y,r=Fa,i=ki,a=Ba,s=Pt,o=We,l=new Uint8Array(se.slice(0,Yn)),u=Pe,d=_e,c=Ai,p=e();return Yn=t,Y=n,Fa=r,ki=i,Ba=a,Pt=s,We=o,se=l,Ai=c,Pe=u,_e=d,ut=new DataView(se.buffer,se.byteOffset,se.byteLength),p}function Uo(){se=null,Pt=null,Pe=null}const Yl=new Array(147);for(let e=0;e<256;e++)Yl[e]=+("1e"+Math.floor(45.15-e*.30103));let ql=new Ci({useRecords:!1});const Id=ql.decode;ql.decodeMultiple;let Ea;try{Ea=new TextEncoder}catch{}let jo,mm;const ds=typeof globalThis=="object"&&globalThis.Buffer,Hi=typeof ds<"u",Vs=Hi?ds.allocUnsafeSlow:Uint8Array,Od=Hi?ds:Uint8Array,Rd=256,Ld=Hi?4294967296:2144337920;let Ws,B,ve,O=0,kn,Ve=null;const Ev=61440,Tv=/[\u0080-\uFFFF]/,kt=Symbol("record-id");class xv extends Ci{constructor(t){super(t),this.offset=0;let n,r,i,a,s;t=t||{};let o=Od.prototype.utf8Write?function(y,L,v){return B.utf8Write(y,L,v)}:Ea&&Ea.encodeInto?function(y,L){return Ea.encodeInto(y,B.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 p,h,m=t.sharedValues,E;if(m){E=Object.create(null);for(let y=0,L=m.length;y<L;y++)E[m[y]]=y}let k=[],_=0,N=0;this.mapEncode=function(y,L){if(this._keyMap&&!this._mapped)switch(y.constructor.name){case"Array":y=y.map(v=>this.encodeKeys(v));break}return this.encode(y,L)},this.encode=function(y,L){if(B||(B=new Vs(8192),ve=new DataView(B.buffer,0,8192),O=0),kn=B.length-10,kn-O<2048?(B=new Vs(B.length),ve=new DataView(B.buffer,0,B.length),kn=B.length-10,O=0):L===Pd&&(O=O+7&2147483640),n=O,l.useSelfDescribedHeader&&(ve.setUint32(O,3654940416),O+=3),s=l.structuredClone?new Map:null,l.bundleStrings&&typeof y!="string"?(Ve=[],Ve.size=1/0):Ve=null,r=l.structures,r){if(r.uninitialized){let D=l.getShared()||{};l.structures=r=D.structures||[],l.sharedVersion=D.version;let P=l.sharedValues=D.packedValues;if(P){E={};for(let q=0,J=P.length;q<J;q++)E[P[q]]=q}}let v=r.length;if(v>d&&!c&&(v=d),!r.transitions){r.transitions=Object.create(null);for(let D=0;D<v;D++){let P=r[D];if(!P)continue;let q,J=r.transitions;for(let T=0,ie=P.length;T<ie;T++){J[kt]===void 0&&(J[kt]=D);let te=P[T];q=J[te],q||(q=J[te]=Object.create(null)),J=q}J[kt]=D|1048576}}c||(r.nextId=v)}if(i&&(i=!1),a=r||[],h=E,t.pack){let v=new Map;if(v.values=[],v.encoder=l,v.maxValues=t.maxPrivatePackedValues||(E?16:1/0),v.objectMap=E||!1,v.samplingPackedValues=p,Ta(y,v),v.values.length>0){B[O++]=216,B[O++]=51,Qt(4);let D=v.values;w(D),Qt(0),Qt(0),h=Object.create(E||null);for(let P=0,q=D.length;P<q;P++)h[D[P]]=P}}Ws=L&qs;try{if(Ws)return;if(w(y),Ve&&Dd(n,w),l.offset=O,s&&s.idsToInsert){O+=s.idsToInsert.length*2,O>kn&&H(O),l.offset=O;let v=kv(B.subarray(n,O),s.idsToInsert);return s=null,v}return L&Pd?(B.start=n,B.end=O,B):B.subarray(n,O)}finally{if(r){if(N<10&&N++,r.length>d&&(r.length=d),_>1e4)r.transitions=null,N=0,_=0,k.length>0&&(k=[]);else if(k.length>0&&!c){for(let v=0,D=k.length;v<D;v++)k[v][kt]=void 0;k=[]}}if(i&&l.saveShared){l.structures.length>d&&(l.structures=l.structures.slice(0,d));let v=B.subarray(n,O);return l.updateSharedData()===!1?l.encode(y):v}L&Cv&&(O=n)}},this.findCommonStringsToPack=()=>(p=new Map,E||(E=Object.create(null)),y=>{let L=y&&y.threshold||4,v=this.pack?y.maxPrivatePackedValues||16:0;m||(m=this.sharedValues=[]);for(let[D,P]of p)P.count>L&&(E[D]=v++,m.push(D),i=!0);for(;this.saveShared&&this.updateSharedData()===!1;);p=null});const w=y=>{O>kn&&(B=H(O));var L=typeof y,v;if(L==="string"){if(h){let J=h[y];if(J>=0){J<16?B[O++]=J+224:(B[O++]=198,J&1?w(15-J>>1):w(J-16>>1));return}else if(p&&!t.pack){let T=p.get(y);T?T.count++:p.set(y,{count:1})}}let D=y.length;if(Ve&&D>=4&&D<1024){if((Ve.size+=D)>Ev){let T,ie=(Ve[0]?Ve[0].length*3+Ve[1].length:0)+10;O+ie>kn&&(B=H(O+ie)),B[O++]=217,B[O++]=223,B[O++]=249,B[O++]=Ve.position?132:130,B[O++]=26,T=O-n,O+=4,Ve.position&&Dd(n,w),Ve=["",""],Ve.size=0,Ve.position=T}let J=Tv.test(y);Ve[J?0:1]+=y,B[O++]=J?206:207,w(D);return}let P;D<32?P=1:D<256?P=2:D<65536?P=3:P=5;let q=D*3;if(O+q>kn&&(B=H(O+q)),D<64||!o){let J,T,ie,te=O+P;for(J=0;J<D;J++)T=y.charCodeAt(J),T<128?B[te++]=T:T<2048?(B[te++]=T>>6|192,B[te++]=T&63|128):(T&64512)===55296&&((ie=y.charCodeAt(J+1))&64512)===56320?(T=65536+((T&1023)<<10)+(ie&1023),J++,B[te++]=T>>18|240,B[te++]=T>>12&63|128,B[te++]=T>>6&63|128,B[te++]=T&63|128):(B[te++]=T>>12|224,B[te++]=T>>6&63|128,B[te++]=T&63|128);v=te-O-P}else v=o(y,O+P,q);v<24?B[O++]=96|v:v<256?(P<2&&B.copyWithin(O+2,O+1,O+1+v),B[O++]=120,B[O++]=v):v<65536?(P<3&&B.copyWithin(O+3,O+2,O+2+v),B[O++]=121,B[O++]=v>>8,B[O++]=v&255):(P<5&&B.copyWithin(O+5,O+3,O+3+v),B[O++]=122,ve.setUint32(O,v),O+=4),O+=v}else if(L==="number")if(!this.alwaysUseFloat&&y>>>0===y)y<24?B[O++]=y:y<256?(B[O++]=24,B[O++]=y):y<65536?(B[O++]=25,B[O++]=y>>8,B[O++]=y&255):(B[O++]=26,ve.setUint32(O,y),O+=4);else if(!this.alwaysUseFloat&&y>>0===y)y>=-24?B[O++]=31-y:y>=-256?(B[O++]=56,B[O++]=~y):y>=-65536?(B[O++]=57,ve.setUint16(O,~y),O+=2):(B[O++]=58,ve.setUint32(O,~y),O+=4);else{let D;if((D=this.useFloat32)>0&&y<4294967296&&y>=-2147483648){B[O++]=250,ve.setFloat32(O,y);let P;if(D<4||(P=y*Yl[(B[O]&127)<<1|B[O+1]>>7])>>0===P){O+=4;return}else O--}B[O++]=251,ve.setFloat64(O,y),O+=8}else if(L==="object")if(!y)B[O++]=246;else{if(s){let P=s.get(y);if(P){if(B[O++]=216,B[O++]=29,B[O++]=25,!P.references){let q=s.idsToInsert||(s.idsToInsert=[]);P.references=[],q.push(P)}P.references.push(O-n),O+=2;return}else s.set(y,{offset:O-n})}let D=y.constructor;if(D===Object)F(y);else if(D===Array){v=y.length,v<24?B[O++]=128|v:Qt(v);for(let P=0;P<v;P++)w(y[P])}else if(D===Map)if((this.mapsAsObjects?this.useTag259ForMaps!==!1:this.useTag259ForMaps)&&(B[O++]=217,B[O++]=1,B[O++]=3),v=y.size,v<24?B[O++]=160|v:v<256?(B[O++]=184,B[O++]=v):v<65536?(B[O++]=185,B[O++]=v>>8,B[O++]=v&255):(B[O++]=186,ve.setUint32(O,v),O+=4),l.keyMap)for(let[P,q]of y)w(l.encodeKey(P)),w(q);else for(let[P,q]of y)w(P),w(q);else{for(let P=0,q=jo.length;P<q;P++){let J=mm[P];if(y instanceof J){let T=jo[P],ie=T.tag;ie==null&&(ie=T.getTag&&T.getTag.call(this,y)),ie<24?B[O++]=192|ie:ie<256?(B[O++]=216,B[O++]=ie):ie<65536?(B[O++]=217,B[O++]=ie>>8,B[O++]=ie&255):ie>-1&&(B[O++]=218,ve.setUint32(O,ie),O+=4),T.encode.call(this,y,w,H);return}}if(y[Symbol.iterator]){if(Ws){let P=new Error("Iterable should be serialized as iterator");throw P.iteratorNotHandled=!0,P}B[O++]=159;for(let P of y)w(P);B[O++]=255;return}if(y[Symbol.asyncIterator]||Ys(y)){let P=new Error("Iterable/blob should be serialized as iterator");throw P.iteratorNotHandled=!0,P}if(this.useToJSON&&y.toJSON){const P=y.toJSON();if(P!==y)return w(P)}F(y)}}else if(L==="boolean")B[O++]=y?245:244;else if(L==="bigint"){if(y<BigInt(1)<<BigInt(64)&&y>=0)B[O++]=27,ve.setBigUint64(O,y);else if(y>-(BigInt(1)<<BigInt(64))&&y<0)B[O++]=59,ve.setBigUint64(O,-y-BigInt(1));else if(this.largeBigIntToFloat)B[O++]=251,ve.setFloat64(O,Number(y));else{y>=BigInt(0)?B[O++]=194:(B[O++]=195,y=BigInt(-1)-y);let D=[];for(;y;)D.push(Number(y&BigInt(255))),y>>=BigInt(8);zo(new Uint8Array(D.reverse()),H);return}O+=8}else if(L==="undefined")B[O++]=247;else throw new Error("Unknown type: "+L)},F=this.useRecords===!1?this.variableMapSize?y=>{let L=Object.keys(y),v=Object.values(y),D=L.length;if(D<24?B[O++]=160|D:D<256?(B[O++]=184,B[O++]=D):D<65536?(B[O++]=185,B[O++]=D>>8,B[O++]=D&255):(B[O++]=186,ve.setUint32(O,D),O+=4),l.keyMap)for(let P=0;P<D;P++)w(l.encodeKey(L[P])),w(v[P]);else for(let P=0;P<D;P++)w(L[P]),w(v[P])}:y=>{B[O++]=185;let L=O-n;O+=2;let v=0;if(l.keyMap)for(let D in y)(typeof y.hasOwnProperty!="function"||y.hasOwnProperty(D))&&(w(l.encodeKey(D)),w(y[D]),v++);else for(let D in y)(typeof y.hasOwnProperty!="function"||y.hasOwnProperty(D))&&(w(D),w(y[D]),v++);B[L+++n]=v>>8,B[L+n]=v&255}:(y,L)=>{let v,D=a.transitions||(a.transitions=Object.create(null)),P=0,q=0,J,T;if(this.keyMap){T=Object.keys(y).map(te=>this.encodeKey(te)),q=T.length;for(let te=0;te<q;te++){let C=T[te];v=D[C],v||(v=D[C]=Object.create(null),P++),D=v}}else for(let te in y)(typeof y.hasOwnProperty!="function"||y.hasOwnProperty(te))&&(v=D[te],v||(D[kt]&1048576&&(J=D[kt]&65535),v=D[te]=Object.create(null),P++),D=v,q++);let ie=D[kt];if(ie!==void 0)ie&=65535,B[O++]=217,B[O++]=ie>>8|224,B[O++]=ie&255;else if(T||(T=D.__keys__||(D.__keys__=Object.keys(y))),J===void 0?(ie=a.nextId++,ie||(ie=0,a.nextId=1),ie>=Rd&&(a.nextId=(ie=d)+1)):ie=J,a[ie]=T,ie<d){B[O++]=217,B[O++]=ie>>8|224,B[O++]=ie&255,D=a.transitions;for(let te=0;te<q;te++)(D[kt]===void 0||D[kt]&1048576)&&(D[kt]=ie),D=D[T[te]];D[kt]=ie|1048576,i=!0}else{if(D[kt]=ie,ve.setUint32(O,3655335680),O+=3,P&&(_+=N*P),k.length>=Rd-d&&(k.shift()[kt]=void 0),k.push(D),Qt(q+2),w(57344+ie),w(T),L)return;for(let te in y)(typeof y.hasOwnProperty!="function"||y.hasOwnProperty(te))&&w(y[te]);return}if(q<24?B[O++]=128|q:Qt(q),!L)for(let te in y)(typeof y.hasOwnProperty!="function"||y.hasOwnProperty(te))&&w(y[te])},H=y=>{let L;if(y>16777216){if(y-n>Ld)throw new Error("Encoded buffer would be larger than maximum buffer size");L=Math.min(Ld,Math.round(Math.max((y-n)*(y>67108864?1.25:2),4194304)/4096)*4096)}else L=(Math.max(y-n<<2,B.length-1)>>12)+1<<12;let v=new Vs(L);return ve=new DataView(v.buffer,0,L),B.copy?B.copy(v,0,n,y):v.set(B.slice(n,y)),O-=n,n=0,kn=v.length-10,B=v};let I=100,V=1e3;this.encodeAsIterable=function(y,L){return K(y,L,U)},this.encodeAsAsyncIterable=function(y,L){return K(y,L,z)};function*U(y,L,v){let D=y.constructor;if(D===Object){let P=l.useRecords!==!1;P?F(y,!0):vd(Object.keys(y).length,160);for(let q in y){let J=y[q];P||w(q),J&&typeof J=="object"?L[q]?yield*U(J,L[q]):yield*Q(J,L,q):w(J)}}else if(D===Array){let P=y.length;Qt(P);for(let q=0;q<P;q++){let J=y[q];J&&(typeof J=="object"||O-n>I)?L.element?yield*U(J,L.element):yield*Q(J,L,"element"):w(J)}}else if(y[Symbol.iterator]&&!y.buffer){B[O++]=159;for(let P of y)P&&(typeof P=="object"||O-n>I)?L.element?yield*U(P,L.element):yield*Q(P,L,"element"):w(P);B[O++]=255}else Ys(y)?(vd(y.size,64),yield B.subarray(n,O),yield y,R()):y[Symbol.asyncIterator]?(B[O++]=159,yield B.subarray(n,O),yield y,R(),B[O++]=255):w(y);v&&O>n?yield B.subarray(n,O):O-n>I&&(yield B.subarray(n,O),R())}function*Q(y,L,v){let D=O-n;try{w(y),O-n>I&&(yield B.subarray(n,O),R())}catch(P){if(P.iteratorNotHandled)L[v]={},O=n+D,yield*U.call(this,y,L[v]);else throw P}}function R(){I=V,l.encode(null,qs)}function K(y,L,v){return L&&L.chunkThreshold?I=V=L.chunkThreshold:I=100,y&&typeof y=="object"?(l.encode(null,qs),v(y,l.iterateProperties||(l.iterateProperties={}),!0)):[l.encode(y)]}async function*z(y,L){for(let v of U(y,L,!0)){let D=v.constructor;if(D===Od||D===Uint8Array)yield v;else if(Ys(v)){let P=v.stream().getReader(),q;for(;!(q=await P.read()).done;)yield q.value}else if(v[Symbol.asyncIterator])for await(let P of v)R(),P?yield*z(P,L.async||(L.async={})):yield l.encode(P);else yield v}}}useBuffer(t){B=t,ve=new DataView(B.buffer,B.byteOffset,B.byteLength),O=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 gm(n,this.sharedValues,this.sharedVersion),i=this.saveShared(r,a=>(a&&a.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((a,s)=>this.structures[s]=a),i}}function vd(e,t){e<24?B[O++]=t|e:e<256?(B[O++]=t|24,B[O++]=e):e<65536?(B[O++]=t|25,B[O++]=e>>8,B[O++]=e&255):(B[O++]=t|26,ve.setUint32(O,e),O+=4)}class gm{constructor(t,n,r){this.structures=t,this.packedValues=n,this.version=r}}function Qt(e){e<24?B[O++]=128|e:e<256?(B[O++]=152,B[O++]=e):e<65536?(B[O++]=153,B[O++]=e>>8,B[O++]=e&255):(B[O++]=154,ve.setUint32(O,e),O+=4)}const yv=typeof Blob>"u"?function(){}:Blob;function Ys(e){if(e instanceof yv)return!0;let t=e[Symbol.toStringTag];return t==="Blob"||t==="File"}function Ta(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++)Ta(e[r],t);else{let r=!t.encoder.useRecords;for(var n in e)e.hasOwnProperty(n)&&(r&&Ta(n,t),Ta(e[n],t))}break;case"function":console.log(e)}}const _v=new Uint8Array(new Uint16Array([1]).buffer)[0]==1;mm=[Date,Set,Error,RegExp,Jn,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?function(){}:BigInt64Array,Float32Array,Float64Array,gm];jo=[{tag:1,encode(e,t){let n=e.getTime()/1e3;(this.useTimestamp32||e.getMilliseconds()===0)&&n>=0&&n<4294967296?(B[O++]=26,ve.setUint32(O,n),O+=4):(B[O++]=251,ve.setFloat64(O,n),O+=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){zo(e,n)}},{getTag(e){if(e.constructor===Uint8Array&&(this.tagUint8Array||Hi&&this.tagUint8Array!==!1))return 64},encode(e,t,n){zo(e,n)}},Kt(68,1),Kt(69,2),Kt(70,4),Kt(71,8),Kt(72,1),Kt(77,2),Kt(78,4),Kt(79,8),Kt(85,4),Kt(86,8),{encode(e,t){let n=e.packedValues||[],r=e.structures||[];if(n.values.length>0){B[O++]=216,B[O++]=51,Qt(4);let i=n.values;t(i),Qt(0),Qt(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let a=0,s=i.length;a<s;a++)packedObjectMap[i[a]]=a}if(r){ve.setUint32(O,3655335424),O+=3;let i=r.slice(0);i.unshift(57344),i.push(new Jn(e.version,1399353956)),t(i)}else t(new Jn(e.version,1399353956))}}];function Kt(e,t){return!_v&&t>1&&(e-=4),{tag:e,encode:function(r,i){let a=r.byteLength,s=r.byteOffset||0,o=r.buffer||r;i(Hi?ds.from(o,s,a):new Uint8Array(o,s,a))}}}function zo(e,t){let n=e.byteLength;n<24?B[O++]=64+n:n<256?(B[O++]=88,B[O++]=n):n<65536?(B[O++]=89,B[O++]=n>>8,B[O++]=n&255):(B[O++]=90,ve.setUint32(O,n),O+=4),O+n>=B.length&&t(O+n),B.set(e.buffer?e:new Uint8Array(e),O),O+=n}function kv(e,t){let n,r=t.length*2,i=e.length-r;t.sort((a,s)=>a.offset>s.offset?1:-1);for(let a=0;a<t.length;a++){let s=t[a];s.id=a;for(let o of s.references)e[o++]=a>>8,e[o]=a&255}for(;n=t.pop();){let a=n.offset;e.copyWithin(a+r,a,i),r-=2;let s=a+r;e[s++]=216,e[s++]=28,i=a}return e}function Dd(e,t){ve.setUint32(Ve.position+e,O-Ve.position-e+1);let n=Ve;Ve=null,t(n[0]),t(n[1])}let Gl=new xv({useRecords:!1});const Av=Gl.encode;Gl.encodeAsIterable;Gl.encodeAsAsyncIterable;const Pd=512,Cv=1024,qs=2048;async function ot(e,t){var i;const n=await fetch("/api/rpc",{method:"POST",headers:{"Content-Type":"application/cbor",Accept:"application/cbor"},body:new Uint8Array(Av({method:e,params:t??{}}))});if(!n.ok){try{const a=await n.arrayBuffer(),s=Id(new Uint8Array(a));if((i=s==null?void 0:s.error)!=null&&i.message)throw new Error(s.error.message)}catch(a){if(a instanceof Error&&a.message!==`RPC call ${e} failed`)throw a}throw new Error(`RPC call ${e} failed: ${n.status} ${n.statusText}`)}const r=await n.arrayBuffer();return Id(new Uint8Array(r))}async function o4(e,t){return ot("fetchRuns",{worldEnv:e,params:t})}async function l4(e,t,n="all"){return ot("fetchRun",{worldEnv:e,runId:t,resolveData:n})}async function u4(e,t,n){return ot("fetchSteps",{worldEnv:e,runId:t,params:n})}async function c4(e,t,n,r="all"){return ot("fetchStep",{worldEnv:e,runId:t,stepId:n,resolveData:r})}async function d4(e,t,n){return ot("fetchEvents",{worldEnv:e,runId:t,params:n})}async function f4(e,t,n){return ot("fetchEventsByCorrelationId",{worldEnv:e,correlationId:t,params:n})}async function h4(e,t){return ot("fetchHooks",{worldEnv:e,params:t})}async function p4(e,t,n="all"){return ot("fetchHook",{worldEnv:e,hookId:t,resolveData:n})}async function m4(e,t){return ot("cancelRun",{worldEnv:e,runId:t})}async function g4(e,t,n){return ot("recreateRun",{worldEnv:e,runId:t,deploymentId:n})}async function b4(e,t){return ot("reenqueueRun",{worldEnv:e,runId:t})}async function E4(e,t,n){return ot("wakeUpRun",{worldEnv:e,runId:t,options:n})}async function T4(e,t,n){return ot("resumeHook",{worldEnv:e,token:t,payload:n})}async function x4(e,t){return ot("fetchStreams",{worldEnv:e,runId:t})}async function y4(e){return ot("fetchWorkflowsManifest",{worldEnv:e})}async function _4(e,t,n){return ot("runHealthCheck",{worldEnv:e,endpoint:t,options:n})}const wv=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Q0},Symbol.toStringTag,{value:"Module"}));export{Yv as $,l1 as A,iv as B,u1 as C,Zv as D,l4 as E,d4 as F,hf as G,Ov as H,It as I,Cu as J,Uv as K,Lv as L,gE as M,Wf as N,vv as O,er as P,ZN as Q,Bt as R,i4 as S,n4 as T,Dv as U,E1 as V,it as W,us as X,re as Y,Vv as Z,oO as _,r4 as a,yL as a0,Ma as a1,Wv as a2,ls as a3,In as a4,_i as a5,uO as a6,ra as a7,$v as a8,jv as a9,Gg as aA,Kg as aB,Qg as aC,Xg as aD,qg as aE,vg as aF,m4 as aG,b4 as aH,E4 as aI,T4 as aJ,g4 as aK,y4 as aL,pr as aa,cO as ab,Kv as ac,qv as ad,Gv as ae,zv as af,Jv as ag,am as ah,Qv as ai,p4 as aj,c4 as ak,u4 as al,x4 as am,um as an,JL as ao,rv as ap,Id as aq,Zt as ar,e4 as as,Xv as at,Pb as au,nv as av,lm as aw,$g as ax,Wg as ay,Yg as az,QL as b,vb as c,sm as d,Mv as e,k1 as f,qn as g,o4 as h,h4 as i,t4 as j,f4 as k,Ha as l,Zn as m,rf as n,Hd as o,dn as p,jm as q,_4 as r,km as s,Pv as t,a4 as u,zd as v,m1 as w,o1 as x,c1 as y,s4 as z};
171
+ `);return s+u+l})}return n},FR=/^[ \t]*<[\w!/?-]/,HR=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,UR=e=>typeof e!="string"||e.length===0||!FR.test(e)?e:e.replace(HR,"$1"),gd,bd,_a={...ui,protocols:{...ui.protocols,href:[...(bd=(gd=ui.protocols)==null?void 0:gd.href)!=null?bd:[],"tel"]}},Fo={raw:ko,sanitize:[kp,_a],harden:[FT,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},jR={gfm:[pC,{}]},Ed=Object.values(Fo),zR=Object.values(jR),$R={block:" ▋",circle:" ●"},VR={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Ft=b.createContext(VR),mm=b.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,...a})=>{let s=typeof e=="string"&&n?UR(e):e;return g.jsx(B0.Provider,{value:i,children:g.jsx(pm,{...a,children:s})})},(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 a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});mm.displayName="Block";var WR=["github-light","github-dark"],YR=b.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:r=!1,components:i,rehypePlugins:a=Ed,remarkPlugins:s=zR,className:o,shikiTheme:l=WR,mermaid:u,controls:d=!0,isAnimating:c=!1,animated:p,BlockComponent:h=mm,parseMarkdownIntoBlocksFn:m=MR,caret:E,plugins:k,remend:_,linkSafety:N={enabled:!0},allowedTags:C,...F})=>{let H=b.useId(),[I,V]=b.useTransition(),U=b.useMemo(()=>C?Object.keys(C):[],[C]),Q=b.useMemo(()=>{if(typeof e!="string")return"";let te=t==="streaming"&&n?xS(e,_):e;return U.length>0&&(te=BR(te,U)),te},[e,t,n,_,U]),O=b.useMemo(()=>m(Q),[Q,m]),[K,z]=b.useState(O);b.useEffect(()=>{t==="streaming"?V(()=>{z(O)}):z(O)},[O,t]);let x=t==="streaming"?K:O,L=b.useMemo(()=>x.map((te,w)=>`${H}-${w}`),[x.length,H]),v=b.useMemo(()=>p?p===!0?Do():Do(p):null,[p]),D=b.useMemo(()=>{var te,w;return{shikiTheme:(w=(te=k==null?void 0:k.code)==null?void 0:te.getThemes())!=null?w:l,controls:d,isAnimating:c,mode:t,mermaid:u,linkSafety:N}},[l,d,c,t,u,N,k==null?void 0:k.code]),P=b.useMemo(()=>({...mR,...i}),[i]),q=b.useMemo(()=>{let te=[];return k!=null&&k.cjk&&(te=[...te,...k.cjk.remarkPluginsBefore]),te=[...te,...s],k!=null&&k.cjk&&(te=[...te,...k.cjk.remarkPluginsAfter]),k!=null&&k.math&&(te=[...te,k.math.remarkPlugin]),te},[s,k==null?void 0:k.math,k==null?void 0:k.cjk]),J=b.useMemo(()=>{var te;let w=a;if(C&&Object.keys(C).length>0&&a===Ed){let he={..._a,tagNames:[...(te=_a.tagNames)!=null?te:[],...Object.keys(C)],attributes:{..._a.attributes,...C}};w=[Fo.raw,[kp,he],Fo.harden]}return k!=null&&k.math&&(w=[...w,k.math.rehypePlugin]),v&&c&&(w=[...w,v.rehypePlugin]),w},[a,k==null?void 0:k.math,v,c,C]),T=b.useMemo(()=>{if(!c||x.length===0)return!1;let te=x.at(-1);return ld(te)||ER(te)},[c,x]),ie=b.useMemo(()=>E&&c&&!T?{"--streamdown-caret":`"${$R[E]}"`}:void 0,[E,c,T]);return t==="static"?g.jsx(Po.Provider,{value:k??null,children:g.jsx(Ft.Provider,{value:D,children:g.jsx("div",{className:ce("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",o),children:g.jsx(pm,{components:P,rehypePlugins:J,remarkPlugins:q,...F,children:Q})})})}):g.jsx(Po.Provider,{value:k??null,children:g.jsx(Ft.Provider,{value:D,children:g.jsxs("div",{className:ce("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",E&&!T?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,o),style:ie,children:[x.length===0&&E&&c&&g.jsx("span",{}),x.map((te,w)=>{let he=w===x.length-1,ue=c&&he&&ld(te);return g.jsx(h,{components:P,content:te,index:w,isIncomplete:ue,rehypePlugins:J,remarkPlugins:q,shouldNormalizeHtmlIndentation:r,shouldParseIncompleteMarkdown:n,...F},L[w])})]})})})},(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);YR.displayName="Streamdown";var qR=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let l=b.useRef(null),u=b.useRef(null),[d,c]=b.useState(s),[p,h]=b.useState({x:0,y:0}),[m,E]=b.useState(!1),[k,_]=b.useState({x:0,y:0}),[N,C]=b.useState({x:0,y:0}),F=b.useCallback(z=>{c(x=>Math.max(n,Math.min(r,x+z)))},[n,r]),H=b.useCallback(()=>{F(i)},[F,i]),I=b.useCallback(()=>{F(-i)},[F,i]),V=b.useCallback(()=>{c(s),h({x:0,y:0})},[s]),U=b.useCallback(z=>{z.preventDefault();let x=z.deltaY>0?-i:i;F(x)},[F,i]),Q=b.useCallback(z=>{if(z.button!==0||z.isPrimary===!1)return;E(!0),_({x:z.clientX,y:z.clientY}),C(p);let x=z.currentTarget;x instanceof HTMLElement&&x.setPointerCapture(z.pointerId)},[p]),O=b.useCallback(z=>{if(!m)return;z.preventDefault();let x=z.clientX-k.x,L=z.clientY-k.y;h({x:N.x+x,y:N.y+L})},[m,k,N]),K=b.useCallback(z=>{E(!1);let x=z.currentTarget;x instanceof HTMLElement&&x.releasePointerCapture(z.pointerId)},[]);return b.useEffect(()=>{let z=l.current;if(z)return z.addEventListener("wheel",U,{passive:!1}),()=>{z.removeEventListener("wheel",U)}},[U]),b.useEffect(()=>{let z=u.current;if(z&&m)return document.body.style.userSelect="none",z.addEventListener("pointermove",O,{passive:!1}),z.addEventListener("pointerup",K),z.addEventListener("pointercancel",K),()=>{document.body.style.userSelect="",z.removeEventListener("pointermove",O),z.removeEventListener("pointerup",K),z.removeEventListener("pointercancel",K)}},[m,O,K]),g.jsxs("div",{className:ce("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:l,style:{cursor:m?"grabbing":"grab"},children:[a?g.jsxs("div",{className:ce("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:H,title:"Zoom in",type:"button",children:g.jsx(qI,{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:I,title:"Zoom out",type:"button",children:g.jsx(GI,{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:V,title:"Reset zoom and pan",type:"button",children:g.jsx(YI,{size:16})})]}):null,g.jsx("div",{className:ce("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:Q,ref:u,role:"application",style:{transform:`translate(${p.x}px, ${p.y}px) scale(${d})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},gm=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=b.useState(null),[o,l]=b.useState(!1),[u,d]=b.useState(""),[c,p]=b.useState(""),[h,m]=b.useState(0),{mermaid:E}=b.useContext(Ft),k=Yl(),_=E==null?void 0:E.errorComponent,{shouldRender:N,containerRef:C}=CI({immediate:r});if(b.useEffect(()=>{if(N){if(!k){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),l(!0);let H=k.getMermaid(n),I=e.split("").reduce((Q,O)=>(Q<<5)-Q+O.charCodeAt(0)|0,0),V=`mermaid-${Math.abs(I)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:U}=await H.render(V,e);d(U),p(U)}catch(H){if(!(c||u)){let I=H instanceof Error?H.message:"Failed to render Mermaid chart";s(I)}}finally{l(!1)}})()}},[e,n,h,N,k]),!(N||u||c))return g.jsx("div",{className:ce("my-4 min-h-[200px]",t),ref:C});if(o&&!u&&!c)return g.jsx("div",{className:ce("my-4 flex justify-center p-4",t),ref:C,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(a&&!u&&!c){let H=()=>m(I=>I+1);return _?g.jsx("div",{ref:C,children:g.jsx(_,{chart:e,error:a,retry:H})}):g.jsxs("div",{className:ce("rounded-md bg-red-50 p-4",t),ref:C,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),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 F=u||c;return g.jsx("div",{className:ce("size-full",t),"data-streamdown":"mermaid",ref:C,children:g.jsx(qR,{className:ce(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:ce("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:F},role:"img"})})})};const GR=40,KR=8,mr=56,za=8,Si=2,In=24,ps=24,a4=8,XR=()=>{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},Gl={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},Td=e=>(e.timelineWidth-e.scrollbarWidth)/e.root.duration,Kl=b.createContext({state:Gl,dispatch:()=>{}});Kl.displayName="TraceViewerContext";const Be=(e,t)=>{var n;switch(t.type){case"setRoot":return e.scrollSnapshotRef.current=void 0,e.memoCacheRef.current.clear(),Be({...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-mr-GR-3*KR,i=e.withPanel&&t.width<=768;let a={...e,width:t.width,height:t.height,timelineWidth:t.width-+!!(e.selected&&e.withPanel&&!i)*e.panelWidth,timelineHeight:r,panelHeight:r,isMobile:i};return a.width!==e.width&&(a=Be(a,{type:"detectBaseScale"})),a}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 Be({...e,timelineWidth:i,panelWidth:r},{type:"detectBaseScale"})}case"setFilter":return{...e,filter:t.filter};case"deselect":return Be({...e,selected:null,timelineWidth:e.width},{type:"detectBaseScale"});case"select":{const r=e.spanMap[t.id];return r?Be({...e,selected:r,timelineWidth:e.width-(e.withPanel&&!e.isMobile?e.panelWidth:0)},{type:"detectBaseScale"}):e}case"escape":return e.selected?Be(e,{type:"deselect"}):Be(e,{type:"resetScale"});case"toggleSelection":{let r=e;return e.selected&&(r=Be(r,{type:"deselect"})),((n=e.selected)==null?void 0:n.span.spanId)===t.id?r:Be(r,{type:"select",id:t.id})}case"detectBaseScale":{const r=(e.timelineWidth-e.scrollbarWidth)/e.root.duration;return Be({...e,baseScale:r,scale:r*e.scaleRatio},{type:"minScale"})}case"setScale":return{...e,scaleRatio:t.scale,scale:e.baseScale*t.scale};case"resetScale":return Be(e,{type:"scaleToRange",t1:e.root.startTime,t2:e.root.endTime});case"scaleToNode":{const r=e.spanMap[t.id];return r?Be(Be(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 Be(Be(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:a,scrollLeft:s}=i;return Be(Be({...e,scaleRatio:r,scale:e.baseScale*r},{type:"minScale"}),{type:"setScrollSnapshot",anchorT:(s+a*.5)/e.scale,anchorX:a*.5})}case"trackpadScale":{const r=Td(e)/e.baseScale,i=Math.max(r,e.scaleRatio*(1+.2*Math.sign(t.delta)*Math.sqrt(Math.abs(t.delta))));return Be({...e,scaleRatio:i,scale:e.baseScale*i},{type:"setScrollSnapshot",anchorT:t.anchorT,anchorX:t.anchorX})}case"minScale":{const r=Td(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:a}=t,s=i*e.scale-a,{scrollTop:o}=r,l=(o-ps-za)/(In+Si),u=l+Math.ceil(e.timelineHeight/(In+Si));return e.scrollSnapshotRef.current={anchorT:i,anchorX:a,scrollLeft:s,scrollTop:o,startTime:e.root.startTime+s/e.scale,endTime:e.root.startTime+(s+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 Be({...e,withPanel:t.withPanel,timelineWidth:r},{type:"detectBaseScale"})}case"forceRender":return e.memoCacheRef.current.set("",{}),{...e};case"updateRoot":return e.memoCacheRef.current.set("",{}),Be({...e,root:t.root,spanMap:t.spanMap,resourceMap:Object.fromEntries(t.resources.map(({name:r,attributes:i})=>[r,i]))},{type:"detectBaseScale"})}};function s4({getQuickLinks:e,withPanel:t=!1,children:n,customSpanClassNameFunc:r,customSpanEventClassNameFunc:i,customPanelComponent:a=null}){const s=b.useRef(null),o=b.useRef(void 0),l=b.useRef(e);l.current=e;const u=b.useRef(new Map),d=b.useRef(new Map),[c,p]=b.useReducer(Be,Gl,m=>({...m,scrollbarWidth:XR(),timelineRef:s,scrollSnapshotRef:o,customSpanClassNameFunc:r,customSpanEventClassNameFunc:i,memoCacheRef:u,withPanel:t,getQuickLinks:E=>{var C;const k=E.spanId,_=d.current.get(k);if(_)return _;const N=((C=l.current)==null?void 0:C.call(l,E))||[];return d.current.set(k,N),N}}));b.useEffect(()=>p({type:"setWithPanel",withPanel:t}),[t]);const h=b.useMemo(()=>({state:c,dispatch:p}),[c,p]);return g.jsx(bm.Provider,{value:a,children:g.jsx(Kl.Provider,{value:h,children:n})})}const ms=()=>b.useContext(Kl),bm=b.createContext(null),QR=()=>b.useContext(bm),JR="_traceNode_1fmf2_1",ZR="_childRow_1fmf2_5",eO="_spanNode_1fmf2_11",tO="_huge_1fmf2_31",nO="_spanName_1fmf2_34",rO="_spanSpacer_1fmf2_40",iO="_spanDuration_1fmf2_44",aO="_small_1fmf2_62",sO="_xHover_1fmf2_62",oO="_spanNodeEvent_1fmf2_118",lO="_eventDiamond_1fmf2_124",uO="_customEventColor_1fmf2_140",cO="_hoverInfo_1fmf2_145",dO="_eventName_1fmf2_149",fO="_eventTimestamp_1fmf2_153",hO="_alignStart_1fmf2_174",pO="_alignEnd_1fmf2_178",mO="_colorVercel_1fmf2_205",gO="_color0_1fmf2_213",bO="_color1_1fmf2_220",EO="_color2_1fmf2_227",TO="_color3_1fmf2_234",yO="_color4_1fmf2_241",xO="_colorHighlight_1fmf2_248",_O="_unlit_1fmf2_256",kO="_mapContainer_1fmf2_262",AO="_spanDetailPanel_1fmf2_329",wO="_spanDetailPanelResizer_1fmf2_338",CO="_spanDetailPanelTop_1fmf2_353",SO="_spanDetailPanelBody_1fmf2_362",NO="_spanDetailPanelTopInfo_1fmf2_375",IO="_spanNameDetailPanel_1fmf2_389",RO="_spanDetailPanelTruncatedHeading_1fmf2_395",OO="_spanDetailPanelName_1fmf2_405",LO="_spanDetailPanelDuration_1fmf2_416",vO="_spanDetailPanelCorner_1fmf2_427",DO="_spanDetailPanelCornerInner_1fmf2_437",PO="_spanDetailPanelCloseVerticalRule_1fmf2_445",MO="_spanDetailPanelClose_1fmf2_445",BO="_spanDetailPanelAttribute_1fmf2_467",FO="_spanDetailPanelAttributeKey_1fmf2_484",HO="_spanDetailPanelAttributeValue_1fmf2_492",UO="_spanDetailPanelQuickLink_1fmf2_503",jO="_spanDetailPanelQuickLinkLabel_1fmf2_506",zO="_detailGroup_1fmf2_519",$O="_expanded_1fmf2_533",VO="_collapsed_1fmf2_534",WO="_ancestorGroup_1fmf2_535",YO="_detailHeading_1fmf2_539",qO="_buttonLink_1fmf2_562",GO="_note_1fmf2_581",KO="_skeleton_1fmf2_589",XO="_skeletonRounded_1fmf2_595",QO="_detailHeadingIcon_1fmf2_599",JO="_infraSpanDescription_1fmf2_603",ZO="_ancestorNode_1fmf2_613",e6="_ancestorText_1fmf2_629",t6="_ancestorName_1fmf2_639",n6="_ancestorDuration_1fmf2_644",r6="_ancestorLineContainer_1fmf2_649",i6="_ancestorLine_1fmf2_649",a6="_zoomButtonGroup_1fmf2_701",s6="_zoomButton_1fmf2_701",o6="_divider_1fmf2_751",l6="_markersContainer_1fmf2_758",u6="_markers_1fmf2_758",c6="_marker_1fmf2_758",d6="_notch_1fmf2_792",f6="_markerLabel_1fmf2_798",h6="_markerClockTime_1fmf2_807",p6="_eventMarkersContainer_1fmf2_816",m6="_eventMarkers_1fmf2_816",g6="_eventMarker_1fmf2_816",b6="_cursorMarkerStickyParent_1fmf2_839",E6="_cursorMarkerLabelContainer_1fmf2_848",T6="_cursorMarkerLabel_1fmf2_848",y6="_cursorMarkerContainer_1fmf2_898",x6="_cursorMarker_1fmf2_839",_6="_cursorSelection_1fmf2_916",k6="_traceViewer_1fmf2_966",A6="_mapCanvas_1fmf2_972",w6="_zoomButtonTraceViewer_1fmf2_988",C6="_timeline_1fmf2_1011",S6="_searchBar_1fmf2_1019",N6="_searchInput_1fmf2_1031",I6="_searchInputLabel_1fmf2_1038",R6="_searchInputPrefix_1fmf2_1063",O6="_mapThumb_1fmf2_1101",L6="_spanDetailPanelTraceViewer_1fmf2_1115",v6="_traceViewerContent_1fmf2_1134",D6="_inert_1fmf2_1144",P6="_hidden_1fmf2_1180",M6="_mobile_1fmf2_1184",B6="_spanRunning_1fmf2_1194",F6="_spanPending_1fmf2_1195",H6="_spanCompleted_1fmf2_1203",U6="_spanCancelled_1fmf2_1211",j6="_spanFailed_1fmf2_1219",z6="_spanPendingStriped_1fmf2_1228",$6="_hasQueuedTime_1fmf2_1242",V6="_spanSleep_1fmf2_1254",W6="_spanHook_1fmf2_1263",Y6="_segmentLayer_1fmf2_1275",q6="_segment_1fmf2_1275",G6="_segmentLabel_1fmf2_1291",K6="_segmentTag_1fmf2_1306",X6="_segQueued_1fmf2_1314",Q6="_segRunning_1fmf2_1325",J6="_segFailed_1fmf2_1330",Z6="_segRetrying_1fmf2_1335",eL="_segSucceeded_1fmf2_1346",tL="_segWaiting_1fmf2_1351",nL="_segSleeping_1fmf2_1362",rL="_segReceived_1fmf2_1367",iL="_boundaryMarker_1fmf2_1372",aL="_boundaryLine_1fmf2_1373",sL="_hasSegments_1fmf2_1395",oL="_eventFailed_1fmf2_1432",lL="_eventRetrying_1fmf2_1441",uL="_eventHook_1fmf2_1450",cL="_eventDefault_1fmf2_1459",re={traceNode:JR,childRow:ZR,spanNode:eO,huge:tO,spanName:nO,spanSpacer:rO,spanDuration:iO,small:aO,xHover:sO,spanNodeEvent:oO,eventDiamond:lO,customEventColor:uO,hoverInfo:cO,eventName:dO,eventTimestamp:fO,alignStart:hO,alignEnd:pO,colorVercel:mO,color0:gO,color1:bO,color2:EO,color3:TO,color4:yO,colorHighlight:xO,unlit:_O,mapContainer:kO,spanDetailPanel:AO,spanDetailPanelResizer:wO,spanDetailPanelTop:CO,spanDetailPanelBody:SO,spanDetailPanelTopInfo:NO,spanNameDetailPanel:IO,spanDetailPanelTruncatedHeading:RO,spanDetailPanelName:OO,spanDetailPanelDuration:LO,spanDetailPanelCorner:vO,spanDetailPanelCornerInner:DO,spanDetailPanelCloseVerticalRule:PO,spanDetailPanelClose:MO,spanDetailPanelAttribute:BO,spanDetailPanelAttributeKey:FO,spanDetailPanelAttributeValue:HO,spanDetailPanelQuickLink:UO,spanDetailPanelQuickLinkLabel:jO,detailGroup:zO,expanded:$O,collapsed:VO,ancestorGroup:WO,detailHeading:YO,buttonLink:qO,note:GO,skeleton:KO,skeletonRounded:XO,detailHeadingIcon:QO,infraSpanDescription:JO,ancestorNode:ZO,ancestorText:e6,ancestorName:t6,ancestorDuration:n6,ancestorLineContainer:r6,ancestorLine:i6,zoomButtonGroup:a6,"zoom-buttons-fade-in":"_zoom-buttons-fade-in_1fmf2_1",zoomButton:s6,divider:o6,markersContainer:l6,markers:u6,marker:c6,notch:d6,markerLabel:f6,markerClockTime:h6,eventMarkersContainer:p6,eventMarkers:m6,eventMarker:g6,cursorMarkerStickyParent:b6,cursorMarkerLabelContainer:E6,cursorMarkerLabel:T6,cursorMarkerContainer:y6,cursorMarker:x6,cursorSelection:_6,traceViewer:k6,"span-skeleton":"_span-skeleton_1fmf2_1",mapCanvas:A6,zoomButtonTraceViewer:w6,timeline:C6,searchBar:S6,searchInput:N6,searchInputLabel:I6,searchInputPrefix:R6,mapThumb:O6,spanDetailPanelTraceViewer:L6,traceViewerContent:v6,inert:D6,hidden:P6,mobile:M6,spanRunning:B6,spanPending:F6,spanCompleted:H6,spanCancelled:U6,spanFailed:j6,spanPendingStriped:z6,hasQueuedTime:$6,spanSleep:V6,spanHook:W6,segmentLayer:Y6,segment:q6,segmentLabel:G6,segmentTag:K6,segQueued:X6,segRunning:Q6,segFailed:J6,segRetrying:Z6,segSucceeded:eL,segWaiting:tL,segSleeping:nL,segReceived:rL,boundaryMarker:iL,boundaryLine:aL,hasSegments:sL,eventFailed:oL,eventRetrying:lL,eventHook:uL,eventDefault:cL};function la([e,t]){return e*1e3+t/1e6}function o4(e){return[Math.floor(e/1e3),e%1e3*1e3]}const l4=e=>Rt(e,!0),yd=new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2});function u4(e){return e>=1e3?`${yd.format(e/1e3)}s`:`${yd.format(e)}ms`}function c4(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"),a=String(t.getMilliseconds()).padStart(3,"0");return`${n}:${r}:${i}.${a}`}const dL={queued:"segQueued",running:"segRunning",failed:"segFailed",retrying:"segRetrying",succeeded:"segSucceeded",waiting:"segWaiting",sleeping:"segSleeping",received:"segReceived"};function fL(e){return Math.max(0,Math.min(1,e))}function nn(e,t,n){return n<=0?0:fL((e-t)/n)}function zi(e){return[...e].sort((t,n)=>t.timestamp-n.timestamp)}function hL(e){const t=e.events?zi(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const a=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(a.length===0)return i.push({startFraction:0,endFraction:1,status:"running"}),i;const s=a[0],o=nn(s.time,n,r);o>.001&&i.push({startFraction:0,endFraction:o,status:"queued"});for(let l=0;l<a.length;l++){const u=a[l],d=nn(u.time,n,r),c=a[l+1],p=c?nn(c.time,n,r):1;if(u.type==="step_started")if(l===a.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:p,status:E})}else u.type==="step_retrying"?i.push({startFraction:d,endFraction:p,status:"retrying"}):u.type==="step_failed"?d<.999&&i.push({startFraction:d,endFraction:1,status:"failed"}):u.type}return i}function pL(e){const t=e.events?zi(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const a=t.find(u=>u.event.name==="hook_received"),s=t.find(u=>u.event.name==="hook_disposed");if(!a&&!s)return i.push({startFraction:0,endFraction:1,status:"waiting"}),i;const o=a?nn(a.timestamp,n,r):null,l=s?nn(s.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 mL(e){const t=e.events?zi(e.events):[],{startTime:n,duration:r}=e,i=[];if(r<=0)return i;const a=t.find(o=>o.event.name==="wait_completed");if(!a)return i.push({startFraction:0,endFraction:1,status:"sleeping"}),i;const s=nn(a.timestamp,n,r);return s>.001&&i.push({startFraction:0,endFraction:s,status:"sleeping"}),i.push({startFraction:s,endFraction:1,status:"succeeded"}),i}function gL(e){const t=e.events?zi(e.events):[],{startTime:n,duration:r,activeStartTime:i}=e,a=[];if(r<=0)return a;const s=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=nn(i,n,r);u>.001&&(a.push({startFraction:0,endFraction:u,status:"queued"}),l=u)}if(s){const u=nn(s.timestamp,n,r);u>l+.001&&a.push({startFraction:l,endFraction:u,status:"running"}),a.push({startFraction:u,endFraction:1,status:"failed"})}else if(o){const u=nn(o.timestamp,n,r);u>l+.001&&a.push({startFraction:l,endFraction:u,status:"running"}),a.push({startFraction:u,endFraction:1,status:"succeeded"})}else a.push({startFraction:l,endFraction:1,status:"running"});return a}const bL={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 ua(e,t){const n=e.events?zi(e.events):[],{startTime:r,duration:i}=e;if(i<=0)return[];const a=[];for(const s of n){if(!t.includes(s.event.name))continue;const o=nn(s.timestamp,r,i);o<.01||o>.99||a.push({fraction:o,label:bL[s.event.name]??s.event.name,offsetMs:s.timestamp-r})}return a}function Em(e,t){switch(e){case"step":return{segments:hL(t),boundaries:ua(t,["step_started","step_retrying","step_failed","step_completed"])};case"hook":return{segments:pL(t),boundaries:ua(t,["hook_created","hook_received","hook_disposed"])};case"sleep":return{segments:mL(t),boundaries:ua(t,["wait_created","wait_completed"])};case"run":return{segments:gL(t),boundaries:ua(t,["run_completed","run_failed"])};default:return{segments:[],boundaries:[]}}}function EL(e){return e.isInstrumentationHint?"Get Started":Rt(e.duration)}const Tm={queued:"Queued",running:"",failed:"Failed",retrying:"Retry wait",succeeded:"Executed",waiting:"Waiting",sleeping:"Sleeping",received:"Received"};function TL({segments:e,spanDuration:t}){return e.length===0?null:g.jsx("div",{className:re.segmentLayer,children:e.map((n,r)=>{const i=re[dL[n.status]],a=(n.endFraction-n.startFraction)*t,s=Tm[n.status],o={left:`${n.startFraction*100}%`,width:`${(n.endFraction-n.startFraction)*100}%`};return g.jsx("div",{className:`${re.segment} ${String(i)}`,style:o,title:s?`${s} ${Rt(a)}`:Rt(a)},`seg-${n.status}-${String(r)}`)})})}function yL(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r],a=Tm[i.status];if(!a)continue;let s=(i.endFraction-i.startFraction)*t;if(s<1&&(i.status==="succeeded"||i.status==="failed")&&r>0){const o=e[r-1];o.status==="running"&&(s=(o.endFraction-o.startFraction)*t)}s<1||n.push({label:a,duration:Rt(s)})}return n}function ym({node:e,layout:t,durationMs:n,segmentTags:r}){const i=e.isInstrumentationHint?EL(e):Rt(n??e.duration);if(t.isSmall&&!t.isHovered)return null;const a=r&&r.length>0&&(t.isHovered||t.width>200);return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:re.spanName,children:[e.label||e.span.name,a?r.map((s,o)=>g.jsxs("span",{className:re.segmentTag,children:[" · ",s.label," ",s.duration]},o)):null]}),t.isHuge?g.jsx("span",{className:re.spanSpacer}):null,t.isHovered||t.width>128?g.jsx("span",{className:re.spanDuration,children:i}):null]})}function xL({node:e,layout:t}){return g.jsx(ym,{node:e,layout:t})}function gs({resourceType:e,node:t,layout:n,durationMs:r}){const i=r??t.duration,{segments:a}=Em(e,t),s=yL(a,i);return g.jsxs(g.Fragment,{children:[g.jsx(TL,{segments:a,spanDuration:i}),g.jsx(ym,{durationMs:i,node:t,layout:n,segmentTags:s})]})}function _L(e){return g.jsx(gs,{resourceType:"run",...e})}function kL(e){return g.jsx(gs,{resourceType:"step",...e})}function AL(e){return g.jsx(gs,{resourceType:"hook",...e})}function wL(e){return g.jsx(gs,{resourceType:"sleep",...e})}function CL({resourceType:e,...t}){switch(e){case"run":return g.jsx(_L,{...t});case"step":return g.jsx(kL,{...t});case"hook":return g.jsx(AL,{...t});case"sleep":return g.jsx(wL,{...t});default:return g.jsx(xL,{...t})}}const SL=4;function NL(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 IL(e){return e<64}function RL(e){return e>=500}function OL(e,t){return e.isHovered&&!t&&e.isHighlighted!==!1}function LL(e,t,n,r){if(!r)return!1;let i=t.duration,a=t.endTime;const s=n.current;return s&&(i=s.endTime-s.startTime,a=s.endTime),a-e.startTime<.25*i}function $i(e,t,n,r){const i=(e.startTime-t.startTime)*n;let a=ps+(In+Si)*e.row;const s=e.duration*n,o=Math.max(s,SL);let l=In;const u=RL(s),d=IL(s),c=OL(e,u),p=c||!!e.isSelected;d&&!p&&(l*=.4,a+=(In-l)*.5);const h=LL(e,t,r,p);return{width:o,actualWidth:s,height:l,top:a,left:i,isSmall:d,isHuge:u,isHovered:c,isExpanded:p,isNearRightSide:h}}function vL(e,t,n,r){return $i(e,t,n,r)}function DL(e,t,n,r){return $i(e,t,n,r)}function PL(e,t,n,r){return $i(e,t,n,r)}function ML(e,t,n,r){return $i(e,t,n,r)}function BL(e,t,n,r,i){switch(e){case"run":return vL(t,n,r,i);case"step":return DL(t,n,r,i);case"hook":return PL(t,n,r,i);case"sleep":return ML(t,n,r,i);default:return $i(t,n,r,i)}}const Xl=e=>e.isVercel?String(re.colorVercel):String(re[`color${e.resourceIndex%5}`]);function FL(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 d4=b.memo(function({root:t,scale:n,spans:r,isLive:i=!1,scrollSnapshotRef:a,cache:s,customSpanClassNameFunc:o,customSpanEventClassNameFunc:l}){return r.map(u=>g.jsx(UL,{cacheKey:s.get(u.span.spanId),customSpanEventClassNameFunc:l,customSpanClassNameFunc:o,node:u,root:t,scale:n,traceIsLive:i,scrollSnapshotRef:a},u.span.spanId))});function HL(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 UL=b.memo(function({node:t,root:n,scale:r,traceIsLive:i=!1,scrollSnapshotRef:a,customSpanClassNameFunc:s,customSpanEventClassNameFunc:o}){var D;const l=b.useRef(null);b.useEffect(()=>(t.ref=l,()=>{t.ref=void 0}),[t]);const{span:u}=t,d=NL(t),[c,p]=b.useState(0),h=s?s(t):"",m=d!=="default",E=(D=u.attributes)==null?void 0:D.data,k=FL(d,t),_=k!=null,C=(d==="hook"?!!(E!=null&&E.disposedAt):!!(E!=null&&E.completedAt))||_,F=i&&m&&!C;b.useEffect(()=>{if(!F)return;p(Date.now());const P=setInterval(()=>{p(Date.now())},250);return()=>clearInterval(P)},[F]);const H=la(u.startTime),I=la(u.endTime),V=la(u.duration),U=u.activeStartTime?la(u.activeStartTime):void 0,Q=k!=null?Math.max(0,k-H):F?Math.max(0,(c||Date.now())-H):V,O=t.isInstrumentationHint?"Get Started":Rt(Q),K={...t,startTime:H,endTime:I,duration:V,activeStartTime:U},z=F?{...K,duration:Q,endTime:H+Q}:K,x=m&&Em(d,z).segments.length>0,L=BL(d,z,n,r,a);if(F){const q=Q*r,J=Math.max(q,4);L.actualWidth=q,L.width=J,L.isSmall=q<64,L.isHuge=q>=500,L.isSmall||(L.height=In,L.top=ps+(In+Si)*z.row)}b.useEffect(()=>{if(!F||!l.current)return;let P=0;const q=()=>{const J=l.current;if(!J)return;const T=Date.now()-H,ie=Math.max(T*r,2);J.style.width=`${ie}px`,J.style.setProperty("--span-width",`${ie}px`),P=requestAnimationFrame(q)};return P=requestAnimationFrame(q),()=>cancelAnimationFrame(P)},[F,H,r]);const v=z;return g.jsxs(g.Fragment,{children:[g.jsx("button",{"aria-label":`${u.name} - ${O}`,className:at(re.spanNode,L.isHuge&&re.huge,L.isSmall&&re.small,L.isExpanded&&re.xHover,t.isHighlighted?re.colorHighlight:Xl(t),t.isHighlighted===!1&&re.unlit,h,x&&re.hasSegments),"data-span-id":u.spanId,"data-start-time":z.startTime-n.startTime,"data-right-side":L.isNearRightSide,"data-selected":t.isSelected?"":void 0,ref:l,style:HL(L,z,n,r),type:"button",children:g.jsx(CL,{durationMs:Q,resourceType:d,node:v,layout:L})}),z.events&&!L.isSmall?z.events.map(P=>g.jsx(zL,{customSpanEventClassNameFunc:o,event:P,node:z,root:n,scale:r,asBoundary:m},P.key)):null]})}),jL={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"},zL=b.memo(function({event:t,node:n,root:r,scale:i,customSpanEventClassNameFunc:a,asBoundary:s=!1}){const o=b.useRef(null);b.useEffect(()=>(t.ref=o,()=>{t.ref=void 0}),[t]);const{event:{name:l}}=t,u=Rt(t.timestamp-r.startTime),d=s?jL[l]??l:l,c=s&&(l==="step_started"||l==="run_started"||l==="step_retrying"),p=s&&(l==="step_completed"||l==="run_completed");let h=null,m=null;if((c||p)&&n.events){const C=[...n.events].sort((H,I)=>H.timestamp-I.timestamp),F=C.findIndex(H=>H.key===t.key);if(p){let H=null;for(let I=F-1;I>=0;I--)if(C[I].event.name==="step_started"){H=C[I].timestamp;break}H!==null&&(h=Rt(t.timestamp-H),m="Executed")}else{const H=C[F+1],I=H?H.timestamp:n.endTime;h=Rt(I-t.timestamp),m=l==="step_retrying"?"Waited":"Executed"}}const E=(t.timestamp-r.startTime)*i,k=ps+(In+Si)*n.row,_=n.duration<=0||(t.timestamp-n.startTime)/n.duration<.5,N=a?a(t):"";return g.jsxs("div",{title:h?`${d} ${u}
172
+ ${m} ${h}`:`${d} ${u}`,className:at(re.spanNodeEvent,N,s&&re.boundaryMarker,n.isHighlighted?re.colorHighlight:Xl(n),n.isHighlighted===!1&&re.unlit),"data-hovered":t.isHovered,ref:o,style:{left:E,top:k},children:[g.jsx("div",{className:at(re.hoverInfo,_?re.alignStart:re.alignEnd),children:s?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:re.eventName,children:d}),g.jsx("span",{className:re.eventTimestamp,children:u}),h?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:re.eventName,children:m}),g.jsx("span",{className:re.eventTimestamp,children:h})]}):null]}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:re.eventName,children:l}),g.jsx("span",{className:re.eventTimestamp,children:u})]})}),s?g.jsx("div",{className:re.boundaryLine}):g.jsx("div",{className:re.eventDiamond})]})}),xm={"gray-700":"var(--ds-gray-700)","gray-900":"var(--ds-gray-900)"};function $L({size:e=16,color:t="gray-700"}){const n={color:xm[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 VL({size:e=16}){return g.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,className:re.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 WL({size:e=16,color:t="gray-900"}){const n={color:xm[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 YL(e){const{as:t,className:n,href:r,children:i,...a}=e;return(t||"a")==="span"||!r?g.jsx("span",{className:n,...a,children:i}):g.jsx("a",{className:n,href:r,...a,children:i})}function qL(e){const{className:t,children:n,size:r,...i}=e;return g.jsx("a",{...i,className:at(re.buttonLink,t),children:n})}function GL({children:e,className:t}){return g.jsx("div",{className:at(re.note,t),children:e})}function xd({width:e,height:t,rounded:n}){return g.jsx("span",{className:at(re.skeleton,n&&re.skeletonRounded),style:{width:e,height:t},"aria-hidden":!0})}const _d=e=>`${(100*e).toFixed(3)}%`,kd=(e,t)=>e<t?-1:e>t?1:0,Ad=e=>{const t={};for(const[r,i]of Object.entries(e)){const a=r.indexOf(".");let s="",o="";a!==-1?(s=r.substring(0,a),o=r.substring(a+1)):o=r;let l=t[s];l||(l={prefix:s,attributes:[]},t[s]=l),l.attributes.push({key:r,suffix:o,value:String(i)})}const n=Array.from(Object.values(t)).sort((r,i)=>kd(r.prefix,i.prefix));for(const r of n)r.attributes.sort((i,a)=>kd(i.suffix,a.suffix));return n},KL=(e,t)=>{const n=[];if(!t)return n;for(let r=t;"parent"in r;r=r.parent)n.unshift(r);return n},XL=()=>{var d;const{state:{root:e,selected:t,resourceMap:n,getQuickLinks:r},dispatch:i}=ms(),a=b.useMemo(()=>KL(e,t),[e,t]),s=b.useMemo(()=>Ad((t==null?void 0:t.span.attributes)??{}),[t]),o=b.useMemo(()=>{const c=t==null?void 0:t.span.resource;if(!c)return[];const p=n[c];return p?Ad(p):[]},[n,t]);if(!t)return null;const{span:l}=t,u=_m(t);return g.jsxs(g.Fragment,{children:[t.isVercel?g.jsx(ev,{node:t}):null,t.isInstrumentationHint?g.jsx(iv,{}):null,!t.isInstrumentationHint&&a.length?g.jsx(Sn,{className:re.ancestorGroup,name:"Location",children:a.map(c=>g.jsxs("button",{className:re.ancestorNode,onClick:()=>i({type:"select",id:c.span.spanId}),type:"button",children:[g.jsxs("div",{className:re.ancestorText,children:[g.jsx("span",{className:re.ancestorName,children:c.label||c.span.name}),g.jsx("span",{className:re.ancestorDuration,children:Rt(c.duration)})]}),g.jsx("span",{"aria-hidden":!0,className:re.ancestorLineContainer,children:g.jsx("span",{className:at(re.ancestorLine,Xl(c)),style:{left:_d((c.startTime-e.startTime)/e.duration),width:_d(c.duration/e.duration)}})})]},`${t.span.spanId}.${c.span.spanId}`))}):null,u?g.jsx(tv,{getQuickLinks:r,span:t.span}):null,(d=t.events)!=null&&d.length?g.jsx(Sn,{name:"Events",children:t.events.map(c=>g.jsxs(b.Fragment,{children:[g.jsxs("dl",{className:re.spanDetailPanelAttribute,children:[g.jsx("dt",{className:re.spanDetailPanelAttributeKey,children:c.event.name}),g.jsx("dd",{className:re.spanDetailPanelAttributeValue,children:Rt(c.timestamp-e.startTime)})]}),Object.entries(c.event.attributes).map(([p,h])=>g.jsx(Yr,{name:`${c.event.name}.${p}`,value:h},p))]},c.key))}):null,s.length?g.jsx(Sn,{name:"Attributes",children:s.map(c=>g.jsx(b.Fragment,{children:c.attributes.map(({key:p,value:h})=>g.jsx(Yr,{name:p,value:h},p))},c.prefix))}):null,o.length?g.jsx(Sn,{name:"Resource",children:o.map(c=>g.jsx(b.Fragment,{children:c.attributes.map(({key:p,value:h})=>g.jsx(Yr,{name:p,value:h},p))},c.prefix))}):null,t.isInstrumentationHint?null:g.jsxs(Sn,{name:"Library",children:[g.jsx(Yr,{name:"name",value:l.library.name}),l.library.version?g.jsx(Yr,{name:"version",value:l.library.version}):null]})]})};function f4({attached:e=!1}){const{state:{selected:t,isMobile:n},dispatch:r}=ms(),i=QR();if(!t)return null;const{span:a}=t;return g.jsxs("div",{className:at(re.spanDetailPanel,n&&re.mobile),children:[e&&!n?g.jsx(av,{}):null,g.jsx("div",{className:re.spanDetailPanelTop,children:g.jsxs("div",{className:re.spanDetailPanelTopInfo,children:[g.jsx("span",{className:re.spanDetailPanelName,title:a.name,children:a.name}),g.jsxs("div",{className:re.spanDetailPanelCorner,children:[t.isInstrumentationHint?null:g.jsx("span",{className:re.spanDetailPanelDuration,children:Rt(t.duration)}),g.jsx("div",{className:re.spanDetailPanelCloseVerticalRule}),g.jsx("button",{"aria-label":"Close Span Details",className:re.spanDetailPanelClose,onClick:()=>r({type:"deselect"}),type:"button",children:g.jsx($L,{color:"gray-700",size:20})})]})]})}),g.jsx("div",{className:at("flex gap-3",re.spanDetailPanelBody),children:i||g.jsx(XL,{})})]})}const wd="vc-trace-span-exp:";function Sn({name:e,className:t="",children:n}){const[r,i]=b.useState(()=>"localStorage"in globalThis?localStorage.getItem(`${wd}${e}`)!=="0":!0),a=b.useCallback(()=>{i(s=>{const o=!s;return localStorage.setItem(`${wd}${e}`,String(Number(o))),o})},[e]);return g.jsxs("div",{className:at(re.detailGroup,r?re.expanded:re.collapsed,t),children:[g.jsxs("button",{className:re.detailHeading,onClick:a,type:"button",children:[g.jsx("span",{children:e}),g.jsx(VL,{})]}),r?n:null]})}const QL=new Set(["OPTIONS","HEAD","GET","PUT","POST","DELETE"]),JL={"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."},Cd=new Set(["Start VM","Spawn Node.js","Spawn Python","Init User Code"]),Sd=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},ZL=e=>{const{name:t}=e.span,n=Sd(e),r=Sd(e.parent);return e.span.attributes["vercel.middleware.internal"]==="true"?"The Vercel Toolbar created this middleware.":Cd.has(t)||t==="Invoke Function"&&e.children.some(i=>Cd.has(i.span.name))?"This function encountered a cold start.":n&&r&&n!==r?"This request was routed across regions.":null},_m=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 QL.has(r)};function ev({node:e}){const{name:t}=e.span;let n=JL[t];if(!n&&_m(e)&&(n="How long it took for Vercel to process the request and send the response."),!n)return null;const r=ZL(e);return g.jsx(Sn,{name:"What is this?",children:g.jsxs("div",{className:re.infraSpanDescription,children:[g.jsx("span",{children:n}),r&&g.jsx(GL,{children:r})]})})}const tv=b.memo(function({getQuickLinks:t,span:n}){const r=t(n);return r.length?g.jsx(Sn,{name:"Links",children:r.map(({key:i,value:a})=>g.jsx(rv,{link:a,name:i},i))}):null});function nv(e){const[t,n]=b.useState({}),r=e.__resolvedValue!==void 0||e.__rejectedValue!==void 0;return b.useEffect(()=>{r||e.then(i=>{e.__resolvedValue=i}).catch(i=>{e.__rejectedValue=i}).finally(()=>n({}))},[e,r]),e.__resolvedValue}function rv({name:e,link:t}){const n=nv(t);return g.jsxs(YL,{as:n?void 0:"span",className:at(re.spanDetailPanelAttribute,re.spanDetailPanelQuickLink),href:(n==null?void 0:n.href)||"",children:[g.jsx("span",{className:re.spanDetailPanelAttributeKey,children:e}),g.jsx("span",{className:at(re.spanDetailPanelAttributeValue,re.spanDetailPanelQuickLinkLabel),children:n?g.jsxs(g.Fragment,{children:[n.label,n.icon||g.jsx(WL,{color:"gray-900"})]}):g.jsxs(g.Fragment,{children:[g.jsx(xd,{height:18,width:32+e.length*8}),g.jsx(xd,{height:18,rounded:!0,width:18})]})})]})}function iv(){return g.jsx(Sn,{name:"What is this?",children:g.jsxs("div",{className:re.infraSpanDescription,children:[g.jsx("span",{children:"You can visualize your application's spans alongside Vercel's spans in this viewer."}),g.jsx(qL,{href:"https://vercel.com/docs/session-tracing#adding-custom-spans",size:"small",target:"_blank",children:"Get Started"})]})})}function Yr({name:e,value:t}){return g.jsxs("dl",{className:re.spanDetailPanelAttribute,children:[g.jsx("dt",{className:re.spanDetailPanelAttributeKey,children:e}),g.jsx("dd",{className:re.spanDetailPanelAttributeValue,title:String(t),children:String(t)})]})}function av(){const{state:{panelWidth:e},dispatch:t}=ms(),n=b.useRef({start:{x:0,width:e},x:0,width:e,isHeld:!1});n.current.width=e;const r=b.useCallback(a=>{if(a.pointerType!=="mouse")return;a.preventDefault();const s=n.current;s.start.x=a.clientX,s.x=a.clientX,s.start.width=s.width,s.isHeld=!0},[]),i=b.useCallback(()=>{t({type:"setPanelWidth",width:Gl.panelWidth})},[t]);return b.useEffect(()=>{let a=0;const s=()=>{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(a),a=requestAnimationFrame(s))},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:re.spanDetailPanelResizer,onDoubleClick:i,onPointerDown:r})}function sv(e){const t=b.useRef({});return{setStyle:b.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 ov=()=>"devicePixelRatio"in globalThis&&globalThis.devicePixelRatio||1,lv=()=>{const[e,t]=b.useState(1);return b.useLayoutEffect(()=>{const n=()=>t(ov()),r=matchMedia(`(resolution: ${e}dppx)`);return r.addEventListener("change",n),n(),()=>{r.removeEventListener("change",n)}},[e]),e},qr=za,h4=b.memo(function({timelineRef:t,rows:n,scale:r}){const{state:{root:i,baseScale:a,timelineWidth:s,width:o,scrollbarWidth:l}}=ms(),u=o+za*2,d=lv(),c=b.useRef(null),p=b.useRef(null),h=o/(o-l)*Math.min(o/s,a/r),m=Math.min(o,(s-l)*h);b.useEffect(()=>{let N=!1,C=0,F;const H=x=>{var L;return!!((L=c.current)!=null&&L.contains(x))};let I=0;const V=()=>{if(!N||!F)return;const x=t.current;if(!x)return;const L=C-m*.5-F.left;x.scrollLeft=L/h},U=x=>{({clientX:C}=x),cancelAnimationFrame(I),I=requestAnimationFrame(V)},Q=x=>{var L;H(x.target)&&(N=!0,F=(L=c.current)==null?void 0:L.getBoundingClientRect(),U(x))},O=()=>{N=!1,F=void 0},K=x=>{H(x.target)&&x.cancelable&&x.preventDefault()},z=x=>{N&&x.cancelable&&x.preventDefault()};return window.addEventListener("pointerdown",Q),window.addEventListener("pointermove",U),window.addEventListener("pointerup",O),window.addEventListener("blur",O),window.addEventListener("touchstart",K,{passive:!1}),window.addEventListener("touchmove",z,{passive:!1}),()=>{window.removeEventListener("pointerdown",Q),window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",O),window.removeEventListener("blur",O),window.removeEventListener("touchstart",K),window.removeEventListener("touchmove",z),cancelAnimationFrame(I)}},[t,h,m]),b.useEffect(()=>{const N=p.current,C=N==null?void 0:N.getContext("2d");if(!N||!C)return;const H=requestAnimationFrame(()=>{C.resetTransform(),C.clearRect(0,0,N.width,N.height),C.scale(d,d);const I=1,V=3,U=(u-qr*2)/i.duration;C.fillStyle="#ccc",C.beginPath();for(const Q of n)for(const O of Q){const K=qr-I+(I+V)*O.row;if(K>=mr-V-qr)break;const z=qr+(O.startTime-i.startTime)*U,x=O.duration*U;C.roundRect(z,K,x,V,V)}C.fill()});return()=>cancelAnimationFrame(H)},[d,i,u,n]);const E=b.useRef(null),{style:k,setStyle:_}=sv(E);return b.useLayoutEffect(()=>{const N=t.current;if(!N)return;let C=0;const F=()=>{_("transform",`translateX(${qr+N.scrollLeft*h}px)`)};F();const H=()=>{cancelAnimationFrame(C),C=requestAnimationFrame(F)};return N.addEventListener("scroll",H),()=>{cancelAnimationFrame(C),N.removeEventListener("scroll",H)}},[t,h,_]),g.jsxs("div",{className:re.mapContainer,ref:c,style:{width:m>0?u:"100%",height:mr},children:[g.jsx("canvas",{className:re.mapCanvas,height:mr*d,ref:p,style:{width:u,height:mr},width:u*d}),g.jsx("div",{className:re.mapThumb,ref:E,style:{transform:k.transform,width:m>0?m:`calc(100% - ${za*2}px)`,top:2,height:mr-4}})]})});function uv(e){try{const t=JSON.parse(e);return typeof t=="string"?t:JSON.stringify(t,null,2)}catch{return e}}function cv(e){try{return JSON.parse(e)}catch{return e}}const dv=j.memo(function({chunk:t,index:n}){const r=cv(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:uv(r)}):g.jsx(rT,{data:r,expandLevel:1})]})});function fv(){return g.jsxs("div",{className:"flex flex-col gap-3 animate-in fade-in",children:[g.jsx(vu,{style:{width:120,height:16,borderRadius:4}}),[1,2,3,4].map(e=>g.jsx(vu,{style:{height:56,borderRadius:6}},e))]})}function p4({streamId:e,chunks:t,isLive:n,error:r,isLoading:i}){const[a,s]=b.useState(!1),o=b.useRef(null),l=b.useCallback(()=>{if(o.current){const{scrollTop:u,scrollHeight:d,clientHeight:c}=o.current,p=d-u-c<10;s(!p&&d>c)}},[]);return b.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight),l()},[t.length,l]),i&&t.length===0?g.jsx("div",{className:"flex flex-col h-full pb-4",children:g.jsx(fv,{})}):g.jsxs("div",{className:"flex flex-col h-full pb-4",children:[n&&g.jsxs("div",{className:"flex items-center gap-1.5 mb-3 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.jsxs("div",{className:"relative flex-1 min-h-[200px]",children:[g.jsx("div",{ref:o,onScroll:l,className:"absolute inset-0 overflow-auto flex flex-col gap-2",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"}):t.map((u,d)=>g.jsx(dv,{chunk:u,index:d},`${e}-chunk-${u.id}`))}),a&&g.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-8 pointer-events-none",style:{background:"linear-gradient(to top, var(--ds-background-100), transparent)"}})]})]})}const m4=10;function km(...e){return sl(at(e))}const g4=5e3;function b4(e,t,n){return n?`Page ${e} of ${t}+`:`Page ${e} of ${t}`}const E4=tb,T4=nb,hv=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(Nf,{ref:r,sideOffset:t,className:km("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}));hv.displayName=Nf.displayName;const Am=b.createContext(null);function y4({children:e,serverConfig:t}){const n={serverConfig:t};return g.jsx(Am.Provider,{value:n,children:e})}function x4(){const e=b.useContext(Am);if(!e)throw new Error("useServerConfig must be used within a ServerConfigProvider");return e}function Nd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wm(...e){return t=>{let n=!1;const r=e.map(i=>{const a=Nd(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():Nd(e[i],null)}}}}function _4(...e){return b.useCallback(wm(...e),e)}var Cm=b.forwardRef((e,t)=>{const{children:n,...r}=e,i=b.Children.toArray(n),a=i.find(mv);if(a){const s=a.props.children,o=i.map(l=>l===a?b.Children.count(s)>1?b.Children.only(null):b.isValidElement(s)?s.props.children:null:l);return g.jsx(Ho,{...r,ref:t,children:b.isValidElement(s)?b.cloneElement(s,void 0,o):null})}return g.jsx(Ho,{...r,ref:t,children:n})});Cm.displayName="Slot";var Ho=b.forwardRef((e,t)=>{const{children:n,...r}=e;if(b.isValidElement(n)){const i=bv(n);return b.cloneElement(n,{...gv(r,n.props),ref:t?wm(t,i):i})}return b.Children.count(n)>1?b.Children.only(null):null});Ho.displayName="SlotClone";var pv=({children:e})=>g.jsx(g.Fragment,{children:e});function mv(e){return b.isValidElement(e)&&e.type===pv}function gv(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...o)=>{a(...o),i(...o)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function bv(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 Id=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rd=at,Ev=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Rd(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],c=a==null?void 0:a[u];if(d===null)return null;const p=Id(d)||Id(c);return i[u][p]}),o=n&&Object.entries(n).reduce((u,d)=>{let[c,p]=d;return p===void 0||(u[c]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:p,...h}=d;return Object.entries(h).every(m=>{let[E,k]=m;return Array.isArray(k)?k.includes({...a,...o}[E]):{...a,...o}[E]===k})?[...u,c,p]:u},[]);return Rd(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Tv=Ev("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"}}),yv=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const s=r?Cm:"button";return g.jsx(s,{className:km(Tv({variant:t,size:n,className:e})),ref:a,...i})});yv.displayName="Button";let Uo;try{Uo=new TextDecoder}catch{}let se,qn,Y=0;const xv=105,_v=57342,kv=57343,Od=57337,Ld=6,fr={};let Gr=11281e4,un=1681e4,_e={},Pe,$a,Va=0,Ni=0,We,Mt,ze=[],jo=[],bt,ut,ti,vd={useRecords:!1,mapsAsObjects:!0},Ii=!1,Sm=2;try{new Function("")}catch{Sm=1/0}class Ri{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[Bt(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(se)return Om(()=>(Wo(),this?this.decode(t,n):Ri.prototype.decode.call(vd,t,n)));qn=n>-1?n:t.length,Y=0,Ni=0,$a=null,We=null,se=t;try{ut=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength))}catch(r){throw se=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 Ri){if(_e=this,bt=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return Pe=this.structures,ca();(!Pe||Pe.length>0)&&(Pe=[])}else _e=vd,(!Pe||Pe.length>0)&&(Pe=[]),bt=null;return ca()}decodeMultiple(t,n){let r,i=0;try{let a=t.length;Ii=!0;let s=this?this.decode(t,a):Zl.decode(t,a);if(n){if(n(s)===!1)return;for(;Y<a;)if(i=Y,n(ca())===!1)return}else{for(r=[s];Y<a;)i=Y,r.push(ca());return r}}catch(a){throw a.lastPosition=i,a.values=r,a}finally{Ii=!1,Wo()}}}function ca(){try{let e=Ae();if(We){if(Y>=We.postBundlePosition){let t=new Error("Unexpected bundle position");throw t.incomplete=!0,t}Y=We.postBundlePosition,We=null}if(Y==qn)Pe=null,se=null,Mt&&(Mt=null);else if(Y>qn){let t=new Error("Unexpected end of CBOR data");throw t.incomplete=!0,t}else if(!Ii)throw new Error("Data read, but end of buffer not reached");return e}catch(e){throw Wo(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function Ae(){let e=se[Y++],t=e>>5;if(e=e&31,e>23)switch(e){case 24:e=se[Y++];break;case 25:if(t==7)return Sv();e=ut.getUint16(Y),Y+=2;break;case 26:if(t==7){let n=ut.getFloat32(Y);if(_e.useFloat32>2){let r=Jl[(se[Y]&127)<<1|se[Y+1]>>7];return Y+=4,(r*n+(n>0?.5:-.5)>>0)/r}return Y+=4,n}e=ut.getUint32(Y),Y+=4;break;case 27:if(t==7){let n=ut.getFloat64(Y);return Y+=8,n}if(t>1){if(ut.getUint32(Y)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=ut.getUint32(Y+4)}else _e.int64AsNumber?(e=ut.getUint32(Y)*4294967296,e+=ut.getUint32(Y+4)):e=ut.getBigUint64(Y);Y+=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=Ae())!=fr;){if(i>=Gr)throw new Error(`Array length exceeds ${Gr}`);n[i++]=r}return t==4?n:t==3?n.join(""):Buffer.concat(n);case 5:let a;if(_e.mapsAsObjects){let s={},o=0;if(_e.keyMap)for(;(a=Ae())!=fr;){if(o++>=un)throw new Error(`Property count exceeds ${un}`);s[Bt(_e.decodeKey(a))]=Ae()}else for(;(a=Ae())!=fr;){if(o++>=un)throw new Error(`Property count exceeds ${un}`);s[Bt(a)]=Ae()}return s}else{ti&&(_e.mapsAsObjects=!0,ti=!1);let s=new Map;if(_e.keyMap){let o=0;for(;(a=Ae())!=fr;){if(o++>=un)throw new Error(`Map size exceeds ${un}`);s.set(_e.decodeKey(a),Ae())}}else{let o=0;for(;(a=Ae())!=fr;){if(o++>=un)throw new Error(`Map size exceeds ${un}`);s.set(a,Ae())}}return s}case 7:return fr;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 Cv(e);case 3:if(Ni>=Y)return $a.slice(Y-Va,(Y+=e)-Va);if(Ni==0&&qn<140&&e<32){let i=e<16?Nm(e):wv(e);if(i!=null)return i}return Av(e);case 4:if(e>=Gr)throw new Error(`Array length exceeds ${Gr}`);let n=new Array(e);for(let i=0;i<e;i++)n[i]=Ae();return n;case 5:if(e>=un)throw new Error(`Map size exceeds ${Gr}`);if(_e.mapsAsObjects){let i={};if(_e.keyMap)for(let a=0;a<e;a++)i[Bt(_e.decodeKey(Ae()))]=Ae();else for(let a=0;a<e;a++)i[Bt(Ae())]=Ae();return i}else{ti&&(_e.mapsAsObjects=!0,ti=!1);let i=new Map;if(_e.keyMap)for(let a=0;a<e;a++)i.set(_e.decodeKey(Ae()),Ae());else for(let a=0;a<e;a++)i.set(Ae(),Ae());return i}case 6:if(e>=Od){let i=Pe[e&8191];if(i)return i.read||(i.read=zo(i)),i.read();if(e<65536){if(e==kv){let a=Er(),s=Ae(),o=Ae();Vo(s,o);let l={};if(_e.keyMap)for(let u=2;u<a;u++){let d=_e.decodeKey(o[u-2]);l[Bt(d)]=Ae()}else for(let u=2;u<a;u++){let d=o[u-2];l[Bt(d)]=Ae()}return l}else if(e==_v){let a=Er(),s=Ae();for(let o=2;o<a;o++)Vo(s++,Ae());return Ae()}else if(e==Od)return vv();if(_e.getShared&&(Ql(),i=Pe[e&8191],i))return i.read||(i.read=zo(i)),i.read()}}let r=ze[e];if(r)return r.handlesRead?r(Ae):r(Ae());{let i=Ae();for(let a=0;a<jo.length;a++){let s=jo[a](e,i);if(s!==void 0)return s}return new Zn(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=(bt||zn())[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 Dd=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function zo(e){if(!e)throw new Error("Structure is required in record definition");function t(){let n=se[Y++];if(n=n&31,n>23)switch(n){case 24:n=se[Y++];break;case 25:n=ut.getUint16(Y),Y+=2;break;case 26:n=ut.getUint32(Y),Y+=4;break;default:throw new Error("Expected array header, but got "+se[Y-1])}let r=this.compiledReader;for(;r;){if(r.propertyCount===n)return r(Ae);r=r.next}if(this.slowReads++>=Sm){let a=this.length==n?this:this.slice(0,n);return r=_e.keyMap?new Function("r","return {"+a.map(s=>_e.decodeKey(s)).map(s=>Dd.test(s)?Bt(s)+":r()":"["+JSON.stringify(s)+"]:r()").join(",")+"}"):new Function("r","return {"+a.map(s=>Dd.test(s)?Bt(s)+":r()":"["+JSON.stringify(s)+"]:r()").join(",")+"}"),this.compiledReader&&(r.next=this.compiledReader),r.propertyCount=n,this.compiledReader=r,r(Ae)}let i={};if(_e.keyMap)for(let a=0;a<n;a++)i[Bt(_e.decodeKey(this[a]))]=Ae();else for(let a=0;a<n;a++)i[Bt(this[a])]=Ae();return i}return e.slowReads=0,t}function Bt(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 Av=$o;function $o(e){let t;if(e<16&&(t=Nm(e)))return t;if(e>64&&Uo)return Uo.decode(se.subarray(Y,Y+=e));const n=Y+e,r=[];for(t="";Y<n;){const i=se[Y++];if((i&128)===0)r.push(i);else if((i&224)===192){const a=se[Y++]&63;r.push((i&31)<<6|a)}else if((i&240)===224){const a=se[Y++]&63,s=se[Y++]&63;r.push((i&31)<<12|a<<6|s)}else if((i&248)===240){const a=se[Y++]&63,s=se[Y++]&63,o=se[Y++]&63;let l=(i&7)<<18|a<<12|s<<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+=Ge.apply(String,r),r.length=0)}return r.length>0&&(t+=Ge.apply(String,r)),t}let Ge=String.fromCharCode;function wv(e){let t=Y,n=new Array(e);for(let r=0;r<e;r++){const i=se[Y++];if((i&128)>0){Y=t;return}n[r]=i}return Ge.apply(String,n)}function Nm(e){if(e<4)if(e<2){if(e===0)return"";{let t=se[Y++];if((t&128)>1){Y-=1;return}return Ge(t)}}else{let t=se[Y++],n=se[Y++];if((t&128)>0||(n&128)>0){Y-=2;return}if(e<3)return Ge(t,n);let r=se[Y++];if((r&128)>0){Y-=3;return}return Ge(t,n,r)}else{let t=se[Y++],n=se[Y++],r=se[Y++],i=se[Y++];if((t&128)>0||(n&128)>0||(r&128)>0||(i&128)>0){Y-=4;return}if(e<6){if(e===4)return Ge(t,n,r,i);{let a=se[Y++];if((a&128)>0){Y-=5;return}return Ge(t,n,r,i,a)}}else if(e<8){let a=se[Y++],s=se[Y++];if((a&128)>0||(s&128)>0){Y-=6;return}if(e<7)return Ge(t,n,r,i,a,s);let o=se[Y++];if((o&128)>0){Y-=7;return}return Ge(t,n,r,i,a,s,o)}else{let a=se[Y++],s=se[Y++],o=se[Y++],l=se[Y++];if((a&128)>0||(s&128)>0||(o&128)>0||(l&128)>0){Y-=8;return}if(e<10){if(e===8)return Ge(t,n,r,i,a,s,o,l);{let u=se[Y++];if((u&128)>0){Y-=9;return}return Ge(t,n,r,i,a,s,o,l,u)}}else if(e<12){let u=se[Y++],d=se[Y++];if((u&128)>0||(d&128)>0){Y-=10;return}if(e<11)return Ge(t,n,r,i,a,s,o,l,u,d);let c=se[Y++];if((c&128)>0){Y-=11;return}return Ge(t,n,r,i,a,s,o,l,u,d,c)}else{let u=se[Y++],d=se[Y++],c=se[Y++],p=se[Y++];if((u&128)>0||(d&128)>0||(c&128)>0||(p&128)>0){Y-=12;return}if(e<14){if(e===12)return Ge(t,n,r,i,a,s,o,l,u,d,c,p);{let h=se[Y++];if((h&128)>0){Y-=13;return}return Ge(t,n,r,i,a,s,o,l,u,d,c,p,h)}}else{let h=se[Y++],m=se[Y++];if((h&128)>0||(m&128)>0){Y-=14;return}if(e<15)return Ge(t,n,r,i,a,s,o,l,u,d,c,p,h,m);let E=se[Y++];if((E&128)>0){Y-=15;return}return Ge(t,n,r,i,a,s,o,l,u,d,c,p,h,m,E)}}}}}function Cv(e){return _e.copyBuffers?Uint8Array.prototype.slice.call(se,Y,Y+=e):se.subarray(Y,Y+=e)}let Im=new Float32Array(1),da=new Uint8Array(Im.buffer,0,4);function Sv(){let e=se[Y++],t=se[Y++],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 da[3]=e&128|(n>>1)+56,da[2]=(e&7)<<5|t>>3,da[1]=t<<5,da[0]=0,Im[0]}new Array(4096);class Zn{constructor(t,n){this.value=t,this.tag=n}}ze[0]=e=>new Date(e);ze[1]=e=>new Date(Math.round(e*1e3));ze[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};ze[3]=e=>BigInt(-1)-ze[2](e);ze[4]=e=>+(e[1]+"e"+e[0]);ze[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));const Vo=(e,t)=>{e=e-57344;let n=Pe[e];n&&n.isShared&&((Pe.restoreStructures||(Pe.restoreStructures=[]))[e]=n),Pe[e]=t,t.read=zo(t)};ze[xv]=e=>{let t=e.length,n=e[1];Vo(e[0],n);let r={};for(let i=2;i<t;i++){let a=n[i-2];r[Bt(a)]=e[i]}return r};ze[14]=e=>We?We[0].slice(We.position0,We.position0+=e):new Zn(e,14);ze[15]=e=>We?We[1].slice(We.position1,We.position1+=e):new Zn(e,15);let Nv={Error,RegExp};ze[27]=e=>(Nv[e[0]]||Error)(e[1],e[2]);const Rm=e=>{if(se[Y++]!=132){let n=new Error("Packed values structure must be followed by a 4 element array");throw se.length<Y&&(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 bt=bt?t.concat(bt.slice(t.length)):t,bt.prefixes=e(),bt.suffixes=e(),e()};Rm.handlesRead=!0;ze[51]=Rm;ze[Ld]=e=>{if(!bt)if(_e.getShared)Ql();else return new Zn(e,Ld);if(typeof e=="number")return bt[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};ze[28]=e=>{Mt||(Mt=new Map,Mt.id=0);let t=Mt.id++,n=Y,r=se[Y],i;r>>5==4?i=[]:i={};let a={target:i};Mt.set(t,a);let s=e();return a.used?(Object.getPrototypeOf(i)!==Object.getPrototypeOf(s)&&(Y=n,i=s,Mt.set(t,{target:i}),s=e()),Object.assign(i,s)):(a.target=s,s)};ze[28].handlesRead=!0;ze[29]=e=>{let t=Mt.get(e);return t.used=!0,t.target};ze[258]=e=>new Set(e);(ze[259]=e=>(_e.mapsAsObjects&&(_e.mapsAsObjects=!1,ti=!0),e())).handlesRead=!0;function hr(e,t){return typeof e=="string"?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function zn(){if(!bt)if(_e.getShared)Ql();else throw new Error("No packed values available");return bt}const Iv=1399353956;jo.push((e,t)=>{if(e>=225&&e<=255)return hr(zn().prefixes[e-224],t);if(e>=28704&&e<=32767)return hr(zn().prefixes[e-28672],t);if(e>=1879052288&&e<=2147483647)return hr(zn().prefixes[e-1879048192],t);if(e>=216&&e<=223)return hr(t,zn().suffixes[e-216]);if(e>=27647&&e<=28671)return hr(t,zn().suffixes[e-27639]);if(e>=1811940352&&e<=1879048191)return hr(t,zn().suffixes[e-1811939328]);if(e==Iv)return{packedValues:bt,structures:Pe.slice(0),version:t};if(e==55799)return t});const Rv=new Uint8Array(new Uint16Array([1]).buffer)[0]==1,Pd=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],Ov=[64,68,69,70,71,72,77,78,79,85,86];for(let e=0;e<Pd.length;e++)Lv(Pd[e],Ov[e]);function Lv(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 a=r==2?1:r==4?2:r==8?3:0;ze[i?t:t-4]=r==1||i==Rv?s=>{if(!e)throw new Error("Could not find typed array for code "+t);return!_e.copyBuffers&&(r===1||r===2&&!(s.byteOffset&1)||r===4&&!(s.byteOffset&3)||r===8&&!(s.byteOffset&7))?new e(s.buffer,s.byteOffset,s.byteLength>>a):new e(Uint8Array.prototype.slice.call(s,0).buffer)}:s=>{if(!e)throw new Error("Could not find typed array for code "+t);let o=new DataView(s.buffer,s.byteOffset,s.byteLength),l=s.length>>a,u=new e(l),d=o[n];for(let c=0;c<l;c++)u[c]=d.call(o,c<<a,i);return u}}}function vv(){let e=Er(),t=Y+Ae();for(let r=2;r<e;r++){let i=Er();Y+=i}let n=Y;return Y=t,We=[$o(Er()),$o(Er())],We.position0=0,We.position1=0,We.postBundlePosition=Y,Y=n,Ae()}function Er(){let e=se[Y++]&31;if(e>23)switch(e){case 24:e=se[Y++];break;case 25:e=ut.getUint16(Y),Y+=2;break;case 26:e=ut.getUint32(Y),Y+=4;break}return e}function Ql(){if(_e.getShared){let e=Om(()=>(se=null,_e.getShared()))||{},t=e.structures||[];_e.sharedVersion=e.version,bt=_e.sharedValues=e.packedValues,Pe===!0?_e.structures=Pe=t:Pe.splice.apply(Pe,[0,t.length].concat(t))}}function Om(e){let t=qn,n=Y,r=Va,i=Ni,a=$a,s=Mt,o=We,l=new Uint8Array(se.slice(0,qn)),u=Pe,d=_e,c=Ii,p=e();return qn=t,Y=n,Va=r,Ni=i,$a=a,Mt=s,We=o,se=l,Ii=c,Pe=u,_e=d,ut=new DataView(se.buffer,se.byteOffset,se.byteLength),p}function Wo(){se=null,Mt=null,Pe=null}const Jl=new Array(147);for(let e=0;e<256;e++)Jl[e]=+("1e"+Math.floor(45.15-e*.30103));let Zl=new Ri({useRecords:!1});const Md=Zl.decode;Zl.decodeMultiple;let ka;try{ka=new TextEncoder}catch{}let Yo,Lm;const bs=typeof globalThis=="object"&&globalThis.Buffer,Vi=typeof bs<"u",Xs=Vi?bs.allocUnsafeSlow:Uint8Array,Bd=Vi?bs:Uint8Array,Fd=256,Hd=Vi?4294967296:2144337920;let Qs,B,ve,R=0,kn,Ve=null;const Dv=61440,Pv=/[\u0080-\uFFFF]/,kt=Symbol("record-id");class Mv extends Ri{constructor(t){super(t),this.offset=0;let n,r,i,a,s;t=t||{};let o=Bd.prototype.utf8Write?function(x,L,v){return B.utf8Write(x,L,v)}:ka&&ka.encodeInto?function(x,L){return ka.encodeInto(x,B.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 p,h,m=t.sharedValues,E;if(m){E=Object.create(null);for(let x=0,L=m.length;x<L;x++)E[m[x]]=x}let k=[],_=0,N=0;this.mapEncode=function(x,L){if(this._keyMap&&!this._mapped)switch(x.constructor.name){case"Array":x=x.map(v=>this.encodeKeys(v));break}return this.encode(x,L)},this.encode=function(x,L){if(B||(B=new Xs(8192),ve=new DataView(B.buffer,0,8192),R=0),kn=B.length-10,kn-R<2048?(B=new Xs(B.length),ve=new DataView(B.buffer,0,B.length),kn=B.length-10,R=0):L===zd&&(R=R+7&2147483640),n=R,l.useSelfDescribedHeader&&(ve.setUint32(R,3654940416),R+=3),s=l.structuredClone?new Map:null,l.bundleStrings&&typeof x!="string"?(Ve=[],Ve.size=1/0):Ve=null,r=l.structures,r){if(r.uninitialized){let D=l.getShared()||{};l.structures=r=D.structures||[],l.sharedVersion=D.version;let P=l.sharedValues=D.packedValues;if(P){E={};for(let q=0,J=P.length;q<J;q++)E[P[q]]=q}}let v=r.length;if(v>d&&!c&&(v=d),!r.transitions){r.transitions=Object.create(null);for(let D=0;D<v;D++){let P=r[D];if(!P)continue;let q,J=r.transitions;for(let T=0,ie=P.length;T<ie;T++){J[kt]===void 0&&(J[kt]=D);let te=P[T];q=J[te],q||(q=J[te]=Object.create(null)),J=q}J[kt]=D|1048576}}c||(r.nextId=v)}if(i&&(i=!1),a=r||[],h=E,t.pack){let v=new Map;if(v.values=[],v.encoder=l,v.maxValues=t.maxPrivatePackedValues||(E?16:1/0),v.objectMap=E||!1,v.samplingPackedValues=p,Aa(x,v),v.values.length>0){B[R++]=216,B[R++]=51,Jt(4);let D=v.values;C(D),Jt(0),Jt(0),h=Object.create(E||null);for(let P=0,q=D.length;P<q;P++)h[D[P]]=P}}Qs=L&Zs;try{if(Qs)return;if(C(x),Ve&&jd(n,C),l.offset=R,s&&s.idsToInsert){R+=s.idsToInsert.length*2,R>kn&&H(R),l.offset=R;let v=Hv(B.subarray(n,R),s.idsToInsert);return s=null,v}return L&zd?(B.start=n,B.end=R,B):B.subarray(n,R)}finally{if(r){if(N<10&&N++,r.length>d&&(r.length=d),_>1e4)r.transitions=null,N=0,_=0,k.length>0&&(k=[]);else if(k.length>0&&!c){for(let v=0,D=k.length;v<D;v++)k[v][kt]=void 0;k=[]}}if(i&&l.saveShared){l.structures.length>d&&(l.structures=l.structures.slice(0,d));let v=B.subarray(n,R);return l.updateSharedData()===!1?l.encode(x):v}L&jv&&(R=n)}},this.findCommonStringsToPack=()=>(p=new Map,E||(E=Object.create(null)),x=>{let L=x&&x.threshold||4,v=this.pack?x.maxPrivatePackedValues||16:0;m||(m=this.sharedValues=[]);for(let[D,P]of p)P.count>L&&(E[D]=v++,m.push(D),i=!0);for(;this.saveShared&&this.updateSharedData()===!1;);p=null});const C=x=>{R>kn&&(B=H(R));var L=typeof x,v;if(L==="string"){if(h){let J=h[x];if(J>=0){J<16?B[R++]=J+224:(B[R++]=198,J&1?C(15-J>>1):C(J-16>>1));return}else if(p&&!t.pack){let T=p.get(x);T?T.count++:p.set(x,{count:1})}}let D=x.length;if(Ve&&D>=4&&D<1024){if((Ve.size+=D)>Dv){let T,ie=(Ve[0]?Ve[0].length*3+Ve[1].length:0)+10;R+ie>kn&&(B=H(R+ie)),B[R++]=217,B[R++]=223,B[R++]=249,B[R++]=Ve.position?132:130,B[R++]=26,T=R-n,R+=4,Ve.position&&jd(n,C),Ve=["",""],Ve.size=0,Ve.position=T}let J=Pv.test(x);Ve[J?0:1]+=x,B[R++]=J?206:207,C(D);return}let P;D<32?P=1:D<256?P=2:D<65536?P=3:P=5;let q=D*3;if(R+q>kn&&(B=H(R+q)),D<64||!o){let J,T,ie,te=R+P;for(J=0;J<D;J++)T=x.charCodeAt(J),T<128?B[te++]=T:T<2048?(B[te++]=T>>6|192,B[te++]=T&63|128):(T&64512)===55296&&((ie=x.charCodeAt(J+1))&64512)===56320?(T=65536+((T&1023)<<10)+(ie&1023),J++,B[te++]=T>>18|240,B[te++]=T>>12&63|128,B[te++]=T>>6&63|128,B[te++]=T&63|128):(B[te++]=T>>12|224,B[te++]=T>>6&63|128,B[te++]=T&63|128);v=te-R-P}else v=o(x,R+P,q);v<24?B[R++]=96|v:v<256?(P<2&&B.copyWithin(R+2,R+1,R+1+v),B[R++]=120,B[R++]=v):v<65536?(P<3&&B.copyWithin(R+3,R+2,R+2+v),B[R++]=121,B[R++]=v>>8,B[R++]=v&255):(P<5&&B.copyWithin(R+5,R+3,R+3+v),B[R++]=122,ve.setUint32(R,v),R+=4),R+=v}else if(L==="number")if(!this.alwaysUseFloat&&x>>>0===x)x<24?B[R++]=x:x<256?(B[R++]=24,B[R++]=x):x<65536?(B[R++]=25,B[R++]=x>>8,B[R++]=x&255):(B[R++]=26,ve.setUint32(R,x),R+=4);else if(!this.alwaysUseFloat&&x>>0===x)x>=-24?B[R++]=31-x:x>=-256?(B[R++]=56,B[R++]=~x):x>=-65536?(B[R++]=57,ve.setUint16(R,~x),R+=2):(B[R++]=58,ve.setUint32(R,~x),R+=4);else{let D;if((D=this.useFloat32)>0&&x<4294967296&&x>=-2147483648){B[R++]=250,ve.setFloat32(R,x);let P;if(D<4||(P=x*Jl[(B[R]&127)<<1|B[R+1]>>7])>>0===P){R+=4;return}else R--}B[R++]=251,ve.setFloat64(R,x),R+=8}else if(L==="object")if(!x)B[R++]=246;else{if(s){let P=s.get(x);if(P){if(B[R++]=216,B[R++]=29,B[R++]=25,!P.references){let q=s.idsToInsert||(s.idsToInsert=[]);P.references=[],q.push(P)}P.references.push(R-n),R+=2;return}else s.set(x,{offset:R-n})}let D=x.constructor;if(D===Object)F(x);else if(D===Array){v=x.length,v<24?B[R++]=128|v:Jt(v);for(let P=0;P<v;P++)C(x[P])}else if(D===Map)if((this.mapsAsObjects?this.useTag259ForMaps!==!1:this.useTag259ForMaps)&&(B[R++]=217,B[R++]=1,B[R++]=3),v=x.size,v<24?B[R++]=160|v:v<256?(B[R++]=184,B[R++]=v):v<65536?(B[R++]=185,B[R++]=v>>8,B[R++]=v&255):(B[R++]=186,ve.setUint32(R,v),R+=4),l.keyMap)for(let[P,q]of x)C(l.encodeKey(P)),C(q);else for(let[P,q]of x)C(P),C(q);else{for(let P=0,q=Yo.length;P<q;P++){let J=Lm[P];if(x instanceof J){let T=Yo[P],ie=T.tag;ie==null&&(ie=T.getTag&&T.getTag.call(this,x)),ie<24?B[R++]=192|ie:ie<256?(B[R++]=216,B[R++]=ie):ie<65536?(B[R++]=217,B[R++]=ie>>8,B[R++]=ie&255):ie>-1&&(B[R++]=218,ve.setUint32(R,ie),R+=4),T.encode.call(this,x,C,H);return}}if(x[Symbol.iterator]){if(Qs){let P=new Error("Iterable should be serialized as iterator");throw P.iteratorNotHandled=!0,P}B[R++]=159;for(let P of x)C(P);B[R++]=255;return}if(x[Symbol.asyncIterator]||Js(x)){let P=new Error("Iterable/blob should be serialized as iterator");throw P.iteratorNotHandled=!0,P}if(this.useToJSON&&x.toJSON){const P=x.toJSON();if(P!==x)return C(P)}F(x)}}else if(L==="boolean")B[R++]=x?245:244;else if(L==="bigint"){if(x<BigInt(1)<<BigInt(64)&&x>=0)B[R++]=27,ve.setBigUint64(R,x);else if(x>-(BigInt(1)<<BigInt(64))&&x<0)B[R++]=59,ve.setBigUint64(R,-x-BigInt(1));else if(this.largeBigIntToFloat)B[R++]=251,ve.setFloat64(R,Number(x));else{x>=BigInt(0)?B[R++]=194:(B[R++]=195,x=BigInt(-1)-x);let D=[];for(;x;)D.push(Number(x&BigInt(255))),x>>=BigInt(8);qo(new Uint8Array(D.reverse()),H);return}R+=8}else if(L==="undefined")B[R++]=247;else throw new Error("Unknown type: "+L)},F=this.useRecords===!1?this.variableMapSize?x=>{let L=Object.keys(x),v=Object.values(x),D=L.length;if(D<24?B[R++]=160|D:D<256?(B[R++]=184,B[R++]=D):D<65536?(B[R++]=185,B[R++]=D>>8,B[R++]=D&255):(B[R++]=186,ve.setUint32(R,D),R+=4),l.keyMap)for(let P=0;P<D;P++)C(l.encodeKey(L[P])),C(v[P]);else for(let P=0;P<D;P++)C(L[P]),C(v[P])}:x=>{B[R++]=185;let L=R-n;R+=2;let v=0;if(l.keyMap)for(let D in x)(typeof x.hasOwnProperty!="function"||x.hasOwnProperty(D))&&(C(l.encodeKey(D)),C(x[D]),v++);else for(let D in x)(typeof x.hasOwnProperty!="function"||x.hasOwnProperty(D))&&(C(D),C(x[D]),v++);B[L+++n]=v>>8,B[L+n]=v&255}:(x,L)=>{let v,D=a.transitions||(a.transitions=Object.create(null)),P=0,q=0,J,T;if(this.keyMap){T=Object.keys(x).map(te=>this.encodeKey(te)),q=T.length;for(let te=0;te<q;te++){let w=T[te];v=D[w],v||(v=D[w]=Object.create(null),P++),D=v}}else for(let te in x)(typeof x.hasOwnProperty!="function"||x.hasOwnProperty(te))&&(v=D[te],v||(D[kt]&1048576&&(J=D[kt]&65535),v=D[te]=Object.create(null),P++),D=v,q++);let ie=D[kt];if(ie!==void 0)ie&=65535,B[R++]=217,B[R++]=ie>>8|224,B[R++]=ie&255;else if(T||(T=D.__keys__||(D.__keys__=Object.keys(x))),J===void 0?(ie=a.nextId++,ie||(ie=0,a.nextId=1),ie>=Fd&&(a.nextId=(ie=d)+1)):ie=J,a[ie]=T,ie<d){B[R++]=217,B[R++]=ie>>8|224,B[R++]=ie&255,D=a.transitions;for(let te=0;te<q;te++)(D[kt]===void 0||D[kt]&1048576)&&(D[kt]=ie),D=D[T[te]];D[kt]=ie|1048576,i=!0}else{if(D[kt]=ie,ve.setUint32(R,3655335680),R+=3,P&&(_+=N*P),k.length>=Fd-d&&(k.shift()[kt]=void 0),k.push(D),Jt(q+2),C(57344+ie),C(T),L)return;for(let te in x)(typeof x.hasOwnProperty!="function"||x.hasOwnProperty(te))&&C(x[te]);return}if(q<24?B[R++]=128|q:Jt(q),!L)for(let te in x)(typeof x.hasOwnProperty!="function"||x.hasOwnProperty(te))&&C(x[te])},H=x=>{let L;if(x>16777216){if(x-n>Hd)throw new Error("Encoded buffer would be larger than maximum buffer size");L=Math.min(Hd,Math.round(Math.max((x-n)*(x>67108864?1.25:2),4194304)/4096)*4096)}else L=(Math.max(x-n<<2,B.length-1)>>12)+1<<12;let v=new Xs(L);return ve=new DataView(v.buffer,0,L),B.copy?B.copy(v,0,n,x):v.set(B.slice(n,x)),R-=n,n=0,kn=v.length-10,B=v};let I=100,V=1e3;this.encodeAsIterable=function(x,L){return K(x,L,U)},this.encodeAsAsyncIterable=function(x,L){return K(x,L,z)};function*U(x,L,v){let D=x.constructor;if(D===Object){let P=l.useRecords!==!1;P?F(x,!0):Ud(Object.keys(x).length,160);for(let q in x){let J=x[q];P||C(q),J&&typeof J=="object"?L[q]?yield*U(J,L[q]):yield*Q(J,L,q):C(J)}}else if(D===Array){let P=x.length;Jt(P);for(let q=0;q<P;q++){let J=x[q];J&&(typeof J=="object"||R-n>I)?L.element?yield*U(J,L.element):yield*Q(J,L,"element"):C(J)}}else if(x[Symbol.iterator]&&!x.buffer){B[R++]=159;for(let P of x)P&&(typeof P=="object"||R-n>I)?L.element?yield*U(P,L.element):yield*Q(P,L,"element"):C(P);B[R++]=255}else Js(x)?(Ud(x.size,64),yield B.subarray(n,R),yield x,O()):x[Symbol.asyncIterator]?(B[R++]=159,yield B.subarray(n,R),yield x,O(),B[R++]=255):C(x);v&&R>n?yield B.subarray(n,R):R-n>I&&(yield B.subarray(n,R),O())}function*Q(x,L,v){let D=R-n;try{C(x),R-n>I&&(yield B.subarray(n,R),O())}catch(P){if(P.iteratorNotHandled)L[v]={},R=n+D,yield*U.call(this,x,L[v]);else throw P}}function O(){I=V,l.encode(null,Zs)}function K(x,L,v){return L&&L.chunkThreshold?I=V=L.chunkThreshold:I=100,x&&typeof x=="object"?(l.encode(null,Zs),v(x,l.iterateProperties||(l.iterateProperties={}),!0)):[l.encode(x)]}async function*z(x,L){for(let v of U(x,L,!0)){let D=v.constructor;if(D===Bd||D===Uint8Array)yield v;else if(Js(v)){let P=v.stream().getReader(),q;for(;!(q=await P.read()).done;)yield q.value}else if(v[Symbol.asyncIterator])for await(let P of v)O(),P?yield*z(P,L.async||(L.async={})):yield l.encode(P);else yield v}}}useBuffer(t){B=t,ve=new DataView(B.buffer,B.byteOffset,B.byteLength),R=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 vm(n,this.sharedValues,this.sharedVersion),i=this.saveShared(r,a=>(a&&a.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((a,s)=>this.structures[s]=a),i}}function Ud(e,t){e<24?B[R++]=t|e:e<256?(B[R++]=t|24,B[R++]=e):e<65536?(B[R++]=t|25,B[R++]=e>>8,B[R++]=e&255):(B[R++]=t|26,ve.setUint32(R,e),R+=4)}class vm{constructor(t,n,r){this.structures=t,this.packedValues=n,this.version=r}}function Jt(e){e<24?B[R++]=128|e:e<256?(B[R++]=152,B[R++]=e):e<65536?(B[R++]=153,B[R++]=e>>8,B[R++]=e&255):(B[R++]=154,ve.setUint32(R,e),R+=4)}const Bv=typeof Blob>"u"?function(){}:Blob;function Js(e){if(e instanceof Bv)return!0;let t=e[Symbol.toStringTag];return t==="Blob"||t==="File"}function Aa(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++)Aa(e[r],t);else{let r=!t.encoder.useRecords;for(var n in e)e.hasOwnProperty(n)&&(r&&Aa(n,t),Aa(e[n],t))}break;case"function":console.log(e)}}const Fv=new Uint8Array(new Uint16Array([1]).buffer)[0]==1;Lm=[Date,Set,Error,RegExp,Zn,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?function(){}:BigInt64Array,Float32Array,Float64Array,vm];Yo=[{tag:1,encode(e,t){let n=e.getTime()/1e3;(this.useTimestamp32||e.getMilliseconds()===0)&&n>=0&&n<4294967296?(B[R++]=26,ve.setUint32(R,n),R+=4):(B[R++]=251,ve.setFloat64(R,n),R+=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){qo(e,n)}},{getTag(e){if(e.constructor===Uint8Array&&(this.tagUint8Array||Vi&&this.tagUint8Array!==!1))return 64},encode(e,t,n){qo(e,n)}},Xt(68,1),Xt(69,2),Xt(70,4),Xt(71,8),Xt(72,1),Xt(77,2),Xt(78,4),Xt(79,8),Xt(85,4),Xt(86,8),{encode(e,t){let n=e.packedValues||[],r=e.structures||[];if(n.values.length>0){B[R++]=216,B[R++]=51,Jt(4);let i=n.values;t(i),Jt(0),Jt(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let a=0,s=i.length;a<s;a++)packedObjectMap[i[a]]=a}if(r){ve.setUint32(R,3655335424),R+=3;let i=r.slice(0);i.unshift(57344),i.push(new Zn(e.version,1399353956)),t(i)}else t(new Zn(e.version,1399353956))}}];function Xt(e,t){return!Fv&&t>1&&(e-=4),{tag:e,encode:function(r,i){let a=r.byteLength,s=r.byteOffset||0,o=r.buffer||r;i(Vi?bs.from(o,s,a):new Uint8Array(o,s,a))}}}function qo(e,t){let n=e.byteLength;n<24?B[R++]=64+n:n<256?(B[R++]=88,B[R++]=n):n<65536?(B[R++]=89,B[R++]=n>>8,B[R++]=n&255):(B[R++]=90,ve.setUint32(R,n),R+=4),R+n>=B.length&&t(R+n),B.set(e.buffer?e:new Uint8Array(e),R),R+=n}function Hv(e,t){let n,r=t.length*2,i=e.length-r;t.sort((a,s)=>a.offset>s.offset?1:-1);for(let a=0;a<t.length;a++){let s=t[a];s.id=a;for(let o of s.references)e[o++]=a>>8,e[o]=a&255}for(;n=t.pop();){let a=n.offset;e.copyWithin(a+r,a,i),r-=2;let s=a+r;e[s++]=216,e[s++]=28,i=a}return e}function jd(e,t){ve.setUint32(Ve.position+e,R-Ve.position-e+1);let n=Ve;Ve=null,t(n[0]),t(n[1])}let eu=new Mv({useRecords:!1});const Uv=eu.encode;eu.encodeAsIterable;eu.encodeAsAsyncIterable;const zd=512,jv=1024,Zs=2048;async function et(e,t){var i;const n=await fetch("/api/rpc",{method:"POST",headers:{"Content-Type":"application/cbor",Accept:"application/cbor"},body:new Uint8Array(Uv({method:e,params:t??{}}))});if(!n.ok){try{const a=await n.arrayBuffer(),s=Md(new Uint8Array(a));if((i=s==null?void 0:s.error)!=null&&i.message)throw new Error(s.error.message)}catch(a){if(a instanceof Error&&a.message!==`RPC call ${e} failed`)throw a}throw new Error(`RPC call ${e} failed: ${n.status} ${n.statusText}`)}const r=await n.arrayBuffer();return Md(new Uint8Array(r))}async function k4(e,t){return et("fetchRuns",{worldEnv:e,params:t})}async function A4(e,t,n="all"){return et("fetchRun",{worldEnv:e,runId:t,resolveData:n})}async function w4(e,t,n){return et("fetchSteps",{worldEnv:e,runId:t,params:n})}async function C4(e,t,n,r="all"){return et("fetchStep",{worldEnv:e,runId:t,stepId:n,resolveData:r})}async function S4(e,t,n){return et("fetchEvents",{worldEnv:e,runId:t,params:n})}async function N4(e,t,n){return et("fetchEventsByCorrelationId",{worldEnv:e,correlationId:t,params:n})}async function I4(e,t){return et("fetchHooks",{worldEnv:e,params:t})}async function R4(e,t,n="all"){return et("fetchHook",{worldEnv:e,hookId:t,resolveData:n})}async function O4(e,t){return et("cancelRun",{worldEnv:e,runId:t})}async function L4(e,t,n){return et("recreateRun",{worldEnv:e,runId:t,deploymentId:n})}async function v4(e,t){return et("reenqueueRun",{worldEnv:e,runId:t})}async function D4(e,t,n){return et("wakeUpRun",{worldEnv:e,runId:t,options:n})}async function P4(e,t,n){return et("resumeHook",{worldEnv:e,token:t,payload:n})}async function M4(e,t){return et("fetchStreams",{worldEnv:e,runId:t})}async function B4(e){return et("fetchWorkflowsManifest",{worldEnv:e})}async function F4(e,t,n){return et("runHealthCheck",{worldEnv:e,endpoint:t,options:n})}async function H4(e,t){return et("getEncryptionKeyForRun",{worldEnv:e,runId:t})}const zv=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:gm},Symbol.toStringTag,{value:"Module"}));export{re as $,w1 as A,yv as B,C1 as C,m4 as D,A4 as E,S4 as F,yf as G,Yv as H,Rt as I,vu as J,i4 as K,Gv as L,rT as M,dh as N,YE as O,tr as P,FI as Q,Ft as R,y4 as S,E4 as T,Kv as U,P1 as V,Xv as W,Jb as X,at as Y,ms as Z,YR as _,T4 as a,l4 as a0,c4 as a1,sv as a2,za as a3,u4 as a4,ps as a5,In as a6,Si as a7,GR as a8,la as a9,s1 as aA,l1 as aB,u1 as aC,d1 as aD,f1 as aE,p1 as aF,h1 as aG,c1 as aH,Xg as aI,O4 as aJ,v4 as aK,D4 as aL,P4 as aM,L4 as aN,B4 as aO,o4 as aa,a4 as ab,mr as ac,KR as ad,h4 as ae,d4 as af,f4 as ag,s4 as ah,Jv as ai,Qv as aj,R4 as ak,C4 as al,w4 as am,M4 as an,Cm as ao,pv as ap,Tv as aq,Md as ar,Nt as as,WE as at,g4 as au,H4 as av,p4 as aw,Zb as ax,Ev as ay,wm as az,hv as b,Wf as c,km as d,e4 as e,U1 as f,Gn as g,k4 as h,I4 as i,b4 as j,N4 as k,Wa as l,er as m,df as n,Yd as o,dn as p,ig as q,F4 as r,Um as s,Zv as t,x4 as u,Kd as v,L1 as w,A1 as x,S1 as y,_4 as z};