@g4rcez/components 2.0.36 → 2.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -11,7 +11,7 @@
11
11
  ${y}px !important;
12
12
  ${b}px !important;
13
13
  }
14
- `),()=>{E.contains(x)&&E.removeChild(x)}},[t]),g.jsx(NN,{isPresent:t,childRef:a,sizeRef:s,children:A.cloneElement(e,{ref:u})})}const LN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=_n(VN),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:v=>{u.set(v,!0);for(const m of u.values())if(!m)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return i&&f&&(p={...p}),S.useMemo(()=>{u.forEach((v,m)=>u.set(m,!1))},[n]),A.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(FN,{isPresent:n,anchorX:s,anchorY:l,root:c,children:e})),g.jsx(cl.Provider,{value:p,children:e})};function VN(){return new Map}function L0(e=!0){const t=S.useContext(cl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const a=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Tl=e=>e.key||"";function V0(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const xn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=L0(a),f=S.useMemo(()=>V0(e),[e]),p=a&&!u?[]:f.map(Tl),v=S.useRef(!0),m=S.useRef(f),h=_n(()=>new Map),y=S.useRef(new Set),[b,x]=S.useState(f),[E,T]=S.useState(f);ll(()=>{v.current=!1,m.current=f;for(let k=0;k<E.length;k++){const P=Tl(E[k]);p.includes(P)?(h.delete(P),y.current.delete(P)):h.get(P)!==!0&&h.set(P,!1)}},[E,p.length,p.join("-")]);const I=[];if(f!==b){let k=[...f];for(let P=0;P<E.length;P++){const _=E[P],F=Tl(_);p.includes(F)||(k.splice(P,0,_),I.push(_))}return i==="wait"&&I.length&&(k=I),T(V0(k)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&E.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(na);return g.jsx(g.Fragment,{children:E.map(k=>{const P=Tl(k),_=a&&!u?!1:f===E||p.includes(P),F=()=>{if(y.current.has(P))return;if(y.current.add(P),h.has(P))h.set(P,!0);else return;let $=!0;h.forEach(N=>{N||($=!1)}),$&&(w?.(),T(m.current),a&&d?.(),r&&r())};return g.jsx(LN,{isPresent:_,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:s,anchorY:l,children:k},P)})})},$N=S.createContext(null);function jN(){const e=S.useRef(!1);return ll(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function zN(){const e=jN(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>gt.postRender(r),[r]),t]}const $0=e=>e===!0,RN=e=>$0(e===!0)||e==="id",BN=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(na),o=S.useContext($N),[i,a]=zN(),s=S.useRef(null),l=r.id||o;s.current===null&&(RN(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:$0(n)&&r.group||D0()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return g.jsx(na.Provider,{value:c,children:e})},j0=S.createContext({strict:!1}),z0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let R0=!1;function HN(){if(R0)return;const e={};for(const t in z0)e[t]={isEnabled:n=>z0[t].some(r=>!!n[r])};Px(e),R0=!0}function B0(){return HN(),kD()}function WN(e){const t=B0();for(const n in e)t[n]={...t[n],...e[n]};Px(t)}const qN=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function El(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qN.has(e)}let H0=e=>!El(e);function W0(e){typeof e=="function"&&(H0=t=>t.startsWith("on")?!El(t):e(t))}try{W0(require("@emotion/is-prop-valid").default)}catch{}function UN(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(H0(o)||n===!0&&El(o)||!t&&!El(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function _f({children:e,isValidProp:t,...n}){t&&W0(t),n={...S.useContext(ii),...n},n.isStatic=_n(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return g.jsx(ii.Provider,{value:r,children:e})}const kl=S.createContext({});function GN(e,t){if(vl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ha(n)?n:void 0,animate:ha(r)?r:void 0}}return e.inherit!==!1?t:{}}function YN(e){const{initial:t,animate:n}=GN(e,S.useContext(kl));return S.useMemo(()=>({initial:t,animate:n}),[q0(t),q0(n)])}function q0(e){return Array.isArray(e)?e.join(" "):e}const Mf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function U0(e,t,n){for(const r in t)!zt(t[r])&&!Hx(r,n)&&(e[r]=t[r])}function KN({transformTemplate:e},t){return S.useMemo(()=>{const n=Mf();return kf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZN(e,t){const n=e.style||{},r={};return U0(r,n,e),Object.assign(r,KN(e,t)),r}function XN(e,t){const n={},r=ZN(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const G0=()=>({...Mf(),attrs:{}});function QN(e,t,n,r){const o=S.useMemo(()=>{const i=G0();return qx(i,t,Gx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};U0(i,e.style,e),o.style={...i,...o.style}}return o}const JN=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Df(e){return typeof e!="string"||e.includes("-")?!1:!!(JN.indexOf(e)>-1||/[A-Z]/u.test(e))}function e2(e,t,n,{latestValues:r},o,i=!1,a){const l=(a??Df(e)?QN:XN)(t,r,o,e),c=UN(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>zt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function t2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:n2(n,r,o,e),renderState:t()}}function n2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=wl(i[f]);let{initial:a,animate:s}=e;const l=vl(e),c=Ix(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!gl(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const v=af(e,f[p]);if(v){const{transitionEnd:m,transition:h,...y}=v;for(const b in y){let x=y[b];if(Array.isArray(x)){const E=u?x.length-1:0;x=x[E]}x!==null&&(o[b]=x)}for(const b in m)o[b]=m[b]}}}return o}const Y0=e=>(t,n)=>{const r=S.useContext(kl),o=S.useContext(cl),i=()=>t2(e,t,r,o);return n?i():_n(i)},r2=Y0({scrapeMotionValuesFromProps:If,createRenderState:Mf}),o2=Y0({scrapeMotionValuesFromProps:Yx,createRenderState:G0}),i2=Symbol.for("motionComponentSymbol");function a2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const K0=S.createContext({});function ya(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function s2(e,t,n,r,o,i){const{visualElement:a}=S.useContext(kl),s=S.useContext(j0),l=S.useContext(cl),c=S.useContext(ii).reducedMotion,u=S.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,f=S.useContext(K0);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&l2(u.current,n,o,f);const p=S.useRef(!1);S.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const v=n[ax],m=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return ll(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),m.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),m.current=!1),d.enteringChildren=void 0)}),d}function l2(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Z0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&ya(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Z0(e){if(e)return e.options.allowProjection!==!1?e.projection:Z0(e.parent)}function Nf(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&WN(r);const i=n?n==="svg":Df(e),a=i?o2:r2;function s(c,u){let d;const f={...S.useContext(ii),...c,layoutId:c2(c)},{isStatic:p}=f,v=YN(c),m=a(c,p);if(!p&&tb){u2(f,r);const h=d2(f);d=h.MeasureLayout,v.visualElement=s2(e,m,f,o,h.ProjectionNode,i)}return g.jsxs(kl.Provider,{value:v,children:[d&&v.visualElement?g.jsx(d,{visualElement:v.visualElement,...f}):null,e2(e,c,a2(m,v.visualElement,u),m,p,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(s);return l[i2]=e,l}function c2({layoutId:e}){const t=S.useContext(na).id;return t&&e!==void 0?t+"-"+e:e}function u2(e,t){const n=S.useContext(j0).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Yo(!1,r,"lazy-strict-mode"):dn(!1,r,"lazy-strict-mode")}}function d2(e){const t=B0(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function f2(e,t){if(typeof Proxy>"u")return Nf;const n=new Map,r=(i,a)=>Nf(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&kd(!1,"motion() is deprecated. Use motion.create() instead."),r(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Nf(a,void 0,e,t)),n.get(a))})}const p2=(e,t)=>t.isSVG??Df(e)?new Kx(t):new Wx(t,{allowProjection:e!==S.Fragment});class h2 extends Dr{constructor(t){super(t),t.animationState||(t.animationState=UD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let m2=0;class g2 extends Dr{constructor(){super(...arguments),this.id=m2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const v2={animation:{Feature:h2},exit:{Feature:g2}};function ba(e){return{point:{x:e.pageX,y:e.pageY}}}const y2=e=>t=>gf(t)&&e(t,ba(t));function xa(e,t,n,r){return va(e,t,y2(n),r)}const X0=({current:e})=>e?e.ownerDocument.defaultView:null,Q0=(e,t)=>Math.abs(e-t);function b2(e,t){const n=Q0(e.x,t.x),r=Q0(e.y,t.y);return Math.sqrt(n**2+r**2)}const J0=new Set(["auto","scroll"]);class ew{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Lf(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,m=b2(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!m)return;const{point:h}=p,{timestamp:y}=Kt;this.history.push({...h,timestamp:y});const{onStart:b,onMove:x}=this.handlers;v||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Ff(v,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:m,onSessionEnd:h,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Lf(p.type==="pointercancel"?this.lastMoveEventInfo:Ff(v,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,b),h&&h(p,b)},!gf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const l=ba(t),c=Ff(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Kt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Lf(c,this.history)),this.removeListeners=oa(xa(this.contextWindow,"pointermove",this.handlePointerMove),xa(this.contextWindow,"pointerup",this.handlePointerUp),xa(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(J0.has(r.overflowX)||J0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hr(this.updatePoint)}}function Ff(e,t){return t?{point:t(e.point)}:e}function tw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Lf({point:e},t){return{point:e,delta:tw(e,nw(t)),offset:tw(e,x2(t)),velocity:w2(t,.1)}}function x2(e){return e[0]}function nw(e){return e[e.length-1]}function w2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=nw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const i=yn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function S2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?yt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?yt(n,e,r.max):Math.min(e,n)),e}function rw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function T2(e,{top:t,left:n,bottom:r,right:o}){return{x:rw(e.x,n,o),y:rw(e.y,t,r)}}function ow(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function E2(e,t){return{x:ow(e.x,t.x),y:ow(e.y,t.y)}}function k2(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=Ko(t.min,t.max-r,e.min):r>o&&(n=Ko(e.min,e.max-o,t.min)),Kn(0,1,n)}function C2(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Vf=.35;function I2(e=Vf){return e===!1?e=0:e===!0&&(e=Vf),{x:iw(e,"left","right"),y:iw(e,"top","bottom")}}function iw(e,t,n){return{min:aw(e,t),max:aw(e,n)}}function aw(e,t){return typeof e=="number"?e:e[t]||0}const A2=new WeakMap;class P2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(ba(d).point)):this.pauseAnimation()},a=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:v,onDragStart:m}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=fD(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bn(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Zn.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const E=x.layout.layoutBox[y];E&&(b=en(E)*(parseFloat(b)/100))}}this.originPoint[y]=b}),m&&gt.postRender(()=>m(d,f)),lf(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:m,onDrag:h}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=O2(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),h&&h(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>bn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ew(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:X0(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&gt.postRender(()=>s(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Cl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=S2(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&ya(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=T2(r.layoutBox,t):this.constraints=!1,this.elastic=I2(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&bn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=C2(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ya(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=PD(r,o.root,this.visualElement.getTransformPagePoint());let a=E2(o.layout.layoutBox,i);if(n){const s=n(CD(a));this.hasMutatedConstraints=!!s,s&&(a=Mx(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=bn(u=>{if(!Cl(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return lf(this.visualElement,t),r.start(of(t,r,0,n,this.visualElement,!1))}stopAnimation(){bn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){bn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){bn(n=>{const{drag:r}=this.getProps();if(!Cl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-yt(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ya(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};bn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=k2({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),bn(a=>{if(!Cl(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(yt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;A2.set(this.visualElement,this);const t=this.visualElement.current,n=xa(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==t&&xx(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ya(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),gt.read(r);const a=va(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(bn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Vf,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Cl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function O2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class _2 extends Dr{constructor(t){super(t),this.removeGroupControls=vn,this.removeListeners=vn,this.controls=new P2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const sw=e=>(t,n)=>{e&&gt.postRender(()=>e(t,n))};class M2 extends Dr{constructor(){super(...arguments),this.removePointerDownListener=vn}onPointerDown(t){this.session=new ew(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:X0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:sw(t),onStart:sw(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&gt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=xa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let $f=!1;class D2 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),$f&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Sl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,$f=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||gt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),mf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;$f=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function lw(e){const[t,n]=L0(),r=S.useContext(na);return g.jsx(D2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(K0),isPresent:t,safeToRemove:n})}const N2={pan:{Feature:M2},drag:{Feature:_2,ProjectionNode:N0,MeasureLayout:lw}};function cw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&gt.postRender(()=>i(t,ba(t)))}class F2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=pD(t,(n,r)=>(cw(this.node,r,"Start"),o=>cw(this.node,o,"End"))))}unmount(){}}class L2 extends Dr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oa(va(this.node.current,"focus",()=>this.onFocus()),va(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function uw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&gt.postRender(()=>i(t,ba(t)))}class V2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=gD(t,(n,r)=>(uw(this.node,r,"Start"),(o,{success:i})=>uw(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jf=new WeakMap,zf=new WeakMap,$2=e=>{const t=jf.get(e.target);t&&t(e)},j2=e=>{e.forEach($2)};function z2({root:e,...t}){const n=e||document;zf.has(n)||zf.set(n,{});const r=zf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(j2,{root:e,...t})),r[o]}function R2(e,t,n){const r=z2(t);return jf.set(e,n),r.observe(e),()=>{jf.delete(e),r.unobserve(e)}}const B2={some:0,all:1};class H2 extends Dr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:B2[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return R2(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(W2(t,n))&&this.startObserver()}unmount(){}}function W2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const q2={...v2,...{inView:{Feature:H2},tap:{Feature:V2},focus:{Feature:L2},hover:{Feature:F2}},...N2,...{layout:{ProjectionNode:N0,MeasureLayout:lw}}},Re=f2(q2,p2);function U2(e){return S.useEffect(()=>()=>e(),[])}function po(e){const t=_n(()=>co(e)),{isStatic:n}=S.useContext(ii);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function dw(e,t){const n=po(t()),r=()=>n.set(t());return r(),ll(()=>{const o=()=>gt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),hr(r)}}),n}function G2(e){fa.current=[],e();const t=dw(fa.current,e);return fa.current=void 0,t}function Y2(e,t,n,r){if(typeof e=="function")return G2(e);const i=typeof t=="function"?t:bD(t,n,r);return Array.isArray(e)?fw(e,i):fw([e],([a])=>i(a))}function fw(e,t){const n=_n(()=>[]);return dw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Rf(e){return typeof e=="object"&&!Array.isArray(e)}function pw(e,t,n,r){return e==null?[]:typeof e=="string"&&Rf(t)?hx(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function K2(e,t,n){return e*(t+1)}function hw(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Z2(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ra(e,o),r--)}}function X2(e,t,n,r,o,i){Z2(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:yt(o,i,r[a]),easing:vb(n,a)})}function Q2(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function J2(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const eF="easeInOut",tF=20;function nF(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<e.length;p++){const v=e[p];if(typeof v=="string"){c.set(v,d);continue}else if(!Array.isArray(v)){c.set(v.name,hw(d,v.at,u,c));continue}let[m,h,y={}]=v;y.at!==void 0&&(d=hw(d,y.at,u,c));let b=0;const x=(E,T,I,w=0,k=0)=>{const P=rF(E),{delay:_=0,times:F=Rb(P),type:$=t.type||"keyframes",repeat:N,repeatType:O,repeatDelay:D=0,...z}=T;let{ease:M=t.ease||"easeOut",duration:C}=T;const V=typeof _=="function"?_(w,k):_,j=P.length,B=ef($)?$:o?.[$||"keyframes"];if(j<=2&&B){let ne=100;if(j===2&&aF(P)){const G=P[1]-P[0];ne=Math.abs(G)}const re={...t,...z};C!==void 0&&(re.duration=Mn(C));const ee=Lb(re,ne,B);M=ee.ease,C=ee.duration}C??(C=i);const H=d+V;F.length===1&&F[0]===0&&(F[1]=1);const q=F.length-P.length;if(q>0&&zb(F,q),P.length===1&&P.unshift(null),N){dn(N<tF,"Repeat count too high, must be less than 20","repeat-count-high"),C=K2(C,N);const ne=[...P],re=[...F];M=Array.isArray(M)?[...M]:[M];const ee=[...M];for(let G=0;G<N;G++){P.push(...ne);for(let Y=0;Y<ne.length;Y++)F.push(re[Y]+(G+1)),M.push(Y===0?"linear":vb(ee,Y-1))}Q2(F,N)}const W=H+C;X2(I,P,M,F,H,W),b=Math.max(V+C,b),f=Math.max(W,f)};if(zt(m)){const E=mw(m,s);x(h,y,gw("default",E))}else{const E=pw(m,h,r,l),T=E.length;for(let I=0;I<T;I++){h=h,y=y;const w=E[I],k=mw(w,s);for(const P in h)x(h[P],oF(y,P),gw(P,k),I,T)}}u=d,d+=b}return s.forEach((p,v)=>{for(const m in p){const h=p[m];h.sort(J2);const y=[],b=[],x=[];for(let w=0;w<h.length;w++){const{at:k,value:P,easing:_}=h[w];y.push(P),b.push(Ko(0,f,k)),x.push(_||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),x.unshift(eF)),b[b.length-1]!==1&&(b.push(1),y.push(null)),a.has(v)||a.set(v,{keyframes:{},transition:{}});const E=a.get(v);E.keyframes[m]=y;const{type:T,...I}=t;E.transition[m]={...I,duration:f,ease:x,times:b,...n}}}),a}function mw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function gw(e,t){return t[e]||(t[e]=[]),t[e]}function rF(e){return Array.isArray(e)?e:[e]}function oF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const iF=e=>typeof e=="number",aF=e=>e.every(iF);function sF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=yf(e)&&!Tx(e)?new Kx(t):new Wx(t);n.mount(e),pa.set(e,n)}function lF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new LD(t);n.mount(e),pa.set(e,n)}function cF(e,t){return zt(e)||typeof e=="number"||typeof e=="string"&&!Rf(t)}function vw(e,t,n,r){const o=[];if(cF(e,t))o.push(w0(e,Rf(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=pw(e,t,r),a=i.length;dn(!!a,"No valid elements provided.","no-valid-elements");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?sF:lF;pa.has(l)||c(l);const u=pa.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...uf(u,{...t,transition:d},{}))}}return o}function uF(e,t,n){const r=[];return nF(e,t,n,{spring:ua}).forEach(({keyframes:i,transition:a},s)=>{r.push(...vw(s,i,a))}),r}function dF(e){return Array.isArray(e)&&e.some(Array.isArray)}function yw(e){function t(n,r,o){let i=[],a;if(dF(n))i=uF(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(a=l),i=vw(n,r,c,e)}const s=new LM(i);return a&&s.finished.then(a),e&&(e.animations.push(s),s.finished.then(()=>{ra(e.animations,s)})),s}return t}const bw=yw();function fF(){const e=_n(()=>({current:null,animations:[]})),t=_n(()=>yw(e));return U2(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class pF{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const hF=()=>new pF;function mF(){return _n(hF)}const xw=S.createContext(null);function gF(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=yt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?p_(e,o,o+i):e}function vF({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=_n(()=>Re[t]),l=[],c=S.useRef(!1),u=S.useRef(null);dn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(v,m)=>{const h=l.findIndex(y=>v===y.value);h!==-1?l[h].layout=m[n]:l.push({value:v,layout:m[n]}),l.sort(bF)},updateOrder:(v,m,h)=>{if(c.current)return;const y=gF(l,v,m,h);l!==y&&(c.current=!0,r(y.map(yF).filter(b=>o.indexOf(b)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=v=>{u.current=v,typeof a=="function"?a(v):a&&(a.current=v)},p={overflowAnchor:"none",...i.style};return g.jsx(s,{...i,style:p,ref:f,ignoreStrict:!0,children:g.jsx(xw.Provider,{value:d,children:e})})}const ww=S.forwardRef(vF);function yF(e){return e.value}function bF(e,t){return e.layout.min-t.layout.min}const Il=50,Sw=25,xF=new Set(["auto","scroll"]),wa=new WeakMap,Sa=new WeakMap;let Ta=null;function wF(){if(Ta){const e=Bf(Ta,"y");e&&(Sa.delete(e),wa.delete(e));const t=Bf(Ta,"x");t&&t!==e&&(Sa.delete(t),wa.delete(t)),Ta=null}}function SF(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return xF.has(r)}function Bf(e,t){let n=e?.parentElement;for(;n;){if(SF(n,t))return n;n=n.parentElement}return null}function TF(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,a=e-o,s=i-e;if(a<Il){const l=1-a/Il;return{amount:-Sw*l*l,edge:"start"}}else if(s<Il){const l=1-s/Il;return{amount:Sw*l*l,edge:"end"}}return{amount:0,edge:null}}function EF(e,t,n,r){if(!e)return;Ta=e;const o=Bf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:a,edge:s}=TF(i,o,n);if(s===null){Sa.delete(o),wa.delete(o);return}if(Sa.get(o)!==s){if(!(s==="start"&&r<0||s==="end"&&r>0))return;Sa.set(o,s);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;wa.set(o,u)}if(a>0){const c=wa.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=a:o.scrollTop+=a}function Tw(e,t=0){return zt(e)?e:po(t)}function kF({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:a=!0,...s},l){const c=_n(()=>Re[r]),u=S.useContext(xw),d={x:Tw(t.x),y:Tw(t.y)},f=Y2([d.x,d.y],([y,b])=>y||b?1:"unset");dn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:v,updateOrder:m,groupRef:h}=u;return g.jsx(c,{drag:p,...s,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:a,onDrag:(y,b)=>{const{velocity:x,point:E}=b,T=d[p].get();m(n,T,x[p]),EF(h.current,E[p],p,x[p]),o&&o(y,b)},onDragEnd:(y,b)=>{wF(),i&&i(y,b)},onLayoutMeasure:y=>{v(n,y)},ref:l,ignoreStrict:!0,children:e})}const Ew=S.forwardRef(kF);var Al={exports:{}},Hf={},Pl={exports:{}},Wf={};var kw;function CF(){if(kw)return Wf;kw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var p=f(),v=r({inst:{value:p,getSnapshot:f}}),m=v[0].inst,h=v[1];return i(function(){m.value=p,m.getSnapshot=f,l(m)&&h({inst:m})},[d,p,f]),o(function(){return l(m)&&h({inst:m}),d(function(){l(m)&&h({inst:m})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Wf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Wf}var qf={};var Cw;function IF(){return Cw||(Cw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=v();if(!d){var h=v();i(m,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=a({inst:{value:m,getSnapshot:v}});var y=h[0].inst,b=h[1];return l(function(){y.value=m,y.getSnapshot=v,n(y)&&b({inst:y})},[p,m,v]),s(function(){return n(y)&&b({inst:y}),p(function(){n(y)&&b({inst:y})})},[p]),c(m),m}function n(p){var v=p.getSnapshot;p=p.value;try{var m=v();return!i(p,m)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;qf.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),qf}var Iw;function Aw(){return Iw||(Iw=1,process.env.NODE_ENV==="production"?Pl.exports=CF():Pl.exports=IF()),Pl.exports}var Pw;function AF(){if(Pw)return Hf;Pw=1;var e=S,t=Aw();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Hf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=s(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&m.hasValue){var w=m.value;if(p(w,I))return E=w}return E=I}if(w=E,r(x,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(x=I,w):(x=I,E=k)}var b=!1,x,E,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,f,p]);var h=o(c,v[0],v[1]);return a(function(){m.hasValue=!0,m.value=h},[h]),l(h),h},Hf}var Uf={};var Ow;function PF(){return Ow||(Ow=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=Aw(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Uf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=s(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&m.hasValue){var w=m.value;if(p(w,I))return E=w}return E=I}if(w=E,r(x,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(x=I,w):(x=I,E=k)}var b=!1,x,E,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,f,p]);var h=o(c,v[0],v[1]);return a(function(){m.hasValue=!0,m.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Uf}var _w;function OF(){return _w||(_w=1,process.env.NODE_ENV==="production"?Al.exports=AF():Al.exports=PF()),Al.exports}OF();var ai=function(){return ai=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ai.apply(this,arguments)};function Ea(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Mw(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var si=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},_F=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},MF=function(e){return Object.entries(e)},Dw=function(e){return e instanceof Promise},Nw=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},ai(ai({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},DF=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,Mw([],Ea(a),!1)),u=function(d,f){return n(function(p){return Nw(d,p,i,f)})};return Dw(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},NF=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,Mw([],Ea(a),!1)),c=function(u){return n(function(d){return Nw(u,d,i,o.current)})};return Dw(l)?l.then(function(u){return c(u)}):c(l)}},Gf=function(e,t,n){var r,o,i,a=Ea(S.useState(function(){return e}),2),s=a[0],l=a[1],c=si(s),u=si((r=n?.props)!==null&&r!==void 0?r:{}),d=si(t),f=si((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=si((i=n?.interceptor)!==null&&i!==void 0?i:[]),v=S.useRef(e),m=_F(s),h=si(m),y=S.useRef(null);S.useEffect(function(){if(y.current!==null){var E=y.current;f.current.forEach(function(T){T(s,m,E)})}},[s,f,m]);var b=Ea(S.useState(function(){var E=function(){return u.current},T=d.current({props:E,state:function(){return c.current},initialState:v.current,previousState:function(){return h.current}});return MF(T).reduce(function(I,w){var k,P=Ea(w,2),_=P[0],F=P[1];return ai(ai({},I),(k={},k[_]=n?.debug?DF(_,F,l,E,y,p.current):NF(_,F,l,E,y,p.current),k))},{})}),1),x=b[0];return[s,x,u.current]},FF=Object.defineProperty,Fw=Object.getOwnPropertySymbols,LF=Object.prototype.hasOwnProperty,VF=Object.prototype.propertyIsEnumerable,Lw=(e,t,n)=>t in e?FF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$F=(e,t)=>{for(var n in t||(t={}))LF.call(t,n)&&Lw(e,n,t[n]);if(Fw)for(var n of Fw(t))VF.call(t,n)&&Lw(e,n,t[n]);return e},Yf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},jF=(e,t,n,r)=>_l(Yf,e,t,n,r),li=e=>typeof e=="object",Nr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!li(e)&&!li(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Nr(e[r],t[r]))},zF=(e,t)=>(li(e)||Array.isArray(e))&&t?e[t]:e,RF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ol=e=>/[0-9.]+/.test(e),Vw=e=>["string","number"].includes(typeof e),$w=e=>e==null||e?.length===0||e==="",jw={eq:Nr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:$w,notEmpty:e=>!$w(e),in:(e,t)=>Yf(t,n=>Nr(e,n)),notIn:(e,t)=>zw(t,n=>!Nr(e,n))},BF=e=>{if(e in jw)return jw[e];throw new Error("Linq - Symbol not found")},ci=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},_l=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=BF(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},HF=(e,t,n,r)=>_l(ci,e,t,n,r),zw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},WF=(e,t,n,r)=>_l(zw,e,t,n,r),Rw=e=>{if(e===null)return null;const t=$F({},e);return Object.keys(t).forEach(n=>t[n]=li(e[n])?Rw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Bw=(e,t)=>{if(li(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1},qF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},UF=e=>ci(e,(t,n,r)=>li(t)?n===r.findIndex(o=>Nr(o,t)):n===r.indexOf(t)),GF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Hw=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},YF=(e,t)=>Hw(e,n=>n[t]),Ww=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},KF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},ZF=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Ol(e)&&Ol(t)?r.map(a=>Number.parseInt(a)):r},Kf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ol(e)&&Ol(t)){const o=[],[i,a]=KF(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return ZF(e,t,r)},XF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Kf(r,o,1):Kf(r,i,Number.parseInt(o,10))}return Vw(e)&&Vw(t)?Kf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Zf=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},qw=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},QF=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},JF=(e,t,n,r)=>_l(QF,e,t,n,r),Uw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(RF(t))},Gw=(e=>(e.Asc="asc",e.Desc="desc",e))(Gw||{}),eL=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),tL=(e,t)=>e.sort(eL(t)),nL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ci(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},rL=class zh{constructor(t=[]){this.array=t}static Range(...t){return XF(...t)}static New(t){return new zh(t)}Where(t,n,r){return this.array=HF(this.array,t,n,r),this}Some(t,n,r){return jF(this.array,t,n,r)}All(t,n,r){return WF(this.array,t,n,r)}Reverse(){return this.array=qw(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=JF(this.array,t,n,r),this}Distinct(){return this.array=UF(this.array),this}First(t){return t===void 0?this.array[0]:GF(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?Zf((n,r)=>n+r,0,this.array):Zf((n,r)=>n+zF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return YF(this.array,t)}GroupWith(t){return Hw(this.array,t)}Except(t){return ci(this.array,n=>!Bw(t,n))}Intersect(t){return ci(this.array,n=>Bw(t,n))}OrderBy(t,n){let r;return r=t?Uw(this.array,t):this.array.toSorted(),this.array=n==="desc"?qw(r):r,this}Includes(t){return Yf(this.array,n=>Nr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return Zf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Ww(this.array,n=>[t,n]))}Zip(t,n){return Ww(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ci(this.array,t).length}Get(t){return this.array[t]}Clone(){return new zh(Rw(this.array))}ToObject(t){return qF(this.array,t)}Sort(t){return Array.isArray(t)?tL(this.array,t):Uw(this.array,t)}Unique(t){return nL(this.array,t)}},Yw=rL;const Ml=0,Fr=1,ui=2,Kw=4;function Zw(e){return()=>e}function oL(e){e()}function ka(e,t){return n=>e(t(n))}function Xw(e,t){return()=>e(t)}function iL(e,t){return n=>e(t,n)}function Xf(e){return e!==void 0}function aL(...e){return()=>{e.map(oL)}}function di(){}function Dl(e,t){return t(e),e}function sL(e,t){return t(e)}function bt(...e){return e}function st(e,t){return e(Fr,t)}function je(e,t){e(Ml,t)}function Qf(e){e(ui)}function Tt(e){return e(Kw)}function Ie(e,t){return st(e,iL(t,Ml))}function Fn(e,t){const n=e(Fr,r=>{n(),t(r)});return n}function Qw(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Jw(e,t){return e===t}function xt(e=Jw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function _e(e){return t=>n=>{e(n)&&t(n)}}function be(e){return t=>ka(t,e)}function Xn(e){return t=>()=>{t(e)}}function ce(e,...t){const n=lL(...t);return((r,o)=>{switch(r){case ui:Qf(e);return;case Fr:return st(e,n(o))}})}function Qn(e,t){return n=>r=>{n(t=e(t,r))}}function ho(e){return t=>n=>{e>0?e--:t(n)}}function mr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Be(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function lL(...e){return t=>e.reduceRight(sL,t)}function cL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Fr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),di);case ui:r(),n=null;return}}}function pe(e){let t=e;const n=Ye();return((r,o)=>{switch(r){case Ml:t=o;break;case Fr:{o(t);break}case Kw:return t}return n(r,o)})}function Qt(e,t){return Dl(pe(t),n=>Ie(e,n))}function Ye(){const e=[];return((t,n)=>{switch(t){case Ml:e.slice().forEach(r=>{r(n)});return;case ui:e.splice(0,e.length);return;case Fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function fn(e){return Dl(Ye(),t=>Ie(e,t))}function Qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:uL(),singleton:n}}const uL=()=>Symbol();function dL(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function Vt(...e){const t=Ye(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{n[a]=l,r=r|s,r===o&&je(t,n)})}),function(i,a){switch(i){case ui:{Qf(t);return}case Fr:return r===o&&a(n),st(t,a)}}}function Me(e,t=Jw){return ce(e,xt(t))}function Jf(...e){return function(t,n){switch(t){case ui:return;case Fr:return aL(...e.map(r=>st(r,n)))}}}var sn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(sn||{});const fL={0:"debug",3:"error",1:"log",2:"warn"},pL=()=>typeof globalThis>"u"?window:globalThis,Lr=Qe(()=>{const e=pe(3);return{log:pe((t,n,r=1)=>{var o;const i=(o=pL().VIRTUOSO_LOG_LEVEL)!=null?o:Tt(e);r>=i&&console[fL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Jn(e,t,n){return ep(e,t,n).callbackRef}function ep(e,t,n){const r=S.useRef(null);let o=a=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}):null,[e,n]);return o=a=>{a&&t?(i?.observe(a),r.current=a):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function e1(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=hL(u.children,t,s?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let v;p&&(v=f.ownerDocument.defaultView);const m=a?s?a.scrollLeft:a.scrollTop:p?s?v.scrollX||v.document.documentElement.scrollLeft:v.scrollY||v.document.documentElement.scrollTop:s?f.scrollLeft:f.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:p?s?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight:s?f.scrollWidth:f.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:p?s?v.innerWidth:v.innerHeight:s?f.offsetWidth:f.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(m,0),viewportHeight:y}),i?.(s?t1("column-gap",getComputedStyle(u).columnGap,o):t1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return ep(c,n,l)}function hL(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},sn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function t1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}function tp(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),v=c.top-p.top;f=p.height-Math.max(0,v),d=v+t.scrollTop}else{const p=a.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=ep(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const tn=Qe(()=>{const e=Ye(),t=Ye(),n=pe(0),r=Ye(),o=pe(0),i=Ye(),a=Ye(),s=pe(0),l=pe(0),c=pe(0),u=pe(0),d=Ye(),f=Ye(),p=pe(!1),v=pe(!1),m=pe(!1);return Ie(ce(e,be(({scrollTop:h})=>h)),t),Ie(ce(e,be(({scrollHeight:h})=>h)),a),Ie(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:v,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Ca={lvl:0};function n1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ft(e){return e===Ca}function Ia(e,t){if(!ft(e))return t===e.k?e.v:t<e.k?Ia(e.l,t):Ia(e.r,t)}function Ln(e,t,n="k"){if(ft(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ln(e.l,t,n)}function pn(e,t,n){return ft(e)?i1(t,n,1):t===e.k?Rt(e,{k:t,v:n}):t<e.k?a1(Rt(e,{l:pn(e.l,t,n)})):a1(Rt(e,{r:pn(e.r,t,n)}))}function fi(){return Ca}function pi(e,t,n){if(ft(e))return[];const r=Ln(e,t)[0];return mL(rp(e,r,n))}function np(e,t){if(ft(e))return Ca;const{k:n,l:r,r:o}=e;if(t===n){if(ft(r))return o;if(ft(o))return r;{const[i,a]=o1(r);return Nl(Rt(e,{k:i,l:r1(r),v:a}))}}else return t<n?Nl(Rt(e,{l:np(r,t)})):Nl(Rt(e,{r:np(o,t)}))}function mo(e){return ft(e)?[]:[...mo(e.l),{k:e.k,v:e.v},...mo(e.r)]}function rp(e,t,n){if(ft(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(rp(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(rp(i,t,n))),s}function Nl(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(op(t))return s1(Rt(e,{lvl:n-1}));if(!ft(t)&&!ft(t.r))return Rt(t.r,{l:Rt(t,{r:t.r.l}),lvl:n,r:Rt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(op(e))return ip(Rt(e,{lvl:n-1}));if(!ft(r)&&!ft(r.l)){const o=r.l,i=op(o)?r.lvl-1:r.lvl;return Rt(o,{l:Rt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:ip(Rt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Rt(e,t){return i1(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function r1(e){return ft(e.r)?e.l:Nl(Rt(e,{r:r1(e.r)}))}function op(e){return ft(e)||e.lvl>e.r.lvl}function o1(e){return ft(e.r)?[e.k,e.v]:o1(e.r)}function i1(e,t,n,r=Ca,o=Ca){return{k:e,l:r,lvl:n,r:o,v:t}}function a1(e){return ip(s1(e))}function s1(e){const{l:t}=e;return!ft(t)&&t.lvl===e.lvl?Rt(t,{r:Rt(e,{l:t.r})}):e}function ip(e){const{lvl:t,r:n}=e;return!ft(n)&&!ft(n.r)&&n.lvl===t&&n.r.lvl===t?Rt(n,{l:Rt(e,{r:n.l}),lvl:t+1}):e}function mL(e){return n1(e,({k:t,v:n})=>({index:t,value:n}))}function l1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Aa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const ap=Qe(()=>({recalcInProgress:pe(!1)}),[],{singleton:!0});function c1(e,t,n){return e[Fl(e,t,n)]}function Fl(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function gL(e,t,n,r){const o=Fl(e,t,r),i=Fl(e,n,r,o);return e.slice(o,i+1)}function Vn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ll(e){return!ft(e.groupOffsetTree)}function sp({index:e},t){return t===e?0:t<e?-1:1}function vL(){return{groupIndices:[],groupOffsetTree:fi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:fi()}}function yL(e,t){let n=ft(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ft(e)){e=pn(e,0,i);continue}const s=pi(e,a-1,o+1);if(s.some(kL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of s)l?(o>=d||i===f)&&(e=np(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=pn(e,o+1,f));c&&(e=pn(e,a,i))}return[e,n]}function bL(e){return typeof e.groupIndex<"u"}function xL({offset:e},t){return t===e?0:t<e?-1:1}function Pa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=c1(t,e,sp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function u1(e,t){if(!Ll(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function d1(e,t,n){if(bL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=u1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function wL(e,t,n,r=0){return r>0&&(t=Math.max(t,c1(e,r,sp).offset)),n1(gL(e,t,n,xL),EL)}function SL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,sn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ft(i)&&t.length===2){const f=t[0].size,p=t[1].size;a=n.reduce((v,m)=>pn(pn(v,m,f),m+1,p),a)}else[a,s]=yL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=lp(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>pn(f,p,Pa(p,d,o)),fi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function TL(e){return mo(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function f1(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function lp(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Fl(o,t-1,sp),s=o[l].offset;const c=Ln(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of pi(n,t,1/0)){const d=c-i,f=d*a+s+d*r;o.push({index:c,offset:f,size:u}),i=c,s=f,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function EL(e){return{index:e.index,value:e}}function kL(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const CL={offsetHeight:"height",offsetWidth:"width"},er=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ye(),r=Ye(),o=Qt(r,0),i=Ye(),a=Ye(),s=pe(0),l=pe([]),c=pe(void 0),u=pe(void 0),d=pe(void 0),f=pe(void 0),p=pe((w,k)=>Vn(w,CL[k])),v=pe(void 0),m=pe(0),h=vL(),y=Qt(ce(n,Be(l,e,m),Qn(SL,h),xt()),h),b=Qt(ce(l,xt(),Qn((w,k)=>({current:k,prev:w.current}),{current:[],prev:[]}),be(({prev:w})=>w)),[]);Ie(ce(l,_e(w=>w.length>0),Be(y,m),be(([w,k,P])=>{const _=w.reduce((F,$,N)=>pn(F,$,Pa($,k.offsetTree,P)||N),fi());return{...k,groupIndices:w,groupOffsetTree:_}})),y),Ie(ce(r,Be(y),_e(([w,{lastIndex:k}])=>w<k),be(([w,{lastIndex:k,lastSize:P}])=>[{endIndex:k,size:P,startIndex:w}])),n),Ie(c,u);const x=Qt(ce(c,be(w=>w===void 0)),!0);Ie(ce(u,_e(w=>w!==void 0&&ft(Tt(y).sizeTree)),be(w=>{const k=Tt(d),P=Tt(l).length>0;return k?P?[{endIndex:0,size:k,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ie(ce(f,_e(w=>w!==void 0&&w.length>0&&ft(Tt(y).sizeTree)),be(w=>{const k=[];let P=w[0],_=0;for(let F=1;F<w.length;F++){const $=w[F];$!==P&&(k.push({endIndex:F-1,size:P,startIndex:_}),P=$,_=F)}return k.push({endIndex:w.length-1,size:P,startIndex:_}),k})),n),Ie(ce(l,Be(d,u),_e(([,w,k])=>w!==void 0&&k!==void 0),be(([w,k,P])=>{const _=[];for(let F=0;F<w.length;F++){const $=w[F],N=w[F+1];_.push({startIndex:$,endIndex:$,size:k}),N!==void 0&&_.push({startIndex:$+1,endIndex:N-1,size:P})}return _})),n);const E=fn(ce(n,Be(y),Qn(({sizes:w},[k,P])=>({changed:P!==w,sizes:P}),{changed:!1,sizes:h}),be(w=>w.changed)));st(ce(s,Qn((w,k)=>({diff:w.prev-k,prev:k}),{diff:0,prev:0}),be(w=>w.diff)),w=>{const{groupIndices:k}=Tt(y);if(w>0)je(t,!0),je(i,w+f1(w,k));else if(w<0){const P=Tt(b);P.length>0&&(w-=f1(-w,P)),je(a,w)}}),st(ce(s,Be(e)),([w,k])=>{w<0&&k("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},sn.ERROR)});const T=fn(i);Ie(ce(i,Be(y),be(([w,k])=>{const P=k.groupIndices.length>0,_=[],F=k.lastSize;if(P){const $=Ia(k.sizeTree,0);let N=0,O=0;for(;N<w;){const z=k.groupIndices[O],M=k.groupIndices.length===O+1?1/0:k.groupIndices[O+1]-z-1;_.push({endIndex:z,size:$,startIndex:z}),_.push({endIndex:z+1+M-1,size:F,startIndex:z+1}),O++,N+=M+1}const D=mo(k.sizeTree);return N!==w&&D.shift(),D.reduce((z,{k:M,v:C})=>{let V=z.ranges;return z.prevSize!==0&&(V=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:C,ranges:V}},{prevIndex:w,prevSize:0,ranges:_}).ranges}return mo(k.sizeTree).reduce(($,{k:N,v:O})=>({prevIndex:N+w,prevSize:O,ranges:[...$.ranges,{endIndex:N+w-1,size:$.prevSize,startIndex:$.prevIndex}]}),{prevIndex:0,prevSize:F,ranges:[]}).ranges})),n);const I=fn(ce(a,Be(y,m),be(([w,{offsetTree:k},P])=>{const _=-w;return Pa(_,k,P)})));return Ie(ce(a,Be(y,m),be(([w,k,P])=>{if(k.groupIndices.length>0){if(ft(k.sizeTree))return k;let _=fi();const F=Tt(b);let $=0,N=0,O=0;for(;$<-w;){O=F[N];const D=F[N+1]-O-1;N++,$+=D+1}if(_=mo(k.sizeTree).reduce((D,{k:z,v:M})=>pn(D,Math.max(0,z+w),M),_),$!==-w){const D=Ia(k.sizeTree,O);_=pn(_,0,D);const z=Ln(k.sizeTree,-w+1)[1];_=pn(_,1,z)}return{...k,sizeTree:_,...lp(k.offsetTree,0,_,P)}}else{const _=mo(k.sizeTree).reduce((F,{k:$,v:N})=>pn(F,Math.max(0,$+w),N),fi());return{...k,sizeTree:_,...lp(k.offsetTree,0,_,P)}}})),y),{beforeUnshiftWith:T,data:v,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,fixedGroupSize:d,gap:m,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:E,shiftWith:a,shiftWithOffset:I,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},bt(Lr,ap),{singleton:!0});function IL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const p1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ye(),a=Ye(),s=fn(ce(i,be(IL)));return Ie(ce(s,be(l=>l.totalCount)),n),Ie(ce(s,be(l=>l.groupIndices)),e),Ie(ce(Vt(o,t,r),_e(([l,c])=>Ll(c)),be(([l,c,u])=>Ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),be(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},bt(er,tn)),Vr=Qe(([{log:e}])=>{const t=pe(!1),n=fn(ce(t,_e(r=>r),xt()));return st(t,r=>{r&&Tt(e)("props updated",{},sn.DEBUG)}),{didMount:n,propsReady:t}},bt(Lr),{singleton:!0}),AL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function h1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!AL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oa=Qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const p=Ye(),v=Ye(),m=pe(0);let h=null,y=null,b=null;function x(){h&&(h(),h=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),je(l,!1)}return Ie(ce(p,Be(n,d,r,m,s,a,f),Be(e,i,o),be(([[E,T,I,w,k,P,_,F],$,N,O])=>{const D=h1(E),{align:z,behavior:M,offset:C}=D,V=w-1,j=d1(D,T,V);let B=Pa(j,T.offsetTree,$)+P;z==="end"?(B+=N+Ln(T.sizeTree,j)[1]-I+O,j===V&&(B+=_)):z==="center"?B+=(N+Ln(T.sizeTree,j)[1]-I+O)/2:B-=k,C&&(B+=C);const H=q=>{x(),q?(F("retrying to scroll to",{location:E},sn.DEBUG),je(p,E)):(je(v,!0),F("list did not change, scroll successful",{},sn.DEBUG))};if(x(),M==="smooth"){let q=!1;b=st(t,W=>{q=q||W}),h=Fn(u,()=>{H(q)})}else h=Fn(ce(t,PL(150)),H);return y=setTimeout(()=>{x()},1200),je(l,!0),F("scrolling from index to",{behavior:M,index:j,top:B},sn.DEBUG),{behavior:M,top:B}})),c),{scrollTargetReached:v,scrollToIndex:p,topListHeight:m}},bt(er,tn,Lr),{singleton:!0});function PL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function cp(e,t){e==0?t():requestAnimationFrame(()=>{cp(e-1,t)})}function up(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const _a=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=pe(!0),l=pe(0),c=pe(!0);return Ie(ce(a,Be(l),_e(([u,d])=>!!d),Xn(!1)),s),Ie(ce(a,Be(l),_e(([u,d])=>!!d),Xn(!1)),c),st(ce(Vt(t,a),Be(s,n,e,c),_e(([[,u],d,{sizeTree:f},p,v])=>u&&(!ft(f)||Xf(p))&&!d&&!v),Be(l)),([,u])=>{Fn(o,()=>{je(c,!0)}),cp(4,()=>{Fn(r,()=>{je(s,!0)}),je(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},bt(er,tn,Oa,Vr),{singleton:!0});function m1(e,t){return Math.abs(e-t)<1.01}const Ma="up",Da="down",OL="none",_L={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},ML=0,Na=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=pe(!1),s=pe(!0),l=Ye(),c=Ye(),u=pe(4),d=pe(ML),f=Qt(ce(Jf(ce(Me(o),ho(1),Xn(!0)),ce(Me(o),ho(1),Xn(!1),Qw(100))),xt()),!1),p=Qt(ce(Jf(ce(n,Xn(!0)),ce(n,Xn(!1),Qw(200))),xt()),!1);Ie(ce(Vt(Me(o),Me(d)),be(([b,x])=>b<=x),xt()),s),Ie(ce(s,mr(50)),c);const v=fn(ce(Vt(r,Me(i),Me(t),Me(e),Me(u)),Qn((b,[{scrollHeight:x,scrollTop:E},T,I,w,k])=>{const P=E+T-x>-k,_={scrollHeight:x,scrollTop:E,viewportHeight:T};if(P){let $,N;return E>b.state.scrollTop?($="SCROLLED_DOWN",N=b.state.scrollTop-E):($="SIZE_DECREASED",N=b.state.scrollTop-E||b.scrollTopDelta),{atBottom:!0,atBottomBecause:$,scrollTopDelta:N,state:_}}let F;return _.scrollHeight>b.state.scrollHeight?F="SIZE_INCREASED":T<b.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":E<b.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},_L),xt((b,x)=>b&&b.atBottom===x.atBottom))),m=Qt(ce(r,Qn((b,{scrollHeight:x,scrollTop:E,viewportHeight:T})=>{if(m1(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:E};{const I=x-(E+T)<1;return b.scrollTop!==E&&I?{changed:!0,jump:b.scrollTop-E,scrollHeight:x,scrollTop:E}:{changed:!0,jump:0,scrollHeight:x,scrollTop:E}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),_e(b=>b.changed),be(b=>b.jump)),0);Ie(ce(v,be(b=>b.atBottom)),a),Ie(ce(a,mr(50)),l);const h=pe(Da);Ie(ce(r,be(({scrollTop:b})=>b),xt(),Qn((b,x)=>Tt(p)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?Ma:Da,prevScrollTop:x},{direction:Da,prevScrollTop:0}),be(b=>b.direction)),h),Ie(ce(r,mr(50),Xn(OL)),h);const y=pe(0);return Ie(ce(f,_e(b=>!b),Xn(0)),y),Ie(ce(o,mr(100),Be(f),_e(([b,x])=>x),Qn(([b,x],[E])=>[x,E],[0,0]),be(([b,x])=>x-b)),y),{atBottomState:v,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:m,scrollDirection:h,scrollVelocity:y}},bt(tn)),Fa="top",La="bottom",g1="none";function v1(e,t,n){return typeof e=="number"?n===Ma&&t===Fa||n===Da&&t===La?e:0:n===Ma?t===Fa?e.main:e.reverse:t===La?e.main:e.reverse}function y1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const dp=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ye(),a=pe(0),s=pe(0),l=pe(0),c=Qt(ce(Vt(Me(r),Me(o),Me(n),Me(i,Aa),Me(l),Me(a),Me(t),Me(e),Me(s)),be(([u,d,f,[p,v],m,h,y,b,x])=>{const E=u-b,T=h+y,I=Math.max(f-E,0);let w=g1;const k=y1(x,Fa),P=y1(x,La);return p-=b,p+=f+y,v+=f+y,v-=b,p>u+T-k&&(w=Ma),v<u-I+d+P&&(w=Da),w!==g1?[Math.max(E-f-v1(m,Fa,w)-k,0),E-I-y+d+v1(m,La,w)+P]:null}),_e(u=>u!=null),xt(Aa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},bt(tn),{singleton:!0});function DL(e,t,n){if(Ll(t)){const r=u1(e,t);return[{index:Ln(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const fp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Vl(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-a,f=s+d*l+(d-1)*r,p=c,v=f-u;return{bottom:u,firstItemIndex:i,items:x1(e,o,i),offsetBottom:v,offsetTop:c,top:p,topItems:x1(t,o,i),topListHeight:t.reduce((m,h)=>h.size+m,0),totalCount:n}}function b1(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=up(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Vl(c,[],s,o,n,r)}function x1(e,t,n){if(e.length===0)return[];if(!Ll(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=pi(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function w1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const go=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:v}])=>{const m=pe([]),h=pe(0),y=Ye(),b=pe(0);Ie(i.topItemsIndexes,m);const x=Qt(ce(Vt(p,v,Me(l,Aa),Me(o),Me(r),Me(c),u,Me(m),Me(t),Me(n),Me(b),e),_e(([w,k,,P,,,,,,,,_])=>{const F=_&&_.length!==P;return w&&!k&&!F}),be(([,,[w,k],P,_,F,$,N,O,D,z,M])=>{var C,V,j,B;const H=_,{offsetTree:q,sizeTree:W}=H,ne=Tt(h);if(P===0)return{...fp,totalCount:P};if(w===0&&k===0)return ne===0?{...fp,totalCount:P}:b1(ne,F,_,O,D,M||[]);if(ft(W))return ne>0?null:Vl(DL(up(F,P),H,M),[],P,D,H,O);const re=[];if(N.length>0){const oe=N[0],ae=N[N.length-1];let J=0;for(const se of pi(W,oe,ae)){const te=se.value,fe=Math.max(se.start,oe),ge=Math.min(se.end,ae);for(let ve=fe;ve<=ge;ve++)re.push({data:M?.[ve],index:ve,offset:J,size:te}),J+=te}}if(!$)return Vl([],re,P,D,H,O);const ee=N.length>0?N[N.length-1]+1:0,G=wL(q,w,k,ee);if(G.length===0)return null;const Y=P-1,Q=Dl([],oe=>{for(const ae of G){const J=ae.value;let se=J.offset,te=ae.start;const fe=J.size;if(J.offset<w){te+=Math.floor((w-J.offset+D)/(fe+D));const ve=te-ae.start;se+=ve*fe+ve*D}te<ee&&(se+=(ee-te)*fe,te=ee);const ge=Math.min(ae.end,Y);for(let ve=te;ve<=ge&&!(se>=k);ve++)oe.push({data:M?.[ve],index:ve,offset:se,size:fe}),se+=fe+D}}),de=w1(z,Fa),R=w1(z,La);if(Q.length>0&&(de>0||R>0)){const oe=Q[0],ae=Q[Q.length-1];if(de>0&&oe.index>ee){const J=Math.min(de,oe.index-ee),se=[];let te=oe.offset;for(let fe=oe.index-1;fe>=oe.index-J;fe--){const ge=(V=(C=pi(W,fe,fe)[0])==null?void 0:C.value)!=null?V:oe.size;te-=ge+D,se.unshift({data:M?.[fe],index:fe,offset:te,size:ge})}Q.unshift(...se)}if(R>0&&ae.index<Y){const J=Math.min(R,Y-ae.index);let se=ae.offset+ae.size+D;for(let te=ae.index+1;te<=ae.index+J;te++){const fe=(B=(j=pi(W,te,te)[0])==null?void 0:j.value)!=null?B:ae.size;Q.push({data:M?.[te],index:te,offset:se,size:fe}),se+=fe+D}}}return Vl(Q,re,P,D,H,O)}),_e(w=>w!==null),xt()),fp);Ie(ce(e,_e(Xf),be(w=>w?.length)),o),Ie(ce(x,be(w=>w.topListHeight)),d),Ie(d,s),Ie(ce(x,be(w=>[w.top,w.bottom])),a),Ie(ce(x,be(w=>w.items)),y);const E=fn(ce(x,_e(({items:w})=>w.length>0),Be(o,e),_e(([{items:w},k])=>w[w.length-1].originalIndex===k-1),be(([,w,k])=>[w-1,k]),xt(Aa),be(([w])=>w))),T=fn(ce(x,mr(200),_e(({items:w,topItems:k})=>w.length>0&&w[0].originalIndex===k.length),be(({items:w})=>w[0].index),xt())),I=fn(ce(x,_e(({items:w})=>w.length>0),be(({items:w})=>{let k=0,P=w.length-1;for(;w[k].type==="group"&&k<P;)k++;for(;w[P].type==="group"&&P>k;)P--;return{endIndex:w[P].index,startIndex:w[k].index}}),xt(l1)));return{endReached:E,initialItemCount:h,itemsRendered:y,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:T,topItemsIndexes:m,...f}},bt(er,p1,dp,_a,Oa,Na,Vr,ap),{singleton:!0}),S1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ye(),a=Qt(ce(Vt(n,e,r,t,o),be(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return Ie(Me(a),i),{totalListHeight:a,totalListHeightChanged:i}},bt(tn,go),{singleton:!0}),NL=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=pe(!1),r=Qt(ce(Vt(n,e,t),_e(([o])=>o),be(([,o,i])=>Math.max(0,o-i)),mr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(tn,S1),{singleton:!0}),T1=Qe(()=>({context:pe(null)})),FL=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,E1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ye();return Ie(ce(u,Be(t,l,n,i,o,r,s),Be(e),be(([[d,f,p,v,m,h,y,b],x])=>{const{align:E,behavior:T,calculateViewLocation:I=FL,done:w,...k}=d,P=d1(d,f,v-1),_=Pa(P,f.offsetTree,x)+m+h,F=_+Ln(f.sizeTree,P)[1],$=b+h,N=b+p-y,O=I({itemBottom:F,itemTop:_,locationParams:{align:E,behavior:T,...k},viewportBottom:N,viewportTop:$});return O?w&&Fn(ce(a,_e(D=>!D),ho(Tt(a)?1:2)),w):w?.(),O}),_e(d=>d!==null)),c),{scrollIntoView:u}},bt(er,tn,Oa,go,Lr),{singleton:!0});function k1(e){return e?e==="smooth"?"smooth":"auto":!1}const LL=(e,t)=>typeof e=="function"?k1(e(t)):t&&k1(e),VL=Qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{const v=pe(!1),m=Ye();let h=null;function y(T){je(a,{align:"end",behavior:T,index:"LAST"})}st(ce(Vt(ce(Me(t),ho(1)),l),Be(Me(v),i,s,d),be(([[T,I],w,k,P,_])=>{let F=I&&P,$="auto";return F&&($=LL(w,k||_),F=F&&!!$),{followOutputBehavior:$,shouldFollow:F,totalCount:T}}),_e(({shouldFollow:T})=>T)),({followOutputBehavior:T,totalCount:I})=>{h&&(h(),h=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(T)}):h=Fn(e,()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(T),h=null})});function b(T){const I=Fn(o,w=>{T&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Tt(u)("scrolling to bottom due to increased size",{},sn.DEBUG),y("auto"))});setTimeout(I,100)}st(ce(Vt(Me(v),t,c),_e(([T,,I])=>T&&I),Qn(({value:T},[,I])=>({refreshed:T===I,value:I}),{refreshed:!1,value:0}),_e(({refreshed:T})=>T),Be(v,t)),([,T])=>{Tt(s)&&b(T!==!1)}),st(m,()=>{b(Tt(v)!==!1)}),st(Vt(Me(v),o),([T,I])=>{T&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")});const x=pe(null),E=Ye();return Ie(Jf(ce(Me(r),be(T=>{var I;return(I=T?.length)!=null?I:0})),ce(Me(t))),E),st(ce(Vt(ce(E,ho(1)),l),Be(Me(x),s,d,f),be(([[T,I],w,k,P,_])=>I&&k&&w?.({context:_,totalCount:T,scrollingInProgress:P})),_e(T=>!!T),mr(0)),T=>{h&&(h(),h=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("scrolling into view",{}),je(p,T)}):h=Fn(e,()=>{Tt(u)("scrolling into view",{}),je(p,T),h=null})}),{autoscrollToBottom:m,followOutput:v,scrollIntoViewOnChange:x}},bt(er,Na,Oa,_a,Vr,Lr,tn,T1,E1)),$L=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(Ie(ce(s,Be(i),_e(([,l])=>l!==0),Be(o,r,t,n,e),be(([[,l],c,u,d,f,p=[]])=>b1(l,c,u,d,f,p))),a),{}),bt(er,_a,go,Vr),{singleton:!0}),jL=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=pe(0);return st(ce(e,Be(r),_e(([,o])=>o!==0),be(([,o])=>({top:o}))),o=>{Fn(ce(n,ho(1),_e(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{je(t,o)})})}),{initialScrollTop:r}},bt(Vr,tn,go),{singleton:!0}),C1=Qe(([{scrollVelocity:e}])=>{const t=pe(!1),n=Ye(),r=pe(!1);return Ie(ce(e,Be(r,t,n),_e(([o,i])=>!!i),be(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),xt()),t),st(ce(Vt(t,e,n),Be(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},bt(Na),{singleton:!0}),pp=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ye(),r=Ye(),o=Ye(),i=pe(!1),a=pe(void 0);return Ie(ce(Vt(n,r),be(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ie(ce(t,Be(r),be(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},bt(tn)),zL=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Ye(),u=pe(void 0),d=pe(null),f=pe(null);return Ie(s,d),Ie(l,f),st(ce(c,Be(t,r,a,d,f,n)),([p,v,m,h,y,b,x])=>{const E=TL(v.sizeTree);h&&y!==null&&b!==null&&(m=y.scrollTop-b.offsetTop),m-=x,p({ranges:E,scrollTop:m})}),Ie(ce(u,_e(Xf),be(RL)),o),Ie(ce(i,Be(u),_e(([,p])=>p!==void 0),xt(),be(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(er,tn,_a,Vr,pp));function RL(e){return{align:"start",index:0,offset:e.scrollTop}}const BL=Qe(([{topItemsIndexes:e}])=>{const t=pe(0);return Ie(ce(t,_e(n=>n>=0),be(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(go));function I1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const HL=I1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),WL=Qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:v}])=>{const m=fn(ce(l,Be(a),Qn(([,y,b,x],[{bottom:E,items:T,offsetBottom:I,totalCount:w},k])=>{const P=E+I;let _=0;return b===w&&y.length>0&&T.length>0&&(T[0].originalIndex===0&&y[0].originalIndex===0||(_=P-x,_!==0&&(_+=k))),[_,T,w,P]},[0,[],0,0]),_e(([y])=>y!==0),Be(r,s,n,o,p,v),_e(([,y,b,x,,,E])=>!E&&!x&&y!==0&&b===Ma),be(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},sn.DEBUG),y))));function h(y){y>0?(je(t,{behavior:"auto",top:-y}),je(e,0)):(je(e,0),je(t,{behavior:"auto",top:-y}))}return st(ce(m,Be(e,i)),([y,b,x])=>{x&&HL()?je(e,b-y):h(-y)}),st(ce(Vt(Qt(i,!1),e,v),_e(([y,b,x])=>!y&&!x&&b!==0),be(([y,b])=>b),mr(1)),h),Ie(ce(d,be(y=>({top:-y}))),t),st(ce(c,Be(f,u),be(([y,{groupIndices:b,lastSize:x,sizeTree:E},T])=>{function I(w){return w*(x+T)}if(b.length===0)return I(y);{let w=0;const k=Ia(E,0);let P=0,_=0;for(;P<y;){P++,w+=k;let F=b.length===_+1?1/0:b[_+1]-b[_]-1;P+F>y&&(w-=k,F=y-P+1),P+=F,w+=I(F),_++}return w}})),y=>{je(e,y),requestAnimationFrame(()=>{je(t,{top:y}),requestAnimationFrame(()=>{je(e,0),je(v,!1)})})}),{deviation:e}},bt(tn,Na,go,er,Lr,ap)),qL=Qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),bt(dp,$L,Vr,C1,S1,jL,NL,pp,E1,Lr,T1)),A1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:v,initialTopMostItemIndex:m,scrolledToInitialItem:h},y,b,x,E,{scrollToIndex:T},I,{topItemCount:w},{groupCounts:k},P])=>{const{listState:_,minOverscanItemCount:F,topItemsIndexes:$,rangeChanged:N,...O}=E;return Ie(N,P.scrollSeekRangeChanged),Ie(ce(P.windowViewportRect,be(D=>D.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:k,heightEstimates:s,initialItemFinalLocationReached:v,initialTopMostItemIndex:m,scrolledToInitialItem:h,sizeRanges:c,topItemCount:w,topItemsIndexes:$,totalCount:f,...x,groupIndices:a,itemSize:l,listState:_,minOverscanItemCount:F,scrollToIndex:T,statefulTotalCount:d,trackItemSizes:p,rangeChanged:N,...O,...P,...y,sizes:u,...b}},bt(er,_a,tn,zL,VL,go,Oa,WL,BL,p1,qL));function UL(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const $l=typeof document<"u"?S.useLayoutEffect:S.useEffect;function hp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=S.createContext({});function l(h,y){h.propsReady&&je(h.propsReady,!1);for(const b of r){const x=h[t.required[b]];je(x,y[b])}for(const b of o)if(b in y){const x=h[t.optional[b]];je(x,y[b])}h.propsReady&&je(h.propsReady,!0)}function c(h){return i.reduce((y,b)=>(y[b]=x=>{const E=h[t.methods[b]];je(E,x)},y),{})}function u(h){return a.reduce((y,b)=>(y[b]=cL(h[t.events[b]]),y),{})}const d=S.forwardRef((h,y)=>{const{children:b,...x}=h,[E]=S.useState(()=>Dl(dL(e),w=>{l(w,x)})),[T]=S.useState(Xw(u,E));$l(()=>{for(const w of a)w in x&&st(T[w],x[w]);return()=>{Object.values(T).map(Qf)}},[x,T,E]),$l(()=>{l(E,x)}),S.useImperativeHandle(y,Zw(c(E)));const I=n;return g.jsx(s.Provider,{value:E,children:n?g.jsx(I,{...UL([...r,...o,...a],x),children:b}):b})}),f=h=>{const y=S.useContext(s);return S.useCallback(b=>{je(y[h],b)},[y,h])},p=h=>{const y=S.useContext(s)[h],b=S.useCallback(x=>st(y,x),[y]);return S.useSyncExternalStore(b,()=>Tt(y),()=>Tt(y))},v=h=>{const y=S.useContext(s)[h],[b,x]=S.useState(Xw(Tt,y));return $l(()=>st(y,E=>{E!==b&&x(Zw(E))}),[y,b]),b},m=S.version.startsWith("18")?p:v;return{Component:d,useEmitter:(h,y)=>{const b=S.useContext(s)[h];$l(()=>st(b,y),[y,b])},useEmitterValue:m,usePublisher:f}}const jl=S.createContext(void 0),P1=S.createContext(void 0),O1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function mp(e){return"self"in e}function GL(e){return"body"in e}function _1(e,t,n,r=di,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let p,v,m;const h=f.target;if(GL(h)||mp(h)){const b=mp(h)?h:h.defaultView;m=i?b.scrollX:b.scrollY,p=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,v=i?b.innerWidth:b.innerHeight}else m=i?h.scrollLeft:h.scrollTop,p=i?h.scrollWidth:h.scrollHeight,v=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:p,scrollTop:Math.max(m,0),viewportHeight:v})};f.suppressFlushSync?y():Fi.flushSync(y),s.current!==null&&(m===s.current||m<=0||m===p-v)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(f){const p=a.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const v=f.behavior==="smooth";let m,h,y;mp(p)?(h=Math.max(Vn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),m=i?p.innerWidth:p.innerHeight,y=i?window.scrollX:window.scrollY):(h=p[i?"scrollWidth":"scrollHeight"],m=Vn(p,i?"width":"height"),y=p[i?"scrollLeft":"scrollTop"]);const b=h-m;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),m1(m,h)||f.top===y){e({scrollHeight:h,scrollTop:y,viewportHeight:m}),v&&t(!0);return}v?(s.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),a.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const gp="-webkit-sticky",M1="sticky",vp=I1(()=>{if(typeof document>"u")return M1;const e=document.createElement("div");return e.style.position=gp,e.style.position===gp?gp:M1});function yp(e){return e}const YL=Qe(()=>{const e=pe(s=>`Item ${s}`),t=pe(s=>`Group ${s}`),n=pe({}),r=pe(yp),o=pe("div"),i=pe(di),a=(s,l=null)=>Qt(ce(n,be(c=>c[s]),xt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),KL=Qe(([e,t])=>({...e,...t}),bt(A1,YL)),ZL=({height:e})=>g.jsx("div",{style:{height:e}}),XL={overflowAnchor:"none",position:vp(),zIndex:1},D1={overflowAnchor:"none"},QL={...D1,display:"inline-block",height:"100%"},N1=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=wn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=wn("windowScrollContainerState"),a=wn("scrollContainerState"),s=o||r?i:a,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),v=wn("gap"),m=Fe("horizontalDirection"),{callbackRef:h}=e1(n,f,d,e?di:s,p,v,o,m,Fe("skipAnimationFrameInResizeObserver")),[y,b]=S.useState(0);wp("deviation",O=>{y!==O&&b(O)});const x=Fe("EmptyPlaceholder"),E=Fe("ScrollSeekPlaceholder")||ZL,T=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),k=Fe("computeItemKey"),P=Fe("isSeeking"),_=Fe("groupIndices").length>0,F=Fe("alignToBottom"),$=Fe("initialItemFinalLocationReached"),N=e?{}:{boxSizing:"border-box",...m?{display:"inline-block",height:"100%",marginLeft:y!==0?y:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...$?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?g.jsx(x,{...wt(x,c)}):g.jsx(T,{...wt(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:N,children:(e?t.topItems:t.items).map(O=>{const D=O.originalIndex,z=k(D+t.firstItemIndex,O.data,c);return P?S.createElement(E,{...wt(E,c),height:O.size,index:O.index,key:z,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?S.createElement(w,{...wt(w,c),"data-index":D,"data-item-index":O.index,"data-known-size":O.size,key:z,style:XL},u(O.index,c)):S.createElement(I,{...wt(I,c),...F1(I,O.data),"data-index":D,"data-item-group-index":O.groupIndex,"data-item-index":O.index,"data-known-size":O.size,key:z,style:m?QL:D1},_?l(O.index,O.groupIndex,O.data,c):l(O.index,O.data,c))})})}),JL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},eV={outline:"none",overflowX:"auto",position:"relative"},hi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),tV={position:vp(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function F1(e,t){return{item:typeof e=="string"?void 0:t}}const nV=S.memo(function(){const e=Fe("HeaderComponent"),t=wn("headerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),rV=S.memo(function(){const e=Fe("FooterComponent"),t=wn("footerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null});function bp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:v}=_1(s,c,l,u,void 0,d);return e("scrollTo",v),e("scrollBy",f),g.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?eV:JL,...o},tabIndex:0,...a,...wt(l,i),children:r})})}function xp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=S.useRef(null),v=t("scrollerRef"),{scrollByCallback:m,scrollerRef:h,scrollToCallback:y}=_1(s,c,l,v,f);return O1(()=>{var b;return h.current=f||((b=p.current)==null?void 0:b.ownerDocument.defaultView),()=>{h.current=null}},[h,f]),e("windowScrollTo",y),e("scrollBy",m),g.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...a,...wt(l,i),children:r})})}const oV=({children:e})=>{const t=S.useContext(jl),n=wn("viewportHeight"),r=wn("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),a=S.useMemo(()=>ka(n,l=>Vn(l,i?"width":"height")),[n,i]),s=Jn(a,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:s,style:hi(o),children:e})},iV=({children:e})=>{const t=S.useContext(jl),n=wn("windowViewportRect"),r=wn("fixedItemHeight"),o=Fe("customScrollParent"),i=tp(n,o,Fe("skipAnimationFrameInResizeObserver")),a=Fe("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:hi(a),children:e})},aV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...tV,marginTop:`${n}px`},o=Fe("context");return g.jsx(t,{style:r,...wt(t,o),children:e})},sV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return g.jsxs(r||t?uV:cV,{...e,context:o,children:[n&&g.jsx(aV,{children:g.jsx(N1,{showTopList:!0})}),g.jsxs(r||t?iV:oV,{children:[g.jsx(nV,{}),g.jsx(N1,{}),g.jsx(rV,{})]})]})}),{Component:lV,useEmitter:wp,useEmitterValue:Fe,usePublisher:wn}=hp(KL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},sV),cV=bp({useEmitter:wp,useEmitterValue:Fe,usePublisher:wn}),uV=xp({useEmitter:wp,useEmitterValue:Fe,usePublisher:wn}),Sp=lV,dV=Qe(()=>{const e=pe(c=>g.jsxs("td",{children:["Item $",c]})),t=pe(null),n=pe(c=>g.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=pe(null),o=pe(null),i=pe({}),a=pe(yp),s=pe(di),l=(c,u=null)=>Qt(ce(i,be(d=>d[c]),xt()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),fV=Qe(([e,t])=>({...e,...t}),bt(A1,dV)),pV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{height:e}})}),hV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{border:0,height:e,padding:0}})}),mV={overflowAnchor:"none"},L1={position:vp(),zIndex:2,overflowAnchor:"none"},V1=S.memo(function({showTopList:e=!1}){const t=ze("listState"),n=ze("computeItemKey"),r=ze("firstItemIndex"),o=ze("context"),i=ze("isSeeking"),a=ze("fixedHeaderHeight"),s=ze("groupIndices").length>0,l=ze("itemContent"),c=ze("groupContent"),u=ze("ScrollSeekPlaceholder")||pV,d=ze("GroupComponent"),f=ze("TableRowComponent"),p=(e?t.topItems:[]).reduce((m,h,y)=>(y===0?m.push(h.size):m.push(m[y-1]+h.size),m),[]),v=(e?t.topItems:t.items).map(m=>{const h=m.originalIndex,y=n(h+r,m.data,o),b=e?h===0?0:p[h-1]:0;return i?S.createElement(u,{...wt(u,o),height:m.size,index:m.index,key:y,type:m.type||"item"}):m.type==="group"?S.createElement(d,{...wt(d,o),"data-index":h,"data-item-index":m.index,"data-known-size":m.size,key:y,style:{...L1,top:a}},c(m.index,o)):S.createElement(f,{...wt(f,o),...F1(f,m.data),"data-index":h,"data-item-index":m.index,"data-known-size":m.size,"data-item-group-index":m.groupIndex,key:y,style:e?{...L1,top:a+b}:mV},s?l(m.index,m.groupIndex,m.data,o):l(m.index,m.data,o))});return g.jsx(g.Fragment,{children:v})}),gV=S.memo(function(){const e=ze("listState"),t=ze("topItemsIndexes").length>0,n=$n("sizeRanges"),r=ze("useWindowScroll"),o=ze("customScrollParent"),i=$n("windowScrollContainerState"),a=$n("scrollContainerState"),s=o||r?i:a,l=ze("trackItemSizes"),c=ze("itemSize"),u=ze("log"),{callbackRef:d,ref:f}=e1(n,c,l,s,u,void 0,o,!1,ze("skipAnimationFrameInResizeObserver")),[p,v]=S.useState(0);Tp("deviation",_=>{p!==_&&(f.current.style.marginTop=`${_}px`,v(_))});const m=ze("EmptyPlaceholder"),h=ze("FillerRow")||hV,y=ze("TableBodyComponent"),b=ze("paddingTopAddition"),x=ze("statefulTotalCount"),E=ze("context");if(x===0&&m)return g.jsx(m,{...wt(m,E)});const T=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),I=e.offsetTop+b+p-T,w=e.offsetBottom,k=I>0?g.jsx(h,{context:E,height:I},"padding-top"):null,P=w>0?g.jsx(h,{context:E,height:w},"padding-bottom"):null;return g.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...wt(y,E),children:[k,t&&g.jsx(V1,{showTopList:!0}),g.jsx(V1,{}),P]})}),vV=({children:e})=>{const t=S.useContext(jl),n=$n("viewportHeight"),r=$n("fixedItemHeight"),o=Jn(S.useMemo(()=>ka(n,i=>Vn(i,"height")),[n]),!0,ze("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:o,style:hi(!1),children:e})},yV=({children:e})=>{const t=S.useContext(jl),n=$n("windowViewportRect"),r=$n("fixedItemHeight"),o=ze("customScrollParent"),i=tp(n,o,ze("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:hi(!1),children:e})},bV=S.memo(function(e){const t=ze("useWindowScroll"),n=ze("customScrollParent"),r=$n("fixedHeaderHeight"),o=$n("fixedFooterHeight"),i=ze("fixedHeaderContent"),a=ze("fixedFooterContent"),s=ze("context"),l=Jn(S.useMemo(()=>ka(r,y=>Vn(y,"height")),[r]),!0,ze("skipAnimationFrameInResizeObserver")),c=Jn(S.useMemo(()=>ka(o,y=>Vn(y,"height")),[o]),!0,ze("skipAnimationFrameInResizeObserver")),u=n||t?SV:wV,d=n||t?yV:vV,f=ze("TableComponent"),p=ze("TableHeadComponent"),v=ze("TableFooterComponent"),m=i?g.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,s),children:i()},"TableHead"):null,h=a?g.jsx(v,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(v,s),children:a()},"TableFoot"):null;return g.jsx(u,{...e,...wt(u,s),children:g.jsx(d,{children:g.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,s),children:[m,g.jsx(gV,{},"TableBody"),h]})})})}),{Component:xV,useEmitter:Tp,useEmitterValue:ze,usePublisher:$n}=hp(fV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},bV),wV=bp({useEmitter:Tp,useEmitterValue:ze,usePublisher:$n}),SV=xp({useEmitter:Tp,useEmitterValue:ze,usePublisher:$n}),TV=xV,$1={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},EV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:j1,floor:zl,max:Va,min:Ep,round:z1}=Math;function R1(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function kV(e){return{...EV,items:e}}function Rl(e,t){return e&&e.width===t.width&&e.height===t.height}function CV(e,t){return e&&e.column===t.column&&e.row===t.row}const IV=Qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:v,propsReady:m},{customScrollParent:h,useWindowScroll:y,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:E},T])=>{const I=pe(0),w=pe(0),k=pe($1),P=pe({height:0,width:0}),_=pe({height:0,width:0}),F=Ye(),$=Ye(),N=pe(0),O=pe(null),D=pe({column:0,row:0}),z=Ye(),M=Ye(),C=pe(!1),V=pe(0),j=pe(!0),B=pe(!1),H=pe(!1);st(ce(v,Be(V),_e(([G,Y])=>!!Y)),()=>{je(j,!1)}),st(ce(Vt(v,j,_,P,V,B),_e(([G,Y,Q,de,,R])=>G&&!Y&&Q.height!==0&&de.height!==0&&!R)),([,,,,G])=>{je(B,!0),cp(1,()=>{je(F,G)}),Fn(ce(c),()=>{je(t,[0,0]),je(j,!0)})}),Ie(ce(M,_e(G=>G!=null&&G.scrollTop>0),Xn(0)),w),st(ce(v,Be(M),_e(([,G])=>G!=null)),([,G])=>{G&&(je(P,G.viewport),je(_,G.item),je(D,G.gap),G.scrollTop>0&&(je(C,!0),Fn(ce(c,ho(1)),Y=>{je(C,!1)}),je(l,{top:G.scrollTop})))}),Ie(ce(P,be(({height:G})=>G)),d),Ie(ce(Vt(Me(P,Rl),Me(_,Rl),Me(D,(G,Y)=>G&&G.column===Y.column&&G.row===Y.row),Me(c)),be(([G,Y,Q,de])=>({gap:Q,item:Y,scrollTop:de,viewport:G}))),z),Ie(ce(Vt(Me(I),r,Me(D,CV),Me(_,Rl),Me(P,Rl),Me(O),Me(w),Me(C),Me(j),Me(V)),_e(([,,,,,,,G])=>!G),be(([G,[Y,Q],de,R,oe,ae,J,,se,te])=>{const{column:fe,row:ge}=de,{height:ve,width:Pe}=R,{width:he}=oe;if(J===0&&(G===0||he===0))return $1;if(Pe===0){const Ke=up(te,G),pt=Ke+Math.max(J-1,0);return kV(R1(Ke,pt,ae))}const K=B1(he,Pe,fe);let L,X;se?Y===0&&Q===0&&J>0?(L=0,X=J-1):(L=K*zl((Y+ge)/(ve+ge)),X=K*j1((Q+ge)/(ve+ge))-1,X=Ep(G-1,Va(X,K-1)),L=Ep(X,Va(0,L))):(L=0,X=-1);const le=R1(L,X,ae),{bottom:ue,top:Ee}=H1(oe,de,R,le),ke=j1(G/K),De=ke*ve+(ke-1)*ge-ue;return{bottom:ue,itemHeight:ve,items:le,itemWidth:Pe,offsetBottom:De,offsetTop:Ee,top:Ee}})),k),Ie(ce(O,_e(G=>G!==null),be(G=>G.length)),I),Ie(ce(Vt(P,_,k,D),_e(([G,Y,{items:Q}])=>Q.length>0&&Y.height!==0&&G.height!==0),be(([G,Y,{items:Q},de])=>{const{bottom:R,top:oe}=H1(G,de,Y,Q);return[oe,R]}),xt(Aa)),t);const q=pe(!1);Ie(ce(c,Be(q),be(([G,Y])=>Y||G!==0)),q);const W=fn(ce(Vt(k,I),_e(([{items:G}])=>G.length>0),Be(q),_e(([[G,Y],Q])=>{const de=G.items[G.items.length-1].index===Y-1;return(Q||G.bottom>0&&G.itemHeight>0&&G.offsetBottom===0&&G.items.length===Y)&&de}),be(([[,G]])=>G-1),xt())),ne=fn(ce(Me(k),_e(({items:G})=>G.length>0&&G[0].index===0),Xn(0),xt())),re=fn(ce(Me(k),Be(C),_e(([{items:G},Y])=>G.length>0&&!Y),be(([{items:G}])=>({endIndex:G[G.length-1].index,startIndex:G[0].index})),xt(l1),mr(0)));Ie(re,p.scrollSeekRangeChanged),Ie(ce(F,Be(P,_,I,D),be(([G,Y,Q,de,R])=>{const oe=h1(G),{align:ae,behavior:J,offset:se}=oe;let te=oe.index;te==="LAST"&&(te=de-1),te=Va(0,te,Ep(de-1,te));let fe=kp(Y,R,Q,te);return ae==="end"?fe=z1(fe-Y.height+Q.height):ae==="center"&&(fe=z1(fe-Y.height/2+Q.height/2)),se&&(fe+=se),{behavior:J,top:fe}})),l);const ee=Qt(ce(k,be(G=>G.offsetBottom+G.bottom)),0);return Ie(ce(E,be(G=>({height:G.visibleHeight,width:G.visibleWidth}))),P),{customScrollParent:h,data:O,deviation:N,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:_,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:$,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:y,viewportDimensions:P,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:E,...p,gridState:k,horizontalDirection:H,initialTopMostItemIndex:V,totalListHeight:ee,...f,endReached:W,propsReady:m,rangeChanged:re,startReached:ne,stateChanged:z,stateRestoreInProgress:C,...T}},bt(dp,tn,Na,C1,Vr,pp,Lr));function B1(e,t,n){return Va(1,zl((e+n)/(zl(t)+n)))}function H1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=kp(e,t,n,r[0].index);return{bottom:kp(e,t,n,r[r.length-1].index)+o,top:i}}function kp(e,t,n,r){const o=B1(e.width,n.width,t.column),i=zl(r/o),a=i*n.height+Va(0,i-1)*t.row;return a>0?a+t.row:a}const AV=Qe(()=>{const e=pe(d=>`Item ${d}`),t=pe({}),n=pe(null),r=pe("virtuoso-grid-item"),o=pe("virtuoso-grid-list"),i=pe(yp),a=pe("div"),s=pe(di),l=(d,f=null)=>Qt(ce(t,be(p=>p[d]),xt()),f),c=pe(!1),u=pe(!1);return Ie(Me(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),PV=Qe(([e,t])=>({...e,...t}),bt(IV,AV)),OV=S.memo(function(){const e=Et("gridState"),t=Et("listClassName"),n=Et("itemClassName"),r=Et("itemContent"),o=Et("computeItemKey"),i=Et("isSeeking"),a=Sn("scrollHeight"),s=Et("ItemComponent"),l=Et("ListComponent"),c=Et("ScrollSeekPlaceholder"),u=Et("context"),d=Sn("itemDimensions"),f=Sn("gap"),p=Et("log"),v=Et("stateRestoreInProgress"),m=Sn("reportReadyState"),h=Jn(S.useMemo(()=>y=>{const b=y.parentElement.parentElement.scrollHeight;a(b);const x=y.firstChild;if(x){const{height:E,width:T}=x.getBoundingClientRect();d({height:E,width:T})}f({column:q1("column-gap",getComputedStyle(y).columnGap,p),row:q1("row-gap",getComputedStyle(y).rowGap,p)})},[a,d,f,p]),!0,!1);return O1(()=>{e.itemHeight>0&&e.itemWidth>0&&m(!0)},[e]),v?null:g.jsx(l,{className:t,ref:h,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const b=o(y.index,y.data,u);return i?g.jsx(c,{...wt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},b):S.createElement(s,{...wt(s,u),className:n,"data-index":y.index,key:b},r(y.index,y.data,u))})})}),_V=S.memo(function(){const e=Et("HeaderComponent"),t=Sn("headerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),MV=S.memo(function(){const e=Et("FooterComponent"),t=Sn("footerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),DV=({children:e})=>{const t=S.useContext(P1),n=Sn("itemDimensions"),r=Sn("viewportDimensions"),o=Jn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),g.jsx("div",{ref:o,style:hi(!1),children:e})},NV=({children:e})=>{const t=S.useContext(P1),n=Sn("windowViewportRect"),r=Sn("itemDimensions"),o=Et("customScrollParent"),i=tp(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),g.jsx("div",{ref:i,style:hi(!1),children:e})},FV=S.memo(function({...e}){const t=Et("useWindowScroll"),n=Et("customScrollParent"),r=n||t?VV:LV,o=n||t?NV:DV,i=Et("context");return g.jsx(r,{...e,...wt(r,i),children:g.jsxs(o,{children:[g.jsx(_V,{}),g.jsx(OV,{}),g.jsx(MV,{})]})})}),{useEmitter:W1,useEmitterValue:Et,usePublisher:Sn}=hp(PV,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},FV),LV=bp({useEmitter:W1,useEmitterValue:Et,usePublisher:Sn}),VV=xp({useEmitter:W1,useEmitterValue:Et,usePublisher:Sn});function q1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}const U1=e=>{const t=e.Icon??Ag,n=Pt();return g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[g.jsx(t,{size:64,className:"text-disabled"}),g.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Cp=g.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),$a=e=>g.jsx(ln,{...e,as:e.as||"span",className:Oe("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function $V(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const jV=e=>{const t=S.useId(),n=Pt(),r=S.useMemo(()=>$V(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return g.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 p-3 border-t-muted text-sm lg:flex-nowrap lg:justify-between",children:[g.jsx("p",{children:g.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?g.jsxs(S.Fragment,{children:[g.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),g.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>g.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),g.jsx("nav",{children:g.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?g.jsx("li",{children:g.jsx(ln,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:g.jsx(S.Fragment,{children:typeof i=="string"?g.jsx("li",{children:"..."}):g.jsx("li",{children:g.jsx(ln,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?g.jsx("li",{children:g.jsx(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},zV=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),g.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:g.jsx("div",{ref:n,className:"block isolate",children:e.children})})},RV=(e,t,n)=>{const r=n.cols,o=n.loading;return g.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=Qu(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`typography group-table-cell p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?g.jsx(zV,{children:g.jsx(f,{col:i,row:t,rowIndex:e})}):null,g.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),g.jsx("span",{className:"relative",children:o?Cp:c?g.jsx(S.Fragment,{children:g.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):g.jsx(S.Fragment,{children:We.nil(l)?"":l})}))})})},mi=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[$o(10),Ds({fallbackAxisSideDirection:"end"}),Ms(),Ru({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gn({open:n,middleware:i,transform:!0,whileElementsMounted:Qr,onOpenChange:(v,m)=>{const h=m?.relatedTarget;h&&h.dataset.floating==="true"&&!v||(r(v),e.onChange?.(v))}}),c=zo(l),u=kr(l),d=fr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Yn([c,u,d]);return g.jsxs(S.Fragment,{children:[g.jsx("button",{ref:a.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&g.jsx(dr,{preserveTabOrder:!0,id:`${t}-portal`,children:g.jsx(to,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:g.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:a.setFloating,"aria-labelledby":t,style:s,...p(),children:[g.jsx(Bu,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),g.jsx("header",{className:"mb-2",children:g.jsx("h3",{className:"text-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var Ip={},G1;function BV(){return G1||(G1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(b){window.console.log(b)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const b=y.getItem(h);try{return JSON.parse(b)}catch{return b??null}},i=h=>Object.keys(h).reduce((y,b)=>({...y,[b]:o(b,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(y=>y(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],f={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=f.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,b={})=>{const x=r(y)?y:encodeURIComponent(JSON.stringify(y)),E=d.reduce((T,I)=>{const w=I.parse(b);return w===""?T:T.concat(w)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=E,u()}},p=h=>{const y=new Set,b=x=>{h().removeItem(x);const E=i(h());y.forEach(T=>T(E))};return{delete:b,listener:x=>(y.add(x),()=>y.delete(x)),clearListeners:()=>y.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const E=h().getItem(x);return!n(E)},deleteAll:()=>{t(h(),b),y.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,E)=>{h().setItem(x,JSON.stringify(E)),y.forEach(T=>T(h()))}}},v=p(()=>window.sessionStorage),m=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=v,e.createStorage=p})(Ip)),Ip}var ja=BV();const Ap=e=>e.headerLabel??e.thead??e.id,Pp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var gi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(gi||{});const Op=e=>e.type==="number"?e.valueAsNumber:e.value,HV=e=>{let t=[];return e({add:(a,s,l)=>t.push({...l,id:a,thead:s}),remove:a=>t=t.filter(s=>s.id!==a),getAll:()=>Array.from(t),filter:a=>t=Array.from(t.filter(a))}),t},WV={},qV=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},UV=(e,t,n=WV)=>{const r=Cr()?null:ja.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Gf({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:qV(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Cr()||ja.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},GV=e=>{const t=Pr(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-tableheader="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},YV=()=>Cr()?void 0:document.querySelector('[data-component="modal-body"]'),KV=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),ZV=(e,t)=>e.toSorted(KV(t)),Y1=(e,t,n)=>({label:t,id:Bo(),type:n,value:e.id}),XV=e=>{const t=Pt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,Y1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return g.jsx(S.Fragment,{children:g.jsx(mi,{title:t.tableSortDropdownTitle,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(Eg,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(ro,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),g.jsx(ro,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),g.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:g.jsx(ss,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[g.jsx(bu,{size:14})," ",t.tableSortAddButton]})})]})})})},QV=e=>{const t=Pt(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=Y1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Ap(e.col);return g.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[g.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?g.jsx(WC,{size:14}):null,n==="desc"?g.jsx(HC,{size:14}):null,n==="undefined"?g.jsx(Eg,{size:14}):null]})},K1=S.createContext({}),JV=K1.Provider,e$=()=>S.useContext(K1),_p=(e,t,n,r={})=>{const o=e.id,i=e.type??gi.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Bo(),operation:l,label:Ap(e),name:o,type:i,value:"",...r}},Mp=()=>{const e=Pt(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[gi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[gi.Boolean]:[t.is,t.isNot],[gi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},t$=e=>{const t=Pt(),n=Mp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,_p(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(v=>u===v.id);return _p(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=Op(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return g.jsx(S.Fragment,{children:g.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:g.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[g.jsx(eI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(ro,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),g.jsx(ro,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),g.jsx(Wo,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),g.jsx("div",{className:"flex justify-center items-center mt-5",children:g.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:g.jsx(ss,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[g.jsx(bu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},n$=({filter:e,onDelete:t,set:n})=>{const r=Pt(),o=Mp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=Op(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return g.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[g.jsx(ro,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),g.jsx(Wo,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),g.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:g.jsx(ss,{className:"text-danger",size:14})})]})},r$={top:0,left:0,right:0,bottom:-1},o$=e=>{const t=Su(),n=Pt(),r=e.filters.filter(m=>m.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=Mp(),l=o?nI:rI,c=S.useRef(null),u=m=>{const h=m.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==h))},d=S.useCallback(m=>{if(m===null)return;c.current=m;const h=new AbortController;return m.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:h.signal}),()=>h.abort()},[]),f=e.sorters.find(m=>e.header.id===m.value),p=f?.type?f.type===Gw.Asc?"ascending":"descending":"none",v=Ap(e.header);return g.jsxs(Ew,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[g.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:g.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&a?g.jsx(mi,{arrow:!0,trigger:g.jsxs("span",{children:[g.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",v]}),g.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:g.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",g.jsx("span",{className:"font-medium",children:v})]}),children:g.jsxs("ul",{className:"font-medium",children:[r.length===0?null:g.jsx(S.Fragment,{children:r.map(m=>g.jsx("li",{className:"my-1",children:g.jsx(n$,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),g.jsx("li",{children:g.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(m=>m.concat(_p(e.header,s.options,s.operations))),children:[g.jsx(bu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,g.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?g.jsx(QV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:g.jsx(Re.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:r$,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:m=>{m.currentTarget.focus()},onKeyDown:m=>{if(m.key==="ArrowLeft"||m.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const h=c.current.getBoundingClientRect().width,b=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(h+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,h)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=h.delta.x;c.current.style.width=`${Math.abs(y+b)}px`}})]})},i$=e=>{const[t,n]=GV(e.setCols);return g.jsx(ww,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:g.jsx(xn,{children:e.headers.map((r,o)=>g.jsx(o$,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},a$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:g.jsx(xn,{children:n.children})})),s$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),l$=S.forwardRef(({context:e,...t},n)=>{const r=e$(),o={...t?.style,top:We.number(r.sticky)?`${r.sticky}px`:void 0};return g.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),c$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return g.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),u$=S.forwardRef((e,t)=>e.context.loadingMore?g.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:g.jsx("tr",{role:"row",className:"bg-card-background",children:g.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:g.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),d$={TableRow:c$,TableFoot:u$,TableHead:l$,Table:s$,TableBody:a$},f$=[0,0,0,0,0,0,0,0,0,0],p$=e=>g.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Cp:g.jsx(U1,{})}),h$=()=>g.jsx(S.Fragment,{}),m$=[],Z1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),p=Pr(a),v=Pr(u.loadingMore),m=S.useMemo(()=>{if(u.loading)return f$;if(c)return u.rows;const b=new Yw(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:b.Where(x.name,x.operation.symbol,x.value)),r.length===0?b.Select():ZV(b.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,x=new IntersectionObserver(E=>E[E.length-1].isIntersecting&&v.current?(p.current?.(),void f(!0)):f(!1));return x.observe(b),()=>x.disconnect()},[v,p]);const h=m.length===0,y={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return g.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[g.jsx(TV,{components:d$,context:y,totalCount:m.length,itemContent:h?h$:RV,data:h?m$:m,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>g.jsx(i$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),h?g.jsx(p$,{loading:u.loading}):null,g.jsx("div",{"aria-hidden":"true",ref:d,className:"w-full h-0.5"}),l!==null?g.jsx(jV,{...l}):null]})},g$=({item:e,onPointerDown:t})=>{const n=po(0);return g.jsxs(Ew,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[g.jsx("button",{type:"button",className:"cursor-grab",children:g.jsx(JC,{size:14})}),g.jsx("span",{children:e.groupName})]},e.groupId)},v$=e=>{const t=Pt(),n=Pp(e.cols),r=mF(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new Yw(e.rows).GroupBy(u),v=e.cols.find(m=>m.id===u);e.setGroups(Ck(p).map((m,h)=>{const y=p[m];return{...v,groupId:Bo(),groupKey:u,index:h,rows:y,groupName:m}}))},s=()=>e.setGroups([]);return g.jsx(S.Fragment,{children:g.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(iI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[g.jsxs("div",{className:"flex flex-nowrap items-center",children:[g.jsx(ro,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),g.jsx(no,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:g.jsx(ss,{size:16,className:"text-danger"})})]}),e.groups.length>0?g.jsxs("section",{className:"my-4",children:[g.jsx("header",{children:g.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),g.jsx(BN,{children:g.jsx(ww,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>g.jsx(g$,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},y$=e=>g.jsx("header",{className:"mb-1 min-w-full",children:g.jsxs("div",{className:"flex flex-wrap gap-y-1 gap-x-4 justify-between items-center min-w-full",children:[g.jsxs("div",{className:"flex gap-4 py-2 whitespace-nowrap w-fit items-centeend",children:[g.jsx("span",{children:g.jsx(t$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),g.jsx("span",{children:g.jsx(XV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),g.jsx("span",{children:g.jsx(v$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),g.jsx("ul",{className:"flex flex-row flex-wrap flex-1 flex-grow gap-4 items-center w-full md:justify-end",children:e.filters.map(t=>g.jsxs("li",{className:"flex gap-1 items-center py-0.5 px-4 rounded-xl border border-card-border",children:[g.jsxs("span",{children:[g.jsx("span",{className:"inline-block mr-2 rounded-full size-3 aspect-square bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),g.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[g.jsx("span",{"aria-hidden":"true",className:"invisible p-0 whitespace-pre",children:t.value||" "}),g.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Op(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),b$=(e,t)=>typeof t=="function"?t(e):t,Bl=(e,t,n)=>e===t?void 0:n?.(t),x$=e=>{const t=Su(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>Pp(e.cols),[e.cols]),[i,a]=Gf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:b$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),Bl(l?.filters??[],s.filters??[],e.setFilters),Bl(l?.sorters??[],s.sorters??[],e.setSorters),Bl(l?.groups??[],s.groups??[],e.setGroups),Bl(l?.cols??[],s.cols??[],e.setCols),s)]});return S.useEffect(()=>{a.cols(e.cols)},[e.cols]),g.jsx(JV,{value:n,children:g.jsxs(xn,{initial:!1,children:[r?g.jsx(y$,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?g.jsx(Z1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):g.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>g.jsx("div",{className:"min-w-full",children:g.jsx(Z1,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},Hl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>g.jsxs(ln,{...s,as:r||"div","data-component":"card",className:Oe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-4",i),children:[e?g.jsx("header",{"data-component":"card-title",className:Oe("mb-2 w-full border-b border-card-border px-6 pb-4 text-xl font-medium",a),children:e}):o,g.jsx("div",{"data-component":"card-body",className:Oe("min-w-full px-6",s.className),children:t?g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx($a,{className:"w-full"}),g.jsx($a,{className:"w-8/12"}),g.jsx($a,{className:"w-10/12"}),g.jsx($a,{className:"w-1/2"})]}):n})]});Hl.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return g.jsxs(i,{...o,title:We.string(o.title)?o.title:void 0,className:Oe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[g.jsx(a,{className:"font-semibold",children:o.title}),r?g.jsx(s,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const w$=e=>{const t=e.interactive??!0,n=e.Icon??yu;return g.jsx(Hl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:g.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[g.jsx("div",{className:Oe("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:g.jsx(n,{size:48})}),g.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[g.jsx("p",{className:"text-lg",children:e.title}),e.loading?g.jsx($a,{className:"h-10"}):g.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},S$=({item:e,context:t,setter:n,get:r,refs:o})=>g.jsx(dr,{children:g.jsx(_f,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:g.jsxs(xn,{presenceAffectsLayout:!0,children:[e?g.jsx(Re.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?g.jsx(Yu,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:g.jsx(to,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:g.jsxs(Re.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[g.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:g.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:g.jsx(_o,{})})}),g.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[g.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),T$=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Gn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),a=zo(o),s=fr(o,{role:"dialog"}),l=kr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Yn([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return g.jsxs(S.Fragment,{children:[g.jsx(S$,{refs:i,context:o,get:c,item:t,setter:u}),g.jsx("ul",{role:"list",children:d.map((f,p)=>{const v=f.props,m=`${r}-${p}`,h=()=>n({...v,id:m}),y=v.leading;return g.jsx(Re.li,{layout:!0,layoutId:`item-${m}`,className:"border-b border-card-border py-2 last:border-transparent",children:g.jsx(Re.div,{layoutId:`toast-${m}`,className:"relative",children:g.jsx("div",{className:"relative flex items-start space-x-3",children:g.jsxs(S.Fragment,{children:[v.avatar?g.jsx("div",{children:g.jsx("div",{className:"relative px-1",children:g.jsx("button",{onClick:h,className:"flex size-10 items-center justify-center ring-primary",children:v.avatar})})}):null,g.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:g.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[g.jsxs("button",{onClick:h,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[g.jsx("h3",{children:v.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:v.description})]}),y?g.jsx(y,{open:h}):null]})})]})})})},m)})})]})},E$=e=>g.jsx(S.Fragment,{children:e.children}),X1=()=>{const e=S.useContext(Do);return e?e.parser:ls.hsla},Dp=.3,Wl={duration:Dp,type:"tween",ease:"easeInOut"},Q1=S.createContext(null),Np={delay:.2,duration:.3,type:"tween",ease:"easeOut"},vi={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},k$=e=>g.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx(Re.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Np,d:"M18 6 6 18"}),g.jsx(Re.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Np,d:"m6 6 12 12"})]}),C$=e=>g.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:g.jsx(Re.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:vi.animate,initial:vi.initial,transition:Np})}),I$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},A$={duration:.6,delay:.2,type:"tween",ease:"circOut"},P$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",O$=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,J1=()=>S.useContext(Q1),_$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const a=X1(),s=J1(),[l,c]=S.useState(t);S.useEffect(()=>{if(!s){c(t);return}const d=O$(e,s.currentStep,s.previousStep,s.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,s,e]);const u=P$(e,l,n);return g.jsxs(S.Fragment,{children:[g.jsx("div",{className:`h-[2px] w-full lg:block bg-card-border hidden first:hidden ${u==="active"||u==="complete"?"bg-success":""}`}),g.jsxs(Re.button,{...i,type:"button","data-step":e,animate:u,className:"flex relative justify-center items-center w-auto text-center",children:[g.jsx(Re.div,{variants:I$,transition:A$,className:`hidden lg:block absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),g.jsx(Re.div,{initial:!1,animate:u,transition:Wl,className:"flex relative justify-center items-center w-10 h-10 font-semibold rounded-full",variants:{error:{color:a("var(--danger-foreground)"),borderColor:a("var(--danger-hover)"),backgroundColor:a("var(--danger-DEFAULT)")},inactive:{transition:Wl,color:a("var(--disabled)"),borderColor:a("var(--card-border)"),backgroundColor:a("var(--background)")},active:{transition:Wl,color:a("var(--primary-foreground)"),borderColor:a("var(--primary-DEFAULT)"),backgroundColor:a("var(--primary-DEFAULT)")},complete:{transition:Wl,color:a("var(--success-foreground)"),borderColor:a("var(--success-DEFAULT)"),backgroundColor:a("var(--success-DEFAULT)")}},children:g.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?g.jsx(C$,{className:"size-6 text-primary-foreground"}):u==="error"?g.jsx(k$,{className:"size-6 text-danger-foreground"}):g.jsx(S.Fragment,{children:g.jsx("span",{children:e})})})}),r&&u==="active"?g.jsx("header",{className:"flex flex-col justify-start items-start px-2",children:g.jsx("h3",{className:`h-full flex items-center ${o}`,children:r})}):g.jsx("header",{className:"flex flex-col justify-start items-start px-2 lg:hidden",children:g.jsx("h3",{className:`h-full whitespace-nowrap flex items-center ${o}`,children:r})})]})]})},M$=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Dp*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Dp};return g.jsx(Q1.Provider,{value:o,children:g.jsx("div",{className:"flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center",children:e.children})})},eS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},tS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},nS=S.createContext(""),D$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Fp=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!D$(a))return a}return n==="backward"?Fp(e,e.length-1,"backward"):Fp(e,-1,"forward")},rS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Fp(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},oS={[tS.ArrowLeft]:(e,t)=>rS(t,"backward"),[tS.ArrowRight]:(e,t)=>rS(t,"forward")},N$=e=>{const[t,n]=eS(e.active),r=S.useRef(null),o=Pr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(We.keyof(oS,c)){const u=oS[c],d=u(l,r.current);if(d===null)return;n(d)}};return g.jsx(nS.Provider,{value:t,children:g.jsx(Hl,{className:e.className,container:Oe("pt-0 max-w-full w-full min-w-0",e.container),header:g.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[g.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),g.jsx("nav",{className:"min-w-0",children:g.jsx("ul",{onKeyDown:s,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",children:i.map(l=>{const c=l.props,u=t===c.id;return g.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Oe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:g.jsx(ln,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},F$=()=>S.useContext(nS),L$=e=>{const t=F$();return g.jsx(S.Fragment,{children:e.id===t?e.children:null})},iS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},V$={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},aS=e=>g.jsx(Re.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:iS,exit:iS.false,transition:V$,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),$$=Co("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),j$=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return g.jsx(xn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?g.jsx(Re.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Oe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:g.jsx(aS,{"data-open":!!i,open:!!i,children:g.jsxs(ln,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Oe($$({theme:n}),t),children:[g.jsxs("h4",{className:"flex gap-2 items-center mb-2",children:[!r&&n==="success"?g.jsx(kg,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?g.jsx(yu,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?g.jsx(oI,{"aria-hidden":"true",size:20}):null,r,g.jsx("span",{className:"text-lg font-semibold tracking-3 text-balance",children:a.title})]}),a.children,o!==void 0&&i?g.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:g.jsx(_o,{size:20})}):null]})})}):null})}),z$=e=>g.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[g.jsxs("header",{className:"flex items-start gap-4 p-6",children:[g.jsx("div",{className:Oe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:g.jsx("div",{children:g.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("header",{children:g.jsx("h3",{className:"text-base leading-none",children:e.title})}),g.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?g.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),R$=Symbol.for("react.lazy");function sS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function B$(...e){return t=>{let n=!1;const r=e.map(o=>{const i=sS(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():sS(e[o],null)}}}}const ql=A[" use ".trim().toString()];function H$(e){return typeof e=="object"&&e!==null&&"then"in e}function lS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===R$&&"_payload"in e&&H$(e._payload)}function W$(e){const t=q$(e),n=A.forwardRef((r,o)=>{let{children:i,...a}=r;lS(i)&&typeof ql=="function"&&(i=ql(i._payload));const s=A.Children.toArray(i),l=s.find(G$);if(l){const c=l.props.children,u=s.map(d=>d===l?A.Children.count(c)>1?A.Children.only(null):A.isValidElement(c)?c.props.children:null:d);return g.jsx(t,{...a,ref:o,children:A.isValidElement(c)?A.cloneElement(c,void 0,u):null})}return g.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const cS=W$("Slot");function q$(e){const t=A.forwardRef((n,r)=>{let{children:o,...i}=n;if(lS(o)&&typeof ql=="function"&&(o=ql(o._payload)),A.isValidElement(o)){const a=K$(o),s=Y$(i,o.props);return o.type!==A.Fragment&&(s.ref=r?B$(r,a):a),A.cloneElement(o,s)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const U$=Symbol("radix.slottable");function G$(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===U$}function Y$(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function K$(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const uS=(e="")=>Oe("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Lp=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),dS=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[f,p]=S.useState(!1),[v,m]=S.useState(null),h=S.useRef([]),y=S.useRef([]),b=S.useContext(Lp),x=Sr(),E=Tr(),T=JA(),I=wv(),w=x!==null,{floatingStyles:k,refs:P,context:_}=Gn({nodeId:T,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Qr,placement:w?"right":"bottom-start",middleware:[$o({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ds(),Ms()]}),F=fr(_,{role:"menu"}),$=kr(_,{bubbles:!0}),N=_v(_,{move:!1,enabled:n,delay:{open:ty},handleClose:ey({blockPointerEvents:!0,requireIntent:!1})}),O=zo(_,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),D=Hs(_,{loop:!0,activeIndex:v,nested:w,listRef:h,onNavigate:m}),z=EP(_,{activeIndex:v,listRef:y,resetMs:CP,onMatch:u?m:void 0}),{getReferenceProps:M,getFloatingProps:C,getItemProps:V}=Yn([N,O,F,$,D,z]);S.useEffect(()=>{if(!E)return;const B=()=>d(!1),H=q=>{q.nodeId!==T&&q.parentId===x&&d(!1)};return E.events.on("click",B),E.events.on("menuopen",H),()=>{E.events.off("click",B),E.events.off("menuopen",H)}},[E,T,x]),S.useEffect(()=>{u&&E&&E.events.emit("menuopen",{parentId:x,nodeId:T})},[E,u,T,x]);const j=o?l.className:Oe(uS(l.className));return g.jsxs(eP,{id:T,children:[g.jsx(S.Fragment,{children:l.asChild?g.jsx(cS,{...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:s,className:j,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):g.jsxs("button",{type:"button",className:j,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:[s,w&&g.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[g.jsx("span",{className:"sr-only",children:"Next menu"}),g.jsx(vu,{size:14})]})]})}),g.jsx(Lp.Provider,{value:{activeIndex:v,setActiveIndex:m,getItemProps:V,setHasFocusInside:p,isOpen:u},children:g.jsx(GA,{elementsRef:h,labelsRef:y,children:u&&g.jsx(dr,{children:g.jsx(to,{context:_,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:g.jsx(t,{...C(),ref:P.setFloating,style:{...l.style,...k},className:Oe("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",a),children:e})})})})})]})}),Z$=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(Lp),s=wv({label:n?null:e}),l=Tr(),c=s.index===a.activeIndex;return g.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:sr(s.ref,i),className:uS(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),a.setHasFocusInside(!0)}}),children:[r,t?g.jsx(t,{size:16}):null]})}),X$=S.forwardRef((e,t)=>Sr()===null?g.jsx(tP,{children:g.jsx(dS,{...e,isParent:!0,ref:t})}):g.jsx(dS,{...e,isParent:!1,ref:t})),Vp=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return g.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[g.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Oe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,g.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Q$=({children:e,className:t="",size:n,...r})=>g.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[g.jsx("input",{...r,type:"radio",className:Oe("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),J$=sy("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
14
+ `),()=>{E.contains(x)&&E.removeChild(x)}},[t]),g.jsx(NN,{isPresent:t,childRef:a,sizeRef:s,children:A.cloneElement(e,{ref:u})})}const LN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=_n(VN),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:v=>{u.set(v,!0);for(const m of u.values())if(!m)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return i&&f&&(p={...p}),S.useMemo(()=>{u.forEach((v,m)=>u.set(m,!1))},[n]),A.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(FN,{isPresent:n,anchorX:s,anchorY:l,root:c,children:e})),g.jsx(cl.Provider,{value:p,children:e})};function VN(){return new Map}function L0(e=!0){const t=S.useContext(cl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const a=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Tl=e=>e.key||"";function V0(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const xn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=L0(a),f=S.useMemo(()=>V0(e),[e]),p=a&&!u?[]:f.map(Tl),v=S.useRef(!0),m=S.useRef(f),h=_n(()=>new Map),y=S.useRef(new Set),[b,x]=S.useState(f),[E,T]=S.useState(f);ll(()=>{v.current=!1,m.current=f;for(let k=0;k<E.length;k++){const P=Tl(E[k]);p.includes(P)?(h.delete(P),y.current.delete(P)):h.get(P)!==!0&&h.set(P,!1)}},[E,p.length,p.join("-")]);const I=[];if(f!==b){let k=[...f];for(let P=0;P<E.length;P++){const _=E[P],F=Tl(_);p.includes(F)||(k.splice(P,0,_),I.push(_))}return i==="wait"&&I.length&&(k=I),T(V0(k)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&E.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(na);return g.jsx(g.Fragment,{children:E.map(k=>{const P=Tl(k),_=a&&!u?!1:f===E||p.includes(P),F=()=>{if(y.current.has(P))return;if(y.current.add(P),h.has(P))h.set(P,!0);else return;let $=!0;h.forEach(N=>{N||($=!1)}),$&&(w?.(),T(m.current),a&&d?.(),r&&r())};return g.jsx(LN,{isPresent:_,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:s,anchorY:l,children:k},P)})})},$N=S.createContext(null);function jN(){const e=S.useRef(!1);return ll(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function zN(){const e=jN(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>gt.postRender(r),[r]),t]}const $0=e=>e===!0,RN=e=>$0(e===!0)||e==="id",BN=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(na),o=S.useContext($N),[i,a]=zN(),s=S.useRef(null),l=r.id||o;s.current===null&&(RN(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:$0(n)&&r.group||D0()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return g.jsx(na.Provider,{value:c,children:e})},j0=S.createContext({strict:!1}),z0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let R0=!1;function HN(){if(R0)return;const e={};for(const t in z0)e[t]={isEnabled:n=>z0[t].some(r=>!!n[r])};Px(e),R0=!0}function B0(){return HN(),kD()}function WN(e){const t=B0();for(const n in e)t[n]={...t[n],...e[n]};Px(t)}const qN=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function El(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qN.has(e)}let H0=e=>!El(e);function W0(e){typeof e=="function"&&(H0=t=>t.startsWith("on")?!El(t):e(t))}try{W0(require("@emotion/is-prop-valid").default)}catch{}function UN(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(H0(o)||n===!0&&El(o)||!t&&!El(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function _f({children:e,isValidProp:t,...n}){t&&W0(t),n={...S.useContext(ii),...n},n.isStatic=_n(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return g.jsx(ii.Provider,{value:r,children:e})}const kl=S.createContext({});function GN(e,t){if(vl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ha(n)?n:void 0,animate:ha(r)?r:void 0}}return e.inherit!==!1?t:{}}function YN(e){const{initial:t,animate:n}=GN(e,S.useContext(kl));return S.useMemo(()=>({initial:t,animate:n}),[q0(t),q0(n)])}function q0(e){return Array.isArray(e)?e.join(" "):e}const Mf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function U0(e,t,n){for(const r in t)!zt(t[r])&&!Hx(r,n)&&(e[r]=t[r])}function KN({transformTemplate:e},t){return S.useMemo(()=>{const n=Mf();return kf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZN(e,t){const n=e.style||{},r={};return U0(r,n,e),Object.assign(r,KN(e,t)),r}function XN(e,t){const n={},r=ZN(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const G0=()=>({...Mf(),attrs:{}});function QN(e,t,n,r){const o=S.useMemo(()=>{const i=G0();return qx(i,t,Gx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};U0(i,e.style,e),o.style={...i,...o.style}}return o}const JN=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Df(e){return typeof e!="string"||e.includes("-")?!1:!!(JN.indexOf(e)>-1||/[A-Z]/u.test(e))}function e2(e,t,n,{latestValues:r},o,i=!1,a){const l=(a??Df(e)?QN:XN)(t,r,o,e),c=UN(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>zt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function t2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:n2(n,r,o,e),renderState:t()}}function n2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=wl(i[f]);let{initial:a,animate:s}=e;const l=vl(e),c=Ix(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!gl(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const v=af(e,f[p]);if(v){const{transitionEnd:m,transition:h,...y}=v;for(const b in y){let x=y[b];if(Array.isArray(x)){const E=u?x.length-1:0;x=x[E]}x!==null&&(o[b]=x)}for(const b in m)o[b]=m[b]}}}return o}const Y0=e=>(t,n)=>{const r=S.useContext(kl),o=S.useContext(cl),i=()=>t2(e,t,r,o);return n?i():_n(i)},r2=Y0({scrapeMotionValuesFromProps:If,createRenderState:Mf}),o2=Y0({scrapeMotionValuesFromProps:Yx,createRenderState:G0}),i2=Symbol.for("motionComponentSymbol");function a2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const K0=S.createContext({});function ya(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function s2(e,t,n,r,o,i){const{visualElement:a}=S.useContext(kl),s=S.useContext(j0),l=S.useContext(cl),c=S.useContext(ii).reducedMotion,u=S.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,f=S.useContext(K0);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&l2(u.current,n,o,f);const p=S.useRef(!1);S.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const v=n[ax],m=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return ll(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),m.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),m.current=!1),d.enteringChildren=void 0)}),d}function l2(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Z0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&ya(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Z0(e){if(e)return e.options.allowProjection!==!1?e.projection:Z0(e.parent)}function Nf(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&WN(r);const i=n?n==="svg":Df(e),a=i?o2:r2;function s(c,u){let d;const f={...S.useContext(ii),...c,layoutId:c2(c)},{isStatic:p}=f,v=YN(c),m=a(c,p);if(!p&&tb){u2(f,r);const h=d2(f);d=h.MeasureLayout,v.visualElement=s2(e,m,f,o,h.ProjectionNode,i)}return g.jsxs(kl.Provider,{value:v,children:[d&&v.visualElement?g.jsx(d,{visualElement:v.visualElement,...f}):null,e2(e,c,a2(m,v.visualElement,u),m,p,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(s);return l[i2]=e,l}function c2({layoutId:e}){const t=S.useContext(na).id;return t&&e!==void 0?t+"-"+e:e}function u2(e,t){const n=S.useContext(j0).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Yo(!1,r,"lazy-strict-mode"):dn(!1,r,"lazy-strict-mode")}}function d2(e){const t=B0(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function f2(e,t){if(typeof Proxy>"u")return Nf;const n=new Map,r=(i,a)=>Nf(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&kd(!1,"motion() is deprecated. Use motion.create() instead."),r(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Nf(a,void 0,e,t)),n.get(a))})}const p2=(e,t)=>t.isSVG??Df(e)?new Kx(t):new Wx(t,{allowProjection:e!==S.Fragment});class h2 extends Dr{constructor(t){super(t),t.animationState||(t.animationState=UD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let m2=0;class g2 extends Dr{constructor(){super(...arguments),this.id=m2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const v2={animation:{Feature:h2},exit:{Feature:g2}};function ba(e){return{point:{x:e.pageX,y:e.pageY}}}const y2=e=>t=>gf(t)&&e(t,ba(t));function xa(e,t,n,r){return va(e,t,y2(n),r)}const X0=({current:e})=>e?e.ownerDocument.defaultView:null,Q0=(e,t)=>Math.abs(e-t);function b2(e,t){const n=Q0(e.x,t.x),r=Q0(e.y,t.y);return Math.sqrt(n**2+r**2)}const J0=new Set(["auto","scroll"]);class ew{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Lf(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,m=b2(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!m)return;const{point:h}=p,{timestamp:y}=Kt;this.history.push({...h,timestamp:y});const{onStart:b,onMove:x}=this.handlers;v||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Ff(v,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:m,onSessionEnd:h,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Lf(p.type==="pointercancel"?this.lastMoveEventInfo:Ff(v,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,b),h&&h(p,b)},!gf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const l=ba(t),c=Ff(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Kt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Lf(c,this.history)),this.removeListeners=oa(xa(this.contextWindow,"pointermove",this.handlePointerMove),xa(this.contextWindow,"pointerup",this.handlePointerUp),xa(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(J0.has(r.overflowX)||J0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hr(this.updatePoint)}}function Ff(e,t){return t?{point:t(e.point)}:e}function tw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Lf({point:e},t){return{point:e,delta:tw(e,nw(t)),offset:tw(e,x2(t)),velocity:w2(t,.1)}}function x2(e){return e[0]}function nw(e){return e[e.length-1]}function w2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=nw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const i=yn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function S2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?yt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?yt(n,e,r.max):Math.min(e,n)),e}function rw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function T2(e,{top:t,left:n,bottom:r,right:o}){return{x:rw(e.x,n,o),y:rw(e.y,t,r)}}function ow(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function E2(e,t){return{x:ow(e.x,t.x),y:ow(e.y,t.y)}}function k2(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=Ko(t.min,t.max-r,e.min):r>o&&(n=Ko(e.min,e.max-o,t.min)),Kn(0,1,n)}function C2(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Vf=.35;function I2(e=Vf){return e===!1?e=0:e===!0&&(e=Vf),{x:iw(e,"left","right"),y:iw(e,"top","bottom")}}function iw(e,t,n){return{min:aw(e,t),max:aw(e,n)}}function aw(e,t){return typeof e=="number"?e:e[t]||0}const A2=new WeakMap;class P2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(ba(d).point)):this.pauseAnimation()},a=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:v,onDragStart:m}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=fD(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bn(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Zn.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const E=x.layout.layoutBox[y];E&&(b=en(E)*(parseFloat(b)/100))}}this.originPoint[y]=b}),m&&gt.postRender(()=>m(d,f)),lf(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:m,onDrag:h}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=O2(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),h&&h(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>bn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ew(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:X0(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&gt.postRender(()=>s(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Cl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=S2(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&ya(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=T2(r.layoutBox,t):this.constraints=!1,this.elastic=I2(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&bn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=C2(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ya(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=PD(r,o.root,this.visualElement.getTransformPagePoint());let a=E2(o.layout.layoutBox,i);if(n){const s=n(CD(a));this.hasMutatedConstraints=!!s,s&&(a=Mx(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=bn(u=>{if(!Cl(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return lf(this.visualElement,t),r.start(of(t,r,0,n,this.visualElement,!1))}stopAnimation(){bn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){bn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){bn(n=>{const{drag:r}=this.getProps();if(!Cl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-yt(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ya(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};bn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=k2({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),bn(a=>{if(!Cl(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(yt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;A2.set(this.visualElement,this);const t=this.visualElement.current,n=xa(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==t&&xx(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ya(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),gt.read(r);const a=va(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(bn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Vf,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Cl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function O2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class _2 extends Dr{constructor(t){super(t),this.removeGroupControls=vn,this.removeListeners=vn,this.controls=new P2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const sw=e=>(t,n)=>{e&&gt.postRender(()=>e(t,n))};class M2 extends Dr{constructor(){super(...arguments),this.removePointerDownListener=vn}onPointerDown(t){this.session=new ew(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:X0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:sw(t),onStart:sw(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&gt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=xa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let $f=!1;class D2 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),$f&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Sl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,$f=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||gt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),mf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;$f=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function lw(e){const[t,n]=L0(),r=S.useContext(na);return g.jsx(D2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(K0),isPresent:t,safeToRemove:n})}const N2={pan:{Feature:M2},drag:{Feature:_2,ProjectionNode:N0,MeasureLayout:lw}};function cw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&gt.postRender(()=>i(t,ba(t)))}class F2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=pD(t,(n,r)=>(cw(this.node,r,"Start"),o=>cw(this.node,o,"End"))))}unmount(){}}class L2 extends Dr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oa(va(this.node.current,"focus",()=>this.onFocus()),va(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function uw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&gt.postRender(()=>i(t,ba(t)))}class V2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=gD(t,(n,r)=>(uw(this.node,r,"Start"),(o,{success:i})=>uw(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jf=new WeakMap,zf=new WeakMap,$2=e=>{const t=jf.get(e.target);t&&t(e)},j2=e=>{e.forEach($2)};function z2({root:e,...t}){const n=e||document;zf.has(n)||zf.set(n,{});const r=zf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(j2,{root:e,...t})),r[o]}function R2(e,t,n){const r=z2(t);return jf.set(e,n),r.observe(e),()=>{jf.delete(e),r.unobserve(e)}}const B2={some:0,all:1};class H2 extends Dr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:B2[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return R2(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(W2(t,n))&&this.startObserver()}unmount(){}}function W2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const q2={...v2,...{inView:{Feature:H2},tap:{Feature:V2},focus:{Feature:L2},hover:{Feature:F2}},...N2,...{layout:{ProjectionNode:N0,MeasureLayout:lw}}},Re=f2(q2,p2);function U2(e){return S.useEffect(()=>()=>e(),[])}function po(e){const t=_n(()=>co(e)),{isStatic:n}=S.useContext(ii);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function dw(e,t){const n=po(t()),r=()=>n.set(t());return r(),ll(()=>{const o=()=>gt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),hr(r)}}),n}function G2(e){fa.current=[],e();const t=dw(fa.current,e);return fa.current=void 0,t}function Y2(e,t,n,r){if(typeof e=="function")return G2(e);const i=typeof t=="function"?t:bD(t,n,r);return Array.isArray(e)?fw(e,i):fw([e],([a])=>i(a))}function fw(e,t){const n=_n(()=>[]);return dw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Rf(e){return typeof e=="object"&&!Array.isArray(e)}function pw(e,t,n,r){return e==null?[]:typeof e=="string"&&Rf(t)?hx(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function K2(e,t,n){return e*(t+1)}function hw(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Z2(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ra(e,o),r--)}}function X2(e,t,n,r,o,i){Z2(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:yt(o,i,r[a]),easing:vb(n,a)})}function Q2(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function J2(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const eF="easeInOut",tF=20;function nF(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<e.length;p++){const v=e[p];if(typeof v=="string"){c.set(v,d);continue}else if(!Array.isArray(v)){c.set(v.name,hw(d,v.at,u,c));continue}let[m,h,y={}]=v;y.at!==void 0&&(d=hw(d,y.at,u,c));let b=0;const x=(E,T,I,w=0,k=0)=>{const P=rF(E),{delay:_=0,times:F=Rb(P),type:$=t.type||"keyframes",repeat:N,repeatType:O,repeatDelay:D=0,...z}=T;let{ease:M=t.ease||"easeOut",duration:C}=T;const V=typeof _=="function"?_(w,k):_,j=P.length,B=ef($)?$:o?.[$||"keyframes"];if(j<=2&&B){let ne=100;if(j===2&&aF(P)){const G=P[1]-P[0];ne=Math.abs(G)}const re={...t,...z};C!==void 0&&(re.duration=Mn(C));const ee=Lb(re,ne,B);M=ee.ease,C=ee.duration}C??(C=i);const H=d+V;F.length===1&&F[0]===0&&(F[1]=1);const q=F.length-P.length;if(q>0&&zb(F,q),P.length===1&&P.unshift(null),N){dn(N<tF,"Repeat count too high, must be less than 20","repeat-count-high"),C=K2(C,N);const ne=[...P],re=[...F];M=Array.isArray(M)?[...M]:[M];const ee=[...M];for(let G=0;G<N;G++){P.push(...ne);for(let Y=0;Y<ne.length;Y++)F.push(re[Y]+(G+1)),M.push(Y===0?"linear":vb(ee,Y-1))}Q2(F,N)}const W=H+C;X2(I,P,M,F,H,W),b=Math.max(V+C,b),f=Math.max(W,f)};if(zt(m)){const E=mw(m,s);x(h,y,gw("default",E))}else{const E=pw(m,h,r,l),T=E.length;for(let I=0;I<T;I++){h=h,y=y;const w=E[I],k=mw(w,s);for(const P in h)x(h[P],oF(y,P),gw(P,k),I,T)}}u=d,d+=b}return s.forEach((p,v)=>{for(const m in p){const h=p[m];h.sort(J2);const y=[],b=[],x=[];for(let w=0;w<h.length;w++){const{at:k,value:P,easing:_}=h[w];y.push(P),b.push(Ko(0,f,k)),x.push(_||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),x.unshift(eF)),b[b.length-1]!==1&&(b.push(1),y.push(null)),a.has(v)||a.set(v,{keyframes:{},transition:{}});const E=a.get(v);E.keyframes[m]=y;const{type:T,...I}=t;E.transition[m]={...I,duration:f,ease:x,times:b,...n}}}),a}function mw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function gw(e,t){return t[e]||(t[e]=[]),t[e]}function rF(e){return Array.isArray(e)?e:[e]}function oF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const iF=e=>typeof e=="number",aF=e=>e.every(iF);function sF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=yf(e)&&!Tx(e)?new Kx(t):new Wx(t);n.mount(e),pa.set(e,n)}function lF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new LD(t);n.mount(e),pa.set(e,n)}function cF(e,t){return zt(e)||typeof e=="number"||typeof e=="string"&&!Rf(t)}function vw(e,t,n,r){const o=[];if(cF(e,t))o.push(w0(e,Rf(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=pw(e,t,r),a=i.length;dn(!!a,"No valid elements provided.","no-valid-elements");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?sF:lF;pa.has(l)||c(l);const u=pa.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...uf(u,{...t,transition:d},{}))}}return o}function uF(e,t,n){const r=[];return nF(e,t,n,{spring:ua}).forEach(({keyframes:i,transition:a},s)=>{r.push(...vw(s,i,a))}),r}function dF(e){return Array.isArray(e)&&e.some(Array.isArray)}function yw(e){function t(n,r,o){let i=[],a;if(dF(n))i=uF(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(a=l),i=vw(n,r,c,e)}const s=new LM(i);return a&&s.finished.then(a),e&&(e.animations.push(s),s.finished.then(()=>{ra(e.animations,s)})),s}return t}const bw=yw();function fF(){const e=_n(()=>({current:null,animations:[]})),t=_n(()=>yw(e));return U2(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class pF{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const hF=()=>new pF;function mF(){return _n(hF)}const xw=S.createContext(null);function gF(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=yt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?p_(e,o,o+i):e}function vF({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=_n(()=>Re[t]),l=[],c=S.useRef(!1),u=S.useRef(null);dn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(v,m)=>{const h=l.findIndex(y=>v===y.value);h!==-1?l[h].layout=m[n]:l.push({value:v,layout:m[n]}),l.sort(bF)},updateOrder:(v,m,h)=>{if(c.current)return;const y=gF(l,v,m,h);l!==y&&(c.current=!0,r(y.map(yF).filter(b=>o.indexOf(b)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=v=>{u.current=v,typeof a=="function"?a(v):a&&(a.current=v)},p={overflowAnchor:"none",...i.style};return g.jsx(s,{...i,style:p,ref:f,ignoreStrict:!0,children:g.jsx(xw.Provider,{value:d,children:e})})}const ww=S.forwardRef(vF);function yF(e){return e.value}function bF(e,t){return e.layout.min-t.layout.min}const Il=50,Sw=25,xF=new Set(["auto","scroll"]),wa=new WeakMap,Sa=new WeakMap;let Ta=null;function wF(){if(Ta){const e=Bf(Ta,"y");e&&(Sa.delete(e),wa.delete(e));const t=Bf(Ta,"x");t&&t!==e&&(Sa.delete(t),wa.delete(t)),Ta=null}}function SF(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return xF.has(r)}function Bf(e,t){let n=e?.parentElement;for(;n;){if(SF(n,t))return n;n=n.parentElement}return null}function TF(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,a=e-o,s=i-e;if(a<Il){const l=1-a/Il;return{amount:-Sw*l*l,edge:"start"}}else if(s<Il){const l=1-s/Il;return{amount:Sw*l*l,edge:"end"}}return{amount:0,edge:null}}function EF(e,t,n,r){if(!e)return;Ta=e;const o=Bf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:a,edge:s}=TF(i,o,n);if(s===null){Sa.delete(o),wa.delete(o);return}if(Sa.get(o)!==s){if(!(s==="start"&&r<0||s==="end"&&r>0))return;Sa.set(o,s);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;wa.set(o,u)}if(a>0){const c=wa.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=a:o.scrollTop+=a}function Tw(e,t=0){return zt(e)?e:po(t)}function kF({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:a=!0,...s},l){const c=_n(()=>Re[r]),u=S.useContext(xw),d={x:Tw(t.x),y:Tw(t.y)},f=Y2([d.x,d.y],([y,b])=>y||b?1:"unset");dn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:v,updateOrder:m,groupRef:h}=u;return g.jsx(c,{drag:p,...s,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:a,onDrag:(y,b)=>{const{velocity:x,point:E}=b,T=d[p].get();m(n,T,x[p]),EF(h.current,E[p],p,x[p]),o&&o(y,b)},onDragEnd:(y,b)=>{wF(),i&&i(y,b)},onLayoutMeasure:y=>{v(n,y)},ref:l,ignoreStrict:!0,children:e})}const Ew=S.forwardRef(kF);var Al={exports:{}},Hf={},Pl={exports:{}},Wf={};var kw;function CF(){if(kw)return Wf;kw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var p=f(),v=r({inst:{value:p,getSnapshot:f}}),m=v[0].inst,h=v[1];return i(function(){m.value=p,m.getSnapshot=f,l(m)&&h({inst:m})},[d,p,f]),o(function(){return l(m)&&h({inst:m}),d(function(){l(m)&&h({inst:m})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Wf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Wf}var qf={};var Cw;function IF(){return Cw||(Cw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=v();if(!d){var h=v();i(m,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=a({inst:{value:m,getSnapshot:v}});var y=h[0].inst,b=h[1];return l(function(){y.value=m,y.getSnapshot=v,n(y)&&b({inst:y})},[p,m,v]),s(function(){return n(y)&&b({inst:y}),p(function(){n(y)&&b({inst:y})})},[p]),c(m),m}function n(p){var v=p.getSnapshot;p=p.value;try{var m=v();return!i(p,m)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;qf.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),qf}var Iw;function Aw(){return Iw||(Iw=1,process.env.NODE_ENV==="production"?Pl.exports=CF():Pl.exports=IF()),Pl.exports}var Pw;function AF(){if(Pw)return Hf;Pw=1;var e=S,t=Aw();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Hf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=s(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&m.hasValue){var w=m.value;if(p(w,I))return E=w}return E=I}if(w=E,r(x,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(x=I,w):(x=I,E=k)}var b=!1,x,E,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,f,p]);var h=o(c,v[0],v[1]);return a(function(){m.hasValue=!0,m.value=h},[h]),l(h),h},Hf}var Uf={};var Ow;function PF(){return Ow||(Ow=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=Aw(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Uf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=s(function(){function y(I){if(!b){if(b=!0,x=I,I=f(I),p!==void 0&&m.hasValue){var w=m.value;if(p(w,I))return E=w}return E=I}if(w=E,r(x,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(x=I,w):(x=I,E=k)}var b=!1,x,E,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,f,p]);var h=o(c,v[0],v[1]);return a(function(){m.hasValue=!0,m.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Uf}var _w;function OF(){return _w||(_w=1,process.env.NODE_ENV==="production"?Al.exports=AF():Al.exports=PF()),Al.exports}OF();var ai=function(){return ai=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ai.apply(this,arguments)};function Ea(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Mw(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var si=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},_F=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},MF=function(e){return Object.entries(e)},Dw=function(e){return e instanceof Promise},Nw=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},ai(ai({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},DF=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,Mw([],Ea(a),!1)),u=function(d,f){return n(function(p){return Nw(d,p,i,f)})};return Dw(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},NF=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,Mw([],Ea(a),!1)),c=function(u){return n(function(d){return Nw(u,d,i,o.current)})};return Dw(l)?l.then(function(u){return c(u)}):c(l)}},Gf=function(e,t,n){var r,o,i,a=Ea(S.useState(function(){return e}),2),s=a[0],l=a[1],c=si(s),u=si((r=n?.props)!==null&&r!==void 0?r:{}),d=si(t),f=si((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=si((i=n?.interceptor)!==null&&i!==void 0?i:[]),v=S.useRef(e),m=_F(s),h=si(m),y=S.useRef(null);S.useEffect(function(){if(y.current!==null){var E=y.current;f.current.forEach(function(T){T(s,m,E)})}},[s,f,m]);var b=Ea(S.useState(function(){var E=function(){return u.current},T=d.current({props:E,state:function(){return c.current},initialState:v.current,previousState:function(){return h.current}});return MF(T).reduce(function(I,w){var k,P=Ea(w,2),_=P[0],F=P[1];return ai(ai({},I),(k={},k[_]=n?.debug?DF(_,F,l,E,y,p.current):NF(_,F,l,E,y,p.current),k))},{})}),1),x=b[0];return[s,x,u.current]},FF=Object.defineProperty,Fw=Object.getOwnPropertySymbols,LF=Object.prototype.hasOwnProperty,VF=Object.prototype.propertyIsEnumerable,Lw=(e,t,n)=>t in e?FF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$F=(e,t)=>{for(var n in t||(t={}))LF.call(t,n)&&Lw(e,n,t[n]);if(Fw)for(var n of Fw(t))VF.call(t,n)&&Lw(e,n,t[n]);return e},Yf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},jF=(e,t,n,r)=>_l(Yf,e,t,n,r),li=e=>typeof e=="object",Nr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!li(e)&&!li(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Nr(e[r],t[r]))},zF=(e,t)=>(li(e)||Array.isArray(e))&&t?e[t]:e,RF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ol=e=>/[0-9.]+/.test(e),Vw=e=>["string","number"].includes(typeof e),$w=e=>e==null||e?.length===0||e==="",jw={eq:Nr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:$w,notEmpty:e=>!$w(e),in:(e,t)=>Yf(t,n=>Nr(e,n)),notIn:(e,t)=>zw(t,n=>!Nr(e,n))},BF=e=>{if(e in jw)return jw[e];throw new Error("Linq - Symbol not found")},ci=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},_l=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=BF(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},HF=(e,t,n,r)=>_l(ci,e,t,n,r),zw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},WF=(e,t,n,r)=>_l(zw,e,t,n,r),Rw=e=>{if(e===null)return null;const t=$F({},e);return Object.keys(t).forEach(n=>t[n]=li(e[n])?Rw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Bw=(e,t)=>{if(li(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1},qF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},UF=e=>ci(e,(t,n,r)=>li(t)?n===r.findIndex(o=>Nr(o,t)):n===r.indexOf(t)),GF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Hw=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},YF=(e,t)=>Hw(e,n=>n[t]),Ww=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},KF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},ZF=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Ol(e)&&Ol(t)?r.map(a=>Number.parseInt(a)):r},Kf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ol(e)&&Ol(t)){const o=[],[i,a]=KF(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return ZF(e,t,r)},XF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Kf(r,o,1):Kf(r,i,Number.parseInt(o,10))}return Vw(e)&&Vw(t)?Kf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Zf=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},qw=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},QF=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},JF=(e,t,n,r)=>_l(QF,e,t,n,r),Uw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(RF(t))},Gw=(e=>(e.Asc="asc",e.Desc="desc",e))(Gw||{}),eL=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),tL=(e,t)=>e.sort(eL(t)),nL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ci(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},rL=class zh{constructor(t=[]){this.array=t}static Range(...t){return XF(...t)}static New(t){return new zh(t)}Where(t,n,r){return this.array=HF(this.array,t,n,r),this}Some(t,n,r){return jF(this.array,t,n,r)}All(t,n,r){return WF(this.array,t,n,r)}Reverse(){return this.array=qw(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=JF(this.array,t,n,r),this}Distinct(){return this.array=UF(this.array),this}First(t){return t===void 0?this.array[0]:GF(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?Zf((n,r)=>n+r,0,this.array):Zf((n,r)=>n+zF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return YF(this.array,t)}GroupWith(t){return Hw(this.array,t)}Except(t){return ci(this.array,n=>!Bw(t,n))}Intersect(t){return ci(this.array,n=>Bw(t,n))}OrderBy(t,n){let r;return r=t?Uw(this.array,t):this.array.toSorted(),this.array=n==="desc"?qw(r):r,this}Includes(t){return Yf(this.array,n=>Nr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return Zf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Ww(this.array,n=>[t,n]))}Zip(t,n){return Ww(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ci(this.array,t).length}Get(t){return this.array[t]}Clone(){return new zh(Rw(this.array))}ToObject(t){return qF(this.array,t)}Sort(t){return Array.isArray(t)?tL(this.array,t):Uw(this.array,t)}Unique(t){return nL(this.array,t)}},Yw=rL;const Ml=0,Fr=1,ui=2,Kw=4;function Zw(e){return()=>e}function oL(e){e()}function ka(e,t){return n=>e(t(n))}function Xw(e,t){return()=>e(t)}function iL(e,t){return n=>e(t,n)}function Xf(e){return e!==void 0}function aL(...e){return()=>{e.map(oL)}}function di(){}function Dl(e,t){return t(e),e}function sL(e,t){return t(e)}function bt(...e){return e}function st(e,t){return e(Fr,t)}function je(e,t){e(Ml,t)}function Qf(e){e(ui)}function Tt(e){return e(Kw)}function Ie(e,t){return st(e,iL(t,Ml))}function Fn(e,t){const n=e(Fr,r=>{n(),t(r)});return n}function Qw(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Jw(e,t){return e===t}function xt(e=Jw){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function _e(e){return t=>n=>{e(n)&&t(n)}}function be(e){return t=>ka(t,e)}function Xn(e){return t=>()=>{t(e)}}function ce(e,...t){const n=lL(...t);return((r,o)=>{switch(r){case ui:Qf(e);return;case Fr:return st(e,n(o))}})}function Qn(e,t){return n=>r=>{n(t=e(t,r))}}function ho(e){return t=>n=>{e>0?e--:t(n)}}function mr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Be(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function lL(...e){return t=>e.reduceRight(sL,t)}function cL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Fr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),di);case ui:r(),n=null;return}}}function pe(e){let t=e;const n=Ye();return((r,o)=>{switch(r){case Ml:t=o;break;case Fr:{o(t);break}case Kw:return t}return n(r,o)})}function Qt(e,t){return Dl(pe(t),n=>Ie(e,n))}function Ye(){const e=[];return((t,n)=>{switch(t){case Ml:e.slice().forEach(r=>{r(n)});return;case ui:e.splice(0,e.length);return;case Fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function fn(e){return Dl(Ye(),t=>Ie(e,t))}function Qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:uL(),singleton:n}}const uL=()=>Symbol();function dL(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function Vt(...e){const t=Ye(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{n[a]=l,r=r|s,r===o&&je(t,n)})}),function(i,a){switch(i){case ui:{Qf(t);return}case Fr:return r===o&&a(n),st(t,a)}}}function Me(e,t=Jw){return ce(e,xt(t))}function Jf(...e){return function(t,n){switch(t){case ui:return;case Fr:return aL(...e.map(r=>st(r,n)))}}}var sn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(sn||{});const fL={0:"debug",3:"error",1:"log",2:"warn"},pL=()=>typeof globalThis>"u"?window:globalThis,Lr=Qe(()=>{const e=pe(3);return{log:pe((t,n,r=1)=>{var o;const i=(o=pL().VIRTUOSO_LOG_LEVEL)!=null?o:Tt(e);r>=i&&console[fL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Jn(e,t,n){return ep(e,t,n).callbackRef}function ep(e,t,n){const r=S.useRef(null);let o=a=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}):null,[e,n]);return o=a=>{a&&t?(i?.observe(a),r.current=a):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function e1(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=hL(u.children,t,s?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let v;p&&(v=f.ownerDocument.defaultView);const m=a?s?a.scrollLeft:a.scrollTop:p?s?v.scrollX||v.document.documentElement.scrollLeft:v.scrollY||v.document.documentElement.scrollTop:s?f.scrollLeft:f.scrollTop,h=a?s?a.scrollWidth:a.scrollHeight:p?s?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight:s?f.scrollWidth:f.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:p?s?v.innerWidth:v.innerHeight:s?f.offsetWidth:f.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(m,0),viewportHeight:y}),i?.(s?t1("column-gap",getComputedStyle(u).columnGap,o):t1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return ep(c,n,l)}function hL(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},sn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function t1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}function tp(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),v=c.top-p.top;f=p.height-Math.max(0,v),d=v+t.scrollTop}else{const p=a.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=ep(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const tn=Qe(()=>{const e=Ye(),t=Ye(),n=pe(0),r=Ye(),o=pe(0),i=Ye(),a=Ye(),s=pe(0),l=pe(0),c=pe(0),u=pe(0),d=Ye(),f=Ye(),p=pe(!1),v=pe(!1),m=pe(!1);return Ie(ce(e,be(({scrollTop:h})=>h)),t),Ie(ce(e,be(({scrollHeight:h})=>h)),a),Ie(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:v,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Ca={lvl:0};function n1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ft(e){return e===Ca}function Ia(e,t){if(!ft(e))return t===e.k?e.v:t<e.k?Ia(e.l,t):Ia(e.r,t)}function Ln(e,t,n="k"){if(ft(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ln(e.l,t,n)}function pn(e,t,n){return ft(e)?i1(t,n,1):t===e.k?Rt(e,{k:t,v:n}):t<e.k?a1(Rt(e,{l:pn(e.l,t,n)})):a1(Rt(e,{r:pn(e.r,t,n)}))}function fi(){return Ca}function pi(e,t,n){if(ft(e))return[];const r=Ln(e,t)[0];return mL(rp(e,r,n))}function np(e,t){if(ft(e))return Ca;const{k:n,l:r,r:o}=e;if(t===n){if(ft(r))return o;if(ft(o))return r;{const[i,a]=o1(r);return Nl(Rt(e,{k:i,l:r1(r),v:a}))}}else return t<n?Nl(Rt(e,{l:np(r,t)})):Nl(Rt(e,{r:np(o,t)}))}function mo(e){return ft(e)?[]:[...mo(e.l),{k:e.k,v:e.v},...mo(e.r)]}function rp(e,t,n){if(ft(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(rp(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(rp(i,t,n))),s}function Nl(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(op(t))return s1(Rt(e,{lvl:n-1}));if(!ft(t)&&!ft(t.r))return Rt(t.r,{l:Rt(t,{r:t.r.l}),lvl:n,r:Rt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(op(e))return ip(Rt(e,{lvl:n-1}));if(!ft(r)&&!ft(r.l)){const o=r.l,i=op(o)?r.lvl-1:r.lvl;return Rt(o,{l:Rt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:ip(Rt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Rt(e,t){return i1(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function r1(e){return ft(e.r)?e.l:Nl(Rt(e,{r:r1(e.r)}))}function op(e){return ft(e)||e.lvl>e.r.lvl}function o1(e){return ft(e.r)?[e.k,e.v]:o1(e.r)}function i1(e,t,n,r=Ca,o=Ca){return{k:e,l:r,lvl:n,r:o,v:t}}function a1(e){return ip(s1(e))}function s1(e){const{l:t}=e;return!ft(t)&&t.lvl===e.lvl?Rt(t,{r:Rt(e,{l:t.r})}):e}function ip(e){const{lvl:t,r:n}=e;return!ft(n)&&!ft(n.r)&&n.lvl===t&&n.r.lvl===t?Rt(n,{l:Rt(e,{r:n.l}),lvl:t+1}):e}function mL(e){return n1(e,({k:t,v:n})=>({index:t,value:n}))}function l1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Aa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const ap=Qe(()=>({recalcInProgress:pe(!1)}),[],{singleton:!0});function c1(e,t,n){return e[Fl(e,t,n)]}function Fl(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function gL(e,t,n,r){const o=Fl(e,t,r),i=Fl(e,n,r,o);return e.slice(o,i+1)}function Vn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ll(e){return!ft(e.groupOffsetTree)}function sp({index:e},t){return t===e?0:t<e?-1:1}function vL(){return{groupIndices:[],groupOffsetTree:fi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:fi()}}function yL(e,t){let n=ft(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ft(e)){e=pn(e,0,i);continue}const s=pi(e,a-1,o+1);if(s.some(kL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of s)l?(o>=d||i===f)&&(e=np(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=pn(e,o+1,f));c&&(e=pn(e,a,i))}return[e,n]}function bL(e){return typeof e.groupIndex<"u"}function xL({offset:e},t){return t===e?0:t<e?-1:1}function Pa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=c1(t,e,sp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function u1(e,t){if(!Ll(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function d1(e,t,n){if(bL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=u1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function wL(e,t,n,r=0){return r>0&&(t=Math.max(t,c1(e,r,sp).offset)),n1(gL(e,t,n,xL),EL)}function SL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,sn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ft(i)&&t.length===2){const f=t[0].size,p=t[1].size;a=n.reduce((v,m)=>pn(pn(v,m,f),m+1,p),a)}else[a,s]=yL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=lp(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>pn(f,p,Pa(p,d,o)),fi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function TL(e){return mo(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function f1(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function lp(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Fl(o,t-1,sp),s=o[l].offset;const c=Ln(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of pi(n,t,1/0)){const d=c-i,f=d*a+s+d*r;o.push({index:c,offset:f,size:u}),i=c,s=f,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function EL(e){return{index:e.index,value:e}}function kL(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const CL={offsetHeight:"height",offsetWidth:"width"},er=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ye(),r=Ye(),o=Qt(r,0),i=Ye(),a=Ye(),s=pe(0),l=pe([]),c=pe(void 0),u=pe(void 0),d=pe(void 0),f=pe(void 0),p=pe((w,k)=>Vn(w,CL[k])),v=pe(void 0),m=pe(0),h=vL(),y=Qt(ce(n,Be(l,e,m),Qn(SL,h),xt()),h),b=Qt(ce(l,xt(),Qn((w,k)=>({current:k,prev:w.current}),{current:[],prev:[]}),be(({prev:w})=>w)),[]);Ie(ce(l,_e(w=>w.length>0),Be(y,m),be(([w,k,P])=>{const _=w.reduce((F,$,N)=>pn(F,$,Pa($,k.offsetTree,P)||N),fi());return{...k,groupIndices:w,groupOffsetTree:_}})),y),Ie(ce(r,Be(y),_e(([w,{lastIndex:k}])=>w<k),be(([w,{lastIndex:k,lastSize:P}])=>[{endIndex:k,size:P,startIndex:w}])),n),Ie(c,u);const x=Qt(ce(c,be(w=>w===void 0)),!0);Ie(ce(u,_e(w=>w!==void 0&&ft(Tt(y).sizeTree)),be(w=>{const k=Tt(d),P=Tt(l).length>0;return k?P?[{endIndex:0,size:k,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ie(ce(f,_e(w=>w!==void 0&&w.length>0&&ft(Tt(y).sizeTree)),be(w=>{const k=[];let P=w[0],_=0;for(let F=1;F<w.length;F++){const $=w[F];$!==P&&(k.push({endIndex:F-1,size:P,startIndex:_}),P=$,_=F)}return k.push({endIndex:w.length-1,size:P,startIndex:_}),k})),n),Ie(ce(l,Be(d,u),_e(([,w,k])=>w!==void 0&&k!==void 0),be(([w,k,P])=>{const _=[];for(let F=0;F<w.length;F++){const $=w[F],N=w[F+1];_.push({startIndex:$,endIndex:$,size:k}),N!==void 0&&_.push({startIndex:$+1,endIndex:N-1,size:P})}return _})),n);const E=fn(ce(n,Be(y),Qn(({sizes:w},[k,P])=>({changed:P!==w,sizes:P}),{changed:!1,sizes:h}),be(w=>w.changed)));st(ce(s,Qn((w,k)=>({diff:w.prev-k,prev:k}),{diff:0,prev:0}),be(w=>w.diff)),w=>{const{groupIndices:k}=Tt(y);if(w>0)je(t,!0),je(i,w+f1(w,k));else if(w<0){const P=Tt(b);P.length>0&&(w-=f1(-w,P)),je(a,w)}}),st(ce(s,Be(e)),([w,k])=>{w<0&&k("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},sn.ERROR)});const T=fn(i);Ie(ce(i,Be(y),be(([w,k])=>{const P=k.groupIndices.length>0,_=[],F=k.lastSize;if(P){const $=Ia(k.sizeTree,0);let N=0,O=0;for(;N<w;){const z=k.groupIndices[O],M=k.groupIndices.length===O+1?1/0:k.groupIndices[O+1]-z-1;_.push({endIndex:z,size:$,startIndex:z}),_.push({endIndex:z+1+M-1,size:F,startIndex:z+1}),O++,N+=M+1}const D=mo(k.sizeTree);return N!==w&&D.shift(),D.reduce((z,{k:M,v:C})=>{let V=z.ranges;return z.prevSize!==0&&(V=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:C,ranges:V}},{prevIndex:w,prevSize:0,ranges:_}).ranges}return mo(k.sizeTree).reduce(($,{k:N,v:O})=>({prevIndex:N+w,prevSize:O,ranges:[...$.ranges,{endIndex:N+w-1,size:$.prevSize,startIndex:$.prevIndex}]}),{prevIndex:0,prevSize:F,ranges:[]}).ranges})),n);const I=fn(ce(a,Be(y,m),be(([w,{offsetTree:k},P])=>{const _=-w;return Pa(_,k,P)})));return Ie(ce(a,Be(y,m),be(([w,k,P])=>{if(k.groupIndices.length>0){if(ft(k.sizeTree))return k;let _=fi();const F=Tt(b);let $=0,N=0,O=0;for(;$<-w;){O=F[N];const D=F[N+1]-O-1;N++,$+=D+1}if(_=mo(k.sizeTree).reduce((D,{k:z,v:M})=>pn(D,Math.max(0,z+w),M),_),$!==-w){const D=Ia(k.sizeTree,O);_=pn(_,0,D);const z=Ln(k.sizeTree,-w+1)[1];_=pn(_,1,z)}return{...k,sizeTree:_,...lp(k.offsetTree,0,_,P)}}else{const _=mo(k.sizeTree).reduce((F,{k:$,v:N})=>pn(F,Math.max(0,$+w),N),fi());return{...k,sizeTree:_,...lp(k.offsetTree,0,_,P)}}})),y),{beforeUnshiftWith:T,data:v,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,fixedGroupSize:d,gap:m,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:E,shiftWith:a,shiftWithOffset:I,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},bt(Lr,ap),{singleton:!0});function IL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const p1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ye(),a=Ye(),s=fn(ce(i,be(IL)));return Ie(ce(s,be(l=>l.totalCount)),n),Ie(ce(s,be(l=>l.groupIndices)),e),Ie(ce(Vt(o,t,r),_e(([l,c])=>Ll(c)),be(([l,c,u])=>Ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),be(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},bt(er,tn)),Vr=Qe(([{log:e}])=>{const t=pe(!1),n=fn(ce(t,_e(r=>r),xt()));return st(t,r=>{r&&Tt(e)("props updated",{},sn.DEBUG)}),{didMount:n,propsReady:t}},bt(Lr),{singleton:!0}),AL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function h1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!AL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oa=Qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const p=Ye(),v=Ye(),m=pe(0);let h=null,y=null,b=null;function x(){h&&(h(),h=null),b&&(b(),b=null),y&&(clearTimeout(y),y=null),je(l,!1)}return Ie(ce(p,Be(n,d,r,m,s,a,f),Be(e,i,o),be(([[E,T,I,w,k,P,_,F],$,N,O])=>{const D=h1(E),{align:z,behavior:M,offset:C}=D,V=w-1,j=d1(D,T,V);let B=Pa(j,T.offsetTree,$)+P;z==="end"?(B+=N+Ln(T.sizeTree,j)[1]-I+O,j===V&&(B+=_)):z==="center"?B+=(N+Ln(T.sizeTree,j)[1]-I+O)/2:B-=k,C&&(B+=C);const H=q=>{x(),q?(F("retrying to scroll to",{location:E},sn.DEBUG),je(p,E)):(je(v,!0),F("list did not change, scroll successful",{},sn.DEBUG))};if(x(),M==="smooth"){let q=!1;b=st(t,W=>{q=q||W}),h=Fn(u,()=>{H(q)})}else h=Fn(ce(t,PL(150)),H);return y=setTimeout(()=>{x()},1200),je(l,!0),F("scrolling from index to",{behavior:M,index:j,top:B},sn.DEBUG),{behavior:M,top:B}})),c),{scrollTargetReached:v,scrollToIndex:p,topListHeight:m}},bt(er,tn,Lr),{singleton:!0});function PL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function cp(e,t){e==0?t():requestAnimationFrame(()=>{cp(e-1,t)})}function up(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const _a=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=pe(!0),l=pe(0),c=pe(!0);return Ie(ce(a,Be(l),_e(([u,d])=>!!d),Xn(!1)),s),Ie(ce(a,Be(l),_e(([u,d])=>!!d),Xn(!1)),c),st(ce(Vt(t,a),Be(s,n,e,c),_e(([[,u],d,{sizeTree:f},p,v])=>u&&(!ft(f)||Xf(p))&&!d&&!v),Be(l)),([,u])=>{Fn(o,()=>{je(c,!0)}),cp(4,()=>{Fn(r,()=>{je(s,!0)}),je(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},bt(er,tn,Oa,Vr),{singleton:!0});function m1(e,t){return Math.abs(e-t)<1.01}const Ma="up",Da="down",OL="none",_L={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},ML=0,Na=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=pe(!1),s=pe(!0),l=Ye(),c=Ye(),u=pe(4),d=pe(ML),f=Qt(ce(Jf(ce(Me(o),ho(1),Xn(!0)),ce(Me(o),ho(1),Xn(!1),Qw(100))),xt()),!1),p=Qt(ce(Jf(ce(n,Xn(!0)),ce(n,Xn(!1),Qw(200))),xt()),!1);Ie(ce(Vt(Me(o),Me(d)),be(([b,x])=>b<=x),xt()),s),Ie(ce(s,mr(50)),c);const v=fn(ce(Vt(r,Me(i),Me(t),Me(e),Me(u)),Qn((b,[{scrollHeight:x,scrollTop:E},T,I,w,k])=>{const P=E+T-x>-k,_={scrollHeight:x,scrollTop:E,viewportHeight:T};if(P){let $,N;return E>b.state.scrollTop?($="SCROLLED_DOWN",N=b.state.scrollTop-E):($="SIZE_DECREASED",N=b.state.scrollTop-E||b.scrollTopDelta),{atBottom:!0,atBottomBecause:$,scrollTopDelta:N,state:_}}let F;return _.scrollHeight>b.state.scrollHeight?F="SIZE_INCREASED":T<b.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":E<b.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},_L),xt((b,x)=>b&&b.atBottom===x.atBottom))),m=Qt(ce(r,Qn((b,{scrollHeight:x,scrollTop:E,viewportHeight:T})=>{if(m1(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:E};{const I=x-(E+T)<1;return b.scrollTop!==E&&I?{changed:!0,jump:b.scrollTop-E,scrollHeight:x,scrollTop:E}:{changed:!0,jump:0,scrollHeight:x,scrollTop:E}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),_e(b=>b.changed),be(b=>b.jump)),0);Ie(ce(v,be(b=>b.atBottom)),a),Ie(ce(a,mr(50)),l);const h=pe(Da);Ie(ce(r,be(({scrollTop:b})=>b),xt(),Qn((b,x)=>Tt(p)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?Ma:Da,prevScrollTop:x},{direction:Da,prevScrollTop:0}),be(b=>b.direction)),h),Ie(ce(r,mr(50),Xn(OL)),h);const y=pe(0);return Ie(ce(f,_e(b=>!b),Xn(0)),y),Ie(ce(o,mr(100),Be(f),_e(([b,x])=>x),Qn(([b,x],[E])=>[x,E],[0,0]),be(([b,x])=>x-b)),y),{atBottomState:v,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:m,scrollDirection:h,scrollVelocity:y}},bt(tn)),Fa="top",La="bottom",g1="none";function v1(e,t,n){return typeof e=="number"?n===Ma&&t===Fa||n===Da&&t===La?e:0:n===Ma?t===Fa?e.main:e.reverse:t===La?e.main:e.reverse}function y1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const dp=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ye(),a=pe(0),s=pe(0),l=pe(0),c=Qt(ce(Vt(Me(r),Me(o),Me(n),Me(i,Aa),Me(l),Me(a),Me(t),Me(e),Me(s)),be(([u,d,f,[p,v],m,h,y,b,x])=>{const E=u-b,T=h+y,I=Math.max(f-E,0);let w=g1;const k=y1(x,Fa),P=y1(x,La);return p-=b,p+=f+y,v+=f+y,v-=b,p>u+T-k&&(w=Ma),v<u-I+d+P&&(w=Da),w!==g1?[Math.max(E-f-v1(m,Fa,w)-k,0),E-I-y+d+v1(m,La,w)+P]:null}),_e(u=>u!=null),xt(Aa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},bt(tn),{singleton:!0});function DL(e,t,n){if(Ll(t)){const r=u1(e,t);return[{index:Ln(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const fp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Vl(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-a,f=s+d*l+(d-1)*r,p=c,v=f-u;return{bottom:u,firstItemIndex:i,items:x1(e,o,i),offsetBottom:v,offsetTop:c,top:p,topItems:x1(t,o,i),topListHeight:t.reduce((m,h)=>h.size+m,0),totalCount:n}}function b1(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=up(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Vl(c,[],s,o,n,r)}function x1(e,t,n){if(e.length===0)return[];if(!Ll(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=pi(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function w1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const go=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:v}])=>{const m=pe([]),h=pe(0),y=Ye(),b=pe(0);Ie(i.topItemsIndexes,m);const x=Qt(ce(Vt(p,v,Me(l,Aa),Me(o),Me(r),Me(c),u,Me(m),Me(t),Me(n),Me(b),e),_e(([w,k,,P,,,,,,,,_])=>{const F=_&&_.length!==P;return w&&!k&&!F}),be(([,,[w,k],P,_,F,$,N,O,D,z,M])=>{var C,V,j,B;const H=_,{offsetTree:q,sizeTree:W}=H,ne=Tt(h);if(P===0)return{...fp,totalCount:P};if(w===0&&k===0)return ne===0?{...fp,totalCount:P}:b1(ne,F,_,O,D,M||[]);if(ft(W))return ne>0?null:Vl(DL(up(F,P),H,M),[],P,D,H,O);const re=[];if(N.length>0){const oe=N[0],ae=N[N.length-1];let J=0;for(const se of pi(W,oe,ae)){const te=se.value,fe=Math.max(se.start,oe),ge=Math.min(se.end,ae);for(let ve=fe;ve<=ge;ve++)re.push({data:M?.[ve],index:ve,offset:J,size:te}),J+=te}}if(!$)return Vl([],re,P,D,H,O);const ee=N.length>0?N[N.length-1]+1:0,G=wL(q,w,k,ee);if(G.length===0)return null;const Y=P-1,Q=Dl([],oe=>{for(const ae of G){const J=ae.value;let se=J.offset,te=ae.start;const fe=J.size;if(J.offset<w){te+=Math.floor((w-J.offset+D)/(fe+D));const ve=te-ae.start;se+=ve*fe+ve*D}te<ee&&(se+=(ee-te)*fe,te=ee);const ge=Math.min(ae.end,Y);for(let ve=te;ve<=ge&&!(se>=k);ve++)oe.push({data:M?.[ve],index:ve,offset:se,size:fe}),se+=fe+D}}),de=w1(z,Fa),R=w1(z,La);if(Q.length>0&&(de>0||R>0)){const oe=Q[0],ae=Q[Q.length-1];if(de>0&&oe.index>ee){const J=Math.min(de,oe.index-ee),se=[];let te=oe.offset;for(let fe=oe.index-1;fe>=oe.index-J;fe--){const ge=(V=(C=pi(W,fe,fe)[0])==null?void 0:C.value)!=null?V:oe.size;te-=ge+D,se.unshift({data:M?.[fe],index:fe,offset:te,size:ge})}Q.unshift(...se)}if(R>0&&ae.index<Y){const J=Math.min(R,Y-ae.index);let se=ae.offset+ae.size+D;for(let te=ae.index+1;te<=ae.index+J;te++){const fe=(B=(j=pi(W,te,te)[0])==null?void 0:j.value)!=null?B:ae.size;Q.push({data:M?.[te],index:te,offset:se,size:fe}),se+=fe+D}}}return Vl(Q,re,P,D,H,O)}),_e(w=>w!==null),xt()),fp);Ie(ce(e,_e(Xf),be(w=>w?.length)),o),Ie(ce(x,be(w=>w.topListHeight)),d),Ie(d,s),Ie(ce(x,be(w=>[w.top,w.bottom])),a),Ie(ce(x,be(w=>w.items)),y);const E=fn(ce(x,_e(({items:w})=>w.length>0),Be(o,e),_e(([{items:w},k])=>w[w.length-1].originalIndex===k-1),be(([,w,k])=>[w-1,k]),xt(Aa),be(([w])=>w))),T=fn(ce(x,mr(200),_e(({items:w,topItems:k})=>w.length>0&&w[0].originalIndex===k.length),be(({items:w})=>w[0].index),xt())),I=fn(ce(x,_e(({items:w})=>w.length>0),be(({items:w})=>{let k=0,P=w.length-1;for(;w[k].type==="group"&&k<P;)k++;for(;w[P].type==="group"&&P>k;)P--;return{endIndex:w[P].index,startIndex:w[k].index}}),xt(l1)));return{endReached:E,initialItemCount:h,itemsRendered:y,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:T,topItemsIndexes:m,...f}},bt(er,p1,dp,_a,Oa,Na,Vr,ap),{singleton:!0}),S1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ye(),a=Qt(ce(Vt(n,e,r,t,o),be(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return Ie(Me(a),i),{totalListHeight:a,totalListHeightChanged:i}},bt(tn,go),{singleton:!0}),NL=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=pe(!1),r=Qt(ce(Vt(n,e,t),_e(([o])=>o),be(([,o,i])=>Math.max(0,o-i)),mr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(tn,S1),{singleton:!0}),T1=Qe(()=>({context:pe(null)})),FL=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,E1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ye();return Ie(ce(u,Be(t,l,n,i,o,r,s),Be(e),be(([[d,f,p,v,m,h,y,b],x])=>{const{align:E,behavior:T,calculateViewLocation:I=FL,done:w,...k}=d,P=d1(d,f,v-1),_=Pa(P,f.offsetTree,x)+m+h,F=_+Ln(f.sizeTree,P)[1],$=b+h,N=b+p-y,O=I({itemBottom:F,itemTop:_,locationParams:{align:E,behavior:T,...k},viewportBottom:N,viewportTop:$});return O?w&&Fn(ce(a,_e(D=>!D),ho(Tt(a)?1:2)),w):w?.(),O}),_e(d=>d!==null)),c),{scrollIntoView:u}},bt(er,tn,Oa,go,Lr),{singleton:!0});function k1(e){return e?e==="smooth"?"smooth":"auto":!1}const LL=(e,t)=>typeof e=="function"?k1(e(t)):t&&k1(e),VL=Qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{const v=pe(!1),m=Ye();let h=null;function y(T){je(a,{align:"end",behavior:T,index:"LAST"})}st(ce(Vt(ce(Me(t),ho(1)),l),Be(Me(v),i,s,d),be(([[T,I],w,k,P,_])=>{let F=I&&P,$="auto";return F&&($=LL(w,k||_),F=F&&!!$),{followOutputBehavior:$,shouldFollow:F,totalCount:T}}),_e(({shouldFollow:T})=>T)),({followOutputBehavior:T,totalCount:I})=>{h&&(h(),h=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(T)}):h=Fn(e,()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(T),h=null})});function b(T){const I=Fn(o,w=>{T&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Tt(u)("scrolling to bottom due to increased size",{},sn.DEBUG),y("auto"))});setTimeout(I,100)}st(ce(Vt(Me(v),t,c),_e(([T,,I])=>T&&I),Qn(({value:T},[,I])=>({refreshed:T===I,value:I}),{refreshed:!1,value:0}),_e(({refreshed:T})=>T),Be(v,t)),([,T])=>{Tt(s)&&b(T!==!1)}),st(m,()=>{b(Tt(v)!==!1)}),st(Vt(Me(v),o),([T,I])=>{T&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")});const x=pe(null),E=Ye();return Ie(Jf(ce(Me(r),be(T=>{var I;return(I=T?.length)!=null?I:0})),ce(Me(t))),E),st(ce(Vt(ce(E,ho(1)),l),Be(Me(x),s,d,f),be(([[T,I],w,k,P,_])=>I&&k&&w?.({context:_,totalCount:T,scrollingInProgress:P})),_e(T=>!!T),mr(0)),T=>{h&&(h(),h=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("scrolling into view",{}),je(p,T)}):h=Fn(e,()=>{Tt(u)("scrolling into view",{}),je(p,T),h=null})}),{autoscrollToBottom:m,followOutput:v,scrollIntoViewOnChange:x}},bt(er,Na,Oa,_a,Vr,Lr,tn,T1,E1)),$L=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(Ie(ce(s,Be(i),_e(([,l])=>l!==0),Be(o,r,t,n,e),be(([[,l],c,u,d,f,p=[]])=>b1(l,c,u,d,f,p))),a),{}),bt(er,_a,go,Vr),{singleton:!0}),jL=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=pe(0);return st(ce(e,Be(r),_e(([,o])=>o!==0),be(([,o])=>({top:o}))),o=>{Fn(ce(n,ho(1),_e(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{je(t,o)})})}),{initialScrollTop:r}},bt(Vr,tn,go),{singleton:!0}),C1=Qe(([{scrollVelocity:e}])=>{const t=pe(!1),n=Ye(),r=pe(!1);return Ie(ce(e,Be(r,t,n),_e(([o,i])=>!!i),be(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),xt()),t),st(ce(Vt(t,e,n),Be(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},bt(Na),{singleton:!0}),pp=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ye(),r=Ye(),o=Ye(),i=pe(!1),a=pe(void 0);return Ie(ce(Vt(n,r),be(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ie(ce(t,Be(r),be(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},bt(tn)),zL=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Ye(),u=pe(void 0),d=pe(null),f=pe(null);return Ie(s,d),Ie(l,f),st(ce(c,Be(t,r,a,d,f,n)),([p,v,m,h,y,b,x])=>{const E=TL(v.sizeTree);h&&y!==null&&b!==null&&(m=y.scrollTop-b.offsetTop),m-=x,p({ranges:E,scrollTop:m})}),Ie(ce(u,_e(Xf),be(RL)),o),Ie(ce(i,Be(u),_e(([,p])=>p!==void 0),xt(),be(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(er,tn,_a,Vr,pp));function RL(e){return{align:"start",index:0,offset:e.scrollTop}}const BL=Qe(([{topItemsIndexes:e}])=>{const t=pe(0);return Ie(ce(t,_e(n=>n>=0),be(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(go));function I1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const HL=I1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),WL=Qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:v}])=>{const m=fn(ce(l,Be(a),Qn(([,y,b,x],[{bottom:E,items:T,offsetBottom:I,totalCount:w},k])=>{const P=E+I;let _=0;return b===w&&y.length>0&&T.length>0&&(T[0].originalIndex===0&&y[0].originalIndex===0||(_=P-x,_!==0&&(_+=k))),[_,T,w,P]},[0,[],0,0]),_e(([y])=>y!==0),Be(r,s,n,o,p,v),_e(([,y,b,x,,,E])=>!E&&!x&&y!==0&&b===Ma),be(([[y],,,,,b])=>(b("Upward scrolling compensation",{amount:y},sn.DEBUG),y))));function h(y){y>0?(je(t,{behavior:"auto",top:-y}),je(e,0)):(je(e,0),je(t,{behavior:"auto",top:-y}))}return st(ce(m,Be(e,i)),([y,b,x])=>{x&&HL()?je(e,b-y):h(-y)}),st(ce(Vt(Qt(i,!1),e,v),_e(([y,b,x])=>!y&&!x&&b!==0),be(([y,b])=>b),mr(1)),h),Ie(ce(d,be(y=>({top:-y}))),t),st(ce(c,Be(f,u),be(([y,{groupIndices:b,lastSize:x,sizeTree:E},T])=>{function I(w){return w*(x+T)}if(b.length===0)return I(y);{let w=0;const k=Ia(E,0);let P=0,_=0;for(;P<y;){P++,w+=k;let F=b.length===_+1?1/0:b[_+1]-b[_]-1;P+F>y&&(w-=k,F=y-P+1),P+=F,w+=I(F),_++}return w}})),y=>{je(e,y),requestAnimationFrame(()=>{je(t,{top:y}),requestAnimationFrame(()=>{je(e,0),je(v,!1)})})}),{deviation:e}},bt(tn,Na,go,er,Lr,ap)),qL=Qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),bt(dp,$L,Vr,C1,S1,jL,NL,pp,E1,Lr,T1)),A1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:v,initialTopMostItemIndex:m,scrolledToInitialItem:h},y,b,x,E,{scrollToIndex:T},I,{topItemCount:w},{groupCounts:k},P])=>{const{listState:_,minOverscanItemCount:F,topItemsIndexes:$,rangeChanged:N,...O}=E;return Ie(N,P.scrollSeekRangeChanged),Ie(ce(P.windowViewportRect,be(D=>D.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:k,heightEstimates:s,initialItemFinalLocationReached:v,initialTopMostItemIndex:m,scrolledToInitialItem:h,sizeRanges:c,topItemCount:w,topItemsIndexes:$,totalCount:f,...x,groupIndices:a,itemSize:l,listState:_,minOverscanItemCount:F,scrollToIndex:T,statefulTotalCount:d,trackItemSizes:p,rangeChanged:N,...O,...P,...y,sizes:u,...b}},bt(er,_a,tn,zL,VL,go,Oa,WL,BL,p1,qL));function UL(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const $l=typeof document<"u"?S.useLayoutEffect:S.useEffect;function hp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=S.createContext({});function l(h,y){h.propsReady&&je(h.propsReady,!1);for(const b of r){const x=h[t.required[b]];je(x,y[b])}for(const b of o)if(b in y){const x=h[t.optional[b]];je(x,y[b])}h.propsReady&&je(h.propsReady,!0)}function c(h){return i.reduce((y,b)=>(y[b]=x=>{const E=h[t.methods[b]];je(E,x)},y),{})}function u(h){return a.reduce((y,b)=>(y[b]=cL(h[t.events[b]]),y),{})}const d=S.forwardRef((h,y)=>{const{children:b,...x}=h,[E]=S.useState(()=>Dl(dL(e),w=>{l(w,x)})),[T]=S.useState(Xw(u,E));$l(()=>{for(const w of a)w in x&&st(T[w],x[w]);return()=>{Object.values(T).map(Qf)}},[x,T,E]),$l(()=>{l(E,x)}),S.useImperativeHandle(y,Zw(c(E)));const I=n;return g.jsx(s.Provider,{value:E,children:n?g.jsx(I,{...UL([...r,...o,...a],x),children:b}):b})}),f=h=>{const y=S.useContext(s);return S.useCallback(b=>{je(y[h],b)},[y,h])},p=h=>{const y=S.useContext(s)[h],b=S.useCallback(x=>st(y,x),[y]);return S.useSyncExternalStore(b,()=>Tt(y),()=>Tt(y))},v=h=>{const y=S.useContext(s)[h],[b,x]=S.useState(Xw(Tt,y));return $l(()=>st(y,E=>{E!==b&&x(Zw(E))}),[y,b]),b},m=S.version.startsWith("18")?p:v;return{Component:d,useEmitter:(h,y)=>{const b=S.useContext(s)[h];$l(()=>st(b,y),[y,b])},useEmitterValue:m,usePublisher:f}}const jl=S.createContext(void 0),P1=S.createContext(void 0),O1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function mp(e){return"self"in e}function GL(e){return"body"in e}function _1(e,t,n,r=di,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let p,v,m;const h=f.target;if(GL(h)||mp(h)){const b=mp(h)?h:h.defaultView;m=i?b.scrollX:b.scrollY,p=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,v=i?b.innerWidth:b.innerHeight}else m=i?h.scrollLeft:h.scrollTop,p=i?h.scrollWidth:h.scrollHeight,v=i?h.offsetWidth:h.offsetHeight;const y=()=>{e({scrollHeight:p,scrollTop:Math.max(m,0),viewportHeight:v})};f.suppressFlushSync?y():Fi.flushSync(y),s.current!==null&&(m===s.current||m<=0||m===p-v)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(f){const p=a.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const v=f.behavior==="smooth";let m,h,y;mp(p)?(h=Math.max(Vn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),m=i?p.innerWidth:p.innerHeight,y=i?window.scrollX:window.scrollY):(h=p[i?"scrollWidth":"scrollHeight"],m=Vn(p,i?"width":"height"),y=p[i?"scrollLeft":"scrollTop"]);const b=h-m;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),m1(m,h)||f.top===y){e({scrollHeight:h,scrollTop:y,viewportHeight:m}),v&&t(!0);return}v?(s.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),a.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const gp="-webkit-sticky",M1="sticky",vp=I1(()=>{if(typeof document>"u")return M1;const e=document.createElement("div");return e.style.position=gp,e.style.position===gp?gp:M1});function yp(e){return e}const YL=Qe(()=>{const e=pe(s=>`Item ${s}`),t=pe(s=>`Group ${s}`),n=pe({}),r=pe(yp),o=pe("div"),i=pe(di),a=(s,l=null)=>Qt(ce(n,be(c=>c[s]),xt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),KL=Qe(([e,t])=>({...e,...t}),bt(A1,YL)),ZL=({height:e})=>g.jsx("div",{style:{height:e}}),XL={overflowAnchor:"none",position:vp(),zIndex:1},D1={overflowAnchor:"none"},QL={...D1,display:"inline-block",height:"100%"},N1=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=wn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=wn("windowScrollContainerState"),a=wn("scrollContainerState"),s=o||r?i:a,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),v=wn("gap"),m=Fe("horizontalDirection"),{callbackRef:h}=e1(n,f,d,e?di:s,p,v,o,m,Fe("skipAnimationFrameInResizeObserver")),[y,b]=S.useState(0);wp("deviation",O=>{y!==O&&b(O)});const x=Fe("EmptyPlaceholder"),E=Fe("ScrollSeekPlaceholder")||ZL,T=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),k=Fe("computeItemKey"),P=Fe("isSeeking"),_=Fe("groupIndices").length>0,F=Fe("alignToBottom"),$=Fe("initialItemFinalLocationReached"),N=e?{}:{boxSizing:"border-box",...m?{display:"inline-block",height:"100%",marginLeft:y!==0?y:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...$?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?g.jsx(x,{...wt(x,c)}):g.jsx(T,{...wt(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:N,children:(e?t.topItems:t.items).map(O=>{const D=O.originalIndex,z=k(D+t.firstItemIndex,O.data,c);return P?S.createElement(E,{...wt(E,c),height:O.size,index:O.index,key:z,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?S.createElement(w,{...wt(w,c),"data-index":D,"data-item-index":O.index,"data-known-size":O.size,key:z,style:XL},u(O.index,c)):S.createElement(I,{...wt(I,c),...F1(I,O.data),"data-index":D,"data-item-group-index":O.groupIndex,"data-item-index":O.index,"data-known-size":O.size,key:z,style:m?QL:D1},_?l(O.index,O.groupIndex,O.data,c):l(O.index,O.data,c))})})}),JL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},eV={outline:"none",overflowX:"auto",position:"relative"},hi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),tV={position:vp(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function F1(e,t){return{item:typeof e=="string"?void 0:t}}const nV=S.memo(function(){const e=Fe("HeaderComponent"),t=wn("headerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),rV=S.memo(function(){const e=Fe("FooterComponent"),t=wn("footerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null});function bp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:v}=_1(s,c,l,u,void 0,d);return e("scrollTo",v),e("scrollBy",f),g.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?eV:JL,...o},tabIndex:0,...a,...wt(l,i),children:r})})}function xp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=S.useRef(null),v=t("scrollerRef"),{scrollByCallback:m,scrollerRef:h,scrollToCallback:y}=_1(s,c,l,v,f);return O1(()=>{var b;return h.current=f||((b=p.current)==null?void 0:b.ownerDocument.defaultView),()=>{h.current=null}},[h,f]),e("windowScrollTo",y),e("scrollBy",m),g.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...a,...wt(l,i),children:r})})}const oV=({children:e})=>{const t=S.useContext(jl),n=wn("viewportHeight"),r=wn("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),a=S.useMemo(()=>ka(n,l=>Vn(l,i?"width":"height")),[n,i]),s=Jn(a,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:s,style:hi(o),children:e})},iV=({children:e})=>{const t=S.useContext(jl),n=wn("windowViewportRect"),r=wn("fixedItemHeight"),o=Fe("customScrollParent"),i=tp(n,o,Fe("skipAnimationFrameInResizeObserver")),a=Fe("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:hi(a),children:e})},aV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...tV,marginTop:`${n}px`},o=Fe("context");return g.jsx(t,{style:r,...wt(t,o),children:e})},sV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return g.jsxs(r||t?uV:cV,{...e,context:o,children:[n&&g.jsx(aV,{children:g.jsx(N1,{showTopList:!0})}),g.jsxs(r||t?iV:oV,{children:[g.jsx(nV,{}),g.jsx(N1,{}),g.jsx(rV,{})]})]})}),{Component:lV,useEmitter:wp,useEmitterValue:Fe,usePublisher:wn}=hp(KL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},sV),cV=bp({useEmitter:wp,useEmitterValue:Fe,usePublisher:wn}),uV=xp({useEmitter:wp,useEmitterValue:Fe,usePublisher:wn}),Sp=lV,dV=Qe(()=>{const e=pe(c=>g.jsxs("td",{children:["Item $",c]})),t=pe(null),n=pe(c=>g.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=pe(null),o=pe(null),i=pe({}),a=pe(yp),s=pe(di),l=(c,u=null)=>Qt(ce(i,be(d=>d[c]),xt()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),fV=Qe(([e,t])=>({...e,...t}),bt(A1,dV)),pV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{height:e}})}),hV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{border:0,height:e,padding:0}})}),mV={overflowAnchor:"none"},L1={position:vp(),zIndex:2,overflowAnchor:"none"},V1=S.memo(function({showTopList:e=!1}){const t=ze("listState"),n=ze("computeItemKey"),r=ze("firstItemIndex"),o=ze("context"),i=ze("isSeeking"),a=ze("fixedHeaderHeight"),s=ze("groupIndices").length>0,l=ze("itemContent"),c=ze("groupContent"),u=ze("ScrollSeekPlaceholder")||pV,d=ze("GroupComponent"),f=ze("TableRowComponent"),p=(e?t.topItems:[]).reduce((m,h,y)=>(y===0?m.push(h.size):m.push(m[y-1]+h.size),m),[]),v=(e?t.topItems:t.items).map(m=>{const h=m.originalIndex,y=n(h+r,m.data,o),b=e?h===0?0:p[h-1]:0;return i?S.createElement(u,{...wt(u,o),height:m.size,index:m.index,key:y,type:m.type||"item"}):m.type==="group"?S.createElement(d,{...wt(d,o),"data-index":h,"data-item-index":m.index,"data-known-size":m.size,key:y,style:{...L1,top:a}},c(m.index,o)):S.createElement(f,{...wt(f,o),...F1(f,m.data),"data-index":h,"data-item-index":m.index,"data-known-size":m.size,"data-item-group-index":m.groupIndex,key:y,style:e?{...L1,top:a+b}:mV},s?l(m.index,m.groupIndex,m.data,o):l(m.index,m.data,o))});return g.jsx(g.Fragment,{children:v})}),gV=S.memo(function(){const e=ze("listState"),t=ze("topItemsIndexes").length>0,n=$n("sizeRanges"),r=ze("useWindowScroll"),o=ze("customScrollParent"),i=$n("windowScrollContainerState"),a=$n("scrollContainerState"),s=o||r?i:a,l=ze("trackItemSizes"),c=ze("itemSize"),u=ze("log"),{callbackRef:d,ref:f}=e1(n,c,l,s,u,void 0,o,!1,ze("skipAnimationFrameInResizeObserver")),[p,v]=S.useState(0);Tp("deviation",_=>{p!==_&&(f.current.style.marginTop=`${_}px`,v(_))});const m=ze("EmptyPlaceholder"),h=ze("FillerRow")||hV,y=ze("TableBodyComponent"),b=ze("paddingTopAddition"),x=ze("statefulTotalCount"),E=ze("context");if(x===0&&m)return g.jsx(m,{...wt(m,E)});const T=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),I=e.offsetTop+b+p-T,w=e.offsetBottom,k=I>0?g.jsx(h,{context:E,height:I},"padding-top"):null,P=w>0?g.jsx(h,{context:E,height:w},"padding-bottom"):null;return g.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...wt(y,E),children:[k,t&&g.jsx(V1,{showTopList:!0}),g.jsx(V1,{}),P]})}),vV=({children:e})=>{const t=S.useContext(jl),n=$n("viewportHeight"),r=$n("fixedItemHeight"),o=Jn(S.useMemo(()=>ka(n,i=>Vn(i,"height")),[n]),!0,ze("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:o,style:hi(!1),children:e})},yV=({children:e})=>{const t=S.useContext(jl),n=$n("windowViewportRect"),r=$n("fixedItemHeight"),o=ze("customScrollParent"),i=tp(n,o,ze("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:hi(!1),children:e})},bV=S.memo(function(e){const t=ze("useWindowScroll"),n=ze("customScrollParent"),r=$n("fixedHeaderHeight"),o=$n("fixedFooterHeight"),i=ze("fixedHeaderContent"),a=ze("fixedFooterContent"),s=ze("context"),l=Jn(S.useMemo(()=>ka(r,y=>Vn(y,"height")),[r]),!0,ze("skipAnimationFrameInResizeObserver")),c=Jn(S.useMemo(()=>ka(o,y=>Vn(y,"height")),[o]),!0,ze("skipAnimationFrameInResizeObserver")),u=n||t?SV:wV,d=n||t?yV:vV,f=ze("TableComponent"),p=ze("TableHeadComponent"),v=ze("TableFooterComponent"),m=i?g.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,s),children:i()},"TableHead"):null,h=a?g.jsx(v,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(v,s),children:a()},"TableFoot"):null;return g.jsx(u,{...e,...wt(u,s),children:g.jsx(d,{children:g.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,s),children:[m,g.jsx(gV,{},"TableBody"),h]})})})}),{Component:xV,useEmitter:Tp,useEmitterValue:ze,usePublisher:$n}=hp(fV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},bV),wV=bp({useEmitter:Tp,useEmitterValue:ze,usePublisher:$n}),SV=xp({useEmitter:Tp,useEmitterValue:ze,usePublisher:$n}),TV=xV,$1={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},EV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:j1,floor:zl,max:Va,min:Ep,round:z1}=Math;function R1(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function kV(e){return{...EV,items:e}}function Rl(e,t){return e&&e.width===t.width&&e.height===t.height}function CV(e,t){return e&&e.column===t.column&&e.row===t.row}const IV=Qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:v,propsReady:m},{customScrollParent:h,useWindowScroll:y,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:E},T])=>{const I=pe(0),w=pe(0),k=pe($1),P=pe({height:0,width:0}),_=pe({height:0,width:0}),F=Ye(),$=Ye(),N=pe(0),O=pe(null),D=pe({column:0,row:0}),z=Ye(),M=Ye(),C=pe(!1),V=pe(0),j=pe(!0),B=pe(!1),H=pe(!1);st(ce(v,Be(V),_e(([G,Y])=>!!Y)),()=>{je(j,!1)}),st(ce(Vt(v,j,_,P,V,B),_e(([G,Y,Q,de,,R])=>G&&!Y&&Q.height!==0&&de.height!==0&&!R)),([,,,,G])=>{je(B,!0),cp(1,()=>{je(F,G)}),Fn(ce(c),()=>{je(t,[0,0]),je(j,!0)})}),Ie(ce(M,_e(G=>G!=null&&G.scrollTop>0),Xn(0)),w),st(ce(v,Be(M),_e(([,G])=>G!=null)),([,G])=>{G&&(je(P,G.viewport),je(_,G.item),je(D,G.gap),G.scrollTop>0&&(je(C,!0),Fn(ce(c,ho(1)),Y=>{je(C,!1)}),je(l,{top:G.scrollTop})))}),Ie(ce(P,be(({height:G})=>G)),d),Ie(ce(Vt(Me(P,Rl),Me(_,Rl),Me(D,(G,Y)=>G&&G.column===Y.column&&G.row===Y.row),Me(c)),be(([G,Y,Q,de])=>({gap:Q,item:Y,scrollTop:de,viewport:G}))),z),Ie(ce(Vt(Me(I),r,Me(D,CV),Me(_,Rl),Me(P,Rl),Me(O),Me(w),Me(C),Me(j),Me(V)),_e(([,,,,,,,G])=>!G),be(([G,[Y,Q],de,R,oe,ae,J,,se,te])=>{const{column:fe,row:ge}=de,{height:ve,width:Pe}=R,{width:he}=oe;if(J===0&&(G===0||he===0))return $1;if(Pe===0){const Ke=up(te,G),pt=Ke+Math.max(J-1,0);return kV(R1(Ke,pt,ae))}const K=B1(he,Pe,fe);let L,X;se?Y===0&&Q===0&&J>0?(L=0,X=J-1):(L=K*zl((Y+ge)/(ve+ge)),X=K*j1((Q+ge)/(ve+ge))-1,X=Ep(G-1,Va(X,K-1)),L=Ep(X,Va(0,L))):(L=0,X=-1);const le=R1(L,X,ae),{bottom:ue,top:Ee}=H1(oe,de,R,le),ke=j1(G/K),De=ke*ve+(ke-1)*ge-ue;return{bottom:ue,itemHeight:ve,items:le,itemWidth:Pe,offsetBottom:De,offsetTop:Ee,top:Ee}})),k),Ie(ce(O,_e(G=>G!==null),be(G=>G.length)),I),Ie(ce(Vt(P,_,k,D),_e(([G,Y,{items:Q}])=>Q.length>0&&Y.height!==0&&G.height!==0),be(([G,Y,{items:Q},de])=>{const{bottom:R,top:oe}=H1(G,de,Y,Q);return[oe,R]}),xt(Aa)),t);const q=pe(!1);Ie(ce(c,Be(q),be(([G,Y])=>Y||G!==0)),q);const W=fn(ce(Vt(k,I),_e(([{items:G}])=>G.length>0),Be(q),_e(([[G,Y],Q])=>{const de=G.items[G.items.length-1].index===Y-1;return(Q||G.bottom>0&&G.itemHeight>0&&G.offsetBottom===0&&G.items.length===Y)&&de}),be(([[,G]])=>G-1),xt())),ne=fn(ce(Me(k),_e(({items:G})=>G.length>0&&G[0].index===0),Xn(0),xt())),re=fn(ce(Me(k),Be(C),_e(([{items:G},Y])=>G.length>0&&!Y),be(([{items:G}])=>({endIndex:G[G.length-1].index,startIndex:G[0].index})),xt(l1),mr(0)));Ie(re,p.scrollSeekRangeChanged),Ie(ce(F,Be(P,_,I,D),be(([G,Y,Q,de,R])=>{const oe=h1(G),{align:ae,behavior:J,offset:se}=oe;let te=oe.index;te==="LAST"&&(te=de-1),te=Va(0,te,Ep(de-1,te));let fe=kp(Y,R,Q,te);return ae==="end"?fe=z1(fe-Y.height+Q.height):ae==="center"&&(fe=z1(fe-Y.height/2+Q.height/2)),se&&(fe+=se),{behavior:J,top:fe}})),l);const ee=Qt(ce(k,be(G=>G.offsetBottom+G.bottom)),0);return Ie(ce(E,be(G=>({height:G.visibleHeight,width:G.visibleWidth}))),P),{customScrollParent:h,data:O,deviation:N,footerHeight:o,gap:D,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:_,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:$,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:y,viewportDimensions:P,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:E,...p,gridState:k,horizontalDirection:H,initialTopMostItemIndex:V,totalListHeight:ee,...f,endReached:W,propsReady:m,rangeChanged:re,startReached:ne,stateChanged:z,stateRestoreInProgress:C,...T}},bt(dp,tn,Na,C1,Vr,pp,Lr));function B1(e,t,n){return Va(1,zl((e+n)/(zl(t)+n)))}function H1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=kp(e,t,n,r[0].index);return{bottom:kp(e,t,n,r[r.length-1].index)+o,top:i}}function kp(e,t,n,r){const o=B1(e.width,n.width,t.column),i=zl(r/o),a=i*n.height+Va(0,i-1)*t.row;return a>0?a+t.row:a}const AV=Qe(()=>{const e=pe(d=>`Item ${d}`),t=pe({}),n=pe(null),r=pe("virtuoso-grid-item"),o=pe("virtuoso-grid-list"),i=pe(yp),a=pe("div"),s=pe(di),l=(d,f=null)=>Qt(ce(t,be(p=>p[d]),xt()),f),c=pe(!1),u=pe(!1);return Ie(Me(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),PV=Qe(([e,t])=>({...e,...t}),bt(IV,AV)),OV=S.memo(function(){const e=Et("gridState"),t=Et("listClassName"),n=Et("itemClassName"),r=Et("itemContent"),o=Et("computeItemKey"),i=Et("isSeeking"),a=Sn("scrollHeight"),s=Et("ItemComponent"),l=Et("ListComponent"),c=Et("ScrollSeekPlaceholder"),u=Et("context"),d=Sn("itemDimensions"),f=Sn("gap"),p=Et("log"),v=Et("stateRestoreInProgress"),m=Sn("reportReadyState"),h=Jn(S.useMemo(()=>y=>{const b=y.parentElement.parentElement.scrollHeight;a(b);const x=y.firstChild;if(x){const{height:E,width:T}=x.getBoundingClientRect();d({height:E,width:T})}f({column:q1("column-gap",getComputedStyle(y).columnGap,p),row:q1("row-gap",getComputedStyle(y).rowGap,p)})},[a,d,f,p]),!0,!1);return O1(()=>{e.itemHeight>0&&e.itemWidth>0&&m(!0)},[e]),v?null:g.jsx(l,{className:t,ref:h,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const b=o(y.index,y.data,u);return i?g.jsx(c,{...wt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},b):S.createElement(s,{...wt(s,u),className:n,"data-index":y.index,key:b},r(y.index,y.data,u))})})}),_V=S.memo(function(){const e=Et("HeaderComponent"),t=Sn("headerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),MV=S.memo(function(){const e=Et("FooterComponent"),t=Sn("footerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),DV=({children:e})=>{const t=S.useContext(P1),n=Sn("itemDimensions"),r=Sn("viewportDimensions"),o=Jn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),g.jsx("div",{ref:o,style:hi(!1),children:e})},NV=({children:e})=>{const t=S.useContext(P1),n=Sn("windowViewportRect"),r=Sn("itemDimensions"),o=Et("customScrollParent"),i=tp(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),g.jsx("div",{ref:i,style:hi(!1),children:e})},FV=S.memo(function({...e}){const t=Et("useWindowScroll"),n=Et("customScrollParent"),r=n||t?VV:LV,o=n||t?NV:DV,i=Et("context");return g.jsx(r,{...e,...wt(r,i),children:g.jsxs(o,{children:[g.jsx(_V,{}),g.jsx(OV,{}),g.jsx(MV,{})]})})}),{useEmitter:W1,useEmitterValue:Et,usePublisher:Sn}=hp(PV,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},FV),LV=bp({useEmitter:W1,useEmitterValue:Et,usePublisher:Sn}),VV=xp({useEmitter:W1,useEmitterValue:Et,usePublisher:Sn});function q1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}const U1=e=>{const t=e.Icon??Ag,n=Pt();return g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[g.jsx(t,{size:64,className:"text-disabled"}),g.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Cp=g.jsx("div",{className:"w-10/12 h-6 rounded animate-pulse bg-muted"}),$a=e=>g.jsx(ln,{...e,as:e.as||"span",className:Oe("block rounded h-8 w-32 animate-pulse bg-muted",e.className)});function $V(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const jV=e=>{const t=S.useId(),n=Pt(),r=S.useMemo(()=>$V(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return g.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 p-3 border-t-muted text-sm lg:flex-nowrap lg:justify-between",children:[g.jsx("p",{children:g.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?g.jsxs(S.Fragment,{children:[g.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),g.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>g.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),g.jsx("nav",{children:g.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?g.jsx("li",{children:g.jsx(ln,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:g.jsx(S.Fragment,{children:typeof i=="string"?g.jsx("li",{children:"..."}):g.jsx("li",{children:g.jsx(ln,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?g.jsx("li",{children:g.jsx(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},zV=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),g.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:g.jsx("div",{ref:n,className:"block isolate",children:e.children})})},RV=(e,t,n)=>{const r=n.cols,o=n.loading;return g.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=Qu(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`typography group-table-cell p-[var(--table-cell-padding)] whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?g.jsx(zV,{children:g.jsx(f,{col:i,row:t,rowIndex:e})}):null,g.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),g.jsx("span",{className:"relative",children:o?Cp:c?g.jsx(S.Fragment,{children:g.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):g.jsx(S.Fragment,{children:We.nil(l)?"":l})}))})})},mi=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[$o(10),Ds({fallbackAxisSideDirection:"end"}),Ms(),Ru({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gn({open:n,middleware:i,transform:!0,whileElementsMounted:Qr,onOpenChange:(v,m)=>{const h=m?.relatedTarget;h&&h.dataset.floating==="true"&&!v||(r(v),e.onChange?.(v))}}),c=zo(l),u=kr(l),d=fr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Yn([c,u,d]);return g.jsxs(S.Fragment,{children:[g.jsx("button",{ref:a.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&g.jsx(dr,{preserveTabOrder:!0,id:`${t}-portal`,children:g.jsx(to,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:g.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:a.setFloating,"aria-labelledby":t,style:s,...p(),children:[g.jsx(Bu,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),g.jsx("header",{className:"mb-2",children:g.jsx("h3",{className:"text-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var Ip={},G1;function BV(){return G1||(G1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,y)=>{try{Object.keys(h).forEach(y)}catch(b){window.console.log(b)}},n=h=>h==null,r=h=>{const y=typeof h;return y==="string"||y==="number"||y==="boolean"||n(h)},o=(h,y)=>{const b=y.getItem(h);try{return JSON.parse(b)}catch{return b??null}},i=h=>Object.keys(h).reduce((y,b)=>({...y,[b]:o(b,h)}),{}),a=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,y)=>(h[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(y=>y(h))},d=[{name:"expires",parse:h=>`expires=${a(h.expires??s)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${a(h.expires??s)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const y=h.domain??"";return y===""?"":`domain=${h.multiDomain?".":""}${y}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],f={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(y=>y.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const y=f.json()[h];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,y,b={})=>{const x=r(y)?y:encodeURIComponent(JSON.stringify(y)),E=d.reduce((T,I)=>{const w=I.parse(b);return w===""?T:T.concat(w)},[`${encodeURIComponent(h)}=${x}`]).join(";");document.cookie=E,u()}},p=h=>{const y=new Set,b=x=>{h().removeItem(x);const E=i(h());y.forEach(T=>T(E))};return{delete:b,listener:x=>(y.add(x),()=>y.delete(x)),clearListeners:()=>y.clear(),json:(x=!1)=>x?i(h()):h(),has:x=>{const E=h().getItem(x);return!n(E)},deleteAll:()=>{t(h(),b),y.forEach(x=>x(h()))},get:x=>o(x,h()),set:(x,E)=>{h().setItem(x,JSON.stringify(E)),y.forEach(T=>T(h()))}}},v=p(()=>window.sessionStorage),m=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=v,e.createStorage=p})(Ip)),Ip}var ja=BV();const Ap=e=>e.headerLabel??e.thead??e.id,Pp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var gi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(gi||{});const Op=e=>e.type==="number"?e.valueAsNumber:e.value,HV=e=>{let t=[];return e({add:(a,s,l)=>t.push({...l,id:a,thead:s}),remove:a=>t=t.filter(s=>s.id!==a),getAll:()=>Array.from(t),filter:a=>t=Array.from(t.filter(a))}),t},WV={},qV=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},UV=(e,t,n=WV)=>{const r=Cr()?null:ja.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Gf({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:qV(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Cr()||ja.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},GV=e=>{const t=Pr(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-tableheader="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},YV=()=>Cr()?void 0:document.querySelector('[data-component="modal-body"]'),KV=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),ZV=(e,t)=>e.toSorted(KV(t)),Y1=(e,t,n)=>({label:t,id:Bo(),type:n,value:e.id}),XV=e=>{const t=Pt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,Y1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return g.jsx(S.Fragment,{children:g.jsx(mi,{title:t.tableSortDropdownTitle,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(Eg,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(ro,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),g.jsx(ro,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),g.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:g.jsx(ss,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[g.jsx(bu,{size:14})," ",t.tableSortAddButton]})})]})})})},QV=e=>{const t=Pt(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=Y1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Ap(e.col);return g.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[g.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?g.jsx(WC,{size:14}):null,n==="desc"?g.jsx(HC,{size:14}):null,n==="undefined"?g.jsx(Eg,{size:14}):null]})},K1=S.createContext({}),JV=K1.Provider,e$=()=>S.useContext(K1),_p=(e,t,n,r={})=>{const o=e.id,i=e.type??gi.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Bo(),operation:l,label:Ap(e),name:o,type:i,value:"",...r}},Mp=()=>{const e=Pt(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[gi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[gi.Boolean]:[t.is,t.isNot],[gi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},t$=e=>{const t=Pt(),n=Mp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,_p(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(v=>u===v.id);return _p(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=Op(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return g.jsx(S.Fragment,{children:g.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:g.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[g.jsx(eI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(ro,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),g.jsx(ro,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),g.jsx(Wo,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),g.jsx("div",{className:"flex justify-center items-center mt-5",children:g.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:g.jsx(ss,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[g.jsx(bu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},n$=({filter:e,onDelete:t,set:n})=>{const r=Pt(),o=Mp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=Op(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return g.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[g.jsx(ro,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),g.jsx(Wo,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),g.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:g.jsx(ss,{className:"text-danger",size:14})})]})},r$={top:0,left:0,right:0,bottom:-1},o$=e=>{const t=Su(),n=Pt(),r=e.filters.filter(m=>m.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=Mp(),l=o?nI:rI,c=S.useRef(null),u=m=>{const h=m.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(b=>b.id!==h))},d=S.useCallback(m=>{if(m===null)return;c.current=m;const h=new AbortController;return m.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:h.signal}),()=>h.abort()},[]),f=e.sorters.find(m=>e.header.id===m.value),p=f?.type?f.type===Gw.Asc?"ascending":"descending":"none",v=Ap(e.header);return g.jsxs(Ew,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[g.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:g.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&a?g.jsx(mi,{arrow:!0,trigger:g.jsxs("span",{children:[g.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",v]}),g.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:g.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",g.jsx("span",{className:"font-medium",children:v})]}),children:g.jsxs("ul",{className:"font-medium",children:[r.length===0?null:g.jsx(S.Fragment,{children:r.map(m=>g.jsx("li",{className:"my-1",children:g.jsx(n$,{onDelete:u,filter:m,set:e.setFilters})},`thead-filter-${m.id}`))}),g.jsx("li",{children:g.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(m=>m.concat(_p(e.header,s.options,s.operations))),children:[g.jsx(bu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,g.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?g.jsx(QV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:g.jsx(Re.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:r$,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-[1px] cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:m=>{m.currentTarget.focus()},onKeyDown:m=>{if(m.key==="ArrowLeft"||m.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const h=c.current.getBoundingClientRect().width,b=(m.shiftKey?50:10)*(m.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(h+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(m,h)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,b=h.delta.x;c.current.style.width=`${Math.abs(y+b)}px`}})]})},i$=e=>{const[t,n]=GV(e.setCols);return g.jsx(ww,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:g.jsx(xn,{children:e.headers.map((r,o)=>g.jsx(o$,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},a$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:g.jsx(xn,{children:n.children})})),s$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),l$=S.forwardRef(({context:e,...t},n)=>{const r=e$(),o={...t?.style,top:We.number(r.sticky)?`${r.sticky}px`:void 0};return g.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),c$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return g.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),u$=S.forwardRef((e,t)=>e.context.loadingMore?g.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:g.jsx("tr",{role:"row",className:"bg-card-background",children:g.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:g.jsx("span",{className:"block w-full h-2 rounded opacity-60 animate-pulse bg-foreground"})})})}):null),d$={TableRow:c$,TableFoot:u$,TableHead:l$,Table:s$,TableBody:a$},f$=[0,0,0,0,0,0,0,0,0,0],p$=e=>g.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Cp:g.jsx(U1,{})}),h$=()=>g.jsx(S.Fragment,{}),m$=[],Z1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),p=Pr(a),v=Pr(u.loadingMore),m=S.useMemo(()=>{if(u.loading)return f$;if(c)return u.rows;const b=new Yw(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:b.Where(x.name,x.operation.symbol,x.value)),r.length===0?b.Select():ZV(b.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,x=new IntersectionObserver(E=>E[E.length-1].isIntersecting&&v.current?(p.current?.(),void f(!0)):f(!1));return x.observe(b),()=>x.disconnect()},[v,p]);const h=m.length===0,y={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return g.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[g.jsx(TV,{components:d$,context:y,totalCount:m.length,itemContent:h?h$:RV,data:h?m$:m,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>g.jsx(i$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),h?g.jsx(p$,{loading:u.loading}):null,g.jsx("div",{"aria-hidden":"true",ref:d,className:"w-full h-0.5"}),l!==null?g.jsx(jV,{...l}):null]})},g$=({item:e,onPointerDown:t})=>{const n=po(0);return g.jsxs(Ew,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[g.jsx("button",{type:"button",className:"cursor-grab",children:g.jsx(JC,{size:14})}),g.jsx("span",{children:e.groupName})]},e.groupId)},v$=e=>{const t=Pt(),n=Pp(e.cols),r=mF(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new Yw(e.rows).GroupBy(u),v=e.cols.find(m=>m.id===u);e.setGroups(Ck(p).map((m,h)=>{const y=p[m];return{...v,groupId:Bo(),groupKey:u,index:h,rows:y,groupName:m}}))},s=()=>e.setGroups([]);return g.jsx(S.Fragment,{children:g.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(iI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[g.jsxs("div",{className:"flex flex-nowrap items-center",children:[g.jsx(ro,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),g.jsx(no,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:g.jsx(ss,{size:16,className:"text-danger"})})]}),e.groups.length>0?g.jsxs("section",{className:"my-4",children:[g.jsx("header",{children:g.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),g.jsx(BN,{children:g.jsx(ww,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>g.jsx(g$,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},y$=e=>g.jsx("header",{className:"mb-1 min-w-full",children:g.jsxs("div",{className:"flex flex-wrap gap-y-1 gap-x-4 justify-between items-center min-w-full",children:[g.jsxs("div",{className:"flex gap-4 py-2 whitespace-nowrap w-fit items-centeend",children:[g.jsx("span",{children:g.jsx(t$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),g.jsx("span",{children:g.jsx(XV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),g.jsx("span",{children:g.jsx(v$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),g.jsx("ul",{className:"flex flex-row flex-wrap flex-1 flex-grow gap-4 items-center w-full md:justify-end",children:e.filters.map(t=>g.jsxs("li",{className:"flex gap-1 items-center py-0.5 px-4 rounded-xl border border-card-border",children:[g.jsxs("span",{children:[g.jsx("span",{className:"inline-block mr-2 rounded-full size-3 aspect-square bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),g.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[g.jsx("span",{"aria-hidden":"true",className:"invisible p-0 whitespace-pre",children:t.value||" "}),g.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Op(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),b$=(e,t)=>typeof t=="function"?t(e):t,Bl=(e,t,n)=>e===t?void 0:n?.(t),x$=e=>{const t=Su(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>Pp(e.cols),[e.cols]),[i,a]=Gf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:b$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),Bl(l?.filters??[],s.filters??[],e.setFilters),Bl(l?.sorters??[],s.sorters??[],e.setSorters),Bl(l?.groups??[],s.groups??[],e.setGroups),Bl(l?.cols??[],s.cols??[],e.setCols),s)]});return S.useEffect(()=>{a.cols(e.cols)},[e.cols]),g.jsx(JV,{value:n,children:g.jsxs(xn,{initial:!1,children:[r?g.jsx(y$,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?g.jsx(Z1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):g.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>g.jsx("div",{className:"min-w-full",children:g.jsx(Z1,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},Hl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>g.jsxs(ln,{...s,as:r||"div","data-component":"card",className:Oe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-4",i),children:[e?g.jsx("header",{"data-component":"card-title",className:Oe("mb-2 w-full border-b border-card-border px-6 pb-4 text-xl font-medium",a),children:e}):o,g.jsx("div",{"data-component":"card-body",className:Oe("min-w-full px-6",s.className),children:t?g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx($a,{className:"w-full"}),g.jsx($a,{className:"w-8/12"}),g.jsx($a,{className:"w-10/12"}),g.jsx($a,{className:"w-1/2"})]}):n})]});Hl.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return g.jsxs(i,{...o,title:We.string(o.title)?o.title:void 0,className:Oe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[g.jsx(a,{className:"font-semibold",children:o.title}),r?g.jsx(s,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const w$=e=>{const t=e.interactive??!0,n=e.Icon??yu;return g.jsx(Hl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:g.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[g.jsx("div",{className:Oe("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:g.jsx(n,{size:48})}),g.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[g.jsx("p",{className:"text-lg",children:e.title}),e.loading?g.jsx($a,{className:"h-10"}):g.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},S$=({item:e,context:t,setter:n,get:r,refs:o})=>g.jsx(dr,{children:g.jsx(_f,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:g.jsxs(xn,{presenceAffectsLayout:!0,children:[e?g.jsx(Re.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?g.jsx(Yu,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:g.jsx(to,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:g.jsxs(Re.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[g.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:g.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:g.jsx(_o,{})})}),g.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[g.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),T$=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Gn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),a=zo(o),s=fr(o,{role:"dialog"}),l=kr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Yn([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return g.jsxs(S.Fragment,{children:[g.jsx(S$,{refs:i,context:o,get:c,item:t,setter:u}),g.jsx("ul",{role:"list",children:d.map((f,p)=>{const v=f.props,m=`${r}-${p}`,h=()=>n({...v,id:m}),y=v.leading;return g.jsx(Re.li,{layout:!0,layoutId:`item-${m}`,className:"border-b border-card-border py-2 last:border-transparent",children:g.jsx(Re.div,{layoutId:`toast-${m}`,className:"relative",children:g.jsx("div",{className:"relative flex items-start space-x-3",children:g.jsxs(S.Fragment,{children:[v.avatar?g.jsx("div",{children:g.jsx("div",{className:"relative px-1",children:g.jsx("button",{onClick:h,className:"flex size-10 items-center justify-center ring-primary",children:v.avatar})})}):null,g.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:g.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[g.jsxs("button",{onClick:h,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[g.jsx("h3",{children:v.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:v.description})]}),y?g.jsx(y,{open:h}):null]})})]})})})},m)})})]})},E$=e=>g.jsx(S.Fragment,{children:e.children}),X1=()=>{const e=S.useContext(Do);return e?e.parser:ls.hsla},Dp=.3,Wl={duration:Dp,type:"tween",ease:"easeInOut"},Q1=S.createContext(null),Np={delay:.2,duration:.3,type:"tween",ease:"easeOut"},vi={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},k$=e=>g.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx(Re.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Np,d:"M18 6 6 18"}),g.jsx(Re.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Np,d:"m6 6 12 12"})]}),C$=e=>g.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:g.jsx(Re.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:vi.animate,initial:vi.initial,transition:Np})}),I$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},A$={duration:.6,delay:.2,type:"tween",ease:"circOut"},P$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",O$=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,J1=()=>S.useContext(Q1),_$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const a=X1(),s=J1(),[l,c]=S.useState(t);S.useEffect(()=>{if(!s){c(t);return}const d=O$(e,s.currentStep,s.previousStep,s.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,s,e]);const u=P$(e,l,n);return s?.steps&&100/s?.steps,g.jsxs(S.Fragment,{children:[g.jsx("div",{className:`h-[2px] w-full xl:block bg-card-border hidden first:hidden ${u==="active"||u==="complete"?"bg-success":""}`}),g.jsxs(Re.button,{...i,type:"button","data-step":e,animate:u,className:"flex relative justify-center items-center w-auto text-center",children:[g.jsx(Re.div,{variants:I$,transition:A$,className:`hidden xl:block aspect-square absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),g.jsx(Re.div,{initial:!1,animate:u,transition:Wl,className:"flex relative justify-center items-center font-semibold rounded-full size-10 aspect-square",variants:{error:{color:a("var(--danger-foreground)"),borderColor:a("var(--danger-hover)"),backgroundColor:a("var(--danger-DEFAULT)")},inactive:{transition:Wl,color:a("var(--disabled)"),borderColor:a("var(--card-border)"),backgroundColor:a("var(--background)")},active:{transition:Wl,color:a("var(--primary-foreground)"),borderColor:a("var(--primary-DEFAULT)"),backgroundColor:a("var(--primary-DEFAULT)")},complete:{transition:Wl,color:a("var(--success-foreground)"),borderColor:a("var(--success-DEFAULT)"),backgroundColor:a("var(--success-DEFAULT)")}},children:g.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?g.jsx(C$,{className:"size-6 text-primary-foreground"}):u==="error"?g.jsx(k$,{className:"size-6 text-danger-foreground"}):g.jsx(S.Fragment,{children:g.jsx("span",{children:e})})})}),g.jsx("header",{className:"flex flex-col justify-start items-start px-2",children:g.jsx("h3",{className:`h-full whitespace-nowrap flex items-center ${o}`,children:r})})]})]})},M$=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Dp*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Dp,steps:S.Children.count(e.children)};return g.jsx(Q1.Provider,{value:o,children:g.jsx("div",{className:"flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center",children:e.children})})},eS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},tS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},nS=S.createContext(""),D$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Fp=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!D$(a))return a}return n==="backward"?Fp(e,e.length-1,"backward"):Fp(e,-1,"forward")},rS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Fp(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},oS={[tS.ArrowLeft]:(e,t)=>rS(t,"backward"),[tS.ArrowRight]:(e,t)=>rS(t,"forward")},N$=e=>{const[t,n]=eS(e.active),r=S.useRef(null),o=Pr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(We.keyof(oS,c)){const u=oS[c],d=u(l,r.current);if(d===null)return;n(d)}};return g.jsx(nS.Provider,{value:t,children:g.jsx(Hl,{className:e.className,container:Oe("pt-0 max-w-full w-full min-w-0",e.container),header:g.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[g.jsx("div",{className:"absolute bottom-0 w-full h-[1px] bg-card-border"}),g.jsx("nav",{className:"min-w-0",children:g.jsx("ul",{onKeyDown:s,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",children:i.map(l=>{const c=l.props,u=t===c.id;return g.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Oe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:g.jsx(ln,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},F$=()=>S.useContext(nS),L$=e=>{const t=F$();return g.jsx(S.Fragment,{children:e.id===t?e.children:null})},iS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},V$={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},aS=e=>g.jsx(Re.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:iS,exit:iS.false,transition:V$,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),$$=Co("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),j$=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return g.jsx(xn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?g.jsx(Re.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Oe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:g.jsx(aS,{"data-open":!!i,open:!!i,children:g.jsxs(ln,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Oe($$({theme:n}),t),children:[g.jsxs("h4",{className:"flex gap-2 items-center mb-2",children:[!r&&n==="success"?g.jsx(kg,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?g.jsx(yu,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?g.jsx(oI,{"aria-hidden":"true",size:20}):null,r,g.jsx("span",{className:"text-lg font-semibold tracking-3 text-balance",children:a.title})]}),a.children,o!==void 0&&i?g.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:g.jsx(_o,{size:20})}):null]})})}):null})}),z$=e=>g.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[g.jsxs("header",{className:"flex items-start gap-4 p-6",children:[g.jsx("div",{className:Oe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:g.jsx("div",{children:g.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("header",{children:g.jsx("h3",{className:"text-base leading-none",children:e.title})}),g.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?g.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),R$=Symbol.for("react.lazy");function sS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function B$(...e){return t=>{let n=!1;const r=e.map(o=>{const i=sS(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():sS(e[o],null)}}}}const ql=A[" use ".trim().toString()];function H$(e){return typeof e=="object"&&e!==null&&"then"in e}function lS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===R$&&"_payload"in e&&H$(e._payload)}function W$(e){const t=q$(e),n=A.forwardRef((r,o)=>{let{children:i,...a}=r;lS(i)&&typeof ql=="function"&&(i=ql(i._payload));const s=A.Children.toArray(i),l=s.find(G$);if(l){const c=l.props.children,u=s.map(d=>d===l?A.Children.count(c)>1?A.Children.only(null):A.isValidElement(c)?c.props.children:null:d);return g.jsx(t,{...a,ref:o,children:A.isValidElement(c)?A.cloneElement(c,void 0,u):null})}return g.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const cS=W$("Slot");function q$(e){const t=A.forwardRef((n,r)=>{let{children:o,...i}=n;if(lS(o)&&typeof ql=="function"&&(o=ql(o._payload)),A.isValidElement(o)){const a=K$(o),s=Y$(i,o.props);return o.type!==A.Fragment&&(s.ref=r?B$(r,a):a),A.cloneElement(o,s)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const U$=Symbol("radix.slottable");function G$(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===U$}function Y$(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function K$(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const uS=(e="")=>Oe("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Lp=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),dS=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[f,p]=S.useState(!1),[v,m]=S.useState(null),h=S.useRef([]),y=S.useRef([]),b=S.useContext(Lp),x=Sr(),E=Tr(),T=JA(),I=wv(),w=x!==null,{floatingStyles:k,refs:P,context:_}=Gn({nodeId:T,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Qr,placement:w?"right":"bottom-start",middleware:[$o({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ds(),Ms()]}),F=fr(_,{role:"menu"}),$=kr(_,{bubbles:!0}),N=_v(_,{move:!1,enabled:n,delay:{open:ty},handleClose:ey({blockPointerEvents:!0,requireIntent:!1})}),O=zo(_,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),D=Hs(_,{loop:!0,activeIndex:v,nested:w,listRef:h,onNavigate:m}),z=EP(_,{activeIndex:v,listRef:y,resetMs:CP,onMatch:u?m:void 0}),{getReferenceProps:M,getFloatingProps:C,getItemProps:V}=Yn([N,O,F,$,D,z]);S.useEffect(()=>{if(!E)return;const B=()=>d(!1),H=q=>{q.nodeId!==T&&q.parentId===x&&d(!1)};return E.events.on("click",B),E.events.on("menuopen",H),()=>{E.events.off("click",B),E.events.off("menuopen",H)}},[E,T,x]),S.useEffect(()=>{u&&E&&E.events.emit("menuopen",{parentId:x,nodeId:T})},[E,u,T,x]);const j=o?l.className:Oe(uS(l.className));return g.jsxs(eP,{id:T,children:[g.jsx(S.Fragment,{children:l.asChild?g.jsx(cS,{...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:s,className:j,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):g.jsxs("button",{type:"button",className:j,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),b.setHasFocusInside(!0)}})),children:[s,w&&g.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[g.jsx("span",{className:"sr-only",children:"Next menu"}),g.jsx(vu,{size:14})]})]})}),g.jsx(Lp.Provider,{value:{activeIndex:v,setActiveIndex:m,getItemProps:V,setHasFocusInside:p,isOpen:u},children:g.jsx(GA,{elementsRef:h,labelsRef:y,children:u&&g.jsx(dr,{children:g.jsx(to,{context:_,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:g.jsx(t,{...C(),ref:P.setFloating,style:{...l.style,...k},className:Oe("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",a),children:e})})})})})]})}),Z$=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(Lp),s=wv({label:n?null:e}),l=Tr(),c=s.index===a.activeIndex;return g.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:sr(s.ref,i),className:uS(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),a.setHasFocusInside(!0)}}),children:[r,t?g.jsx(t,{size:16}):null]})}),X$=S.forwardRef((e,t)=>Sr()===null?g.jsx(tP,{children:g.jsx(dS,{...e,isParent:!0,ref:t})}):g.jsx(dS,{...e,isParent:!1,ref:t})),Vp=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return g.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[g.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Oe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,g.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Q$=({children:e,className:t="",size:n,...r})=>g.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[g.jsx("input",{...r,type:"radio",className:Oe("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),J$=sy("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
15
15
  `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),ej=(e,t)=>Cr()?t:window.matchMedia(e).matches,tj=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(ej(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},Tn="500ms",nj={exit:{x:["0%","-30%"],opacity:0,animationDuration:Tn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Tn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Tn}},rj={enter:{x:"0%",opacity:1,animationDuration:Tn},exit:{x:["0%","30%"],opacity:0,animationDuration:Tn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Tn}},$p={drawer:e=>e==="left"?nj:rj,sheet:{enter:{opacity:1,y:"0%",animationDuration:Tn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Tn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Tn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Tn},enter:{opacity:1,scale:[1.05,1],animationDuration:Tn},initial:{opacity:.5,scale:.95,animationDuration:Tn,transition:{duration:.5,ease:"easeInOut"}}}},oj=Co("z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),fS={top:0,left:0,right:0,bottom:0},pS=e=>e*.6,ij=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,p=pS(f);return d>=p?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,a=e.position==="right"?-r.delta.x:r.delta.x,s=Math.abs(i+a);return e.value.set(s)}};return g.jsx(Re.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:fS,whileDrag:{cursor:"grabbing"},className:Oe("absolute rounded-lg isolate z-calendar",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?g.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Ul={drawer:"right",sheet:"none",dialog:"none"},aj=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ul.drawer:Ul[o]:t?Ul[o]:Ul.sheet},sj=[],jp=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:p=!1,layoutId:v=void 0,overlayClassName:m="",type:h="dialog",position:y,overlayClickClose:b=!1,interactions:x=sj,...E},T)=>{const I=S.useRef(null),w=S.useRef(null),k=S.useId(),P=S.useId(),_=tj("(min-width: 64rem)"),F=aj(_,p,h,y),$=_||p?$p[h]:$p.sheet,N=typeof $=="function"?$(F):$,O=_||p?h:"sheet",D=O!=="dialog",z=Gn({open:e,onOpenChange:a,strategy:"fixed"}),M=zo(z.context,{}),C=fr(z.context,{role:"dialog"}),V=kr(z.context,{bubbles:!0,escapeKey:!0,outsidePress:b}),j=Yn([M,V,C].concat(x)),B=o,H=po(void 0),q=po(void 0),W=S.useRef(!1),ne=S.useRef(0);S.useEffect(()=>{H.set(void 0),q.set(void 0)},[O,H,q]);const re=()=>a(!1);S.useImperativeHandle(T,()=>({context:z.context,floating:w.current}),[z.context,w]);const G=O==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:fS,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(R,oe)=>{const J=z.refs.floating.current.getBoundingClientRect(),se=H.get()||J.height,te=Math.abs(se-oe.delta.y),fe=window.outerHeight,ge=pS(fe);return te>=ge?H.set(te):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>H.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},Y=po(void 0),Q=po(void 0),de=r?cS:Re.button;return g.jsxs(S.Fragment,{children:[o?g.jsx(de,{ref:z.refs.setReference,...j.getReferenceProps(),layoutId:v,type:"button",children:B}):null,g.jsx(dr,{preserveTabOrder:!0,children:g.jsx(xn,{custom:!0,presenceAffectsLayout:!0,propagate:!0,mode:"sync",initial:!1,children:e?g.jsx(Yu,{lockScroll:!0,className:Oe("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip",O==="drawer"?"":"items-start justify-center p-10",m),children:g.jsx(_f,{reducedMotion:d?"user":"always",children:g.jsx(to,{guards:!0,visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:z.context,children:g.jsxs(Re.div,{...E,...t?{"aria-labelledby":k,"aria-describedby":P}:{"aria-label":s},...j.getFloatingProps({"aria-modal":e,ref:sr(z.refs.setFloating,w),className:Oe(oj({position:F,type:O}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:v,variants:N,"data-component":"modal",style:O==="drawer"?{width:H}:{height:H,y:q},children:[D&&u?g.jsx(ij,{onChange:a,value:H,sheet:O==="sheet",position:F,parent:z.refs.floating}):null,t?g.jsx(Re.header,{...G,className:"relative w-full isolate",children:t?g.jsx("h2",{id:k,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,g.jsx(Re.section,{ref:I,"data-component":"modal-body",className:Oe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(Q.set(void 0),Y.set(void 0),W.current){const R=q.get()||0,oe=window.innerHeight*.2;R>oe?(await bw(q,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,a(!1)):bw(q,0,{type:"spring",bounce:0,duration:.3}),W.current=!1}},onTouchStart:R=>{const oe=R.changedTouches[0];Y.set(oe.pageY),Q.set(oe.pageY),W.current=!1},onTouchMove:R=>{const ae=R.changedTouches[0].pageY,J=Q.get()||ae,se=I.current?.scrollTop||0;if(!W.current&&se<=0&&ae>J&&O==="sheet"&&(W.current=!0,ne.current=ae),W.current){const te=ae-ne.current;te<0?q.set(te*.2):q.set(te)}Q.set(ae)},children:i}),n?g.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?g.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:g.jsx("button",{type:"button",onClick:re,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:g.jsx(_o,{})})}):null]})})})}):null})})]})}),lj=e=>{const[t,n]=fF();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:yD(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),g.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},cj=e=>g.jsx("p",{...e,className:Oe("text-base leading-snug",e.className)}),uj=e=>g.jsx("p",{...e,className:Oe("mb-kilo text-sm text-secondary",e.className)}),dj=e=>g.jsx("div",{className:Oe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:g.jsxs(S.Fragment,{children:[g.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),g.jsx("span",{className:`w-fit ${e.disabled?"text-disabled":""} ${e.row?"text-base":"text-lg"}`,children:e.children})]})}),hS=e=>g.jsxs("div",{children:[g.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),g.jsx("p",{className:"text-secondary typography",children:e.children})]}),fj=e=>g.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[g.jsx("div",{children:g.jsx(hS,{title:e.title,children:e.description})}),g.jsx("div",{className:"flex gap-kilo items-center flex-wrap",children:e.children})]}),mS=e=>g.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Oe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),pj=()=>g.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:g.jsx(mS,{})}),hj=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=S.useState(e.open??!1);S.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=Gn({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=zo(s,{enabled:e.disabled??!0}),u=fr(s,{role:"tooltip"}),d=kr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Yn([c,u,d]);return g.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[g.jsx(no,{...p(e),as:Re.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:g.jsx(Re.span,{layoutId:o,children:e.trigger})}),g.jsx(xn,{children:i?g.jsx(dr,{root:t,children:g.jsx(to,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:g.jsx(Re.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},mj=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},gj=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},vj=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),yj=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,bj=({steps:e,active:t=!1,onClose:n=Ho,onFinish:r=Ho,onChange:o=Ho,labels:i})=>{const a=Pt(),[s,l]=S.useState(0),c=e[s],[u,d]=S.useState(null),[f,p]=S.useState(vj()),[v,m]=S.useState(!1),h=S.useRef(null),{width:y,height:b}=gj(),x={next:i?.next??a.driverNext,previous:i?.previous??a.driverPrevious,finish:i?.finish??a.driverFinish,skip:i?.skip??a.driverSkip},{refs:E,floatingStyles:T,context:I}=Gn({open:t&&v,placement:c?.side||"bottom",whileElementsMounted:Qr,middleware:[$o(10),Ds(),Ms(),Ru({element:h})]}),{getFloatingProps:w}=Yn([fr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{m(!1)},[s,t]),S.useEffect(()=>{if(!t||!c)return;const $=yj(c.element);$?(c.onEnter?.(),setTimeout(()=>{p($.getBoundingClientRect()),E.setReference($),d($)},100)):(console.warn("Driver: Element not found:",c.element),d(null),p({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[s,t,c,E]),S.useLayoutEffect(()=>{if(!u)return;const $=()=>p(u.getBoundingClientRect());return $(),window.addEventListener("scroll",$,{capture:!0,passive:!0}),window.addEventListener("resize",$,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",$,{capture:!0}),window.removeEventListener("resize",$,{capture:!0})}},[u,y,b]),mj(u,$=>{p($.target.getBoundingClientRect())});const k=()=>{c.onNext?.(),setTimeout(()=>{s<e.length-1?(l($=>$+1),o(s+1)):(r(),n())},0)},P=()=>{c.onPrevious?.(),s>0&&(l($=>$-1),o(s-1))};if(!t)return null;const _=s<e.length-1,F=s>0;return g.jsx(dr,{children:g.jsxs("div",{className:"fixed inset-0 pointer-events-none z-[9999]",children:[g.jsxs("svg",{className:"absolute inset-0 w-full h-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("defs",{children:g.jsxs("mask",{id:"driver-mask",children:[g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),g.jsx(Re.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>m(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),g.jsx(xn,{mode:"wait",children:c&&v&&g.jsx("div",{...w(),ref:E.setFloating,style:u?T:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"outline-none pointer-events-auto",children:g.jsxs(Re.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex flex-col gap-3 p-4 w-80 max-w-sm rounded-lg border shadow-lg bg-card-background border-card-border",children:[u&&g.jsx(Bu,{ref:h,context:I,className:"fill-card-background stroke-card-border"}),c.title&&g.jsx("h3",{children:c.title}),c.description&&g.jsx(S.Fragment,{children:c.description}),g.jsxs("div",{className:"flex justify-between items-center pt-2 mt-2 border-t border-floating-border",children:[g.jsx(no,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:x.skip}),g.jsxs("div",{className:"flex gap-2",children:[F&&g.jsx(no,{size:"small",theme:"neutral",onClick:P,children:x.previous}),g.jsx(no,{size:"small",onClick:k,children:_?x.next:x.finish})]})]}),g.jsxs("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground",children:[s+1," / ",e.length]})]})})})]})})},gS=6048e5,xj=864e5,wj=6e4,Sj=36e5,Tj=1e3,vS=Symbol.for("constructDateFrom");function ut(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&vS in e?e[vS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return ut(t||e,e)}function Gl(e,t,n){const r=Je(e,n?.in);return isNaN(t)?ut(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function yS(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return ut(e,NaN);if(!t)return r;const o=r.getDate(),i=ut(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function yi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Je(e,n?.in),d=o||r?yS(u,o+r*12):u,f=a||i?Gl(d,a+i*7):d,p=l+s*60,m=(c+p*60)*1e3;return ut(e,+f+m)}let Ej={};function vo(){return Ej}function tr(e,t){const n=vo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function bi(e,t){return tr(e,{...t,weekStartsOn:1})}function bS(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=ut(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=bi(o),a=ut(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=bi(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Yl(e){const t=Je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Kl(e,...t){const n=ut.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function yo(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function kj(e,t,n){const[r,o]=Kl(n?.in,e,t),i=yo(r),a=yo(o),s=+i-Yl(i),l=+a-Yl(a);return Math.round((s-l)/xj)}function Cj(e,t){const n=bS(e,t),r=ut(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),bi(r)}function Ij(e){return ut(e,Date.now())}function Aj(e,t,n){const[r,o]=Kl(n?.in,e,t);return+yo(r)==+yo(o)}function Pj(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Zl(e){return!(!Pj(e)&&typeof e!="number"||isNaN(+Je(e)))}function Oj(e,t){const[n,r]=Kl(e,t.start,t.end);return{start:n,end:r}}function xS(e,t){const{start:n,end:r}=Oj(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(ut(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function wS(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function _j(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Mj(e,t){const n=vo(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const Dj={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Nj=(e,t,n)=>{let r;const o=Dj[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function zp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Fj={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Lj={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vj={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$j={date:zp({formats:Fj,defaultWidth:"full"}),time:zp({formats:Lj,defaultWidth:"full"}),dateTime:zp({formats:Vj,defaultWidth:"full"})},jj={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zj=(e,t,n,r)=>jj[e];function za(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Rj={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Bj={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hj={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Wj={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},qj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Uj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Gj={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:za({values:Rj,defaultWidth:"wide"}),quarter:za({values:Bj,defaultWidth:"wide",argumentCallback:e=>e-1}),month:za({values:Hj,defaultWidth:"wide"}),day:za({values:Wj,defaultWidth:"wide"}),dayPeriod:za({values:qj,defaultWidth:"wide",formattingValues:Uj,defaultFormattingWidth:"wide"})};function Ra(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Kj(s,d=>d.test(a)):Yj(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function Yj(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Kj(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Zj(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const Xj=/^(\d+)(th|st|nd|rd)?/i,Qj=/\d+/i,Jj={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ez={any:[/^b/i,/^(a|c)/i]},tz={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nz={any:[/1/i,/2/i,/3/i,/4/i]},rz={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},oz={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},iz={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},az={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},sz={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},lz={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},cz={ordinalNumber:Zj({matchPattern:Xj,parsePattern:Qj,valueCallback:e=>parseInt(e,10)}),era:Ra({matchPatterns:Jj,defaultMatchWidth:"wide",parsePatterns:ez,defaultParseWidth:"any"}),quarter:Ra({matchPatterns:tz,defaultMatchWidth:"wide",parsePatterns:nz,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ra({matchPatterns:rz,defaultMatchWidth:"wide",parsePatterns:oz,defaultParseWidth:"any"}),day:Ra({matchPatterns:iz,defaultMatchWidth:"wide",parsePatterns:az,defaultParseWidth:"any"}),dayPeriod:Ra({matchPatterns:sz,defaultMatchWidth:"any",parsePatterns:lz,defaultParseWidth:"any"})},SS={code:"en-US",formatDistance:Nj,formatLong:$j,formatRelative:zj,localize:Gj,match:cz,options:{weekStartsOn:0,firstWeekContainsDate:1}};function uz(e,t){const n=Je(e,t?.in);return kj(n,_j(n))+1}function TS(e,t){const n=Je(e,t?.in),r=+bi(n)-+Cj(n);return Math.round(r/gS)+1}function Rp(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=vo(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=ut(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=tr(a,t),l=ut(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=tr(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function dz(e,t){const n=vo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Rp(e,t),i=ut(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),tr(i,t)}function ES(e,t){const n=Je(e,t?.in),r=+tr(n,t)-+dz(n,t);return Math.round(r/gS)+1}function dt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const $r={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return dt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):dt(n+1,2)},d(e,t){return dt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return dt(e.getHours()%12||12,t.length)},H(e,t){return dt(e.getHours(),t.length)},m(e,t){return dt(e.getMinutes(),t.length)},s(e,t){return dt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return dt(o,t.length)}},xi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},kS={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return $r.y(e,t)},Y:function(e,t,n,r){const o=Rp(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return dt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):dt(i,t.length)},R:function(e,t){const n=bS(e);return dt(n,t.length)},u:function(e,t){const n=e.getFullYear();return dt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return dt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return dt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return $r.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return dt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ES(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):dt(o,t.length)},I:function(e,t,n){const r=TS(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):dt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):$r.d(e,t)},D:function(e,t,n){const r=uz(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):dt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return dt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return dt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return dt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=xi.noon:r===0?o=xi.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=xi.evening:r>=12?o=xi.afternoon:r>=4?o=xi.morning:o=xi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $r.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):$r.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$r.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$r.s(e,t)},S:function(e,t){return $r.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return IS(r);case"XXXX":case"XX":return bo(r);default:return bo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return IS(r);case"xxxx":case"xx":return bo(r);default:return bo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+CS(r,":");default:return"GMT"+bo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+CS(r,":");default:return"GMT"+bo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return dt(r,t.length)},T:function(e,t,n){return dt(+e,t.length)}};function CS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+dt(i,2)}function IS(e,t){return e%60===0?(e>0?"-":"+")+dt(Math.abs(e)/60,2):bo(e,t)}function bo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=dt(Math.trunc(r/60),2),i=dt(r%60,2);return n+o+t+i}const AS=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},PS=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Bp={p:PS,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return AS(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",AS(r,t)).replace("{{time}}",PS(o,t))}},fz=/^D+$/,pz=/^Y+$/,hz=["D","DD","YY","YYYY"];function OS(e){return fz.test(e)}function _S(e){return pz.test(e)}function Hp(e,t,n){const r=mz(e,t,n);if(console.warn(r),hz.includes(e))throw new RangeError(r)}function mz(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const gz=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vz=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yz=/^'([^]*?)'?$/,bz=/''/g,xz=/[a-zA-Z]/;function Wp(e,t,n){const r=vo(),o=r.locale??SS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Je(e,n?.in);if(!Zl(s))throw new RangeError("Invalid time value");let l=t.match(vz).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Bp[d];return f(u,o.formatLong)}return u}).join("").match(gz).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:wz(u)};if(kS[d])return{isToken:!0,value:u};if(d.match(xz))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(_S(d)||OS(d))&&Hp(d,t,String(e));const f=kS[d[0]];return f(s,d,o.localize,c)}).join("")}function wz(e){const t=e.match(yz);return t?t[1].replace(bz,"'"):e}function Sz(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=ut(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function Tz(){return Object.assign({},vo())}function Ez(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function kz(e,t){return+Je(e)>+Je(t)}function Cz(e,t){return+Je(e)<+Je(t)}function Iz(e,t){const n=Az(t)?new t(0):ut(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Az(e){return typeof e=="function"&&e.prototype?.constructor===e}const Pz=10;class MS{subPriority=0;validate(t,n){return!0}}class Oz extends MS{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class _z extends MS{priority=Pz;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>ut(n,r))}set(t,n){return n.timestampIsSet?t:ut(t,Iz(t,this.context))}}class rt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Oz(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Mz extends rt{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Dt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},nr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function It(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function rr(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*Sj+i*wj+a*Tj),rest:t.slice(n[0].length)}}function DS(e){return It(Dt.anyDigitsSigned,e)}function _t(e,t){switch(e){case 1:return It(Dt.singleDigit,t);case 2:return It(Dt.twoDigits,t);case 3:return It(Dt.threeDigits,t);case 4:return It(Dt.fourDigits,t);default:return It(new RegExp("^\\d{1,"+e+"}"),t)}}function Xl(e,t){switch(e){case 1:return It(Dt.singleDigitSigned,t);case 2:return It(Dt.twoDigitsSigned,t);case 3:return It(Dt.threeDigitsSigned,t);case 4:return It(Dt.fourDigitsSigned,t);default:return It(new RegExp("^-?\\d{1,"+e+"}"),t)}}function qp(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function NS(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function FS(e){return e%400===0||e%4===0&&e%100!==0}class Dz extends rt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Nt(_t(4,t),o);case"yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const a=NS(r.year,o);return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class Nz extends rt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Nt(_t(4,t),o);case"Yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Rp(t,o);if(r.isTwoDigitYear){const s=NS(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Fz extends rt{priority=130;parse(t,n){return Xl(n==="R"?4:n.length,t)}set(t,n,r){const o=ut(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),bi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Lz extends rt{priority=130;parse(t,n){return Xl(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class Vz extends rt{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return _t(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class $z extends rt{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return _t(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class jz extends rt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Nt(It(Dt.month,t),o);case"MM":return Nt(_t(2,t),o);case"Mo":return Nt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class zz extends rt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Nt(It(Dt.month,t),o);case"LL":return Nt(_t(2,t),o);case"Lo":return Nt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Rz(e,t,n){const r=Je(e,n?.in),o=ES(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class Bz extends rt{priority=100;parse(t,n,r){switch(n){case"w":return It(Dt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return tr(Rz(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Hz(e,t,n){const r=Je(e,n?.in),o=TS(r,n)-t;return r.setDate(r.getDate()-o*7),r}class Wz extends rt{priority=100;parse(t,n,r){switch(n){case"I":return It(Dt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return bi(Hz(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const qz=[31,28,31,30,31,30,31,31,30,31,30,31],Uz=[31,29,31,30,31,30,31,31,30,31,30,31];class Gz extends rt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return It(Dt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=FS(r),i=t.getMonth();return o?n>=1&&n<=Uz[i]:n>=1&&n<=qz[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Yz extends rt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return It(Dt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear();return FS(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Up(e,t,n){const r=vo(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Je(e,n?.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return Gl(i,u,n)}class Kz extends rt{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Up(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class Zz extends rt{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return Nt(_t(n.length,t),i);case"eo":return Nt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Up(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Xz extends rt{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return Nt(_t(n.length,t),i);case"co":return Nt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Up(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Qz(e,t,n){const r=Je(e,n?.in),o=Ez(r,n),i=t-o;return Gl(r,i,n)}class Jz extends rt{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return _t(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Nt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Nt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Nt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Nt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=Qz(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class eR extends rt{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(qp(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class tR extends rt{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(qp(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class nR extends rt{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(qp(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class rR extends rt{priority=70;parse(t,n,r){switch(n){case"h":return It(Dt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class oR extends rt{priority=70;parse(t,n,r){switch(n){case"H":return It(Dt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class iR extends rt{priority=70;parse(t,n,r){switch(n){case"K":return It(Dt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class aR extends rt{priority=70;parse(t,n,r){switch(n){case"k":return It(Dt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class sR extends rt{priority=60;parse(t,n,r){switch(n){case"m":return It(Dt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class lR extends rt{priority=50;parse(t,n,r){switch(n){case"s":return It(Dt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class cR extends rt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Nt(_t(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class uR extends rt{priority=10;parse(t,n){switch(n){case"X":return rr(nr.basicOptionalMinutes,t);case"XX":return rr(nr.basic,t);case"XXXX":return rr(nr.basicOptionalSeconds,t);case"XXXXX":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Yl(t)-r)}incompatibleTokens=["t","T","x"]}class dR extends rt{priority=10;parse(t,n){switch(n){case"x":return rr(nr.basicOptionalMinutes,t);case"xx":return rr(nr.basic,t);case"xxxx":return rr(nr.basicOptionalSeconds,t);case"xxxxx":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Yl(t)-r)}incompatibleTokens=["t","T","X"]}class fR extends rt{priority=40;parse(t){return DS(t)}set(t,n,r){return[ut(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class pR extends rt{priority=20;parse(t){return DS(t)}set(t,n,r){return[ut(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const hR={G:new Mz,y:new Dz,Y:new Nz,R:new Fz,u:new Lz,Q:new Vz,q:new $z,M:new jz,L:new zz,w:new Bz,I:new Wz,d:new Gz,D:new Yz,E:new Kz,e:new Zz,c:new Xz,i:new Jz,a:new eR,b:new tR,B:new nR,h:new rR,H:new oR,K:new iR,k:new aR,m:new sR,s:new lR,S:new cR,X:new uR,x:new dR,t:new fR,T:new pR},mR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vR=/^'([^]*?)'?$/,yR=/''/g,bR=/\S/,xR=/[a-zA-Z]/;function wR(e,t,n,r){const o=()=>ut(n,NaN),i=Tz(),a=i.locale??SS,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Je(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new _z(r?.in,n)],d=t.match(gR).map(h=>{const y=h[0];if(y in Bp){const b=Bp[y];return b(h,a.formatLong)}return h}).join("").match(mR),f=[];for(let h of d){_S(h)&&Hp(h,t,e),OS(h)&&Hp(h,t,e);const y=h[0],b=hR[y];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const T=f.find(I=>x.includes(I.token)||I.token===y);if(T)throw new RangeError(`The format string mustn't contain \`${T.fullToken}\` and \`${h}\` at the same time`)}else if(b.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);f.push({token:y,fullToken:h});const E=b.run(e,h,a.match,c);if(!E)return o();u.push(E.setter),e=E.rest}else{if(y.match(xR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(h==="''"?h="'":y==="'"&&(h=SR(h)),e.indexOf(h)===0)e=e.slice(h.length);else return o()}}if(e.length>0&&bR.test(e))return o();const p=u.map(h=>h.priority).sort((h,y)=>y-h).filter((h,y,b)=>b.indexOf(h)===y).map(h=>u.filter(y=>y.priority===h).sort((y,b)=>b.subPriority-y.subPriority)).map(h=>h[0]);let v=Je(n,r?.in);if(isNaN(+v))return o();const m={};for(const h of p){if(!h.validate(v,c))return o();const y=h.set(v,m,c);Array.isArray(y)?(v=y[0],Object.assign(m,y[1])):v=y}return v}function SR(e){return e.match(vR)[1].replace(yR,"'")}function TR(e,t,n){const[r,o]=Kl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function ER(e,t){return Aj(ut(e,e),Ij(e))}function kR(e,t,n){return Gl(e,-t,n)}function CR(e,t,n){const r=Je(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=ut(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=Sz(a);return r.setMonth(t,Math.min(i,s)),r}function IR(e,t,n){let r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=CR(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function AR(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(r.setFullYear(t),r)}function PR(e,t,n){return yS(e,-t,n)}function Ba(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=PR(e,o+r*12,n),d=kR(u,a+i*7,n),f=l+s*60,v=(c+f*60)*1e3;return ut(e,+d-v)}const OR=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function _R(e,t){return S.useRef(OR(e,t)).current}function LS(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const MR=/^(?<hour>\d\d):(?<min>\d\d)$/,DR={type:"spring",bounce:.3,duration:.6},VS=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),$S={enter:VS(1),exit:VS(-1),middle:{x:"0%",opacity:1}},jS={exit:{visibility:"hidden"}},NR=e=>{const t=tr(wS(e));return xS({start:t,end:yi(t,{days:41})})},zS=(e,t)=>e.toLocaleDateString(t,{month:"long"}),FR=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=wS(new Date(1970,o,1).setMonth(o)),a=zS(i,n);return g.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Gp={ArrowLeft:(e,t)=>t==="days"?Ba(e,{days:1}):Ba(e,{months:1}),ArrowRight:(e,t)=>t==="days"?yi(e,{days:1}):yi(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ba(e,{weeks:1}):Ba(e,{years:1}),ArrowDown:(e,t)=>t==="days"?yi(e,{weeks:1}):yi(e,{years:1})},RS=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const a=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>a?.focus({preventScroll:!0}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},xo=e=>e.getFullYear().toString().padStart(4,"0"),LR=(e,t,n)=>e===void 0||n===void 0?!1:kz(t,e)&&Cz(t,n),VR=e=>{const t=Pt();return g.jsx(Re.tbody,{layout:!0,variants:$S,custom:e.direction,onKeyDown:e.onKeyDown,className:Oe(e.styles?.week),children:e.zip.map((n,r)=>{const o=We.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return g.jsx("tr",{className:o,children:n.map(i=>{const a=i.toISOString(),s=e.rangeMode?a===e.range?.to?.toISOString()||a===e.range?.from?.toISOString():a===(e.date?yo(e.date).toISOString():void 0),l=ER(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=TR(i,e.stateDate),d=!u||c,f=e.rangeMode?LR(e.range?.from,i,e.range?.to):!1;return g.jsxs("td",{align:"center",className:Oe("relative",We.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[g.jsxs("button",{type:"button","data-date":a,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Oe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${s?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-10 border border-dashed border-card-border":"",We.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),s&&e.stateRange.from?.toISOString()===a?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,s&&e.stateRange.to?.toISOString()===a?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?g.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${n.length}-${r}`)})})},$R=()=>yo(new Date),BS=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:p,...v})=>{const m=S.useRef(Bo()),h=Pt(),y=sl(o),b=S.useRef(null),{date:x,range:E}=v,T=x||new Date,I=S.useRef(null),[w,k]=Gf({date:T,isAnimating:!1,year:xo(T),direction:void 0,range:{from:E?.from,to:E?.to},months:FR(m.current,T,y),selectMode:l?"from":void 0,week:xS({start:tr(T),end:Mj(T)})},M=>({onChangeYear:C=>({year:C}),onExitComplete:()=>(RS(I.current||null,b,M.state().date,200),I.current=null,{isAnimating:!1}),date:C=>{const V=C(M.state().date);return{date:V,year:xo(V)}},nextMonth:C=>{C&&(I.current=C.currentTarget);const V=M.state();if(V.isAnimating)return V;const j=yi(V.date,{months:1});return{date:j,isAnimating:!0,direction:1,year:xo(j)}},previousMonth:C=>{C&&(I.current=C.currentTarget);const V=M.state();if(V.isAnimating)return V;const j=Ba(V.date,{months:1});return{date:j,isAnimating:!0,direction:-1,year:xo(j)}},onSelectDate:C=>{const V=M.state(),j=C.currentTarget.dataset.range==="true",B=C.currentTarget.dataset.date||"",H=new Date(B);return{date:H,year:xo(H),selectMode:V.selectMode===void 0?void 0:V.selectMode==="from"?"to":"from",range:j?{from:V.selectMode==="from"?H:V.range.from,to:V.selectMode==="to"?H:V.range.to}:V.range}},onChangeMonth:C=>{const V=C.target.value,B=Array.from(C.target.options).find(q=>q.value===V),H=M.state();if(B){const q=B.dataset.index||"",W=new Date(M.state().date);return W.setMonth(+q),{...H,date:W,year:xo(W)}}return H},onKeyDown:C=>{const V=C.key,j=M.state();if(V in Gp){(V==="ArrowUp"||V==="ArrowDown")&&C.preventDefault();const B=M.state().date,H=We.keyof(Gp,V)?Gp[V](B,C.shiftKey?"month":"days"):null;if(H!==null)return RS(C.target,b,H),{...j,date:H,year:xo(H)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,C,V)=>((V.method==="onChangeMonth"||V.method==="previousMonth"||V.method==="nextMonth")&&V.props.onChangeMonth?.(M.date),M),(M,C,V)=>(V.method==="onChangeYear"&&V.props.onChangeYear?.(M.date),M),(M,C,V)=>{const j=V.method==="onSelectDate"||V.method==="setToday"||V.method==="onKeyDown";return l&&j&&t?(c?.(M.range),M):(j&&t&&c?.(M.date),M)}]}),P=NR(w.date),_=oy(P,7),F=w.date.toISOString(),$=zS(w.date,y);S.useEffect(()=>{t||c?.(w.date)},[F,t]);const N=_R(M=>k.date(C=>AR(new Date(C),+M)),1200),O=M=>{const C=M.currentTarget.value;k.onChangeYear(C),s?.(new Date(C)),N(C)},D=LS((M,C)=>(M.preventDefault(),C==="right"?k.previousMonth():k.nextMonth()),10),z=()=>{const M=$R();k.date(()=>M),c?.(M)};return g.jsx(_f,{transition:DR,children:g.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:D.onTouchEnd,onTouchStart:D.onTouchStart,className:Oe("relative overflow-hidden",We.function(u?.calendar)?u?.calendar(P):u?.calendar),children:[g.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:g.jsx(xn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:k.onExitComplete,children:g.jsxs(Re.div,{initial:"enter",animate:"middle",exit:"exit",children:[g.jsxs("header",{className:"relative flex justify-between",children:[g.jsx(Re.button,{layout:!0,type:"button","data-focustrap":"prev",variants:jS,onClick:k.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(GC,{className:"h-4 w-4"})}),g.jsx(Re.span,{layout:!0,variants:$S,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:g.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[g.jsx("select",{value:$,onChange:k.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${$.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),g.jsx(wg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:O,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),g.jsx(Re.button,{layout:!0,type:"button","data-focustrap":"next",variants:jS,onClick:k.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),g.jsxs(Re.table,{className:"mt-2 table min-w-full table-auto border-0",children:[g.jsx("thead",{children:g.jsx("tr",{children:w.week.map(M=>g.jsx("th",{role:"columnheader",className:Oe("py-2 text-sm font-medium capitalize",We.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(y,{weekday:"short"})},M.toString()))})}),g.jsx(VR,{zip:_,range:E,styles:u,date:x||null,dispatch:k,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:k.onKeyDown})]})]},$)})}),f==="datetime"?g.jsx("section",{className:"grid items-center my-4",children:g.jsx(Wo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?Wp(x,"HH:mm"):void 0,title:p||h.calendarDatetimeTitle,onChange:M=>{const C=M.target.value,V=MR.exec(C);if(!V)return;const j=V.groups.hour,B=V.groups.min,H=IR(w.date,{hours:Number(j),minutes:Number(B),seconds:0});k.date(()=>H),c?.(H)}})}):null,g.jsx("footer",{className:"mt-2 text-center text-primary",children:g.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},Yp=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Yp.displayName="ProgressRootContext");function jR(){const e=A.useContext(Yp);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Ir(51));return e}let Kp=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const HS={status(e){return e==="progressing"?{[Kp.progressing]:""}:e==="complete"?{[Kp.complete]:""}:e==="indeterminate"?{[Kp.indeterminate]:""}:null}};function zR(e,t,n){return e==null?"":n?Uo(e,t,n):Uo(e/100,t,{style:"percent"})}function RR(e,t){return t==null?"indeterminate progress":e||`${t}%`}const WS=A.forwardRef(function(t,n){const{format:r,getAriaValueText:o=RR,locale:i,max:a=100,min:s=0,value:l,render:c,className:u,...d}=t,[f,p]=A.useState(),v=nd(r);let m="indeterminate";Number.isFinite(l)&&(m=l===a?"complete":"progressing");const h=zR(l,i,v.current),y=A.useMemo(()=>({status:m}),[m]),b={"aria-labelledby":f,"aria-valuemax":a,"aria-valuemin":s,"aria-valuenow":l??void 0,"aria-valuetext":o(h,l),role:"progressbar"},x=A.useMemo(()=>({formattedValue:h,max:a,min:s,setLabelId:p,state:y,status:m,value:l}),[h,a,s,p,y,m,l]),E=an("div",t,{state:y,ref:n,props:[b,d],stateAttributesMapping:HS});return g.jsx(Yp.Provider,{value:x,children:E})});process.env.NODE_ENV!=="production"&&(WS.displayName="ProgressRoot");const qS=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:a,min:s,value:l,state:c}=jR(),u=Number.isFinite(l)&&l!==null?el(l,s,a):null,d=A.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return an("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:HS})});process.env.NODE_ENV!=="production"&&(qS.displayName="ProgressIndicator");const BR=e=>g.jsxs(WS,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Oe("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[g.jsx(qS,{style:{transform:We.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Oe("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),We.number(e.percent)?g.jsx("p",{className:Oe("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),Ql=e=>g.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[g.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),g.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Ql.Icon=function(t){return g.jsx("header",{...t,className:Oe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Ql.Body=function(t){return g.jsx(ln,{...t,className:Oe("min-w-0 flex-1",t.className),children:t.children})},Ql.Right=function(t){return g.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:g.jsx(ln,{...t,type:"button"})})};const HR=e=>g.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),WR=e=>g.jsx(Re.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),US=new Date(1970,11,31),Zp={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},GS={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},qR={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Xp=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},UR={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},GR={day:"numeric",month:"numeric",year:"numeric"},YR=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:a=!0,type:s,...l},c)=>{const u=sl(t),d=S.useId(),f=Pt(),p=S.useMemo(()=>new Intl.DateTimeFormat(u,s==="datetime"?UR:GR),[u,s]),[v,m]=S.useState(e||void 0),[h,y]=S.useState(!1),b=Xp(p,US).flatMap($=>We.keyof(Zp,$.type)?Zp[$.type]($.value):[]),x=S.useMemo(()=>Xp(p,US).reduce(($,N)=>$+(We.keyof(GS,N.type)?GS[N.type](N.value):""),""),[p]),E=e?.toISOString(),[T,I]=S.useState(v?Xp(p,v).reduce(($,N)=>$+(We.keyof(Zp,N.type)?qR[N.type](v,N.value):""),""):""),w=$=>{const N=$.target.value;if(I(N),b.length===N.length&&b.every((D,z)=>{const M=N.charAt(z);return typeof D=="string"?M===D:D.test(M)})){const D=wR(N,x,new Date),z=s==="datetime"?D:yo(D);return m(z),r?.(z)}return m(void 0),r?.(void 0)};S.useEffect(()=>{Zl(e)&&(m(e),I(Wp(e,x)))},[E,x]);const k=$=>(m($),r?.($),i&&y(!1),I($?Wp($,x):"")),P=Zl(v),_=P?v.toISOString():void 0,F=g.jsx(BS,{...l,type:s,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:k,disabledDate:n,date:P?v:void 0});return g.jsx(S.Fragment,{children:g.jsx(Wo,{...l,mask:b,value:T,id:void 0,name:void 0,"data-value":_,formNoValidate:!h,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:h?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(x),right:a?g.jsxs(S.Fragment,{children:[g.jsx("input",{"data-origin":l.name,defaultValue:_,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),g.jsx(mi,{open:h,onChange:y,buttonProps:{"aria-describedby":d},trigger:g.jsxs("span",{"aria-labelledby":d,children:[g.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),g.jsx(UC,{})]}),children:F})]}):null})})}),KR=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],ZR=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],XR=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],QR=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],YS=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},KS=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},JR=e=>typeof e=="number"?Math.log(e):KS(e)*Math.log(10),eB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},ZS=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},tB=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function nB(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?QR:XR:t.binary?ZR:KR,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return ZS(c,t.fixedWidth)}const i=e<0,a=i?"-":t.signed?"+":"";i&&(e=-e);const s=tB(t);let l;if(e<1){const c=YS(e,t.locale,s);l=a+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?JR(e)/Math.log(1024):KS(e)/3),n.length-1);if(e=eB(e,(t.binary?1024:1e3)**c),!s){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=YS(Number(e),t.locale,s),d=n[c];l=a+u+r+d}return ZS(l,t.fixedWidth)}var Jl={exports:{}},ec={exports:{}},lt={};var XS;function rB(){if(XS)return lt;XS=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(T){if(typeof T=="object"&&T!==null){var I=T.$$typeof;switch(I){case t:switch(T=T.type,T){case l:case c:case r:case i:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case s:case u:case v:case p:case a:return T;default:return I}}case n:return I}}}function E(T){return x(T)===c}return lt.AsyncMode=l,lt.ConcurrentMode=c,lt.ContextConsumer=s,lt.ContextProvider=a,lt.Element=t,lt.ForwardRef=u,lt.Fragment=r,lt.Lazy=v,lt.Memo=p,lt.Portal=n,lt.Profiler=i,lt.StrictMode=o,lt.Suspense=d,lt.isAsyncMode=function(T){return E(T)||x(T)===l},lt.isConcurrentMode=E,lt.isContextConsumer=function(T){return x(T)===s},lt.isContextProvider=function(T){return x(T)===a},lt.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},lt.isForwardRef=function(T){return x(T)===u},lt.isFragment=function(T){return x(T)===r},lt.isLazy=function(T){return x(T)===v},lt.isMemo=function(T){return x(T)===p},lt.isPortal=function(T){return x(T)===n},lt.isProfiler=function(T){return x(T)===i},lt.isStrictMode=function(T){return x(T)===o},lt.isSuspense=function(T){return x(T)===d},lt.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===v||T.$$typeof===p||T.$$typeof===a||T.$$typeof===s||T.$$typeof===u||T.$$typeof===h||T.$$typeof===y||T.$$typeof===b||T.$$typeof===m)},lt.typeOf=x,lt}var ct={};var QS;function oB(){return QS||(QS=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===i||R===o||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===v||R.$$typeof===p||R.$$typeof===a||R.$$typeof===s||R.$$typeof===u||R.$$typeof===h||R.$$typeof===y||R.$$typeof===b||R.$$typeof===m)}function E(R){if(typeof R=="object"&&R!==null){var oe=R.$$typeof;switch(oe){case t:var ae=R.type;switch(ae){case l:case c:case r:case i:case o:case d:return ae;default:var J=ae&&ae.$$typeof;switch(J){case s:case u:case v:case p:case a:return J;default:return oe}}case n:return oe}}}var T=l,I=c,w=s,k=a,P=t,_=u,F=r,$=v,N=p,O=n,D=i,z=o,M=d,C=!1;function V(R){return C||(C=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(R)||E(R)===l}function j(R){return E(R)===c}function B(R){return E(R)===s}function H(R){return E(R)===a}function q(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function W(R){return E(R)===u}function ne(R){return E(R)===r}function re(R){return E(R)===v}function ee(R){return E(R)===p}function G(R){return E(R)===n}function Y(R){return E(R)===i}function Q(R){return E(R)===o}function de(R){return E(R)===d}ct.AsyncMode=T,ct.ConcurrentMode=I,ct.ContextConsumer=w,ct.ContextProvider=k,ct.Element=P,ct.ForwardRef=_,ct.Fragment=F,ct.Lazy=$,ct.Memo=N,ct.Portal=O,ct.Profiler=D,ct.StrictMode=z,ct.Suspense=M,ct.isAsyncMode=V,ct.isConcurrentMode=j,ct.isContextConsumer=B,ct.isContextProvider=H,ct.isElement=q,ct.isForwardRef=W,ct.isFragment=ne,ct.isLazy=re,ct.isMemo=ee,ct.isPortal=G,ct.isProfiler=Y,ct.isStrictMode=Q,ct.isSuspense=de,ct.isValidElementType=x,ct.typeOf=E})()),ct}var JS;function eT(){return JS||(JS=1,process.env.NODE_ENV==="production"?ec.exports=rB():ec.exports=oB()),ec.exports}var Qp,tT;function iB(){if(tT)return Qp;tT=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qp=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},Qp}var Jp,nT;function eh(){if(nT)return Jp;nT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Jp=e,Jp}var th,rT;function oT(){return rT||(rT=1,th=Function.call.bind(Object.prototype.hasOwnProperty)),th}var nh,iT;function aB(){if(iT)return nh;iT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=eh(),n={},r=oT();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](a,u,l,s,null,t)}catch(v){d=v}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";e("Failed "+s+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},nh=o,nh}var rh,aT;function sB(){if(aT)return rh;aT=1;var e=eT(),t=iB(),n=eh(),r=oT(),o=aB(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return rh=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(j){var B=j&&(c&&j[c]||j[u]);if(typeof B=="function")return B}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:x,element:E(),elementType:T(),instanceOf:I,node:_(),objectOf:k,oneOf:w,oneOfType:P,shape:$,exact:N};function v(j,B){return j===B?j!==0||1/j===1/B:j!==j&&B!==B}function m(j,B){this.message=j,this.data=B&&typeof B=="object"?B:{},this.stack=""}m.prototype=Error.prototype;function h(j){if(process.env.NODE_ENV!=="production")var B={},H=0;function q(ne,re,ee,G,Y,Q,de){if(G=G||f,Q=Q||ee,de!==n){if(l){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=G+":"+ee;!B[oe]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[oe]=!0,H++)}}return re[ee]==null?ne?re[ee]===null?new m("The "+Y+" `"+Q+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new m("The "+Y+" `"+Q+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:j(re,ee,G,Y,Q)}var W=q.bind(null,!1);return W.isRequired=q.bind(null,!0),W}function y(j){function B(H,q,W,ne,re,ee){var G=H[q],Y=z(G);if(Y!==j){var Q=M(G);return new m("Invalid "+ne+" `"+re+"` of type "+("`"+Q+"` supplied to `"+W+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return h(B)}function b(){return h(a)}function x(j){function B(H,q,W,ne,re){if(typeof j!="function")return new m("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var ee=H[q];if(!Array.isArray(ee)){var G=z(ee);return new m("Invalid "+ne+" `"+re+"` of type "+("`"+G+"` supplied to `"+W+"`, expected an array."))}for(var Y=0;Y<ee.length;Y++){var Q=j(ee,Y,W,ne,re+"["+Y+"]",n);if(Q instanceof Error)return Q}return null}return h(B)}function E(){function j(B,H,q,W,ne){var re=B[H];if(!s(re)){var ee=z(re);return new m("Invalid "+W+" `"+ne+"` of type "+("`"+ee+"` supplied to `"+q+"`, expected a single ReactElement."))}return null}return h(j)}function T(){function j(B,H,q,W,ne){var re=B[H];if(!e.isValidElementType(re)){var ee=z(re);return new m("Invalid "+W+" `"+ne+"` of type "+("`"+ee+"` supplied to `"+q+"`, expected a single ReactElement type."))}return null}return h(j)}function I(j){function B(H,q,W,ne,re){if(!(H[q]instanceof j)){var ee=j.name||f,G=V(H[q]);return new m("Invalid "+ne+" `"+re+"` of type "+("`"+G+"` supplied to `"+W+"`, expected ")+("instance of `"+ee+"`."))}return null}return h(B)}function w(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(H,q,W,ne,re){for(var ee=H[q],G=0;G<j.length;G++)if(v(ee,j[G]))return null;var Y=JSON.stringify(j,function(de,R){var oe=M(R);return oe==="symbol"?String(R):R});return new m("Invalid "+ne+" `"+re+"` of value `"+String(ee)+"` "+("supplied to `"+W+"`, expected one of "+Y+"."))}return h(B)}function k(j){function B(H,q,W,ne,re){if(typeof j!="function")return new m("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var ee=H[q],G=z(ee);if(G!=="object")return new m("Invalid "+ne+" `"+re+"` of type "+("`"+G+"` supplied to `"+W+"`, expected an object."));for(var Y in ee)if(r(ee,Y)){var Q=j(ee,Y,W,ne,re+"."+Y,n);if(Q instanceof Error)return Q}return null}return h(B)}function P(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<j.length;B++){var H=j[B];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(H)+" at index "+B+"."),a}function q(W,ne,re,ee,G){for(var Y=[],Q=0;Q<j.length;Q++){var de=j[Q],R=de(W,ne,re,ee,G,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&Y.push(R.data.expectedType)}var oe=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new m("Invalid "+ee+" `"+G+"` supplied to "+("`"+re+"`"+oe+"."))}return h(q)}function _(){function j(B,H,q,W,ne){return O(B[H])?null:new m("Invalid "+W+" `"+ne+"` supplied to "+("`"+q+"`, expected a ReactNode."))}return h(j)}function F(j,B,H,q,W){return new m((j||"React class")+": "+B+" type `"+H+"."+q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function $(j){function B(H,q,W,ne,re){var ee=H[q],G=z(ee);if(G!=="object")return new m("Invalid "+ne+" `"+re+"` of type `"+G+"` "+("supplied to `"+W+"`, expected `object`."));for(var Y in j){var Q=j[Y];if(typeof Q!="function")return F(W,ne,re,Y,M(Q));var de=Q(ee,Y,W,ne,re+"."+Y,n);if(de)return de}return null}return h(B)}function N(j){function B(H,q,W,ne,re){var ee=H[q],G=z(ee);if(G!=="object")return new m("Invalid "+ne+" `"+re+"` of type `"+G+"` "+("supplied to `"+W+"`, expected `object`."));var Y=t({},H[q],j);for(var Q in Y){var de=j[Q];if(r(j,Q)&&typeof de!="function")return F(W,ne,re,Q,M(de));if(!de)return new m("Invalid "+ne+" `"+re+"` key `"+Q+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(H[q],null," ")+`
16
16
  Valid keys: `+JSON.stringify(Object.keys(j),null," "));var R=de(ee,Q,W,ne,re+"."+Q,n);if(R)return R}return null}return h(B)}function O(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(O);if(j===null||s(j))return!0;var B=d(j);if(B){var H=B.call(j),q;if(B!==j.entries){for(;!(q=H.next()).done;)if(!O(q.value))return!1}else for(;!(q=H.next()).done;){var W=q.value;if(W&&!O(W[1]))return!1}}else return!1;return!0;default:return!1}}function D(j,B){return j==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function z(j){var B=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":D(B,j)?"symbol":B}function M(j){if(typeof j>"u"||j===null)return""+j;var B=z(j);if(B==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return B}function C(j){var B=M(j);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function V(j){return!j.constructor||!j.constructor.name?f:j.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},rh}var oh,sT;function lB(){if(sT)return oh;sT=1;var e=eh();function t(){}function n(){}return n.resetWarningCache=t,oh=function(){function r(a,s,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},oh}var lT;function cB(){if(lT)return Jl.exports;if(lT=1,process.env.NODE_ENV!=="production"){var e=eT(),t=!0;Jl.exports=sB()(e.isElement,t)}else Jl.exports=lB()();return Jl.exports}var uB=cB();const vt=Gh(uB);function wo(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const dB=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function wi(e,t,n){const r=fB(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&cT(r,"path",i),cT(r,"relativePath",i),r}function fB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=dB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function cT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const pB=[".DS_Store","Thumbs.db"];function hB(e){return wo(this,void 0,void 0,function*(){return tc(e)&&mB(e.dataTransfer)?bB(e.dataTransfer,e.type):gB(e)?vB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?yB(e):[]})}function mB(e){return tc(e)}function gB(e){return tc(e)&&tc(e.target)}function tc(e){return typeof e=="object"&&e!==null}function vB(e){return ih(e.target.files).map(t=>wi(t))}function yB(e){return wo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>wi(n))})}function bB(e,t){return wo(this,void 0,void 0,function*(){if(e.items){const n=ih(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(xB));return uT(dT(r))}return uT(ih(e.files).map(n=>wi(n)))})}function uT(e){return e.filter(t=>pB.indexOf(t.name)===-1)}function ih(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function xB(e){if(typeof e.webkitGetAsEntry!="function")return fT(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?pT(t):fT(e,t)}function dT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?dT(n):[n]],[])}function fT(e,t){return wo(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,wi(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return wi(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function wB(e){return wo(this,void 0,void 0,function*(){return e.isDirectory?pT(e):SB(e)})}function pT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>wo(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(wB));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function SB(e){return wo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=wi(r,e.fullPath);t(o)},r=>{n(r)})})})}var nc={},hT;function TB(){return hT||(hT=1,nc.__esModule=!0,nc.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),nc}var EB=TB();const ah=Gh(EB);function mT(e){return IB(e)||CB(e)||bT(e)||kB()}function kB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
17
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IB(e){if(Array.isArray(e))return sh(e)}function gT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gT(Object(n),!0).forEach(function(r){yT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ha(e,t){return OB(e)||PB(e,t)||bT(e,t)||AB()}function AB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.