@lovelybunch/api 1.0.52 → 1.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/gait-path.d.ts.map +1 -0
- package/dist/lib/gait-path.js.map +1 -0
- package/dist/lib/git.d.ts.map +1 -0
- package/dist/lib/git.js.map +1 -0
- package/dist/lib/project-paths.d.ts.map +1 -0
- package/dist/lib/project-paths.js.map +1 -0
- package/dist/lib/storage/file-storage.d.ts.map +1 -0
- package/dist/lib/storage/file-storage.js.map +1 -0
- package/dist/lib/symlinks/symlink-manager.d.ts.map +1 -0
- package/dist/lib/symlinks/symlink-manager.js.map +1 -0
- package/dist/lib/symlinks/types.d.ts.map +1 -0
- package/dist/lib/symlinks/types.js.map +1 -0
- package/dist/lib/terminal/context-helper.d.ts.map +1 -0
- package/dist/lib/terminal/context-helper.js.map +1 -0
- package/dist/lib/terminal/global-manager.d.ts.map +1 -0
- package/dist/lib/terminal/global-manager.js.map +1 -0
- package/dist/lib/terminal/shell-utils.d.ts.map +1 -0
- package/dist/lib/terminal/shell-utils.js.map +1 -0
- package/dist/lib/terminal/terminal-manager.d.ts.map +1 -0
- package/dist/lib/terminal/terminal-manager.js.map +1 -0
- package/dist/lib/user-preferences.d.ts.map +1 -0
- package/dist/lib/user-preferences.js.map +1 -0
- package/dist/routes/api/v1/agents/[id]/index.d.ts.map +1 -0
- package/dist/routes/api/v1/agents/[id]/index.js.map +1 -0
- package/dist/routes/api/v1/agents/[id]/route.d.ts.map +1 -0
- package/dist/routes/api/v1/agents/[id]/route.js.map +1 -0
- package/dist/routes/api/v1/agents/index.d.ts.map +1 -0
- package/dist/routes/api/v1/agents/index.js.map +1 -0
- package/dist/routes/api/v1/agents/route.d.ts.map +1 -0
- package/dist/routes/api/v1/agents/route.js.map +1 -0
- package/dist/routes/api/v1/ai/index.d.ts.map +1 -0
- package/dist/routes/api/v1/ai/index.js.map +1 -0
- package/dist/routes/api/v1/ai/route.d.ts.map +1 -0
- package/dist/routes/api/v1/ai/route.js.map +1 -0
- package/dist/routes/api/v1/chats/[id]/index.d.ts.map +1 -0
- package/dist/routes/api/v1/chats/[id]/index.js.map +1 -0
- package/dist/routes/api/v1/chats/[id]/route.d.ts.map +1 -0
- package/dist/routes/api/v1/chats/[id]/route.js.map +1 -0
- package/dist/routes/api/v1/chats/index.d.ts.map +1 -0
- package/dist/routes/api/v1/chats/index.js.map +1 -0
- package/dist/routes/api/v1/chats/route.d.ts.map +1 -0
- package/dist/routes/api/v1/chats/route.js.map +1 -0
- package/dist/routes/api/v1/config/index.d.ts.map +1 -0
- package/dist/routes/api/v1/config/index.js.map +1 -0
- package/dist/routes/api/v1/config/route.d.ts.map +1 -0
- package/dist/routes/api/v1/config/route.js.map +1 -0
- package/dist/routes/api/v1/context/architecture/route.d.ts.map +1 -0
- package/dist/routes/api/v1/context/architecture/route.js.map +1 -0
- package/dist/routes/api/v1/context/index.d.ts.map +1 -0
- package/dist/routes/api/v1/context/index.js.map +1 -0
- package/dist/routes/api/v1/context/knowledge/[filename]/index.d.ts.map +1 -0
- package/dist/routes/api/v1/context/knowledge/[filename]/index.js.map +1 -0
- package/dist/routes/api/v1/context/knowledge/[filename]/route.d.ts.map +1 -0
- package/dist/routes/api/v1/context/knowledge/[filename]/route.js.map +1 -0
- package/dist/routes/api/v1/context/knowledge/index.d.ts.map +1 -0
- package/dist/routes/api/v1/context/knowledge/index.js.map +1 -0
- package/dist/routes/api/v1/context/knowledge/route.d.ts.map +1 -0
- package/dist/routes/api/v1/context/knowledge/route.js.map +1 -0
- package/dist/routes/api/v1/context/project/route.d.ts.map +1 -0
- package/dist/routes/api/v1/context/project/route.js.map +1 -0
- package/dist/routes/api/v1/git/index.d.ts.map +1 -0
- package/dist/routes/api/v1/git/index.js.map +1 -0
- package/dist/routes/api/v1/mcp/index.d.ts.map +1 -0
- package/dist/routes/api/v1/mcp/index.js.map +1 -0
- package/dist/routes/api/v1/mcp/route.d.ts.map +1 -0
- package/dist/routes/api/v1/mcp/route.js.map +1 -0
- package/dist/routes/api/v1/proposals/[id]/route.d.ts.map +1 -0
- package/dist/routes/api/v1/proposals/[id]/route.js.map +1 -0
- package/dist/routes/api/v1/proposals/index.d.ts.map +1 -0
- package/dist/routes/api/v1/proposals/index.js.map +1 -0
- package/dist/routes/api/v1/proposals/route.d.ts.map +1 -0
- package/dist/routes/api/v1/proposals/route.js.map +1 -0
- package/dist/routes/api/v1/resources/[id]/index.d.ts.map +1 -0
- package/dist/routes/api/v1/resources/[id]/index.js.map +1 -0
- package/dist/routes/api/v1/resources/[id]/route.js.map +1 -0
- package/dist/routes/api/v1/resources/[id]/thumbnail/index.d.ts.map +1 -0
- package/dist/routes/api/v1/resources/[id]/thumbnail/index.js.map +1 -0
- package/dist/routes/api/v1/resources/[id]/thumbnail/route.js.map +1 -0
- package/dist/routes/api/v1/resources/index.d.ts.map +1 -0
- package/dist/routes/api/v1/resources/index.js.map +1 -0
- package/dist/routes/api/v1/resources/route.d.ts.map +1 -0
- package/dist/routes/api/v1/resources/route.js.map +1 -0
- package/dist/routes/api/v1/symlinks/index.d.ts.map +1 -0
- package/dist/routes/api/v1/symlinks/index.js.map +1 -0
- package/dist/routes/api/v1/symlinks/route.d.ts.map +1 -0
- package/dist/routes/api/v1/symlinks/route.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/create/index.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/create/index.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/create/route.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/create/route.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/resize/index.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/resize/index.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/resize/route.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/resize/route.js.map +1 -0
- package/dist/routes/api/v1/terminal/sessions/index.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/sessions/index.js.map +1 -0
- package/dist/routes/api/v1/terminal/sessions/route.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/sessions/route.js.map +1 -0
- package/dist/routes/api/v1/user/index.d.ts.map +1 -0
- package/dist/routes/api/v1/user/index.js.map +1 -0
- package/dist/routes/api/v1/user/settings/index.d.ts.map +1 -0
- package/dist/routes/api/v1/user/settings/index.js.map +1 -0
- package/dist/routes/api/v1/user/settings/route.d.ts.map +1 -0
- package/dist/routes/api/v1/user/settings/route.js.map +1 -0
- package/dist/server-with-static.d.ts.map +1 -0
- package/dist/server-with-static.js.map +1 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js.map +1 -0
- package/package.json +4 -4
- package/static/assets/{index-Cwq3YsC0.js → index-BmF_6BRj.js} +1 -1
- package/static/index.html +1 -1
- package/dist/routes/api/v1/mcp/config/index.d.ts +0 -1
- package/dist/routes/api/v1/mcp/config/index.js +0 -1
- package/dist/routes/api/v1/mcp/config/route.d.ts +0 -3
- package/dist/routes/api/v1/mcp/config/route.js +0 -59
|
@@ -431,7 +431,7 @@ Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}
|
|
|
431
431
|
|
|
432
432
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
433
433
|
|
|
434
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return T.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},a9="DialogDescriptionWarning",i9=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qD(a9).contentName}}.`;return T.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Qv=OD,YD=MD,Jv=FD,Nu=PD,ku=BD,Ru=HD,Du=zD,Jf=VD;const KD=Qv,s9=Jv,XD=T.forwardRef(({className:e,...t},n)=>i.jsx(Nu,{className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));XD.displayName=Nu.displayName;const o9=dl("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ey=T.forwardRef(({side:e="right",className:t,children:n,...r},s)=>i.jsxs(s9,{children:[i.jsx(XD,{}),i.jsxs(ku,{ref:s,className:Te(o9({side:e}),t),...r,children:[n,i.jsxs(Jf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[i.jsx(Jn,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ey.displayName=ku.displayName;const ty=({className:e,...t})=>i.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});ty.displayName="SheetHeader";const ny=T.forwardRef(({className:e,...t},n)=>i.jsx(Ru,{ref:n,className:Te("text-lg font-semibold text-foreground",e),...t}));ny.displayName=Ru.displayName;const ZD=T.forwardRef(({className:e,...t},n)=>i.jsx(Du,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));ZD.displayName=Du.displayName;function AN({className:e,...t}){return i.jsx("div",{className:Te("animate-pulse rounded-md bg-muted",e),...t})}const l9=["top","right","bottom","left"],ji=Math.min,Sr=Math.max,pf=Math.round,kh=Math.floor,xa=e=>({x:e,y:e}),c9={left:"right",right:"left",bottom:"top",top:"bottom"},u9={start:"end",end:"start"};function R0(e,t,n){return Sr(e,ji(t,n))}function Ja(e,t){return typeof e=="function"?e(t):e}function ei(e){return e.split("-")[0]}function ml(e){return e.split("-")[1]}function ry(e){return e==="x"?"y":"x"}function ay(e){return e==="y"?"height":"width"}const d9=new Set(["top","bottom"]);function ga(e){return d9.has(ei(e))?"y":"x"}function iy(e){return ry(ga(e))}function h9(e,t,n){n===void 0&&(n=!1);const r=ml(e),s=iy(e),l=ay(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=mf(u)),[u,mf(u)]}function f9(e){const t=mf(e);return[D0(e),t,D0(t)]}function D0(e){return e.replace(/start|end/g,t=>u9[t])}const NN=["left","right"],kN=["right","left"],p9=["top","bottom"],m9=["bottom","top"];function g9(e,t,n){switch(e){case"top":case"bottom":return n?t?kN:NN:t?NN:kN;case"left":case"right":return t?p9:m9;default:return[]}}function b9(e,t,n,r){const s=ml(e);let l=g9(ei(e),n==="start",r);return s&&(l=l.map(u=>u+"-"+s),t&&(l=l.concat(l.map(D0)))),l}function mf(e){return e.replace(/left|right|bottom|top/g,t=>c9[t])}function v9(e){return{top:0,right:0,bottom:0,left:0,...e}}function QD(e){return typeof e!="number"?v9(e):{top:e,right:e,bottom:e,left:e}}function gf(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function RN(e,t,n){let{reference:r,floating:s}=e;const l=ga(t),u=iy(t),c=ay(u),d=ei(t),h=l==="y",m=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,v=r[c]/2-s[c]/2;let _;switch(d){case"top":_={x:m,y:r.y-s.height};break;case"bottom":_={x:m,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:p};break;case"left":_={x:r.x-s.width,y:p};break;default:_={x:r.x,y:r.y}}switch(ml(t)){case"start":_[u]-=v*(n&&h?-1:1);break;case"end":_[u]+=v*(n&&h?-1:1);break}return _}const y9=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:l=[],platform:u}=n,c=l.filter(Boolean),d=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:p}=RN(h,r,d),v=r,_={},w=0;for(let S=0;S<c.length;S++){const{name:b,fn:E}=c[S],{x:y,y:x,data:A,reset:k}=await E({x:m,y:p,initialPlacement:r,placement:v,strategy:s,middlewareData:_,rects:h,platform:u,elements:{reference:e,floating:t}});m=y??m,p=x??p,_={..._,[b]:{..._[b],...A}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(h=k.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:m,y:p}=RN(h,v,d)),S=-1)}return{x:m,y:p,placement:v,strategy:s,middlewareData:_}};async function ou(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:l,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:v=!1,padding:_=0}=Ja(t,e),w=QD(_),b=c[v?p==="floating"?"reference":"floating":p],E=gf(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(b)))==null||n?b:b.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:d})),y=p==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,x=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c.floating)),A=await(l.isElement==null?void 0:l.isElement(x))?await(l.getScale==null?void 0:l.getScale(x))||{x:1,y:1}:{x:1,y:1},k=gf(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:x,strategy:d}):y);return{top:(E.top-k.top+w.top)/A.y,bottom:(k.bottom-E.bottom+w.bottom)/A.y,left:(E.left-k.left+w.left)/A.x,right:(k.right-E.right+w.right)/A.x}}const E9=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:l,platform:u,elements:c,middlewareData:d}=t,{element:h,padding:m=0}=Ja(e,t)||{};if(h==null)return{};const p=QD(m),v={x:n,y:r},_=iy(s),w=ay(_),S=await u.getDimensions(h),b=_==="y",E=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",A=l.reference[w]+l.reference[_]-v[_]-l.floating[w],k=v[_]-l.reference[_],N=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let L=N?N[x]:0;(!L||!await(u.isElement==null?void 0:u.isElement(N)))&&(L=c.floating[x]||l.floating[w]);const R=A/2-k/2,M=L/2-S[w]/2-1,j=ji(p[E],M),U=ji(p[y],M),W=j,$=L-S[w]-U,G=L/2-S[w]/2+R,ee=R0(W,G,$),P=!d.arrow&&ml(s)!=null&&G!==ee&&l.reference[w]/2-(G<W?j:U)-S[w]/2<0,Z=P?G<W?G-W:G-$:0;return{[_]:v[_]+Z,data:{[_]:ee,centerOffset:G-ee-Z,...P&&{alignmentOffset:Z}},reset:P}}}),_9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:l,rects:u,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...b}=Ja(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const E=ei(s),y=ga(c),x=ei(c)===c,A=await(d.isRTL==null?void 0:d.isRTL(h.floating)),k=v||(x||!S?[mf(c)]:f9(c)),N=w!=="none";!v&&N&&k.push(...b9(c,S,w,A));const L=[c,...k],R=await ou(t,b),M=[];let j=((r=l.flip)==null?void 0:r.overflows)||[];if(m&&M.push(R[E]),p){const G=h9(s,u,A);M.push(R[G[0]],R[G[1]])}if(j=[...j,{placement:s,overflows:M}],!M.every(G=>G<=0)){var U,W;const G=(((U=l.flip)==null?void 0:U.index)||0)+1,ee=L[G];if(ee&&(!(p==="alignment"?y!==ga(ee):!1)||j.every(X=>ga(X.placement)===y?X.overflows[0]>0:!0)))return{data:{index:G,overflows:j},reset:{placement:ee}};let P=(W=j.filter(Z=>Z.overflows[0]<=0).sort((Z,X)=>Z.overflows[1]-X.overflows[1])[0])==null?void 0:W.placement;if(!P)switch(_){case"bestFit":{var $;const Z=($=j.filter(X=>{if(N){const F=ga(X.placement);return F===y||F==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(F=>F>0).reduce((F,O)=>F+O,0)]).sort((X,F)=>X[1]-F[1])[0])==null?void 0:$[0];Z&&(P=Z);break}case"initialPlacement":P=c;break}if(s!==P)return{reset:{placement:P}}}return{}}}};function DN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function IN(e){return l9.some(t=>e[t]>=0)}const x9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Ja(e,t);switch(r){case"referenceHidden":{const l=await ou(t,{...s,elementContext:"reference"}),u=DN(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:IN(u)}}}case"escaped":{const l=await ou(t,{...s,altBoundary:!0}),u=DN(l,n.floating);return{data:{escapedOffsets:u,escaped:IN(u)}}}default:return{}}}}},JD=new Set(["left","top"]);async function S9(e,t){const{placement:n,platform:r,elements:s}=e,l=await(r.isRTL==null?void 0:r.isRTL(s.floating)),u=ei(n),c=ml(n),d=ga(n)==="y",h=JD.has(u)?-1:1,m=l&&d?-1:1,p=Ja(t,e);let{mainAxis:v,crossAxis:_,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof w=="number"&&(_=c==="end"?w*-1:w),d?{x:_*m,y:v*h}:{x:v*h,y:_*m}}const w9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:l,placement:u,middlewareData:c}=t,d=await S9(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:l+d.y,data:{...d,placement:u}}}}},C9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:c={fn:b=>{let{x:E,y}=b;return{x:E,y}}},...d}=Ja(e,t),h={x:n,y:r},m=await ou(t,d),p=ga(ei(s)),v=ry(p);let _=h[v],w=h[p];if(l){const b=v==="y"?"top":"left",E=v==="y"?"bottom":"right",y=_+m[b],x=_-m[E];_=R0(y,_,x)}if(u){const b=p==="y"?"top":"left",E=p==="y"?"bottom":"right",y=w+m[b],x=w-m[E];w=R0(y,w,x)}const S=c.fn({...t,[v]:_,[p]:w});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[v]:l,[p]:u}}}}}},T9=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:l,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Ja(e,t),m={x:n,y:r},p=ga(s),v=ry(p);let _=m[v],w=m[p];const S=Ja(c,t),b=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const x=v==="y"?"height":"width",A=l.reference[v]-l.floating[x]+b.mainAxis,k=l.reference[v]+l.reference[x]-b.mainAxis;_<A?_=A:_>k&&(_=k)}if(h){var E,y;const x=v==="y"?"width":"height",A=JD.has(ei(s)),k=l.reference[p]-l.floating[x]+(A&&((E=u.offset)==null?void 0:E[p])||0)+(A?0:b.crossAxis),N=l.reference[p]+l.reference[x]+(A?0:((y=u.offset)==null?void 0:y[p])||0)-(A?b.crossAxis:0);w<k?w=k:w>N&&(w=N)}return{[v]:_,[p]:w}}}},A9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:l,platform:u,elements:c}=t,{apply:d=()=>{},...h}=Ja(e,t),m=await ou(t,h),p=ei(s),v=ml(s),_=ga(s)==="y",{width:w,height:S}=l.floating;let b,E;p==="top"||p==="bottom"?(b=p,E=v===(await(u.isRTL==null?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(E=p,b=v==="end"?"top":"bottom");const y=S-m.top-m.bottom,x=w-m.left-m.right,A=ji(S-m[b],y),k=ji(w-m[E],x),N=!t.middlewareData.shift;let L=A,R=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(L=y),N&&!v){const j=Sr(m.left,0),U=Sr(m.right,0),W=Sr(m.top,0),$=Sr(m.bottom,0);_?R=w-2*(j!==0||U!==0?j+U:Sr(m.left,m.right)):L=S-2*(W!==0||$!==0?W+$:Sr(m.top,m.bottom))}await d({...t,availableWidth:R,availableHeight:L});const M=await u.getDimensions(c.floating);return w!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function ep(){return typeof window<"u"}function gl(e){return eI(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Aa(e){var t;return(t=(eI(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function eI(e){return ep()?e instanceof Node||e instanceof Cr(e).Node:!1}function ea(e){return ep()?e instanceof Element||e instanceof Cr(e).Element:!1}function wa(e){return ep()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function ON(e){return!ep()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}const N9=new Set(["inline","contents"]);function Iu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=ta(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!N9.has(s)}const k9=new Set(["table","td","th"]);function R9(e){return k9.has(gl(e))}const D9=[":popover-open",":modal"];function tp(e){return D9.some(t=>{try{return e.matches(t)}catch{return!1}})}const I9=["transform","translate","scale","rotate","perspective"],O9=["transform","translate","scale","rotate","perspective","filter"],L9=["paint","layout","strict","content"];function sy(e){const t=oy(),n=ea(e)?ta(e):e;return I9.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)||O9.some(r=>(n.willChange||"").includes(r))||L9.some(r=>(n.contain||"").includes(r))}function M9(e){let t=Fi(e);for(;wa(t)&&!Zo(t);){if(sy(t))return t;if(tp(t))return null;t=Fi(t)}return null}function oy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const j9=new Set(["html","body","#document"]);function Zo(e){return j9.has(gl(e))}function ta(e){return Cr(e).getComputedStyle(e)}function np(e){return ea(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(gl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ON(e)&&e.host||Aa(e);return ON(t)?t.host:t}function tI(e){const t=Fi(e);return Zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:wa(t)&&Iu(t)?t:tI(t)}function lu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=tI(e),l=s===((r=e.ownerDocument)==null?void 0:r.body),u=Cr(s);if(l){const c=I0(u);return t.concat(u,u.visualViewport||[],Iu(s)?s:[],c&&n?lu(c):[])}return t.concat(s,lu(s,[],n))}function I0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nI(e){const t=ta(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=wa(e),l=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=pf(n)!==l||pf(r)!==u;return c&&(n=l,r=u),{width:n,height:r,$:c}}function ly(e){return ea(e)?e:e.contextElement}function Go(e){const t=ly(e);if(!wa(t))return xa(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:l}=nI(t);let u=(l?pf(n.width):n.width)/r,c=(l?pf(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const F9=xa(0);function rI(e){const t=Cr(e);return!oy()||!t.visualViewport?F9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function P9(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Cr(e)?!1:t}function _s(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),l=ly(e);let u=xa(1);t&&(r?ea(r)&&(u=Go(r)):u=Go(e));const c=P9(l,n,r)?rI(l):xa(0);let d=(s.left+c.x)/u.x,h=(s.top+c.y)/u.y,m=s.width/u.x,p=s.height/u.y;if(l){const v=Cr(l),_=r&&ea(r)?Cr(r):r;let w=v,S=I0(w);for(;S&&r&&_!==w;){const b=Go(S),E=S.getBoundingClientRect(),y=ta(S),x=E.left+(S.clientLeft+parseFloat(y.paddingLeft))*b.x,A=E.top+(S.clientTop+parseFloat(y.paddingTop))*b.y;d*=b.x,h*=b.y,m*=b.x,p*=b.y,d+=x,h+=A,w=Cr(S),S=I0(w)}}return gf({width:m,height:p,x:d,y:h})}function cy(e,t){const n=np(e).scrollLeft;return t?t.left+n:_s(Aa(e)).left+n}function aI(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:cy(e,r)),l=r.top+t.scrollTop;return{x:s,y:l}}function B9(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const l=s==="fixed",u=Aa(r),c=t?tp(t.floating):!1;if(r===u||c&&l)return n;let d={scrollLeft:0,scrollTop:0},h=xa(1);const m=xa(0),p=wa(r);if((p||!p&&!l)&&((gl(r)!=="body"||Iu(u))&&(d=np(r)),wa(r))){const _=_s(r);h=Go(r),m.x=_.x+r.clientLeft,m.y=_.y+r.clientTop}const v=u&&!p&&!l?aI(u,d,!0):xa(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+m.x+v.x,y:n.y*h.y-d.scrollTop*h.y+m.y+v.y}}function U9(e){return Array.from(e.getClientRects())}function H9(e){const t=Aa(e),n=np(e),r=e.ownerDocument.body,s=Sr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=Sr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cy(e);const c=-n.scrollTop;return ta(r).direction==="rtl"&&(u+=Sr(t.clientWidth,r.clientWidth)-s),{width:s,height:l,x:u,y:c}}function $9(e,t){const n=Cr(e),r=Aa(e),s=n.visualViewport;let l=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){l=s.width,u=s.height;const h=oy();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}return{width:l,height:u,x:c,y:d}}const z9=new Set(["absolute","fixed"]);function G9(e,t){const n=_s(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,l=wa(e)?Go(e):xa(1),u=e.clientWidth*l.x,c=e.clientHeight*l.y,d=s*l.x,h=r*l.y;return{width:u,height:c,x:d,y:h}}function LN(e,t,n){let r;if(t==="viewport")r=$9(e,n);else if(t==="document")r=H9(Aa(e));else if(ea(t))r=G9(t,n);else{const s=rI(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return gf(r)}function iI(e,t){const n=Fi(e);return n===t||!ea(n)||Zo(n)?!1:ta(n).position==="fixed"||iI(n,t)}function V9(e,t){const n=t.get(e);if(n)return n;let r=lu(e,[],!1).filter(c=>ea(c)&&gl(c)!=="body"),s=null;const l=ta(e).position==="fixed";let u=l?Fi(e):e;for(;ea(u)&&!Zo(u);){const c=ta(u),d=sy(u);!d&&c.position==="fixed"&&(s=null),(l?!d&&!s:!d&&c.position==="static"&&!!s&&z9.has(s.position)||Iu(u)&&!d&&iI(e,u))?r=r.filter(m=>m!==u):s=c,u=Fi(u)}return t.set(e,r),r}function W9(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?tp(t)?[]:V9(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,m)=>{const p=LN(t,m,s);return h.top=Sr(p.top,h.top),h.right=ji(p.right,h.right),h.bottom=ji(p.bottom,h.bottom),h.left=Sr(p.left,h.left),h},LN(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function q9(e){const{width:t,height:n}=nI(e);return{width:t,height:n}}function Y9(e,t,n){const r=wa(t),s=Aa(t),l=n==="fixed",u=_s(e,!0,l,t);let c={scrollLeft:0,scrollTop:0};const d=xa(0);function h(){d.x=cy(s)}if(r||!r&&!l)if((gl(t)!=="body"||Iu(s))&&(c=np(t)),r){const _=_s(t,!0,l,t);d.x=_.x+t.clientLeft,d.y=_.y+t.clientTop}else s&&h();l&&!r&&s&&h();const m=s&&!r&&!l?aI(s,c):xa(0),p=u.left+c.scrollLeft-d.x-m.x,v=u.top+c.scrollTop-d.y-m.y;return{x:p,y:v,width:u.width,height:u.height}}function Ab(e){return ta(e).position==="static"}function MN(e,t){if(!wa(e)||ta(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Aa(e)===n&&(n=n.ownerDocument.body),n}function sI(e,t){const n=Cr(e);if(tp(e))return n;if(!wa(e)){let s=Fi(e);for(;s&&!Zo(s);){if(ea(s)&&!Ab(s))return s;s=Fi(s)}return n}let r=MN(e,t);for(;r&&R9(r)&&Ab(r);)r=MN(r,t);return r&&Zo(r)&&Ab(r)&&!sy(r)?n:r||M9(e)||n}const K9=async function(e){const t=this.getOffsetParent||sI,n=this.getDimensions,r=await n(e.floating);return{reference:Y9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function X9(e){return ta(e).direction==="rtl"}const Z9={convertOffsetParentRelativeRectToViewportRelativeRect:B9,getDocumentElement:Aa,getClippingRect:W9,getOffsetParent:sI,getElementRects:K9,getClientRects:U9,getDimensions:q9,getScale:Go,isElement:ea,isRTL:X9};function oI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Q9(e,t){let n=null,r;const s=Aa(e);function l(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),l();const h=e.getBoundingClientRect(),{left:m,top:p,width:v,height:_}=h;if(c||t(),!v||!_)return;const w=kh(p),S=kh(s.clientWidth-(m+v)),b=kh(s.clientHeight-(p+_)),E=kh(m),x={rootMargin:-w+"px "+-S+"px "+-b+"px "+-E+"px",threshold:Sr(0,ji(1,d))||1};let A=!0;function k(N){const L=N[0].intersectionRatio;if(L!==d){if(!A)return u();L?u(!1,L):r=setTimeout(()=>{u(!1,1e-7)},1e3)}L===1&&!oI(h,e.getBoundingClientRect())&&u(),A=!1}try{n=new IntersectionObserver(k,{...x,root:s.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(e)}return u(!0),l}function J9(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=ly(e),m=s||l?[...h?lu(h):[],...lu(t)]:[];m.forEach(E=>{s&&E.addEventListener("scroll",n,{passive:!0}),l&&E.addEventListener("resize",n)});const p=h&&c?Q9(h,n):null;let v=-1,_=null;u&&(_=new ResizeObserver(E=>{let[y]=E;y&&y.target===h&&_&&(_.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=_)==null||x.observe(t)})),n()}),h&&!d&&_.observe(h),_.observe(t));let w,S=d?_s(e):null;d&&b();function b(){const E=_s(e);S&&!oI(S,E)&&n(),S=E,w=requestAnimationFrame(b)}return n(),()=>{var E;m.forEach(y=>{s&&y.removeEventListener("scroll",n),l&&y.removeEventListener("resize",n)}),p?.(),(E=_)==null||E.disconnect(),_=null,d&&cancelAnimationFrame(w)}}const eH=w9,tH=C9,nH=_9,rH=A9,aH=x9,jN=E9,iH=T9,sH=(e,t,n)=>{const r=new Map,s={platform:Z9,...n},l={...s.platform,_c:r};return y9(e,t,{...s,platform:l})};var oH=typeof document<"u",lH=function(){},Xh=oH?T.useLayoutEffect:lH;function bf(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,s;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(!bf(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const l=s[r];if(!(l==="_owner"&&e.$$typeof)&&!bf(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function lI(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function FN(e,t){const n=lI(e);return Math.round(t*n)/n}function Nb(e){const t=T.useRef(e);return Xh(()=>{t.current=e}),t}function cH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:l,floating:u}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[m,p]=T.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,_]=T.useState(r);bf(v,r)||_(r);const[w,S]=T.useState(null),[b,E]=T.useState(null),y=T.useCallback(X=>{X!==N.current&&(N.current=X,S(X))},[]),x=T.useCallback(X=>{X!==L.current&&(L.current=X,E(X))},[]),A=l||w,k=u||b,N=T.useRef(null),L=T.useRef(null),R=T.useRef(m),M=d!=null,j=Nb(d),U=Nb(s),W=Nb(h),$=T.useCallback(()=>{if(!N.current||!L.current)return;const X={placement:t,strategy:n,middleware:v};U.current&&(X.platform=U.current),sH(N.current,L.current,X).then(F=>{const O={...F,isPositioned:W.current!==!1};G.current&&!bf(R.current,O)&&(R.current=O,ll.flushSync(()=>{p(O)}))})},[v,t,n,U,W]);Xh(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(X=>({...X,isPositioned:!1})))},[h]);const G=T.useRef(!1);Xh(()=>(G.current=!0,()=>{G.current=!1}),[]),Xh(()=>{if(A&&(N.current=A),k&&(L.current=k),A&&k){if(j.current)return j.current(A,k,$);$()}},[A,k,$,j,M]);const ee=T.useMemo(()=>({reference:N,floating:L,setReference:y,setFloating:x}),[y,x]),P=T.useMemo(()=>({reference:A,floating:k}),[A,k]),Z=T.useMemo(()=>{const X={position:n,left:0,top:0};if(!P.floating)return X;const F=FN(P.floating,m.x),O=FN(P.floating,m.y);return c?{...X,transform:"translate("+F+"px, "+O+"px)",...lI(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:O}},[n,c,P.floating,m.x,m.y]);return T.useMemo(()=>({...m,update:$,refs:ee,elements:P,floatingStyles:Z}),[m,$,ee,P,Z])}const uH=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?jN({element:r.current,padding:s}).fn(n):{}:r?jN({element:r,padding:s}).fn(n):{}}}},dH=(e,t)=>({...eH(e),options:[e,t]}),hH=(e,t)=>({...tH(e),options:[e,t]}),fH=(e,t)=>({...iH(e),options:[e,t]}),pH=(e,t)=>({...nH(e),options:[e,t]}),mH=(e,t)=>({...rH(e),options:[e,t]}),gH=(e,t)=>({...aH(e),options:[e,t]}),bH=(e,t)=>({...uH(e),options:[e,t]});var vH="Arrow",cI=T.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...l}=e;return i.jsx(it.svg,{...l,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});cI.displayName=vH;var yH=cI;function uI(e){const[t,n]=T.useState(void 0);return Rn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let u,c;if("borderBoxSize"in l){const d=l.borderBoxSize,h=Array.isArray(d)?d[0]:d;u=h.inlineSize,c=h.blockSize}else u=e.offsetWidth,c=e.offsetHeight;n({width:u,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var uy="Popper",[dI,bl]=$r(uy),[EH,hI]=dI(uy),fI=e=>{const{__scopePopper:t,children:n}=e,[r,s]=T.useState(null);return i.jsx(EH,{scope:t,anchor:r,onAnchorChange:s,children:n})};fI.displayName=uy;var pI="PopperAnchor",mI=T.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,l=hI(pI,n),u=T.useRef(null),c=pt(t,u),d=T.useRef(null);return T.useEffect(()=>{const h=d.current;d.current=r?.current||u.current,h!==d.current&&l.onAnchorChange(d.current)}),r?null:i.jsx(it.div,{...s,ref:c})});mI.displayName=pI;var dy="PopperContent",[_H,xH]=dI(dy),gI=T.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:l="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:_="optimized",onPlaced:w,...S}=e,b=hI(dy,n),[E,y]=T.useState(null),x=pt(t,Q=>y(Q)),[A,k]=T.useState(null),N=uI(A),L=N?.width??0,R=N?.height??0,M=r+(l!=="center"?"-"+l:""),j=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},U=Array.isArray(h)?h:[h],W=U.length>0,$={padding:j,boundary:U.filter(wH),altBoundary:W},{refs:G,floatingStyles:ee,placement:P,isPositioned:Z,middlewareData:X}=cH({strategy:"fixed",placement:M,whileElementsMounted:(...Q)=>J9(...Q,{animationFrame:_==="always"}),elements:{reference:b.anchor},middleware:[dH({mainAxis:s+R,alignmentAxis:u}),d&&hH({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?fH():void 0,...$}),d&&pH({...$}),mH({...$,apply:({elements:Q,rects:V,availableWidth:pe,availableHeight:be})=>{const{width:me,height:_e}=V.reference,$e=Q.floating.style;$e.setProperty("--radix-popper-available-width",`${pe}px`),$e.setProperty("--radix-popper-available-height",`${be}px`),$e.setProperty("--radix-popper-anchor-width",`${me}px`),$e.setProperty("--radix-popper-anchor-height",`${_e}px`)}}),A&&bH({element:A,padding:c}),CH({arrowWidth:L,arrowHeight:R}),v&&gH({strategy:"referenceHidden",...$})]}),[F,O]=yI(P),B=cn(w);Rn(()=>{Z&&B?.()},[Z,B]);const K=X.arrow?.x,z=X.arrow?.y,se=X.arrow?.centerOffset!==0,[xe,ue]=T.useState();return Rn(()=>{E&&ue(window.getComputedStyle(E).zIndex)},[E]),i.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:Z?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[X.transformOrigin?.x,X.transformOrigin?.y].join(" "),...X.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(_H,{scope:n,placedSide:F,onArrowChange:k,arrowX:K,arrowY:z,shouldHideArrow:se,children:i.jsx(it.div,{"data-side":F,"data-align":O,...S,ref:x,style:{...S.style,animation:Z?void 0:"none"}})})})});gI.displayName=dy;var bI="PopperArrow",SH={top:"bottom",right:"left",bottom:"top",left:"right"},vI=T.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,l=xH(bI,r),u=SH[l.placedSide];return i.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:i.jsx(yH,{...s,ref:n,style:{...s.style,display:"block"}})})});vI.displayName=bI;function wH(e){return e!==null}var CH=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:s}=t,u=s.arrow?.centerOffset!==0,c=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[h,m]=yI(n),p={start:"0%",center:"50%",end:"100%"}[m],v=(s.arrow?.x??0)+c/2,_=(s.arrow?.y??0)+d/2;let w="",S="";return h==="bottom"?(w=u?p:`${v}px`,S=`${-d}px`):h==="top"?(w=u?p:`${v}px`,S=`${r.floating.height+d}px`):h==="right"?(w=`${-d}px`,S=u?p:`${_}px`):h==="left"&&(w=`${r.floating.width+d}px`,S=u?p:`${_}px`),{data:{x:w,y:S}}}});function yI(e){const[t,n="center"]=e.split("-");return[t,n]}var hy=fI,fy=mI,py=gI,my=vI,[rp,coe]=$r("Tooltip",[bl]),ap=bl(),EI="TooltipProvider",TH=700,O0="tooltip.open",[AH,gy]=rp(EI),_I=e=>{const{__scopeTooltip:t,delayDuration:n=TH,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:l}=e,u=T.useRef(!0),c=T.useRef(!1),d=T.useRef(0);return T.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),i.jsx(AH,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:T.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:T.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:T.useCallback(h=>{c.current=h},[]),disableHoverableContent:s,children:l})};_I.displayName=EI;var cu="Tooltip",[NH,ip]=rp(cu),xI=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:l,disableHoverableContent:u,delayDuration:c}=e,d=gy(cu,e.__scopeTooltip),h=ap(t),[m,p]=T.useState(null),v=_a(),_=T.useRef(0),w=u??d.disableHoverableContent,S=c??d.delayDuration,b=T.useRef(!1),[E,y]=Mi({prop:r,defaultProp:s??!1,onChange:L=>{L?(d.onOpen(),document.dispatchEvent(new CustomEvent(O0))):d.onClose(),l?.(L)},caller:cu}),x=T.useMemo(()=>E?b.current?"delayed-open":"instant-open":"closed",[E]),A=T.useCallback(()=>{window.clearTimeout(_.current),_.current=0,b.current=!1,y(!0)},[y]),k=T.useCallback(()=>{window.clearTimeout(_.current),_.current=0,y(!1)},[y]),N=T.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{b.current=!0,y(!0),_.current=0},S)},[S,y]);return T.useEffect(()=>()=>{_.current&&(window.clearTimeout(_.current),_.current=0)},[]),i.jsx(hy,{...h,children:i.jsx(NH,{scope:t,contentId:v,open:E,stateAttribute:x,trigger:m,onTriggerChange:p,onTriggerEnter:T.useCallback(()=>{d.isOpenDelayedRef.current?N():A()},[d.isOpenDelayedRef,N,A]),onTriggerLeave:T.useCallback(()=>{w?k():(window.clearTimeout(_.current),_.current=0)},[k,w]),onOpen:A,onClose:k,disableHoverableContent:w,children:n})})};xI.displayName=cu;var L0="TooltipTrigger",SI=T.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=ip(L0,n),l=gy(L0,n),u=ap(n),c=T.useRef(null),d=pt(t,c,s.onTriggerChange),h=T.useRef(!1),m=T.useRef(!1),p=T.useCallback(()=>h.current=!1,[]);return T.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),i.jsx(fy,{asChild:!0,...u,children:i.jsx(it.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:d,onPointerMove:Be(e.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!l.isPointerInTransitRef.current&&(s.onTriggerEnter(),m.current=!0)}),onPointerLeave:Be(e.onPointerLeave,()=>{s.onTriggerLeave(),m.current=!1}),onPointerDown:Be(e.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Be(e.onFocus,()=>{h.current||s.onOpen()}),onBlur:Be(e.onBlur,s.onClose),onClick:Be(e.onClick,s.onClose)})})});SI.displayName=L0;var kH="TooltipPortal",[uoe,RH]=rp(kH,{forceMount:void 0}),Qo="TooltipContent",wI=T.forwardRef((e,t)=>{const n=RH(Qo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...l}=e,u=ip(Qo,e.__scopeTooltip);return i.jsx(tr,{present:r||u.open,children:u.disableHoverableContent?i.jsx(CI,{side:s,...l,ref:t}):i.jsx(DH,{side:s,...l,ref:t})})}),DH=T.forwardRef((e,t)=>{const n=ip(Qo,e.__scopeTooltip),r=gy(Qo,e.__scopeTooltip),s=T.useRef(null),l=pt(t,s),[u,c]=T.useState(null),{trigger:d,onClose:h}=n,m=s.current,{onPointerInTransitChange:p}=r,v=T.useCallback(()=>{c(null),p(!1)},[p]),_=T.useCallback((w,S)=>{const b=w.currentTarget,E={x:w.clientX,y:w.clientY},y=jH(E,b.getBoundingClientRect()),x=FH(E,y),A=PH(S.getBoundingClientRect()),k=UH([...x,...A]);c(k),p(!0)},[p]);return T.useEffect(()=>()=>v(),[v]),T.useEffect(()=>{if(d&&m){const w=b=>_(b,m),S=b=>_(b,d);return d.addEventListener("pointerleave",w),m.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",S)}}},[d,m,_,v]),T.useEffect(()=>{if(u){const w=S=>{const b=S.target,E={x:S.clientX,y:S.clientY},y=d?.contains(b)||m?.contains(b),x=!BH(E,u);y?v():x&&(v(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,m,u,h,v]),i.jsx(CI,{...e,ref:l})}),[IH,OH]=rp(cu,{isInside:!1}),LH=CR("TooltipContent"),CI=T.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:u,...c}=e,d=ip(Qo,n),h=ap(n),{onClose:m}=d;return T.useEffect(()=>(document.addEventListener(O0,m),()=>document.removeEventListener(O0,m)),[m]),T.useEffect(()=>{if(d.trigger){const p=v=>{v.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,m]),i.jsx(ul,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:p=>p.preventDefault(),onDismiss:m,children:i.jsxs(py,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.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:[i.jsx(LH,{children:r}),i.jsx(IH,{scope:n,isInside:!0,children:i.jsx(m8,{id:d.contentId,role:"tooltip",children:s||r})})]})})});wI.displayName=Qo;var TI="TooltipArrow",MH=T.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=ap(n);return OH(TI,n).isInside?null:i.jsx(my,{...s,...r,ref:t})});MH.displayName=TI;function jH(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,r,s,l)){case l:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function FH(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 PH(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function BH(e,t){const{x:n,y:r}=e;let s=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const c=t[l],d=t[u],h=c.x,m=c.y,p=d.x,v=d.y;m>r!=v>r&&n<(p-h)*(r-m)/(v-m)+h&&(s=!s)}return s}function UH(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),HH(t)}function HH(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const l=t[t.length-1],u=t[t.length-2];if((l.x-u.x)*(s.y-u.y)>=(l.y-u.y)*(s.x-u.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const l=n[n.length-1],u=n[n.length-2];if((l.x-u.x)*(s.y-u.y)>=(l.y-u.y)*(s.x-u.x))n.pop();else break}n.push(s)}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 $H=_I,zH=xI,GH=SI,AI=wI;const VH=$H,WH=zH,qH=GH,NI=T.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(AI,{ref:r,sideOffset:t,className:Te("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}));NI.displayName=AI.displayName;const YH="sidebar_state",KH=3600*24*7,XH="16rem",ZH="18rem",QH="3rem",JH="b",kI=T.createContext(null);function sp(){const e=T.useContext(kI);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const RI=T.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:l,...u},c)=>{const d=yD(),[h,m]=T.useState(!1),[p,v]=T.useState(e),_=t??p,w=T.useCallback(y=>{const x=typeof y=="function"?y(_):y;n?n(x):v(x),document.cookie=`${YH}=${x}; path=/; max-age=${KH}`},[n,_]),S=T.useCallback(()=>d?m(y=>!y):w(y=>!y),[d,w,m]);T.useEffect(()=>{const y=x=>{x.key===JH&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),S())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[S]);const b=_?"expanded":"collapsed",E=T.useMemo(()=>({state:b,open:_,setOpen:w,isMobile:d,openMobile:h,setOpenMobile:m,toggleSidebar:S}),[b,_,w,d,h,m,S]);return i.jsx(kI.Provider,{value:E,children:i.jsx(VH,{delayDuration:0,children:i.jsx("div",{style:{"--sidebar-width":XH,"--sidebar-width-icon":QH,...s},className:Te("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:c,...u,children:l})})})});RI.displayName="SidebarProvider";const DI=T.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...l},u)=>{const{isMobile:c,state:d,openMobile:h,setOpenMobile:m}=sp();return n==="none"?i.jsx("div",{className:Te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:u,...l,children:s}):c?i.jsx(KD,{open:h,onOpenChange:m,...l,children:i.jsxs(ey,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":ZH},side:e,children:[i.jsxs(ty,{className:"sr-only",children:[i.jsx(ny,{children:"Sidebar"}),i.jsx(ZD,{children:"Displays the mobile sidebar."})]}),i.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):i.jsxs("div",{ref:u,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,children:[i.jsx("div",{className:Te("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),i.jsx("div",{className:Te("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...l,children:i.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});DI.displayName="Sidebar";const II=T.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:s}=sp();return i.jsxs(ie,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Te("h-7 w-7",e),onClick:l=>{t?.(l),s()},...n,children:[i.jsx(GB,{}),i.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});II.displayName="SidebarTrigger";const e$=T.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=sp();return i.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:Te("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});e$.displayName="SidebarRail";const OI=T.forwardRef(({className:e,...t},n)=>i.jsx("main",{ref:n,className:Te("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));OI.displayName="SidebarInset";const t$=T.forwardRef(({className:e,...t},n)=>i.jsx(Ve,{ref:n,"data-sidebar":"input",className:Te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));t$.displayName="SidebarInput";const LI=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"header",className:Te("flex flex-col gap-2 p-2",e),...t}));LI.displayName="SidebarHeader";const MI=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"footer",className:Te("flex flex-col gap-2 p-2",e),...t}));MI.displayName="SidebarFooter";const n$=T.forwardRef(({className:e,...t},n)=>i.jsx(ra,{ref:n,"data-sidebar":"separator",className:Te("mx-2 w-auto bg-sidebar-border",e),...t}));n$.displayName="SidebarSeparator";const jI=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"content",className:Te("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));jI.displayName="SidebarContent";const Zh=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"group",className:Te("relative flex w-full min-w-0 flex-col p-2",e),...t}));Zh.displayName="SidebarGroup";const Qh=T.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?cl:"div";return i.jsx(s,{ref:r,"data-sidebar":"group-label",className:Te("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});Qh.displayName="SidebarGroupLabel";const r$=T.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?cl:"button";return i.jsx(s,{ref:r,"data-sidebar":"group-action",className:Te("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});r$.displayName="SidebarGroupAction";const Jh=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"group-content",className:Te("w-full text-sm",e),...t}));Jh.displayName="SidebarGroupContent";const jo=T.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,"data-sidebar":"menu",className:Te("flex w-full min-w-0 flex-col gap-1",e),...t}));jo.displayName="SidebarMenu";const Fo=T.forwardRef(({className:e,...t},n)=>i.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Te("group/menu-item relative",e),...t}));Fo.displayName="SidebarMenuItem";const a$=dl("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Po=T.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:l,...u},c)=>{const d=e?cl:"button",{isMobile:h,state:m}=sp(),p=i.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:Te(a$({variant:n,size:r}),l),...u});return s?(typeof s=="string"&&(s={children:s}),i.jsxs(WH,{children:[i.jsx(qH,{asChild:!0,children:p}),i.jsx(NI,{side:"right",align:"center",hidden:m!=="collapsed"||h,...s})]})):p});Po.displayName="SidebarMenuButton";const i$=T.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},s)=>{const l=t?cl:"button";return i.jsx(l,{ref:s,"data-sidebar":"menu-action",className:Te("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});i$.displayName="SidebarMenuAction";const s$=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Te("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));s$.displayName="SidebarMenuBadge";const o$=T.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const s=T.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return i.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:Te("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&i.jsx(AN,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),i.jsx(AN,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});o$.displayName="SidebarMenuSkeleton";const l$=T.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Te("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));l$.displayName="SidebarMenuSub";const c$=T.forwardRef(({...e},t)=>i.jsx("li",{ref:t,...e}));c$.displayName="SidebarMenuSubItem";const u$=T.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...s},l)=>{const u=e?cl:"a";return i.jsx(u,{ref:l,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Te("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...s})});u$.displayName="SidebarMenuSubButton";const d$="1.0.52",h$={version:d$};function f$({className:e}){return i.jsxs("svg",{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",className:e,children:[i.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),i.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),i.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),i.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const p$=[{title:"Home",url:"/",icon:kB},{title:"Proposals",url:"/proposals",icon:x0},{title:"Agents",url:"/agents",icon:ya},{title:"Code",url:"/code",icon:Ho},{title:"Terminal",url:"/terminal",icon:ma},{title:"Git",url:"/git",icon:zv}],m$=[{title:"Overview",url:"/context/project",icon:Sa},{title:"Architecture",url:"/context/architecture",icon:U8},{title:"Knowledge",url:"/context/knowledge",icon:X8},{title:"Resources",url:"/resources",icon:eD}],g$=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:$B,external:!0},{title:"Settings",url:"/settings",icon:Yf}];function b$(){return i.jsxs(DI,{className:"bg-sidebar border-r border-sidebar-border",children:[i.jsx(LI,{children:i.jsx(jo,{children:i.jsx(Fo,{children:i.jsx(Po,{size:"lg",asChild:!0,children:i.jsxs(Je,{to:"/",children:[i.jsx(f$,{className:"size-8"}),i.jsxs("div",{className:"flex flex-col gap-0.5",children:[i.jsxs("span",{className:"font-semibold",children:["Coconut v",h$.version]}),i.jsx("span",{className:"text-xs text-muted-foreground",children:"Come one, come all"})]})]})})})})}),i.jsxs(jI,{children:[i.jsxs(Zh,{children:[i.jsx(Qh,{children:"Main"}),i.jsx(Jh,{children:i.jsx(jo,{children:p$.map(e=>i.jsx(Fo,{children:i.jsx(Po,{asChild:!0,children:i.jsxs(Je,{to:e.url,children:[i.jsx(e.icon,{}),i.jsx("span",{children:e.title})]})})},e.title))})})]}),i.jsxs(Zh,{children:[i.jsx(Qh,{children:"Project Context"}),i.jsx(Jh,{children:i.jsx(jo,{children:m$.map(e=>i.jsx(Fo,{children:i.jsx(Po,{asChild:!0,children:i.jsxs(Je,{to:e.url,children:[i.jsx(e.icon,{}),i.jsx("span",{children:e.title})]})})},e.title))})})]}),i.jsxs(Zh,{children:[i.jsx(Qh,{children:"Quick Actions"}),i.jsx(Jh,{children:i.jsx(jo,{children:i.jsx(Fo,{children:i.jsx(Po,{asChild:!0,children:i.jsxs(Je,{to:"/proposals/new",children:[i.jsx(Ht,{}),i.jsx("span",{children:"New Proposal"})]})})})})})]})]}),i.jsx(MI,{children:i.jsx(jo,{children:g$.map(e=>i.jsx(Fo,{children:i.jsx(Po,{asChild:!0,children:e.external?i.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:[i.jsx(e.icon,{}),i.jsx("span",{children:e.title})]}):i.jsxs(Je,{to:e.url,children:[i.jsx(e.icon,{}),i.jsx("span",{children:e.title})]})})},e.title))})})]})}const Ue="";async function Wc(e,t={}){const n=`${Ue}${e}`,r={headers:{"Content-Type":"application/json",...t.headers},...t},s=await fetch(n,r);if(!s.ok)throw new Error(`API request failed: ${s.status} ${s.statusText}`);return s.json()}const FI=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`;function M0(e,[t,n]){return Math.min(n,Math.max(t,e))}var v$=T.createContext(void 0);function op(e){const t=T.useContext(v$);return e||t||"ltr"}function PI(e){const t=T.useRef({value:e,previous:e});return T.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var y$=[" ","Enter","ArrowUp","ArrowDown"],E$=[" ","Enter"],xs="Select",[lp,cp,_$]=zf(xs),[vl,doe]=$r(xs,[_$,bl]),up=bl(),[x$,Hi]=vl(xs),[S$,w$]=vl(xs),BI=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:l,value:u,defaultValue:c,onValueChange:d,dir:h,name:m,autoComplete:p,disabled:v,required:_,form:w}=e,S=up(t),[b,E]=T.useState(null),[y,x]=T.useState(null),[A,k]=T.useState(!1),N=op(h),[L,R]=Mi({prop:r,defaultProp:s??!1,onChange:l,caller:xs}),[M,j]=Mi({prop:u,defaultProp:c,onChange:d,caller:xs}),U=T.useRef(null),W=b?w||!!b.closest("form"):!0,[$,G]=T.useState(new Set),ee=Array.from($).map(P=>P.props.value).join(";");return i.jsx(hy,{...S,children:i.jsxs(x$,{required:_,scope:t,trigger:b,onTriggerChange:E,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:A,onValueNodeHasChildrenChange:k,contentId:_a(),value:M,onValueChange:j,open:L,onOpenChange:R,dir:N,triggerPointerDownPosRef:U,disabled:v,children:[i.jsx(lp.Provider,{scope:t,children:i.jsx(S$,{scope:e.__scopeSelect,onNativeOptionAdd:T.useCallback(P=>{G(Z=>new Set(Z).add(P))},[]),onNativeOptionRemove:T.useCallback(P=>{G(Z=>{const X=new Set(Z);return X.delete(P),X})},[]),children:n})}),W?i.jsxs(cO,{"aria-hidden":!0,required:_,tabIndex:-1,name:m,autoComplete:p,value:M,onChange:P=>j(P.target.value),disabled:v,form:w,children:[M===void 0?i.jsx("option",{value:""}):null,Array.from($)]},ee):null]})})};BI.displayName=xs;var UI="SelectTrigger",HI=T.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,l=up(n),u=Hi(UI,n),c=u.disabled||r,d=pt(t,u.onTriggerChange),h=cp(n),m=T.useRef("touch"),[p,v,_]=dO(S=>{const b=h().filter(x=>!x.disabled),E=b.find(x=>x.value===u.value),y=hO(b,S,E);y!==void 0&&u.onValueChange(y.value)}),w=S=>{c||(u.onOpenChange(!0),_()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return i.jsx(fy,{asChild:!0,...l,children:i.jsx(it.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":uO(u.value)?"":void 0,...s,ref:d,onClick:Be(s.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&w(S)}),onPointerDown:Be(s.onPointerDown,S=>{m.current=S.pointerType;const b=S.target;b.hasPointerCapture(S.pointerId)&&b.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(w(S),S.preventDefault())}),onKeyDown:Be(s.onKeyDown,S=>{const b=p.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&v(S.key),!(b&&S.key===" ")&&y$.includes(S.key)&&(w(),S.preventDefault())})})})});HI.displayName=UI;var $I="SelectValue",zI=T.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:l,placeholder:u="",...c}=e,d=Hi($I,n),{onValueNodeHasChildrenChange:h}=d,m=l!==void 0,p=pt(t,d.onValueNodeChange);return Rn(()=>{h(m)},[h,m]),i.jsx(it.span,{...c,ref:p,style:{pointerEvents:"none"},children:uO(d.value)?i.jsx(i.Fragment,{children:u}):l})});zI.displayName=$I;var C$="SelectIcon",GI=T.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return i.jsx(it.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});GI.displayName=C$;var T$="SelectPortal",VI=e=>i.jsx(Tu,{asChild:!0,...e});VI.displayName=T$;var Ss="SelectContent",WI=T.forwardRef((e,t)=>{const n=Hi(Ss,e.__scopeSelect),[r,s]=T.useState();if(Rn(()=>{s(new DocumentFragment)},[]),!n.open){const l=r;return l?ll.createPortal(i.jsx(qI,{scope:e.__scopeSelect,children:i.jsx(lp.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),l):null}return i.jsx(YI,{...e,ref:t})});WI.displayName=Ss;var Xr=10,[qI,$i]=vl(Ss),A$="SelectContentImpl",N$=vs("SelectContent.RemoveScroll"),YI=T.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:l,onPointerDownOutside:u,side:c,sideOffset:d,align:h,alignOffset:m,arrowPadding:p,collisionBoundary:v,collisionPadding:_,sticky:w,hideWhenDetached:S,avoidCollisions:b,...E}=e,y=Hi(Ss,n),[x,A]=T.useState(null),[k,N]=T.useState(null),L=pt(t,Q=>A(Q)),[R,M]=T.useState(null),[j,U]=T.useState(null),W=cp(n),[$,G]=T.useState(!1),ee=T.useRef(!1);T.useEffect(()=>{if(x)return Yv(x)},[x]),qv();const P=T.useCallback(Q=>{const[V,...pe]=W().map(_e=>_e.ref.current),[be]=pe.slice(-1),me=document.activeElement;for(const _e of Q)if(_e===me||(_e?.scrollIntoView({block:"nearest"}),_e===V&&k&&(k.scrollTop=0),_e===be&&k&&(k.scrollTop=k.scrollHeight),_e?.focus(),document.activeElement!==me))return},[W,k]),Z=T.useCallback(()=>P([R,x]),[P,R,x]);T.useEffect(()=>{$&&Z()},[$,Z]);const{onOpenChange:X,triggerPointerDownPosRef:F}=y;T.useEffect(()=>{if(x){let Q={x:0,y:0};const V=be=>{Q={x:Math.abs(Math.round(be.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(be.pageY)-(F.current?.y??0))}},pe=be=>{Q.x<=10&&Q.y<=10?be.preventDefault():x.contains(be.target)||X(!1),document.removeEventListener("pointermove",V),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",pe,{capture:!0})}}},[x,X,F]),T.useEffect(()=>{const Q=()=>X(!1);return window.addEventListener("blur",Q),window.addEventListener("resize",Q),()=>{window.removeEventListener("blur",Q),window.removeEventListener("resize",Q)}},[X]);const[O,B]=dO(Q=>{const V=W().filter(me=>!me.disabled),pe=V.find(me=>me.ref.current===document.activeElement),be=hO(V,Q,pe);be&&setTimeout(()=>be.ref.current.focus())}),K=T.useCallback((Q,V,pe)=>{const be=!ee.current&&!pe;(y.value!==void 0&&y.value===V||be)&&(M(Q),be&&(ee.current=!0))},[y.value]),z=T.useCallback(()=>x?.focus(),[x]),se=T.useCallback((Q,V,pe)=>{const be=!ee.current&&!pe;(y.value!==void 0&&y.value===V||be)&&U(Q)},[y.value]),xe=r==="popper"?j0:KI,ue=xe===j0?{side:c,sideOffset:d,align:h,alignOffset:m,arrowPadding:p,collisionBoundary:v,collisionPadding:_,sticky:w,hideWhenDetached:S,avoidCollisions:b}:{};return i.jsx(qI,{scope:n,content:x,viewport:k,onViewportChange:N,itemRefCallback:K,selectedItem:R,onItemLeave:z,itemTextRefCallback:se,focusSelectedItem:Z,selectedItemText:j,position:r,isPositioned:$,searchRef:O,children:i.jsx(Zf,{as:N$,allowPinchZoom:!0,children:i.jsx(Kf,{asChild:!0,trapped:y.open,onMountAutoFocus:Q=>{Q.preventDefault()},onUnmountAutoFocus:Be(s,Q=>{y.trigger?.focus({preventScroll:!0}),Q.preventDefault()}),children:i.jsx(ul,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:Q=>Q.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:i.jsx(xe,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:Q=>Q.preventDefault(),...E,...ue,onPlaced:()=>G(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Be(E.onKeyDown,Q=>{const V=Q.ctrlKey||Q.altKey||Q.metaKey;if(Q.key==="Tab"&&Q.preventDefault(),!V&&Q.key.length===1&&B(Q.key),["ArrowUp","ArrowDown","Home","End"].includes(Q.key)){let be=W().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(Q.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(Q.key)){const me=Q.target,_e=be.indexOf(me);be=be.slice(_e+1)}setTimeout(()=>P(be)),Q.preventDefault()}})})})})})})});YI.displayName=A$;var k$="SelectItemAlignedPosition",KI=T.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,l=Hi(Ss,n),u=$i(Ss,n),[c,d]=T.useState(null),[h,m]=T.useState(null),p=pt(t,L=>m(L)),v=cp(n),_=T.useRef(!1),w=T.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:E,focusSelectedItem:y}=u,x=T.useCallback(()=>{if(l.trigger&&l.valueNode&&c&&h&&S&&b&&E){const L=l.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),M=l.valueNode.getBoundingClientRect(),j=E.getBoundingClientRect();if(l.dir!=="rtl"){const me=j.left-R.left,_e=M.left-me,$e=L.left-_e,le=L.width+$e,Pe=Math.max(le,R.width),He=window.innerWidth-Xr,oe=M0(_e,[Xr,Math.max(Xr,He-Pe)]);c.style.minWidth=le+"px",c.style.left=oe+"px"}else{const me=R.right-j.right,_e=window.innerWidth-M.right-me,$e=window.innerWidth-L.right-_e,le=L.width+$e,Pe=Math.max(le,R.width),He=window.innerWidth-Xr,oe=M0(_e,[Xr,Math.max(Xr,He-Pe)]);c.style.minWidth=le+"px",c.style.right=oe+"px"}const U=v(),W=window.innerHeight-Xr*2,$=S.scrollHeight,G=window.getComputedStyle(h),ee=parseInt(G.borderTopWidth,10),P=parseInt(G.paddingTop,10),Z=parseInt(G.borderBottomWidth,10),X=parseInt(G.paddingBottom,10),F=ee+P+$+X+Z,O=Math.min(b.offsetHeight*5,F),B=window.getComputedStyle(S),K=parseInt(B.paddingTop,10),z=parseInt(B.paddingBottom,10),se=L.top+L.height/2-Xr,xe=W-se,ue=b.offsetHeight/2,Q=b.offsetTop+ue,V=ee+P+Q,pe=F-V;if(V<=se){const me=U.length>0&&b===U[U.length-1].ref.current;c.style.bottom="0px";const _e=h.clientHeight-S.offsetTop-S.offsetHeight,$e=Math.max(xe,ue+(me?z:0)+_e+Z),le=V+$e;c.style.height=le+"px"}else{const me=U.length>0&&b===U[0].ref.current;c.style.top="0px";const $e=Math.max(se,ee+S.offsetTop+(me?K:0)+ue)+pe;c.style.height=$e+"px",S.scrollTop=V-se+S.offsetTop}c.style.margin=`${Xr}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=W+"px",r?.(),requestAnimationFrame(()=>_.current=!0)}},[v,l.trigger,l.valueNode,c,h,S,b,E,l.dir,r]);Rn(()=>x(),[x]);const[A,k]=T.useState();Rn(()=>{h&&k(window.getComputedStyle(h).zIndex)},[h]);const N=T.useCallback(L=>{L&&w.current===!0&&(x(),y?.(),w.current=!1)},[x,y]);return i.jsx(D$,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:_,onScrollButtonChange:N,children:i.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:i.jsx(it.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});KI.displayName=k$;var R$="SelectPopperPosition",j0=T.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Xr,...l}=e,u=up(n);return i.jsx(py,{...u,...l,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});j0.displayName=R$;var[D$,by]=vl(Ss,{}),F0="SelectViewport",XI=T.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,l=$i(F0,n),u=by(F0,n),c=pt(t,l.onViewportChange),d=T.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),i.jsx(lp.Slot,{scope:n,children:i.jsx(it.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Be(s.onScroll,h=>{const m=h.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:v}=u;if(v?.current&&p){const _=Math.abs(d.current-m.scrollTop);if(_>0){const w=window.innerHeight-Xr*2,S=parseFloat(p.style.minHeight),b=parseFloat(p.style.height),E=Math.max(S,b);if(E<w){const y=E+_,x=Math.min(w,y),A=y-x;p.style.height=x+"px",p.style.bottom==="0px"&&(m.scrollTop=A>0?A:0,p.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});XI.displayName=F0;var ZI="SelectGroup",[I$,O$]=vl(ZI),L$=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=_a();return i.jsx(I$,{scope:n,id:s,children:i.jsx(it.div,{role:"group","aria-labelledby":s,...r,ref:t})})});L$.displayName=ZI;var QI="SelectLabel",JI=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=O$(QI,n);return i.jsx(it.div,{id:s.id,...r,ref:t})});JI.displayName=QI;var vf="SelectItem",[M$,eO]=vl(vf),tO=T.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:l,...u}=e,c=Hi(vf,n),d=$i(vf,n),h=c.value===r,[m,p]=T.useState(l??""),[v,_]=T.useState(!1),w=pt(t,y=>d.itemRefCallback?.(y,r,s)),S=_a(),b=T.useRef("touch"),E=()=>{s||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(M$,{scope:n,value:r,disabled:s,textId:S,isSelected:h,onItemTextChange:T.useCallback(y=>{p(x=>x||(y?.textContent??"").trim())},[]),children:i.jsx(lp.ItemSlot,{scope:n,value:r,disabled:s,textValue:m,children:i.jsx(it.div,{role:"option","aria-labelledby":S,"data-highlighted":v?"":void 0,"aria-selected":h&&v,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...u,ref:w,onFocus:Be(u.onFocus,()=>_(!0)),onBlur:Be(u.onBlur,()=>_(!1)),onClick:Be(u.onClick,()=>{b.current!=="mouse"&&E()}),onPointerUp:Be(u.onPointerUp,()=>{b.current==="mouse"&&E()}),onPointerDown:Be(u.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:Be(u.onPointerMove,y=>{b.current=y.pointerType,s?d.onItemLeave?.():b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Be(u.onPointerLeave,y=>{y.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Be(u.onKeyDown,y=>{d.searchRef?.current!==""&&y.key===" "||(E$.includes(y.key)&&E(),y.key===" "&&y.preventDefault())})})})})});tO.displayName=vf;var $c="SelectItemText",nO=T.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...l}=e,u=Hi($c,n),c=$i($c,n),d=eO($c,n),h=w$($c,n),[m,p]=T.useState(null),v=pt(t,E=>p(E),d.onItemTextChange,E=>c.itemTextRefCallback?.(E,d.value,d.disabled)),_=m?.textContent,w=T.useMemo(()=>i.jsx("option",{value:d.value,disabled:d.disabled,children:_},d.value),[d.disabled,d.value,_]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=h;return Rn(()=>(S(w),()=>b(w)),[S,b,w]),i.jsxs(i.Fragment,{children:[i.jsx(it.span,{id:d.textId,...l,ref:v}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?ll.createPortal(l.children,u.valueNode):null]})});nO.displayName=$c;var rO="SelectItemIndicator",aO=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return eO(rO,n).isSelected?i.jsx(it.span,{"aria-hidden":!0,...r,ref:t}):null});aO.displayName=rO;var P0="SelectScrollUpButton",iO=T.forwardRef((e,t)=>{const n=$i(P0,e.__scopeSelect),r=by(P0,e.__scopeSelect),[s,l]=T.useState(!1),u=pt(t,r.onScrollButtonChange);return Rn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;l(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?i.jsx(oO,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});iO.displayName=P0;var B0="SelectScrollDownButton",sO=T.forwardRef((e,t)=>{const n=$i(B0,e.__scopeSelect),r=by(B0,e.__scopeSelect),[s,l]=T.useState(!1),u=pt(t,r.onScrollButtonChange);return Rn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<h;l(m)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?i.jsx(oO,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});sO.displayName=B0;var oO=T.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,l=$i("SelectScrollButton",n),u=T.useRef(null),c=cp(n),d=T.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return T.useEffect(()=>()=>d(),[d]),Rn(()=>{c().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),i.jsx(it.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Be(s.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(r,50))}),onPointerMove:Be(s.onPointerMove,()=>{l.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(r,50))}),onPointerLeave:Be(s.onPointerLeave,()=>{d()})})}),j$="SelectSeparator",lO=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(it.div,{"aria-hidden":!0,...r,ref:t})});lO.displayName=j$;var U0="SelectArrow",F$=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=up(n),l=Hi(U0,n),u=$i(U0,n);return l.open&&u.position==="popper"?i.jsx(my,{...s,...r,ref:t}):null});F$.displayName=U0;var P$="SelectBubbleInput",cO=T.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=T.useRef(null),l=pt(r,s),u=PI(t);return T.useEffect(()=>{const c=s.current;if(!c)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==t&&m){const p=new Event("change",{bubbles:!0});m.call(c,t),c.dispatchEvent(p)}},[u,t]),i.jsx(it.select,{...n,style:{...kR,...n.style},ref:l,defaultValue:t})});cO.displayName=P$;function uO(e){return e===""||e===void 0}function dO(e){const t=cn(e),n=T.useRef(""),r=T.useRef(0),s=T.useCallback(u=>{const c=n.current+u;t(c),(function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),l=T.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return T.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,l]}function hO(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let u=B$(e,Math.max(l,0));s.length===1&&(u=u.filter(h=>h!==n));const d=u.find(h=>h.textValue.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function B$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var U$=BI,fO=HI,H$=zI,$$=GI,z$=VI,pO=WI,G$=XI,mO=JI,gO=tO,V$=nO,W$=aO,bO=iO,vO=sO,yO=lO;const Jt=U$,en=H$,Kt=T.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(fO,{ref:r,className:Te("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,i.jsx($$,{asChild:!0,children:i.jsx(ys,{className:"h-4 w-4 opacity-50"})})]}));Kt.displayName=fO.displayName;const EO=T.forwardRef(({className:e,...t},n)=>i.jsx(bO,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(Hv,{className:"h-4 w-4"})}));EO.displayName=bO.displayName;const _O=T.forwardRef(({className:e,...t},n)=>i.jsx(vO,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(ys,{className:"h-4 w-4"})}));_O.displayName=vO.displayName;const Xt=T.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>i.jsx(z$,{children:i.jsxs(pO,{ref:s,className:Te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[i.jsx(EO,{}),i.jsx(G$,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(_O,{})]})}));Xt.displayName=pO.displayName;const q$=T.forwardRef(({className:e,...t},n)=>i.jsx(mO,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));q$.displayName=mO.displayName;const Me=T.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(gO,{ref:r,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(W$,{children:i.jsx(hl,{className:"h-4 w-4"})})}),i.jsx(V$,{children:t})]}));Me.displayName=gO.displayName;const Y$=T.forwardRef(({className:e,...t},n)=>i.jsx(yO,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));Y$.displayName=yO.displayName;const Ca=T.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:Te("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Ca.displayName="Textarea";const Jo=Qv,PN=YD,K$=Jv,xO=T.forwardRef(({className:e,...t},n)=>i.jsx(Nu,{ref:n,className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));xO.displayName=Nu.displayName;const ws=T.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(K$,{children:[i.jsx(xO,{}),i.jsxs(ku,{ref:r,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,i.jsxs(Jf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[i.jsx(Jn,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ws.displayName=ku.displayName;const Cs=({className:e,...t})=>i.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Cs.displayName="DialogHeader";const H0=({className:e,...t})=>i.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});H0.displayName="DialogFooter";const Ts=T.forwardRef(({className:e,...t},n)=>i.jsx(Ru,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));Ts.displayName=Ru.displayName;const $0=T.forwardRef(({className:e,...t},n)=>i.jsx(Du,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));$0.displayName=Du.displayName;function uu(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,l=!1;for(;!l;){r===-1&&(r=n.length,l=!0);const u=n.slice(s,r).trim();(u||!l)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function dp(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const X$=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Z$=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Q$={};function BN(e,t){return(Q$.jsx?Z$:X$).test(e)}const J$=/[ \t\n\f\r]/g;function Ou(e){return typeof e=="object"?e.type==="text"?UN(e.value):!1:UN(e)}function UN(e){return e.replace(J$,"")===""}let Lu=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Lu.prototype.normal={};Lu.prototype.property={};Lu.prototype.space=void 0;function SO(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Lu(n,r,t)}function du(e){return e.toLowerCase()}let dr=class{constructor(t,n){this.attribute=n,this.property=t}};dr.prototype.attribute="";dr.prototype.booleanish=!1;dr.prototype.boolean=!1;dr.prototype.commaOrSpaceSeparated=!1;dr.prototype.commaSeparated=!1;dr.prototype.defined=!1;dr.prototype.mustUseProperty=!1;dr.prototype.number=!1;dr.prototype.overloadedBoolean=!1;dr.prototype.property="";dr.prototype.spaceSeparated=!1;dr.prototype.space=void 0;let ez=0;const ft=Ds(),fn=Ds(),z0=Ds(),Oe=Ds(),Vt=Ds(),Vo=Ds(),Er=Ds();function Ds(){return 2**++ez}const G0=Object.freeze(Object.defineProperty({__proto__:null,boolean:ft,booleanish:fn,commaOrSpaceSeparated:Er,commaSeparated:Vo,number:Oe,overloadedBoolean:z0,spaceSeparated:Vt},Symbol.toStringTag,{value:"Module"})),kb=Object.keys(G0);let vy=class extends dr{constructor(t,n,r,s){let l=-1;if(super(t,n),HN(this,"space",s),typeof r=="number")for(;++l<kb.length;){const u=kb[l];HN(this,kb[l],(r&G0[u])===G0[u])}}};vy.prototype.defined=!0;function HN(e,t,n){n&&(e[t]=n)}function yl(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const l=new vy(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[du(r)]=r,n[du(l.attribute)]=r}return new Lu(t,n,e.space)}const wO=yl({properties:{ariaActiveDescendant:null,ariaAtomic:fn,ariaAutoComplete:null,ariaBusy:fn,ariaChecked:fn,ariaColCount:Oe,ariaColIndex:Oe,ariaColSpan:Oe,ariaControls:Vt,ariaCurrent:null,ariaDescribedBy:Vt,ariaDetails:null,ariaDisabled:fn,ariaDropEffect:Vt,ariaErrorMessage:null,ariaExpanded:fn,ariaFlowTo:Vt,ariaGrabbed:fn,ariaHasPopup:null,ariaHidden:fn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Vt,ariaLevel:Oe,ariaLive:null,ariaModal:fn,ariaMultiLine:fn,ariaMultiSelectable:fn,ariaOrientation:null,ariaOwns:Vt,ariaPlaceholder:null,ariaPosInSet:Oe,ariaPressed:fn,ariaReadOnly:fn,ariaRelevant:null,ariaRequired:fn,ariaRoleDescription:Vt,ariaRowCount:Oe,ariaRowIndex:Oe,ariaRowSpan:Oe,ariaSelected:fn,ariaSetSize:Oe,ariaSort:null,ariaValueMax:Oe,ariaValueMin:Oe,ariaValueNow:Oe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function CO(e,t){return t in e?e[t]:t}function TO(e,t){return CO(e,t.toLowerCase())}const tz=yl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vo,acceptCharset:Vt,accessKey:Vt,action:null,allow:null,allowFullScreen:ft,allowPaymentRequest:ft,allowUserMedia:ft,alt:null,as:null,async:ft,autoCapitalize:null,autoComplete:Vt,autoFocus:ft,autoPlay:ft,blocking:Vt,capture:null,charSet:null,checked:ft,cite:null,className:Vt,cols:Oe,colSpan:null,content:null,contentEditable:fn,controls:ft,controlsList:Vt,coords:Oe|Vo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ft,defer:ft,dir:null,dirName:null,disabled:ft,download:z0,draggable:fn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ft,formTarget:null,headers:Vt,height:Oe,hidden:z0,high:Oe,href:null,hrefLang:null,htmlFor:Vt,httpEquiv:Vt,id:null,imageSizes:null,imageSrcSet:null,inert:ft,inputMode:null,integrity:null,is:null,isMap:ft,itemId:null,itemProp:Vt,itemRef:Vt,itemScope:ft,itemType:Vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ft,low:Oe,manifest:null,max:null,maxLength:Oe,media:null,method:null,min:null,minLength:Oe,multiple:ft,muted:ft,name:null,nonce:null,noModule:ft,noValidate:ft,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:ft,optimum:Oe,pattern:null,ping:Vt,placeholder:null,playsInline:ft,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ft,referrerPolicy:null,rel:Vt,required:ft,reversed:ft,rows:Oe,rowSpan:Oe,sandbox:Vt,scope:null,scoped:ft,seamless:ft,selected:ft,shadowRootClonable:ft,shadowRootDelegatesFocus:ft,shadowRootMode:null,shape:null,size:Oe,sizes:null,slot:null,span:Oe,spellCheck:fn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Oe,step:null,style:null,tabIndex:Oe,target:null,title:null,translate:null,type:null,typeMustMatch:ft,useMap:null,value:fn,width:Oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Vt,axis:null,background:null,bgColor:null,border:Oe,borderColor:null,bottomMargin:Oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ft,declare:ft,event:null,face:null,frame:null,frameBorder:null,hSpace:Oe,leftMargin:Oe,link:null,longDesc:null,lowSrc:null,marginHeight:Oe,marginWidth:Oe,noResize:ft,noHref:ft,noShade:ft,noWrap:ft,object:null,profile:null,prompt:null,rev:null,rightMargin:Oe,rules:null,scheme:null,scrolling:fn,standby:null,summary:null,text:null,topMargin:Oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ft,disableRemotePlayback:ft,prefix:null,property:null,results:Oe,security:null,unselectable:null},space:"html",transform:TO}),nz=yl({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:Er,accentHeight:Oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Oe,amplitude:Oe,arabicForm:null,ascent:Oe,attributeName:null,attributeType:null,azimuth:Oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Oe,by:null,calcMode:null,capHeight:Oe,className:Vt,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:Oe,diffuseConstant:Oe,direction:null,display:null,dur:null,divisor:Oe,dominantBaseline:null,download:ft,dx:null,dy:null,edgeMode:null,editable:null,elevation:Oe,enableBackground:null,end:null,event:null,exponent:Oe,externalResourcesRequired:null,fill:null,fillOpacity:Oe,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:Vo,g2:Vo,glyphName:Vo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Oe,horizOriginX:Oe,horizOriginY:Oe,id:null,ideographic:Oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Oe,k:Oe,k1:Oe,k2:Oe,k3:Oe,k4:Oe,kernelMatrix:Er,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Oe,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:Oe,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:Oe,overlineThickness:Oe,paintOrder:null,panose1:null,path:null,pathLength:Oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Oe,pointsAtY:Oe,pointsAtZ:Oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Er,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Er,rev:Er,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Er,requiredFeatures:Er,requiredFonts:Er,requiredFormats:Er,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:Oe,specularExponent:Oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Oe,strikethroughThickness:Oe,string:null,stroke:null,strokeDashArray:Er,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Oe,strokeOpacity:Oe,strokeWidth:null,style:null,surfaceScale:Oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Er,tabIndex:Oe,tableValues:null,target:null,targetX:Oe,targetY:Oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Er,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Oe,underlineThickness:Oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Oe,values:null,vAlphabetic:Oe,vMathematical:Oe,vectorEffect:null,vHanging:Oe,vIdeographic:Oe,version:null,vertAdvY:Oe,vertOriginX:Oe,vertOriginY:Oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:CO}),AO=yl({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()}}),NO=yl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:TO}),kO=yl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),rz={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"},az=/[A-Z]/g,$N=/-[a-z]/g,iz=/^data[-\w.:]+$/i;function Mu(e,t){const n=du(t);let r=t,s=dr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&iz.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace($N,oz);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!$N.test(l)){let u=l.replace(az,sz);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=vy}return new s(r,t)}function sz(e){return"-"+e.toLowerCase()}function oz(e){return e.charAt(1).toUpperCase()}const El=SO([wO,tz,AO,NO,kO],"html"),ni=SO([wO,nz,AO,NO,kO],"svg");function hu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function hp(e){return e.join(" ").trim()}var Oo={},Rb,zN;function lz(){if(zN)return Rb;zN=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
434
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return T.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},a9="DialogDescriptionWarning",i9=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qD(a9).contentName}}.`;return T.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Qv=OD,YD=MD,Jv=FD,Nu=PD,ku=BD,Ru=HD,Du=zD,Jf=VD;const KD=Qv,s9=Jv,XD=T.forwardRef(({className:e,...t},n)=>i.jsx(Nu,{className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));XD.displayName=Nu.displayName;const o9=dl("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ey=T.forwardRef(({side:e="right",className:t,children:n,...r},s)=>i.jsxs(s9,{children:[i.jsx(XD,{}),i.jsxs(ku,{ref:s,className:Te(o9({side:e}),t),...r,children:[n,i.jsxs(Jf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[i.jsx(Jn,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ey.displayName=ku.displayName;const ty=({className:e,...t})=>i.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});ty.displayName="SheetHeader";const ny=T.forwardRef(({className:e,...t},n)=>i.jsx(Ru,{ref:n,className:Te("text-lg font-semibold text-foreground",e),...t}));ny.displayName=Ru.displayName;const ZD=T.forwardRef(({className:e,...t},n)=>i.jsx(Du,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));ZD.displayName=Du.displayName;function AN({className:e,...t}){return i.jsx("div",{className:Te("animate-pulse rounded-md bg-muted",e),...t})}const l9=["top","right","bottom","left"],ji=Math.min,Sr=Math.max,pf=Math.round,kh=Math.floor,xa=e=>({x:e,y:e}),c9={left:"right",right:"left",bottom:"top",top:"bottom"},u9={start:"end",end:"start"};function R0(e,t,n){return Sr(e,ji(t,n))}function Ja(e,t){return typeof e=="function"?e(t):e}function ei(e){return e.split("-")[0]}function ml(e){return e.split("-")[1]}function ry(e){return e==="x"?"y":"x"}function ay(e){return e==="y"?"height":"width"}const d9=new Set(["top","bottom"]);function ga(e){return d9.has(ei(e))?"y":"x"}function iy(e){return ry(ga(e))}function h9(e,t,n){n===void 0&&(n=!1);const r=ml(e),s=iy(e),l=ay(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=mf(u)),[u,mf(u)]}function f9(e){const t=mf(e);return[D0(e),t,D0(t)]}function D0(e){return e.replace(/start|end/g,t=>u9[t])}const NN=["left","right"],kN=["right","left"],p9=["top","bottom"],m9=["bottom","top"];function g9(e,t,n){switch(e){case"top":case"bottom":return n?t?kN:NN:t?NN:kN;case"left":case"right":return t?p9:m9;default:return[]}}function b9(e,t,n,r){const s=ml(e);let l=g9(ei(e),n==="start",r);return s&&(l=l.map(u=>u+"-"+s),t&&(l=l.concat(l.map(D0)))),l}function mf(e){return e.replace(/left|right|bottom|top/g,t=>c9[t])}function v9(e){return{top:0,right:0,bottom:0,left:0,...e}}function QD(e){return typeof e!="number"?v9(e):{top:e,right:e,bottom:e,left:e}}function gf(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function RN(e,t,n){let{reference:r,floating:s}=e;const l=ga(t),u=iy(t),c=ay(u),d=ei(t),h=l==="y",m=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,v=r[c]/2-s[c]/2;let _;switch(d){case"top":_={x:m,y:r.y-s.height};break;case"bottom":_={x:m,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:p};break;case"left":_={x:r.x-s.width,y:p};break;default:_={x:r.x,y:r.y}}switch(ml(t)){case"start":_[u]-=v*(n&&h?-1:1);break;case"end":_[u]+=v*(n&&h?-1:1);break}return _}const y9=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:l=[],platform:u}=n,c=l.filter(Boolean),d=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:p}=RN(h,r,d),v=r,_={},w=0;for(let S=0;S<c.length;S++){const{name:b,fn:E}=c[S],{x:y,y:x,data:A,reset:k}=await E({x:m,y:p,initialPlacement:r,placement:v,strategy:s,middlewareData:_,rects:h,platform:u,elements:{reference:e,floating:t}});m=y??m,p=x??p,_={..._,[b]:{..._[b],...A}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(h=k.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:m,y:p}=RN(h,v,d)),S=-1)}return{x:m,y:p,placement:v,strategy:s,middlewareData:_}};async function ou(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:l,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:v=!1,padding:_=0}=Ja(t,e),w=QD(_),b=c[v?p==="floating"?"reference":"floating":p],E=gf(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(b)))==null||n?b:b.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:d})),y=p==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,x=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c.floating)),A=await(l.isElement==null?void 0:l.isElement(x))?await(l.getScale==null?void 0:l.getScale(x))||{x:1,y:1}:{x:1,y:1},k=gf(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:x,strategy:d}):y);return{top:(E.top-k.top+w.top)/A.y,bottom:(k.bottom-E.bottom+w.bottom)/A.y,left:(E.left-k.left+w.left)/A.x,right:(k.right-E.right+w.right)/A.x}}const E9=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:l,platform:u,elements:c,middlewareData:d}=t,{element:h,padding:m=0}=Ja(e,t)||{};if(h==null)return{};const p=QD(m),v={x:n,y:r},_=iy(s),w=ay(_),S=await u.getDimensions(h),b=_==="y",E=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",A=l.reference[w]+l.reference[_]-v[_]-l.floating[w],k=v[_]-l.reference[_],N=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let L=N?N[x]:0;(!L||!await(u.isElement==null?void 0:u.isElement(N)))&&(L=c.floating[x]||l.floating[w]);const R=A/2-k/2,M=L/2-S[w]/2-1,j=ji(p[E],M),U=ji(p[y],M),W=j,$=L-S[w]-U,G=L/2-S[w]/2+R,ee=R0(W,G,$),P=!d.arrow&&ml(s)!=null&&G!==ee&&l.reference[w]/2-(G<W?j:U)-S[w]/2<0,Z=P?G<W?G-W:G-$:0;return{[_]:v[_]+Z,data:{[_]:ee,centerOffset:G-ee-Z,...P&&{alignmentOffset:Z}},reset:P}}}),_9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:l,rects:u,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...b}=Ja(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const E=ei(s),y=ga(c),x=ei(c)===c,A=await(d.isRTL==null?void 0:d.isRTL(h.floating)),k=v||(x||!S?[mf(c)]:f9(c)),N=w!=="none";!v&&N&&k.push(...b9(c,S,w,A));const L=[c,...k],R=await ou(t,b),M=[];let j=((r=l.flip)==null?void 0:r.overflows)||[];if(m&&M.push(R[E]),p){const G=h9(s,u,A);M.push(R[G[0]],R[G[1]])}if(j=[...j,{placement:s,overflows:M}],!M.every(G=>G<=0)){var U,W;const G=(((U=l.flip)==null?void 0:U.index)||0)+1,ee=L[G];if(ee&&(!(p==="alignment"?y!==ga(ee):!1)||j.every(X=>ga(X.placement)===y?X.overflows[0]>0:!0)))return{data:{index:G,overflows:j},reset:{placement:ee}};let P=(W=j.filter(Z=>Z.overflows[0]<=0).sort((Z,X)=>Z.overflows[1]-X.overflows[1])[0])==null?void 0:W.placement;if(!P)switch(_){case"bestFit":{var $;const Z=($=j.filter(X=>{if(N){const F=ga(X.placement);return F===y||F==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(F=>F>0).reduce((F,O)=>F+O,0)]).sort((X,F)=>X[1]-F[1])[0])==null?void 0:$[0];Z&&(P=Z);break}case"initialPlacement":P=c;break}if(s!==P)return{reset:{placement:P}}}return{}}}};function DN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function IN(e){return l9.some(t=>e[t]>=0)}const x9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Ja(e,t);switch(r){case"referenceHidden":{const l=await ou(t,{...s,elementContext:"reference"}),u=DN(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:IN(u)}}}case"escaped":{const l=await ou(t,{...s,altBoundary:!0}),u=DN(l,n.floating);return{data:{escapedOffsets:u,escaped:IN(u)}}}default:return{}}}}},JD=new Set(["left","top"]);async function S9(e,t){const{placement:n,platform:r,elements:s}=e,l=await(r.isRTL==null?void 0:r.isRTL(s.floating)),u=ei(n),c=ml(n),d=ga(n)==="y",h=JD.has(u)?-1:1,m=l&&d?-1:1,p=Ja(t,e);let{mainAxis:v,crossAxis:_,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof w=="number"&&(_=c==="end"?w*-1:w),d?{x:_*m,y:v*h}:{x:v*h,y:_*m}}const w9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:l,placement:u,middlewareData:c}=t,d=await S9(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:l+d.y,data:{...d,placement:u}}}}},C9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:c={fn:b=>{let{x:E,y}=b;return{x:E,y}}},...d}=Ja(e,t),h={x:n,y:r},m=await ou(t,d),p=ga(ei(s)),v=ry(p);let _=h[v],w=h[p];if(l){const b=v==="y"?"top":"left",E=v==="y"?"bottom":"right",y=_+m[b],x=_-m[E];_=R0(y,_,x)}if(u){const b=p==="y"?"top":"left",E=p==="y"?"bottom":"right",y=w+m[b],x=w-m[E];w=R0(y,w,x)}const S=c.fn({...t,[v]:_,[p]:w});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[v]:l,[p]:u}}}}}},T9=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:l,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Ja(e,t),m={x:n,y:r},p=ga(s),v=ry(p);let _=m[v],w=m[p];const S=Ja(c,t),b=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const x=v==="y"?"height":"width",A=l.reference[v]-l.floating[x]+b.mainAxis,k=l.reference[v]+l.reference[x]-b.mainAxis;_<A?_=A:_>k&&(_=k)}if(h){var E,y;const x=v==="y"?"width":"height",A=JD.has(ei(s)),k=l.reference[p]-l.floating[x]+(A&&((E=u.offset)==null?void 0:E[p])||0)+(A?0:b.crossAxis),N=l.reference[p]+l.reference[x]+(A?0:((y=u.offset)==null?void 0:y[p])||0)-(A?b.crossAxis:0);w<k?w=k:w>N&&(w=N)}return{[v]:_,[p]:w}}}},A9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:l,platform:u,elements:c}=t,{apply:d=()=>{},...h}=Ja(e,t),m=await ou(t,h),p=ei(s),v=ml(s),_=ga(s)==="y",{width:w,height:S}=l.floating;let b,E;p==="top"||p==="bottom"?(b=p,E=v===(await(u.isRTL==null?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(E=p,b=v==="end"?"top":"bottom");const y=S-m.top-m.bottom,x=w-m.left-m.right,A=ji(S-m[b],y),k=ji(w-m[E],x),N=!t.middlewareData.shift;let L=A,R=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(L=y),N&&!v){const j=Sr(m.left,0),U=Sr(m.right,0),W=Sr(m.top,0),$=Sr(m.bottom,0);_?R=w-2*(j!==0||U!==0?j+U:Sr(m.left,m.right)):L=S-2*(W!==0||$!==0?W+$:Sr(m.top,m.bottom))}await d({...t,availableWidth:R,availableHeight:L});const M=await u.getDimensions(c.floating);return w!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function ep(){return typeof window<"u"}function gl(e){return eI(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Aa(e){var t;return(t=(eI(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function eI(e){return ep()?e instanceof Node||e instanceof Cr(e).Node:!1}function ea(e){return ep()?e instanceof Element||e instanceof Cr(e).Element:!1}function wa(e){return ep()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function ON(e){return!ep()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}const N9=new Set(["inline","contents"]);function Iu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=ta(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!N9.has(s)}const k9=new Set(["table","td","th"]);function R9(e){return k9.has(gl(e))}const D9=[":popover-open",":modal"];function tp(e){return D9.some(t=>{try{return e.matches(t)}catch{return!1}})}const I9=["transform","translate","scale","rotate","perspective"],O9=["transform","translate","scale","rotate","perspective","filter"],L9=["paint","layout","strict","content"];function sy(e){const t=oy(),n=ea(e)?ta(e):e;return I9.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)||O9.some(r=>(n.willChange||"").includes(r))||L9.some(r=>(n.contain||"").includes(r))}function M9(e){let t=Fi(e);for(;wa(t)&&!Zo(t);){if(sy(t))return t;if(tp(t))return null;t=Fi(t)}return null}function oy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const j9=new Set(["html","body","#document"]);function Zo(e){return j9.has(gl(e))}function ta(e){return Cr(e).getComputedStyle(e)}function np(e){return ea(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(gl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ON(e)&&e.host||Aa(e);return ON(t)?t.host:t}function tI(e){const t=Fi(e);return Zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:wa(t)&&Iu(t)?t:tI(t)}function lu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=tI(e),l=s===((r=e.ownerDocument)==null?void 0:r.body),u=Cr(s);if(l){const c=I0(u);return t.concat(u,u.visualViewport||[],Iu(s)?s:[],c&&n?lu(c):[])}return t.concat(s,lu(s,[],n))}function I0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nI(e){const t=ta(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=wa(e),l=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=pf(n)!==l||pf(r)!==u;return c&&(n=l,r=u),{width:n,height:r,$:c}}function ly(e){return ea(e)?e:e.contextElement}function Go(e){const t=ly(e);if(!wa(t))return xa(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:l}=nI(t);let u=(l?pf(n.width):n.width)/r,c=(l?pf(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const F9=xa(0);function rI(e){const t=Cr(e);return!oy()||!t.visualViewport?F9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function P9(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Cr(e)?!1:t}function _s(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),l=ly(e);let u=xa(1);t&&(r?ea(r)&&(u=Go(r)):u=Go(e));const c=P9(l,n,r)?rI(l):xa(0);let d=(s.left+c.x)/u.x,h=(s.top+c.y)/u.y,m=s.width/u.x,p=s.height/u.y;if(l){const v=Cr(l),_=r&&ea(r)?Cr(r):r;let w=v,S=I0(w);for(;S&&r&&_!==w;){const b=Go(S),E=S.getBoundingClientRect(),y=ta(S),x=E.left+(S.clientLeft+parseFloat(y.paddingLeft))*b.x,A=E.top+(S.clientTop+parseFloat(y.paddingTop))*b.y;d*=b.x,h*=b.y,m*=b.x,p*=b.y,d+=x,h+=A,w=Cr(S),S=I0(w)}}return gf({width:m,height:p,x:d,y:h})}function cy(e,t){const n=np(e).scrollLeft;return t?t.left+n:_s(Aa(e)).left+n}function aI(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:cy(e,r)),l=r.top+t.scrollTop;return{x:s,y:l}}function B9(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const l=s==="fixed",u=Aa(r),c=t?tp(t.floating):!1;if(r===u||c&&l)return n;let d={scrollLeft:0,scrollTop:0},h=xa(1);const m=xa(0),p=wa(r);if((p||!p&&!l)&&((gl(r)!=="body"||Iu(u))&&(d=np(r)),wa(r))){const _=_s(r);h=Go(r),m.x=_.x+r.clientLeft,m.y=_.y+r.clientTop}const v=u&&!p&&!l?aI(u,d,!0):xa(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+m.x+v.x,y:n.y*h.y-d.scrollTop*h.y+m.y+v.y}}function U9(e){return Array.from(e.getClientRects())}function H9(e){const t=Aa(e),n=np(e),r=e.ownerDocument.body,s=Sr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=Sr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cy(e);const c=-n.scrollTop;return ta(r).direction==="rtl"&&(u+=Sr(t.clientWidth,r.clientWidth)-s),{width:s,height:l,x:u,y:c}}function $9(e,t){const n=Cr(e),r=Aa(e),s=n.visualViewport;let l=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){l=s.width,u=s.height;const h=oy();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}return{width:l,height:u,x:c,y:d}}const z9=new Set(["absolute","fixed"]);function G9(e,t){const n=_s(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,l=wa(e)?Go(e):xa(1),u=e.clientWidth*l.x,c=e.clientHeight*l.y,d=s*l.x,h=r*l.y;return{width:u,height:c,x:d,y:h}}function LN(e,t,n){let r;if(t==="viewport")r=$9(e,n);else if(t==="document")r=H9(Aa(e));else if(ea(t))r=G9(t,n);else{const s=rI(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return gf(r)}function iI(e,t){const n=Fi(e);return n===t||!ea(n)||Zo(n)?!1:ta(n).position==="fixed"||iI(n,t)}function V9(e,t){const n=t.get(e);if(n)return n;let r=lu(e,[],!1).filter(c=>ea(c)&&gl(c)!=="body"),s=null;const l=ta(e).position==="fixed";let u=l?Fi(e):e;for(;ea(u)&&!Zo(u);){const c=ta(u),d=sy(u);!d&&c.position==="fixed"&&(s=null),(l?!d&&!s:!d&&c.position==="static"&&!!s&&z9.has(s.position)||Iu(u)&&!d&&iI(e,u))?r=r.filter(m=>m!==u):s=c,u=Fi(u)}return t.set(e,r),r}function W9(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?tp(t)?[]:V9(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,m)=>{const p=LN(t,m,s);return h.top=Sr(p.top,h.top),h.right=ji(p.right,h.right),h.bottom=ji(p.bottom,h.bottom),h.left=Sr(p.left,h.left),h},LN(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function q9(e){const{width:t,height:n}=nI(e);return{width:t,height:n}}function Y9(e,t,n){const r=wa(t),s=Aa(t),l=n==="fixed",u=_s(e,!0,l,t);let c={scrollLeft:0,scrollTop:0};const d=xa(0);function h(){d.x=cy(s)}if(r||!r&&!l)if((gl(t)!=="body"||Iu(s))&&(c=np(t)),r){const _=_s(t,!0,l,t);d.x=_.x+t.clientLeft,d.y=_.y+t.clientTop}else s&&h();l&&!r&&s&&h();const m=s&&!r&&!l?aI(s,c):xa(0),p=u.left+c.scrollLeft-d.x-m.x,v=u.top+c.scrollTop-d.y-m.y;return{x:p,y:v,width:u.width,height:u.height}}function Ab(e){return ta(e).position==="static"}function MN(e,t){if(!wa(e)||ta(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Aa(e)===n&&(n=n.ownerDocument.body),n}function sI(e,t){const n=Cr(e);if(tp(e))return n;if(!wa(e)){let s=Fi(e);for(;s&&!Zo(s);){if(ea(s)&&!Ab(s))return s;s=Fi(s)}return n}let r=MN(e,t);for(;r&&R9(r)&&Ab(r);)r=MN(r,t);return r&&Zo(r)&&Ab(r)&&!sy(r)?n:r||M9(e)||n}const K9=async function(e){const t=this.getOffsetParent||sI,n=this.getDimensions,r=await n(e.floating);return{reference:Y9(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function X9(e){return ta(e).direction==="rtl"}const Z9={convertOffsetParentRelativeRectToViewportRelativeRect:B9,getDocumentElement:Aa,getClippingRect:W9,getOffsetParent:sI,getElementRects:K9,getClientRects:U9,getDimensions:q9,getScale:Go,isElement:ea,isRTL:X9};function oI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Q9(e,t){let n=null,r;const s=Aa(e);function l(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),l();const h=e.getBoundingClientRect(),{left:m,top:p,width:v,height:_}=h;if(c||t(),!v||!_)return;const w=kh(p),S=kh(s.clientWidth-(m+v)),b=kh(s.clientHeight-(p+_)),E=kh(m),x={rootMargin:-w+"px "+-S+"px "+-b+"px "+-E+"px",threshold:Sr(0,ji(1,d))||1};let A=!0;function k(N){const L=N[0].intersectionRatio;if(L!==d){if(!A)return u();L?u(!1,L):r=setTimeout(()=>{u(!1,1e-7)},1e3)}L===1&&!oI(h,e.getBoundingClientRect())&&u(),A=!1}try{n=new IntersectionObserver(k,{...x,root:s.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(e)}return u(!0),l}function J9(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=ly(e),m=s||l?[...h?lu(h):[],...lu(t)]:[];m.forEach(E=>{s&&E.addEventListener("scroll",n,{passive:!0}),l&&E.addEventListener("resize",n)});const p=h&&c?Q9(h,n):null;let v=-1,_=null;u&&(_=new ResizeObserver(E=>{let[y]=E;y&&y.target===h&&_&&(_.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=_)==null||x.observe(t)})),n()}),h&&!d&&_.observe(h),_.observe(t));let w,S=d?_s(e):null;d&&b();function b(){const E=_s(e);S&&!oI(S,E)&&n(),S=E,w=requestAnimationFrame(b)}return n(),()=>{var E;m.forEach(y=>{s&&y.removeEventListener("scroll",n),l&&y.removeEventListener("resize",n)}),p?.(),(E=_)==null||E.disconnect(),_=null,d&&cancelAnimationFrame(w)}}const eH=w9,tH=C9,nH=_9,rH=A9,aH=x9,jN=E9,iH=T9,sH=(e,t,n)=>{const r=new Map,s={platform:Z9,...n},l={...s.platform,_c:r};return y9(e,t,{...s,platform:l})};var oH=typeof document<"u",lH=function(){},Xh=oH?T.useLayoutEffect:lH;function bf(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,s;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(!bf(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const l=s[r];if(!(l==="_owner"&&e.$$typeof)&&!bf(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function lI(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function FN(e,t){const n=lI(e);return Math.round(t*n)/n}function Nb(e){const t=T.useRef(e);return Xh(()=>{t.current=e}),t}function cH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:l,floating:u}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[m,p]=T.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,_]=T.useState(r);bf(v,r)||_(r);const[w,S]=T.useState(null),[b,E]=T.useState(null),y=T.useCallback(X=>{X!==N.current&&(N.current=X,S(X))},[]),x=T.useCallback(X=>{X!==L.current&&(L.current=X,E(X))},[]),A=l||w,k=u||b,N=T.useRef(null),L=T.useRef(null),R=T.useRef(m),M=d!=null,j=Nb(d),U=Nb(s),W=Nb(h),$=T.useCallback(()=>{if(!N.current||!L.current)return;const X={placement:t,strategy:n,middleware:v};U.current&&(X.platform=U.current),sH(N.current,L.current,X).then(F=>{const O={...F,isPositioned:W.current!==!1};G.current&&!bf(R.current,O)&&(R.current=O,ll.flushSync(()=>{p(O)}))})},[v,t,n,U,W]);Xh(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(X=>({...X,isPositioned:!1})))},[h]);const G=T.useRef(!1);Xh(()=>(G.current=!0,()=>{G.current=!1}),[]),Xh(()=>{if(A&&(N.current=A),k&&(L.current=k),A&&k){if(j.current)return j.current(A,k,$);$()}},[A,k,$,j,M]);const ee=T.useMemo(()=>({reference:N,floating:L,setReference:y,setFloating:x}),[y,x]),P=T.useMemo(()=>({reference:A,floating:k}),[A,k]),Z=T.useMemo(()=>{const X={position:n,left:0,top:0};if(!P.floating)return X;const F=FN(P.floating,m.x),O=FN(P.floating,m.y);return c?{...X,transform:"translate("+F+"px, "+O+"px)",...lI(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:O}},[n,c,P.floating,m.x,m.y]);return T.useMemo(()=>({...m,update:$,refs:ee,elements:P,floatingStyles:Z}),[m,$,ee,P,Z])}const uH=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?jN({element:r.current,padding:s}).fn(n):{}:r?jN({element:r,padding:s}).fn(n):{}}}},dH=(e,t)=>({...eH(e),options:[e,t]}),hH=(e,t)=>({...tH(e),options:[e,t]}),fH=(e,t)=>({...iH(e),options:[e,t]}),pH=(e,t)=>({...nH(e),options:[e,t]}),mH=(e,t)=>({...rH(e),options:[e,t]}),gH=(e,t)=>({...aH(e),options:[e,t]}),bH=(e,t)=>({...uH(e),options:[e,t]});var vH="Arrow",cI=T.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...l}=e;return i.jsx(it.svg,{...l,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});cI.displayName=vH;var yH=cI;function uI(e){const[t,n]=T.useState(void 0);return Rn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let u,c;if("borderBoxSize"in l){const d=l.borderBoxSize,h=Array.isArray(d)?d[0]:d;u=h.inlineSize,c=h.blockSize}else u=e.offsetWidth,c=e.offsetHeight;n({width:u,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var uy="Popper",[dI,bl]=$r(uy),[EH,hI]=dI(uy),fI=e=>{const{__scopePopper:t,children:n}=e,[r,s]=T.useState(null);return i.jsx(EH,{scope:t,anchor:r,onAnchorChange:s,children:n})};fI.displayName=uy;var pI="PopperAnchor",mI=T.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,l=hI(pI,n),u=T.useRef(null),c=pt(t,u),d=T.useRef(null);return T.useEffect(()=>{const h=d.current;d.current=r?.current||u.current,h!==d.current&&l.onAnchorChange(d.current)}),r?null:i.jsx(it.div,{...s,ref:c})});mI.displayName=pI;var dy="PopperContent",[_H,xH]=dI(dy),gI=T.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:l="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:_="optimized",onPlaced:w,...S}=e,b=hI(dy,n),[E,y]=T.useState(null),x=pt(t,Q=>y(Q)),[A,k]=T.useState(null),N=uI(A),L=N?.width??0,R=N?.height??0,M=r+(l!=="center"?"-"+l:""),j=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},U=Array.isArray(h)?h:[h],W=U.length>0,$={padding:j,boundary:U.filter(wH),altBoundary:W},{refs:G,floatingStyles:ee,placement:P,isPositioned:Z,middlewareData:X}=cH({strategy:"fixed",placement:M,whileElementsMounted:(...Q)=>J9(...Q,{animationFrame:_==="always"}),elements:{reference:b.anchor},middleware:[dH({mainAxis:s+R,alignmentAxis:u}),d&&hH({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?fH():void 0,...$}),d&&pH({...$}),mH({...$,apply:({elements:Q,rects:V,availableWidth:pe,availableHeight:be})=>{const{width:me,height:_e}=V.reference,$e=Q.floating.style;$e.setProperty("--radix-popper-available-width",`${pe}px`),$e.setProperty("--radix-popper-available-height",`${be}px`),$e.setProperty("--radix-popper-anchor-width",`${me}px`),$e.setProperty("--radix-popper-anchor-height",`${_e}px`)}}),A&&bH({element:A,padding:c}),CH({arrowWidth:L,arrowHeight:R}),v&&gH({strategy:"referenceHidden",...$})]}),[F,O]=yI(P),B=cn(w);Rn(()=>{Z&&B?.()},[Z,B]);const K=X.arrow?.x,z=X.arrow?.y,se=X.arrow?.centerOffset!==0,[xe,ue]=T.useState();return Rn(()=>{E&&ue(window.getComputedStyle(E).zIndex)},[E]),i.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:Z?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[X.transformOrigin?.x,X.transformOrigin?.y].join(" "),...X.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(_H,{scope:n,placedSide:F,onArrowChange:k,arrowX:K,arrowY:z,shouldHideArrow:se,children:i.jsx(it.div,{"data-side":F,"data-align":O,...S,ref:x,style:{...S.style,animation:Z?void 0:"none"}})})})});gI.displayName=dy;var bI="PopperArrow",SH={top:"bottom",right:"left",bottom:"top",left:"right"},vI=T.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,l=xH(bI,r),u=SH[l.placedSide];return i.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:i.jsx(yH,{...s,ref:n,style:{...s.style,display:"block"}})})});vI.displayName=bI;function wH(e){return e!==null}var CH=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:s}=t,u=s.arrow?.centerOffset!==0,c=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[h,m]=yI(n),p={start:"0%",center:"50%",end:"100%"}[m],v=(s.arrow?.x??0)+c/2,_=(s.arrow?.y??0)+d/2;let w="",S="";return h==="bottom"?(w=u?p:`${v}px`,S=`${-d}px`):h==="top"?(w=u?p:`${v}px`,S=`${r.floating.height+d}px`):h==="right"?(w=`${-d}px`,S=u?p:`${_}px`):h==="left"&&(w=`${r.floating.width+d}px`,S=u?p:`${_}px`),{data:{x:w,y:S}}}});function yI(e){const[t,n="center"]=e.split("-");return[t,n]}var hy=fI,fy=mI,py=gI,my=vI,[rp,coe]=$r("Tooltip",[bl]),ap=bl(),EI="TooltipProvider",TH=700,O0="tooltip.open",[AH,gy]=rp(EI),_I=e=>{const{__scopeTooltip:t,delayDuration:n=TH,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:l}=e,u=T.useRef(!0),c=T.useRef(!1),d=T.useRef(0);return T.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),i.jsx(AH,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:T.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:T.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:T.useCallback(h=>{c.current=h},[]),disableHoverableContent:s,children:l})};_I.displayName=EI;var cu="Tooltip",[NH,ip]=rp(cu),xI=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:l,disableHoverableContent:u,delayDuration:c}=e,d=gy(cu,e.__scopeTooltip),h=ap(t),[m,p]=T.useState(null),v=_a(),_=T.useRef(0),w=u??d.disableHoverableContent,S=c??d.delayDuration,b=T.useRef(!1),[E,y]=Mi({prop:r,defaultProp:s??!1,onChange:L=>{L?(d.onOpen(),document.dispatchEvent(new CustomEvent(O0))):d.onClose(),l?.(L)},caller:cu}),x=T.useMemo(()=>E?b.current?"delayed-open":"instant-open":"closed",[E]),A=T.useCallback(()=>{window.clearTimeout(_.current),_.current=0,b.current=!1,y(!0)},[y]),k=T.useCallback(()=>{window.clearTimeout(_.current),_.current=0,y(!1)},[y]),N=T.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{b.current=!0,y(!0),_.current=0},S)},[S,y]);return T.useEffect(()=>()=>{_.current&&(window.clearTimeout(_.current),_.current=0)},[]),i.jsx(hy,{...h,children:i.jsx(NH,{scope:t,contentId:v,open:E,stateAttribute:x,trigger:m,onTriggerChange:p,onTriggerEnter:T.useCallback(()=>{d.isOpenDelayedRef.current?N():A()},[d.isOpenDelayedRef,N,A]),onTriggerLeave:T.useCallback(()=>{w?k():(window.clearTimeout(_.current),_.current=0)},[k,w]),onOpen:A,onClose:k,disableHoverableContent:w,children:n})})};xI.displayName=cu;var L0="TooltipTrigger",SI=T.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=ip(L0,n),l=gy(L0,n),u=ap(n),c=T.useRef(null),d=pt(t,c,s.onTriggerChange),h=T.useRef(!1),m=T.useRef(!1),p=T.useCallback(()=>h.current=!1,[]);return T.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),i.jsx(fy,{asChild:!0,...u,children:i.jsx(it.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:d,onPointerMove:Be(e.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!l.isPointerInTransitRef.current&&(s.onTriggerEnter(),m.current=!0)}),onPointerLeave:Be(e.onPointerLeave,()=>{s.onTriggerLeave(),m.current=!1}),onPointerDown:Be(e.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Be(e.onFocus,()=>{h.current||s.onOpen()}),onBlur:Be(e.onBlur,s.onClose),onClick:Be(e.onClick,s.onClose)})})});SI.displayName=L0;var kH="TooltipPortal",[uoe,RH]=rp(kH,{forceMount:void 0}),Qo="TooltipContent",wI=T.forwardRef((e,t)=>{const n=RH(Qo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...l}=e,u=ip(Qo,e.__scopeTooltip);return i.jsx(tr,{present:r||u.open,children:u.disableHoverableContent?i.jsx(CI,{side:s,...l,ref:t}):i.jsx(DH,{side:s,...l,ref:t})})}),DH=T.forwardRef((e,t)=>{const n=ip(Qo,e.__scopeTooltip),r=gy(Qo,e.__scopeTooltip),s=T.useRef(null),l=pt(t,s),[u,c]=T.useState(null),{trigger:d,onClose:h}=n,m=s.current,{onPointerInTransitChange:p}=r,v=T.useCallback(()=>{c(null),p(!1)},[p]),_=T.useCallback((w,S)=>{const b=w.currentTarget,E={x:w.clientX,y:w.clientY},y=jH(E,b.getBoundingClientRect()),x=FH(E,y),A=PH(S.getBoundingClientRect()),k=UH([...x,...A]);c(k),p(!0)},[p]);return T.useEffect(()=>()=>v(),[v]),T.useEffect(()=>{if(d&&m){const w=b=>_(b,m),S=b=>_(b,d);return d.addEventListener("pointerleave",w),m.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",S)}}},[d,m,_,v]),T.useEffect(()=>{if(u){const w=S=>{const b=S.target,E={x:S.clientX,y:S.clientY},y=d?.contains(b)||m?.contains(b),x=!BH(E,u);y?v():x&&(v(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,m,u,h,v]),i.jsx(CI,{...e,ref:l})}),[IH,OH]=rp(cu,{isInside:!1}),LH=CR("TooltipContent"),CI=T.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:u,...c}=e,d=ip(Qo,n),h=ap(n),{onClose:m}=d;return T.useEffect(()=>(document.addEventListener(O0,m),()=>document.removeEventListener(O0,m)),[m]),T.useEffect(()=>{if(d.trigger){const p=v=>{v.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,m]),i.jsx(ul,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:p=>p.preventDefault(),onDismiss:m,children:i.jsxs(py,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.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:[i.jsx(LH,{children:r}),i.jsx(IH,{scope:n,isInside:!0,children:i.jsx(m8,{id:d.contentId,role:"tooltip",children:s||r})})]})})});wI.displayName=Qo;var TI="TooltipArrow",MH=T.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=ap(n);return OH(TI,n).isInside?null:i.jsx(my,{...s,...r,ref:t})});MH.displayName=TI;function jH(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,r,s,l)){case l:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function FH(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 PH(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function BH(e,t){const{x:n,y:r}=e;let s=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const c=t[l],d=t[u],h=c.x,m=c.y,p=d.x,v=d.y;m>r!=v>r&&n<(p-h)*(r-m)/(v-m)+h&&(s=!s)}return s}function UH(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),HH(t)}function HH(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const l=t[t.length-1],u=t[t.length-2];if((l.x-u.x)*(s.y-u.y)>=(l.y-u.y)*(s.x-u.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const l=n[n.length-1],u=n[n.length-2];if((l.x-u.x)*(s.y-u.y)>=(l.y-u.y)*(s.x-u.x))n.pop();else break}n.push(s)}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 $H=_I,zH=xI,GH=SI,AI=wI;const VH=$H,WH=zH,qH=GH,NI=T.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(AI,{ref:r,sideOffset:t,className:Te("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}));NI.displayName=AI.displayName;const YH="sidebar_state",KH=3600*24*7,XH="16rem",ZH="18rem",QH="3rem",JH="b",kI=T.createContext(null);function sp(){const e=T.useContext(kI);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const RI=T.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:l,...u},c)=>{const d=yD(),[h,m]=T.useState(!1),[p,v]=T.useState(e),_=t??p,w=T.useCallback(y=>{const x=typeof y=="function"?y(_):y;n?n(x):v(x),document.cookie=`${YH}=${x}; path=/; max-age=${KH}`},[n,_]),S=T.useCallback(()=>d?m(y=>!y):w(y=>!y),[d,w,m]);T.useEffect(()=>{const y=x=>{x.key===JH&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),S())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[S]);const b=_?"expanded":"collapsed",E=T.useMemo(()=>({state:b,open:_,setOpen:w,isMobile:d,openMobile:h,setOpenMobile:m,toggleSidebar:S}),[b,_,w,d,h,m,S]);return i.jsx(kI.Provider,{value:E,children:i.jsx(VH,{delayDuration:0,children:i.jsx("div",{style:{"--sidebar-width":XH,"--sidebar-width-icon":QH,...s},className:Te("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:c,...u,children:l})})})});RI.displayName="SidebarProvider";const DI=T.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...l},u)=>{const{isMobile:c,state:d,openMobile:h,setOpenMobile:m}=sp();return n==="none"?i.jsx("div",{className:Te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:u,...l,children:s}):c?i.jsx(KD,{open:h,onOpenChange:m,...l,children:i.jsxs(ey,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":ZH},side:e,children:[i.jsxs(ty,{className:"sr-only",children:[i.jsx(ny,{children:"Sidebar"}),i.jsx(ZD,{children:"Displays the mobile sidebar."})]}),i.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):i.jsxs("div",{ref:u,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,children:[i.jsx("div",{className:Te("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),i.jsx("div",{className:Te("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...l,children:i.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});DI.displayName="Sidebar";const II=T.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:s}=sp();return i.jsxs(ie,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Te("h-7 w-7",e),onClick:l=>{t?.(l),s()},...n,children:[i.jsx(GB,{}),i.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});II.displayName="SidebarTrigger";const e$=T.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=sp();return i.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:Te("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});e$.displayName="SidebarRail";const OI=T.forwardRef(({className:e,...t},n)=>i.jsx("main",{ref:n,className:Te("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));OI.displayName="SidebarInset";const t$=T.forwardRef(({className:e,...t},n)=>i.jsx(Ve,{ref:n,"data-sidebar":"input",className:Te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));t$.displayName="SidebarInput";const LI=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"header",className:Te("flex flex-col gap-2 p-2",e),...t}));LI.displayName="SidebarHeader";const MI=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"footer",className:Te("flex flex-col gap-2 p-2",e),...t}));MI.displayName="SidebarFooter";const n$=T.forwardRef(({className:e,...t},n)=>i.jsx(ra,{ref:n,"data-sidebar":"separator",className:Te("mx-2 w-auto bg-sidebar-border",e),...t}));n$.displayName="SidebarSeparator";const jI=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"content",className:Te("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));jI.displayName="SidebarContent";const Zh=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"group",className:Te("relative flex w-full min-w-0 flex-col p-2",e),...t}));Zh.displayName="SidebarGroup";const Qh=T.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?cl:"div";return i.jsx(s,{ref:r,"data-sidebar":"group-label",className:Te("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});Qh.displayName="SidebarGroupLabel";const r$=T.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?cl:"button";return i.jsx(s,{ref:r,"data-sidebar":"group-action",className:Te("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});r$.displayName="SidebarGroupAction";const Jh=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"group-content",className:Te("w-full text-sm",e),...t}));Jh.displayName="SidebarGroupContent";const jo=T.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,"data-sidebar":"menu",className:Te("flex w-full min-w-0 flex-col gap-1",e),...t}));jo.displayName="SidebarMenu";const Fo=T.forwardRef(({className:e,...t},n)=>i.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Te("group/menu-item relative",e),...t}));Fo.displayName="SidebarMenuItem";const a$=dl("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Po=T.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:l,...u},c)=>{const d=e?cl:"button",{isMobile:h,state:m}=sp(),p=i.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:Te(a$({variant:n,size:r}),l),...u});return s?(typeof s=="string"&&(s={children:s}),i.jsxs(WH,{children:[i.jsx(qH,{asChild:!0,children:p}),i.jsx(NI,{side:"right",align:"center",hidden:m!=="collapsed"||h,...s})]})):p});Po.displayName="SidebarMenuButton";const i$=T.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},s)=>{const l=t?cl:"button";return i.jsx(l,{ref:s,"data-sidebar":"menu-action",className:Te("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});i$.displayName="SidebarMenuAction";const s$=T.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Te("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));s$.displayName="SidebarMenuBadge";const o$=T.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const s=T.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return i.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:Te("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&i.jsx(AN,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),i.jsx(AN,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});o$.displayName="SidebarMenuSkeleton";const l$=T.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Te("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));l$.displayName="SidebarMenuSub";const c$=T.forwardRef(({...e},t)=>i.jsx("li",{ref:t,...e}));c$.displayName="SidebarMenuSubItem";const u$=T.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...s},l)=>{const u=e?cl:"a";return i.jsx(u,{ref:l,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Te("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...s})});u$.displayName="SidebarMenuSubButton";const d$="1.0.53",h$={version:d$};function f$({className:e}){return i.jsxs("svg",{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",className:e,children:[i.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),i.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),i.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),i.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const p$=[{title:"Home",url:"/",icon:kB},{title:"Proposals",url:"/proposals",icon:x0},{title:"Agents",url:"/agents",icon:ya},{title:"Code",url:"/code",icon:Ho},{title:"Terminal",url:"/terminal",icon:ma},{title:"Git",url:"/git",icon:zv}],m$=[{title:"Overview",url:"/context/project",icon:Sa},{title:"Architecture",url:"/context/architecture",icon:U8},{title:"Knowledge",url:"/context/knowledge",icon:X8},{title:"Resources",url:"/resources",icon:eD}],g$=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:$B,external:!0},{title:"Settings",url:"/settings",icon:Yf}];function b$(){return i.jsxs(DI,{className:"bg-sidebar border-r border-sidebar-border",children:[i.jsx(LI,{children:i.jsx(jo,{children:i.jsx(Fo,{children:i.jsx(Po,{size:"lg",asChild:!0,children:i.jsxs(Je,{to:"/",children:[i.jsx(f$,{className:"size-8"}),i.jsxs("div",{className:"flex flex-col gap-0.5",children:[i.jsxs("span",{className:"font-semibold",children:["Coconut v",h$.version]}),i.jsx("span",{className:"text-xs text-muted-foreground",children:"Come one, come all"})]})]})})})})}),i.jsxs(jI,{children:[i.jsxs(Zh,{children:[i.jsx(Qh,{children:"Main"}),i.jsx(Jh,{children:i.jsx(jo,{children:p$.map(e=>i.jsx(Fo,{children:i.jsx(Po,{asChild:!0,children:i.jsxs(Je,{to:e.url,children:[i.jsx(e.icon,{}),i.jsx("span",{children:e.title})]})})},e.title))})})]}),i.jsxs(Zh,{children:[i.jsx(Qh,{children:"Project Context"}),i.jsx(Jh,{children:i.jsx(jo,{children:m$.map(e=>i.jsx(Fo,{children:i.jsx(Po,{asChild:!0,children:i.jsxs(Je,{to:e.url,children:[i.jsx(e.icon,{}),i.jsx("span",{children:e.title})]})})},e.title))})})]}),i.jsxs(Zh,{children:[i.jsx(Qh,{children:"Quick Actions"}),i.jsx(Jh,{children:i.jsx(jo,{children:i.jsx(Fo,{children:i.jsx(Po,{asChild:!0,children:i.jsxs(Je,{to:"/proposals/new",children:[i.jsx(Ht,{}),i.jsx("span",{children:"New Proposal"})]})})})})})]})]}),i.jsx(MI,{children:i.jsx(jo,{children:g$.map(e=>i.jsx(Fo,{children:i.jsx(Po,{asChild:!0,children:e.external?i.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:[i.jsx(e.icon,{}),i.jsx("span",{children:e.title})]}):i.jsxs(Je,{to:e.url,children:[i.jsx(e.icon,{}),i.jsx("span",{children:e.title})]})})},e.title))})})]})}const Ue="";async function Wc(e,t={}){const n=`${Ue}${e}`,r={headers:{"Content-Type":"application/json",...t.headers},...t},s=await fetch(n,r);if(!s.ok)throw new Error(`API request failed: ${s.status} ${s.statusText}`);return s.json()}const FI=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`;function M0(e,[t,n]){return Math.min(n,Math.max(t,e))}var v$=T.createContext(void 0);function op(e){const t=T.useContext(v$);return e||t||"ltr"}function PI(e){const t=T.useRef({value:e,previous:e});return T.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var y$=[" ","Enter","ArrowUp","ArrowDown"],E$=[" ","Enter"],xs="Select",[lp,cp,_$]=zf(xs),[vl,doe]=$r(xs,[_$,bl]),up=bl(),[x$,Hi]=vl(xs),[S$,w$]=vl(xs),BI=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:l,value:u,defaultValue:c,onValueChange:d,dir:h,name:m,autoComplete:p,disabled:v,required:_,form:w}=e,S=up(t),[b,E]=T.useState(null),[y,x]=T.useState(null),[A,k]=T.useState(!1),N=op(h),[L,R]=Mi({prop:r,defaultProp:s??!1,onChange:l,caller:xs}),[M,j]=Mi({prop:u,defaultProp:c,onChange:d,caller:xs}),U=T.useRef(null),W=b?w||!!b.closest("form"):!0,[$,G]=T.useState(new Set),ee=Array.from($).map(P=>P.props.value).join(";");return i.jsx(hy,{...S,children:i.jsxs(x$,{required:_,scope:t,trigger:b,onTriggerChange:E,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:A,onValueNodeHasChildrenChange:k,contentId:_a(),value:M,onValueChange:j,open:L,onOpenChange:R,dir:N,triggerPointerDownPosRef:U,disabled:v,children:[i.jsx(lp.Provider,{scope:t,children:i.jsx(S$,{scope:e.__scopeSelect,onNativeOptionAdd:T.useCallback(P=>{G(Z=>new Set(Z).add(P))},[]),onNativeOptionRemove:T.useCallback(P=>{G(Z=>{const X=new Set(Z);return X.delete(P),X})},[]),children:n})}),W?i.jsxs(cO,{"aria-hidden":!0,required:_,tabIndex:-1,name:m,autoComplete:p,value:M,onChange:P=>j(P.target.value),disabled:v,form:w,children:[M===void 0?i.jsx("option",{value:""}):null,Array.from($)]},ee):null]})})};BI.displayName=xs;var UI="SelectTrigger",HI=T.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,l=up(n),u=Hi(UI,n),c=u.disabled||r,d=pt(t,u.onTriggerChange),h=cp(n),m=T.useRef("touch"),[p,v,_]=dO(S=>{const b=h().filter(x=>!x.disabled),E=b.find(x=>x.value===u.value),y=hO(b,S,E);y!==void 0&&u.onValueChange(y.value)}),w=S=>{c||(u.onOpenChange(!0),_()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return i.jsx(fy,{asChild:!0,...l,children:i.jsx(it.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":uO(u.value)?"":void 0,...s,ref:d,onClick:Be(s.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&w(S)}),onPointerDown:Be(s.onPointerDown,S=>{m.current=S.pointerType;const b=S.target;b.hasPointerCapture(S.pointerId)&&b.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(w(S),S.preventDefault())}),onKeyDown:Be(s.onKeyDown,S=>{const b=p.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&v(S.key),!(b&&S.key===" ")&&y$.includes(S.key)&&(w(),S.preventDefault())})})})});HI.displayName=UI;var $I="SelectValue",zI=T.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:l,placeholder:u="",...c}=e,d=Hi($I,n),{onValueNodeHasChildrenChange:h}=d,m=l!==void 0,p=pt(t,d.onValueNodeChange);return Rn(()=>{h(m)},[h,m]),i.jsx(it.span,{...c,ref:p,style:{pointerEvents:"none"},children:uO(d.value)?i.jsx(i.Fragment,{children:u}):l})});zI.displayName=$I;var C$="SelectIcon",GI=T.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return i.jsx(it.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});GI.displayName=C$;var T$="SelectPortal",VI=e=>i.jsx(Tu,{asChild:!0,...e});VI.displayName=T$;var Ss="SelectContent",WI=T.forwardRef((e,t)=>{const n=Hi(Ss,e.__scopeSelect),[r,s]=T.useState();if(Rn(()=>{s(new DocumentFragment)},[]),!n.open){const l=r;return l?ll.createPortal(i.jsx(qI,{scope:e.__scopeSelect,children:i.jsx(lp.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),l):null}return i.jsx(YI,{...e,ref:t})});WI.displayName=Ss;var Xr=10,[qI,$i]=vl(Ss),A$="SelectContentImpl",N$=vs("SelectContent.RemoveScroll"),YI=T.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:l,onPointerDownOutside:u,side:c,sideOffset:d,align:h,alignOffset:m,arrowPadding:p,collisionBoundary:v,collisionPadding:_,sticky:w,hideWhenDetached:S,avoidCollisions:b,...E}=e,y=Hi(Ss,n),[x,A]=T.useState(null),[k,N]=T.useState(null),L=pt(t,Q=>A(Q)),[R,M]=T.useState(null),[j,U]=T.useState(null),W=cp(n),[$,G]=T.useState(!1),ee=T.useRef(!1);T.useEffect(()=>{if(x)return Yv(x)},[x]),qv();const P=T.useCallback(Q=>{const[V,...pe]=W().map(_e=>_e.ref.current),[be]=pe.slice(-1),me=document.activeElement;for(const _e of Q)if(_e===me||(_e?.scrollIntoView({block:"nearest"}),_e===V&&k&&(k.scrollTop=0),_e===be&&k&&(k.scrollTop=k.scrollHeight),_e?.focus(),document.activeElement!==me))return},[W,k]),Z=T.useCallback(()=>P([R,x]),[P,R,x]);T.useEffect(()=>{$&&Z()},[$,Z]);const{onOpenChange:X,triggerPointerDownPosRef:F}=y;T.useEffect(()=>{if(x){let Q={x:0,y:0};const V=be=>{Q={x:Math.abs(Math.round(be.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(be.pageY)-(F.current?.y??0))}},pe=be=>{Q.x<=10&&Q.y<=10?be.preventDefault():x.contains(be.target)||X(!1),document.removeEventListener("pointermove",V),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",pe,{capture:!0})}}},[x,X,F]),T.useEffect(()=>{const Q=()=>X(!1);return window.addEventListener("blur",Q),window.addEventListener("resize",Q),()=>{window.removeEventListener("blur",Q),window.removeEventListener("resize",Q)}},[X]);const[O,B]=dO(Q=>{const V=W().filter(me=>!me.disabled),pe=V.find(me=>me.ref.current===document.activeElement),be=hO(V,Q,pe);be&&setTimeout(()=>be.ref.current.focus())}),K=T.useCallback((Q,V,pe)=>{const be=!ee.current&&!pe;(y.value!==void 0&&y.value===V||be)&&(M(Q),be&&(ee.current=!0))},[y.value]),z=T.useCallback(()=>x?.focus(),[x]),se=T.useCallback((Q,V,pe)=>{const be=!ee.current&&!pe;(y.value!==void 0&&y.value===V||be)&&U(Q)},[y.value]),xe=r==="popper"?j0:KI,ue=xe===j0?{side:c,sideOffset:d,align:h,alignOffset:m,arrowPadding:p,collisionBoundary:v,collisionPadding:_,sticky:w,hideWhenDetached:S,avoidCollisions:b}:{};return i.jsx(qI,{scope:n,content:x,viewport:k,onViewportChange:N,itemRefCallback:K,selectedItem:R,onItemLeave:z,itemTextRefCallback:se,focusSelectedItem:Z,selectedItemText:j,position:r,isPositioned:$,searchRef:O,children:i.jsx(Zf,{as:N$,allowPinchZoom:!0,children:i.jsx(Kf,{asChild:!0,trapped:y.open,onMountAutoFocus:Q=>{Q.preventDefault()},onUnmountAutoFocus:Be(s,Q=>{y.trigger?.focus({preventScroll:!0}),Q.preventDefault()}),children:i.jsx(ul,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:Q=>Q.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:i.jsx(xe,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:Q=>Q.preventDefault(),...E,...ue,onPlaced:()=>G(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Be(E.onKeyDown,Q=>{const V=Q.ctrlKey||Q.altKey||Q.metaKey;if(Q.key==="Tab"&&Q.preventDefault(),!V&&Q.key.length===1&&B(Q.key),["ArrowUp","ArrowDown","Home","End"].includes(Q.key)){let be=W().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(Q.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(Q.key)){const me=Q.target,_e=be.indexOf(me);be=be.slice(_e+1)}setTimeout(()=>P(be)),Q.preventDefault()}})})})})})})});YI.displayName=A$;var k$="SelectItemAlignedPosition",KI=T.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,l=Hi(Ss,n),u=$i(Ss,n),[c,d]=T.useState(null),[h,m]=T.useState(null),p=pt(t,L=>m(L)),v=cp(n),_=T.useRef(!1),w=T.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:E,focusSelectedItem:y}=u,x=T.useCallback(()=>{if(l.trigger&&l.valueNode&&c&&h&&S&&b&&E){const L=l.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),M=l.valueNode.getBoundingClientRect(),j=E.getBoundingClientRect();if(l.dir!=="rtl"){const me=j.left-R.left,_e=M.left-me,$e=L.left-_e,le=L.width+$e,Pe=Math.max(le,R.width),He=window.innerWidth-Xr,oe=M0(_e,[Xr,Math.max(Xr,He-Pe)]);c.style.minWidth=le+"px",c.style.left=oe+"px"}else{const me=R.right-j.right,_e=window.innerWidth-M.right-me,$e=window.innerWidth-L.right-_e,le=L.width+$e,Pe=Math.max(le,R.width),He=window.innerWidth-Xr,oe=M0(_e,[Xr,Math.max(Xr,He-Pe)]);c.style.minWidth=le+"px",c.style.right=oe+"px"}const U=v(),W=window.innerHeight-Xr*2,$=S.scrollHeight,G=window.getComputedStyle(h),ee=parseInt(G.borderTopWidth,10),P=parseInt(G.paddingTop,10),Z=parseInt(G.borderBottomWidth,10),X=parseInt(G.paddingBottom,10),F=ee+P+$+X+Z,O=Math.min(b.offsetHeight*5,F),B=window.getComputedStyle(S),K=parseInt(B.paddingTop,10),z=parseInt(B.paddingBottom,10),se=L.top+L.height/2-Xr,xe=W-se,ue=b.offsetHeight/2,Q=b.offsetTop+ue,V=ee+P+Q,pe=F-V;if(V<=se){const me=U.length>0&&b===U[U.length-1].ref.current;c.style.bottom="0px";const _e=h.clientHeight-S.offsetTop-S.offsetHeight,$e=Math.max(xe,ue+(me?z:0)+_e+Z),le=V+$e;c.style.height=le+"px"}else{const me=U.length>0&&b===U[0].ref.current;c.style.top="0px";const $e=Math.max(se,ee+S.offsetTop+(me?K:0)+ue)+pe;c.style.height=$e+"px",S.scrollTop=V-se+S.offsetTop}c.style.margin=`${Xr}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=W+"px",r?.(),requestAnimationFrame(()=>_.current=!0)}},[v,l.trigger,l.valueNode,c,h,S,b,E,l.dir,r]);Rn(()=>x(),[x]);const[A,k]=T.useState();Rn(()=>{h&&k(window.getComputedStyle(h).zIndex)},[h]);const N=T.useCallback(L=>{L&&w.current===!0&&(x(),y?.(),w.current=!1)},[x,y]);return i.jsx(D$,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:_,onScrollButtonChange:N,children:i.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:i.jsx(it.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});KI.displayName=k$;var R$="SelectPopperPosition",j0=T.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Xr,...l}=e,u=up(n);return i.jsx(py,{...u,...l,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});j0.displayName=R$;var[D$,by]=vl(Ss,{}),F0="SelectViewport",XI=T.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,l=$i(F0,n),u=by(F0,n),c=pt(t,l.onViewportChange),d=T.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),i.jsx(lp.Slot,{scope:n,children:i.jsx(it.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Be(s.onScroll,h=>{const m=h.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:v}=u;if(v?.current&&p){const _=Math.abs(d.current-m.scrollTop);if(_>0){const w=window.innerHeight-Xr*2,S=parseFloat(p.style.minHeight),b=parseFloat(p.style.height),E=Math.max(S,b);if(E<w){const y=E+_,x=Math.min(w,y),A=y-x;p.style.height=x+"px",p.style.bottom==="0px"&&(m.scrollTop=A>0?A:0,p.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});XI.displayName=F0;var ZI="SelectGroup",[I$,O$]=vl(ZI),L$=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=_a();return i.jsx(I$,{scope:n,id:s,children:i.jsx(it.div,{role:"group","aria-labelledby":s,...r,ref:t})})});L$.displayName=ZI;var QI="SelectLabel",JI=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=O$(QI,n);return i.jsx(it.div,{id:s.id,...r,ref:t})});JI.displayName=QI;var vf="SelectItem",[M$,eO]=vl(vf),tO=T.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:l,...u}=e,c=Hi(vf,n),d=$i(vf,n),h=c.value===r,[m,p]=T.useState(l??""),[v,_]=T.useState(!1),w=pt(t,y=>d.itemRefCallback?.(y,r,s)),S=_a(),b=T.useRef("touch"),E=()=>{s||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(M$,{scope:n,value:r,disabled:s,textId:S,isSelected:h,onItemTextChange:T.useCallback(y=>{p(x=>x||(y?.textContent??"").trim())},[]),children:i.jsx(lp.ItemSlot,{scope:n,value:r,disabled:s,textValue:m,children:i.jsx(it.div,{role:"option","aria-labelledby":S,"data-highlighted":v?"":void 0,"aria-selected":h&&v,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...u,ref:w,onFocus:Be(u.onFocus,()=>_(!0)),onBlur:Be(u.onBlur,()=>_(!1)),onClick:Be(u.onClick,()=>{b.current!=="mouse"&&E()}),onPointerUp:Be(u.onPointerUp,()=>{b.current==="mouse"&&E()}),onPointerDown:Be(u.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:Be(u.onPointerMove,y=>{b.current=y.pointerType,s?d.onItemLeave?.():b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Be(u.onPointerLeave,y=>{y.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Be(u.onKeyDown,y=>{d.searchRef?.current!==""&&y.key===" "||(E$.includes(y.key)&&E(),y.key===" "&&y.preventDefault())})})})})});tO.displayName=vf;var $c="SelectItemText",nO=T.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...l}=e,u=Hi($c,n),c=$i($c,n),d=eO($c,n),h=w$($c,n),[m,p]=T.useState(null),v=pt(t,E=>p(E),d.onItemTextChange,E=>c.itemTextRefCallback?.(E,d.value,d.disabled)),_=m?.textContent,w=T.useMemo(()=>i.jsx("option",{value:d.value,disabled:d.disabled,children:_},d.value),[d.disabled,d.value,_]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=h;return Rn(()=>(S(w),()=>b(w)),[S,b,w]),i.jsxs(i.Fragment,{children:[i.jsx(it.span,{id:d.textId,...l,ref:v}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?ll.createPortal(l.children,u.valueNode):null]})});nO.displayName=$c;var rO="SelectItemIndicator",aO=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return eO(rO,n).isSelected?i.jsx(it.span,{"aria-hidden":!0,...r,ref:t}):null});aO.displayName=rO;var P0="SelectScrollUpButton",iO=T.forwardRef((e,t)=>{const n=$i(P0,e.__scopeSelect),r=by(P0,e.__scopeSelect),[s,l]=T.useState(!1),u=pt(t,r.onScrollButtonChange);return Rn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;l(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?i.jsx(oO,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});iO.displayName=P0;var B0="SelectScrollDownButton",sO=T.forwardRef((e,t)=>{const n=$i(B0,e.__scopeSelect),r=by(B0,e.__scopeSelect),[s,l]=T.useState(!1),u=pt(t,r.onScrollButtonChange);return Rn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<h;l(m)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?i.jsx(oO,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});sO.displayName=B0;var oO=T.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,l=$i("SelectScrollButton",n),u=T.useRef(null),c=cp(n),d=T.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return T.useEffect(()=>()=>d(),[d]),Rn(()=>{c().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),i.jsx(it.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Be(s.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(r,50))}),onPointerMove:Be(s.onPointerMove,()=>{l.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(r,50))}),onPointerLeave:Be(s.onPointerLeave,()=>{d()})})}),j$="SelectSeparator",lO=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(it.div,{"aria-hidden":!0,...r,ref:t})});lO.displayName=j$;var U0="SelectArrow",F$=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=up(n),l=Hi(U0,n),u=$i(U0,n);return l.open&&u.position==="popper"?i.jsx(my,{...s,...r,ref:t}):null});F$.displayName=U0;var P$="SelectBubbleInput",cO=T.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=T.useRef(null),l=pt(r,s),u=PI(t);return T.useEffect(()=>{const c=s.current;if(!c)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==t&&m){const p=new Event("change",{bubbles:!0});m.call(c,t),c.dispatchEvent(p)}},[u,t]),i.jsx(it.select,{...n,style:{...kR,...n.style},ref:l,defaultValue:t})});cO.displayName=P$;function uO(e){return e===""||e===void 0}function dO(e){const t=cn(e),n=T.useRef(""),r=T.useRef(0),s=T.useCallback(u=>{const c=n.current+u;t(c),(function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),l=T.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return T.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,l]}function hO(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let u=B$(e,Math.max(l,0));s.length===1&&(u=u.filter(h=>h!==n));const d=u.find(h=>h.textValue.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function B$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var U$=BI,fO=HI,H$=zI,$$=GI,z$=VI,pO=WI,G$=XI,mO=JI,gO=tO,V$=nO,W$=aO,bO=iO,vO=sO,yO=lO;const Jt=U$,en=H$,Kt=T.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(fO,{ref:r,className:Te("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,i.jsx($$,{asChild:!0,children:i.jsx(ys,{className:"h-4 w-4 opacity-50"})})]}));Kt.displayName=fO.displayName;const EO=T.forwardRef(({className:e,...t},n)=>i.jsx(bO,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(Hv,{className:"h-4 w-4"})}));EO.displayName=bO.displayName;const _O=T.forwardRef(({className:e,...t},n)=>i.jsx(vO,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(ys,{className:"h-4 w-4"})}));_O.displayName=vO.displayName;const Xt=T.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>i.jsx(z$,{children:i.jsxs(pO,{ref:s,className:Te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[i.jsx(EO,{}),i.jsx(G$,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(_O,{})]})}));Xt.displayName=pO.displayName;const q$=T.forwardRef(({className:e,...t},n)=>i.jsx(mO,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));q$.displayName=mO.displayName;const Me=T.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(gO,{ref:r,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(W$,{children:i.jsx(hl,{className:"h-4 w-4"})})}),i.jsx(V$,{children:t})]}));Me.displayName=gO.displayName;const Y$=T.forwardRef(({className:e,...t},n)=>i.jsx(yO,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));Y$.displayName=yO.displayName;const Ca=T.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:Te("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Ca.displayName="Textarea";const Jo=Qv,PN=YD,K$=Jv,xO=T.forwardRef(({className:e,...t},n)=>i.jsx(Nu,{ref:n,className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));xO.displayName=Nu.displayName;const ws=T.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(K$,{children:[i.jsx(xO,{}),i.jsxs(ku,{ref:r,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,i.jsxs(Jf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[i.jsx(Jn,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ws.displayName=ku.displayName;const Cs=({className:e,...t})=>i.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Cs.displayName="DialogHeader";const H0=({className:e,...t})=>i.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});H0.displayName="DialogFooter";const Ts=T.forwardRef(({className:e,...t},n)=>i.jsx(Ru,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));Ts.displayName=Ru.displayName;const $0=T.forwardRef(({className:e,...t},n)=>i.jsx(Du,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));$0.displayName=Du.displayName;function uu(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,l=!1;for(;!l;){r===-1&&(r=n.length,l=!0);const u=n.slice(s,r).trim();(u||!l)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function dp(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const X$=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Z$=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Q$={};function BN(e,t){return(Q$.jsx?Z$:X$).test(e)}const J$=/[ \t\n\f\r]/g;function Ou(e){return typeof e=="object"?e.type==="text"?UN(e.value):!1:UN(e)}function UN(e){return e.replace(J$,"")===""}let Lu=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Lu.prototype.normal={};Lu.prototype.property={};Lu.prototype.space=void 0;function SO(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Lu(n,r,t)}function du(e){return e.toLowerCase()}let dr=class{constructor(t,n){this.attribute=n,this.property=t}};dr.prototype.attribute="";dr.prototype.booleanish=!1;dr.prototype.boolean=!1;dr.prototype.commaOrSpaceSeparated=!1;dr.prototype.commaSeparated=!1;dr.prototype.defined=!1;dr.prototype.mustUseProperty=!1;dr.prototype.number=!1;dr.prototype.overloadedBoolean=!1;dr.prototype.property="";dr.prototype.spaceSeparated=!1;dr.prototype.space=void 0;let ez=0;const ft=Ds(),fn=Ds(),z0=Ds(),Oe=Ds(),Vt=Ds(),Vo=Ds(),Er=Ds();function Ds(){return 2**++ez}const G0=Object.freeze(Object.defineProperty({__proto__:null,boolean:ft,booleanish:fn,commaOrSpaceSeparated:Er,commaSeparated:Vo,number:Oe,overloadedBoolean:z0,spaceSeparated:Vt},Symbol.toStringTag,{value:"Module"})),kb=Object.keys(G0);let vy=class extends dr{constructor(t,n,r,s){let l=-1;if(super(t,n),HN(this,"space",s),typeof r=="number")for(;++l<kb.length;){const u=kb[l];HN(this,kb[l],(r&G0[u])===G0[u])}}};vy.prototype.defined=!0;function HN(e,t,n){n&&(e[t]=n)}function yl(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const l=new vy(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[du(r)]=r,n[du(l.attribute)]=r}return new Lu(t,n,e.space)}const wO=yl({properties:{ariaActiveDescendant:null,ariaAtomic:fn,ariaAutoComplete:null,ariaBusy:fn,ariaChecked:fn,ariaColCount:Oe,ariaColIndex:Oe,ariaColSpan:Oe,ariaControls:Vt,ariaCurrent:null,ariaDescribedBy:Vt,ariaDetails:null,ariaDisabled:fn,ariaDropEffect:Vt,ariaErrorMessage:null,ariaExpanded:fn,ariaFlowTo:Vt,ariaGrabbed:fn,ariaHasPopup:null,ariaHidden:fn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Vt,ariaLevel:Oe,ariaLive:null,ariaModal:fn,ariaMultiLine:fn,ariaMultiSelectable:fn,ariaOrientation:null,ariaOwns:Vt,ariaPlaceholder:null,ariaPosInSet:Oe,ariaPressed:fn,ariaReadOnly:fn,ariaRelevant:null,ariaRequired:fn,ariaRoleDescription:Vt,ariaRowCount:Oe,ariaRowIndex:Oe,ariaRowSpan:Oe,ariaSelected:fn,ariaSetSize:Oe,ariaSort:null,ariaValueMax:Oe,ariaValueMin:Oe,ariaValueNow:Oe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function CO(e,t){return t in e?e[t]:t}function TO(e,t){return CO(e,t.toLowerCase())}const tz=yl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vo,acceptCharset:Vt,accessKey:Vt,action:null,allow:null,allowFullScreen:ft,allowPaymentRequest:ft,allowUserMedia:ft,alt:null,as:null,async:ft,autoCapitalize:null,autoComplete:Vt,autoFocus:ft,autoPlay:ft,blocking:Vt,capture:null,charSet:null,checked:ft,cite:null,className:Vt,cols:Oe,colSpan:null,content:null,contentEditable:fn,controls:ft,controlsList:Vt,coords:Oe|Vo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ft,defer:ft,dir:null,dirName:null,disabled:ft,download:z0,draggable:fn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ft,formTarget:null,headers:Vt,height:Oe,hidden:z0,high:Oe,href:null,hrefLang:null,htmlFor:Vt,httpEquiv:Vt,id:null,imageSizes:null,imageSrcSet:null,inert:ft,inputMode:null,integrity:null,is:null,isMap:ft,itemId:null,itemProp:Vt,itemRef:Vt,itemScope:ft,itemType:Vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ft,low:Oe,manifest:null,max:null,maxLength:Oe,media:null,method:null,min:null,minLength:Oe,multiple:ft,muted:ft,name:null,nonce:null,noModule:ft,noValidate:ft,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:ft,optimum:Oe,pattern:null,ping:Vt,placeholder:null,playsInline:ft,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ft,referrerPolicy:null,rel:Vt,required:ft,reversed:ft,rows:Oe,rowSpan:Oe,sandbox:Vt,scope:null,scoped:ft,seamless:ft,selected:ft,shadowRootClonable:ft,shadowRootDelegatesFocus:ft,shadowRootMode:null,shape:null,size:Oe,sizes:null,slot:null,span:Oe,spellCheck:fn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Oe,step:null,style:null,tabIndex:Oe,target:null,title:null,translate:null,type:null,typeMustMatch:ft,useMap:null,value:fn,width:Oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Vt,axis:null,background:null,bgColor:null,border:Oe,borderColor:null,bottomMargin:Oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ft,declare:ft,event:null,face:null,frame:null,frameBorder:null,hSpace:Oe,leftMargin:Oe,link:null,longDesc:null,lowSrc:null,marginHeight:Oe,marginWidth:Oe,noResize:ft,noHref:ft,noShade:ft,noWrap:ft,object:null,profile:null,prompt:null,rev:null,rightMargin:Oe,rules:null,scheme:null,scrolling:fn,standby:null,summary:null,text:null,topMargin:Oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ft,disableRemotePlayback:ft,prefix:null,property:null,results:Oe,security:null,unselectable:null},space:"html",transform:TO}),nz=yl({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:Er,accentHeight:Oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Oe,amplitude:Oe,arabicForm:null,ascent:Oe,attributeName:null,attributeType:null,azimuth:Oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Oe,by:null,calcMode:null,capHeight:Oe,className:Vt,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:Oe,diffuseConstant:Oe,direction:null,display:null,dur:null,divisor:Oe,dominantBaseline:null,download:ft,dx:null,dy:null,edgeMode:null,editable:null,elevation:Oe,enableBackground:null,end:null,event:null,exponent:Oe,externalResourcesRequired:null,fill:null,fillOpacity:Oe,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:Vo,g2:Vo,glyphName:Vo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Oe,horizOriginX:Oe,horizOriginY:Oe,id:null,ideographic:Oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Oe,k:Oe,k1:Oe,k2:Oe,k3:Oe,k4:Oe,kernelMatrix:Er,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Oe,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:Oe,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:Oe,overlineThickness:Oe,paintOrder:null,panose1:null,path:null,pathLength:Oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Oe,pointsAtY:Oe,pointsAtZ:Oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Er,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Er,rev:Er,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Er,requiredFeatures:Er,requiredFonts:Er,requiredFormats:Er,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:Oe,specularExponent:Oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Oe,strikethroughThickness:Oe,string:null,stroke:null,strokeDashArray:Er,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Oe,strokeOpacity:Oe,strokeWidth:null,style:null,surfaceScale:Oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Er,tabIndex:Oe,tableValues:null,target:null,targetX:Oe,targetY:Oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Er,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Oe,underlineThickness:Oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Oe,values:null,vAlphabetic:Oe,vMathematical:Oe,vectorEffect:null,vHanging:Oe,vIdeographic:Oe,version:null,vertAdvY:Oe,vertOriginX:Oe,vertOriginY:Oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:CO}),AO=yl({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()}}),NO=yl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:TO}),kO=yl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),rz={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"},az=/[A-Z]/g,$N=/-[a-z]/g,iz=/^data[-\w.:]+$/i;function Mu(e,t){const n=du(t);let r=t,s=dr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&iz.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace($N,oz);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!$N.test(l)){let u=l.replace(az,sz);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=vy}return new s(r,t)}function sz(e){return"-"+e.toLowerCase()}function oz(e){return e.charAt(1).toUpperCase()}const El=SO([wO,tz,AO,NO,kO],"html"),ni=SO([wO,nz,AO,NO,kO],"svg");function hu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function hp(e){return e.join(" ").trim()}var Oo={},Rb,zN;function lz(){if(zN)return Rb;zN=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
435
435
|
`,h="/",m="*",p="",v="comment",_="declaration";Rb=function(S,b){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];b=b||{};var E=1,y=1;function x($){var G=$.match(t);G&&(E+=G.length);var ee=$.lastIndexOf(d);y=~ee?$.length-ee:y+$.length}function A(){var $={line:E,column:y};return function(G){return G.position=new k($),R(),G}}function k($){this.start=$,this.end={line:E,column:y},this.source=b.source}k.prototype.content=S;function N($){var G=new Error(b.source+":"+E+":"+y+": "+$);if(G.reason=$,G.filename=b.source,G.line=E,G.column=y,G.source=S,!b.silent)throw G}function L($){var G=$.exec(S);if(G){var ee=G[0];return x(ee),S=S.slice(ee.length),G}}function R(){L(n)}function M($){var G;for($=$||[];G=j();)G!==!1&&$.push(G);return $}function j(){var $=A();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var G=2;p!=S.charAt(G)&&(m!=S.charAt(G)||h!=S.charAt(G+1));)++G;if(G+=2,p===S.charAt(G-1))return N("End of comment missing");var ee=S.slice(2,G-2);return y+=2,x(ee),S=S.slice(G),y+=2,$({type:v,comment:ee})}}function U(){var $=A(),G=L(r);if(G){if(j(),!L(s))return N("property missing ':'");var ee=L(l),P=$({type:_,property:w(G[0].replace(e,p)),value:ee?w(ee[0].replace(e,p)):p});return L(u),P}}function W(){var $=[];M($);for(var G;G=U();)G!==!1&&($.push(G),M($));return $}return R(),W()};function w(S){return S?S.replace(c,p):p}return Rb}var GN;function cz(){if(GN)return Oo;GN=1;var e=Oo&&Oo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=n;var t=e(lz());function n(r,s){var l=null;if(!r||typeof r!="string")return l;var u=(0,t.default)(r),c=typeof s=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,m=d.value;c?s(h,m,d):m&&(l=l||{},l[h]=m)}}),l}return Oo}var Oc={},VN;function uz(){if(VN)return Oc;VN=1,Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},u=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),l(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(s,c):h=h.replace(r,c),h.replace(t,u))};return Oc.camelCase=d,Oc}var Lc,WN;function dz(){if(WN)return Lc;WN=1;var e=Lc&&Lc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(cz()),n=uz();function r(s,l){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,l)]=d)}),u}return r.default=r,Lc=r,Lc}var hz=dz();const fz=al(hz),fp=RO("end"),Na=RO("start");function RO(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 DO(e){const t=Na(e),n=fp(e);if(t&&n)return{start:t,end:n}}function qc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?qN(e.position):"start"in e||"end"in e?qN(e):"line"in e||"column"in e?V0(e):""}function V0(e){return YN(e&&e.line)+":"+YN(e&&e.column)}function qN(e){return V0(e&&e.start)+"-"+V0(e&&e.end)}function YN(e){return e&&typeof e=="number"?e:1}class Bn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",l={},u=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(u=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?l.ruleId=r:(l.source=r.slice(0,d),l.ruleId=r.slice(d+1))}if(!l.place&&l.ancestors&&l.ancestors){const d=l.ancestors[l.ancestors.length-1];d&&(l.place=d.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=qc(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=u&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Bn.prototype.file="";Bn.prototype.name="";Bn.prototype.reason="";Bn.prototype.message="";Bn.prototype.stack="";Bn.prototype.column=void 0;Bn.prototype.line=void 0;Bn.prototype.ancestors=void 0;Bn.prototype.cause=void 0;Bn.prototype.fatal=void 0;Bn.prototype.place=void 0;Bn.prototype.ruleId=void 0;Bn.prototype.source=void 0;const yy={}.hasOwnProperty,pz=new Map,mz=/[A-Z]/g,gz=new Set(["table","tbody","thead","tfoot","tr"]),bz=new Set(["td","th"]),IO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function OO(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=Cz(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=wz(n,t.jsx,t.jsxs)}const s={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"?ni:El,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=LO(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function LO(e,t,n){if(t.type==="element")return vz(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return yz(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return _z(e,t,n);if(t.type==="mdxjsEsm")return Ez(e,t);if(t.type==="root")return xz(e,t,n);if(t.type==="text")return Sz(e,t)}function vz(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ni,e.schema=s),e.ancestors.push(t);const l=jO(e,t.tagName,!1),u=Tz(e,t);let c=_y(e,t);return gz.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Ou(d):!0})),MO(e,u,l,t),Ey(u,c),e.ancestors.pop(),e.schema=r,e.create(t,l,u,n)}function yz(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)}fu(e,t.position)}function Ez(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);fu(e,t.position)}function _z(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ni,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:jO(e,t.name,!0),u=Az(e,t),c=_y(e,t);return MO(e,u,l,t),Ey(u,c),e.ancestors.pop(),e.schema=r,e.create(t,l,u,n)}function xz(e,t,n){const r={};return Ey(r,_y(e,t)),e.create(t,e.Fragment,r,n)}function Sz(e,t){return t.value}function MO(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ey(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function wz(e,t,n){return r;function r(s,l,u,c){const h=Array.isArray(u.children)?n:t;return c?h(l,u,c):h(l,u)}}function Cz(e,t){return n;function n(r,s,l,u){const c=Array.isArray(l.children),d=Na(r);return t(s,l,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Tz(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&yy.call(t.properties,s)){const l=Nz(e,s,t.properties[s]);if(l){const[u,c]=l;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&bz.has(t.tagName)?r=c:n[u]=c}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Az(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const u=l.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else fu(e,t.position);else{const s=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else fu(e,t.position);else l=r.value===null?!0:r.value;n[s]=l}return n}function _y(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:pz;for(;++r<t.children.length;){const l=t.children[r];let u;if(e.passKeys){const d=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(d){const h=s.get(d)||0;u=d+"-"+h,s.set(d,h+1)}}const c=LO(e,l,u);c!==void 0&&n.push(c)}return n}function Nz(e,t,n){const r=Mu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?dp(n):hp(n)),r.property==="style"){let s=typeof n=="object"?n:kz(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Rz(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?rz[r.property]||r.property:r.attribute,n]}}function kz(e,t){try{return fz(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new Bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=IO+"#cannot-parse-style-attribute",s}}function jO(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,u;for(;++l<s.length;){const c=BN(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}r=u}else r=BN(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return yy.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);fu(e)}function fu(e,t){const n=new Bn("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=IO+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Rz(e){const t={};let n;for(n in e)yy.call(e,n)&&(t[Dz(n)]=e[n]);return t}function Dz(e){let t=e.replace(mz,Iz);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Iz(e){return"-"+e.toLowerCase()}const Wo={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"]},Oz={};function xy(e,t){const n=Oz,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return FO(e,r,s)}function FO(e,t,n){if(Lz(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 KN(e.children,t,n)}return Array.isArray(e)?KN(e,t,n):""}function KN(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=FO(e[s],t,n);return r.join("")}function Lz(e){return!!(e&&typeof e=="object")}const XN=document.createElement("i");function pu(e){const t="&"+e+";";XN.innerHTML=t;const n=XN.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Tr(e,t,n,r){const s=e.length;let l=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);l<r.length;)u=r.slice(l,l+1e4),u.unshift(t,0),e.splice(...u),l+=1e4,t+=1e4}function Fr(e,t){return e.length>0?(Tr(e,e.length,0,t),e):t}const ZN={}.hasOwnProperty;function PO(e){const t={};let n=-1;for(;++n<e.length;)Mz(t,e[n]);return t}function Mz(e,t){let n;for(n in t){const s=(ZN.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let u;if(l)for(u in l){ZN.call(s,u)||(s[u]=[]);const c=l[u];jz(s[u],Array.isArray(c)?c:c?[c]:[])}}}function jz(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Tr(e,0,0,r)}function BO(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)}function Qr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qn=zi(/[A-Za-z]/),Vn=zi(/[\dA-Za-z]/),Fz=zi(/[#-'*+\--9=?A-Z^-~]/);function yf(e){return e!==null&&(e<32||e===127)}const W0=zi(/\d/),Pz=zi(/[\dA-Fa-f]/),Bz=zi(/[!-/:-@[-`{-~]/);function rt(e){return e!==null&&e<-2}function $t(e){return e!==null&&(e<0||e===32)}function Tt(e){return e===-2||e===-1||e===32}const pp=zi(new RegExp("\\p{P}|\\p{S}","u")),As=zi(/\s/);function zi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function _l(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let u="";if(l===37&&Vn(e.charCodeAt(n+1))&&Vn(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(u=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(u=String.fromCharCode(l,c),s=1):u="�"}else u=String.fromCharCode(l);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function Rt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let l=0;return u;function u(d){return Tt(d)?(e.enter(n),c(d)):t(d)}function c(d){return Tt(d)&&l++<s?(e.consume(d),c):(e.exit(n),t(d))}}const Uz={tokenize:Hz};function Hz(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Rt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),l(c)}function l(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return rt(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),u)}}const $z={tokenize:zz},QN={tokenize:Gz};function zz(e){const t=this,n=[];let r=0,s,l,u;return c;function c(x){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,d,h)(x)}return h(x)}function d(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&y();const A=t.events.length;let k=A,N;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){N=t.events[k][1].end;break}E(r);let L=A;for(;L<t.events.length;)t.events[L][1].end={...N},L++;return Tr(t.events,k+1,0,t.events.slice(A)),t.events.length=L,h(x)}return c(x)}function h(x){if(r===n.length){if(!s)return v(x);if(s.currentConstruct&&s.currentConstruct.concrete)return w(x);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(QN,m,p)(x)}function m(x){return s&&y(),E(r),v(x)}function p(x){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,w(x)}function v(x){return t.containerState={},e.attempt(QN,_,w)(x)}function _(x){return r++,n.push([t.currentConstruct,t.containerState]),v(x)}function w(x){if(x===null){s&&y(),E(0),e.consume(x);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),S(x)}function S(x){if(x===null){b(e.exit("chunkFlow"),!0),E(0),e.consume(x);return}return rt(x)?(e.consume(x),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(x),S)}function b(x,A){const k=t.sliceStream(x);if(A&&k.push(null),x.previous=l,l&&(l.next=x),l=x,s.defineSkip(x.start),s.write(k),t.parser.lazy[x.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<u&&(!s.events[N][1].end||s.events[N][1].end.offset>u))return;const L=t.events.length;let R=L,M,j;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(M){j=t.events[R][1].end;break}M=!0}for(E(r),N=L;N<t.events.length;)t.events[N][1].end={...j},N++;Tr(t.events,R+1,0,t.events.slice(L)),t.events.length=N}}function E(x){let A=n.length;for(;A-- >x;){const k=n[A];t.containerState=k[1],k[0].exit.call(t,e)}n.length=x}function y(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Gz(e,t,n){return Rt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function el(e){if(e===null||$t(e)||As(e))return 1;if(pp(e))return 2}function mp(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const q0={name:"attention",resolveAll:Vz,tokenize:Wz};function Vz(e,t){let n=-1,r,s,l,u,c,d,h,m;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;d=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 p={...e[r][1].end},v={...e[n][1].start};JN(p,-d),JN(v,d),u={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},l={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...u.start},end:{...c.end}},e[r][1].end={...u.start},e[n][1].start={...c.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Fr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Fr(h,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",l,t]]),h=Fr(h,mp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Fr(h,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=Fr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Tr(e,r-1,n-r+3,h),n=r+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Wz(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=el(r);let l;return u;function u(d){return l=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===l)return e.consume(d),c;const h=e.exit("attentionSequence"),m=el(d),p=!m||m===2&&s||n.includes(d),v=!s||s===2&&m||n.includes(r);return h._open=!!(l===42?p:p&&(s||!v)),h._close=!!(l===42?v:v&&(m||!p)),t(d)}}function JN(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qz={name:"autolink",tokenize:Yz};function Yz(e,t,n){let r=0;return s;function s(_){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(_),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(_){return Qn(_)?(e.consume(_),u):_===64?n(_):h(_)}function u(_){return _===43||_===45||_===46||Vn(_)?(r=1,c(_)):h(_)}function c(_){return _===58?(e.consume(_),r=0,d):(_===43||_===45||_===46||Vn(_))&&r++<32?(e.consume(_),c):(r=0,h(_))}function d(_){return _===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(_),e.exit("autolinkMarker"),e.exit("autolink"),t):_===null||_===32||_===60||yf(_)?n(_):(e.consume(_),d)}function h(_){return _===64?(e.consume(_),m):Fz(_)?(e.consume(_),h):n(_)}function m(_){return Vn(_)?p(_):n(_)}function p(_){return _===46?(e.consume(_),r=0,m):_===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(_),e.exit("autolinkMarker"),e.exit("autolink"),t):v(_)}function v(_){if((_===45||Vn(_))&&r++<63){const w=_===45?v:p;return e.consume(_),w}return n(_)}}const ju={partial:!0,tokenize:Kz};function Kz(e,t,n){return r;function r(l){return Tt(l)?Rt(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||rt(l)?t(l):n(l)}}const UO={continuation:{tokenize:Zz},exit:Qz,name:"blockQuote",tokenize:Xz};function Xz(e,t,n){const r=this;return s;function s(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),l}return n(u)}function l(u){return Tt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Zz(e,t,n){const r=this;return s;function s(u){return Tt(u)?Rt(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):l(u)}function l(u){return e.attempt(UO,t,n)(u)}}function Qz(e){e.exit("blockQuote")}const HO={name:"characterEscape",tokenize:Jz};function Jz(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return Bz(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const $O={name:"characterReference",tokenize:eG};function eG(e,t,n){const r=this;let s=0,l,u;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,u=Vn,m(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,u=Pz,m):(e.enter("characterReferenceValue"),l=7,u=W0,m(p))}function m(p){if(p===59&&s){const v=e.exit("characterReferenceValue");return u===Vn&&!pu(r.sliceSerialize(v))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(p)&&s++<l?(e.consume(p),m):n(p)}}const e2={partial:!0,tokenize:nG},t2={concrete:!0,name:"codeFenced",tokenize:tG};function tG(e,t,n){const r=this,s={partial:!0,tokenize:k};let l=0,u=0,c;return d;function d(N){return h(N)}function h(N){const L=r.events[r.events.length-1];return l=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,c=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(N)}function m(N){return N===c?(u++,e.consume(N),m):u<3?n(N):(e.exit("codeFencedFenceSequence"),Tt(N)?Rt(e,p,"whitespace")(N):p(N))}function p(N){return N===null||rt(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(e2,S,A)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===null||rt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(N)):Tt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Rt(e,_,"whitespace")(N)):N===96&&N===c?n(N):(e.consume(N),v)}function _(N){return N===null||rt(N)?p(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(N))}function w(N){return N===null||rt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(N)):N===96&&N===c?n(N):(e.consume(N),w)}function S(N){return e.attempt(s,A,b)(N)}function b(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),E}function E(N){return l>0&&Tt(N)?Rt(e,y,"linePrefix",l+1)(N):y(N)}function y(N){return N===null||rt(N)?e.check(e2,S,A)(N):(e.enter("codeFlowValue"),x(N))}function x(N){return N===null||rt(N)?(e.exit("codeFlowValue"),y(N)):(e.consume(N),x)}function A(N){return e.exit("codeFenced"),t(N)}function k(N,L,R){let M=0;return j;function j(ee){return N.enter("lineEnding"),N.consume(ee),N.exit("lineEnding"),U}function U(ee){return N.enter("codeFencedFence"),Tt(ee)?Rt(N,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):W(ee)}function W(ee){return ee===c?(N.enter("codeFencedFenceSequence"),$(ee)):R(ee)}function $(ee){return ee===c?(M++,N.consume(ee),$):M>=u?(N.exit("codeFencedFenceSequence"),Tt(ee)?Rt(N,G,"whitespace")(ee):G(ee)):R(ee)}function G(ee){return ee===null||rt(ee)?(N.exit("codeFencedFence"),L(ee)):R(ee)}}}function nG(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l)}function l(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Db={name:"codeIndented",tokenize:aG},rG={partial:!0,tokenize:iG};function aG(e,t,n){const r=this;return s;function s(h){return e.enter("codeIndented"),Rt(e,l,"linePrefix",5)(h)}function l(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):rt(h)?e.attempt(rG,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||rt(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function iG(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):rt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):Rt(e,l,"linePrefix",5)(u)}function l(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):rt(u)?s(u):n(u)}}const sG={name:"codeText",previous:lG,resolve:oG,tokenize:cG};function oG(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function lG(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function cG(e,t,n){let r=0,s,l;return u;function u(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),r++,c):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(l=e.enter("codeTextSequence"),s=0,m(p)):rt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||rt(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),h)}function m(p){return p===96?(e.consume(p),s++,m):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(l.type="codeTextData",h(p))}}class uG{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 s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Mc(this.left,r),l.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),Mc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Mc(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);Mc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Mc(this.left,n.reverse())}}}function Mc(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 zO(e){const t={};let n=-1,r,s,l,u,c,d,h;const m=new uG(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,l=0,l<d.length&&d[l][1].type==="lineEndingBlank"&&(l+=2),l<d.length&&d[l][1].type==="content"))for(;++l<d.length&&d[l][1].type!=="content";)d[l][1].type==="chunkText"&&(d[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,dG(m,n)),n=t[n],h=!0);else if(r[1]._container){for(l=n,s=void 0;l--;)if(u=m.get(l),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=l);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end={...m.get(s)[1].start},c=m.slice(s,n),c.unshift(r),m.splice(s,n-s+1,c))}}return Tr(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function dG(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const l=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let m,p,v=-1,_=n,w=0,S=0;const b=[S];for(;_;){for(;e.get(++s)[1]!==_;);l.push(s),_._tokenizer||(m=r.sliceStream(_),_.next||m.push(null),p&&u.defineSkip(_.start),_._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),_._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),p=_,_=_.next}for(_=n;++v<c.length;)c[v][0]==="exit"&&c[v-1][0]==="enter"&&c[v][1].type===c[v-1][1].type&&c[v][1].start.line!==c[v][1].end.line&&(S=v+1,b.push(S),_._tokenizer=void 0,_.previous=void 0,_=_.next);for(u.events=[],_?(_._tokenizer=void 0,_.previous=void 0):b.pop(),v=b.length;v--;){const E=c.slice(b[v],b[v+1]),y=l.pop();d.push([y,y+E.length-1]),e.splice(y,2,E)}for(d.reverse(),v=-1;++v<d.length;)h[w+d[v][0]]=w+d[v][1],w+=d[v][1]-d[v][0]-1;return h}const hG={resolve:pG,tokenize:mG},fG={partial:!0,tokenize:gG};function pG(e){return zO(e),e}function mG(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?l(c):rt(c)?e.check(fG,u,l)(c):(e.consume(c),s)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function gG(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Rt(e,l,"linePrefix")}function l(u){if(u===null||rt(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function GO(e,t,n,r,s,l,u,c,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return p;function p(E){return E===60?(e.enter(r),e.enter(s),e.enter(l),e.consume(E),e.exit(l),v):E===null||E===32||E===41||yf(E)?n(E):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(E))}function v(E){return E===62?(e.enter(l),e.consume(E),e.exit(l),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),_(E))}function _(E){return E===62?(e.exit("chunkString"),e.exit(c),v(E)):E===null||E===60||rt(E)?n(E):(e.consume(E),E===92?w:_)}function w(E){return E===60||E===62||E===92?(e.consume(E),_):_(E)}function S(E){return!m&&(E===null||E===41||$t(E))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(E)):m<h&&E===40?(e.consume(E),m++,S):E===41?(e.consume(E),m--,S):E===null||E===32||E===40||yf(E)?n(E):(e.consume(E),E===92?b:S)}function b(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function VO(e,t,n,r,s,l){const u=this;let c=0,d;return h;function h(_){return e.enter(r),e.enter(s),e.consume(_),e.exit(s),e.enter(l),m}function m(_){return c>999||_===null||_===91||_===93&&!d||_===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(_):_===93?(e.exit(l),e.enter(s),e.consume(_),e.exit(s),e.exit(r),t):rt(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(_))}function p(_){return _===null||_===91||_===93||rt(_)||c++>999?(e.exit("chunkString"),m(_)):(e.consume(_),d||(d=!Tt(_)),_===92?v:p)}function v(_){return _===91||_===92||_===93?(e.consume(_),c++,p):p(_)}}function WO(e,t,n,r,s,l){let u;return c;function c(v){return v===34||v===39||v===40?(e.enter(r),e.enter(s),e.consume(v),e.exit(s),u=v===40?41:v,d):n(v)}function d(v){return v===u?(e.enter(s),e.consume(v),e.exit(s),e.exit(r),t):(e.enter(l),h(v))}function h(v){return v===u?(e.exit(l),d(u)):v===null?n(v):rt(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Rt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===u||v===null||rt(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?p:m)}function p(v){return v===u||v===92?(e.consume(v),m):m(v)}}function Yc(e,t){let n;return r;function r(s){return rt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Tt(s)?Rt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const bG={name:"definition",tokenize:yG},vG={partial:!0,tokenize:EG};function yG(e,t,n){const r=this;let s;return l;function l(_){return e.enter("definition"),u(_)}function u(_){return VO.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(_)}function c(_){return s=Qr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),_===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),d):n(_)}function d(_){return $t(_)?Yc(e,h)(_):h(_)}function h(_){return GO(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(_)}function m(_){return e.attempt(vG,p,p)(_)}function p(_){return Tt(_)?Rt(e,v,"whitespace")(_):v(_)}function v(_){return _===null||rt(_)?(e.exit("definition"),r.parser.defined.push(s),t(_)):n(_)}}function EG(e,t,n){return r;function r(c){return $t(c)?Yc(e,s)(c):n(c)}function s(c){return WO(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return Tt(c)?Rt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||rt(c)?t(c):n(c)}}const _G={name:"hardBreakEscape",tokenize:xG};function xG(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return rt(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const SG={name:"headingAtx",resolve:wG,tokenize:CG};function wG(e,t){let n=e.length-2,r=3,s,l;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&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Tr(e,r,n-r+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function CG(e,t,n){let r=0;return s;function s(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&r++<6?(e.consume(m),u):m===null||$t(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||rt(m)?(e.exit("atxHeading"),t(m)):Tt(m)?Rt(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||$t(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const TG=["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"],n2=["pre","script","style","textarea"],AG={concrete:!0,name:"htmlFlow",resolveTo:RG,tokenize:DG},NG={partial:!0,tokenize:OG},kG={partial:!0,tokenize:IG};function RG(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 DG(e,t,n){const r=this;let s,l,u,c,d;return h;function h(z){return m(z)}function m(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),p}function p(z){return z===33?(e.consume(z),v):z===47?(e.consume(z),l=!0,S):z===63?(e.consume(z),s=3,r.interrupt?t:O):Qn(z)?(e.consume(z),u=String.fromCharCode(z),b):n(z)}function v(z){return z===45?(e.consume(z),s=2,_):z===91?(e.consume(z),s=5,c=0,w):Qn(z)?(e.consume(z),s=4,r.interrupt?t:O):n(z)}function _(z){return z===45?(e.consume(z),r.interrupt?t:O):n(z)}function w(z){const se="CDATA[";return z===se.charCodeAt(c++)?(e.consume(z),c===se.length?r.interrupt?t:W:w):n(z)}function S(z){return Qn(z)?(e.consume(z),u=String.fromCharCode(z),b):n(z)}function b(z){if(z===null||z===47||z===62||$t(z)){const se=z===47,xe=u.toLowerCase();return!se&&!l&&n2.includes(xe)?(s=1,r.interrupt?t(z):W(z)):TG.includes(u.toLowerCase())?(s=6,se?(e.consume(z),E):r.interrupt?t(z):W(z)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(z):l?y(z):x(z))}return z===45||Vn(z)?(e.consume(z),u+=String.fromCharCode(z),b):n(z)}function E(z){return z===62?(e.consume(z),r.interrupt?t:W):n(z)}function y(z){return Tt(z)?(e.consume(z),y):j(z)}function x(z){return z===47?(e.consume(z),j):z===58||z===95||Qn(z)?(e.consume(z),A):Tt(z)?(e.consume(z),x):j(z)}function A(z){return z===45||z===46||z===58||z===95||Vn(z)?(e.consume(z),A):k(z)}function k(z){return z===61?(e.consume(z),N):Tt(z)?(e.consume(z),k):x(z)}function N(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),d=z,L):Tt(z)?(e.consume(z),N):R(z)}function L(z){return z===d?(e.consume(z),d=null,M):z===null||rt(z)?n(z):(e.consume(z),L)}function R(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||$t(z)?k(z):(e.consume(z),R)}function M(z){return z===47||z===62||Tt(z)?x(z):n(z)}function j(z){return z===62?(e.consume(z),U):n(z)}function U(z){return z===null||rt(z)?W(z):Tt(z)?(e.consume(z),U):n(z)}function W(z){return z===45&&s===2?(e.consume(z),P):z===60&&s===1?(e.consume(z),Z):z===62&&s===4?(e.consume(z),B):z===63&&s===3?(e.consume(z),O):z===93&&s===5?(e.consume(z),F):rt(z)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(NG,K,$)(z)):z===null||rt(z)?(e.exit("htmlFlowData"),$(z)):(e.consume(z),W)}function $(z){return e.check(kG,G,K)(z)}function G(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),ee}function ee(z){return z===null||rt(z)?$(z):(e.enter("htmlFlowData"),W(z))}function P(z){return z===45?(e.consume(z),O):W(z)}function Z(z){return z===47?(e.consume(z),u="",X):W(z)}function X(z){if(z===62){const se=u.toLowerCase();return n2.includes(se)?(e.consume(z),B):W(z)}return Qn(z)&&u.length<8?(e.consume(z),u+=String.fromCharCode(z),X):W(z)}function F(z){return z===93?(e.consume(z),O):W(z)}function O(z){return z===62?(e.consume(z),B):z===45&&s===2?(e.consume(z),O):W(z)}function B(z){return z===null||rt(z)?(e.exit("htmlFlowData"),K(z)):(e.consume(z),B)}function K(z){return e.exit("htmlFlow"),t(z)}}function IG(e,t,n){const r=this;return s;function s(u){return rt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):n(u)}function l(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function OG(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ju,t,n)}}const LG={name:"htmlText",tokenize:MG};function MG(e,t,n){const r=this;let s,l,u;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),k):O===63?(e.consume(O),x):Qn(O)?(e.consume(O),R):n(O)}function h(O){return O===45?(e.consume(O),m):O===91?(e.consume(O),l=0,w):Qn(O)?(e.consume(O),y):n(O)}function m(O){return O===45?(e.consume(O),_):n(O)}function p(O){return O===null?n(O):O===45?(e.consume(O),v):rt(O)?(u=p,Z(O)):(e.consume(O),p)}function v(O){return O===45?(e.consume(O),_):p(O)}function _(O){return O===62?P(O):O===45?v(O):p(O)}function w(O){const B="CDATA[";return O===B.charCodeAt(l++)?(e.consume(O),l===B.length?S:w):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),b):rt(O)?(u=S,Z(O)):(e.consume(O),S)}function b(O){return O===93?(e.consume(O),E):S(O)}function E(O){return O===62?P(O):O===93?(e.consume(O),E):S(O)}function y(O){return O===null||O===62?P(O):rt(O)?(u=y,Z(O)):(e.consume(O),y)}function x(O){return O===null?n(O):O===63?(e.consume(O),A):rt(O)?(u=x,Z(O)):(e.consume(O),x)}function A(O){return O===62?P(O):x(O)}function k(O){return Qn(O)?(e.consume(O),N):n(O)}function N(O){return O===45||Vn(O)?(e.consume(O),N):L(O)}function L(O){return rt(O)?(u=L,Z(O)):Tt(O)?(e.consume(O),L):P(O)}function R(O){return O===45||Vn(O)?(e.consume(O),R):O===47||O===62||$t(O)?M(O):n(O)}function M(O){return O===47?(e.consume(O),P):O===58||O===95||Qn(O)?(e.consume(O),j):rt(O)?(u=M,Z(O)):Tt(O)?(e.consume(O),M):P(O)}function j(O){return O===45||O===46||O===58||O===95||Vn(O)?(e.consume(O),j):U(O)}function U(O){return O===61?(e.consume(O),W):rt(O)?(u=U,Z(O)):Tt(O)?(e.consume(O),U):M(O)}function W(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,$):rt(O)?(u=W,Z(O)):Tt(O)?(e.consume(O),W):(e.consume(O),G)}function $(O){return O===s?(e.consume(O),s=void 0,ee):O===null?n(O):rt(O)?(u=$,Z(O)):(e.consume(O),$)}function G(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||$t(O)?M(O):(e.consume(O),G)}function ee(O){return O===47||O===62||$t(O)?M(O):n(O)}function P(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function Z(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),X}function X(O){return Tt(O)?Rt(e,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):F(O)}function F(O){return e.enter("htmlTextData"),u(O)}}const Sy={name:"labelEnd",resolveAll:BG,resolveTo:UG,tokenize:HG},jG={tokenize:$G},FG={tokenize:zG},PG={tokenize:GG};function BG(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 s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Tr(e,0,e.length,n),e}function UG(e,t){let n=e.length,r=0,s,l,u,c;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[u][1].end}},m={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[u-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=Fr(c,e.slice(l+1,l+r+3)),c=Fr(c,[["enter",m,t]]),c=Fr(c,mp(t.parser.constructs.insideSpan.null,e.slice(l+r+4,u-3),t)),c=Fr(c,[["exit",m,t],e[u-2],e[u-1],["exit",h,t]]),c=Fr(c,e.slice(u+1)),c=Fr(c,[["exit",d,t]]),Tr(e,l,e.length,c),e}function HG(e,t,n){const r=this;let s=r.events.length,l,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){l=r.events[s][1];break}return c;function c(v){return l?l._inactive?p(v):(u=r.parser.defined.includes(Qr(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):n(v)}function d(v){return v===40?e.attempt(jG,m,u?m:p)(v):v===91?e.attempt(FG,m,u?h:p)(v):u?m(v):p(v)}function h(v){return e.attempt(PG,m,p)(v)}function m(v){return t(v)}function p(v){return l._balanced=!0,n(v)}}function $G(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return $t(p)?Yc(e,l)(p):l(p)}function l(p){return p===41?m(p):GO(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function u(p){return $t(p)?Yc(e,d)(p):m(p)}function c(p){return n(p)}function d(p){return p===34||p===39||p===40?WO(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function h(p){return $t(p)?Yc(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function zG(e,t,n){const r=this;return s;function s(c){return VO.call(r,e,l,u,"reference","referenceMarker","referenceString")(c)}function l(c){return r.parser.defined.includes(Qr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function GG(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const VG={name:"labelStartImage",resolveAll:Sy.resolveAll,tokenize:WG};function WG(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const qG={name:"labelStartLink",resolveAll:Sy.resolveAll,tokenize:YG};function YG(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),l}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Ib={name:"lineEnding",tokenize:KG};function KG(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Rt(e,t,"linePrefix")}}const ef={name:"thematicBreak",tokenize:XG};function XG(e,t,n){let r=0,s;return l;function l(h){return e.enter("thematicBreak"),u(h)}function u(h){return s=h,c(h)}function c(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||rt(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Tt(h)?Rt(e,c,"whitespace")(h):c(h))}}const ur={continuation:{tokenize:eV},exit:nV,name:"list",tokenize:JG},ZG={partial:!0,tokenize:rV},QG={partial:!0,tokenize:tV};function JG(e,t,n){const r=this,s=r.events[r.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(_){const w=r.containerState.type||(_===42||_===43||_===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||_===r.containerState.marker:W0(_)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),_===42||_===45?e.check(ef,n,h)(_):h(_);if(!r.interrupt||_===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(_)}return n(_)}function d(_){return W0(_)&&++u<10?(e.consume(_),d):(!r.interrupt||u<2)&&(r.containerState.marker?_===r.containerState.marker:_===41||_===46)?(e.exit("listItemValue"),h(_)):n(_)}function h(_){return e.enter("listItemMarker"),e.consume(_),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||_,e.check(ju,r.interrupt?n:m,e.attempt(ZG,v,p))}function m(_){return r.containerState.initialBlankLine=!0,l++,v(_)}function p(_){return Tt(_)?(e.enter("listItemPrefixWhitespace"),e.consume(_),e.exit("listItemPrefixWhitespace"),v):n(_)}function v(_){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(_)}}function eV(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ju,s,l);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Rt(e,t,"listItemIndent",r.containerState.size+1)(c)}function l(c){return r.containerState.furtherBlankLines||!Tt(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(QG,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Rt(e,e.attempt(ur,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function tV(e,t,n){const r=this;return Rt(e,s,"listItemIndent",r.containerState.size+1);function s(l){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(l):n(l)}}function nV(e){e.exit(this.containerState.type)}function rV(e,t,n){const r=this;return Rt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const u=r.events[r.events.length-1];return!Tt(l)&&u&&u[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const r2={name:"setextUnderline",resolveTo:aV,tokenize:iV};function aV(e,t){let n=e.length,r,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const u={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",u,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=u,e.push(["exit",u,t]),e}function iV(e,t,n){const r=this;let s;return l;function l(h){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),s=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===s?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Tt(h)?Rt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||rt(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const sV={tokenize:oV};function oV(e){const t=this,n=e.attempt(ju,r,e.attempt(this.parser.constructs.flowInitial,s,Rt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(hG,s)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lV={resolveAll:YO()},cV=qO("string"),uV=qO("text");function qO(e){return{resolveAll:YO(e==="text"?dV:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],l=n.attempt(s,u,c);return u;function u(m){return h(m)?l(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return h(m)?(n.exit("data"),l(m)):(n.consume(m),d)}function h(m){if(m===null)return!0;const p=s[m];let v=-1;if(p)for(;++v<p.length;){const _=p[v];if(!_.previous||_.previous.call(r,r.previous))return!0}return!1}}}function YO(e){return t;function t(n,r){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,r):n}}function dV(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],s=t.sliceStream(r);let l=s.length,u=-1,c=0,d;for(;l--;){const h=s[l];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?u:r.start._bufferIndex+u,_index:r.start._index+l,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const hV={42:ur,43:ur,45:ur,48:ur,49:ur,50:ur,51:ur,52:ur,53:ur,54:ur,55:ur,56:ur,57:ur,62:UO},fV={91:bG},pV={[-2]:Db,[-1]:Db,32:Db},mV={35:SG,42:ef,45:[r2,ef],60:AG,61:r2,95:ef,96:t2,126:t2},gV={38:$O,92:HO},bV={[-5]:Ib,[-4]:Ib,[-3]:Ib,33:VG,38:$O,42:q0,60:[qz,LG],91:qG,92:[_G,HO],93:Sy,95:q0,96:sG},vV={null:[q0,lV]},yV={null:[42,95]},EV={null:[]},_V=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yV,contentInitial:fV,disable:EV,document:hV,flow:mV,flowInitial:pV,insideSpan:vV,string:gV,text:bV},Symbol.toStringTag,{value:"Module"}));function xV(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 s={},l=[];let u=[],c=[];const d={attempt:L(k),check:L(N),consume:y,enter:x,exit:A,interrupt:L(N,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:v,sliceStream:_,write:p};let m=t.tokenize.call(h,d);return t.resolveAll&&l.push(t),h;function p(U){return u=Fr(u,U),b(),u[u.length-1]!==null?[]:(R(t,0),h.events=mp(l,h.events,h),h.events)}function v(U,W){return wV(_(U),W)}function _(U){return SV(u,U)}function w(){const{_bufferIndex:U,_index:W,line:$,column:G,offset:ee}=r;return{_bufferIndex:U,_index:W,line:$,column:G,offset:ee}}function S(U){s[U.line]=U.column,j()}function b(){let U;for(;r._index<u.length;){const W=u[r._index];if(typeof W=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<W.length;)E(W.charCodeAt(r._bufferIndex));else E(W)}}function E(U){m=m(U)}function y(U){rt(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,j()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=U}function x(U,W){const $=W||{};return $.type=U,$.start=w(),h.events.push(["enter",$,h]),c.push($),$}function A(U){const W=c.pop();return W.end=w(),h.events.push(["exit",W,h]),W}function k(U,W){R(U,W.from)}function N(U,W){W.restore()}function L(U,W){return $;function $(G,ee,P){let Z,X,F,O;return Array.isArray(G)?K(G):"tokenize"in G?K([G]):B(G);function B(ue){return Q;function Q(V){const pe=V!==null&&ue[V],be=V!==null&&ue.null,me=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(be)?be:be?[be]:[]];return K(me)(V)}}function K(ue){return Z=ue,X=0,ue.length===0?P:z(ue[X])}function z(ue){return Q;function Q(V){return O=M(),F=ue,ue.partial||(h.currentConstruct=ue),ue.name&&h.parser.constructs.disable.null.includes(ue.name)?xe():ue.tokenize.call(W?Object.assign(Object.create(h),W):h,d,se,xe)(V)}}function se(ue){return U(F,O),ee}function xe(ue){return O.restore(),++X<Z.length?z(Z[X]):P}}}function R(U,W){U.resolveAll&&!l.includes(U)&&l.push(U),U.resolve&&Tr(h.events,W,h.events.length-W,U.resolve(h.events.slice(W),h)),U.resolveTo&&(h.events=U.resolveTo(h.events,h))}function M(){const U=w(),W=h.previous,$=h.currentConstruct,G=h.events.length,ee=Array.from(c);return{from:G,restore:P};function P(){r=U,h.previous=W,h.currentConstruct=$,h.events.length=G,c=ee,j()}}function j(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function SV(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,l)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}l>0&&u.push(e[s].slice(0,l))}return u}function wV(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const l=e[n];let u;if(typeof l=="string")u=l;else switch(l){case-5:{u="\r";break}case-4:{u=`
|
|
436
436
|
`;break}case-3:{u=`\r
|
|
437
437
|
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(l)}s=l===-2,r.push(u)}return r.join("")}function CV(e){const r={constructs:PO([_V,...(e||{}).extensions||[]]),content:s(Uz),defined:[],document:s($z),flow:s(sV),lazy:{},string:s(cV),text:s(uV)};return r;function s(l){return u;function u(c){return xV(r,l,c)}}}function TV(e){for(;!zO(e););return e}const a2=/[\0\t\n\r]/g;function AV(){let e=1,t="",n=!0,r;return s;function s(l,u,c){const d=[];let h,m,p,v,_;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(u||void 0).decode(l)),p=0,t="",n&&(l.charCodeAt(0)===65279&&p++,n=void 0);p<l.length;){if(a2.lastIndex=p,h=a2.exec(l),v=h&&h.index!==void 0?h.index:l.length,_=l.charCodeAt(v),!h){t=l.slice(p);break}if(_===10&&p===v&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<v&&(d.push(l.slice(p,v)),e+=v-p),_){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}p=v+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const NV=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function kV(e){return e.replace(NV,RV)}function RV(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return BO(n.slice(l?2:1),l?16:10)}return pu(n)||e}const KO={}.hasOwnProperty;function DV(e,t,n){return typeof t!="string"&&(n=t,t=void 0),IV(n)(TV(CV(n).document().write(AV()(e,t,!0))))}function IV(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(ze),autolinkProtocol:M,autolinkEmail:M,atxHeading:l(Pe),blockQuote:l(be),characterEscape:M,characterReference:M,codeFenced:l(me),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:l(me,u),codeText:l(_e,u),codeTextData:M,data:M,codeFlowValue:M,definition:l($e),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:l(le),hardBreakEscape:l(He),hardBreakTrailing:l(He),htmlFlow:l(oe,u),htmlFlowData:M,htmlText:l(oe,u),htmlTextData:M,image:l(Fe),label:u,link:l(ze),listItem:l(Lt),listItemValue:v,listOrdered:l(nt,p),listUnordered:l(nt),paragraph:l(bt),reference:z,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:l(Pe),strong:l(qt),thematicBreak:l(ut)},exit:{atxHeading:d(),atxHeadingSequence:k,autolink:d(),autolinkEmail:pe,autolinkProtocol:V,blockQuote:d(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:xe,characterReferenceMarkerNumeric:xe,characterReferenceValue:ue,characterReference:Q,codeFenced:d(b),codeFencedFence:S,codeFencedFenceInfo:_,codeFencedFenceMeta:w,codeFlowValue:j,codeIndented:d(E),codeText:d(ee),codeTextData:j,data:j,definition:d(),definitionDestinationString:A,definitionLabelString:y,definitionTitleString:x,emphasis:d(),hardBreakEscape:d(W),hardBreakTrailing:d(W),htmlFlow:d($),htmlFlowData:j,htmlText:d(G),htmlTextData:j,image:d(Z),label:F,labelText:X,lineEnding:U,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:se,resourceDestinationString:O,resourceTitleString:B,resource:K,setextHeading:d(R),setextHeadingLineSequence:L,setextHeadingText:N,strong:d(),thematicBreak:d()}};XO(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ye){let ke={type:"root",children:[]};const qe={stack:[ke],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:m,data:n},tt=[];let mt=-1;for(;++mt<ye.length;)if(ye[mt][1].type==="listOrdered"||ye[mt][1].type==="listUnordered")if(ye[mt][0]==="enter")tt.push(mt);else{const rn=tt.pop();mt=s(ye,rn,mt)}for(mt=-1;++mt<ye.length;){const rn=t[ye[mt][0]];KO.call(rn,ye[mt][1].type)&&rn[ye[mt][1].type].call(Object.assign({sliceSerialize:ye[mt][2].sliceSerialize},qe),ye[mt][1])}if(qe.tokenStack.length>0){const rn=qe.tokenStack[qe.tokenStack.length-1];(rn[1]||i2).call(qe,void 0,rn[0])}for(ke.position={start:Ni(ye.length>0?ye[0][1].start:{line:1,column:1,offset:0}),end:Ni(ye.length>0?ye[ye.length-2][1].end:{line:1,column:1,offset:0})},mt=-1;++mt<t.transforms.length;)ke=t.transforms[mt](ke)||ke;return ke}function s(ye,ke,qe){let tt=ke-1,mt=-1,rn=!1,vt,mn,Kn,De;for(;++tt<=qe;){const Ge=ye[tt];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?mt++:mt--,De=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(vt&&!De&&!mt&&!Kn&&(Kn=tt),De=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:De=void 0}if(!mt&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||mt===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(vt){let gt=tt;for(mn=void 0;gt--;){const ot=ye[gt];if(ot[1].type==="lineEnding"||ot[1].type==="lineEndingBlank"){if(ot[0]==="exit")continue;mn&&(ye[mn][1].type="lineEndingBlank",rn=!0),ot[1].type="lineEnding",mn=gt}else if(!(ot[1].type==="linePrefix"||ot[1].type==="blockQuotePrefix"||ot[1].type==="blockQuotePrefixWhitespace"||ot[1].type==="blockQuoteMarker"||ot[1].type==="listItemIndent"))break}Kn&&(!mn||Kn<mn)&&(vt._spread=!0),vt.end=Object.assign({},mn?ye[mn][1].start:Ge[1].end),ye.splice(mn||tt,0,["exit",vt,Ge[2]]),tt++,qe++}if(Ge[1].type==="listItemPrefix"){const gt={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};vt=gt,ye.splice(tt,0,["enter",gt,Ge[2]]),tt++,qe++,Kn=void 0,De=!0}}}return ye[ke][1]._spread=rn,qe}function l(ye,ke){return qe;function qe(tt){c.call(this,ye(tt),tt),ke&&ke.call(this,tt)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ye,ke,qe){this.stack[this.stack.length-1].children.push(ye),this.stack.push(ye),this.tokenStack.push([ke,qe||void 0]),ye.position={start:Ni(ke.start),end:void 0}}function d(ye){return ke;function ke(qe){ye&&ye.call(this,qe),h.call(this,qe)}}function h(ye,ke){const qe=this.stack.pop(),tt=this.tokenStack.pop();if(tt)tt[0].type!==ye.type&&(ke?ke.call(this,ye,tt[0]):(tt[1]||i2).call(this,ye,tt[0]));else throw new Error("Cannot close `"+ye.type+"` ("+qc({start:ye.start,end:ye.end})+"): it’s not open");qe.position.end=Ni(ye.end)}function m(){return xy(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function v(ye){if(this.data.expectingFirstListItemValue){const ke=this.stack[this.stack.length-2];ke.start=Number.parseInt(this.sliceSerialize(ye),10),this.data.expectingFirstListItemValue=void 0}}function _(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.lang=ye}function w(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.meta=ye}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ye.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ye.replace(/(\r?\n|\r)$/g,"")}function y(ye){const ke=this.resume(),qe=this.stack[this.stack.length-1];qe.label=ke,qe.identifier=Qr(this.sliceSerialize(ye)).toLowerCase()}function x(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.title=ye}function A(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.url=ye}function k(ye){const ke=this.stack[this.stack.length-1];if(!ke.depth){const qe=this.sliceSerialize(ye).length;ke.depth=qe}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function L(ye){const ke=this.stack[this.stack.length-1];ke.depth=this.sliceSerialize(ye).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function M(ye){const qe=this.stack[this.stack.length-1].children;let tt=qe[qe.length-1];(!tt||tt.type!=="text")&&(tt=Yn(),tt.position={start:Ni(ye.start),end:void 0},qe.push(tt)),this.stack.push(tt)}function j(ye){const ke=this.stack.pop();ke.value+=this.sliceSerialize(ye),ke.position.end=Ni(ye.end)}function U(ye){const ke=this.stack[this.stack.length-1];if(this.data.atHardBreak){const qe=ke.children[ke.children.length-1];qe.position.end=Ni(ye.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ke.type)&&(M.call(this,ye),j.call(this,ye))}function W(){this.data.atHardBreak=!0}function $(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ye}function G(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ye}function ee(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ye}function P(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=ke,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function Z(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=ke,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function X(ye){const ke=this.sliceSerialize(ye),qe=this.stack[this.stack.length-2];qe.label=kV(ke),qe.identifier=Qr(ke).toLowerCase()}function F(){const ye=this.stack[this.stack.length-1],ke=this.resume(),qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,qe.type==="link"){const tt=ye.children;qe.children=tt}else qe.alt=ke}function O(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.url=ye}function B(){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.title=ye}function K(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function se(ye){const ke=this.resume(),qe=this.stack[this.stack.length-1];qe.label=ke,qe.identifier=Qr(this.sliceSerialize(ye)).toLowerCase(),this.data.referenceType="full"}function xe(ye){this.data.characterReferenceType=ye.type}function ue(ye){const ke=this.sliceSerialize(ye),qe=this.data.characterReferenceType;let tt;qe?(tt=BO(ke,qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):tt=pu(ke);const mt=this.stack[this.stack.length-1];mt.value+=tt}function Q(ye){const ke=this.stack.pop();ke.position.end=Ni(ye.end)}function V(ye){j.call(this,ye);const ke=this.stack[this.stack.length-1];ke.url=this.sliceSerialize(ye)}function pe(ye){j.call(this,ye);const ke=this.stack[this.stack.length-1];ke.url="mailto:"+this.sliceSerialize(ye)}function be(){return{type:"blockquote",children:[]}}function me(){return{type:"code",lang:null,meta:null,value:""}}function _e(){return{type:"inlineCode",value:""}}function $e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function le(){return{type:"emphasis",children:[]}}function Pe(){return{type:"heading",depth:0,children:[]}}function He(){return{type:"break"}}function oe(){return{type:"html",value:""}}function Fe(){return{type:"image",title:null,url:"",alt:null}}function ze(){return{type:"link",title:null,url:"",children:[]}}function nt(ye){return{type:"list",ordered:ye.type==="listOrdered",start:null,spread:ye._spread,children:[]}}function Lt(ye){return{type:"listItem",spread:ye._spread,checked:null,children:[]}}function bt(){return{type:"paragraph",children:[]}}function qt(){return{type:"strong",children:[]}}function Yn(){return{type:"text",value:""}}function ut(){return{type:"thematicBreak"}}}function Ni(e){return{line:e.line,column:e.column,offset:e.offset}}function XO(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?XO(e,r):OV(e,r)}}function OV(e,t){let n;for(n in t)if(KO.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 i2(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qc({start:t.start,end:t.end})+") is still open")}function ZO(e){const t=this;t.parser=n;function n(r){return DV(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function LV(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 MV(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|