@elizaos/client 1.6.2-alpha.18 → 1.6.2-alpha.19

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.
@@ -520,7 +520,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
520
520
  *
521
521
  * This source code is licensed under the ISC license.
522
522
  * See the LICENSE file in the root directory of this source tree.
523
- */const nD=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],_U=ve("zap",nD),rD=["top","right","bottom","left"],ki=Math.min,wn=Math.max,vc=Math.round,Ju=Math.floor,gr=a(e=>({x:e,y:e}),"createCoords"),iD={left:"right",right:"left",bottom:"top",top:"bottom"},oD={start:"end",end:"start"};function Lh(e,n,r){return wn(e,ki(n,r))}a(Lh,"clamp");function Xr(e,n){return typeof e=="function"?e(n):e}a(Xr,"evaluate");function Wr(e){return e.split("-")[0]}a(Wr,"getSide");function Na(e){return e.split("-")[1]}a(Na,"getAlignment");function Mm(e){return e==="x"?"y":"x"}a(Mm,"getOppositeAxis");function Nm(e){return e==="y"?"height":"width"}a(Nm,"getAxisLength");const aD=new Set(["top","bottom"]);function pr(e){return aD.has(Wr(e))?"y":"x"}a(pr,"getSideAxis");function km(e){return Mm(pr(e))}a(km,"getAlignmentAxis");function lD(e,n,r){r===void 0&&(r=!1);const o=Na(e),l=km(e),u=Nm(l);let f=l==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[u]>n.floating[u]&&(f=bc(f)),[f,bc(f)]}a(lD,"getAlignmentSides");function sD(e){const n=bc(e);return[zh(e),n,zh(n)]}a(sD,"getExpandedPlacements");function zh(e){return e.replace(/start|end/g,n=>oD[n])}a(zh,"getOppositeAlignmentPlacement");const p1=["left","right"],h1=["right","left"],uD=["top","bottom"],cD=["bottom","top"];function fD(e,n,r){switch(e){case"top":case"bottom":return r?n?h1:p1:n?p1:h1;case"left":case"right":return n?uD:cD;default:return[]}}a(fD,"getSideList");function dD(e,n,r,o){const l=Na(e);let u=fD(Wr(e),r==="start",o);return l&&(u=u.map(f=>f+"-"+l),n&&(u=u.concat(u.map(zh)))),u}a(dD,"getOppositeAxisPlacements");function bc(e){return e.replace(/left|right|bottom|top/g,n=>iD[n])}a(bc,"getOppositePlacement$1");function pD(e){return{top:0,right:0,bottom:0,left:0,...e}}a(pD,"expandPaddingObject");function ew(e){return typeof e!="number"?pD(e):{top:e,right:e,bottom:e,left:e}}a(ew,"getPaddingObject");function Sc(e){const{x:n,y:r,width:o,height:l}=e;return{width:o,height:l,top:r,left:n,right:n+o,bottom:r+l,x:n,y:r}}a(Sc,"rectToClientRect");function m1(e,n,r){let{reference:o,floating:l}=e;const u=pr(n),f=km(n),d=Nm(f),p=Wr(n),h=u==="y",m=o.x+o.width/2-l.width/2,g=o.y+o.height/2-l.height/2,b=o[d]/2-l[d]/2;let S;switch(p){case"top":S={x:m,y:o.y-l.height};break;case"bottom":S={x:m,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:g};break;case"left":S={x:o.x-l.width,y:g};break;default:S={x:o.x,y:o.y}}switch(Na(n)){case"start":S[f]-=b*(r&&h?-1:1);break;case"end":S[f]+=b*(r&&h?-1:1);break}return S}a(m1,"computeCoordsFromPlacement");const hD=a(async(e,n,r)=>{const{placement:o="bottom",strategy:l="absolute",middleware:u=[],platform:f}=r,d=u.filter(Boolean),p=await(f.isRTL==null?void 0:f.isRTL(n));let h=await f.getElementRects({reference:e,floating:n,strategy:l}),{x:m,y:g}=m1(h,o,p),b=o,S={},E=0;for(let w=0;w<d.length;w++){const{name:R,fn:T}=d[w],{x:O,y:M,data:L,reset:B}=await T({x:m,y:g,initialPlacement:o,placement:b,strategy:l,middlewareData:S,rects:h,platform:f,elements:{reference:e,floating:n}});m=O??m,g=M??g,S={...S,[R]:{...S[R],...L}},B&&E<=50&&(E++,typeof B=="object"&&(B.placement&&(b=B.placement),B.rects&&(h=B.rects===!0?await f.getElementRects({reference:e,floating:n,strategy:l}):B.rects),{x:m,y:g}=m1(h,b,p)),w=-1)}return{x:m,y:g,placement:b,strategy:l,middlewareData:S}},"computePosition$1");async function Jl(e,n){var r;n===void 0&&(n={});const{x:o,y:l,platform:u,rects:f,elements:d,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:b=!1,padding:S=0}=Xr(n,e),E=ew(S),R=d[b?g==="floating"?"reference":"floating":g],T=Sc(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(R)))==null||r?R:R.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:h,rootBoundary:m,strategy:p})),O=g==="floating"?{x:o,y:l,width:f.floating.width,height:f.floating.height}:f.reference,M=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),L=await(u.isElement==null?void 0:u.isElement(M))?await(u.getScale==null?void 0:u.getScale(M))||{x:1,y:1}:{x:1,y:1},B=Sc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:M,strategy:p}):O);return{top:(T.top-B.top+E.top)/L.y,bottom:(B.bottom-T.bottom+E.bottom)/L.y,left:(T.left-B.left+E.left)/L.x,right:(B.right-T.right+E.right)/L.x}}a(Jl,"detectOverflow");const mD=a(e=>({name:"arrow",options:e,async fn(n){const{x:r,y:o,placement:l,rects:u,platform:f,elements:d,middlewareData:p}=n,{element:h,padding:m=0}=Xr(e,n)||{};if(h==null)return{};const g=ew(m),b={x:r,y:o},S=km(l),E=Nm(S),w=await f.getDimensions(h),R=S==="y",T=R?"top":"left",O=R?"bottom":"right",M=R?"clientHeight":"clientWidth",L=u.reference[E]+u.reference[S]-b[S]-u.floating[E],B=b[S]-u.reference[S],D=await(f.getOffsetParent==null?void 0:f.getOffsetParent(h));let P=D?D[M]:0;(!P||!await(f.isElement==null?void 0:f.isElement(D)))&&(P=d.floating[M]||u.floating[E]);const Y=L/2-B/2,K=P/2-w[E]/2-1,te=ki(g[T],K),Z=ki(g[O],K),ee=te,fe=P-w[E]-Z,F=P/2-w[E]/2+Y,oe=Lh(ee,F,fe),I=!p.arrow&&Na(l)!=null&&F!==oe&&u.reference[E]/2-(F<ee?te:Z)-w[E]/2<0,W=I?F<ee?F-ee:F-fe:0;return{[S]:b[S]+W,data:{[S]:oe,centerOffset:F-oe-W,...I&&{alignmentOffset:W}},reset:I}}}),"arrow$4"),yD=a(function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,o;const{placement:l,middlewareData:u,rects:f,initialPlacement:d,platform:p,elements:h}=n,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:w=!0,...R}=Xr(e,n);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const T=Wr(l),O=pr(d),M=Wr(d)===d,L=await(p.isRTL==null?void 0:p.isRTL(h.floating)),B=b||(M||!w?[bc(d)]:sD(d)),D=E!=="none";!b&&D&&B.push(...dD(d,w,E,L));const P=[d,...B],Y=await Jl(n,R),K=[];let te=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&K.push(Y[T]),g){const F=lD(l,f,L);K.push(Y[F[0]],Y[F[1]])}if(te=[...te,{placement:l,overflows:K}],!K.every(F=>F<=0)){var Z,ee;const F=(((Z=u.flip)==null?void 0:Z.index)||0)+1,oe=P[F];if(oe&&(!(g==="alignment"?O!==pr(oe):!1)||te.every(ie=>pr(ie.placement)===O?ie.overflows[0]>0:!0)))return{data:{index:F,overflows:te},reset:{placement:oe}};let I=(ee=te.filter(W=>W.overflows[0]<=0).sort((W,ie)=>W.overflows[1]-ie.overflows[1])[0])==null?void 0:ee.placement;if(!I)switch(S){case"bestFit":{var fe;const W=(fe=te.filter(ie=>{if(D){const se=pr(ie.placement);return se===O||se==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(se=>se>0).reduce((se,k)=>se+k,0)]).sort((ie,se)=>ie[1]-se[1])[0])==null?void 0:fe[0];W&&(I=W);break}case"initialPlacement":I=d;break}if(l!==I)return{reset:{placement:I}}}return{}}}},"flip$3");function y1(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}a(y1,"getSideOffsets");function g1(e){return rD.some(n=>e[n]>=0)}a(g1,"isAnySideFullyClipped");const gD=a(function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r}=n,{strategy:o="referenceHidden",...l}=Xr(e,n);switch(o){case"referenceHidden":{const u=await Jl(n,{...l,elementContext:"reference"}),f=y1(u,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:g1(f)}}}case"escaped":{const u=await Jl(n,{...l,altBoundary:!0}),f=y1(u,r.floating);return{data:{escapedOffsets:f,escaped:g1(f)}}}default:return{}}}}},"hide$3"),tw=new Set(["left","top"]);async function vD(e,n){const{placement:r,platform:o,elements:l}=e,u=await(o.isRTL==null?void 0:o.isRTL(l.floating)),f=Wr(r),d=Na(r),p=pr(r)==="y",h=tw.has(f)?-1:1,m=u&&p?-1:1,g=Xr(n,e);let{mainAxis:b,crossAxis:S,alignmentAxis:E}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return d&&typeof E=="number"&&(S=d==="end"?E*-1:E),p?{x:S*m,y:b*h}:{x:b*h,y:S*m}}a(vD,"convertValueToCoords");const bD=a(function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,o;const{x:l,y:u,placement:f,middlewareData:d}=n,p=await vD(n,e);return f===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:l+p.x,y:u+p.y,data:{...p,placement:f}}}}},"offset$3"),SD=a(function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:o,placement:l}=n,{mainAxis:u=!0,crossAxis:f=!1,limiter:d={fn:a(R=>{let{x:T,y:O}=R;return{x:T,y:O}},"fn")},...p}=Xr(e,n),h={x:r,y:o},m=await Jl(n,p),g=pr(Wr(l)),b=Mm(g);let S=h[b],E=h[g];if(u){const R=b==="y"?"top":"left",T=b==="y"?"bottom":"right",O=S+m[R],M=S-m[T];S=Lh(O,S,M)}if(f){const R=g==="y"?"top":"left",T=g==="y"?"bottom":"right",O=E+m[R],M=E-m[T];E=Lh(O,E,M)}const w=d.fn({...n,[b]:S,[g]:E});return{...w,data:{x:w.x-r,y:w.y-o,enabled:{[b]:u,[g]:f}}}}}},"shift$3"),xD=a(function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:o,placement:l,rects:u,middlewareData:f}=n,{offset:d=0,mainAxis:p=!0,crossAxis:h=!0}=Xr(e,n),m={x:r,y:o},g=pr(l),b=Mm(g);let S=m[b],E=m[g];const w=Xr(d,n),R=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(p){const M=b==="y"?"height":"width",L=u.reference[b]-u.floating[M]+R.mainAxis,B=u.reference[b]+u.reference[M]-R.mainAxis;S<L?S=L:S>B&&(S=B)}if(h){var T,O;const M=b==="y"?"width":"height",L=tw.has(Wr(l)),B=u.reference[g]-u.floating[M]+(L&&((T=f.offset)==null?void 0:T[g])||0)+(L?0:R.crossAxis),D=u.reference[g]+u.reference[M]+(L?0:((O=f.offset)==null?void 0:O[g])||0)-(L?R.crossAxis:0);E<B?E=B:E>D&&(E=D)}return{[b]:S,[g]:E}}}},"limitShift$2"),wD=a(function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,o;const{placement:l,rects:u,platform:f,elements:d}=n,{apply:p=a(()=>{},"apply"),...h}=Xr(e,n),m=await Jl(n,h),g=Wr(l),b=Na(l),S=pr(l)==="y",{width:E,height:w}=u.floating;let R,T;g==="top"||g==="bottom"?(R=g,T=b===(await(f.isRTL==null?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(T=g,R=b==="end"?"top":"bottom");const O=w-m.top-m.bottom,M=E-m.left-m.right,L=ki(w-m[R],O),B=ki(E-m[T],M),D=!n.middlewareData.shift;let P=L,Y=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(Y=M),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(P=O),D&&!b){const te=wn(m.left,0),Z=wn(m.right,0),ee=wn(m.top,0),fe=wn(m.bottom,0);S?Y=E-2*(te!==0||Z!==0?te+Z:wn(m.left,m.right)):P=w-2*(ee!==0||fe!==0?ee+fe:wn(m.top,m.bottom))}await p({...n,availableWidth:Y,availableHeight:P});const K=await f.getDimensions(d.floating);return E!==K.width||w!==K.height?{reset:{rects:!0}}:{}}}},"size$2");function $c(){return typeof window<"u"}a($c,"hasWindow");function ka(e){return nw(e)?(e.nodeName||"").toLowerCase():"#document"}a(ka,"getNodeName");function Cn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}a(Cn,"getWindow$1");function wr(e){var n;return(n=(nw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}a(wr,"getDocumentElement");function nw(e){return $c()?e instanceof Node||e instanceof Cn(e).Node:!1}a(nw,"isNode");function Zn(e){return $c()?e instanceof Element||e instanceof Cn(e).Element:!1}a(Zn,"isElement");function br(e){return $c()?e instanceof HTMLElement||e instanceof Cn(e).HTMLElement:!1}a(br,"isHTMLElement$2");function v1(e){return!$c()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cn(e).ShadowRoot}a(v1,"isShadowRoot");const ED=new Set(["inline","contents"]);function ps(e){const{overflow:n,overflowX:r,overflowY:o,display:l}=Jn(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!ED.has(l)}a(ps,"isOverflowElement");const CD=new Set(["table","td","th"]);function TD(e){return CD.has(ka(e))}a(TD,"isTableElement");const RD=[":popover-open",":modal"];function Vc(e){return RD.some(n=>{try{return e.matches(n)}catch{return!1}})}a(Vc,"isTopLayer");const OD=["transform","translate","scale","rotate","perspective"],AD=["transform","translate","scale","rotate","perspective","filter"],_D=["paint","layout","strict","content"];function Dm(e){const n=Pm(),r=Zn(e)?Jn(e):e;return OD.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||AD.some(o=>(r.willChange||"").includes(o))||_D.some(o=>(r.contain||"").includes(o))}a(Dm,"isContainingBlock");function MD(e){let n=Di(e);for(;br(n)&&!wa(n);){if(Dm(n))return n;if(Vc(n))return null;n=Di(n)}return null}a(MD,"getContainingBlock");function Pm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}a(Pm,"isWebKit");const ND=new Set(["html","body","#document"]);function wa(e){return ND.has(ka(e))}a(wa,"isLastTraversableNode");function Jn(e){return Cn(e).getComputedStyle(e)}a(Jn,"getComputedStyle$1");function Gc(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}a(Gc,"getNodeScroll");function Di(e){if(ka(e)==="html")return e;const n=e.assignedSlot||e.parentNode||v1(e)&&e.host||wr(e);return v1(n)?n.host:n}a(Di,"getParentNode$1");function rw(e){const n=Di(e);return wa(n)?e.ownerDocument?e.ownerDocument.body:e.body:br(n)&&ps(n)?n:rw(n)}a(rw,"getNearestOverflowAncestor");function es(e,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const l=rw(e),u=l===((o=e.ownerDocument)==null?void 0:o.body),f=Cn(l);if(u){const d=jh(f);return n.concat(f,f.visualViewport||[],ps(l)?l:[],d&&r?es(d):[])}return n.concat(l,es(l,[],r))}a(es,"getOverflowAncestors");function jh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}a(jh,"getFrameElement");function iw(e){const n=Jn(e);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const l=br(e),u=l?e.offsetWidth:r,f=l?e.offsetHeight:o,d=vc(r)!==u||vc(o)!==f;return d&&(r=u,o=f),{width:r,height:o,$:d}}a(iw,"getCssDimensions");function Lm(e){return Zn(e)?e:e.contextElement}a(Lm,"unwrapElement");function ga(e){const n=Lm(e);if(!br(n))return gr(1);const r=n.getBoundingClientRect(),{width:o,height:l,$:u}=iw(n);let f=(u?vc(r.width):r.width)/o,d=(u?vc(r.height):r.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!d||!Number.isFinite(d))&&(d=1),{x:f,y:d}}a(ga,"getScale");const kD=gr(0);function ow(e){const n=Cn(e);return!Pm()||!n.visualViewport?kD:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}a(ow,"getVisualOffsets");function DD(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==Cn(e)?!1:n}a(DD,"shouldAddVisualOffsets");function uo(e,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const l=e.getBoundingClientRect(),u=Lm(e);let f=gr(1);n&&(o?Zn(o)&&(f=ga(o)):f=ga(e));const d=DD(u,r,o)?ow(u):gr(0);let p=(l.left+d.x)/f.x,h=(l.top+d.y)/f.y,m=l.width/f.x,g=l.height/f.y;if(u){const b=Cn(u),S=o&&Zn(o)?Cn(o):o;let E=b,w=jh(E);for(;w&&o&&S!==E;){const R=ga(w),T=w.getBoundingClientRect(),O=Jn(w),M=T.left+(w.clientLeft+parseFloat(O.paddingLeft))*R.x,L=T.top+(w.clientTop+parseFloat(O.paddingTop))*R.y;p*=R.x,h*=R.y,m*=R.x,g*=R.y,p+=M,h+=L,E=Cn(w),w=jh(E)}}return Sc({width:m,height:g,x:p,y:h})}a(uo,"getBoundingClientRect$1");function Yc(e,n){const r=Gc(e).scrollLeft;return n?n.left+r:uo(wr(e)).left+r}a(Yc,"getWindowScrollBarX");function aw(e,n){const r=e.getBoundingClientRect(),o=r.left+n.scrollLeft-Yc(e,r),l=r.top+n.scrollTop;return{x:o,y:l}}a(aw,"getHTMLOffset");function PD(e){let{elements:n,rect:r,offsetParent:o,strategy:l}=e;const u=l==="fixed",f=wr(o),d=n?Vc(n.floating):!1;if(o===f||d&&u)return r;let p={scrollLeft:0,scrollTop:0},h=gr(1);const m=gr(0),g=br(o);if((g||!g&&!u)&&((ka(o)!=="body"||ps(f))&&(p=Gc(o)),br(o))){const S=uo(o);h=ga(o),m.x=S.x+o.clientLeft,m.y=S.y+o.clientTop}const b=f&&!g&&!u?aw(f,p):gr(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-p.scrollLeft*h.x+m.x+b.x,y:r.y*h.y-p.scrollTop*h.y+m.y+b.y}}a(PD,"convertOffsetParentRelativeRectToViewportRelativeRect");function LD(e){return Array.from(e.getClientRects())}a(LD,"getClientRects");function zD(e){const n=wr(e),r=Gc(e),o=e.ownerDocument.body,l=wn(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),u=wn(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let f=-r.scrollLeft+Yc(e);const d=-r.scrollTop;return Jn(o).direction==="rtl"&&(f+=wn(n.clientWidth,o.clientWidth)-l),{width:l,height:u,x:f,y:d}}a(zD,"getDocumentRect");const b1=25;function jD(e,n){const r=Cn(e),o=wr(e),l=r.visualViewport;let u=o.clientWidth,f=o.clientHeight,d=0,p=0;if(l){u=l.width,f=l.height;const m=Pm();(!m||m&&n==="fixed")&&(d=l.offsetLeft,p=l.offsetTop)}const h=Yc(o);if(h<=0){const m=o.ownerDocument,g=m.body,b=getComputedStyle(g),S=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(o.clientWidth-g.clientWidth-S);E<=b1&&(u-=E)}else h<=b1&&(u+=h);return{width:u,height:f,x:d,y:p}}a(jD,"getViewportRect");const ID=new Set(["absolute","fixed"]);function BD(e,n){const r=uo(e,!0,n==="fixed"),o=r.top+e.clientTop,l=r.left+e.clientLeft,u=br(e)?ga(e):gr(1),f=e.clientWidth*u.x,d=e.clientHeight*u.y,p=l*u.x,h=o*u.y;return{width:f,height:d,x:p,y:h}}a(BD,"getInnerBoundingClientRect");function S1(e,n,r){let o;if(n==="viewport")o=jD(e,r);else if(n==="document")o=zD(wr(e));else if(Zn(n))o=BD(n,r);else{const l=ow(e);o={x:n.x-l.x,y:n.y-l.y,width:n.width,height:n.height}}return Sc(o)}a(S1,"getClientRectFromClippingAncestor");function lw(e,n){const r=Di(e);return r===n||!Zn(r)||wa(r)?!1:Jn(r).position==="fixed"||lw(r,n)}a(lw,"hasFixedPositionAncestor");function HD(e,n){const r=n.get(e);if(r)return r;let o=es(e,[],!1).filter(d=>Zn(d)&&ka(d)!=="body"),l=null;const u=Jn(e).position==="fixed";let f=u?Di(e):e;for(;Zn(f)&&!wa(f);){const d=Jn(f),p=Dm(f);!p&&d.position==="fixed"&&(l=null),(u?!p&&!l:!p&&d.position==="static"&&!!l&&ID.has(l.position)||ps(f)&&!p&&lw(e,f))?o=o.filter(m=>m!==f):l=d,f=Di(f)}return n.set(e,o),o}a(HD,"getClippingElementAncestors");function UD(e){let{element:n,boundary:r,rootBoundary:o,strategy:l}=e;const f=[...r==="clippingAncestors"?Vc(n)?[]:HD(n,this._c):[].concat(r),o],d=f[0],p=f.reduce((h,m)=>{const g=S1(n,m,l);return h.top=wn(g.top,h.top),h.right=ki(g.right,h.right),h.bottom=ki(g.bottom,h.bottom),h.left=wn(g.left,h.left),h},S1(n,d,l));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}a(UD,"getClippingRect");function FD(e){const{width:n,height:r}=iw(e);return{width:n,height:r}}a(FD,"getDimensions");function qD(e,n,r){const o=br(n),l=wr(n),u=r==="fixed",f=uo(e,!0,u,n);let d={scrollLeft:0,scrollTop:0};const p=gr(0);function h(){p.x=Yc(l)}if(a(h,"setLeftRTLScrollbarOffset"),o||!o&&!u)if((ka(n)!=="body"||ps(l))&&(d=Gc(n)),o){const S=uo(n,!0,u,n);p.x=S.x+n.clientLeft,p.y=S.y+n.clientTop}else l&&h();u&&!o&&l&&h();const m=l&&!o&&!u?aw(l,d):gr(0),g=f.left+d.scrollLeft-p.x-m.x,b=f.top+d.scrollTop-p.y-m.y;return{x:g,y:b,width:f.width,height:f.height}}a(qD,"getRectRelativeToOffsetParent");function Wp(e){return Jn(e).position==="static"}a(Wp,"isStaticPositioned");function x1(e,n){if(!br(e)||Jn(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return wr(e)===r&&(r=r.ownerDocument.body),r}a(x1,"getTrueOffsetParent");function sw(e,n){const r=Cn(e);if(Vc(e))return r;if(!br(e)){let l=Di(e);for(;l&&!wa(l);){if(Zn(l)&&!Wp(l))return l;l=Di(l)}return r}let o=x1(e,n);for(;o&&TD(o)&&Wp(o);)o=x1(o,n);return o&&wa(o)&&Wp(o)&&!Dm(o)?r:o||MD(e)||r}a(sw,"getOffsetParent$1");const $D=a(async function(e){const n=this.getOffsetParent||sw,r=this.getDimensions,o=await r(e.floating);return{reference:qD(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},"getElementRects");function VD(e){return Jn(e).direction==="rtl"}a(VD,"isRTL");const GD={convertOffsetParentRelativeRectToViewportRelativeRect:PD,getDocumentElement:wr,getClippingRect:UD,getOffsetParent:sw,getElementRects:$D,getClientRects:LD,getDimensions:FD,getScale:ga,isElement:Zn,isRTL:VD};function uw(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}a(uw,"rectsAreEqual");function YD(e,n){let r=null,o;const l=wr(e);function u(){var d;clearTimeout(o),(d=r)==null||d.disconnect(),r=null}a(u,"cleanup");function f(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),u();const h=e.getBoundingClientRect(),{left:m,top:g,width:b,height:S}=h;if(d||n(),!b||!S)return;const E=Ju(g),w=Ju(l.clientWidth-(m+b)),R=Ju(l.clientHeight-(g+S)),T=Ju(m),M={rootMargin:-E+"px "+-w+"px "+-R+"px "+-T+"px",threshold:wn(0,ki(1,p))||1};let L=!0;function B(D){const P=D[0].intersectionRatio;if(P!==p){if(!L)return f();P?f(!1,P):o=setTimeout(()=>{f(!1,1e-7)},1e3)}P===1&&!uw(h,e.getBoundingClientRect())&&f(),L=!1}a(B,"handleObserve");try{r=new IntersectionObserver(B,{...M,root:l.ownerDocument})}catch{r=new IntersectionObserver(B,M)}r.observe(e)}return a(f,"refresh"),f(!0),u}a(YD,"observeMove");function QD(e,n,r,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,h=Lm(e),m=l||u?[...h?es(h):[],...es(n)]:[];m.forEach(T=>{l&&T.addEventListener("scroll",r,{passive:!0}),u&&T.addEventListener("resize",r)});const g=h&&d?YD(h,r):null;let b=-1,S=null;f&&(S=new ResizeObserver(T=>{let[O]=T;O&&O.target===h&&S&&(S.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var M;(M=S)==null||M.observe(n)})),r()}),h&&!p&&S.observe(h),S.observe(n));let E,w=p?uo(e):null;p&&R();function R(){const T=uo(e);w&&!uw(w,T)&&r(),w=T,E=requestAnimationFrame(R)}return a(R,"frameLoop"),r(),()=>{var T;m.forEach(O=>{l&&O.removeEventListener("scroll",r),u&&O.removeEventListener("resize",r)}),g?.(),(T=S)==null||T.disconnect(),S=null,p&&cancelAnimationFrame(E)}}a(QD,"autoUpdate");const KD=bD,XD=SD,WD=yD,ZD=wD,JD=gD,w1=mD,eP=xD,tP=a((e,n,r)=>{const o=new Map,l={platform:GD,...r},u={...l.platform,_c:o};return hD(e,n,{...l,platform:u})},"computePosition");var nP=typeof document<"u",rP=a(function(){},"noop"),cc=nP?x.useLayoutEffect:rP;function xc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,o,l;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(o=r;o--!==0;)if(!xc(e[o],n[o]))return!1;return!0}if(l=Object.keys(e),r=l.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(n,l[o]))return!1;for(o=r;o--!==0;){const u=l[o];if(!(u==="_owner"&&e.$$typeof)&&!xc(e[u],n[u]))return!1}return!0}return e!==e&&n!==n}a(xc,"deepEqual");function cw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}a(cw,"getDPR");function E1(e,n){const r=cw(e);return Math.round(n*r)/r}a(E1,"roundByDPR");function Zp(e){const n=x.useRef(e);return cc(()=>{n.current=e}),n}a(Zp,"useLatestRef");function iP(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:l,elements:{reference:u,floating:f}={},transform:d=!0,whileElementsMounted:p,open:h}=e,[m,g]=x.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[b,S]=x.useState(o);xc(b,o)||S(o);const[E,w]=x.useState(null),[R,T]=x.useState(null),O=x.useCallback(ie=>{ie!==D.current&&(D.current=ie,w(ie))},[]),M=x.useCallback(ie=>{ie!==P.current&&(P.current=ie,T(ie))},[]),L=u||E,B=f||R,D=x.useRef(null),P=x.useRef(null),Y=x.useRef(m),K=p!=null,te=Zp(p),Z=Zp(l),ee=Zp(h),fe=x.useCallback(()=>{if(!D.current||!P.current)return;const ie={placement:n,strategy:r,middleware:b};Z.current&&(ie.platform=Z.current),tP(D.current,P.current,ie).then(se=>{const k={...se,isPositioned:ee.current!==!1};F.current&&!xc(Y.current,k)&&(Y.current=k,yr.flushSync(()=>{g(k)}))})},[b,n,r,Z,ee]);cc(()=>{h===!1&&Y.current.isPositioned&&(Y.current.isPositioned=!1,g(ie=>({...ie,isPositioned:!1})))},[h]);const F=x.useRef(!1);cc(()=>(F.current=!0,()=>{F.current=!1}),[]),cc(()=>{if(L&&(D.current=L),B&&(P.current=B),L&&B){if(te.current)return te.current(L,B,fe);fe()}},[L,B,fe,te,K]);const oe=x.useMemo(()=>({reference:D,floating:P,setReference:O,setFloating:M}),[O,M]),I=x.useMemo(()=>({reference:L,floating:B}),[L,B]),W=x.useMemo(()=>{const ie={position:r,left:0,top:0};if(!I.floating)return ie;const se=E1(I.floating,m.x),k=E1(I.floating,m.y);return d?{...ie,transform:"translate("+se+"px, "+k+"px)",...cw(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:se,top:k}},[r,d,I.floating,m.x,m.y]);return x.useMemo(()=>({...m,update:fe,refs:oe,elements:I,floatingStyles:W}),[m,fe,oe,I,W])}a(iP,"useFloating");const oP=a(e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return a(n,"isRef"),{name:"arrow",options:e,fn(r){const{element:o,padding:l}=typeof e=="function"?e(r):e;return o&&n(o)?o.current!=null?w1({element:o.current,padding:l}).fn(r):{}:o?w1({element:o,padding:l}).fn(r):{}}}},"arrow$1"),aP=a((e,n)=>({...KD(e),options:[e,n]}),"offset$1"),lP=a((e,n)=>({...XD(e),options:[e,n]}),"shift$1"),sP=a((e,n)=>({...eP(e),options:[e,n]}),"limitShift"),uP=a((e,n)=>({...WD(e),options:[e,n]}),"flip$1"),cP=a((e,n)=>({...ZD(e),options:[e,n]}),"size"),fP=a((e,n)=>({...JD(e),options:[e,n]}),"hide$1"),dP=a((e,n)=>({...oP(e),options:[e,n]}),"arrow$2");var pP="Arrow",fw=x.forwardRef((e,n)=>{const{children:r,width:o=10,height:l=5,...u}=e;return N.jsx(Te.svg,{...u,ref:n,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:N.jsx("polygon",{points:"0,0 30,0 15,10"})})});fw.displayName=pP;var hP=fw;function dw(e){const[n,r]=x.useState(void 0);return wt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const u=l[0];let f,d;if("borderBoxSize"in u){const p=u.borderBoxSize,h=Array.isArray(p)?p[0]:p;f=h.inlineSize,d=h.blockSize}else f=e.offsetWidth,d=e.offsetHeight;r({width:f,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),n}a(dw,"useSize");var zm="Popper",[pw,Da]=Wt(zm),[mP,hw]=pw(zm),mw=a(e=>{const{__scopePopper:n,children:r}=e,[o,l]=x.useState(null);return N.jsx(mP,{scope:n,anchor:o,onAnchorChange:l,children:r})},"Popper$1");mw.displayName=zm;var yw="PopperAnchor",gw=x.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...l}=e,u=hw(yw,r),f=x.useRef(null),d=ze(n,f),p=x.useRef(null);return x.useEffect(()=>{const h=p.current;p.current=o?.current||f.current,h!==p.current&&u.onAnchorChange(p.current)}),o?null:N.jsx(Te.div,{...l,ref:d})});gw.displayName=yw;var jm="PopperContent",[yP,gP]=pw(jm),vw=x.forwardRef((e,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:l=0,align:u="center",alignOffset:f=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:E,...w}=e,R=hw(jm,r),[T,O]=x.useState(null),M=ze(n,V=>O(V)),[L,B]=x.useState(null),D=dw(L),P=D?.width??0,Y=D?.height??0,K=o+(u!=="center"?"-"+u:""),te=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Z=Array.isArray(h)?h:[h],ee=Z.length>0,fe={padding:te,boundary:Z.filter(bP),altBoundary:ee},{refs:F,floatingStyles:oe,placement:I,isPositioned:W,middlewareData:ie}=iP({strategy:"fixed",placement:K,whileElementsMounted:a((...V)=>QD(...V,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:R.anchor},middleware:[aP({mainAxis:l+Y,alignmentAxis:f}),p&&lP({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?sP():void 0,...fe}),p&&uP({...fe}),cP({...fe,apply:a(({elements:V,rects:pe,availableWidth:be,availableHeight:Re})=>{const{width:ke,height:Ue}=pe.reference,Be=V.floating.style;Be.setProperty("--radix-popper-available-width",`${be}px`),Be.setProperty("--radix-popper-available-height",`${Re}px`),Be.setProperty("--radix-popper-anchor-width",`${ke}px`),Be.setProperty("--radix-popper-anchor-height",`${Ue}px`)},"apply")}),L&&dP({element:L,padding:d}),SP({arrowWidth:P,arrowHeight:Y}),b&&fP({strategy:"referenceHidden",...fe})]}),[se,k]=xw(I),z=xt(E);wt(()=>{W&&z?.()},[W,z]);const Q=ie.arrow?.x,A=ie.arrow?.y,J=ie.arrow?.centerOffset!==0,[de,ce]=x.useState();return wt(()=>{T&&ce(window.getComputedStyle(T).zIndex)},[T]),N.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:W?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(" "),...ie.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:N.jsx(yP,{scope:r,placedSide:se,onArrowChange:B,arrowX:Q,arrowY:A,shouldHideArrow:J,children:N.jsx(Te.div,{"data-side":se,"data-align":k,...w,ref:M,style:{...w.style,animation:W?void 0:"none"}})})})});vw.displayName=jm;var bw="PopperArrow",vP={top:"bottom",right:"left",bottom:"top",left:"right"},Sw=x.forwardRef(a(function(n,r){const{__scopePopper:o,...l}=n,u=gP(bw,o),f=vP[u.placedSide];return N.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:N.jsx(hP,{...l,ref:r,style:{...l.style,display:"block"}})})},"PopperArrow2"));Sw.displayName=bw;function bP(e){return e!==null}a(bP,"isNotNull");var SP=a(e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:o,middlewareData:l}=n,f=l.arrow?.centerOffset!==0,d=f?0:e.arrowWidth,p=f?0:e.arrowHeight,[h,m]=xw(r),g={start:"0%",center:"50%",end:"100%"}[m],b=(l.arrow?.x??0)+d/2,S=(l.arrow?.y??0)+p/2;let E="",w="";return h==="bottom"?(E=f?g:`${b}px`,w=`${-p}px`):h==="top"?(E=f?g:`${b}px`,w=`${o.floating.height+p}px`):h==="right"?(E=`${-p}px`,w=f?g:`${S}px`):h==="left"&&(E=`${o.floating.width+p}px`,w=f?g:`${S}px`),{data:{x:E,y:w}}}}),"transformOrigin");function xw(e){const[n,r="center"]=e.split("-");return[n,r]}a(xw,"getSideAndAlignFromPlacement");var Im=mw,Bm=gw,Hm=vw,Um=Sw,ww=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),xP="VisuallyHidden",Qc=x.forwardRef((e,n)=>N.jsx(Te.span,{...e,ref:n,style:{...ww,...e.style}}));Qc.displayName=xP;var wP=Qc,[Kc]=Wt("Tooltip",[Da]),Xc=Da(),Ew="TooltipProvider",EP=700,Ih="tooltip.open",[CP,Fm]=Kc(Ew),Cw=a(e=>{const{__scopeTooltip:n,delayDuration:r=EP,skipDelayDuration:o=300,disableHoverableContent:l=!1,children:u}=e,f=x.useRef(!0),d=x.useRef(!1),p=x.useRef(0);return x.useEffect(()=>{const h=p.current;return()=>window.clearTimeout(h)},[]),N.jsx(CP,{scope:n,isOpenDelayedRef:f,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(p.current),f.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>f.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:x.useCallback(h=>{d.current=h},[]),disableHoverableContent:l,children:u})},"TooltipProvider");Cw.displayName=Ew;var ts="Tooltip",[TP,hs]=Kc(ts),Tw=a(e=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:l,onOpenChange:u,disableHoverableContent:f,delayDuration:d}=e,p=Fm(ts,e.__scopeTooltip),h=Xc(n),[m,g]=x.useState(null),b=Bn(),S=x.useRef(0),E=f??p.disableHoverableContent,w=d??p.delayDuration,R=x.useRef(!1),[T,O]=vr({prop:o,defaultProp:l??!1,onChange:a(P=>{P?(p.onOpen(),document.dispatchEvent(new CustomEvent(Ih))):p.onClose(),u?.(P)},"onChange"),caller:ts}),M=x.useMemo(()=>T?R.current?"delayed-open":"instant-open":"closed",[T]),L=x.useCallback(()=>{window.clearTimeout(S.current),S.current=0,R.current=!1,O(!0)},[O]),B=x.useCallback(()=>{window.clearTimeout(S.current),S.current=0,O(!1)},[O]),D=x.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{R.current=!0,O(!0),S.current=0},w)},[w,O]);return x.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),N.jsx(Im,{...h,children:N.jsx(TP,{scope:n,contentId:b,open:T,stateAttribute:M,trigger:m,onTriggerChange:g,onTriggerEnter:x.useCallback(()=>{p.isOpenDelayedRef.current?D():L()},[p.isOpenDelayedRef,D,L]),onTriggerLeave:x.useCallback(()=>{E?B():(window.clearTimeout(S.current),S.current=0)},[B,E]),onOpen:L,onClose:B,disableHoverableContent:E,children:r})})},"Tooltip");Tw.displayName=ts;var Bh="TooltipTrigger",Rw=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,l=hs(Bh,r),u=Fm(Bh,r),f=Xc(r),d=x.useRef(null),p=ze(n,d,l.onTriggerChange),h=x.useRef(!1),m=x.useRef(!1),g=x.useCallback(()=>h.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),N.jsx(Bm,{asChild:!0,...f,children:N.jsx(Te.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:p,onPointerMove:ye(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!u.isPointerInTransitRef.current&&(l.onTriggerEnter(),m.current=!0)}),onPointerLeave:ye(e.onPointerLeave,()=>{l.onTriggerLeave(),m.current=!1}),onPointerDown:ye(e.onPointerDown,()=>{l.open&&l.onClose(),h.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:ye(e.onFocus,()=>{h.current||l.onOpen()}),onBlur:ye(e.onBlur,l.onClose),onClick:ye(e.onClick,l.onClose)})})});Rw.displayName=Bh;var qm="TooltipPortal",[RP,OP]=Kc(qm,{forceMount:void 0}),Ow=a(e=>{const{__scopeTooltip:n,forceMount:r,children:o,container:l}=e,u=hs(qm,n);return N.jsx(RP,{scope:n,forceMount:r,children:N.jsx(Ht,{present:r||u.open,children:N.jsx(Ma,{asChild:!0,container:l,children:o})})})},"TooltipPortal");Ow.displayName=qm;var Ea="TooltipContent",Aw=x.forwardRef((e,n)=>{const r=OP(Ea,e.__scopeTooltip),{forceMount:o=r.forceMount,side:l="top",...u}=e,f=hs(Ea,e.__scopeTooltip);return N.jsx(Ht,{present:o||f.open,children:f.disableHoverableContent?N.jsx(_w,{side:l,...u,ref:n}):N.jsx(AP,{side:l,...u,ref:n})})}),AP=x.forwardRef((e,n)=>{const r=hs(Ea,e.__scopeTooltip),o=Fm(Ea,e.__scopeTooltip),l=x.useRef(null),u=ze(n,l),[f,d]=x.useState(null),{trigger:p,onClose:h}=r,m=l.current,{onPointerInTransitChange:g}=o,b=x.useCallback(()=>{d(null),g(!1)},[g]),S=x.useCallback((E,w)=>{const R=E.currentTarget,T={x:E.clientX,y:E.clientY},O=DP(T,R.getBoundingClientRect()),M=PP(T,O),L=LP(w.getBoundingClientRect()),B=jP([...M,...L]);d(B),g(!0)},[g]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(p&&m){const E=a(R=>S(R,m),"handleTriggerLeave"),w=a(R=>S(R,p),"handleContentLeave");return p.addEventListener("pointerleave",E),m.addEventListener("pointerleave",w),()=>{p.removeEventListener("pointerleave",E),m.removeEventListener("pointerleave",w)}}},[p,m,S,b]),x.useEffect(()=>{if(f){const E=a(w=>{const R=w.target,T={x:w.clientX,y:w.clientY},O=p?.contains(R)||m?.contains(R),M=!zP(T,f);O?b():M&&(b(),h())},"handleTrackPointerGrace");return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[p,m,f,h,b]),N.jsx(_w,{...e,ref:u})}),[_P,MP]=Kc(ts,{isInside:!1}),NP=xx("TooltipContent"),_w=x.forwardRef((e,n)=>{const{__scopeTooltip:r,children:o,"aria-label":l,onEscapeKeyDown:u,onPointerDownOutside:f,...d}=e,p=hs(Ea,r),h=Xc(r),{onClose:m}=p;return x.useEffect(()=>(document.addEventListener(Ih,m),()=>document.removeEventListener(Ih,m)),[m]),x.useEffect(()=>{if(p.trigger){const g=a(b=>{b.target?.contains(p.trigger)&&m()},"handleScroll");return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[p.trigger,m]),N.jsx(_a,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:a(g=>g.preventDefault(),"onFocusOutside"),onDismiss:m,children:N.jsxs(Hm,{"data-state":p.stateAttribute,...h,...d,ref:n,style:{...d.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:[N.jsx(NP,{children:o}),N.jsx(_P,{scope:r,isInside:!0,children:N.jsx(wP,{id:p.contentId,role:"tooltip",children:l||o})})]})})});Aw.displayName=Ea;var Mw="TooltipArrow",kP=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,l=Xc(r);return MP(Mw,r).isInside?null:N.jsx(Um,{...l,...o,ref:n})});kP.displayName=Mw;function DP(e,n){const r=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),l=Math.abs(n.right-e.x),u=Math.abs(n.left-e.x);switch(Math.min(r,o,l,u)){case u:return"left";case l:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}a(DP,"getExitSideFromRect");function PP(e,n,r=5){const o=[];switch(n){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}a(PP,"getPaddedExitPoints");function LP(e){const{top:n,right:r,bottom:o,left:l}=e;return[{x:l,y:n},{x:r,y:n},{x:r,y:o},{x:l,y:o}]}a(LP,"getPointsFromRect");function zP(e,n){const{x:r,y:o}=e;let l=!1;for(let u=0,f=n.length-1;u<n.length;f=u++){const d=n[u],p=n[f],h=d.x,m=d.y,g=p.x,b=p.y;m>o!=b>o&&r<(g-h)*(o-m)/(b-m)+h&&(l=!l)}return l}a(zP,"isPointInPolygon$1");function jP(e){const n=e.slice();return n.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),IP(n)}a(jP,"getHull");function IP(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o<e.length;o++){const l=e[o];for(;n.length>=2;){const u=n[n.length-1],f=n[n.length-2];if((u.x-f.x)*(l.y-f.y)>=(u.y-f.y)*(l.x-f.x))n.pop();else break}n.push(l)}n.pop();const r=[];for(let o=e.length-1;o>=0;o--){const l=e[o];for(;r.length>=2;){const u=r[r.length-1],f=r[r.length-2];if((u.x-f.x)*(l.y-f.y)>=(u.y-f.y)*(l.x-f.x))r.pop();else break}r.push(l)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}a(IP,"getHullPresorted");var MU=Cw,NU=Tw,kU=Rw,DU=Ow,PU=Aw,go=class{static{a(this,"Subscribable")}constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},BP={setTimeout:a((e,n)=>setTimeout(e,n),"setTimeout"),clearTimeout:a(e=>clearTimeout(e),"clearTimeout"),setInterval:a((e,n)=>setInterval(e,n),"setInterval"),clearInterval:a(e=>clearInterval(e),"clearInterval")},HP=class{static{a(this,"TimeoutManager")}#t=BP;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,n){return this.#t.setTimeout(e,n)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,n){return this.#t.setInterval(e,n)}clearInterval(e){this.#t.clearInterval(e)}},io=new HP;function UP(e){setTimeout(e,0)}a(UP,"systemSetTimeoutZero");var co=typeof window>"u"||"Deno"in globalThis;function qt(){}a(qt,"noop$2");function FP(e,n){return typeof e=="function"?e(n):e}a(FP,"functionalUpdate");function Hh(e){return typeof e=="number"&&e>=0&&e!==1/0}a(Hh,"isValidTimeout");function Nw(e,n){return Math.max(e+(n||0)-Date.now(),0)}a(Nw,"timeUntilStale");function Ni(e,n){return typeof e=="function"?e(n):e}a(Ni,"resolveStaleTime");function zn(e,n){return typeof e=="function"?e(n):e}a(zn,"resolveEnabled");function C1(e,n){const{type:r="all",exact:o,fetchStatus:l,predicate:u,queryKey:f,stale:d}=e;if(f){if(o){if(n.queryHash!==$m(f,n.options))return!1}else if(!ns(n.queryKey,f))return!1}if(r!=="all"){const p=n.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||l&&l!==n.state.fetchStatus||u&&!u(n))}a(C1,"matchQuery");function T1(e,n){const{exact:r,status:o,predicate:l,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(r){if(fo(n.options.mutationKey)!==fo(u))return!1}else if(!ns(n.options.mutationKey,u))return!1}return!(o&&n.state.status!==o||l&&!l(n))}a(T1,"matchMutation");function $m(e,n){return(n?.queryKeyHashFn||fo)(e)}a($m,"hashQueryKeyByOptions");function fo(e){return JSON.stringify(e,(n,r)=>Uh(r)?Object.keys(r).sort().reduce((o,l)=>(o[l]=r[l],o),{}):r)}a(fo,"hashKey");function ns(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>ns(e[r],n[r])):!1}a(ns,"partialMatchKey");var qP=Object.prototype.hasOwnProperty;function Vm(e,n){if(e===n)return e;const r=R1(e)&&R1(n);if(!r&&!(Uh(e)&&Uh(n)))return n;const l=(r?e:Object.keys(e)).length,u=r?n:Object.keys(n),f=u.length,d=r?new Array(f):{};let p=0;for(let h=0;h<f;h++){const m=r?h:u[h],g=e[m],b=n[m];if(g===b){d[m]=g,(r?h<l:qP.call(e,m))&&p++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){d[m]=b;continue}const S=Vm(g,b);d[m]=S,S===g&&p++}return l===f&&p===l?e:d}a(Vm,"replaceEqualDeep");function rs(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}a(rs,"shallowEqualObjects");function R1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}a(R1,"isPlainArray");function Uh(e){if(!O1(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!O1(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}a(Uh,"isPlainObject$1");function O1(e){return Object.prototype.toString.call(e)==="[object Object]"}a(O1,"hasObjectPrototype");function $P(e){return new Promise(n=>{io.setTimeout(n,e)})}a($P,"sleep");function Fh(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?Vm(e,n):n}a(Fh,"replaceData");function VP(e,n,r=0){const o=[...e,n];return r&&o.length>r?o.slice(1):o}a(VP,"addToEnd");function GP(e,n,r=0){const o=[n,...e];return r&&o.length>r?o.slice(0,-1):o}a(GP,"addToStart");var Gm=Symbol();function kw(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Gm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}a(kw,"ensureQueryFn");function Dw(e,n){return typeof e=="function"?e(...n):!!e}a(Dw,"shouldThrowError");var YP=class extends go{static{a(this,"FocusManager")}#t;#e;#n;constructor(){super(),this.#n=e=>{if(!co&&window.addEventListener){const n=a(()=>e(),"listener");return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Ym=new YP;function qh(){let e,n;const r=new Promise((l,u)=>{e=l,n=u});r.status="pending",r.catch(()=>{});function o(l){Object.assign(r,l),delete r.resolve,delete r.reject}return a(o,"finalize"),r.resolve=l=>{o({status:"fulfilled",value:l}),e(l)},r.reject=l=>{o({status:"rejected",reason:l}),n(l)},r}a(qh,"pendingThenable");var QP=UP;function KP(){let e=[],n=0,r=a(d=>{d()},"notifyFn"),o=a(d=>{d()},"batchNotifyFn"),l=QP;const u=a(d=>{n?e.push(d):l(()=>{r(d)})},"schedule"),f=a(()=>{const d=e;e=[],d.length&&l(()=>{o(()=>{d.forEach(p=>{r(p)})})})},"flush");return{batch:a(d=>{let p;n++;try{p=d()}finally{n--,n||f()}return p},"batch"),batchCalls:a(d=>(...p)=>{u(()=>{d(...p)})},"batchCalls"),schedule:u,setNotifyFunction:a(d=>{r=d},"setNotifyFunction"),setBatchNotifyFunction:a(d=>{o=d},"setBatchNotifyFunction"),setScheduler:a(d=>{l=d},"setScheduler")}}a(KP,"createNotifyManager");var St=KP(),XP=class extends go{static{a(this,"OnlineManager")}#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(!co&&window.addEventListener){const n=a(()=>e(!0),"onlineListener"),r=a(()=>e(!1),"offlineListener");return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#t}},wc=new XP;function WP(e){return Math.min(1e3*2**e,3e4)}a(WP,"defaultRetryDelay");function Pw(e){return(e??"online")==="online"?wc.isOnline():!0}a(Pw,"canFetch");var $h=class extends Error{static{a(this,"CancelledError")}constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Lw(e){let n=!1,r=0,o;const l=qh(),u=a(()=>l.status!=="pending","isResolved"),f=a(w=>{if(!u()){const R=new $h(w);b(R),e.onCancel?.(R)}},"cancel"),d=a(()=>{n=!0},"cancelRetry"),p=a(()=>{n=!1},"continueRetry"),h=a(()=>Ym.isFocused()&&(e.networkMode==="always"||wc.isOnline())&&e.canRun(),"canContinue"),m=a(()=>Pw(e.networkMode)&&e.canRun(),"canStart"),g=a(w=>{u()||(o?.(),l.resolve(w))},"resolve"),b=a(w=>{u()||(o?.(),l.reject(w))},"reject"),S=a(()=>new Promise(w=>{o=a(R=>{(u()||h())&&w(R)},"continueFn"),e.onPause?.()}).then(()=>{o=void 0,u()||e.onContinue?.()}),"pause"),E=a(()=>{if(u())return;let w;const R=r===0?e.initialPromise:void 0;try{w=R??e.fn()}catch(T){w=Promise.reject(T)}Promise.resolve(w).then(g).catch(T=>{if(u())return;const O=e.retry??(co?0:3),M=e.retryDelay??WP,L=typeof M=="function"?M(r,T):M,B=O===!0||typeof O=="number"&&r<O||typeof O=="function"&&O(r,T);if(n||!B){b(T);return}r++,e.onFail?.(r,T),$P(L).then(()=>h()?void 0:S()).then(()=>{n?b(T):E()})})},"run");return{promise:l,status:a(()=>l.status,"status"),cancel:f,continue:a(()=>(o?.(),l),"continue"),cancelRetry:d,continueRetry:p,canStart:m,start:a(()=>(m()?E():S().then(E),l),"start")}}a(Lw,"createRetryer");var zw=class{static{a(this,"Removable")}#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hh(this.gcTime)&&(this.#t=io.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(co?1/0:300*1e3))}clearGcTimeout(){this.#t&&(io.clearTimeout(this.#t),this.#t=void 0)}},ZP=class extends zw{static{a(this,"Query")}#t;#e;#n;#i;#r;#o;#l;constructor(e){super(),this.#l=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=A1(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=A1(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),this.#t=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=Fh(this.state.data,e,this.options);return this.#a({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#a({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(qt).catch(qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>zn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ni(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Nw(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=a(d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:a(()=>(this.#l=!0,r.signal),"get")})},"addSignalProperty"),l=a(()=>{const d=kw(this.options,n),h=a(()=>{const m={client:this.#i,queryKey:this.queryKey,meta:this.meta};return o(m),m},"createQueryFnContext")();return this.#l=!1,this.options.persister?this.options.persister(d,h,this):d(h)},"fetchFn"),f=a(()=>{const d={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return o(d),d},"createFetchContext")();this.options.behavior?.onFetch(f,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==f.fetchOptions?.meta)&&this.#a({type:"fetch",meta:f.fetchOptions?.meta}),this.#r=Lw({initialPromise:n?.initialPromise,fn:f.fetchFn,onCancel:a(d=>{d instanceof $h&&d.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},"onCancel"),onFail:a((d,p)=>{this.#a({type:"failed",failureCount:d,error:p})},"onFail"),onPause:a(()=>{this.#a({type:"pause"})},"onPause"),onContinue:a(()=>{this.#a({type:"continue"})},"onContinue"),retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:a(()=>!0,"canRun")});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof $h){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#a({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#a(e){const n=a(r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...jw(r.data,this.options),fetchMeta:e.meta??null};case"success":const o={...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?o:void 0,o;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}},"reducer");this.state=n(this.state),St.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function jw(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pw(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}a(jw,"fetchState");function A1(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,o=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}a(A1,"getDefaultState$1");var Qm=class extends go{static{a(this,"QueryObserver")}constructor(e,n){super(),this.options=n,this.#t=e,this.#a=null,this.#l=qh(),this.bindMethods(),this.setOptions(n)}#t;#e=void 0;#n=void 0;#i=void 0;#r;#o;#l;#a;#p;#f;#d;#u;#c;#s;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),_1(this.#e,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Vh(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Vh(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#x(),this.#e.removeObserver(this)}setOptions(e){const n=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof zn(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),n._defaulted&&!rs(this.options,n)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const o=this.hasListeners();o&&M1(this.#e,r,this.options,n)&&this.#h(),this.updateResult(),o&&(this.#e!==r||zn(this.options.enabled,this.#e)!==zn(n.enabled,this.#e)||Ni(this.options.staleTime,this.#e)!==Ni(n.staleTime,this.#e))&&this.#y();const l=this.#g();o&&(this.#e!==r||zn(this.options.enabled,this.#e)!==zn(n.enabled,this.#e)||l!==this.#s)&&this.#v(l)}getOptimisticResult(e){const n=this.#t.getQueryCache().build(this.#t,e),r=this.createResult(n,e);return e3(this,r)&&(this.#i=r,this.#o=this.options,this.#r=this.#e.state),r}getCurrentResult(){return this.#i}trackResult(e,n){return new Proxy(e,{get:a((r,o)=>(this.trackProp(o),n?.(o),o==="promise"&&!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,o)),"get")})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#t.defaultQueryOptions(e),r=this.#t.getQueryCache().build(this.#t,n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#h(e){this.#w();let n=this.#e.fetch(this.options,e);return e?.throwOnError||(n=n.catch(qt)),n}#y(){this.#S();const e=Ni(this.options.staleTime,this.#e);if(co||this.#i.isStale||!Hh(e))return;const r=Nw(this.#i.dataUpdatedAt,e)+1;this.#u=io.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#s=e,!(co||zn(this.options.enabled,this.#e)===!1||!Hh(this.#s)||this.#s===0)&&(this.#c=io.setInterval(()=>{(this.options.refetchIntervalInBackground||Ym.isFocused())&&this.#h()},this.#s))}#b(){this.#y(),this.#v(this.#g())}#S(){this.#u&&(io.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#c&&(io.clearInterval(this.#c),this.#c=void 0)}createResult(e,n){const r=this.#e,o=this.options,l=this.#i,u=this.#r,f=this.#o,p=e!==r?e.state:this.#n,{state:h}=e;let m={...h},g=!1,b;if(n._optimisticResults){const Y=this.hasListeners(),K=!Y&&_1(e,n),te=Y&&M1(e,r,n,o);(K||te)&&(m={...m,...jw(h.data,e.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:S,errorUpdatedAt:E,status:w}=m;b=m.data;let R=!1;if(n.placeholderData!==void 0&&b===void 0&&w==="pending"){let Y;l?.isPlaceholderData&&n.placeholderData===f?.placeholderData?(Y=l.data,R=!0):Y=typeof n.placeholderData=="function"?n.placeholderData(this.#d?.state.data,this.#d):n.placeholderData,Y!==void 0&&(w="success",b=Fh(l?.data,Y,n),g=!0)}if(n.select&&b!==void 0&&!R)if(l&&b===u?.data&&n.select===this.#p)b=this.#f;else try{this.#p=n.select,b=n.select(b),b=Fh(l?.data,b,n),this.#f=b,this.#a=null}catch(Y){this.#a=Y}this.#a&&(S=this.#a,b=this.#f,E=Date.now(),w="error");const T=m.fetchStatus==="fetching",O=w==="pending",M=w==="error",L=O&&T,B=b!==void 0,P={status:w,fetchStatus:m.fetchStatus,isPending:O,isSuccess:w==="success",isError:M,isInitialLoading:L,isLoading:L,data:b,dataUpdatedAt:m.dataUpdatedAt,error:S,errorUpdatedAt:E,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>p.dataUpdateCount||m.errorUpdateCount>p.errorUpdateCount,isFetching:T,isRefetching:T&&!O,isLoadingError:M&&!B,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:M&&B,isStale:Km(e,n),refetch:this.refetch,promise:this.#l,isEnabled:zn(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const Y=a(Z=>{P.status==="error"?Z.reject(P.error):P.data!==void 0&&Z.resolve(P.data)},"finalizeThenableIfPossible"),K=a(()=>{const Z=this.#l=P.promise=qh();Y(Z)},"recreateThenable"),te=this.#l;switch(te.status){case"pending":e.queryHash===r.queryHash&&Y(te);break;case"fulfilled":(P.status==="error"||P.data!==te.value)&&K();break;case"rejected":(P.status!=="error"||P.error!==te.reason)&&K();break}}return P}updateResult(){const e=this.#i,n=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#o=this.options,this.#r.data!==void 0&&(this.#d=this.#e),rs(n,e))return;this.#i=n;const r=a(()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!this.#m.size)return!0;const u=new Set(l??this.#m);return this.options.throwOnError&&u.add("error"),Object.keys(this.#i).some(f=>{const d=f;return this.#i[d]!==e[d]&&u.has(d)})},"shouldNotifyListeners");this.#E({listeners:r()})}#w(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const n=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(e){St.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function JP(e,n){return zn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}a(JP,"shouldLoadOnMount");function _1(e,n){return JP(e,n)||e.state.data!==void 0&&Vh(e,n,n.refetchOnMount)}a(_1,"shouldFetchOnMount");function Vh(e,n,r){if(zn(n.enabled,e)!==!1&&Ni(n.staleTime,e)!=="static"){const o=typeof r=="function"?r(e):r;return o==="always"||o!==!1&&Km(e,n)}return!1}a(Vh,"shouldFetchOn");function M1(e,n,r,o){return(e!==n||zn(o.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Km(e,r)}a(M1,"shouldFetchOptionally");function Km(e,n){return zn(n.enabled,e)!==!1&&e.isStaleByTime(Ni(n.staleTime,e))}a(Km,"isStale");function e3(e,n){return!rs(e.getCurrentResult(),n)}a(e3,"shouldAssignObserverCurrentProperties");function N1(e){return{onFetch:a((n,r)=>{const o=n.options,l=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],f=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const h=a(async()=>{let m=!1;const g=a(E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:a(()=>(n.signal.aborted?m=!0:n.signal.addEventListener("abort",()=>{m=!0}),n.signal),"get")})},"addSignalProperty"),b=kw(n.options,n.fetchOptions),S=a(async(E,w,R)=>{if(m)return Promise.reject();if(w==null&&E.pages.length)return Promise.resolve(E);const O=a(()=>{const D={client:n.client,queryKey:n.queryKey,pageParam:w,direction:R?"backward":"forward",meta:n.options.meta};return g(D),D},"createQueryFnContext")(),M=await b(O),{maxPages:L}=n.options,B=R?GP:VP;return{pages:B(E.pages,M,L),pageParams:B(E.pageParams,w,L)}},"fetchPage");if(l&&u.length){const E=l==="backward",w=E?t3:k1,R={pages:u,pageParams:f},T=w(o,R);d=await S(R,T,E)}else{const E=e??u.length;do{const w=p===0?f[0]??o.initialPageParam:k1(o,d);if(p>0&&w==null)break;d=await S(d,w),p++}while(p<E)}return d},"fetchFn");n.options.persister?n.fetchFn=()=>n.options.persister?.(h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=h},"onFetch")}}a(N1,"infiniteQueryBehavior");function k1(e,{pages:n,pageParams:r}){const o=n.length-1;return n.length>0?e.getNextPageParam(n[o],n,r[o],r):void 0}a(k1,"getNextPageParam");function t3(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}a(t3,"getPreviousPageParam");var n3=class extends zw{static{a(this,"Mutation")}#t;#e;#n;#i;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#e=[],this.state=e.state||Iw(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(n=>n!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const n=a(()=>{this.#r({type:"continue"})},"onContinue"),r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=Lw({fn:a(()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),"fn"),onFail:a((u,f)=>{this.#r({type:"failed",failureCount:u,error:f})},"onFail"),onPause:a(()=>{this.#r({type:"pause"})},"onPause"),onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:a(()=>this.#n.canRun(this),"canRun")});const o=this.state.status==="pending",l=!this.#i.canStart();try{if(o)n();else{this.#r({type:"pending",variables:e,isPaused:l}),await this.#n.config.onMutate?.(e,this,r);const f=await this.options.onMutate?.(e,r);f!==this.state.context&&this.#r({type:"pending",context:f,variables:e,isPaused:l})}const u=await this.#i.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,r),await this.options.onSuccess?.(u,e,this.state.context,r),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(u,null,e,this.state.context,r),this.#r({type:"success",data:u}),u}catch(u){try{throw await this.#n.config.onError?.(u,e,this.state.context,this,r),await this.options.onError?.(u,e,this.state.context,r),await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,u,e,this.state.context,r),u}finally{this.#r({type:"error",error:u})}}finally{this.#n.runNext(this)}}#r(e){const n=a(r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}},"reducer");this.state=n(this.state),St.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Iw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}a(Iw,"getDefaultState");var r3=class extends go{static{a(this,"MutationCache")}constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,n,r){const o=new n3({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(o),o}add(e){this.#t.add(e);const n=ec(e);if(typeof n=="string"){const r=this.#e.get(n);r?r.push(e):this.#e.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const n=ec(e);if(typeof n=="string"){const r=this.#e.get(n);if(r)if(r.length>1){const o=r.indexOf(e);o!==-1&&r.splice(o,1)}else r[0]===e&&this.#e.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=ec(e);if(typeof n=="string"){const o=this.#e.get(n)?.find(l=>l.state.status==="pending");return!o||o===e}else return!0}runNext(e){const n=ec(e);return typeof n=="string"?this.#e.get(n)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){St.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const n={exact:!0,...e};return this.getAll().find(r=>T1(n,r))}findAll(e={}){return this.getAll().filter(n=>T1(e,n))}notify(e){St.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return St.batch(()=>Promise.all(e.map(n=>n.continue().catch(qt))))}};function ec(e){return e.options.scope?.id}a(ec,"scopeFor");var i3=class extends go{static{a(this,"MutationObserver")}#t;#e=void 0;#n;#i;constructor(n,r){super(),this.#t=n,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const r=this.options;this.options=this.#t.defaultMutationOptions(n),rs(this.options,r)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&fo(r.mutationKey)!==fo(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#r(),this.#o(n)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(n,r){return this.#i=r,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(n)}#r(){const n=this.#n?.state??Iw();this.#e={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#o(n){St.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#e.variables,o=this.#e.context,l={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};n?.type==="success"?(this.#i.onSuccess?.(n.data,r,o,l),this.#i.onSettled?.(n.data,null,r,o,l)):n?.type==="error"&&(this.#i.onError?.(n.error,r,o,l),this.#i.onSettled?.(void 0,n.error,r,o,l))}this.listeners.forEach(r=>{r(this.#e)})})}};function D1(e,n){const r=new Set(n);return e.filter(o=>!r.has(o))}a(D1,"difference");function o3(e,n,r){const o=e.slice(0);return o[n]=r,o}a(o3,"replaceAt");var a3=class extends go{static{a(this,"QueriesObserver")}#t;#e;#n;#i;#r;#o;#l;#a;#p=[];constructor(e,n,r){super(),this.#t=e,this.#i=r,this.#n=[],this.#r=[],this.#e=[],this.setQueries(n)}onSubscribe(){this.listeners.size===1&&this.#r.forEach(e=>{e.subscribe(n=>{this.#c(e,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,n){this.#n=e,this.#i=n,St.batch(()=>{const r=this.#r,o=this.#u(this.#n);this.#p=o,o.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const l=o.map(m=>m.observer),u=l.map(m=>m.getCurrentResult()),f=r.length!==l.length,d=l.some((m,g)=>m!==r[g]),p=f||d,h=p?!0:u.some((m,g)=>{const b=this.#e[g];return!b||!rs(m,b)});!p&&!h||(p&&(this.#r=l),this.#e=u,this.hasListeners()&&(p&&(D1(r,l).forEach(m=>{m.destroy()}),D1(l,r).forEach(m=>{m.subscribe(g=>{this.#c(m,g)})})),this.#s()))})}getCurrentResult(){return this.#e}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,n){const r=this.#u(e),o=r.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions));return[o,l=>this.#d(l??o,n),()=>this.#f(o,r)]}#f(e,n){return n.map((r,o)=>{const l=e[o];return r.defaultedQueryOptions.notifyOnChangeProps?l:r.observer.trackResult(l,u=>{n.forEach(f=>{f.observer.trackProp(u)})})})}#d(e,n){return n?((!this.#o||this.#e!==this.#a||n!==this.#l)&&(this.#l=n,this.#a=this.#e,this.#o=Vm(this.#o,n(e))),this.#o):e}#u(e){const n=new Map(this.#r.map(o=>[o.options.queryHash,o])),r=[];return e.forEach(o=>{const l=this.#t.defaultQueryOptions(o),u=n.get(l.queryHash);u?r.push({defaultedQueryOptions:l,observer:u}):r.push({defaultedQueryOptions:l,observer:new Qm(this.#t,l)})}),r}#c(e,n){const r=this.#r.indexOf(e);r!==-1&&(this.#e=o3(this.#e,r,n),this.#s())}#s(){if(this.hasListeners()){const e=this.#o,n=this.#f(this.#e,this.#p),r=this.#d(n,this.#i?.combine);e!==r&&St.batch(()=>{this.listeners.forEach(o=>{o(this.#e)})})}}},l3=class extends go{static{a(this,"QueryCache")}constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,n,r){const o=n.queryKey,l=n.queryHash??$m(o,n);let u=this.get(l);return u||(u=new ZP({client:e,queryKey:o,queryHash:l,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#t.get(e.queryHash);n&&(e.destroy(),n===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){St.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>C1(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>C1(e,r)):n}notify(e){St.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){St.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){St.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},zU=class{static{a(this,"QueryClient")}#t;#e;#n;#i;#r;#o;#l;#a;constructor(e={}){this.#t=e.queryCache||new l3,this.#e=e.mutationCache||new r3,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#l=Ym.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#a=wc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#l?.(),this.#l=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#t.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#t.build(this,n),o=r.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ni(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(e,n,r){const o=this.defaultQueryOptions({queryKey:e}),u=this.#t.get(o.queryHash)?.state.data,f=FP(n,u);if(f!==void 0)return this.#t.build(this,o).setData(f,{...r,manual:!0})}setQueriesData(e,n,r){return St.batch(()=>this.#t.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#t.get(n.queryHash)?.state}removeQueries(e){const n=this.#t;St.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#t;return St.batch(()=>(r.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},o=St.batch(()=>this.#t.findAll(e).map(l=>l.cancel(r)));return Promise.all(o).then(qt).catch(qt)}invalidateQueries(e,n={}){return St.batch(()=>(this.#t.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},o=St.batch(()=>this.#t.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,r);return r.throwOnError||(u=u.catch(qt)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(qt)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#t.build(this,n);return r.isStaleByTime(Ni(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qt).catch(qt)}fetchInfiniteQuery(e){return e.behavior=N1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qt).catch(qt)}ensureInfiniteQueryData(e){return e.behavior=N1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return wc.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#i.set(fo(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#i.values()],r={};return n.forEach(o=>{ns(e,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(e,n){this.#r.set(fo(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(o=>{ns(e,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=$m(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Gm&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},Bw=x.createContext(void 0),Xm=a(e=>{const n=x.useContext(Bw);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},"useQueryClient"),jU=a(({client:e,children:n})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),N.jsx(Bw.Provider,{value:e,children:n})),"QueryClientProvider"),Hw=x.createContext(!1),Uw=a(()=>x.useContext(Hw),"useIsRestoring");Hw.Provider;function s3(){let e=!1;return{clearReset:a(()=>{e=!1},"clearReset"),reset:a(()=>{e=!0},"reset"),isReset:a(()=>e,"isReset")}}a(s3,"createValue");var u3=x.createContext(s3()),Fw=a(()=>x.useContext(u3),"useQueryErrorResetBoundary"),qw=a((e,n)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(n.isReset()||(e.retryOnMount=!1))},"ensurePreventErrorBoundaryRetry"),$w=a(e=>{x.useEffect(()=>{e.clearReset()},[e])},"useClearResetErrorBoundary"),Vw=a(({result:e,errorResetBoundary:n,throwOnError:r,query:o,suspense:l})=>e.isError&&!n.isReset()&&!e.isFetching&&o&&(l&&e.data===void 0||Dw(r,[e.error,o])),"getHasError"),Gw=a(e=>{if(e.suspense){const r=a(l=>l==="static"?l:Math.max(l??1e3,1e3),"clamp"),o=e.staleTime;e.staleTime=typeof o=="function"?(...l)=>r(o(...l)):r(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},"ensureSuspenseTimers"),Yw=a((e,n)=>e.isLoading&&e.isFetching&&!n,"willFetch"),Gh=a((e,n)=>e?.suspense&&n.isPending,"shouldSuspend"),Ec=a((e,n,r)=>n.fetchOptimistic(e).catch(()=>{r.clearReset()}),"fetchOptimistic");function IU({queries:e,...n},r){const o=Xm(),l=Uw(),u=Fw(),f=x.useMemo(()=>e.map(w=>{const R=o.defaultQueryOptions(w);return R._optimisticResults=l?"isRestoring":"optimistic",R}),[e,o,l]);f.forEach(w=>{Gw(w),qw(w,u)}),$w(u);const[d]=x.useState(()=>new a3(o,f,n)),[p,h,m]=d.getOptimisticResult(f,n.combine),g=!l&&n.subscribed!==!1;x.useSyncExternalStore(x.useCallback(w=>g?d.subscribe(St.batchCalls(w)):qt,[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),x.useEffect(()=>{d.setQueries(f,n)},[f,n,d]);const S=p.some((w,R)=>Gh(f[R],w))?p.flatMap((w,R)=>{const T=f[R];if(T){const O=new Qm(o,T);if(Gh(T,w))return Ec(T,O,u);Yw(w,l)&&Ec(T,O,u)}return[]}):[];if(S.length>0)throw Promise.all(S);const E=p.find((w,R)=>{const T=f[R];return T&&Vw({result:w,errorResetBoundary:u,throwOnError:T.throwOnError,query:o.getQueryCache().get(T.queryHash),suspense:T.suspense})});if(E?.error)throw E.error;return h(m())}a(IU,"useQueries");function c3(e,n,r){const o=Uw(),l=Fw(),u=Xm(),f=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(f),f._optimisticResults=o?"isRestoring":"optimistic",Gw(f),qw(f,l),$w(l);const d=!u.getQueryCache().get(f.queryHash),[p]=x.useState(()=>new n(u,f)),h=p.getOptimisticResult(f),m=!o&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(g=>{const b=m?p.subscribe(St.batchCalls(g)):qt;return p.updateResult(),b},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),x.useEffect(()=>{p.setOptions(f)},[f,p]),Gh(f,h))throw Ec(f,p,l);if(Vw({result:h,errorResetBoundary:l,throwOnError:f.throwOnError,query:u.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw h.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(f,h),f.experimental_prefetchInRender&&!co&&Yw(h,o)&&(d?Ec(f,p,l):u.getQueryCache().get(f.queryHash)?.promise)?.catch(qt).finally(()=>{p.updateResult()}),f.notifyOnChangeProps?h:p.trackResult(h)}a(c3,"useBaseQuery");function BU(e,n){return c3(e,Qm)}a(BU,"useQuery");function HU(e,n){const r=Xm(),[o]=x.useState(()=>new i3(r,e));x.useEffect(()=>{o.setOptions(e)},[o,e]);const l=x.useSyncExternalStore(x.useCallback(f=>o.subscribe(St.batchCalls(f)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=x.useCallback((f,d)=>{o.mutate(f,d).catch(qt)},[o]);if(l.error&&Dw(o.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:u,mutateAsync:l.mutate}}a(HU,"useMutation");/**
523
+ */const nD=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],_U=ve("zap",nD),rD=["top","right","bottom","left"],ki=Math.min,wn=Math.max,vc=Math.round,Ju=Math.floor,gr=a(e=>({x:e,y:e}),"createCoords"),iD={left:"right",right:"left",bottom:"top",top:"bottom"},oD={start:"end",end:"start"};function Lh(e,n,r){return wn(e,ki(n,r))}a(Lh,"clamp");function Xr(e,n){return typeof e=="function"?e(n):e}a(Xr,"evaluate");function Wr(e){return e.split("-")[0]}a(Wr,"getSide");function Na(e){return e.split("-")[1]}a(Na,"getAlignment");function Mm(e){return e==="x"?"y":"x"}a(Mm,"getOppositeAxis");function Nm(e){return e==="y"?"height":"width"}a(Nm,"getAxisLength");const aD=new Set(["top","bottom"]);function pr(e){return aD.has(Wr(e))?"y":"x"}a(pr,"getSideAxis");function km(e){return Mm(pr(e))}a(km,"getAlignmentAxis");function lD(e,n,r){r===void 0&&(r=!1);const o=Na(e),l=km(e),u=Nm(l);let f=l==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[u]>n.floating[u]&&(f=bc(f)),[f,bc(f)]}a(lD,"getAlignmentSides");function sD(e){const n=bc(e);return[zh(e),n,zh(n)]}a(sD,"getExpandedPlacements");function zh(e){return e.replace(/start|end/g,n=>oD[n])}a(zh,"getOppositeAlignmentPlacement");const p1=["left","right"],h1=["right","left"],uD=["top","bottom"],cD=["bottom","top"];function fD(e,n,r){switch(e){case"top":case"bottom":return r?n?h1:p1:n?p1:h1;case"left":case"right":return n?uD:cD;default:return[]}}a(fD,"getSideList");function dD(e,n,r,o){const l=Na(e);let u=fD(Wr(e),r==="start",o);return l&&(u=u.map(f=>f+"-"+l),n&&(u=u.concat(u.map(zh)))),u}a(dD,"getOppositeAxisPlacements");function bc(e){return e.replace(/left|right|bottom|top/g,n=>iD[n])}a(bc,"getOppositePlacement$1");function pD(e){return{top:0,right:0,bottom:0,left:0,...e}}a(pD,"expandPaddingObject");function ew(e){return typeof e!="number"?pD(e):{top:e,right:e,bottom:e,left:e}}a(ew,"getPaddingObject");function Sc(e){const{x:n,y:r,width:o,height:l}=e;return{width:o,height:l,top:r,left:n,right:n+o,bottom:r+l,x:n,y:r}}a(Sc,"rectToClientRect");function m1(e,n,r){let{reference:o,floating:l}=e;const u=pr(n),f=km(n),d=Nm(f),p=Wr(n),h=u==="y",m=o.x+o.width/2-l.width/2,g=o.y+o.height/2-l.height/2,b=o[d]/2-l[d]/2;let S;switch(p){case"top":S={x:m,y:o.y-l.height};break;case"bottom":S={x:m,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:g};break;case"left":S={x:o.x-l.width,y:g};break;default:S={x:o.x,y:o.y}}switch(Na(n)){case"start":S[f]-=b*(r&&h?-1:1);break;case"end":S[f]+=b*(r&&h?-1:1);break}return S}a(m1,"computeCoordsFromPlacement");const hD=a(async(e,n,r)=>{const{placement:o="bottom",strategy:l="absolute",middleware:u=[],platform:f}=r,d=u.filter(Boolean),p=await(f.isRTL==null?void 0:f.isRTL(n));let h=await f.getElementRects({reference:e,floating:n,strategy:l}),{x:m,y:g}=m1(h,o,p),b=o,S={},E=0;for(let w=0;w<d.length;w++){const{name:R,fn:T}=d[w],{x:O,y:M,data:L,reset:B}=await T({x:m,y:g,initialPlacement:o,placement:b,strategy:l,middlewareData:S,rects:h,platform:f,elements:{reference:e,floating:n}});m=O??m,g=M??g,S={...S,[R]:{...S[R],...L}},B&&E<=50&&(E++,typeof B=="object"&&(B.placement&&(b=B.placement),B.rects&&(h=B.rects===!0?await f.getElementRects({reference:e,floating:n,strategy:l}):B.rects),{x:m,y:g}=m1(h,b,p)),w=-1)}return{x:m,y:g,placement:b,strategy:l,middlewareData:S}},"computePosition$1");async function Jl(e,n){var r;n===void 0&&(n={});const{x:o,y:l,platform:u,rects:f,elements:d,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:b=!1,padding:S=0}=Xr(n,e),E=ew(S),R=d[b?g==="floating"?"reference":"floating":g],T=Sc(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(R)))==null||r?R:R.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:h,rootBoundary:m,strategy:p})),O=g==="floating"?{x:o,y:l,width:f.floating.width,height:f.floating.height}:f.reference,M=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),L=await(u.isElement==null?void 0:u.isElement(M))?await(u.getScale==null?void 0:u.getScale(M))||{x:1,y:1}:{x:1,y:1},B=Sc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:M,strategy:p}):O);return{top:(T.top-B.top+E.top)/L.y,bottom:(B.bottom-T.bottom+E.bottom)/L.y,left:(T.left-B.left+E.left)/L.x,right:(B.right-T.right+E.right)/L.x}}a(Jl,"detectOverflow");const mD=a(e=>({name:"arrow",options:e,async fn(n){const{x:r,y:o,placement:l,rects:u,platform:f,elements:d,middlewareData:p}=n,{element:h,padding:m=0}=Xr(e,n)||{};if(h==null)return{};const g=ew(m),b={x:r,y:o},S=km(l),E=Nm(S),w=await f.getDimensions(h),R=S==="y",T=R?"top":"left",O=R?"bottom":"right",M=R?"clientHeight":"clientWidth",L=u.reference[E]+u.reference[S]-b[S]-u.floating[E],B=b[S]-u.reference[S],D=await(f.getOffsetParent==null?void 0:f.getOffsetParent(h));let P=D?D[M]:0;(!P||!await(f.isElement==null?void 0:f.isElement(D)))&&(P=d.floating[M]||u.floating[E]);const Y=L/2-B/2,K=P/2-w[E]/2-1,te=ki(g[T],K),Z=ki(g[O],K),ee=te,fe=P-w[E]-Z,F=P/2-w[E]/2+Y,oe=Lh(ee,F,fe),I=!p.arrow&&Na(l)!=null&&F!==oe&&u.reference[E]/2-(F<ee?te:Z)-w[E]/2<0,W=I?F<ee?F-ee:F-fe:0;return{[S]:b[S]+W,data:{[S]:oe,centerOffset:F-oe-W,...I&&{alignmentOffset:W}},reset:I}}}),"arrow$4"),yD=a(function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,o;const{placement:l,middlewareData:u,rects:f,initialPlacement:d,platform:p,elements:h}=n,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:w=!0,...R}=Xr(e,n);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const T=Wr(l),O=pr(d),M=Wr(d)===d,L=await(p.isRTL==null?void 0:p.isRTL(h.floating)),B=b||(M||!w?[bc(d)]:sD(d)),D=E!=="none";!b&&D&&B.push(...dD(d,w,E,L));const P=[d,...B],Y=await Jl(n,R),K=[];let te=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&K.push(Y[T]),g){const F=lD(l,f,L);K.push(Y[F[0]],Y[F[1]])}if(te=[...te,{placement:l,overflows:K}],!K.every(F=>F<=0)){var Z,ee;const F=(((Z=u.flip)==null?void 0:Z.index)||0)+1,oe=P[F];if(oe&&(!(g==="alignment"?O!==pr(oe):!1)||te.every(ie=>pr(ie.placement)===O?ie.overflows[0]>0:!0)))return{data:{index:F,overflows:te},reset:{placement:oe}};let I=(ee=te.filter(W=>W.overflows[0]<=0).sort((W,ie)=>W.overflows[1]-ie.overflows[1])[0])==null?void 0:ee.placement;if(!I)switch(S){case"bestFit":{var fe;const W=(fe=te.filter(ie=>{if(D){const se=pr(ie.placement);return se===O||se==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(se=>se>0).reduce((se,k)=>se+k,0)]).sort((ie,se)=>ie[1]-se[1])[0])==null?void 0:fe[0];W&&(I=W);break}case"initialPlacement":I=d;break}if(l!==I)return{reset:{placement:I}}}return{}}}},"flip$3");function y1(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}a(y1,"getSideOffsets");function g1(e){return rD.some(n=>e[n]>=0)}a(g1,"isAnySideFullyClipped");const gD=a(function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r}=n,{strategy:o="referenceHidden",...l}=Xr(e,n);switch(o){case"referenceHidden":{const u=await Jl(n,{...l,elementContext:"reference"}),f=y1(u,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:g1(f)}}}case"escaped":{const u=await Jl(n,{...l,altBoundary:!0}),f=y1(u,r.floating);return{data:{escapedOffsets:f,escaped:g1(f)}}}default:return{}}}}},"hide$3"),tw=new Set(["left","top"]);async function vD(e,n){const{placement:r,platform:o,elements:l}=e,u=await(o.isRTL==null?void 0:o.isRTL(l.floating)),f=Wr(r),d=Na(r),p=pr(r)==="y",h=tw.has(f)?-1:1,m=u&&p?-1:1,g=Xr(n,e);let{mainAxis:b,crossAxis:S,alignmentAxis:E}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return d&&typeof E=="number"&&(S=d==="end"?E*-1:E),p?{x:S*m,y:b*h}:{x:b*h,y:S*m}}a(vD,"convertValueToCoords");const bD=a(function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,o;const{x:l,y:u,placement:f,middlewareData:d}=n,p=await vD(n,e);return f===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:l+p.x,y:u+p.y,data:{...p,placement:f}}}}},"offset$3"),SD=a(function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:o,placement:l}=n,{mainAxis:u=!0,crossAxis:f=!1,limiter:d={fn:a(R=>{let{x:T,y:O}=R;return{x:T,y:O}},"fn")},...p}=Xr(e,n),h={x:r,y:o},m=await Jl(n,p),g=pr(Wr(l)),b=Mm(g);let S=h[b],E=h[g];if(u){const R=b==="y"?"top":"left",T=b==="y"?"bottom":"right",O=S+m[R],M=S-m[T];S=Lh(O,S,M)}if(f){const R=g==="y"?"top":"left",T=g==="y"?"bottom":"right",O=E+m[R],M=E-m[T];E=Lh(O,E,M)}const w=d.fn({...n,[b]:S,[g]:E});return{...w,data:{x:w.x-r,y:w.y-o,enabled:{[b]:u,[g]:f}}}}}},"shift$3"),xD=a(function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:o,placement:l,rects:u,middlewareData:f}=n,{offset:d=0,mainAxis:p=!0,crossAxis:h=!0}=Xr(e,n),m={x:r,y:o},g=pr(l),b=Mm(g);let S=m[b],E=m[g];const w=Xr(d,n),R=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(p){const M=b==="y"?"height":"width",L=u.reference[b]-u.floating[M]+R.mainAxis,B=u.reference[b]+u.reference[M]-R.mainAxis;S<L?S=L:S>B&&(S=B)}if(h){var T,O;const M=b==="y"?"width":"height",L=tw.has(Wr(l)),B=u.reference[g]-u.floating[M]+(L&&((T=f.offset)==null?void 0:T[g])||0)+(L?0:R.crossAxis),D=u.reference[g]+u.reference[M]+(L?0:((O=f.offset)==null?void 0:O[g])||0)-(L?R.crossAxis:0);E<B?E=B:E>D&&(E=D)}return{[b]:S,[g]:E}}}},"limitShift$2"),wD=a(function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,o;const{placement:l,rects:u,platform:f,elements:d}=n,{apply:p=a(()=>{},"apply"),...h}=Xr(e,n),m=await Jl(n,h),g=Wr(l),b=Na(l),S=pr(l)==="y",{width:E,height:w}=u.floating;let R,T;g==="top"||g==="bottom"?(R=g,T=b===(await(f.isRTL==null?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(T=g,R=b==="end"?"top":"bottom");const O=w-m.top-m.bottom,M=E-m.left-m.right,L=ki(w-m[R],O),B=ki(E-m[T],M),D=!n.middlewareData.shift;let P=L,Y=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(Y=M),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(P=O),D&&!b){const te=wn(m.left,0),Z=wn(m.right,0),ee=wn(m.top,0),fe=wn(m.bottom,0);S?Y=E-2*(te!==0||Z!==0?te+Z:wn(m.left,m.right)):P=w-2*(ee!==0||fe!==0?ee+fe:wn(m.top,m.bottom))}await p({...n,availableWidth:Y,availableHeight:P});const K=await f.getDimensions(d.floating);return E!==K.width||w!==K.height?{reset:{rects:!0}}:{}}}},"size$2");function $c(){return typeof window<"u"}a($c,"hasWindow");function ka(e){return nw(e)?(e.nodeName||"").toLowerCase():"#document"}a(ka,"getNodeName");function Cn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}a(Cn,"getWindow$1");function wr(e){var n;return(n=(nw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}a(wr,"getDocumentElement");function nw(e){return $c()?e instanceof Node||e instanceof Cn(e).Node:!1}a(nw,"isNode");function Zn(e){return $c()?e instanceof Element||e instanceof Cn(e).Element:!1}a(Zn,"isElement");function br(e){return $c()?e instanceof HTMLElement||e instanceof Cn(e).HTMLElement:!1}a(br,"isHTMLElement$2");function v1(e){return!$c()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cn(e).ShadowRoot}a(v1,"isShadowRoot");const ED=new Set(["inline","contents"]);function ps(e){const{overflow:n,overflowX:r,overflowY:o,display:l}=Jn(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!ED.has(l)}a(ps,"isOverflowElement");const CD=new Set(["table","td","th"]);function TD(e){return CD.has(ka(e))}a(TD,"isTableElement");const RD=[":popover-open",":modal"];function Vc(e){return RD.some(n=>{try{return e.matches(n)}catch{return!1}})}a(Vc,"isTopLayer");const OD=["transform","translate","scale","rotate","perspective"],AD=["transform","translate","scale","rotate","perspective","filter"],_D=["paint","layout","strict","content"];function Dm(e){const n=Pm(),r=Zn(e)?Jn(e):e;return OD.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||AD.some(o=>(r.willChange||"").includes(o))||_D.some(o=>(r.contain||"").includes(o))}a(Dm,"isContainingBlock");function MD(e){let n=Di(e);for(;br(n)&&!wa(n);){if(Dm(n))return n;if(Vc(n))return null;n=Di(n)}return null}a(MD,"getContainingBlock");function Pm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}a(Pm,"isWebKit");const ND=new Set(["html","body","#document"]);function wa(e){return ND.has(ka(e))}a(wa,"isLastTraversableNode");function Jn(e){return Cn(e).getComputedStyle(e)}a(Jn,"getComputedStyle$1");function Gc(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}a(Gc,"getNodeScroll");function Di(e){if(ka(e)==="html")return e;const n=e.assignedSlot||e.parentNode||v1(e)&&e.host||wr(e);return v1(n)?n.host:n}a(Di,"getParentNode$1");function rw(e){const n=Di(e);return wa(n)?e.ownerDocument?e.ownerDocument.body:e.body:br(n)&&ps(n)?n:rw(n)}a(rw,"getNearestOverflowAncestor");function es(e,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const l=rw(e),u=l===((o=e.ownerDocument)==null?void 0:o.body),f=Cn(l);if(u){const d=jh(f);return n.concat(f,f.visualViewport||[],ps(l)?l:[],d&&r?es(d):[])}return n.concat(l,es(l,[],r))}a(es,"getOverflowAncestors");function jh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}a(jh,"getFrameElement");function iw(e){const n=Jn(e);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const l=br(e),u=l?e.offsetWidth:r,f=l?e.offsetHeight:o,d=vc(r)!==u||vc(o)!==f;return d&&(r=u,o=f),{width:r,height:o,$:d}}a(iw,"getCssDimensions");function Lm(e){return Zn(e)?e:e.contextElement}a(Lm,"unwrapElement");function ga(e){const n=Lm(e);if(!br(n))return gr(1);const r=n.getBoundingClientRect(),{width:o,height:l,$:u}=iw(n);let f=(u?vc(r.width):r.width)/o,d=(u?vc(r.height):r.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!d||!Number.isFinite(d))&&(d=1),{x:f,y:d}}a(ga,"getScale");const kD=gr(0);function ow(e){const n=Cn(e);return!Pm()||!n.visualViewport?kD:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}a(ow,"getVisualOffsets");function DD(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==Cn(e)?!1:n}a(DD,"shouldAddVisualOffsets");function uo(e,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const l=e.getBoundingClientRect(),u=Lm(e);let f=gr(1);n&&(o?Zn(o)&&(f=ga(o)):f=ga(e));const d=DD(u,r,o)?ow(u):gr(0);let p=(l.left+d.x)/f.x,h=(l.top+d.y)/f.y,m=l.width/f.x,g=l.height/f.y;if(u){const b=Cn(u),S=o&&Zn(o)?Cn(o):o;let E=b,w=jh(E);for(;w&&o&&S!==E;){const R=ga(w),T=w.getBoundingClientRect(),O=Jn(w),M=T.left+(w.clientLeft+parseFloat(O.paddingLeft))*R.x,L=T.top+(w.clientTop+parseFloat(O.paddingTop))*R.y;p*=R.x,h*=R.y,m*=R.x,g*=R.y,p+=M,h+=L,E=Cn(w),w=jh(E)}}return Sc({width:m,height:g,x:p,y:h})}a(uo,"getBoundingClientRect$1");function Yc(e,n){const r=Gc(e).scrollLeft;return n?n.left+r:uo(wr(e)).left+r}a(Yc,"getWindowScrollBarX");function aw(e,n){const r=e.getBoundingClientRect(),o=r.left+n.scrollLeft-Yc(e,r),l=r.top+n.scrollTop;return{x:o,y:l}}a(aw,"getHTMLOffset");function PD(e){let{elements:n,rect:r,offsetParent:o,strategy:l}=e;const u=l==="fixed",f=wr(o),d=n?Vc(n.floating):!1;if(o===f||d&&u)return r;let p={scrollLeft:0,scrollTop:0},h=gr(1);const m=gr(0),g=br(o);if((g||!g&&!u)&&((ka(o)!=="body"||ps(f))&&(p=Gc(o)),br(o))){const S=uo(o);h=ga(o),m.x=S.x+o.clientLeft,m.y=S.y+o.clientTop}const b=f&&!g&&!u?aw(f,p):gr(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-p.scrollLeft*h.x+m.x+b.x,y:r.y*h.y-p.scrollTop*h.y+m.y+b.y}}a(PD,"convertOffsetParentRelativeRectToViewportRelativeRect");function LD(e){return Array.from(e.getClientRects())}a(LD,"getClientRects");function zD(e){const n=wr(e),r=Gc(e),o=e.ownerDocument.body,l=wn(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),u=wn(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let f=-r.scrollLeft+Yc(e);const d=-r.scrollTop;return Jn(o).direction==="rtl"&&(f+=wn(n.clientWidth,o.clientWidth)-l),{width:l,height:u,x:f,y:d}}a(zD,"getDocumentRect");const b1=25;function jD(e,n){const r=Cn(e),o=wr(e),l=r.visualViewport;let u=o.clientWidth,f=o.clientHeight,d=0,p=0;if(l){u=l.width,f=l.height;const m=Pm();(!m||m&&n==="fixed")&&(d=l.offsetLeft,p=l.offsetTop)}const h=Yc(o);if(h<=0){const m=o.ownerDocument,g=m.body,b=getComputedStyle(g),S=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(o.clientWidth-g.clientWidth-S);E<=b1&&(u-=E)}else h<=b1&&(u+=h);return{width:u,height:f,x:d,y:p}}a(jD,"getViewportRect");const ID=new Set(["absolute","fixed"]);function BD(e,n){const r=uo(e,!0,n==="fixed"),o=r.top+e.clientTop,l=r.left+e.clientLeft,u=br(e)?ga(e):gr(1),f=e.clientWidth*u.x,d=e.clientHeight*u.y,p=l*u.x,h=o*u.y;return{width:f,height:d,x:p,y:h}}a(BD,"getInnerBoundingClientRect");function S1(e,n,r){let o;if(n==="viewport")o=jD(e,r);else if(n==="document")o=zD(wr(e));else if(Zn(n))o=BD(n,r);else{const l=ow(e);o={x:n.x-l.x,y:n.y-l.y,width:n.width,height:n.height}}return Sc(o)}a(S1,"getClientRectFromClippingAncestor");function lw(e,n){const r=Di(e);return r===n||!Zn(r)||wa(r)?!1:Jn(r).position==="fixed"||lw(r,n)}a(lw,"hasFixedPositionAncestor");function HD(e,n){const r=n.get(e);if(r)return r;let o=es(e,[],!1).filter(d=>Zn(d)&&ka(d)!=="body"),l=null;const u=Jn(e).position==="fixed";let f=u?Di(e):e;for(;Zn(f)&&!wa(f);){const d=Jn(f),p=Dm(f);!p&&d.position==="fixed"&&(l=null),(u?!p&&!l:!p&&d.position==="static"&&!!l&&ID.has(l.position)||ps(f)&&!p&&lw(e,f))?o=o.filter(m=>m!==f):l=d,f=Di(f)}return n.set(e,o),o}a(HD,"getClippingElementAncestors");function UD(e){let{element:n,boundary:r,rootBoundary:o,strategy:l}=e;const f=[...r==="clippingAncestors"?Vc(n)?[]:HD(n,this._c):[].concat(r),o],d=f[0],p=f.reduce((h,m)=>{const g=S1(n,m,l);return h.top=wn(g.top,h.top),h.right=ki(g.right,h.right),h.bottom=ki(g.bottom,h.bottom),h.left=wn(g.left,h.left),h},S1(n,d,l));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}a(UD,"getClippingRect");function FD(e){const{width:n,height:r}=iw(e);return{width:n,height:r}}a(FD,"getDimensions");function qD(e,n,r){const o=br(n),l=wr(n),u=r==="fixed",f=uo(e,!0,u,n);let d={scrollLeft:0,scrollTop:0};const p=gr(0);function h(){p.x=Yc(l)}if(a(h,"setLeftRTLScrollbarOffset"),o||!o&&!u)if((ka(n)!=="body"||ps(l))&&(d=Gc(n)),o){const S=uo(n,!0,u,n);p.x=S.x+n.clientLeft,p.y=S.y+n.clientTop}else l&&h();u&&!o&&l&&h();const m=l&&!o&&!u?aw(l,d):gr(0),g=f.left+d.scrollLeft-p.x-m.x,b=f.top+d.scrollTop-p.y-m.y;return{x:g,y:b,width:f.width,height:f.height}}a(qD,"getRectRelativeToOffsetParent");function Wp(e){return Jn(e).position==="static"}a(Wp,"isStaticPositioned");function x1(e,n){if(!br(e)||Jn(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return wr(e)===r&&(r=r.ownerDocument.body),r}a(x1,"getTrueOffsetParent");function sw(e,n){const r=Cn(e);if(Vc(e))return r;if(!br(e)){let l=Di(e);for(;l&&!wa(l);){if(Zn(l)&&!Wp(l))return l;l=Di(l)}return r}let o=x1(e,n);for(;o&&TD(o)&&Wp(o);)o=x1(o,n);return o&&wa(o)&&Wp(o)&&!Dm(o)?r:o||MD(e)||r}a(sw,"getOffsetParent$1");const $D=a(async function(e){const n=this.getOffsetParent||sw,r=this.getDimensions,o=await r(e.floating);return{reference:qD(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},"getElementRects");function VD(e){return Jn(e).direction==="rtl"}a(VD,"isRTL");const GD={convertOffsetParentRelativeRectToViewportRelativeRect:PD,getDocumentElement:wr,getClippingRect:UD,getOffsetParent:sw,getElementRects:$D,getClientRects:LD,getDimensions:FD,getScale:ga,isElement:Zn,isRTL:VD};function uw(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}a(uw,"rectsAreEqual");function YD(e,n){let r=null,o;const l=wr(e);function u(){var d;clearTimeout(o),(d=r)==null||d.disconnect(),r=null}a(u,"cleanup");function f(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),u();const h=e.getBoundingClientRect(),{left:m,top:g,width:b,height:S}=h;if(d||n(),!b||!S)return;const E=Ju(g),w=Ju(l.clientWidth-(m+b)),R=Ju(l.clientHeight-(g+S)),T=Ju(m),M={rootMargin:-E+"px "+-w+"px "+-R+"px "+-T+"px",threshold:wn(0,ki(1,p))||1};let L=!0;function B(D){const P=D[0].intersectionRatio;if(P!==p){if(!L)return f();P?f(!1,P):o=setTimeout(()=>{f(!1,1e-7)},1e3)}P===1&&!uw(h,e.getBoundingClientRect())&&f(),L=!1}a(B,"handleObserve");try{r=new IntersectionObserver(B,{...M,root:l.ownerDocument})}catch{r=new IntersectionObserver(B,M)}r.observe(e)}return a(f,"refresh"),f(!0),u}a(YD,"observeMove");function QD(e,n,r,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,h=Lm(e),m=l||u?[...h?es(h):[],...es(n)]:[];m.forEach(T=>{l&&T.addEventListener("scroll",r,{passive:!0}),u&&T.addEventListener("resize",r)});const g=h&&d?YD(h,r):null;let b=-1,S=null;f&&(S=new ResizeObserver(T=>{let[O]=T;O&&O.target===h&&S&&(S.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var M;(M=S)==null||M.observe(n)})),r()}),h&&!p&&S.observe(h),S.observe(n));let E,w=p?uo(e):null;p&&R();function R(){const T=uo(e);w&&!uw(w,T)&&r(),w=T,E=requestAnimationFrame(R)}return a(R,"frameLoop"),r(),()=>{var T;m.forEach(O=>{l&&O.removeEventListener("scroll",r),u&&O.removeEventListener("resize",r)}),g?.(),(T=S)==null||T.disconnect(),S=null,p&&cancelAnimationFrame(E)}}a(QD,"autoUpdate");const KD=bD,XD=SD,WD=yD,ZD=wD,JD=gD,w1=mD,eP=xD,tP=a((e,n,r)=>{const o=new Map,l={platform:GD,...r},u={...l.platform,_c:o};return hD(e,n,{...l,platform:u})},"computePosition");var nP=typeof document<"u",rP=a(function(){},"noop"),cc=nP?x.useLayoutEffect:rP;function xc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,o,l;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(o=r;o--!==0;)if(!xc(e[o],n[o]))return!1;return!0}if(l=Object.keys(e),r=l.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(n,l[o]))return!1;for(o=r;o--!==0;){const u=l[o];if(!(u==="_owner"&&e.$$typeof)&&!xc(e[u],n[u]))return!1}return!0}return e!==e&&n!==n}a(xc,"deepEqual");function cw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}a(cw,"getDPR");function E1(e,n){const r=cw(e);return Math.round(n*r)/r}a(E1,"roundByDPR");function Zp(e){const n=x.useRef(e);return cc(()=>{n.current=e}),n}a(Zp,"useLatestRef");function iP(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:l,elements:{reference:u,floating:f}={},transform:d=!0,whileElementsMounted:p,open:h}=e,[m,g]=x.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[b,S]=x.useState(o);xc(b,o)||S(o);const[E,w]=x.useState(null),[R,T]=x.useState(null),O=x.useCallback(ie=>{ie!==D.current&&(D.current=ie,w(ie))},[]),M=x.useCallback(ie=>{ie!==P.current&&(P.current=ie,T(ie))},[]),L=u||E,B=f||R,D=x.useRef(null),P=x.useRef(null),Y=x.useRef(m),K=p!=null,te=Zp(p),Z=Zp(l),ee=Zp(h),fe=x.useCallback(()=>{if(!D.current||!P.current)return;const ie={placement:n,strategy:r,middleware:b};Z.current&&(ie.platform=Z.current),tP(D.current,P.current,ie).then(se=>{const k={...se,isPositioned:ee.current!==!1};F.current&&!xc(Y.current,k)&&(Y.current=k,yr.flushSync(()=>{g(k)}))})},[b,n,r,Z,ee]);cc(()=>{h===!1&&Y.current.isPositioned&&(Y.current.isPositioned=!1,g(ie=>({...ie,isPositioned:!1})))},[h]);const F=x.useRef(!1);cc(()=>(F.current=!0,()=>{F.current=!1}),[]),cc(()=>{if(L&&(D.current=L),B&&(P.current=B),L&&B){if(te.current)return te.current(L,B,fe);fe()}},[L,B,fe,te,K]);const oe=x.useMemo(()=>({reference:D,floating:P,setReference:O,setFloating:M}),[O,M]),I=x.useMemo(()=>({reference:L,floating:B}),[L,B]),W=x.useMemo(()=>{const ie={position:r,left:0,top:0};if(!I.floating)return ie;const se=E1(I.floating,m.x),k=E1(I.floating,m.y);return d?{...ie,transform:"translate("+se+"px, "+k+"px)",...cw(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:se,top:k}},[r,d,I.floating,m.x,m.y]);return x.useMemo(()=>({...m,update:fe,refs:oe,elements:I,floatingStyles:W}),[m,fe,oe,I,W])}a(iP,"useFloating");const oP=a(e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return a(n,"isRef"),{name:"arrow",options:e,fn(r){const{element:o,padding:l}=typeof e=="function"?e(r):e;return o&&n(o)?o.current!=null?w1({element:o.current,padding:l}).fn(r):{}:o?w1({element:o,padding:l}).fn(r):{}}}},"arrow$1"),aP=a((e,n)=>({...KD(e),options:[e,n]}),"offset$1"),lP=a((e,n)=>({...XD(e),options:[e,n]}),"shift$1"),sP=a((e,n)=>({...eP(e),options:[e,n]}),"limitShift"),uP=a((e,n)=>({...WD(e),options:[e,n]}),"flip$1"),cP=a((e,n)=>({...ZD(e),options:[e,n]}),"size"),fP=a((e,n)=>({...JD(e),options:[e,n]}),"hide$1"),dP=a((e,n)=>({...oP(e),options:[e,n]}),"arrow$2");var pP="Arrow",fw=x.forwardRef((e,n)=>{const{children:r,width:o=10,height:l=5,...u}=e;return N.jsx(Te.svg,{...u,ref:n,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:N.jsx("polygon",{points:"0,0 30,0 15,10"})})});fw.displayName=pP;var hP=fw;function dw(e){const[n,r]=x.useState(void 0);return wt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const u=l[0];let f,d;if("borderBoxSize"in u){const p=u.borderBoxSize,h=Array.isArray(p)?p[0]:p;f=h.inlineSize,d=h.blockSize}else f=e.offsetWidth,d=e.offsetHeight;r({width:f,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),n}a(dw,"useSize");var zm="Popper",[pw,Da]=Wt(zm),[mP,hw]=pw(zm),mw=a(e=>{const{__scopePopper:n,children:r}=e,[o,l]=x.useState(null);return N.jsx(mP,{scope:n,anchor:o,onAnchorChange:l,children:r})},"Popper$1");mw.displayName=zm;var yw="PopperAnchor",gw=x.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...l}=e,u=hw(yw,r),f=x.useRef(null),d=ze(n,f),p=x.useRef(null);return x.useEffect(()=>{const h=p.current;p.current=o?.current||f.current,h!==p.current&&u.onAnchorChange(p.current)}),o?null:N.jsx(Te.div,{...l,ref:d})});gw.displayName=yw;var jm="PopperContent",[yP,gP]=pw(jm),vw=x.forwardRef((e,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:l=0,align:u="center",alignOffset:f=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:E,...w}=e,R=hw(jm,r),[T,O]=x.useState(null),M=ze(n,V=>O(V)),[L,B]=x.useState(null),D=dw(L),P=D?.width??0,Y=D?.height??0,K=o+(u!=="center"?"-"+u:""),te=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Z=Array.isArray(h)?h:[h],ee=Z.length>0,fe={padding:te,boundary:Z.filter(bP),altBoundary:ee},{refs:F,floatingStyles:oe,placement:I,isPositioned:W,middlewareData:ie}=iP({strategy:"fixed",placement:K,whileElementsMounted:a((...V)=>QD(...V,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:R.anchor},middleware:[aP({mainAxis:l+Y,alignmentAxis:f}),p&&lP({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?sP():void 0,...fe}),p&&uP({...fe}),cP({...fe,apply:a(({elements:V,rects:pe,availableWidth:be,availableHeight:Re})=>{const{width:ke,height:Ue}=pe.reference,Be=V.floating.style;Be.setProperty("--radix-popper-available-width",`${be}px`),Be.setProperty("--radix-popper-available-height",`${Re}px`),Be.setProperty("--radix-popper-anchor-width",`${ke}px`),Be.setProperty("--radix-popper-anchor-height",`${Ue}px`)},"apply")}),L&&dP({element:L,padding:d}),SP({arrowWidth:P,arrowHeight:Y}),b&&fP({strategy:"referenceHidden",...fe})]}),[se,k]=xw(I),z=xt(E);wt(()=>{W&&z?.()},[W,z]);const Q=ie.arrow?.x,A=ie.arrow?.y,J=ie.arrow?.centerOffset!==0,[de,ce]=x.useState();return wt(()=>{T&&ce(window.getComputedStyle(T).zIndex)},[T]),N.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:W?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(" "),...ie.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:N.jsx(yP,{scope:r,placedSide:se,onArrowChange:B,arrowX:Q,arrowY:A,shouldHideArrow:J,children:N.jsx(Te.div,{"data-side":se,"data-align":k,...w,ref:M,style:{...w.style,animation:W?void 0:"none"}})})})});vw.displayName=jm;var bw="PopperArrow",vP={top:"bottom",right:"left",bottom:"top",left:"right"},Sw=x.forwardRef(a(function(n,r){const{__scopePopper:o,...l}=n,u=gP(bw,o),f=vP[u.placedSide];return N.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:N.jsx(hP,{...l,ref:r,style:{...l.style,display:"block"}})})},"PopperArrow2"));Sw.displayName=bw;function bP(e){return e!==null}a(bP,"isNotNull");var SP=a(e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:o,middlewareData:l}=n,f=l.arrow?.centerOffset!==0,d=f?0:e.arrowWidth,p=f?0:e.arrowHeight,[h,m]=xw(r),g={start:"0%",center:"50%",end:"100%"}[m],b=(l.arrow?.x??0)+d/2,S=(l.arrow?.y??0)+p/2;let E="",w="";return h==="bottom"?(E=f?g:`${b}px`,w=`${-p}px`):h==="top"?(E=f?g:`${b}px`,w=`${o.floating.height+p}px`):h==="right"?(E=`${-p}px`,w=f?g:`${S}px`):h==="left"&&(E=`${o.floating.width+p}px`,w=f?g:`${S}px`),{data:{x:E,y:w}}}}),"transformOrigin");function xw(e){const[n,r="center"]=e.split("-");return[n,r]}a(xw,"getSideAndAlignFromPlacement");var Im=mw,Bm=gw,Hm=vw,Um=Sw,ww=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),xP="VisuallyHidden",Qc=x.forwardRef((e,n)=>N.jsx(Te.span,{...e,ref:n,style:{...ww,...e.style}}));Qc.displayName=xP;var wP=Qc,[Kc]=Wt("Tooltip",[Da]),Xc=Da(),Ew="TooltipProvider",EP=700,Ih="tooltip.open",[CP,Fm]=Kc(Ew),Cw=a(e=>{const{__scopeTooltip:n,delayDuration:r=EP,skipDelayDuration:o=300,disableHoverableContent:l=!1,children:u}=e,f=x.useRef(!0),d=x.useRef(!1),p=x.useRef(0);return x.useEffect(()=>{const h=p.current;return()=>window.clearTimeout(h)},[]),N.jsx(CP,{scope:n,isOpenDelayedRef:f,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(p.current),f.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>f.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:x.useCallback(h=>{d.current=h},[]),disableHoverableContent:l,children:u})},"TooltipProvider");Cw.displayName=Ew;var ts="Tooltip",[TP,hs]=Kc(ts),Tw=a(e=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:l,onOpenChange:u,disableHoverableContent:f,delayDuration:d}=e,p=Fm(ts,e.__scopeTooltip),h=Xc(n),[m,g]=x.useState(null),b=Bn(),S=x.useRef(0),E=f??p.disableHoverableContent,w=d??p.delayDuration,R=x.useRef(!1),[T,O]=vr({prop:o,defaultProp:l??!1,onChange:a(P=>{P?(p.onOpen(),document.dispatchEvent(new CustomEvent(Ih))):p.onClose(),u?.(P)},"onChange"),caller:ts}),M=x.useMemo(()=>T?R.current?"delayed-open":"instant-open":"closed",[T]),L=x.useCallback(()=>{window.clearTimeout(S.current),S.current=0,R.current=!1,O(!0)},[O]),B=x.useCallback(()=>{window.clearTimeout(S.current),S.current=0,O(!1)},[O]),D=x.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{R.current=!0,O(!0),S.current=0},w)},[w,O]);return x.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),N.jsx(Im,{...h,children:N.jsx(TP,{scope:n,contentId:b,open:T,stateAttribute:M,trigger:m,onTriggerChange:g,onTriggerEnter:x.useCallback(()=>{p.isOpenDelayedRef.current?D():L()},[p.isOpenDelayedRef,D,L]),onTriggerLeave:x.useCallback(()=>{E?B():(window.clearTimeout(S.current),S.current=0)},[B,E]),onOpen:L,onClose:B,disableHoverableContent:E,children:r})})},"Tooltip");Tw.displayName=ts;var Bh="TooltipTrigger",Rw=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,l=hs(Bh,r),u=Fm(Bh,r),f=Xc(r),d=x.useRef(null),p=ze(n,d,l.onTriggerChange),h=x.useRef(!1),m=x.useRef(!1),g=x.useCallback(()=>h.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),N.jsx(Bm,{asChild:!0,...f,children:N.jsx(Te.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:p,onPointerMove:ye(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!u.isPointerInTransitRef.current&&(l.onTriggerEnter(),m.current=!0)}),onPointerLeave:ye(e.onPointerLeave,()=>{l.onTriggerLeave(),m.current=!1}),onPointerDown:ye(e.onPointerDown,()=>{l.open&&l.onClose(),h.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:ye(e.onFocus,()=>{h.current||l.onOpen()}),onBlur:ye(e.onBlur,l.onClose),onClick:ye(e.onClick,l.onClose)})})});Rw.displayName=Bh;var qm="TooltipPortal",[RP,OP]=Kc(qm,{forceMount:void 0}),Ow=a(e=>{const{__scopeTooltip:n,forceMount:r,children:o,container:l}=e,u=hs(qm,n);return N.jsx(RP,{scope:n,forceMount:r,children:N.jsx(Ht,{present:r||u.open,children:N.jsx(Ma,{asChild:!0,container:l,children:o})})})},"TooltipPortal");Ow.displayName=qm;var Ea="TooltipContent",Aw=x.forwardRef((e,n)=>{const r=OP(Ea,e.__scopeTooltip),{forceMount:o=r.forceMount,side:l="top",...u}=e,f=hs(Ea,e.__scopeTooltip);return N.jsx(Ht,{present:o||f.open,children:f.disableHoverableContent?N.jsx(_w,{side:l,...u,ref:n}):N.jsx(AP,{side:l,...u,ref:n})})}),AP=x.forwardRef((e,n)=>{const r=hs(Ea,e.__scopeTooltip),o=Fm(Ea,e.__scopeTooltip),l=x.useRef(null),u=ze(n,l),[f,d]=x.useState(null),{trigger:p,onClose:h}=r,m=l.current,{onPointerInTransitChange:g}=o,b=x.useCallback(()=>{d(null),g(!1)},[g]),S=x.useCallback((E,w)=>{const R=E.currentTarget,T={x:E.clientX,y:E.clientY},O=DP(T,R.getBoundingClientRect()),M=PP(T,O),L=LP(w.getBoundingClientRect()),B=jP([...M,...L]);d(B),g(!0)},[g]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(p&&m){const E=a(R=>S(R,m),"handleTriggerLeave"),w=a(R=>S(R,p),"handleContentLeave");return p.addEventListener("pointerleave",E),m.addEventListener("pointerleave",w),()=>{p.removeEventListener("pointerleave",E),m.removeEventListener("pointerleave",w)}}},[p,m,S,b]),x.useEffect(()=>{if(f){const E=a(w=>{const R=w.target,T={x:w.clientX,y:w.clientY},O=p?.contains(R)||m?.contains(R),M=!zP(T,f);O?b():M&&(b(),h())},"handleTrackPointerGrace");return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[p,m,f,h,b]),N.jsx(_w,{...e,ref:u})}),[_P,MP]=Kc(ts,{isInside:!1}),NP=xx("TooltipContent"),_w=x.forwardRef((e,n)=>{const{__scopeTooltip:r,children:o,"aria-label":l,onEscapeKeyDown:u,onPointerDownOutside:f,...d}=e,p=hs(Ea,r),h=Xc(r),{onClose:m}=p;return x.useEffect(()=>(document.addEventListener(Ih,m),()=>document.removeEventListener(Ih,m)),[m]),x.useEffect(()=>{if(p.trigger){const g=a(b=>{b.target?.contains(p.trigger)&&m()},"handleScroll");return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[p.trigger,m]),N.jsx(_a,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:a(g=>g.preventDefault(),"onFocusOutside"),onDismiss:m,children:N.jsxs(Hm,{"data-state":p.stateAttribute,...h,...d,ref:n,style:{...d.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:[N.jsx(NP,{children:o}),N.jsx(_P,{scope:r,isInside:!0,children:N.jsx(wP,{id:p.contentId,role:"tooltip",children:l||o})})]})})});Aw.displayName=Ea;var Mw="TooltipArrow",kP=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,l=Xc(r);return MP(Mw,r).isInside?null:N.jsx(Um,{...l,...o,ref:n})});kP.displayName=Mw;function DP(e,n){const r=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),l=Math.abs(n.right-e.x),u=Math.abs(n.left-e.x);switch(Math.min(r,o,l,u)){case u:return"left";case l:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}a(DP,"getExitSideFromRect");function PP(e,n,r=5){const o=[];switch(n){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}a(PP,"getPaddedExitPoints");function LP(e){const{top:n,right:r,bottom:o,left:l}=e;return[{x:l,y:n},{x:r,y:n},{x:r,y:o},{x:l,y:o}]}a(LP,"getPointsFromRect");function zP(e,n){const{x:r,y:o}=e;let l=!1;for(let u=0,f=n.length-1;u<n.length;f=u++){const d=n[u],p=n[f],h=d.x,m=d.y,g=p.x,b=p.y;m>o!=b>o&&r<(g-h)*(o-m)/(b-m)+h&&(l=!l)}return l}a(zP,"isPointInPolygon$1");function jP(e){const n=e.slice();return n.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),IP(n)}a(jP,"getHull");function IP(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o<e.length;o++){const l=e[o];for(;n.length>=2;){const u=n[n.length-1],f=n[n.length-2];if((u.x-f.x)*(l.y-f.y)>=(u.y-f.y)*(l.x-f.x))n.pop();else break}n.push(l)}n.pop();const r=[];for(let o=e.length-1;o>=0;o--){const l=e[o];for(;r.length>=2;){const u=r[r.length-1],f=r[r.length-2];if((u.x-f.x)*(l.y-f.y)>=(u.y-f.y)*(l.x-f.x))r.pop();else break}r.push(l)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}a(IP,"getHullPresorted");var MU=Cw,NU=Tw,kU=Rw,DU=Ow,PU=Aw,go=class{static{a(this,"Subscribable")}constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},BP={setTimeout:a((e,n)=>setTimeout(e,n),"setTimeout"),clearTimeout:a(e=>clearTimeout(e),"clearTimeout"),setInterval:a((e,n)=>setInterval(e,n),"setInterval"),clearInterval:a(e=>clearInterval(e),"clearInterval")},HP=class{static{a(this,"TimeoutManager")}#t=BP;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,n){return this.#t.setTimeout(e,n)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,n){return this.#t.setInterval(e,n)}clearInterval(e){this.#t.clearInterval(e)}},io=new HP;function UP(e){setTimeout(e,0)}a(UP,"systemSetTimeoutZero");var co=typeof window>"u"||"Deno"in globalThis;function qt(){}a(qt,"noop$2");function FP(e,n){return typeof e=="function"?e(n):e}a(FP,"functionalUpdate");function Hh(e){return typeof e=="number"&&e>=0&&e!==1/0}a(Hh,"isValidTimeout");function Nw(e,n){return Math.max(e+(n||0)-Date.now(),0)}a(Nw,"timeUntilStale");function Ni(e,n){return typeof e=="function"?e(n):e}a(Ni,"resolveStaleTime");function zn(e,n){return typeof e=="function"?e(n):e}a(zn,"resolveEnabled");function C1(e,n){const{type:r="all",exact:o,fetchStatus:l,predicate:u,queryKey:f,stale:d}=e;if(f){if(o){if(n.queryHash!==$m(f,n.options))return!1}else if(!ns(n.queryKey,f))return!1}if(r!=="all"){const p=n.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||l&&l!==n.state.fetchStatus||u&&!u(n))}a(C1,"matchQuery");function T1(e,n){const{exact:r,status:o,predicate:l,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(r){if(fo(n.options.mutationKey)!==fo(u))return!1}else if(!ns(n.options.mutationKey,u))return!1}return!(o&&n.state.status!==o||l&&!l(n))}a(T1,"matchMutation");function $m(e,n){return(n?.queryKeyHashFn||fo)(e)}a($m,"hashQueryKeyByOptions");function fo(e){return JSON.stringify(e,(n,r)=>Uh(r)?Object.keys(r).sort().reduce((o,l)=>(o[l]=r[l],o),{}):r)}a(fo,"hashKey");function ns(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>ns(e[r],n[r])):!1}a(ns,"partialMatchKey");var qP=Object.prototype.hasOwnProperty;function Vm(e,n){if(e===n)return e;const r=R1(e)&&R1(n);if(!r&&!(Uh(e)&&Uh(n)))return n;const l=(r?e:Object.keys(e)).length,u=r?n:Object.keys(n),f=u.length,d=r?new Array(f):{};let p=0;for(let h=0;h<f;h++){const m=r?h:u[h],g=e[m],b=n[m];if(g===b){d[m]=g,(r?h<l:qP.call(e,m))&&p++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){d[m]=b;continue}const S=Vm(g,b);d[m]=S,S===g&&p++}return l===f&&p===l?e:d}a(Vm,"replaceEqualDeep");function rs(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}a(rs,"shallowEqualObjects");function R1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}a(R1,"isPlainArray");function Uh(e){if(!O1(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!O1(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}a(Uh,"isPlainObject$1");function O1(e){return Object.prototype.toString.call(e)==="[object Object]"}a(O1,"hasObjectPrototype");function $P(e){return new Promise(n=>{io.setTimeout(n,e)})}a($P,"sleep");function Fh(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?Vm(e,n):n}a(Fh,"replaceData");function VP(e,n,r=0){const o=[...e,n];return r&&o.length>r?o.slice(1):o}a(VP,"addToEnd");function GP(e,n,r=0){const o=[n,...e];return r&&o.length>r?o.slice(0,-1):o}a(GP,"addToStart");var Gm=Symbol();function kw(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Gm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}a(kw,"ensureQueryFn");function Dw(e,n){return typeof e=="function"?e(...n):!!e}a(Dw,"shouldThrowError");var YP=class extends go{static{a(this,"FocusManager")}#t;#e;#n;constructor(){super(),this.#n=e=>{if(!co&&window.addEventListener){const n=a(()=>e(),"listener");return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Ym=new YP;function qh(){let e,n;const r=new Promise((l,u)=>{e=l,n=u});r.status="pending",r.catch(()=>{});function o(l){Object.assign(r,l),delete r.resolve,delete r.reject}return a(o,"finalize"),r.resolve=l=>{o({status:"fulfilled",value:l}),e(l)},r.reject=l=>{o({status:"rejected",reason:l}),n(l)},r}a(qh,"pendingThenable");var QP=UP;function KP(){let e=[],n=0,r=a(d=>{d()},"notifyFn"),o=a(d=>{d()},"batchNotifyFn"),l=QP;const u=a(d=>{n?e.push(d):l(()=>{r(d)})},"schedule"),f=a(()=>{const d=e;e=[],d.length&&l(()=>{o(()=>{d.forEach(p=>{r(p)})})})},"flush");return{batch:a(d=>{let p;n++;try{p=d()}finally{n--,n||f()}return p},"batch"),batchCalls:a(d=>(...p)=>{u(()=>{d(...p)})},"batchCalls"),schedule:u,setNotifyFunction:a(d=>{r=d},"setNotifyFunction"),setBatchNotifyFunction:a(d=>{o=d},"setBatchNotifyFunction"),setScheduler:a(d=>{l=d},"setScheduler")}}a(KP,"createNotifyManager");var St=KP(),XP=class extends go{static{a(this,"OnlineManager")}#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(!co&&window.addEventListener){const n=a(()=>e(!0),"onlineListener"),r=a(()=>e(!1),"offlineListener");return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#t}},wc=new XP;function WP(e){return Math.min(1e3*2**e,3e4)}a(WP,"defaultRetryDelay");function Pw(e){return(e??"online")==="online"?wc.isOnline():!0}a(Pw,"canFetch");var $h=class extends Error{static{a(this,"CancelledError")}constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Lw(e){let n=!1,r=0,o;const l=qh(),u=a(()=>l.status!=="pending","isResolved"),f=a(w=>{if(!u()){const R=new $h(w);b(R),e.onCancel?.(R)}},"cancel"),d=a(()=>{n=!0},"cancelRetry"),p=a(()=>{n=!1},"continueRetry"),h=a(()=>Ym.isFocused()&&(e.networkMode==="always"||wc.isOnline())&&e.canRun(),"canContinue"),m=a(()=>Pw(e.networkMode)&&e.canRun(),"canStart"),g=a(w=>{u()||(o?.(),l.resolve(w))},"resolve"),b=a(w=>{u()||(o?.(),l.reject(w))},"reject"),S=a(()=>new Promise(w=>{o=a(R=>{(u()||h())&&w(R)},"continueFn"),e.onPause?.()}).then(()=>{o=void 0,u()||e.onContinue?.()}),"pause"),E=a(()=>{if(u())return;let w;const R=r===0?e.initialPromise:void 0;try{w=R??e.fn()}catch(T){w=Promise.reject(T)}Promise.resolve(w).then(g).catch(T=>{if(u())return;const O=e.retry??(co?0:3),M=e.retryDelay??WP,L=typeof M=="function"?M(r,T):M,B=O===!0||typeof O=="number"&&r<O||typeof O=="function"&&O(r,T);if(n||!B){b(T);return}r++,e.onFail?.(r,T),$P(L).then(()=>h()?void 0:S()).then(()=>{n?b(T):E()})})},"run");return{promise:l,status:a(()=>l.status,"status"),cancel:f,continue:a(()=>(o?.(),l),"continue"),cancelRetry:d,continueRetry:p,canStart:m,start:a(()=>(m()?E():S().then(E),l),"start")}}a(Lw,"createRetryer");var zw=class{static{a(this,"Removable")}#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hh(this.gcTime)&&(this.#t=io.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(co?1/0:300*1e3))}clearGcTimeout(){this.#t&&(io.clearTimeout(this.#t),this.#t=void 0)}},ZP=class extends zw{static{a(this,"Query")}#t;#e;#n;#i;#r;#o;#l;constructor(e){super(),this.#l=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=A1(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=A1(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),this.#t=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=Fh(this.state.data,e,this.options);return this.#a({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#a({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(qt).catch(qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>zn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ni(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Nw(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=a(d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:a(()=>(this.#l=!0,r.signal),"get")})},"addSignalProperty"),l=a(()=>{const d=kw(this.options,n),h=a(()=>{const m={client:this.#i,queryKey:this.queryKey,meta:this.meta};return o(m),m},"createQueryFnContext")();return this.#l=!1,this.options.persister?this.options.persister(d,h,this):d(h)},"fetchFn"),f=a(()=>{const d={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return o(d),d},"createFetchContext")();this.options.behavior?.onFetch(f,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==f.fetchOptions?.meta)&&this.#a({type:"fetch",meta:f.fetchOptions?.meta}),this.#r=Lw({initialPromise:n?.initialPromise,fn:f.fetchFn,onCancel:a(d=>{d instanceof $h&&d.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},"onCancel"),onFail:a((d,p)=>{this.#a({type:"failed",failureCount:d,error:p})},"onFail"),onPause:a(()=>{this.#a({type:"pause"})},"onPause"),onContinue:a(()=>{this.#a({type:"continue"})},"onContinue"),retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:a(()=>!0,"canRun")});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof $h){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#a({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#a(e){const n=a(r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...jw(r.data,this.options),fetchMeta:e.meta??null};case"success":const o={...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?o:void 0,o;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}},"reducer");this.state=n(this.state),St.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function jw(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pw(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}a(jw,"fetchState");function A1(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,o=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}a(A1,"getDefaultState$1");var Qm=class extends go{static{a(this,"QueryObserver")}constructor(e,n){super(),this.options=n,this.#t=e,this.#a=null,this.#l=qh(),this.bindMethods(),this.setOptions(n)}#t;#e=void 0;#n=void 0;#i=void 0;#r;#o;#l;#a;#p;#f;#d;#u;#c;#s;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),_1(this.#e,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Vh(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Vh(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#x(),this.#e.removeObserver(this)}setOptions(e){const n=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof zn(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),n._defaulted&&!rs(this.options,n)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const o=this.hasListeners();o&&M1(this.#e,r,this.options,n)&&this.#h(),this.updateResult(),o&&(this.#e!==r||zn(this.options.enabled,this.#e)!==zn(n.enabled,this.#e)||Ni(this.options.staleTime,this.#e)!==Ni(n.staleTime,this.#e))&&this.#y();const l=this.#g();o&&(this.#e!==r||zn(this.options.enabled,this.#e)!==zn(n.enabled,this.#e)||l!==this.#s)&&this.#v(l)}getOptimisticResult(e){const n=this.#t.getQueryCache().build(this.#t,e),r=this.createResult(n,e);return e3(this,r)&&(this.#i=r,this.#o=this.options,this.#r=this.#e.state),r}getCurrentResult(){return this.#i}trackResult(e,n){return new Proxy(e,{get:a((r,o)=>(this.trackProp(o),n?.(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o)),"get")})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#t.defaultQueryOptions(e),r=this.#t.getQueryCache().build(this.#t,n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#h(e){this.#w();let n=this.#e.fetch(this.options,e);return e?.throwOnError||(n=n.catch(qt)),n}#y(){this.#S();const e=Ni(this.options.staleTime,this.#e);if(co||this.#i.isStale||!Hh(e))return;const r=Nw(this.#i.dataUpdatedAt,e)+1;this.#u=io.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#s=e,!(co||zn(this.options.enabled,this.#e)===!1||!Hh(this.#s)||this.#s===0)&&(this.#c=io.setInterval(()=>{(this.options.refetchIntervalInBackground||Ym.isFocused())&&this.#h()},this.#s))}#b(){this.#y(),this.#v(this.#g())}#S(){this.#u&&(io.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#c&&(io.clearInterval(this.#c),this.#c=void 0)}createResult(e,n){const r=this.#e,o=this.options,l=this.#i,u=this.#r,f=this.#o,p=e!==r?e.state:this.#n,{state:h}=e;let m={...h},g=!1,b;if(n._optimisticResults){const Y=this.hasListeners(),K=!Y&&_1(e,n),te=Y&&M1(e,r,n,o);(K||te)&&(m={...m,...jw(h.data,e.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:S,errorUpdatedAt:E,status:w}=m;b=m.data;let R=!1;if(n.placeholderData!==void 0&&b===void 0&&w==="pending"){let Y;l?.isPlaceholderData&&n.placeholderData===f?.placeholderData?(Y=l.data,R=!0):Y=typeof n.placeholderData=="function"?n.placeholderData(this.#d?.state.data,this.#d):n.placeholderData,Y!==void 0&&(w="success",b=Fh(l?.data,Y,n),g=!0)}if(n.select&&b!==void 0&&!R)if(l&&b===u?.data&&n.select===this.#p)b=this.#f;else try{this.#p=n.select,b=n.select(b),b=Fh(l?.data,b,n),this.#f=b,this.#a=null}catch(Y){this.#a=Y}this.#a&&(S=this.#a,b=this.#f,E=Date.now(),w="error");const T=m.fetchStatus==="fetching",O=w==="pending",M=w==="error",L=O&&T,B=b!==void 0,P={status:w,fetchStatus:m.fetchStatus,isPending:O,isSuccess:w==="success",isError:M,isInitialLoading:L,isLoading:L,data:b,dataUpdatedAt:m.dataUpdatedAt,error:S,errorUpdatedAt:E,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>p.dataUpdateCount||m.errorUpdateCount>p.errorUpdateCount,isFetching:T,isRefetching:T&&!O,isLoadingError:M&&!B,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:M&&B,isStale:Km(e,n),refetch:this.refetch,promise:this.#l,isEnabled:zn(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const Y=a(Z=>{P.status==="error"?Z.reject(P.error):P.data!==void 0&&Z.resolve(P.data)},"finalizeThenableIfPossible"),K=a(()=>{const Z=this.#l=P.promise=qh();Y(Z)},"recreateThenable"),te=this.#l;switch(te.status){case"pending":e.queryHash===r.queryHash&&Y(te);break;case"fulfilled":(P.status==="error"||P.data!==te.value)&&K();break;case"rejected":(P.status!=="error"||P.error!==te.reason)&&K();break}}return P}updateResult(){const e=this.#i,n=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#o=this.options,this.#r.data!==void 0&&(this.#d=this.#e),rs(n,e))return;this.#i=n;const r=a(()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!this.#m.size)return!0;const u=new Set(l??this.#m);return this.options.throwOnError&&u.add("error"),Object.keys(this.#i).some(f=>{const d=f;return this.#i[d]!==e[d]&&u.has(d)})},"shouldNotifyListeners");this.#E({listeners:r()})}#w(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const n=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(e){St.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function JP(e,n){return zn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}a(JP,"shouldLoadOnMount");function _1(e,n){return JP(e,n)||e.state.data!==void 0&&Vh(e,n,n.refetchOnMount)}a(_1,"shouldFetchOnMount");function Vh(e,n,r){if(zn(n.enabled,e)!==!1&&Ni(n.staleTime,e)!=="static"){const o=typeof r=="function"?r(e):r;return o==="always"||o!==!1&&Km(e,n)}return!1}a(Vh,"shouldFetchOn");function M1(e,n,r,o){return(e!==n||zn(o.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Km(e,r)}a(M1,"shouldFetchOptionally");function Km(e,n){return zn(n.enabled,e)!==!1&&e.isStaleByTime(Ni(n.staleTime,e))}a(Km,"isStale");function e3(e,n){return!rs(e.getCurrentResult(),n)}a(e3,"shouldAssignObserverCurrentProperties");function N1(e){return{onFetch:a((n,r)=>{const o=n.options,l=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],f=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const h=a(async()=>{let m=!1;const g=a(E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:a(()=>(n.signal.aborted?m=!0:n.signal.addEventListener("abort",()=>{m=!0}),n.signal),"get")})},"addSignalProperty"),b=kw(n.options,n.fetchOptions),S=a(async(E,w,R)=>{if(m)return Promise.reject();if(w==null&&E.pages.length)return Promise.resolve(E);const O=a(()=>{const D={client:n.client,queryKey:n.queryKey,pageParam:w,direction:R?"backward":"forward",meta:n.options.meta};return g(D),D},"createQueryFnContext")(),M=await b(O),{maxPages:L}=n.options,B=R?GP:VP;return{pages:B(E.pages,M,L),pageParams:B(E.pageParams,w,L)}},"fetchPage");if(l&&u.length){const E=l==="backward",w=E?t3:k1,R={pages:u,pageParams:f},T=w(o,R);d=await S(R,T,E)}else{const E=e??u.length;do{const w=p===0?f[0]??o.initialPageParam:k1(o,d);if(p>0&&w==null)break;d=await S(d,w),p++}while(p<E)}return d},"fetchFn");n.options.persister?n.fetchFn=()=>n.options.persister?.(h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=h},"onFetch")}}a(N1,"infiniteQueryBehavior");function k1(e,{pages:n,pageParams:r}){const o=n.length-1;return n.length>0?e.getNextPageParam(n[o],n,r[o],r):void 0}a(k1,"getNextPageParam");function t3(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}a(t3,"getPreviousPageParam");var n3=class extends zw{static{a(this,"Mutation")}#t;#e;#n;#i;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#e=[],this.state=e.state||Iw(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(n=>n!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const n=a(()=>{this.#r({type:"continue"})},"onContinue"),r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=Lw({fn:a(()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),"fn"),onFail:a((u,f)=>{this.#r({type:"failed",failureCount:u,error:f})},"onFail"),onPause:a(()=>{this.#r({type:"pause"})},"onPause"),onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:a(()=>this.#n.canRun(this),"canRun")});const o=this.state.status==="pending",l=!this.#i.canStart();try{if(o)n();else{this.#r({type:"pending",variables:e,isPaused:l}),await this.#n.config.onMutate?.(e,this,r);const f=await this.options.onMutate?.(e,r);f!==this.state.context&&this.#r({type:"pending",context:f,variables:e,isPaused:l})}const u=await this.#i.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,r),await this.options.onSuccess?.(u,e,this.state.context,r),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(u,null,e,this.state.context,r),this.#r({type:"success",data:u}),u}catch(u){try{throw await this.#n.config.onError?.(u,e,this.state.context,this,r),await this.options.onError?.(u,e,this.state.context,r),await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,u,e,this.state.context,r),u}finally{this.#r({type:"error",error:u})}}finally{this.#n.runNext(this)}}#r(e){const n=a(r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}},"reducer");this.state=n(this.state),St.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Iw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}a(Iw,"getDefaultState");var r3=class extends go{static{a(this,"MutationCache")}constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,n,r){const o=new n3({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(o),o}add(e){this.#t.add(e);const n=ec(e);if(typeof n=="string"){const r=this.#e.get(n);r?r.push(e):this.#e.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const n=ec(e);if(typeof n=="string"){const r=this.#e.get(n);if(r)if(r.length>1){const o=r.indexOf(e);o!==-1&&r.splice(o,1)}else r[0]===e&&this.#e.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=ec(e);if(typeof n=="string"){const o=this.#e.get(n)?.find(l=>l.state.status==="pending");return!o||o===e}else return!0}runNext(e){const n=ec(e);return typeof n=="string"?this.#e.get(n)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){St.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const n={exact:!0,...e};return this.getAll().find(r=>T1(n,r))}findAll(e={}){return this.getAll().filter(n=>T1(e,n))}notify(e){St.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return St.batch(()=>Promise.all(e.map(n=>n.continue().catch(qt))))}};function ec(e){return e.options.scope?.id}a(ec,"scopeFor");var i3=class extends go{static{a(this,"MutationObserver")}#t;#e=void 0;#n;#i;constructor(n,r){super(),this.#t=n,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const r=this.options;this.options=this.#t.defaultMutationOptions(n),rs(this.options,r)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&fo(r.mutationKey)!==fo(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#r(),this.#o(n)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(n,r){return this.#i=r,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(n)}#r(){const n=this.#n?.state??Iw();this.#e={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#o(n){St.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#e.variables,o=this.#e.context,l={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};n?.type==="success"?(this.#i.onSuccess?.(n.data,r,o,l),this.#i.onSettled?.(n.data,null,r,o,l)):n?.type==="error"&&(this.#i.onError?.(n.error,r,o,l),this.#i.onSettled?.(void 0,n.error,r,o,l))}this.listeners.forEach(r=>{r(this.#e)})})}};function D1(e,n){const r=new Set(n);return e.filter(o=>!r.has(o))}a(D1,"difference");function o3(e,n,r){const o=e.slice(0);return o[n]=r,o}a(o3,"replaceAt");var a3=class extends go{static{a(this,"QueriesObserver")}#t;#e;#n;#i;#r;#o;#l;#a;#p=[];constructor(e,n,r){super(),this.#t=e,this.#i=r,this.#n=[],this.#r=[],this.#e=[],this.setQueries(n)}onSubscribe(){this.listeners.size===1&&this.#r.forEach(e=>{e.subscribe(n=>{this.#c(e,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,n){this.#n=e,this.#i=n,St.batch(()=>{const r=this.#r,o=this.#u(this.#n);this.#p=o,o.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const l=o.map(m=>m.observer),u=l.map(m=>m.getCurrentResult()),f=r.length!==l.length,d=l.some((m,g)=>m!==r[g]),p=f||d,h=p?!0:u.some((m,g)=>{const b=this.#e[g];return!b||!rs(m,b)});!p&&!h||(p&&(this.#r=l),this.#e=u,this.hasListeners()&&(p&&(D1(r,l).forEach(m=>{m.destroy()}),D1(l,r).forEach(m=>{m.subscribe(g=>{this.#c(m,g)})})),this.#s()))})}getCurrentResult(){return this.#e}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,n){const r=this.#u(e),o=r.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions));return[o,l=>this.#d(l??o,n),()=>this.#f(o,r)]}#f(e,n){return n.map((r,o)=>{const l=e[o];return r.defaultedQueryOptions.notifyOnChangeProps?l:r.observer.trackResult(l,u=>{n.forEach(f=>{f.observer.trackProp(u)})})})}#d(e,n){return n?((!this.#o||this.#e!==this.#a||n!==this.#l)&&(this.#l=n,this.#a=this.#e,this.#o=Vm(this.#o,n(e))),this.#o):e}#u(e){const n=new Map(this.#r.map(o=>[o.options.queryHash,o])),r=[];return e.forEach(o=>{const l=this.#t.defaultQueryOptions(o),u=n.get(l.queryHash);u?r.push({defaultedQueryOptions:l,observer:u}):r.push({defaultedQueryOptions:l,observer:new Qm(this.#t,l)})}),r}#c(e,n){const r=this.#r.indexOf(e);r!==-1&&(this.#e=o3(this.#e,r,n),this.#s())}#s(){if(this.hasListeners()){const e=this.#o,n=this.#f(this.#e,this.#p),r=this.#d(n,this.#i?.combine);e!==r&&St.batch(()=>{this.listeners.forEach(o=>{o(this.#e)})})}}},l3=class extends go{static{a(this,"QueryCache")}constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,n,r){const o=n.queryKey,l=n.queryHash??$m(o,n);let u=this.get(l);return u||(u=new ZP({client:e,queryKey:o,queryHash:l,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#t.get(e.queryHash);n&&(e.destroy(),n===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){St.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>C1(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>C1(e,r)):n}notify(e){St.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){St.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){St.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},zU=class{static{a(this,"QueryClient")}#t;#e;#n;#i;#r;#o;#l;#a;constructor(e={}){this.#t=e.queryCache||new l3,this.#e=e.mutationCache||new r3,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#l=Ym.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#a=wc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#l?.(),this.#l=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#t.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#t.build(this,n),o=r.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ni(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(e,n,r){const o=this.defaultQueryOptions({queryKey:e}),u=this.#t.get(o.queryHash)?.state.data,f=FP(n,u);if(f!==void 0)return this.#t.build(this,o).setData(f,{...r,manual:!0})}setQueriesData(e,n,r){return St.batch(()=>this.#t.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#t.get(n.queryHash)?.state}removeQueries(e){const n=this.#t;St.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#t;return St.batch(()=>(r.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},o=St.batch(()=>this.#t.findAll(e).map(l=>l.cancel(r)));return Promise.all(o).then(qt).catch(qt)}invalidateQueries(e,n={}){return St.batch(()=>(this.#t.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},o=St.batch(()=>this.#t.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,r);return r.throwOnError||(u=u.catch(qt)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(qt)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#t.build(this,n);return r.isStaleByTime(Ni(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qt).catch(qt)}fetchInfiniteQuery(e){return e.behavior=N1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qt).catch(qt)}ensureInfiniteQueryData(e){return e.behavior=N1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return wc.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#i.set(fo(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#i.values()],r={};return n.forEach(o=>{ns(e,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(e,n){this.#r.set(fo(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(o=>{ns(e,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=$m(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Gm&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},Bw=x.createContext(void 0),Xm=a(e=>{const n=x.useContext(Bw);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},"useQueryClient"),jU=a(({client:e,children:n})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),N.jsx(Bw.Provider,{value:e,children:n})),"QueryClientProvider"),Hw=x.createContext(!1),Uw=a(()=>x.useContext(Hw),"useIsRestoring");Hw.Provider;function s3(){let e=!1;return{clearReset:a(()=>{e=!1},"clearReset"),reset:a(()=>{e=!0},"reset"),isReset:a(()=>e,"isReset")}}a(s3,"createValue");var u3=x.createContext(s3()),Fw=a(()=>x.useContext(u3),"useQueryErrorResetBoundary"),qw=a((e,n)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(n.isReset()||(e.retryOnMount=!1))},"ensurePreventErrorBoundaryRetry"),$w=a(e=>{x.useEffect(()=>{e.clearReset()},[e])},"useClearResetErrorBoundary"),Vw=a(({result:e,errorResetBoundary:n,throwOnError:r,query:o,suspense:l})=>e.isError&&!n.isReset()&&!e.isFetching&&o&&(l&&e.data===void 0||Dw(r,[e.error,o])),"getHasError"),Gw=a(e=>{if(e.suspense){const r=a(l=>l==="static"?l:Math.max(l??1e3,1e3),"clamp"),o=e.staleTime;e.staleTime=typeof o=="function"?(...l)=>r(o(...l)):r(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},"ensureSuspenseTimers"),Yw=a((e,n)=>e.isLoading&&e.isFetching&&!n,"willFetch"),Gh=a((e,n)=>e?.suspense&&n.isPending,"shouldSuspend"),Ec=a((e,n,r)=>n.fetchOptimistic(e).catch(()=>{r.clearReset()}),"fetchOptimistic");function IU({queries:e,...n},r){const o=Xm(),l=Uw(),u=Fw(),f=x.useMemo(()=>e.map(w=>{const R=o.defaultQueryOptions(w);return R._optimisticResults=l?"isRestoring":"optimistic",R}),[e,o,l]);f.forEach(w=>{Gw(w),qw(w,u)}),$w(u);const[d]=x.useState(()=>new a3(o,f,n)),[p,h,m]=d.getOptimisticResult(f,n.combine),g=!l&&n.subscribed!==!1;x.useSyncExternalStore(x.useCallback(w=>g?d.subscribe(St.batchCalls(w)):qt,[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),x.useEffect(()=>{d.setQueries(f,n)},[f,n,d]);const S=p.some((w,R)=>Gh(f[R],w))?p.flatMap((w,R)=>{const T=f[R];if(T){const O=new Qm(o,T);if(Gh(T,w))return Ec(T,O,u);Yw(w,l)&&Ec(T,O,u)}return[]}):[];if(S.length>0)throw Promise.all(S);const E=p.find((w,R)=>{const T=f[R];return T&&Vw({result:w,errorResetBoundary:u,throwOnError:T.throwOnError,query:o.getQueryCache().get(T.queryHash),suspense:T.suspense})});if(E?.error)throw E.error;return h(m())}a(IU,"useQueries");function c3(e,n,r){const o=Uw(),l=Fw(),u=Xm(),f=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(f),f._optimisticResults=o?"isRestoring":"optimistic",Gw(f),qw(f,l),$w(l);const d=!u.getQueryCache().get(f.queryHash),[p]=x.useState(()=>new n(u,f)),h=p.getOptimisticResult(f),m=!o&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(g=>{const b=m?p.subscribe(St.batchCalls(g)):qt;return p.updateResult(),b},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),x.useEffect(()=>{p.setOptions(f)},[f,p]),Gh(f,h))throw Ec(f,p,l);if(Vw({result:h,errorResetBoundary:l,throwOnError:f.throwOnError,query:u.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw h.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(f,h),f.experimental_prefetchInRender&&!co&&Yw(h,o)&&(d?Ec(f,p,l):u.getQueryCache().get(f.queryHash)?.promise)?.catch(qt).finally(()=>{p.updateResult()}),f.notifyOnChangeProps?h:p.trackResult(h)}a(c3,"useBaseQuery");function BU(e,n){return c3(e,Qm)}a(BU,"useQuery");function HU(e,n){const r=Xm(),[o]=x.useState(()=>new i3(r,e));x.useEffect(()=>{o.setOptions(e)},[o,e]);const l=x.useSyncExternalStore(x.useCallback(f=>o.subscribe(St.batchCalls(f)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=x.useCallback((f,d)=>{o.mutate(f,d).catch(qt)},[o]);if(l.error&&Dw(o.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:u,mutateAsync:l.mutate}}a(HU,"useMutation");/**
524
524
  * react-router v7.9.4
525
525
  *
526
526
  * Copyright (c) Remix Software Inc.
@@ -603,9 +603,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
603
603
  `}),m.type==="element"&&m.tagName==="p"&&!l?f.push(...m.children):f.push(m)}const p=o[o.length-1];p&&(l||p.type!=="element"||p.tagName!=="p")&&f.push({type:"text",value:`
604
604
  `});const h={type:"element",tagName:"li",properties:u,children:f};return e.patch(n,h),e.applyData(n,h)}a(e7,"listItem");function t7(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const r=e.children;let o=-1;for(;!n&&++o<r.length;)n=zR(r[o])}return n}a(t7,"listLoose");function zR(e){const n=e.spread;return n??e.children.length>1}a(zR,"listItemLoose");function n7(e,n){const r={},o=e.all(n);let l=-1;for(typeof n.start=="number"&&n.start!==1&&(r.start=n.start);++l<o.length;){const f=o[l];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const u={type:"element",tagName:n.ordered?"ol":"ul",properties:r,children:e.wrap(o,!0)};return e.patch(n,u),e.applyData(n,u)}a(n7,"list");function r7(e,n){const r={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}a(r7,"paragraph");function i7(e,n){const r={type:"root",children:e.wrap(e.all(n))};return e.patch(n,r),e.applyData(n,r)}a(i7,"root");function o7(e,n){const r={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}a(o7,"strong");function a7(e,n){const r=e.all(n),o=r.shift(),l=[];if(o){const f={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(n.children[0],f),l.push(f)}if(r.length>0){const f={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},d=Ay(n.children[1]),p=yR(n.children[n.children.length-1]);d&&p&&(f.position={start:d,end:p}),l.push(f)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(n,u),e.applyData(n,u)}a(a7,"table");function l7(e,n,r){const o=r?r.children:void 0,u=(o?o.indexOf(n):1)===0?"th":"td",f=r&&r.type==="table"?r.align:void 0,d=f?f.length:n.children.length;let p=-1;const h=[];for(;++p<d;){const g=n.children[p],b={},S=f?f[p]:void 0;S&&(b.align=S);let E={type:"element",tagName:u,properties:b,children:[]};g&&(E.children=e.all(g),e.patch(g,E),E=e.applyData(g,E)),h.push(E)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,m),e.applyData(n,m)}a(l7,"tableRow");function s7(e,n){const r={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}a(s7,"tableCell");const QS=9,KS=32;function u7(e){const n=String(e),r=/\r?\n|\r/g;let o=r.exec(n),l=0;const u=[];for(;o;)u.push(XS(n.slice(l,o.index),l>0,!0),o[0]),l=o.index+o[0].length,o=r.exec(n);return u.push(XS(n.slice(l),l>0,!1)),u.join("")}a(u7,"trimLines");function XS(e,n,r){let o=0,l=e.length;if(n){let u=e.codePointAt(o);for(;u===QS||u===KS;)o++,u=e.codePointAt(o)}if(r){let u=e.codePointAt(l-1);for(;u===QS||u===KS;)l--,u=e.codePointAt(l-1)}return l>o?e.slice(o,l):""}a(XS,"trimLine");function c7(e,n){const r={type:"text",value:u7(String(n.value))};return e.patch(n,r),e.applyData(n,r)}a(c7,"text");function f7(e,n){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,r),e.applyData(n,r)}a(f7,"thematicBreak");const d7={blockquote:U8,break:F8,code:q8,delete:$8,emphasis:V8,footnoteReference:G8,heading:Y8,html:Q8,imageReference:K8,image:X8,inlineCode:W8,linkReference:Z8,link:J8,listItem:e7,list:n7,paragraph:r7,root:i7,strong:o7,table:a7,tableCell:s7,tableRow:l7,text:c7,thematicBreak:f7,toml:ic,yaml:ic,definition:ic,footnoteDefinition:ic};function ic(){}a(ic,"ignore");const jR=-1,yf=0,Pc=1,Lc=2,Ly=3,zy=4,jy=5,Iy=6,IR=7,BR=8,WS=typeof self=="object"?self:globalThis,p7=a((e,n)=>{const r=a((l,u)=>(e.set(u,l),l),"as"),o=a(l=>{if(e.has(l))return e.get(l);const[u,f]=n[l];switch(u){case yf:case jR:return r(f,l);case Pc:{const d=r([],l);for(const p of f)d.push(o(p));return d}case Lc:{const d=r({},l);for(const[p,h]of f)d[o(p)]=o(h);return d}case Ly:return r(new Date(f),l);case zy:{const{source:d,flags:p}=f;return r(new RegExp(d,p),l)}case jy:{const d=r(new Map,l);for(const[p,h]of f)d.set(o(p),o(h));return d}case Iy:{const d=r(new Set,l);for(const p of f)d.add(o(p));return d}case IR:{const{name:d,message:p}=f;return r(new WS[d](p),l)}case BR:return r(BigInt(f),l);case"BigInt":return r(Object(BigInt(f)),l)}return r(new WS[u](f),l)},"unpair");return o},"deserializer"),ZS=a(e=>p7(new Map,e)(0),"deserialize"),da="",{toString:h7}={},{keys:m7}=Object,Vl=a(e=>{const n=typeof e;if(n!=="object"||!e)return[yf,n];const r=h7.call(e).slice(8,-1);switch(r){case"Array":return[Pc,da];case"Object":return[Lc,da];case"Date":return[Ly,da];case"RegExp":return[zy,da];case"Map":return[jy,da];case"Set":return[Iy,da]}return r.includes("Array")?[Pc,r]:r.includes("Error")?[IR,r]:[Lc,r]},"typeOf"),oc=a(([e,n])=>e===yf&&(n==="function"||n==="symbol"),"shouldSkip"),y7=a((e,n,r,o)=>{const l=a((f,d)=>{const p=o.push(f)-1;return r.set(d,p),p},"as"),u=a(f=>{if(r.has(f))return r.get(f);let[d,p]=Vl(f);switch(d){case yf:{let m=f;switch(p){case"bigint":d=BR,m=f.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);m=null;break;case"undefined":return l([jR],f)}return l([d,m],f)}case Pc:{if(p)return l([p,[...f]],f);const m=[],g=l([d,m],f);for(const b of f)m.push(u(b));return g}case Lc:{if(p)switch(p){case"BigInt":return l([p,f.toString()],f);case"Boolean":case"Number":case"String":return l([p,f.valueOf()],f)}if(n&&"toJSON"in f)return u(f.toJSON());const m=[],g=l([d,m],f);for(const b of m7(f))(e||!oc(Vl(f[b])))&&m.push([u(b),u(f[b])]);return g}case Ly:return l([d,f.toISOString()],f);case zy:{const{source:m,flags:g}=f;return l([d,{source:m,flags:g}],f)}case jy:{const m=[],g=l([d,m],f);for(const[b,S]of f)(e||!(oc(Vl(b))||oc(Vl(S))))&&m.push([u(b),u(S)]);return g}case Iy:{const m=[],g=l([d,m],f);for(const b of f)(e||!oc(Vl(b)))&&m.push(u(b));return g}}const{message:h}=f;return l([d,{name:p,message:h}],f)},"pair");return u},"serializer"),JS=a((e,{json:n,lossy:r}={})=>{const o=[];return y7(!(n||r),!!n,new Map,o)(e),o},"serialize"),zc=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?ZS(JS(e,n)):structuredClone(e):(e,n)=>ZS(JS(e,n));function g7(e,n){const r=[{type:"text",value:"↩"}];return n>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),r}a(g7,"defaultFootnoteBackContent");function v7(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}a(v7,"defaultFootnoteBackLabel");function b7(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||g7,o=e.options.footnoteBackLabel||v7,l=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",f=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const m=e.all(h),g=String(h.identifier).toUpperCase(),b=Ua(g.toLowerCase());let S=0;const E=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++S<=w;){E.length>0&&E.push({type:"text",value:" "});let O=typeof r=="string"?r:r(p,S);typeof O=="string"&&(O={type:"text",value:O}),E.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+b+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(p,S),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const R=m[m.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const O=R.children[R.children.length-1];O&&O.type==="text"?O.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...E)}else m.push(...E);const T={type:"element",tagName:"li",properties:{id:n+"fn-"+b},children:e.wrap(m,!0)};e.patch(h,T),d.push(T)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...zc(f),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
605
605
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
606
- `}]}}a(b7,"footer");const HR=a((function(e){if(e==null)return E7;if(typeof e=="function")return gf(e);if(typeof e=="object")return Array.isArray(e)?S7(e):x7(e);if(typeof e=="string")return w7(e);throw new Error("Expected function, string, or object as test")}),"convert");function S7(e){const n=[];let r=-1;for(;++r<e.length;)n[r]=HR(e[r]);return gf(o);function o(...l){let u=-1;for(;++u<n.length;)if(n[u].apply(this,l))return!0;return!1}}a(S7,"anyFactory");function x7(e){const n=e;return gf(r);function r(o){const l=o;let u;for(u in e)if(l[u]!==n[u])return!1;return!0}}a(x7,"propsFactory");function w7(e){return gf(n);function n(r){return r&&r.type===e}}a(w7,"typeFactory");function gf(e){return n;function n(r,o,l){return!!(C7(r)&&e.call(this,r,typeof o=="number"?o:void 0,l||void 0))}}a(gf,"castFactory");function E7(){return!0}a(E7,"ok");function C7(e){return e!==null&&typeof e=="object"&&"type"in e}a(C7,"looksLikeANode");const UR=[],T7=!0,ex=!1,R7="skip";function O7(e,n,r,o){let l;typeof n=="function"&&typeof r!="function"?(o=r,r=n):l=n;const u=HR(l),f=o?-1:1;d(e,void 0,[])();function d(p,h,m){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const S=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(S?"<"+S+">":""))+")"})}return b;function b(){let S=UR,E,w,R;if((!n||u(p,h,m[m.length-1]||void 0))&&(S=A7(r(p,m)),S[0]===ex))return S;if("children"in p&&p.children){const T=p;if(T.children&&S[0]!==R7)for(w=(o?T.children.length:-1)+f,R=m.concat(T);w>-1&&w<T.children.length;){const O=T.children[w];if(E=d(O,w,R)(),E[0]===ex)return E;w=typeof E[1]=="number"?E[1]:w+f}}return S}}a(d,"factory")}a(O7,"visitParents");function A7(e){return Array.isArray(e)?e:typeof e=="number"?[T7,e]:e==null?UR:[e]}a(A7,"toResult");function FR(e,n,r,o){let l,u,f;typeof n=="function"&&typeof r!="function"?(u=void 0,f=n,l=r):(u=n,f=r,l=o),O7(e,u,d,l);function d(p,h){const m=h[h.length-1],g=m?m.children.indexOf(p):void 0;return f(p,g,m)}a(d,"overload")}a(FR,"visit");const bm={}.hasOwnProperty,_7={};function M7(e,n){const r=n||_7,o=new Map,l=new Map,u=new Map,f={...d7,...r.handlers},d={all:h,applyData:k7,definitionById:o,footnoteById:l,footnoteCounts:u,footnoteOrder:[],handlers:f,one:p,options:r,patch:N7,wrap:P7};return FR(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const g=m.type==="definition"?o:l,b=String(m.identifier).toUpperCase();g.has(b)||g.set(b,m)}}),d;function p(m,g){const b=m.type,S=d.handlers[b];if(bm.call(d.handlers,b)&&S)return S(d,m,g);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in m){const{children:w,...R}=m,T=zc(R);return T.children=d.all(m),T}return zc(m)}return(d.options.unknownHandler||D7)(d,m,g)}a(p,"one");function h(m){const g=[];if("children"in m){const b=m.children;let S=-1;for(;++S<b.length;){const E=d.one(b[S],m);if(E){if(S&&b[S-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=tx(E.value)),!Array.isArray(E)&&E.type==="element")){const w=E.children[0];w&&w.type==="text"&&(w.value=tx(w.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}a(h,"all")}a(M7,"createState");function N7(e,n){e.position&&(n.position=hI(e))}a(N7,"patch");function k7(e,n){let r=n;if(e&&e.data){const o=e.data.hName,l=e.data.hChildren,u=e.data.hProperties;if(typeof o=="string")if(r.type==="element")r.tagName=o;else{const f="children"in r?r.children:[r];r={type:"element",tagName:o,properties:{},children:f}}r.type==="element"&&u&&Object.assign(r.properties,zc(u)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}a(k7,"applyData");function D7(e,n){const r=n.data||{},o="value"in n&&!(bm.call(r,"hProperties")||bm.call(r,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}a(D7,"defaultUnknownHandler");function P7(e,n){const r=[];let o=-1;for(n&&r.push({type:"text",value:`
606
+ `}]}}a(b7,"footer");const HR=a((function(e){if(e==null)return E7;if(typeof e=="function")return gf(e);if(typeof e=="object")return Array.isArray(e)?S7(e):x7(e);if(typeof e=="string")return w7(e);throw new Error("Expected function, string, or object as test")}),"convert");function S7(e){const n=[];let r=-1;for(;++r<e.length;)n[r]=HR(e[r]);return gf(o);function o(...l){let u=-1;for(;++u<n.length;)if(n[u].apply(this,l))return!0;return!1}}a(S7,"anyFactory");function x7(e){const n=e;return gf(r);function r(o){const l=o;let u;for(u in e)if(l[u]!==n[u])return!1;return!0}}a(x7,"propertiesFactory");function w7(e){return gf(n);function n(r){return r&&r.type===e}}a(w7,"typeFactory");function gf(e){return n;function n(r,o,l){return!!(C7(r)&&e.call(this,r,typeof o=="number"?o:void 0,l||void 0))}}a(gf,"castFactory");function E7(){return!0}a(E7,"ok");function C7(e){return e!==null&&typeof e=="object"&&"type"in e}a(C7,"looksLikeANode");const UR=[],T7=!0,ex=!1,R7="skip";function O7(e,n,r,o){let l;typeof n=="function"&&typeof r!="function"?(o=r,r=n):l=n;const u=HR(l),f=o?-1:1;d(e,void 0,[])();function d(p,h,m){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const S=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(S?"<"+S+">":""))+")"})}return b;function b(){let S=UR,E,w,R;if((!n||u(p,h,m[m.length-1]||void 0))&&(S=A7(r(p,m)),S[0]===ex))return S;if("children"in p&&p.children){const T=p;if(T.children&&S[0]!==R7)for(w=(o?T.children.length:-1)+f,R=m.concat(T);w>-1&&w<T.children.length;){const O=T.children[w];if(E=d(O,w,R)(),E[0]===ex)return E;w=typeof E[1]=="number"?E[1]:w+f}}return S}}a(d,"factory")}a(O7,"visitParents");function A7(e){return Array.isArray(e)?e:typeof e=="number"?[T7,e]:e==null?UR:[e]}a(A7,"toResult");function FR(e,n,r,o){let l,u,f;typeof n=="function"&&typeof r!="function"?(u=void 0,f=n,l=r):(u=n,f=r,l=o),O7(e,u,d,l);function d(p,h){const m=h[h.length-1],g=m?m.children.indexOf(p):void 0;return f(p,g,m)}a(d,"overload")}a(FR,"visit");const bm={}.hasOwnProperty,_7={};function M7(e,n){const r=n||_7,o=new Map,l=new Map,u=new Map,f={...d7,...r.handlers},d={all:h,applyData:k7,definitionById:o,footnoteById:l,footnoteCounts:u,footnoteOrder:[],handlers:f,one:p,options:r,patch:N7,wrap:P7};return FR(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const g=m.type==="definition"?o:l,b=String(m.identifier).toUpperCase();g.has(b)||g.set(b,m)}}),d;function p(m,g){const b=m.type,S=d.handlers[b];if(bm.call(d.handlers,b)&&S)return S(d,m,g);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in m){const{children:w,...R}=m,T=zc(R);return T.children=d.all(m),T}return zc(m)}return(d.options.unknownHandler||D7)(d,m,g)}a(p,"one");function h(m){const g=[];if("children"in m){const b=m.children;let S=-1;for(;++S<b.length;){const E=d.one(b[S],m);if(E){if(S&&b[S-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=tx(E.value)),!Array.isArray(E)&&E.type==="element")){const w=E.children[0];w&&w.type==="text"&&(w.value=tx(w.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}a(h,"all")}a(M7,"createState");function N7(e,n){e.position&&(n.position=hI(e))}a(N7,"patch");function k7(e,n){let r=n;if(e&&e.data){const o=e.data.hName,l=e.data.hChildren,u=e.data.hProperties;if(typeof o=="string")if(r.type==="element")r.tagName=o;else{const f="children"in r?r.children:[r];r={type:"element",tagName:o,properties:{},children:f}}r.type==="element"&&u&&Object.assign(r.properties,zc(u)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}a(k7,"applyData");function D7(e,n){const r=n.data||{},o="value"in n&&!(bm.call(r,"hProperties")||bm.call(r,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}a(D7,"defaultUnknownHandler");function P7(e,n){const r=[];let o=-1;for(n&&r.push({type:"text",value:`
607
607
  `});++o<e.length;)o&&r.push({type:"text",value:`
608
608
  `}),r.push(e[o]);return n&&e.length>0&&r.push({type:"text",value:`
609
609
  `}),r}a(P7,"wrap$1");function tx(e){let n=0,r=e.charCodeAt(n);for(;r===9||r===32;)n++,r=e.charCodeAt(n);return e.slice(n)}a(tx,"trimMarkdownSpaceStart");function nx(e,n){const r=M7(e,n),o=r.one(e,void 0),l=b7(r),u=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return l&&u.children.push({type:"text",value:`
610
610
  `},l),u}a(nx,"toHast");function L7(e,n){return e&&"run"in e?async function(r,o){const l=nx(r,{file:o,...n});await e.run(l,o)}:function(r,o){return nx(r,{file:o,...e||n})}}a(L7,"remarkRehype");function rx(e){if(e)throw e}a(rx,"bail");var bh,ix;function z7(){if(ix)return bh;ix=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=a(function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},"isArray"),u=a(function(h){if(!h||n.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!g)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},"isPlainObject"),f=a(function(h,m){r&&m.name==="__proto__"?r(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},"setProperty"),d=a(function(h,m){if(m==="__proto__")if(e.call(h,m)){if(o)return o(h,m).value}else return;return h[m]},"getProperty");return bh=a(function p(){var h,m,g,b,S,E,w=arguments[0],R=1,T=arguments.length,O=!1;for(typeof w=="boolean"&&(O=w,w=arguments[1]||{},R=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});R<T;++R)if(h=arguments[R],h!=null)for(m in h)g=d(w,m),b=d(h,m),w!==b&&(O&&b&&(u(b)||(S=l(b)))?(S?(S=!1,E=g&&l(g)?g:[]):E=g&&u(g)?g:{},f(w,{name:m,newValue:p(O,E,b)})):typeof b<"u"&&f(w,{name:m,newValue:b}));return w},"extend"),bh}a(z7,"requireExtend");var j7=z7();const Sh=xr(j7);function Sm(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}a(Sm,"isPlainObject");function I7(){const e=[],n={run:r,use:o};return n;function r(...l){let u=-1;const f=l.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);d(null,...l);function d(p,...h){const m=e[++u];let g=-1;if(p){f(p);return}for(;++g<l.length;)(h[g]===null||h[g]===void 0)&&(h[g]=l[g]);l=h,m?B7(m,d)(...h):f(null,...h)}a(d,"next")}function o(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),n}}a(I7,"trough");function B7(e,n){let r;return o;function o(...f){const d=e.length>f.length;let p;d&&f.push(l);try{p=e.apply(this,f)}catch(h){const m=h;if(d&&r)throw m;return l(m)}d||(p&&p.then&&typeof p.then=="function"?p.then(u,l):p instanceof Error?l(p):u(p))}function l(f,...d){r||(r=!0,n(f,...d))}function u(f){l(null,f)}}a(B7,"wrap");const sr={basename:H7,dirname:U7,extname:F7,join:q7,sep:"/"};function H7(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ns(e);let r=0,o=-1,l=e.length,u;if(n===void 0||n.length===0||n.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(u){r=l+1;break}}else o<0&&(u=!0,o=l+1);return o<0?"":e.slice(r,o)}if(n===e)return"";let f=-1,d=n.length-1;for(;l--;)if(e.codePointAt(l)===47){if(u){r=l+1;break}}else f<0&&(u=!0,f=l+1),d>-1&&(e.codePointAt(l)===n.codePointAt(d--)?d<0&&(o=l):(d=-1,o=f));return r===o?o=f:o<0&&(o=e.length),e.slice(r,o)}a(H7,"basename");function U7(e){if(Ns(e),e.length===0)return".";let n=-1,r=e.length,o;for(;--r;)if(e.codePointAt(r)===47){if(o){n=r;break}}else o||(o=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}a(U7,"dirname");function F7(e){Ns(e);let n=e.length,r=-1,o=0,l=-1,u=0,f;for(;n--;){const d=e.codePointAt(n);if(d===47){if(f){o=n+1;break}continue}r<0&&(f=!0,r=n+1),d===46?l<0?l=n:u!==1&&(u=1):l>-1&&(u=-1)}return l<0||r<0||u===0||u===1&&l===r-1&&l===o+1?"":e.slice(l,r)}a(F7,"extname");function q7(...e){let n=-1,r;for(;++n<e.length;)Ns(e[n]),e[n]&&(r=r===void 0?e[n]:r+"/"+e[n]);return r===void 0?".":$7(r)}a(q7,"join");function $7(e){Ns(e);const n=e.codePointAt(0)===47;let r=V7(e,!n);return r.length===0&&!n&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),n?"/"+r:r}a($7,"normalize");function V7(e,n){let r="",o=0,l=-1,u=0,f=-1,d,p;for(;++f<=e.length;){if(f<e.length)d=e.codePointAt(f);else{if(d===47)break;d=47}if(d===47){if(!(l===f-1||u===1))if(l!==f-1&&u===2){if(r.length<2||o!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(p=r.lastIndexOf("/"),p!==r.length-1){p<0?(r="",o=0):(r=r.slice(0,p),o=r.length-1-r.lastIndexOf("/")),l=f,u=0;continue}}else if(r.length>0){r="",o=0,l=f,u=0;continue}}n&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(l+1,f):r=e.slice(l+1,f),o=f-l-1;l=f,u=0}else d===46&&u>-1?u++:u=-1}return r}a(V7,"normalizeString");function Ns(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}a(Ns,"assertPath$1");const G7={cwd:Y7};function Y7(){return"/"}a(Y7,"cwd");function xm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}a(xm,"isUrl");function Q7(e){if(typeof e=="string")e=new URL(e);else if(!xm(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return K7(e)}a(Q7,"urlToPath");function K7(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const n=e.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const o=n.codePointAt(r+2);if(o===70||o===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(n)}a(K7,"getPathFromURLPosix");const xh=["history","path","basename","stem","extname","dirname"];class qR{static{a(this,"VFile")}constructor(n){let r;n?xm(n)?r={path:n}:typeof n=="string"||X7(n)?r={value:n}:r=n:r={},this.cwd="cwd"in r?"":G7.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<xh.length;){const u=xh[o];u in r&&r[u]!==void 0&&r[u]!==null&&(this[u]=u==="history"?[...r[u]]:r[u])}let l;for(l in r)xh.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?sr.basename(this.path):void 0}set basename(n){Eh(n,"basename"),wh(n,"basename"),this.path=sr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?sr.dirname(this.path):void 0}set dirname(n){ox(this.basename,"dirname"),this.path=sr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?sr.extname(this.path):void 0}set extname(n){if(wh(n,"extname"),ox(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=sr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){xm(n)&&(n=Q7(n)),Eh(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?sr.basename(this.path,this.extname):void 0}set stem(n){Eh(n,"stem"),wh(n,"stem"),this.path=sr.join(this.dirname||"",n+(this.extname||""))}fail(n,r,o){const l=this.message(n,r,o);throw l.fatal=!0,l}info(n,r,o){const l=this.message(n,r,o);return l.fatal=void 0,l}message(n,r,o){const l=new Vt(n,r,o);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function wh(e,n){if(e&&e.includes(sr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+sr.sep+"`")}a(wh,"assertPart");function Eh(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}a(Eh,"assertNonEmpty");function ox(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}a(ox,"assertPath");function X7(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}a(X7,"isUint8Array$1");const W7=a((function(e){const o=this.constructor.prototype,l=o[e],u=a(function(){return l.apply(u,arguments)},"apply");return Object.setPrototypeOf(u,o),u}),"CallableInstance"),Z7={}.hasOwnProperty;class By extends W7{static{a(this,"Processor")}constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=I7()}copy(){const n=new By;let r=-1;for(;++r<this.attachers.length;){const o=this.attachers[r];n.use(...o)}return n.data(Sh(!0,{},this.namespace)),n}data(n,r){return typeof n=="string"?arguments.length===2?(Rh("data",this.frozen),this.namespace[n]=r,this):Z7.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Rh("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const l=r.call(n,...o);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const r=ac(n),o=this.parser||this.Parser;return Ch("parse",o),o(String(r),r)}process(n,r){const o=this;return this.freeze(),Ch("process",this.parser||this.Parser),Th("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(u,f){const d=ac(n),p=o.parse(d);o.run(p,d,function(m,g,b){if(m||!g||!b)return h(m);const S=g,E=o.stringify(S,b);tB(E)?b.value=E:b.result=E,h(m,b)});function h(m,g){m||!g?f(m):u?u(g):r(void 0,g)}a(h,"realDone")}a(l,"executor")}processSync(n){let r=!1,o;return this.freeze(),Ch("processSync",this.parser||this.Parser),Th("processSync",this.compiler||this.Compiler),this.process(n,l),lx("processSync","process",r),o;function l(u,f){r=!0,rx(u),o=f}a(l,"realDone")}run(n,r,o){ax(n),this.freeze();const l=this.transformers;return!o&&typeof r=="function"&&(o=r,r=void 0),o?u(void 0,o):new Promise(u);function u(f,d){const p=ac(r);l.run(n,p,h);function h(m,g,b){const S=g||n;m?d(m):f?f(S):o(void 0,S,b)}a(h,"realDone")}a(u,"executor")}runSync(n,r){let o=!1,l;return this.run(n,r,u),lx("runSync","run",o),l;function u(f,d){rx(f),l=d,o=!0}a(u,"realDone")}stringify(n,r){this.freeze();const o=ac(r),l=this.compiler||this.Compiler;return Th("stringify",l),ax(n),l(n,o)}use(n,...r){const o=this.attachers,l=this.namespace;if(Rh("use",this.frozen),n!=null)if(typeof n=="function")p(n,r);else if(typeof n=="object")Array.isArray(n)?d(n):f(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function u(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...g]=h;p(m,g)}else f(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function f(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(l.settings=Sh(!0,l.settings,h.settings))}function d(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const g=h[m];u(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,m){let g=-1,b=-1;for(;++g<o.length;)if(o[g][0]===h){b=g;break}if(b===-1)o.push([h,...m]);else if(m.length>0){let[S,...E]=m;const w=o[b][1];Sm(w)&&Sm(S)&&(S=Sh(!0,w,S)),o[b]=[h,S,...E]}}}}const J7=new By().freeze();function Ch(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}a(Ch,"assertParser");function Th(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}a(Th,"assertCompiler");function Rh(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}a(Rh,"assertUnfrozen");function ax(e){if(!Sm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}a(ax,"assertNode");function lx(e,n,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}a(lx,"assertDone");function ac(e){return eB(e)?e:new qR(e)}a(ac,"vfile");function eB(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}a(eB,"looksLikeAVFile");function tB(e){return typeof e=="string"||nB(e)}a(tB,"looksLikeAValue");function nB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}a(nB,"isUint8Array");const rB="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sx=[],ux={allowDangerousHtml:!0},iB=/^(https?|ircs?|mailto|xmpp)$/i,oB=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function FF(e){const n=aB(e),r=lB(e);return sB(n.runSync(n.parse(r),r),e)}a(FF,"Markdown");function aB(e){const n=e.rehypePlugins||sx,r=e.remarkPlugins||sx,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ux}:ux;return J7().use(H8).use(r).use(L7,o).use(n)}a(aB,"createProcessor");function lB(e){const n=e.children||"",r=new qR;return typeof n=="string"&&(r.value=n),r}a(lB,"createFile");function sB(e,n){const r=n.allowedElements,o=n.allowElement,l=n.components,u=n.disallowedElements,f=n.skipHtml,d=n.unwrapDisallowed,p=n.urlTransform||uB;for(const m of oB)Object.hasOwn(n,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+rB+m.id,void 0);return FR(e,h),bI(e,{Fragment:N.Fragment,components:l,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function h(m,g,b){if(m.type==="raw"&&b&&typeof g=="number")return f?b.children.splice(g,1):b.children[g]={type:"text",value:m.value},g;if(m.type==="element"){let S;for(S in yh)if(Object.hasOwn(yh,S)&&Object.hasOwn(m.properties,S)){const E=m.properties[S],w=yh[S];(w===null||w.includes(m.tagName))&&(m.properties[S]=p(String(E||""),S,m))}}if(m.type==="element"){let S=r?!r.includes(m.tagName):u?u.includes(m.tagName):!1;if(!S&&o&&typeof g=="number"&&(S=!o(m,g,b)),S&&b&&typeof g=="number")return d&&m.children?b.children.splice(g,1,...m.children):b.children.splice(g,1),g}}a(h,"transform")}a(sB,"post");function uB(e){const n=e.indexOf(":"),r=e.indexOf("?"),o=e.indexOf("#"),l=e.indexOf("/");return n===-1||l!==-1&&n>l||r!==-1&&n>r||o!==-1&&n>o||iB.test(e.slice(0,n))?e:""}a(uB,"defaultUrlTransform");const vf=x.createContext(null);vf.displayName="PanelGroupContext";const bt={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Hy=10,ao=x.useLayoutEffect,cx=Em.useId,cB=typeof cx=="function"?cx:()=>null;let fB=0;function Uy(e=null){const n=cB(),r=x.useRef(e||n||null);return r.current===null&&(r.current=""+fB++),e??r.current}a(Uy,"useUniqueId");function $R({children:e,className:n="",collapsedSize:r,collapsible:o,defaultSize:l,forwardedRef:u,id:f,maxSize:d,minSize:p,onCollapse:h,onExpand:m,onResize:g,order:b,style:S,tagName:E="div",...w}){const R=x.useContext(vf);if(R===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:T,expandPanel:O,getPanelSize:M,getPanelStyle:L,groupId:B,isPanelCollapsed:D,reevaluatePanelConstraints:P,registerPanel:Y,resizePanel:K,unregisterPanel:te}=R,Z=Uy(f),ee=x.useRef({callbacks:{onCollapse:h,onExpand:m,onResize:g},constraints:{collapsedSize:r,collapsible:o,defaultSize:l,maxSize:d,minSize:p},id:Z,idIsFromProps:f!==void 0,order:b});x.useRef({didLogMissingDefaultSizeWarning:!1}),ao(()=>{const{callbacks:F,constraints:oe}=ee.current,I={...oe};ee.current.id=Z,ee.current.idIsFromProps=f!==void 0,ee.current.order=b,F.onCollapse=h,F.onExpand=m,F.onResize=g,oe.collapsedSize=r,oe.collapsible=o,oe.defaultSize=l,oe.maxSize=d,oe.minSize=p,(I.collapsedSize!==oe.collapsedSize||I.collapsible!==oe.collapsible||I.maxSize!==oe.maxSize||I.minSize!==oe.minSize)&&P(ee.current,I)}),ao(()=>{const F=ee.current;return Y(F),()=>{te(F)}},[b,Z,Y,te]),x.useImperativeHandle(u,()=>({collapse:a(()=>{T(ee.current)},"collapse"),expand:a(F=>{O(ee.current,F)},"expand"),getId(){return Z},getSize(){return M(ee.current)},isCollapsed(){return D(ee.current)},isExpanded(){return!D(ee.current)},resize:a(F=>{K(ee.current,F)},"resize")}),[T,O,M,D,Z,K]);const fe=L(ee.current,l);return x.createElement(E,{...w,children:e,className:n,id:Z,style:{...fe,...S},[bt.groupId]:B,[bt.panel]:"",[bt.panelCollapsible]:o||void 0,[bt.panelId]:Z,[bt.panelSize]:parseFloat(""+fe.flexGrow).toFixed(1)})}a($R,"PanelWithForwardedRef");const dB=x.forwardRef((e,n)=>x.createElement($R,{...e,forwardedRef:n}));$R.displayName="Panel";dB.displayName="forwardRef(Panel)";let wm=null,yc=-1,_i=null;function pB(e,n,r){const o=(n&KR)!==0,l=(n&XR)!==0,u=(n&WR)!==0,f=(n&ZR)!==0;if(n){if(o)return u?"se-resize":f?"ne-resize":"e-resize";if(l)return u?"sw-resize":f?"nw-resize":"w-resize";if(u)return"s-resize";if(f)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}a(pB,"getCursorStyle");function hB(){_i!==null&&(document.head.removeChild(_i),wm=null,_i=null,yc=-1)}a(hB,"resetGlobalCursorStyle");function Oh(e,n,r){var o,l;const u=pB(e,n);if(wm!==u){if(wm=u,_i===null&&(_i=document.createElement("style"),document.head.appendChild(_i)),yc>=0){var f;(f=_i.sheet)===null||f===void 0||f.removeRule(yc)}yc=(o=(l=_i.sheet)===null||l===void 0?void 0:l.insertRule(`*{cursor: ${u} !important;}`))!==null&&o!==void 0?o:-1}}a(Oh,"setGlobalCursorStyle");function VR(e){return e.type==="keydown"}a(VR,"isKeyDown");function GR(e){return e.type.startsWith("pointer")}a(GR,"isPointerEvent");function YR(e){return e.type.startsWith("mouse")}a(YR,"isMouseEvent");function bf(e){if(GR(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(YR(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}a(bf,"getResizeEventCoordinates");function mB(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}a(mB,"getInputType");function yB(e,n,r){return e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y}a(yB,"intersects");function gB(e,n){if(e===n)throw new Error("Cannot compare node with itself");const r={a:px(e),b:px(n)};let o;for(;r.a.at(-1)===r.b.at(-1);)e=r.a.pop(),n=r.b.pop(),o=e;He(o,"Stacking order can only be calculated for elements with a common ancestor");const l={a:dx(fx(r.a)),b:dx(fx(r.b))};if(l.a===l.b){const u=o.childNodes,f={a:r.a.at(-1),b:r.b.at(-1)};let d=u.length;for(;d--;){const p=u[d];if(p===f.a)return 1;if(p===f.b)return-1}}return Math.sign(l.a-l.b)}a(gB,"compare");const vB=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function bB(e){var n;const r=getComputedStyle((n=QR(e))!==null&&n!==void 0?n:e).display;return r==="flex"||r==="inline-flex"}a(bB,"is_flex_item");function SB(e){const n=getComputedStyle(e);return!!(n.position==="fixed"||n.zIndex!=="auto"&&(n.position!=="static"||bB(e))||+n.opacity<1||"transform"in n&&n.transform!=="none"||"webkitTransform"in n&&n.webkitTransform!=="none"||"mixBlendMode"in n&&n.mixBlendMode!=="normal"||"filter"in n&&n.filter!=="none"||"webkitFilter"in n&&n.webkitFilter!=="none"||"isolation"in n&&n.isolation==="isolate"||vB.test(n.willChange)||n.webkitOverflowScrolling==="touch")}a(SB,"creates_stacking_context");function fx(e){let n=e.length;for(;n--;){const r=e[n];if(He(r,"Missing node"),SB(r))return r}return null}a(fx,"find_stacking_context");function dx(e){return e&&Number(getComputedStyle(e).zIndex)||0}a(dx,"get_z_index");function px(e){const n=[];for(;e;)n.push(e),e=QR(e);return n}a(px,"get_ancestors");function QR(e){const{parentNode:n}=e;return n&&n instanceof ShadowRoot?n.host:n}a(QR,"get_parent");const KR=1,XR=2,WR=4,ZR=8,xB=mB()==="coarse";let Wn=[],xa=!1,Mi=new Map,Sf=new Map;const cs=new Set;function wB(e,n,r,o,l){var u;const{ownerDocument:f}=n,d={direction:r,element:n,hitAreaMargins:o,setResizeHandlerState:l},p=(u=Mi.get(f))!==null&&u!==void 0?u:0;return Mi.set(f,p+1),cs.add(d),jc(),a(function(){var m;Sf.delete(e),cs.delete(d);const g=(m=Mi.get(f))!==null&&m!==void 0?m:1;if(Mi.set(f,g-1),jc(),g===1&&Mi.delete(f),Wn.includes(d)){const b=Wn.indexOf(d);b>=0&&Wn.splice(b,1),xf(),l("up",!0,null)}},"unregisterResizeHandle")}a(wB,"registerResizeHandle");function EB(e){const{target:n}=e,{x:r,y:o}=bf(e);xa=!0,Fy({target:n,x:r,y:o}),jc(),Wn.length>0&&(Ic("down",e),xf(),e.preventDefault(),JR(n)||e.stopImmediatePropagation())}a(EB,"handlePointerDown");function Ah(e){const{x:n,y:r}=bf(e);if(xa&&e.type!=="pointerleave"&&e.buttons===0&&(xa=!1,Ic("up",e)),!xa){const{target:o}=e;Fy({target:o,x:n,y:r})}Ic("move",e),xf(),Wn.length>0&&e.preventDefault()}a(Ah,"handlePointerMove");function _h(e){const{target:n}=e,{x:r,y:o}=bf(e);Sf.clear(),xa=!1,Wn.length>0&&(e.preventDefault(),JR(n)||e.stopImmediatePropagation()),Ic("up",e),Fy({target:n,x:r,y:o}),xf(),jc()}a(_h,"handlePointerUp");function JR(e){let n=e;for(;n;){if(n.hasAttribute(bt.resizeHandle))return!0;n=n.parentElement}return!1}a(JR,"isWithinResizeHandle");function Fy({target:e,x:n,y:r}){Wn.splice(0);let o=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(o=e),cs.forEach(l=>{const{element:u,hitAreaMargins:f}=l,d=u.getBoundingClientRect(),{bottom:p,left:h,right:m,top:g}=d,b=xB?f.coarse:f.fine;if(n>=h-b&&n<=m+b&&r>=g-b&&r<=p+b){if(o!==null&&document.contains(o)&&u!==o&&!u.contains(o)&&!o.contains(u)&&gB(o,u)>0){let E=o,w=!1;for(;E&&!E.contains(u);){if(yB(E.getBoundingClientRect(),d)){w=!0;break}E=E.parentElement}if(w)return}Wn.push(l)}})}a(Fy,"recalculateIntersectingHandles");function Mh(e,n){Sf.set(e,n)}a(Mh,"reportConstraintsViolation");function xf(){let e=!1,n=!1;Wn.forEach(o=>{const{direction:l}=o;l==="horizontal"?e=!0:n=!0});let r=0;Sf.forEach(o=>{r|=o}),e&&n?Oh("intersection",r):e?Oh("horizontal",r):n?Oh("vertical",r):hB()}a(xf,"updateCursor");let Nh;function jc(){var e;(e=Nh)===null||e===void 0||e.abort(),Nh=new AbortController;const n={capture:!0,signal:Nh.signal};cs.size&&(xa?(Wn.length>0&&Mi.forEach((r,o)=>{const{body:l}=o;r>0&&(l.addEventListener("contextmenu",_h,n),l.addEventListener("pointerleave",Ah,n),l.addEventListener("pointermove",Ah,n))}),Mi.forEach((r,o)=>{const{body:l}=o;l.addEventListener("pointerup",_h,n),l.addEventListener("pointercancel",_h,n)})):Mi.forEach((r,o)=>{const{body:l}=o;r>0&&(l.addEventListener("pointerdown",EB,n),l.addEventListener("pointermove",Ah,n))}))}a(jc,"updateListeners");function Ic(e,n){cs.forEach(r=>{const{setResizeHandlerState:o}=r,l=Wn.includes(r);o(e,l,n)})}a(Ic,"updateResizeHandlerStates");function CB(){const[e,n]=x.useState(0);return x.useCallback(()=>n(r=>r+1),[])}a(CB,"useForceUpdate");function He(e,n){if(!e)throw console.error(n),Error(n)}a(He,"assert");function yo(e,n,r=Hy){return e.toFixed(r)===n.toFixed(r)?0:e>n?1:-1}a(yo,"fuzzyCompareNumbers");function Yr(e,n,r=Hy){return yo(e,n,r)===0}a(Yr,"fuzzyNumbersEqual$1");function xn(e,n,r){return yo(e,n,r)===0}a(xn,"fuzzyNumbersEqual");function TB(e,n,r){if(e.length!==n.length)return!1;for(let o=0;o<e.length;o++){const l=e[o],u=n[o];if(!xn(l,u,r))return!1}return!0}a(TB,"fuzzyLayoutsEqual");function ma({panelConstraints:e,panelIndex:n,size:r}){const o=e[n];He(o!=null,`Panel constraints not found for index ${n}`);let{collapsedSize:l=0,collapsible:u,maxSize:f=100,minSize:d=0}=o;if(yo(r,d)<0)if(u){const p=(l+d)/2;yo(r,p)<0?r=l:r=d}else r=d;return r=Math.min(f,r),r=parseFloat(r.toFixed(Hy)),r}a(ma,"resizePanel");function Ql({delta:e,initialLayout:n,panelConstraints:r,pivotIndices:o,prevLayout:l,trigger:u}){if(xn(e,0))return n;const f=[...n],[d,p]=o;He(d!=null,"Invalid first pivot index"),He(p!=null,"Invalid second pivot index");let h=0;if(u==="keyboard"){{const g=e<0?p:d,b=r[g];He(b,`Panel constraints not found for index ${g}`);const{collapsedSize:S=0,collapsible:E,minSize:w=0}=b;if(E){const R=n[g];if(He(R!=null,`Previous layout not found for panel index ${g}`),xn(R,S)){const T=w-R;yo(T,Math.abs(e))>0&&(e=e<0?0-T:T)}}}{const g=e<0?d:p,b=r[g];He(b,`No panel constraints found for index ${g}`);const{collapsedSize:S=0,collapsible:E,minSize:w=0}=b;if(E){const R=n[g];if(He(R!=null,`Previous layout not found for panel index ${g}`),xn(R,w)){const T=R-S;yo(T,Math.abs(e))>0&&(e=e<0?0-T:T)}}}}{const g=e<0?1:-1;let b=e<0?p:d,S=0;for(;;){const w=n[b];He(w!=null,`Previous layout not found for panel index ${b}`);const T=ma({panelConstraints:r,panelIndex:b,size:100})-w;if(S+=T,b+=g,b<0||b>=r.length)break}const E=Math.min(Math.abs(e),Math.abs(S));e=e<0?0-E:E}{let b=e<0?d:p;for(;b>=0&&b<r.length;){const S=Math.abs(e)-Math.abs(h),E=n[b];He(E!=null,`Previous layout not found for panel index ${b}`);const w=E-S,R=ma({panelConstraints:r,panelIndex:b,size:w});if(!xn(E,R)&&(h+=E-R,f[b]=R,h.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?b--:b++}}if(TB(l,f))return l;{const g=e<0?p:d,b=n[g];He(b!=null,`Previous layout not found for panel index ${g}`);const S=b+h,E=ma({panelConstraints:r,panelIndex:g,size:S});if(f[g]=E,!xn(E,S)){let w=S-E,T=e<0?p:d;for(;T>=0&&T<r.length;){const O=f[T];He(O!=null,`Previous layout not found for panel index ${T}`);const M=O+w,L=ma({panelConstraints:r,panelIndex:T,size:M});if(xn(O,L)||(w-=L-O,f[T]=L),xn(w,0))break;e>0?T--:T++}}}const m=f.reduce((g,b)=>b+g,0);return xn(m,100)?f:l}a(Ql,"adjustLayoutByDelta");function RB({layout:e,panelsArray:n,pivotIndices:r}){let o=0,l=100,u=0,f=0;const d=r[0];He(d!=null,"No pivot index found"),n.forEach((g,b)=>{const{constraints:S}=g,{maxSize:E=100,minSize:w=0}=S;b===d?(o=w,l=E):(u+=w,f+=E)});const p=Math.min(l,100-u),h=Math.max(o,100-f),m=e[d];return{valueMax:p,valueMin:h,valueNow:m}}a(RB,"calculateAriaValues");function fs(e,n=document){return Array.from(n.querySelectorAll(`[${bt.resizeHandleId}][data-panel-group-id="${e}"]`))}a(fs,"getResizeHandleElementsForGroup");function eO(e,n,r=document){const l=fs(e,r).findIndex(u=>u.getAttribute(bt.resizeHandleId)===n);return l??null}a(eO,"getResizeHandleElementIndex");function tO(e,n,r){const o=eO(e,n,r);return o!=null?[o,o+1]:[-1,-1]}a(tO,"determinePivotIndices");function OB(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}a(OB,"isHTMLElement");function nO(e,n=document){if(OB(n)&&n.dataset.panelGroupId==e)return n;const r=n.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}a(nO,"getPanelGroupElement");function wf(e,n=document){const r=n.querySelector(`[${bt.resizeHandleId}="${e}"]`);return r||null}a(wf,"getResizeHandleElement");function AB(e,n,r,o=document){var l,u,f,d;const p=wf(n,o),h=fs(e,o),m=p?h.indexOf(p):-1,g=(l=(u=r[m])===null||u===void 0?void 0:u.id)!==null&&l!==void 0?l:null,b=(f=(d=r[m+1])===null||d===void 0?void 0:d.id)!==null&&f!==void 0?f:null;return[g,b]}a(AB,"getResizeHandlePanelIds");function _B({committedValuesRef:e,eagerValuesRef:n,groupId:r,layout:o,panelDataArray:l,panelGroupElement:u,setLayout:f}){x.useRef({didWarnAboutMissingResizeHandle:!1}),ao(()=>{if(!u)return;const d=fs(r,u);for(let p=0;p<l.length-1;p++){const{valueMax:h,valueMin:m,valueNow:g}=RB({layout:o,panelsArray:l,pivotIndices:[p,p+1]}),b=d[p];if(b!=null){const S=l[p];He(S,`No panel data found for index "${p}"`),b.setAttribute("aria-controls",S.id),b.setAttribute("aria-valuemax",""+Math.round(h)),b.setAttribute("aria-valuemin",""+Math.round(m)),b.setAttribute("aria-valuenow",g!=null?""+Math.round(g):"")}}return()=>{d.forEach((p,h)=>{p.removeAttribute("aria-controls"),p.removeAttribute("aria-valuemax"),p.removeAttribute("aria-valuemin"),p.removeAttribute("aria-valuenow")})}},[r,o,l,u]),x.useEffect(()=>{if(!u)return;const d=n.current;He(d,"Eager values not found");const{panelDataArray:p}=d,h=nO(r,u);He(h!=null,`No group found for id "${r}"`);const m=fs(r,u);He(m,`No resize handles found for group id "${r}"`);const g=m.map(b=>{const S=b.getAttribute(bt.resizeHandleId);He(S,"Resize handle element has no handle id attribute");const[E,w]=AB(r,S,p,u);if(E==null||w==null)return()=>{};const R=a(T=>{if(!T.defaultPrevented)switch(T.key){case"Enter":{T.preventDefault();const O=p.findIndex(M=>M.id===E);if(O>=0){const M=p[O];He(M,`No panel data found for index ${O}`);const L=o[O],{collapsedSize:B=0,collapsible:D,minSize:P=0}=M.constraints;if(L!=null&&D){const Y=Ql({delta:xn(L,B)?P-B:B-L,initialLayout:o,panelConstraints:p.map(K=>K.constraints),pivotIndices:tO(r,S,u),prevLayout:o,trigger:"keyboard"});o!==Y&&f(Y)}}break}}},"onKeyDown");return b.addEventListener("keydown",R),()=>{b.removeEventListener("keydown",R)}});return()=>{g.forEach(b=>b())}},[u,e,n,r,o,l,f])}a(_B,"useWindowSplitterPanelGroupBehavior");function hx(e,n){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==n[r])return!1;return!0}a(hx,"areEqual");function rO(e,n){const r=e==="horizontal",{x:o,y:l}=bf(n);return r?o:l}a(rO,"getResizeEventCursorPosition");function MB(e,n,r,o,l){const u=r==="horizontal",f=wf(n,l);He(f,`No resize handle element found for id "${n}"`);const d=f.getAttribute(bt.groupId);He(d,"Resize handle element has no group id attribute");let{initialCursorPosition:p}=o;const h=rO(r,e),m=nO(d,l);He(m,`No group element found for id "${d}"`);const g=m.getBoundingClientRect(),b=u?g.width:g.height;return(h-p)/b*100}a(MB,"calculateDragOffsetPercentage");function NB(e,n,r,o,l,u){if(VR(e)){const f=r==="horizontal";let d=0;e.shiftKey?d=100:l!=null?d=l:d=10;let p=0;switch(e.key){case"ArrowDown":p=f?0:d;break;case"ArrowLeft":p=f?-d:0;break;case"ArrowRight":p=f?d:0;break;case"ArrowUp":p=f?0:-d;break;case"End":p=100;break;case"Home":p=-100;break}return p}else return o==null?0:MB(e,n,r,o,u)}a(NB,"calculateDeltaPercentage");function kB({panelDataArray:e}){const n=Array(e.length),r=e.map(u=>u.constraints);let o=0,l=100;for(let u=0;u<e.length;u++){const f=r[u];He(f,`Panel constraints not found for index ${u}`);const{defaultSize:d}=f;d!=null&&(o++,n[u]=d,l-=d)}for(let u=0;u<e.length;u++){const f=r[u];He(f,`Panel constraints not found for index ${u}`);const{defaultSize:d}=f;if(d!=null)continue;const p=e.length-o,h=l/p;o++,n[u]=h,l-=h}return n}a(kB,"calculateUnsafeDefaultLayout");function pa(e,n,r){n.forEach((o,l)=>{const u=e[l];He(u,`Panel data not found for index ${l}`);const{callbacks:f,constraints:d,id:p}=u,{collapsedSize:h=0,collapsible:m}=d,g=r[p];if(g==null||o!==g){r[p]=o;const{onCollapse:b,onExpand:S,onResize:E}=f;E&&E(o,g),m&&(b||S)&&(S&&(g==null||Yr(g,h))&&!Yr(o,h)&&S(),b&&(g==null||!Yr(g,h))&&Yr(o,h)&&b())}})}a(pa,"callPanelCallbacks");function lc(e,n){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=n[r])return!1;return!0}a(lc,"compareLayouts");function DB({defaultSize:e,dragState:n,layout:r,panelData:o,panelIndex:l,precision:u=3}){const f=r[l];let d;return f==null?d=e!=null?e.toFixed(u):"1":o.length===1?d="1":d=f.toFixed(u),{flexBasis:0,flexGrow:d,flexShrink:1,overflow:"hidden",pointerEvents:n!==null?"none":void 0}}a(DB,"computePanelFlexBoxStyle");function PB(e,n=10){let r=null;return a((...l)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...l)},n)},"callable")}a(PB,"debounce");function mx(e){try{if(typeof localStorage<"u")e.getItem=n=>localStorage.getItem(n),e.setItem=(n,r)=>{localStorage.setItem(n,r)};else throw new Error("localStorage not supported in this environment")}catch(n){console.error(n),e.getItem=()=>null,e.setItem=()=>{}}}a(mx,"initializeDefaultStorage");function iO(e){return`react-resizable-panels:${e}`}a(iO,"getPanelGroupKey");function oO(e){return e.map(n=>{const{constraints:r,id:o,idIsFromProps:l,order:u}=n;return l?o:u?`${u}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((n,r)=>n.localeCompare(r)).join(",")}a(oO,"getPanelKey");function aO(e,n){try{const r=iO(e),o=n.getItem(r);if(o){const l=JSON.parse(o);if(typeof l=="object"&&l!=null)return l}}catch{}return null}a(aO,"loadSerializedPanelGroupState");function LB(e,n,r){var o,l;const u=(o=aO(e,r))!==null&&o!==void 0?o:{},f=oO(n);return(l=u[f])!==null&&l!==void 0?l:null}a(LB,"loadPanelGroupState");function zB(e,n,r,o,l){var u;const f=iO(e),d=oO(n),p=(u=aO(e,l))!==null&&u!==void 0?u:{};p[d]={expandToSizes:Object.fromEntries(r.entries()),layout:o};try{l.setItem(f,JSON.stringify(p))}catch(h){console.error(h)}}a(zB,"savePanelGroupState");function yx({layout:e,panelConstraints:n}){const r=[...e],o=r.reduce((u,f)=>u+f,0);if(r.length!==n.length)throw Error(`Invalid ${n.length} panel layout: ${r.map(u=>`${u}%`).join(", ")}`);if(!xn(o,100)&&r.length>0)for(let u=0;u<n.length;u++){const f=r[u];He(f!=null,`No layout data found for index ${u}`);const d=100/o*f;r[u]=d}let l=0;for(let u=0;u<n.length;u++){const f=r[u];He(f!=null,`No layout data found for index ${u}`);const d=ma({panelConstraints:n,panelIndex:u,size:f});f!=d&&(l+=f-d,r[u]=d)}if(!xn(l,0))for(let u=0;u<n.length;u++){const f=r[u];He(f!=null,`No layout data found for index ${u}`);const d=f+l,p=ma({panelConstraints:n,panelIndex:u,size:d});if(f!==p&&(l-=p-f,r[u]=p,xn(l,0)))break}return r}a(yx,"validatePanelGroupLayout");const jB=100,Kl={getItem:a(e=>(mx(Kl),Kl.getItem(e)),"getItem"),setItem:a((e,n)=>{mx(Kl),Kl.setItem(e,n)},"setItem")},gx={};function lO({autoSaveId:e=null,children:n,className:r="",direction:o,forwardedRef:l,id:u=null,onLayout:f=null,keyboardResizeBy:d=null,storage:p=Kl,style:h,tagName:m="div",...g}){const b=Uy(u),S=x.useRef(null),[E,w]=x.useState(null),[R,T]=x.useState([]),O=CB(),M=x.useRef({}),L=x.useRef(new Map),B=x.useRef(0),D=x.useRef({autoSaveId:e,direction:o,dragState:E,id:b,keyboardResizeBy:d,onLayout:f,storage:p}),P=x.useRef({layout:R,panelDataArray:[],panelDataArrayChanged:!1});x.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),x.useImperativeHandle(l,()=>({getId:a(()=>D.current.id,"getId"),getLayout:a(()=>{const{layout:A}=P.current;return A},"getLayout"),setLayout:a(A=>{const{onLayout:J}=D.current,{layout:de,panelDataArray:ce}=P.current,V=yx({layout:A,panelConstraints:ce.map(pe=>pe.constraints)});hx(de,V)||(T(V),P.current.layout=V,J&&J(V),pa(ce,V,M.current))},"setLayout")}),[]),ao(()=>{D.current.autoSaveId=e,D.current.direction=o,D.current.dragState=E,D.current.id=b,D.current.onLayout=f,D.current.storage=p}),_B({committedValuesRef:D,eagerValuesRef:P,groupId:b,layout:R,panelDataArray:P.current.panelDataArray,setLayout:T,panelGroupElement:S.current}),x.useEffect(()=>{const{panelDataArray:A}=P.current;if(e){if(R.length===0||R.length!==A.length)return;let J=gx[e];J==null&&(J=PB(zB,jB),gx[e]=J);const de=[...A],ce=new Map(L.current);J(e,de,ce,R,p)}},[e,R,p]),x.useEffect(()=>{});const Y=x.useCallback(A=>{const{onLayout:J}=D.current,{layout:de,panelDataArray:ce}=P.current;if(A.constraints.collapsible){const V=ce.map(ke=>ke.constraints),{collapsedSize:pe=0,panelSize:be,pivotIndices:Re}=ro(ce,A,de);if(He(be!=null,`Panel size not found for panel "${A.id}"`),!Yr(be,pe)){L.current.set(A.id,be);const Ue=ha(ce,A)===ce.length-1?be-pe:pe-be,Be=Ql({delta:Ue,initialLayout:de,panelConstraints:V,pivotIndices:Re,prevLayout:de,trigger:"imperative-api"});lc(de,Be)||(T(Be),P.current.layout=Be,J&&J(Be),pa(ce,Be,M.current))}}},[]),K=x.useCallback((A,J)=>{const{onLayout:de}=D.current,{layout:ce,panelDataArray:V}=P.current;if(A.constraints.collapsible){const pe=V.map(nt=>nt.constraints),{collapsedSize:be=0,panelSize:Re=0,minSize:ke=0,pivotIndices:Ue}=ro(V,A,ce),Be=J??ke;if(Yr(Re,be)){const nt=L.current.get(A.id),Ut=nt!=null&&nt>=Be?nt:Be,Tn=ha(V,A)===V.length-1?Re-Ut:Ut-Re,Mt=Ql({delta:Tn,initialLayout:ce,panelConstraints:pe,pivotIndices:Ue,prevLayout:ce,trigger:"imperative-api"});lc(ce,Mt)||(T(Mt),P.current.layout=Mt,de&&de(Mt),pa(V,Mt,M.current))}}},[]),te=x.useCallback(A=>{const{layout:J,panelDataArray:de}=P.current,{panelSize:ce}=ro(de,A,J);return He(ce!=null,`Panel size not found for panel "${A.id}"`),ce},[]),Z=x.useCallback((A,J)=>{const{panelDataArray:de}=P.current,ce=ha(de,A);return DB({defaultSize:J,dragState:E,layout:R,panelData:de,panelIndex:ce})},[E,R]),ee=x.useCallback(A=>{const{layout:J,panelDataArray:de}=P.current,{collapsedSize:ce=0,collapsible:V,panelSize:pe}=ro(de,A,J);return He(pe!=null,`Panel size not found for panel "${A.id}"`),V===!0&&Yr(pe,ce)},[]),fe=x.useCallback(A=>{const{layout:J,panelDataArray:de}=P.current,{collapsedSize:ce=0,collapsible:V,panelSize:pe}=ro(de,A,J);return He(pe!=null,`Panel size not found for panel "${A.id}"`),!V||yo(pe,ce)>0},[]),F=x.useCallback(A=>{const{panelDataArray:J}=P.current;J.push(A),J.sort((de,ce)=>{const V=de.order,pe=ce.order;return V==null&&pe==null?0:V==null?-1:pe==null?1:V-pe}),P.current.panelDataArrayChanged=!0,O()},[O]);ao(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:A,onLayout:J,storage:de}=D.current,{layout:ce,panelDataArray:V}=P.current;let pe=null;if(A){const Re=LB(A,V,de);Re&&(L.current=new Map(Object.entries(Re.expandToSizes)),pe=Re.layout)}pe==null&&(pe=kB({panelDataArray:V}));const be=yx({layout:pe,panelConstraints:V.map(Re=>Re.constraints)});hx(ce,be)||(T(be),P.current.layout=be,J&&J(be),pa(V,be,M.current))}}),ao(()=>{const A=P.current;return()=>{A.layout=[]}},[]);const oe=x.useCallback(A=>{let J=!1;const de=S.current;return de&&window.getComputedStyle(de,null).getPropertyValue("direction")==="rtl"&&(J=!0),a(function(V){V.preventDefault();const pe=S.current;if(!pe)return()=>null;const{direction:be,dragState:Re,id:ke,keyboardResizeBy:Ue,onLayout:Be}=D.current,{layout:nt,panelDataArray:Ut}=P.current,{initialLayout:Gt}=Re??{},Tn=tO(ke,A,pe);let Mt=NB(V,A,be,Re,Ue,pe);const Rr=be==="horizontal";Rr&&J&&(Mt=-Mt);const ei=Ut.map(Fa=>Fa.constraints),Fn=Ql({delta:Mt,initialLayout:Gt??nt,panelConstraints:ei,pivotIndices:Tn,prevLayout:nt,trigger:VR(V)?"keyboard":"mouse-or-touch"}),wo=!lc(nt,Fn);(GR(V)||YR(V))&&B.current!=Mt&&(B.current=Mt,!wo&&Mt!==0?Rr?Mh(A,Mt<0?KR:XR):Mh(A,Mt<0?WR:ZR):Mh(A,0)),wo&&(T(Fn),P.current.layout=Fn,Be&&Be(Fn),pa(Ut,Fn,M.current))},"resizeHandler")},[]),I=x.useCallback((A,J)=>{const{onLayout:de}=D.current,{layout:ce,panelDataArray:V}=P.current,pe=V.map(nt=>nt.constraints),{panelSize:be,pivotIndices:Re}=ro(V,A,ce);He(be!=null,`Panel size not found for panel "${A.id}"`);const Ue=ha(V,A)===V.length-1?be-J:J-be,Be=Ql({delta:Ue,initialLayout:ce,panelConstraints:pe,pivotIndices:Re,prevLayout:ce,trigger:"imperative-api"});lc(ce,Be)||(T(Be),P.current.layout=Be,de&&de(Be),pa(V,Be,M.current))},[]),W=x.useCallback((A,J)=>{const{layout:de,panelDataArray:ce}=P.current,{collapsedSize:V=0,collapsible:pe}=J,{collapsedSize:be=0,collapsible:Re,maxSize:ke=100,minSize:Ue=0}=A.constraints,{panelSize:Be}=ro(ce,A,de);Be!=null&&(pe&&Re&&Yr(Be,V)?Yr(V,be)||I(A,be):Be<Ue?I(A,Ue):Be>ke&&I(A,ke))},[I]),ie=x.useCallback((A,J)=>{const{direction:de}=D.current,{layout:ce}=P.current;if(!S.current)return;const V=wf(A,S.current);He(V,`Drag handle element not found for id "${A}"`);const pe=rO(de,J);w({dragHandleId:A,dragHandleRect:V.getBoundingClientRect(),initialCursorPosition:pe,initialLayout:ce})},[]),se=x.useCallback(()=>{w(null)},[]),k=x.useCallback(A=>{const{panelDataArray:J}=P.current,de=ha(J,A);de>=0&&(J.splice(de,1),delete M.current[A.id],P.current.panelDataArrayChanged=!0,O())},[O]),z=x.useMemo(()=>({collapsePanel:Y,direction:o,dragState:E,expandPanel:K,getPanelSize:te,getPanelStyle:Z,groupId:b,isPanelCollapsed:ee,isPanelExpanded:fe,reevaluatePanelConstraints:W,registerPanel:F,registerResizeHandle:oe,resizePanel:I,startDragging:ie,stopDragging:se,unregisterPanel:k,panelGroupElement:S.current}),[Y,E,o,K,te,Z,b,ee,fe,W,F,oe,I,ie,se,k]),Q={display:"flex",flexDirection:o==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return x.createElement(vf.Provider,{value:z},x.createElement(m,{...g,children:n,className:r,id:u,ref:S,style:{...Q,...h},[bt.group]:"",[bt.groupDirection]:o,[bt.groupId]:b}))}a(lO,"PanelGroupWithForwardedRef");const IB=x.forwardRef((e,n)=>x.createElement(lO,{...e,forwardedRef:n}));lO.displayName="PanelGroup";IB.displayName="forwardRef(PanelGroup)";function ha(e,n){return e.findIndex(r=>r===n||r.id===n.id)}a(ha,"findPanelDataIndex");function ro(e,n,r){const o=ha(e,n),u=o===e.length-1?[o-1,o]:[o,o+1],f=r[o];return{...n.constraints,panelSize:f,pivotIndices:u}}a(ro,"panelDataHelper");function BB({disabled:e,handleId:n,resizeHandler:r,panelGroupElement:o}){x.useEffect(()=>{if(e||r==null||o==null)return;const l=wf(n,o);if(l==null)return;const u=a(f=>{if(!f.defaultPrevented)switch(f.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{f.preventDefault(),r(f);break}case"F6":{f.preventDefault();const d=l.getAttribute(bt.groupId);He(d,`No group element found for id "${d}"`);const p=fs(d,o),h=eO(d,n,o);He(h!==null,`No resize element found for id "${n}"`);const m=f.shiftKey?h>0?h-1:p.length-1:h+1<p.length?h+1:0;p[m].focus();break}}},"onKeyDown");return l.addEventListener("keydown",u),()=>{l.removeEventListener("keydown",u)}},[o,e,n,r])}a(BB,"useWindowSplitterResizeHandlerBehavior");function HB({children:e=null,className:n="",disabled:r=!1,hitAreaMargins:o,id:l,onBlur:u,onClick:f,onDragging:d,onFocus:p,onPointerDown:h,onPointerUp:m,style:g={},tabIndex:b=0,tagName:S="div",...E}){var w,R;const T=x.useRef(null),O=x.useRef({onClick:f,onDragging:d,onPointerDown:h,onPointerUp:m});x.useEffect(()=>{O.current.onClick=f,O.current.onDragging=d,O.current.onPointerDown=h,O.current.onPointerUp=m});const M=x.useContext(vf);if(M===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:L,groupId:B,registerResizeHandle:D,startDragging:P,stopDragging:Y,panelGroupElement:K}=M,te=Uy(l),[Z,ee]=x.useState("inactive"),[fe,F]=x.useState(!1),[oe,I]=x.useState(null),W=x.useRef({state:Z});ao(()=>{W.current.state=Z}),x.useEffect(()=>{if(r)I(null);else{const z=D(te);I(()=>z)}},[r,te,D]);const ie=(w=o?.coarse)!==null&&w!==void 0?w:15,se=(R=o?.fine)!==null&&R!==void 0?R:5;x.useEffect(()=>{if(r||oe==null)return;const z=T.current;He(z,"Element ref not attached");let Q=!1;return wB(te,z,L,{coarse:ie,fine:se},a((J,de,ce)=>{if(!de){ee("inactive");return}switch(J){case"down":{ee("drag"),Q=!1,He(ce,'Expected event to be defined for "down" action'),P(te,ce);const{onDragging:V,onPointerDown:pe}=O.current;V?.(!0),pe?.();break}case"move":{const{state:V}=W.current;Q=!0,V!=="drag"&&ee("hover"),He(ce,'Expected event to be defined for "move" action'),oe(ce);break}case"up":{ee("hover"),Y();const{onClick:V,onDragging:pe,onPointerUp:be}=O.current;pe?.(!1),be?.(),Q||V?.();break}}},"setResizeHandlerState"))},[ie,L,r,se,D,te,oe,P,Y]),BB({disabled:r,handleId:te,resizeHandler:oe,panelGroupElement:K});const k={touchAction:"none",userSelect:"none"};return x.createElement(S,{...E,children:e,className:n,id:l,onBlur:a(()=>{F(!1),u?.()},"onBlur"),onFocus:a(()=>{F(!0),p?.()},"onFocus"),ref:T,role:"separator",style:{...k,...g},tabIndex:b,[bt.groupDirection]:L,[bt.groupId]:B,[bt.resizeHandle]:"",[bt.resizeHandleActive]:Z==="drag"?"pointer":fe?"keyboard":void 0,[bt.resizeHandleEnabled]:!r,[bt.resizeHandleId]:te,[bt.resizeHandleState]:Z})}a(HB,"PanelResizeHandle");HB.displayName="PanelResizeHandle";var Ef="Collapsible",[UB]=Wt(Ef),[FB,qy]=UB(Ef),sO=x.forwardRef((e,n)=>{const{__scopeCollapsible:r,open:o,defaultOpen:l,disabled:u,onOpenChange:f,...d}=e,[p,h]=vr({prop:o,defaultProp:l??!1,onChange:f,caller:Ef});return N.jsx(FB,{scope:r,disabled:u,contentId:Bn(),open:p,onOpenToggle:x.useCallback(()=>h(m=>!m),[h]),children:N.jsx(Te.div,{"data-state":Vy(p),"data-disabled":u?"":void 0,...d,ref:n})})});sO.displayName=Ef;var uO="CollapsibleTrigger",cO=x.forwardRef((e,n)=>{const{__scopeCollapsible:r,...o}=e,l=qy(uO,r);return N.jsx(Te.button,{type:"button","aria-controls":l.contentId,"aria-expanded":l.open||!1,"data-state":Vy(l.open),"data-disabled":l.disabled?"":void 0,disabled:l.disabled,...o,ref:n,onClick:ye(e.onClick,l.onOpenToggle)})});cO.displayName=uO;var $y="CollapsibleContent",fO=x.forwardRef((e,n)=>{const{forceMount:r,...o}=e,l=qy($y,e.__scopeCollapsible);return N.jsx(Ht,{present:r||l.open,children:a(({present:u})=>N.jsx(qB,{...o,ref:n,present:u}),"children")})});fO.displayName=$y;var qB=x.forwardRef((e,n)=>{const{__scopeCollapsible:r,present:o,children:l,...u}=e,f=qy($y,r),[d,p]=x.useState(o),h=x.useRef(null),m=ze(n,h),g=x.useRef(0),b=g.current,S=x.useRef(0),E=S.current,w=f.open||d,R=x.useRef(w),T=x.useRef(void 0);return x.useEffect(()=>{const O=requestAnimationFrame(()=>R.current=!1);return()=>cancelAnimationFrame(O)},[]),wt(()=>{const O=h.current;if(O){T.current=T.current||{transitionDuration:O.style.transitionDuration,animationName:O.style.animationName},O.style.transitionDuration="0s",O.style.animationName="none";const M=O.getBoundingClientRect();g.current=M.height,S.current=M.width,R.current||(O.style.transitionDuration=T.current.transitionDuration,O.style.animationName=T.current.animationName),p(o)}},[f.open,o]),N.jsx(Te.div,{"data-state":Vy(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!w,...u,ref:m,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":E?`${E}px`:void 0,...e.style},children:w&&l})});function Vy(e){return e?"open":"closed"}a(Vy,"getState$1");var qF=sO,$F=cO,VF=fO,Yn,vx;function $B(){if(vx)return Yn;vx=1;var e=Yn&&Yn.__extends||(function(){var g=a(function(b,S){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,w){E.__proto__=w}||function(E,w){for(var R in w)w.hasOwnProperty(R)&&(E[R]=w[R])},g(b,S)},"extendStatics");return function(b,S){g(b,S);function E(){this.constructor=b}a(E,"__"),b.prototype=S===null?Object.create(S):(E.prototype=S.prototype,new E)}})(),n=Yn&&Yn.__assign||function(){return n=Object.assign||function(g){for(var b,S=1,E=arguments.length;S<E;S++){b=arguments[S];for(var w in b)Object.prototype.hasOwnProperty.call(b,w)&&(g[w]=b[w])}return g},n.apply(this,arguments)},r=Yn&&Yn.__rest||function(g,b){var S={};for(var E in g)Object.prototype.hasOwnProperty.call(g,E)&&b.indexOf(E)<0&&(S[E]=g[E]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,E=Object.getOwnPropertySymbols(g);w<E.length;w++)b.indexOf(E[w])<0&&(S[E[w]]=g[E[w]]);return S},o=Yn&&Yn.__importStar||function(g){if(g&&g.__esModule)return g;var b={};if(g!=null)for(var S in g)Object.hasOwnProperty.call(g,S)&&(b[S]=g[S]);return b.default=g,b},l=o(gT()),u=o(ds());function f(g,b,S){var E=S[g+"Style"]||"",w=b&&b[g]||"";return E?E+";"+w:w}a(f,"getStyleValue");function d(g,b,S){var E=f(g,b,S);return E?' style="'+E+'"':""}a(d,"getStyle");var p={'"':"&quot;","'":"&apos;","&":"&amp;",">":"&gt;","<":"&lt"};function h(g){return g&&g.replace(/<|>|&|"|'/g,function(b){return p[b]})}a(h,"xss");var m=(function(g){e(b,g);function b(){return g!==null&&g.apply(this,arguments)||this}return a(b,"JSONPretty"),b.prototype.render=function(){var S=this.props,E=S.json,w=S.data,R=S.replacer,T=S.space,O=S.themeClassName,M=S.theme,L=S.onJSONPrettyError,B=S.onError,D=S.silent,P=S.mainStyle,Y=S.keyStyle,K=S.valueStyle,te=S.stringStyle,Z=S.booleanStyle,ee=S.errorStyle,fe=r(S,["json","data","replacer","space","themeClassName","theme","onJSONPrettyError","onError","silent","mainStyle","keyStyle","valueStyle","stringStyle","booleanStyle","errorStyle"]),F={mainStyle:P,keyStyle:Y,valueStyle:K,stringStyle:te,booleanStyle:Z,errorStyle:ee},oe=w||E;if(typeof oe=="string")try{oe=JSON.parse(oe)}catch(I){return D||console.warn("[react-json-pretty]: "+I.message),L&&L(I),!L&&B&&(B(I),console.warn("JSONPretty#onError is deprecated, please use JSONPretty#onJSONPrettyError instead")),u.createElement("div",n({},fe,{dangerouslySetInnerHTML:{__html:'<pre class="__json-pretty-error__"'+d("error",M,F)+">"+h(oe)+"</pre>"}}))}return u.createElement("div",n({},fe,{dangerouslySetInnerHTML:{__html:'<pre class="'+O+'"'+d("main",M,F)+">"+this._pretty(M,oe,R,+T,F)+"</pre>"}}))},b.prototype._pretty=function(S,E,w,R,T){var O=/^( *)("[^"]+": )?("[^"]*"|[\w.+-]*)?([,[{]|\[\s*\],?|\{\s*\},?)?$/mg,M=JSON.stringify(E,typeof w=="function"?w:null,isNaN(R)?2:R);return M&&M.replace(/&/g,"&amp;").replace(/\\"([^,])/g,"\\&quot;$1").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(O,this._replace.bind(null,S,T))},b.prototype._replace=function(S,E,w,R,T,O,M){var L="</span>",B='<span class="__json-key__"'+d("key",S,E)+">",D='<span class="__json-value__"'+d("value",S,E)+">",P='<span class="__json-string__"'+d("string",S,E)+">",Y='<span class="__json-boolean__"'+d("boolean",S,E)+">",K=R||"";return T&&(K=K+'"'+B+T.replace(/^"|":\s$/g,"")+L+'": '),O&&(O==="true"||O==="false"?K=K+Y+O+L:K=K+(O[0]==='"'?P:D)+O+L),K+(M||"")},b.propTypes={data:l.any,json:l.any,replacer:l.func,silent:l.bool,space:l.oneOfType([l.number,l.string]),theme:l.object,themeClassName:l.string,onJSONPrettyError:l.func},b.defaultProps={data:"",json:"",silent:!0,space:2,themeClassName:"__json-pretty__"},b})(u.Component);return Yn=m,Yn}a($B,"requireJSONPretty");var VB=$B();const GF=xr(VB);var Cf="Switch",[GB]=Wt(Cf),[YB,QB]=GB(Cf),dO=x.forwardRef((e,n)=>{const{__scopeSwitch:r,name:o,checked:l,defaultChecked:u,required:f,disabled:d,value:p="on",onCheckedChange:h,form:m,...g}=e,[b,S]=x.useState(null),E=ze(n,M=>S(M)),w=x.useRef(!1),R=b?m||!!b.closest("form"):!0,[T,O]=vr({prop:l,defaultProp:u??!1,onChange:h,caller:Cf});return N.jsxs(YB,{scope:r,checked:T,disabled:d,children:[N.jsx(Te.button,{type:"button",role:"switch","aria-checked":T,"aria-required":f,"data-state":yO(T),"data-disabled":d?"":void 0,disabled:d,value:p,...g,ref:E,onClick:ye(e.onClick,M=>{O(L=>!L),R&&(w.current=M.isPropagationStopped(),w.current||M.stopPropagation())})}),R&&N.jsx(mO,{control:b,bubbles:!w.current,name:o,value:p,checked:T,required:f,disabled:d,form:m,style:{transform:"translateX(-100%)"}})]})});dO.displayName=Cf;var pO="SwitchThumb",hO=x.forwardRef((e,n)=>{const{__scopeSwitch:r,...o}=e,l=QB(pO,r);return N.jsx(Te.span,{"data-state":yO(l.checked),"data-disabled":l.disabled?"":void 0,...o,ref:n})});hO.displayName=pO;var KB="SwitchBubbleInput",mO=x.forwardRef(({__scopeSwitch:e,control:n,checked:r,bubbles:o=!0,...l},u)=>{const f=x.useRef(null),d=ze(f,u),p=ME(r),h=dw(n);return x.useEffect(()=>{const m=f.current;if(!m)return;const g=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(g,"checked").set;if(p!==r&&S){const E=new Event("click",{bubbles:o});S.call(m,r),m.dispatchEvent(E)}},[p,r,o]),N.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:d,style:{...l.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});mO.displayName=KB;function yO(e){return e?"checked":"unchecked"}a(yO,"getState");var YF=dO,QF=hO;export{wF as $,cF as A,iF as B,xN as C,EN as D,sF as E,yH as F,rF as G,uF as H,JU as I,BU as J,dF as K,YU as L,pF as M,hF as N,SN as O,bN as P,mF as Q,tH as R,eH as S,vN as T,gF as U,ZU as V,vF as W,AU as X,yF as Y,bF as Z,SF as _,gN as a,HF as a$,TF as a0,RF as a1,CF as a2,EF as a3,xF as a4,bH as a5,ZB as a6,hH as a7,mH as a8,PH as a9,MF as aA,NF as aB,kF as aC,IU as aD,HU as aE,Li as aF,sH as aG,SU as aH,AH as aI,lU as aJ,CL as aK,jH as aL,hU as aM,kH as aN,uU as aO,UH as aP,dU as aQ,TH as aR,XH as aS,DF as aT,Ye as aU,tt as aV,BF as aW,PF as aX,zF as aY,jF as aZ,IF as a_,rH as aa,lH as ab,KH as ac,EH as ad,wU as ae,cU as af,fU as ag,GH as ah,CU as ai,YH as aj,OF as ak,AF as al,_F as am,z4 as an,F4 as ao,HH as ap,FH as aq,IH as ar,BH as as,iU as at,xU as au,RH as av,NH as aw,rE as ax,Xm as ay,SH as az,Zx as b,OH as b$,LF as b0,sU as b1,aU as b2,RU as b3,DH as b4,vU as b5,cH as b6,LH as b7,HR as b8,O7 as b9,fO as bA,CH as bB,_U as bC,uH as bD,VH as bE,nH as bF,EU as bG,oU as bH,TU as bI,wH as bJ,mU as bK,xH as bL,JH as bM,fH as bN,QH as bO,OU as bP,vH as bQ,gH as bR,$F as bS,VF as bT,GF as bU,_H as bV,aH as bW,bU as bX,gU as bY,oH as bZ,MH as b_,UF as ba,VI as bb,$I as bc,Sa as bd,HS as be,FR as bf,zI as bg,ex as bh,En as bi,dr as bj,cn as bk,ym as bl,mf as bm,ft as bn,Sr as bo,Dy as bp,Ne as bq,Je as br,II as bs,FF as bt,dB as bu,IB as bv,HB as bw,qH as bx,qF as by,cO as bz,wN as c,_e as c0,ZH as c1,pU as c2,rU as c3,iH as c4,tU as c5,zH as c6,nU as c7,yU as c8,UU as c9,YF as ca,QF as cb,cE as cc,$H as cd,$U as ce,jU as cf,zU as cg,qU as ch,WH as ci,FU as cj,J3 as ck,JB as cl,MU as d,NU as e,kU as f,xr as g,DU as h,PU as i,N as j,eU as k,VU as l,GU as m,QU as n,KU as o,XU as p,WU as q,x as r,pH as s,eF as t,tF as u,nF as v,oF as w,lF as x,dH as y,aF as z};
611
- //# sourceMappingURL=react-vendor-GEfuWOcs.js.map
611
+ //# sourceMappingURL=react-vendor-DPGVcrXi.js.map